@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.
- package/NOTICE +2 -0
- package/README.md +423 -323
- package/box/Dockerfile +3 -1
- package/box/agentrun-archil +59 -7
- package/box/build-agent37.mjs +177 -0
- package/box/build-daytona.py +20 -4
- package/dist/agent37.d.ts +165 -0
- package/dist/agent37.js +759 -0
- package/dist/attach.d.ts +146 -0
- package/dist/attach.js +469 -0
- package/dist/browser.d.ts +61 -10
- package/dist/browser.js +125 -3
- package/dist/browserbase.d.ts +46 -23
- package/dist/browserbase.js +162 -17
- package/dist/chrome.d.ts +3 -4
- package/dist/chrome.js +6 -11
- package/dist/client.d.ts +33 -1
- package/dist/client.js +53 -0
- package/dist/computerd-linux-amd64 +0 -0
- package/dist/computerd-linux-arm64 +0 -0
- package/dist/conformance/agent37.d.ts +96 -0
- package/dist/conformance/agent37.js +154 -0
- package/dist/conformance/cases/apps.d.ts +5 -0
- package/dist/conformance/cases/apps.js +160 -73
- package/dist/conformance/cases/health.js +14 -0
- package/dist/conformance/cases/index.js +2 -0
- package/dist/conformance/cases/provider.js +27 -1
- package/dist/conformance/cases/screen.d.ts +3 -0
- package/dist/conformance/cases/screen.js +18 -0
- package/dist/conformance/cases/settings.d.ts +29 -23
- package/dist/conformance/cases/settings.js +76 -58
- package/dist/conformance/cases/touch.js +19 -17
- package/dist/conformance/cases/ui.d.ts +2 -0
- package/dist/conformance/cases/ui.js +475 -0
- package/dist/conformance/cli.d.ts +9 -0
- package/dist/conformance/cli.js +28 -3
- package/dist/conformance/daytona.d.ts +4 -0
- package/dist/conformance/daytona.js +5 -0
- package/dist/conformance/e2b.d.ts +6 -0
- package/dist/conformance/e2b.js +9 -2
- package/dist/conformance/fixture.d.ts +1 -1
- package/dist/conformance/fixture.js +25 -1
- package/dist/conformance/modal.d.ts +17 -13
- package/dist/conformance/modal.js +18 -9
- package/dist/conformance/orgo.d.ts +3 -3
- package/dist/conformance/orgo.js +6 -8
- package/dist/conformance/phone-harness.d.ts +6 -2
- package/dist/conformance/phone-harness.js +21 -4
- package/dist/conformance/report.js +1 -1
- package/dist/conformance/runner.js +23 -4
- package/dist/conformance/sweep.d.ts +50 -0
- package/dist/conformance/sweep.js +187 -0
- package/dist/conformance/types.d.ts +11 -3
- package/dist/conformance/ui-fixture.d.ts +56 -0
- package/dist/conformance/ui-fixture.js +43 -0
- package/dist/create-requests.d.ts +51 -0
- package/dist/create-requests.js +121 -0
- package/dist/daytona.d.ts +15 -5
- package/dist/daytona.js +58 -38
- package/dist/descriptor.d.ts +29 -2
- package/dist/descriptor.js +13 -0
- package/dist/descriptors/agent37.d.ts +41 -0
- package/dist/descriptors/agent37.js +28 -0
- package/dist/descriptors/browserbase.d.ts +1 -0
- package/dist/descriptors/browserbase.js +2 -0
- package/dist/descriptors/daytona.d.ts +23 -2
- package/dist/descriptors/daytona.js +34 -2
- package/dist/descriptors/index.d.ts +66 -3
- package/dist/descriptors/index.js +5 -3
- package/dist/descriptors/kernel.d.ts +1 -0
- package/dist/descriptors/kernel.js +2 -0
- package/dist/descriptors/modal.d.ts +4 -0
- package/dist/descriptors/modal.js +11 -1
- package/dist/descriptors/orgo.d.ts +13 -1
- package/dist/descriptors/orgo.js +9 -3
- package/dist/descriptors/phone-harness.d.ts +6 -1
- package/dist/descriptors/phone-harness.js +5 -2
- package/dist/docker/egress.d.ts +4 -3
- package/dist/docker/egress.js +7 -6
- package/dist/docker.d.ts +7 -4
- package/dist/docker.js +278 -34
- package/dist/e2b.d.ts +9 -165
- package/dist/e2b.js +282 -1342
- package/dist/fake-ui-driver.d.ts +97 -0
- package/dist/fake-ui-driver.js +717 -0
- package/dist/host.d.ts +182 -0
- package/dist/host.js +1 -0
- package/dist/hosted/process.d.ts +67 -0
- package/dist/hosted/process.js +228 -0
- package/dist/hosted/provider.d.ts +146 -0
- package/dist/hosted/provider.js +1364 -0
- package/dist/hosted/scripts.d.ts +76 -0
- package/dist/{child.js → hosted/scripts.js} +93 -12
- package/dist/index.d.ts +11 -7
- package/dist/index.js +10 -7
- package/dist/janitor.d.ts +5 -4
- package/dist/janitor.js +1 -1
- package/dist/kernel.d.ts +17 -27
- package/dist/kernel.js +94 -18
- package/dist/kinds.d.ts +17 -5
- package/dist/kinds.js +20 -4
- package/dist/labels.d.ts +10 -2
- package/dist/labels.js +30 -7
- package/dist/local-chrome.d.ts +5 -5
- package/dist/local-chrome.js +10 -5
- package/dist/modal.d.ts +23 -181
- package/dist/modal.js +273 -1232
- package/dist/mount-archil.d.ts +25 -3
- package/dist/mount-archil.js +39 -8
- package/dist/orgo-channel.d.ts +3 -2
- package/dist/orgo-channel.js +5 -2
- package/dist/orgo-desktop.d.ts +23 -9
- package/dist/orgo-desktop.js +328 -66
- package/dist/orgo-names.d.ts +129 -3
- package/dist/orgo-names.js +211 -8
- package/dist/orgo-workspaces.d.ts +47 -0
- package/dist/orgo-workspaces.js +94 -0
- package/dist/orgo.d.ts +27 -10
- package/dist/orgo.js +411 -81
- package/dist/phone-harness.d.ts +31 -21
- package/dist/phone-harness.js +510 -681
- package/dist/png.d.ts +4 -0
- package/dist/png.js +27 -0
- package/dist/protocol.d.ts +338 -30
- package/dist/protocol.js +96 -3
- package/dist/provider.d.ts +97 -7
- package/dist/provider.js +24 -3
- package/dist/result.d.ts +1 -1
- package/dist/surface/api.d.ts +248 -0
- package/dist/surface/api.js +1 -0
- package/dist/surface/core.d.ts +42 -0
- package/dist/surface/core.js +393 -0
- package/dist/surface/index.d.ts +5 -0
- package/dist/surface/index.js +3 -0
- package/dist/surface/outline.d.ts +8 -0
- package/dist/surface/outline.js +50 -0
- package/dist/surface/script.d.ts +10 -0
- package/dist/surface/script.js +92 -0
- package/dist/ui-engine.d.ts +114 -0
- package/dist/ui-engine.js +798 -0
- package/package.json +17 -1
- package/dist/child.d.ts +0 -42
- package/dist/conformance/e2b-diagnose.d.ts +0 -16
- package/dist/conformance/e2b-diagnose.js +0 -61
- package/dist/conformance/e2b-sweep.d.ts +0 -18
- package/dist/conformance/e2b-sweep.js +0 -132
- package/dist/conformance/modal-sweep.d.ts +0 -22
- package/dist/conformance/modal-sweep.js +0 -213
package/dist/phone-harness.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { Duplex } from "node:stream";
|
|
1
2
|
import type { KindCapabilities } from "./kinds.js";
|
|
2
3
|
import type { MountKind } from "./mount.js";
|
|
3
|
-
import { type
|
|
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";
|
|
4
|
+
import { type AttachedComputer, 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 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 phone harness's API. */
|
|
@@ -16,8 +16,10 @@ export declare const DEFAULT_MAX_LIFETIME_MS: number;
|
|
|
16
16
|
export declare const DEFAULT_READY_MS = 240000;
|
|
17
17
|
/** One phone this provider made, as its ledger keeps it. */
|
|
18
18
|
export interface PhoneLedgerEntry {
|
|
19
|
-
/** The session's id, the computer's id
|
|
19
|
+
/** The session's id, the computer's id. */
|
|
20
20
|
id: string;
|
|
21
|
+
/** The computer's name, its request's (computerNameFor): a create of the same request finds the phone by it. */
|
|
22
|
+
name: string;
|
|
21
23
|
labels: Record<string, string>;
|
|
22
24
|
/** The image create was asked for, read back as asked. */
|
|
23
25
|
image: string;
|
|
@@ -39,6 +41,8 @@ export interface PhoneLedgerEntry {
|
|
|
39
41
|
/** Where the provider keeps its phones' labels: the vendor keeps none. Each call may be sync or async. */
|
|
40
42
|
export interface PhoneLedger {
|
|
41
43
|
put(entry: PhoneLedgerEntry): void | Promise<void>;
|
|
44
|
+
/** entry put only while the ledger holds none under its id, in one step (two writers never both put it): whether it was. */
|
|
45
|
+
claim(entry: PhoneLedgerEntry): boolean | Promise<boolean>;
|
|
42
46
|
get(id: string): PhoneLedgerEntry | undefined | Promise<PhoneLedgerEntry | undefined>;
|
|
43
47
|
list(): PhoneLedgerEntry[] | Promise<PhoneLedgerEntry[]>;
|
|
44
48
|
remove(id: string): void | Promise<void>;
|
|
@@ -76,6 +80,16 @@ export interface AdbTransport {
|
|
|
76
80
|
timeoutMs: number;
|
|
77
81
|
transport?: string;
|
|
78
82
|
}): Promise<Result<string>>;
|
|
83
|
+
/**
|
|
84
|
+
* A service of the phone on transport (exec:<command>) as a stream both ways: the adb server's socket, bound to the
|
|
85
|
+
* phone and then to the service, which carries the command's stdin and stdout raw once both answered OKAY. How phoned
|
|
86
|
+
* is started and spoken to. The stream comes paused, so nothing is lost before the caller listens: it resumes it. The
|
|
87
|
+
* words never hold the service.
|
|
88
|
+
*/
|
|
89
|
+
open(service: string, options: {
|
|
90
|
+
timeoutMs: number;
|
|
91
|
+
transport: string;
|
|
92
|
+
}): Promise<Result<Duplex>>;
|
|
79
93
|
}
|
|
80
94
|
/** The adb server's port when none is given: adb's own default. */
|
|
81
95
|
export declare const ADB_SERVER_PORT = 5037;
|
|
@@ -125,8 +139,15 @@ export interface PhoneProviderOptions {
|
|
|
125
139
|
sleep?: (ms: number) => Promise<void>;
|
|
126
140
|
/** A signal that fires after ms, which bounds a request; default AbortSignal.timeout. Tests give one they fire. */
|
|
127
141
|
timeout?: (ms: number) => AbortSignal;
|
|
128
|
-
/** The version
|
|
142
|
+
/** The version phoned's hello must report; default the provider's own. Only the conformance drift case sets another. */
|
|
129
143
|
daemonVersion?: string;
|
|
144
|
+
/** phoned, the phone's driver, as its jar (npm run build:phoned); default this package's dist/phoned.jar. */
|
|
145
|
+
phoned?: string;
|
|
146
|
+
/**
|
|
147
|
+
* APK files installed on each phone before phoned starts there (`pm install -r`), as the conformance run installs the
|
|
148
|
+
* ui fixture (npm run build:ui-fixture). Default none. A connect that cannot install one fails in words.
|
|
149
|
+
*/
|
|
150
|
+
apks?: string[];
|
|
130
151
|
}
|
|
131
152
|
/** The phone-harness provider from its options alone; throws in words when one is missing or wrong. */
|
|
132
153
|
export declare function create(options: PhoneProviderOptions): Promise<PhoneHarnessProvider>;
|
|
@@ -139,9 +160,12 @@ export declare class PhoneHarnessProvider implements ComputerProvider {
|
|
|
139
160
|
constructor(options: PhoneProviderOptions);
|
|
140
161
|
capabilities(): ComputerCapabilities;
|
|
141
162
|
check(spec: ComputerSpec): Refusal[];
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
163
|
+
/**
|
|
164
|
+
* Makes a phone, once per request (provider.md, Idempotent create): context.requestId names it (computerNameFor) and
|
|
165
|
+
* gives the POST's Idempotency-Key. A request whose phone the ledger holds answers that phone once it is ready; one
|
|
166
|
+
* released is refused exists; a create of a request in flight here waits for the first (CreateRequests).
|
|
167
|
+
*/
|
|
168
|
+
create(spec: ComputerSpec, context: CreateContext): Promise<Result<CreatedComputer>>;
|
|
145
169
|
attach(ref: {
|
|
146
170
|
id: string;
|
|
147
171
|
} | {
|
|
@@ -165,17 +189,3 @@ export declare class PhoneHarnessProvider implements ComputerProvider {
|
|
|
165
189
|
detail: string;
|
|
166
190
|
}>>;
|
|
167
191
|
}
|
|
168
|
-
/** The frame `adb exec-out screencap` gives: a header (width, height, format, and a color space on newer Androids), then the pixels. */
|
|
169
|
-
export declare function decodeScreencap(raw: Buffer): Result<{
|
|
170
|
-
width: number;
|
|
171
|
-
height: number;
|
|
172
|
-
rgba: Buffer;
|
|
173
|
-
}>;
|
|
174
|
-
/** An 8-bit RGBA PNG, non-interlaced, of rect of a width-wide RGBA frame. */
|
|
175
|
-
export declare function encodePng(rgba: Buffer, width: number, [x, y, w, h]: Rect): Buffer;
|
|
176
|
-
/** uiautomator's dump as the protocol's tree: one root (the window's, or one over several), at most MAX_UI_NODES nodes. */
|
|
177
|
-
export declare function parseUiTree(xml: string, [width, height]: [number, number]): Result<{
|
|
178
|
-
root: UiNode;
|
|
179
|
-
nodes: number;
|
|
180
|
-
truncated: boolean;
|
|
181
|
-
}>;
|