diff --git a/epiphany-codex-bridge/src/launch.rs b/epiphany-codex-bridge/src/launch.rs index 26459fa9..521bf02d 100644 --- a/epiphany-codex-bridge/src/launch.rs +++ b/epiphany-codex-bridge/src/launch.rs @@ -601,7 +601,7 @@ pub fn build_epiphany_job_launch_request( linked_subgoal_ids: Vec, linked_graph_node_ids: Vec, instruction: String, - launch_document: ThreadEpiphanyWorkerLaunchDocument, + launch_document: EpiphanyWorkerLaunchDocument, output_contract_id: String, max_runtime_seconds: Option, ) -> EpiphanyJobLaunchRequest { @@ -615,7 +615,7 @@ pub fn build_epiphany_job_launch_request( linked_subgoal_ids, linked_graph_node_ids, instruction, - launch_document: map_core_worker_launch_document(launch_document), + launch_document, output_contract_id, max_runtime_seconds, } diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 85fedce6..78135f13 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -64,6 +64,7 @@ remembers doctrine; the branch remembers the blade. - Changed-field authority is native now. `EpiphanyStateUpdatedField` lives in `epiphany-core`; bridge mutation results carry that typed enum, while app-server projects it into `ThreadEpiphanyStateUpdatedField` only for JSON-RPC responses and notifications. - Role launch, role accept, and role-result runtime lookup now use core `EpiphanyRoleResultRoleId` inside the bridge. App-server maps `ThreadEpiphanyRoleId` at the JSON-RPC boundary and keeps it only for legacy request/response shape. - Reorient launch service results now use typed `EpiphanySurfaceSource`; app-server projects it into `ThreadEpiphanyReorientSource` only for the legacy launch response. +- Generic job launch now converts protocol `ThreadEpiphanyWorkerLaunchDocument` cargo at the app-server edge before building the core `EpiphanyJobLaunchRequest`; the bridge launch builder takes a typed `EpiphanyWorkerLaunchDocument`. - 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 e7a6286c..fa71178a 100644 Binary files a/state/ledgers.msgpack and b/state/ledgers.msgpack differ diff --git a/state/map.yaml b/state/map.yaml index c652d327..35c794a8 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -346,7 +346,9 @@ current_status: use core `EpiphanyRoleResultRoleId` internally; app-server maps `ThreadEpiphanyRoleId` at the request/response edge. Reorient launch service results now use typed `EpiphanySurfaceSource`; app-server maps that - to `ThreadEpiphanyReorientSource` only for 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. + to `ThreadEpiphanyReorientSource` only for the legacy response. Generic job + launch now converts protocol `ThreadEpiphanyWorkerLaunchDocument` cargo at + the app-server edge before building the core `EpiphanyJobLaunchRequest`. + 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. diff --git a/vendor/codex/codex-rs/app-server/src/codex_message_processor/epiphany_mutation_routes.rs b/vendor/codex/codex-rs/app-server/src/codex_message_processor/epiphany_mutation_routes.rs index 3f3c419f..5f52b817 100644 --- a/vendor/codex/codex-rs/app-server/src/codex_message_processor/epiphany_mutation_routes.rs +++ b/vendor/codex/codex-rs/app-server/src/codex_message_processor/epiphany_mutation_routes.rs @@ -20,6 +20,7 @@ use epiphany_codex_bridge::invalidation::epiphany_freshness_watcher_snapshot; use epiphany_codex_bridge::launch::EPIPHANY_REORIENT_LAUNCH_BINDING_ID; use epiphany_codex_bridge::launch::build_epiphany_job_launch_request; use epiphany_codex_bridge::launch::epiphany_role_binding_id; +use epiphany_codex_bridge::launch::map_core_worker_launch_document; use epiphany_codex_bridge::mutation::core_state_patch_from_protocol; use epiphany_codex_bridge::mutation::epiphany_state_updated_notification; use epiphany_codex_bridge::mutation::map_protocol_state_updated_fields; @@ -622,6 +623,7 @@ impl CodexMessageProcessor { }; let host = EpiphanyCodexThreadHost::new(thread.as_ref()); + let core_launch_document = map_core_worker_launch_document(launch_document); let applied = match launch_thread_epiphany_job( &host, build_epiphany_job_launch_request( @@ -634,7 +636,7 @@ impl CodexMessageProcessor { linked_subgoal_ids, linked_graph_node_ids, instruction, - launch_document, + core_launch_document, output_contract_id, max_runtime_seconds, ),