feat(sandbox): implement cross-platform support with Windows fallback
- Add conditional compilation for Unix-specific gaol sandbox functionality - Implement Windows-compatible SandboxExecutor with no-op sandboxing - Update ProfileBuilder to handle both Unix and Windows platforms - Add platform-specific dependency declaration for gaol crate - Modify agent and claude commands to use appropriate sandbox implementation - Update test modules with conditional compilation for Unix-only tests - Ensure graceful degradation on Windows with logging warnings This change enables the application to build and run on Windows while maintaining full sandbox security on Unix-like systems.
This commit is contained in:
@@ -996,12 +996,20 @@ pub async fn execute_agent(
|
||||
Ok(build_result) => {
|
||||
|
||||
// Create the enhanced sandbox executor
|
||||
#[cfg(unix)]
|
||||
let executor = crate::sandbox::executor::SandboxExecutor::new_with_serialization(
|
||||
build_result.profile,
|
||||
project_path_buf.clone(),
|
||||
build_result.serialized
|
||||
);
|
||||
|
||||
#[cfg(not(unix))]
|
||||
let executor = crate::sandbox::executor::SandboxExecutor::new_with_serialization(
|
||||
(),
|
||||
project_path_buf.clone(),
|
||||
build_result.serialized
|
||||
);
|
||||
|
||||
// Prepare the sandboxed command
|
||||
let args = vec![
|
||||
"-p", &task,
|
||||
|
Reference in New Issue
Block a user