@parcha/agentrun-computer 0.1.0-beta.35 → 0.1.0-beta.37

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 (148) hide show
  1. package/NOTICE +2 -0
  2. package/README.md +423 -323
  3. package/box/Dockerfile +3 -1
  4. package/box/agentrun-archil +59 -7
  5. package/box/build-agent37.mjs +177 -0
  6. package/box/build-daytona.py +20 -4
  7. package/dist/agent37.d.ts +165 -0
  8. package/dist/agent37.js +759 -0
  9. package/dist/attach.d.ts +146 -0
  10. package/dist/attach.js +469 -0
  11. package/dist/browser.d.ts +61 -10
  12. package/dist/browser.js +125 -3
  13. package/dist/browserbase.d.ts +46 -23
  14. package/dist/browserbase.js +162 -17
  15. package/dist/chrome.d.ts +3 -4
  16. package/dist/chrome.js +6 -11
  17. package/dist/client.d.ts +33 -1
  18. package/dist/client.js +53 -0
  19. package/dist/computerd-linux-amd64 +0 -0
  20. package/dist/computerd-linux-arm64 +0 -0
  21. package/dist/conformance/agent37.d.ts +96 -0
  22. package/dist/conformance/agent37.js +154 -0
  23. package/dist/conformance/cases/apps.d.ts +5 -0
  24. package/dist/conformance/cases/apps.js +160 -73
  25. package/dist/conformance/cases/health.js +14 -0
  26. package/dist/conformance/cases/index.js +2 -0
  27. package/dist/conformance/cases/provider.js +27 -1
  28. package/dist/conformance/cases/screen.d.ts +3 -0
  29. package/dist/conformance/cases/screen.js +18 -0
  30. package/dist/conformance/cases/settings.d.ts +29 -23
  31. package/dist/conformance/cases/settings.js +76 -58
  32. package/dist/conformance/cases/touch.js +19 -17
  33. package/dist/conformance/cases/ui.d.ts +2 -0
  34. package/dist/conformance/cases/ui.js +475 -0
  35. package/dist/conformance/cli.d.ts +9 -0
  36. package/dist/conformance/cli.js +28 -3
  37. package/dist/conformance/daytona.d.ts +4 -0
  38. package/dist/conformance/daytona.js +5 -0
  39. package/dist/conformance/e2b.d.ts +6 -0
  40. package/dist/conformance/e2b.js +9 -2
  41. package/dist/conformance/fixture.d.ts +1 -1
  42. package/dist/conformance/fixture.js +25 -1
  43. package/dist/conformance/modal.d.ts +17 -13
  44. package/dist/conformance/modal.js +18 -9
  45. package/dist/conformance/orgo.d.ts +3 -3
  46. package/dist/conformance/orgo.js +6 -8
  47. package/dist/conformance/phone-harness.d.ts +6 -2
  48. package/dist/conformance/phone-harness.js +21 -4
  49. package/dist/conformance/report.js +1 -1
  50. package/dist/conformance/runner.js +23 -4
  51. package/dist/conformance/sweep.d.ts +50 -0
  52. package/dist/conformance/sweep.js +187 -0
  53. package/dist/conformance/types.d.ts +11 -3
  54. package/dist/conformance/ui-fixture.d.ts +56 -0
  55. package/dist/conformance/ui-fixture.js +43 -0
  56. package/dist/create-requests.d.ts +51 -0
  57. package/dist/create-requests.js +121 -0
  58. package/dist/daytona.d.ts +15 -5
  59. package/dist/daytona.js +58 -38
  60. package/dist/descriptor.d.ts +29 -2
  61. package/dist/descriptor.js +13 -0
  62. package/dist/descriptors/agent37.d.ts +41 -0
  63. package/dist/descriptors/agent37.js +28 -0
  64. package/dist/descriptors/browserbase.d.ts +1 -0
  65. package/dist/descriptors/browserbase.js +2 -0
  66. package/dist/descriptors/daytona.d.ts +23 -2
  67. package/dist/descriptors/daytona.js +34 -2
  68. package/dist/descriptors/index.d.ts +66 -3
  69. package/dist/descriptors/index.js +5 -3
  70. package/dist/descriptors/kernel.d.ts +1 -0
  71. package/dist/descriptors/kernel.js +2 -0
  72. package/dist/descriptors/modal.d.ts +4 -0
  73. package/dist/descriptors/modal.js +11 -1
  74. package/dist/descriptors/orgo.d.ts +13 -1
  75. package/dist/descriptors/orgo.js +9 -3
  76. package/dist/descriptors/phone-harness.d.ts +6 -1
  77. package/dist/descriptors/phone-harness.js +5 -2
  78. package/dist/docker/egress.d.ts +4 -3
  79. package/dist/docker/egress.js +7 -6
  80. package/dist/docker.d.ts +7 -4
  81. package/dist/docker.js +278 -34
  82. package/dist/e2b.d.ts +9 -165
  83. package/dist/e2b.js +282 -1342
  84. package/dist/fake-ui-driver.d.ts +97 -0
  85. package/dist/fake-ui-driver.js +717 -0
  86. package/dist/host.d.ts +182 -0
  87. package/dist/host.js +1 -0
  88. package/dist/hosted/process.d.ts +67 -0
  89. package/dist/hosted/process.js +228 -0
  90. package/dist/hosted/provider.d.ts +146 -0
  91. package/dist/hosted/provider.js +1364 -0
  92. package/dist/hosted/scripts.d.ts +76 -0
  93. package/dist/{child.js → hosted/scripts.js} +93 -12
  94. package/dist/index.d.ts +11 -7
  95. package/dist/index.js +10 -7
  96. package/dist/janitor.d.ts +5 -4
  97. package/dist/janitor.js +1 -1
  98. package/dist/kernel.d.ts +17 -27
  99. package/dist/kernel.js +94 -18
  100. package/dist/kinds.d.ts +17 -5
  101. package/dist/kinds.js +20 -4
  102. package/dist/labels.d.ts +10 -2
  103. package/dist/labels.js +30 -7
  104. package/dist/local-chrome.d.ts +5 -5
  105. package/dist/local-chrome.js +10 -5
  106. package/dist/modal.d.ts +23 -181
  107. package/dist/modal.js +273 -1232
  108. package/dist/mount-archil.d.ts +25 -3
  109. package/dist/mount-archil.js +39 -8
  110. package/dist/orgo-channel.d.ts +3 -2
  111. package/dist/orgo-channel.js +5 -2
  112. package/dist/orgo-desktop.d.ts +23 -9
  113. package/dist/orgo-desktop.js +328 -66
  114. package/dist/orgo-names.d.ts +129 -3
  115. package/dist/orgo-names.js +211 -8
  116. package/dist/orgo-workspaces.d.ts +47 -0
  117. package/dist/orgo-workspaces.js +94 -0
  118. package/dist/orgo.d.ts +27 -10
  119. package/dist/orgo.js +411 -81
  120. package/dist/phone-harness.d.ts +31 -21
  121. package/dist/phone-harness.js +510 -681
  122. package/dist/png.d.ts +4 -0
  123. package/dist/png.js +27 -0
  124. package/dist/protocol.d.ts +338 -30
  125. package/dist/protocol.js +96 -3
  126. package/dist/provider.d.ts +97 -7
  127. package/dist/provider.js +24 -3
  128. package/dist/result.d.ts +1 -1
  129. package/dist/surface/api.d.ts +248 -0
  130. package/dist/surface/api.js +1 -0
  131. package/dist/surface/core.d.ts +42 -0
  132. package/dist/surface/core.js +393 -0
  133. package/dist/surface/index.d.ts +5 -0
  134. package/dist/surface/index.js +3 -0
  135. package/dist/surface/outline.d.ts +8 -0
  136. package/dist/surface/outline.js +50 -0
  137. package/dist/surface/script.d.ts +10 -0
  138. package/dist/surface/script.js +92 -0
  139. package/dist/ui-engine.d.ts +114 -0
  140. package/dist/ui-engine.js +798 -0
  141. package/package.json +17 -1
  142. package/dist/child.d.ts +0 -42
  143. package/dist/conformance/e2b-diagnose.d.ts +0 -16
  144. package/dist/conformance/e2b-diagnose.js +0 -61
  145. package/dist/conformance/e2b-sweep.d.ts +0 -18
  146. package/dist/conformance/e2b-sweep.js +0 -132
  147. package/dist/conformance/modal-sweep.d.ts +0 -22
  148. package/dist/conformance/modal-sweep.js +0 -213
