2 Commits

Author SHA1 Message Date
Dark-Alex-17 3df590f276 fix: sbx isn't copying base files in their respective directories
CI / All (ubuntu-latest) (push) Failing after 25s
CI / All (macos-latest) (push) Has been cancelled
CI / All (windows-latest) (push) Has been cancelled
2026-07-01 18:44:07 -06:00
Dark-Alex-17 91300c16fe fix: Update deprecated sbx kit config 2026-07-01 17:52:04 -06:00
2 changed files with 25 additions and 20 deletions
+3 -3
View File
@@ -6,14 +6,14 @@
# sbx cp $HOME/.coyote_password testing:/home/agent/
# sbx run testing --kit ./sbx-kit/
schemaVersion: '1'
kind: agent
kind: sandbox
name: coyote
displayName: Coyote
description: >
An all-in-one, batteries-included LLM CLI tool featuring Shell Assistant,
CLI & REPL mode, RAG, AI tools & agents, MCP servers, skills, and macros.
agent:
sandbox:
image: 'docker/sandbox-templates:shell-docker'
aiFilename: COYOTE.md
entrypoint:
@@ -293,7 +293,7 @@ commands:
background: false
description: Bootstrap Coyote config directory on first sandbox start
memory: |
agentContext: |
## Sandbox environment
You are running inside a Docker sandbox launched via `sbx run coyote`. The
+22 -17
View File
@@ -69,7 +69,7 @@ pub fn launch(name: Option<String>, fresh: bool, no_mixins: bool) -> Result<()>
}
}
exec_run(&name, &kit_path)
exec_run(&name)
}
fn ensure_sbx_installed() -> Result<()> {
@@ -316,6 +316,7 @@ fn sandbox_exists(name: &str) -> Result<bool> {
fn create_sandbox(name: &str, kit_path: &Path, mixins: &[DiscoveredMixin]) -> Result<()> {
info!("Creating sandbox '{name}'");
let args = build_create_args(name, kit_path, mixins)?;
debug!("sbx {}", args.join(" "));
let status = Command::new(SBX_BINARY)
.args(&args)
.stdin(Stdio::inherit())
@@ -342,6 +343,8 @@ fn build_create_args(
let mut args = vec![
"create".to_string(),
"--name".to_string(),
name.to_string(),
"--kit".to_string(),
kit_str.to_string(),
];
@@ -356,8 +359,6 @@ fn build_create_args(
args.push(mixin_str);
}
args.push("--name".to_string());
args.push(name.to_string());
args.push(SANDBOX_AGENT.to_string());
args.push(".".to_string());
@@ -369,11 +370,17 @@ fn copy_host_files(name: &str) -> Result<()> {
let home_dir = dirs::home_dir().context("Could not determine home directory")?;
if config_dir.exists() {
ensure_sandbox_dir(name, "/home/agent/.config")?;
let src = format!("{}/", config_dir.display());
let dest = format!("{name}:/home/agent/.config/");
sbx_cp(&src, &dest)?;
chown_agent_recursive(name, "/home/agent/.config")?;
let sandbox_config_dir = "/home/agent/.config/coyote";
ensure_sandbox_dir(name, sandbox_config_dir)?;
let dest = format!("{name}:{sandbox_config_dir}/");
for entry in fs::read_dir(&config_dir)
.with_context(|| format!("Failed to read {}", config_dir.display()))?
{
let entry = entry?;
let path = entry.path();
sbx_cp(&path.display().to_string(), &dest)?;
}
chown_agent_recursive(name, sandbox_config_dir)?;
} else {
debug!(
"Skipping config copy: {} does not exist",
@@ -503,12 +510,10 @@ fn sbx_cp(src: &str, dest: &str) -> Result<()> {
Ok(())
}
fn exec_run(name: &str, kit_path: &Path) -> Result<()> {
let kit_str = kit_path
.to_str()
.ok_or_else(|| anyhow!("Kit path is not valid UTF-8: {}", kit_path.display()))?;
fn exec_run(name: &str) -> Result<()> {
debug!("sbx run --name {name}");
let status = Command::new(SBX_BINARY)
.args(["run", name, "--kit", kit_str])
.args(["run", "--name", name])
.stdin(Stdio::inherit())
.stdout(Stdio::inherit())
.stderr(Stdio::inherit())
@@ -644,14 +649,14 @@ mod tests {
args,
vec![
"create".to_string(),
"--name".to_string(),
"my-box".to_string(),
"--kit".to_string(),
"/cache/sbx-kit".to_string(),
"--kit".to_string(),
dir_a.display().to_string(),
"--kit".to_string(),
dir_b.display().to_string(),
"--name".to_string(),
"my-box".to_string(),
"coyote".to_string(),
".".to_string(),
]
@@ -669,10 +674,10 @@ mod tests {
args,
vec![
"create".to_string(),
"--kit".to_string(),
"/cache/sbx-kit".to_string(),
"--name".to_string(),
"box".to_string(),
"--kit".to_string(),
"/cache/sbx-kit".to_string(),
"coyote".to_string(),
".".to_string(),
]