From ece708b76fac9e06106a297095191ffc03666843 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Tue, 2 Jun 2026 14:12:10 +0100 Subject: [PATCH] Feed local Verse context into bridge launches --- epiphany-codex-bridge/src/coordinator.rs | 15 ++- epiphany-codex-bridge/src/launch.rs | 4 +- epiphany-codex-bridge/src/launch_context.rs | 117 ++++++++++++++++++ epiphany-codex-bridge/src/lib.rs | 1 + epiphany-codex-bridge/src/mutation_service.rs | 30 ++++- epiphany-codex-bridge/src/runtime_results.rs | 5 +- notes/epiphany-fork-implementation-plan.md | 2 +- notes/epiphany-verse-architecture.md | 10 +- notes/fresh-workspace-handoff.md | 2 +- state/ledgers.msgpack | Bin 173137 -> 173435 bytes state/map.yaml | 4 +- 11 files changed, 174 insertions(+), 16 deletions(-) create mode 100644 epiphany-codex-bridge/src/launch_context.rs diff --git a/epiphany-codex-bridge/src/coordinator.rs b/epiphany-codex-bridge/src/coordinator.rs index 9873b01d..5376b47f 100644 --- a/epiphany-codex-bridge/src/coordinator.rs +++ b/epiphany-codex-bridge/src/coordinator.rs @@ -1,9 +1,9 @@ use epiphany_core::EPIPHANY_IMAGINATION_OWNER_ROLE; use epiphany_core::EPIPHANY_IMAGINATION_ROLE_BINDING_ID; use epiphany_core::EPIPHANY_MODELING_ROLE_BINDING_ID; -use epiphany_core::EPIPHANY_RESEARCH_ROLE_BINDING_ID; use epiphany_core::EPIPHANY_REORIENT_LAUNCH_BINDING_ID; use epiphany_core::EPIPHANY_REORIENT_OWNER_ROLE; +use epiphany_core::EPIPHANY_RESEARCH_ROLE_BINDING_ID; use epiphany_core::EPIPHANY_VERIFICATION_ROLE_BINDING_ID; use epiphany_core::EpiphanyCoordinatorAutomationAction as CoreEpiphanyCoordinatorAutomationAction; use epiphany_core::EpiphanyCoordinatorDecision as CoreEpiphanyCoordinatorDecision; @@ -31,7 +31,7 @@ use epiphany_core::EpiphanyRoleBoardLane; use epiphany_core::EpiphanyRoleBoardPlanningSummary; use epiphany_core::EpiphanyRoleResultRoleId; use epiphany_core::EpiphanyTokenUsageSnapshot; -use epiphany_core::build_epiphany_reorient_launch_request; +use epiphany_core::build_epiphany_reorient_launch_request_with_dynamic_context; use epiphany_core::derive_coordinator_finding_signals; use epiphany_core::derive_coordinator_status; use epiphany_core::derive_role_board; @@ -43,6 +43,8 @@ use epiphany_core::select_coordinator_automation_action; use epiphany_state_model::EpiphanyRetrievalState; use epiphany_state_model::EpiphanyThreadState; +use crate::launch_context::render_launch_dynamic_prompt_context; +use crate::launch_context::reorient_launch_context_focus; use crate::pressure::derive_epiphany_pressure; use crate::reorient::EpiphanyFreshnessWatcherSnapshot; use crate::reorient::derive_epiphany_freshness_view; @@ -296,13 +298,20 @@ pub async fn select_epiphany_coordinator_automation( .investigation_checkpoint .as_ref() .map(|checkpoint| { - build_epiphany_reorient_launch_request( + let dynamic_prompt_context = render_launch_dynamic_prompt_context( + input.runtime_store_path, + input.state, + reorient_launch_context_focus(input.state, &reorient_decision.next_action), + ) + .ok(); + build_epiphany_reorient_launch_request_with_dynamic_context( input.thread_id, Some(input.state.revision), None, input.state, checkpoint, &reorient_decision, + dynamic_prompt_context, ) }), EpiphanyCoordinatorAutomationAction::None diff --git a/epiphany-codex-bridge/src/launch.rs b/epiphany-codex-bridge/src/launch.rs index 4f60e95f..a33505e6 100644 --- a/epiphany-codex-bridge/src/launch.rs +++ b/epiphany-codex-bridge/src/launch.rs @@ -8,10 +8,10 @@ pub use epiphany_core::EPIPHANY_IMAGINATION_OWNER_ROLE; pub use epiphany_core::EPIPHANY_IMAGINATION_ROLE_BINDING_ID; pub use epiphany_core::EPIPHANY_MODELING_OWNER_ROLE; pub use epiphany_core::EPIPHANY_MODELING_ROLE_BINDING_ID; -pub use epiphany_core::EPIPHANY_RESEARCH_OWNER_ROLE; -pub use epiphany_core::EPIPHANY_RESEARCH_ROLE_BINDING_ID; pub use epiphany_core::EPIPHANY_REORIENT_LAUNCH_BINDING_ID; pub use epiphany_core::EPIPHANY_REORIENT_OWNER_ROLE; +pub use epiphany_core::EPIPHANY_RESEARCH_OWNER_ROLE; +pub use epiphany_core::EPIPHANY_RESEARCH_ROLE_BINDING_ID; pub use epiphany_core::EPIPHANY_VERIFICATION_OWNER_ROLE; pub use epiphany_core::EPIPHANY_VERIFICATION_ROLE_BINDING_ID; pub use epiphany_core::EpiphanyCoordinatorPromptConfig; diff --git a/epiphany-codex-bridge/src/launch_context.rs b/epiphany-codex-bridge/src/launch_context.rs new file mode 100644 index 00000000..6111cf4c --- /dev/null +++ b/epiphany-codex-bridge/src/launch_context.rs @@ -0,0 +1,117 @@ +use chrono::SecondsFormat; +use chrono::Utc; +use epiphany_core::EpiphanyMemoryContextPacket; +use epiphany_core::EpiphanyPromptContextInput; +use epiphany_core::EpiphanyThreadState; +use epiphany_core::query_epiphany_local_verse_context; +use epiphany_core::render_epiphany_prompt_context; +use epiphany_core::seed_epiphany_local_verse_context; +use std::path::Path; +use std::path::PathBuf; + +pub const EPIPHANY_LOCAL_VERSE_RUNTIME_ID: &str = "epiphany-local"; + +pub fn local_verse_store_path(runtime_store_path: &Path) -> PathBuf { + runtime_store_path + .parent() + .unwrap_or_else(|| Path::new(".")) + .join("local-verse.ccmp") +} + +pub fn role_launch_context_focus(state: &EpiphanyThreadState, role_label: &str) -> String { + let objective = state + .objective + .as_deref() + .map(str::trim) + .filter(|objective| !objective.is_empty()) + .unwrap_or("Epiphany worker launch"); + format!("Launch `{role_label}` worker for: {objective}") +} + +pub fn reorient_launch_context_focus(state: &EpiphanyThreadState, next_action: &str) -> String { + let objective = state + .objective + .as_deref() + .map(str::trim) + .filter(|objective| !objective.is_empty()) + .unwrap_or("Epiphany reorientation"); + format!("Launch reorientation worker for: {objective}. Next action: {next_action}") +} + +pub fn render_launch_dynamic_prompt_context( + runtime_store_path: &Path, + state: &EpiphanyThreadState, + focus: String, +) -> Result { + let local_verse_store = local_verse_store_path(runtime_store_path); + seed_epiphany_local_verse_context( + &local_verse_store, + EPIPHANY_LOCAL_VERSE_RUNTIME_ID, + Utc::now().to_rfc3339_opts(SecondsFormat::Secs, true), + ) + .map_err(|error| { + format!( + "failed to seed local Verse context store {}: {error}", + local_verse_store.display() + ) + })?; + let local_verse = + query_epiphany_local_verse_context(&local_verse_store, EPIPHANY_LOCAL_VERSE_RUNTIME_ID) + .map_err(|error| { + format!( + "failed to query local Verse context store {}: {error}", + local_verse_store.display() + ) + })?; + let memory_context = EpiphanyMemoryContextPacket { + id: format!("memctx-launch-state-rev-{}", state.revision), + query_id: "bridge-launch-local-verse-only".to_string(), + warnings: vec![ + "Semantic memory graph context is not connected to this bridge launch path yet; this packet carries local Verse context only.".to_string(), + ], + ..Default::default() + }; + Ok(render_epiphany_prompt_context( + &EpiphanyPromptContextInput { + focus, + local_verse, + memory_context, + }, + )) +} + +#[cfg(test)] +mod tests { + use super::*; + use std::fs; + use uuid::Uuid; + + #[test] + fn launch_context_renders_local_verse_packet() -> anyhow::Result<()> { + let temp = + std::env::temp_dir().join(format!("epiphany-bridge-launch-context-{}", Uuid::new_v4())); + fs::create_dir_all(&temp)?; + let runtime_store = temp.join("runtime-spine.msgpack"); + let state = EpiphanyThreadState { + revision: 7, + objective: Some("Test launch context.".to_string()), + ..Default::default() + }; + + let rendered = render_launch_dynamic_prompt_context( + &runtime_store, + &state, + role_launch_context_focus(&state, "modeling"), + ) + .map_err(anyhow::Error::msg)?; + + assert!(rendered.contains("")); + assert!(rendered.contains("Test launch context.")); + assert!(rendered.contains("Odin")); + assert!(rendered.contains("Yggdrasil")); + assert!(rendered.contains("local Verse context only")); + assert!(local_verse_store_path(&runtime_store).exists()); + fs::remove_dir_all(&temp)?; + Ok(()) + } +} diff --git a/epiphany-codex-bridge/src/lib.rs b/epiphany-codex-bridge/src/lib.rs index cbe37e65..05717d56 100644 --- a/epiphany-codex-bridge/src/lib.rs +++ b/epiphany-codex-bridge/src/lib.rs @@ -25,6 +25,7 @@ pub mod error; pub mod invalidation; pub mod jobs; pub mod launch; +pub mod launch_context; pub mod mutation; pub mod mutation_service; pub mod pressure; diff --git a/epiphany-codex-bridge/src/mutation_service.rs b/epiphany-codex-bridge/src/mutation_service.rs index 02cc68a1..caaf9610 100644 --- a/epiphany-codex-bridge/src/mutation_service.rs +++ b/epiphany-codex-bridge/src/mutation_service.rs @@ -31,8 +31,8 @@ use epiphany_core::RuntimeSpineHeartbeatLaunchPlanOptions; use epiphany_core::SOUL_VERDICT_RECEIPT_TYPE; use epiphany_core::SUBSTRATE_GATE_REPO_ACCESS_GRANT_RECEIPT_TYPE; use epiphany_core::apply_epiphany_state_update; -use epiphany_core::build_epiphany_reorient_launch_request; -use epiphany_core::build_epiphany_role_launch_request; +use epiphany_core::build_epiphany_reorient_launch_request_with_dynamic_context; +use epiphany_core::build_epiphany_role_launch_request_with_dynamic_context; use epiphany_core::clear_epiphany_job_binding_backend; use epiphany_core::continuity_recovery_receipt_from_reorient_finding; use epiphany_core::epiphany_role_label; @@ -73,6 +73,9 @@ use crate::jobs::derive_epiphany_jobs; use crate::jobs::epiphany_blocked_state_job; use crate::jobs::map_interrupted_epiphany_job; use crate::jobs::map_launched_epiphany_job; +use crate::launch_context::render_launch_dynamic_prompt_context; +use crate::launch_context::reorient_launch_context_focus; +use crate::launch_context::role_launch_context_focus; use crate::mutation::build_reorient_acceptance_update; use crate::mutation::build_role_acceptance_update; use crate::mutation::epiphany_job_launch_changed_fields; @@ -698,12 +701,22 @@ pub async fn launch_thread_epiphany_role( .to_string(), ) })?; - let launch_request = build_epiphany_role_launch_request( + validate_expected_revision(expected_revision, state.revision)?; + let runtime_store_path = thread.epiphany_runtime_spine_store_path().await; + let role_label = epiphany_role_label(role_id); + let dynamic_prompt_context = render_launch_dynamic_prompt_context( + runtime_store_path.as_path(), + &state, + role_launch_context_focus(&state, role_label), + ) + .map_err(EpiphanyBridgeError::Fatal)?; + let launch_request = build_epiphany_role_launch_request_with_dynamic_context( thread_id, role_id, expected_revision, max_runtime_seconds, &state, + Some(dynamic_prompt_context), ) .map_err(EpiphanyBridgeError::InvalidRequest)?; launch_thread_epiphany_job( @@ -801,6 +814,7 @@ pub async fn launch_thread_epiphany_reorient( decision.note )) })?; + validate_expected_revision(expected_revision, state.revision)?; let checkpoint = state.investigation_checkpoint.as_ref().ok_or_else(|| { EpiphanyBridgeError::InvalidRequest(format!( "cannot launch a reorientation worker without a durable investigation checkpoint: {}", @@ -808,13 +822,21 @@ pub async fn launch_thread_epiphany_reorient( )) })?; - let launch_request = build_epiphany_reorient_launch_request( + let runtime_store_path = thread.epiphany_runtime_spine_store_path().await; + let dynamic_prompt_context = render_launch_dynamic_prompt_context( + runtime_store_path.as_path(), + state, + reorient_launch_context_focus(state, &decision.next_action), + ) + .map_err(EpiphanyBridgeError::Fatal)?; + let launch_request = build_epiphany_reorient_launch_request_with_dynamic_context( thread_id, expected_revision, max_runtime_seconds, state, checkpoint, &decision, + Some(dynamic_prompt_context), ); let changed_fields = epiphany_job_launch_changed_fields(); let launched = launch_epiphany_job_on_thread(thread, launch_request).await?; diff --git a/epiphany-codex-bridge/src/runtime_results.rs b/epiphany-codex-bridge/src/runtime_results.rs index 10382a57..6ec6a63d 100644 --- a/epiphany-codex-bridge/src/runtime_results.rs +++ b/epiphany-codex-bridge/src/runtime_results.rs @@ -492,7 +492,10 @@ pub fn load_launch_organ_contract_for_runtime_job( ))); } if request.organ_launch_contract.dependencies.is_empty() - || request.organ_launch_contract.receipt_proof_profiles.is_empty() + || request + .organ_launch_contract + .receipt_proof_profiles + .is_empty() { return Err(EpiphanyBridgeError::InvalidRequest(format!( "cannot accept runtime job {:?}: worker launch request has no organ dependency/proof-profile contract", diff --git a/notes/epiphany-fork-implementation-plan.md b/notes/epiphany-fork-implementation-plan.md index 66ca09ce..737ff845 100644 --- a/notes/epiphany-fork-implementation-plan.md +++ b/notes/epiphany-fork-implementation-plan.md @@ -87,7 +87,7 @@ The landed machine now has: - 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, and `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 -- first dynamic prompt launch handoff: role/reorient worker launch documents carry optional `dynamicPromptContext`, runtime prompt assembly consumes that field into worker instructions, and `epiphany-prompt-context-smoke` proves rendered Verse/memory context can ride a role launch document without admitting unrelated private-looking text +- 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, and live bridge role/reorient launch paths now feed local Verse context from a sibling `local-verse.ccmp` store while leaving semantic memory search as an explicit missing live input - 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 - live-specialist runner must be rebuilt around heartbeat/runtime-spine result receipts - first Phase 6 Aquarium operator shell extracted to sibling repo `E:\Projects\EpiphanyAquarium`, a Tauri v2 + React/WebGL client over the existing status bridge, dogfood artifacts, and GUI action artifacts, with its own distilled interface state/memory/doctrine plus durable checkpoint preparation, bounded status/coordinator artifact buttons, fixed modeling/verification/reorient launch and read-back buttons, and explicit review-gated reorient acceptance diff --git a/notes/epiphany-verse-architecture.md b/notes/epiphany-verse-architecture.md index d8c29bdf..e559771b 100644 --- a/notes/epiphany-verse-architecture.md +++ b/notes/epiphany-verse-architecture.md @@ -158,6 +158,12 @@ launch. Runtime prompt assembly reads that field and inserts it between the role-local instruction and the output contract, so dynamic Verse/memory context is executable worker input without becoming durable state authority. +The bridge launch path now feeds that field for live role/reorient launches. +It derives a sibling `local-verse.ccmp` CultMesh store from the runtime-spine +store path, seeds/queries the local Verse context, and renders it into +`dynamicPromptContext`. Semantic memory search is intentionally not claimed on +that path yet; the packet says when it is local-Verse-only. + ## Invariants - CultCache documents are the data. @@ -179,8 +185,8 @@ For swarm migration, the next useful chain is: 1. Keep `epiphany-verse-query` as the local Verse context smoke. 2. Add semantic memory graph query packets beside the Verse policy/status packet. -3. Feed `dynamicPromptContext` from the real coordinator/local-run launch path, - not only the smoke binary. +3. Add the real memory graph store input to bridge launch-context rendering so + live workers receive semantic context cuts, not only local Verse context. 4. Add a launch/runtime smoke that proves a persisted worker request includes relevant Verse/memory context and omits unrelated private sludge. 5. Move one Aquarium/local-run read path to the native Verse query before diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 6e93de51..cc0434d5 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -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 ` 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 ` 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, and `epiphany-prompt-context-smoke` proves a rendered Verse/memory packet is preserved on a role launch document. 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`, and `cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-prompt-context-smoke` 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, 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, and live bridge role/reorient launches now feed local Verse context from a sibling `local-verse.ccmp` store beside runtime-spine. Semantic memory search is still not connected to that live bridge launch path. 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`, and `cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-prompt-context-smoke` 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. - `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. - `notes/epiphany-swarm-readiness-plan.md` is the current live-fire direction gate. The local runner proves startup/status/coordinator wiring; it does not authorize unattended swarm operation. Carry VoidBot's lessons forward: one CTB-style initiative scheduler, typed pause/brake, active-turn freeze, cooldown after completion, stale active-turn recovery receipts, parent-side speech eligibility, memory lifecycle phases, and typed operation proposals instead of prompt-owned governance. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index 5f0bdbe6283c88b57ff9d2bd8ac9b813df3bc385..091abc05ed8ea07c12beaca6e6d69ee7d158ee4c 100644 GIT binary patch delta 305 zcmXw!y-EW?6ouU>18FSM*j%vQWwVM!+O&!mK}4&`%yoBg{+yXj+$x2I51@;+=mQ8T zM6edIv-D9Ujk6fxHV4lA&N*Knz13&$d64vXM#FrxTb#ackf)R7c5;~{Ki4g}X-V?Z z67u%2dG}i6#a^1nD<;Fve|s3V`roU4F+-R-!ArbfJd(k}(olKOW)2QDM+dyoR0($E zjIv>Dbik_s=TQL#FQ!uH5~N{NrZaRNGscvKaV^6E`U-q7E(V|%9KqE(2!*M)LSqJ# z3c*r#fdPbHGtQ1XNNTifpmWQZ;*d)4sA$v-6e{ByC>^!``1m~+4mk)N3`kmQRsmaA J{hJY6X1_$kZuS5G delta 43 zcmV+`0M!5c$_mlQ3a}Od4Kg}4GCD9fTE+kZqb{=}0dWBV_=A-Khm`^Wx0M0{yrE65 B4%Pqw diff --git a/state/map.yaml b/state/map.yaml index 12e17b4e..a45ea5e9 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -72,7 +72,7 @@ data_flow: active_subgoals: - Use `notes/epiphany-cultmesh-dreaming-roadmap.md` as the design authority for distributed Epiphany dreaming. Public dreams are separately authored typed documents distributed through CultMesh/CultNet; private state remains local and cannot be shared by flipping a visibility flag. Foreign dreams are external thought weather until a reviewed local adoption receipt digests them into memory, planning, doctrine, or governance. - CultMesh is now the preferred ergonomic Rust abstraction over CultCache and CultNet for Epiphany-owned local database surfaces. The Rust substrate is repo-contained under `vendor/cultcache-rs`, `vendor/cultnet-rs`, and `vendor/cultmesh-rs`; the old `E:\Projects\CultLib\crates\*` path is dead in this checkout and must not be reintroduced as a compile-time dependency. Future local Verse/dream/status work should start at CultMesh unless it is explicitly polishing CultMesh internals. Preserve the three-Verse boundary: `epiphany-internal` for private sub-agent typed state, `gamecult-local` for trusted LAN/Yggdrasil-tunnel GameCult project sharing, and `epiphany-global` for untrusted public dreams plus topic-specific threaded public rooms for Face posts. - - Use `notes/epiphany-verse-architecture.md` as the source note for local Verse/Odin/Yggdrasil prompt-context architecture. Odin is the all-seer discovery/coordinator surface for advertised Verse metadata, not a trust-boundary bypass. Yggdrasil is the hosted spine for important trusted GameCult Verses such as Bifrost. The first native local Verse query surface is `epiphany-verse-query`, which seeds/queries compact CultMesh policy/status/contract context for future dynamic prompt assembly; `epiphany-prompt-context-smoke` now proves that compact local Verse context plus a semantic memory graph context cut can render a bounded dynamic prompt packet, omit unrelated private-looking text, and preserve the packet inside a role worker launch document. + - Use `notes/epiphany-verse-architecture.md` as the source note for local Verse/Odin/Yggdrasil prompt-context architecture. Odin is the all-seer discovery/coordinator surface for advertised Verse metadata, not a trust-boundary bypass. Yggdrasil is the hosted spine for important trusted GameCult Verses such as Bifrost. The first native local Verse query surface is `epiphany-verse-query`, which seeds/queries compact CultMesh policy/status/contract context for dynamic prompt assembly; `epiphany-prompt-context-smoke` proves that compact local Verse context plus a semantic memory graph context cut can render a bounded dynamic prompt packet, omit unrelated private-looking text, and preserve the packet inside a role worker launch document. Live bridge role/reorient launch paths now feed `dynamicPromptContext` from a sibling `local-verse.ccmp` store; semantic memory search is still a named gap on that live path. - The active priority is Codex starvation and CultNet liberation. Use `notes/codex-starvation-and-cultnet-liberation-plan.md` as the directive and `notes/codex-auth-spine-inventory.md` as the source-grounded keeper list for the retained OpenAI subscription auth/model transport bridge. Classify all Epiphany-relevant JSON contamination, define the native CultNet runtime boundary, keep worker launch/result/selfPatch cargo as typed documents, evacuate Epiphany operator/state/process authority from Codex JSON-RPC, wrap MCP's unavoidable JSON protocol edge in typed Epiphany intent/result/receipt documents, and keep cutting until Epiphany can run its own state and processes without `codex_message_processor.rs` except for bridge compatibility. - Use `notes/epiphany-anatomy.md` as the canonical anatomy map. Embodied sub-agents are Self, Face, Imagination, Eyes, Proprioception, Hands, and Soul. Body is substrate, Mind is persistent state/state admission, Continuity is recovery/compaction/sleep protocol machinery, and Substrate Gate is substrate access protocol. - Organ state now has a hard profile split: resident Epiphany sub-agents use lean `work_organ` state, public/person-shaped agents use portable `persona` state, and heartbeat/swarm machinery owns scheduling/coordination physiology. Face is the Epiphany organ; Persona is the shared GameCult contract for Epiphany Face, VoidBot repo Faces, and Ghostlight characters. Persona documents carry provenance, required public presentation metadata, `date-time` timestamps, typed `candidateActions`, strict anchored thoughts with non-authoritative extensions, custom enum companion labels, and typed affect subrecords for bonds/status reads/doctrine stances. Work organs must not inherit Persona affect/social-bond/status-read machinery just because the old Ghostlight-derived shape had room for it. @@ -591,4 +591,4 @@ current_status: cargo and rejects modeling/planning/graph/checkpoint authority. MVP status and coordinator smokes pass with six lanes, and the smoke harness now rebuilds stale coordinator/app-server binaries before using them. - next_action: Wire dynamic Verse/memory prompt context into the real coordinator/local-run launch path after the smoke-proved launch-document handoff, then choose the next chain carefully: Hands action proof once implementation/action lanes become live versus collapsing Mind review/state mutation/commit into one storage-owner admission primitive. + next_action: Add real memory graph store input to live bridge launch-context rendering so role/reorient workers receive semantic context cuts, then choose the next chain carefully: Hands action proof once implementation/action lanes become live versus collapsing Mind review/state mutation/commit into one storage-owner admission primitive.