/** * attempt-context — explicit per-attempt context carried to workers. * * G-026 M3 (ADR-0004 #5/#25/#27): the worker receives an AttemptContext that * bounds where it may write (result/artifacts live under the CURRENT attempt * dir only). Old attempt-level Markdown never satisfies a new attempt's * completion gate; done.signal is just "result readable", not proof of success. */ export interface AttemptContext { changeId: string; taskId: string; attemptId: string; attemptNo: number; /** Absolute git repository root. */ gitRoot: string; /** Absolute change dir (gitRoot/.aiws/changes/). */ changeDir: string; /** Absolute task dir (changeDir/tasks/). */ taskDir: string; /** Absolute current attempt dir (taskDir/attempts/). */ attemptDir: string; /** Absolute evidence dir for this attempt. */ evidenceDir: string; /** Absolute artifact dir for this attempt (orchestrator hashes these). */ artifactDir: string; /** Absolute handoff dir (changeDir/tasks/ — read-only for worker). */ handoffDir: string; } export interface AttemptContextInput { changeId: string; taskId: string; attemptId: string; attemptNo: number; gitRoot: string; } /** * Build the canonical per-attempt context from a change layout. * All paths are absolute; artifact dir is a sibling of evidence under the * attempt dir (never shared across attempts). */ export declare function buildAttemptContext(input: AttemptContextInput): AttemptContext; /** Serialize an AttemptContext into a worker-readable handoff payload line. */ export declare function attemptContextToHandoffLine(ctx: AttemptContext): string; /** Parse an AttemptContext from a handoff payload line (strict; throws on bad shape). */ export declare function parseAttemptContextLine(line: string): AttemptContext;