Skip to main content

Module node

Module node 

Source
Expand description

The Node object and its embedding substructure.

Per SPEC §4.1:

Node: {
  _kind:   "node",
  id:      NodeId (16 bytes),
  ntype:   string,
  summary: string (optional),
  props:   map<string, Ipld>,
  content: bytes (optional),
}

Dense vector embeddings live in the per-commit sidecar (Commit.embeddings Prolly tree, keyed by NodeCid). Keeping them out of the canonical Node bytes prevents nondeterministic dense producers (e.g. ORT thread-count drift) from leaking into NodeCid and breaking federated dedup.

Legacy DAG-CBOR carrying an explicit embed map round-trips losslessly: the field-less wire decode plus the extra flatten sink absorbs and re-emits the bytes byte-identically, so existing NodeCids stay stable for repos written before this change.

Structs§

Embedding
A dense vector embedding produced by a named model.
Node
A graph vertex.

Enums§

Dtype
Numeric element type for an Embedding vector (SPEC §4.1).