Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions crates/runvil-plugin-sdk/src/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>) -> ToolOutput {
ToolOutput {
Expand Down
8 changes: 5 additions & 3 deletions crates/runvil-plugin-sys/include/runvil_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 5 additions & 3 deletions crates/runvil-plugin-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading