/**
 * T-AUTO-HANDOFF — deterministic state collection (the dump IS the handoff).
 *
 * Reads EVERY resumable-state source for a session from DISK (user-locked:
 * "hand-off needs all the information"; generators read disk state, never a
 * session's narrative — the 2026-06-10 "v4 on disk" false-claim precedent).
 * Every probe is bounded: a missing/corrupt source renders as an
 * `<unreadable: …>` marker instead of aborting — totality over completeness.
 *
 * Imports from: node:crypto, node:fs/promises, node:child_process,
 *   ../paths.js, ../session_state.js, ../phase_ledger.js,
 *   ../../channels/routing.js, ../../workgraph/store.js.
 * Imported by: handoff/index.ts, handoff/render.ts (types).
 */
import { basename } from 'node:path';
import { type ActiveTask } from '../session_state.js';
export interface HandoffArtifact {
    kind: 'pre_research' | 'spec';
    path: string;
    sha8: string | null;
}
export interface HandoffGitRepo {
    repo: string;
    statusShort: string;
    unpushed: string;
}
export interface HandoffState {
    sessionId: string;
    generatedAt: string;
    cwd: string;
    umbrellaRoot: string;
    fsm: Record<string, unknown> | string;
    activeTask: ActiveTask | null | string;
    phaseSet: Record<string, unknown> | string;
    phaseLedger: {
        phase: string;
        note: string;
    }[] | string;
    guessAuditHead: string;
    specAuditHead: string;
    spawnLedgerTail: string[];
    attestationsTail: string[];
    artifacts: HandoffArtifact[];
    git: HandoffGitRepo[];
    openIssues: {
        id: string;
        title: string;
    }[] | string;
}
/** The umbrella ROOT for a cwd: pick the umbrella ROW by longest member
 *  prefix (correct row when rows nest), then return that row's SHORTEST
 *  member containing the cwd — the umbrella root, not the sub-repo (live
 *  spike finding: loop lists both `…/loop` and `…/loop/opensquid` as
 *  members; docs + MEMORY.md belong at the loop root). Falls back to cwd. */
export declare function umbrellaRootFor(cwd: string): Promise<string>;
export declare function collectHandoffState(sessionId: string, cwd: string): Promise<HandoffState>;
/** Stable doc path for a session's handover — keyed on sid ONLY (AHO.3:
 *  date-keying minted a second doc for the same session across midnight and
 *  broke the tier-3 staleness probe; generatedAt rides inside the doc). */
export declare function handoverDocPath(umbrellaRoot: string, sessionId: string): string;
/** Re-export for callers building ids/labels. */
export declare function shortSid(sessionId: string): string;
export { basename as _basename };
//# sourceMappingURL=collect.d.ts.map