import type { TurnRecorder } from '../../manager/session/turn-recorder.js'; import type { SessionEvent, Turn } from '../../types/session/index.js'; import { type SessionLogCursor, type SessionLogReplay } from '../../types/session/log-cursor.js'; import { type SessionRecord } from '../../types/session/records.js'; import type { QueryParams } from './index.js'; import type { PreparedTurn } from './prepare-turn.js'; /** * The turn that was cancelled before it started. * * Attachment materialization happens before the turn's context exists, and * a cancellation observed there still belongs to a turn: it is recorded and * reported like any other, without any of the authority-bearing work — * prompt contributions, host callbacks, tools, plugins, sandbox, guardrails, * advisors, providers — that a turn which is allowed to proceed would do next. */ export declare function settlePreStartCancellation(params: QueryParams, prepared: PreparedTurn): AsyncGenerator; /** * Hand a returning consumer what it missed, or tell it why it cannot have it. * * Yields NOTHING on a refusal. A partial catch-up is the failure this exists to * prevent: a consumer that receives some of the gap folds it into its state and * cannot tell the state is wrong, where one that receives an explicit * `unavailable` re-derives from the log and is right. The turn continues * either way — a stale cursor belongs to the client, and must not be able to * stop the work. * * What is yielded is the live events the missed records stand for; the * record-only types (messages, checkpoints, decisions) are in the log and not * on the stream. */ export declare function catchUpFromCursor(recorder: TurnRecorder, cursor: SessionLogCursor, onEventReplay: ((replay: SessionLogReplay) => void) | undefined, onReplayObserverError: (error: unknown) => void): AsyncGenerator; /** The live event a persisted-event record stands for; `undefined` for a record-only type. */ export declare function liveEventOfRecord(record: SessionRecord): SessionEvent | undefined; //# sourceMappingURL=cancelled-before-start.d.ts.map