Use native Epiphany policy imports directly

This commit is contained in:
Meta Vens 2026-05-14 08:57:31 +01:00
commit 5c4eb5ece8
6 changed files with 25 additions and 25 deletions

View file

@ -3,11 +3,10 @@ use std::path::PathBuf;
use codex_app_server_protocol::ThreadEpiphanyReorientFinding;
use codex_app_server_protocol::ThreadEpiphanyRoleFinding;
use codex_app_server_protocol::ThreadEpiphanyRoleId;
use codex_app_server_protocol::ThreadEpiphanyStateUpdatedField;
use codex_app_server_protocol::ThreadEpiphanyStateUpdatedNotification;
use codex_app_server_protocol::ThreadEpiphanyStateUpdatedSource;
use codex_app_server_protocol::ThreadEpiphanyStateUpdatedField;
use codex_app_server_protocol::ThreadEpiphanyUpdatePatch;
use codex_core::EpiphanyStateUpdate;
use codex_protocol::protocol::EpiphanyCodeRef;
use codex_protocol::protocol::EpiphanyInvestigationCheckpoint;
use codex_protocol::protocol::EpiphanyInvestigationDisposition;
@ -15,6 +14,7 @@ use codex_protocol::protocol::EpiphanyScratchPad;
use epiphany_core::EpiphanyReorientAcceptanceFinding;
use epiphany_core::EpiphanyRoleAcceptanceFinding;
use epiphany_core::EpiphanyRoleStatePatchDocument;
use epiphany_core::EpiphanyStateUpdate;
use epiphany_core::build_reorient_acceptance_bundle;
use epiphany_core::build_role_acceptance_bundle;
use epiphany_core::imagination_role_state_patch_policy_errors;
@ -248,7 +248,9 @@ pub fn build_reorient_acceptance_update(
accepted_observation_id,
accepted_at,
update_scratch,
update_investigation_checkpoint.then_some(checkpoint).flatten(),
update_investigation_checkpoint
.then_some(checkpoint)
.flatten(),
)?;
let accepted_receipt_id = acceptance_bundle.accepted_receipt_id.clone();
let accepted_observation_id = acceptance_bundle.accepted_observation_id.clone();
@ -297,9 +299,7 @@ pub fn role_finding_summary(finding: &ThreadEpiphanyRoleFinding) -> String {
}
}
pub fn reorient_finding_code_refs(
finding: &ThreadEpiphanyReorientFinding,
) -> Vec<EpiphanyCodeRef> {
pub fn reorient_finding_code_refs(finding: &ThreadEpiphanyReorientFinding) -> Vec<EpiphanyCodeRef> {
finding
.files_inspected
.iter()

View file

@ -1,11 +1,11 @@
use chrono::SecondsFormat;
use chrono::Utc;
use codex_app_server_protocol::ThreadEpiphanyReorientFinding;
use codex_app_server_protocol::ThreadEpiphanyReorientDecision;
use codex_app_server_protocol::ThreadEpiphanyReorientSource;
use codex_app_server_protocol::ThreadEpiphanyReorientStateStatus;
use codex_app_server_protocol::ThreadEpiphanyJob;
use codex_app_server_protocol::ThreadEpiphanyJobKind;
use codex_app_server_protocol::ThreadEpiphanyReorientDecision;
use codex_app_server_protocol::ThreadEpiphanyReorientFinding;
use codex_app_server_protocol::ThreadEpiphanyReorientSource;
use codex_app_server_protocol::ThreadEpiphanyReorientStateStatus;
use codex_app_server_protocol::ThreadEpiphanyRoleFinding;
use codex_app_server_protocol::ThreadEpiphanyRoleId;
use codex_app_server_protocol::ThreadEpiphanyStateUpdatedField;
@ -13,14 +13,14 @@ use codex_app_server_protocol::ThreadEpiphanyUpdatePatch;
use codex_core::CodexThread;
use codex_core::EpiphanyJobInterruptRequest;
use codex_core::EpiphanyJobLaunchRequest;
use codex_core::EpiphanyPromotionInput;
use codex_core::evaluate_promotion;
use codex_protocol::error::CodexErr;
use codex_protocol::protocol::EpiphanyJobKind as CoreEpiphanyJobKind;
use codex_protocol::protocol::EpiphanyEvidenceRecord;
use codex_protocol::protocol::EpiphanyJobKind as CoreEpiphanyJobKind;
use codex_protocol::protocol::EpiphanyRetrievalState;
use codex_protocol::protocol::EpiphanyThreadState;
use codex_protocol::protocol::TokenUsageInfo as CoreTokenUsageInfo;
use epiphany_core::EpiphanyPromotionInput;
use epiphany_core::evaluate_promotion;
use crate::jobs::epiphany_blocked_state_job;
use crate::jobs::map_epiphany_jobs;
@ -37,13 +37,13 @@ use crate::mutation::epiphany_promote_changed_fields;
use crate::mutation::epiphany_update_patch_changed_fields;
use crate::mutation::state_update_from_thread_patch;
use crate::mutation::thread_epiphany_patch_has_state_replacements;
use crate::runtime_results::load_completed_epiphany_reorient_finding;
use crate::runtime_results::load_completed_epiphany_role_finding;
use crate::state::client_visible_live_thread_epiphany_state;
use crate::pressure::map_epiphany_pressure;
use crate::reorient::EpiphanyFreshnessWatcherSnapshot;
use crate::reorient::map_epiphany_freshness;
use crate::reorient::map_epiphany_reorient;
use crate::runtime_results::load_completed_epiphany_reorient_finding;
use crate::runtime_results::load_completed_epiphany_role_finding;
use crate::state::client_visible_live_thread_epiphany_state;
use uuid::Uuid;
#[derive(Debug, Clone)]

View file

@ -5,11 +5,11 @@ use codex_app_server_protocol::ThreadEpiphanyRetrieveResult;
use codex_app_server_protocol::ThreadEpiphanyRetrieveResultKind;
use codex_app_server_protocol::ThreadEpiphanyRetrieveShardSummary;
use codex_core::CodexThread;
use codex_core::EpiphanyRetrieveResponse as CoreEpiphanyRetrieveResponse;
use codex_core::EpiphanyRetrieveResult as CoreEpiphanyRetrieveResult;
use codex_core::EpiphanyRetrieveResultKind as CoreEpiphanyRetrieveResultKind;
use codex_protocol::protocol::EpiphanyRetrievalState;
use codex_utils_absolute_path::AbsolutePathBuf;
use epiphany_core::EpiphanyRetrieveResponse as CoreEpiphanyRetrieveResponse;
use epiphany_core::EpiphanyRetrieveResult as CoreEpiphanyRetrieveResult;
use epiphany_core::EpiphanyRetrieveResultKind as CoreEpiphanyRetrieveResultKind;
pub fn map_epiphany_retrieve_response(
response: CoreEpiphanyRetrieveResponse,

View file

@ -1,15 +1,15 @@
use std::path::Path;
use codex_app_server_protocol::*;
use codex_core::EpiphanyDistillInput;
use codex_core::EpiphanyMapProposalInput;
use codex_core::distill_observation;
use codex_core::propose_map_update;
use codex_protocol::protocol::EpiphanyRetrievalState;
use codex_protocol::protocol::EpiphanyThreadState;
use codex_protocol::protocol::TokenUsageInfo as CoreTokenUsageInfo;
use epiphany_core::EpiphanyDistillInput;
use epiphany_core::EpiphanyMapProposalInput;
use epiphany_core::EpiphanySceneInput;
use epiphany_core::derive_scene;
use epiphany_core::distill_observation;
use epiphany_core::propose_map_update;
use crate::context::map_epiphany_context;
use crate::context::map_epiphany_graph_query;

Binary file not shown.

View file

@ -1,7 +1,4 @@
use codex_app_server_protocol::*;
use codex_core::EPIPHANY_RETRIEVAL_DEFAULT_LIMIT;
use codex_core::EPIPHANY_RETRIEVAL_MAX_LIMIT;
use codex_core::EpiphanyRetrieveQuery;
use codex_protocol::ThreadId;
use epiphany_codex_bridge::invalidation::epiphany_freshness_watcher_snapshot;
use epiphany_codex_bridge::launch::EPIPHANY_REORIENT_LAUNCH_BINDING_ID;
@ -24,6 +21,9 @@ use epiphany_codex_bridge::view::map_epiphany_propose_response;
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::EPIPHANY_RETRIEVAL_DEFAULT_LIMIT;
use epiphany_core::EPIPHANY_RETRIEVAL_MAX_LIMIT;
use epiphany_core::EpiphanyRetrieveQuery;
use super::CodexMessageProcessor;
use super::ConnectionRequestId;