Package ai.badmonkey.agentspaces.pdt.kinds


package ai.badmonkey.agentspaces.pdt.kinds
The typed readers and writers of the seven level-2 node kinds of PDT 2 (PDT 2 phase 0; srad/agentspaces-pdt2.md §3 and §6.10.3): DbRoot and DnNode (P2-D-01), RrRoot and RvNode (P2-R-01), TextLeaf (P2-T-01), VgNode (P2-V-01), and BoNode (P2-B-02). NodeCodec checks each field's type; each reader here checks the rules that span fields and refuses a node that breaks one with a NodeFormatException naming the rule. None of these kinds reaches a level-1 reader: the first five live under a PRef.v 2 head, vg behind the attribute pdt.ancestry, and bo behind the attribute pdt.bao.
  • Record Classes
    Class
    Description
    A node of a blob's Bao outboard, kind bo (PDT 2 phase 0, P2-B-02; srad/agentspaces-pdt2.md §3.5): { k:"bo", g: 4, n: size, p: parent chaining values, c: [links to child bo nodes] }, over chunk groups of 2^g BLAKE3 chunks (16 KiB, decision 10).
    The root of a DataScript database, kind db (PDT 2 phase 0, P2-D-01; srad/agentspaces-pdt2.md §3.1.1): { k:"db", v: 1, s: schema, me: max-eid, mt: max-tx, bf: branching-factor, i: { aevt: link, avet: link, eavt: link }, t: tail link or null }.
    A DataScript sorted-set node, kind dn (PDT 2 phase 0, P2-D-01; srad/agentspaces-pdt2.md §3.1.1): a leaf { k:"dn", l: 0, x: index, e: [datom...] }, a branch { k:"dn", l: level >= 1, x: index, e: [datom...], c: [link...] } whose e holds the largest key of each child in the order of c, or a tail { k:"dn", l: 0, x: "tail", e: [datom...] } with the datoms of one or more transactions in transaction order.
    The root of an RRB vector that still holds a relaxed node, kind rr (PDT 2 phase 0, P2-R-01; srad/agentspaces-pdt2.md §3.7): { k:"rr", n: count, s: shift, r: link or null, t: [tail] }, the vr shape with the trie made of RvNode interior nodes over v leaves.
    An interior node of an RRB vector, kind rv (PDT 2 phase 0, P2-R-01; srad/agentspaces-pdt2.md §3.7): { k:"rv", c: [link...], z: [cumulative sizes] }, with z present only on a relaxed node, one whose children are not all full.
    A text leaf, kind t (PDT 2 phase 0, P2-T-01; srad/agentspaces-pdt2.md §3.9): a Fugue sequence stored as runs, { k:"t", r: [run...], v: 1 }.
    A node of the persisted version graph, kind vg (PDT 2 phase 0, P2-V-01; srad/agentspaces-pdt2.md §3.10): { k:"vg", r: root, b: [base roots], i: issuer, t: issued, p: [links to earlier vg nodes] }.