@parcha/agentrun-computer 0.1.0-beta.57 → 0.1.0-beta.59

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 (131) hide show
  1. package/README.md +187 -62
  2. package/box/Dockerfile +4 -3
  3. package/box/install.sh +57 -11
  4. package/dist/agent37.js +6 -9
  5. package/dist/attach.d.ts +24 -4
  6. package/dist/attach.js +50 -19
  7. package/dist/boxd.js +22 -9
  8. package/dist/browserbase.d.ts +6 -2
  9. package/dist/browserbase.js +50 -7
  10. package/dist/child-env.d.ts +11 -0
  11. package/dist/child-env.js +22 -0
  12. package/dist/chrome.d.ts +5 -2
  13. package/dist/chrome.js +5 -2
  14. package/dist/cloudflare.d.ts +2 -0
  15. package/dist/cloudflare.js +5 -3
  16. package/dist/computerd-linux-amd64 +0 -0
  17. package/dist/computerd-linux-arm64 +0 -0
  18. package/dist/computerd.json +1 -1
  19. package/dist/conformance/agent37.d.ts +10 -38
  20. package/dist/conformance/agent37.js +25 -113
  21. package/dist/conformance/archil.d.ts +13 -3
  22. package/dist/conformance/archil.js +22 -17
  23. package/dist/conformance/boxd.d.ts +8 -31
  24. package/dist/conformance/boxd.js +19 -74
  25. package/dist/conformance/browserbase.d.ts +3 -6
  26. package/dist/conformance/browserbase.js +6 -17
  27. package/dist/conformance/cases/health.js +6 -3
  28. package/dist/conformance/cli.d.ts +3 -1
  29. package/dist/conformance/cli.js +69 -9
  30. package/dist/conformance/cloudflare.d.ts +3 -6
  31. package/dist/conformance/cloudflare.js +7 -15
  32. package/dist/conformance/daytona.d.ts +6 -20
  33. package/dist/conformance/daytona.js +22 -57
  34. package/dist/conformance/dial-only.d.ts +4 -3
  35. package/dist/conformance/dial-only.js +3 -3
  36. package/dist/conformance/docker.d.ts +4 -5
  37. package/dist/conformance/docker.js +8 -14
  38. package/dist/conformance/e2b.d.ts +10 -36
  39. package/dist/conformance/e2b.js +27 -84
  40. package/dist/conformance/fly.d.ts +3 -6
  41. package/dist/conformance/fly.js +2 -6
  42. package/dist/conformance/groundbox.d.ts +7 -23
  43. package/dist/conformance/groundbox.js +16 -56
  44. package/dist/conformance/index.d.ts +1 -0
  45. package/dist/conformance/index.js +1 -0
  46. package/dist/conformance/kernel.d.ts +3 -6
  47. package/dist/conformance/kernel.js +5 -15
  48. package/dist/conformance/kind.d.ts +0 -6
  49. package/dist/conformance/kind.js +0 -4
  50. package/dist/conformance/local-chrome.d.ts +5 -7
  51. package/dist/conformance/local-chrome.js +7 -11
  52. package/dist/conformance/modal.d.ts +10 -38
  53. package/dist/conformance/modal.js +27 -74
  54. package/dist/conformance/module-kit.d.ts +87 -0
  55. package/dist/conformance/module-kit.js +88 -0
  56. package/dist/conformance/morph.d.ts +7 -23
  57. package/dist/conformance/morph.js +20 -66
  58. package/dist/conformance/orgo.d.ts +5 -10
  59. package/dist/conformance/orgo.js +15 -27
  60. package/dist/conformance/phone-harness.d.ts +3 -5
  61. package/dist/conformance/phone-harness.js +3 -11
  62. package/dist/conformance/runner.d.ts +13 -3
  63. package/dist/conformance/runner.js +32 -11
  64. package/dist/conformance/smolcloud.d.ts +7 -23
  65. package/dist/conformance/smolcloud.js +16 -49
  66. package/dist/conformance/sweep.d.ts +10 -5
  67. package/dist/conformance/sweep.js +91 -38
  68. package/dist/conformance/tti.d.ts +69 -0
  69. package/dist/conformance/tti.js +205 -0
  70. package/dist/conformance/types.d.ts +9 -2
  71. package/dist/daytona.js +60 -20
  72. package/dist/descriptor.d.ts +10 -0
  73. package/dist/descriptor.js +7 -0
  74. package/dist/descriptors/browserbase.d.ts +3 -0
  75. package/dist/descriptors/browserbase.js +4 -0
  76. package/dist/descriptors/docker.d.ts +1 -0
  77. package/dist/descriptors/docker.js +3 -0
  78. package/dist/descriptors/env-names.d.ts +32 -0
  79. package/dist/descriptors/env-names.js +60 -0
  80. package/dist/descriptors/index.d.ts +9 -2
  81. package/dist/descriptors/kernel.d.ts +3 -0
  82. package/dist/descriptors/kernel.js +2 -0
  83. package/dist/descriptors/local-chrome.d.ts +1 -1
  84. package/dist/descriptors/local-chrome.js +5 -3
  85. package/dist/descriptors/phone-harness.d.ts +1 -1
  86. package/dist/descriptors/phone-harness.js +4 -2
  87. package/dist/docker/egress.d.ts +7 -0
  88. package/dist/docker/egress.js +8 -0
  89. package/dist/docker/image.d.ts +5 -1
  90. package/dist/docker/image.js +12 -8
  91. package/dist/docker.d.ts +63 -15
  92. package/dist/docker.js +181 -98
  93. package/dist/drift.js +6 -6
  94. package/dist/e2b.d.ts +2 -2
  95. package/dist/e2b.js +2 -3
  96. package/dist/groundbox.js +6 -6
  97. package/dist/host.d.ts +23 -0
  98. package/dist/hosted/download.d.ts +23 -0
  99. package/dist/hosted/download.js +144 -0
  100. package/dist/hosted/process.d.ts +5 -0
  101. package/dist/hosted/process.js +20 -0
  102. package/dist/hosted/provider.js +120 -48
  103. package/dist/hosted/rest.d.ts +19 -8
  104. package/dist/hosted/rest.js +47 -14
  105. package/dist/hosted/scripts.d.ts +10 -0
  106. package/dist/hosted/scripts.js +23 -2
  107. package/dist/index.d.ts +3 -1
  108. package/dist/index.js +3 -1
  109. package/dist/janitor.d.ts +7 -1
  110. package/dist/janitor.js +2 -2
  111. package/dist/kernel.js +1 -1
  112. package/dist/local-chrome.d.ts +5 -2
  113. package/dist/local-chrome.js +4 -2
  114. package/dist/local-supervisor.js +1 -0
  115. package/dist/modal.d.ts +6 -5
  116. package/dist/modal.js +7 -7
  117. package/dist/morph.js +5 -8
  118. package/dist/orgo-channel.d.ts +3 -2
  119. package/dist/orgo-channel.js +3 -3
  120. package/dist/orgo-desktop.js +2 -4
  121. package/dist/orgo.js +2 -4
  122. package/dist/phone-harness.d.ts +7 -5
  123. package/dist/phone-harness.js +60 -61
  124. package/dist/protocol.d.ts +10 -0
  125. package/dist/protocol.js +17 -0
  126. package/dist/provider.d.ts +6 -2
  127. package/dist/screen-watch.d.ts +6 -1
  128. package/dist/screen-watch.js +166 -12
  129. package/dist/vendor-sdk.d.ts +9 -0
  130. package/dist/vendor-sdk.js +26 -0
  131. package/package.json +8 -1
