docs: correct idle timeout comments for question tools
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
export type LiveProcess = { toolCallIds: string[]; kill(): void };
|
||||
|
||||
// pi runs a message's tools (each capped at 30s by tool-execute) and calls back well within this;
|
||||
// it stays under MCP_TOOL_TIMEOUT so an orphaned process is killed before the CLI gives up on its own.
|
||||
// Tools usually call back within seconds, but a question tool holds its call until the learner
|
||||
// answers. Past this, the process is killed and the answer starts a fresh one with a full replay.
|
||||
// It stays under MCP_TOOL_TIMEOUT so the process is killed before the CLI gives up on its own.
|
||||
export const LIVE_PROCESS_IDLE_TIMEOUT_MS = 10 * 60_000;
|
||||
|
||||
/** Test seam (runner.ts's pdfModelOverride idiom). */
|
||||
|
||||
@@ -36,8 +36,9 @@ type RunClaudeOptions = { cwd: string; env: NodeJS.ProcessEnv };
|
||||
|
||||
export type RunClaude = (args: string[], options: RunClaudeOptions) => ChildProcessWithoutNullStreams | null;
|
||||
|
||||
// A held MCP call lasts until pi has run every tool of the message (each capped at 30s by
|
||||
// tool-execute) and called back; this must outlast that so the CLI never times out first.
|
||||
// A held MCP call lasts until pi calls back with the tool result, which for a question tool is
|
||||
// whenever the learner answers; this must outlast the live-process idle timeout so the CLI never
|
||||
// times out first.
|
||||
const MCP_TOOL_TIMEOUT_MS = 30 * 60_000;
|
||||
|
||||
const PRIVATE_FILE_MODE = 0o600;
|
||||
|
||||
Reference in New Issue
Block a user