@bakers-build/addon-runtime-docker 0.10.0 → 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.
package/dist/src/args.js CHANGED
@@ -3,6 +3,37 @@ export const RUN_PATH = `/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin
3
3
  export const PROXY_PORTS = { egress: 3128, api: 8081, tools: 8082 };
4
4
  /** What the run sends as its API key in allowlist mode; the proxy swaps in the real one. */
5
5
  export const API_KEY_PLACEHOLDER = 'bb-runtime-placeholder';
6
+ /**
7
+ * The pane's terminal and locale variables, passed by name so the docker client
8
+ * forwards only those set in its shell. Docker has no wildcard, hence the glibc
9
+ * `LC_*` categories. shortcut: kept apart from runtime-bwrap's regex, move into
10
+ * core if a third runtime needs it.
11
+ */
12
+ const TERMINAL = [
13
+ 'TERM',
14
+ 'COLORTERM',
15
+ 'TERM_PROGRAM',
16
+ 'TERM_PROGRAM_VERSION',
17
+ 'LANG',
18
+ 'LANGUAGE',
19
+ 'NO_COLOR',
20
+ 'FORCE_COLOR',
21
+ ...[
22
+ 'ALL',
23
+ 'CTYPE',
24
+ 'NUMERIC',
25
+ 'TIME',
26
+ 'COLLATE',
27
+ 'MONETARY',
28
+ 'MESSAGES',
29
+ 'PAPER',
30
+ 'NAME',
31
+ 'ADDRESS',
32
+ 'TELEPHONE',
33
+ 'MEASUREMENT',
34
+ 'IDENTIFICATION',
35
+ ].map((category) => `LC_${category}`),
36
+ ];
6
37
  /** Keys whose host value means nothing inside the container. */
7
38
  const HOST_ONLY = (key) => key === 'PATH' ||
8
39
  key === 'HOME' ||
@@ -36,6 +67,7 @@ export function dockerArgs(input, opts, where) {
36
67
  !overridden.has(k) &&
37
68
  // Allowlist mode keeps the model credential in the proxy only.
38
69
  !(allowlist && credentials.includes(k)));
70
+ forwarded.push(...TERMINAL.filter((k) => !forwarded.includes(k)));
39
71
  const ro = (path) => bind(path, path, ':ro');
40
72
  const argv = [
41
73
  opts.docker,
@@ -11,6 +11,8 @@ export interface RuntimeDockerOptions {
11
11
  network?: 'host' | 'allowlist';
12
12
  /** Allowlist mode: hosts the run may reach, exact or `*.suffix`. */
13
13
  allow?: string[];
14
+ /** Run clones borrow the parent's objects (`git clone --shared`). */
15
+ shared?: boolean;
14
16
  }
15
17
  export interface BackendDeps {
16
18
  exec(file: string, args: string[]): Promise<{
package/dist/src/index.js CHANGED
@@ -35,6 +35,7 @@ export function runtimeDocker(options = {}) {
35
35
  kind: 'runtime',
36
36
  id: 'docker',
37
37
  isolates: true,
38
+ ...(options.shared !== undefined ? { shared: options.shared } : {}),
38
39
  requiredModules: [],
39
40
  createRuntime: async (config, { logger }) => {
40
41
  const { cliRoot, packageDir } = pluginPaths();
@@ -33,6 +33,11 @@
33
33
  "items": { "type": "string", "minLength": 1 },
34
34
  "default": [],
35
35
  "description": "Allowlist mode: hosts the run may reach, exact or *.suffix."
36
+ },
37
+ "shared": {
38
+ "type": "boolean",
39
+ "default": false,
40
+ "description": "Run clones borrow the parent repository's objects (git clone --shared) instead of copying them, for every workspace addon. Faster and smaller, but never prune or repack the parent with -d while a run is open."
36
41
  }
37
42
  }
38
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bakers-build/addon-runtime-docker",
3
- "version": "0.10.0",
3
+ "version": "0.10.1-next.10",
4
4
  "description": "Start each agent run in its own Docker or Podman container.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -23,11 +23,11 @@
23
23
  "directory": "bakers-cli/addons/runtime-docker"
24
24
  },
25
25
  "peerDependencies": {
26
- "@bakers-build/conductor": "^0.10.0",
27
- "@bakers-build/core": "^0.10.0"
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": "5857b00008bc0926fd52fdc8d9366d6d52444e35",
31
- "channel": "latest"
30
+ "commit": "d0f650fbe4c44eda2a26be62d28d30c22c56c386",
31
+ "channel": "next"
32
32
  }
33
33
  }