export type WorkerActionJournalState = "not_started" | "unknown" | "succeeded" | "failed"; export interface WorkerActionJournalScope { agentDir: string; parentSessionId: string; taskId: string; attemptId: string; fencingToken: number; } export interface WorkerActionJournalAction { op: "write" | "edit"; path: string; content?: string; old?: string; new?: string; } export interface BeginWorkerActionInput { index: number; action: WorkerActionJournalAction; /** Realpath-resolved target used by the executor, never model-provided text alone. */ targetPath: string; } export interface WorkerActionExecutionPermit { kind: "execute"; state: "not_started"; actionId: string; actionDigest: string; normalizedTarget: string; } export interface WorkerActionInspectionRequired { kind: "inspection_required"; state: Exclude; actionId: string; actionDigest: string; normalizedTarget: string; reasonCode: string; evidencePointer?: string; } export type BeginWorkerActionResult = WorkerActionExecutionPermit | WorkerActionInspectionRequired; export interface WorkerActionJournalInspection { state: WorkerActionJournalState; actionId: string; actionDigest?: string; normalizedTarget?: string; reasonCode?: string; evidencePointer?: string; } /** Canonical lexical identity for an already-authorized real target, including native Windows paths. */ export declare function normalizeWorkerActionTarget(cwd: string, targetPath: string): string; /** * Durable intent/receipt journal for model-emitted structured mutations. It deliberately records * only action digests and normalized targets; operation payloads can contain source text or secrets * and must never leave the model result in persisted orchestration state. */ export declare class WorkerActionJournal { readonly agentDir: string; readonly filePath: string; private readonly scope; private readonly identity; constructor(scope: WorkerActionJournalScope); inspect(actionIdentity: string): WorkerActionJournalInspection; begin(input: BeginWorkerActionInput): BeginWorkerActionResult; recordSucceeded(permit: WorkerActionExecutionPermit, options?: { evidencePointer?: string; }): void; recordFailed(permit: WorkerActionExecutionPermit, reasonCode: string, options?: { evidencePointer?: string; }): void; private recordTerminal; private readLocked; private writeLocked; private inspectionFor; } //# sourceMappingURL=worker-action-journal.d.ts.map