/**
 * Curated Neotoma CLI surface for the root landing page.
 *
 * Mirrors the MCP and HTTP overviews: a short intro plus a command table so
 * agents and humans can orient themselves without reading the full CLI
 * reference. Commands listed here are a stable subset of
 * `docs/developer/cli_reference.md`.
 */
const BASE_COMMANDS = [
    {
        command: "neotoma init",
        description: "Initialize local data directory and config.",
        notes: "Safe to re-run; idempotent.",
    },
    {
        command: "neotoma auth login",
        description: "Run OAuth PKCE flow for MCP / API access.",
        notes: "Use `--tunnel` when the API is behind ngrok.",
    },
    {
        command: "neotoma auth session",
        description: "Show attribution, AAuth tier, and trust eligibility.",
        notes: "Same payload as `GET /session` on this host.",
    },
    {
        command: "neotoma auth status",
        description: "Show auth mode (none, dev-token, key-derived) and user.",
        notes: "No prior login required.",
    },
    {
        command: "neotoma entities list",
        description: "List entities with filters.",
        notes: "Supports `--type`, `--limit`, `--since`.",
    },
    {
        command: "neotoma entities search <identifier>",
        description: "Find an entity by identifier or semantic match.",
        notes: "Positional or `--identifier <value>`.",
    },
    {
        command: "neotoma entities get <id>",
        description: "Retrieve a single entity snapshot.",
        notes: "Add `--include-observations` for provenance.",
    },
    {
        command: "neotoma relationships list <entityId>",
        description: "List relationships for an entity.",
        notes: "Filter with `--type PART_OF|REFERS_TO|...`.",
    },
    {
        command: "neotoma store --entities <json>",
        description: "Store structured entities (optionally with a file).",
        notes: "Alias `--json`; pair with `--file` for combined ingest.",
    },
    {
        command: "neotoma ingest <path>",
        description: "Atomic structured-entities + source-file ingest.",
        notes: "Composes `/store`; auto-uploads when remote.",
    },
    {
        command: "neotoma correct",
        description: "Submit a correction to an entity field.",
        notes: "Requires `entity_id`, `field`, `value`.",
    },
    {
        command: "neotoma types list",
        description: "List registered entity types and schemas.",
        notes: "Keyword: `neotoma types list <keyword>`.",
    },
    {
        command: "neotoma storage info",
        description: "Show where CLI config and server data are stored.",
        notes: "Prints data dir and backend.",
    },
    {
        command: "neotoma storage recover-db",
        description: "Check SQLite integrity and optionally run recovery.",
        notes: "Add `--recover` to write a recovered copy.",
    },
    {
        command: "neotoma triage",
        description: "Pull pending agent-feedback items and classify them.",
        notes: "Drives the agent-feedback pipeline.",
    },
    {
        command: "neotoma mcp config",
        description: "Print MCP configuration guidance for Cursor / Claude.",
        notes: "Follow with `neotoma mcp check` to install.",
    },
    {
        command: "neotoma mcp check",
        description: "Scan for MCP configs and add missing Neotoma servers.",
        notes: "`--user-level` to include `~/.cursor`, `~/.claude`, Windsurf.",
    },
    {
        command: "neotoma --help",
        description: "Top-level help with the full command tree.",
        notes: "Any command accepts `--help` for usage.",
    },
];
const INTRO_BY_MODE = {
    sandbox: "The same Neotoma product runs on your machine as a CLI with local SQLite storage. Use it for private data, scripted ingestion, or anything you do not want to send to this sandbox.",
    personal: "The same Neotoma product runs on your machine as a CLI. Point it at this host with `NEOTOMA_BASE_URL`, or run it fully offline against local SQLite storage.",
    prod: "The same Neotoma product runs on your machine as a CLI. Point it at this host with `NEOTOMA_BASE_URL`, or run it fully offline against local SQLite storage.",
    local: "You are already running the API locally; the CLI is the companion for ad-hoc queries, ingestion, and storage maintenance.",
};
/** Root landing CLI panel content, tailored to deployment mode. */
export function buildCliOverviewForMode(mode) {
    return {
        title: "Neotoma CLI (local install)",
        intro: INTRO_BY_MODE[mode],
        installCommand: "npm install -g neotoma",
        installNote: "After install, run `neotoma --help` to see the full command tree. The CLI defaults to local/offline storage until you point it at an API base URL.",
        helpHint: "Every command accepts `--help`, e.g. `neotoma store --help`.",
        commandsHeading: "Representative commands",
        commands: BASE_COMMANDS,
        links: [
            { label: "CLI reference", href: "/cli" },
            { label: "Agent instructions (prefer MCP, CLI as backup)", href: "/agent-instructions" },
        ],
    };
}
//# sourceMappingURL=cli_overview.js.map