import { BudgetTracker } from "./budget.js"; import type { FixManifest } from "./finish-tool.js"; import { SessionLog, type EventSink } from "./log.js"; import { type BudgetCaps, type SessionEvent } from "./types.js"; export interface SessionStateOptions { domain: string; userId: string; providerId: string; modelId: string; budget?: Partial; ndjsonPath?: string; onEvent?: EventSink; } /** * Bundles the per-session pieces (budget + log + identity) so the runner has * a single object to thread through `streamText` callbacks. Keeps the runner * itself focused on the AI-SDK glue. */ export declare class SessionState { readonly id: string; readonly domain: string; readonly userId: string; readonly budget: BudgetTracker; readonly log: SessionLog; readonly caps: BudgetCaps; private finished; private finishedManifest; constructor(opts: SessionStateOptions); start(): Promise; /** * Mark `finish_audit` was called and capture its manifest. The runner * reads this to detect completion. `manifest` may be null only in the * pathological case where the AI SDK fired a finish_audit tool_result * event but the matching tool_call's input couldn't be located — keep * the session as "finished" so the loop terminates, but the result will * carry a null manifest and the caller can detect the partial state. */ markFinished(manifest: FixManifest | null): void; isFinished(): boolean; getManifest(): FixManifest | null; emit(event: SessionEvent): Promise; events(): SessionEvent[]; } //# sourceMappingURL=session.d.ts.map