Optionaloptions: { checksumConfig?: TCoreChecksumConfig }Every anchor in the library.
Every document in the library.
Every link in the library.
Returns every anchor recorded against the given argument version.
Returns the document with the given ID, or undefined.
Returns every link attached to the given argument version.
Removes a document. Refuses while a link or an anchor still references
it — dropping it silently would leave dangling references that only
validate() would notice, and only later.
Serializable snapshot of the whole library.
Checks every entity against the schema and the library's invariants.
StaticfromRestores an origin library from a snapshot, rebuilding its indexes.
Optionaloptions: { checksumConfig?: TCoreChecksumConfig }
Holds the source texts arguments were built from, their per-version associations, and the spans of those texts individual argument parts derive from.
Documents are immutable: there is no update path, because every anchor is an offset into a document's exact text. Correcting a source means replacing the document, which invalidates its anchors by design.
The text is opaque content. This class digests it, measures it, and slices it by index; it never parses, renders, or interprets it.
An anchor is only meaningful alongside a link: the link carries the stance.
validate()therefore requires every anchor's(argumentId, argumentVersion, documentId)to have a matching link, which fixes the persistence order for consumers — document, then link, then anchors — and makes removing a link that still has anchors a violation.Like the claim-connection libraries, this one mints no identifiers — callers supply them — and takes no argument lookup: an argument library is constructed after this one, so cross-checking argument existence here would invert the dependency order. What it does enforce is everything decidable from its own contents, most importantly that an anchor's span slices out the anchor's own quote.