/** * cli-checkpoint-agent.ts * * Provider-agnostic agentic loop for the checkpoint agent. * Replaces the `claude -p --model haiku` subprocess spawn. * * Supports: Anthropic (native), OpenAI-compatible (OpenAI, DeepSeek, Groq, etc.) */ import { HmemStore } from "./hmem-store.js"; import { HmemConfig } from "./hmem-config.js"; export type Harness = "claude-code" | "codex" | "opencode" | "pi" | "hermes" | "unknown"; /** * Detect which AI harness invoked us. Honors explicit HMEM_HARNESS override first * (plugins/extensions should set this when they spawn `hmem checkpoint`); falls * back to env-var signatures the harnesses set themselves. */ export declare function detectHarness(): Harness; /** * Harness-aware provider routing: * - Claude Code → Haiku via `claude -p` subprocess (uses Max OAuth, no API key) * - Codex → gpt-5.4-mini via OpenAI API (uses OPENAI_API_KEY) * - OpenCode / Pi / Hermes / unknown → user's configured provider (hmem.config.json) * * The harness routing takes precedence over the configured provider — Claude Code * users explicitly want Haiku-via-OAuth (covered by Max), not their DeepSeek key. */ export declare function runCheckpointAgent(prompt: string, store: HmemStore, config: HmemConfig, hmemPath?: string): Promise;