@@ -1,12 +1,10 @@
1
1
  // Browserbase for the conformance CLI: `npm run conformance -w @parcha/agentrun-computer -- --provider browserbase`.
2
2
  // It makes a real, billed Browserbase session, so it runs only with AGENTRUN_COMPUTER_LIVE_BROWSERBASE=1 and a key for
3
- // an account you can bill, under COMPUTER_BROWSERBASE_API_KEY (and COMPUTER_BROWSERBASE_PROJECT_ID for a direct key). The provider
4
- // reads no environment: this module reads its own COMPUTER_BROWSERBASE_* names (never BROWSERBASE_API_KEY, which may
5
- // hold another project's key) and passes each to create() as its option. The live switch is checked first, before any
6
- // other setting is read. The run makes one session, shared by every case, and releases it.
3
+ // an account you can bill, under COMPUTER_BROWSERBASE_API_KEY (and COMPUTER_BROWSERBASE_PROJECT_ID for a direct key),
4
+ // never BROWSERBASE_API_KEY, which may hold another project's key.
7
5
  import { BROWSER_IMAGE } from "../descriptors/shared.js";
8
6
  import { create } from "../browserbase.js";
9
- /** The environment this module reads, by name, each for the option its comment names, and the live switch. */
7
+ import { requiredSecret, requireLive, setOptions } from "./module-kit.js";
10
8
  export const BROWSERBASE_ENV = {
11
9
  live: "AGENTRUN_COMPUTER_LIVE_BROWSERBASE",
12
10
  /** apiKey, required: the Browserbase API key. */
@@ -16,19 +14,12 @@ export const BROWSERBASE_ENV = {
16
14
  /** apiUrl: Browserbase's API; default https://api.browserbase.com. */
17
15
  url: "COMPUTER_BROWSERBASE_API_URL",
18
16
  };
19
- /** The names this module reads, under the conformance modules' common name (ConformanceModule.ENV). */
20
17
  export const ENV = BROWSERBASE_ENV;
21
18
  /** The provider's options this module reads from env, each only when its name is set; throws in words without the key, never echoing one. */
22
19
  export function settingsFromEnv(env = process.env) {
23
- const apiKey = env[BROWSERBASE_ENV.key];
24
- if (apiKey === undefined || apiKey === "") {
25
- throw new Error(`set ${BROWSERBASE_ENV.key} to a Browserbase API key: the conformance module reads it there and nowhere else, never from BROWSERBASE_API_KEY`);
26
- }
27
- const projectId = env[BROWSERBASE_ENV.project] || undefined;
28
- const apiUrl = env[BROWSERBASE_ENV.url] || undefined;
29
- return { apiKey, ...(projectId === undefined ? {} : { projectId }), ...(apiUrl === undefined ? {} : { apiUrl }) };
20
+ const apiKey = requiredSecret(env, BROWSERBASE_ENV.key, "a Browserbase API key");
21
+ return { apiKey, ...setOptions(env, { projectId: BROWSERBASE_ENV.project, apiUrl: BROWSERBASE_ENV.url }) };
30
22
  }
31
- /** For the run's report: what this configuration means for the suite. */
32
23
  export const conformanceNotes = [
33
24
  "browserbase: one session for the whole run, released by its last case (browser.release) and again at the run's end; Browserbase bills at least one minute of it. Browserbase keeps a session's downloads and recordings; the suite does not test them.",
34
25
  ];
@@ -38,8 +29,6 @@ export function conformanceImage() {
38
29
  }
39
30
  /** The provider the CLI runs; throws in words without the live switch, or when the key is missing. */
40
31
  export async function createProvider({ env = process.env, ...transport } = {}) {
41
- if (env[BROWSERBASE_ENV.live] !== "1") {
42
- throw new Error(`the Browserbase conformance module makes a real, billed session: set ${BROWSERBASE_ENV.live}=1, with a key for an account you can bill, to run it`);
43
- }
32
+ requireLive(env, BROWSERBASE_ENV.live, "the Browserbase conformance module makes a real, billed session", "a key for an account you can bill");
44
33
  return create({ ...settingsFromEnv(env), ...transport });
45
34
  }
@@ -1,6 +1,6 @@
1
1
  // The daemon answers: hello, ping, and an error in words for a method it does not have; the computer is the kind it
2
- // says it is; what the provider declares of itself, its capabilities() and each hello agree, at this protocol's
3
- // version; and no error the provider answers holds a key.
2
+ // says it is; what the provider declares of itself, its capabilities() and each hello agree, at exactly the suite's
3
+ // protocol version; and no error the provider answers holds a key.
4
4
  import { GROUPS, PROTOCOL_VERSION } from "../../protocol.js";
5
5
  import { kindServed } from "../../kinds.js";
6
6
  import { kindRefusals } from "../../provider.js";
@@ -93,7 +93,10 @@ export const healthCases = [
93
93
  group: "health",
94
94
  needs: [],
95
95
  async run(t) {
96
- t.equal(t.hello.protocol, PROTOCOL_VERSION, `hello carries the protocol version this suite speaks, ${PROTOCOL_VERSION}`);
96
+ // A provider is certified by the suite of its own version, so its computers speak that version exactly: the
97
+ // tolerance of a later minor (helloProblem) is the wire's, between a server and a driver built apart.
98
+ const protocol = t.hello.protocol;
99
+ t.assert(protocol === PROTOCOL_VERSION, `hello: the computer speaks protocol ${protocol === undefined || protocol === null ? "none" : String(protocol)}, and this suite ${PROTOCOL_VERSION}`);
97
100
  const declared = t.declared;
98
101
  if (declared === undefined) {
99
102
  return t.skip("the run was given no declaration of the provider: its descriptor, its PROVIDERS entry, or its module's CAPABILITIES");
@@ -1,6 +1,6 @@
1
1
  import { type ProviderEnv } from "../providers.js";
2
2
  import type { CdpDialer } from "./cdp.js";
3
- import type { Case } from "./types.js";
3
+ import type { Case, Clock } from "./types.js";
4
4
  /** A stream as main writes to it: done is called once the text is handed on, as Writable.write's callback is. */
5
5
  export interface Writer {
6
6
  write(text: string, done?: (error?: Error | null) => void): unknown;
@@ -25,6 +25,8 @@ export interface CliIo {
25
25
  providerOptions?: {
26
26
  env?: ProviderEnv;
27
27
  } & Record<string, unknown>;
28
+ /** The clock the run reads, a TTI run's times among it; default the wall clock. A test gives one it moves. */
29
+ clock?: Clock;
28
30
  }
29
31
  /**
30
32
  * A fresh planted value for each secret name, and the text to hunt for in answers. A `*_SSH_KEY` name takes a throwaway
@@ -3,6 +3,8 @@
3
3
  // Exits 0 when Core passes, 1 when it fails, 2 on a usage error, and 3 when --only left Core cases out and every case
4
4
  // that ran passed: a partial run is never a Core pass, so no script reads its exit code as one. With --kind it exits on
5
5
  // the kind's verdict alone: 0 when the provider passes the kind, 1 when it does not.
6
+ // `--tti <n> [--burst <n>]` measures time to interactive (./tti.ts) instead of running the suite: 0 when every computer
7
+ // came up and none was left, 1 otherwise.
6
8
  // `--exec-stream --machine <id> [--quick]` runs the exec pre-check (./exec-stream.ts) alone, on a machine the vendor made
7
9
  // by hand, through the module's createHost(): 0 when exec passes every check, 1 when one fails.
8
10
  import { generateKeyPairSync, randomBytes } from "node:crypto";
@@ -15,10 +17,12 @@ import { browserCases, casesFor, conformanceCases } from "./cases/index.js";
15
17
  import { checkExecStream, DEFAULT_LONG_MS, formatExecStream, QUICK_LONG_MS } from "./exec-stream.js";
16
18
  import { kindRunProblem } from "./kind.js";
17
19
  import { formatReport } from "./report.js";
18
- import { runConformance } from "./runner.js";
20
+ import { RUN_ID, runConformance } from "./runner.js";
21
+ import { formatTti, measureTti } from "./tti.js";
19
22
  /** Writes text and settles once the stream has taken it, so an exit after it cuts nothing off. */
20
23
  const write = (stream, text) => new Promise((resolve) => void stream.write(text, () => resolve()));
21
- const USAGE = `usage: npm run conformance -w @parcha/agentrun-computer -- --provider ${providerIds.join("|")}|<module.js> [--image <image>] [--only <group|case>,... | --kind <kind>] [--fixture <path>] [--gpu <type>[:<count>]] [--long] [--concurrency <n>] [--json]
24
+ const USAGE = `usage: npm run conformance -w @parcha/agentrun-computer -- --provider ${providerIds.join("|")}|<module.js> [--image <image>] [--only <group|case>,... | --kind <kind>] [--fixture <path>] [--gpu <type>[:<count>]] [--long] [--concurrency <n>] [--run <id>] [--json]
25
+ npm run conformance -w @parcha/agentrun-computer -- --provider <id>|<module.js> [--image <image>] --tti <n> [--burst <n>] [--run <id>] [--json]
22
26
  --provider a computer in the registry (${providerIds.join(", ")}), or a module path: a provider file that exports
23
27
  create(options), or a conformance module that exports createProvider() (and, for the drift case,
24
28
  createDriftedProvider(); for the mount cases, mountFor(kind), a fresh run folder for that mount kind)
@@ -37,7 +41,15 @@ const USAGE = `usage: npm run conformance -w @parcha/agentrun-computer -- --prov
37
41
  --concurrency
38
42
  the most computers alive at once, for a plan that keeps fewer (default no cap; the report says the
39
43
  run's peak). The run's computer makes way for a case's own; a case that needs more fails
44
+ --run the run's id, the one the live sweep's --before printed: every computer of the run carries it, and
45
+ that sweep's --after deletes the run's computers and no other run's (default a fresh id). Two
46
+ processes may share one: each run's own end-of-run sweep deletes only its own computers
40
47
  --json print the report as JSON
48
+ --tti <n> [--burst <n>]
49
+ time to interactive instead of the suite: n computers one at a time, then (--burst) n all at once,
50
+ each timed from its create call to its first command's answer and deleted after; median, p95, p99,
51
+ success rate and ComputeSDK's score per shape. Either flag alone runs that shape alone; with --image,
52
+ --run and --json only. Exits 0 when every computer came up and nothing was left, else 1
41
53
  --exec-stream --machine <id> [--quick]
42
54
  the exec pre-check, alone: the module's createHost() and host.exec, nothing else, on a machine you made
43
55
  by hand. Text of every kind both ways, 8 MiB by sha256, output and stdin while the process runs, stdin while
@@ -45,7 +57,8 @@ const USAGE = `usage: npm run conformance -w @parcha/agentrun-computer -- --prov
45
57
  that is not cut off; then what the machine offers: root's network namespace, /dev/fuse, the arch, the
46
58
  kernel (gVisor) and the TCP listeners, each with what it means for your host
47
59
  exit: 0 Core passes, 1 it fails, 2 usage error, 3 partial (--only) and every case that ran passed; with --kind,
48
- 0 the provider passes the kind, 1 it does not; with --exec-stream, 0 every check passes, 1 one fails`;
60
+ 0 the provider passes the kind, 1 it does not; with --exec-stream, 0 every check passes, 1 one fails; with
61
+ --tti or --burst, 0 every computer came up and none was left, 1 otherwise`;
49
62
  const PROVIDER_METHODS = ["capabilities", "check", "create", "attach", "list", "network", "connect", "release"];
50
63
  class Usage extends Error {
51
64
  }
@@ -56,6 +69,12 @@ function gpuOf(text) {
56
69
  throw new Usage(`--gpu: ${JSON.stringify(text)} is not <type>[:<count>], such as T4 or H100:2`);
57
70
  return { type: match[1], count: match[2] === undefined ? 1 : Number(match[2]) };
58
71
  }
72
+ /** A flag's value that counts computers: a whole number, 1 or more. */
73
+ function computersOf(flag, given) {
74
+ if (!/^[1-9][0-9]*$/.test(given) || !Number.isSafeInteger(Number(given)))
75
+ throw new Usage(`${flag}: ${JSON.stringify(given)} is not a whole number of computers, 1 or more`);
76
+ return Number(given);
77
+ }
59
78
  function parse(argv, cases) {
60
79
  const args = { json: false, help: false };
61
80
  let execStream = false;
@@ -90,11 +109,17 @@ function parse(argv, cases) {
90
109
  args.gpu = gpuOf(value());
91
110
  else if (flag === "--long")
92
111
  args.long = true;
93
- else if (flag === "--concurrency") {
112
+ else if (flag === "--concurrency")
113
+ args.concurrency = computersOf(flag, value());
114
+ else if (flag === "--tti")
115
+ args.tti = computersOf(flag, value());
116
+ else if (flag === "--burst")
117
+ args.burst = computersOf(flag, value());
118
+ else if (flag === "--run") {
94
119
  const given = value();
95
- if (!/^[1-9][0-9]*$/.test(given) || !Number.isSafeInteger(Number(given)))
96
- throw new Usage(`--concurrency: ${JSON.stringify(given)} is not a whole number of computers, 1 or more`);
97
- args.concurrency = Number(given);
120
+ if (!RUN_ID.test(given))
121
+ throw new Usage(`--run: ${JSON.stringify(given)} is not a run id the live sweep's --before mints (12 hex characters)`);
122
+ args.run = given;
98
123
  }
99
124
  else if (flag === "--exec-stream")
100
125
  execStream = true;
@@ -116,13 +141,29 @@ function parse(argv, cases) {
116
141
  if (execStream) {
117
142
  if (machine === undefined)
118
143
  throw new Usage("--exec-stream needs --machine <id>, a machine you made by hand");
119
- const others = ["image", "only", "kind", "fixture", "gpu", "long", "concurrency"].filter((name) => args[name] !== undefined);
144
+ const others = ["image", "only", "kind", "fixture", "gpu", "long", "concurrency", "run", "tti", "burst"].filter((name) => args[name] !== undefined);
120
145
  if (others.length > 0)
121
146
  throw new Usage(`--exec-stream runs alone: drop ${others.map((name) => `--${name}`).join(", ")}`);
122
147
  return { provider: args.provider, execStream: { machine, quick }, json: args.json, help: false };
123
148
  }
124
149
  if (machine !== undefined || quick)
125
150
  throw new Usage(`${machine !== undefined ? "--machine" : "--quick"} goes with --exec-stream`);
151
+ if (args.tti !== undefined || args.burst !== undefined) {
152
+ // The suite's flags shape its cases; a TTI run has its own, and --burst is its own count of computers at once.
153
+ // --run stays: a TTI run's computers carry the live sweep's id like the suite's, so its --after finds them.
154
+ const others = ["only", "kind", "fixture", "gpu", "long", "concurrency"].filter((name) => args[name] !== undefined);
155
+ if (others.length > 0)
156
+ throw new Usage(`--tti and --burst measure time to the first command alone: drop ${others.map((name) => `--${name}`).join(", ")}`);
157
+ return {
158
+ provider: args.provider,
159
+ ...(args.image === undefined ? {} : { image: args.image }),
160
+ ...(args.tti === undefined ? {} : { tti: args.tti }),
161
+ ...(args.burst === undefined ? {} : { burst: args.burst }),
162
+ ...(args.run ? { run: args.run } : {}),
163
+ json: args.json,
164
+ help: false,
165
+ };
166
+ }
126
167
  if (args.kind !== undefined && args.only !== undefined)
127
168
  throw new Usage("--kind and --only go apart: a kind runs its own cases");
128
169
  const groups = [...new Set(cases.map((c) => c.group))];
@@ -140,6 +181,7 @@ function parse(argv, cases) {
140
181
  ...(args.gpu ? { gpu: args.gpu } : {}),
141
182
  ...(args.long ? { long: args.long } : {}),
142
183
  ...(args.concurrency ? { concurrency: args.concurrency } : {}),
184
+ ...(args.run ? { run: args.run } : {}),
143
185
  json: args.json,
144
186
  help: false,
145
187
  };
@@ -336,8 +378,24 @@ export async function main(argv, io = {}) {
336
378
  }
337
379
  return 1;
338
380
  }
339
- const cases = io.cases ?? casesFor(target.provider.capabilities().kind);
340
381
  const onResult = progress ? (r) => stderr.write(`${r.status === "pass" ? "✓" : r.status === "fail" ? "✗" : "-"} ${r.id}\n`) : undefined;
382
+ if (args.tti !== undefined || args.burst !== undefined) {
383
+ const report = await measureTti(target.provider, {
384
+ image: args.image ?? target.image ?? DEFAULT_IMAGE,
385
+ iterations: args.tti ?? 0,
386
+ burst: args.burst ?? 0,
387
+ ...(args.run ? { run: args.run } : {}),
388
+ ...(target.notes && target.notes.length > 0 ? { notes: target.notes } : {}),
389
+ ...(signal ? { signal } : {}),
390
+ ...(io.clock ? { clock: io.clock } : {}),
391
+ ...(onResult ? { onResult } : {}),
392
+ });
393
+ if (providerNotes.length > 0)
394
+ report.providerNotes = providerNotes;
395
+ await write(stdout, args.json ? `${JSON.stringify(report, null, 2)}\n` : formatTti(report));
396
+ return report.pass ? 0 : 1;
397
+ }
398
+ const cases = io.cases ?? casesFor(target.provider.capabilities().kind);
341
399
  const report = await runConformance(target.provider, {
342
400
  image: args.image ?? target.image ?? DEFAULT_IMAGE,
343
401
  ...(target.notes && target.notes.length > 0 ? { notes: target.notes } : {}),
@@ -348,6 +406,7 @@ export async function main(argv, io = {}) {
348
406
  ...(args.gpu ? { gpu: args.gpu } : {}),
349
407
  ...(args.long ? { long: true } : {}),
350
408
  ...(args.concurrency ? { concurrency: args.concurrency } : {}),
409
+ ...(args.run ? { run: args.run } : {}),
351
410
  ...(signal ? { signal } : {}),
352
411
  ...(target.drifted ? { drifted: target.drifted } : {}),
353
412
  ...(target.declared ? { declared: target.declared } : {}),
@@ -356,6 +415,7 @@ export async function main(argv, io = {}) {
356
415
  ...(target.dial ? { dial: target.dial } : {}),
357
416
  ...(onResult ? { onResult } : {}),
358
417
  ...(io.cdp ? { cdp: io.cdp } : {}),
418
+ ...(io.clock ? { clock: io.clock } : {}),
359
419
  });
360
420
  if (providerNotes.length > 0)
361
421
  report.providerNotes = providerNotes;
@@ -2,7 +2,8 @@ import { type CloudflareProvider } from "../cloudflare.js";
2
2
  import type { MachineHost } from "../host.js";
3
3
  import type { HostedDial } from "../hosted/provider.js";
4
4
  import type { ProviderNote } from "../mount-archil.js";
5
- /** The environment this module reads, by name, each for the option its comment names. */
5
+ import { CONFORMANCE_MAX_LIFETIME_MS, type Env } from "./module-kit.js";
6
+ export { CONFORMANCE_MAX_LIFETIME_MS };
6
7
  export declare const ENV: {
7
8
  /** relayUrl, required: the relay Worker's https address. */
8
9
  readonly url: "COMPUTER_CLOUDFLARE_RELAY_URL";
@@ -11,10 +12,8 @@ export declare const ENV: {
11
12
  /** kind: linux (default) or desktop, which needs the public server's process (dialKit). */
12
13
  readonly kind: "COMPUTER_CLOUDFLARE_KIND";
13
14
  };
14
- /** The longest lifetime a computer of a run may ask for: init's deadline and the janitor end each container by then. */
15
- export declare const CONFORMANCE_MAX_LIFETIME_MS: number;
16
15
  /** The provider's options this module reads from env; throws in words without either, never echoing the token. */
17
- export declare function settingsFromEnv(env?: Record<string, string | undefined>): {
16
+ export declare function settingsFromEnv(env?: Env): {
18
17
  relayUrl: string;
19
18
  relayToken: string;
20
19
  };
@@ -36,9 +35,7 @@ export declare function createProvider({ env, dial, daemonPath, fetch, onNote }?
36
35
  export declare function conformanceImage(options?: Pick<CloudflareModuleOptions, "env" | "fetch">, context?: {
37
36
  signal?: AbortSignal;
38
37
  }): Promise<string>;
39
- /** The server the run's containers dial, as the CLI asks for it: refused in words (dial-only.ts). */
40
38
  export declare const dialKit: () => import("./types.js").DialKit;
41
- /** The Cloudflare host the live sweep lists and deletes through, from the same settings; it makes nothing. */
42
39
  export declare function createHost({ env, fetch }?: Pick<CloudflareModuleOptions, "env" | "fetch">): MachineHost;
43
40
  /** Where the sweep lists, in words: the relay the settings name. */
44
41
  export declare function sweepScope({ env }?: Pick<CloudflareModuleOptions, "env">): string;
@@ -2,13 +2,12 @@
2
2
  // a Core run happens inside that server's own process, behind its public address: serve's
3
3
  // packages/serve/scripts/dial-conformance.mjs --provider cloudflare gives createProvider() its dial and the run a DialKit.
4
4
  // From a laptop's CLI, dialKit() refuses in words, and the provider refuses every create before the relay is called.
5
- //
6
- // The provider reads no environment: this module reads its own COMPUTER_CLOUDFLARE_* names and passes each to create()
7
- // as its option. The live sweep (sweep.ts, --provider cloudflare) reads the same names through createHost.
8
5
  import { create } from "../cloudflare.js";
6
+ import { CLOUDFLARE } from "../descriptors/cloudflare.js";
7
+ import { httpsBase } from "../hosted/rest.js";
9
8
  import { dialOnlyFromServer } from "./dial-only.js";
10
- import { kindFrom } from "./kind.js";
11
- /** The environment this module reads, by name, each for the option its comment names. */
9
+ import { CONFORMANCE_MAX_LIFETIME_MS, kindFrom, preparedImage } from "./module-kit.js";
10
+ export { CONFORMANCE_MAX_LIFETIME_MS };
12
11
  export const ENV = {
13
12
  /** relayUrl, required: the relay Worker's https address. */
14
13
  url: "COMPUTER_CLOUDFLARE_RELAY_URL",
@@ -17,8 +16,6 @@ export const ENV = {
17
16
  /** kind: linux (default) or desktop, which needs the public server's process (dialKit). */
18
17
  kind: "COMPUTER_CLOUDFLARE_KIND",
19
18
  };
20
- /** The longest lifetime a computer of a run may ask for: init's deadline and the janitor end each container by then. */
21
- export const CONFORMANCE_MAX_LIFETIME_MS = 30 * 60_000;
22
19
  /** The provider's options this module reads from env; throws in words without either, never echoing the token. */
23
20
  export function settingsFromEnv(env = process.env) {
24
21
  const relayUrl = env[ENV.url];
@@ -41,18 +38,13 @@ export function createProvider({ env = process.env, dial, daemonPath, fetch, onN
41
38
  }
42
39
  /** The run's image: the box image the relay was deployed FROM, as its /v1/health names it. */
43
40
  export async function conformanceImage(options = {}, context = {}) {
44
- const image = await createProvider(options).prepareImage(context);
45
- if (!image.ok)
46
- throw new Error(image.error.message);
47
- return image.value;
41
+ return preparedImage(createProvider(options), context.signal);
48
42
  }
49
- /** The server the run's containers dial, as the CLI asks for it: refused in words (dial-only.ts). */
50
- export const dialKit = dialOnlyFromServer("cloudflare", "Cloudflare");
51
- /** The Cloudflare host the live sweep lists and deletes through, from the same settings; it makes nothing. */
43
+ export const dialKit = dialOnlyFromServer(CLOUDFLARE);
52
44
  export function createHost({ env = process.env, fetch } = {}) {
53
45
  return create({ ...settingsFromEnv(env), ...(fetch ? { fetch } : {}) }).host;
54
46
  }
55
47
  /** Where the sweep lists, in words: the relay the settings name. */
56
48
  export function sweepScope({ env = process.env } = {}) {
57
- return `the Cloudflare relay at ${settingsFromEnv(env).relayUrl}`;
49
+ return `the Cloudflare relay at ${httpsBase(settingsFromEnv(env).relayUrl, `the Cloudflare relay URL (${ENV.url})`)}`;
58
50
  }
@@ -1,11 +1,11 @@
1
1
  import { type DaytonaProvider, type DaytonaProviderOptions } from "../daytona.js";
2
2
  import type { MachineHost } from "../host.js";
3
3
  import type { MountKind } from "../mount.js";
4
- import { type ArchilRunFolderOptions } from "./archil.js";
4
+ import { type ArchilMountOptions } from "./archil.js";
5
+ import { type Env } from "./module-kit.js";
5
6
  import type { RunFolder } from "./types.js";
6
7
  /** The Archil disk's settings for the mount cases, by name (COMPUTER_ARCHIL_*: all five, or none). */
7
8
  export { ARCHIL_ENV } from "./archil.js";
8
- /** The environment this module reads, by name, each for the option its comment names. */
9
9
  export declare const DAYTONA_ENV: {
10
10
  /** apiKey, required: the Daytona API key. */
11
11
  readonly key: "COMPUTER_DAYTONA_API_KEY";
@@ -37,7 +37,6 @@ export declare const DAYTONA_ENV: {
37
37
  /** kind: linux (default) or desktop, which create() takes on dial alone. */
38
38
  readonly kind: "COMPUTER_DAYTONA_KIND";
39
39
  };
40
- /** The names this module reads, under the conformance modules' common name (ConformanceModule.ENV). */
41
40
  export declare const ENV: {
42
41
  /** apiKey, required: the Daytona API key. */
43
42
  readonly key: "COMPUTER_DAYTONA_API_KEY";
@@ -69,20 +68,15 @@ export declare const ENV: {
69
68
  /** kind: linux (default) or desktop, which create() takes on dial alone. */
70
69
  readonly kind: "COMPUTER_DAYTONA_KIND";
71
70
  };
72
- /**
73
- * The provider's options this module reads from env, each only when its name is set; throws in words without the key,
74
- * never echoing one. create() checks the rest.
75
- */
76
- export declare function settingsFromEnv(env?: Record<string, string | undefined>): DaytonaProviderOptions;
71
+ /** The provider's options this module reads from env, each only when its name is set; throws in words without the key, never echoing one. */
72
+ export declare function settingsFromEnv(env?: Env): DaytonaProviderOptions;
77
73
  /** Minutes without outside activity before Daytona stops a run's sandbox: at most 30, so none outlives a run for long. */
78
74
  export declare const CONFORMANCE_AUTO_STOP_MINUTES = 30;
79
75
  /** Minutes a run's sandbox may stay stopped: 0, Daytona deletes it as soon as it stops. */
80
76
  export declare const CONFORMANCE_AUTO_DELETE_MINUTES = 0;
81
- /** For the run's report: what this configuration means for the suite, in words. */
82
77
  export declare const conformanceNotes: string[];
83
78
  export interface DaytonaModuleOptions {
84
- /** Where the settings are read; default process.env. */
85
- env?: Record<string, string | undefined>;
79
+ env?: Env;
86
80
  fetch?: DaytonaProviderOptions["fetch"];
87
81
  webSocket?: DaytonaProviderOptions["webSocket"];
88
82
  /** The provider's bounds; the sweep sets how long a release waits. */
@@ -100,7 +94,6 @@ export interface DaytonaModuleOptions {
100
94
  * snapshot.
101
95
  */
102
96
  export declare function conformanceImage({ env }?: Pick<DaytonaModuleOptions, "env">): string;
103
- /** A dial machine (COMPUTER_DAYTONA_CONNECT=dial) runs its Core inside the public server's process: refused here (dial-only.ts). */
104
97
  export declare const dialKit: () => import("./types.js").DialKit;
105
98
  /**
106
99
  * A fresh run folder for the mount cases: an Archil one on the disk the COMPUTER_ARCHIL_* settings name (the shared
@@ -108,16 +101,9 @@ export declare const dialKit: () => import("./types.js").DialKit;
108
101
  * COMPUTER_DAYTONA_ARCHIL_EGRESS names the target's relay, since the provider takes an Archil mount only then; none
109
102
  * otherwise, and none for a bind, which a remote computer cannot take.
110
103
  */
111
- export declare function mountFor(kind: MountKind, { env, archil }?: {
112
- env?: Record<string, string | undefined>;
113
- archil?: Pick<ArchilRunFolderOptions, "objects" | "Archil" | "baseUrl">;
114
- }): Promise<RunFolder | undefined>;
104
+ export declare function mountFor(kind: MountKind, { env, archil }?: ArchilMountOptions): Promise<RunFolder | undefined>;
115
105
  /** The provider the CLI runs; throws in words when a setting is missing or wrong. */
116
106
  export declare function createProvider(options?: DaytonaModuleOptions): DaytonaProvider;
117
- /**
118
- * The Daytona host the live sweep (sweep.ts) lists and deletes through, from the same settings (the key and the API
119
- * URL); it calls nothing until the sweep does.
120
- */
121
107
  export declare function createHost({ env, fetch }?: Pick<DaytonaModuleOptions, "env" | "fetch">): Promise<MachineHost>;
122
108
  /** The same provider with a daemon that reports another version, built with Go for the drift case. */
123
109
  export declare function createDriftedProvider(options?: DaytonaModuleOptions): Promise<DaytonaProvider>;
@@ -1,21 +1,16 @@
1
- // Daytona for the conformance CLI: `--provider daytona [--image <snapshot>]`. The provider reads no environment: this
2
- // module reads the run's settings from its own COMPUTER_DAYTONA_* names (never a bare DAYTONA_ variable, which may hold
3
- // another organization's key on a host that runs other Daytona work) and passes each to create() as its option, the key
4
- // read only when createProvider() runs. Every sandbox of a run has a bounded life besides its TTL: Daytona stops one
5
- // after 30 minutes with no outside activity and deletes it as soon as it stops (see conformanceNotes). The live sweep
6
- // (sweep.ts, --provider daytona) reads the same names through createHost: it makes nothing. The mount cases run on a
7
- // self-hosted Daytona target alone: COMPUTER_DAYTONA_ARCHIL_EGRESS names its Archil egress relay, and the
8
- // COMPUTER_ARCHIL_* settings the disk (mountFor).
1
+ // Daytona for the conformance CLI: `--provider daytona [--image <snapshot>]`. It reads its settings from its own
2
+ // COMPUTER_DAYTONA_* names (never a bare DAYTONA_ variable, which may hold another organization's key on a host that
3
+ // runs other Daytona work). Every sandbox of a run has a bounded life besides its TTL: Daytona stops one after 30 minutes
4
+ // with no outside activity and deletes it as soon as it stops (see conformanceNotes).
9
5
  import { boxRecipeHash } from "../box-image.js";
10
6
  import { create } from "../daytona.js";
11
- import { DAYTONA_DEFAULT_SNAPSHOT } from "../descriptors/daytona.js";
7
+ import { DAYTONA, DAYTONA_DEFAULT_SNAPSHOT } from "../descriptors/daytona.js";
12
8
  import { archilRunFolder, archilSettings } from "./archil.js";
13
9
  import { dialOnlyFromServer } from "./dial-only.js";
14
10
  import { buildDriftDaemon, DRIFT_VERSION } from "./drift-daemon.js";
15
- import { kindFrom } from "./kind.js";
11
+ import { kindFrom, requiredSecret, setOptions } from "./module-kit.js";
16
12
  /** The Archil disk's settings for the mount cases, by name (COMPUTER_ARCHIL_*: all five, or none). */
17
13
  export { ARCHIL_ENV } from "./archil.js";
18
- /** The environment this module reads, by name, each for the option its comment names. */
19
14
  export const DAYTONA_ENV = {
20
15
  /** apiKey, required: the Daytona API key. */
21
16
  key: "COMPUTER_DAYTONA_API_KEY",
@@ -47,52 +42,28 @@ export const DAYTONA_ENV = {
47
42
  /** kind: linux (default) or desktop, which create() takes on dial alone. */
48
43
  kind: "COMPUTER_DAYTONA_KIND",
49
44
  };
50
- /** The names this module reads, under the conformance modules' common name (ConformanceModule.ENV). */
51
45
  export const ENV = DAYTONA_ENV;
52
- /**
53
- * The provider's options this module reads from env, each only when its name is set; throws in words without the key,
54
- * never echoing one. create() checks the rest.
55
- */
46
+ /** The provider's options this module reads from env, each only when its name is set; throws in words without the key, never echoing one. */
56
47
  export function settingsFromEnv(env = process.env) {
57
- const apiKey = env[DAYTONA_ENV.key];
58
- if (apiKey === undefined || apiKey === "")
59
- throw new Error(`set ${DAYTONA_ENV.key} to a Daytona API key: the conformance module reads it there and nowhere else, never from DAYTONA_API_KEY`);
60
- const named = (name) => (env[name] ? { value: env[name] } : undefined);
61
- const url = named(DAYTONA_ENV.url);
62
- const target = named(DAYTONA_ENV.target);
63
- const daemon = named(DAYTONA_ENV.daemon);
64
- const arch = named(DAYTONA_ENV.arch);
65
- const sandboxClass = named(DAYTONA_ENV.sandboxClass);
66
- const user = named(DAYTONA_ENV.user);
67
- const gpuSnapshot = named(DAYTONA_ENV.gpuSnapshot);
68
- const archilEgress = named(DAYTONA_ENV.archilEgress);
69
- const attachEgress = named(DAYTONA_ENV.attachEgress);
70
- const connect = named(DAYTONA_ENV.connect);
71
- return {
72
- apiKey,
73
- ...(url ? { apiUrl: url.value } : {}),
74
- ...(target ? { target: target.value } : {}),
75
- ...(daemon ? { daemonPath: daemon.value } : {}),
76
- // create() refuses any other arch in words.
77
- ...(arch ? { arch: arch.value } : {}),
78
- // create() refuses any other class in words.
79
- ...(sandboxClass ? { sandboxClass: sandboxClass.value } : {}),
80
- ...(user ? { daemonUser: user.value } : {}),
81
- // create() refuses a name that is not one of ours in words.
82
- ...(gpuSnapshot ? { gpuSnapshot: gpuSnapshot.value } : {}),
83
- // create() refuses one of another shape in words.
84
- ...(archilEgress ? { archilEgress: archilEgress.value } : {}),
85
- // create() refuses one of another shape in words.
86
- ...(attachEgress ? { attachEgress: attachEgress.value } : {}),
87
- // create() refuses any other value in words.
88
- ...(connect ? { connect: connect.value } : {}),
89
- };
48
+ const apiKey = requiredSecret(env, DAYTONA_ENV.key, "a Daytona API key");
49
+ const set = setOptions(env, {
50
+ apiUrl: DAYTONA_ENV.url,
51
+ target: DAYTONA_ENV.target,
52
+ daemonPath: DAYTONA_ENV.daemon,
53
+ arch: DAYTONA_ENV.arch,
54
+ sandboxClass: DAYTONA_ENV.sandboxClass,
55
+ daemonUser: DAYTONA_ENV.user,
56
+ gpuSnapshot: DAYTONA_ENV.gpuSnapshot,
57
+ archilEgress: DAYTONA_ENV.archilEgress,
58
+ attachEgress: DAYTONA_ENV.attachEgress,
59
+ connect: DAYTONA_ENV.connect,
60
+ });
61
+ return { apiKey, ...set };
90
62
  }
91
63
  /** Minutes without outside activity before Daytona stops a run's sandbox: at most 30, so none outlives a run for long. */
92
64
  export const CONFORMANCE_AUTO_STOP_MINUTES = 30;
93
65
  /** Minutes a run's sandbox may stay stopped: 0, Daytona deletes it as soon as it stops. */
94
66
  export const CONFORMANCE_AUTO_DELETE_MINUTES = 0;
95
- /** For the run's report: what this configuration means for the suite, in words. */
96
67
  export const conformanceNotes = [
97
68
  `daytona: every sandbox runs with autoStopMinutes ${CONFORMANCE_AUTO_STOP_MINUTES} and autoDeleteMinutes ${CONFORMANCE_AUTO_DELETE_MINUTES}, besides its TTL: Daytona deletes a sandbox as soon as it stops, so this configuration keeps no stopped computer. A computer here is deleted, never stopped: release stop is refused. Full provider.janitor, which needs a stopped computer kept, is skipped (the lifetime being vendor). On dial (${DAYTONA_ENV.connect}=dial) no connection is a toolbox call, so nothing resets Daytona's idle timer: a computer stops, and is deleted, ${CONFORMANCE_AUTO_STOP_MINUTES} minutes after it starts, whatever runs on it.`,
98
69
  ];
@@ -100,7 +71,6 @@ export const conformanceNotes = [
100
71
  function optionsOf({ env = process.env, fetch, webSocket, timeouts, onNote, dial, daemonPath }) {
101
72
  return {
102
73
  ...settingsFromEnv(env),
103
- // create() refuses any other kind, and desktop without dial, in words.
104
74
  ...kindFrom(env, DAYTONA_ENV.kind),
105
75
  ...(daemonPath === undefined ? {} : { daemonPath }),
106
76
  autoStopMinutes: CONFORMANCE_AUTO_STOP_MINUTES,
@@ -120,8 +90,7 @@ function optionsOf({ env = process.env, fetch, webSocket, timeouts, onNote, dial
120
90
  export function conformanceImage({ env = process.env } = {}) {
121
91
  return env[DAYTONA_ENV.snapshot] || (env[DAYTONA_ENV.connect] === "dial" ? `agentrun-box-${boxRecipeHash()}` : DAYTONA_DEFAULT_SNAPSHOT);
122
92
  }
123
- /** A dial machine (COMPUTER_DAYTONA_CONNECT=dial) runs its Core inside the public server's process: refused here (dial-only.ts). */
124
- export const dialKit = dialOnlyFromServer("daytona", "Daytona", `${DAYTONA_ENV.connect}=dial`);
93
+ export const dialKit = dialOnlyFromServer(DAYTONA, `${DAYTONA_ENV.connect}=dial`);
125
94
  /**
126
95
  * A fresh run folder for the mount cases: an Archil one on the disk the COMPUTER_ARCHIL_* settings name (the shared
127
96
  * archilRunFolder; the run's snapshot is then one of box/Dockerfile, and COMPUTER_DAYTONA_USER is 2510:2510), only where
@@ -138,10 +107,6 @@ export async function mountFor(kind, { env = process.env, archil = {} } = {}) {
138
107
  export function createProvider(options = {}) {
139
108
  return create(optionsOf(options));
140
109
  }
141
- /**
142
- * The Daytona host the live sweep (sweep.ts) lists and deletes through, from the same settings (the key and the API
143
- * URL); it calls nothing until the sweep does.
144
- */
145
110
  export async function createHost({ env = process.env, fetch } = {}) {
146
111
  return create({ ...settingsFromEnv(env), ...(fetch ? { fetch } : {}) }).host;
147
112
  }
@@ -1,6 +1,7 @@
1
+ import type { ProviderDescriptor } from "../descriptor.js";
1
2
  import type { DialKit } from "./types.js";
2
3
  /**
3
- * The dialKit() of a dial host's module, by its provider id and label: it always refuses, naming the script to run, and
4
- * the setting that makes the provider dial when dialing is not its only way (E2B's and Modal's COMPUTER_<ID>_CONNECT=dial).
4
+ * The dialKit() of a dial host's module, by its provider's descriptor: it always refuses, naming the script to run, and
5
+ * the setting that makes the provider dial when dialing is not its only way (its COMPUTER_<ID>_CONNECT=dial).
5
6
  */
6
- export declare function dialOnlyFromServer(id: string, label: string, setting?: string): () => DialKit;
7
+ export declare function dialOnlyFromServer({ id, label }: Pick<ProviderDescriptor, "id" | "label">, setting?: string): () => DialKit;
@@ -1,8 +1,8 @@
1
1
  /**
2
- * The dialKit() of a dial host's module, by its provider id and label: it always refuses, naming the script to run, and
3
- * the setting that makes the provider dial when dialing is not its only way (E2B's and Modal's COMPUTER_<ID>_CONNECT=dial).
2
+ * The dialKit() of a dial host's module, by its provider's descriptor: it always refuses, naming the script to run, and
3
+ * the setting that makes the provider dial when dialing is not its only way (its COMPUTER_<ID>_CONNECT=dial).
4
4
  */
5
- export function dialOnlyFromServer(id, label, setting) {
5
+ export function dialOnlyFromServer({ id, label }, setting) {
6
6
  return () => {
7
7
  throw new Error(`${label}'s machines dial the server that minted their tokens, and this run has no public server: run its Core with packages/serve/scripts/dial-conformance.mjs --provider ${id}${setting ? ` with ${setting}` : ""} inside a server the internet reaches at AGENTRUN_PUBLIC_URL`);
8
8
  };
@@ -1,7 +1,7 @@
1
1
  import { type DockerCreateOptions, type DockerProvider } from "../docker.js";
2
2
  import type { MountKind } from "../mount.js";
3
+ import { type Env } from "./module-kit.js";
3
4
  import type { RunFolder } from "./types.js";
4
- /** The environment this module reads, by name. */
5
5
  export declare const DOCKER_ENV: {
6
6
  /** The daemon binary for Docker's architecture; default this package's dist/computerd-linux-<arch>. */
7
7
  readonly daemon: "COMPUTER_DOCKER_DAEMON";
@@ -10,7 +10,6 @@ export declare const DOCKER_ENV: {
10
10
  /** Who a computer runs as when its spec does not say, uid or uid:gid in numbers; see DockerProviderOptions.user. */
11
11
  readonly user: "COMPUTER_DOCKER_USER";
12
12
  };
13
- /** The names this module reads, under the conformance modules' common name (ConformanceModule.ENV). */
14
13
  export declare const ENV: {
15
14
  /** The daemon binary for Docker's architecture; default this package's dist/computerd-linux-<arch>. */
16
15
  readonly daemon: "COMPUTER_DOCKER_DAEMON";
@@ -20,10 +19,10 @@ export declare const ENV: {
20
19
  readonly user: "COMPUTER_DOCKER_USER";
21
20
  };
22
21
  /** The provider's options this module reads from env, each only when its name is set. */
23
- export declare function settingsFromEnv(env?: Record<string, string | undefined>): DockerCreateOptions;
22
+ export declare function settingsFromEnv(env?: Env): DockerCreateOptions;
24
23
  export interface DockerModuleOptions extends Pick<DockerCreateOptions, "docker" | "timeoutMs" | "desktop"> {
25
- /** Where the settings are read; default process.env. */
26
- env?: Record<string, string | undefined>;
24
+ /** Where the settings are read, and what each docker call holds the names docker reads of; default process.env. */
25
+ env?: Env;
27
26
  }
28
27
  /** The provider the CLI runs; throws in words when Docker cannot be asked its architecture, or its daemon is not built. */
29
28
  export declare function createProvider({ env, ...options }?: DockerModuleOptions): Promise<DockerProvider>;