import type { ToolCall } from "../types.js"; import type { OutcomeEnvelope } from "./outcomes.js"; import { type SessionPlan } from "../store/plan.js"; export declare const DURABLE_ENVELOPE_PREFIX = "DURABLE WORK ENVELOPE"; export type FileMutationKind = "created" | "modified" | "deleted"; export declare class WorkLedger { private readonly files; private readonly artifacts; recordToolCall(call: ToolCall, ok: boolean, artifactPath?: string): void; pathsByKind(kind: FileMutationKind): string[]; artifactPaths(): string[]; get size(): number; } export interface ResponderEnvelopeState { readonly unread: readonly string[]; readonly consumed: readonly string[]; } export interface EnvelopeJobState { readonly id: string; readonly status: string; readonly command: string; readonly taskId?: string | undefined; readonly artifact?: string | undefined; } export interface DurableEnvelopeInput { readonly plan?: SessionPlan | undefined; readonly outcome?: OutcomeEnvelope | undefined; readonly ledger?: WorkLedger | undefined; readonly responder?: ResponderEnvelopeState | undefined; /** Background work still running when compaction happened. */ readonly liveJobs?: readonly EnvelopeJobState[] | undefined; /** Terminal jobs whose output has not been harvested yet. */ readonly finishedJobs?: readonly EnvelopeJobState[] | undefined; readonly projectRoot?: string | undefined; readonly packageManager?: string | undefined; readonly scopeSummary?: string | undefined; } export declare function buildDurableEnvelope(input: DurableEnvelopeInput): string | undefined; export declare function isDurableEnvelopeContent(content: string): boolean;