/** * Bounded, owner-private artifact capture for one interactive session. * * The writer only ever receives canonical redacted bytes, so nothing sensitive * becomes durable. Chunk names contain only the opaque session id and an index — * never a command, cwd, or timestamp that could identify the workload. */ import type { OutputSink } from "./output-store.js"; import type { ArtifactReceipt, ArtifactReference } from "./types.js"; export interface ArtifactWriterOptions { readonly sessionId: string; readonly directory: string; readonly captureBytes: number; readonly chunkBytes: number; readonly persistenceQueueBytes: number; readonly onLimit: "terminate" | "continue"; } export declare class BoundedArtifactWriter implements OutputSink { private readonly options; private stream; private streamDone; private readonly completedStreams; private readonly chunks; private hash; private index; private currentChunkBytes; private capturedBytes; private dropped; private pendingBytes; private digest; private closePromise; private writeError; private readonly backpressured; limitReached: boolean; failed: boolean; constructor(options: ArtifactWriterOptions); get path(): string; reference(): ArtifactReference; receipt(): ArtifactReceipt; append(bytes: Uint8Array): boolean; waitForDrain(): Promise; close(): Promise; private finishCurrentStream; private rotate; } /** Create the owner-only artifact directory for one session. */ export declare function createArtifactWriter(options: { sessionId: string; captureBytes: number; chunkBytes: number; persistenceQueueBytes: number; onLimit: "terminate" | "continue"; baseDir?: string | undefined; }): Promise;