Expose Gjallar daemon affordances in local Verse

This commit is contained in:
Meta Vens 2026-06-05 00:20:54 +01:00
commit 9552f4d700
13 changed files with 407 additions and 22 deletions

View file

@ -86,7 +86,7 @@ The landed machine now has:
- first auditable Phase 6 fixed-lane coordinator runner through native `epiphany-mvp-coordinator`, producing coordinator summary, JSONL steps, rendered snapshots, transcript, stderr, runtime-spine status, native runtime job/result receipts for launched work, and final next-action artifacts while keeping semantic findings review-gated by default
- first Codex-independent native runtime vertebra through `epiphany-runtime-spine`, storing runtime identity, sessions, jobs, job results, and events as typed CultCache MessagePack documents, opening/completing native jobs, projecting job-result counts, and emitting a framed CultNet hello message for the native contract
- first Rust CultMesh local-node integration: `vendor/cultmesh-rs` now provides the repo-contained CultMesh surface over vendored CultCache/CultNet, and `epiphany-core` depends on that surface for local `EpiphanyCultMeshStatusEntry`, `EpiphanyCultMeshVersePolicyEntry`, and `EpiphanyCultMeshGlobalRoomPolicyEntry` round-trip smokes instead of treating raw CultNet as the ergonomic app-facing database layer
- first local Verse query surface: `notes/epiphany-verse-architecture.md` names Verse/Odin/Yggdrasil ownership, `epiphany-verse-query` can seed/query a compact CultMesh-backed local Verse context bundle for operator inspection and future dynamic prompt assembly without granting semantic memory, public sharing, or state-admission authority, and `tools/epiphany_local_run.ps1 -Mode status` now writes that packet as `local-verse-context.json` beside native status/operator snapshot artifacts
- first local Verse query surface: `notes/epiphany-verse-architecture.md` names Verse/Odin/Gjallar/Yggdrasil ownership, `epiphany-verse-query` can seed/query a compact CultMesh-backed local Verse context bundle for operator inspection and future dynamic prompt assembly without granting semantic memory, public sharing, or state-admission authority, can import `gjallar.affordance.v1` daemon affordance summaries from Odin/Gjallar stores, and `tools/epiphany_local_run.ps1 -Mode status` now writes that packet as `local-verse-context.json` beside native status/operator snapshot artifacts while auto-detecting the sibling Odin Gjallar store when present
- first dynamic prompt launch handoff: role/reorient worker launch documents carry optional `dynamicPromptContext`, runtime prompt assembly consumes that field into worker instructions, `epiphany-prompt-context-smoke` proves rendered Verse/memory context can ride a role launch document without admitting unrelated private-looking text, live bridge role/reorient launch paths now feed local Verse plus memory graph context from sibling `local-verse.ccmp` and `memory-graph.msgpack` stores beside runtime-spine, and the bridge launch-context test proves the dynamic packet survives in a persisted runtime-spine worker launch request
- first Hands/Soul/Continuity contract catalogs: action, verification, and continuity now have native `epiphany-core` contract families, runtime-spine advertisement, CultMesh policy documents, and local CultMesh smoke coverage beside Mind/Substrate Gate/Eyes; Hands now also has typed runtime-spine document bodies/helpers for `HandsActionIntent`, `HandsActionReview`, `HandsPatchReceipt`, `HandsCommandReceipt`, and `HandsCommitReceipt`, with `epiphany-hands-action-smoke` proving the action receipt chain without live file execution; Implementation now launches as `implementation-branch-turn-worker` owned by `epiphany-hands`, receives dynamic Proprioception context, gets a Substrate Gate mutation grant, and must make at most one branch-turn commit before Proprioception refresh
- live-specialist runner must be rebuilt around heartbeat/runtime-spine result receipts
@ -137,8 +137,11 @@ These boundaries are more important than the individual method names:
- Codex prompt machinery must not tell Epiphany agents what to do. Epiphany
prompts, typed state projections, organ contracts, scheduler decisions, and
mutation law are Epiphany-owned; Codex may transport and stream turns.
- MCP may survive only as a separate CultNet-speaking adapter; it does not
justify preserving the Codex host brain.
- MCP may survive only as an external compatibility adapter. It does not
justify preserving the Codex host brain, and it is not the native GameCult
daemon-control path. Epiphany agents should discover daemons through
Odin/Gjallar, inspect provider surfaces through Eve/CultUI, and interact via
CultMesh/CultNet provider-owned command documents and receipts.
- `thread/epiphany/retrieve` is read-only.
- `thread/epiphany/distill` is read-only.
- `thread/epiphany/propose` is read-only.
@ -238,8 +241,9 @@ The next unknowns are:
- how to expose state read/update, view lenses, runtime launch/read/interrupt,
result accept/refuse, retrieval, checkpoint, CRRC, coordinator, heartbeat,
and role-memory actions as CultNet contracts instead of Codex JSON-RPC verbs
- how to split MCP into a CultNet-speaking adapter without preserving Codex
app-server/plugin organs
- how to quarantine MCP as an external compatibility adapter without preserving
Codex app-server/plugin organs or treating MCP as the native GameCult daemon
actuator
- how to make Aquarium and CLI status use CultNet contracts instead of
`thread/epiphany/*`
- how to define `EpiphanyDream`, dream lineage, ingress receipts, and adoption
@ -402,7 +406,8 @@ Liberation candidates, in the intended order:
4. Replace worker launch/result/selfPatch cargo with typed document contracts.
5. Move Aquarium/CLI/operator reads and actions from `thread/epiphany/*`
JSON-RPC to CultNet contracts.
6. Split MCP into a CultNet adapter if it remains useful.
6. Quarantine MCP as an external adapter if it remains useful; GameCult daemon
discovery and control belong to Odin/Gjallar/Eve/CultMesh/CultNet.
7. Starve `codex_message_processor.rs` until Epiphany no longer depends on it
for state, scheduling, runtime, views, acceptance, notifications, or tests.
8. Delete or seal Codex apps, skills, marketplace, and plugin UX from the

