pub struct SessionRpcPermissionsLocations<'a> { /* private fields */ }Expand description
session.permissions.locations.* RPCs.
Implementations§
Source§impl<'a> SessionRpcPermissionsLocations<'a>
impl<'a> SessionRpcPermissionsLocations<'a>
Sourcepub async fn resolve(
&self,
params: PermissionLocationResolveParams,
) -> Result<PermissionLocationResolveResult, Error>
pub async fn resolve( &self, params: PermissionLocationResolveParams, ) -> Result<PermissionLocationResolveResult, Error>
Resolves the permission location key and type for a working directory.
Wire method: session.permissions.locations.resolve.
§Parameters
params- Working directory to resolve into a location-permissions key.
§Returns
Resolved location-permissions key and type.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn apply(
&self,
params: PermissionLocationApplyParams,
) -> Result<PermissionLocationApplyResult, Error>
pub async fn apply( &self, params: PermissionLocationApplyParams, ) -> Result<PermissionLocationApplyResult, Error>
Applies persisted location-scoped tool approvals and allowed directories for a working directory to this session’s permission service.
Wire method: session.permissions.locations.apply.
§Parameters
params- Working directory to load persisted location permissions for.
§Returns
Summary of persisted location permissions applied to the session.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn add_tool_approval(
&self,
params: PermissionLocationAddToolApprovalParams,
) -> Result<PermissionsLocationsAddToolApprovalResult, Error>
pub async fn add_tool_approval( &self, params: PermissionLocationAddToolApprovalParams, ) -> Result<PermissionsLocationsAddToolApprovalResult, Error>
Persists a tool approval for a permission location and applies its rules to this session’s live permission service.
Wire method: session.permissions.locations.addToolApproval.
§Parameters
params- Location-scoped tool approval to persist.
§Returns
Indicates whether the operation succeeded.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Trait Implementations§
Source§impl<'a> Clone for SessionRpcPermissionsLocations<'a>
impl<'a> Clone for SessionRpcPermissionsLocations<'a>
Source§fn clone(&self) -> SessionRpcPermissionsLocations<'a>
fn clone(&self) -> SessionRpcPermissionsLocations<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more