mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-09 22:33:37 +00:00
Fix sandbox spec feature gating
This commit is contained in:
parent
8b3ca5ef01
commit
8a03928db6
6 changed files with 9 additions and 9 deletions
|
|
@ -7,7 +7,7 @@ description = "Sandbox trait and implementations for Fabro agent execution envir
|
|||
|
||||
[features]
|
||||
default = ["local"]
|
||||
local = ["dep:glob", "dep:libc"]
|
||||
local = []
|
||||
docker = ["dep:bollard", "dep:tar", "dep:futures"]
|
||||
ssh = ["dep:openssh", "dep:fabro-github", "dep:fabro-config"]
|
||||
exe = ["ssh", "fabro-config/exedev", "fabro-types/exedev"]
|
||||
|
|
@ -33,7 +33,7 @@ base64.workspace = true
|
|||
shlex = "1"
|
||||
|
||||
# local
|
||||
glob = { version = "0.3", optional = true }
|
||||
glob = { version = "0.3" }
|
||||
|
||||
# docker
|
||||
bollard = { workspace = true, optional = true }
|
||||
|
|
@ -56,7 +56,7 @@ daytona-api-client = { workspace = true, optional = true }
|
|||
git2 = { workspace = true, optional = true }
|
||||
|
||||
[target.'cfg(unix)'.dependencies]
|
||||
libc = { version = "0.2", optional = true }
|
||||
libc = { version = "0.2" }
|
||||
|
||||
[dev-dependencies]
|
||||
tokio = { workspace = true, features = ["test-util", "macros"] }
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ pub mod worktree;
|
|||
#[cfg(feature = "ssh")]
|
||||
pub(crate) mod ssh_common;
|
||||
|
||||
#[cfg(feature = "local")]
|
||||
pub mod local;
|
||||
|
||||
#[cfg(feature = "docker")]
|
||||
|
|
@ -47,7 +46,6 @@ pub use sandbox_provider::SandboxProvider;
|
|||
|
||||
pub use worktree::{WorktreeConfig, WorktreeEvent, WorktreeEventCallback, WorktreeSandbox};
|
||||
|
||||
#[cfg(feature = "local")]
|
||||
pub use local::LocalSandbox;
|
||||
|
||||
#[cfg(feature = "docker")]
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ use crate::ssh::{OpensshRunner, SshConfig, SshSandbox};
|
|||
/// Returns a sandbox that can perform file operations.
|
||||
pub async fn reconnect(record: &SandboxRecord) -> Result<Box<dyn crate::Sandbox>> {
|
||||
match record.provider.as_str() {
|
||||
#[cfg(feature = "local")]
|
||||
"local" => {
|
||||
let sandbox = LocalSandbox::new(PathBuf::from(&record.working_directory));
|
||||
Ok(Box::new(sandbox))
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
use std::path::PathBuf;
|
||||
use std::sync::Arc;
|
||||
|
||||
use anyhow::anyhow;
|
||||
use fabro_types::settings::WorktreeMode;
|
||||
|
||||
#[cfg(any(feature = "docker", feature = "daytona", feature = "exe"))]
|
||||
use anyhow::anyhow;
|
||||
|
||||
use crate::sandbox_record::SandboxRecord;
|
||||
use crate::{Sandbox, SandboxEventCallback};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
//! Shared types and utilities for SSH-based sandbox implementations (exe, ssh).
|
||||
|
||||
use std::path::Path;
|
||||
use std::time::Instant;
|
||||
|
||||
#[cfg(feature = "daytona")]
|
||||
use std::path::Path;
|
||||
|
||||
use async_trait::async_trait;
|
||||
use base64::Engine;
|
||||
use base64::engine::general_purpose::STANDARD;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ mod validate;
|
|||
|
||||
pub use crate::pipeline::{DevcontainerSpec, LlmSpec, SandboxEnvSpec};
|
||||
pub use create::{CreateRunInput, CreatedRun, create};
|
||||
pub use fabro_sandbox::SandboxSpec;
|
||||
pub use fork::{ForkRunInput, fork};
|
||||
pub use resume::resume;
|
||||
pub use rewind::{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue