@opengeni/sdk 0.48.0 → 0.52.1
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 +93 -1
- package/dist/artifact-client.d.ts +20 -2
- package/dist/artifacts.d.ts +4 -0
- package/dist/artifacts.js +11 -0
- package/dist/artifacts.js.map +1 -0
- package/dist/chunk-FHI4DFIG.js +128 -0
- package/dist/chunk-FHI4DFIG.js.map +1 -0
- package/dist/chunk-FRJFNDIR.js +218 -0
- package/dist/chunk-FRJFNDIR.js.map +1 -0
- package/dist/{chunk-MBGBLVUV.js → chunk-ILQZR5N6.js} +1088 -577
- package/dist/chunk-ILQZR5N6.js.map +1 -0
- package/dist/chunk-MZWTWOX6.js +661 -0
- package/dist/chunk-MZWTWOX6.js.map +1 -0
- package/dist/chunk-VWE2QIVO.js +1162 -0
- package/dist/chunk-VWE2QIVO.js.map +1 -0
- package/dist/chunk-VYCTL62C.js +230 -0
- package/dist/chunk-VYCTL62C.js.map +1 -0
- package/dist/client.d.ts +150 -16
- package/dist/codex-realtime-controller.d.ts +6 -6
- package/dist/codex-realtime-lifecycle.d.ts +1 -1
- package/dist/codex-realtime-v3.d.ts +3 -3
- package/dist/codex-realtime.d.ts +1 -1
- package/dist/company-profile.d.ts +100 -0
- package/dist/core.d.ts +5 -5
- package/dist/core.js +9 -4
- package/dist/desktop.d.ts +1 -1
- package/dist/editable-artifact-resources.d.ts +96 -0
- package/dist/editable-artifacts/browser-session.d.ts +35 -0
- package/dist/editable-artifacts/controller.d.ts +60 -0
- package/dist/editable-artifacts/errors.d.ts +23 -0
- package/dist/editable-artifacts/http-live-transport.d.ts +46 -0
- package/dist/editable-artifacts/index.d.ts +19 -0
- package/dist/editable-artifacts/pool.d.ts +15 -0
- package/dist/editable-artifacts/session.d.ts +96 -0
- package/dist/editable-artifacts/storage.d.ts +72 -0
- package/dist/editable-artifacts/types.d.ts +416 -0
- package/dist/editable-artifacts/worker/browser-client.d.ts +80 -0
- package/dist/editable-artifacts/worker/browser-entry.d.ts +6 -0
- package/dist/editable-artifacts/worker/kernel-adapter.d.ts +45 -0
- package/dist/editable-artifacts/worker/rpc-protocol.d.ts +92 -0
- package/dist/editable-artifacts/worker/runtime.d.ts +66 -0
- package/dist/editable-artifacts/worker/wire-codec.d.ts +52 -0
- package/dist/editable-artifacts-worker.d.ts +8 -0
- package/dist/editable-artifacts-worker.js +1708 -0
- package/dist/editable-artifacts-worker.js.map +1 -0
- package/dist/editable-artifacts.d.ts +6 -0
- package/dist/editable-artifacts.js +5954 -0
- package/dist/editable-artifacts.js.map +1 -0
- package/dist/gateway-realtime-transport.d.ts +1 -1
- package/dist/index.d.ts +41 -35
- package/dist/index.js +104 -68
- package/dist/index.js.map +1 -1
- package/dist/interaction.d.ts +885 -0
- package/dist/interaction.js +55 -0
- package/dist/interaction.js.map +1 -0
- package/dist/memory-slack-client.d.ts +13 -0
- package/dist/memory-slack-delivery.d.ts +99 -0
- package/dist/memory-slack.d.ts +4 -0
- package/dist/memory-slack.js +44 -0
- package/dist/memory-slack.js.map +1 -0
- package/dist/proxy.d.ts +3 -3
- package/dist/realtime.d.ts +12 -12
- package/dist/retained-artifacts.d.ts +12 -0
- package/dist/stream.d.ts +1 -1
- package/dist/terminal.d.ts +1 -1
- package/dist/types.d.ts +1128 -18
- package/dist/workspace-control-stream.d.ts +2 -2
- package/dist/workspace-state.d.ts +1 -1
- package/package.json +29 -3
- package/src/artifact-client.ts +129 -0
- package/src/artifacts.ts +17 -0
- package/src/client.ts +1511 -200
- package/src/company-profile.ts +92 -0
- package/src/editable-artifact-resources.ts +119 -0
- package/src/editable-artifacts/browser-session.ts +176 -0
- package/src/editable-artifacts/controller.ts +2632 -0
- package/src/editable-artifacts/errors.ts +52 -0
- package/src/editable-artifacts/http-live-transport.ts +1449 -0
- package/src/editable-artifacts/index.ts +175 -0
- package/src/editable-artifacts/pool.ts +81 -0
- package/src/editable-artifacts/session.ts +778 -0
- package/src/editable-artifacts/storage.ts +1718 -0
- package/src/editable-artifacts/types.ts +499 -0
- package/src/editable-artifacts/worker/browser-client.ts +1167 -0
- package/src/editable-artifacts/worker/browser-entry.ts +57 -0
- package/src/editable-artifacts/worker/kernel-adapter.ts +1039 -0
- package/src/editable-artifacts/worker/rpc-protocol.ts +622 -0
- package/src/editable-artifacts/worker/runtime.ts +1204 -0
- package/src/editable-artifacts/worker/wire-codec.ts +852 -0
- package/src/editable-artifacts-worker.ts +8 -0
- package/src/editable-artifacts.ts +6 -0
- package/src/index.ts +185 -0
- package/src/interaction.ts +1830 -0
- package/src/memory-slack-client.ts +71 -0
- package/src/memory-slack-delivery.ts +128 -0
- package/src/memory-slack.ts +19 -0
- package/src/retained-artifacts.ts +326 -0
- package/src/types.ts +1343 -28
- package/dist/chunk-MBGBLVUV.js.map +0 -1
|
@@ -0,0 +1,885 @@
|
|
|
1
|
+
import type { OpenGeniRequestOptions } from "./client.js";
|
|
2
|
+
import type { RetainedArtifactReference } from "./types.js";
|
|
3
|
+
/** Public Browser/Computer protocol version. Driver and provider details stay private. */
|
|
4
|
+
export declare const INTERACTION_PROTOCOL_VERSION: 1;
|
|
5
|
+
export declare const BROWSER_CONTROL_WEBSOCKET_PROTOCOL: "opengeni.browser.v1";
|
|
6
|
+
export declare const COMPUTER_CONTROL_WEBSOCKET_PROTOCOL: "opengeni.computer.v1";
|
|
7
|
+
export declare const BROWSER_CONTROL_WEBSOCKET_BEARER_PREFIX: "opengeni.auth.";
|
|
8
|
+
export declare const BROWSER_CONTROL_MAX_FRAME_HEADER_BYTES: number;
|
|
9
|
+
export declare const BROWSER_FRAME_MAX_BYTES: number;
|
|
10
|
+
export declare const BROWSER_FRAME_MAX_DIMENSION = 32768;
|
|
11
|
+
export declare const BROWSER_FRAME_MAX_PIXELS = 100000000;
|
|
12
|
+
export type InteractionJsonValue = null | string | number | boolean | InteractionJsonValue[] | {
|
|
13
|
+
[key: string]: InteractionJsonValue;
|
|
14
|
+
};
|
|
15
|
+
export type InteractionPlacement = {
|
|
16
|
+
kind: "sandbox_group";
|
|
17
|
+
sandboxGroupId: string;
|
|
18
|
+
} | {
|
|
19
|
+
kind: "connected_machine";
|
|
20
|
+
sandboxId: string;
|
|
21
|
+
} | {
|
|
22
|
+
kind: "attached_device";
|
|
23
|
+
deviceId: string;
|
|
24
|
+
} | {
|
|
25
|
+
kind: "external_provider";
|
|
26
|
+
providerId: string;
|
|
27
|
+
placementId: string;
|
|
28
|
+
};
|
|
29
|
+
export type AttachedBrowserDeviceCapabilities = {
|
|
30
|
+
tabInventory: boolean;
|
|
31
|
+
debuggerAttachment: boolean;
|
|
32
|
+
semanticObservation: boolean;
|
|
33
|
+
screenshots: boolean;
|
|
34
|
+
liveFrames: boolean;
|
|
35
|
+
humanInput: boolean;
|
|
36
|
+
diagnostics: boolean;
|
|
37
|
+
rawCdp: boolean;
|
|
38
|
+
linkedComputer: boolean;
|
|
39
|
+
};
|
|
40
|
+
/** One live browser-profile endpoint on an enrolled machine. Saved, reusable
|
|
41
|
+
* login state is represented separately by BrowserIdentity. */
|
|
42
|
+
export type AttachedBrowserDevice = {
|
|
43
|
+
id: string;
|
|
44
|
+
accountId: string;
|
|
45
|
+
workspaceId: string;
|
|
46
|
+
enrollmentId: string;
|
|
47
|
+
name: string;
|
|
48
|
+
profileLabel: string | null;
|
|
49
|
+
browserName: string;
|
|
50
|
+
browserVersion: string;
|
|
51
|
+
extensionVersion: string;
|
|
52
|
+
platform: "linux" | "macos" | "windows";
|
|
53
|
+
architecture: "x64" | "arm64";
|
|
54
|
+
state: "connected" | "disconnected";
|
|
55
|
+
connectionGeneration: string;
|
|
56
|
+
inventoryRevision: number;
|
|
57
|
+
tabCount: number;
|
|
58
|
+
capabilities: AttachedBrowserDeviceCapabilities;
|
|
59
|
+
lastSeenAt: string;
|
|
60
|
+
disconnectedAt: string | null;
|
|
61
|
+
createdAt: string;
|
|
62
|
+
updatedAt: string;
|
|
63
|
+
};
|
|
64
|
+
export type AttachedBrowserDeviceListResponse = {
|
|
65
|
+
revision: number;
|
|
66
|
+
devices: AttachedBrowserDevice[];
|
|
67
|
+
};
|
|
68
|
+
export type InteractionControllerBinding = {
|
|
69
|
+
controllerId: string;
|
|
70
|
+
controllerGeneration: string;
|
|
71
|
+
placementInstanceId: string;
|
|
72
|
+
};
|
|
73
|
+
export type InteractionAssociation = {
|
|
74
|
+
sessionId: string;
|
|
75
|
+
turnId: string | null;
|
|
76
|
+
attemptId: string | null;
|
|
77
|
+
relationship: "created" | "using" | "observing" | "related";
|
|
78
|
+
actorSubjectId: string;
|
|
79
|
+
lastUsedAt: string;
|
|
80
|
+
};
|
|
81
|
+
export type InteractionLifecycle = "starting" | "active" | "suspending" | "suspended" | "restoring" | "repair_required" | "lost" | "ending" | "ended" | "failed";
|
|
82
|
+
export type BrowserSessionCapabilities = {
|
|
83
|
+
semanticObservation: boolean;
|
|
84
|
+
screenshots: boolean;
|
|
85
|
+
liveFrames: boolean;
|
|
86
|
+
humanInput: boolean;
|
|
87
|
+
tabs: boolean;
|
|
88
|
+
downloads: boolean;
|
|
89
|
+
uploads: boolean;
|
|
90
|
+
clipboard: boolean;
|
|
91
|
+
diagnostics: boolean;
|
|
92
|
+
rawCdp: boolean;
|
|
93
|
+
linkedComputer: boolean;
|
|
94
|
+
privateCheckpoint: boolean;
|
|
95
|
+
identityPublication: boolean;
|
|
96
|
+
parallelTargets: boolean;
|
|
97
|
+
};
|
|
98
|
+
export type BrowserSession = {
|
|
99
|
+
id: string;
|
|
100
|
+
accountId: string;
|
|
101
|
+
workspaceId: string;
|
|
102
|
+
name: string;
|
|
103
|
+
lifecycle: InteractionLifecycle;
|
|
104
|
+
placement: InteractionPlacement;
|
|
105
|
+
controller: InteractionControllerBinding | null;
|
|
106
|
+
driverId: string;
|
|
107
|
+
engine: "chromium" | "chrome" | "firefox" | "webkit" | "lightpanda" | "external";
|
|
108
|
+
engineVersion: string | null;
|
|
109
|
+
headless: boolean;
|
|
110
|
+
identityId: string | null;
|
|
111
|
+
baseRevisionId: string | null;
|
|
112
|
+
networkRouteId: string | null;
|
|
113
|
+
linkedComputerSessionId: string | null;
|
|
114
|
+
capabilities: BrowserSessionCapabilities;
|
|
115
|
+
associations: InteractionAssociation[];
|
|
116
|
+
createdBySubjectId: string;
|
|
117
|
+
createdAt: string;
|
|
118
|
+
lastUsedAt: string;
|
|
119
|
+
failureCode: string | null;
|
|
120
|
+
};
|
|
121
|
+
export type BrowserIdentityStatus = "active" | "archived";
|
|
122
|
+
export type BrowserRevisionComponentKind = "chromium_profile" | "normalized_web_state" | "provider_snapshot";
|
|
123
|
+
export type BrowserRevisionPortability = "portable" | "provider_bound" | "placement_bound";
|
|
124
|
+
export type BrowserRevisionMaterialization = {
|
|
125
|
+
portability: BrowserRevisionPortability;
|
|
126
|
+
reason: string | null;
|
|
127
|
+
platform: "linux" | "macos" | "windows" | null;
|
|
128
|
+
architecture: "x64" | "arm64" | null;
|
|
129
|
+
engine: "chromium" | "chrome" | "firefox" | "webkit" | "lightpanda" | "external";
|
|
130
|
+
engineVersion: string | null;
|
|
131
|
+
driverId: string;
|
|
132
|
+
driverSchemaVersion: number;
|
|
133
|
+
profileCrypto: "chromium_basic" | "chromium_mock_keychain" | "platform_bound";
|
|
134
|
+
providerId: string | null;
|
|
135
|
+
placement: InteractionPlacement | null;
|
|
136
|
+
};
|
|
137
|
+
export type BrowserRevisionComponent = {
|
|
138
|
+
id: string;
|
|
139
|
+
kind: BrowserRevisionComponentKind;
|
|
140
|
+
format: string;
|
|
141
|
+
artifactDigest: string;
|
|
142
|
+
sizeBytes: number;
|
|
143
|
+
materialization: BrowserRevisionMaterialization;
|
|
144
|
+
};
|
|
145
|
+
export type BrowserRevision = {
|
|
146
|
+
id: string;
|
|
147
|
+
accountId: string;
|
|
148
|
+
workspaceId: string;
|
|
149
|
+
identityId: string;
|
|
150
|
+
parentRevisionId: string | null;
|
|
151
|
+
ordinal: number;
|
|
152
|
+
sourceBrowserSessionId: string;
|
|
153
|
+
manifestDigest: string;
|
|
154
|
+
components: BrowserRevisionComponent[];
|
|
155
|
+
createdBySubjectId: string;
|
|
156
|
+
createdAt: string;
|
|
157
|
+
};
|
|
158
|
+
export type BrowserIdentity = {
|
|
159
|
+
id: string;
|
|
160
|
+
accountId: string;
|
|
161
|
+
workspaceId: string;
|
|
162
|
+
name: string;
|
|
163
|
+
status: BrowserIdentityStatus;
|
|
164
|
+
defaultRevisionId: string | null;
|
|
165
|
+
headGeneration: number;
|
|
166
|
+
revisionCount: number;
|
|
167
|
+
createdBySubjectId: string;
|
|
168
|
+
createdAt: string;
|
|
169
|
+
updatedAt: string;
|
|
170
|
+
};
|
|
171
|
+
export type BrowserIdentityListResponse = {
|
|
172
|
+
revision: number;
|
|
173
|
+
identities: BrowserIdentity[];
|
|
174
|
+
};
|
|
175
|
+
export type BrowserRevisionListResponse = {
|
|
176
|
+
identity: BrowserIdentity;
|
|
177
|
+
revisions: BrowserRevision[];
|
|
178
|
+
};
|
|
179
|
+
export type CreateBrowserIdentityRequest = {
|
|
180
|
+
operationId: string;
|
|
181
|
+
name: string;
|
|
182
|
+
};
|
|
183
|
+
export type BrowserIdentityMutationResponse = {
|
|
184
|
+
identity: BrowserIdentity;
|
|
185
|
+
operationId: string;
|
|
186
|
+
replayed: boolean;
|
|
187
|
+
};
|
|
188
|
+
export type PublishBrowserRevisionRequest = {
|
|
189
|
+
operationId: string;
|
|
190
|
+
identityId: string;
|
|
191
|
+
expectedHeadGeneration: number;
|
|
192
|
+
advanceDefault?: boolean | undefined;
|
|
193
|
+
};
|
|
194
|
+
export type PublishBrowserRevisionResponse = {
|
|
195
|
+
identity: BrowserIdentity;
|
|
196
|
+
revision: BrowserRevision;
|
|
197
|
+
outcome: "saved_as_default" | "saved_not_default";
|
|
198
|
+
replayed: boolean;
|
|
199
|
+
};
|
|
200
|
+
export type BrowserTarget = {
|
|
201
|
+
id: string;
|
|
202
|
+
browserSessionId: string;
|
|
203
|
+
controllerGeneration: string;
|
|
204
|
+
targetGeneration: string;
|
|
205
|
+
documentGeneration: string | null;
|
|
206
|
+
kind: "page" | "popup" | "background_page" | "worker";
|
|
207
|
+
title: string;
|
|
208
|
+
url: string;
|
|
209
|
+
selected: boolean;
|
|
210
|
+
attached: boolean;
|
|
211
|
+
createdAt: string;
|
|
212
|
+
};
|
|
213
|
+
export type InteractionRect = {
|
|
214
|
+
x: number;
|
|
215
|
+
y: number;
|
|
216
|
+
width: number;
|
|
217
|
+
height: number;
|
|
218
|
+
};
|
|
219
|
+
export type InteractionRedactedValue = {
|
|
220
|
+
redacted: true;
|
|
221
|
+
reason: "password" | "payment" | "private" | "policy";
|
|
222
|
+
};
|
|
223
|
+
export type InteractionSemanticNode = {
|
|
224
|
+
ref: string;
|
|
225
|
+
role: string;
|
|
226
|
+
identifier?: string | undefined;
|
|
227
|
+
name?: string | undefined;
|
|
228
|
+
description?: string | undefined;
|
|
229
|
+
value?: string | InteractionRedactedValue | undefined;
|
|
230
|
+
states: string[];
|
|
231
|
+
bounds?: InteractionRect | undefined;
|
|
232
|
+
actions: string[];
|
|
233
|
+
children?: InteractionSemanticNode[] | undefined;
|
|
234
|
+
native?: {
|
|
235
|
+
platform: "dom" | "mac_ax" | "at_spi" | "uia";
|
|
236
|
+
data: unknown;
|
|
237
|
+
} | undefined;
|
|
238
|
+
};
|
|
239
|
+
export type InteractionSemanticSnapshot = {
|
|
240
|
+
kind: "snapshot";
|
|
241
|
+
roots: InteractionSemanticNode[];
|
|
242
|
+
nodeCount: number;
|
|
243
|
+
};
|
|
244
|
+
export type InteractionSemanticDiff = {
|
|
245
|
+
kind: "diff";
|
|
246
|
+
baseObservationId: string;
|
|
247
|
+
removedRefs: string[];
|
|
248
|
+
changed: InteractionSemanticNode[];
|
|
249
|
+
};
|
|
250
|
+
export type InteractionDiagnosticSummary = {
|
|
251
|
+
consoleErrorCount: number;
|
|
252
|
+
failedRequestCount: number;
|
|
253
|
+
downloadCount: number;
|
|
254
|
+
pageErrorCount: number;
|
|
255
|
+
};
|
|
256
|
+
export type BrowserDialog = {
|
|
257
|
+
type: "alert" | "confirm" | "prompt" | "beforeunload";
|
|
258
|
+
message: string;
|
|
259
|
+
defaultPrompt: string;
|
|
260
|
+
openedAt: string;
|
|
261
|
+
};
|
|
262
|
+
export type BrowserObservation = {
|
|
263
|
+
protocolVersion: typeof INTERACTION_PROTOCOL_VERSION;
|
|
264
|
+
observationId: string;
|
|
265
|
+
browserSessionId: string;
|
|
266
|
+
target: BrowserTarget;
|
|
267
|
+
frameId: string | null;
|
|
268
|
+
semantic: InteractionSemanticSnapshot | InteractionSemanticDiff | null;
|
|
269
|
+
screenshot: RetainedArtifactReference | null;
|
|
270
|
+
focusedRef: string | null;
|
|
271
|
+
changedRegions: InteractionRect[];
|
|
272
|
+
diagnostics: InteractionDiagnosticSummary;
|
|
273
|
+
dialog: BrowserDialog | null;
|
|
274
|
+
observedAt: string;
|
|
275
|
+
};
|
|
276
|
+
export type BrowserDiagnosticKind = "console" | "page_error" | "failed_request" | "download";
|
|
277
|
+
export type BrowserDiagnosticEntry = {
|
|
278
|
+
sequence: number;
|
|
279
|
+
kind: BrowserDiagnosticKind;
|
|
280
|
+
level: "debug" | "info" | "warning" | "error" | null;
|
|
281
|
+
message: string;
|
|
282
|
+
url: string | null;
|
|
283
|
+
method: string | null;
|
|
284
|
+
status: number | null;
|
|
285
|
+
filename: string | null;
|
|
286
|
+
occurredAt: string;
|
|
287
|
+
};
|
|
288
|
+
export type BrowserDiagnosticBatch = {
|
|
289
|
+
browserSessionId: string;
|
|
290
|
+
controllerGeneration: string;
|
|
291
|
+
targetId: string;
|
|
292
|
+
targetGeneration: string;
|
|
293
|
+
entries: BrowserDiagnosticEntry[];
|
|
294
|
+
cursor: number;
|
|
295
|
+
truncated: boolean;
|
|
296
|
+
};
|
|
297
|
+
export type BrowserLocator = {
|
|
298
|
+
kind: "ref";
|
|
299
|
+
ref: string;
|
|
300
|
+
} | {
|
|
301
|
+
kind: "role";
|
|
302
|
+
role: string;
|
|
303
|
+
name?: string | undefined;
|
|
304
|
+
exact?: boolean | undefined;
|
|
305
|
+
} | {
|
|
306
|
+
kind: "label";
|
|
307
|
+
text: string;
|
|
308
|
+
} | {
|
|
309
|
+
kind: "text";
|
|
310
|
+
text: string;
|
|
311
|
+
} | {
|
|
312
|
+
kind: "placeholder";
|
|
313
|
+
text: string;
|
|
314
|
+
} | {
|
|
315
|
+
kind: "test_id";
|
|
316
|
+
value: string;
|
|
317
|
+
} | {
|
|
318
|
+
kind: "css";
|
|
319
|
+
selector: string;
|
|
320
|
+
};
|
|
321
|
+
export type BrowserAction = {
|
|
322
|
+
type: "navigate";
|
|
323
|
+
url: string;
|
|
324
|
+
} | {
|
|
325
|
+
type: "click";
|
|
326
|
+
locator: BrowserLocator;
|
|
327
|
+
button?: "left" | "right" | "middle" | undefined;
|
|
328
|
+
} | {
|
|
329
|
+
type: "double_click";
|
|
330
|
+
locator: BrowserLocator;
|
|
331
|
+
} | {
|
|
332
|
+
type: "hover";
|
|
333
|
+
locator: BrowserLocator;
|
|
334
|
+
} | {
|
|
335
|
+
type: "fill";
|
|
336
|
+
locator: BrowserLocator;
|
|
337
|
+
value: string;
|
|
338
|
+
} | {
|
|
339
|
+
type: "type";
|
|
340
|
+
locator?: BrowserLocator | undefined;
|
|
341
|
+
text: string;
|
|
342
|
+
} | {
|
|
343
|
+
type: "press";
|
|
344
|
+
locator?: BrowserLocator | undefined;
|
|
345
|
+
key: string;
|
|
346
|
+
} | {
|
|
347
|
+
type: "select";
|
|
348
|
+
locator: BrowserLocator;
|
|
349
|
+
values: string[];
|
|
350
|
+
} | {
|
|
351
|
+
type: "check";
|
|
352
|
+
locator: BrowserLocator;
|
|
353
|
+
checked: boolean;
|
|
354
|
+
} | {
|
|
355
|
+
type: "scroll";
|
|
356
|
+
locator?: BrowserLocator | undefined;
|
|
357
|
+
deltaX: number;
|
|
358
|
+
deltaY: number;
|
|
359
|
+
} | {
|
|
360
|
+
type: "drag";
|
|
361
|
+
from: BrowserLocator;
|
|
362
|
+
to: BrowserLocator;
|
|
363
|
+
} | {
|
|
364
|
+
type: "pointer";
|
|
365
|
+
action: "click" | "double_click" | "move" | "scroll" | "drag";
|
|
366
|
+
x: number;
|
|
367
|
+
y: number;
|
|
368
|
+
endX?: number | undefined;
|
|
369
|
+
endY?: number | undefined;
|
|
370
|
+
deltaX?: number | undefined;
|
|
371
|
+
deltaY?: number | undefined;
|
|
372
|
+
button?: "left" | "right" | "middle" | undefined;
|
|
373
|
+
} | {
|
|
374
|
+
type: "handle_dialog";
|
|
375
|
+
response: "accept" | "dismiss";
|
|
376
|
+
promptText?: string | undefined;
|
|
377
|
+
} | {
|
|
378
|
+
type: "upload";
|
|
379
|
+
locator: BrowserLocator;
|
|
380
|
+
workspaceFileIds: string[];
|
|
381
|
+
} | {
|
|
382
|
+
type: "wait";
|
|
383
|
+
condition: "load" | "network_idle" | "visible" | "hidden";
|
|
384
|
+
locator?: BrowserLocator | undefined;
|
|
385
|
+
timeoutMs?: number | undefined;
|
|
386
|
+
};
|
|
387
|
+
export type BrowserActionBatch = {
|
|
388
|
+
type: "batch";
|
|
389
|
+
actions: BrowserAction[];
|
|
390
|
+
};
|
|
391
|
+
export type InteractionError = {
|
|
392
|
+
code: "resource_not_found" | "resource_unavailable" | "controller_stale" | "target_not_found" | "target_stale" | "observation_stale" | "document_stale" | "frame_stale" | "locator_not_found" | "locator_ambiguous" | "unsupported" | "permission_denied" | "machine_locked" | "attempt_stale" | "operation_conflict" | "outcome_unknown" | "invalid_action" | "timeout" | "controller_lost" | "driver_failed";
|
|
393
|
+
message: string;
|
|
394
|
+
retryable: boolean;
|
|
395
|
+
details?: Record<string, InteractionJsonValue> | undefined;
|
|
396
|
+
};
|
|
397
|
+
export type InteractionOperationState = "prepared" | "dispatched" | "completed" | "failed" | "outcome_unknown";
|
|
398
|
+
export type InteractionLifecycleOperationReceipt = {
|
|
399
|
+
operationId: string;
|
|
400
|
+
resourceKind: "browser_session" | "computer_session";
|
|
401
|
+
resourceId: string;
|
|
402
|
+
kind: "create" | "resume" | "suspend" | "end" | "publish";
|
|
403
|
+
state: InteractionOperationState;
|
|
404
|
+
replayed: boolean;
|
|
405
|
+
error: InteractionError | null;
|
|
406
|
+
createdAt: string;
|
|
407
|
+
dispatchedAt: string | null;
|
|
408
|
+
settledAt: string | null;
|
|
409
|
+
};
|
|
410
|
+
export type CreateBrowserSessionRequest = {
|
|
411
|
+
operationId: string;
|
|
412
|
+
sessionId: string;
|
|
413
|
+
name?: string | undefined;
|
|
414
|
+
initialUrl?: string | undefined;
|
|
415
|
+
headless?: boolean | undefined;
|
|
416
|
+
placement?: InteractionPlacement | undefined;
|
|
417
|
+
identityId?: string | undefined;
|
|
418
|
+
baseRevisionId?: string | undefined;
|
|
419
|
+
linkedComputerSessionId?: string | undefined;
|
|
420
|
+
};
|
|
421
|
+
export type BrowserSessionListResponse = {
|
|
422
|
+
revision: number;
|
|
423
|
+
sessions: BrowserSession[];
|
|
424
|
+
};
|
|
425
|
+
export type BrowserSessionMutationResponse = {
|
|
426
|
+
session: BrowserSession;
|
|
427
|
+
operation: InteractionLifecycleOperationReceipt;
|
|
428
|
+
};
|
|
429
|
+
export type BrowserSessionLifecycleRequest = {
|
|
430
|
+
operationId: string;
|
|
431
|
+
};
|
|
432
|
+
export type BrowserOpenTargetRequest = {
|
|
433
|
+
url?: string | undefined;
|
|
434
|
+
};
|
|
435
|
+
export type BrowserTargetListResponse = {
|
|
436
|
+
browserSessionId: string;
|
|
437
|
+
controllerGeneration: string;
|
|
438
|
+
targets: BrowserTarget[];
|
|
439
|
+
};
|
|
440
|
+
export type InteractionFrameStreamAttachment<RelayKind extends 3 | 4 = 3 | 4> = {
|
|
441
|
+
kind: "direct_websocket";
|
|
442
|
+
url: string;
|
|
443
|
+
protocols: string[];
|
|
444
|
+
} | {
|
|
445
|
+
kind: "relay";
|
|
446
|
+
url: string;
|
|
447
|
+
token: string;
|
|
448
|
+
channel: {
|
|
449
|
+
channelId: string;
|
|
450
|
+
workspaceId: string;
|
|
451
|
+
agentId: string;
|
|
452
|
+
kind: RelayKind;
|
|
453
|
+
port: number;
|
|
454
|
+
};
|
|
455
|
+
};
|
|
456
|
+
export type BrowserSessionAttachment = {
|
|
457
|
+
browserSessionId: string;
|
|
458
|
+
controllerGeneration: string;
|
|
459
|
+
targetId: string;
|
|
460
|
+
stream: InteractionFrameStreamAttachment<3>;
|
|
461
|
+
expiresAt: string;
|
|
462
|
+
};
|
|
463
|
+
export type BrowserSessionAttachmentRequest = {
|
|
464
|
+
targetId: string;
|
|
465
|
+
expiresInSeconds?: number | undefined;
|
|
466
|
+
stream?: BrowserFrameStreamOptions | undefined;
|
|
467
|
+
};
|
|
468
|
+
export type BrowserActionRequest = {
|
|
469
|
+
operationId: string;
|
|
470
|
+
targetId: string;
|
|
471
|
+
expectedTargetGeneration: string;
|
|
472
|
+
expectedDocumentGeneration: string | null;
|
|
473
|
+
expectedFrameId: string | null;
|
|
474
|
+
action: BrowserAction | BrowserActionBatch;
|
|
475
|
+
};
|
|
476
|
+
export type BrowserActionReceipt = {
|
|
477
|
+
protocolVersion: typeof INTERACTION_PROTOCOL_VERSION;
|
|
478
|
+
operationId: string;
|
|
479
|
+
browserSessionId: string;
|
|
480
|
+
controllerGeneration: string;
|
|
481
|
+
targetId: string;
|
|
482
|
+
state: InteractionOperationState;
|
|
483
|
+
dispatchedAt: string | null;
|
|
484
|
+
settledAt: string | null;
|
|
485
|
+
observation: BrowserObservation | null;
|
|
486
|
+
error: InteractionError | null;
|
|
487
|
+
};
|
|
488
|
+
export type BrowserSessionHeartbeatResponse = {
|
|
489
|
+
browserSessionId: string;
|
|
490
|
+
controllerGeneration: string;
|
|
491
|
+
alive: true;
|
|
492
|
+
};
|
|
493
|
+
export type ComputerSessionCapabilities = {
|
|
494
|
+
semanticObservation: boolean;
|
|
495
|
+
appDiscovery: boolean;
|
|
496
|
+
appLaunch: boolean;
|
|
497
|
+
windowCapture: boolean;
|
|
498
|
+
screenCapture: boolean;
|
|
499
|
+
semanticActions: boolean;
|
|
500
|
+
pointerInput: boolean;
|
|
501
|
+
keyboardInput: boolean;
|
|
502
|
+
backgroundActions: boolean;
|
|
503
|
+
parallelApps: boolean;
|
|
504
|
+
};
|
|
505
|
+
export type ComputerSession = {
|
|
506
|
+
id: string;
|
|
507
|
+
accountId: string;
|
|
508
|
+
workspaceId: string;
|
|
509
|
+
name: string;
|
|
510
|
+
lifecycle: InteractionLifecycle;
|
|
511
|
+
placement: InteractionPlacement;
|
|
512
|
+
controller: InteractionControllerBinding | null;
|
|
513
|
+
platform: "linux" | "macos" | "windows" | null;
|
|
514
|
+
adapter: string | null;
|
|
515
|
+
seatId: string | null;
|
|
516
|
+
displayId: string | null;
|
|
517
|
+
capabilities: ComputerSessionCapabilities | null;
|
|
518
|
+
associations: InteractionAssociation[];
|
|
519
|
+
createdBySubjectId: string;
|
|
520
|
+
createdAt: string;
|
|
521
|
+
lastUsedAt: string;
|
|
522
|
+
failureCode: string | null;
|
|
523
|
+
};
|
|
524
|
+
export type ComputerTarget = {
|
|
525
|
+
id: string;
|
|
526
|
+
computerSessionId: string;
|
|
527
|
+
controllerGeneration: string;
|
|
528
|
+
targetGeneration: string;
|
|
529
|
+
kind: "app" | "window" | "screen";
|
|
530
|
+
applicationId: string | null;
|
|
531
|
+
processId: number | null;
|
|
532
|
+
title: string;
|
|
533
|
+
bounds: InteractionRect | null;
|
|
534
|
+
focused: boolean;
|
|
535
|
+
};
|
|
536
|
+
export type ComputerObservation = {
|
|
537
|
+
protocolVersion: typeof INTERACTION_PROTOCOL_VERSION;
|
|
538
|
+
observationId: string;
|
|
539
|
+
computerSessionId: string;
|
|
540
|
+
target: ComputerTarget;
|
|
541
|
+
frameId: string | null;
|
|
542
|
+
semantic: InteractionSemanticSnapshot | InteractionSemanticDiff | null;
|
|
543
|
+
screenshot: RetainedArtifactReference | null;
|
|
544
|
+
focusedRef: string | null;
|
|
545
|
+
changedRegions: InteractionRect[];
|
|
546
|
+
observedAt: string;
|
|
547
|
+
};
|
|
548
|
+
export type ComputerLocator = {
|
|
549
|
+
kind: "ref";
|
|
550
|
+
ref: string;
|
|
551
|
+
} | {
|
|
552
|
+
kind: "role";
|
|
553
|
+
role: string;
|
|
554
|
+
name?: string | undefined;
|
|
555
|
+
exact?: boolean | undefined;
|
|
556
|
+
} | {
|
|
557
|
+
kind: "label";
|
|
558
|
+
text: string;
|
|
559
|
+
exact?: boolean | undefined;
|
|
560
|
+
} | {
|
|
561
|
+
kind: "text";
|
|
562
|
+
text: string;
|
|
563
|
+
exact?: boolean | undefined;
|
|
564
|
+
} | {
|
|
565
|
+
kind: "identifier";
|
|
566
|
+
value: string;
|
|
567
|
+
};
|
|
568
|
+
export type ComputerAction = {
|
|
569
|
+
type: "semantic";
|
|
570
|
+
locator: ComputerLocator;
|
|
571
|
+
action: "invoke" | "focus" | "set_value" | "increment" | "decrement" | "select" | "deselect" | "expand" | "collapse" | "show_menu" | "scroll_into_view";
|
|
572
|
+
value?: string | number | boolean | undefined;
|
|
573
|
+
} | {
|
|
574
|
+
type: "pointer";
|
|
575
|
+
frameId: string;
|
|
576
|
+
action: "click" | "double_click" | "move" | "scroll" | "drag";
|
|
577
|
+
x: number;
|
|
578
|
+
y: number;
|
|
579
|
+
endX?: number | undefined;
|
|
580
|
+
endY?: number | undefined;
|
|
581
|
+
deltaX?: number | undefined;
|
|
582
|
+
deltaY?: number | undefined;
|
|
583
|
+
button?: "left" | "right" | "middle" | undefined;
|
|
584
|
+
} | {
|
|
585
|
+
type: "keyboard";
|
|
586
|
+
action: "type" | "press";
|
|
587
|
+
value: string;
|
|
588
|
+
} | {
|
|
589
|
+
type: "focus";
|
|
590
|
+
targetId: string;
|
|
591
|
+
} | {
|
|
592
|
+
type: "launch";
|
|
593
|
+
applicationId: string;
|
|
594
|
+
};
|
|
595
|
+
export type CreateComputerSessionRequest = {
|
|
596
|
+
operationId: string;
|
|
597
|
+
sessionId: string;
|
|
598
|
+
name?: string | undefined;
|
|
599
|
+
placement?: InteractionPlacement | undefined;
|
|
600
|
+
};
|
|
601
|
+
export type ComputerSessionListResponse = {
|
|
602
|
+
revision: number;
|
|
603
|
+
sessions: ComputerSession[];
|
|
604
|
+
};
|
|
605
|
+
export type ComputerSessionMutationResponse = {
|
|
606
|
+
session: ComputerSession;
|
|
607
|
+
operation: InteractionLifecycleOperationReceipt;
|
|
608
|
+
};
|
|
609
|
+
export type ComputerSessionLifecycleRequest = {
|
|
610
|
+
operationId: string;
|
|
611
|
+
};
|
|
612
|
+
export type ComputerTargetListResponse = {
|
|
613
|
+
computerSessionId: string;
|
|
614
|
+
controllerGeneration: string;
|
|
615
|
+
targets: ComputerTarget[];
|
|
616
|
+
};
|
|
617
|
+
export type InteractionFrameStreamOptions = {
|
|
618
|
+
format?: "jpeg" | "png" | undefined;
|
|
619
|
+
quality?: number | undefined;
|
|
620
|
+
maxWidth?: number | undefined;
|
|
621
|
+
maxHeight?: number | undefined;
|
|
622
|
+
everyNthFrame?: number | undefined;
|
|
623
|
+
};
|
|
624
|
+
export type ComputerFrameStreamOptions = InteractionFrameStreamOptions;
|
|
625
|
+
export type ComputerSessionAttachment = {
|
|
626
|
+
computerSessionId: string;
|
|
627
|
+
controllerGeneration: string;
|
|
628
|
+
targetId: string;
|
|
629
|
+
stream: InteractionFrameStreamAttachment<4>;
|
|
630
|
+
expiresAt: string;
|
|
631
|
+
};
|
|
632
|
+
export type ComputerSessionAttachmentRequest = {
|
|
633
|
+
targetId: string;
|
|
634
|
+
expiresInSeconds?: number | undefined;
|
|
635
|
+
stream?: ComputerFrameStreamOptions | undefined;
|
|
636
|
+
};
|
|
637
|
+
export type ComputerActionRequest = {
|
|
638
|
+
operationId: string;
|
|
639
|
+
targetId: string;
|
|
640
|
+
expectedTargetGeneration: string;
|
|
641
|
+
expectedObservationId: string | null;
|
|
642
|
+
expectedFrameId: string | null;
|
|
643
|
+
action: ComputerAction;
|
|
644
|
+
};
|
|
645
|
+
export type ComputerActionReceipt = {
|
|
646
|
+
protocolVersion: typeof INTERACTION_PROTOCOL_VERSION;
|
|
647
|
+
operationId: string;
|
|
648
|
+
computerSessionId: string;
|
|
649
|
+
controllerGeneration: string;
|
|
650
|
+
targetId: string;
|
|
651
|
+
state: InteractionOperationState;
|
|
652
|
+
dispatchedAt: string | null;
|
|
653
|
+
settledAt: string | null;
|
|
654
|
+
observation: ComputerObservation | null;
|
|
655
|
+
error: InteractionError | null;
|
|
656
|
+
};
|
|
657
|
+
export type ComputerSessionHeartbeatResponse = {
|
|
658
|
+
computerSessionId: string;
|
|
659
|
+
controllerGeneration: string;
|
|
660
|
+
alive: true;
|
|
661
|
+
};
|
|
662
|
+
export type BrowserDiagnosticsOptions = {
|
|
663
|
+
kinds?: BrowserDiagnosticKind[] | undefined;
|
|
664
|
+
after?: number | undefined;
|
|
665
|
+
limit?: number | undefined;
|
|
666
|
+
signal?: AbortSignal | undefined;
|
|
667
|
+
};
|
|
668
|
+
/** The exact HTTP surface needed by the framework-free interaction client. */
|
|
669
|
+
export interface InteractionTransport {
|
|
670
|
+
listAttachedBrowsers(workspaceId: string, options?: AttachedBrowserDeviceListOptions): Promise<AttachedBrowserDeviceListResponse>;
|
|
671
|
+
getAttachedBrowser(workspaceId: string, deviceId: string, options?: OpenGeniRequestOptions): Promise<AttachedBrowserDevice>;
|
|
672
|
+
listBrowserIdentities(workspaceId: string, options?: BrowserIdentityListOptions): Promise<BrowserIdentityListResponse>;
|
|
673
|
+
getBrowserIdentity(workspaceId: string, identityId: string, options?: OpenGeniRequestOptions): Promise<BrowserIdentity>;
|
|
674
|
+
createBrowserIdentity(workspaceId: string, request: CreateBrowserIdentityRequest, options?: OpenGeniRequestOptions): Promise<BrowserIdentityMutationResponse>;
|
|
675
|
+
listBrowserRevisions(workspaceId: string, identityId: string, options?: OpenGeniRequestOptions): Promise<BrowserRevisionListResponse>;
|
|
676
|
+
listBrowserSessions(workspaceId: string, options?: OpenGeniRequestOptions): Promise<BrowserSessionListResponse>;
|
|
677
|
+
getBrowserSession(workspaceId: string, browserSessionId: string, options?: OpenGeniRequestOptions): Promise<BrowserSession>;
|
|
678
|
+
createBrowserSession(workspaceId: string, request: CreateBrowserSessionRequest, options?: OpenGeniRequestOptions): Promise<BrowserSessionMutationResponse>;
|
|
679
|
+
listBrowserTargets(workspaceId: string, browserSessionId: string, options?: OpenGeniRequestOptions): Promise<BrowserTargetListResponse>;
|
|
680
|
+
openBrowserTarget(workspaceId: string, browserSessionId: string, request?: BrowserOpenTargetRequest, options?: OpenGeniRequestOptions): Promise<BrowserTarget>;
|
|
681
|
+
selectBrowserTarget(workspaceId: string, browserSessionId: string, targetId: string, options?: OpenGeniRequestOptions): Promise<BrowserTarget>;
|
|
682
|
+
closeBrowserTarget(workspaceId: string, browserSessionId: string, targetId: string, options?: OpenGeniRequestOptions): Promise<BrowserTargetListResponse>;
|
|
683
|
+
observeBrowserTarget(workspaceId: string, browserSessionId: string, targetId: string, options?: OpenGeniRequestOptions): Promise<BrowserObservation>;
|
|
684
|
+
actInBrowser(workspaceId: string, browserSessionId: string, request: BrowserActionRequest, options?: OpenGeniRequestOptions): Promise<BrowserActionReceipt>;
|
|
685
|
+
getBrowserActionReceipt(workspaceId: string, browserSessionId: string, operationId: string, options?: OpenGeniRequestOptions): Promise<BrowserActionReceipt>;
|
|
686
|
+
listBrowserDiagnostics(workspaceId: string, browserSessionId: string, targetId: string, options?: BrowserDiagnosticsOptions): Promise<BrowserDiagnosticBatch>;
|
|
687
|
+
attachBrowserSession(workspaceId: string, browserSessionId: string, request: BrowserSessionAttachmentRequest, options?: OpenGeniRequestOptions): Promise<BrowserSessionAttachment>;
|
|
688
|
+
heartbeatBrowserSession(workspaceId: string, browserSessionId: string, options?: OpenGeniRequestOptions): Promise<BrowserSessionHeartbeatResponse>;
|
|
689
|
+
publishBrowserRevision(workspaceId: string, browserSessionId: string, request: PublishBrowserRevisionRequest, options?: OpenGeniRequestOptions): Promise<PublishBrowserRevisionResponse>;
|
|
690
|
+
suspendBrowserSession(workspaceId: string, browserSessionId: string, request: BrowserSessionLifecycleRequest, options?: OpenGeniRequestOptions): Promise<BrowserSessionMutationResponse>;
|
|
691
|
+
resumeBrowserSession(workspaceId: string, browserSessionId: string, request: BrowserSessionLifecycleRequest, options?: OpenGeniRequestOptions): Promise<BrowserSessionMutationResponse>;
|
|
692
|
+
endBrowserSession(workspaceId: string, browserSessionId: string, request: BrowserSessionLifecycleRequest, options?: OpenGeniRequestOptions): Promise<BrowserSessionMutationResponse>;
|
|
693
|
+
listComputerSessions(workspaceId: string, options?: OpenGeniRequestOptions): Promise<ComputerSessionListResponse>;
|
|
694
|
+
getComputerSession(workspaceId: string, computerSessionId: string, options?: OpenGeniRequestOptions): Promise<ComputerSession>;
|
|
695
|
+
createComputerSession(workspaceId: string, request: CreateComputerSessionRequest, options?: OpenGeniRequestOptions): Promise<ComputerSessionMutationResponse>;
|
|
696
|
+
listComputerTargets(workspaceId: string, computerSessionId: string, options?: OpenGeniRequestOptions): Promise<ComputerTargetListResponse>;
|
|
697
|
+
observeComputerTarget(workspaceId: string, computerSessionId: string, targetId: string, options?: OpenGeniRequestOptions): Promise<ComputerObservation>;
|
|
698
|
+
actInComputer(workspaceId: string, computerSessionId: string, request: ComputerActionRequest, options?: OpenGeniRequestOptions): Promise<ComputerActionReceipt>;
|
|
699
|
+
getComputerActionReceipt(workspaceId: string, computerSessionId: string, operationId: string, options?: OpenGeniRequestOptions): Promise<ComputerActionReceipt>;
|
|
700
|
+
attachComputerSession(workspaceId: string, computerSessionId: string, request: ComputerSessionAttachmentRequest, options?: OpenGeniRequestOptions): Promise<ComputerSessionAttachment>;
|
|
701
|
+
heartbeatComputerSession(workspaceId: string, computerSessionId: string, options?: OpenGeniRequestOptions): Promise<ComputerSessionHeartbeatResponse>;
|
|
702
|
+
endComputerSession(workspaceId: string, computerSessionId: string, request: ComputerSessionLifecycleRequest, options?: OpenGeniRequestOptions): Promise<ComputerSessionMutationResponse>;
|
|
703
|
+
}
|
|
704
|
+
/** @deprecated Use InteractionTransport. */
|
|
705
|
+
export type BrowserInteractionTransport = InteractionTransport;
|
|
706
|
+
export type BrowserIdentityListOptions = OpenGeniRequestOptions & {
|
|
707
|
+
includeArchived?: boolean | undefined;
|
|
708
|
+
};
|
|
709
|
+
export type AttachedBrowserDeviceListOptions = OpenGeniRequestOptions & {
|
|
710
|
+
includeDisconnected?: boolean | undefined;
|
|
711
|
+
};
|
|
712
|
+
export type CurrentOrOpenBrowserOptions = {
|
|
713
|
+
workspaceId: string;
|
|
714
|
+
associationSessionId: string;
|
|
715
|
+
operationId?: string | undefined;
|
|
716
|
+
name?: string | undefined;
|
|
717
|
+
initialUrl?: string | undefined;
|
|
718
|
+
headless?: boolean | undefined;
|
|
719
|
+
placement?: InteractionPlacement | undefined;
|
|
720
|
+
identityId?: string | undefined;
|
|
721
|
+
baseRevisionId?: string | undefined;
|
|
722
|
+
linkedComputerSessionId?: string | undefined;
|
|
723
|
+
signal?: AbortSignal | undefined;
|
|
724
|
+
};
|
|
725
|
+
export type CurrentOrOpenComputerOptions = {
|
|
726
|
+
workspaceId: string;
|
|
727
|
+
associationSessionId: string;
|
|
728
|
+
operationId?: string | undefined;
|
|
729
|
+
name?: string | undefined;
|
|
730
|
+
placement?: InteractionPlacement | undefined;
|
|
731
|
+
signal?: AbortSignal | undefined;
|
|
732
|
+
};
|
|
733
|
+
/** Framework-free resource facade over the public interaction HTTP API. */
|
|
734
|
+
export declare class OpenGeniInteractionClient {
|
|
735
|
+
readonly attachedBrowsers: AttachedBrowserDeviceCollection;
|
|
736
|
+
readonly browsers: BrowserSessionCollection;
|
|
737
|
+
readonly computers: ComputerSessionCollection;
|
|
738
|
+
readonly identities: BrowserIdentityCollection;
|
|
739
|
+
constructor(transport: BrowserInteractionTransport);
|
|
740
|
+
}
|
|
741
|
+
export declare class AttachedBrowserDeviceCollection {
|
|
742
|
+
private readonly transport;
|
|
743
|
+
constructor(transport: BrowserInteractionTransport);
|
|
744
|
+
list(workspaceId: string, options?: AttachedBrowserDeviceListOptions): Promise<AttachedBrowserDeviceListResponse>;
|
|
745
|
+
device(workspaceId: string, deviceId: string): AttachedBrowserDeviceResource;
|
|
746
|
+
}
|
|
747
|
+
export declare class AttachedBrowserDeviceResource {
|
|
748
|
+
private readonly transport;
|
|
749
|
+
readonly workspaceId: string;
|
|
750
|
+
readonly id: string;
|
|
751
|
+
constructor(transport: BrowserInteractionTransport, workspaceId: string, id: string);
|
|
752
|
+
get(options?: OpenGeniRequestOptions): Promise<AttachedBrowserDevice>;
|
|
753
|
+
}
|
|
754
|
+
export declare class BrowserIdentityCollection {
|
|
755
|
+
private readonly transport;
|
|
756
|
+
constructor(transport: BrowserInteractionTransport);
|
|
757
|
+
list(workspaceId: string, options?: BrowserIdentityListOptions): Promise<BrowserIdentityListResponse>;
|
|
758
|
+
identity(workspaceId: string, identityId: string): BrowserIdentityResource;
|
|
759
|
+
create(workspaceId: string, request: CreateBrowserIdentityRequest, options?: OpenGeniRequestOptions): Promise<BrowserIdentityResource>;
|
|
760
|
+
}
|
|
761
|
+
export declare class BrowserIdentityResource {
|
|
762
|
+
private readonly transport;
|
|
763
|
+
readonly workspaceId: string;
|
|
764
|
+
readonly id: string;
|
|
765
|
+
constructor(transport: BrowserInteractionTransport, workspaceId: string, id: string);
|
|
766
|
+
get(options?: OpenGeniRequestOptions): Promise<BrowserIdentity>;
|
|
767
|
+
revisions(options?: OpenGeniRequestOptions): Promise<BrowserRevisionListResponse>;
|
|
768
|
+
}
|
|
769
|
+
export declare class BrowserSessionCollection {
|
|
770
|
+
private readonly transport;
|
|
771
|
+
constructor(transport: BrowserInteractionTransport);
|
|
772
|
+
list(workspaceId: string, options?: OpenGeniRequestOptions): Promise<BrowserSessionListResponse>;
|
|
773
|
+
session(workspaceId: string, browserSessionId: string): BrowserSessionResource;
|
|
774
|
+
open(workspaceId: string, request: CreateBrowserSessionRequest, options?: OpenGeniRequestOptions): Promise<BrowserSessionResource>;
|
|
775
|
+
currentOrOpen(options: CurrentOrOpenBrowserOptions): Promise<BrowserSessionResource>;
|
|
776
|
+
}
|
|
777
|
+
export declare class BrowserSessionResource {
|
|
778
|
+
private readonly transport;
|
|
779
|
+
readonly workspaceId: string;
|
|
780
|
+
readonly id: string;
|
|
781
|
+
readonly tabs: BrowserTargetCollection;
|
|
782
|
+
/** Alias for hosts that prefer the protocol term. */
|
|
783
|
+
readonly targets: BrowserTargetCollection;
|
|
784
|
+
constructor(transport: BrowserInteractionTransport, workspaceId: string, id: string);
|
|
785
|
+
get(options?: OpenGeniRequestOptions): Promise<BrowserSession>;
|
|
786
|
+
observe(targetId: string, options?: OpenGeniRequestOptions): Promise<BrowserObservation>;
|
|
787
|
+
act(request: BrowserActionRequest, options?: OpenGeniRequestOptions): Promise<BrowserActionReceipt>;
|
|
788
|
+
receipt(operationId: string, options?: OpenGeniRequestOptions): Promise<BrowserActionReceipt>;
|
|
789
|
+
diagnostics(targetId: string, options?: BrowserDiagnosticsOptions): Promise<BrowserDiagnosticBatch>;
|
|
790
|
+
attach(request: BrowserSessionAttachmentRequest, options?: OpenGeniRequestOptions): Promise<BrowserSessionAttachment>;
|
|
791
|
+
heartbeat(options?: OpenGeniRequestOptions): Promise<BrowserSessionHeartbeatResponse>;
|
|
792
|
+
publishRevision(request: PublishBrowserRevisionRequest, options?: OpenGeniRequestOptions): Promise<PublishBrowserRevisionResponse>;
|
|
793
|
+
suspend(request?: BrowserSessionLifecycleRequest, options?: OpenGeniRequestOptions): Promise<BrowserSessionMutationResponse>;
|
|
794
|
+
resume(request?: BrowserSessionLifecycleRequest, options?: OpenGeniRequestOptions): Promise<BrowserSessionMutationResponse>;
|
|
795
|
+
end(request?: BrowserSessionLifecycleRequest, options?: OpenGeniRequestOptions): Promise<BrowserSessionMutationResponse>;
|
|
796
|
+
}
|
|
797
|
+
export declare class BrowserTargetCollection {
|
|
798
|
+
private readonly transport;
|
|
799
|
+
private readonly workspaceId;
|
|
800
|
+
private readonly browserSessionId;
|
|
801
|
+
constructor(transport: BrowserInteractionTransport, workspaceId: string, browserSessionId: string);
|
|
802
|
+
list(options?: OpenGeniRequestOptions): Promise<BrowserTargetListResponse>;
|
|
803
|
+
open(url?: string, options?: OpenGeniRequestOptions): Promise<BrowserTarget>;
|
|
804
|
+
select(targetId: string, options?: OpenGeniRequestOptions): Promise<BrowserTarget>;
|
|
805
|
+
close(targetId: string, options?: OpenGeniRequestOptions): Promise<BrowserTargetListResponse>;
|
|
806
|
+
}
|
|
807
|
+
export declare class ComputerSessionCollection {
|
|
808
|
+
private readonly transport;
|
|
809
|
+
constructor(transport: BrowserInteractionTransport);
|
|
810
|
+
list(workspaceId: string, options?: OpenGeniRequestOptions): Promise<ComputerSessionListResponse>;
|
|
811
|
+
session(workspaceId: string, computerSessionId: string): ComputerSessionResource;
|
|
812
|
+
open(workspaceId: string, request: CreateComputerSessionRequest, options?: OpenGeniRequestOptions): Promise<ComputerSessionResource>;
|
|
813
|
+
currentOrOpen(options: CurrentOrOpenComputerOptions): Promise<ComputerSessionResource>;
|
|
814
|
+
}
|
|
815
|
+
export declare class ComputerSessionResource {
|
|
816
|
+
private readonly transport;
|
|
817
|
+
readonly workspaceId: string;
|
|
818
|
+
readonly id: string;
|
|
819
|
+
readonly targets: ComputerTargetCollection;
|
|
820
|
+
/** Native application/window targets are also the public app collection. */
|
|
821
|
+
readonly apps: ComputerTargetCollection;
|
|
822
|
+
constructor(transport: BrowserInteractionTransport, workspaceId: string, id: string);
|
|
823
|
+
get(options?: OpenGeniRequestOptions): Promise<ComputerSession>;
|
|
824
|
+
observe(targetId: string, options?: OpenGeniRequestOptions): Promise<ComputerObservation>;
|
|
825
|
+
act(request: ComputerActionRequest, options?: OpenGeniRequestOptions): Promise<ComputerActionReceipt>;
|
|
826
|
+
receipt(operationId: string, options?: OpenGeniRequestOptions): Promise<ComputerActionReceipt>;
|
|
827
|
+
attach(request: ComputerSessionAttachmentRequest, options?: OpenGeniRequestOptions): Promise<ComputerSessionAttachment>;
|
|
828
|
+
heartbeat(options?: OpenGeniRequestOptions): Promise<ComputerSessionHeartbeatResponse>;
|
|
829
|
+
end(request?: ComputerSessionLifecycleRequest, options?: OpenGeniRequestOptions): Promise<ComputerSessionMutationResponse>;
|
|
830
|
+
}
|
|
831
|
+
export declare class ComputerTargetCollection {
|
|
832
|
+
private readonly transport;
|
|
833
|
+
private readonly workspaceId;
|
|
834
|
+
private readonly computerSessionId;
|
|
835
|
+
constructor(transport: BrowserInteractionTransport, workspaceId: string, computerSessionId: string);
|
|
836
|
+
list(options?: OpenGeniRequestOptions): Promise<ComputerTargetListResponse>;
|
|
837
|
+
}
|
|
838
|
+
export type BrowserFrameMetadata = {
|
|
839
|
+
frameId: string;
|
|
840
|
+
browserSessionId: string;
|
|
841
|
+
controllerGeneration: string;
|
|
842
|
+
targetId: string;
|
|
843
|
+
targetGeneration: string;
|
|
844
|
+
documentGeneration: string;
|
|
845
|
+
sequence: number;
|
|
846
|
+
mediaType: "image/jpeg" | "image/png";
|
|
847
|
+
width: number;
|
|
848
|
+
height: number;
|
|
849
|
+
deviceScaleFactor: number;
|
|
850
|
+
scrollX: number;
|
|
851
|
+
scrollY: number;
|
|
852
|
+
capturedAt: string;
|
|
853
|
+
};
|
|
854
|
+
export type BrowserFrame = BrowserFrameMetadata & {
|
|
855
|
+
data: Uint8Array;
|
|
856
|
+
};
|
|
857
|
+
export type ComputerFrameMetadata = {
|
|
858
|
+
frameId: string;
|
|
859
|
+
computerSessionId: string;
|
|
860
|
+
controllerGeneration: string;
|
|
861
|
+
targetId: string;
|
|
862
|
+
targetGeneration: string;
|
|
863
|
+
sequence: number;
|
|
864
|
+
mediaType: "image/jpeg" | "image/png";
|
|
865
|
+
width: number;
|
|
866
|
+
height: number;
|
|
867
|
+
capturedAt: string;
|
|
868
|
+
sha256: string;
|
|
869
|
+
};
|
|
870
|
+
export type ComputerFrame = ComputerFrameMetadata & {
|
|
871
|
+
data: Uint8Array;
|
|
872
|
+
};
|
|
873
|
+
export type BrowserFrameStreamOptions = InteractionFrameStreamOptions;
|
|
874
|
+
/** Convert a short-lived HTTP attachment URL into its browser WebSocket URL. */
|
|
875
|
+
export declare function browserFrameSocketUrl(attachment: BrowserSessionAttachment, options?: BrowserFrameStreamOptions): string;
|
|
876
|
+
/** Convert a direct ComputerSession attachment into its WebSocket URL. */
|
|
877
|
+
export declare function computerFrameSocketUrl(attachment: ComputerSessionAttachment, options?: ComputerFrameStreamOptions): string;
|
|
878
|
+
/** Decode one bounded binary frame message from the placement controller. */
|
|
879
|
+
export declare function decodeBrowserFrameMessage(message: ArrayBuffer | Uint8Array): BrowserFrame;
|
|
880
|
+
/** Decode and authenticate one bounded ComputerSession frame. Computer frames
|
|
881
|
+
* carry a content digest because native capture adapters may cross process and
|
|
882
|
+
* relay boundaries before reaching the SDK. */
|
|
883
|
+
export declare function decodeComputerFrameMessage(message: ArrayBuffer | Uint8Array): Promise<ComputerFrame>;
|
|
884
|
+
export declare function parseBrowserFrameMetadata(value: unknown): BrowserFrameMetadata;
|
|
885
|
+
export declare function parseComputerFrameMetadata(value: unknown): ComputerFrameMetadata;
|