/** * * Reads a checkpoint JSON (written by `peaks session checkpoint`) and * emits a structured markdown "resume context" block the skill can * prepend to its own prompt. The output is LLM-friendly: stable * headings, monospace paths, and bullet lists — easy for the model to * scan and reason about. * * Resume locates the deepestGate (the latest completed gate in the * workflow) so the skill can pick up the next step without re-asking * the user for state already captured at that gate. */ import { type CheckpointSnapshot } from './session-checkpoint-service.js'; export interface ResumeOptions { /** Absolute path to a checkpoint JSON file. */ checkpointPath: string; /** Optional "now" reference for relative-time rendering. */ now?: () => Date; } export interface ResumeContext { /** Stable markdown block, suitable for prepending to a skill prompt. */ markdown: string; snapshot: CheckpointSnapshot; sourcePath: string; checkpointAgeMs: number | null; relativeAgeLabel: string; } export declare function buildResumeContext(options: ResumeOptions): ResumeContext;