import type { AgentMessage } from "@earendil-works/pi-agent-core"; import type { JsonValue } from "@earendil-works/chord"; import type { Office } from "../office/types.js"; import type { AttachedSessionHarness, ImportedSession, ImportedSessionEntry, ResumeClaim, SessionHarnessBinding, SessionContext, SessionEntry, SessionHeader, SessionInspection, SessionListing, SessionRunRecord, SessionExecution, SessionSpend, ResponseUsage, TaskBrief, TaskSessionState } from "./types.js"; import type { McpServerConfig, McpServerSummary } from "../harness/types.js"; export declare const ScriptStoreDoc: import("@earendil-works/pi-durable").RewindableConversationDocToken<{ values: Record; }>; export declare function earlierSessionKey(sessionId: string): string; export declare function isEarlierSessionKey(key: string): boolean; export declare function importOfficeSessions(path: string, sessions: readonly ImportedSession[]): Promise; export declare function backfillImportedUsage(path: string, dryRun: boolean): Promise; export declare function readImportedContexts(path: string): Promise>; export declare class SessionStore implements SessionInspection { private readonly storage; private readonly conversation; private readonly header; private mcp; private mutationTail; private closePromise; private closed; private bound; private constructor(); static open(office: Office, key: string): Promise; static openTask(office: Office, key: string, requesterKey: string, brief: TaskBrief): Promise; private static openOrCreate; static forkRun(office: Office, key: string, cause: { sessionKey: string; messageId: string; }, entries: readonly ImportedSessionEntry[]): Promise; static inMemory(): Promise; static exists(office: Office, key: string): Promise; static list(office: Office): Promise; static inspect(office: Office, key: string): Promise; static reportTaskOutcome(office: Office, key: string, answer: string): Promise; static claimResume(office: Office, key: string, max: number): Promise; static interruptedSince(office: Office, keys: readonly string[], sinceMs: number): Promise; static listTasks(office: Office, requesterKey: string): Promise; static inspectExecution(office: Office, key: string): Promise; static spend(office: Office, key: string): Promise; static ownResponseUsage(office: Office, key: string): Promise; static isTask(office: Office, key: string): Promise; getHeader(): SessionHeader; getSessionId(): string; getEntries(): Promise; getContextEntries(): Promise; getContextTokens(): Promise; getSessionName(): Promise; buildSessionContext(): Promise; connectMcp(servers: Record, signal?: AbortSignal): Promise; mcpServers(): readonly McpServerSummary[]; bindHarness(binding: SessionHarnessBinding): Promise; appendEntries(entries: readonly ImportedSessionEntry[]): Promise; appendMessage(message: AgentMessage): Promise; appendCustomEntry(customType: string, data?: unknown, timestamp?: number): Promise; appendCompactionSummary(summary: string, timestamp: number): Promise; reset(): Promise; setSessionName(name: string): Promise; recordRun(run: SessionRunRecord): Promise; close(): Promise; private updateSessionDoc; private assertOpen; private mutate; } //# sourceMappingURL=session-store.d.ts.map