/** * Handoff Doc Format (2.0) — single source of truth, ≤ 1 page. * * Renders BOTH the durable handoff document and the copy-paste resume prompt * from one {@link HandoffDocInput}. PURE rendering: no IO, no git — callers * pass already-captured + already-scrubbed data in. * * Sections (in order): Where I left off · Done / Pending · Decisions · * Files touched · Next steps · Resume. Header carries agent id, git, and the * active claims. The `Doc format v2` footer marker is the ownership sentinel. * * @module core/session/handoff-doc-format */ /** Footer marker (ownership sentinel + format version handle). */ export declare const DOC_FORMAT_MARKER = "Doc format v2"; /** Prior marker — still recognized as "ours" so v1 docs are overwritten, not treated as foreign. */ export declare const LEGACY_DOC_FORMAT_MARKER = "Doc format v1"; /** A `…` block survives regeneration of a generated doc. */ export declare const KEEP_OPEN_MARKER = ""; export declare const KEEP_CLOSE_MARKER = ""; /** Every keep block in a document, markers included, in order. */ export declare function extractKeepBlocks(text: string): string[]; export declare const INLINE_BEGIN_MARKER = "BEGIN HANDOFF"; export declare const INLINE_END_MARKER = "END HANDOFF"; /** One Markdown table cell: pipes and line breaks would split the row, so flatten them. */ export declare function tableCell(text: string): string; export declare const HANDOFF_SECTION_ORDER: readonly string[]; /** Per-tool native resume commands (pinned by cross-tool-commands.test.ts). */ export interface ToolResumeEntry { /** The tool name `detectTool` writes into ledger ids (`grok@mbp`). */ id: string; tool: string; findSession: string; resumeCmd: string; } export declare const CLAUDE_MUNGE_EXAMPLE: string; export declare const TOOL_RESUME_MATRIX: readonly ToolResumeEntry[]; /** One ledger row for the Done / Pending table. */ export interface HandoffTaskRow { id: string; title: string; status: string; by?: string; evidence?: string; } export interface HandoffIncrementInfo { id: string; status: string; title?: string; tasks: HandoffTaskRow[]; counts: { total: number; done: number; skipped: number; claimed: number; blocked: number; stale: number; open: number; }; doneAcs: number; totalAcs: number; /** ACs closed only by accepted skips (never counted in doneAcs). */ acceptedSkipAcs?: string[]; /** The task `specweave task next` would hand out, if any. */ nextTask?: HandoffTaskRow; } export interface HandoffGitInfo { isGitRepo: boolean; branch: string; shortSha: string; statusPorcelain: string; diffStat: string; hasUncommittedChanges: boolean; } export interface HandoffDocInput { /** A local recovery snapshot preserves the active session's ownership. */ localCheckpoint?: boolean; docPath: string; diffPath: string; repoRoot: string; generatedAt: string; isSpecWeave: boolean; /** Agent id of the writer (`specweave task whoami`). */ agent: string; reason?: string; summary?: string; next?: string; gotcha?: string; /** Decisions (spec/plan bullets + agent-supplied), already merged + scrubbed. */ decisions: string[]; increment?: HandoffIncrementInfo; git: HandoffGitInfo; redactionCounts: Record; /** What `--push` published, if it ran. */ push?: HandoffPushInfo; /** Claims this handoff released so the next agent can take them. */ released?: string[]; /** Keep blocks carried over from the previous version of this doc. */ keep?: string[]; } export interface HandoffPushInfo { /** Branch pushed to origin (empty when the push was not needed or failed). */ branch?: string; /** `wip/`, set when the snapshot carries uncommitted edits. */ wipRef?: string; /** The well-known ref `specweave pickup` fetches. */ handoffRef?: string; /** The snapshot commit pushed to it. */ snapshot?: string; /** Why nothing was pushed, when that was expected (no remote, no Git). */ skipped?: string; /** Why a push step did not happen, in words. */ warnings: string[]; } /** In-repo paths print relative to the repo; paths outside it stay absolute. */ export declare function repoRelative(repoRoot: string, p: string): string; /** * Render the ≤1-page handoff document. */ export declare function renderHandoffDoc(input: HandoffDocInput): string; /** * Render the copy-paste resume prompt. `inline` embeds the full body between * BEGIN/END markers for cross-machine resume. */ export declare function renderPastePrompt(input: HandoffDocInput, opts?: { inline?: boolean; }): string; //# sourceMappingURL=handoff-doc-format.d.ts.map