Move distill request mapping to app server
This commit is contained in:
parent
157f1f0864
commit
0e7a11b9f6
5 changed files with 28 additions and 25 deletions
|
|
@ -595,28 +595,6 @@ pub fn map_epiphany_distill_response(
|
|||
})
|
||||
}
|
||||
|
||||
pub fn map_core_epiphany_distill_input(
|
||||
params: ThreadEpiphanyDistillParams,
|
||||
) -> EpiphanyDistillInput {
|
||||
let ThreadEpiphanyDistillParams {
|
||||
source_kind,
|
||||
status,
|
||||
text,
|
||||
subject,
|
||||
evidence_kind,
|
||||
code_refs,
|
||||
..
|
||||
} = params;
|
||||
EpiphanyDistillInput {
|
||||
source_kind,
|
||||
status,
|
||||
text,
|
||||
subject,
|
||||
evidence_kind,
|
||||
code_refs,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn map_epiphany_propose_response(
|
||||
state: EpiphanyThreadState,
|
||||
observation_ids: Vec<String>,
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@ remembers doctrine; the branch remembers the blade.
|
|||
- Coordinator finding signals are also core-owned. `derive_coordinator_finding_signals` derives modeling/verification/reorient accepted, reviewable, coverage, verdict, and evidence sequencing facts from typed findings plus `EpiphanyThreadState`; the bridge now loads snapshots/state and projects legacy JSON-RPC responses instead of keeping a duplicate acceptance tribunal.
|
||||
- View lens selector semantics are core-owned now. `EpiphanyViewLens`, default view lenses, and lens dependency planning live in `epiphany-core`; app-server converts JSON-RPC lens params to core selectors and asks core which jobs/pressure/runtime/reorientation facts must be loaded.
|
||||
- Context and graph-query request conversion now belongs to the app-server JSON-RPC wall. `epiphany-codex-bridge::context` receives core `EpiphanyContextParams` / `EpiphanyGraphQuery` and only projects core context/query views back into legacy response DTOs.
|
||||
- Distill request conversion also belongs to the app-server wall. The bridge distill response builder consumes core `EpiphanyDistillInput`; `ThreadEpiphanyDistillParams` should not re-enter bridge policy.
|
||||
- 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.
|
|
@ -384,7 +384,9 @@ current_status:
|
|||
need to load before legacy response projection. Context and graph-query
|
||||
request DTO conversion moved to the app-server JSON-RPC wall, so the bridge
|
||||
receives core `EpiphanyContextParams` / `EpiphanyGraphQuery` documents
|
||||
instead of owning request-side protocol mapping. Reorient worker launch-request/document
|
||||
instead of owning request-side protocol mapping. Distill request DTO
|
||||
conversion also moved to the app-server wall; bridge distill response
|
||||
construction receives core `EpiphanyDistillInput`. Reorient worker launch-request/document
|
||||
composition also moved behind a typed core seam
|
||||
(`EpiphanyReorientLaunchRequestInput` -> `EpiphanyJobLaunchRequest`);
|
||||
bridge supplies only the prompt instruction and retained compatibility
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ use epiphany_codex_bridge::view::EpiphanyReorientResultResponseInput;
|
|||
use epiphany_codex_bridge::view::EpiphanyRoleResultResponseInput;
|
||||
use epiphany_codex_bridge::view::EpiphanyViewResponseInput;
|
||||
use epiphany_codex_bridge::view::derive_epiphany_freshness_surface;
|
||||
use epiphany_codex_bridge::view::map_core_epiphany_distill_input;
|
||||
use epiphany_codex_bridge::view::map_core_epiphany_view_lenses;
|
||||
use epiphany_codex_bridge::view::map_epiphany_context_response;
|
||||
use epiphany_codex_bridge::view::map_epiphany_distill_response;
|
||||
|
|
@ -30,6 +29,7 @@ use epiphany_codex_bridge::view::map_epiphany_reorient_result_response;
|
|||
use epiphany_codex_bridge::view::map_epiphany_role_result_response;
|
||||
use epiphany_codex_bridge::view::map_epiphany_view_response;
|
||||
use epiphany_core::EpiphanyContextParams;
|
||||
use epiphany_core::EpiphanyDistillInput;
|
||||
use epiphany_core::EpiphanyGraphQuery;
|
||||
use epiphany_core::EpiphanyGraphQueryDirection;
|
||||
use epiphany_core::EpiphanyGraphQueryKind;
|
||||
|
|
@ -514,7 +514,7 @@ impl CodexMessageProcessor {
|
|||
.await
|
||||
.map(|state| state.revision)
|
||||
.unwrap_or(0);
|
||||
let input = map_core_epiphany_distill_input(params);
|
||||
let input = thread_epiphany_distill_params_to_core(params);
|
||||
let response = match map_epiphany_distill_response(expected_revision, input) {
|
||||
Ok(response) => response,
|
||||
Err(err) => {
|
||||
|
|
@ -599,6 +599,28 @@ fn thread_epiphany_context_params_to_core(
|
|||
}
|
||||
}
|
||||
|
||||
fn thread_epiphany_distill_params_to_core(
|
||||
params: ThreadEpiphanyDistillParams,
|
||||
) -> EpiphanyDistillInput {
|
||||
let ThreadEpiphanyDistillParams {
|
||||
source_kind,
|
||||
status,
|
||||
text,
|
||||
subject,
|
||||
evidence_kind,
|
||||
code_refs,
|
||||
..
|
||||
} = params;
|
||||
EpiphanyDistillInput {
|
||||
source_kind,
|
||||
status,
|
||||
text,
|
||||
subject,
|
||||
evidence_kind,
|
||||
code_refs,
|
||||
}
|
||||
}
|
||||
|
||||
fn thread_epiphany_graph_query_to_core(query: &ThreadEpiphanyGraphQuery) -> EpiphanyGraphQuery {
|
||||
EpiphanyGraphQuery {
|
||||
kind: thread_epiphany_graph_query_kind_to_core(query.kind),
|
||||
|
|
|
|||
Reference in a new issue