/** * Response processing handler — extracted from Agent class. * Handles provider response pipeline, event emission, session * persistence, text rendering, and autonomous continuation parsing. */ import { type TextBlock } from '../types/blocks.js'; import type { Request, Response } from '../types/provider.js'; import type { AgentInternals } from './agent-internals.js'; import type { Context, RunOptions } from './context.js'; import { type ContinueDirective } from './continue-to-next-iteration.js'; interface ProcessResponseResult { finalText: string; aborted: boolean; done: boolean; directive?: ContinueDirective | undefined; } export interface AgentResponseHandler { buildAndRunRequestPipeline(opts: RunOptions): Promise; processResponse(raw: Response, req: Request): Promise; } /** * Build the leader-only, per-request decision gate for ``. * * The base system prompt is intentionally frozen for provider caching, while * todos change during tool execution. Keeping this block volatile makes the * final-response contract follow the live todo state on every iteration. */ export declare function buildLiveNextStepsGateBlock(ctx: Pick): TextBlock | undefined; export declare function createAgentResponseHandler(a: AgentInternals): AgentResponseHandler; export {}; //# sourceMappingURL=agent-response.d.ts.map