Expand description
memstead mem init / memstead mem delete — full-only mem-lifecycle
CLI front-ends.
Both subcommands call the
engine in-process via memstead_engine::mem_management::create_mem /
delete_mem. An earlier design spawned memstead-mcp --operator-mode
as a child process and drove the matching MCP tool over JSON-RPC
— wire-format parity with the agent path was the intent,
but the CLI-as-MCP-consumer relationship cut against the layering
posture that CLI, MCP, and UniFFI are sibling surfaces over the
engine (AGENTS.md’s parity rule). In-process
collapses CLI and MCP onto the same Rust call, with operator_mode: true hardcoded at the call site so the engine bypasses the
[[mem_management.create]] / [[mem_management.delete]]
allowlists and the MEM_REFERENCED_BY_POLICY safeguard for these
two operator-tool surfaces (matching the spirit of the
transport-establishes-posture rule).
Outer-repo gitignore: a CLI-only concern. The shared helper in
crate::outer_gitignore walks upward from the workspace root
looking for an enclosing .git/, then idempotently appends the
workspace path (or mem-repo/ inside it) to the outer repo’s
.gitignore. Refused for $HOME and disabled by --no-gitignore.
Structs§
- Delete
Args memstead mem delete <name>arguments — full destruction. The CLI honours the workspace[[mem_management.delete]]allowlist by default; pass--operator-modeor setMEMSTEAD_OPERATOR_MODE=1to skip the allowlist. TheMEM_REFERENCED_BY_POLICYandMEM_HAS_INCOMING_REFSsafeguards always fire regardless of operator-mode. The verb uniquely identifies the storage-destroying intent — usememstead mem unregisterfor router-only removal.- Init
Args memstead mem init <path>arguments.- List
Args memstead mem list— no positional args. The verb itself is the signal;--json(root-level) toggles the output shape.- SetDescription
Args memstead mem set-description <NAME> <DESCRIPTION>arguments.- SetInternal
Args memstead mem set-internal <NAME> [--off]arguments.- SetSchema
Args memstead mem set-schema <NAME> <SCHEMA>arguments.- SetSync
State Args memstead mem set-sync-state <NAME> <KEY> <TOKEN>arguments.- SetVersion
Args memstead mem set-version <NAME> <VERSION>arguments.- Unregister
Args memstead mem unregister <name>arguments — router-only removal, storage preserved. The CLI honours the workspace[[mem_management.delete]]allowlist by default; pass--operator-modeor setMEMSTEAD_OPERATOR_MODE=1to skip the allowlist. TheMEM_REFERENCED_BY_POLICYsafeguard does not apply to unregister (storage is preserved), so unregistering a mem with cross-mem grants pointing at it succeeds without refusing — the data the grants rely on survives.
Enums§
- MemAction
- Subcommands under
memstead mem.
Functions§
- run
- run_
delete - run_
list - run_
set_ description memstead mem set-description <NAME> <DESCRIPTION>— set or clear the mem’s one-line description via the in-process engine, persisting through the backend’swrite_mem_config. Like set-version, this surface is gate-free and calls the engine directly. An empty DESCRIPTION clears the field.- run_
set_ internal memstead mem set-internal <NAME> [--off]— mark or unmark a mem as internal (hidden from the default overview roster + public projections).- run_
set_ schema - run_
set_ sync_ state memstead mem set-sync-state <NAME> <KEY> <TOKEN>— set or clear one opaque sync-state token in a mem’s config via the in-process engine, persisting through the backend’swrite_mem_config. Like set-version, this surface is gate-free and calls the engine directly.- run_
set_ version memstead mem set-version <NAME> <VERSION>— bump the mem’sversionfield via the in-process engine, persisting through the backend’swrite_mem_config. Unlikeinit/delete, this surface doesn’t spawn the MCP subprocess: set-version is gate-free (no operator-mode bypass needed), so a direct engine call keeps the implementation simpler and faster.- run_
unregister