import { type NativeSessionObservation, type NativeSessionManager } from "./native-session.ts"; export { buildExecutionRetentionManifest, parseExecutionRetentionManifest, RETENTION_SCHEMA, } from "./retention-contract.ts"; export { ENV_NATIVE_SESSION_ROOT, readNativeSession, parseNativeSessionBytes, type NativeSessionObservation, type NativeSessionManager, } from "./native-session.ts"; export { ENV_EXECUTION_ARCHIVE } from "../kernel/env-names.ts"; /** Operator-owned archive boundary; never a model-facing parameter or an authority source. */ export declare const RETENTION_VERSION = "2.0"; export interface RetentionIdentity { executionId: string; parentExecutionId: string | null; childId: string; toolCallId: string | null; executor: "process" | "herdr" | "check"; taskDigest: string | null; definitionDigest: string | null; configurationDigest: string; workspaceId: string | null; } export interface RetainedContent { status: "retained" | "missing"; path: string | null; sha256: string | null; bytes: number | null; } export interface ExecutionRetentionManifest { version: "2.0"; archiveId: string; identity: RetentionIdentity; native: { pid: number | null; paneId: string | null; agentName: string | null; tabId: string | null; sessionId: string | null; sessionPath: string | null; branchLeafId: string | null; }; nativeSession: NativeSessionObservation; state: "running" | "terminal"; outcome: { code: number | null; signal: string | null; timedOut: boolean; aborted: boolean; truncated: boolean; failed: boolean; } | null; content: Record<"stdout" | "stderr" | "paneSnapshot" | "checkReceipt" | "result" | "session", RetainedContent>; coverage: { complete: false; losses: string[]; }; /** Retention is observation, never a work-v4 acceptance decision. */ acceptance: "not-assessed"; } export interface RetentionStatus { manifestPath: string | null; status: "disabled" | "pending" | "retained" | "lost"; } /** Original live status only; drains admitted observations, not producer completeness or fsync. */ export declare function drainExecutionRetention(status: RetentionStatus): Promise; /** Hash only an explicitly selected configuration. Callers must not pass environment/auth objects. */ export declare const retentionConfigurationDigest: (configuration: unknown) => string; /** * A bounded, coalescing observation queue. No worker-control path awaits publication. A failed or stalled * archive never changes required ledger/lease semantics. `flush` is exclusively for external archival at * quiescence; it is NOT called by the spawner. Missing terminal publication means incomplete observation. */ export declare function beginExecutionRetention(identity: RetentionIdentity, directory?: string | undefined): { /** Read-only native API reference; never derive IDs from the locator or a displayed name. */ observeSession: (reference: NonNullable<{ source: "herdr-id" | "herdr-path" | "pi-session-file" | "pi-session-manager"; value: string; manager?: NativeSessionManager; } | undefined>) => void; observeSessionManager(manager: NativeSessionManager): void; status: () => RetentionStatus; native(value: Partial>): void; capture(kind: "stdout" | "stderr" | "paneSnapshot" | "checkReceipt" | "result", bytes: Uint8Array, replace?: boolean): void; finish(outcome: NonNullable): void; /** Observation-only diagnostic; never establishes successful execution or accepted work. */ coverage: () => { complete: false; losses: string[]; }; flush: () => Promise; }; export type ExecutionRetention = ReturnType; /** Public consumer check: neither a reference nor a wire status supplies the missing bytes. */ export declare function verifyRetainedBytes(reference: RetainedContent, bytes?: Uint8Array): "retained" | "missing" | "mismatch"; //# sourceMappingURL=execution-retention.d.ts.map