Expand description
CLI command modules. Wave 5a (v0.6.3) extracted these out of
main.rs so each handler can be unit-tested by capturing output
into a Vec<u8> via CliOutput instead of literal println!s.
§Public surface
CliOutput(re-exported atcli::CliOutput): output abstraction.helpers::{id_short, auto_namespace, human_age}: pure helpers.store::run,update::run,io::{export, import, mine}: handler entry points called bymain.rs’s dispatch arm.
Each handler takes &mut CliOutput<'_> and routes every emit
through writeln! so tests can assert on captured bytes.
Re-exports§
pub use io_writer::CliOutput;
Modules§
- agents
cmd_agentsandcmd_pendingmigrations. Seecli::storefor the design pattern.- archive
cmd_archivemigration. Seecli::storefor the design pattern.- audit
ai-memory audit— operator-facing CLI for the security audit trail (PR-5 of issue #487).- backup
cmd_backupandcmd_restoremigrations. Seecli::storefor the design pattern.- boot
ai-memory boot— universal session-boot context primitive (issue #487).- commands
- v0.7.0 QW-1 — new-format CLI command modules (return exit codes
rather than calling
process::exit). v0.7.0 QW-1 — new-format CLI command modules. - consolidate
cmd_consolidateandcmd_auto_consolidatemigrations. Seecli::storefor the design pattern.- crud
cmd_get,cmd_list,cmd_deletemigrations. Seecli::storefor the design pattern.- curator
cmd_curatormigration. The daemon-mode body delegates todaemon_runtime::run_curator_daemon_with_primitives(W3 work); this module owns only the outer wrapper and the report printer.- doctor
ai-memory doctor(Phase P7 / R7) — operator-visible health dashboard.- export
- v0.7.0 L2-5 (issue #670) —
ai-memory export-forensic-bundleandai-memory verify-forensic-bundlesubcommands. v0.7.0 L2-5 (issue #670) —ai-memory export-forensic-bundleandai-memory verify-forensic-bundleCLI surface. - forget
cmd_forgetmigration. Seecli::storefor the design pattern.- gc
cmd_gc,cmd_stats, andcmd_namespacesmigrations. Seecli::storefor the design pattern.- governance
- Shared governance enforcement helper. Wave 5b (v0.6.3) lifted the
match db::enforce_governance(...)block out of every governedcmd_*so the printing-side of governance decisions has a single testable home and the call-sites collapse to a 3-arm match on the returnedGovernanceOutcome. - governance_
check_ action - v0.7.0 issue #863 —
ai-memory governance check-actionsubcommand. Shell-side parity for the MCP toolmemory_check_agent_actionso operators can dry-run a substrate rule from a terminal without driving JSON-RPC over stdio. v0.7.0 issue #863 —ai-memory governance check-actionCLI subcommand. Shell-side parity surface for the MCP toolmemory_check_agent_action. Operators can dry-run any substrate agent-action rule (R001-R004 plus any operator-added rule) from a terminal without driving JSON-RPC over stdio. - governance_
install_ defaults - v0.7.0 7th-form (issue #760) —
ai-memory governance install-defaultssubcommand. Bulk-flip seed rules R001-R004 toenabled = 1after operator confirmation (interactive prompt;--yesoverrides). v0.7.0 7th-form closeout (issue #760) —ai-memory governance install-defaultsCLI subcommand. - governance_
migrate - v0.7.0 K11 —
ai-memory governance migrate-to-permissionsCLI. - helpers
- Public API
- identity
ai-memory identitysubcommand — per-agent Ed25519 keypair lifecycle (Track H, Task H1).- install
ai-memory install <agent>— wireai-memory bootand theai-memory-mcpserver into AI agents’ config files (issue #487 PR-2/3).- io
cmd_export,cmd_import,cmd_minemigrations.- io_
writer - Public API
- link
cmd_linkandcmd_resolvemigrations. Seecli::storefor the design pattern.- logs
ai-memory logs— operator-facing CLI for the file logging facility (PR-5 of issue #487). Tail, archive, purge, filter.- namespace
- v0.7.0 (issue #800) —
ai-memory namespacesubcommand. CRUD over the per-namespace standard policy memory pointer. Closes Crack 1 from the Batman Mode acceptance review by giving operators a first-class CLI verb instead of forcing them into an MCP-stdio JSON-RPC dance just to bind aGovernancePolicyto a namespace.ai-memory namespacesubcommand — operator-facing CRUD for the per-namespace standard policy memory pointer (issue #800 Crack 1). - offload
- v0.7.0 QW-3 —
ai-memory offload/ai-memory derefsubcommands. Substrate-only wrappers overcrate::offload::ContextOffloader. v0.7.0 QW-3 —ai-memory offloadandai-memory derefCLI commands. - promote
cmd_promotemigration. Seecli::storefor the design pattern.- recall
cmd_recallmigration. Seecli::storefor the design pattern.- rules
- v0.7.0 (issue #691) —
ai-memory rulessubcommand. CRUD for the substrate-level agent-action rules engine. Mutation verbs (add / enable / disable / remove) require the operator keypair on disk.ai-memory rulessubcommand — operator-facing CRUD for the substrate-level agent-action rules engine (issue #691). - search
cmd_searchmigration. Seecli::storefor the design pattern.- serve_
banner - Round-2 F8 + F12 —
ai-memory servestartup banner. - share
- v0.7.0 #1095 —
ai-memory sharesubcommand. Closes the SR-4 three-surface-parity gap by shipping the CLI counterpart to the MCP toolmemory_shareand the HTTP routePOST /api/v1/share. All three surfaces dispatch through the same substrate primitive (crate::mcp::tools::share::handle_share). v0.7.0 #1095 —ai-memory shareCLI subcommand. - shell
cmd_shellREPL migration. The line-handling logic is extracted intohandle_command(parts, conn, out)so unit tests can drive command parsing/dispatch without spawning a subprocess. The outer stdin loop is intentionally minimal and is not covered by unit tests — itsread_lineblocking call would deadlock a buffer-driven test fixture.- store
cmd_storemigration. Handler writes throughCliOutputso unit tests can capture stdout/stderr intoVec<u8>buffers.- sync
cmd_syncandcmd_sync_daemonmigrations. The daemon-mode body delegates todaemon_runtime::run_sync_daemon_with_shutdown_using_client(W3 work); this module owns only the wrapper + the in-process sync body (pull/push/merge/dry-run).- update
cmd_updatemigration. Seecli::storefor the design pattern.- verify
ai-memory verify-reflection-chain— external verifier for reflection chains (procurement-grade audit tool, v0.7.0 L1-3).- verify_
signed_ events ai-memory verify-signed-events-chain— walk the SQL-sidesigned_eventscross-row hash chain (v34, #698 V-4 closeout) and emit a structured chain-integrity report.- wrap
ai-memory wrap <agent>— cross-platform Rust replacement for the shell wrappers PR-1 of issue #487 shipped in the integration recipes.