@parcha/agentrun-computer 0.1.0-beta.40 → 0.1.0-beta.42

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 (96) hide show
  1. package/NOTICE +2 -0
  2. package/README.md +285 -28
  3. package/box/Dockerfile +6 -4
  4. package/box/README.md +10 -2
  5. package/box/build-daytona.py +3 -1
  6. package/box/build-e2b.mjs +1 -1
  7. package/box/install.sh +68 -7
  8. package/dist/attach.d.ts +46 -1
  9. package/dist/attach.js +48 -4
  10. package/dist/box-image.d.ts +1 -1
  11. package/dist/box-image.js +1 -1
  12. package/dist/boxd.d.ts +126 -0
  13. package/dist/boxd.js +418 -0
  14. package/dist/cloudflare.d.ts +32 -0
  15. package/dist/cloudflare.js +179 -0
  16. package/dist/computerd-linux-amd64 +0 -0
  17. package/dist/computerd-linux-arm64 +0 -0
  18. package/dist/computerd.json +2 -2
  19. package/dist/conformance/boxd.d.ts +77 -0
  20. package/dist/conformance/boxd.js +113 -0
  21. package/dist/conformance/cases/isolation.js +1 -17
  22. package/dist/conformance/cases/provider.js +42 -26
  23. package/dist/conformance/cli.js +4 -1
  24. package/dist/conformance/cloudflare.d.ts +42 -0
  25. package/dist/conformance/cloudflare.js +54 -0
  26. package/dist/conformance/daytona.d.ts +25 -0
  27. package/dist/conformance/daytona.js +26 -1
  28. package/dist/conformance/dial-only.d.ts +6 -0
  29. package/dist/conformance/dial-only.js +9 -0
  30. package/dist/conformance/e2b.d.ts +12 -3
  31. package/dist/conformance/e2b.js +21 -4
  32. package/dist/conformance/exec-stream.js +14 -6
  33. package/dist/conformance/fly.d.ts +52 -0
  34. package/dist/conformance/fly.js +52 -0
  35. package/dist/conformance/modal.d.ts +15 -2
  36. package/dist/conformance/modal.js +36 -3
  37. package/dist/conformance/morph.d.ts +59 -0
  38. package/dist/conformance/morph.js +95 -0
  39. package/dist/conformance/phone-harness.js +2 -2
  40. package/dist/conformance/runner.js +5 -1
  41. package/dist/conformance/sweep.d.ts +1 -1
  42. package/dist/conformance/sweep.js +1 -1
  43. package/dist/conformance/types.d.ts +21 -0
  44. package/dist/daytona.d.ts +8 -1
  45. package/dist/daytona.js +124 -101
  46. package/dist/descriptor.d.ts +22 -1
  47. package/dist/descriptor.js +18 -0
  48. package/dist/descriptors/boxd.d.ts +52 -0
  49. package/dist/descriptors/boxd.js +29 -0
  50. package/dist/descriptors/cloudflare.d.ts +21 -0
  51. package/dist/descriptors/cloudflare.js +29 -0
  52. package/dist/descriptors/daytona.d.ts +12 -3
  53. package/dist/descriptors/daytona.js +15 -7
  54. package/dist/descriptors/e2b.d.ts +4 -0
  55. package/dist/descriptors/e2b.js +3 -0
  56. package/dist/descriptors/fly.d.ts +19 -0
  57. package/dist/descriptors/fly.js +28 -0
  58. package/dist/descriptors/index.d.ts +121 -2
  59. package/dist/descriptors/index.js +7 -2
  60. package/dist/descriptors/modal.d.ts +3 -0
  61. package/dist/descriptors/modal.js +7 -2
  62. package/dist/descriptors/morph.d.ts +15 -0
  63. package/dist/descriptors/morph.js +21 -0
  64. package/dist/descriptors/phone-harness.d.ts +1 -0
  65. package/dist/descriptors/phone-harness.js +2 -0
  66. package/dist/e2b.d.ts +7 -1
  67. package/dist/e2b.js +87 -44
  68. package/dist/fly.d.ts +43 -0
  69. package/dist/fly.js +245 -0
  70. package/dist/host.d.ts +52 -48
  71. package/dist/hosted/framed-exec.d.ts +8 -19
  72. package/dist/hosted/framed-exec.js +21 -87
  73. package/dist/hosted/process.d.ts +21 -0
  74. package/dist/hosted/process.js +37 -2
  75. package/dist/hosted/provider.d.ts +32 -6
  76. package/dist/hosted/provider.js +239 -236
  77. package/dist/hosted/rest.d.ts +19 -0
  78. package/dist/hosted/rest.js +76 -0
  79. package/dist/hosted/scripts.d.ts +52 -8
  80. package/dist/hosted/scripts.js +118 -23
  81. package/dist/hosted/ssh-exec.d.ts +9 -7
  82. package/dist/hosted/ssh-exec.js +93 -54
  83. package/dist/hosted/values.d.ts +5 -0
  84. package/dist/hosted/values.js +9 -0
  85. package/dist/index.d.ts +3 -3
  86. package/dist/index.js +4 -4
  87. package/dist/kinds.d.ts +2 -0
  88. package/dist/modal.d.ts +6 -0
  89. package/dist/modal.js +40 -17
  90. package/dist/morph.d.ts +65 -0
  91. package/dist/morph.js +495 -0
  92. package/dist/phone-harness.d.ts +15 -5
  93. package/dist/phone-harness.js +50 -15
  94. package/dist/providers.d.ts +4 -2
  95. package/dist/screen-watch.js +2 -2
  96. package/package.json +20 -2
