import { z } from 'zod'; import { SandboxConfigSchema } from '../types/sandbox/index.js'; export { SandboxConfigSchema }; export declare const TaskRouterConfigSchema: z.ZodOptional>; summarization: z.ZodOptional>; exploration: z.ZodOptional>; coding: z.ZodOptional>; verification: z.ZodOptional>; planning: z.ZodOptional>; default: z.ZodOptional>; }, "strip", z.ZodTypeAny, { compaction?: string | null | undefined; summarization?: string | null | undefined; exploration?: string | null | undefined; coding?: string | null | undefined; verification?: string | null | undefined; planning?: string | null | undefined; default?: string | null | undefined; }, { compaction?: string | null | undefined; summarization?: string | null | undefined; exploration?: string | null | undefined; coding?: string | null | undefined; verification?: string | null | undefined; planning?: string | null | undefined; default?: string | null | undefined; }>>; export declare const CompactionConfigSchema: z.ZodObject<{ /** Request-only exact duplicate observation masking. Enabled unless false; disabled strategy opts out too. */ deduplicateObservations: z.ZodOptional; /** * `salience` is the default: every message scored without a model, the * context held from half the window. `structured` is the previous * default — positional retention, a pass only at the trigger — and one * word away for a host that wants it back. */ strategy: z.ZodDefault>; /** * `salience` only: the fraction of the window at which the working-set * pass starts evicting low-salience messages, well before * `triggerThreshold` summarises. The context is held around here. */ softTarget: z.ZodOptional; /** * Optional model context-window size (tokens) the compaction trigger * measures the CURRENT window against. NO default: when omitted the * trigger falls back to the turn-level cumulative `tokenBudget` exactly as * before, so existing consumers are byte-identical. Hosts that keep * `tokenBudget` unlimited (0) set this so compaction fires on * window-pressure instead of being a silent no-op. */ contextWindowTokens: z.ZodOptional; /** Fraction of the context window at which a compaction pass fires. */ triggerThreshold: z.ZodDefault; /** * Fraction the pass must get the context BELOW to be worth keeping. * * This is hysteresis, and without it compaction can thrash: a pass that * only shaves the context from 0.72 to 0.71 of the window leaves the * trigger armed, so the next iteration compacts again — paying a * summarization call and busting the prompt-cache prefix each time, for * nothing. A pass that cannot reach this level logs the shortfall and * the turn continues rather than repeating a move that does not work. * * The field was declared and set by the shipped CLI but read by nothing; * the choice was to implement it or delete it, and thrash is a real * failure mode once the trigger actually fires. */ resetThreshold: z.ZodDefault; keepRecentMessages: z.ZodDefault; /** * Size the retained tail by TOKENS instead of by message count. * * A count cannot express what the tail costs. Four messages is four * short turns or three short turns and a 200 KB tool result, and in the * second case the tail alone can approach `resetThreshold` — the pass * completes, reports it did not reach the threshold, leaves the trigger * armed, and the next iteration pays another summarization call and * busts the prompt-cache prefix again. * * Absent means the count is used, exactly as before. Set, it replaces * only the NAIVE boundary; the safe-cut search that keeps a `tool_use` * with its `tool_result` runs from there unchanged. */ keepRecentTokens: z.ZodOptional; /** * Before summarizing destructively, clear the OUTPUT of old, large tool * results in place. * * Compaction paraphrases the agent's own reasoning away — the decisions, * the false starts it learned from, the exact wording of a plan. That is * a heavy price for a context problem usually caused by something much * dumber: a few enormous tool outputs the agent already read and moved * past. Clearing those reclaims most of the same tokens while keeping * every message verbatim, and it is safe where trimming is not, because * nothing moves — the `tool_use` ↔ `tool_result` pairing is untouched by * construction. * * If the clear gets the context back under `triggerThreshold`, the * summarization pass is skipped entirely. Set `false` to go straight to * summarization. */ clearToolResults: z.ZodDefault; /** * Record what each pass removes, as a `compaction_shed` event. * * On by default: without it the shed content exists nowhere afterwards * — not in memory, not in `messages.json`, not in the transcript — and * "what did the agent decide three compactions ago" is unanswerable. * * Off is for an operator with a transcript-size constraint, and it is a * real trade: the transcript grows by roughly what the compaction saved * in context, since the whole point is that the bodies are kept. */ recordShedHistory: z.ZodDefault; /** Most recent tool results left alone — the agent is likely still using them. */ keepRecentToolResults: z.ZodDefault; /** * Don't clear results smaller than this. Below it the placeholder is * comparable in size to the output, so the churn buys nothing and costs * the model a confusing hole in its history. */ minToolResultCharsToClear: z.ZodDefault; /** Tools whose output is never cleared, by name. */ preserveToolResultsFrom: z.ZodOptional>; maxToolResults: z.ZodDefault; maxListSize: z.ZodDefault; /** * Entries pinned at the head of each capped list, never evicted. * * Eviction used to drop the OLDEST entry, so a long turn silently * deleted the decision that set its approach while keeping the last * twenty-five incidental notes. The early entries are the load-bearing * ones and the recent ones are still in the un-compacted tail. */ keepFirstEntries: z.ZodDefault; llmVerification: z.ZodDefault; llmVerificationMaxTokens: z.ZodDefault; richStateThreshold: z.ZodDefault; convoTextBudget: z.ZodDefault; maxSentencesPerTurn: z.ZodDefault; maxCharsPerNote: z.ZodDefault; maxCharsPerRequirement: z.ZodDefault; maxCharsPerTask: z.ZodDefault; }, "strip", z.ZodTypeAny, { strategy: "structured" | "salience" | "sliding-window" | "disabled"; triggerThreshold: number; resetThreshold: number; keepRecentMessages: number; clearToolResults: boolean; recordShedHistory: boolean; keepRecentToolResults: number; minToolResultCharsToClear: number; maxToolResults: number; maxListSize: number; keepFirstEntries: number; llmVerification: boolean; llmVerificationMaxTokens: number; richStateThreshold: number; convoTextBudget: number; maxSentencesPerTurn: number; maxCharsPerNote: number; maxCharsPerRequirement: number; maxCharsPerTask: number; deduplicateObservations?: boolean | undefined; softTarget?: number | undefined; contextWindowTokens?: number | undefined; keepRecentTokens?: number | undefined; preserveToolResultsFrom?: string[] | undefined; }, { deduplicateObservations?: boolean | undefined; strategy?: "structured" | "salience" | "sliding-window" | "disabled" | undefined; softTarget?: number | undefined; contextWindowTokens?: number | undefined; triggerThreshold?: number | undefined; resetThreshold?: number | undefined; keepRecentMessages?: number | undefined; keepRecentTokens?: number | undefined; clearToolResults?: boolean | undefined; recordShedHistory?: boolean | undefined; keepRecentToolResults?: number | undefined; minToolResultCharsToClear?: number | undefined; preserveToolResultsFrom?: string[] | undefined; maxToolResults?: number | undefined; maxListSize?: number | undefined; keepFirstEntries?: number | undefined; llmVerification?: boolean | undefined; llmVerificationMaxTokens?: number | undefined; richStateThreshold?: number | undefined; convoTextBudget?: number | undefined; maxSentencesPerTurn?: number | undefined; maxCharsPerNote?: number | undefined; maxCharsPerRequirement?: number | undefined; maxCharsPerTask?: number | undefined; }>; export type CompactionConfig = z.infer; export declare const AgentBusConfigSchema: z.ZodObject<{ enabled: z.ZodDefault; lockTimeoutMs: z.ZodDefault; lockAcquireTimeoutMs: z.ZodDefault; maxLocksPerAgent: z.ZodDefault; breakerFailureThreshold: z.ZodDefault; breakerResetTimeoutMs: z.ZodDefault; }, "strip", z.ZodTypeAny, { enabled: boolean; lockTimeoutMs: number; lockAcquireTimeoutMs: number; maxLocksPerAgent: number; breakerFailureThreshold: number; breakerResetTimeoutMs: number; }, { enabled?: boolean | undefined; lockTimeoutMs?: number | undefined; lockAcquireTimeoutMs?: number | undefined; maxLocksPerAgent?: number | undefined; breakerFailureThreshold?: number | undefined; breakerResetTimeoutMs?: number | undefined; }>; export type AgentBusConfig = z.infer; export declare const PromptCacheConfigSchema: z.ZodObject<{ enabled: z.ZodDefault; strategy: z.ZodDefault>; }, "strip", z.ZodTypeAny, { enabled: boolean; strategy: "disabled" | "auto"; }, { enabled?: boolean | undefined; strategy?: "disabled" | "auto" | undefined; }>; export declare const PluginRuntimeConfigSchema: z.ZodObject<{ enabled: z.ZodDefault; autoDiscovery: z.ZodDefault; allowedScopes: z.ZodDefault, "many">>; hookTimeoutMs: z.ZodDefault; }, "strip", z.ZodTypeAny, { enabled: boolean; autoDiscovery: boolean; allowedScopes: ("user" | "project")[]; hookTimeoutMs: number; }, { enabled?: boolean | undefined; autoDiscovery?: boolean | undefined; allowedScopes?: ("user" | "project")[] | undefined; hookTimeoutMs?: number | undefined; }>; export type PluginRuntimeConfig = z.infer; export declare const RuntimeConfigSchema: z.ZodObject<{ model: z.ZodDefault; temperature: z.ZodDefault; tokenBudget: z.ZodDefault; maxResponseTokens: z.ZodDefault; timeoutMs: z.ZodDefault; maxIterations: z.ZodDefault; taskRouter: z.ZodOptional>; summarization: z.ZodOptional>; exploration: z.ZodOptional>; coding: z.ZodOptional>; verification: z.ZodOptional>; planning: z.ZodOptional>; default: z.ZodOptional>; }, "strip", z.ZodTypeAny, { compaction?: string | null | undefined; summarization?: string | null | undefined; exploration?: string | null | undefined; coding?: string | null | undefined; verification?: string | null | undefined; planning?: string | null | undefined; default?: string | null | undefined; }, { compaction?: string | null | undefined; summarization?: string | null | undefined; exploration?: string | null | undefined; coding?: string | null | undefined; verification?: string | null | undefined; planning?: string | null | undefined; default?: string | null | undefined; }>>; compaction: z.ZodDefault; /** * `salience` is the default: every message scored without a model, the * context held from half the window. `structured` is the previous * default — positional retention, a pass only at the trigger — and one * word away for a host that wants it back. */ strategy: z.ZodDefault>; /** * `salience` only: the fraction of the window at which the working-set * pass starts evicting low-salience messages, well before * `triggerThreshold` summarises. The context is held around here. */ softTarget: z.ZodOptional; /** * Optional model context-window size (tokens) the compaction trigger * measures the CURRENT window against. NO default: when omitted the * trigger falls back to the turn-level cumulative `tokenBudget` exactly as * before, so existing consumers are byte-identical. Hosts that keep * `tokenBudget` unlimited (0) set this so compaction fires on * window-pressure instead of being a silent no-op. */ contextWindowTokens: z.ZodOptional; /** Fraction of the context window at which a compaction pass fires. */ triggerThreshold: z.ZodDefault; /** * Fraction the pass must get the context BELOW to be worth keeping. * * This is hysteresis, and without it compaction can thrash: a pass that * only shaves the context from 0.72 to 0.71 of the window leaves the * trigger armed, so the next iteration compacts again — paying a * summarization call and busting the prompt-cache prefix each time, for * nothing. A pass that cannot reach this level logs the shortfall and * the turn continues rather than repeating a move that does not work. * * The field was declared and set by the shipped CLI but read by nothing; * the choice was to implement it or delete it, and thrash is a real * failure mode once the trigger actually fires. */ resetThreshold: z.ZodDefault; keepRecentMessages: z.ZodDefault; /** * Size the retained tail by TOKENS instead of by message count. * * A count cannot express what the tail costs. Four messages is four * short turns or three short turns and a 200 KB tool result, and in the * second case the tail alone can approach `resetThreshold` — the pass * completes, reports it did not reach the threshold, leaves the trigger * armed, and the next iteration pays another summarization call and * busts the prompt-cache prefix again. * * Absent means the count is used, exactly as before. Set, it replaces * only the NAIVE boundary; the safe-cut search that keeps a `tool_use` * with its `tool_result` runs from there unchanged. */ keepRecentTokens: z.ZodOptional; /** * Before summarizing destructively, clear the OUTPUT of old, large tool * results in place. * * Compaction paraphrases the agent's own reasoning away — the decisions, * the false starts it learned from, the exact wording of a plan. That is * a heavy price for a context problem usually caused by something much * dumber: a few enormous tool outputs the agent already read and moved * past. Clearing those reclaims most of the same tokens while keeping * every message verbatim, and it is safe where trimming is not, because * nothing moves — the `tool_use` ↔ `tool_result` pairing is untouched by * construction. * * If the clear gets the context back under `triggerThreshold`, the * summarization pass is skipped entirely. Set `false` to go straight to * summarization. */ clearToolResults: z.ZodDefault; /** * Record what each pass removes, as a `compaction_shed` event. * * On by default: without it the shed content exists nowhere afterwards * — not in memory, not in `messages.json`, not in the transcript — and * "what did the agent decide three compactions ago" is unanswerable. * * Off is for an operator with a transcript-size constraint, and it is a * real trade: the transcript grows by roughly what the compaction saved * in context, since the whole point is that the bodies are kept. */ recordShedHistory: z.ZodDefault; /** Most recent tool results left alone — the agent is likely still using them. */ keepRecentToolResults: z.ZodDefault; /** * Don't clear results smaller than this. Below it the placeholder is * comparable in size to the output, so the churn buys nothing and costs * the model a confusing hole in its history. */ minToolResultCharsToClear: z.ZodDefault; /** Tools whose output is never cleared, by name. */ preserveToolResultsFrom: z.ZodOptional>; maxToolResults: z.ZodDefault; maxListSize: z.ZodDefault; /** * Entries pinned at the head of each capped list, never evicted. * * Eviction used to drop the OLDEST entry, so a long turn silently * deleted the decision that set its approach while keeping the last * twenty-five incidental notes. The early entries are the load-bearing * ones and the recent ones are still in the un-compacted tail. */ keepFirstEntries: z.ZodDefault; llmVerification: z.ZodDefault; llmVerificationMaxTokens: z.ZodDefault; richStateThreshold: z.ZodDefault; convoTextBudget: z.ZodDefault; maxSentencesPerTurn: z.ZodDefault; maxCharsPerNote: z.ZodDefault; maxCharsPerRequirement: z.ZodDefault; maxCharsPerTask: z.ZodDefault; }, "strip", z.ZodTypeAny, { strategy: "structured" | "salience" | "sliding-window" | "disabled"; triggerThreshold: number; resetThreshold: number; keepRecentMessages: number; clearToolResults: boolean; recordShedHistory: boolean; keepRecentToolResults: number; minToolResultCharsToClear: number; maxToolResults: number; maxListSize: number; keepFirstEntries: number; llmVerification: boolean; llmVerificationMaxTokens: number; richStateThreshold: number; convoTextBudget: number; maxSentencesPerTurn: number; maxCharsPerNote: number; maxCharsPerRequirement: number; maxCharsPerTask: number; deduplicateObservations?: boolean | undefined; softTarget?: number | undefined; contextWindowTokens?: number | undefined; keepRecentTokens?: number | undefined; preserveToolResultsFrom?: string[] | undefined; }, { deduplicateObservations?: boolean | undefined; strategy?: "structured" | "salience" | "sliding-window" | "disabled" | undefined; softTarget?: number | undefined; contextWindowTokens?: number | undefined; triggerThreshold?: number | undefined; resetThreshold?: number | undefined; keepRecentMessages?: number | undefined; keepRecentTokens?: number | undefined; clearToolResults?: boolean | undefined; recordShedHistory?: boolean | undefined; keepRecentToolResults?: number | undefined; minToolResultCharsToClear?: number | undefined; preserveToolResultsFrom?: string[] | undefined; maxToolResults?: number | undefined; maxListSize?: number | undefined; keepFirstEntries?: number | undefined; llmVerification?: boolean | undefined; llmVerificationMaxTokens?: number | undefined; richStateThreshold?: number | undefined; convoTextBudget?: number | undefined; maxSentencesPerTurn?: number | undefined; maxCharsPerNote?: number | undefined; maxCharsPerRequirement?: number | undefined; maxCharsPerTask?: number | undefined; }>>; agentBus: z.ZodOptional; lockTimeoutMs: z.ZodDefault; lockAcquireTimeoutMs: z.ZodDefault; maxLocksPerAgent: z.ZodDefault; breakerFailureThreshold: z.ZodDefault; breakerResetTimeoutMs: z.ZodDefault; }, "strip", z.ZodTypeAny, { enabled: boolean; lockTimeoutMs: number; lockAcquireTimeoutMs: number; maxLocksPerAgent: number; breakerFailureThreshold: number; breakerResetTimeoutMs: number; }, { enabled?: boolean | undefined; lockTimeoutMs?: number | undefined; lockAcquireTimeoutMs?: number | undefined; maxLocksPerAgent?: number | undefined; breakerFailureThreshold?: number | undefined; breakerResetTimeoutMs?: number | undefined; }>>; plugins: z.ZodOptional; autoDiscovery: z.ZodDefault; allowedScopes: z.ZodDefault, "many">>; hookTimeoutMs: z.ZodDefault; }, "strip", z.ZodTypeAny, { enabled: boolean; autoDiscovery: boolean; allowedScopes: ("user" | "project")[]; hookTimeoutMs: number; }, { enabled?: boolean | undefined; autoDiscovery?: boolean | undefined; allowedScopes?: ("user" | "project")[] | undefined; hookTimeoutMs?: number | undefined; }>>; sandbox: z.ZodOptional; provider: z.ZodDefault>; timeoutMs: z.ZodDefault; memoryLimitMb: z.ZodDefault; maxProcesses: z.ZodDefault; requireIsolation: z.ZodDefault, "many">>; workspace: z.ZodDefault>; }, "strip", z.ZodTypeAny, { workspace: "ephemeral" | "working-directory"; enabled: boolean; provider: "local"; timeoutMs: number; memoryLimitMb: number; maxProcesses: number; requireIsolation: ("filesystem" | "network" | "process")[]; }, { workspace?: "ephemeral" | "working-directory" | undefined; enabled?: boolean | undefined; provider?: "local" | undefined; timeoutMs?: number | undefined; memoryLimitMb?: number | undefined; maxProcesses?: number | undefined; requireIsolation?: ("filesystem" | "network" | "process")[] | undefined; }>>; }, "strip", z.ZodTypeAny, { model: string; timeoutMs: number; compaction: { strategy: "structured" | "salience" | "sliding-window" | "disabled"; triggerThreshold: number; resetThreshold: number; keepRecentMessages: number; clearToolResults: boolean; recordShedHistory: boolean; keepRecentToolResults: number; minToolResultCharsToClear: number; maxToolResults: number; maxListSize: number; keepFirstEntries: number; llmVerification: boolean; llmVerificationMaxTokens: number; richStateThreshold: number; convoTextBudget: number; maxSentencesPerTurn: number; maxCharsPerNote: number; maxCharsPerRequirement: number; maxCharsPerTask: number; deduplicateObservations?: boolean | undefined; softTarget?: number | undefined; contextWindowTokens?: number | undefined; keepRecentTokens?: number | undefined; preserveToolResultsFrom?: string[] | undefined; }; temperature: number; tokenBudget: number; maxResponseTokens: number; maxIterations: number; sandbox?: { workspace: "ephemeral" | "working-directory"; enabled: boolean; provider: "local"; timeoutMs: number; memoryLimitMb: number; maxProcesses: number; requireIsolation: ("filesystem" | "network" | "process")[]; } | undefined; taskRouter?: { compaction?: string | null | undefined; summarization?: string | null | undefined; exploration?: string | null | undefined; coding?: string | null | undefined; verification?: string | null | undefined; planning?: string | null | undefined; default?: string | null | undefined; } | undefined; agentBus?: { enabled: boolean; lockTimeoutMs: number; lockAcquireTimeoutMs: number; maxLocksPerAgent: number; breakerFailureThreshold: number; breakerResetTimeoutMs: number; } | undefined; plugins?: { enabled: boolean; autoDiscovery: boolean; allowedScopes: ("user" | "project")[]; hookTimeoutMs: number; } | undefined; }, { model?: string | undefined; sandbox?: { workspace?: "ephemeral" | "working-directory" | undefined; enabled?: boolean | undefined; provider?: "local" | undefined; timeoutMs?: number | undefined; memoryLimitMb?: number | undefined; maxProcesses?: number | undefined; requireIsolation?: ("filesystem" | "network" | "process")[] | undefined; } | undefined; timeoutMs?: number | undefined; compaction?: { deduplicateObservations?: boolean | undefined; strategy?: "structured" | "salience" | "sliding-window" | "disabled" | undefined; softTarget?: number | undefined; contextWindowTokens?: number | undefined; triggerThreshold?: number | undefined; resetThreshold?: number | undefined; keepRecentMessages?: number | undefined; keepRecentTokens?: number | undefined; clearToolResults?: boolean | undefined; recordShedHistory?: boolean | undefined; keepRecentToolResults?: number | undefined; minToolResultCharsToClear?: number | undefined; preserveToolResultsFrom?: string[] | undefined; maxToolResults?: number | undefined; maxListSize?: number | undefined; keepFirstEntries?: number | undefined; llmVerification?: boolean | undefined; llmVerificationMaxTokens?: number | undefined; richStateThreshold?: number | undefined; convoTextBudget?: number | undefined; maxSentencesPerTurn?: number | undefined; maxCharsPerNote?: number | undefined; maxCharsPerRequirement?: number | undefined; maxCharsPerTask?: number | undefined; } | undefined; temperature?: number | undefined; tokenBudget?: number | undefined; maxResponseTokens?: number | undefined; maxIterations?: number | undefined; taskRouter?: { compaction?: string | null | undefined; summarization?: string | null | undefined; exploration?: string | null | undefined; coding?: string | null | undefined; verification?: string | null | undefined; planning?: string | null | undefined; default?: string | null | undefined; } | undefined; agentBus?: { enabled?: boolean | undefined; lockTimeoutMs?: number | undefined; lockAcquireTimeoutMs?: number | undefined; maxLocksPerAgent?: number | undefined; breakerFailureThreshold?: number | undefined; breakerResetTimeoutMs?: number | undefined; } | undefined; plugins?: { enabled?: boolean | undefined; autoDiscovery?: boolean | undefined; allowedScopes?: ("user" | "project")[] | undefined; hookTimeoutMs?: number | undefined; } | undefined; }>; export type RuntimeConfig = z.infer; export declare const RUNTIME_DEFAULTS: Readonly; //# sourceMappingURL=runtime.d.ts.map