fix: trim persisted tool results and sanitize MCP schemas

This commit is contained in:
sooth
2026-04-02 07:49:58 -04:00
parent 9f48bb4431
commit 5c4469fe81
10 changed files with 449 additions and 26 deletions

View File

@@ -290,6 +290,14 @@ export type ToolUseContext = {
* resumeAgentBackground threads one reconstructed from sidechain records.
*/
contentReplacementState?: ContentReplacementState
/**
* Interactive REPL only: mirror persisted tool-result replacements back
* into the live transcript so the original oversized payloads can be
* released from heap once the replacement decision is known.
*/
syncToolResultReplacements?: (
replacements: ReadonlyMap<string, string>,
) => void
/**
* Parent's rendered system prompt bytes, frozen at turn start.
* Used by fork subagents to share the parent's prompt cache — re-calling