All blocks carrying the given tag, in insertion order.
Deep clones of the matching blocks.
Look up a block by level and name.
A deep clone of the block, or undefined when absent.
All blocks (optionally filtered by level), sorted by name then level.
Optionallevel: "chain" | "strip" | "processor" | "console"Deep clones of the matching blocks.
Remove a block by level and name.
True when a block was removed.
Save a block, overwriting any existing block with the same key.
data must be structured-cloneable (plain JSON-ish values).
Optionaltags: readonly string[]A clone of the saved block, stamped with createdAt.
Serialize the library to a plain block array (used by JSON.stringify).
Deep clones of all blocks, in insertion order.
StaticfromRehydrate a library from a serialized block array (e.g. JSON.parse
output). Validates every entry — invalid input throws an Error whose
message names the offending path, like blocks[2].level. Duplicate
keys resolve last-wins, matching save overwrite semantics.
In-memory store for blocks, keyed by
${level}/${name}.Every boundary deep-clones:
savestores a private copy of the data and every read (save's return value,get,list,byTag,toJSON) returns fresh clones, so callers can never mutate the stored blocks.