@parcha/agentrun-computer 0.1.0-beta.33 → 0.1.0-beta.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +308 -36
- package/dist/browser.d.ts +13 -14
- package/dist/browser.js +22 -17
- package/dist/browserbase.d.ts +3 -3
- package/dist/browserbase.js +16 -11
- package/dist/child.d.ts +2 -0
- package/dist/child.js +13 -2
- package/dist/chrome.d.ts +73 -0
- package/dist/chrome.js +224 -0
- package/dist/computerd-linux-amd64 +0 -0
- package/dist/computerd-linux-arm64 +0 -0
- package/dist/conformance/browserbase.js +1 -1
- package/dist/conformance/cases/gpu.d.ts +2 -0
- package/dist/conformance/cases/gpu.js +108 -0
- package/dist/conformance/cases/health.js +83 -3
- package/dist/conformance/cases/index.js +2 -0
- package/dist/conformance/cases/mount.d.ts +8 -1
- package/dist/conformance/cases/mount.js +4 -3
- package/dist/conformance/cases/provider.js +92 -3
- package/dist/conformance/cli.js +46 -7
- package/dist/conformance/daytona.js +2 -1
- package/dist/conformance/e2b.js +2 -1
- package/dist/conformance/fixture.js +24 -2
- package/dist/conformance/kernel.js +1 -1
- package/dist/conformance/kind.js +2 -1
- package/dist/conformance/local-chrome.d.ts +30 -0
- package/dist/conformance/local-chrome.js +36 -0
- package/dist/conformance/orgo.d.ts +11 -5
- package/dist/conformance/orgo.js +37 -8
- package/dist/conformance/phone-harness.js +2 -1
- package/dist/conformance/report.js +13 -7
- package/dist/conformance/runner.js +68 -18
- package/dist/conformance/types.d.ts +78 -18
- package/dist/conformance/types.js +10 -0
- package/dist/conformance/windows-fixture.d.ts +1 -0
- package/dist/conformance/windows-fixture.js +37 -0
- package/dist/daytona.d.ts +4 -6
- package/dist/daytona.js +97 -52
- package/dist/descriptor.d.ts +94 -0
- package/dist/descriptor.js +81 -0
- package/dist/descriptors/browserbase.d.ts +24 -0
- package/dist/descriptors/browserbase.js +18 -0
- package/dist/descriptors/daytona.d.ts +62 -0
- package/dist/descriptors/daytona.js +49 -0
- package/dist/descriptors/docker.d.ts +12 -0
- package/dist/descriptors/docker.js +17 -0
- package/dist/descriptors/e2b.d.ts +22 -0
- package/dist/descriptors/e2b.js +19 -0
- package/dist/descriptors/index.d.ts +229 -0
- package/dist/descriptors/index.js +19 -0
- package/dist/descriptors/kernel.d.ts +20 -0
- package/dist/descriptors/kernel.js +15 -0
- package/dist/descriptors/local-chrome.d.ts +17 -0
- package/dist/descriptors/local-chrome.js +21 -0
- package/dist/descriptors/modal.d.ts +50 -0
- package/dist/descriptors/modal.js +38 -0
- package/dist/descriptors/orgo.d.ts +88 -0
- package/dist/descriptors/orgo.js +44 -0
- package/dist/descriptors/phone-harness.d.ts +28 -0
- package/dist/descriptors/phone-harness.js +20 -0
- package/dist/descriptors/shared.d.ts +7 -0
- package/dist/descriptors/shared.js +6 -0
- package/dist/desktop.d.ts +4 -4
- package/dist/desktop.js +4 -4
- package/dist/docker/egress.d.ts +1 -1
- package/dist/docker/image.js +17 -15
- package/dist/docker/inspect.d.ts +147 -0
- package/dist/docker/inspect.js +335 -0
- package/dist/docker.d.ts +6 -4
- package/dist/docker.js +53 -41
- package/dist/drift.d.ts +6 -146
- package/dist/drift.js +14 -334
- package/dist/e2b.d.ts +2 -6
- package/dist/e2b.js +19 -22
- package/dist/index.d.ts +9 -10
- package/dist/index.js +14 -10
- package/dist/isolation.d.ts +0 -2
- package/dist/isolation.js +2 -18
- package/dist/janitor.d.ts +18 -1
- package/dist/janitor.js +67 -19
- package/dist/kernel.d.ts +3 -3
- package/dist/kernel.js +19 -14
- package/dist/kinds.d.ts +56 -30
- package/dist/kinds.js +19 -97
- package/dist/labels.d.ts +18 -0
- package/dist/labels.js +65 -2
- package/dist/local-chrome.d.ts +86 -0
- package/dist/local-chrome.js +475 -0
- package/dist/local-supervisor.d.ts +51 -0
- package/dist/local-supervisor.js +221 -0
- package/dist/modal.d.ts +15 -7
- package/dist/modal.js +83 -39
- package/dist/mount-archil.js +4 -4
- package/dist/orgo-channel.js +16 -13
- package/dist/orgo-desktop.d.ts +153 -0
- package/dist/orgo-desktop.js +1614 -0
- package/dist/orgo-names.d.ts +52 -0
- package/dist/orgo-names.js +84 -0
- package/dist/orgo.d.ts +18 -13
- package/dist/orgo.js +54 -128
- package/dist/phone-harness.d.ts +4 -8
- package/dist/phone-harness.js +48 -46
- package/dist/protocol.d.ts +20 -0
- package/dist/protocol.js +9 -0
- package/dist/provider.d.ts +151 -10
- package/dist/provider.js +70 -0
- package/dist/providers.d.ts +22 -17
- package/dist/providers.js +14 -16
- package/dist/result.d.ts +11 -1
- package/dist/result.js +11 -0
- package/dist/test-connection.js +2 -2
- package/package.json +42 -2
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
import type { MountKind, MountSpec } from "../mount.js";
|
|
2
|
-
import type { ComputerClient, ComputerKind, DaemonMethod, DaemonMethods, ExecRunParams, Group, HelloResult } from "../protocol.js";
|
|
3
|
-
import type { ComputerConnection, ComputerProvider, ComputerRef, ComputerSpec, DaemonMode } from "../provider.js";
|
|
2
|
+
import type { ComputerClient, ComputerKind, ComputerOs, DaemonMethod, DaemonMethods, ExecRunParams, Group, HelloResult, NetworkFence } from "../protocol.js";
|
|
3
|
+
import type { ComputerConnection, ComputerProvider, ComputerRef, ComputerSpec, DaemonMode, GpuSpec } from "../provider.js";
|
|
4
4
|
import type { ComputerError, ComputerErrorCode, Result } from "../result.js";
|
|
5
|
-
import type { ComputerSettingKind } from "../kinds.js";
|
|
5
|
+
import type { ComputerSettingKind, KindCapabilities } from "../kinds.js";
|
|
6
6
|
import type { CdpDialer, CdpSocket } from "./cdp.js";
|
|
7
7
|
import type { StartedFixture } from "./fixture.js";
|
|
8
8
|
import type { KindVerdict } from "./kind.js";
|
|
9
9
|
/** Core: what a computer of its kind must do. Full: an optional capability, tested only where it is declared. */
|
|
10
10
|
export type Level = "core" | "full";
|
|
11
11
|
/** The suite's own grouping of its cases, the first part of each case id; not the protocol's Group. */
|
|
12
|
-
export type CaseGroup = "health" | "exec" | "files" | "process" | "provider" | "drift" | "isolation" | "mount" | "screen" | "input" | "touch" | "apps" | "lifetime" | "browser";
|
|
12
|
+
export type CaseGroup = "health" | "exec" | "files" | "process" | "provider" | "drift" | "isolation" | "mount" | "screen" | "input" | "touch" | "apps" | "lifetime" | "browser" | "gpu";
|
|
13
13
|
/**
|
|
14
14
|
* What a case needs: a group (declared by both the provider's capabilities().groups and the computer's hello), a
|
|
15
15
|
* network the provider declares, the janitor as the keeper of deadlines, a spec.user the provider takes, a release that
|
|
16
|
-
* stops a computer and keeps it,
|
|
17
|
-
* (extend, stream), declared by being there,
|
|
18
|
-
* by capabilities().vendorAgentPorts, an empty list
|
|
16
|
+
* stops a computer and keeps it, an agent's persistent computer (capabilities().persistence), a mount kind
|
|
17
|
+
* capabilities().mount declares, a provider method that is optional (extend, stream), declared by being there, the
|
|
18
|
+
* ports of a vendor's agent in the computer (vendor-agent: declared by capabilities().vendorAgentPorts, an empty list
|
|
19
|
+
* included), a secret the provider takes (secrets: declared by the run's planted provider, which its conformance
|
|
20
|
+
* module's ENV makes possible), or GPUs (gpu: declared by capabilities().gpu).
|
|
19
21
|
*/
|
|
20
|
-
export type Capability = Group | "network:none" | "network:open" | "network:allow" | "lifetime:janitor" | "user:root" | "user:uid" | "release:stop" | "mount:bind" | "mount:archil" | "extend" | "stream" | "vendor-agent";
|
|
22
|
+
export type Capability = Group | "network:none" | "network:open" | "network:allow" | "lifetime:janitor" | "user:root" | "user:uid" | "release:stop" | "persistence" | "mount:bind" | "mount:archil" | "extend" | "stream" | "vendor-agent" | "secrets" | "gpu";
|
|
21
23
|
/**
|
|
22
24
|
* A fresh run's folder for one mount kind, made by the provider's conformance module: the mount that reaches it, and its
|
|
23
25
|
* outside, where a computer does not run (the folder on the host for a bind, the disk's file API for Archil).
|
|
@@ -86,8 +88,14 @@ export interface CaseContext {
|
|
|
86
88
|
dir(): Promise<string>;
|
|
87
89
|
/** The same provider with a daemon that reports another version; skips the case when none was given. */
|
|
88
90
|
drifted(): Promise<ComputerProvider>;
|
|
91
|
+
/** What the provider declares of itself (ConformanceOptions.declared); undefined when the run was given none. */
|
|
92
|
+
readonly declared: readonly KindCapabilities[] | undefined;
|
|
93
|
+
/** The provider built with planted secrets (ConformanceOptions.planted); skips the case when none was given. */
|
|
94
|
+
planted(): Promise<PlantedProvider>;
|
|
89
95
|
/** A fresh run's folder for this mount kind, closed when the case ends; skips the case when the run can make none. */
|
|
90
96
|
runFolder(kind: MountKind): Promise<RunFolder>;
|
|
97
|
+
/** The GPU the run pays for (options.gpu, the CLI's --gpu); skips the case when the run names none. */
|
|
98
|
+
gpu(): GpuSpec;
|
|
91
99
|
/**
|
|
92
100
|
* Starts the run's fixture in the case's computer and waits until it is up: an app that logs each input event it
|
|
93
101
|
* gets, so a case checks what an action did with no model. It is stopped when the case ends. Skips the case when the
|
|
@@ -134,8 +142,16 @@ export interface Case {
|
|
|
134
142
|
computer?: "shared" | "fresh" | "none";
|
|
135
143
|
/** The longest this case may run, when it needs longer than the run's default. */
|
|
136
144
|
timeoutMs?: number;
|
|
145
|
+
/**
|
|
146
|
+
* The systems the case's body is written for. Absent: any, but a case that needs exec or processes runs POSIX
|
|
147
|
+
* programs (sh, id, /proc) and is Linux's alone, and one that needs files names POSIX paths (/tmp) and is no Windows
|
|
148
|
+
* computer's (caseOs). A computer of another os skips it in words.
|
|
149
|
+
*/
|
|
150
|
+
os?: readonly ComputerOs[];
|
|
137
151
|
run(t: CaseContext): Promise<void>;
|
|
138
152
|
}
|
|
153
|
+
/** The systems a case runs on: its own os; else Linux alone for one that runs programs, any but Windows for one that names paths. */
|
|
154
|
+
export declare function caseOs(c: Pick<Case, "os" | "needs">): readonly ComputerOs[] | undefined;
|
|
139
155
|
export interface CaseResult {
|
|
140
156
|
id: string;
|
|
141
157
|
level: Level;
|
|
@@ -144,9 +160,14 @@ export interface CaseResult {
|
|
|
144
160
|
reason?: string;
|
|
145
161
|
/**
|
|
146
162
|
* On a skip: the needs that were not declared and are optional for this kind of computer. A Core case skipped for
|
|
147
|
-
* these does not fail Core; any other skip of a Core case does
|
|
163
|
+
* these does not fail Core; any other skip of a Core case does, but one for `os`.
|
|
148
164
|
*/
|
|
149
165
|
undeclared?: Capability[];
|
|
166
|
+
/**
|
|
167
|
+
* On a skip: the systems the case is written for (Case.os, caseOs), none of them this computer's. A Core case skipped
|
|
168
|
+
* for this is not this computer's to pass or fail, so it does not fail Core; its reason stays in the report.
|
|
169
|
+
*/
|
|
170
|
+
os?: readonly string[];
|
|
150
171
|
/** What the case saw and recorded without asserting it (CaseContext.observe); absent when nothing. */
|
|
151
172
|
observed?: string[];
|
|
152
173
|
}
|
|
@@ -158,12 +179,12 @@ export interface ConformanceReport {
|
|
|
158
179
|
kind: ComputerKind;
|
|
159
180
|
daemonMode: DaemonMode;
|
|
160
181
|
image: string;
|
|
161
|
-
/**
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
182
|
+
/**
|
|
183
|
+
* What each computer of the run said in its first hello, one entry per computer in the order they answered, each
|
|
184
|
+
* naming the computer and its role, with the fence its programs are held behind when it says one; empty when no
|
|
185
|
+
* computer answered. Computers of one run may differ: a GPU computer's fence is not the run's computer's.
|
|
186
|
+
*/
|
|
187
|
+
daemons: ComputerDaemon[];
|
|
167
188
|
/** The groups or case ids the run was limited to, when it was. */
|
|
168
189
|
only?: string[];
|
|
169
190
|
/** When only or kind was given: the Core cases it left out, which did not run. */
|
|
@@ -193,9 +214,10 @@ export interface ConformanceReport {
|
|
|
193
214
|
notes?: string[];
|
|
194
215
|
/**
|
|
195
216
|
* What create's read-back recorded of each computer the run made that does not refuse it (a probe target that
|
|
196
|
-
* accepted and sent nothing back), one entry per note, naming the computer, in the order they came;
|
|
217
|
+
* accepted and sent nothing back), one entry per note, naming the computer and its role, in the order they came;
|
|
218
|
+
* absent when none.
|
|
197
219
|
*/
|
|
198
|
-
computerNotes?:
|
|
220
|
+
computerNotes?: CreatedNote[];
|
|
199
221
|
/**
|
|
200
222
|
* What the provider said through its onNote option during the run (a release that did not let an Archil folder go
|
|
201
223
|
* cleanly), naming the computer, in the order it came: no failure of any case. The CLI gives the option and fills
|
|
@@ -203,11 +225,34 @@ export interface ConformanceReport {
|
|
|
203
225
|
*/
|
|
204
226
|
providerNotes?: ComputerNote[];
|
|
205
227
|
}
|
|
206
|
-
/** One note a
|
|
228
|
+
/** One note about a computer: the computer's name and the note's words. */
|
|
207
229
|
export interface ComputerNote {
|
|
208
230
|
computer: string;
|
|
209
231
|
note: string;
|
|
210
232
|
}
|
|
233
|
+
/**
|
|
234
|
+
* What a computer is for in a run: "shared", the run's computer, which the cases that need no computer of their own
|
|
235
|
+
* share; else the id of the case that made it.
|
|
236
|
+
*/
|
|
237
|
+
export type ComputerRole = string;
|
|
238
|
+
/** One note a create returned: the computer, its role, and the note's words. */
|
|
239
|
+
export interface CreatedNote extends ComputerNote {
|
|
240
|
+
role: ComputerRole;
|
|
241
|
+
}
|
|
242
|
+
/** What one computer's first hello said: the computer, its role, and the fence when it names one. */
|
|
243
|
+
export interface ComputerDaemon {
|
|
244
|
+
computer: string;
|
|
245
|
+
role: ComputerRole;
|
|
246
|
+
version: string;
|
|
247
|
+
os: string;
|
|
248
|
+
arch: string;
|
|
249
|
+
fence?: NetworkFence;
|
|
250
|
+
}
|
|
251
|
+
/** A provider built with planted secrets, and the values planted: none of them may show in anything it answers. */
|
|
252
|
+
export interface PlantedProvider {
|
|
253
|
+
provider: ComputerProvider;
|
|
254
|
+
secrets: string[];
|
|
255
|
+
}
|
|
211
256
|
export interface ConformanceOptions {
|
|
212
257
|
/** The image every computer of the run starts from. */
|
|
213
258
|
image: string;
|
|
@@ -223,6 +268,16 @@ export interface ConformanceOptions {
|
|
|
223
268
|
cases?: Case[];
|
|
224
269
|
/** The same provider with a daemon that reports another version, for the drift cases. */
|
|
225
270
|
drifted?: () => Promise<ComputerProvider> | ComputerProvider;
|
|
271
|
+
/**
|
|
272
|
+
* What the provider declares of itself, each configuration's kind and groups, for health.declared: its descriptor
|
|
273
|
+
* (until the descriptor lands, its PROVIDERS entry, or its module's CAPABILITIES). Without it, that case skips.
|
|
274
|
+
*/
|
|
275
|
+
declared?: readonly KindCapabilities[];
|
|
276
|
+
/**
|
|
277
|
+
* The same provider built with a planted value in place of each of its secrets (an API key, a token), and those
|
|
278
|
+
* values, for health.no-key-in-errors. Without it (a provider that takes no secret), that case skips.
|
|
279
|
+
*/
|
|
280
|
+
planted?: () => Promise<PlantedProvider> | PlantedProvider;
|
|
226
281
|
/**
|
|
227
282
|
* A fresh run's folder for a mount kind, for the mount cases: the provider's conformance module makes it (a folder on
|
|
228
283
|
* the Docker host for a bind), or gives undefined for a kind it cannot make. Without it, those cases skip in words.
|
|
@@ -243,6 +298,11 @@ export interface ConformanceOptions {
|
|
|
243
298
|
* fixture APK for an Android phone. Without it those cases skip, and Core cannot pass where kind requires them.
|
|
244
299
|
*/
|
|
245
300
|
fixture?: string;
|
|
301
|
+
/**
|
|
302
|
+
* The GPU the gpu case asks for: a type the provider declares and a count. A GPU bills by the second, so the run names
|
|
303
|
+
* the one it pays for; without it the case skips in words.
|
|
304
|
+
*/
|
|
305
|
+
gpu?: GpuSpec;
|
|
246
306
|
/** fetch for screen.stream; default the global one. */
|
|
247
307
|
fetch?: CaseContext["fetch"];
|
|
248
308
|
/** How the browser cases open a CDP socket; default a WebSocket (dialCdp). Tests give a fake browser's. */
|
|
@@ -22,3 +22,13 @@ export function coreGroups(kind, daemon) {
|
|
|
22
22
|
return computerd;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
+
/** The systems a case runs on: its own os; else Linux alone for one that runs programs, any but Windows for one that names paths. */
|
|
26
|
+
export function caseOs(c) {
|
|
27
|
+
if (c.os !== undefined)
|
|
28
|
+
return c.os;
|
|
29
|
+
if (c.needs.some((need) => need === "exec" || need === "processes"))
|
|
30
|
+
return ["linux"];
|
|
31
|
+
if (c.needs.includes("files"))
|
|
32
|
+
return ["linux", "macos", "android", "ios"];
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const WINDOWS_FIXTURE: string;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// The desktop fixture on Windows, where computerd-fixture (an X11 binary) cannot run: a PowerShell script that makes the
|
|
2
|
+
// same window (200x200 at (0, 0), borderless, on top, in the four FIXTURE_COLORS by quadrant) with Windows Forms, and
|
|
3
|
+
// logs what it gets as computerd-fixture does, one JSON object a line (FixtureEvent), to the file its argument names.
|
|
4
|
+
// Its ready line also carries its pid, which the case stops it by. It runs in a single-threaded apartment (-STA), as
|
|
5
|
+
// Windows Forms needs. UTF-8 with no byte order mark, so the log's first line parses as the rest do.
|
|
6
|
+
export const WINDOWS_FIXTURE = [
|
|
7
|
+
"# agentrun-computer: windows-fixture",
|
|
8
|
+
"param([Parameter(Mandatory = $true)][string]$Log)",
|
|
9
|
+
"$ErrorActionPreference = 'Stop'",
|
|
10
|
+
"Add-Type -AssemblyName System.Windows.Forms, System.Drawing",
|
|
11
|
+
"$utf8 = New-Object System.Text.UTF8Encoding($false)",
|
|
12
|
+
"function Say($o) { [IO.File]::AppendAllText($Log, ($o | ConvertTo-Json -Compress) + \"`n\", $utf8) }",
|
|
13
|
+
"function ButtonOf($b) { switch ($b) { 'Right' { 'right' } 'Middle' { 'middle' } default { 'left' } } }",
|
|
14
|
+
"$f = New-Object System.Windows.Forms.Form",
|
|
15
|
+
"$f.FormBorderStyle = 'None'",
|
|
16
|
+
"$f.StartPosition = 'Manual'",
|
|
17
|
+
"$f.Location = New-Object System.Drawing.Point(0, 0)",
|
|
18
|
+
"$f.ClientSize = New-Object System.Drawing.Size(200, 200)",
|
|
19
|
+
"$f.TopMost = $true",
|
|
20
|
+
"$f.ShowInTaskbar = $false",
|
|
21
|
+
"$f.KeyPreview = $true",
|
|
22
|
+
"$f.add_Paint({",
|
|
23
|
+
" param($s, $e)",
|
|
24
|
+
" $e.Graphics.FillRectangle([System.Drawing.Brushes]::Red, 0, 0, 100, 100)",
|
|
25
|
+
" $e.Graphics.FillRectangle((New-Object System.Drawing.SolidBrush([System.Drawing.Color]::FromArgb(0, 255, 0))), 100, 0, 100, 100)",
|
|
26
|
+
" $e.Graphics.FillRectangle((New-Object System.Drawing.SolidBrush([System.Drawing.Color]::FromArgb(0, 0, 255))), 0, 100, 100, 100)",
|
|
27
|
+
" $e.Graphics.FillRectangle((New-Object System.Drawing.SolidBrush([System.Drawing.Color]::FromArgb(255, 255, 0))), 100, 100, 100, 100)",
|
|
28
|
+
"})",
|
|
29
|
+
"$f.add_MouseDown({ param($s, $e) Say @{ event = 'down'; button = (ButtonOf $e.Button); at = @($e.X, $e.Y) } })",
|
|
30
|
+
"$f.add_MouseUp({ param($s, $e) Say @{ event = 'up'; button = (ButtonOf $e.Button); at = @($e.X, $e.Y) } })",
|
|
31
|
+
"$f.add_MouseWheel({ param($s, $e) Say @{ event = 'wheel'; at = @($e.X, $e.Y); dx = 0; dy = [int](-$e.Delta / 120) } })",
|
|
32
|
+
"$f.add_KeyDown({ param($s, $e) Say @{ event = 'key'; key = $e.KeyCode.ToString().ToLower(); down = $true } })",
|
|
33
|
+
"$f.add_KeyUp({ param($s, $e) Say @{ event = 'key'; key = $e.KeyCode.ToString().ToLower(); down = $false } })",
|
|
34
|
+
"$f.add_KeyPress({ param($s, $e) if (-not [char]::IsControl($e.KeyChar)) { Say @{ event = 'text'; text = [string]$e.KeyChar } } })",
|
|
35
|
+
"$f.add_Shown({ $f.Activate(); Say @{ event = 'ready'; pid = $PID } })",
|
|
36
|
+
"[System.Windows.Forms.Application]::Run($f)",
|
|
37
|
+
].join("\r\n");
|
package/dist/daytona.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { KindCapabilities } from "./kinds.js";
|
|
2
2
|
import { type MountKind } from "./mount.js";
|
|
3
3
|
import { type ProviderNote } from "./mount-archil.js";
|
|
4
|
-
import { type AttachedComputer, type CallContext, type ComputerCapabilities, type ComputerConnection, type ComputerInfo, type ComputerProvider, type ComputerRef, type ComputerSpec, type NetworkPolicy, type NetworkSpec, type Refusal } from "./provider.js";
|
|
4
|
+
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";
|
|
5
5
|
import { type Result } from "./result.js";
|
|
6
6
|
import { type ScreenWatch, type ScreenWatchHandlers, type WatchOptions } from "./screen-watch.js";
|
|
7
7
|
/** The longest each kind of call may take, and the pauses between polls and retries. */
|
|
@@ -87,7 +87,7 @@ export interface DaytonaProviderOptions {
|
|
|
87
87
|
* the toolbox, from a snapshot of box/Dockerfile, with the daemon user agentrun-tool (daemonUser "2510:2510").
|
|
88
88
|
*/
|
|
89
89
|
export declare const MOUNT: readonly MountKind[];
|
|
90
|
-
/** The machine kind and
|
|
90
|
+
/** The machine kind, groups and GPUs of its one configuration (its descriptor's): a linux computer, with GPUs when asked. */
|
|
91
91
|
export declare const CAPABILITIES: readonly KindCapabilities[];
|
|
92
92
|
/** What create() takes: the provider's options, the daemon optional (default this package's build for the arch). */
|
|
93
93
|
export type DaytonaCreateOptions = Omit<DaytonaProviderOptions, "daemonPath"> & {
|
|
@@ -101,8 +101,6 @@ export type DaytonaCreateOptions = Omit<DaytonaProviderOptions, "daemonPath"> &
|
|
|
101
101
|
export declare function create(options: DaytonaCreateOptions): DaytonaProvider;
|
|
102
102
|
/** The conformance CLI's module for Daytona: the run's idle stop and auto-delete, its snapshot, notes and drifted twin. */
|
|
103
103
|
export declare const conformance: () => Promise<typeof import("./conformance/daytona.js")>;
|
|
104
|
-
/** The image that asks for Daytona's default snapshot: the create sends no snapshot field. */
|
|
105
|
-
export declare const DAYTONA_DEFAULT_SNAPSHOT = "default";
|
|
106
104
|
/**
|
|
107
105
|
* The three commands the provider sends into a sandbox, exactly: install (through /process/execute), init and stdio
|
|
108
106
|
* (each a session command), the child daemon's commands (childCommands). Exported so a test can run them where Daytona
|
|
@@ -137,7 +135,7 @@ export declare class DaytonaProvider implements ComputerProvider {
|
|
|
137
135
|
check(spec: ComputerSpec): Refusal[];
|
|
138
136
|
create(spec: ComputerSpec, { signal }?: {
|
|
139
137
|
signal?: AbortSignal;
|
|
140
|
-
}): Promise<Result<
|
|
138
|
+
}): Promise<Result<CreatedComputer>>;
|
|
141
139
|
/** The live view: screen.watch on a connection of the watch's own (daemonWatch); a sandbox has no screen. */
|
|
142
140
|
watch(ref: ComputerRef, handlers: ScreenWatchHandlers, options?: WatchOptions): Promise<Result<ScreenWatch>>;
|
|
143
141
|
connect(ref: ComputerRef): Promise<Result<ComputerConnection>>;
|
|
@@ -176,5 +174,5 @@ export declare class DaytonaProvider implements ComputerProvider {
|
|
|
176
174
|
* Daytona answers a delete or a stop before the sandbox is gone or stopped, and its listing trails both: release
|
|
177
175
|
* returns once Daytona reads the computer as release left it, or fails naming the last state it read.
|
|
178
176
|
*/
|
|
179
|
-
release(ref: ComputerRef, how:
|
|
177
|
+
release(ref: ComputerRef, how: ReleaseHow, { signal }?: CallContext): Promise<Result<void>>;
|
|
180
178
|
}
|