Skip to main content

Module permissions

Module permissions 

Source
Expand description

Permission decision wire-data - ToolPermissionContext, PermissionDecision, PermissionUpdate, PermissionUpdateDestination, PermissionBehavior, PermissionRuleValue. The matching CanUseToolCallback trait stays SDK-side because it owns function-pointer dispatch.

Re-exportsΒ§

use serde::Deserialize; πŸ”’
use serde::Deserialize; πŸ”’
use serde::Serialize; πŸ”’
use serde::Serialize; πŸ”’
use serde_json::Value; πŸ”’
use crate::options::PermissionMode; πŸ”’

StructsΒ§

PermissionDecision
The decision a callback returns.
PermissionRuleValue
One tool-rule entry inside a rule-based PermissionUpdate. Wraps the CLI’s PermissionRuleValue. Wire uses camelCase (toolName, ruleContent) per the CLI’s to_dict.
ToolPermissionContext

EnumsΒ§

DecisionKind πŸ”’
PermissionBehavior
Policy a rule-based PermissionUpdate applies. Wire shape: PermissionBehavior literal.
PermissionUpdate
One permission-state mutation attached to an allow decision. Mirrors the CLI’s PermissionUpdate. Dispatched on type.
PermissionUpdateDestination
Where a PermissionUpdate should be persisted. Wire shape: PermissionUpdateDestination literal.