pub struct PermissionRequestWrite {
pub can_offer_session_approval: bool,
pub diff: String,
pub file_name: String,
pub intention: String,
pub kind: PermissionRequestWriteKind,
pub new_file_contents: Option<String>,
pub request_sandbox_bypass: Option<bool>,
pub request_sandbox_bypass_reason: Option<String>,
pub tool_call_id: Option<String>,
}Expand description
File write permission request
Fields§
§can_offer_session_approval: boolWhether the UI can offer session-wide approval for file write operations
diff: StringUnified diff showing the proposed changes
file_name: StringPath of the file being written to
intention: StringHuman-readable description of the intended file change
kind: PermissionRequestWriteKindPermission kind discriminator
new_file_contents: Option<String>Complete new file contents for newly created files
request_sandbox_bypass: Option<bool>True when a built-in file tool (apply_patch / str_replace_editor) asked to write a path the sandbox filesystem policy would block, and the host opted in via sandbox.allowBypass. This is a request, not a grant: the write happens unsandboxed only if the user approves this permission request. Hosts should highlight the elevated risk in the approval UI.
request_sandbox_bypass_reason: Option<String>Justification for the sandbox-bypass request. Only meaningful when requestSandboxBypass is true.
tool_call_id: Option<String>Tool call ID that triggered this permission request
Trait Implementations§
Source§impl Clone for PermissionRequestWrite
impl Clone for PermissionRequestWrite
Source§fn clone(&self) -> PermissionRequestWrite
fn clone(&self) -> PermissionRequestWrite
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more