import type { FleetChatVerbosity, Message, SessionEvent } from '@wrongstack/core/types'; import type { State } from './app-state.js'; import type { AutonomyAgentStatus } from './components/history/types.js'; export type RestoredToolCall = { name: string; id: string; durationMs: number; ok: boolean; outputBytes?: number | undefined; outputTokens?: number | undefined; outputLines?: number | undefined; }; export declare function buildRestoredEntries(messages: Message[] | undefined, restoredToolCalls?: RestoredToolCall[] | undefined, restoredEvents?: SessionEvent[] | undefined): State['entries']; /** * Rebuild the checkpoint list from a resumed session's events. * * The live list is fed by the `checkpoint.written` EventBus bridge, which only * fires for checkpoints written by THIS process — so without this a resumed * session starts with an empty list and `/rewind` reports "no checkpoints" * despite a JSONL full of them. * * `fileCount` is not stored on the checkpoint event itself, but it is derivable: * the `file_snapshot` events carry the same `promptIndex`, so summing their * `files.length` per index reproduces the live stat. `DefaultSessionRewinder. * listCheckpoints` builds its counts the same way. */ export declare function buildRestoredCheckpoints(restoredEvents?: SessionEvent[] | undefined): State['checkpoints']; export interface CreateInitialStateOptions { banner: boolean; appVersion?: string | undefined; provider?: string | undefined; model: string; cwd: string; family?: string | undefined; keyTail?: string | undefined; /** Current session id (e.g. "sess_01KXV6…"). Static for the session lifetime. */ sessionId?: string | undefined; /** Active fallback profile name to display in the banner (e.g. "default"). */ profile?: string | undefined; /** Absolute path to the active profile's config.json, shown in the banner * with the profile name highlighted. Optional — falls back to the bare * {@link profile} string when not provided. */ profileConfigPath?: string | undefined; /** Background autonomy agents to display in the banner. */ autonomyAgents?: ReadonlyArray | undefined; /** Latest version published to the npm registry (drives the * "update available" indicator next to the version chip). */ latestVersion?: string | undefined; /** True when a newer published version exists than {@link appVersion}. * Both fields are sourced from the CLI's preflight update-check and * are independent — `latestVersion` may be set even when the current * version already matches the registry (in which case the indicator * is suppressed because {@link updateAvailable} is false). */ updateAvailable?: boolean | undefined; restoredEntries: State['entries']; /** Checkpoints rebuilt from a resumed session's events. Empty for a fresh session. */ restoredCheckpoints?: State['checkpoints'] | undefined; /** Initial context-window snapshot for resumed sessions. */ initialContextSnapshot?: { tokens: number; maxContext: number; } | undefined; enhanceEnabled: boolean; initialAgentsMonitorOpen?: boolean | undefined; /** Boot-time fleet-chat verbosity (from persisted config). Default 'off'. */ initialFleetChat?: FleetChatVerbosity | undefined; } export declare function createInitialState(options: CreateInitialStateOptions): State; //# sourceMappingURL=app-initial-state.d.ts.map