Remove pressure protocol helper
This commit is contained in:
parent
2bf0506167
commit
27f88bfaef
5 changed files with 7 additions and 10 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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) =
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -421,6 +421,9 @@ current_status:
|
|||
State-updated notification projection also moved to `protocol_edge`:
|
||||
`mutation.rs` now owns typed mutation and acceptance mechanics without
|
||||
importing Codex app-server protocol DTOs.
|
||||
`pressure.rs` is typed-only now as well: the last convenience helper that
|
||||
returned `ThreadEpiphanyPressure` was deleted, and view response assembly
|
||||
explicitly derives typed pressure before calling `protocol_edge`.
|
||||
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 response/projection authority. Prioritize the next coordinator/view seam that still composes policy-shaped facts instead of merely loading host facts and projecting core surfaces; keep MCP/OpenAI JSON only at their true protocol/text edges. Do not add compatibility adapters unless they protect a named ownership invariant.
|
||||
|
|
|
|||
Reference in a new issue