Expand description
A session’s records, made checkable by anyone holding the host’s public key and nothing else.
Three parts, each the one implementation mur, the escape-conformance harness and a check
capsule call:
- The host key (
HostKey): an Ed25519 seed in~/.murmur/keys/record-seal.key(64 hex characters,0600, directory0700) and its public half inrecord-seal.pub(64 hex characters,0644). Only themurprocess reads the seed; no capsule grant atscopedorsealedreaches~/.murmur/keys. - The chain. Every
trace.jsonlline ends with a"prev_hash"key naming theline_hashof the line before it (GENESISon line 1), written through oneInlineChainper file however many appenders hold it.hooks/eval.jsonl,completion.jsonand a conversation record keep their bytes as written; their chain is the list of line hashes in the seal. - The seal (
Seal):<stream>.sealbeside the stream, signing the chain’s head, line count, stream name and sealing session with the host key, written temp-and-rename.
verify_session_records checks every stream of one records directory with a public key
alone and reports a Verdict per stream and for the whole record.
What is not sealed: a records directory’s home/, tmp/, logs/, out/ and blobs/
(blobs are named by their own sha256). Deleting a stream together with its seal reads as
Verdict::Absent.
Structs§
- Chain
Head - A chain’s head after its last line:
GENESISand0for an empty file. - Conversation
Pointer trace.jsonl.seal’s pointer to the conversation record its session appended to. Not signed.- HostKey
- The host’s record-seal key pair. Only the
murprocess holds one. - Inline
Chain - One
trace.jsonl’s chain, shared by every appender holding the same file. - Public
Key - A public key a seal is checked against, with the id seals name it by.
- Public
KeyReport - The key a record was checked against.
- Record
Report - A whole records directory’s verdict:
mur trace verify --json. - Seal
- One
<stream>.sealfile. - Sealed
Head - What a session-end seal hands the OTel
capsule.sessionspan. - Stream
Report - One stream’s verdict.
Enums§
- Verdict
- How a stream, or a whole record, reads. Ordered best to worst; the worst wins.
Constants§
- CHAIN_
INLINE chainof a seal whose stream carries its ownprev_hashon every line.- CHAIN_
LISTED chainof a seal that lists every line’s hash itself.- CLI_
SEALER - The
session_ida conversation seal carries when no session rewrote it:mur conversationtruncating a record from the command line. - COMPLETION_
STREAM - A delegated child’s outcome, relative to its records directory. Sealed as one “line”: the whole file’s bytes.
- CONVERSATIONS_
DIR ~/.murmur/conversations, relative to the murmur home: where conversation records live.- CONVERSATION_
STREAM_ PREFIX - Prefix of a conversation record’s stream name:
conversation:<record>/<context-id>. - EVAL_
STREAM - The scoring hook’s stream, relative to the records directory.
- GENESIS
- Line 1’s
prev_hash. - KEYS_
DIR ~/.murmur/keys, relative to the murmur home.- KEYS_
DIR_ MODE - Mode of
~/.murmur/keys. - PREV_
HASH_ KEY - The key every
trace.jsonlline ends with. - PRIVATE_
KEY_ FILE - The Ed25519 seed, as 64 lowercase hex characters and a newline.
- PRIVATE_
KEY_ MODE - Mode of
PRIVATE_KEY_FILE; a key file with any group or other bit is refused. - PUBLIC_
KEY_ FILE - The Ed25519 public key, as 64 lowercase hex characters and a newline.
- PUBLIC_
KEY_ MODE - Mode of
PUBLIC_KEY_FILE. - REPORT_
SCHEMA schemaofRecordReport, and ofmur trace verify --json.- SEAL_
ALGORITHM - The only
algorithma seal names. - SEAL_
FORMAT - The
formatof every seal this build writes, and the first line of its signed message. - SEAL_
SUFFIX - Appended to a stream’s file name to name its seal.
- TRACE_
STREAM - The trace’s stream name, which is also its file name in the records directory.
Functions§
- appended_
conversation - The first conversation record the session in
records_dirappended to. - conversation_
stream - The conversation record a session’s
trace.jsonl.sealpoints at. - key_
id_ of - The first 16 hex characters of the SHA-256 of a raw 32-byte public key.
- keys_
dir <murmur home>/keys.- line_
hash "sha256:"and the lowercase hex SHA-256 ofbytes: one line without its newline.- listed_
head - A
"listed"seal’s head:"sha256:"and the hex SHA-256 of the line hashes joined by\n. - note_
conversation_ append - Notes that the session whose records directory is
records_dirappended to the conversation record inconversation_dir, soseal_session_teardownseals it. - private_
key_ path <murmur home>/keys/record-seal.key.- public_
key_ path <murmur home>/keys/record-seal.pub.- read_
seal - The seal beside
stream_fileinroot,Ok(None)when there is none. - seal_
conversation - Seals the conversation record in
dir(.../<record>/<context-id>/conversation.jsonl) forsession_id. A failure is reported and leaves the record reading as unsealed. - seal_
inline - Seals
stream(an inline-chained file inrecords_root, normallyTRACE_STREAM) at its current head, signed forsession_id. - seal_
listed - Seals
stream_fileindir_rootas a listed chain: every complete line’s hash in order (the whole file as one line whenwhole_file, as forcompletion.json), written to<stream_file>.sealatmode. A failure is reported on stderr and leaves the stream reading as unsealed; it never fails the caller. - seal_
session_ end - The seal a session writes once
session_endis on disk:trace.jsonlat its head, naming the conversation record the session appended to. Returns the head for the OTel session span. - seal_
session_ teardown - The seals a session writes at teardown, once its door is shut and every hook has drained:
trace.jsonlagain when a line landed after its last seal,hooks/eval.jsonlwhen it exists, and every conversation record the session appended to. - signed_
message - The UTF-8 bytes a seal’s signature covers:
murmur.seal/1\n<stream>\n<session_id>\n<lines>\n<head>\n. - verify_
inline - Checks an inline-chained stream’s bytes against its seal.
- verify_
listed - Checks a listed-chain stream’s bytes against its seal.
whole_filetreats the file as one line, ascompletion.jsonis sealed. - verify_
session_ records - Checks every stream of the records directory
records_dirwithpublic_keyalone. - worst
- The worst of
verdicts, ignoringVerdict::Absent;Absentwhen every one is.