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).
Structs§
- Code
Edge V1 - Code
Graph AckV1 - Code
Graph PutV1 PUT …/code-graph: the graph, in the clear.- Code
Graph V1 - The engine’s code graph of one repo.
- Code
Node V1 code:<path>(a file) orcode:<path>#<symbol>, as inGraphV1.
Enums§
- Code
Edge Kind - Code
Graph Mode VaultV1.code_graph; absent meansanchors.- Code
Node Kind
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
GraphV1node ids.