Expand description
Workspace concept — first-class in memstead-base after the
workspace-store rebuild.
A Workspace is the operator-curated collection of mounts;
each Mount attaches one mem to the workspace via a storage
backend (folder / git-branch / archive). One mount = one mem:
five mems living on five branches in one git-repo materialise as
five mounts; the engine pools the gitdir handle internally for the
shared backend rather than collapsing the conceptual mount.
This module ships the data shapes only. The persistence adapter
that materialises a Workspace from .memstead/workspace.toml +
.memstead/state/mounts.json lands separately as the file-adapter
sessions move forward; tests and the macOS app’s in-memory builder
construct Workspace directly without going through any adapter.
Distinct from crate::mem::MemRouterSnapshot, which is the
engine’s runtime snapshot of writable / visible mems. The
engine derives a MemRouterSnapshot from a Workspace at boot;
the two coexist while the rebuild is in flight.
Structs§
- Create
Rule Setting - One
[[mem_management.create]]rule. Carries a globpatternmatched against the candidate mem path, theschemasallowlist (each entry an exactname@x.y.zpin or the literal"*"for any-schema), and an optionaldefault_cross_linksvalue applied to every mem the rule matches. - Delete
Rule Setting - One
[[mem_management.delete]]rule. Carries only apattern; delete has no schema dimension. - McpSection
[mcp]section — settings the MCP binary reads at boot. Carried onWorkspaceSettingsso the MCP server sources its tuning fromEngine::settings()instead of a parallel TOML parse.- Mount
- A single mem attachment in a
Workspace. One mount = one mem. The schema pin is on the mount because per-mem schema resolution is fixed in code (local-storage → built-in → registry, with the storage layer owning where “local” lives — see the glossary’s Schema entry); the mount carries which schema this mem expects, the backend resolves where the YAMLs come from. - Mutations
Section [mutations]section — engine-wide mutation policy. Carried onWorkspaceSettingsso plugins can read the configured posture viamemstead_health { include_config: true }without a round-trip.- Workspace
- Operator-curated workspace — the in-memory shape the engine receives.
- Workspace
Settings - Workspace-level operator policy carried alongside the mount list.
Enums§
- Mount
Capability - What the workspace may do with a mount.
- Mount
Lifecycle - When the mount’s backend initialises.
- Mount
Storage - Storage reference for a
Mount. One variant percrate::backend::MemBackendimplementation. New backends add a variant; the file-adapter learns to round-trip it.
Constants§
- SCHEMA_
WILDCARD - The literal
"*"schema-allowlist entry that admits any pinned schema. Consumed by the create-rule allowlist parser.