@@ -58,6 +58,25 @@ export declare const ARCHIL_REGION = "[a-z0-9]+-[a-z0-9][a-z0-9-]{0,62}";
58
58
  export declare function archilRefusals(spec: ComputerSpec): Refusal[];
59
59
  /** The sha256 of the helper this package ships (box/agentrun-archil): the one an image must have. */
60
60
  export declare function helperSha256(): string;
61
+ /**
62
+ * An egress gateway for the archil client (parcha-proxy's archil-egress): with one, the helper's mount starts
63
+ * `computerd archil-relay` and redirects root's TCP to Archil's 8100 and 32050 to it, and the relay carries each
64
+ * connection to the gateway's lane for its port with a PROXY v2 header naming the original destination. The gateway
65
+ * forwards only to a destination that proves, by certificate, the Archil name the client asked for.
66
+ */
67
+ export interface ArchilEgress {
68
+ /** The gateway's IPv4 address. */
69
+ gateway: string;
70
+ /** The gateway's port for the client's connections to 8100 (the mount endpoint). */
71
+ mountLane: number;
72
+ /** The gateway's port for the client's connections to 32050 (the file servers). */
73
+ dataLane: number;
74
+ }
75
+ /**
76
+ * Reads `<IPv4 gateway>:<mount lane>:<data lane>`, such as 10.60.0.40:18100:42050, as the helper checks it: an IPv4
77
+ * address and two different ports, neither 8100 nor 32050. Anything else throws, in words.
78
+ */
79
+ export declare function archilEgressOf(text: string): ArchilEgress;
61
80
  export interface ArchilMountOptions {
62
81
  root: ArchilRoot;
63
82
  mount: ArchilMount;
@@ -71,6 +90,8 @@ export interface ArchilMountOptions {
71
90
  }>>;
72
91
  /** The bound of each step in the computer. */
73
92
  timeoutMs: number;
93
+ /** The egress gateway the archil client reaches Archil through; none, and it reaches Archil as the computer's network allows. */
94
+ egress?: ArchilEgress;
74
95
  signal?: AbortSignal;
75
96
  }
