/**
 * Work Handoff Builder
 *
 * Assembles a portable, secret-scrubbed handoff document (+ a full diff of
 * uncommitted edits) from durable on-disk state, so a developer can stop work
 * in one AI tool and resume in another. This is the single deterministic engine
 * behind the `specweave handoff` CLI, the `/sw:handoff` command, and the
 * PreCompact hook — all of which call {@link buildWorkHandoff}.
 *
 * Workspace detection is intentionally NOT a raw `.specweave/` directory test:
 * a stale child-repo `.specweave/` (no real state) would misclassify. We resolve
 * the effective root then require an `active-increment.json` that actually
 * lists increments. Metadata reads are gated with `MetadataManager.exists()`
 * because `MetadataManager.read()` LAZILY CREATES default metadata — a side
 * effect a read-only handoff must never trigger.
 *
 * All increment/task/AC/workspace logic is REUSED from existing modules (DRY):
 * `parseTasksWithUSLinks`, `calculateProgressFromTasksFile`,
 * `ActiveIncrementManager.getActive()`, `MetadataManager`, `resolveEffectiveRoot`.
 *
 * Part of increment 0867: Cross-Tool Work Handoff
 * (AC-US1-03..07, AC-US3-01..05, AC-US4-*, AC-US6-01/02/05).
 *
 * @module core/session/work-handoff
 */
/**
 * Options controlling a handoff build. All fields are optional; the agent /
 * CLI supplies only the short free-text strings + flags.
 */
export interface WorkHandoffOptions {
    /** Required disambiguator when 2+ increments are active. */
    incrementId?: string;
    /** "Why I'm handing off" (e.g. "out of tokens"). */
    reason?: string;
    /** Where things stand. */
    summary?: string;
    /** The exact next step. */
    next?: string;
    /** A gotcha / warning for the next agent. */
    gotcha?: string;
    /** Agent-supplied decisions; merged OVER plan.md decisions. */
    decisions?: string[];
    /** Embed the full body in the paste-prompt (cross-machine). */
    inline?: boolean;
    /** Override the doc output path. */
    out?: string;
    /** Force the non-SpecWeave `.handoff/` fallback even in a workspace. */
    nonSpecweave?: boolean;
}
/**
 * Result of a handoff build.
 */
export interface WorkHandoffResult {
    /** Absolute path of the written doc (the CLI prints this FIRST). */
    docPath: string;
    /** Absolute path of the sibling full-diff file. */
    diffPath: string;
    /** The full rendered + scrubbed doc markdown. */
    docMarkdown: string;
    /** The copy-paste resume prompt. */
    pastePrompt: string;
    /** Whether the high-fidelity SpecWeave path was taken. */
    isSpecWeave: boolean;
}
/**
 * Thrown when 2+ increments are active and no explicit id was supplied.
 * Carries the candidate ids so the CLI can list them.
 */
export declare class AmbiguousActiveIncrementError extends Error {
    readonly candidates: string[];
    constructor(candidates: string[]);
}
/**
 * Build a handoff for `repoRoot`.
 *
 * @param repoRoot - Where to start workspace resolution from (usually cwd).
 * @param opts - {@link WorkHandoffOptions}.
 * @returns {@link WorkHandoffResult}.
 * @throws {AmbiguousActiveIncrementError} when 2+ active increments + no id.
 */
export declare function buildWorkHandoff(repoRoot: string, opts?: WorkHandoffOptions): Promise<WorkHandoffResult>;
/**
 * Ownership sentinel: is a root `./HANDOFF.md` a foreign file (lacks the
 * `Doc format v1` marker)? Exposed for the builder + tests. When foreign, the
 * caller must NOT overwrite it.
 */
export declare function isForeignHandoffFile(handoffPath: string): boolean;
//# sourceMappingURL=work-handoff.d.ts.map