From 1107d8d1f53a9a6b5e0e878483ae5472751eb88a Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Tue, 12 May 2026 06:44:26 +0100 Subject: [PATCH] Delete Epiphany view wrapper relics --- .../src/bin/epiphany-phase6-planning-smoke.rs | 18 +- .../src/bin/epiphany-phase6-scene-smoke.rs | 10 +- epiphany-core/src/runtime_spine.rs | 8 +- notes/epiphany-current-algorithmic-map.md | 59 +- notes/fresh-workspace-handoff.md | 23 +- state/ledgers.msgpack | Bin 62199 -> 62606 bytes state/map.yaml | 26 +- .../codex_app_server_protocol.schemas.json | 7 - .../codex_app_server_protocol.v2.schemas.json | 7 - .../typescript/v2/ThreadEpiphanyJobsSource.ts | 5 - .../schema/typescript/v2/index.ts | 1 - .../src/protocol/common.rs | 596 ------------------ .../app-server-protocol/src/protocol/v2.rs | 84 --- vendor/codex/codex-rs/app-server/README.md | 2 +- .../app-server/src/codex_message_processor.rs | 299 --------- 15 files changed, 74 insertions(+), 1071 deletions(-) delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyJobsSource.ts diff --git a/epiphany-core/src/bin/epiphany-phase6-planning-smoke.rs b/epiphany-core/src/bin/epiphany-phase6-planning-smoke.rs index 85da5430..860f8c76 100644 --- a/epiphany-core/src/bin/epiphany-phase6-planning-smoke.rs +++ b/epiphany-core/src/bin/epiphany-phase6-planning-smoke.rs @@ -119,11 +119,14 @@ fn run_smoke(args: &Args) -> Result { .to_string(); let missing_notification_start = client.notification_len(); - let missing_response = client.send( - "thread/epiphany/planning", - Some(json!({"threadId": thread_id})), + let missing_view = client.send( + "thread/epiphany/view", + Some(json!({"threadId": thread_id, "lenses": ["planning"]})), true, )?; + let missing_response = missing_view + .get("planning") + .ok_or_else(|| anyhow!("view response missing planning lens"))?; require( missing_response.get("threadId").and_then(Value::as_str) == Some(&thread_id), "planning response should echo thread id", @@ -165,11 +168,14 @@ fn run_smoke(args: &Args) -> Result { )?; let planning_notification_start = client.notification_len(); - let ready_response = client.send( - "thread/epiphany/planning", - Some(json!({"threadId": thread_id})), + let ready_view = client.send( + "thread/epiphany/view", + Some(json!({"threadId": thread_id, "lenses": ["planning"]})), true, )?; + let ready_response = ready_view + .get("planning") + .ok_or_else(|| anyhow!("view response missing planning lens"))?; assert_ready_planning(&ready_response)?; client.require_no_notification( "thread/epiphany/stateUpdated", diff --git a/epiphany-core/src/bin/epiphany-phase6-scene-smoke.rs b/epiphany-core/src/bin/epiphany-phase6-scene-smoke.rs index 4a072742..403ab7fe 100644 --- a/epiphany-core/src/bin/epiphany-phase6-scene-smoke.rs +++ b/epiphany-core/src/bin/epiphany-phase6-scene-smoke.rs @@ -117,8 +117,8 @@ fn run_smoke(args: &Args) -> Result { .to_string(); let missing_response = client.send( - "thread/epiphany/scene", - Some(json!({"threadId": thread_id})), + "thread/epiphany/view", + Some(json!({"threadId": thread_id, "lenses": ["scene"]})), true, )?; assert_missing_scene(&missing_response["scene"])?; @@ -184,8 +184,8 @@ fn run_smoke(args: &Args) -> Result { let scene_notification_start = client.notification_len(); let ready_response = client.send( - "thread/epiphany/scene", - Some(json!({"threadId": thread_id})), + "thread/epiphany/view", + Some(json!({"threadId": thread_id, "lenses": ["scene"]})), true, )?; require( @@ -300,7 +300,7 @@ fn initial_scene_patch() -> Value { "invariants": [ { "id": "inv-scene-read-only", - "description": "thread/epiphany/scene must not mutate Epiphany state.", + "description": "thread/epiphany/view scene lens must not mutate Epiphany state.", "status": "ok" }, { diff --git a/epiphany-core/src/runtime_spine.rs b/epiphany-core/src/runtime_spine.rs index a7309d7b..a22c6711 100644 --- a/epiphany-core/src/runtime_spine.rs +++ b/epiphany-core/src/runtime_spine.rs @@ -990,7 +990,7 @@ fn epiphany_mutation_contracts() -> Vec { SURFACE_SCENE_TYPE, SCENE_SURFACE_SCHEMA_VERSION, vec![ - "Operator-safe scene reflection mirrored from thread/epiphany/scene.", + "Operator-safe scene reflection mirrored from the thread/epiphany/view scene lens.", "Aquarium should read this before offering live coordination actions.", ], ), @@ -1059,7 +1059,7 @@ fn epiphany_mutation_contracts() -> Vec { ], vec!["epiphany.swarm_control_receipt.v0"], vec![ - "Job reflection and launch/interrupt affordances mirrored from thread/epiphany/jobs, jobLaunch, and jobInterrupt.", + "Job reflection mirrored from the thread/epiphany/view jobs lens, with launch/interrupt affordances on jobLaunch and jobInterrupt.", "Heartbeat/runtime-spine owns activation; callers submit typed intents and watch receipts.", ], ), @@ -1069,7 +1069,7 @@ fn epiphany_mutation_contracts() -> Vec { vec!["epiphany.role_launch_intent.v0"], vec!["epiphany.swarm_control_receipt.v0"], vec![ - "Role ownership and launch affordances mirrored from thread/epiphany/roles and roleLaunch.", + "Role ownership mirrored from the thread/epiphany/view roles lens, with launch affordances on roleLaunch.", "Treat this as the discoverable lane catalog for Aquarium.", ], ), @@ -1101,7 +1101,7 @@ fn epiphany_mutation_contracts() -> Vec { ], vec!["epiphany.swarm_control_receipt.v0"], vec![ - "Planning projection is mirrored from thread/epiphany/planning.", + "Planning projection is mirrored from the thread/epiphany/view planning lens.", "Backlog, captures, and Objective Drafts are planning state until explicit adoption.", ], ), diff --git a/notes/epiphany-current-algorithmic-map.md b/notes/epiphany-current-algorithmic-map.md index c3318e71..8c8e70ab 100644 --- a/notes/epiphany-current-algorithmic-map.md +++ b/notes/epiphany-current-algorithmic-map.md @@ -22,20 +22,20 @@ The spine exists in more than twenty-five live paths: - explicit promotion gates: app-server routes `thread/epiphany/promote` through a loaded-thread handler into `epiphany-core` policy evaluation, rejects failed verifier evidence without mutation, applies accepted candidates through the same durable update path, and now treats medium/high/expanded/broadening/semantic churn deltas as needing explicit rationale plus stronger verifier evidence whose kind is token-matched rather than substring-matched; the same gate also validates durable investigation-checkpoint packets, including linked evidence ids, before they can be inked into state in [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:4501) and [promotion.rs](E:/Projects/EpiphanyAgent/epiphany-core/src/promotion.rs:33). - explicit state updates: app-server routes `thread/epiphany/update` through a loaded `CodexThread` update method that rejects malformed appended observation/evidence graph records and structurally invalid replacement fields, including investigation checkpoints that cite missing evidence and planning records with broken ids/source refs/backlog links/draft acceptance criteria, mutates live `SessionState` only after validation, bumps the revision, and persists an immediate `RolloutItem::EpiphanyState` snapshot in [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:4620), [codex_thread.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/core/src/codex_thread.rs:376), [codex_thread.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/core/src/codex_thread.rs:552), [codex_thread.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/core/src/codex_thread.rs:1294), and [promotion.rs](E:/Projects/EpiphanyAgent/epiphany-core/src/promotion.rs:44). - live state notifications and write responses: app-server declares experimental `thread/epiphany/stateUpdated` and emits it with the updated typed state, typed `source`, event-level `revision`, and typed `changedFields` after successful direct updates and accepted promotions, but not after rejected promotions; direct `thread/epiphany/update` and accepted `thread/epiphany/promote` responses expose the same revision/change metadata, accepted promotions always report `Evidence` because verifier evidence is appended even when the patch evidence list is empty, and successful write response/notification states now use the same client-visible live projection as `thread/read`, including retrieval-summary backfill when durable state has no persisted retrieval metadata, in [common.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server-protocol/src/protocol/common.rs:1113), [v2.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server-protocol/src/protocol/v2.rs:4354), [v2.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server-protocol/src/protocol/v2.rs:4419), [v2.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server-protocol/src/protocol/v2.rs:4428), [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:4555), [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:4608), [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:4652), [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:4693), [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:11327), and [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:11370). -- scene projection: app-server declares experimental read-only `thread/epiphany/scene`, reads the same live/stored Epiphany state view used by `thread/read`, and derives a compact client scene with objective, active subgoal, invariant status counts, graph focus/counts, retrieval status, investigation-checkpoint summary counts, observation/evidence summaries, churn, live/stored source, and available control-plane actions without mutating or persisting state in [common.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server-protocol/src/protocol/common.rs:340), [v2.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server-protocol/src/protocol/v2.rs:3924), [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:4115), and [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:10757). -- job/progress reflection: app-server declares experimental read-only `thread/epiphany/jobs`, reads the same thread view as scene, optionally fills retrieval state for loaded threads with no Epiphany state, and derives four non-authoritative progress slots for retrieval indexing, graph remap, invariant verification, and specialist work. Durable `job_bindings` now act as a thin Epiphany-owned launcher seam with launcher id, authority scope, backend kind, and backend job id. New bindings use the `heartbeat` backend and app-server opens matching typed runtime-spine job receipts under `state/runtime-spine.msgpack`; old `agent_jobs` bindings are sealed instead of live-crawled. +- scene projection: the `scene` view lens reads the same live/stored Epiphany state view used by `thread/read` and derives a compact client scene with objective, active subgoal, invariant status counts, graph focus/counts, retrieval status, investigation-checkpoint summary counts, observation/evidence summaries, churn, live/stored source, and available control-plane actions without mutating or persisting state. +- job/progress reflection: the `jobs` view lens reads the same thread view as scene, optionally fills retrieval state for loaded threads with no Epiphany state, and derives non-authoritative progress slots for retrieval indexing, graph remap, invariant verification, and bound specialist work. Durable `job_bindings` now act as a thin Epiphany-owned launcher seam with launcher id, authority scope, and backend job id. New bindings open matching typed runtime-spine job receipts under `state/runtime-spine.msgpack`; old `agent_jobs` bindings are sealed instead of live-crawled. - bound-job progress notifications: app-server still declares experimental `thread/epiphany/jobsUpdated` as sealed legacy Codex evacuation telemetry, but the handler no longer emits Epiphany updates from old `agent_job_progress:{json}` background events. Heartbeat-owned activation and typed runtime-spine receipts are now the live Epiphany path. - explicit job control: app-server declares experimental `thread/epiphany/jobLaunch` and `thread/epiphany/jobInterrupt`, routes them through core launch/interrupt handlers that persist heartbeat-backed durable `job_bindings` revisions through the authoritative Epiphany state path, and emit `thread/epiphany/stateUpdated` with source `jobLaunch` or `jobInterrupt` instead of creating SQLite `agent_jobs` rows or pretending jobs reflection is the scheduler. -- freshness reflection: app-server declares experimental read-only `thread/epiphany/freshness`, reads the same live/stored thread view used by scene/jobs/context, fills live retrieval state for loaded threads, and derives one bounded retrieval/graph freshness lens plus, for loaded threads, watcher-backed invalidation inputs with watched root, changed paths, mapped graph-node hits, active-frontier hits, and revision/source identity without mutating, scheduling, notifying, or performing automatic semantic invalidation in [common.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server-protocol/src/protocol/common.rs:350), [v2.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server-protocol/src/protocol/v2.rs:4167), [v2.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server-protocol/src/protocol/v2.rs:4259), [epiphany_invalidation.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/epiphany_invalidation.rs:19), [epiphany_invalidation.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/epiphany_invalidation.rs:67), [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:4219), and [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:11073). -- targeted context reflection: app-server declares experimental read-only `thread/epiphany/context`, reads the same live/stored Epiphany state view used by scene/jobs, and derives a bounded state shard containing selected graph nodes/edges, links, active frontier, checkpoint, the full durable investigation-checkpoint packet, observations, direct evidence, linked evidence, and missing requested ids without retrieval, proposal, promotion, notification, mutation, or persistence in [common.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server-protocol/src/protocol/common.rs:355), [v2.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server-protocol/src/protocol/v2.rs:4253), [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:4261), and [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:11152). +- freshness reflection: app-server declares experimental read-only `thread/epiphany/freshness`, reads the same live/stored thread view used by the view lenses and context, fills live retrieval state for loaded threads, and derives one bounded retrieval/graph freshness lens plus, for loaded threads, watcher-backed invalidation inputs with watched root, changed paths, mapped graph-node hits, active-frontier hits, and revision/source identity without mutating, scheduling, notifying, or performing automatic semantic invalidation in [common.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server-protocol/src/protocol/common.rs:350), [v2.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server-protocol/src/protocol/v2.rs:4167), [v2.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server-protocol/src/protocol/v2.rs:4259), [epiphany_invalidation.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/epiphany_invalidation.rs:19), [epiphany_invalidation.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/epiphany_invalidation.rs:67), [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:4219), and [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:11073). +- targeted context reflection: app-server declares experimental read-only `thread/epiphany/context`, reads the same live/stored Epiphany state view used by the view lenses, and derives a bounded state shard containing selected graph nodes/edges, links, active frontier, checkpoint, the full durable investigation-checkpoint packet, observations, direct evidence, linked evidence, and missing requested ids without retrieval, proposal, promotion, notification, mutation, or persistence in [common.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server-protocol/src/protocol/common.rs:355), [v2.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server-protocol/src/protocol/v2.rs:4253), [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:4261), and [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:11152). - graph traversal reflection: app-server declares experimental read-only `thread/epiphany/graphQuery`, reads the same live Epiphany state view used by context, and derives explicit node/edge lookup, path/symbol matches, bounded neighbors, edge-kind matches, and frontier neighborhoods with architecture/dataflow links plus frontier/checkpoint identity, matched selectors, and missing ids without retrieval, proposal, promotion, indexing, notification, mutation, or scheduling in [common.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server-protocol/src/protocol/common.rs:379), [v2.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server-protocol/src/protocol/v2.rs:4720), [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:5060), and [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:15201). -- planning reflection: app-server declares experimental read-only `thread/epiphany/planning`, reads the same live/stored Epiphany state view, and returns typed captures, backlog items, roadmap streams, Objective Drafts, GitHub source refs, count summaries, and the separate active objective without adopting drafts, launching work, notifying, mutating, or scheduling in [common.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server-protocol/src/protocol/common.rs:385), [v2.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server-protocol/src/protocol/v2.rs:4681), [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:5353), and [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:16295). +- planning reflection: the `planning` view lens reads the same live/stored Epiphany state view and returns typed captures, backlog items, roadmap streams, Objective Drafts, GitHub source refs, count summaries, and the separate active objective without adopting drafts, launching work, notifying, mutating, or scheduling. - canonical view lens reflection: app-server declares experimental read-only `thread/epiphany/view` with selectable lenses and uses it as the canonical operator read surface for pressure, reorient, CRRC, and coordinator projections. Those projections no longer have standalone protocol verbs; the separate `reorientLaunch`, `reorientResult`, and `reorientAccept` surfaces remain because they carry authority, result read-back, and review acceptance rather than mere reflection. - context-pressure reflection: core token telemetry carries `model_auto_compact_token_limit` beside total/last usage and `model_context_window`; the `pressure` view lens reads live token usage or the latest stored rollout `TokenCount`, derives current context pressure from `last_token_usage` rather than cumulative thread spend, treats cumulative-only telemetry as unknown, and raises `shouldPrepareCompaction` at 80% of the active auto-compact/context limit without mutating Epiphany state or scheduling compaction in [protocol.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/protocol/src/protocol.rs:2237), [turn_context.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/core/src/session/turn_context.rs:103), [session/mod.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/core/src/session/mod.rs:2716), [common.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server-protocol/src/protocol/common.rs:360), [v2.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server-protocol/src/protocol/v2.rs:4361), [token_usage_replay.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor/token_usage_replay.rs:75), [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:4306), and [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:11028). - pre-compaction checkpoint intervention: app-server `TokenCount` handling now checks the same pressure mapper, and for loaded Epiphany threads crossing `shouldPrepareCompaction` it steers the active turn once with a bounded CRRC checkpoint directive to bank working context before compaction/reorientation. The per-turn dedupe bit and the pending compact handoff live in listener `ThreadState`; successful steering marks the active turn for a forced compact action at clean turn completion, while aborted turns clear the handoff. The intervention uses existing turn steering and turn-boundary automation rather than a new scheduler in [bespoke_event_handling.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/bespoke_event_handling.rs:1467), [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:15405), and [thread_state.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/thread_state.rs:144). - reorientation policy: the `reorient` view lens reuses the same live/stored thread view plus mapped pressure/freshness/watcher signals, and derives a bounded `resume`/`regather` verdict with checkpoint-path/frontier reasons without mutating, compacting, scheduling, notifying, or continuing work in [v2.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server-protocol/src/protocol/v2.rs:4514), [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:4394), and [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:11424). - CRRC coordinator recommendation: the `crrc` view lens reuses the same pressure/freshness/watcher/reorientation mapping plus the fixed `reorient-worker` binding and result read-back helper, recognizes already accepted reorientation findings so an accepted result is not recommended for acceptance again, and returns one bounded recommendation such as continue, prepare checkpoint, launch worker, wait, review, accept, or regather manually without mutating, launching, accepting, compacting, notifying, scheduling, or silently continuing work in [v2.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server-protocol/src/protocol/v2.rs:4661), and [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:4546). -- role ownership projection: app-server declares experimental read-only `thread/epiphany/roles`, reuses the same state/jobs/pressure/reorient/result/CRRC signals as the coordinator loop, and projects implementation, Imagination/planning, modeling/checkpoint, verification/review, and reorientation lanes with owner roles, status, linked jobs, authority scopes, and recommended scene actions without launching, scheduling, accepting, compacting, notifying, or mutating state in [common.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server-protocol/src/protocol/common.rs:350), [v2.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server-protocol/src/protocol/v2.rs:4161), and [codex_message_processor.rs](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs:4310). +- role ownership projection: the `roles` view lens reuses the same state/jobs/pressure/reorient/result/CRRC signals as the coordinator loop, and projects implementation, Imagination/planning, modeling/checkpoint, verification/review, and reorientation lanes with owner roles, status, linked jobs, authority scopes, and recommended scene actions without launching, scheduling, accepting, compacting, notifying, or mutating state. - role specialist launch/read-back/acceptance: app-server declares experimental `thread/epiphany/roleLaunch`, read-only `thread/epiphany/roleResult`, and write-gated `thread/epiphany/roleAccept`. `roleLaunch` accepts fixed Imagination/planning, modeling/checkpoint, and verification/review role ids, builds bounded specialist payloads from authoritative Epiphany state, routes them through the heartbeat-backed `epiphany_launch_job` seam, opens a typed runtime-spine job receipt, and emits the normal `jobLaunch` state update for `jobBindings` only. `roleResult` resolves heartbeat bindings through typed runtime-spine job results and seals legacy `agent_jobs` bindings, projecting structured output as a reviewable finding with verdict, summary, next safe move, inspected files, frontier/evidence ids, optional `statePatch`, optional `selfPatch`, coordinator `selfPersistence` review, raw result, and errors without mutation, promotion, scheduling, or hidden continuation. `selfPatch` is a Ghostlight-shaped lane-memory request, not project truth: the coordinator accepts only role-matched, bounded, evidence-grounded memory/goal/value/private-note mutations and refuses objectives, graphs, checkpoints, scratch, planning, jobs, authority, code edits, or raw transcripts with reasons. `roleAccept` accepts completed heartbeat findings from typed runtime-spine results, accepts completed Imagination findings only when they contain a valid planning-only patch with draft Objective Draft review gates, accepts completed modeling/checkpoint findings only with a modeling-safe `statePatch`, applies accepted project patches through the existing Epiphany state validator, appends audit observation/evidence, and carries the same `selfPersistence` review. GUI/coordinator accept paths then apply accepted `selfPatch` requests to typed CultCache role dossiers in `state/agents.msgpack` through the native `epiphany-agent-memory-store` binary. Implementation stays owned by the main coding agent, verification output remains review-only, and reorientation stays on the CRRC-specific `reorientLaunch` / `reorientResult` / `reorientAccept` path. - shared prompt memory projection and role dossiers: the prompt config now carries `[shared].persistent_memory` in [epiphany_specialists.toml](E:/Projects/EpiphanyAgent/vendor/codex/codex-rs/app-server/src/prompts/epiphany_specialists.toml:2). App-server parses that block, prepends it through `epiphany_agent_prompt_with_memory`, and therefore projects the same Ghostlight-derived memory into fixed role specialist instructions, reorientation-worker instructions, coordinator notes, and CRRC checkpoint steering. The base `` doctrine reinforces the Perfect Machine rule through [prompt.rs](E:/Projects/EpiphanyAgent/epiphany-core/src/prompt.rs:31) and [epiphany_doctrine.md](E:/Projects/EpiphanyAgent/epiphany-core/src/prompts/epiphany_doctrine.md:1). Individual Ghostlight-shaped role dossiers now live in typed CultCache `state/agents.msgpack`, and the native `epiphany-agent-memory-store` binary validates, reviews, and applies bounded self-memory patches through the Rust store. - fixed-lane coordinator: the `coordinator` view lens composes role, pressure, reorient, CRRC, role result, and reorient result signals, and returns one current action without mutation. Review acceptance and implementation clearance are intentionally different: an accepted verification finding clears implementation only when the verifier verdict is `pass`; accepted `needs-evidence`, `needs-review`, or `fail` findings route back toward modeling/checkpoint strengthening before code work resumes. `regatherManually` is now fallback, not a supervisor-puppeteering excuse: completed unaccepted modeling findings stop at `reviewModelingResult`, modeling acceptance precedes verification, and fixed lane actions are considered before manual regather. @@ -80,9 +80,9 @@ flowchart TD O --> P["Backfill retrieval summary if missing"] P --> N N --> Q["Client can read typed state"] - N --> QS["thread/epiphany/scene derives compact client scene"] + N --> QS["view.scene derives compact client scene"] QS --> Q - N --> QJ["thread/epiphany/jobs derives progress slots"] + N --> QJ["view.jobs derives progress slots"] QJ --> Q N --> QF["thread/epiphany/freshness derives freshness lens + watcher invalidation inputs"] QF --> Q @@ -90,7 +90,7 @@ flowchart TD QC --> Q N --> QG["thread/epiphany/graphQuery traverses graph neighborhoods"] QG --> Q - N --> QPLAN["thread/epiphany/planning projects captures/backlog/drafts"] + N --> QPLAN["view.planning projects captures/backlog/drafts"] QPLAN --> Q N --> QVIEW["thread/epiphany/view selects read lenses"] QVIEW --> Q @@ -959,13 +959,14 @@ Rejected promotions return reasons and no state. Accepted promotions return the Promotion is a gate, not independent persistence. It does not write rollout items directly, it does not mutate state on rejection, and rejected promotions emit no state update notification. Accepted promotions still go through `CodexThread.epiphany_update_state`, so the red pen remains one tool, not three tools in a coat. -## Flow 13: Scene Projection Control Flow +## Flow 13: Scene View Lens Control Flow ### Input -A client sends experimental `thread/epiphany/scene` with: +A client sends experimental `thread/epiphany/view` with: - `threadId` +- `lenses: ["scene"]` ### Plain-language role @@ -976,6 +977,7 @@ The important boundary is that it derives from the same Epiphany state view as ` Protocol shape: - `threadId` +- `lenses` Response shape: @@ -1004,13 +1006,14 @@ Code refs: ### Mechanism -The app-server handler: +The view handler: 1. parses the thread id. -2. checks whether the thread is currently loaded so the scene can report live/stored source and available actions. -3. calls the existing `read_thread_view(..., include_turns: false)` path, which already applies live Epiphany state or stored rollout reconstruction. -4. passes the optional `thread.epiphany_state` into `map_epiphany_scene`. -5. returns a compact derived scene. +2. selects the `scene` lens. +3. checks whether the thread is currently loaded so the scene can report live/stored source and available actions. +4. calls the existing `read_thread_view(..., include_turns: false)` path, which already applies live Epiphany state or stored rollout reconstruction. +5. passes the optional `thread.epiphany_state` into `map_epiphany_scene`. +6. returns a compact derived scene under the view response. `map_epiphany_scene`: @@ -1033,13 +1036,14 @@ The response is a client-shaped reflection of the current Epiphany machine. It l Scene projection is read-only. It is allowed to compress and label the authoritative state for humans and clients, but it must not become the place where understanding is manufactured. A dashboard is allowed to exist. It is not allowed to grab the steering wheel and call itself destiny. -## Flow 14: Job/Progress Reflection Control Flow +## Flow 14: Job/Progress View Lens Control Flow ### Input -A client sends experimental `thread/epiphany/jobs` with: +A client sends experimental `thread/epiphany/view` with: - `threadId` +- `lenses: ["jobs"]` ### Plain-language role @@ -1057,11 +1061,11 @@ The important boundary is that these are reflections over existing state. Retrie Protocol shape: - `threadId` +- `lenses` Response shape: - `threadId` -- `source` - optional `stateRevision` - `jobs` - `id` @@ -1070,7 +1074,6 @@ Response shape: - `ownerRole` - optional `launcherJobId` - optional `authorityScope` -- optional `backendKind` - optional `backendJobId` - `status` - optional `itemsProcessed` @@ -1092,15 +1095,13 @@ Code refs: ### Mechanism -The app-server handler: +The view handler: 1. parses the thread id. -2. checks whether the thread is loaded so the response can report live/stored source. +2. selects the `jobs` lens. 3. calls `read_thread_view(..., include_turns: false)` to reuse the live/stored Epiphany projection path. 4. if the thread is loaded and no Epiphany retrieval summary is present, asks the loaded thread for retrieval state so the index slot can still be honest before typed Epiphany state exists. -5. returns `stateRevision` only when authoritative Epiphany state exists. -6. opens a live runtime state-db seam from the loaded thread when possible and falls back to direct state-runtime lookup for read-only agent-job resolution. -7. passes the optional state, optional retrieval override, and optional runtime job snapshots into `map_epiphany_jobs`. +5. passes the optional state and optional retrieval override into `map_epiphany_jobs`. `map_epiphany_jobs`: @@ -1111,7 +1112,7 @@ The app-server handler: ### Output -The response is a typed progress board derived from the current Epiphany machine. The jobs projection reflects retrieval while graph/remap and verification stay blocked when state is missing, ready-state jobs expose revision identity and launcher metadata, runtime-linked specialist bindings project as pending runtime turns, no placeholder specialist row is fabricated, no `thread/epiphany/stateUpdated` or `thread/epiphany/jobsUpdated` notification is emitted by the read, and final thread state revision does not change. +The response is a typed progress board under the view response, derived from the current Epiphany machine. The jobs projection reflects retrieval while graph/remap and verification stay blocked when state is missing, ready-state jobs expose launcher metadata, runtime-linked specialist bindings project as pending runtime turns, no placeholder specialist row is fabricated, no `thread/epiphany/stateUpdated` or `thread/epiphany/jobsUpdated` notification is emitted by the read, and final thread state revision does not change. ### Invariant @@ -1473,7 +1474,7 @@ stored Epiphany state -> successful writes emit thread/epiphany/stateUpdated ``` -The current remaining missing organ is not the red pen, not the first chewing motion, not the first state-change bell, not the first client-shaped scene, not the first job/progress reflection, not the first freshness lens, not the first watcher-backed invalidation read, not the first targeted graph/evidence context read, not the first bounded graph traversal read, not the first planning projection, not the first context-pressure gauge, not the first durable investigation checkpoint packet, not the first bounded reorientation verdict, not the first thin launcher seam, not the first explicit launch/interrupt authority surface over that seam, not the first runtime consumer that can act on the reorientation verdict without becoming a hidden tyrant, not the first read-back surface for that worker's findings, not the first explicit acceptance write for completed findings, not the first read-only CRRC coordinator recommendation, not the first role ownership board, not the first fixed role specialist launch/read-back templates, not the first review-gated modeling statePatch acceptance path, not the first planning synthesis lane, and no longer the first dogfood-facing operator view over the landed loop. Those exist. Proposal now has the first bits of map memory, focus, and selection hygiene: it can auto-select a bounded evidence-backed observation cluster when ids are omitted, requires accepting recent evidence behind selected observations, prioritizes stronger selected observations for proposal wording, reuses existing architecture nodes by concrete code-ref/path/id checks before creating new path nodes, can rescue unanchored graph nodes through strict unique semantic overlap, follows graph links and incident edges into the frontier, and reports match-kind-aware churn pressure from the actual proposal shape. Distillation now also has the first source-output-aware teeth for tool/model summaries. Promotion now notices risky deltas instead of just checking the shape of the envelope, treats graph expansion as risky even if the patch tries to mumble "low pressure" while dragging a new wall into the blueprint, token-matches strong verifier kinds so `contest` cannot sneak past as `test`, and validates investigation checkpoints against known evidence before the packet can be inked. Successful update/promote writes now emit `thread/epiphany/stateUpdated` with `source: "update"` or `source: "promote"`, event-level revision, and typed changed fields so clients no longer need to poll blindly, infer the cause from timing, or diff the whole state to know which top-level sections moved. Bound jobs reflect launcher id, authority scope, and backend kind/job id instead of treating raw runtime pointers as the architecture; stale `agent_jobs` bindings are sealed rather than live-crawled. `jobLaunch` / `jobInterrupt` can create or tear down those bindings without pretending reflection is authority, `reorientLaunch` can launch one fixed `reorient-worker` job from the checkpoint verdict without turning the verdict itself into a writer, `reorientResult` can read the worker's structured output back as a reviewable finding without promoting it, `reorientAccept` can explicitly bank a completed finding into typed observation/evidence plus optional scratch/checkpoint state, `roleLaunch` can launch fixed Imagination/planning, modeling/checkpoint, and verification/review specialists over that same bounded seam, `roleResult` can read their structured outputs back without mutation, `roleAccept` can apply reviewed Imagination planning patches and reviewed modeling graph/checkpoint patches through the normal state validator, and `crrc` can recommend the next explicit action over that loop without doing the action itself. The scene, jobs, roles, role-result, role-accept, freshness, context, graphQuery, planning, pressure, reorient, crrc, reorient-result, and MVP status surfaces give clients compact or bounded views without making the GUI/client authoritative. The remaining missing organs are automatic graph invalidation, scheduler automation if dogfood proves it is needed, and richer product ergonomics after the MVP loop has been tested by a human. GitHub Issues import is a future adapter, but it is deliberately deferred until the backlog source is fresh enough to be worth importing. +The current remaining missing organ is not the red pen, not the first chewing motion, not the first state-change bell, not the first client-shaped scene lens, not the first job/progress lens, not the first freshness surface, not the first watcher-backed invalidation read, not the first targeted graph/evidence context read, not the first bounded graph traversal read, not the first planning lens, not the first context-pressure gauge, not the first durable investigation checkpoint packet, not the first bounded reorientation verdict, not the first thin launcher seam, not the first explicit launch/interrupt authority surface over that seam, not the first runtime consumer that can act on the reorientation verdict without becoming a hidden tyrant, not the first read-back surface for that worker's findings, not the first explicit acceptance write for completed findings, not the first read-only CRRC coordinator recommendation, not the first role ownership lens, not the first fixed role specialist launch/read-back templates, not the first review-gated modeling statePatch acceptance path, not the first planning synthesis lane, and no longer the first dogfood-facing operator view over the landed loop. Those exist. Proposal now has the first bits of map memory, focus, and selection hygiene: it can auto-select a bounded evidence-backed observation cluster when ids are omitted, requires accepting recent evidence behind selected observations, prioritizes stronger selected observations for proposal wording, reuses existing architecture nodes by concrete code-ref/path/id checks before creating new path nodes, can rescue unanchored graph nodes through strict unique semantic overlap, follows graph links and incident edges into the frontier, and reports match-kind-aware churn pressure from the actual proposal shape. Distillation now also has the first source-output-aware teeth for tool/model summaries. Promotion now notices risky deltas instead of just checking the shape of the envelope, treats graph expansion as risky even if the patch tries to mumble "low pressure" while dragging a new wall into the blueprint, token-matches strong verifier kinds so `contest` cannot sneak past as `test`, and validates investigation checkpoints against known evidence before the packet can be inked. Successful update/promote writes now emit `thread/epiphany/stateUpdated` with `source: "update"` or `source: "promote"`, event-level revision, and typed changed fields so clients no longer need to poll blindly, infer the cause from timing, or diff the whole state to know which top-level sections moved. Bound jobs reflect launcher id, authority scope, and backend job id instead of treating raw runtime pointers as the architecture; stale `agent_jobs` bindings are sealed rather than live-crawled. `jobLaunch` / `jobInterrupt` can create or tear down those bindings without pretending reflection is authority, `reorientLaunch` can launch one fixed `reorient-worker` job from the checkpoint verdict without turning the verdict itself into a writer, `reorientResult` can read the worker's structured output back as a reviewable finding without promoting it, `reorientAccept` can explicitly bank a completed finding into typed observation/evidence plus optional scratch/checkpoint state, `roleLaunch` can launch fixed Imagination/planning, modeling/checkpoint, and verification/review specialists over that same bounded seam, `roleResult` can read their structured outputs back without mutation, `roleAccept` can apply reviewed Imagination planning patches and reviewed modeling graph/checkpoint patches through the normal state validator, and the `crrc` view lens can recommend the next explicit action over that loop without doing the action itself. The view lenses plus role-result, role-accept, freshness, context, graphQuery, reorient-result, and MVP status surfaces give clients compact or bounded views without making the GUI/client authoritative. The remaining missing organs are automatic graph invalidation, scheduler automation if dogfood proves it is needed, and richer product ergonomics after the MVP loop has been tested by a human. GitHub Issues import is a future adapter, but it is deliberately deferred until the backlog source is fresh enough to be worth importing. ```text model/tool observations @@ -1489,7 +1490,7 @@ The typed write path exists, the first deterministic observation/evidence distil In natural language: current Epiphany can preserve a map, show a map, project a compact scene from the map, project derived job/progress slots from the map and retrieval summary, reflect a thin launcher seam over bound work, explicitly launch or interrupt that bound work through a bounded authority surface, project a read-only freshness lens over retrieval and graph staleness, layer watcher-backed invalidation telemetry onto that lens for loaded threads, project a targeted graph/evidence context shard from the map, traverse bounded graph neighborhoods and path/symbol matches from the map, render typed graph state in the GUI through the adjacent EpiphanyGraph viewer, project planning captures/backlog/roadmap/objective drafts without adopting them, synthesize planning material through a review-gated Imagination lane, project context pressure from token telemetry, bank an in-flight investigation packet in durable typed state, reflect that packet back into prompt/scene/context, turn those signals into a read-only resume-versus-regather verdict, recommend the next explicit CRRC action over the verdict and worker/result state, print that recommendation in a dogfood operator view, explicitly launch one bounded `reorient-worker` job from that verdict, read its result back for review, explicitly accept a completed finding into typed state, retrieve evidence for the map, draft one explicit observation/evidence patch, derive a bounded graph/frontier/churn candidate from verified evidence-backed observations with code refs, choose a small coherent observation set when the caller does not provide one, favor the strongest selected observation when drafting that candidate, reject or accept a verified candidate, apply explicit map/evidence/churn/planning edits, notify clients after successful writes, inspect Rider/source-context status through an operator-safe bridge, capture Rider file/selection/symbol packets as artifacts, and sanity-check those edits before they hit the ledger. It still does not invalidate stale graph regions automatically, run scheduler automation over the fixed lanes, adopt objective drafts without a human gate, coordinate broad specialist ownership, or build-verify the Rider plugin scaffold on this machine. Teeth are installed; chewing is supervised; the first bell rings; the first wall board exists; the first shift board exists; the first freshness clipboard exists; the first door sensor now exists too; the first binder lens exists; the first graph-walk lens exists; the first planning wall exists; the first pressure gauge exists; the first ember packet exists; the first verdict slip now exists too; the first bounded launch lever and stop switch now exist too; the first explicit wakeup-hand now exists too; the first coordinator clipboard now exists too; the first operator readout exists too; Imagination now has a fenced workbench; Rider now has a first source-context hand; the GUI graph is no longer dead paper. The next slice is build-verifying or packaging the Rider plugin scaffold once Gradle/wrapper support exists, installing Unity `6000.1.10f1`, and running the next bridge-equipped Aetheria dogfood pass. -The role board, fixed specialist templates, first role accept paths, and bounded role self-memory path now exist too. Current Epiphany can project implementation, Imagination/planning, modeling/checkpoint, verification/review, and reorientation ownership through `thread/epiphany/roles`, explicitly launch fixed Imagination/modeling/verification workers, read their findings back, apply reviewed Imagination planning patches and reviewed modeling graph/checkpoint patches through `thread/epiphany/roleAccept`, review optional `selfPatch` lane-memory requests with reasons, apply accepted requests to Ghostlight-shaped role dossiers, and keep semantic acceptance review-gated. What remains is dogfooding the operator loop until real product friction, not imagined architecture guilt, tells us the next organ. +The role board, fixed specialist templates, first role accept paths, and bounded role self-memory path now exist too. Current Epiphany can project implementation, Imagination/planning, modeling/checkpoint, verification/review, and reorientation ownership through the `roles` view lens, explicitly launch fixed Imagination/modeling/verification workers, read their findings back, apply reviewed Imagination planning patches and reviewed modeling graph/checkpoint patches through `thread/epiphany/roleAccept`, review optional `selfPatch` lane-memory requests with reasons, apply accepted requests to Ghostlight-shaped role dossiers, and keep semantic acceptance review-gated. What remains is dogfooding the operator loop until real product friction, not imagined architecture guilt, tells us the next organ. ## Verification Hooks @@ -1517,7 +1518,7 @@ Current tests cover the landed flows at useful seams: - live app-server smoke for the first Phase 6 pressure boundary through native `epiphany-phase6-pressure-smoke`. - live app-server smoke for the first Phase 6 reorientation policy boundary through native `epiphany-phase6-reorient-smoke`. - live app-server smoke for the first MVP operator status view through native `epiphany-mvp-status-smoke`. -- focused app-server mapper coverage for `thread/epiphany/roles`, plus MVP status smoke coverage that consumes the roles surface. +- focused app-server mapper coverage for role projection, plus MVP status smoke coverage that consumes the roles view lens. - focused app-server/protocol coverage for `thread/epiphany/roleLaunch`, `thread/epiphany/roleResult`, and `thread/epiphany/roleAccept`, plus live role smoke coverage that launches Imagination, modeling, and verification workers, reads completed results, accepts a reviewed Imagination planning patch and a reviewed modeling graph patch, proves durable planning grows without objective adoption, proves the durable graph grows before verification sees the expanded frontier, and proves a modeling `selfPatch` review is carried through result/accept. Native `epiphany-agent-memory-store smoke` validates the Ghostlight-shaped dossiers and accepted/refused/apply behavior for self-memory patches. Useful commands: diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index c2edf957..ad410447 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -36,7 +36,7 @@ remembers doctrine; the branch remembers the blade. - Read `notes/epiphany-ideal-architecture-rebuild-plan.md` immediately after the teardown. It defines the smallest coherent replacement architecture: durable `EpiphanyState`, runtime-spine-owned `RuntimeState`, separate role memory/heartbeat state, `epiphany-core` as policy owner, app-server as adapter, Aquarium as reflector, typed acceptance receipts, and derived view lenses instead of a protocol verb zoo. - Do not continue Aquarium UI, bridge, Face, or dogfood expansion until the teardown has a source-grounded cleanup slice plan. Epiphany is the foundation; patches on patches are not a purification rite, they are how the altar becomes load-bearing garbage. - Phase 1 through Phase 5 are complete enough. -- Phase 6 has read-only `thread/epiphany/scene`, `thread/epiphany/jobs`, `thread/epiphany/roles`, `thread/epiphany/freshness`, `thread/epiphany/context`, `thread/epiphany/graphQuery`, `thread/epiphany/planning`, canonical `thread/epiphany/view` lenses, `thread/epiphany/reorientResult`, and `thread/epiphany/roleResult`; durable `jobBindings` are now legacy launcher compatibility while new durable `runtimeLinks` hold the stable runtime-spine association. The old standalone pressure, reorient, CRRC, and coordinator read verbs have been deleted; read those projections through the `pressure`, `reorient`, `crrc`, and `coordinator` view lenses. New `thread/epiphany/jobLaunch`, `thread/epiphany/jobInterrupt`, `thread/epiphany/roleLaunch`, and `thread/epiphany/reorientLaunch` writes open typed runtime-spine job receipts under `state/runtime-spine.msgpack` and do not require the Codex SQLite state runtime. Freshness carries watcher-backed invalidation inputs, graphQuery traverses authoritative typed graph neighborhoods and path/symbol matches without mutation, planning projects typed captures/backlog/roadmap/objective drafts without adopting work, roles project implementation/imagination/modeling/verification/reorientation ownership from existing signals without becoming a scheduler, `roleResult` and `reorientResult` read heartbeat-backed typed runtime-spine job results through runtime links when present, and `roleAccept` / `reorientAccept` accept completed heartbeat findings by writing typed acceptance receipts while remaining explicit review gates. +- Phase 6 has canonical read-only `thread/epiphany/view` lenses for scene, jobs, roles, planning, pressure, reorient, CRRC, and coordinator; separate read-only `thread/epiphany/freshness`, `thread/epiphany/context`, and `thread/epiphany/graphQuery` query surfaces; `thread/epiphany/reorientResult`; and `thread/epiphany/roleResult`. Durable `jobBindings` are now legacy launcher compatibility while new durable `runtimeLinks` hold the stable runtime-spine association. The old standalone scene/jobs/roles/planning/pressure/reorient/CRRC/coordinator read verbs have been deleted; read those projections through view lenses. New `thread/epiphany/jobLaunch`, `thread/epiphany/jobInterrupt`, `thread/epiphany/roleLaunch`, and `thread/epiphany/reorientLaunch` writes open typed runtime-spine job receipts under `state/runtime-spine.msgpack` and do not require the Codex SQLite state runtime. Freshness carries watcher-backed invalidation inputs, graphQuery traverses authoritative typed graph neighborhoods and path/symbol matches without mutation, planning projects typed captures/backlog/roadmap/objective drafts without adopting work, roles project implementation/imagination/modeling/verification/reorientation ownership from existing signals without becoming a scheduler, `roleResult` and `reorientResult` read heartbeat-backed typed runtime-spine job results through runtime links when present, and `roleAccept` / `reorientAccept` accept completed heartbeat findings by writing typed acceptance receipts while remaining explicit review gates. - Native `epiphany-mvp-status` is the first dogfood operator view. It starts or reads a thread through app-server and prints scene, planning, pressure, reorient, jobs, roles, Imagination/modeling/verification role result read-backs, reorient result, heartbeat, Face bubbles, and CRRC recommendation as text or machine output. The old Python status module has been cut; native Rust/CultCache/CultNet surfaces are the smoked product path. - Native `epiphany-mvp-coordinator` is the first auditable fixed-lane coordinator runner. It starts or reads a thread through app-server, opens a native runtime-spine session, follows the harness-native coordinator action, can auto-launch modeling, verification, or reorient-worker jobs, records native runtime job/result receipts for terminal launched work, keeps semantic findings review-gated by default, and writes summary, steps, rendered snapshots, transcript, stderr, runtime-spine status, and final next-action artifacts under `.epiphany-dogfood/coordinator` or a caller-provided artifact directory. It refuses direct backend-completion mutation; full completion smoke needs live workers while execution is being cauterized into CultNet. - Native `epiphany-runtime-spine` is the first Codex-independent runtime vertebra. It owns typed CultCache documents for runtime identity, sessions, jobs, job results, and events; opens/completes native jobs; snapshots jobs/results by runtime job id; projects job-result counts; and can emit a framed CultNet hello message advertising the native document and mutation contract surface. Codex app-server launch/read-back/acceptance is now a typed heartbeat/runtime-spine bridge with no Epiphany job-result dependency on the Codex SQLite runtime. @@ -79,7 +79,7 @@ remembers doctrine; the branch remembers the blade. - Aetheria dogfood exposed and then landed the first editor/runtime bridge. An implementation worker launched legacy `D:\Unity\Editor\Unity.exe -version` (Unity 5.5.0f3) even though Aetheria pins Unity `6000.1.10f1`; the stray process was killed. Native `epiphany-unity-bridge` now resolves the project-pinned Unity editor, refuses wrong/missing versions, owns `-batchmode`, `-quit`, and `-projectPath`, and writes inspection/command/log artifacts. Aquarium should surface those bridge artifacts through native/backend calls, not deleted Python action shims. - The current Aetheria runtime truth is blocked but legible: the project pins Unity `6000.1.10f1`, this machine currently has Hub editor `6000.4.2f1`, and the bridge wrote `.epiphany-gui/runtime/unity-inspect-1777549218802064800-23832` proving the exact editor is missing. Treat that artifact as the evidence gap until the pinned editor exists. The `.epiphany-gui` directory name is still a backend artifact contract, even though the client repo is now Aquarium. - The GUI parses `implementation-result.json` into artifact metadata, surfaces the latest implementation diff/no-diff outcome, and pauses immediate `Continue Implementation` repeats when the newest artifact is a no-diff implementation audit. -- The planning loop is now runtime-backed and operator-visible. Typed captures, backlog items, roadmap streams, Objective Drafts, and GitHub issue source refs live in `EpiphanyThreadState`, validate through revision-gated `thread/epiphany/update`, render into prompts when present, project read-only through `thread/epiphany/planning`, render in the GUI Planning panel, can be synthesized by the fixed Imagination/planning lane, and can be explicitly adopted through the artifacted `adoptObjectiveDraft` GUI action. Chat is deliberation, not an objective pipe; ideas and GitHub Issues remain planning state until explicit human adoption. +- The planning loop is now runtime-backed and operator-visible. Typed captures, backlog items, roadmap streams, Objective Drafts, and GitHub issue source refs live in `EpiphanyThreadState`, validate through revision-gated `thread/epiphany/update`, render into prompts when present, project read-only through the `planning` view lens, render in the GUI Planning panel, can be synthesized by the fixed Imagination/planning lane, and can be explicitly adopted through the artifacted `adoptObjectiveDraft` GUI action. Chat is deliberation, not an objective pipe; ideas and GitHub Issues remain planning state until explicit human adoption. - The bridge/dashboard slice is now landed far enough to test locally. Native `epiphany-rider-bridge` inspects Rider installation, solution, VCS, changed files, and captures file/selection/symbol context into `.epiphany-gui/rider` artifacts; Aquarium has Inspect Rider and renders Rider audit artifacts in Environment; Aquarium also embeds the adjacent EpiphanyGraph viewer over typed `graphs.architecture`, `graphs.dataflow`, and `graphs.links`. - A first Rider plugin scaffold lives under `integrations/rider`: tool window, Refresh status, and Send Context to Epiphany action. It shells through native `epiphany-rider-bridge` and does not own state. `gradle` is not installed on this machine, so the scaffold is not build-verified yet. - Next real product move: surface the repo birth runner review flow in Aquarium and then live-dogfood `epiphany-repo-birth-runner --mode run` on a real newborn repo. Continue Aquarium UI work in `E:\Projects\EpiphanyAquarium` after that; surface native heartbeat `sleepCycle`, `memoryResonance`, `incubation`, `thoughtLanes`, `bridge`, `candidateInterventions`, `appraisals`, and `reactions`; keep EpiphanyAgent focused on backend contracts, typed state, coordinator policy, bridge tools, heartbeat scheduling, Face guardrails, and the ongoing purification from Python/JSON scaffolding into Rust/CultCache/CultNet organs. Then build-verify/package the Rider plugin scaffold when Gradle/wrapper support is available, install the Aetheria-pinned Unity `6000.1.10f1` editor, and run the next Aetheria dogfood pass through Aquarium/Rider/Unity bridge artifacts. GitHub Issues import is deferred until the backlog source is fresh enough to deserve Imagination's attention. @@ -139,13 +139,13 @@ The current spine, blessed but not yet finished: - CRRC now recognizes already accepted reorientation findings so `reorientAccept` does not leave the operator stuck on a repeat `acceptReorientResult` recommendation. - thin launcher metadata in durable `jobBindings` - `thread/epiphany/jobsUpdated` remains protocol shape only for sealed legacy evacuation telemetry; app-server no longer emits Epiphany updates from old runtime `agent_job_progress` events -- read-only compact reflection through `thread/epiphany/scene` -- read-only job/progress reflection through `thread/epiphany/jobs`, with durable launcher metadata and heartbeat pending projection -- read-only role ownership reflection through `thread/epiphany/roles` +- read-only compact reflection through the `scene` view lens +- read-only job/progress reflection through the `jobs` view lens, with durable launcher metadata and heartbeat pending projection +- read-only role ownership reflection through the `roles` view lens - read-only retrieval/graph freshness reflection plus watcher-backed invalidation inputs through `thread/epiphany/freshness` - read-only targeted state-shard reflection through `thread/epiphany/context` - read-only graph traversal through `thread/epiphany/graphQuery` -- read-only planning projection through `thread/epiphany/planning` +- read-only planning projection through the `planning` view lens - GUI planning adoption now belongs to Aquarium/backend API surfaces; the old EpiphanyAgent Python GUI action shim has been cut - read-only current-context pressure reflection through the `pressure` view lens - read-only CRRC reorientation policy through the `reorient` view lens @@ -185,14 +185,10 @@ The exact current control flow is documented in - `thread/epiphany/retrieve` is read-only. - `thread/epiphany/distill` is read-only. - `thread/epiphany/propose` is read-only. -- `thread/epiphany/scene` is read-only. -- `thread/epiphany/jobs` is read-only. - `thread/epiphany/freshness` is read-only. - `thread/epiphany/context` is read-only. - `thread/epiphany/graphQuery` is read-only. -- `thread/epiphany/planning` is read-only. - `thread/epiphany/view` is read-only; its current lenses include pressure, reorient, CRRC, and coordinator projections. -- `thread/epiphany/roles` is read-only. - `thread/epiphany/roleResult` is read-only. - `thread/epiphany/roleAccept` is a narrow write surface for completed Imagination/planning and modeling/checkpoint `statePatch` findings only; it must not accept verification output, broad authority fields, job bindings, arbitrary implementation work, or implicit objective adoption. - `thread/epiphany/reorientResult` is read-only. @@ -409,7 +405,7 @@ The Phase 6 planning substrate runtime slice is also landed. It stores captures, backlog items, roadmap streams, Objective Drafts, and GitHub source refs inside typed Epiphany state, validates them through the revision-gated update path, renders a bounded planning section into prompts, and exposes read-only -`thread/epiphany/planning` for clients. The GUI planning operator slice is +planning through `thread/epiphany/view` for clients. The GUI planning operator slice is landed on top of that projection: it renders planning summaries, captures, backlog, roadmap streams, and Objective Drafts, and its `adoptObjectiveDraft` action requires an explicit selected draft before writing active @@ -517,9 +513,8 @@ coordinator into a broad hidden dispatcher, arbitrary marketplace, alternate job backend, automatic semantic acceptance path, target-repo implementation worker, direct-thought feed, random editor launcher, or GUI-as-source-of-truth. -Live `thread/epiphany/scene`, `thread/epiphany/jobs`, `thread/epiphany/roles`, -`thread/epiphany/freshness`, `thread/epiphany/context`, -`thread/epiphany/graphQuery`, `thread/epiphany/planning`, `thread/epiphany/view`, +Live `thread/epiphany/view`, `thread/epiphany/freshness`, `thread/epiphany/context`, +`thread/epiphany/graphQuery`, native `epiphany-mvp-status`, native `epiphany-mvp-coordinator`, and native `epiphany-phase6-graph-query-smoke` / native `epiphany-phase6-planning-smoke` smokes are now guardrails, not the next organs. The architectural teardown says diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index 4a7bbd47698d0901f2b800e89e4d0db244cf8c5f..aedc602864f68e32d04403875ce95f9f213f290e 100644 GIT binary patch delta 377 zcmZXQu}T9$5Qd3)2-^`0L2|h>BnoL2>_kyg*lqUa?$+Gxt~0wyw9&#^gg`nQ-$1m{ z#-~YP84zsU6Jlfg^9}#^&-bEv|Ji)lSo<10Z_XQy$CvlU)^h#s$?;n!>Fh>HFWTvx zCB1&P+fQc4AFadF11!;D3habVMQJnwOVk)&m?6hxO61szbSjlghXz`07+%47Li3j zArB4#R7ST}QKqKOhmIBmfrydDpzL9Q2?(| B57+` developer fragment. - - Clients read typed state through `Thread.epiphanyState`, compact reflections such as `thread/epiphany/scene`, `thread/epiphany/jobs`, and `thread/epiphany/freshness`, targeted state shards through `thread/epiphany/context`, bounded graph traversal through `thread/epiphany/graphQuery`, durable planning projection through `thread/epiphany/planning`, role ownership through `thread/epiphany/roles`, reviewable role output through `thread/epiphany/roleResult`, and the canonical `thread/epiphany/view` lens surface. The pressure, reorient, CRRC, and coordinator read projections now live only as view lenses, not standalone protocol verbs. + - Clients read typed state through `Thread.epiphanyState`, read-only `thread/epiphany/view` lenses for scene/jobs/roles/planning/pressure/reorient/CRRC/coordinator, freshness through `thread/epiphany/freshness`, targeted state shards through `thread/epiphany/context`, bounded graph traversal through `thread/epiphany/graphQuery`, and reviewable role output through `thread/epiphany/roleResult`. The scene, jobs, roles, planning, pressure, reorient, CRRC, and coordinator read projections now live only as view lenses, not standalone protocol verbs. - Durable typed state writes route through `thread/epiphany/update`, accepted `thread/epiphany/promote`, `thread/epiphany/reorientAccept`, `thread/epiphany/roleAccept`, or the bounded `thread/epiphany/jobLaunch`, `thread/epiphany/jobInterrupt`, `thread/epiphany/reorientLaunch`, and `thread/epiphany/roleLaunch` authority surfaces when they mutate state or `job_bindings`. - - `thread/epiphany/retrieve`, `thread/epiphany/distill`, `thread/epiphany/propose`, `thread/epiphany/scene`, `thread/epiphany/jobs`, `thread/epiphany/freshness`, `thread/epiphany/context`, `thread/epiphany/graphQuery`, `thread/epiphany/planning`, and `thread/epiphany/view` stay read-only. + - `thread/epiphany/retrieve`, `thread/epiphany/distill`, `thread/epiphany/propose`, `thread/epiphany/freshness`, `thread/epiphany/context`, `thread/epiphany/graphQuery`, and `thread/epiphany/view` stay read-only. - `thread/epiphany/index` writes the retrieval catalog, not durable Epiphany understanding; catalog is auspex output, not doctrine. - Qdrant is the preferred persistent semantic backend; BM25 remains the bootstrap/fallback/control path. - `epiphany-core` owns prompt rendering, rollout replay helpers, retrieval/indexing, distillation, proposal, and promotion policy where possible. @@ -110,7 +110,7 @@ accepted_design: - The Aquarium operator UI now lives in sibling repo `E:\Projects\EpiphanyAquarium`, with its own `AGENTS.md`, `state/map.yaml`, `state/memory.json`, and interface doctrine. It remains a local Tauri v2 + React/WebGL client over EpiphanyAgent's app-server/tooling surfaces; app-server and typed Epiphany state remain authoritative. - EpiphanyAgent no longer carries the embedded `apps/epiphany-gui` source tree. Backend artifact directories and action tools still use the historical `.epiphany-gui` contract until that backend naming seam is deliberately renamed. - Durable `job_bindings` now form a thin Epiphany-owned launcher seam: new specialist/reorient launches write heartbeat-backed bindings with launcher identity, authority scope, backend kind, and backend job id, and open matching typed runtime-spine job receipts under `state/runtime-spine.msgpack`. Interrupt clears typed binding authority without querying the Codex SQLite runtime. - - `thread/epiphany/jobs` is a read-only job/progress reflection: it derives indexing, remap, verification, and specialist slots from authoritative state and retrieval summaries, then projects heartbeat-backed bindings as pending heartbeat turns. It is not the scheduler, notification stream, durable runtime job table, or SQLite reader. + - The `jobs` view lens is a read-only job/progress reflection: it derives indexing, remap, verification, and specialist slots from authoritative state and retrieval summaries, then projects heartbeat-backed bindings as pending heartbeat turns. It is not the scheduler, notification stream, durable runtime job table, or SQLite reader. - `thread/epiphany/jobsUpdated` is sealed legacy Codex evacuation telemetry. The handler no longer emits Epiphany updates from old runtime `agent_job_progress:{json}` background events; heartbeat/runtime-spine is the live activation and result path. - `thread/epiphany/freshness` is the first read-only freshness surface: it derives retrieval and graph staleness from live retrieval summaries plus frontier/churn state, and for loaded threads reflects watcher-backed invalidation inputs with changed paths plus mapped graph/frontier hits, without mutating, scheduling, or performing automatic semantic invalidation. - `thread/epiphany/context` is the first targeted read-only state-shard surface: it selects graph nodes/edges, active frontier, checkpoint, observations, and evidence from authoritative typed state without mutating or notifying. @@ -138,7 +138,7 @@ accepted_design: - Limited native CRRC automation is now wired only at turn-complete safe boundaries: it can submit a compact operation when the read-only coordinator recommends `compactRehydrateReorient` or when a successful pre-compaction checkpoint intervention left a pending compact handoff for the completed turn, and it can launch the fixed `reorient-worker` when the coordinator recommends `launchReorientWorker`. It does not auto-launch modeling or verification, auto-accept findings, promote evidence, edit implementation code, or continue after reviewable semantic results; the rite may carry the stretcher, not declare the patient healed. - Pre-compaction checkpoint intervention is now wired at token-count boundaries: when a loaded Epiphany thread crosses the existing `shouldPrepareCompaction` pressure threshold during an active turn, the harness steers the active agent once for that turn with a bounded CRRC directive to bank scratch/checkpoint/map/evidence before compaction/reorientation. A successful steer marks a turn-scoped pending compact handoff consumed at clean turn completion; this is banking the fire before the dark, not semantic acceptance, broad scheduling, or automatic implementation continuation. - Native `epiphany-mvp-status` is the first dogfood operator view: it starts or reads a thread through app-server and renders scene, planning, pressure, reorient, jobs, role result read-backs, reorient result, CRRC recommendation, heartbeat, Face bubbles, and MVP role lanes as text or machine output without becoming a state store. The old Python status module has been cut; native Rust/CultCache/CultNet surfaces are the product path. - - `thread/epiphany/roles` is the first harness-native role ownership surface: it projects implementation, Imagination/planning, modeling/checkpoint, verification/review, and reorientation lanes from authoritative typed state, bound jobs, pressure/reorient/CRRC, and worker result status without launching, scheduling, accepting, compacting, or mutating state. + - The `roles` view lens is the harness-native role ownership surface: it projects implementation, Imagination/planning, modeling/checkpoint, verification/review, and reorientation lanes from authoritative typed state, bound jobs, pressure/reorient/CRRC, and worker result status without launching, scheduling, accepting, compacting, or mutating state. - `thread/epiphany/roleLaunch` and `thread/epiphany/roleResult` are the first explicit role-scoped specialist templates: Imagination/planning, modeling/checkpoint, and verification/review launch through fixed heartbeat-backed bindings with typed runtime-spine receipts and can be read back as reviewable findings from typed runtime-spine job results, while implementation stays owned by the main coding agent and reorientation stays on the CRRC-specific launch/result path. - `thread/epiphany/roleAccept` is the first review-gated role finding acceptance path: it accepts completed heartbeat-backed findings from typed runtime-spine results, accepts Imagination/planning findings only when they return a valid planning-only `statePatch` with draft Objective Draft review gates, accepts completed modeling/checkpoint findings only with a modeling-safe `statePatch`, appends audit observation/evidence, and rejects verification, implementation, reorientation, job binding, objective adoption, or broad authority fields. - `thread/epiphany/reorientLaunch` is the first bounded runtime consumer over the reorientation verdict: it launches one fixed `reorient-worker` heartbeat binding with explicit resume-versus-regather scope, authority, and checkpoint-derived payload, without making the `reorient` view lens a writer or turning CRRC into an ambient scheduler. @@ -148,7 +148,7 @@ accepted_design: - The old Python MVP dogfood runner has been cut. Auditable dogfood must use native coordinator/status/runtime-spine tools or a new typed Rust runner that completes heartbeat-owned runtime-spine job results. - Epiphany safety doctrine is to separate cognition from actuation, keep authority explicit, make interruption sacred, stage capability release, and treat operator misuse as a normal design input rather than a rude hypothetical. The machine must have brakes before it receives larger engines. - Epiphany is built in the open, but publication mode is not one-size-fits-all: use FOSS where viable, source-available licensing where economics or capability risk demand it, and commercial terms where organizations extract real enterprise value. - - `thread/epiphany/jobLaunch` and `thread/epiphany/jobInterrupt` are the first bounded authority surfaces over the thin job seam: they mutate durable `job_bindings`, queue or clear heartbeat-owned activation, and preserve explicit launcher identity and interruption without turning `thread/epiphany/jobs` into a scheduler. + - `thread/epiphany/jobLaunch` and `thread/epiphany/jobInterrupt` are the first bounded authority surfaces over the thin job seam: they mutate durable `job_bindings`, queue or clear heartbeat-owned activation, and preserve explicit launcher identity and interruption without turning the `jobs` view lens into a scheduler. - Handoff, plan, harness-surface, and scratch files must have distinct jobs and must not become duplicate brains. - A machine is perfect when every remaining part visibly deserves to exist; this applies to persistent memory too. - Evidence is not an activity feed; repeated "I just did this" entries should be cut or distilled when git already proves the work. @@ -179,8 +179,8 @@ accepted_design: - Rider and Unity are environment organs, not sources of truth: Rider should expose IDE/source context, diagnostics, navigation, and changed ranges; Unity should expose pinned-editor runtime facts, compilation, tests, probes, assets, scenes, and logs; Epiphany remains the durable Self that coordinates, records, and reviews. - The product architecture is three-pronged: Rider is the code view for human inspection of repo state, source tree, diffs, diagnostics, and code refs; Epiphany Aquarium is the agent dashboard for objectives, specialist lane state, logs/artifacts, persisted typed state, and graph/control-flow views; Unity is the runtime environment for pinned tests, probes, scene configuration, assets, shaders, and play/edit-mode evidence. - Epiphany needs a workspace-scoped planning substrate separate from the active objective: conversation captures, inbox, normalized backlog, roadmap streams, objective drafts, and explicit objective adoption are distinct states. The active objective remains the bounded run contract; chat and imported issues are planning inputs until reviewed and promoted. `notes/epiphany-planning-substrate.md` defines the product model, including GitHub Issues import semantics. - - The first runtime planning slice is landed inside `EpiphanyThreadState`: typed captures, backlog items, roadmap streams, Objective Drafts, and GitHub source refs are revision-gated through `thread/epiphany/update`, rendered into prompts when present, and reflected read-only through `thread/epiphany/planning`. - - The first GUI planning operator slice is landed: status collection includes `thread/epiphany/planning`, the Tauri/React dashboard renders planning summaries, captures, backlog, roadmap streams, and Objective Drafts, and the `adoptObjectiveDraft` GUI action requires an explicit selected draft before updating objective, subgoal, planning status, scratch, checkpoint, observation, evidence, and adoption artifacts. + - The first runtime planning slice is landed inside `EpiphanyThreadState`: typed captures, backlog items, roadmap streams, Objective Drafts, and GitHub source refs are revision-gated through `thread/epiphany/update`, rendered into prompts when present, and reflected read-only through the `planning` view lens. + - The first GUI planning operator slice is landed: status collection includes the `planning` view lens, the Tauri/React dashboard renders planning summaries, captures, backlog, roadmap streams, and Objective Drafts, and the `adoptObjectiveDraft` GUI action requires an explicit selected draft before updating objective, subgoal, planning status, scratch, checkpoint, observation, evidence, and adoption artifacts. - The planning/future-shape role is Imagination: it can synthesize captures, backlog shape, roadmap streams, and Objective Drafts while Eyes scouts outside reality, but its output remains planning state until explicit human adoption. - The Imagination lane is now a fixed roleLaunch/roleResult/roleAccept specialist over the existing job-control seam: it may launch as `planning-synthesis-worker`, return a reviewable planning-only `statePatch`, and update captures/backlog/roadmap/objective drafts after explicit acceptance without adopting an objective or touching implementation/modeling state. - Unity integration must be editor-resident, not text-archeology-only: scene files, prefabs, materials, shaders, ScriptableObjects, asset GUIDs, prefab overrides, and serialized component fields should be inspected through a Unity Editor package using Unity APIs, with narrow mutation preview/apply commands and artifact receipts. @@ -199,12 +199,12 @@ landed_baseline: - Phase 3: typed client read surface through `Thread.epiphanyState`. - Phase 4: hybrid retrieval plus explicit Qdrant indexing with BM25 fallback. - Phase 5: typed update/distill/propose/promote/read/notification control plane. - - Phase 6: read-only scene, job/progress, freshness with watcher-backed invalidation inputs, targeted context, graph traversal, durable planning projection, current-context pressure, reorientation policy, and CRRC coordinator recommendation surfaces, plus durable investigation checkpointing for compaction-safe planning, a thin launcher seam in durable job bindings, explicit launch/interrupt authority over that seam, and a bounded reorient-guided worker launch surface. + - Phase 6: read-only view lenses for scene, job/progress, roles, planning, current-context pressure, reorientation policy, CRRC, and coordinator; separate freshness with watcher-backed invalidation inputs, targeted context, and graph traversal query surfaces; plus durable investigation checkpointing for compaction-safe planning, a thin launcher seam in durable job bindings, explicit launch/interrupt authority over that seam, and a bounded reorient-guided worker launch surface. - Phase 6 read-back: read-only reorient-worker result reflection through `thread/epiphany/reorientResult`. - Phase 6 acceptance: explicit reorient-worker finding acceptance through `thread/epiphany/reorientAccept`. - Phase 6 dogfood view: first CLI operator status over scene/pressure/reorient/jobs/result/CRRC. - Phase 6 dogfood runner: old Python runner cut; replacement must be native Rust/CultCache/CultNet and complete typed runtime-spine job results from heartbeat-owned turns. - - Phase 6 role ownership: read-only `thread/epiphany/roles` over implementation, modeling/checkpoint, verification/review, and reorientation lanes. + - Phase 6 role ownership: read-only `roles` view lens over implementation, modeling/checkpoint, verification/review, and reorientation lanes. - Phase 6 role specialists: explicit `thread/epiphany/roleLaunch` and read-only `thread/epiphany/roleResult` templates for modeling/checkpoint and verification/review. - Phase 6 modeling role acceptance: explicit `thread/epiphany/roleAccept` for reviewed modeling/checkpoint `statePatch` findings that can grow graphs/frontier/checkpoints through the existing state validator. - Phase 6 coordinator: read-only `coordinator` view lens plus native `epiphany-mvp-coordinator` and smoke coverage for the fixed-lane MVP loop. @@ -213,9 +213,9 @@ landed_baseline: - Phase 6 Aquarium extraction: the Tauri v2 + React/WebGL operator console moved from embedded `apps/epiphany-gui` into sibling repo `E:\Projects\EpiphanyAquarium`, with its own distilled interface state, memory, doctrine, build, visual smoke, and Tauri check. - Phase 6 Unity runtime bridge: native `epiphany-unity-bridge` plus GUI Inspect Unity action resolve pinned Unity editors, reject wrong/missing versions, and write runtime artifacts before engine assumptions are treated as testable. - Planning substrate design: `notes/epiphany-planning-substrate.md` formalizes conversation capture, inbox, backlog, roadmap streams, objective drafts, explicit adoption, the Imagination planning role, and GitHub Issues import. - - Phase 6 planning substrate runtime slice: typed planning state in `EpiphanyThreadState`, prompt rendering, revision-gated update validation, read-only `thread/epiphany/planning`, scene action reflection, generated schemas, and live planning smoke coverage. + - Phase 6 planning substrate runtime slice: typed planning state in `EpiphanyThreadState`, prompt rendering, revision-gated update validation, read-only `planning` view lens, scene action reflection, generated schemas, and live planning smoke coverage. - Phase 6 GUI planning operator slice: MVP status and Tauri/React GUI render planning state; old Python GUI action shims have been cut from EpiphanyAgent. - - Phase 6 Imagination role lane: `thread/epiphany/roles` now exposes Imagination/planning, `roleLaunch` can launch the fixed `planning-synthesis-worker`, `roleResult` projects its finding, `roleAccept` applies planning-only patches with review-gated Objective Drafts, and the GUI/status tools can launch, read, and accept that lane. + - Phase 6 Imagination role lane: the `roles` view lens exposes Imagination/planning, `roleLaunch` can launch the fixed `planning-synthesis-worker`, `roleResult` projects its finding, `roleAccept` applies planning-only patches with review-gated Objective Drafts, and the GUI/status tools can launch, read, and accept that lane. - Phase 6 Aquarium graph and Rider bridge slice: the Tauri/React/WebGL Aquarium embeds the adjacent EpiphanyGraph viewer over typed graph state, native `epiphany-rider-bridge` writes Rider/source-context artifacts, Aquarium Inspect Rider surfaces those artifacts, and `integrations/rider` scaffolds the first frontend-only Rider tool-window/context-action plugin. - Phase 6 role self-memory slice: Ghostlight-shaped role dossiers live in typed CultCache `state/agents.msgpack`, specialists may request bounded `selfPatch` lane-memory mutations, coordinator review projects acceptance/refusal reasons through `selfPersistence`, and GUI/coordinator accept paths apply accepted requests with the native `epiphany-agent-memory-store` binary. - Phase 6 Face public-surface slice: Face's typed role dossier, Face prompt text, `state/face-discord.toml`, the native `epiphany-face-discord` persona/webhook pipe, `state/void-memory.toml`, and the native `epiphany-void-memory` bridge establish Face as the public #aquarium-only translator of Epiphany agent thought-weather, with Void-derived Discord memory/search/presentation organs but without VoidBot's moderation authority. @@ -273,4 +273,4 @@ rejected_paths: current_status: summary: Phase 1 durable state through Phase 6 coordinator/specialist/CRRC/backend organs are landed, and the May 2026 rebuild has started cutting the app-server control-plane tumor. Pressure policy now lives in `epiphany-core`; role/reorient acceptance writes typed `acceptance_receipts`; live duplicate-acceptance checks use runtime result receipt identity instead of summary strings; launch writes durable `runtime_links`; and role/reorient result read-back follows runtime links before falling back to legacy bindings. - next_action: Continue the teardown/rebuild migration from `notes/epiphany-ideal-architecture-rebuild-plan.md`. Landed cuts now shrink `jobBindings`, remove normal public `raw_result`, add the canonical `thread/epiphany/view` lens wrapper, migrate MVP consumers, quarantine heartbeat cognition blobs, and delete the old pressure/reorient/CRRC/coordinator read wrappers. The next bounded cut is to decide which remaining read verbs deserve to stay as true query surfaces and which should collapse behind view lenses, then continue moving policy out of app-server into `epiphany-core`. Do not resume outward Aquarium/bridge/Face/dogfood expansion until this foundation cleanup is materially farther along. + next_action: Continue the teardown/rebuild migration from `notes/epiphany-ideal-architecture-rebuild-plan.md`. Landed cuts now shrink `jobBindings`, remove normal public `raw_result`, add the canonical `thread/epiphany/view` lens wrapper, migrate MVP consumers, quarantine heartbeat cognition blobs, and delete the old scene/jobs/roles/planning/pressure/reorient/CRRC/coordinator read wrappers. The next bounded cut is to keep moving policy out of app-server into `epiphany-core`, starting with the largest remaining coordinator/roles/CRRC mapping clusters. Do not resume outward Aquarium/bridge/Face/dogfood expansion until this foundation cleanup is materially farther along. diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json b/vendor/codex/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json index 1099fd8e..9cc1f10d 100644 --- a/vendor/codex/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json +++ b/vendor/codex/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json @@ -16245,13 +16245,6 @@ ], "type": "string" }, - "ThreadEpiphanyJobsSource": { - "enum": [ - "stored", - "live" - ], - "type": "string" - }, "ThreadEpiphanyJobsUpdatedNotification": { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json b/vendor/codex/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json index df03b4f4..03870bc5 100644 --- a/vendor/codex/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json +++ b/vendor/codex/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json @@ -14132,13 +14132,6 @@ ], "type": "string" }, - "ThreadEpiphanyJobsSource": { - "enum": [ - "stored", - "live" - ], - "type": "string" - }, "ThreadEpiphanyJobsUpdatedNotification": { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyJobsSource.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyJobsSource.ts deleted file mode 100644 index 11b53e6b..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyJobsSource.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanyJobsSource = "stored" | "live"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/index.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/index.ts index 6fd61f8b..8b2620b9 100644 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/index.ts +++ b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/index.ts @@ -339,7 +339,6 @@ export type { ThreadEpiphanyInvalidationStatus } from "./ThreadEpiphanyInvalidat export type { ThreadEpiphanyJob } from "./ThreadEpiphanyJob"; export type { ThreadEpiphanyJobKind } from "./ThreadEpiphanyJobKind"; export type { ThreadEpiphanyJobStatus } from "./ThreadEpiphanyJobStatus"; -export type { ThreadEpiphanyJobsSource } from "./ThreadEpiphanyJobsSource"; export type { ThreadEpiphanyJobsUpdatedNotification } from "./ThreadEpiphanyJobsUpdatedNotification"; export type { ThreadEpiphanyJobsUpdatedSource } from "./ThreadEpiphanyJobsUpdatedSource"; export type { ThreadEpiphanyPlanningSummary } from "./ThreadEpiphanyPlanningSummary"; diff --git a/vendor/codex/codex-rs/app-server-protocol/src/protocol/common.rs b/vendor/codex/codex-rs/app-server-protocol/src/protocol/common.rs index 57dbcd3f..5bead115 100644 --- a/vendor/codex/codex-rs/app-server-protocol/src/protocol/common.rs +++ b/vendor/codex/codex-rs/app-server-protocol/src/protocol/common.rs @@ -336,26 +336,11 @@ client_request_definitions! { params: v2::ThreadReadParams, response: v2::ThreadReadResponse, }, - #[experimental("thread/epiphany/scene")] - ThreadEpiphanyScene => "thread/epiphany/scene" { - params: v2::ThreadEpiphanySceneParams, - response: v2::ThreadEpiphanySceneResponse, - }, #[experimental("thread/epiphany/view")] ThreadEpiphanyView => "thread/epiphany/view" { params: v2::ThreadEpiphanyViewParams, response: v2::ThreadEpiphanyViewResponse, }, - #[experimental("thread/epiphany/jobs")] - ThreadEpiphanyJobs => "thread/epiphany/jobs" { - params: v2::ThreadEpiphanyJobsParams, - response: v2::ThreadEpiphanyJobsResponse, - }, - #[experimental("thread/epiphany/roles")] - ThreadEpiphanyRoles => "thread/epiphany/roles" { - params: v2::ThreadEpiphanyRolesParams, - response: v2::ThreadEpiphanyRolesResponse, - }, #[experimental("thread/epiphany/roleLaunch")] ThreadEpiphanyRoleLaunch => "thread/epiphany/roleLaunch" { params: v2::ThreadEpiphanyRoleLaunchParams, @@ -381,11 +366,6 @@ client_request_definitions! { params: v2::ThreadEpiphanyContextParams, response: v2::ThreadEpiphanyContextResponse, }, - #[experimental("thread/epiphany/planning")] - ThreadEpiphanyPlanning => "thread/epiphany/planning" { - params: v2::ThreadEpiphanyPlanningParams, - response: v2::ThreadEpiphanyPlanningResponse, - }, #[experimental("thread/epiphany/graphQuery")] ThreadEpiphanyGraphQuery => "thread/epiphany/graphQuery" { params: v2::ThreadEpiphanyGraphQueryParams, @@ -1661,221 +1641,6 @@ mod tests { Ok(()) } - #[test] - fn serialize_thread_epiphany_scene_response() -> Result<()> { - let response = ClientResponse::ThreadEpiphanyScene { - request_id: RequestId::Integer(8), - response: v2::ThreadEpiphanySceneResponse { - thread_id: "thr_123".to_string(), - scene: v2::ThreadEpiphanyScene { - state_status: v2::ThreadEpiphanySceneStateStatus::Ready, - source: v2::ThreadEpiphanySceneSource::Live, - revision: Some(3), - objective: Some("Keep the map visible".to_string()), - active_subgoal: Some(v2::ThreadEpiphanySceneSubgoal { - id: "phase-6".to_string(), - title: "Reflect typed state".to_string(), - status: "active".to_string(), - summary: None, - active: true, - }), - subgoals: Vec::new(), - invariant_status_counts: vec![v2::ThreadEpiphanySceneStatusCount { - status: "ok".to_string(), - count: 2, - }], - graph: v2::ThreadEpiphanySceneGraph { - architecture_node_count: 4, - architecture_edge_count: 3, - dataflow_node_count: 2, - dataflow_edge_count: 1, - link_count: 2, - active_node_ids: vec!["state-spine".to_string()], - active_edge_ids: Vec::new(), - open_question_count: 1, - open_gap_count: 0, - dirty_paths: vec![PathBuf::from("notes/scene.md")], - checkpoint_id: Some("ck-1".to_string()), - checkpoint_summary: None, - }, - retrieval: Some(v2::ThreadEpiphanySceneRetrieval { - workspace_root: PathBuf::from("/workspace"), - status: codex_protocol::protocol::EpiphanyRetrievalStatus::Ready, - semantic_available: true, - index_revision: Some("qdrant-v1".to_string()), - indexed_file_count: Some(12), - indexed_chunk_count: Some(34), - shard_count: 1, - dirty_path_count: 0, - }), - investigation_checkpoint: Some( - v2::ThreadEpiphanySceneInvestigationCheckpoint { - checkpoint_id: "ix-1".to_string(), - kind: "slice_planning".to_string(), - disposition: codex_protocol::protocol::EpiphanyInvestigationDisposition::ResumeReady, - focus: "Keep the durable resume packet visible.".to_string(), - summary: Some("Checkpointed the bounded planning slice.".to_string()), - next_action: Some("Patch one typed field next.".to_string()), - captured_at_turn_id: Some("turn-7".to_string()), - open_question_count: 1, - code_ref_count: 2, - evidence_count: 1, - }, - ), - observations: v2::ThreadEpiphanySceneRecords { - total_count: 1, - latest: vec![v2::ThreadEpiphanySceneRecord { - id: "obs-1".to_string(), - kind: "smoke".to_string(), - status: "ok".to_string(), - summary: "Scene projected".to_string(), - code_ref_count: 1, - }], - }, - evidence: v2::ThreadEpiphanySceneRecords::default(), - churn: Some(v2::ThreadEpiphanySceneChurn { - understanding_status: "ready".to_string(), - diff_pressure: "low".to_string(), - graph_freshness: Some("fresh".to_string()), - warning: None, - unexplained_writes: Some(0), - }), - available_actions: vec![ - v2::ThreadEpiphanySceneAction::Index, - v2::ThreadEpiphanySceneAction::Retrieve, - v2::ThreadEpiphanySceneAction::Distill, - v2::ThreadEpiphanySceneAction::Context, - v2::ThreadEpiphanySceneAction::Planning, - v2::ThreadEpiphanySceneAction::Jobs, - v2::ThreadEpiphanySceneAction::Roles, - v2::ThreadEpiphanySceneAction::Coordinator, - v2::ThreadEpiphanySceneAction::RoleLaunch, - v2::ThreadEpiphanySceneAction::RoleResult, - v2::ThreadEpiphanySceneAction::JobLaunch, - v2::ThreadEpiphanySceneAction::Freshness, - v2::ThreadEpiphanySceneAction::Pressure, - v2::ThreadEpiphanySceneAction::Reorient, - v2::ThreadEpiphanySceneAction::Crrc, - v2::ThreadEpiphanySceneAction::ReorientLaunch, - v2::ThreadEpiphanySceneAction::Update, - v2::ThreadEpiphanySceneAction::JobInterrupt, - v2::ThreadEpiphanySceneAction::Propose, - v2::ThreadEpiphanySceneAction::Promote, - ], - }, - }, - }; - - assert_eq!(response.id(), &RequestId::Integer(8)); - assert_eq!(response.method(), "thread/epiphany/scene"); - assert_eq!( - json!({ - "method": "thread/epiphany/scene", - "id": 8, - "response": { - "threadId": "thr_123", - "scene": { - "stateStatus": "ready", - "source": "live", - "revision": 3, - "objective": "Keep the map visible", - "activeSubgoal": { - "id": "phase-6", - "title": "Reflect typed state", - "status": "active", - "active": true - }, - "invariantStatusCounts": [ - { - "status": "ok", - "count": 2 - } - ], - "graph": { - "architectureNodeCount": 4, - "architectureEdgeCount": 3, - "dataflowNodeCount": 2, - "dataflowEdgeCount": 1, - "linkCount": 2, - "activeNodeIds": ["state-spine"], - "openQuestionCount": 1, - "openGapCount": 0, - "dirtyPaths": ["notes/scene.md"], - "checkpointId": "ck-1" - }, - "retrieval": { - "workspaceRoot": "/workspace", - "status": "ready", - "semanticAvailable": true, - "indexRevision": "qdrant-v1", - "indexedFileCount": 12, - "indexedChunkCount": 34, - "shardCount": 1, - "dirtyPathCount": 0 - }, - "investigationCheckpoint": { - "checkpointId": "ix-1", - "kind": "slice_planning", - "disposition": "resume_ready", - "focus": "Keep the durable resume packet visible.", - "summary": "Checkpointed the bounded planning slice.", - "nextAction": "Patch one typed field next.", - "capturedAtTurnId": "turn-7", - "openQuestionCount": 1, - "codeRefCount": 2, - "evidenceCount": 1 - }, - "observations": { - "totalCount": 1, - "latest": [ - { - "id": "obs-1", - "kind": "smoke", - "status": "ok", - "summary": "Scene projected", - "codeRefCount": 1 - } - ] - }, - "evidence": { - "totalCount": 0 - }, - "churn": { - "understandingStatus": "ready", - "diffPressure": "low", - "graphFreshness": "fresh", - "unexplainedWrites": 0 - }, - "availableActions": [ - "index", - "retrieve", - "distill", - "context", - "planning", - "jobs", - "roles", - "coordinator", - "roleLaunch", - "roleResult", - "jobLaunch", - "freshness", - "pressure", - "reorient", - "crrc", - "reorientLaunch", - "update", - "jobInterrupt", - "propose", - "promote" - ] - } - } - }), - serde_json::to_value(&response)?, - ); - Ok(()) - } - #[test] fn serialize_thread_epiphany_view_response() -> Result<()> { let request = ClientRequest::ThreadEpiphanyView { @@ -1943,147 +1708,6 @@ mod tests { Ok(()) } - #[test] - fn serialize_thread_epiphany_jobs_response() -> Result<()> { - let response = ClientResponse::ThreadEpiphanyJobs { - request_id: RequestId::Integer(8), - response: v2::ThreadEpiphanyJobsResponse { - thread_id: "thr_123".to_string(), - source: v2::ThreadEpiphanyJobsSource::Live, - state_revision: Some(3), - jobs: vec![v2::ThreadEpiphanyJob { - id: "retrieval-index".to_string(), - kind: v2::ThreadEpiphanyJobKind::Indexing, - scope: "/workspace".to_string(), - owner_role: "epiphany-core".to_string(), - launcher_job_id: None, - authority_scope: None, - backend_job_id: None, - status: v2::ThreadEpiphanyJobStatus::Needed, - items_processed: Some(12), - items_total: None, - progress_note: Some( - "Retrieval catalog is stale; refresh is available.".to_string(), - ), - last_checkpoint_at_unix_seconds: Some(1_744_500_000), - blocking_reason: None, - active_thread_ids: Vec::new(), - linked_subgoal_ids: vec!["phase-6".to_string()], - linked_graph_node_ids: vec!["retrieval".to_string()], - }], - }, - }; - - assert_eq!(response.id(), &RequestId::Integer(8)); - assert_eq!(response.method(), "thread/epiphany/jobs"); - assert_eq!( - json!({ - "method": "thread/epiphany/jobs", - "id": 8, - "response": { - "threadId": "thr_123", - "source": "live", - "stateRevision": 3, - "jobs": [ - { - "id": "retrieval-index", - "kind": "indexing", - "scope": "/workspace", - "ownerRole": "epiphany-core", - "status": "needed", - "itemsProcessed": 12, - "progressNote": "Retrieval catalog is stale; refresh is available.", - "lastCheckpointAtUnixSeconds": 1744500000, - "linkedSubgoalIds": ["phase-6"], - "linkedGraphNodeIds": ["retrieval"] - } - ] - } - }), - serde_json::to_value(&response)?, - ); - Ok(()) - } - - #[test] - fn serialize_thread_epiphany_roles_response() -> Result<()> { - let response = ClientResponse::ThreadEpiphanyRoles { - request_id: RequestId::Integer(8), - response: v2::ThreadEpiphanyRolesResponse { - thread_id: "thr_123".to_string(), - source: v2::ThreadEpiphanyRolesSource::Live, - state_status: v2::ThreadEpiphanyReorientStateStatus::Ready, - state_revision: Some(3), - roles: vec![v2::ThreadEpiphanyRoleLane { - id: v2::ThreadEpiphanyRoleId::Verification, - title: "Verification / Review".to_string(), - owner_role: "epiphany-verifier".to_string(), - status: v2::ThreadEpiphanyRoleStatus::Needed, - note: "Review evidence before promotion.".to_string(), - jobs: vec![v2::ThreadEpiphanyJob { - id: "verification".to_string(), - kind: v2::ThreadEpiphanyJobKind::Verification, - scope: "invariant verification".to_string(), - owner_role: "epiphany-verifier".to_string(), - launcher_job_id: None, - authority_scope: None, - backend_job_id: None, - status: v2::ThreadEpiphanyJobStatus::Needed, - items_processed: None, - items_total: None, - progress_note: None, - last_checkpoint_at_unix_seconds: None, - blocking_reason: None, - active_thread_ids: Vec::new(), - linked_subgoal_ids: Vec::new(), - linked_graph_node_ids: Vec::new(), - }], - authority_scopes: vec!["thread/epiphany/promote".to_string()], - recommended_action: Some(v2::ThreadEpiphanySceneAction::Promote), - }], - note: "Role ownership is derived read-only.".to_string(), - }, - }; - - assert_eq!(response.id(), &RequestId::Integer(8)); - assert_eq!(response.method(), "thread/epiphany/roles"); - assert_eq!( - json!({ - "method": "thread/epiphany/roles", - "id": 8, - "response": { - "threadId": "thr_123", - "source": "live", - "stateStatus": "ready", - "stateRevision": 3, - "roles": [ - { - "id": "verification", - "title": "Verification / Review", - "ownerRole": "epiphany-verifier", - "status": "needed", - "note": "Review evidence before promotion.", - "jobs": [ - { - "id": "verification", - "kind": "verification", - "scope": "invariant verification", - "ownerRole": "epiphany-verifier", - "status": "needed" - } - ], - "authorityScopes": ["thread/epiphany/promote"], - "recommendedAction": "promote" - } - ], - "note": "Role ownership is derived read-only." - } - }), - serde_json::to_value(&response)?, - ); - Ok(()) - } - #[test] fn serialize_thread_epiphany_role_launch_response() -> Result<()> { let response = ClientResponse::ThreadEpiphanyRoleLaunch { @@ -2608,178 +2232,6 @@ mod tests { Ok(()) } - #[test] - fn serialize_thread_epiphany_planning_response() -> Result<()> { - let github_source = codex_protocol::protocol::EpiphanyPlanningSourceRef { - kind: "github_issue".to_string(), - provider: Some("github".to_string()), - repo: Some("GameCult/Epiphany".to_string()), - issue_number: Some(42), - url: Some("https://github.com/GameCult/Epiphany/issues/42".to_string()), - labels: vec!["gui".to_string()], - imported_at: Some("2026-05-01T05:00:00Z".to_string()), - ..Default::default() - }; - let response = ClientResponse::ThreadEpiphanyPlanning { - request_id: RequestId::Integer(9), - response: v2::ThreadEpiphanyPlanningResponse { - thread_id: "thr_123".to_string(), - source: v2::ThreadEpiphanyContextSource::Live, - state_status: v2::ThreadEpiphanyContextStateStatus::Ready, - state_revision: Some(5), - planning: codex_protocol::protocol::EpiphanyPlanningState { - captures: vec![codex_protocol::protocol::EpiphanyPlanningCapture { - id: "capture-github-42".to_string(), - title: "Import issue backlog".to_string(), - confidence: "medium".to_string(), - status: "new".to_string(), - source: github_source.clone(), - ..Default::default() - }], - backlog_items: vec![codex_protocol::protocol::EpiphanyBacklogItem { - id: "backlog-planning-api".to_string(), - title: "Expose planning projection".to_string(), - kind: "feature".to_string(), - summary: "Make planning state queryable by the GUI.".to_string(), - status: "ready".to_string(), - horizon: "now".to_string(), - priority: codex_protocol::protocol::EpiphanyPlanningPriority { - value: "p1".to_string(), - rationale: "Unblocks the planning GUI.".to_string(), - ..Default::default() - }, - confidence: "high".to_string(), - product_area: "gui".to_string(), - lane_hints: vec!["imagination".to_string()], - source_refs: vec![github_source], - ..Default::default() - }], - objective_drafts: vec![codex_protocol::protocol::EpiphanyObjectiveDraft { - id: "objdraft-planning-api".to_string(), - title: "Build planning API slice".to_string(), - summary: "Land typed planning state and read-only projection.".to_string(), - source_item_ids: vec!["backlog-planning-api".to_string()], - scope: codex_protocol::protocol::EpiphanyObjectiveDraftScope { - includes: vec!["thread/epiphany/planning".to_string()], - excludes: vec!["GUI planning table".to_string()], - }, - acceptance_criteria: vec![ - "Projection returns planning counts.".to_string(), - ], - lane_plan: codex_protocol::protocol::EpiphanyObjectiveDraftLanePlan { - imagination: Some("Shape backlog and objective draft.".to_string()), - hands: Some("Wire protocol and app-server read.".to_string()), - ..Default::default() - }, - review_gates: vec!["Human adoption required".to_string()], - status: "draft".to_string(), - ..Default::default() - }], - ..Default::default() - }, - summary: v2::ThreadEpiphanyPlanningSummary { - capture_count: 1, - pending_capture_count: 1, - github_issue_capture_count: 1, - backlog_item_count: 1, - ready_backlog_item_count: 1, - roadmap_stream_count: 0, - objective_draft_count: 1, - draft_objective_count: 1, - active_objective: Some("Current adopted work".to_string()), - note: "Planning substrate is available.".to_string(), - }, - }, - }; - - assert_eq!(response.id(), &RequestId::Integer(9)); - assert_eq!(response.method(), "thread/epiphany/planning"); - assert_eq!( - json!({ - "method": "thread/epiphany/planning", - "id": 9, - "response": { - "threadId": "thr_123", - "source": "live", - "stateStatus": "ready", - "stateRevision": 5, - "planning": { - "captures": [{ - "id": "capture-github-42", - "title": "Import issue backlog", - "confidence": "medium", - "status": "new", - "source": { - "kind": "github_issue", - "provider": "github", - "repo": "GameCult/Epiphany", - "issue_number": 42, - "url": "https://github.com/GameCult/Epiphany/issues/42", - "labels": ["gui"], - "imported_at": "2026-05-01T05:00:00Z" - } - }], - "backlog_items": [{ - "id": "backlog-planning-api", - "title": "Expose planning projection", - "kind": "feature", - "summary": "Make planning state queryable by the GUI.", - "status": "ready", - "horizon": "now", - "priority": { - "value": "p1", - "rationale": "Unblocks the planning GUI." - }, - "confidence": "high", - "product_area": "gui", - "lane_hints": ["imagination"], - "source_refs": [{ - "kind": "github_issue", - "provider": "github", - "repo": "GameCult/Epiphany", - "issue_number": 42, - "url": "https://github.com/GameCult/Epiphany/issues/42", - "labels": ["gui"], - "imported_at": "2026-05-01T05:00:00Z" - }] - }], - "objective_drafts": [{ - "id": "objdraft-planning-api", - "title": "Build planning API slice", - "summary": "Land typed planning state and read-only projection.", - "source_item_ids": ["backlog-planning-api"], - "scope": { - "includes": ["thread/epiphany/planning"], - "excludes": ["GUI planning table"] - }, - "acceptance_criteria": ["Projection returns planning counts."], - "lane_plan": { - "imagination": "Shape backlog and objective draft.", - "hands": "Wire protocol and app-server read." - }, - "review_gates": ["Human adoption required"], - "status": "draft" - }] - }, - "summary": { - "captureCount": 1, - "pendingCaptureCount": 1, - "githubIssueCaptureCount": 1, - "backlogItemCount": 1, - "readyBacklogItemCount": 1, - "roadmapStreamCount": 0, - "objectiveDraftCount": 1, - "draftObjectiveCount": 1, - "activeObjective": "Current adopted work", - "note": "Planning substrate is available." - } - } - }), - serde_json::to_value(&response)?, - ); - Ok(()) - } - #[test] fn serialize_thread_epiphany_graph_query_request_and_response() -> Result<()> { let request = ClientRequest::ThreadEpiphanyGraphQuery { @@ -4351,42 +3803,6 @@ mod tests { assert_eq!(reason, Some("thread/epiphany/retrieve")); } - #[test] - fn thread_epiphany_scene_is_marked_experimental() { - let request = ClientRequest::ThreadEpiphanyScene { - request_id: RequestId::Integer(1), - params: v2::ThreadEpiphanySceneParams { - thread_id: "thr_123".to_string(), - }, - }; - let reason = crate::experimental_api::ExperimentalApi::experimental_reason(&request); - assert_eq!(reason, Some("thread/epiphany/scene")); - } - - #[test] - fn thread_epiphany_jobs_is_marked_experimental() { - let request = ClientRequest::ThreadEpiphanyJobs { - request_id: RequestId::Integer(1), - params: v2::ThreadEpiphanyJobsParams { - thread_id: "thr_123".to_string(), - }, - }; - let reason = crate::experimental_api::ExperimentalApi::experimental_reason(&request); - assert_eq!(reason, Some("thread/epiphany/jobs")); - } - - #[test] - fn thread_epiphany_roles_is_marked_experimental() { - let request = ClientRequest::ThreadEpiphanyRoles { - request_id: RequestId::Integer(1), - params: v2::ThreadEpiphanyRolesParams { - thread_id: "thr_123".to_string(), - }, - }; - let reason = crate::experimental_api::ExperimentalApi::experimental_reason(&request); - assert_eq!(reason, Some("thread/epiphany/roles")); - } - #[test] fn thread_epiphany_role_launch_is_marked_experimental() { let request = ClientRequest::ThreadEpiphanyRoleLaunch { @@ -4461,18 +3877,6 @@ mod tests { assert_eq!(reason, Some("thread/epiphany/context")); } - #[test] - fn thread_epiphany_planning_is_marked_experimental() { - let request = ClientRequest::ThreadEpiphanyPlanning { - request_id: RequestId::Integer(1), - params: v2::ThreadEpiphanyPlanningParams { - thread_id: "thr_123".to_string(), - }, - }; - let reason = crate::experimental_api::ExperimentalApi::experimental_reason(&request); - assert_eq!(reason, Some("thread/epiphany/planning")); - } - #[test] fn thread_epiphany_reorient_launch_is_marked_experimental() { let request = ClientRequest::ThreadEpiphanyReorientLaunch { diff --git a/vendor/codex/codex-rs/app-server-protocol/src/protocol/v2.rs b/vendor/codex/codex-rs/app-server-protocol/src/protocol/v2.rs index 6bb10e79..dab9b11e 100644 --- a/vendor/codex/codex-rs/app-server-protocol/src/protocol/v2.rs +++ b/vendor/codex/codex-rs/app-server-protocol/src/protocol/v2.rs @@ -3925,21 +3925,6 @@ pub struct ThreadReadResponse { pub thread: Thread, } -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanySceneParams { - pub thread_id: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanySceneResponse { - pub thread_id: String, - pub scene: ThreadEpiphanyScene, -} - #[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] #[serde(rename_all = "camelCase")] #[ts(export_to = "v2/")] @@ -4169,46 +4154,6 @@ pub struct ThreadEpiphanySceneChurn { pub unexplained_writes: Option, } -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyJobsParams { - pub thread_id: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyJobsResponse { - pub thread_id: String, - pub source: ThreadEpiphanyJobsSource, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub state_revision: Option, - pub jobs: Vec, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyRolesParams { - pub thread_id: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyRolesResponse { - pub thread_id: String, - pub source: ThreadEpiphanyRolesSource, - pub state_status: ThreadEpiphanyReorientStateStatus, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub state_revision: Option, - pub roles: Vec, - pub note: String, -} - #[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] #[serde(rename_all = "camelCase")] #[ts(export_to = "v2/")] @@ -4475,14 +4420,6 @@ pub enum ThreadEpiphanyRoleSelfPersistenceStatus { Rejected, } -#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub enum ThreadEpiphanyJobsSource { - Stored, - Live, -} - #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] #[serde(rename_all = "camelCase")] #[ts(export_to = "v2/")] @@ -4693,27 +4630,6 @@ pub struct ThreadEpiphanyContextParams { pub include_linked_evidence: Option, } -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyPlanningParams { - pub thread_id: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyPlanningResponse { - pub thread_id: String, - pub source: ThreadEpiphanyContextSource, - pub state_status: ThreadEpiphanyContextStateStatus, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub state_revision: Option, - pub planning: CoreEpiphanyPlanningState, - pub summary: ThreadEpiphanyPlanningSummary, -} - #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] #[serde(rename_all = "camelCase")] #[ts(export_to = "v2/")] diff --git a/vendor/codex/codex-rs/app-server/README.md b/vendor/codex/codex-rs/app-server/README.md index c3ab2c9c..15f87f2a 100644 --- a/vendor/codex/codex-rs/app-server/README.md +++ b/vendor/codex/codex-rs/app-server/README.md @@ -148,7 +148,7 @@ Experimental Epiphany retrieval: - `thread/epiphany/promote` is an explicit loaded-thread-only promotion gate. It evaluates a patch plus verifier evidence, rejects with reasons without mutating state when policy fails, and applies the patch through the durable update path when accepted. Accepted responses include the landed `revision` and `changedFields`. - `thread/epiphany/update` is the explicit loaded-thread-only control-plane write path for Epiphany state. It can append observations/evidence and replace bounded typed state fields such as objective, subgoals, graph frontier/checkpoint, scratch, churn, and mode; it bumps the Epiphany revision, returns `revision` plus `changedFields`, and persists a rollout snapshot immediately. - `thread/epiphany/stateUpdated` is an experimental server notification emitted after successful `thread/epiphany/update` and accepted `thread/epiphany/promote`. It carries the updated typed `epiphanyState`, a `source` of `update` or `promote`, event-level `revision`, and typed `changedFields`; rejected promotions do not emit it. -- `thread/epiphany/jobsUpdated` is a sealed legacy notification shape. Epiphany no longer emits it from Codex batch-job progress; heartbeat/runtime-spine owns live activation telemetry, while `thread/epiphany/jobs` remains a read-only projection over current typed state. +- `thread/epiphany/jobsUpdated` is a sealed legacy notification shape. Epiphany no longer emits it from Codex batch-job progress; heartbeat/runtime-spine owns live activation telemetry, while the `jobs` lens on `thread/epiphany/view` remains a read-only projection over current typed state. - `thread/epiphany/freshness` is a read-only reflection surface for retrieval and graph staleness. It reports revision/source identity, retrieval freshness, graph freshness, and exact dirty-path pressure, and for loaded threads now also reports watcher-backed invalidation inputs with watched root, changed paths, mapped graph-node hits, and active-frontier hits. It still does not mutate state, schedule refresh work, or perform automatic watcher-driven semantic invalidation. - `thread/epiphany/reorient` is a read-only CRRC policy surface. It consumes the durable investigation checkpoint plus freshness, watcher, and pressure signals to return a bounded `resume` versus `regather` verdict with explicit checkpoint-path/frontier reasons. It does not mutate state, compact, notify, schedule, or silently continue work on the caller's behalf. The request envelope is camelCase, but nested reused Epiphany core DTOs currently keep their core snake_case fields, such as `source_kind`, `understanding_status`, and `diff_pressure`. diff --git a/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs b/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs index a22e312b..e1491301 100644 --- a/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs +++ b/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs @@ -184,11 +184,6 @@ use codex_app_server_protocol::ThreadEpiphanyJobKind; use codex_app_server_protocol::ThreadEpiphanyJobLaunchParams; use codex_app_server_protocol::ThreadEpiphanyJobLaunchResponse; use codex_app_server_protocol::ThreadEpiphanyJobStatus; -use codex_app_server_protocol::ThreadEpiphanyJobsParams; -use codex_app_server_protocol::ThreadEpiphanyJobsResponse; -use codex_app_server_protocol::ThreadEpiphanyJobsSource; -use codex_app_server_protocol::ThreadEpiphanyPlanningParams; -use codex_app_server_protocol::ThreadEpiphanyPlanningResponse; use codex_app_server_protocol::ThreadEpiphanyPlanningSummary; use codex_app_server_protocol::ThreadEpiphanyPressure; use codex_app_server_protocol::ThreadEpiphanyPressureBasis; @@ -233,18 +228,14 @@ use codex_app_server_protocol::ThreadEpiphanyRoleResultStatus; use codex_app_server_protocol::ThreadEpiphanyRoleSelfPersistenceReview; use codex_app_server_protocol::ThreadEpiphanyRoleSelfPersistenceStatus; use codex_app_server_protocol::ThreadEpiphanyRoleStatus; -use codex_app_server_protocol::ThreadEpiphanyRolesParams; -use codex_app_server_protocol::ThreadEpiphanyRolesResponse; use codex_app_server_protocol::ThreadEpiphanyRolesSource; use codex_app_server_protocol::ThreadEpiphanyScene; use codex_app_server_protocol::ThreadEpiphanySceneAction; use codex_app_server_protocol::ThreadEpiphanySceneChurn; use codex_app_server_protocol::ThreadEpiphanySceneGraph; use codex_app_server_protocol::ThreadEpiphanySceneInvestigationCheckpoint; -use codex_app_server_protocol::ThreadEpiphanySceneParams; use codex_app_server_protocol::ThreadEpiphanySceneRecord; use codex_app_server_protocol::ThreadEpiphanySceneRecords; -use codex_app_server_protocol::ThreadEpiphanySceneResponse; use codex_app_server_protocol::ThreadEpiphanySceneRetrieval; use codex_app_server_protocol::ThreadEpiphanySceneSource; use codex_app_server_protocol::ThreadEpiphanySceneStateStatus; @@ -1113,22 +1104,10 @@ impl CodexMessageProcessor { self.thread_read(to_connection_request_id(request_id), params) .await; } - ClientRequest::ThreadEpiphanyScene { request_id, params } => { - self.thread_epiphany_scene(to_connection_request_id(request_id), params) - .await; - } ClientRequest::ThreadEpiphanyView { request_id, params } => { self.thread_epiphany_view(to_connection_request_id(request_id), params) .await; } - ClientRequest::ThreadEpiphanyJobs { request_id, params } => { - self.thread_epiphany_jobs(to_connection_request_id(request_id), params) - .await; - } - ClientRequest::ThreadEpiphanyRoles { request_id, params } => { - self.thread_epiphany_roles(to_connection_request_id(request_id), params) - .await; - } ClientRequest::ThreadEpiphanyRoleLaunch { request_id, params } => { self.thread_epiphany_role_launch(to_connection_request_id(request_id), params) .await; @@ -1149,10 +1128,6 @@ impl CodexMessageProcessor { self.thread_epiphany_context(to_connection_request_id(request_id), params) .await; } - ClientRequest::ThreadEpiphanyPlanning { request_id, params } => { - self.thread_epiphany_planning(to_connection_request_id(request_id), params) - .await; - } ClientRequest::ThreadEpiphanyGraphQuery { request_id, params } => { self.thread_epiphany_graph_query(to_connection_request_id(request_id), params) .await; @@ -4240,41 +4215,6 @@ impl CodexMessageProcessor { self.outgoing.send_response(request_id, response).await; } - async fn thread_epiphany_scene( - &self, - request_id: ConnectionRequestId, - params: ThreadEpiphanySceneParams, - ) { - let ThreadEpiphanySceneParams { thread_id } = params; - - let thread_uuid = match ThreadId::from_string(&thread_id) { - Ok(id) => id, - Err(err) => { - self.send_invalid_request_error(request_id, format!("invalid thread id: {err}")) - .await; - return; - } - }; - - let loaded = self.thread_manager.get_thread(thread_uuid).await.is_ok(); - let thread = match self.read_thread_view(thread_uuid, false).await { - Ok(thread) => thread, - Err(ThreadReadViewError::InvalidRequest(message)) => { - self.send_invalid_request_error(request_id, message).await; - return; - } - Err(ThreadReadViewError::Internal(message)) => { - self.send_internal_error(request_id, message).await; - return; - } - }; - let response = ThreadEpiphanySceneResponse { - thread_id, - scene: map_epiphany_scene(thread.epiphany_state.as_ref(), loaded), - }; - self.outgoing.send_response(request_id, response).await; - } - async fn thread_epiphany_view( &self, request_id: ConnectionRequestId, @@ -4746,200 +4686,6 @@ impl CodexMessageProcessor { self.outgoing.send_response(request_id, response).await; } - async fn thread_epiphany_jobs( - &self, - request_id: ConnectionRequestId, - params: ThreadEpiphanyJobsParams, - ) { - let ThreadEpiphanyJobsParams { thread_id } = params; - - let thread_uuid = match ThreadId::from_string(&thread_id) { - Ok(id) => id, - Err(err) => { - self.send_invalid_request_error(request_id, format!("invalid thread id: {err}")) - .await; - return; - } - }; - - let loaded_thread = self.thread_manager.get_thread(thread_uuid).await.ok(); - let loaded = loaded_thread.is_some(); - let thread = match self.read_thread_view(thread_uuid, false).await { - Ok(thread) => thread, - Err(ThreadReadViewError::InvalidRequest(message)) => { - self.send_invalid_request_error(request_id, message).await; - return; - } - Err(ThreadReadViewError::Internal(message)) => { - self.send_internal_error(request_id, message).await; - return; - } - }; - - let retrieval_override = if thread - .epiphany_state - .as_ref() - .and_then(|state| state.retrieval.as_ref()) - .is_none() - { - if let Some(loaded_thread) = loaded_thread.as_ref() { - Some(loaded_thread.epiphany_retrieval_state().await) - } else { - None - } - } else { - None - }; - let response = ThreadEpiphanyJobsResponse { - thread_id, - source: if loaded { - ThreadEpiphanyJobsSource::Live - } else { - ThreadEpiphanyJobsSource::Stored - }, - state_revision: thread - .epiphany_state - .as_ref() - .map(|epiphany_state| epiphany_state.revision), - jobs: map_epiphany_jobs(thread.epiphany_state.as_ref(), retrieval_override.as_ref()), - }; - self.outgoing.send_response(request_id, response).await; - } - - async fn thread_epiphany_roles( - &self, - request_id: ConnectionRequestId, - params: ThreadEpiphanyRolesParams, - ) { - let ThreadEpiphanyRolesParams { thread_id } = params; - - let thread_uuid = match ThreadId::from_string(&thread_id) { - Ok(id) => id, - Err(err) => { - self.send_invalid_request_error(request_id, format!("invalid thread id: {err}")) - .await; - return; - } - }; - - let loaded_thread = self.thread_manager.get_thread(thread_uuid).await.ok(); - let loaded = loaded_thread.is_some(); - let thread = match self.read_thread_view(thread_uuid, false).await { - Ok(thread) => thread, - Err(ThreadReadViewError::InvalidRequest(message)) => { - self.send_invalid_request_error(request_id, message).await; - return; - } - Err(ThreadReadViewError::Internal(message)) => { - self.send_internal_error(request_id, message).await; - return; - } - }; - - let retrieval_override = if let Some(loaded_thread) = loaded_thread.as_ref() { - Some(loaded_thread.epiphany_retrieval_state().await) - } else { - None - }; - let watcher_snapshot = if let Some(loaded_thread) = loaded_thread.as_ref() { - let config_snapshot = loaded_thread.config_snapshot().await; - self.epiphany_invalidation_manager - .ensure_thread_watch(&thread_id, &config_snapshot.cwd) - .await; - Some( - self.epiphany_invalidation_manager - .snapshot(&thread_id) - .await, - ) - } else { - None - }; - let (source, token_usage_info) = if let Some(loaded_thread) = loaded_thread.as_ref() { - ( - ThreadEpiphanyRolesSource::Live, - loaded_thread.token_usage_info().await, - ) - } else { - let token_usage_info = match thread.path.as_deref() { - Some(path) => latest_token_usage_info_from_rollout_path(path).await, - None => None, - }; - (ThreadEpiphanyRolesSource::Stored, token_usage_info) - }; - - let (state_revision, retrieval, graph, watcher) = map_epiphany_freshness( - thread.epiphany_state.as_ref(), - retrieval_override.as_ref(), - watcher_snapshot.as_ref(), - ); - let pressure = map_epiphany_pressure(token_usage_info.as_ref()); - let (state_status, decision) = map_epiphany_reorient( - thread.epiphany_state.as_ref(), - &pressure, - &retrieval, - &graph, - &watcher, - ); - - let runtime_store_path = if let Some(loaded_thread) = loaded_thread.as_ref() { - Some(loaded_thread.epiphany_runtime_spine_store_path().await) - } else { - None - }; - let jobs = map_epiphany_jobs(thread.epiphany_state.as_ref(), retrieval_override.as_ref()); - let reorient_job = jobs - .iter() - .find(|job| job.id == EPIPHANY_REORIENT_LAUNCH_BINDING_ID) - .cloned(); - let (result_status, finding, _) = load_epiphany_reorient_result_snapshot( - thread.epiphany_state.as_ref(), - runtime_store_path.as_deref(), - EPIPHANY_REORIENT_LAUNCH_BINDING_ID, - ) - .await; - let checkpoint_present = thread - .epiphany_state - .as_ref() - .and_then(|state| state.investigation_checkpoint.as_ref()) - .is_some(); - let recommendation = map_epiphany_crrc_recommendation( - loaded, - state_status, - &pressure, - &decision, - result_status, - checkpoint_present, - finding.is_some(), - finding.as_ref().is_some_and(|finding| { - thread - .epiphany_state - .as_ref() - .is_some_and(|state| epiphany_reorient_finding_already_accepted(state, finding)) - }), - ); - - let roles = map_epiphany_roles( - thread.epiphany_state.as_ref(), - &jobs, - &decision, - &pressure, - &recommendation, - result_status, - reorient_job.as_ref(), - ); - let note = render_epiphany_roles_note(&roles, state_status, recommendation.action); - - let response = ThreadEpiphanyRolesResponse { - thread_id, - source, - state_status, - state_revision, - roles, - note, - }; - self.outgoing.send_response(request_id, response).await; - } - async fn thread_epiphany_role_launch( &self, request_id: ConnectionRequestId, @@ -5571,51 +5317,6 @@ impl CodexMessageProcessor { self.outgoing.send_response(request_id, response).await; } - async fn thread_epiphany_planning( - &self, - request_id: ConnectionRequestId, - params: ThreadEpiphanyPlanningParams, - ) { - let thread_id = params.thread_id.clone(); - let thread_uuid = match ThreadId::from_string(&thread_id) { - Ok(id) => id, - Err(err) => { - self.send_invalid_request_error(request_id, format!("invalid thread id: {err}")) - .await; - return; - } - }; - - let loaded = self.thread_manager.get_thread(thread_uuid).await.is_ok(); - let thread = match self.read_thread_view(thread_uuid, false).await { - Ok(thread) => thread, - Err(ThreadReadViewError::InvalidRequest(message)) => { - self.send_invalid_request_error(request_id, message).await; - return; - } - Err(ThreadReadViewError::Internal(message)) => { - self.send_internal_error(request_id, message).await; - return; - } - }; - - let (state_status, state_revision, planning, summary) = - map_epiphany_planning(thread.epiphany_state.as_ref()); - let response = ThreadEpiphanyPlanningResponse { - thread_id, - source: if loaded { - ThreadEpiphanyContextSource::Live - } else { - ThreadEpiphanyContextSource::Stored - }, - state_status, - state_revision, - planning, - summary, - }; - self.outgoing.send_response(request_id, response).await; - } - async fn thread_epiphany_graph_query( &self, request_id: ConnectionRequestId,