import type { Message, Provider } from "@kenkaiiii/gg-ai"; /** * A run whose tool calls fail more often than this is thrashing, not * progressing — refuse to extend its turn budget. */ export declare const TURN_EXTENSION_MAX_FAILURE_RATIO = 0.5; /** Resolve the per-result cap passed to the agent loop for the active transport. */ export declare function resolveSessionToolResultCharLimit(model: string, provider: Provider, accountId?: string): number; /** * Aggregate budget for ALL tool results produced in one assistant turn. * Individual results are already capped, but wide parallel fan-outs (GPT-5.6's * signature behavior) were observed injecting 100k+ uncached tokens in a single * turn. ~15% of the context window in chars (1 token ≈ 3.5 chars), floored at * 100KB so small windows still fit two full-size reads, ceilinged at 240KB so * 1M-context models don't waive the budget entirely. */ export declare function resolveSessionTurnToolResultCharLimit(model: string, provider: Provider, accountId?: string): number; /** Marker the compactor prepends to the summary message it injects. */ /** * True when an assistant message ends a turn with tool calls still awaiting * their results. Inserting a user message there would orphan the tool_use * blocks and the provider rejects the next request. */ export declare function hasUnresolvedToolCalls(message: Message): boolean; /** Expand a leading `~` so `/import ~/.codex/...` works from any shell. */ export declare function resolveHomePath(filePath: string): string;