@@ -5,42 +5,13 @@
5
5
  // bytes, its events read no faster than the caller reads it; and a vendor with no kill gets one by pid. PROVIDERS.md, "Exec shapes that work", has a worked example.
6
6
  import { once } from "node:events";
7
7
  import { PassThrough } from "node:stream";
8
- /**
9
- * The sh a process starts under when the vendor has no kill: one line on stderr, its pid and its start time (field 22
10
- * of /proc/<pid>/stat, counted past the command's name in parentheses, which may hold spaces), then the command in its
11
- * place, which keeps both.
12
- */
13
- export const PID_WRAPPER = ["sh", "-c", 'echo "$$ $(s=$(cat /proc/$$/stat) && set -- ${s##*") "} && echo "${20}")" >&2; exec "$@"', "sh"];
14
- /**
15
- * The sh kill() starts, given the pid and start time: a pid whose process has ended, and may be another's now, is let
16
- * be. Otherwise it kills the process and every process under it (an upload's head and base64 would wait on the open
17
- * stdin, and hold stderr open, past their sh): each is stopped as it is found, so none forks away, by its parent pid
18
- * (field 4 of its stat) until a pass over /proc finds no more, and then all are killed.
19
- */
20
- export const PID_KILL = [
21
- "pid=$1 start=$2",
22
- 'read -r s 2>/dev/null <"/proc/$pid/stat" || exit 0',
23
- 'set -- ${s##*") "}',
24
- '[ "${20}" = "$start" ] || exit 0',
25
- 'kill -STOP "$pid" 2>/dev/null',
26
- 'all=" $pid " new=$pid',
27
- 'while [ -n "$new" ]; do',
28
- "\tnew=",
29
- "\tfor f in /proc/[0-9]*/stat; do",
30
- '\t\tread -r s 2>/dev/null <"$f" || continue',
31
- "\t\tp=${s%% *}",
32
- '\t\tset -- ${s##*") "}',
33
- '\t\tcase "$all" in *" $p "*) continue ;; esac',
34
- '\t\tcase "$all" in *" $2 "*) all="$all$p " new="$new $p"; kill -STOP "$p" 2>/dev/null ;; esac',
35
- "\tdone",
36
- "done",
37
- "kill -KILL $all 2>/dev/null",
38
- "exit 0",
39
- ].join("\n");
8
+ import { PID_WRAPPER, pidKill, pidLine } from "./scripts.js";
40
9
  /** argv started through a vendor's pieces, as the MachineProcess exec answers. */
