ai_memory/cli/commands/mod.rs
1// Copyright 2026 AlphaOne LLC
2// SPDX-License-Identifier: Apache-2.0
3
4//! v0.7.0 QW-1 — new-format CLI command modules.
5//!
6//! Modules under this directory follow the `pub fn run(db, args,
7//! out) -> Result<i32>` shape that returns an exit code (rather than
8//! exiting the process from inside the handler). The convention
9//! matches `src/cli/export.rs` (forensic bundle) so the dispatch arm
10//! in `daemon_runtime::run` stays a one-liner.
11
12/// v0.7.0 WT-1-F — `ai-memory atomise` CLI subcommand.
13pub mod atomise;
14/// v0.7.x (#1146) — `ai-memory config <subcommand>` CLI surface.
15pub mod config;
16pub mod export_reflections;
17// v0.7.0 QW-2 — Persona-as-artifact CLI surface. `ai-memory persona
18// <entity_id> [--namespace NS] [--regenerate] [--json]`.
19pub mod persona;
20// v0.7.0 Form 5 (issue #758) — `ai-memory calibrate confidence
21// --from-shadow [--days N] [--output-format json|table]`. Reads
22// `confidence_shadow_observations` and emits per-(namespace, source)
23// baselines.
24pub mod calibrate_confidence;
25// v0.7.0 Cluster E API-2 (issue #767) — `ai-memory skill <subcommand>`
26// CLI parity for the 7 L1-5 Agent Skills MCP tools. Each subcommand
27// dispatches into the same substrate handler the MCP `tools/call`
28// dispatch uses, so no new business logic lands here.
29pub mod skill;
30// v0.7.0 ARCH-3 / FX-12 — CLI parity build-out for MCP tools without
31// a direct CLI subcommand counterpart. Each new module dispatches into
32// the same substrate primitive the MCP tool consumes, guaranteeing
33// wire envelope parity across MCP / HTTP / CLI. See
34// `docs/v0.7.0/arch-3-mcp-cli-parity-audit.md` for the full audit.
35pub mod check_duplicate;
36// v0.7.0 #1443 — `ai-memory expand` CLI parity for `memory_expand_query`.
37pub mod expand;
38pub mod find_paths;
39pub mod kg_query;
40pub mod recall_observations;
41// v0.7.0 #1598 — `ai-memory reembed`: full-corpus vector-space
42// migration (REPLACES every stored embedding with the resolved
43// backend/model's vectors; per-row #1595 failure isolation).
44pub mod reembed;
45pub mod replay;
46// v0.7.0 ARCH-3 / FX-C3 (batch2) — closing the 16 remaining
47// applicable deferrals from the FX-12 audit. Each module wires a
48// thin clap arg-parser + output formatter that dispatches into the
49// same substrate primitive the MCP tool consumes. Wire envelope is
50// byte-equal across MCP / HTTP / CLI. See
51// `docs/v0.7.0/arch-3-mcp-cli-parity-audit.md` for the marked-off
52// audit rows.
53pub mod dependents_of_invalidated;
54pub mod entity_get_by_alias;
55pub mod entity_register;
56pub mod inbox;
57pub mod ingest_multistep;
58pub mod kg_invalidate;
59pub mod kg_timeline;
60pub mod list_subscriptions;
61pub mod notify;
62pub mod quota_status;
63pub mod reflect;
64pub mod reflection_origin;
65pub mod subscribe;
66pub mod subscription_dlq_list;
67pub mod subscription_replay;
68pub mod unsubscribe;
69// v0.7.0 (issue #1389) — recover-on-boot fail-safe for the #1388
70// substrate failure mode. The CLI surface chains after `ai-memory
71// boot` in the SessionStart hook; the MCP-tool surface
72// `memory_recover_previous_session` lives at
73// `src/mcp/tools/recover_previous_session.rs` and shares the same
74// `crate::recover::recover_from_transcript` handler.
75pub mod recover_previous_session;