Expand description
Mutable Q42 Session: Checkpoint and Append-Only Transaction Journal (.q42j).
Generalized persistence layer for QualiaDB, supporting:
- POET NOS workspaces, strata, and lens-time document histories
- Webizen Studio and Desktop persistent graph workspaces
- Autonomous multi-agent simulation & RTS world states (e.g. Rolling Commons)
- Offline-first browser sessions via OPFS / Memory and native filesystem
Conforms to AGENTS.md:
- Universal 48-byte
NQuinsemantic atom with 5-field XOR fold parity. - Zero heap inside hot frame validation and evaluation loops (Tier 1).
- 42MB Sentinel budget compliance.
- Default privacy:
PrivacyClass::Sanctuary(restricted; prevents accidental public magnet routing).
Structs§
- Frame
Header - 32-byte header preceding every frame payload.
- Journal
Header - 128-byte header stored at offset 0 of every
.q42jfile. - Journal
Transaction - An atomic transaction delta over canonical 48-byte Quins.
- Mutable
Q42Session - Generalized in-memory mutable session providing active state projection, transaction commit boundaries, and checkpoint management.
- Q42Journal
- Core Journal Engine managing durable appending and atomic replay.
Enums§
- Journal
Application Profile - Application profiles for generalized QualiaDB sessions.
- Journal
Error - Journal
Frame Type - Types of frames within a
.q42jtransaction. - Journal
Privacy Class - Privacy classification for the journal (Sanctuary by default).
Constants§
- FRAME_
HEADER_ SIZE - Q42J_
HEADER_ SIZE - Fixed journal file header size (128 bytes).
- Q42J_
MAGIC - Magic bytes for a Q42 Journal:
Q42J. - Q42J_
VERSION - Current
.q42jjournal format version.
Functions§
- crc32c
- Compute a fast CRC-32C checksum over data.
- quin_
from_ bytes - Reconstruct an NQuin from 48 bytes with 5-field XOR parity check.
- quin_
to_ bytes - Convert an NQuin into 48 little-endian bytes.