import type { ContentBlockParam } from '@anthropic-ai/sdk/resources'; import { type SubagentOutputRecorder } from './subagent-output-capture.js'; import { type TransformDeps } from './stream-consumer.js'; import type { AccountingAccumulator } from './accounting-accumulator.js'; import type { LedgerLifecycle } from './ledger-lifecycle.js'; import type { OutputBroadcast } from './output-broadcast.js'; import type { SessionStateManager } from './session-state.js'; import type { AgentConfig, OutputEvent, ResponseMetadata, SessionState } from '../types.js'; import type { ProviderQuery, ProviderEvent } from '../provider.js'; import type { Message } from '../types.js'; export interface TurnRunnerDeps { getConfig: () => AgentConfig; getAbortController: () => AbortController; getProviderIterator: () => AsyncIterator; stateManager: SessionStateManager; accounting: AccountingAccumulator; ledger: LedgerLifecycle; outputBroadcast: OutputBroadcast; conversationHistory: Message[]; getInitPromise: () => Promise | null; getSessionId: () => string | undefined; getState: () => SessionState; setState: (s: SessionState) => void; getLastResponseMetadata: () => ResponseMetadata | null; setLastResponseMetadata: (m: ResponseMetadata) => void; getPendingFrameworkContext: () => string[]; setPendingFrameworkContext: (v: string[]) => void; getInboundMessageCount: () => number; incInboundMessageCount: () => number; getTurnCount: () => number; incTurnCount: () => void; getSubagentOutputRecorder: () => SubagentOutputRecorder | null | undefined; setSubagentOutputRecorder: (r: SubagentOutputRecorder | null) => void; getProviderQuery: () => ProviderQuery; getLedgerMetadata: () => ReturnType; } export declare class TurnStreamRunner { private readonly deps; constructor(deps: TurnRunnerDeps); assertCanSend(): void; summarize(blocks: ContentBlockParam[]): string; withPendingContext(content: string | ContentBlockParam[]): string | ContentBlockParam[]; ensureLedger(): void; buildTransformDeps(): TransformDeps; runStream(content: string | ContentBlockParam[], inputStream: { pushUserMessage: (c: string | ContentBlockParam[]) => void; }): AsyncIterableIterator; queueFrameworkContext(text: string): void; }