Expand description
Engine construction — from_mounts* and from_workspace_root.
from_mounts is the in-process constructor every test, the macOS
UniFFI consumer, and the MCP filesystem server reach through.
from_workspace_root is the lean boot helper that produces the
same engine from a workspace root; the full counterpart lives in
memstead_git_branch::engine_from_workspace_root and follows the same
shape with the git-branch backend added to the factory.
Free helpers in this module materialise the workspace schemas
catalogue, walk each mount’s backend at load-time, and synthesise
the MemRouterSnapshot from the resolved mount list — pieces
the two entry points share.
Structs§
- Failed
Schema Package - One workspace-authored schema package that failed to load — the
package is SKIPPED (never fails the boot; degrade, never
disappear), and a mem pinning it quarantines with this failure as
its typed reason.
name/versionare best-effort peeks at the package’sschema.yamlheader so the pin match works even though the full load refused. - Schema
Resolver - The engine’s schema-pin resolver — the single named entry point a
load path resolves a
name@versionpin through. Consults schema sources in a fixed order: local storage (the mem’s own storage backend — folder.memstead/schemas/or the git-branch__MEMSTEAD:schemas/ref, layered first into the catalogue so it wins on(name, version)collision), built-in (compiled into the binary), remote (memstead.io, reserved, not implemented). The order is fixed in code — local-over-built-in by the catalogue’s insertion precedence, remote always last. On a miss it yields the per-source [SchemaSourceDiagnostic] trail theSCHEMA_NOT_FOUNDenvelope carries.
Functions§
- load_
workspace_ schemas - Walk
schemas_dirand load every immediate subdirectory as a workspace-authored schema. Each subdirectory must contain aschema.yamlmanifest (and optionaltypes/*.yaml) — silently skips entries that don’t carry the manifest.pubso the folderSchemaSourceand the below-boot repair path (memstead-git-branch) read through the same walker the boot path uses — one loader, no resolution fork between the booted and below-boot surfaces. - load_
workspace_ schemas_ with_ failures - Tolerant form of
load_workspace_schemas: broken packages are skipped and recorded instead of failing the whole walk (the historical?made one refusing package — e.g. a schema still on the retiredpropagating_relationshipskey after a binary upgrade — take every mem in the workspace down). - resolve_
builtin_ schema_ pin_ pub - Public re-export of [
resolve_builtin_schema_pin] for lifecycle orchestrators inmemstead-engine. Mirrors full’sresolve_mem_schemaagainst the built-in catalogue; workspace-schema-registry resolution lifts later.