import type { RunEvent, RunEventBody, RedisPublisher } from "./agent/events.js"; export interface RunEventEmitterOptions { runId: string; publisher: RedisPublisher; /** The durable store's max cursor at claim (0 ⇒ fresh run). Restart resumes in the next block. */ resumeAfterCursor?: number; /** Injected clock for deterministic tests. Defaults to Date.now. */ now?: () => number; /** Optional local mirror of every (already-redacted) event — used to surface the run's output in an * on-screen terminal in the ambient desktop (docs/SCREEN_CAPTURE.md). Best-effort: a sink throw never * affects the run or the broker publish. Only fed events that already passed the run's redactor. */ localSink?: (event: RunEvent) => void; } export declare class WorkerRunEventEmitter { private readonly runId; private readonly publisher; private readonly now; private readonly localSink; private turn; private seq; constructor(opts: RunEventEmitterOptions); /** Stamp + publish a run-level or agent frame. Agent frames pass their turnId. */ emit(body: RunEventBody, turnId?: string): RunEvent; /** Restart resume: jump past the previous session's frames (claim carries the store max). */ resumeAfter(maxCursor: number): void; /** Open a new agent stride block and emit its opening `turn_started` frame (built by the caller, * which names the leaf). */ beginTurn(turnId: string, started: RunEventBody): void; }