@tablation/crew 0.130.2 → 0.130.3

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.
Files changed (2) hide show
  1. package/dist/cli.js +14 -1
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -13666,12 +13666,24 @@ function baseLayer() {
13666
13666
  return { name: "base", tag: `crew-sandbox-base:${hash({ SANDBOX_BASE_IMAGE, SANDBOX_OPENSHELL_VERSION })}`, dockerfile, files: {} };
13667
13667
  }
13668
13668
  var APT_HTTPS_COMMAND = "sed -i -E 's#http://([a-z0-9.-]*\\.)?ubuntu\\.com#https://\\1ubuntu.com#g' /etc/apt/sources.list.d/ubuntu.sources 2>/dev/null || true";
13669
+ var CA_BUNDLE_FILE = "ca-certificates.crt";
13670
+ var HOST_CA_BUNDLES = ["/etc/ssl/certs/ca-certificates.crt", "/etc/pki/tls/certs/ca-bundle.crt", "/etc/ssl/cert.pem"];
13671
+ function readHostCaBundle(paths = HOST_CA_BUNDLES) {
13672
+ for (const path of paths) {
13673
+ try {
13674
+ return readFileSync28(path, "utf8");
13675
+ } catch {
13676
+ }
13677
+ }
13678
+ return "";
13679
+ }
13669
13680
  function crewLayer(base, intel, bridge) {
13670
13681
  const files = { "credential-helper": CREDENTIAL_HELPER, "mcp.json": MCP_CONFIG, ...bridge ? { "intel-bridge": bridge } : {} };
13671
13682
  const env = Object.entries(CREW_ENV).map(([k, v]) => `${k}=${v}`).join(" ");
13672
13683
  const dockerfile = [
13673
13684
  `FROM ${base.tag}`,
13674
13685
  "USER root",
13686
+ `COPY ${CA_BUNDLE_FILE} /etc/ssl/certs/ca-certificates.crt`,
13675
13687
  run2(APT_HTTPS_COMMAND),
13676
13688
  run2(`apt-get update && apt-get install -y --no-install-recommends ca-certificates curl git${intel ? " python3 python3-venv nodejs" : ""} && rm -rf /var/lib/apt/lists/*`),
13677
13689
  `COPY credential-helper ${CREW_PREFIX}/bin/credential-helper`,
@@ -13686,7 +13698,7 @@ function crewLayer(base, intel, bridge) {
13686
13698
  `LABEL io.crew.sandbox.layer="crew" io.crew.sandbox.claude="${SANDBOX_CLAUDE_VERSION}"`,
13687
13699
  ""
13688
13700
  ].join("\n");
13689
- return { name: "crew", tag: `crew-sandbox-crew:${hash({ base: base.tag, dockerfile, files })}`, dockerfile, files };
13701
+ return { name: "crew", tag: `crew-sandbox-crew:${hash({ base: base.tag, dockerfile, files })}`, dockerfile, files, caBundleFile: CA_BUNDLE_FILE };
13690
13702
  }
13691
13703
  var WARM_DIR = "/tmp/crew-warm";
13692
13704
  var WARM_MAX_BYTES = 64 * 1024 * 1024;
@@ -13832,6 +13844,7 @@ async function buildSandboxImage(plan, deps) {
13832
13844
  mkdirSync19(dirname15(join32(ctx, name)), { recursive: true });
13833
13845
  writeFileSync20(join32(ctx, name), content);
13834
13846
  }
13847
+ if (layer.caBundleFile) writeFileSync20(join32(ctx, layer.caBundleFile), (deps.caBundle ?? readHostCaBundle)());
13835
13848
  const code = await deps.run(["build", "--tag", layer.tag, "--file", join32(ctx, "Dockerfile"), ctx], logPath);
13836
13849
  if (code !== 0) {
13837
13850
  state[plan.repo] = { ...entry, failure: { tag: plan.tag, at: now().toISOString(), logPath } };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tablation/crew",
3
- "version": "0.130.2",
3
+ "version": "0.130.3",
4
4
  "description": "A standing team of headless agents that picks work off a Tablation board, does it on a machine you control, and reports back.",
5
5
  "type": "module",
6
6
  "license": "MIT",