export type PendingHandoffKind = 'increment' | 'session'; export interface PendingHandoff { /** What to type after "pick up": `0874`, or a worktree name such as `studio-routing`. */ id: string; kind: PendingHandoffKind; title: string; /** ISO time of the handoff. */ at: string; by?: string; reason?: string; /** Increment folder name, when the handoff belongs to one. */ incrementId?: string; /** Absolute path of the handoff document. */ docPath?: string; /** Session handoffs: the uncommitted edits, the checkout they live in, its branch. */ diffPath?: string; checkout?: string; branch?: string; sessionId?: string; /** Session handoffs: the checkpoint folder that holds the mark. */ checkpointDir?: string; } export interface ListHandoffsOptions { /** Home directory holding `.specweave/checkpoints` (tests). */ home?: string; } /** The pending handoffs of a project, newest first, each with a unique id. */ export declare function listPendingHandoffs(root: string, opts?: ListHandoffsOptions): PendingHandoff[]; /** The branch checked out in `checkout`, read from `.git` without running Git (worktrees included). */ export declare function readBranch(checkout: string): string | undefined; export declare function slug(s: string): string; export type HandoffMatch = { kind: 'one'; handoff: PendingHandoff; } | { kind: 'several'; candidates: PendingHandoff[]; } | { kind: 'none'; }; /** * Which pending handoff "pick up " means: an exact id, an increment's * number or folder name, then every word of the query found in the id, title, * branch or folder ("pick up the studio release"). */ export declare function matchHandoff(pending: PendingHandoff[], query: string): HandoffMatch; /** Record that a session handoff was taken, so it leaves the list. */ export declare function markSessionPicked(handoff: PendingHandoff, by: string, now?: Date): void; /** One line per handoff: id, title, who, when, why. Lists keep two spaces after the id; a sentence passes `' '`. */ export declare function handoffLine(h: PendingHandoff, idSep?: string): string; /** Where a handoff's work is: the document for an increment, the checkout and branch for a session. */ export declare function handoffWhere(root: string, h: PendingHandoff): string; /** What `specweave handoff list` prints. */ export declare function renderHandoffList(root: string, pending: PendingHandoff[]): string; /** The short list shown when a pickup has to ask, or names the others it left. */ export declare function renderChoices(pending: PendingHandoff[], max?: number): string[]; //# sourceMappingURL=handoff-list.d.ts.map