diff --git a/epiphany-codex-bridge/src/coordinator.rs b/epiphany-codex-bridge/src/coordinator.rs index e62c0450..d0089f81 100644 --- a/epiphany-codex-bridge/src/coordinator.rs +++ b/epiphany-codex-bridge/src/coordinator.rs @@ -72,6 +72,7 @@ use crate::pressure::derive_epiphany_pressure; use crate::reorient::EpiphanyFreshnessWatcherSnapshot; use crate::reorient::derive_epiphany_freshness_view; use crate::reorient::derive_epiphany_reorient; +use crate::reorient::map_protocol_reorient_state_status; use crate::runtime_results::load_core_epiphany_reorient_result_snapshot; use crate::runtime_results::load_core_epiphany_role_result_snapshot; @@ -402,10 +403,10 @@ pub async fn derive_epiphany_coordinator_status( pub fn map_epiphany_coordinator_view( thread_id: String, loaded: bool, - state_status: ThreadEpiphanyReorientStateStatus, + state_status: CoreEpiphanyReorientStateStatus, state_revision: Option, status: EpiphanyCoordinatorStatus, - roles: Vec, + roles: EpiphanyRoleBoardStatus, ) -> ThreadEpiphanyViewCoordinator { ThreadEpiphanyViewCoordinator { thread_id, @@ -414,7 +415,7 @@ pub fn map_epiphany_coordinator_view( } else { ThreadEpiphanyRolesSource::Stored }, - state_status, + state_status: map_protocol_reorient_state_status(state_status), state_revision, action: map_protocol_coordinator_action(status.decision.action), target_role: status @@ -429,7 +430,7 @@ pub fn map_epiphany_coordinator_view( can_auto_run: status.decision.can_auto_run, reason: status.decision.reason, source_signals: map_protocol_coordinator_source_signals(status.source_signals), - roles, + roles: map_protocol_role_board_lanes(&roles), note: status.note, } } diff --git a/epiphany-codex-bridge/src/view.rs b/epiphany-codex-bridge/src/view.rs index 62824996..a3360f3b 100644 --- a/epiphany-codex-bridge/src/view.rs +++ b/epiphany-codex-bridge/src/view.rs @@ -336,7 +336,6 @@ pub async fn map_epiphany_view_response( recommendation.as_ref(), roles.clone(), ) { - let protocol_roles = map_protocol_role_board_lanes(&roles); let status = derive_epiphany_coordinator_status( state, runtime_store_path, @@ -353,10 +352,10 @@ pub async fn map_epiphany_view_response( Some(map_epiphany_coordinator_view( thread_id.clone(), loaded, - reorient_state_status, + core_reorient_state_status, state_revision, status, - protocol_roles, + roles, )) } else { None diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index b471b588..07de4a4d 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -73,6 +73,7 @@ remembers doctrine; the branch remembers the blade. - Changed-field derivation now inspects typed `EpiphanyRoleStatePatchDocument` directly. The bridge no longer converts typed patches back into `ThreadEpiphanyUpdatePatch` merely to calculate changed fields. - View-lens orchestration now uses bridge-native `EpiphanyViewLens` selectors. App-server converts `ThreadEpiphanyViewLens` at the request wall, and the bridge maps back only for the legacy response echo. - Coordinator status derivation now receives core `EpiphanyCrrcResultStatus` for reorient result state; `ThreadEpiphanyReorientResultStatus` is projection-only for coordinator/view responses. +- Coordinator view response assembly now receives core reorient state and role-board status; `ThreadEpiphanyReorientStateStatus` / `ThreadEpiphanyRoleLane` are projected inside the response builder. - MCP remains JSON because MCP is a JSON protocol. The latest processor cut only moved MCP refresh/OAuth/status/resource/tool-call route handling into `codex_message_processor/mcp_routes.rs`, reducing the root processor to about 8,977 lines; it did not claim MCP payloads are CultNet or make MCP an Epiphany-owned runtime contract. - Codex account auth route handling remains in vendored Codex but now lives in `codex_message_processor/auth_routes.rs`: API-key login, ChatGPT browser/device-code/external-token login, logout, auth status, account, rate limits, and add-credits nudge handling. This preserves Codex ownership of subscription auth while cutting the root processor to about 8,094 lines. - One-off command execution and command stream write/resize/terminate route handling now live in `codex_message_processor/command_routes.rs`; `CommandExecManager` remains the lifecycle owner, while the root processor is about 7,800 lines. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index 2a74f396..84c52e65 100644 Binary files a/state/ledgers.msgpack and b/state/ledgers.msgpack differ diff --git a/state/map.yaml b/state/map.yaml index d9c47650..272903af 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -369,6 +369,9 @@ current_status: bridge maps back only for the legacy response `lenses` echo. Coordinator status derivation now receives core `EpiphanyCrrcResultStatus` for reorient result state instead of protocol `ThreadEpiphanyReorientResultStatus`. + Coordinator view response assembly now receives core reorient state and + role-board status, projecting `ThreadEpiphanyReorientStateStatus` / + `ThreadEpiphanyRoleLane` only while building the legacy response. The bridge still depends on vendored Codex for app-server protocol DTOs and absolute path validation, so the purification is not done. next_action: Continue Codex starvation and CultNet liberation by cutting bridge-internal `ThreadEpiphany*` authority. Prioritize role-result/reorient-result DTO coupling next: derive typed CultNet surfaces first, push JSON-RPC projection into app-server, and keep MCP/OpenAI JSON only at their true protocol/text edges. Do not add compatibility adapters unless they protect a named ownership invariant.