Stop Codex protocol from owning Epiphany state
This commit is contained in:
parent
00a09e251f
commit
f2b8763eb5
17 changed files with 113 additions and 127 deletions
3
vendor/codex/codex-rs/Cargo.lock
generated
vendored
3
vendor/codex/codex-rs/Cargo.lock
generated
vendored
|
|
@ -1913,6 +1913,7 @@ dependencies = [
|
|||
"constant_time_eq 0.3.1",
|
||||
"core_test_support",
|
||||
"epiphany-codex-bridge",
|
||||
"epiphany-state-model",
|
||||
"futures",
|
||||
"gethostname",
|
||||
"hmac 0.12.1",
|
||||
|
|
@ -1979,6 +1980,7 @@ dependencies = [
|
|||
"codex-shell-command",
|
||||
"codex-utils-absolute-path",
|
||||
"codex-utils-cargo-bin",
|
||||
"epiphany-state-model",
|
||||
"inventory",
|
||||
"pretty_assertions",
|
||||
"rmcp",
|
||||
|
|
@ -2392,6 +2394,7 @@ dependencies = [
|
|||
"dirs",
|
||||
"dunce",
|
||||
"env-flags",
|
||||
"epiphany-state-model",
|
||||
"eventsource-stream",
|
||||
"futures",
|
||||
"http 1.4.0",
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ path = "src/lib.rs"
|
|||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
epiphany-state-model = { path = "../../../../epiphany-state-model" }
|
||||
anyhow = { workspace = true }
|
||||
clap = { workspace = true, features = ["derive"] }
|
||||
codex-experimental-api-macros = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1670,11 +1670,11 @@ mod tests {
|
|||
role_id: v2::ThreadEpiphanyRoleId::Modeling,
|
||||
revision: 4,
|
||||
changed_fields: vec![v2::ThreadEpiphanyStateUpdatedField::JobBindings],
|
||||
epiphany_state: codex_protocol::protocol::EpiphanyThreadState {
|
||||
epiphany_state: epiphany_state_model::EpiphanyThreadState {
|
||||
revision: 4,
|
||||
job_bindings: vec![codex_protocol::protocol::EpiphanyJobBinding {
|
||||
job_bindings: vec![epiphany_state_model::EpiphanyJobBinding {
|
||||
id: "modeling-checkpoint-worker".to_string(),
|
||||
kind: codex_protocol::protocol::EpiphanyJobKind::Specialist,
|
||||
kind: epiphany_state_model::EpiphanyJobKind::Specialist,
|
||||
scope: "role-scoped modeling/checkpoint maintenance".to_string(),
|
||||
owner_role: "epiphany-modeler".to_string(),
|
||||
authority_scope: Some("epiphany.role.modeling".to_string()),
|
||||
|
|
@ -1859,7 +1859,7 @@ mod tests {
|
|||
#[test]
|
||||
fn serialize_thread_epiphany_role_accept_response() -> Result<()> {
|
||||
let patch = v2::ThreadEpiphanyUpdatePatch {
|
||||
graph_frontier: Some(codex_protocol::protocol::EpiphanyGraphFrontier {
|
||||
graph_frontier: Some(epiphany_state_model::EpiphanyGraphFrontier {
|
||||
active_node_ids: vec!["state-spine".to_string()],
|
||||
..Default::default()
|
||||
}),
|
||||
|
|
@ -1897,7 +1897,7 @@ mod tests {
|
|||
v2::ThreadEpiphanyStateUpdatedField::Observations,
|
||||
v2::ThreadEpiphanyStateUpdatedField::Evidence,
|
||||
],
|
||||
epiphany_state: codex_protocol::protocol::EpiphanyThreadState {
|
||||
epiphany_state: epiphany_state_model::EpiphanyThreadState {
|
||||
revision: 5,
|
||||
..Default::default()
|
||||
},
|
||||
|
|
@ -2055,13 +2055,13 @@ mod tests {
|
|||
state_revision: Some(3),
|
||||
context: v2::ThreadEpiphanyContext {
|
||||
graph: v2::ThreadEpiphanyGraphContext {
|
||||
architecture_nodes: vec![codex_protocol::protocol::EpiphanyGraphNode {
|
||||
architecture_nodes: vec![epiphany_state_model::EpiphanyGraphNode {
|
||||
id: "state-spine".to_string(),
|
||||
title: "State spine".to_string(),
|
||||
purpose: "Keep understanding typed".to_string(),
|
||||
..Default::default()
|
||||
}],
|
||||
architecture_edges: vec![codex_protocol::protocol::EpiphanyGraphEdge {
|
||||
architecture_edges: vec![epiphany_state_model::EpiphanyGraphEdge {
|
||||
id: Some("edge-state-read".to_string()),
|
||||
source_id: "state-spine".to_string(),
|
||||
target_id: "client-read".to_string(),
|
||||
|
|
@ -2070,13 +2070,13 @@ mod tests {
|
|||
}],
|
||||
..Default::default()
|
||||
},
|
||||
frontier: Some(codex_protocol::protocol::EpiphanyGraphFrontier {
|
||||
frontier: Some(epiphany_state_model::EpiphanyGraphFrontier {
|
||||
active_node_ids: vec!["state-spine".to_string()],
|
||||
..Default::default()
|
||||
}),
|
||||
checkpoint: None,
|
||||
investigation_checkpoint: Some(
|
||||
codex_protocol::protocol::EpiphanyInvestigationCheckpoint {
|
||||
epiphany_state_model::EpiphanyInvestigationCheckpoint {
|
||||
checkpoint_id: "ix-1".to_string(),
|
||||
kind: "source_gathering".to_string(),
|
||||
focus: "Audit the compaction seam.".to_string(),
|
||||
|
|
@ -2086,7 +2086,7 @@ mod tests {
|
|||
..Default::default()
|
||||
},
|
||||
),
|
||||
observations: vec![codex_protocol::protocol::EpiphanyObservation {
|
||||
observations: vec![epiphany_state_model::EpiphanyObservation {
|
||||
id: "obs-1".to_string(),
|
||||
summary: "Context shard is read-only.".to_string(),
|
||||
source_kind: "smoke".to_string(),
|
||||
|
|
@ -2094,7 +2094,7 @@ mod tests {
|
|||
evidence_ids: vec!["ev-1".to_string()],
|
||||
..Default::default()
|
||||
}],
|
||||
evidence: vec![codex_protocol::protocol::EpiphanyEvidenceRecord {
|
||||
evidence: vec![epiphany_state_model::EpiphanyEvidenceRecord {
|
||||
id: "ev-1".to_string(),
|
||||
kind: "test".to_string(),
|
||||
status: "ok".to_string(),
|
||||
|
|
@ -2225,7 +2225,7 @@ mod tests {
|
|||
state_status: v2::ThreadEpiphanyContextStateStatus::Ready,
|
||||
state_revision: Some(2),
|
||||
graph: v2::ThreadEpiphanyGraphContext {
|
||||
architecture_nodes: vec![codex_protocol::protocol::EpiphanyGraphNode {
|
||||
architecture_nodes: vec![epiphany_state_model::EpiphanyGraphNode {
|
||||
id: "state-spine".to_string(),
|
||||
title: "State spine".to_string(),
|
||||
purpose: "Persist Epiphany state.".to_string(),
|
||||
|
|
@ -2304,11 +2304,11 @@ mod tests {
|
|||
},
|
||||
revision: 5,
|
||||
changed_fields: vec![v2::ThreadEpiphanyStateUpdatedField::JobBindings],
|
||||
epiphany_state: codex_protocol::protocol::EpiphanyThreadState {
|
||||
epiphany_state: epiphany_state_model::EpiphanyThreadState {
|
||||
revision: 5,
|
||||
job_bindings: vec![codex_protocol::protocol::EpiphanyJobBinding {
|
||||
job_bindings: vec![epiphany_state_model::EpiphanyJobBinding {
|
||||
id: "reorient-worker".to_string(),
|
||||
kind: codex_protocol::protocol::EpiphanyJobKind::Specialist,
|
||||
kind: epiphany_state_model::EpiphanyJobKind::Specialist,
|
||||
scope: "reorient-guided checkpoint regather".to_string(),
|
||||
owner_role: "epiphany-reorient".to_string(),
|
||||
authority_scope: Some("epiphany.reorient.regather".to_string()),
|
||||
|
|
@ -2514,9 +2514,9 @@ mod tests {
|
|||
v2::ThreadEpiphanyStateUpdatedField::Evidence,
|
||||
v2::ThreadEpiphanyStateUpdatedField::Scratch,
|
||||
],
|
||||
epiphany_state: codex_protocol::protocol::EpiphanyThreadState {
|
||||
epiphany_state: epiphany_state_model::EpiphanyThreadState {
|
||||
revision: 6,
|
||||
observations: vec![codex_protocol::protocol::EpiphanyObservation {
|
||||
observations: vec![epiphany_state_model::EpiphanyObservation {
|
||||
id: "obs-reorient-1".to_string(),
|
||||
summary: "Accepted resume reorientation result.".to_string(),
|
||||
source_kind: "reorient_result".to_string(),
|
||||
|
|
@ -2524,7 +2524,7 @@ mod tests {
|
|||
evidence_ids: vec!["ev-reorient-1".to_string()],
|
||||
..Default::default()
|
||||
}],
|
||||
recent_evidence: vec![codex_protocol::protocol::EpiphanyEvidenceRecord {
|
||||
recent_evidence: vec![epiphany_state_model::EpiphanyEvidenceRecord {
|
||||
id: "ev-reorient-1".to_string(),
|
||||
kind: "reorient_result".to_string(),
|
||||
status: "accepted".to_string(),
|
||||
|
|
@ -2607,7 +2607,7 @@ mod tests {
|
|||
index_summary: v2::ThreadEpiphanyRetrieveIndexSummary {
|
||||
workspace_root: absolute_path("/workspace"),
|
||||
index_revision: Some("query-time-bm25-v1".to_string()),
|
||||
status: codex_protocol::protocol::EpiphanyRetrievalStatus::Ready,
|
||||
status: epiphany_state_model::EpiphanyRetrievalStatus::Ready,
|
||||
semantic_available: true,
|
||||
last_indexed_at_unix_seconds: Some(1_744_500_000),
|
||||
indexed_file_count: Some(12),
|
||||
|
|
@ -2617,7 +2617,7 @@ mod tests {
|
|||
path_prefix: PathBuf::from("."),
|
||||
indexed_file_count: Some(12),
|
||||
indexed_chunk_count: Some(34),
|
||||
status: codex_protocol::protocol::EpiphanyRetrievalStatus::Ready,
|
||||
status: epiphany_state_model::EpiphanyRetrievalStatus::Ready,
|
||||
exact_available: true,
|
||||
semantic_available: true,
|
||||
}],
|
||||
|
|
@ -2688,7 +2688,7 @@ mod tests {
|
|||
index_summary: v2::ThreadEpiphanyRetrieveIndexSummary {
|
||||
workspace_root: absolute_path("/workspace"),
|
||||
index_revision: Some("qdrant-ollama-v1:qwen3-embedding:0.6b".to_string()),
|
||||
status: codex_protocol::protocol::EpiphanyRetrievalStatus::Ready,
|
||||
status: epiphany_state_model::EpiphanyRetrievalStatus::Ready,
|
||||
semantic_available: true,
|
||||
last_indexed_at_unix_seconds: Some(1_744_500_100),
|
||||
indexed_file_count: Some(12),
|
||||
|
|
@ -2698,7 +2698,7 @@ mod tests {
|
|||
path_prefix: PathBuf::from("."),
|
||||
indexed_file_count: Some(12),
|
||||
indexed_chunk_count: Some(34),
|
||||
status: codex_protocol::protocol::EpiphanyRetrievalStatus::Ready,
|
||||
status: epiphany_state_model::EpiphanyRetrievalStatus::Ready,
|
||||
exact_available: true,
|
||||
semantic_available: true,
|
||||
}],
|
||||
|
|
@ -2749,7 +2749,7 @@ mod tests {
|
|||
response: v2::ThreadEpiphanyDistillResponse {
|
||||
expected_revision: 7,
|
||||
patch: v2::ThreadEpiphanyUpdatePatch {
|
||||
observations: vec![codex_protocol::protocol::EpiphanyObservation {
|
||||
observations: vec![epiphany_state_model::EpiphanyObservation {
|
||||
id: "obs-123".to_string(),
|
||||
summary: "Smoke passed".to_string(),
|
||||
source_kind: "smoke".to_string(),
|
||||
|
|
@ -2757,7 +2757,7 @@ mod tests {
|
|||
code_refs: Vec::new(),
|
||||
evidence_ids: vec!["ev-123".to_string()],
|
||||
}],
|
||||
evidence: vec![codex_protocol::protocol::EpiphanyEvidenceRecord {
|
||||
evidence: vec![epiphany_state_model::EpiphanyEvidenceRecord {
|
||||
id: "ev-123".to_string(),
|
||||
kind: "verification".to_string(),
|
||||
status: "ok".to_string(),
|
||||
|
|
@ -2810,7 +2810,7 @@ mod tests {
|
|||
response: v2::ThreadEpiphanyProposeResponse {
|
||||
expected_revision: 7,
|
||||
patch: v2::ThreadEpiphanyUpdatePatch {
|
||||
churn: Some(codex_protocol::protocol::EpiphanyChurnState {
|
||||
churn: Some(epiphany_state_model::EpiphanyChurnState {
|
||||
understanding_status: "proposal_ready".to_string(),
|
||||
diff_pressure: "low".to_string(),
|
||||
graph_freshness: Some("proposal".to_string()),
|
||||
|
|
@ -2883,11 +2883,11 @@ mod tests {
|
|||
v2::ThreadEpiphanyStateUpdatedField::JobBindings,
|
||||
v2::ThreadEpiphanyStateUpdatedField::RuntimeLinks,
|
||||
],
|
||||
epiphany_state: codex_protocol::protocol::EpiphanyThreadState {
|
||||
epiphany_state: epiphany_state_model::EpiphanyThreadState {
|
||||
revision: 3,
|
||||
job_bindings: vec![codex_protocol::protocol::EpiphanyJobBinding {
|
||||
job_bindings: vec![epiphany_state_model::EpiphanyJobBinding {
|
||||
id: "specialist-work".to_string(),
|
||||
kind: codex_protocol::protocol::EpiphanyJobKind::Specialist,
|
||||
kind: epiphany_state_model::EpiphanyJobKind::Specialist,
|
||||
scope: "role-scoped specialist work".to_string(),
|
||||
owner_role: "epiphany-harness".to_string(),
|
||||
authority_scope: Some("epiphany.specialist".to_string()),
|
||||
|
|
@ -2895,7 +2895,7 @@ mod tests {
|
|||
linked_graph_node_ids: Vec::new(),
|
||||
blocking_reason: None,
|
||||
}],
|
||||
runtime_links: vec![codex_protocol::protocol::EpiphanyRuntimeLink {
|
||||
runtime_links: vec![epiphany_state_model::EpiphanyRuntimeLink {
|
||||
id: "runtime-link-specialist-work-job-123".to_string(),
|
||||
binding_id: "specialist-work".to_string(),
|
||||
surface: "jobLaunch".to_string(),
|
||||
|
|
@ -2982,11 +2982,11 @@ mod tests {
|
|||
interrupted_thread_ids: vec!["worker-thread-1".to_string()],
|
||||
revision: 4,
|
||||
changed_fields: vec![v2::ThreadEpiphanyStateUpdatedField::JobBindings],
|
||||
epiphany_state: codex_protocol::protocol::EpiphanyThreadState {
|
||||
epiphany_state: epiphany_state_model::EpiphanyThreadState {
|
||||
revision: 4,
|
||||
job_bindings: vec![codex_protocol::protocol::EpiphanyJobBinding {
|
||||
job_bindings: vec![epiphany_state_model::EpiphanyJobBinding {
|
||||
id: "specialist-work".to_string(),
|
||||
kind: codex_protocol::protocol::EpiphanyJobKind::Specialist,
|
||||
kind: epiphany_state_model::EpiphanyJobKind::Specialist,
|
||||
scope: "role-scoped specialist work".to_string(),
|
||||
owner_role: "epiphany-harness".to_string(),
|
||||
authority_scope: Some("epiphany.specialist".to_string()),
|
||||
|
|
@ -3066,7 +3066,7 @@ mod tests {
|
|||
response: v2::ThreadEpiphanyUpdateResponse {
|
||||
revision: 2,
|
||||
changed_fields: vec![v2::ThreadEpiphanyStateUpdatedField::Objective],
|
||||
epiphany_state: codex_protocol::protocol::EpiphanyThreadState {
|
||||
epiphany_state: epiphany_state_model::EpiphanyThreadState {
|
||||
revision: 2,
|
||||
objective: Some("Keep the map honest".to_string()),
|
||||
..Default::default()
|
||||
|
|
@ -3105,7 +3105,7 @@ mod tests {
|
|||
v2::ThreadEpiphanyStateUpdatedField::Objective,
|
||||
v2::ThreadEpiphanyStateUpdatedField::Evidence,
|
||||
],
|
||||
epiphany_state: codex_protocol::protocol::EpiphanyThreadState {
|
||||
epiphany_state: epiphany_state_model::EpiphanyThreadState {
|
||||
revision: 7,
|
||||
objective: Some("Keep the map live".to_string()),
|
||||
..Default::default()
|
||||
|
|
@ -3139,7 +3139,7 @@ mod tests {
|
|||
source: v2::ThreadEpiphanyStateUpdatedSource::JobLaunch,
|
||||
revision: 8,
|
||||
changed_fields: vec![v2::ThreadEpiphanyStateUpdatedField::JobBindings],
|
||||
epiphany_state: codex_protocol::protocol::EpiphanyThreadState {
|
||||
epiphany_state: epiphany_state_model::EpiphanyThreadState {
|
||||
revision: 8,
|
||||
..Default::default()
|
||||
},
|
||||
|
|
@ -3883,7 +3883,7 @@ mod tests {
|
|||
objective: Some("Keep the map honest".to_string()),
|
||||
..Default::default()
|
||||
},
|
||||
verifier_evidence: codex_protocol::protocol::EpiphanyEvidenceRecord {
|
||||
verifier_evidence: epiphany_state_model::EpiphanyEvidenceRecord {
|
||||
id: "ev-verifier".to_string(),
|
||||
kind: "verification".to_string(),
|
||||
status: "ok".to_string(),
|
||||
|
|
@ -3904,7 +3904,7 @@ mod tests {
|
|||
thread_id: "thr_123".to_string(),
|
||||
expected_revision: Some(2),
|
||||
binding_id: "specialist-work".to_string(),
|
||||
kind: codex_protocol::protocol::EpiphanyJobKind::Specialist,
|
||||
kind: epiphany_state_model::EpiphanyJobKind::Specialist,
|
||||
scope: "role-scoped specialist work".to_string(),
|
||||
owner_role: "epiphany-harness".to_string(),
|
||||
authority_scope: "epiphany.specialist".to_string(),
|
||||
|
|
@ -3980,7 +3980,7 @@ mod tests {
|
|||
source: v2::ThreadEpiphanyStateUpdatedSource::Promote,
|
||||
revision: 0,
|
||||
changed_fields: vec![v2::ThreadEpiphanyStateUpdatedField::Churn],
|
||||
epiphany_state: codex_protocol::protocol::EpiphanyThreadState::default(),
|
||||
epiphany_state: epiphany_state_model::EpiphanyThreadState::default(),
|
||||
},
|
||||
);
|
||||
let reason = crate::experimental_api::ExperimentalApi::experimental_reason(¬ification);
|
||||
|
|
|
|||
|
|
@ -57,29 +57,29 @@ use codex_protocol::protocol::AgentStatus as CoreAgentStatus;
|
|||
use codex_protocol::protocol::AskForApproval as CoreAskForApproval;
|
||||
use codex_protocol::protocol::CodexErrorInfo as CoreCodexErrorInfo;
|
||||
use codex_protocol::protocol::CreditsSnapshot as CoreCreditsSnapshot;
|
||||
use codex_protocol::protocol::EpiphanyAcceptanceReceipt as CoreEpiphanyAcceptanceReceipt;
|
||||
use codex_protocol::protocol::EpiphanyChurnState as CoreEpiphanyChurnState;
|
||||
use codex_protocol::protocol::EpiphanyCodeRef as CoreEpiphanyCodeRef;
|
||||
use codex_protocol::protocol::EpiphanyEvidenceRecord as CoreEpiphanyEvidenceRecord;
|
||||
use codex_protocol::protocol::EpiphanyGraphCheckpoint as CoreEpiphanyGraphCheckpoint;
|
||||
use codex_protocol::protocol::EpiphanyGraphEdge as CoreEpiphanyGraphEdge;
|
||||
use codex_protocol::protocol::EpiphanyGraphFrontier as CoreEpiphanyGraphFrontier;
|
||||
use codex_protocol::protocol::EpiphanyGraphLink as CoreEpiphanyGraphLink;
|
||||
use codex_protocol::protocol::EpiphanyGraphNode as CoreEpiphanyGraphNode;
|
||||
use codex_protocol::protocol::EpiphanyGraphs as CoreEpiphanyGraphs;
|
||||
use codex_protocol::protocol::EpiphanyInvariant as CoreEpiphanyInvariant;
|
||||
use codex_protocol::protocol::EpiphanyInvestigationCheckpoint as CoreEpiphanyInvestigationCheckpoint;
|
||||
use codex_protocol::protocol::EpiphanyInvestigationDisposition as CoreEpiphanyInvestigationDisposition;
|
||||
use codex_protocol::protocol::EpiphanyJobBinding as CoreEpiphanyJobBinding;
|
||||
use codex_protocol::protocol::EpiphanyJobKind as CoreEpiphanyJobKind;
|
||||
use codex_protocol::protocol::EpiphanyModeState as CoreEpiphanyModeState;
|
||||
use codex_protocol::protocol::EpiphanyObservation as CoreEpiphanyObservation;
|
||||
use codex_protocol::protocol::EpiphanyPlanningState as CoreEpiphanyPlanningState;
|
||||
use codex_protocol::protocol::EpiphanyRetrievalStatus as CoreEpiphanyRetrievalStatus;
|
||||
use codex_protocol::protocol::EpiphanyRuntimeLink as CoreEpiphanyRuntimeLink;
|
||||
use codex_protocol::protocol::EpiphanyScratchPad as CoreEpiphanyScratchPad;
|
||||
use codex_protocol::protocol::EpiphanySubgoal as CoreEpiphanySubgoal;
|
||||
use codex_protocol::protocol::EpiphanyThreadState as CoreEpiphanyThreadState;
|
||||
use epiphany_state_model::EpiphanyAcceptanceReceipt as CoreEpiphanyAcceptanceReceipt;
|
||||
use epiphany_state_model::EpiphanyChurnState as CoreEpiphanyChurnState;
|
||||
use epiphany_state_model::EpiphanyCodeRef as CoreEpiphanyCodeRef;
|
||||
use epiphany_state_model::EpiphanyEvidenceRecord as CoreEpiphanyEvidenceRecord;
|
||||
use epiphany_state_model::EpiphanyGraphCheckpoint as CoreEpiphanyGraphCheckpoint;
|
||||
use epiphany_state_model::EpiphanyGraphEdge as CoreEpiphanyGraphEdge;
|
||||
use epiphany_state_model::EpiphanyGraphFrontier as CoreEpiphanyGraphFrontier;
|
||||
use epiphany_state_model::EpiphanyGraphLink as CoreEpiphanyGraphLink;
|
||||
use epiphany_state_model::EpiphanyGraphNode as CoreEpiphanyGraphNode;
|
||||
use epiphany_state_model::EpiphanyGraphs as CoreEpiphanyGraphs;
|
||||
use epiphany_state_model::EpiphanyInvariant as CoreEpiphanyInvariant;
|
||||
use epiphany_state_model::EpiphanyInvestigationCheckpoint as CoreEpiphanyInvestigationCheckpoint;
|
||||
use epiphany_state_model::EpiphanyInvestigationDisposition as CoreEpiphanyInvestigationDisposition;
|
||||
use epiphany_state_model::EpiphanyJobBinding as CoreEpiphanyJobBinding;
|
||||
use epiphany_state_model::EpiphanyJobKind as CoreEpiphanyJobKind;
|
||||
use epiphany_state_model::EpiphanyModeState as CoreEpiphanyModeState;
|
||||
use epiphany_state_model::EpiphanyObservation as CoreEpiphanyObservation;
|
||||
use epiphany_state_model::EpiphanyPlanningState as CoreEpiphanyPlanningState;
|
||||
use epiphany_state_model::EpiphanyRetrievalStatus as CoreEpiphanyRetrievalStatus;
|
||||
use epiphany_state_model::EpiphanyRuntimeLink as CoreEpiphanyRuntimeLink;
|
||||
use epiphany_state_model::EpiphanyScratchPad as CoreEpiphanyScratchPad;
|
||||
use epiphany_state_model::EpiphanySubgoal as CoreEpiphanySubgoal;
|
||||
use epiphany_state_model::EpiphanyThreadState as CoreEpiphanyThreadState;
|
||||
use codex_protocol::protocol::ExecCommandSource as CoreExecCommandSource;
|
||||
use codex_protocol::protocol::ExecCommandStatus as CoreExecCommandStatus;
|
||||
use codex_protocol::protocol::GranularApprovalConfig as CoreGranularApprovalConfig;
|
||||
|
|
|
|||
1
vendor/codex/codex-rs/app-server/Cargo.toml
vendored
1
vendor/codex/codex-rs/app-server/Cargo.toml
vendored
|
|
@ -61,6 +61,7 @@ codex-utils-json-to-toml = { workspace = true }
|
|||
codex-utils-rustls-provider = { workspace = true }
|
||||
chrono = { workspace = true }
|
||||
epiphany-codex-bridge = { path = "../../../../epiphany-codex-bridge" }
|
||||
epiphany-state-model = { path = "../../../../epiphany-state-model" }
|
||||
clap = { workspace = true, features = ["derive"] }
|
||||
constant_time_eq = { workspace = true }
|
||||
futures = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
use codex_app_server_protocol::*;
|
||||
use codex_core::CodexThread;
|
||||
use codex_protocol::ThreadId;
|
||||
use codex_protocol::protocol::EpiphanyRetrievalState;
|
||||
use codex_protocol::protocol::EpiphanyThreadState;
|
||||
use epiphany_state_model::EpiphanyRetrievalState;
|
||||
use epiphany_state_model::EpiphanyThreadState;
|
||||
use epiphany_codex_bridge::cultnet::EpiphanyStateUpdatedField;
|
||||
use epiphany_codex_bridge::error::EpiphanyBridgeError;
|
||||
use epiphany_codex_bridge::invalidation::epiphany_freshness_watcher_snapshot;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use codex_app_server_protocol::*;
|
||||
use codex_core::CodexThread;
|
||||
use codex_protocol::ThreadId;
|
||||
use codex_protocol::protocol::EpiphanyRetrievalState;
|
||||
use epiphany_state_model::EpiphanyRetrievalState;
|
||||
use super::epiphany_thread_host::load_authoritative_epiphany_state;
|
||||
use super::epiphany_thread_host::runtime_spine_store_path;
|
||||
use epiphany_codex_bridge::cultnet::EpiphanySurfaceSource;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ use std::path::Path;
|
|||
use super::legacy_epiphany_rollout::latest_legacy_epiphany_state;
|
||||
use codex_core::CodexThread;
|
||||
use codex_core::RolloutRecorder;
|
||||
use codex_protocol::protocol::EpiphanyThreadState;
|
||||
use epiphany_state_model::EpiphanyThreadState;
|
||||
use codex_protocol::protocol::InitialHistory;
|
||||
use codex_protocol::protocol::TokenUsageInfo;
|
||||
use epiphany_codex_bridge::mutation_service::EpiphanyMutationHost;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use codex_protocol::models::ResponseItem;
|
||||
use codex_protocol::protocol::EpiphanyThreadState;
|
||||
use epiphany_state_model::EpiphanyThreadState;
|
||||
use codex_protocol::protocol::EventMsg;
|
||||
use codex_protocol::protocol::RolloutItem;
|
||||
|
||||
|
|
@ -103,7 +103,7 @@ pub(super) fn latest_legacy_epiphany_state(items: &[RolloutItem]) -> Option<Epip
|
|||
mod tests {
|
||||
use super::*;
|
||||
use codex_protocol::config_types::ModeKind;
|
||||
use codex_protocol::protocol::EpiphanyStateItem;
|
||||
use epiphany_state_model::EpiphanyStateItem;
|
||||
use codex_protocol::protocol::ThreadRolledBackEvent;
|
||||
use codex_protocol::protocol::TurnCompleteEvent;
|
||||
use codex_protocol::protocol::TurnStartedEvent;
|
||||
|
|
|
|||
1
vendor/codex/codex-rs/core/Cargo.toml
vendored
1
vendor/codex/codex-rs/core/Cargo.toml
vendored
|
|
@ -140,6 +140,7 @@ windows-sys = { version = "0.52", features = [
|
|||
codex-shell-escalation = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
epiphany-state-model = { path = "../../../../epiphany-state-model" }
|
||||
assert_cmd = { workspace = true }
|
||||
assert_matches = { workspace = true }
|
||||
codex-otel = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ use codex_protocol::ThreadId;
|
|||
use codex_protocol::models::ContentItem;
|
||||
use codex_protocol::models::ResponseItem;
|
||||
use codex_protocol::protocol::CompactedItem;
|
||||
use codex_protocol::protocol::EpiphanyStateItem;
|
||||
use codex_protocol::protocol::EpiphanyThreadState;
|
||||
use epiphany_state_model::EpiphanyStateItem;
|
||||
use epiphany_state_model::EpiphanyThreadState;
|
||||
use codex_protocol::protocol::InitialHistory;
|
||||
use codex_protocol::protocol::InterAgentCommunication;
|
||||
use codex_protocol::protocol::ResumedHistory;
|
||||
|
|
|
|||
38
vendor/codex/codex-rs/core/src/session/tests.rs
vendored
38
vendor/codex/codex-rs/core/src/session/tests.rs
vendored
|
|
@ -75,24 +75,24 @@ use codex_protocol::protocol::AskForApproval;
|
|||
use codex_protocol::protocol::CompactedItem;
|
||||
use codex_protocol::protocol::ConversationAudioParams;
|
||||
use codex_protocol::protocol::CreditsSnapshot;
|
||||
use codex_protocol::protocol::EpiphanyChurnState;
|
||||
use codex_protocol::protocol::EpiphanyCodeRef;
|
||||
use codex_protocol::protocol::EpiphanyEvidenceRecord;
|
||||
use codex_protocol::protocol::EpiphanyGraph;
|
||||
use codex_protocol::protocol::EpiphanyGraphCheckpoint;
|
||||
use codex_protocol::protocol::EpiphanyGraphEdge;
|
||||
use codex_protocol::protocol::EpiphanyGraphFrontier;
|
||||
use codex_protocol::protocol::EpiphanyGraphLink;
|
||||
use codex_protocol::protocol::EpiphanyGraphNode;
|
||||
use codex_protocol::protocol::EpiphanyGraphs;
|
||||
use codex_protocol::protocol::EpiphanyInvariant;
|
||||
use codex_protocol::protocol::EpiphanyModeKind;
|
||||
use codex_protocol::protocol::EpiphanyModeState;
|
||||
use codex_protocol::protocol::EpiphanyObservation;
|
||||
use codex_protocol::protocol::EpiphanyScratchPad;
|
||||
use codex_protocol::protocol::EpiphanyStateItem;
|
||||
use codex_protocol::protocol::EpiphanySubgoal;
|
||||
use codex_protocol::protocol::EpiphanyThreadState;
|
||||
use epiphany_state_model::EpiphanyChurnState;
|
||||
use epiphany_state_model::EpiphanyCodeRef;
|
||||
use epiphany_state_model::EpiphanyEvidenceRecord;
|
||||
use epiphany_state_model::EpiphanyGraph;
|
||||
use epiphany_state_model::EpiphanyGraphCheckpoint;
|
||||
use epiphany_state_model::EpiphanyGraphEdge;
|
||||
use epiphany_state_model::EpiphanyGraphFrontier;
|
||||
use epiphany_state_model::EpiphanyGraphLink;
|
||||
use epiphany_state_model::EpiphanyGraphNode;
|
||||
use epiphany_state_model::EpiphanyGraphs;
|
||||
use epiphany_state_model::EpiphanyInvariant;
|
||||
use epiphany_state_model::EpiphanyModeKind;
|
||||
use epiphany_state_model::EpiphanyModeState;
|
||||
use epiphany_state_model::EpiphanyObservation;
|
||||
use epiphany_state_model::EpiphanyScratchPad;
|
||||
use epiphany_state_model::EpiphanyStateItem;
|
||||
use epiphany_state_model::EpiphanySubgoal;
|
||||
use epiphany_state_model::EpiphanyThreadState;
|
||||
use codex_protocol::protocol::GranularApprovalConfig;
|
||||
use codex_protocol::protocol::InitialHistory;
|
||||
use codex_protocol::protocol::InterAgentCommunication;
|
||||
|
|
@ -153,6 +153,7 @@ fn codex_session_has_no_epiphany_state_custody() {
|
|||
let session = include_str!("mod.rs");
|
||||
let codex_thread = include_str!("../codex_thread.rs");
|
||||
let core_lib = include_str!("../lib.rs");
|
||||
let protocol = include_str!("../../../protocol/src/protocol.rs");
|
||||
|
||||
assert!(!session_state.contains("epiphany_state"));
|
||||
assert!(!session.contains("set_epiphany_state"));
|
||||
|
|
@ -160,6 +161,7 @@ fn codex_session_has_no_epiphany_state_custody() {
|
|||
assert!(!codex_thread.contains("async fn epiphany_state"));
|
||||
assert!(!codex_thread.contains("pub async fn epiphany_"));
|
||||
assert!(!core_lib.contains("epiphany_rollout"));
|
||||
assert!(!protocol.contains("pub use epiphany_state_model::"));
|
||||
}
|
||||
|
||||
fn sample_epiphany_state_for_prompt() -> EpiphanyThreadState {
|
||||
|
|
|
|||
42
vendor/codex/codex-rs/protocol/src/protocol.rs
vendored
42
vendor/codex/codex-rs/protocol/src/protocol.rs
vendored
|
|
@ -50,6 +50,10 @@ use crate::request_permissions::RequestPermissionsEvent;
|
|||
use crate::request_permissions::RequestPermissionsResponse;
|
||||
use crate::request_user_input::RequestUserInputResponse;
|
||||
use crate::user_input::UserInput;
|
||||
#[cfg(test)]
|
||||
use epiphany_state_model::*;
|
||||
#[cfg(not(test))]
|
||||
use epiphany_state_model::EpiphanyStateItem;
|
||||
use codex_utils_absolute_path::AbsolutePathBuf;
|
||||
use schemars::JsonSchema;
|
||||
use serde::Deserialize;
|
||||
|
|
@ -2947,44 +2951,6 @@ pub enum RolloutItem {
|
|||
EventMsg(EventMsg),
|
||||
}
|
||||
|
||||
pub use epiphany_state_model::EpiphanyAcceptanceReceipt;
|
||||
pub use epiphany_state_model::EpiphanyBacklogItem;
|
||||
pub use epiphany_state_model::EpiphanyChurnState;
|
||||
pub use epiphany_state_model::EpiphanyCodeRef;
|
||||
pub use epiphany_state_model::EpiphanyEvidenceRecord;
|
||||
pub use epiphany_state_model::EpiphanyGraph;
|
||||
pub use epiphany_state_model::EpiphanyGraphCheckpoint;
|
||||
pub use epiphany_state_model::EpiphanyGraphEdge;
|
||||
pub use epiphany_state_model::EpiphanyGraphFrontier;
|
||||
pub use epiphany_state_model::EpiphanyGraphLink;
|
||||
pub use epiphany_state_model::EpiphanyGraphNode;
|
||||
pub use epiphany_state_model::EpiphanyGraphs;
|
||||
pub use epiphany_state_model::EpiphanyInvariant;
|
||||
pub use epiphany_state_model::EpiphanyInvestigationCheckpoint;
|
||||
pub use epiphany_state_model::EpiphanyInvestigationDisposition;
|
||||
pub use epiphany_state_model::EpiphanyJobBinding;
|
||||
pub use epiphany_state_model::EpiphanyJobKind;
|
||||
pub use epiphany_state_model::EpiphanyModeKind;
|
||||
pub use epiphany_state_model::EpiphanyModeState;
|
||||
pub use epiphany_state_model::EpiphanyObjectiveDraft;
|
||||
pub use epiphany_state_model::EpiphanyObjectiveDraftLanePlan;
|
||||
pub use epiphany_state_model::EpiphanyObjectiveDraftScope;
|
||||
pub use epiphany_state_model::EpiphanyObservation;
|
||||
pub use epiphany_state_model::EpiphanyPlanningCapture;
|
||||
pub use epiphany_state_model::EpiphanyPlanningPriority;
|
||||
pub use epiphany_state_model::EpiphanyPlanningSourceRef;
|
||||
pub use epiphany_state_model::EpiphanyPlanningState;
|
||||
pub use epiphany_state_model::EpiphanyRetrievalShardSummary;
|
||||
pub use epiphany_state_model::EpiphanyRetrievalState;
|
||||
pub use epiphany_state_model::EpiphanyRetrievalStatus;
|
||||
pub use epiphany_state_model::EpiphanyRoadmapStream;
|
||||
pub use epiphany_state_model::EpiphanyRuntimeLink;
|
||||
pub use epiphany_state_model::EpiphanyScratchPad;
|
||||
pub use epiphany_state_model::EpiphanyStateItem;
|
||||
pub use epiphany_state_model::EpiphanySubgoal;
|
||||
pub use epiphany_state_model::EpiphanyThreadState;
|
||||
pub use epiphany_state_model::render_epiphany_state;
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, TS)]
|
||||
pub struct CompactedItem {
|
||||
pub message: String,
|
||||
|
|
|
|||
Reference in a new issue