Expand description
Reads (spec/surface/README.md §2): ref resolution, whole-document reads,
block hydration at a resolution, the outline wire format, and the two
path-ordered list surfaces. Port of packages/core/src/core/read/*.
Result keys follow the reference’s spelling (docId, renderedHashMatch,
…) — the fixtures are generated from it.
Structs§
- Block
Node - A live block with its children (the containment forest).
- DocInfo
- A live document’s identity (
findDoc). - DocList
Row - One row of
docs_list.
Enums§
- Resolution
- The resolution ladder.
- Resolved
Ref resolve_ref’s answer.
Constants§
- LIST_
DEFAULT_ LIMIT docs_list/docs_treedefault page size.- MANY_
CAP - Max refs honored per
docs_read_many/nodes_get_manycall.
Functions§
- block_
raw - A block’s raw bytes by hex hash (
""when unknown). - docs_
list - §2
docs_list:{ items, truncated, cursor }. - docs_
outline - §2
docs_outline:{ text, truncated }. - docs_
read - §2
docs_read:{ path, docId, rev, properties, content }(+ids,hashes,parentswith ids);Nonefor a missing doc. - docs_
read_ at - §2
docs_read_at:spec/store§6.2 plus the current properties. - docs_
read_ many - §2
docs_read_many:{ items, errors, truncated }. - docs_
tree - §2
docs_tree:{ prefix, depth, total, entries, truncated, cursor }. - find_
doc_ by_ id - A live doc by id.
- find_
doc_ by_ path - A live doc by repo + path.
- find_
doc_ by_ ref - The id-or-path dispatch every doc-ref surface routes through: a
d_id is looked up by id only (never falling through to a path). - first_
words - The first
nwhitespace-separated words,…when cut. - load_
doc_ blocks - A document’s live blocks as an ordered forest (
ORDER BY parent_block, order_key; a row whose parent is not live is a root). - nodes_
get - §2
nodes_get: one block subtree at a resolution;Nonewhen the block is not live indoc_id. - nodes_
get_ many - §2
nodes_get_many:{ nodes, truncated, unresolved }. - normalize_
tree_ prefix - Normalize a tree prefix: no leading
/, and either empty or ending in/. - resolve_
ref - §2
resolve_ref: ann_node id → its live block, else its doc; ab_id → its live block; ad_id → the live doc; anything else → the live doc at that path;Nonewhen nothing matches. - token_
cost ceil(JSON length / 4): the token estimate every budget uses.