41
10
  export async function framedExec(pieces, argv, ctx) {
42
- const byPid = pieces.kill === undefined;
43
- const handle = await pieces.start(byPid ? [...PID_WRAPPER, ...argv] : argv, ctx);
11
+ // With no vendor kill, stderr's first line is the pid and its start time (./scripts.ts, PID_WRAPPER): taken off, and
12
+ // the rest is the process's own.
13
+ const line = pieces.kill === undefined ? pidLine() : undefined;
14
+ const handle = await pieces.start(line ? [...PID_WRAPPER, ...argv] : argv, ctx);
44
15
  const stdout = new PassThrough();
45
16
  const stderr = new PassThrough();
46
17
  // ended: the events stopped, so output and writes are done with. exitRead: the process's own exit came among them; a
@@ -61,26 +32,14 @@ export async function framedExec(pieces, argv, ctx) {
61
32
  await Promise.race([once(stream, "drain", { signal }), once(stream, "close", { signal })]).catch(() => { });
62
33
  waited.abort();
63
34
  };
64
- // With no vendor kill, stderr's first line is the pid and its start time: held until it ends, then the rest is the
65
- // process's own.
66
- let pidLine = byPid ? Buffer.alloc(0) : undefined;
67
- let gotPid = () => { };
68
- const pid = new Promise((done) => (gotPid = done));
69
35
  const toStderr = async (bytes) => {
70
- if (pidLine === undefined)
71
- return push(stderr, bytes);
72
- pidLine = Buffer.concat([pidLine, bytes]);
73
- const at = pidLine.indexOf(0x0a);
74
- if (at < 0)
75
- return;
76
- gotPid(pidLine.subarray(0, at).toString("latin1").trim());
77
- const rest = pidLine.subarray(at + 1);
78
- pidLine = undefined;
79
- if (rest.length > 0)
80
- await push(stderr, rest);
36
+ const own = line ? line.take(bytes) : bytes;
37
+ if (own.length > 0)
38
+ await push(stderr, own);
81
39
  };
82
40
  const exited = (async () => {
83
41
  let code = -1;
42
+ let broke;
84
43
  try {
85
44
  for await (const event of pieces.events(handle)) {
86
45
  if ("exit" in event) {
@@ -95,15 +54,20 @@ export async function framedExec(pieces, argv, ctx) {
95
54
  await toStderr(bytes);
96
55
  }
97
56
  }
98
- catch {
99
- // A stream that broke: no exit code was read.
57
+ catch (error) {
58
+ // A stream that broke: no exit code was read, and wait() fails in its words.
59
+ broke = error;
100
60
  }
101
61
  ended = true;
102
- gotPid(undefined);
62
+ line?.end();
103
63
  stdout.end();
104
64
  stderr.end();
65
+ if (broke !== undefined)
66
+ throw broke;
105
67
  return code;
106
68
  })();
69
+ // Nobody may wait (the bridge ends by kill): a broken stream is then no unhandled rejection.
70
+ exited.catch(() => { });
107
71
  // The writes as one queue: each call starts once the one before it answered, and one that failed fails every one after.
108
72
  // ignoreBOM: a U+FEFF that starts stdin is text like any other, never a mark to drop.
109
73
  const decoder = new TextDecoder("utf-8", { ignoreBOM: true });
@@ -116,17 +80,6 @@ export async function framedExec(pieces, argv, ctx) {
116
80
  queue = sent;
117
81
  return sent;
118
82
  };
119
- /** "<pid> <start time>", once stderr's first line gives it; undefined once the process ended, or past ctx's bound. */
120
- const pidWithin = async () => {
121
- let timer;
122
- const late = new Promise((done) => (timer = setTimeout(() => done(undefined), ctx.timeoutMs)));
123
- try {
124
- return await Promise.race([pid, late]);
125
- }
126
- finally {
127
- clearTimeout(timer);
128
- }
129
- };
130
83
  return {
131
84
  stdout,
132
85
  stderr,
@@ -144,12 +97,12 @@ export async function framedExec(pieces, argv, ctx) {
144
97
  try {
145
98
  if (pieces.kill)
146
99
  await pieces.kill(handle);
147
- else {
100
+ else if (line) {
148
101
  // Not once its exit was read; and after a stream that broke, only while the pid still has its start time: by
149
102
  // then the pid may be another process's.
150
- const target = /^([1-9][0-9]*) ([0-9]+)$/.exec((await pidWithin()) ?? "");
151
- if (target !== null && !exitRead) {
152
- const killer = await pieces.start(["sh", "-c", PID_KILL, "sh", target[1], target[2]], { timeoutMs: ctx.timeoutMs });
103
+ const target = await line.pid(ctx.timeoutMs);
104
+ if (target !== undefined && !exitRead) {
105
+ const killer = await pieces.start(pidKill(target), { timeoutMs: ctx.timeoutMs });
153
106
  for await (const event of pieces.events(killer))
154
107
  if ("exit" in event)
155
108
  break;
@@ -164,22 +117,3 @@ export async function framedExec(pieces, argv, ctx) {
164
117
  },
165
118
  };
166
119
  }
167
- /** The JSON value of each line of a body of newline-delimited JSON, as the lines come; a line that is not JSON throws. */
168
- export async function* ndjson(body) {
169
- const decoder = new TextDecoder();
170
- let rest = "";
171
- for await (const chunk of body) {
172
- rest += decoder.decode(chunk, { stream: true });
173
- let at = rest.indexOf("\n");
174
- while (at >= 0) {
175
- const line = rest.slice(0, at).trim();
176
- rest = rest.slice(at + 1);
177
- if (line !== "")
178
- yield JSON.parse(line);
179
- at = rest.indexOf("\n");
180
- }
181
- }
182
- rest += decoder.decode();
183
- if (rest.trim() !== "")
184
- yield JSON.parse(rest);
185
- }
@@ -2,6 +2,8 @@ import { type HostCall, type MachineHost } from "../host.js";
2
2
  import type { ArchilRoot } from "../mount-archil.js";
3
3
  import type { ComputerConnection } from "../provider.js";
4
4
  import { type ComputerErrorCode, type Result } from "../result.js";
5
+ /** The host's exec; a dial host has none, and a call of it throws unsupported, in words. */
6
+ export declare function execOf(host: MachineHost): NonNullable<MachineHost["exec"]>;
5
7
  /** What a call's race adds to the bound it gives the vendor's own call, so the vendor's timeout, not the race, reports a slow call. */
6
8
  export declare const CALL_SLACK_MS = 5000;
7
9
  export declare const seconds: (ms: number) => string;
@@ -11,6 +13,16 @@ export declare const words: (error: unknown) => string;
11
13
  export declare const redact: (text: string, secrets: readonly (string | undefined)[]) => string;
12
14
  /** A pause that ends early when signal aborts; never rejects. */
13
15
  export declare const pause: (ms: number, signal?: AbortSignal) => Promise<void>;
16
+ /**
17
+ * done() asked until it answers a value, pollMs apart: for an image build's waits (a build machine, a snapshot), all
18
+ * held to one end (epoch ms). Past the end is a timeout, the caller's abort aborted, each a HostError in words; an
19
+ * abort is read before each ask, so a cancelled caller is never answered a value it would act on.
20
+ */
21
+ export declare function until<T>(what: string, { end, pollMs, signal }: {
22
+ end: number;
23
+ pollMs: number;
24
+ signal?: AbortSignal | undefined;
25
+ }, done: () => Promise<T | undefined>): Promise<T>;
14
26
  /** A signal that aborts with the caller's, or once ms pass. */
15
27
  export declare const bounded: (ms: number, signal?: AbortSignal) => AbortSignal;
16
28
  /**
@@ -57,6 +69,15 @@ export declare function runToExit(host: MachineHost, id: string, argv: readonly
57
69
  signal?: AbortSignal;
58
70
  what: string;
59
71
  }): Promise<Result<RunResult>>;
72
+ /**
73
+ * One step of an image build: argv run to its end as runToExit runs it, and anything but exit 0 thrown, a HostError
74
+ * (vendor) with the last of what it printed, so the build fails in the step's own words.
75
+ */
76
+ export declare function runChecked(host: MachineHost, id: string, argv: readonly string[], options: {
77
+ ms: number;
78
+ signal?: AbortSignal | undefined;
79
+ what: string;
80
+ }): Promise<RunResult>;
60
81
  /**
61
82
  * The default upload, for a vendor with no file API: the bytes as base64 text through exec's stdin, in pieces, so a
62
83
  * vendor whose stdin takes one request at a time (E2B's sendStdin) is never handed a whole binary, and exec carries text
@@ -5,6 +5,13 @@ import { PassThrough, Writable } from "node:stream";
5
5
  import { DaemonClient } from "../client.js";
6
6
  import { HostError } from "../host.js";
7
7
  import { failFor, ok } from "../result.js";
8
+ /** The host's exec; a dial host has none, and a call of it throws unsupported, in words. */
9
+ export function execOf(host) {
10
+ return (host.exec?.bind(host) ??
11
+ (() => {
12
+ throw new HostError("unsupported", `${host.descriptor.label}'s machines have no exec: they dial this server (facts.connect "dial")`);
13
+ }));
14
+ }
8
15
  /** What a call's race adds to the bound it gives the vendor's own call, so the vendor's timeout, not the race, reports a slow call. */
9
16
  export const CALL_SLACK_MS = 5_000;
10
17
  export const seconds = (ms) => `${ms / 1000} s`;
@@ -32,6 +39,23 @@ export const pause = (ms, signal) => new Promise((done) => {
32
39
  else
33
40
  signal?.addEventListener("abort", finish, { once: true });
34
41
  });
42
+ /**
43
+ * done() asked until it answers a value, pollMs apart: for an image build's waits (a build machine, a snapshot), all
44
+ * held to one end (epoch ms). Past the end is a timeout, the caller's abort aborted, each a HostError in words; an
45
+ * abort is read before each ask, so a cancelled caller is never answered a value it would act on.
46
+ */
47
+ export async function until(what, { end, pollMs, signal }, done) {
48
+ for (;;) {
49
+ if (signal?.aborted)
50
+ throw new HostError("aborted", `the wait for ${what} was aborted`);
51
+ const value = await done();
52
+ if (value !== undefined)
53
+ return value;
54
+ if (Date.now() > end)
55
+ throw new HostError("timeout", `${what} was not ready by ${new Date(end).toISOString()}`);
56
+ await pause(pollMs, signal);
57
+ }
58
+ }
35
59
  /** A signal that aborts with the caller's, or once ms pass. */
36
60
  export const bounded = (ms, signal) => (signal ? AbortSignal.any([signal, AbortSignal.timeout(ms)]) : AbortSignal.timeout(ms));
37
61
  /**
@@ -147,7 +171,7 @@ export const OUTPUT_MAX = 64 * 1024;
147
171
  */
148
172
  export async function runToExit(host, id, argv, { stdin, ms, signal, what }) {
149
173
  const fail = failFor(host.descriptor.id);
150
- const started = await hostCall(host, what, (ctx) => host.exec(id, argv, ctx), ms, signal);
174
+ const started = await hostCall(host, what, (ctx) => execOf(host)(id, argv, ctx), ms, signal);
151
175
  if (!started.ok)
152
176
  return started;
153
177
  const proc = started.value;
@@ -177,6 +201,17 @@ export async function runToExit(host, id, argv, { stdin, ms, signal, what }) {
177
201
  }
178
202
  return result;
179
203
  }
204
+ /**
205
+ * One step of an image build: argv run to its end as runToExit runs it, and anything but exit 0 thrown, a HostError
206
+ * (vendor) with the last of what it printed, so the build fails in the step's own words.
207
+ */
208
+ export async function runChecked(host, id, argv, options) {
209
+ const { ms, signal, what } = options;
210
+ const ran = orThrow(await runToExit(host, id, argv, { ms, ...(signal ? { signal } : {}), what }));
211
+ if (ran.exitCode !== 0)
212
+ throw new HostError("vendor", `${what} exited with ${ran.exitCode}: ${`${ran.stderr} ${ran.stdout}`.trim().slice(-300)}`);
213
+ return ran;
214
+ }
180
215
  /** A piece of the upload: 192 KiB, which base64 writes as 256 KiB of text, padded at the file's end alone. */
181
216
  const UPLOAD_PIECE = 192 * 1024;
182
217
  /** The bytes as base64 text, a piece at a time: no more of it in memory at once than one piece. */
@@ -226,7 +261,7 @@ export async function openBridge(host, id, { argv, name, version, requestMs, hel
226
261
  const fail = failFor(host.descriptor.id);
227
262
  // Never signalled, only raced: the bridge lives on after this call. It has no command timeout, so one the vendor
228
263
  // starts after this was given up on is killed as it lands.
229
- const started = await hostCall(host, `starting the daemon's stdio bridge in ${name}`, (ctx) => host.exec(id, argv, { timeoutMs: ctx.timeoutMs }), requestMs, signal, (late) => late.ok && late.value.kill());
264
+ const started = await hostCall(host, `starting the daemon's stdio bridge in ${name}`, (ctx) => execOf(host)(id, argv, { timeoutMs: ctx.timeoutMs }), requestMs, signal, (late) => late.ok && late.value.kill());
230
265
  if (!started.ok) {
231
266
  const { code, message } = started.error;
232
267
  return code === "timeout" || code === "aborted" ? fail(code, `${message}; a bridge that starts after this is killed`) : started;
@@ -1,8 +1,9 @@
1
+ import { type AttachHub, type MachineTokens } from "../attach.js";
1
2
  import { type DesktopOptions } from "../desktop.js";
2
3
  import { type Machine, type MachineHost } from "../host.js";
3
4
  import { type ProviderNote } from "../mount-archil.js";
4
5
  import { type AttachedComputer, type AttachContext, type CallContext, type ComputerCapabilities, type ComputerConnection, type ComputerInfo, type ComputerProvider, type ComputerRef, type ComputerSpec, type CreateContext, type CreatedComputer, type NetworkPolicy, type NetworkSpec, type Refusal, type ReleaseContext, type ReleaseHow } from "../provider.js";
5
- import { type Result } from "../result.js";
6
+ import { type ComputerError, type Result } from "../result.js";
6
7
  import { type ScreenWatch, type ScreenWatchHandlers, type WatchOptions } from "../screen-watch.js";
7
8
  /** The longest each kind of call may take, and the pauses between polls. */
8
9
  export interface HostedTimeouts {
@@ -65,6 +66,21 @@ export interface HostedOptions {
65
66
  * Given to the helper's mount and revoke. Unset or empty, the client reaches Archil as the machine's network allows.
66
67
  */
67
68
  archilEgress?: string;
69
+ /** What a host whose facts.connect is "dial" needs: create refuses without it, before any call to the vendor. */
70
+ dial?: HostedDial;
71
+ }
72
+ /** The server a dial host's machines reach, and what it holds of them (MachineHost facts.connect "dial"). */
73
+ export interface HostedDial {
74
+ /**
75
+ * The server's public address, AGENTRUN_PUBLIC_URL: https://, which the vendor's machines must reach (http:// only on
76
+ * 127.0.0.1, for tests). They dial its /v2/computers/attach and fetch the daemon from its /v2/computers/daemon, which
77
+ * serves the build at this provider's daemonPath. Empty or unset: create refuses, in words.
78
+ */
79
+ url?: string;
80
+ /** The server's machine tokens: one minted at each create, revoked at its delete. */
81
+ tokens: MachineTokens;
82
+ /** The server's AttachHub, which the server's attach route gives each minted machine's socket. */
83
+ hub: Pick<AttachHub, "online" | "connection" | "revoke">;
68
84
  }
69
85
  export declare const NAME_LABEL = "agentrun.computer.name";
70
86
  /** The image create was asked for: a vendor may report another name for it (a template's id). */
@@ -75,6 +91,17 @@ export declare const MAX_LABEL = "agentrun.computer.max-deadline";
75
91
  export declare const GPU_LABEL = "agentrun.computer.gpu";
76
92
  /** The adapter's timeouts, the caller's over its defaults: what a host reads for its own requestMs or pollMs. */
77
93
  export declare const timeoutsOf: (timeouts?: Partial<HostedTimeouts>) => HostedTimeouts;
94
+ /**
95
+ * The computerd build a hosted machine of arch runs: HostedProvider's default daemonPath, and the file serve's daemon
96
+ * route serves, so the sha256 a dial machine checks (AGENTRUN_DAEMON_SHA256) is this file's.
97
+ */
98
+ export declare function hostedDaemonPath(arch: "amd64" | "arm64"): string;
99
+ /**
100
+ * Whether a create that failed with code may have made a machine, so the request's name is swept. A refusal made
101
+ * nothing: a machine under the name then is another's (exists: another instance's create of the request), never
102
+ * deleted. Any other failure (the vendor's, a timeout) may have made one, answered in time or after create gave up.
103
+ */
104
+ export declare const mayHaveMade: (code: ComputerError["code"]) => boolean;
78
105
  /** An ISO time a label holds, or undefined when it is missing or not the ISO time create writes. */
79
106
  export declare function isoOf(written: string | undefined): Date | undefined;
80
107
  /**
@@ -144,15 +171,14 @@ export declare class HostedProvider implements ComputerProvider {
144
171
  }
145
172
  /**
146
173
  * The host's listing by labels, bounded by ms: only the machines that carry every one of them, since a vendor's listing
147
- * may answer more (MachineHost.list). A host that keeps labels in the machine lists none: its machines of another name
148
- * are left out, and the rest kept for foundBy to read.
174
+ * may answer more (MachineHost.list). A packed host is asked for PACKED_NAME alone, the name's where one is asked, and
175
+ * its machines' labels unpacked.
149
176
  */
150
177
  export declare function listedBy(host: MachineHost, what: string, labels: Record<string, string>, ms: number, signal?: AbortSignal): Promise<Result<Machine[]>>;
151
178
  /**
152
179
  * The listing finds, get answers (MachineHost.list): the machines the host's listing by labels names, each read now by
153
- * readMachine, within requestMs, and its label file where the host keeps labels in the machine. One the vendor no longer
154
- * has (not found) is dropped, and so is one whose get carries not every label, but a machine of the name asked for whose
155
- * labels are not written yet. A read that fails otherwise fails the whole.
180
+ * readMachine, within requestMs. One the vendor no longer has (not found) is dropped, and so is one whose get carries
181
+ * not every label. A get that fails fails the whole listing.
156
182
  */
157
183
  export declare function foundBy(host: MachineHost, what: string, labels: Record<string, string>, { listMs, requestMs }: Pick<HostedTimeouts, "listMs" | "requestMs">, signal?: AbortSignal): Promise<Result<Machine[]>>;
158
184
  /**