From 27f88bfaefd173bb5b6372e3fa1bd1c89b7e4f3d Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Wed, 20 May 2026 14:44:13 +0100 Subject: [PATCH] Remove pressure protocol helper --- epiphany-codex-bridge/src/pressure.rs | 8 -------- epiphany-codex-bridge/src/view.rs | 5 +++-- notes/fresh-workspace-handoff.md | 1 + state/ledgers.msgpack | Bin 144648 -> 144871 bytes state/map.yaml | 3 +++ 5 files changed, 7 insertions(+), 10 deletions(-) diff --git a/epiphany-codex-bridge/src/pressure.rs b/epiphany-codex-bridge/src/pressure.rs index 44958f8e..9b17e9c4 100644 --- a/epiphany-codex-bridge/src/pressure.rs +++ b/epiphany-codex-bridge/src/pressure.rs @@ -1,4 +1,3 @@ -use codex_app_server_protocol::ThreadEpiphanyPressure; use epiphany_core::EpiphanyPressure; use epiphany_core::EpiphanyPressureLevel as CoreEpiphanyPressureLevel; use epiphany_core::EpiphanyPressureStatus as CoreEpiphanyPressureStatus; @@ -7,18 +6,11 @@ use epiphany_core::derive_pressure_view; use crate::launch::epiphany_agent_prompt_with_memory; use crate::launch::epiphany_specialist_prompt_config; -use crate::protocol_edge::protocol_pressure_from_core; pub fn derive_epiphany_pressure(snapshot: Option<&EpiphanyTokenUsageSnapshot>) -> EpiphanyPressure { derive_pressure_view(snapshot) } -pub fn map_epiphany_pressure( - snapshot: Option<&EpiphanyTokenUsageSnapshot>, -) -> ThreadEpiphanyPressure { - protocol_pressure_from_core(derive_epiphany_pressure(snapshot)) -} - pub fn should_run_epiphany_pre_compaction_checkpoint_intervention( pressure: &EpiphanyPressure, ) -> bool { diff --git a/epiphany-codex-bridge/src/view.rs b/epiphany-codex-bridge/src/view.rs index 5176968a..0a193e01 100644 --- a/epiphany-codex-bridge/src/view.rs +++ b/epiphany-codex-bridge/src/view.rs @@ -34,8 +34,8 @@ use crate::cultnet::EpiphanySurfaceSource; use crate::jobs::map_epiphany_jobs; use crate::launch::EPIPHANY_REORIENT_LAUNCH_BINDING_ID; use crate::pressure::derive_epiphany_pressure; -use crate::pressure::map_epiphany_pressure; use crate::protocol_edge::protocol_job_from_surface; +use crate::protocol_edge::protocol_pressure_from_core; use crate::protocol_edge::protocol_reorient_decision; use crate::protocol_edge::protocol_reorient_finding; use crate::protocol_edge::protocol_reorient_result_status; @@ -169,7 +169,8 @@ pub async fn map_epiphany_view_response( let needs_reorientation_inputs = epiphany_view_needs_reorientation_inputs(&lenses); let needs_pressure = epiphany_view_needs_pressure(&lenses); let core_pressure = needs_pressure.then(|| derive_epiphany_pressure(token_usage_info)); - let pressure = needs_pressure.then(|| map_epiphany_pressure(token_usage_info)); + let pressure = needs_pressure + .then(|| protocol_pressure_from_core(derive_epiphany_pressure(token_usage_info))); let core_freshness = needs_reorientation_inputs .then(|| derive_epiphany_freshness_view(state, retrieval_override, watcher_snapshot)); let (state_revision, core_reorient_state_status, core_reorient_decision) = diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 37c3d678..dac79d4d 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -86,6 +86,7 @@ remembers doctrine; the branch remembers the blade. - Reorientation derivation is typed-only too. `reorient.rs` no longer imports app-server protocol DTOs and no longer exposes the unused freshness DTO tuple; view/coordinator response builders call `protocol_edge` for reorient state/decision projection. - Result projection moved to the edge. `results.rs` now renders typed result notes only; `protocol_edge` owns role-id request conversion plus role/reorient finding and state-patch projection for Codex JSON-RPC responses. - State-updated notification projection moved to the edge as well. `mutation.rs` now owns typed mutation/acceptance mechanics without importing app-server protocol DTOs. +- `pressure.rs` is typed-only now. The convenience helper returning `ThreadEpiphanyPressure` was deleted; view response assembly derives typed pressure and calls `protocol_edge` for projection. - 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 c5aeac9f4ea4a581e6da36e5286afcabcf07fcaf..0a259b8995447653cdc32c4397dd98fa39e5a8e3 100644 GIT binary patch delta 207 zcmeBp#qs<##{^|2)3qB_3mF+#Hcw}4pU%j*eL5pkjIqd+okj*mX1WHZx<&>ehQ?MV z##W}&H*R5+(%leHlv-R|T9m4go1ape1EdmDQWZ)n3sO^b^Yd~ltrSvHb5cuEQxr-v zQm213WRg%!&d)1L&C5*9OHNhDNX;ooEwWZ9%S3p`a+gBtJPnCq6YLJyjtszX&9fm6}|VnV+Y(1=D4QQ2>jXM@0Yt delta 52 zcmaF