pub struct SessionRpcPermissionsPaths<'a> { /* private fields */ }Expand description
session.permissions.paths.* RPCs.
Implementations§
Source§impl<'a> SessionRpcPermissionsPaths<'a>
impl<'a> SessionRpcPermissionsPaths<'a>
Sourcepub async fn list(&self) -> Result<PermissionPathsList, Error>
pub async fn list(&self) -> Result<PermissionPathsList, Error>
Returns the session’s allowed directories and primary working directory.
Wire method: session.permissions.paths.list.
§Returns
Snapshot of the session’s allow-listed directories and primary working directory.
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(
&self,
params: PermissionPathsAddParams,
) -> Result<PermissionsPathsAddResult, Error>
pub async fn add( &self, params: PermissionPathsAddParams, ) -> Result<PermissionsPathsAddResult, Error>
Adds a directory to the session’s allow-list.
Wire method: session.permissions.paths.add.
§Parameters
params- Directory path to add to the session’s allowed directories.
§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.
Sourcepub async fn update_primary(
&self,
params: PermissionPathsUpdatePrimaryParams,
) -> Result<PermissionsPathsUpdatePrimaryResult, Error>
pub async fn update_primary( &self, params: PermissionPathsUpdatePrimaryParams, ) -> Result<PermissionsPathsUpdatePrimaryResult, Error>
Updates the session’s primary working directory used by the permission policy.
Wire method: session.permissions.paths.updatePrimary.
§Parameters
params- Directory path to set as the session’s new primary working directory.
§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.
Sourcepub async fn is_path_within_allowed_directories(
&self,
params: PermissionPathsAllowedCheckParams,
) -> Result<PermissionPathsAllowedCheckResult, Error>
pub async fn is_path_within_allowed_directories( &self, params: PermissionPathsAllowedCheckParams, ) -> Result<PermissionPathsAllowedCheckResult, Error>
Reports whether a path falls within any of the session’s allowed directories.
Wire method: session.permissions.paths.isPathWithinAllowedDirectories.
§Parameters
params- Path to evaluate against the session’s allowed directories.
§Returns
Indicates whether the supplied path is within the session’s allowed directories.
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 is_path_within_workspace(
&self,
params: PermissionPathsWorkspaceCheckParams,
) -> Result<PermissionPathsWorkspaceCheckResult, Error>
pub async fn is_path_within_workspace( &self, params: PermissionPathsWorkspaceCheckParams, ) -> Result<PermissionPathsWorkspaceCheckResult, Error>
Reports whether a path falls within the session’s workspace (primary) directory.
Wire method: session.permissions.paths.isPathWithinWorkspace.
§Parameters
params- Path to evaluate against the session’s workspace (primary) directory.
§Returns
Indicates whether the supplied path is within the session’s workspace directory.
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 SessionRpcPermissionsPaths<'a>
impl<'a> Clone for SessionRpcPermissionsPaths<'a>
Source§fn clone(&self) -> SessionRpcPermissionsPaths<'a>
fn clone(&self) -> SessionRpcPermissionsPaths<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more