/** * Shared CLI helpers — used by every command module in src/cli/commands/. * * Nothing here registers commands; it's the common vocabulary: fail-fast * error exit, printers for memories/proposals/ingest reports, the * line-buffering prompter, best-effort auto-sync and context regeneration. */ import { MemoryStore } from "../db/store.js"; import type { GuardrailLevel, MemoryEntry, MemoryKind, Proposal } from "../types.js"; export declare const KINDS: MemoryKind[]; export declare const GUARDRAIL_LEVELS: GuardrailLevel[]; export declare const GUARDRAIL_ICON: Record; export declare function fail(msg: string): never; /** Debounced best-effort sync after local mutations (no-op unless cloud-linked). */ export declare function autoSync(store: MemoryStore): Promise; /** * Regenerate the static context file(s) after a memory-set change, but only when * the repo opted in via `generateContext.auto` in .aidimag/config.json. Keeps * CLAUDE.md / .cursorrules / copilot-instructions in lock-step with verified * memory so non-MCP tools never read a stale spec. Best-effort: never throws. */ export declare function maybeRegenerateContext(store: MemoryStore): Promise; export declare function printMemory(m: MemoryEntry, verbose?: boolean): void; export declare function printProposal(p: Proposal): void; /** Human-readable summary of a knowledge-inbox ingest run. */ export declare function printIngestReport(report: import("../knowledge/ingest.js").IngestReport): void; /** * Line-buffering prompt for interactive flows (review, ticket connect). * Unlike readline/promises, lines arriving between questions (piped input) * are queued, not dropped — so scripted/agent-driven input works too. */ export declare function createPrompter(closedValue?: string): Promise<{ ask: (prompt: string) => Promise; close: () => void; }>; /** Open a URL in the default browser, best-effort (matches `dim login` / `dim ui`). */ export declare function openBrowser(url: string): Promise; /** * Check if an LLM provider is available; if not, prompt to set up Ollama. * Returns true if a provider is available (or was just set up), false otherwise. * `kind` controls the message: "llm" for text generation, "embedding" for semantic search. */ export declare function promptOllamaSetup(kind?: "llm" | "embedding"): Promise;