diff --git a/.repository-projection.json b/.repository-projection.json index 0250a2a01..5f06615ac 100644 --- a/.repository-projection.json +++ b/.repository-projection.json @@ -3,11 +3,11 @@ "projection": "deixic-code", "projectionSchemaVersion": 1, "sourceRepository": "dx-corp/mono", - "sourceSha": "bf2c5a7f7b2162baf5050f996d8836da95dbeeb2", + "sourceSha": "e4c47980b8a1ec2d1c8c3864e5c9736c19b6dc10", "destinationRepository": "dx-corp/code", - "priorProjectedBase": "29ac4ae3e49ae6e9e878a5a5174d3426e8d50588", + "priorProjectedBase": "bb99d8a6504efa987249aa946f6625b32fcef83d", "definitionDigest": "cb9d429542ebb0a2de9b42a7aad60d9d8696a648ceba47c30f05c0b285ca0db7", "toolDigest": "f8cb071b0f27267120ccf45a00d0982f45113bd23535bef6a1555b4933f99f13", - "contentDigest": "8fbe54bcb9c4165e2a6a2bc7de4c14e0c9048a96af8026ee04ed782d6766f076", + "contentDigest": "9de16a861b13e6a886792dcde0421c62bf413078e9f30b0db0d37c87cba1a227", "publicationEligible": true } diff --git a/packages/dex-host-rs/src/host_turn.rs b/packages/dex-host-rs/src/host_turn.rs index 455022fdb..54d6382cc 100644 --- a/packages/dex-host-rs/src/host_turn.rs +++ b/packages/dex-host-rs/src/host_turn.rs @@ -106,6 +106,7 @@ impl HostTurnRun { turn: turn.turn, message_id: None, model_binding: None, + voice: None, principal: turn.principal.clone(), text: turn.prompt, attachments: turn diff --git a/packages/dex-host-rs/src/log.rs b/packages/dex-host-rs/src/log.rs index 251e76487..fc0d56ecb 100644 --- a/packages/dex-host-rs/src/log.rs +++ b/packages/dex-host-rs/src/log.rs @@ -287,6 +287,7 @@ mod tests { turn: TurnId::new("t1"), message_id: None, model_binding: None, + voice: None, principal: PrincipalId::new("alice"), text: text.into(), attachments: Vec::new(), diff --git a/packages/dex-host-rs/src/model.rs b/packages/dex-host-rs/src/model.rs index c27e25f9f..4afb088f9 100644 --- a/packages/dex-host-rs/src/model.rs +++ b/packages/dex-host-rs/src/model.rs @@ -688,6 +688,7 @@ mod tests { turn: dex_loop::TurnId::new("t1"), message_id: None, model_binding: None, + voice: None, principal: PrincipalId::new("alice"), text: "read a.txt".into(), attachments: Vec::new(), diff --git a/packages/dex-host-rs/src/model_image_tests.rs b/packages/dex-host-rs/src/model_image_tests.rs index a6e53ad5d..57d44abde 100644 --- a/packages/dex-host-rs/src/model_image_tests.rs +++ b/packages/dex-host-rs/src/model_image_tests.rs @@ -36,6 +36,7 @@ fn context(output: Output) -> Context { turn: TurnId::new("turn"), message_id: None, model_binding: None, + voice: None, principal: PrincipalId::new("alice"), text: "Inspect the image and peer".into(), attachments: vec![], diff --git a/packages/dex-host-rs/src/turn.rs b/packages/dex-host-rs/src/turn.rs index c2c253774..4cc3b75c3 100644 --- a/packages/dex-host-rs/src/turn.rs +++ b/packages/dex-host-rs/src/turn.rs @@ -67,6 +67,7 @@ pub async fn run_local_turn( turn: request.turn, message_id: None, model_binding: None, + voice: None, principal: request.principal.clone(), text: request.text, attachments: Vec::new(), @@ -274,6 +275,7 @@ mod tests { turn: TurnId::new("t1"), message_id: None, model_binding: None, + voice: None, principal: principal.clone(), text: "Work unattended".into(), attachments: vec![], diff --git a/packages/dex-host-rs/tests/host_tools.rs b/packages/dex-host-rs/tests/host_tools.rs index 5fe61c2cd..344796b12 100644 --- a/packages/dex-host-rs/tests/host_tools.rs +++ b/packages/dex-host-rs/tests/host_tools.rs @@ -168,6 +168,7 @@ impl Turn { turn: TurnId::new("t1"), message_id: None, model_binding: None, + voice: None, principal: alice(), text: "make the marker".into(), attachments: Vec::new(), diff --git a/packages/dex-host-rs/tests/turn.rs b/packages/dex-host-rs/tests/turn.rs index 92032f0e7..356842a4b 100644 --- a/packages/dex-host-rs/tests/turn.rs +++ b/packages/dex-host-rs/tests/turn.rs @@ -86,6 +86,7 @@ async fn read_then_write_then_done_with_no_approval() { turn: TurnId::new("t1"), message_id: None, model_binding: None, + voice: None, principal: alice(), text: "read notes.txt, then write out.txt".into(), attachments: Vec::new(), diff --git a/packages/local-host-rs/src/init_cli.rs b/packages/local-host-rs/src/init_cli.rs index ea31882b5..cd6f2f1be 100644 --- a/packages/local-host-rs/src/init_cli.rs +++ b/packages/local-host-rs/src/init_cli.rs @@ -3178,6 +3178,7 @@ mod tests { #[test] fn a_pasted_callback_address_is_held_to_the_listener_checks() { + let _guard = crate::config::test_process_env_lock(); let port = callback_port(); let pasted = |address: String| pasted_callback(&address, "expected"); let callback = pasted(format!( diff --git a/vendor/dex-loop/src/context.rs b/vendor/dex-loop/src/context.rs index 8d4024028..9c130ede2 100644 --- a/vendor/dex-loop/src/context.rs +++ b/vendor/dex-loop/src/context.rs @@ -622,7 +622,7 @@ impl Context { authorized_tools: authorized_tools.clone(), approval_mode: *approval_mode, model_binding: model_binding.clone(), - voice: voice.clone(), + voice: voice.as_deref().cloned(), }; if self.status == Status::Running { // This message's cursor landed while the current turn was diff --git a/vendor/dex-loop/src/event.rs b/vendor/dex-loop/src/event.rs index f50548e20..ddf2da82b 100644 --- a/vendor/dex-loop/src/event.rs +++ b/vendor/dex-loop/src/event.rs @@ -565,7 +565,7 @@ pub enum Event { /// resolved by the authenticated host. Prompt data only; grants no /// authority. Older turns carry none and render no voice. #[serde(default, skip_serializing_if = "Option::is_none")] - voice: Option, + voice: Option>, }, /// Control: becomes a user message from `principal` before the next model /// call. Calls the model then proposes act under `principal`. @@ -903,6 +903,8 @@ mod tests { "voice": { "policy": { "guide_version": 3, + "response_guidance": "Use observed execution evidence", + "required_terms": ["Deixic"], "voice": {"kind": "neutral"} }, "tone": ["formal"] @@ -920,6 +922,14 @@ mod tests { ); let replay = serde_json::to_value(event).expect("durable event"); assert_eq!(replay["voice"]["tone"], input["voice"]["tone"]); + assert_eq!( + replay["voice"]["policy"]["response_guidance"], + input["voice"]["policy"]["response_guidance"] + ); + assert_eq!( + replay["voice"]["policy"]["required_terms"], + input["voice"]["policy"]["required_terms"] + ); assert_eq!( replay["voice"]["policy"]["voice"], input["voice"]["policy"]["voice"]