Skip to main content

Module schema

Module schema 

Source
Expand description

What a store holds and how it is wired: the answer to “what’s in here?”.

The session brief (crate::memory::brief) already knows a store’s labels and edge types, but it is shaped for a hook that runs once per session: it omits the rules’ predicates, every index declaration and the provisional nodes remember stubbed. An assistant on a host with no SessionStart hook has no brief at all. This report is the brief’s counts plus those three, for the MCP schema tool.

render_schema does not stamp the untrusted-data framing line. The MCP layer’s ok() is the one place a task reply is framed; a renderer that framed too would put the line in a reply twice.

Structs§

RuleBrief
One rule, as the schema names it.
SchemaReport
Everything render_schema prints, for json: true.

Constants§

PROVISIONAL_SAMPLE
Provisional keys named by the report; the rest are counted.
SCHEMA_LIST_CAP
Entries listed per section before the rest are counted instead.
SCHEMA_MAX_BYTES
The most bytes render_schema returns.

Functions§

provisional_keys
Every provisional node’s key, sorted.
render_schema
The report as text, every value sanitized. Unframed: see the module docs.
schema_report
The report for db. opts bounds the brief’s part of the work.