Skip to main content

Module codegraph

Module codegraph 

Source
Expand description

The published code graph (C0 1.9, section 8; plan N1).

By default Hive knows code only through fact anchors (code_graph anchors, section 3 GraphV1 derives code nodes from them). The vault owner may publish the full graph (VaultV1.code_graph full, set on the web). Then an engine sends it on an explicit publish, or after a pull that shows the setting changed: PUT /v1/vaults/{vault_id}/code-graph CodeGraphPutV1 → CodeGraphAckV1 (right knowledge.draft). With the setting at anchors that is 409 invalid_state reason code_graph_disabled. Every upload replaces the vault’s graph; Hive records it in the audit log with the publishing instance, and shows who published the current graph.

The graph names files and symbols and how they relate, nothing else: no source text, no bodies, no digests (a hash of short code can be guessed). Paths follow the anchor rules and pass the same admission as anchors on the engine (restricted or secret files are dropped from the graph).

A sealed vault sends the same CodeGraphV1 only as sealed (content leanctx.hive.code-graph/v1, AAD vault_id|0|epoch|content_schema). Hive stores it opaquely; its GraphV1 stays 409 sealed and engines merge the graph locally.

Structs§

CodeEdgeV1
CodeGraphAckV1
CodeGraphPutV1
PUT …/code-graph: exactly one of graph (clear) and sealed.
CodeGraphV1
The engine’s code graph of one repo (also the sealed content).
CodeNodeV1
code:<path> (a file) or code:<path>#<symbol>, as in GraphV1.

Enums§

CodeEdgeKind
CodeGraphMode
VaultV1.code_graph; absent means anchors.
CodeNodeKind

Constants§

CODE_GRAPH_ACK_SCHEMA
CODE_GRAPH_PUT_SCHEMA
CODE_GRAPH_SCHEMA
MAX_CODE_GRAPH_EDGES
MAX_CODE_GRAPH_NODES
MAX_CODE_NODE_ID_CHARS
Characters of a code node id, as for GraphV1 node ids.