import { type WorkflowDisplay, type WorkflowRunListPage, type WorkflowRunView, type WorkflowSessionView } from "../client/view.js"; import type { StateDatabase } from "../state/database.js"; import { type JsonValue } from "../state/json.js"; import type { WorkflowRunQueueStore, WorkflowRunQueueRecord } from "../workflows/queue.js"; import type { WorkflowRunStore } from "../workflows/store.js"; import type { WorkflowRunState, WorkflowStepRecord } from "../workflows/types.js"; import type { ServerStateStore } from "./state.js"; export declare const WORKFLOW_PAGE_KINDS: readonly ["steps", "trace", "trace_at_step", "session_entries", "session_events", "settings", "follow_ups", "updates"]; export type WorkflowPageKind = (typeof WORKFLOW_PAGE_KINDS)[number]; type RunPageRequest = { kind: WorkflowPageKind; cursor: number; }; export declare class ServerViewStore { private readonly state; private readonly queue; private readonly serverState; private readonly runs; private readonly hasLiveRunner; private readonly hasActiveSessionTurn; private readonly contentRecords; private readonly listCache; private readonly runCache; private readonly sessionCache; private contentBytes; private activityRevision; private readonly workflowMessages; constructor(state: StateDatabase, queue: WorkflowRunQueueStore, serverState: ServerStateStore, runs: WorkflowRunStore, hasLiveRunner: (runId: string) => boolean, hasActiveSessionTurn: (targetSessionId: string) => boolean); noteWorkflowActivityChange(): void; list(cursor?: number, limit?: number): WorkflowRunListPage; run(runId: string): WorkflowRunView | null; page(runId: string, request: RunPageRequest): WorkflowRunView | null; private readRun; session(sessionId: string, coordinator?: { epoch: string; active: boolean; branchReportRequired: boolean; } | null): WorkflowSessionView; clearTerminal(sessionId: string, runId?: string, now?: number): string | null; content(runId: string, contentPath: string, offset: number): JsonValue | null; private projectStep; private projectTraceEvent; private projectSessionEntry; private projectSessionEvent; private projectUpdate; private projectReplayCheckpoint; private projectRecordField; private projectState; private projectWorkflow; private projectWorkflowNode; private projectDisplay; private projectValue; private registerContent; private rememberContent; private recoverContent; clearConnection(_connectionId: string): void; private retainedTerminalRunId; private hasCancelledSource; private isMessageEligible; private openWorkflowMessage; private workflowActivityRevision; private display; private hasActivity; private pendingRequestKind; private requestDeliveryConfirmed; private hasAmbiguousEffect; private runVersion; private pendingSessionRevision; private presentationRevision; } export type WorkflowDisplayFacts = { queueStatus: WorkflowRunQueueRecord["status"]; durableStatus: WorkflowRunState["status"] | undefined; paused: boolean; ambiguous: boolean; runnerActive: boolean; originTurnActive: boolean; pendingRequestKind: "agent" | "assistant" | "checkpoint" | "decision" | null; requestDeliveryConfirmed: boolean; errorMessage: string | null; }; export declare function reduceWorkflowDisplay(facts: WorkflowDisplayFacts): WorkflowDisplay; export declare function toCompactStepJson(step: WorkflowStepRecord): JsonValue; export declare function workflowPageStart(total: number, cursor?: number): number; export {};