76
97
  /**
@@ -85,10 +106,11 @@ export interface ArchilMountOptions {
85
106
  * Another computer of the run at the claim's own epoch is never forced off: while one is listed there is no
86
107
  * revoke, and a held folder refuses in words;
87
108
  * 4. serve: the resident sync server, which holds no token.
88
- * The archil client and serve run in the computer's own network namespace, which reaches Archil; the tools' network is
89
- * init's own namespace, loopback alone (computerd init --own-network), so there is no firewall to set here.
109
+ * The archil client and serve run in the computer's own network namespace, which reaches Archil (through the egress
110
+ * gateway, when one is given: the helper sets the relay and its redirect); the tools' network is init's own namespace,
111
+ * loopback alone (computerd init --own-network), so there is no firewall to set here.
90
112
  */
91
- export declare function archilMount({ root, mount, self: computer, releaseOlder, timeoutMs, signal }: ArchilMountOptions): Promise<Result<void>>;
113
+ export declare function archilMount({ root, mount, self: computer, releaseOlder, timeoutMs, egress, signal }: ArchilMountOptions): Promise<Result<void>>;
92
114
  /**
93
115
  * A computerd client whose every call that may change the folder (files.write, move, remove and mkdir; tar.push.begin,
94
116
  * which makes the destination and the folders above it, so a push never ended leaves none unsynced; tar.push.end, and
@@ -120,7 +120,12 @@ const PREFLIGHT = [
120
120
  'echo "archil $(/usr/bin/archil --version 2>/dev/null | head -n 1)"',
121
121
  `echo "tool $(id -u ${ARCHIL_TOOL_USER} 2>/dev/null):$(id -g ${ARCHIL_TOOL_USER} 2>/dev/null)"`,
122
122
  'echo "sudo $(command -v sudo 2>/dev/null || echo none)"',
123
+ // The FUSE device, which the archil client mounts through: the runtime gives it, not the image (Daytona's GPU host
124
+ // gives none, live 11-11).
125
+ 'echo "fuse $([ -c /dev/fuse ] && echo present || echo absent)"',
123
126
  ].join("\n");
127
+ /** Why a computer's preflight says the Archil folder cannot be mounted at all, before anything else is checked. */
128
+ const NO_FUSE = "this computer has no /dev/fuse, so the Archil folder can't be mounted";
124
129
  /** How the preflight's words differ from the image the package ships, one line each; none when they do not. */
