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.- backup
cmd_backupandcmd_restoremigrations. Seecli::storefor the design pattern.- 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.- 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. - helpers
- Public API
- io
cmd_export,cmd_import,cmd_minemigrations.- io_
writer - Public API
- link
cmd_linkandcmd_resolvemigrations. Seecli::storefor the design pattern.- promote
cmd_promotemigration. Seecli::storefor the design pattern.- recall
cmd_recallmigration. Seecli::storefor the design pattern.- search
cmd_searchmigration. Seecli::storefor the design pattern.- 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.