Keep context request cargo core-shaped
This commit is contained in:
parent
45ad254bab
commit
30bc373b2f
5 changed files with 17 additions and 12 deletions
|
|
@ -1,7 +1,9 @@
|
|||
use std::path::Path;
|
||||
|
||||
use codex_app_server_protocol::*;
|
||||
use epiphany_core::EpiphanyContextParams;
|
||||
use epiphany_core::EpiphanyDistillInput;
|
||||
use epiphany_core::EpiphanyGraphQuery;
|
||||
use epiphany_core::EpiphanyMapProposalInput;
|
||||
use epiphany_core::EpiphanySceneInput;
|
||||
use epiphany_core::EpiphanyTokenUsageSnapshot;
|
||||
|
|
@ -11,8 +13,6 @@ use epiphany_core::propose_map_update;
|
|||
use epiphany_state_model::EpiphanyRetrievalState;
|
||||
use epiphany_state_model::EpiphanyThreadState;
|
||||
|
||||
use crate::context::map_core_epiphany_context_params;
|
||||
use crate::context::map_core_epiphany_graph_query;
|
||||
use crate::context::map_epiphany_context;
|
||||
use crate::context::map_epiphany_graph_query;
|
||||
use crate::context::map_epiphany_planning;
|
||||
|
|
@ -117,11 +117,9 @@ pub fn map_epiphany_context_response(
|
|||
thread_id: String,
|
||||
loaded: bool,
|
||||
state: Option<&EpiphanyThreadState>,
|
||||
params: &ThreadEpiphanyContextParams,
|
||||
params: &EpiphanyContextParams,
|
||||
) -> ThreadEpiphanyContextResponse {
|
||||
let core_params = map_core_epiphany_context_params(params);
|
||||
let (state_status, state_revision, context, missing) =
|
||||
map_epiphany_context(state, &core_params);
|
||||
let (state_status, state_revision, context, missing) = map_epiphany_context(state, params);
|
||||
ThreadEpiphanyContextResponse {
|
||||
thread_id,
|
||||
source: if loaded {
|
||||
|
|
@ -140,11 +138,10 @@ pub fn map_epiphany_graph_query_response(
|
|||
thread_id: String,
|
||||
loaded: bool,
|
||||
state: Option<&EpiphanyThreadState>,
|
||||
query: &ThreadEpiphanyGraphQuery,
|
||||
query: &EpiphanyGraphQuery,
|
||||
) -> ThreadEpiphanyGraphQueryResponse {
|
||||
let core_query = map_core_epiphany_graph_query(query);
|
||||
let (state_status, state_revision, graph, frontier, checkpoint, matched, missing) =
|
||||
map_epiphany_graph_query(state, &core_query);
|
||||
map_epiphany_graph_query(state, query);
|
||||
ThreadEpiphanyGraphQueryResponse {
|
||||
thread_id,
|
||||
source: if loaded {
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ remembers doctrine; the branch remembers the blade.
|
|||
- 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`.
|
||||
- Coordinator note rendering now consumes core CRRC/coordinator actions, pressure, and role/reorient result statuses. `ThreadEpiphany*` status/action DTOs are no longer the native shape for that prompt/text policy helper.
|
||||
- Context and graph-query response builders now take core `EpiphanyContextParams` / `EpiphanyGraphQuery` documents. App-server read routes convert `ThreadEpiphanyContextParams` / `ThreadEpiphanyGraphQuery` at the JSON-RPC wall before invoking bridge derivation.
|
||||
- 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.
|
|
@ -352,7 +352,10 @@ current_status:
|
|||
Coordinator note rendering now consumes core CRRC/coordinator actions,
|
||||
pressure, and role/reorient result statuses instead of protocol
|
||||
`ThreadEpiphany*` action/status DTOs, so prompt/text policy no longer
|
||||
treats JSON-RPC enums as its native fact shape.
|
||||
treats JSON-RPC enums as its native fact shape. Context and graph-query
|
||||
response builders now receive core `EpiphanyContextParams` /
|
||||
`EpiphanyGraphQuery`; app-server read routes convert JSON-RPC request cargo
|
||||
before invoking the bridge.
|
||||
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.
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ use codex_app_server_protocol::*;
|
|||
use codex_core::CodexThread;
|
||||
use codex_protocol::ThreadId;
|
||||
use codex_protocol::protocol::EpiphanyRetrievalState;
|
||||
use epiphany_codex_bridge::context::map_core_epiphany_context_params;
|
||||
use epiphany_codex_bridge::context::map_core_epiphany_graph_query;
|
||||
use epiphany_codex_bridge::cultnet::EpiphanyFreshnessSurface;
|
||||
use epiphany_codex_bridge::cultnet::EpiphanyGraphFreshnessStatus;
|
||||
use epiphany_codex_bridge::cultnet::EpiphanyInvalidationStatus;
|
||||
|
|
@ -309,11 +311,12 @@ impl CodexMessageProcessor {
|
|||
}
|
||||
};
|
||||
|
||||
let core_params = map_core_epiphany_context_params(¶ms);
|
||||
let response = map_epiphany_context_response(
|
||||
thread_id,
|
||||
loaded,
|
||||
thread.epiphany_state.as_ref(),
|
||||
¶ms,
|
||||
&core_params,
|
||||
);
|
||||
self.outgoing.send_response(request_id, response).await;
|
||||
}
|
||||
|
|
@ -346,11 +349,12 @@ impl CodexMessageProcessor {
|
|||
}
|
||||
};
|
||||
|
||||
let core_query = map_core_epiphany_graph_query(¶ms.query);
|
||||
let response = map_epiphany_graph_query_response(
|
||||
thread_id,
|
||||
loaded,
|
||||
thread.epiphany_state.as_ref(),
|
||||
¶ms.query,
|
||||
&core_query,
|
||||
);
|
||||
self.outgoing.send_response(request_id, response).await;
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue