Expand description
Re-export shim over memstead_base::entity plus the git-touching
git_tree_source submodule that stays in this crate.
Downstream consumers (memstead-mcp, memstead-cli, memstead-swift) reach the
entity surface through memstead_git_branch::entity::* exactly as before;
the inner types come from memstead-base.
Modules§
- generator
- Entity → Markdown generator. Deterministic output for roundtrip stability.
- git_
tree_ source - Git-tree-backed entity source — reads
.mdblobs out of a mem ref’s tree without a working tree on disk. - id
- Entity ID parsing, generation, and path mapping.
- loader
- Filesystem walker — loads all .md files from mem directories into entities.
- parser
- Markdown → Entity parser. Handles YAML frontmatter, sections, wiki-links.
- source
- Entity source abstraction — where markdown comes from.
- store_
builder - Shared helper for turning
ParseResults into a populatedStore. - writer
- Entity → markdown projection writer for the export paths.
Structs§
- Entity
- A parsed entity with metadata, sections, and relationships.
- Entity
Id - Unique entity identifier:
mem--entity-path. - Heading
Span - A single H3–H6 heading span recorded under one H2 section. Byte offsets
reference the raw section content (the string stored in
Entity.sections[key]). Spans are stored flat — level skips (H2 → H4 without H3) are tolerated and ancestry is resolved at query time via offset containment, not by inserting virtual intermediate spans. - Parse
Result - Result of parsing a markdown file. Includes the entity, extracted inline links, and parse-time warnings (e.g. duplicate section headings).
- Relationship
- A declared relationship in the Relationships section.
Enums§
- Metadata
Value - A metadata value with type coercion matching the JS parser behavior.
- Stub
Kind - Typed provenance for stub entities. Set at stub creation and lives
for the engine instance’s
lifetime. Boot reconstructs stubs via the parser and always tags
them
LoadTime; theForwardReferenceandResidualvariants therefore only appear during the engine lifetime in which they were created and reduce toLoadTimeafter a reload — this is intentional (“annotation, not state”) and consistent with the “no tombstones” decision.
Functions§
- normalise_
description - Normalise a per-edge description from the wire/argument surface:
trims surrounding whitespace and collapses empty / whitespace-only
inputs to
None. Applied at every mutation entry-point so the renderer never emits a bare em-dash followed by zero characters and the posture-validation step sees a canonical input. - resolve_
cross_ mem_ refs - Rewrite relationship and inline-link targets whose slug has a
"<mem>--<rest>"shape where<mem>is a visible-writable mem name. Same-mem wiki-links (no--prefix, or a prefix that is not a known mem) are left unchanged — the resolver is additive and byte- identical for inputs without a known-mem prefix.