Skip to main content

Module brief

Module brief 

Source
Expand description

brief — a memory store in one block, computed once per session.

A SessionStart hook runs before the assistant has asked anything, so the brief cannot be about a question: it is the orientation every question afterwards starts from. On a memory store that is the schema — its labels, its edge types, how deep its history runs, who may read it — and one worked call per question kind.

§Why it is byte-stable

The host caches the hook’s output for the whole session, so the same store must render the same bytes however often it is asked. Nothing here reads a clock for content: the budget decides how much is counted, never what is printed for what was. Every collection is sorted with the ties broken on the key, so hash iteration order cannot reach the output either.

Structs§

BriefOptions
How long the brief may take.
EdgeTypeBrief
One edge type of a memory store’s schema: what derives it, what it runs between, and how many there are.
LabelBrief
One label of a memory store’s schema: what it is called, how many nodes carry it, and every property name any of them has.
Recipe
One question kind and the single call that answers it, with the store’s own keys, labels and edge types already substituted in.
SchemaBrief
What a memory store is: its labels, its edge types, how deep its history runs, who may read it, and the call that answers each kind of question.

Constants§

EMPTY_BRIEF
The one line a store with nothing in it at all gets as a session opens: what is missing, and the memory write tools that fill it — the same offer the skill makes for an empty store. There is nothing to be central in, and no point naming a way to reach an empty graph.
MAX_BRIEF_BYTES
Longest session brief, in bytes.

Functions§

brief
What a memory store is, in two passes and no more.
render
A memory store’s brief: the schema, then one worked call per question kind, then reach.