Expand description
Astrid Workspace - Operational boundaries for agent actions.
This crate provides workspace boundaries that define where the agent can operate. Unlike the WASM sandbox (which is inescapable), the operational workspace can be escaped with user approval.
§Key Concepts
- Workspace: A directory tree where the agent can freely operate
- Escape: Operations outside the workspace require approval
- Modes: Safe (always ask), Guided (smart defaults), Autonomous (no restrictions)
§Example
ⓘ
use astrid_workspace::{WorkspaceBoundary, WorkspaceConfig, WorkspaceMode};
let config = WorkspaceConfig::new("/home/user/project")
.with_mode(WorkspaceMode::Guided);
let boundary = WorkspaceBoundary::new(config);
// Check if a path is allowed
match boundary.check("/home/user/project/src/main.rs") {
PathCheck::Allowed => println!("Path is in workspace"),
PathCheck::RequiresApproval => println!("Needs user approval"),
_ => {}
}Re-exports§
pub use sandbox::ProcessSandboxConfig;pub use sandbox::SandboxCommand;pub use sandbox::SandboxPolicy;pub use sandbox::SandboxPrefix;