125
130
  function preflightDrift(output, expectedSha) {
126
131
  const lines = new Map();
@@ -144,14 +149,36 @@ function preflightDrift(output, expectedSha) {
144
149
  found.push(`the tool user ${ARCHIL_TOOL_USER} is not ${ARCHIL_TOOL_UID}:${ARCHIL_TOOL_UID} (${show(lines.get("tool"))})`);
145
150
  if (lines.get("sudo") !== "none")
146
151
  found.push(`the image has sudo (${show(lines.get("sudo"))}), which gives the tool user a way to root`);
152
+ if (lines.get("fuse") !== "present")
153
+ found.push(`the preflight did not find /dev/fuse (${show(lines.get("fuse"))})`);
147
154
  return found;
148
155
  }
149
156
  /** What Archil answers a mount of a folder another client holds. */
150
157
  const HELD = "has an outstanding delegation";
158
+ const IPV4 = /^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/;
159
+ const LANE = /^[1-9]\d{0,4}$/;
160
+ /** Archil's own ports, which the computer redirects to the relay: no lane may be one. */
161
+ const ARCHIL_PORTS = new Set([8100, 32050]);
162
+ /**
163
+ * Reads `<IPv4 gateway>:<mount lane>:<data lane>`, such as 10.60.0.40:18100:42050, as the helper checks it: an IPv4
164
+ * address and two different ports, neither 8100 nor 32050. Anything else throws, in words.
165
+ */
166
+ export function archilEgressOf(text) {
167
+ const [gateway = "", mount = "", data = "", ...rest] = text.split(":");
168
+ const mountLane = Number(mount);
169
+ const dataLane = Number(data);
170
+ const lane = (port, n) => LANE.test(port) && n <= 65535 && !ARCHIL_PORTS.has(n);
171
+ if (rest.length > 0 || !IPV4.test(gateway) || !lane(mount, mountLane) || !lane(data, dataLane) || mountLane === dataLane) {
172
+ throw new Error(`the Archil egress is <IPv4 gateway>:<mount lane>:<data lane>, such as 10.60.0.40:18100:42050, with two different ports, neither 8100 nor 32050; not ${JSON.stringify(text)}`);
173
+ }
174
+ return { gateway, mountLane, dataLane };
175
+ }
151
176
  /** The helper's argv for a verb. */
152
- function helper(verb, mount) {
153
- if (verb === "mount" || verb === "revoke")
154
- return [ARCHIL_HELPER, verb, mount.disk, mount.region, mount.folder];
177
+ function helper(verb, mount, egress) {
178
+ if (verb === "mount" || verb === "revoke") {
179
+ const way = egress === undefined ? [] : [`egress=${egress.gateway}:${egress.mountLane}:${egress.dataLane}`];
180
+ return [ARCHIL_HELPER, verb, mount.disk, mount.region, mount.folder, ...way];
181
+ }
155
182
  return [ARCHIL_HELPER, verb];
156
183
  }
157
184
  /**
@@ -166,10 +193,11 @@ function helper(verb, mount) {
166
193
  * Another computer of the run at the claim's own epoch is never forced off: while one is listed there is no
167
194
  * revoke, and a held folder refuses in words;
168
195
  * 4. serve: the resident sync server, which holds no token.
169
- * The archil client and serve run in the computer's own network namespace, which reaches Archil; the tools' network is
170
- * init's own namespace, loopback alone (computerd init --own-network), so there is no firewall to set here.
196
+ * The archil client and serve run in the computer's own network namespace, which reaches Archil (through the egress
197
+ * gateway, when one is given: the helper sets the relay and its redirect); the tools' network is init's own namespace,
198
+ * loopback alone (computerd init --own-network), so there is no firewall to set here.
171
199
  */
172
- export async function archilMount({ root, mount, self: computer, releaseOlder, timeoutMs, signal }) {
200
+ export async function archilMount({ root, mount, self: computer, releaseOlder, timeoutMs, egress, signal }) {
173
201
  const step = async (argv, what, stdin) => {
174
202
  const ran = await root.run(argv, { timeoutMs, ...(stdin === undefined ? {} : { stdin }), ...(signal ? { signal } : {}) });
175
203
  if (!ran.ok)
@@ -180,6 +208,9 @@ export async function archilMount({ root, mount, self: computer, releaseOlder, t
180
208
  const pre = await step(["sh", "-c", PREFLIGHT, "sh", ARCHIL_HELPER], "preflight");
181
209
  if (!pre.ok)
182
210
  return pre;
211
+ // No FUSE device: the mount cannot happen whatever else holds, so that is the one reason given.
212
+ if (/^fuse absent$/m.test(pre.value.output))
213
+ return fail("refused", NO_FUSE);
183
214
  const drift = preflightDrift(pre.value.output, helperSha256());
184
215
  if (pre.value.exitCode !== 0 || drift.length > 0) {
185
216
  return fail("refused", `the computer is not as the Archil image makes it: ${drift.length > 0 ? drift.join("; ") : `the preflight exited ${pre.value.exitCode}`}`);
@@ -207,7 +238,7 @@ export async function archilMount({ root, mount, self: computer, releaseOlder, t
207
238
  return checked;
208
239
  }
209
240
  let verb = force ? "revoke" : "mount";
210
- let took = await step(helper(verb, mount), verb, `${mount.token}\n`);
241
+ let took = await step(helper(verb, mount, egress), verb, `${mount.token}\n`);
211
242
  if (!took.ok)
212
243
  return took;
213
244
  if (verb === "mount" && took.value.exitCode !== 0 && took.value.output.includes(HELD) && twins.length > 0) {
@@ -218,7 +249,7 @@ export async function archilMount({ root, mount, self: computer, releaseOlder, t
218
249
  if (!checked.ok)
219
250
  return checked;
220
251
  verb = "revoke";
221
- took = await step(helper(verb, mount), verb, `${mount.token}\n`);
252
+ took = await step(helper(verb, mount, egress), verb, `${mount.token}\n`);
222
253
  if (!took.ok)
223
254
  return took;
224
255
  }
@@ -87,9 +87,10 @@ export type OrgoWebSocketFactory = (url: string) => OrgoSocket;
87
87
  * line (the prompt, the typed line's echo) is dropped. The marker is printed from two words, so the echo of the line
88
88
  * that prints it never holds it.
89
89
  */
90
- export declare function orgoTerminalChannel({ rest, workspaceId, webSocket, echoMs, }: {
90
+ export declare function orgoTerminalChannel({ rest, workspace, webSocket, echoMs, }: {
91
91
  rest: OrgoRest;
92
- workspaceId: string;
92
+ /** The workspace the computers live in, which an upload names: the provider's, read when first needed. */
93
+ workspace: (signal?: AbortSignal) => Promise<Result<string>>;
93
94
  webSocket?: OrgoWebSocketFactory;
94
95
  /** How long a typed line waits for the shell's echo before it is typed again. */
95
96
  echoMs?: number;
@@ -126,7 +126,7 @@ function frameText(data) {
126
126
  * line (the prompt, the typed line's echo) is dropped. The marker is printed from two words, so the echo of the line
127
127
  * that prints it never holds it.
128
128
  */
129
- export function orgoTerminalChannel({ rest, workspaceId, webSocket = defaultWebSocket, echoMs = 3_000, }) {
129
+ export function orgoTerminalChannel({ rest, workspace, webSocket = defaultWebSocket, echoMs = 3_000, }) {
130
130
  const bash = async (computer, command, timeoutMs, signal) => {
131
131
  const timeout = Math.min(BASH_MAX_S, Math.max(1, Math.ceil(timeoutMs / 1000)));
132
132
  const ran = await rest.request("POST", `/computers/${encodeURIComponent(computer)}/bash`, { body: { command, timeout }, timeoutMs: timeout * 1000 + BASH_PROXY_MS, ...(signal ? { signal } : {}) });
@@ -298,9 +298,12 @@ export function orgoTerminalChannel({ rest, workspaceId, webSocket = defaultWebS
298
298
  const at = path.lastIndexOf("/");
299
299
  if (at < 0 || path.slice(at + 1) === "")
300
300
  return fail("invalid", `an upload goes to an absolute file path, not ${JSON.stringify(path)}`);
301
+ const workspaceId = await workspace(signal);
302
+ if (!workspaceId.ok)
303
+ return workspaceId;
301
304
  const form = new FormData();
302
305
  form.set("file", new Blob([new Uint8Array(bytes)]), path.slice(at + 1));
303
- form.set("workspaceId", workspaceId);
306
+ form.set("workspaceId", workspaceId.value);
304
307
  form.set("desktopId", computer);
305
308
  form.set("destPath", path.slice(0, at) || "/");
306
309
  const put = await rest.request("POST", "/files/upload", { form, timeoutMs, ...(signal ? { signal } : {}) });
@@ -1,6 +1,7 @@
1
1
  import { type OrgoRest } from "./orgo-channel.js";
2
+ import { type OrgoLedger } from "./orgo-names.js";
2
3
  import { type ComputerClient, type DaemonMethod, type DaemonMethods, type Group, type HelloResult } from "./protocol.js";
3
- import { type AttachedComputer, type CallContext, type ComputerCapabilities, type ComputerConnection, type ComputerInfo, type ComputerProvider, type ComputerRef, type ComputerSpec, type CreatedComputer, type NetworkPolicy, type NetworkSpec, type Refusal, type ReleaseHow } from "./provider.js";
4
+ import { type AttachContext, type AttachedComputer, type CallContext, type ComputerCapabilities, type ComputerConnection, type ComputerInfo, type ComputerProvider, type ComputerRef, type ComputerSpec, type CreateContext, type CreatedComputer, type KeyChoice, type NetworkPolicy, type NetworkSpec, type Refusal, type ReleaseContext, type ReleaseHow } from "./provider.js";
4
5
  import { type Result } from "./result.js";
5
6
  import { type ScreenWatch, type ScreenWatchHandlers, type WatchOptions } from "./screen-watch.js";
6
7
  export type OrgoDesktopOs = "windows" | "macos";
@@ -24,8 +25,11 @@ export interface OrgoDesktopOptions {
24
25
  os: OrgoDesktopOs;
25
26
  /** The Orgo API key. Serve passes ORGO_API_KEY's value; the provider never reads the environment or logs it. */
26
27
  apiKey: string;
27
- /** The workspace this deployment's computers live in; the provider lists, attaches and releases only there. */
28
- workspaceId: string;
28
+ /**
29
+ * The workspace this deployment's computers live in; the provider lists, attaches and releases only there. Absent:
30
+ * the key's account's one workspace, read from Orgo when first needed (orgo-workspaces.ts soleWorkspace).
31
+ */
32
+ workspaceId?: string;
29
33
  /** Orgo's API, https; default https://www.orgo.ai/api. */
30
34
  apiUrl?: string;
31
35
  /** For tests: every REST call goes through it. Default the global fetch. */
@@ -35,6 +39,8 @@ export interface OrgoDesktopOptions {
35
39
  timeouts?: Partial<OrgoDesktopTimeouts>;
36
40
  /** The version the computer's hello reports; default the provider's. Only the conformance drift case sets another. */
37
41
  daemonVersion?: string;
42
+ /** Where agents' own computers' labels are kept (the server's computer ledger); default one in this process's memory. */
43
+ ledger?: OrgoLedger;
38
44
  }
39
45
  /** What differs between the two desktops. */
40
46
  interface Profile {
@@ -80,15 +86,17 @@ export declare class OrgoDesktopProvider implements ComputerProvider {
80
86
  #private;
81
87
  readonly id = "orgo";
82
88
  readonly version: string;
83
- constructor({ os, apiKey, workspaceId, apiUrl, fetch, maxLifetimeMs, timeouts, daemonVersion }: OrgoDesktopOptions);
89
+ constructor({ os, apiKey, workspaceId, apiUrl, fetch, maxLifetimeMs, timeouts, daemonVersion, ledger }: OrgoDesktopOptions);
84
90
  /**
85
91
  * daemon none: the provider answers every method over Orgo's API. lifetime janitor: the deadline is in the name, and
86
92
  * on Windows Orgo's end (whole hours) is the backstop. network open alone, never read back from inside: Orgo has no
87
- * egress control and no computerd runs here to probe from inside. release delete alone.
93
+ * egress control and no computerd runs here to probe from inside. release delete. persistence on Windows alone: an
94
+ * agent's computer detaches to its disk (Orgo's stop keeps files, apps and settings, not memory), so it does not
95
+ * resume where it was. A Mac takes no owner: Orgo stops none, so it cannot be detached.
88
96
  */
89
97
  capabilities(): ComputerCapabilities;
90
98
  check(spec: ComputerSpec): Refusal[];
91
- create(spec: ComputerSpec, { signal }?: CallContext): Promise<Result<CreatedComputer>>;
99
+ create(spec: ComputerSpec, context: CreateContext): Promise<Result<CreatedComputer>>;
92
100
  /** The live view: screen.watch on a connection of the watch's own (daemonWatch), the client's polled screenshots. */
93
101
  watch(ref: ComputerRef, handlers: ScreenWatchHandlers, options?: WatchOptions): Promise<Result<ScreenWatch>>;
94
102
  /**
@@ -102,7 +110,7 @@ export declare class OrgoDesktopProvider implements ComputerProvider {
102
110
  id: string;
103
111
  } | {
104
112
  labels: Record<string, string>;
105
- }, { signal }?: CallContext): Promise<Result<AttachedComputer>>;
113
+ }, { signal, claim }?: AttachContext): Promise<Result<AttachedComputer>>;
106
114
  /**
107
115
  * Every computer of this provider in the workspace that carries all of these labels. The run and the epoch are read
108
116
  * from the name, with nothing run in a computer, so a stopped one is listed too; any other label is read from the
@@ -113,10 +121,16 @@ export declare class OrgoDesktopProvider implements ComputerProvider {
113
121
  testConnection(context?: CallContext): Promise<Result<{
114
122
  detail: string;
115
123
  }>>;
124
+ /** Settings' pick of ORGO_WORKSPACE_ID (workspaceId): every workspace the key's account sees, by name. Makes nothing. */
125
+ keyChoices(option: string, { signal }?: CallContext): Promise<Result<KeyChoice[]>>;
116
126
  /** open: what Orgo gives, the one network here; never read from inside, and a change is refused. */
117
127
  network(ref: ComputerRef, policy?: NetworkSpec, { signal }?: CallContext): Promise<Result<NetworkPolicy>>;
118
- /** delete: idempotent, a computer Orgo no longer has is done; it waits until Orgo no longer has it. No stop. */
119
- release(ref: ComputerRef, how: ReleaseHow, { signal }?: CallContext): Promise<Result<void>>;
128
+ /**
129
+ * delete: idempotent, a computer Orgo no longer has is done; it waits until Orgo no longer has it. detach, for an
130
+ * agent's own Windows computer alone: Orgo's stop archives its disk, and it reads frozen. A Mac has no agent's
131
+ * computer to detach (Orgo's stop takes none). No stop: a run's computer is deleted. Either forgets the pointer.
132
+ */
133
+ release(ref: ComputerRef, how: ReleaseHow, { signal, claim }?: ReleaseContext): Promise<Result<void>>;
120
134
  /**
121
135
  * Moves the deadline to now + ttlMs, never earlier and never past the most the labels file holds: Orgo's end first
122
136
  * where there is one, in whole hours with an Idempotency-Key, then the name's, then the labels file. A computer's