import type { PendingDecision } from '../types/hitl/index.js'; import type { TurnExecutionStatus, TurnStatus } from '../types/session/index.js'; import type { ReadModel } from './registry.js'; /** * A session's status, maintained from its own log. * * `deriveTurnStatus` answers about an instant: hand it a status and a park * and it projects them. This derives both from the session log's records — * the turn lifecycle and the `decision_*` records — so the projection needs * the log and nothing else, in this process or another. * * The instant-projector is still what answers; this only feeds it, so the * rule for `awaiting_hitl_resolution` has one implementation. */ export declare const SESSION_STATUS_READ_MODEL_ID = "namzu.session.status"; export interface SessionStatusState { /** The execution status of the session's latest turn (`idle` before any). */ readonly execution: TurnExecutionStatus; /** The outstanding park, if the log says there is one. */ readonly park?: PendingDecision; /** `deriveTurnStatus` at the moment the last record was folded in. */ readonly status: TurnStatus; } /** * `now` is injected: `awaiting_hitl` becomes `awaiting_hitl_resolution` when * a deadline passes, and a deadline passes without any record being * appended. The state a fold holds is the status as of the last record; a * caller that needs the answer right now re-projects with its own clock. */ export interface SessionStatusReadModelOptions { readonly now?: () => number; } export declare function createSessionStatusReadModel(options?: SessionStatusReadModelOptions): ReadModel; //# sourceMappingURL=session-status.d.ts.map