Expand description
Session-scoped context graft layer (ADR-058 Phase 3).
The agent loop never gets a parallel store; it gets a query/graft layer over ExoChain’s ECC indexes, scoped to one conversation. This module is the kernel side of that layer:
- 3.1
SessionView— a session-scoped, ephemeral semantic index (a per-session HNSW). Because the index holds only this conversation’s chunks, scoping is structural: a query can only return this session’s chunks. The view is disposable and rebuildable from the chain (re-embed this session’s events), so killing/rebuilding a loop costs only time — ExoChain remains the source of truth. - 3.2 graft API — query → candidate branches → COW-reference graft, keyed by chain sequence, large payloads as content-addressed blobs.
- 3.3 index population — embed
agent.chat.turn/ tool-output events with the ADR-059 embedder, store f32 vectors keyed by chain sequence.
§This IS the ECC causal model
Graft / prune / promote map onto the node lifecycle (NodeState):
Speculative → Frontier → Committed (collapse to trunk) or → Stale → Pruned (evicted off main_line). v1 is single semantic index per
conversation (ADR-058 phasing); fusion (causal + temporal + BVH) is v2 and
additive — every chunk is already keyed by chain sequence.
The session view is deliberately separate from the durable global
CausalGraph: it is the L2 “warm, this-run” tier. L2→L3
promotion onto the durable trunk is Phase 4.
Structs§
- Chunk
Meta - Metadata for one chunk indexed in a
SessionView. - Grafted
Item - One item grafted into the working set (ADR-058 Phase 3.2).
- Scoped
Hit - A hit from a scoped query: the matched chunk plus its similarity score.
- Session
View - A session-scoped, ephemeral semantic view over this conversation’s chain chunks (ADR-058 Phase 3.1).
Enums§
- Graft
Content - How a grafted item’s content is carried into the working set.
- Node
State - Node lifecycle state on the causal model (ADR-058 / ADR-056).
Functions§
- content_
hash - Compute the content-addressed identity of a chunk’s text.
- mirror_
state - Mirror a per-turn node-state transition across both substrates
(ADR-062 P0.2): the authoritative L2
SessionViewchunk and the durableCausalNodemetadata.state.