Skip to main content

Module build

Module build 

Source
Expand description

What goes into an agent archive, and from where (spec section 4): the definition through the allowlist, Personal Memory refreshed from the live folder, and the conversation in the history store’s compact form, newest first under the cap of decision 12, plus the conversation as one readable file and the rolling state. A value srv holds secret is withheld from every part that holds text from the store; scrub_shape also withholds anything shaped like a key, which a saved file does and a move does not. Nothing here reads a provider’s own session file.

Structs§

Inputs
Where it comes from.
Options
What to put in.
Report
What was written and what was not.

Constants§

MAX_HISTORY_RAW_BYTES
The most raw conversation a saved file takes until the store’s compact form is the only form (decision 12): the newest sessions that fit. A session that does not fit is left out and said so.

Functions§

build
Writes the archive of def to out. On an error out holds a partial file, which the caller discards.
scrub_lines
Every JSON string of every line scrubbed for key shapes. A line that is not JSON is scrubbed as text. A line is never left as it was when scrubbing it would break it: the scrub works on the strings, not the syntax.