pub struct PromptRunParams {
pub cwd: String,
pub prompt: String,
pub model: Option<String>,
pub effort: Option<ReasoningEffort>,
pub approval_policy: ApprovalPolicy,
pub sandbox_policy: SandboxPolicy,
pub privileged_escalation_approved: bool,
pub attachments: Vec<PromptAttachment>,
pub timeout: Duration,
pub output_schema: Option<Value>,
}Fields§
§cwd: String§prompt: String§model: Option<String>§effort: Option<ReasoningEffort>§approval_policy: ApprovalPolicy§sandbox_policy: SandboxPolicy§privileged_escalation_approved: boolExplicit opt-in gate for privileged sandbox usage (SEC-004). Default stays false to preserve safe-by-default posture.
attachments: Vec<PromptAttachment>§timeout: Duration§output_schema: Option<Value>Implementations§
Source§impl PromptRunParams
impl PromptRunParams
Sourcepub fn new(cwd: impl Into<String>, prompt: impl Into<String>) -> Self
pub fn new(cwd: impl Into<String>, prompt: impl Into<String>) -> Self
Create prompt-run params with safe defaults. Allocation: two String allocations for cwd/prompt. Complexity: O(n), n = input lengths.
Sourcepub fn with_model(self, model: impl Into<String>) -> Self
pub fn with_model(self, model: impl Into<String>) -> Self
Set explicit model override. Allocation: one String. Complexity: O(model length).
Sourcepub fn with_effort(self, effort: ReasoningEffort) -> Self
pub fn with_effort(self, effort: ReasoningEffort) -> Self
Set explicit reasoning effort. Allocation: none. Complexity: O(1).
Sourcepub fn with_approval_policy(self, approval_policy: ApprovalPolicy) -> Self
pub fn with_approval_policy(self, approval_policy: ApprovalPolicy) -> Self
Set approval policy override. Allocation: none. Complexity: O(1).
Sourcepub fn with_sandbox_policy(self, sandbox_policy: SandboxPolicy) -> Self
pub fn with_sandbox_policy(self, sandbox_policy: SandboxPolicy) -> Self
Set sandbox policy override. Allocation: depends on sandbox payload move/clone at callsite. Complexity: O(1).
Sourcepub fn allow_privileged_escalation(self) -> Self
pub fn allow_privileged_escalation(self) -> Self
Explicitly approve privileged sandbox escalation for this run. Callers are expected to set approval policy + scope alongside this flag.
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Set prompt timeout. Allocation: none. Complexity: O(1).
Sourcepub fn with_output_schema(self, output_schema: Value) -> Self
pub fn with_output_schema(self, output_schema: Value) -> Self
Set one optional JSON Schema for the final assistant message.
Sourcepub fn with_attachment(self, attachment: PromptAttachment) -> Self
pub fn with_attachment(self, attachment: PromptAttachment) -> Self
Add one generic attachment. Allocation: amortized O(1) push. Complexity: O(1).
Sourcepub fn attach_path(self, path: impl Into<String>) -> Self
pub fn attach_path(self, path: impl Into<String>) -> Self
Add one @path attachment.
Allocation: one String. Complexity: O(path length).
Sourcepub fn attach_path_with_placeholder(
self,
path: impl Into<String>,
placeholder: impl Into<String>,
) -> Self
pub fn attach_path_with_placeholder( self, path: impl Into<String>, placeholder: impl Into<String>, ) -> Self
Add one @path attachment with placeholder.
Allocation: two Strings. Complexity: O(path + placeholder length).
Sourcepub fn attach_image_url(self, url: impl Into<String>) -> Self
pub fn attach_image_url(self, url: impl Into<String>) -> Self
Add one remote image attachment. Allocation: one String. Complexity: O(url length).
Sourcepub fn attach_local_image(self, path: impl Into<String>) -> Self
pub fn attach_local_image(self, path: impl Into<String>) -> Self
Add one local image attachment. Allocation: one String. Complexity: O(path length).
Trait Implementations§
Source§impl Clone for PromptRunParams
impl Clone for PromptRunParams
Source§fn clone(&self) -> PromptRunParams
fn clone(&self) -> PromptRunParams
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more