/** * cli-v2-checkpoint.ts * * Async Stop-hook entry point for the v2 checkpoint pipeline. * Opens a v2 store exclusively — never touches HmemStore or any v1 path. * * On a v1 file, a missing/unreadable file, or a missing HMEM_PATH env: * → silent no-op return (never throws, never constructs HmemStore). * * On a v2 file with a resolvable session: * → runs one checkpoint-extraction pass (see ./v2/checkpoint.ts). * * Usage (hook): claude pipes `{ session_id, stop_hook_active }` on stdin. * * Requires env: * HMEM_PATH — path to .hmem file (the hook sets this explicitly) * HMEM_PROJECT_DIR — directory for config + company.hmem (derived from * HMEM_PATH by resolveEnvDefaults — the hook does NOT set it) */ import { type RunV2CheckpointOptions } from "./v2/checkpoint.js"; /** * Hook entry point (dispatched by cli.ts). Reads the Stop-hook JSON from stdin to * obtain the session id — Claude Code provides it there, NOT in the environment — * mirroring cli-log-exchange.ts. A TTY (manual run) has no hook payload, so stdin * is skipped and the core falls back to env/ppid session resolution. */ export declare function runCliV2Checkpoint(): Promise; /** * Testable core: resolve env, guard, open the v2 store, run one checkpoint pass. * Kept separate from the stdin-reading wrapper so tests can drive it directly * (same split as cli-log-exchange.ts's appendExchangeV2Path). * * @param sessionId explicit session id (from the hook stdin). Falls back to * resolveSessionId() (HMEM_SESSION_ID env → ppid bridge) when omitted. * @param opts test seams (agent `invoke`, gate/agent probes) forwarded to * runV2Checkpoint. The production hook passes none → real spawn. */ export declare function runCliV2CheckpointCore(sessionId?: string, opts?: RunV2CheckpointOptions): Promise;