Keep distill request core-shaped
This commit is contained in:
parent
13731f632f
commit
b7185d7cfd
5 changed files with 25 additions and 15 deletions
|
|
@ -562,26 +562,9 @@ pub async fn map_epiphany_reorient_result_response(
|
|||
|
||||
pub fn map_epiphany_distill_response(
|
||||
expected_revision: u64,
|
||||
params: ThreadEpiphanyDistillParams,
|
||||
input: EpiphanyDistillInput,
|
||||
) -> std::result::Result<ThreadEpiphanyDistillResponse, String> {
|
||||
let ThreadEpiphanyDistillParams {
|
||||
source_kind,
|
||||
status,
|
||||
text,
|
||||
subject,
|
||||
evidence_kind,
|
||||
code_refs,
|
||||
..
|
||||
} = params;
|
||||
let proposal = distill_observation(EpiphanyDistillInput {
|
||||
source_kind,
|
||||
status,
|
||||
text,
|
||||
subject,
|
||||
evidence_kind,
|
||||
code_refs,
|
||||
})
|
||||
.map_err(|err| err.to_string())?;
|
||||
let proposal = distill_observation(input).map_err(|err| err.to_string())?;
|
||||
|
||||
Ok(ThreadEpiphanyDistillResponse {
|
||||
expected_revision,
|
||||
|
|
@ -593,6 +576,28 @@ 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>,
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ remembers doctrine; the branch remembers the blade.
|
|||
- 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.
|
||||
- Role-result response assembly now takes core `EpiphanyRoleResultRoleId`; `ThreadEpiphanyRoleId` is reconstructed only for the legacy response payload and finding projection.
|
||||
- Distill response assembly now consumes core `EpiphanyDistillInput`; `ThreadEpiphanyDistillParams` is converted before bridge policy invocation.
|
||||
- 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.
|
|
@ -357,7 +357,9 @@ current_status:
|
|||
`EpiphanyGraphQuery`; app-server read routes convert JSON-RPC request cargo
|
||||
before invoking the bridge. Role-result response assembly now takes core
|
||||
`EpiphanyRoleResultRoleId` and maps back to `ThreadEpiphanyRoleId` only
|
||||
while shaping the legacy JSON-RPC response.
|
||||
while shaping the legacy JSON-RPC response. Distill response assembly now
|
||||
consumes core `EpiphanyDistillInput`; the JSON-RPC distill params are
|
||||
converted before policy invocation.
|
||||
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.
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ use epiphany_codex_bridge::view::epiphany_view_needs_jobs;
|
|||
use epiphany_codex_bridge::view::epiphany_view_needs_pressure;
|
||||
use epiphany_codex_bridge::view::epiphany_view_needs_reorientation_inputs;
|
||||
use epiphany_codex_bridge::view::epiphany_view_needs_runtime_store;
|
||||
use epiphany_codex_bridge::view::map_core_epiphany_distill_input;
|
||||
use epiphany_codex_bridge::view::map_epiphany_context_response;
|
||||
use epiphany_codex_bridge::view::map_epiphany_distill_response;
|
||||
use epiphany_codex_bridge::view::map_epiphany_graph_query_response;
|
||||
|
|
@ -510,7 +511,8 @@ impl CodexMessageProcessor {
|
|||
.await
|
||||
.map(|state| state.revision)
|
||||
.unwrap_or(0);
|
||||
let response = match map_epiphany_distill_response(expected_revision, params) {
|
||||
let input = map_core_epiphany_distill_input(params);
|
||||
let response = match map_epiphany_distill_response(expected_revision, input) {
|
||||
Ok(response) => response,
|
||||
Err(err) => {
|
||||
self.send_invalid_request_error(
|
||||
|
|
|
|||
Reference in a new issue