Expand description
The overview composer was relocated into memstead-base (its sole
engine-type parameter already is memstead_base::Engine, and it imports
only memstead-base + memstead-schema + std) so the lean
memstead-mcp build — which does not depend on memstead-engine — can
render the identical overview from one rendering authority.
Re-exported here so every existing memstead_engine::overview::*
consumer (the full MCP server, the full CLI, serve’s HTML overview,
engine tests) compiles unchanged.
Structs§
- Overview
Args - Composer input — packed from the MCP
OverviewParamsor the CLIArgsat the call site.chunkis intentionally NOT here: the surface decides how to chunk the output (MCP wraps withapply_chunkingat a transport budget; CLI does the same at its own default), so the composer just returns markdown. - Overview
Output - Composer output — rendered markdown plus the structured bits the
surface needs to assemble its final envelope.
extra_frontmatteris the(key, value)slot the surface threads into its own chunking helper (preserved at every chunk’s head).
Enums§
- Compose
Overview Error - Typed input failures the composer surfaces. The MCP wrapper maps
each variant to its existing envelope (
INVALID_INPUT,UNKNOWN_MEM); the full CLI does the same to its CLI error codes. - Surface
- Which surface is rendering. The composer branches on this only for inline command-name hints — never for content or shape. Adding a new surface (e.g. UniFFI) is an additive variant; today the macOS app consumes structured engine data, not rendered markdown, so two variants suffice.
Constants§
- ALLOWED_
OVERVIEW_ INCLUDE_ KEYS - Heavy-content include keys the composer recognises. Order is the
greedy-fill priority order:
mem_distribution,community_members,community_bridges,dangling_links.include-listed keys force inclusion regardless of budget; unlisted keys greedy-fill until the budget is exhausted, then surface as hints. - DEFAULT_
OVERVIEW_ BUDGET - Default token budget for heavy content. Matches the MCP tool’s pre-lift constant and the public-facing description.
Functions§
- build_
workspace_ policy_ entries - Compute the set of workspace-policy entries to surface in
memstead_overview. Returns(label, value)pairs in stable display order. Only values that deviate from the engine default appear — a fresh workspace produces an emptyVecand the policy section / frontmatter is omitted altogether. - compose_
overview - Compose the overview markdown for either surface.
- find_
schema - Find a schema in the unified engine’s catalogue matching the given
memstead_schema::SchemaRef. Mem-pinned first, then workspace, then built-ins. Mirrorsmemstead_mem_create’s resolution order somemstead_schema(name=<ref>)resolves any pinmemstead_mem_createwould accept — built-in, workspace-pinned, or mem-pinned. - mem_
schema_ ref - Resolve the per-mem schema pin from the unified engine’s
mounts()shape. - render_
workspace_ policy_ flow - Render workspace-policy entries as an inline YAML flow mapping
suitable for embedding into a single frontmatter line:
_policy: {require_notes: true, cross_mem_links: named}. ReturnsNonewhen there are no entries so the frontmatter slot stays empty.