/** * Agent loop handler — extracted from Agent class. * Contains runInner (the main iteration loop), checkIterationLimit, * compactContextIfNeeded, emitContextPct, and injectPendingBtwNotes. */ import type { RunController } from '../kernel/run-controller.js'; import type { AgentInternals } from './agent-internals.js'; import type { AgentResponseHandler } from './agent-response.js'; import type { AgentToolHandler } from './agent-tools.js'; import type { RunResult, UserInputPayload } from './agent-types.js'; import type { RunOptions } from './context.js'; /** Extract a human-readable reason from an AbortSignal. */ export declare function signalAbortReason(signal: AbortSignal): string; interface LoopHandlers { tools: AgentToolHandler; response: AgentResponseHandler; } export interface AgentLoopHandler { runInner(inputPayload: UserInputPayload, opts: RunOptions, controller: RunController, autonomousContinue: boolean): Promise; } export declare function createAgentLoopHandler(a: AgentInternals, handlers: LoopHandlers): AgentLoopHandler; export {}; //# sourceMappingURL=agent-loop.d.ts.map