Skip to main content

Crate mimir_cli

Crate mimir_cli 

Source
Expand description

Read-only inspection library backing the mimir-cli binary.

Implements the rendering + verification surfaces of docs/concepts/decoder-tool-contract.md. Everything in this crate is read-only — no function here writes to a workspace or appends to a canonical log.

Public surface (v1):

  • LispRendererCanonicalRecord → Lisp S-expression text reconstructing the agent-visible fields of Sem / Epi / Pro / Inf memory records. Backs the decode subcommand.
  • verify — integrity check on a canonical.log file covering the framing, opcode, and symbol-reference corruption classes from decoder-tool-contract.md § 6.
  • iso8601_from_millis — ms-since-epoch → YYYY-MM-DDTHH:MM:SSZ string inverse of mimir_core::parse’s ISO-8601 loader, so timestamps round-trip bit-perfect through render → re-parse.

Structs§

LispRenderer
Renders memory records as Lisp S-expressions using a SymbolTable to resolve SymbolId → canonical name. Output conforms to ir-write-surface.md and re-parses to an equivalent UnboundForm (modulo librarian-assigned memory_id / committed_at / observed_at fields which the agent never provides).
VerifyReport
Result of a verify pass.

Enums§

RenderError
Errors produced by LispRenderer::render_memory. None of these are fatal for the caller — the renderer can skip unrenderable records and continue.
TailStatus
Classification of the trailing bytes past the last decodable record, if any.
VerifyError
Errors produced by verify and load_table_from_log.

Functions§

iso8601_from_millis
ms-since-epoch → YYYY-MM-DDTHH:MM:SSZ UTC string. Matches the ISO-8601 format accepted by mimir_core::parse’s timestamp loader so the string round-trips bit-perfect.
load_table_from_log
Open a canonical log read-only and return the reconstructed SymbolTable (via a temporary Pipeline) so the renderer and verify helpers can share a table.
verify
Read-only integrity check on a canonical log.