@bakers-build/addon-runtime-bwrap 0.10.1-next.1 → 0.10.1-next.10

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/launch.mjs +8 -4
  2. package/package.json +4 -4
package/launch.mjs CHANGED
@@ -3,11 +3,15 @@ import { readFileSync, rmSync, writeFileSync } from 'node:fs';
3
3
 
4
4
  const planPath = process.argv[2];
5
5
  const plan = JSON.parse(readFileSync(planPath, 'utf8'));
6
- // The executor's shell can carry unrelated secrets; only declared run keys enter bwrap.
6
+ // The executor's shell can carry unrelated secrets; only declared run keys and the
7
+ // pane's terminal and locale variables (no secrets, needed for colour and redraw) enter bwrap.
8
+ const TERMINAL =
9
+ /^(TERM|COLORTERM|TERM_PROGRAM|TERM_PROGRAM_VERSION|LANG|LANGUAGE|LC_[A-Z_]+|NO_COLOR|FORCE_COLOR)$/;
7
10
  const env = Object.fromEntries(
8
- plan.envKeys
9
- .filter((key) => process.env[key] !== undefined)
10
- .map((key) => [key, process.env[key]]),
11
+ Object.entries(process.env).filter(
12
+ ([key, value]) =>
13
+ value !== undefined && (plan.envKeys.includes(key) || TERMINAL.test(key)),
14
+ ),
11
15
  );
12
16
  writeFileSync(`${planPath}.pid`, String(process.pid), { mode: 0o600 });
13
17
  const child = spawn(plan.bwrap, plan.argv, { env, stdio: 'inherit' });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bakers-build/addon-runtime-bwrap",
3
- "version": "0.10.1-next.1",
3
+ "version": "0.10.1-next.10",
4
4
  "description": "Isolate complete agent runs with an external Bubblewrap sandbox.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -23,11 +23,11 @@
23
23
  "directory": "bakers-cli/addons/runtime-bwrap"
24
24
  },
25
25
  "peerDependencies": {
26
- "@bakers-build/conductor": "^0.10.1-next.1",
27
- "@bakers-build/core": "^0.10.1-next.1"
26
+ "@bakers-build/conductor": "^0.10.1-next.10",
27
+ "@bakers-build/core": "^0.10.1-next.10"
28
28
  },
29
29
  "bakersBuild": {
30
- "commit": "f9cee7721df536cac94906e7278d60a13e202502",
30
+ "commit": "d0f650fbe4c44eda2a26be62d28d30c22c56c386",
31
31
  "channel": "next"
32
32
  }
33
33
  }