@tablation/crew 0.127.7 → 0.127.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +23 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -11509,7 +11509,7 @@ var SandboxRunner = class {
|
|
|
11509
11509
|
rmSync14(tmp, { recursive: true, force: true });
|
|
11510
11510
|
}
|
|
11511
11511
|
}
|
|
11512
|
-
const withStubs =
|
|
11512
|
+
const withStubs = `${sandboxEnvExports()}PATH=${shQuote2(SANDBOX_STUB_DIR)}:"$PATH"; export PATH; `;
|
|
11513
11513
|
const command2 = viaUpload ? ["sh", "-c", `${withStubs}exec ${[harness, ...plan.args].map(shQuote2).join(" ")} < ${SANDBOX_PROMPT_PATH}`] : ["sh", "-c", `${withStubs}exec "$@"`, "sh", harness, ...plan.args];
|
|
11514
11514
|
const child = spawn3(cfg.bin, ["sandbox", "exec", "-n", name, "--no-login-shell", "--workdir", cfg.workDir, "--", ...command2], {
|
|
11515
11515
|
env: process.env,
|
|
@@ -12792,9 +12792,10 @@ var realExec = (bin, args, o) => execFileP2(bin, args, { env: o?.env ?? process.
|
|
|
12792
12792
|
var OPENSHELL_ATTACHABLE_LABEL = "openshell.ai/sandbox-attachable=true";
|
|
12793
12793
|
var OPENSHELL_WORKSPACE_LABEL = "openshell.ai/sandbox-attachable-workspace";
|
|
12794
12794
|
var VOLUME_ROOT = "/cache";
|
|
12795
|
+
var SANDBOX_WORKSPACE = "default";
|
|
12795
12796
|
var DEFAULT_CACHE_SETTINGS = {
|
|
12796
12797
|
engine: "docker",
|
|
12797
|
-
workspace:
|
|
12798
|
+
workspace: SANDBOX_WORKSPACE,
|
|
12798
12799
|
helperImage: "alpine/git:latest",
|
|
12799
12800
|
depsLockfile: "pnpm-lock.yaml"
|
|
12800
12801
|
};
|
|
@@ -12950,6 +12951,16 @@ var SandboxCache = class {
|
|
|
12950
12951
|
]);
|
|
12951
12952
|
return true;
|
|
12952
12953
|
}
|
|
12954
|
+
/** The workspace label the existing volume carries, or null when the volume is absent or unlabeled. A volume's labels cannot be changed in place. */
|
|
12955
|
+
async volumeWorkspace() {
|
|
12956
|
+
try {
|
|
12957
|
+
const { stdout } = await this.engine(["volume", "inspect", "--format", `{{index .Labels "${OPENSHELL_WORKSPACE_LABEL}"}}`, this.s.volume]);
|
|
12958
|
+
const v = stdout.trim();
|
|
12959
|
+
return v && v !== "<no value>" ? v : null;
|
|
12960
|
+
} catch {
|
|
12961
|
+
return null;
|
|
12962
|
+
}
|
|
12963
|
+
}
|
|
12953
12964
|
helper(image, script, args, env = {}, extra = []) {
|
|
12954
12965
|
const flags = Object.keys(env).flatMap((k) => ["-e", k]);
|
|
12955
12966
|
return this.engine(["run", "--rm", "--label", DOCKER_LABEL_OWNER, "-v", `${this.s.volume}:${VOLUME_ROOT}`, ...extra, ...flags, "--entrypoint", "sh", image, "-c", script, "sh", ...args], { ...process.env, ...env });
|
|
@@ -13365,6 +13376,14 @@ var CREW_ENV = {
|
|
|
13365
13376
|
// A run cannot reach the download host, so an in-run update attempt is only noise.
|
|
13366
13377
|
DISABLE_AUTOUPDATER: "1"
|
|
13367
13378
|
};
|
|
13379
|
+
function sandboxEnvExports() {
|
|
13380
|
+
const vars = {
|
|
13381
|
+
...CREW_ENV,
|
|
13382
|
+
[SERENA_LANGUAGE_SERVERS_ENV]: `${SERENA_IMAGE_HOME}/language_servers`,
|
|
13383
|
+
UV_PYTHON_INSTALL_DIR: `${CREW_PREFIX}/uv/python`
|
|
13384
|
+
};
|
|
13385
|
+
return Object.entries(vars).map(([k, v]) => `${k}=${v}; export ${k}; `).join("");
|
|
13386
|
+
}
|
|
13368
13387
|
function claudeInstallCommand() {
|
|
13369
13388
|
const cases = Object.entries(SANDBOX_CLAUDE_SHA256).map(([arch, { platform: platform2, sha256: sha2562 }]) => `${arch}) p=${platform2}; sum=${sha2562};;`).join(" ");
|
|
13370
13389
|
return [
|
|
@@ -30742,6 +30761,8 @@ watermark: ${state.watermark()}
|
|
|
30742
30761
|
try {
|
|
30743
30762
|
const missing = unmirroredRepos(sandboxCacheRepos(route2, cfg.ship), await new SandboxCache(cacheSettings).list());
|
|
30744
30763
|
for (const r of missing) problems.push({ severity: "attention", kind: "sandbox_cache_unmirrored", route: route2.route, message: `${r} has no mirror in the cache volume ${cacheSettings.volume}, so sandboxed runs cannot clone it`, remedy: "see `crew sandbox cache` for the last refresh failure" });
|
|
30764
|
+
const labeled = await new SandboxCache(cacheSettings).volumeWorkspace();
|
|
30765
|
+
if (labeled !== null && labeled !== cacheSettings.workspace) problems.push({ severity: "blocker", kind: "sandbox_cache_workspace_mismatch", route: route2.route, message: `the cache volume ${cacheSettings.volume} is labeled for OpenShell workspace "${labeled}" but sandboxes are created in "${cacheSettings.workspace}", so the gateway refuses to mount it`, remedy: "run `crew sandbox cache --reset` to recreate the volume with the right label" });
|
|
30745
30766
|
} catch {
|
|
30746
30767
|
}
|
|
30747
30768
|
}
|
package/package.json
CHANGED