View file

@ -65,6 +65,7 @@ It should expose compact TUI/API packets for:
- organ contract policy
- local Verse policies
- admissible tool/query affordances
- Odin/Gjallar daemon affordances for provider-owned GameCult services
Local Verse context is prompt input, not durable truth by itself. Mind still
owns durable adoption.
@ -80,6 +81,12 @@ access receipts, or private-state export rules.
Odin sees the map. Odin does not get to steal the throne.
Gjallar is the herald path from Odin-owned sight into agent context. Epiphany
should consume Gjallar affordance records as compact context, not crawl sockets
or ask MCP what tools happen to exist. The affordance says what can be
inspected or requested, where the source record lives, and which provider owns
the real command/state boundary.
### Yggdrasil
Yggdrasil is the hosting spine for important trusted GameCult Verses.
@ -128,6 +135,7 @@ The first native query tool is:
cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-verse-query -- smoke
cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-verse-query -- seed
cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-verse-query -- query
cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-verse-query -- query --gjallar-affordance-store E:\Projects\Odin\scratch\gjallar\gjallar.affordances.cc
cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-prompt-context-smoke
```
@ -141,10 +149,27 @@ This writes and reads a compact CultMesh-backed local Verse context bundle:
- latest operator run/snapshot receipts when present
- organ contract summaries for Mind, Substrate Gate, Eyes, Hands, Soul, and
Continuity
- imported `gjallar.affordance.v1` daemon affordance summaries when a Gjallar
store is provided
This is not semantic search yet. It is the first typed inspection packet the
future prompt assembler can depend on.
Daemon affordance context follows the pure GameCult path:
```text
Odin owns accepted Verse/service/interface discovery
-> Gjallar publishes compact `gjallar.affordance.v1` records
-> Epiphany imports/queries those records into the local Verse context packet
-> agents inspect Eve/CultUI TUI surfaces and request provider-owned CultMesh commands
-> provider daemons emit accepted/denied/reconciled receipts
```
MCP is not the native Epiphany control path for GameCult daemons. It may remain
as external compatibility scaffolding, but daemon discovery and interaction for
GameCult-owned services should travel through Odin, Gjallar, Eve, CultMesh, and
provider-owned command documents.
`epiphany-prompt-context-smoke` is the first prompt-context proof on top of
that packet. It seeds local Verse context, builds a memory graph context cut,
renders the combined dynamic prompt packet, asserts that Verse/Odin/
@ -186,6 +211,9 @@ memory.
action, repo, or public-speech authority.
- Every tool exposed to agents should have a compact, inspectable TUI/API
surface before it becomes ambient prompt power.
- Epiphany may cache/import Gjallar affordance records for prompt context, but
Odin remains the source of discovery truth and providers remain the owners of
command side effects.
## Migration Cut

View file

@ -48,7 +48,7 @@ remembers doctrine; the branch remembers the blade.
- Native status now exposes that quarantined bridge spine without granting it authority. `runtime_spine_status` counts tool invocation intents, receipts, and pending calls; `runtime_tool_invocation_statuses` derives read-only intent/receipt status rows; `epiphany-runtime-spine status` reports the counts; and `epiphany-mvp-status --runtime-store <path>` renders the latest tool calls under `tools`. This is operator visibility only. The model-runtime feedback seam is also now typed: MCP-shaped model tool calls preserve the original provider `call_id` plus source model request id; `epiphany-model-runtime tool-followup` builds a provider-neutral follow-up `EpiphanyModelRequest` from completed typed tool receipts using the previous provider response id; and `epiphany-model-runtime tool-followup-turn` derives and runs that continuation through the selected provider in one runtime-owned operation. `epiphany-model-runtime run-worker --auto-tools --tool-adapter-bin <path>` now lets a launched worker automatically execute typed MCP intents through the quarantined Codex MCP adapter, feed receipts back through follow-up model turns, and only then parse/complete the worker result. Codex still executes the quarantined MCP edge; Epiphany owns the continuation request shape and invocation boundary.
- The active foundation directive is now `notes/codex-starvation-and-cultnet-liberation-plan.md`. The previous Codex app-server control-plane rebuild made Epiphany less rotten inside Codex, but that is not the destination. Epiphany must become a native CultCache/CultMesh/CultNet runtime while remaining an honest modified Codex-derived backend for subscription auth/model use. Codex should remain relatively vanilla and keep doing Codex things, including useful app-server and streaming bridge affordances, but it must not own Epiphany state, processes, prompts, scheduler decisions, or policy. The bridge handles interop; Codex and Epiphany do not get to rummage around in each other's organs.
- `notes/epiphany-cultmesh-dreaming-roadmap.md` is the new concrete design for distributed Epiphany dreaming. The invariant is hard: private state stays local; public dreams are separately authored typed documents distributed through CultMesh/CultNet; foreign dreams are thought weather until a reviewed local adoption receipt digests them. The first code slice should be dream schemas plus a local CultMesh-backed store, not public fanout.
- CultMesh is now the preferred Rust abstraction for that local store work. The compile-time Rust substrate is repo-contained: `vendor/cultcache-rs`, `vendor/cultnet-rs`, and `vendor/cultmesh-rs`. The old `E:\Projects\CultLib\crates\*` dependency body is dead in this checkout and must not be revived by accident. Vendored CultCache reads/writes `cultcache.store.v1`, so `state/ledgers.msgpack` and `epiphany-state status` are aligned again. The first integrations are deliberately small: status, Verse policy, global room policy, organ contract policy, native operator status, native operator snapshots, and local operator run intent/receipt round-trip through CultMesh. `notes/epiphany-verse-architecture.md` now names the local Verse/Odin/Yggdrasil architecture: Odin sees advertised Verse metadata without bypassing boundaries, Yggdrasil hosts important trusted GameCult Verses such as Bifrost, and prompt assembly should query compact local Verse plus semantic memory packets instead of carrying the whole archive. Role/reorient launch documents now have optional `dynamicPromptContext`; runtime prompt assembly consumes that field into worker instructions, `epiphany-prompt-context-smoke` proves a rendered Verse/memory packet is preserved on a role launch document, live bridge role/reorient launches now feed local Verse plus memory graph context from sibling `local-verse.ccmp` and `memory-graph.msgpack` stores beside runtime-spine, and the bridge launch-context test proves the packet survives into a persisted runtime-spine worker launch request. The memory graph refreshes from current typed thread-state repo graphs when absent, so thin state remains visibly thin. Local-run status now has an operator read proof too: `tools/epiphany_local_run.ps1 -Mode status` builds/calls `epiphany-verse-query` and writes `local-verse-context.json` from `.epiphany-run\cultmesh\local-verse.ccmp` beside `status.json` and the operator snapshot. Use `cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-cultmesh-smoke`, `cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-cultmesh-status -- smoke --store .\.epiphany-smoke\cultmesh\operator-status.ccmp --runtime-id epiphany-cultmesh-status-smoke`, `cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-operator-snapshot -- smoke --store .\.epiphany-smoke\cultmesh\operator-snapshots.ccmp --runtime-id epiphany-operator-snapshot-smoke --snapshot-id smoke-status`, `cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-operator-run -- smoke --store .\.epiphany-smoke\cultmesh\operator-runs.ccmp --runtime-id epiphany-operator-run-smoke --run-id smoke-run`, `cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-verse-query -- smoke`, `cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-prompt-context-smoke`, and `.\tools\epiphany_local_run.ps1 -Mode status` for the focused proofs. Future local dream/status/Verse work should start from CultMesh, not raw CultNet, unless the task is polishing the CultMesh internals themselves. Preserve the three Verse tiers: `epiphany-internal` for private sub-agent typed state, `gamecult-local` for trusted LAN/Yggdrasil-tunnel GameCult sharing, and `epiphany-global` for untrusted public dreams plus topic-specific threaded public rooms for Face posts.
- CultMesh is now the preferred Rust abstraction for that local store work. The compile-time Rust substrate is repo-contained: `vendor/cultcache-rs`, `vendor/cultnet-rs`, and `vendor/cultmesh-rs`. The old `E:\Projects\CultLib\crates\*` dependency body is dead in this checkout and must not be revived by accident. Vendored CultCache reads/writes `cultcache.store.v1`, so `state/ledgers.msgpack` and `epiphany-state status` are aligned again. The first integrations are deliberately small: status, Verse policy, global room policy, organ contract policy, native operator status, native operator snapshots, local operator run intent/receipt round-trip, and imported `gjallar.affordance.v1` daemon affordance summaries through CultMesh. `notes/epiphany-verse-architecture.md` now names the local Verse/Odin/Yggdrasil architecture: Odin sees advertised Verse metadata without bypassing boundaries, Gjallar turns Odin sight into agent-ready affordances, Yggdrasil hosts important trusted GameCult Verses such as Bifrost, and prompt assembly should query compact local Verse plus semantic memory packets instead of carrying the whole archive. Role/reorient launch documents now have optional `dynamicPromptContext`; runtime prompt assembly consumes that field into worker instructions, `epiphany-prompt-context-smoke` proves a rendered Verse/memory packet is preserved on a role launch document, live bridge role/reorient launches now feed local Verse plus memory graph context from sibling `local-verse.ccmp` and `memory-graph.msgpack` stores beside runtime-spine, and if `EPIPHANY_GJALLAR_AFFORDANCE_STORE` points at a Gjallar store they import daemon affordances before rendering. The memory graph refreshes from current typed thread-state repo graphs when absent, so thin state remains visibly thin. Local-run status now has an operator read proof too: `tools/epiphany_local_run.ps1 -Mode status` builds/calls `epiphany-verse-query` and writes `local-verse-context.json` from `.epiphany-run\cultmesh\local-verse.ccmp` beside `status.json` and the operator snapshot; it auto-detects `E:\Projects\Odin\scratch\gjallar\gjallar.affordances.cc` when present. Use `cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-cultmesh-smoke`, `cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-cultmesh-status -- smoke --store .\.epiphany-smoke\cultmesh\operator-status.ccmp --runtime-id epiphany-cultmesh-status-smoke`, `cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-operator-snapshot -- smoke --store .\.epiphany-smoke\cultmesh\operator-snapshots.ccmp --runtime-id epiphany-operator-snapshot-smoke --snapshot-id smoke-status`, `cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-operator-run -- smoke --store .\.epiphany-smoke\cultmesh\operator-runs.ccmp --runtime-id epiphany-operator-run-smoke --run-id smoke-run`, `cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-verse-query -- smoke --gjallar-affordance-store E:\Projects\Odin\scratch\gjallar\gjallar.affordances.cc`, `cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-prompt-context-smoke`, and `.\tools\epiphany_local_run.ps1 -Mode status` for the focused proofs. Future local dream/status/Verse work should start from CultMesh, not raw CultNet, unless the task is polishing the CultMesh internals themselves. Preserve the three Verse tiers: `epiphany-internal` for private sub-agent typed state, `gamecult-local` for trusted LAN/Yggdrasil-tunnel GameCult sharing, and `epiphany-global` for untrusted public dreams plus topic-specific threaded public rooms for Face posts. MCP is not the native GameCult daemon control path; daemon discovery/inspection/control should travel through Odin, Gjallar, Eve/CultUI, CultMesh, CultNet, and provider-owned command receipts.
- `notes/codex-auth-spine-inventory.md` is the source-grounded keeper list for that reliquary. Corrected compliance invariant: Codex-compatible auth identity stays anchored in vendored Codex-derived auth machinery. `epiphany-openai-auth-spine` is now a thin Epiphany-named boundary over `codex-login`, not a clean-room clone of credential storage or token refresh. Codex apps, skills, marketplace, plugin UX, broad app-server workflow, and JSON-RPC sprawl remain cuttable because they are not subscription-auth legitimacy.
- Edge JSON is allowed for schema description, hostile ingress before immediate typed parsing, sealed forensic artifacts, or named quarantine experiments. When both subsystems are ours, runtime data must remain typed CultCache documents and move over CultNet typed contracts. Generic `serde_json::Value` in worker launch/result/selfPatch/runtime flow is contamination until classified and replaced.
- Hands now has a first executable action receipt spine plus a launchable branch-turn lane. `epiphany-core::hands_gateway` owns `HandsActionIntent`, `HandsActionReview`, `HandsPatchReceipt`, `HandsCommandReceipt`, and `HandsCommitReceipt`; runtime-spine can persist/reread them; `runtime_spine_persists_mind_gateway_review_receipts` includes the Hands chain beside Mind/Eyes/Substrate/Soul/Continuity proofs; `epiphany-hands-action-smoke` emits intent/review/patch/command/commit receipt ids from `.epiphany-smoke\runtime-spine\hands-action-smoke.msgpack`; and the repo-action launch proof profile now requires action intent, action review, and patch receipt together. Implementation is no longer a main-agent-only dead launch path: `implementation-branch-turn-worker` is owned by `epiphany-hands`, receives dynamic Proprioception/Verse context, gets a Substrate Gate mutation grant from the bridge, and its prompt/output schema require one task branch, at most one commit, branch/commit/changed-path/command evidence, and a Proprioception branch-map refresh request. `roleAccept` still refuses Implementation findings. Runtime completion now emits Hands intent/review/patch receipts from implementation results with `changedPaths`, emits a Hands commit receipt when `branchName` plus `commitSha` are present, and emits `HandsCommandReceipt` only from matching typed command-like tool invocation receipts with command plus exit-code proof. Hands receipt ids are projected into the typed Implementation result, and coordinator policy routes a completed Hands commit to Proprioception/modeling refresh until an accepted modeling result is newer than the commit; both the Codex bridge coordinator path and native `epiphany-mvp-status` compute that refresh-debt signal. Coordinator JSON/protocol, rendered MVP status, status smoke, CultMesh operator snapshots, and coordinator-run `coordinationGuards` now expose the debt as a first-class operator signal, including whether Implementation launch was suppressed for modeling refresh. The coordinator runner now maps `continueImplementation` into the Implementation role-launch/runtime path instead of stopping at the recommendation. Next hardening slice: run the non-ephemeral Hands branch-turn smoke, prove bounded branch/commit evidence appears, then prove the next coordinator/status pass routes to Proprioception/modeling refresh before another Hands turn.