/** * legacy-import — read-only compatibility layer (G-026 M1, ADR-0004 #17). * * Old layouts used: * tasks/tasks.jsonl (task rows with status/retry_count) * tasks//evidence/done.signal (done marker) * tasks//evidence/summary.md (summary) * * Legacy-import generates attempt metadata with: * producer = "legacy-import" * trustLevel = "compatibility" * needsVerification = true * * Legacy done.signal / summary / retry_count are NEVER promoted to trusted * `passed`. Archive changes stay read-only — import only reads, never writes * legacy files. */ import { type TaskRuntimeLayout } from "./file-layout.js"; export interface LegacyTaskRow { id: string; title?: string; status?: string; retry_count?: number; [k: string]: unknown; } export interface LegacyImportResult { changeId: string; kind: "new" | "legacy" | "mixed" | "absent"; tasksImported: number; attempted: boolean; /** Set only when import is not applicable (absent/archive etc.). */ reason?: string; } /** * Import legacy tasks into attempt metadata (read-only on legacy side). * For each task row in tasks.jsonl we create a single synthetic attempt * carrying compatibility trust. */ export declare function legacyImport(layout: TaskRuntimeLayout, opts?: { changeId?: string; skipTaskIds?: Set; }): Promise; export declare function readLegacyTasksJsonl(layout: TaskRuntimeLayout): Promise; /** * Persist a legacy done.signal view into an attempt's done.signal? NO — legacy * markers stay legacy. We only surface them for observability via the snapshot's * task status derivation in runtime-store (from events). Nothing here writes * legacy files. */ export declare function legacyDoneSignals(layout: TaskRuntimeLayout): Promise>;