diff --git a/crates/tracedecay-agent-hosts/src/agents/context_scout/intent_pass.rs b/crates/tracedecay-agent-hosts/src/agents/context_scout/intent_pass.rs
index d229ba787d1..a810ea2ac3e 100644
--- a/crates/tracedecay-agent-hosts/src/agents/context_scout/intent_pass.rs
+++ b/crates/tracedecay-agent-hosts/src/agents/context_scout/intent_pass.rs
@@ -966,21 +966,27 @@ fn intent_candidate(
})
}
-/// Envelope identity of the pass's suggestion. Derived from the boundary so a
-/// stop boundary's intent suggestion never shares the feedback suggestion's
-/// envelope identity.
-fn intent_envelope_id(hook: &AdmittedContextScoutHookV1) -> Option<[u8; 16]> {
- let envelope = hook.envelope();
+/// Envelope identity of a boundary's intent suggestion. Derived from the
+/// boundary so it never shares the feedback suggestion's envelope identity.
+pub fn context_scout_intent_envelope_id(
+ project_id: [u8; 16],
+ event_id: [u8; 16],
+) -> Option<[u8; 16]> {
let digest = digest_bytes(canonical_sha256(&(
INTENT_ENVELOPE_DOMAIN,
- envelope.project_id,
- envelope.event_id,
+ project_id,
+ event_id,
)))?;
let mut envelope_id = [0; 16];
envelope_id.copy_from_slice(&digest[..16]);
(envelope_id != [0; 16]).then_some(envelope_id)
}
+fn intent_envelope_id(hook: &AdmittedContextScoutHookV1) -> Option<[u8; 16]> {
+ let envelope = hook.envelope();
+ context_scout_intent_envelope_id(envelope.project_id, envelope.event_id)
+}
+
/// Records one suggestion the pass decided and withheld, with the same
/// identity a delivery would carry.
async fn record_withheld(
diff --git a/crates/tracedecay-agent-hosts/src/agents/context_scout/owner.rs b/crates/tracedecay-agent-hosts/src/agents/context_scout/owner.rs
index 151df7ee1cb..c230cf07068 100644
--- a/crates/tracedecay-agent-hosts/src/agents/context_scout/owner.rs
+++ b/crates/tracedecay-agent-hosts/src/agents/context_scout/owner.rs
@@ -36,9 +36,10 @@ use super::{
ContextScoutModelExecutionV1, ContextScoutModelFuture, ContextScoutModelRequestV1,
ContextScoutMutationBindingV1, ContextScoutMutationResultV1,
ContextScoutMutationSettlementOutcomeV1, ContextScoutPublicMutationV1,
- ContextScoutRecentReadOutcomeV1, ContextScoutRecentStateV1, ContextScoutRouteV1,
- ContextScoutRuntimeOutcomeV1, ContextScoutSelectionInputV1, ContextScoutServiceStateV1,
- ContextScoutStatusV1, ContextScoutSuppressionV1, ProjectContextScoutDurableStoreV1,
+ ContextScoutRecentDeliveryV1, ContextScoutRecentReadOutcomeV1, ContextScoutRecentStateV1,
+ ContextScoutRouteV1, ContextScoutRuntimeOutcomeV1, ContextScoutSelectionInputV1,
+ ContextScoutServiceStateV1, ContextScoutStatusV1, ContextScoutSuppressionV1,
+ ProjectContextScoutDurableStoreV1,
};
use tracedecay_runtime_core::db::Database;
@@ -816,6 +817,24 @@ impl ProjectContextScoutOwnerV1 {
}
}
+ /// Exact delivery proof for one durable address and envelope identity,
+ /// independent of the bounded recent-page projection.
+ pub async fn delivery_exact(
+ &self,
+ address: ContextScoutAddressV1,
+ envelope_id: [u8; 16],
+ ) -> Result