/** * Session handoff types and helpers. * * A handoff captures the state of a session so that a successor * session (or a different agent) can pick up where the previous * one left off. */ /** Terminal state of a handoff's session, denormalized from its `session_complete` event. */ export type HandoffOutcome = 'success' | 'failure' | 'partial'; /** Best-effort evidence of repo state at handoff time; null fields mean collection failed or was skipped. */ export interface HandoffEvidence { gitRef?: string | null; dirtyTree?: boolean | null; testStatus?: 'pass' | 'fail' | 'unknown' | null; } /** Narrows an unvalidated value (e.g. CLI input or event content) to a HandoffOutcome. */ export declare function isHandoffOutcome(v: string | boolean | string[] | null | undefined): v is HandoffOutcome; export interface SessionHandoff { version: 1; sessionId: string; repoRoot?: string; taskId?: string; summary: string; nextAction?: string; artifacts?: string[]; scope?: string | null; updatedAt: string; constraints?: string[]; evidence?: HandoffEvidence | null; outcome?: HandoffOutcome | null; targetRuntime?: string | null; cardId?: string | null; } export interface SessionHandoffRow { id: number; session_id: string; repo_root: string | null; task_id: string | null; summary: string; next_action: string | null; artifacts_json: string; scope: string | null; created_at: string; constraints_json: string | null; evidence_json: string | null; outcome: string | null; target_runtime: string | null; card_id: string | null; } /** Renders evidence as one line shared by every renderer (CLI, MCP, token accounting). */ export declare function formatHandoffEvidenceLine(evidence: HandoffEvidence): string; export declare function rowToSessionHandoff(row: SessionHandoffRow): SessionHandoff; //# sourceMappingURL=handoff.d.ts.map