merge: sync upstream pi-mono main into sproutclaw
Some checks failed
CI / build-check-test (push) Has been cancelled

Merge upstream/main (195 commits) while keeping sproutclaw-specific
README, webui workflow docs, and restored upstream .pi prompt templates.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
root
2026-05-22 20:05:31 +08:00
642 changed files with 18785 additions and 26436 deletions

View File

@@ -7,11 +7,11 @@
import { type ChildProcess, spawn } from "node:child_process";
import type { AgentEvent, AgentMessage, ThinkingLevel } from "@earendil-works/pi-agent-core";
import type { ImageContent } from "@earendil-works/pi-ai";
import type { SessionStats } from "../../core/agent-session.js";
import type { BashResult } from "../../core/bash-executor.js";
import type { CompactionResult } from "../../core/compaction/index.js";
import { attachJsonlLineReader, serializeJsonLine } from "./jsonl.js";
import type { RpcCommand, RpcResponse, RpcSessionState, RpcSlashCommand } from "./rpc-types.js";
import type { SessionStats } from "../../core/agent-session.ts";
import type { BashResult } from "../../core/bash-executor.ts";
import type { CompactionResult } from "../../core/compaction/index.ts";
import { attachJsonlLineReader, serializeJsonLine } from "./jsonl.ts";
import type { RpcCommand, RpcResponse, RpcSessionState, RpcSlashCommand } from "./rpc-types.ts";
// ============================================================================
// Types
@@ -59,8 +59,11 @@ export class RpcClient {
new Map();
private requestId = 0;
private stderr = "";
private options: RpcClientOptions;
constructor(private options: RpcClientOptions = {}) {}
constructor(options: RpcClientOptions = {}) {
this.options = options;
}
/**
* Start the RPC agent process.

View File

@@ -12,17 +12,17 @@
*/
import * as crypto from "node:crypto";
import type { AgentSessionRuntime } from "../../core/agent-session-runtime.js";
import type { AgentSessionRuntime } from "../../core/agent-session-runtime.ts";
import type {
ExtensionUIContext,
ExtensionUIDialogOptions,
ExtensionWidgetOptions,
WorkingIndicatorOptions,
} from "../../core/extensions/index.js";
import { takeOverStdout, writeRawStdout } from "../../core/output-guard.js";
import { killTrackedDetachedChildren } from "../../utils/shell.js";
import { type Theme, theme } from "../interactive/theme/theme.js";
import { attachJsonlLineReader, serializeJsonLine } from "./jsonl.js";
} from "../../core/extensions/index.ts";
import { takeOverStdout, writeRawStdout } from "../../core/output-guard.ts";
import { killTrackedDetachedChildren } from "../../utils/shell.ts";
import { type Theme, theme } from "../interactive/theme/theme.ts";
import { attachJsonlLineReader, serializeJsonLine } from "./jsonl.ts";
import type {
RpcCommand,
RpcExtensionInfo,
@@ -31,7 +31,7 @@ import type {
RpcResponse,
RpcSessionState,
RpcSlashCommand,
} from "./rpc-types.js";
} from "./rpc-types.ts";
// Re-export types for consumers
export type {
@@ -40,7 +40,7 @@ export type {
RpcExtensionUIResponse,
RpcResponse,
RpcSessionState,
} from "./rpc-types.js";
} from "./rpc-types.ts";
/**
* Run in RPC mode.

View File

@@ -7,10 +7,10 @@
import type { AgentMessage, ThinkingLevel } from "@earendil-works/pi-agent-core";
import type { ImageContent, Model } from "@earendil-works/pi-ai";
import type { SessionStats } from "../../core/agent-session.js";
import type { BashResult } from "../../core/bash-executor.js";
import type { CompactionResult } from "../../core/compaction/index.js";
import type { SourceInfo } from "../../core/source-info.js";
import type { SessionStats } from "../../core/agent-session.ts";
import type { BashResult } from "../../core/bash-executor.ts";
import type { CompactionResult } from "../../core/compaction/index.ts";
import type { SourceInfo } from "../../core/source-info.ts";
// ============================================================================
// RPC Commands (stdin)