From 5b5849612b32187c40dc1dcef94cf2d652072275 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Thu, 3 Dec 2026 05:54:25 -0800 Subject: [PATCH] Document untrusted output marking as optional Mark `ToolOutput::untrusted` and `RV_RESULT_UNTRUSTED` as optional API hooks that shipped Packs currently do not use. Regenerate `runvil_plugin.h` to match `runvil-plugin-sys`. --- crates/runvil-plugin-sdk/src/tool.rs | 8 ++++++-- crates/runvil-plugin-sys/include/runvil_plugin.h | 8 +++++--- crates/runvil-plugin-sys/src/lib.rs | 8 +++++--- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/crates/runvil-plugin-sdk/src/tool.rs b/crates/runvil-plugin-sdk/src/tool.rs index 1ecaed3..d175e8a 100644 --- a/crates/runvil-plugin-sdk/src/tool.rs +++ b/crates/runvil-plugin-sdk/src/tool.rs @@ -334,8 +334,12 @@ impl ToolOutput { } /// An output that may hold data an attacker can influence, such as - /// the contents of a file or a web page. The Host marks it before a - /// model reads it. + /// the contents of a file or a web page. + /// + /// Untrusted (guard-nonce) marking is optional: it is available for + /// Hosts and Packs that opt in, and is currently unused by the shipped + /// Packs, which return [`ToolOutput::trusted`]. When used, the Host + /// marks the text before a model reads it. #[must_use] pub fn untrusted(text: impl Into) -> ToolOutput { ToolOutput { diff --git a/crates/runvil-plugin-sys/include/runvil_plugin.h b/crates/runvil-plugin-sys/include/runvil_plugin.h index 224cdd5..117a4a3 100644 --- a/crates/runvil-plugin-sys/include/runvil_plugin.h +++ b/crates/runvil-plugin-sys/include/runvil_plugin.h @@ -1648,9 +1648,11 @@ struct RvCall { /** * The call succeeded, and its text may hold data an attacker can - * influence, such as the contents of a file or a web page. The Host marks - * such text before a model reads it. Zero, so a result that names no kind - * is treated with care. + * influence, such as the contents of a file or a web page. Untrusted + * (guard-nonce) marking is optional: it is available for Hosts and Packs + * that opt in, and is currently unused by the shipped Packs, which return + * `RV_RESULT_TRUSTED`. When used, the Host marks the text before a model + * reads it. Zero, so a result that names no kind is treated with care. */ #define RV_RESULT_UNTRUSTED 0 diff --git a/crates/runvil-plugin-sys/src/lib.rs b/crates/runvil-plugin-sys/src/lib.rs index 07ee834..24116f9 100644 --- a/crates/runvil-plugin-sys/src/lib.rs +++ b/crates/runvil-plugin-sys/src/lib.rs @@ -444,9 +444,11 @@ pub const RV_PACK_OPEN: RvVerb = 8; /// as [`RvVerb`] is. pub type RvResultKind = u32; /// The call succeeded, and its text may hold data an attacker can -/// influence, such as the contents of a file or a web page. The Host marks -/// such text before a model reads it. Zero, so a result that names no kind -/// is treated with care. +/// influence, such as the contents of a file or a web page. Untrusted +/// (guard-nonce) marking is optional: it is available for Hosts and Packs +/// that opt in, and is currently unused by the shipped Packs, which return +/// [`RV_RESULT_TRUSTED`]. When used, the Host marks the text before a model +/// reads it. Zero, so a result that names no kind is treated with care. pub const RV_RESULT_UNTRUSTED: RvResultKind = 0; /// The call succeeded, and the Plugin vouches for every byte of its text. pub const RV_RESULT_TRUSTED: RvResultKind = 1;