@opengeni/sdk 0.48.0 → 0.57.0

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 (122) hide show
  1. package/README.md +147 -1
  2. package/dist/artifact-client.d.ts +20 -2
  3. package/dist/artifacts.d.ts +4 -0
  4. package/dist/artifacts.js +11 -0
  5. package/dist/artifacts.js.map +1 -0
  6. package/dist/{chunk-V5F253OG.js → chunk-GU6JF75T.js} +6 -3
  7. package/dist/chunk-GU6JF75T.js.map +1 -0
  8. package/dist/chunk-HJ3HHUT5.js +222 -0
  9. package/dist/chunk-HJ3HHUT5.js.map +1 -0
  10. package/dist/{chunk-KIHGPM7H.js → chunk-JDLDDRNE.js} +20 -14
  11. package/dist/chunk-JDLDDRNE.js.map +1 -0
  12. package/dist/chunk-JRPFWI6T.js +128 -0
  13. package/dist/chunk-JRPFWI6T.js.map +1 -0
  14. package/dist/{chunk-MBGBLVUV.js → chunk-PKQ377ED.js} +1725 -555
  15. package/dist/chunk-PKQ377ED.js.map +1 -0
  16. package/dist/chunk-ST5DDKJP.js +987 -0
  17. package/dist/chunk-ST5DDKJP.js.map +1 -0
  18. package/dist/chunk-VWE2QIVO.js +1162 -0
  19. package/dist/chunk-VWE2QIVO.js.map +1 -0
  20. package/dist/chunk-VYCTL62C.js +230 -0
  21. package/dist/chunk-VYCTL62C.js.map +1 -0
  22. package/dist/{chunk-DXDL7EEW.js → chunk-YKZME56C.js} +197 -113
  23. package/dist/chunk-YKZME56C.js.map +1 -0
  24. package/dist/client.d.ts +240 -16
  25. package/dist/codex-realtime-controller.d.ts +9 -6
  26. package/dist/codex-realtime-controller.js +2 -2
  27. package/dist/codex-realtime-lifecycle.d.ts +1 -1
  28. package/dist/codex-realtime-v3.d.ts +3 -3
  29. package/dist/codex-realtime.d.ts +1 -1
  30. package/dist/company-profile.d.ts +100 -0
  31. package/dist/core.d.ts +5 -5
  32. package/dist/core.js +10 -5
  33. package/dist/desktop.d.ts +9 -1
  34. package/dist/editable-artifact-resources.d.ts +96 -0
  35. package/dist/editable-artifacts/browser-session.d.ts +35 -0
  36. package/dist/editable-artifacts/controller.d.ts +60 -0
  37. package/dist/editable-artifacts/errors.d.ts +23 -0
  38. package/dist/editable-artifacts/http-live-transport.d.ts +46 -0
  39. package/dist/editable-artifacts/index.d.ts +19 -0
  40. package/dist/editable-artifacts/pool.d.ts +15 -0
  41. package/dist/editable-artifacts/session.d.ts +96 -0
  42. package/dist/editable-artifacts/storage.d.ts +72 -0
  43. package/dist/editable-artifacts/types.d.ts +416 -0
  44. package/dist/editable-artifacts/worker/browser-client.d.ts +80 -0
  45. package/dist/editable-artifacts/worker/browser-entry.d.ts +6 -0
  46. package/dist/editable-artifacts/worker/kernel-adapter.d.ts +45 -0
  47. package/dist/editable-artifacts/worker/rpc-protocol.d.ts +92 -0
  48. package/dist/editable-artifacts/worker/runtime.d.ts +66 -0
  49. package/dist/editable-artifacts/worker/wire-codec.d.ts +52 -0
  50. package/dist/editable-artifacts-worker.d.ts +8 -0
  51. package/dist/editable-artifacts-worker.js +1708 -0
  52. package/dist/editable-artifacts-worker.js.map +1 -0
  53. package/dist/editable-artifacts.d.ts +6 -0
  54. package/dist/editable-artifacts.js +5954 -0
  55. package/dist/editable-artifacts.js.map +1 -0
  56. package/dist/gateway-realtime-transport.d.ts +2 -1
  57. package/dist/gateway-realtime-transport.js +5 -3
  58. package/dist/index.d.ts +45 -35
  59. package/dist/index.js +134 -64
  60. package/dist/index.js.map +1 -1
  61. package/dist/interaction-revision-stream.d.ts +11 -0
  62. package/dist/interaction.d.ts +1484 -0
  63. package/dist/interaction.js +81 -0
  64. package/dist/interaction.js.map +1 -0
  65. package/dist/memory-slack-client.d.ts +13 -0
  66. package/dist/memory-slack-delivery.d.ts +99 -0
  67. package/dist/memory-slack.d.ts +4 -0
  68. package/dist/memory-slack.js +44 -0
  69. package/dist/memory-slack.js.map +1 -0
  70. package/dist/proxy.d.ts +3 -3
  71. package/dist/realtime.d.ts +14 -14
  72. package/dist/realtime.js +11 -7
  73. package/dist/realtime.js.map +1 -1
  74. package/dist/retained-artifacts.d.ts +12 -0
  75. package/dist/stream.d.ts +1 -1
  76. package/dist/terminal.d.ts +1 -1
  77. package/dist/types.d.ts +1347 -34
  78. package/dist/workspace-control-stream.d.ts +2 -2
  79. package/dist/workspace-live-stream.d.ts +14 -0
  80. package/dist/workspace-state.d.ts +1 -1
  81. package/package.json +29 -3
  82. package/src/artifact-client.ts +129 -0
  83. package/src/artifacts.ts +17 -0
  84. package/src/client.ts +3022 -910
  85. package/src/codex-realtime-controller.ts +25 -7
  86. package/src/codex-realtime-lifecycle.ts +1 -0
  87. package/src/company-profile.ts +92 -0
  88. package/src/desktop.ts +11 -1
  89. package/src/editable-artifact-resources.ts +119 -0
  90. package/src/editable-artifacts/browser-session.ts +176 -0
  91. package/src/editable-artifacts/controller.ts +2632 -0
  92. package/src/editable-artifacts/errors.ts +52 -0
  93. package/src/editable-artifacts/http-live-transport.ts +1449 -0
  94. package/src/editable-artifacts/index.ts +175 -0
  95. package/src/editable-artifacts/pool.ts +81 -0
  96. package/src/editable-artifacts/session.ts +778 -0
  97. package/src/editable-artifacts/storage.ts +1718 -0
  98. package/src/editable-artifacts/types.ts +499 -0
  99. package/src/editable-artifacts/worker/browser-client.ts +1167 -0
  100. package/src/editable-artifacts/worker/browser-entry.ts +57 -0
  101. package/src/editable-artifacts/worker/kernel-adapter.ts +1039 -0
  102. package/src/editable-artifacts/worker/rpc-protocol.ts +622 -0
  103. package/src/editable-artifacts/worker/runtime.ts +1204 -0
  104. package/src/editable-artifacts/worker/wire-codec.ts +852 -0
  105. package/src/editable-artifacts-worker.ts +8 -0
  106. package/src/editable-artifacts.ts +6 -0
  107. package/src/errors.ts +16 -2
  108. package/src/gateway-realtime-transport.ts +252 -109
  109. package/src/index.ts +215 -1
  110. package/src/interaction-revision-stream.ts +117 -0
  111. package/src/interaction.ts +2874 -0
  112. package/src/memory-slack-client.ts +71 -0
  113. package/src/memory-slack-delivery.ts +128 -0
  114. package/src/memory-slack.ts +19 -0
  115. package/src/realtime.ts +14 -4
  116. package/src/retained-artifacts.ts +326 -0
  117. package/src/types.ts +1636 -52
  118. package/src/workspace-live-stream.ts +137 -0
  119. package/dist/chunk-DXDL7EEW.js.map +0 -1
  120. package/dist/chunk-KIHGPM7H.js.map +0 -1
  121. package/dist/chunk-MBGBLVUV.js.map +0 -1
  122. package/dist/chunk-V5F253OG.js.map +0 -1
@@ -0,0 +1,1484 @@
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
+ /** Latest-wins invalidation cursor for workspace Browser/Computer resources. */
13
+ export type WorkspaceInteractionRevisionEvent = {
14
+ workspaceId: string;
15
+ sequence: number;
16
+ revision: number;
17
+ type: "workspace.interaction.changed";
18
+ occurredAt: string;
19
+ };
20
+ export type InteractionJsonValue = null | string | number | boolean | InteractionJsonValue[] | {
21
+ [key: string]: InteractionJsonValue;
22
+ };
23
+ export type InteractionPlacement = {
24
+ kind: "sandbox_group";
25
+ sandboxGroupId: string;
26
+ } | {
27
+ kind: "connected_machine";
28
+ sandboxId: string;
29
+ } | {
30
+ kind: "attached_device";
31
+ deviceId: string;
32
+ } | {
33
+ kind: "external_provider";
34
+ providerId: string;
35
+ placementId: string;
36
+ };
37
+ export type AttachedBrowserDeviceCapabilities = {
38
+ tabInventory: boolean;
39
+ debuggerAttachment: boolean;
40
+ semanticObservation: boolean;
41
+ screenshots: boolean;
42
+ liveFrames: boolean;
43
+ humanInput: boolean;
44
+ diagnostics: boolean;
45
+ rawCdp: boolean;
46
+ linkedComputer: boolean;
47
+ };
48
+ /** One live browser-profile endpoint on an enrolled machine. Saved, reusable
49
+ * login state is represented separately by BrowserIdentity. */
50
+ export type AttachedBrowserDevice = {
51
+ id: string;
52
+ accountId: string;
53
+ workspaceId: string;
54
+ enrollmentId: string;
55
+ name: string;
56
+ profileLabel: string | null;
57
+ browserName: string;
58
+ browserVersion: string;
59
+ extensionVersion: string;
60
+ platform: "linux" | "macos" | "windows";
61
+ architecture: "x64" | "arm64";
62
+ state: "connected" | "disconnected";
63
+ connectionGeneration: string;
64
+ inventoryRevision: number;
65
+ tabCount: number;
66
+ capabilities: AttachedBrowserDeviceCapabilities;
67
+ lastSeenAt: string;
68
+ disconnectedAt: string | null;
69
+ createdAt: string;
70
+ updatedAt: string;
71
+ };
72
+ export type AttachedBrowserDeviceListResponse = {
73
+ revision: number;
74
+ devices: AttachedBrowserDevice[];
75
+ };
76
+ export type InteractionControllerBinding = {
77
+ controllerId: string;
78
+ controllerGeneration: string;
79
+ placementInstanceId: string;
80
+ };
81
+ export type InteractionAssociation = {
82
+ sessionId: string;
83
+ turnId: string | null;
84
+ attemptId: string | null;
85
+ relationship: "created" | "using" | "observing" | "related";
86
+ actorSubjectId: string;
87
+ lastUsedAt: string;
88
+ };
89
+ export type InteractionLifecycle = "starting" | "active" | "suspending" | "suspended" | "restoring" | "repair_required" | "lost" | "ending" | "ended" | "failed";
90
+ export type BrowserSessionCapabilities = {
91
+ semanticObservation: boolean;
92
+ screenshots: boolean;
93
+ liveFrames: boolean;
94
+ humanInput: boolean;
95
+ tabs: boolean;
96
+ downloads: boolean;
97
+ uploads: boolean;
98
+ clipboard: boolean;
99
+ permissions: boolean;
100
+ diagnostics: boolean;
101
+ rawCdp: boolean;
102
+ linkedComputer: boolean;
103
+ privateCheckpoint: boolean;
104
+ identityPublication: boolean;
105
+ parallelTargets: boolean;
106
+ };
107
+ export type BrowserSession = {
108
+ id: string;
109
+ accountId: string;
110
+ workspaceId: string;
111
+ name: string;
112
+ lifecycle: InteractionLifecycle;
113
+ placement: InteractionPlacement;
114
+ controller: InteractionControllerBinding | null;
115
+ driverId: string;
116
+ engine: "chromium" | "chrome" | "firefox" | "webkit" | "lightpanda" | "external";
117
+ engineVersion: string | null;
118
+ headless: boolean;
119
+ identityId: string | null;
120
+ baseRevisionId: string | null;
121
+ networkRouteId: string | null;
122
+ linkedComputerSessionId: string | null;
123
+ capabilities: BrowserSessionCapabilities;
124
+ associations: InteractionAssociation[];
125
+ createdBySubjectId: string;
126
+ createdAt: string;
127
+ lastUsedAt: string;
128
+ failureCode: string | null;
129
+ };
130
+ export type BrowserClipboard = {
131
+ browserSessionId: string;
132
+ controllerGeneration: string;
133
+ revision: number;
134
+ text: string;
135
+ source: "empty" | "write" | "clear" | "copy" | "paste";
136
+ sourceTargetId: string | null;
137
+ updatedAt: string | null;
138
+ };
139
+ export type InteractionCredentialAuthorityRef = {
140
+ connectionId: string;
141
+ connectionSubjectId: string | null;
142
+ providerDomain: string;
143
+ };
144
+ export type NetworkRouteConfiguration = {
145
+ kind: "direct";
146
+ } | {
147
+ kind: "proxy";
148
+ protocol: "http" | "https" | "socks5";
149
+ host: string;
150
+ port: number;
151
+ credential: InteractionCredentialAuthorityRef | null;
152
+ } | {
153
+ kind: "managed";
154
+ providerId: string;
155
+ routeId: string;
156
+ egressClass: "datacenter" | "residential" | "isp";
157
+ region: string | null;
158
+ credential: InteractionCredentialAuthorityRef | null;
159
+ } | {
160
+ kind: "tunnel";
161
+ placement: InteractionPlacement;
162
+ tunnelId: string;
163
+ };
164
+ export type NetworkRouteConsistency = {
165
+ dns: "placement" | "proxy" | "provider";
166
+ expectedPublicIp: string | null;
167
+ expectedRegion: string | null;
168
+ locale: string | null;
169
+ timezone: string | null;
170
+ geolocation: {
171
+ latitude: number;
172
+ longitude: number;
173
+ accuracyMeters: number;
174
+ } | null;
175
+ webRtc: "default" | "disable_non_proxied_udp" | "proxy_only";
176
+ stability: "session" | "sticky" | "persistent";
177
+ };
178
+ export type NetworkRoute = {
179
+ id: string;
180
+ accountId: string;
181
+ workspaceId: string;
182
+ name: string;
183
+ status: "active" | "archived";
184
+ configuration: NetworkRouteConfiguration;
185
+ consistency: NetworkRouteConsistency;
186
+ version: number;
187
+ createdBySubjectId: string;
188
+ createdAt: string;
189
+ updatedAt: string;
190
+ };
191
+ export type NetworkRouteListResponse = {
192
+ revision: number;
193
+ routes: NetworkRoute[];
194
+ };
195
+ export type CreateNetworkRouteRequest = {
196
+ operationId: string;
197
+ name: string;
198
+ configuration: NetworkRouteConfiguration;
199
+ consistency: NetworkRouteConsistency;
200
+ };
201
+ export type UpdateNetworkRouteRequest = {
202
+ operationId: string;
203
+ expectedVersion: number;
204
+ name?: string | undefined;
205
+ status?: "active" | "archived" | undefined;
206
+ configuration?: NetworkRouteConfiguration | undefined;
207
+ consistency?: NetworkRouteConsistency | undefined;
208
+ };
209
+ export type NetworkRouteMutationResponse = {
210
+ route: NetworkRoute;
211
+ operationId: string;
212
+ replayed: boolean;
213
+ };
214
+ export type SiteAuthFieldPurpose = "identifier" | "password" | "secret" | "totp";
215
+ export type SiteAuthAuthority = {
216
+ id: string;
217
+ kind: "connection_fields";
218
+ label: string;
219
+ credential: InteractionCredentialAuthorityRef;
220
+ fields: Array<{
221
+ id: string;
222
+ purpose: SiteAuthFieldPurpose;
223
+ credentialKey: string;
224
+ digits?: number | undefined;
225
+ periodSeconds?: number | undefined;
226
+ algorithm?: "sha1" | "sha256" | "sha512" | undefined;
227
+ }>;
228
+ } | {
229
+ id: string;
230
+ kind: "human";
231
+ label: string;
232
+ fields: Array<{
233
+ id: string;
234
+ purpose: SiteAuthFieldPurpose;
235
+ }>;
236
+ } | {
237
+ id: string;
238
+ kind: "external_provider";
239
+ label: string;
240
+ adapterId: string;
241
+ connectionId: string;
242
+ credential: InteractionCredentialAuthorityRef | null;
243
+ };
244
+ export type SiteAuthMethod = {
245
+ id: string;
246
+ kind: "password" | "sso" | "magic_link" | "passkey" | "external";
247
+ label: string;
248
+ authorityIds: string[];
249
+ };
250
+ export type SiteAuthHealthPolicy = {
251
+ mode: "on_use" | "maintained";
252
+ intervalSeconds: number | null;
253
+ automaticRepair: boolean;
254
+ };
255
+ export type SiteAuthConnectionConfiguration = {
256
+ name: string;
257
+ accountLabel: string;
258
+ origins: string[];
259
+ loginUrl: string | null;
260
+ verificationUrlPrefixes: string[];
261
+ authorities: SiteAuthAuthority[];
262
+ methods: SiteAuthMethod[];
263
+ preferredIdentityId: string | null;
264
+ preferredPlacement: InteractionPlacement | null;
265
+ preferredNetworkRouteId: string | null;
266
+ healthPolicy: SiteAuthHealthPolicy;
267
+ };
268
+ export type SiteAuthConnection = SiteAuthConnectionConfiguration & {
269
+ id: string;
270
+ accountId: string;
271
+ workspaceId: string;
272
+ status: "active" | "archived";
273
+ verificationState: "unknown" | "verified" | "needs_repair" | "failed";
274
+ lastVerifiedAt: string | null;
275
+ lastVerifiedUrl: string | null;
276
+ lastCheckedAt: string | null;
277
+ nextCheckAt: string | null;
278
+ maintenance: {
279
+ action: "health_check" | "repair";
280
+ sessionId: string | null;
281
+ dueAt: string;
282
+ startedAt: string | null;
283
+ } | null;
284
+ repairCode: string | null;
285
+ version: number;
286
+ createdBySubjectId: string;
287
+ createdAt: string;
288
+ updatedAt: string;
289
+ };
290
+ export type SiteAuthConnectionListResponse = {
291
+ revision: number;
292
+ connections: SiteAuthConnection[];
293
+ };
294
+ export type CreateSiteAuthConnectionRequest = SiteAuthConnectionConfiguration & {
295
+ operationId: string;
296
+ };
297
+ export type UpdateSiteAuthConnectionRequest = Partial<SiteAuthConnectionConfiguration> & {
298
+ operationId: string;
299
+ expectedVersion: number;
300
+ status?: "active" | "archived" | undefined;
301
+ };
302
+ export type SiteAuthConnectionMutationResponse = {
303
+ connection: SiteAuthConnection;
304
+ operationId: string;
305
+ replayed: boolean;
306
+ };
307
+ export type AuthRun = {
308
+ id: string;
309
+ accountId: string;
310
+ workspaceId: string;
311
+ siteAuthConnectionId: string;
312
+ browserSessionId: string;
313
+ targetId: string;
314
+ controllerGeneration: string;
315
+ targetGeneration: string;
316
+ documentGeneration: string | null;
317
+ purpose: "authenticate" | "health_check" | "repair";
318
+ methodId: string | null;
319
+ authorityId: string | null;
320
+ state: "discovering" | "awaiting_choice" | "awaiting_secret" | "awaiting_external_action" | "working" | "verified" | "failed" | "cancelled";
321
+ choices: Array<{
322
+ id: string;
323
+ label: string;
324
+ methodId: string;
325
+ }>;
326
+ pendingFields: Array<{
327
+ id: string;
328
+ label: string;
329
+ purpose: SiteAuthFieldPurpose;
330
+ }>;
331
+ externalAction: {
332
+ kind: "push" | "security_key" | "passkey" | "device" | "human" | "other";
333
+ label: string;
334
+ expiresAt: string | null;
335
+ } | null;
336
+ interventionId: string | null;
337
+ verifiedUrl: string | null;
338
+ failureCode: string | null;
339
+ version: number;
340
+ operationId: string;
341
+ createdBySubjectId: string;
342
+ createdAt: string;
343
+ updatedAt: string;
344
+ settledAt: string | null;
345
+ };
346
+ export type AuthRunListResponse = {
347
+ runs: AuthRun[];
348
+ };
349
+ export type AuthRunMutationResponse = {
350
+ run: AuthRun;
351
+ operationId: string;
352
+ replayed: boolean;
353
+ };
354
+ export type StartAuthRunRequest = {
355
+ operationId: string;
356
+ siteAuthConnectionId: string;
357
+ targetId: string;
358
+ expectedTargetGeneration: string;
359
+ expectedDocumentGeneration: string | null;
360
+ purpose?: "authenticate" | "health_check" | "repair" | undefined;
361
+ methodId?: string | undefined;
362
+ authorityId?: string | undefined;
363
+ };
364
+ export type ReportAuthRunRequest = {
365
+ operationId: string;
366
+ expectedVersion: number;
367
+ methodId?: string | undefined;
368
+ authorityId?: string | undefined;
369
+ state: "awaiting_choice" | "awaiting_secret" | "awaiting_external_action" | "working" | "failed" | "cancelled";
370
+ choices?: AuthRun["choices"] | undefined;
371
+ pendingFields?: AuthRun["pendingFields"] | undefined;
372
+ externalAction?: AuthRun["externalAction"] | undefined;
373
+ failureCode?: string | null | undefined;
374
+ };
375
+ export type ProtectedAuthFillRequest = {
376
+ operationId: string;
377
+ expectedVersion: number;
378
+ expectedTargetGeneration: string;
379
+ expectedDocumentGeneration: string | null;
380
+ expectedFrameId: string | null;
381
+ authorityId: string;
382
+ fields: Array<{
383
+ fieldId: string;
384
+ locator: BrowserLocator;
385
+ }>;
386
+ submit: {
387
+ type: "none";
388
+ } | {
389
+ type: "click";
390
+ locator: BrowserLocator;
391
+ } | {
392
+ type: "press";
393
+ key: string;
394
+ locator?: BrowserLocator | undefined;
395
+ };
396
+ };
397
+ export type ProtectedAuthFillResponse = {
398
+ run: AuthRun;
399
+ status: "submitted" | "working" | "needs_human" | "stale" | "failed";
400
+ operationId: string;
401
+ replayed: boolean;
402
+ };
403
+ export type ExternalAuthRunRequest = {
404
+ operationId: string;
405
+ expectedVersion: number;
406
+ action: "start" | "poll";
407
+ };
408
+ export type ExternalAuthRunResponse = {
409
+ run: AuthRun;
410
+ status: "working" | "needs_human" | "ready_to_verify" | "failed";
411
+ operationId: string;
412
+ replayed: boolean;
413
+ };
414
+ export type ExternalAuthInteractiveRequest = {
415
+ operationId: string;
416
+ expectedVersion: number;
417
+ };
418
+ export type ExternalAuthInteractiveResponse = {
419
+ authRunId: string;
420
+ url: string;
421
+ expiresAt: string | null;
422
+ };
423
+ export type VerifyAuthRunRequest = {
424
+ operationId: string;
425
+ expectedVersion: number;
426
+ };
427
+ export type InteractionIntervention = {
428
+ id: string;
429
+ accountId: string;
430
+ workspaceId: string;
431
+ resourceKind: "browser_session" | "computer_session";
432
+ resourceId: string;
433
+ targetId: string;
434
+ controllerGeneration: string;
435
+ targetGeneration: string;
436
+ documentGeneration: string | null;
437
+ kind: "manual_login" | "mfa" | "external_action" | "confirmation" | "other";
438
+ reason: string;
439
+ status: "open" | "completed" | "dismissed" | "expired" | "cancelled";
440
+ authRunId: string | null;
441
+ originatingSessionId: string;
442
+ originatingTurnId: string | null;
443
+ originatingAttemptId: string | null;
444
+ originatingToolOperationId: string | null;
445
+ responseActorSubjectId: string | null;
446
+ version: number;
447
+ operationId: string;
448
+ expiresAt: string;
449
+ createdAt: string;
450
+ updatedAt: string;
451
+ settledAt: string | null;
452
+ };
453
+ export type InteractionInterventionListResponse = {
454
+ interventions: InteractionIntervention[];
455
+ };
456
+ export type CreateInteractionInterventionRequest = {
457
+ operationId: string;
458
+ resourceKind: "browser_session" | "computer_session";
459
+ resourceId: string;
460
+ targetId: string;
461
+ expectedControllerGeneration: string;
462
+ expectedTargetGeneration: string;
463
+ expectedDocumentGeneration: string | null;
464
+ kind: InteractionIntervention["kind"];
465
+ reason: string;
466
+ authRunId?: string | undefined;
467
+ expiresInSeconds?: number | undefined;
468
+ };
469
+ export type ResolveInteractionInterventionRequest = {
470
+ operationId: string;
471
+ expectedVersion: number;
472
+ outcome: "completed" | "dismissed";
473
+ };
474
+ export type InteractionInterventionMutationResponse = {
475
+ intervention: InteractionIntervention;
476
+ operationId: string;
477
+ replayed: boolean;
478
+ };
479
+ export type BrowserIdentityStatus = "active" | "archived";
480
+ export type BrowserRevisionComponentKind = "chromium_profile" | "normalized_web_state" | "provider_snapshot";
481
+ export type BrowserRevisionPortability = "portable" | "provider_bound" | "placement_bound";
482
+ export type BrowserRevisionMaterialization = {
483
+ portability: BrowserRevisionPortability;
484
+ reason: string | null;
485
+ platform: "linux" | "macos" | "windows" | null;
486
+ architecture: "x64" | "arm64" | null;
487
+ engine: "chromium" | "chrome" | "firefox" | "webkit" | "lightpanda" | "external";
488
+ engineVersion: string | null;
489
+ driverId: string;
490
+ driverSchemaVersion: number;
491
+ profileCrypto: "chromium_basic" | "chromium_mock_keychain" | "platform_bound";
492
+ providerId: string | null;
493
+ placement: InteractionPlacement | null;
494
+ };
495
+ export type BrowserRevisionComponent = {
496
+ id: string;
497
+ kind: BrowserRevisionComponentKind;
498
+ format: string;
499
+ artifactDigest: string;
500
+ sizeBytes: number;
501
+ materialization: BrowserRevisionMaterialization;
502
+ };
503
+ export type BrowserRevision = {
504
+ id: string;
505
+ accountId: string;
506
+ workspaceId: string;
507
+ identityId: string;
508
+ parentRevisionId: string | null;
509
+ ordinal: number;
510
+ sourceBrowserSessionId: string;
511
+ manifestDigest: string;
512
+ components: BrowserRevisionComponent[];
513
+ createdBySubjectId: string;
514
+ createdAt: string;
515
+ };
516
+ export type BrowserIdentity = {
517
+ id: string;
518
+ accountId: string;
519
+ workspaceId: string;
520
+ name: string;
521
+ status: BrowserIdentityStatus;
522
+ version: number;
523
+ defaultRevisionId: string | null;
524
+ headGeneration: number;
525
+ revisionCount: number;
526
+ createdBySubjectId: string;
527
+ createdAt: string;
528
+ updatedAt: string;
529
+ };
530
+ export type BrowserIdentityListResponse = {
531
+ revision: number;
532
+ identities: BrowserIdentity[];
533
+ };
534
+ export type BrowserRevisionListResponse = {
535
+ identity: BrowserIdentity;
536
+ revisions: BrowserRevision[];
537
+ };
538
+ export type CreateBrowserIdentityRequest = {
539
+ operationId: string;
540
+ name: string;
541
+ };
542
+ export type UpdateBrowserIdentityRequest = {
543
+ operationId: string;
544
+ expectedVersion: number;
545
+ name?: string | undefined;
546
+ status?: BrowserIdentityStatus | undefined;
547
+ defaultRevisionId?: string | undefined;
548
+ };
549
+ export type BrowserIdentityMutationResponse = {
550
+ identity: BrowserIdentity;
551
+ operationId: string;
552
+ replayed: boolean;
553
+ };
554
+ export type PublishBrowserRevisionRequest = {
555
+ operationId: string;
556
+ identityId: string;
557
+ expectedHeadGeneration: number;
558
+ advanceDefault?: boolean | undefined;
559
+ };
560
+ export type PublishBrowserRevisionResponse = {
561
+ identity: BrowserIdentity;
562
+ revision: BrowserRevision;
563
+ outcome: "saved_as_default" | "saved_not_default";
564
+ replayed: boolean;
565
+ };
566
+ export type BrowserTarget = {
567
+ id: string;
568
+ browserSessionId: string;
569
+ controllerGeneration: string;
570
+ targetGeneration: string;
571
+ documentGeneration: string | null;
572
+ kind: "page" | "popup" | "background_page" | "worker";
573
+ title: string;
574
+ url: string;
575
+ selected: boolean;
576
+ attached: boolean;
577
+ createdAt: string;
578
+ };
579
+ export type BrowserDownloadStatus = "in_progress" | "completed" | "cancelled" | "failed" | "unavailable";
580
+ /** One browser-produced file. Its bytes remain private to the exact browser
581
+ * controller until an explicit save publishes them into the workspace. */
582
+ export type BrowserDownload = {
583
+ id: string;
584
+ browserSessionId: string;
585
+ controllerGeneration: string;
586
+ targetId: string | null;
587
+ filename: string;
588
+ status: BrowserDownloadStatus;
589
+ receivedBytes: number;
590
+ totalBytes: number | null;
591
+ sha256: string | null;
592
+ version: number;
593
+ startedAt: string;
594
+ settledAt: string | null;
595
+ failureCode: string | null;
596
+ };
597
+ export type BrowserDownloadListResponse = {
598
+ browserSessionId: string;
599
+ controllerGeneration: string;
600
+ downloads: BrowserDownload[];
601
+ };
602
+ export type BrowserDownloadSaveRequest = {
603
+ operationId: string;
604
+ destinationPath: string;
605
+ overwrite?: boolean | undefined;
606
+ };
607
+ export type BrowserDownloadSaveResponse = {
608
+ download: BrowserDownload;
609
+ destinationPath: string;
610
+ fileId: string;
611
+ operationId: string;
612
+ replayed: boolean;
613
+ };
614
+ export type InteractionRect = {
615
+ x: number;
616
+ y: number;
617
+ width: number;
618
+ height: number;
619
+ };
620
+ export type InteractionRedactedValue = {
621
+ redacted: true;
622
+ reason: "password" | "payment" | "private" | "policy";
623
+ };
624
+ export type InteractionSemanticNode = {
625
+ ref: string;
626
+ role: string;
627
+ identifier?: string | undefined;
628
+ name?: string | undefined;
629
+ description?: string | undefined;
630
+ value?: string | InteractionRedactedValue | undefined;
631
+ states: string[];
632
+ bounds?: InteractionRect | undefined;
633
+ actions: string[];
634
+ children?: InteractionSemanticNode[] | undefined;
635
+ native?: {
636
+ platform: "dom" | "mac_ax" | "at_spi" | "uia";
637
+ data: unknown;
638
+ } | undefined;
639
+ };
640
+ export type InteractionSemanticSnapshot = {
641
+ kind: "snapshot";
642
+ roots: InteractionSemanticNode[];
643
+ nodeCount: number;
644
+ };
645
+ export type InteractionSemanticDiff = {
646
+ kind: "diff";
647
+ baseObservationId: string;
648
+ removedRefs: string[];
649
+ changed: InteractionSemanticNode[];
650
+ };
651
+ export type InteractionDiagnosticSummary = {
652
+ consoleErrorCount: number;
653
+ failedRequestCount: number;
654
+ downloadCount: number;
655
+ pageErrorCount: number;
656
+ };
657
+ export type BrowserDialog = {
658
+ type: "alert" | "confirm" | "prompt" | "beforeunload";
659
+ message: string;
660
+ defaultPrompt: string;
661
+ openedAt: string;
662
+ };
663
+ export type BrowserObservation = {
664
+ protocolVersion: typeof INTERACTION_PROTOCOL_VERSION;
665
+ observationId: string;
666
+ browserSessionId: string;
667
+ target: BrowserTarget;
668
+ frameId: string | null;
669
+ semantic: InteractionSemanticSnapshot | InteractionSemanticDiff | null;
670
+ screenshot: RetainedArtifactReference | null;
671
+ focusedRef: string | null;
672
+ changedRegions: InteractionRect[];
673
+ diagnostics: InteractionDiagnosticSummary;
674
+ dialog: BrowserDialog | null;
675
+ observedAt: string;
676
+ };
677
+ export type BrowserDiagnosticKind = "console" | "page_error" | "failed_request" | "download";
678
+ export type BrowserDiagnosticEntry = {
679
+ sequence: number;
680
+ kind: BrowserDiagnosticKind;
681
+ level: "debug" | "info" | "warning" | "error" | null;
682
+ message: string;
683
+ url: string | null;
684
+ method: string | null;
685
+ status: number | null;
686
+ filename: string | null;
687
+ occurredAt: string;
688
+ };
689
+ export type BrowserDiagnosticBatch = {
690
+ browserSessionId: string;
691
+ controllerGeneration: string;
692
+ targetId: string;
693
+ targetGeneration: string;
694
+ entries: BrowserDiagnosticEntry[];
695
+ cursor: number;
696
+ truncated: boolean;
697
+ };
698
+ export type BrowserLocator = {
699
+ kind: "ref";
700
+ ref: string;
701
+ } | {
702
+ kind: "role";
703
+ role: string;
704
+ name?: string | undefined;
705
+ exact?: boolean | undefined;
706
+ } | {
707
+ kind: "label";
708
+ text: string;
709
+ } | {
710
+ kind: "text";
711
+ text: string;
712
+ } | {
713
+ kind: "placeholder";
714
+ text: string;
715
+ } | {
716
+ kind: "test_id";
717
+ value: string;
718
+ } | {
719
+ kind: "css";
720
+ selector: string;
721
+ };
722
+ export type BrowserPermission = "geolocation" | "notifications" | "camera" | "microphone" | "midi" | "midi_sysex" | "sensors" | "idle_detection" | "local_fonts" | "window_management";
723
+ export type BrowserPermissionSetting = "granted" | "denied" | "prompt";
724
+ export type BrowserAction = {
725
+ type: "navigate";
726
+ url: string;
727
+ } | {
728
+ type: "click";
729
+ locator: BrowserLocator;
730
+ button?: "left" | "right" | "middle" | undefined;
731
+ } | {
732
+ type: "double_click";
733
+ locator: BrowserLocator;
734
+ } | {
735
+ type: "hover";
736
+ locator: BrowserLocator;
737
+ } | {
738
+ type: "fill";
739
+ locator: BrowserLocator;
740
+ value: string;
741
+ } | {
742
+ type: "type";
743
+ locator?: BrowserLocator | undefined;
744
+ text: string;
745
+ } | {
746
+ type: "press";
747
+ locator?: BrowserLocator | undefined;
748
+ key: string;
749
+ } | {
750
+ type: "select";
751
+ locator: BrowserLocator;
752
+ values: string[];
753
+ } | {
754
+ type: "check";
755
+ locator: BrowserLocator;
756
+ checked: boolean;
757
+ } | {
758
+ type: "scroll";
759
+ locator?: BrowserLocator | undefined;
760
+ deltaX: number;
761
+ deltaY: number;
762
+ } | {
763
+ type: "drag";
764
+ from: BrowserLocator;
765
+ to: BrowserLocator;
766
+ } | {
767
+ type: "pointer";
768
+ action: "click" | "double_click" | "move" | "scroll" | "drag";
769
+ x: number;
770
+ y: number;
771
+ endX?: number | undefined;
772
+ endY?: number | undefined;
773
+ deltaX?: number | undefined;
774
+ deltaY?: number | undefined;
775
+ button?: "left" | "right" | "middle" | undefined;
776
+ clickCount?: 1 | 2 | undefined;
777
+ } | {
778
+ type: "handle_dialog";
779
+ response: "accept" | "dismiss";
780
+ promptText?: string | undefined;
781
+ } | {
782
+ type: "upload";
783
+ locator: BrowserLocator;
784
+ workspaceFileIds: string[];
785
+ } | {
786
+ type: "clipboard";
787
+ operation: "write" | "clear" | "copy" | "paste";
788
+ text?: string | undefined;
789
+ locator?: BrowserLocator | undefined;
790
+ content?: "selection" | "value" | "text" | undefined;
791
+ } | {
792
+ type: "permission";
793
+ permission: BrowserPermission;
794
+ setting: BrowserPermissionSetting;
795
+ } | {
796
+ type: "wait";
797
+ condition: "load" | "network_idle" | "visible" | "hidden";
798
+ locator?: BrowserLocator | undefined;
799
+ timeoutMs?: number | undefined;
800
+ };
801
+ export type BrowserActionBatch = {
802
+ type: "batch";
803
+ actions: BrowserAction[];
804
+ };
805
+ export type InteractionError = {
806
+ 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";
807
+ message: string;
808
+ retryable: boolean;
809
+ details?: Record<string, InteractionJsonValue> | undefined;
810
+ };
811
+ export type InteractionOperationState = "prepared" | "dispatched" | "completed" | "failed" | "outcome_unknown";
812
+ export type InteractionLifecycleOperationReceipt = {
813
+ operationId: string;
814
+ resourceKind: "browser_session" | "computer_session";
815
+ resourceId: string;
816
+ kind: "create" | "resume" | "suspend" | "end" | "publish";
817
+ state: InteractionOperationState;
818
+ replayed: boolean;
819
+ error: InteractionError | null;
820
+ createdAt: string;
821
+ dispatchedAt: string | null;
822
+ settledAt: string | null;
823
+ };
824
+ export type CreateBrowserSessionRequest = {
825
+ operationId: string;
826
+ sessionId: string;
827
+ name?: string | undefined;
828
+ initialUrl?: string | undefined;
829
+ headless?: boolean | undefined;
830
+ engine?: "chromium" | "lightpanda" | undefined;
831
+ placement?: InteractionPlacement | undefined;
832
+ identityId?: string | undefined;
833
+ baseRevisionId?: string | undefined;
834
+ networkRouteId?: string | undefined;
835
+ linkedComputerSessionId?: string | undefined;
836
+ };
837
+ export type BrowserSessionListResponse = {
838
+ revision: number;
839
+ sessions: BrowserSession[];
840
+ };
841
+ export type BrowserSessionMutationResponse = {
842
+ session: BrowserSession;
843
+ operation: InteractionLifecycleOperationReceipt;
844
+ };
845
+ export type BrowserSessionLifecycleRequest = {
846
+ operationId: string;
847
+ };
848
+ export type BrowserOpenTargetRequest = {
849
+ url?: string | undefined;
850
+ };
851
+ export type BrowserTargetListResponse = {
852
+ browserSessionId: string;
853
+ controllerGeneration: string;
854
+ targets: BrowserTarget[];
855
+ };
856
+ export type InteractionFrameStreamAttachment<RelayKind extends 3 | 4 = 3 | 4> = {
857
+ kind: "direct_websocket";
858
+ url: string;
859
+ protocols: string[];
860
+ } | {
861
+ kind: "relay";
862
+ url: string;
863
+ token: string;
864
+ channel: {
865
+ channelId: string;
866
+ workspaceId: string;
867
+ agentId: string;
868
+ kind: RelayKind;
869
+ port: number;
870
+ };
871
+ };
872
+ export type ComputerFrameStreamAttachment = InteractionFrameStreamAttachment<4> | {
873
+ kind: "direct_rfb";
874
+ url: string;
875
+ protocols: string[];
876
+ };
877
+ export type BrowserSessionAttachment = {
878
+ browserSessionId: string;
879
+ controllerGeneration: string;
880
+ targetId: string;
881
+ stream: InteractionFrameStreamAttachment<3>;
882
+ expiresAt: string;
883
+ };
884
+ export type BrowserSessionAttachmentRequest = {
885
+ targetId: string;
886
+ expiresInSeconds?: number | undefined;
887
+ stream?: BrowserFrameStreamOptions | undefined;
888
+ };
889
+ export type BrowserActionRequest = {
890
+ operationId: string;
891
+ targetId: string;
892
+ expectedTargetGeneration: string;
893
+ expectedDocumentGeneration: string | null;
894
+ expectedFrameId: string | null;
895
+ observationMode?: "full" | "none" | undefined;
896
+ action: BrowserAction | BrowserActionBatch;
897
+ };
898
+ export type BrowserActionReceipt = {
899
+ protocolVersion: typeof INTERACTION_PROTOCOL_VERSION;
900
+ operationId: string;
901
+ browserSessionId: string;
902
+ controllerGeneration: string;
903
+ targetId: string;
904
+ state: InteractionOperationState;
905
+ dispatchedAt: string | null;
906
+ settledAt: string | null;
907
+ observation: BrowserObservation | null;
908
+ error: InteractionError | null;
909
+ };
910
+ export type BrowserSessionHeartbeatResponse = {
911
+ browserSessionId: string;
912
+ controllerGeneration: string;
913
+ alive: true;
914
+ };
915
+ export type ComputerSessionCapabilities = {
916
+ semanticObservation: boolean;
917
+ appDiscovery: boolean;
918
+ appLaunch: boolean;
919
+ windowCapture: boolean;
920
+ screenCapture: boolean;
921
+ semanticActions: boolean;
922
+ pointerInput: boolean;
923
+ keyboardInput: boolean;
924
+ clipboard: boolean;
925
+ backgroundActions: boolean;
926
+ parallelApps: boolean;
927
+ };
928
+ export type ComputerClipboard = {
929
+ computerSessionId: string;
930
+ controllerGeneration: string;
931
+ text: string | null;
932
+ truncated: boolean;
933
+ observedAt: string;
934
+ };
935
+ export type ComputerSession = {
936
+ id: string;
937
+ accountId: string;
938
+ workspaceId: string;
939
+ name: string;
940
+ lifecycle: InteractionLifecycle;
941
+ placement: InteractionPlacement;
942
+ controller: InteractionControllerBinding | null;
943
+ platform: "linux" | "macos" | "windows" | null;
944
+ adapter: string | null;
945
+ seatId: string | null;
946
+ displayId: string | null;
947
+ capabilities: ComputerSessionCapabilities | null;
948
+ associations: InteractionAssociation[];
949
+ createdBySubjectId: string;
950
+ createdAt: string;
951
+ lastUsedAt: string;
952
+ failureCode: string | null;
953
+ };
954
+ export type ComputerTarget = {
955
+ id: string;
956
+ computerSessionId: string;
957
+ controllerGeneration: string;
958
+ targetGeneration: string;
959
+ kind: "app" | "window" | "screen";
960
+ applicationId: string | null;
961
+ processId: number | null;
962
+ title: string;
963
+ bounds: InteractionRect | null;
964
+ focused: boolean;
965
+ };
966
+ export type ComputerObservation = {
967
+ protocolVersion: typeof INTERACTION_PROTOCOL_VERSION;
968
+ observationId: string;
969
+ computerSessionId: string;
970
+ target: ComputerTarget;
971
+ frameId: string | null;
972
+ semantic: InteractionSemanticSnapshot | InteractionSemanticDiff | null;
973
+ screenshot: RetainedArtifactReference | null;
974
+ focusedRef: string | null;
975
+ changedRegions: InteractionRect[];
976
+ observedAt: string;
977
+ };
978
+ export type ComputerLocator = {
979
+ kind: "ref";
980
+ ref: string;
981
+ } | {
982
+ kind: "role";
983
+ role: string;
984
+ name?: string | undefined;
985
+ exact?: boolean | undefined;
986
+ } | {
987
+ kind: "label";
988
+ text: string;
989
+ exact?: boolean | undefined;
990
+ } | {
991
+ kind: "text";
992
+ text: string;
993
+ exact?: boolean | undefined;
994
+ } | {
995
+ kind: "identifier";
996
+ value: string;
997
+ };
998
+ export type ComputerAction = {
999
+ type: "semantic";
1000
+ locator: ComputerLocator;
1001
+ action: "invoke" | "focus" | "set_value" | "increment" | "decrement" | "select" | "deselect" | "expand" | "collapse" | "show_menu" | "scroll_into_view";
1002
+ value?: string | number | boolean | undefined;
1003
+ } | {
1004
+ type: "pointer";
1005
+ frameId: string;
1006
+ action: "click" | "double_click" | "move" | "scroll" | "drag";
1007
+ x: number;
1008
+ y: number;
1009
+ endX?: number | undefined;
1010
+ endY?: number | undefined;
1011
+ deltaX?: number | undefined;
1012
+ deltaY?: number | undefined;
1013
+ button?: "left" | "right" | "middle" | undefined;
1014
+ } | {
1015
+ type: "keyboard";
1016
+ action: "type" | "press";
1017
+ value: string;
1018
+ } | {
1019
+ type: "clipboard";
1020
+ operation: "write" | "clear" | "copy" | "paste";
1021
+ text?: string | undefined;
1022
+ } | {
1023
+ type: "focus";
1024
+ targetId: string;
1025
+ } | {
1026
+ type: "launch";
1027
+ applicationId: string;
1028
+ };
1029
+ export type CreateComputerSessionRequest = {
1030
+ operationId: string;
1031
+ sessionId: string;
1032
+ name?: string | undefined;
1033
+ placement?: InteractionPlacement | undefined;
1034
+ };
1035
+ export type ComputerSessionListResponse = {
1036
+ revision: number;
1037
+ sessions: ComputerSession[];
1038
+ };
1039
+ export type ComputerSessionMutationResponse = {
1040
+ session: ComputerSession;
1041
+ operation: InteractionLifecycleOperationReceipt;
1042
+ };
1043
+ export type ComputerSessionLifecycleRequest = {
1044
+ operationId: string;
1045
+ };
1046
+ export type ComputerTargetListResponse = {
1047
+ computerSessionId: string;
1048
+ controllerGeneration: string;
1049
+ targets: ComputerTarget[];
1050
+ };
1051
+ export type InteractionFrameStreamOptions = {
1052
+ format?: "jpeg" | "png" | undefined;
1053
+ quality?: number | undefined;
1054
+ maxWidth?: number | undefined;
1055
+ maxHeight?: number | undefined;
1056
+ everyNthFrame?: number | undefined;
1057
+ };
1058
+ export type ComputerFrameStreamOptions = InteractionFrameStreamOptions;
1059
+ export type ComputerSessionAttachment = {
1060
+ computerSessionId: string;
1061
+ controllerGeneration: string;
1062
+ targetId: string;
1063
+ stream: ComputerFrameStreamAttachment;
1064
+ expiresAt: string;
1065
+ };
1066
+ export type ComputerSessionAttachmentRequest = {
1067
+ targetId: string;
1068
+ expiresInSeconds?: number | undefined;
1069
+ stream?: ComputerFrameStreamOptions | undefined;
1070
+ };
1071
+ export type ComputerActionRequest = {
1072
+ operationId: string;
1073
+ targetId: string;
1074
+ expectedTargetGeneration: string;
1075
+ expectedObservationId: string | null;
1076
+ expectedFrameId: string | null;
1077
+ action: ComputerAction;
1078
+ };
1079
+ export type ComputerActionReceipt = {
1080
+ protocolVersion: typeof INTERACTION_PROTOCOL_VERSION;
1081
+ operationId: string;
1082
+ computerSessionId: string;
1083
+ controllerGeneration: string;
1084
+ targetId: string;
1085
+ state: InteractionOperationState;
1086
+ dispatchedAt: string | null;
1087
+ settledAt: string | null;
1088
+ observation: ComputerObservation | null;
1089
+ error: InteractionError | null;
1090
+ };
1091
+ export type ComputerSessionHeartbeatResponse = {
1092
+ computerSessionId: string;
1093
+ controllerGeneration: string;
1094
+ alive: true;
1095
+ };
1096
+ export type BrowserDiagnosticsOptions = {
1097
+ kinds?: BrowserDiagnosticKind[] | undefined;
1098
+ after?: number | undefined;
1099
+ limit?: number | undefined;
1100
+ signal?: AbortSignal | undefined;
1101
+ };
1102
+ /** The exact HTTP surface needed by the framework-free interaction client. */
1103
+ export interface InteractionTransport {
1104
+ listNetworkRoutes(workspaceId: string, options?: NetworkRouteListOptions): Promise<NetworkRouteListResponse>;
1105
+ getNetworkRoute(workspaceId: string, networkRouteId: string, options?: OpenGeniRequestOptions): Promise<NetworkRoute>;
1106
+ createNetworkRoute(workspaceId: string, request: CreateNetworkRouteRequest, options?: OpenGeniRequestOptions): Promise<NetworkRouteMutationResponse>;
1107
+ updateNetworkRoute(workspaceId: string, networkRouteId: string, request: UpdateNetworkRouteRequest, options?: OpenGeniRequestOptions): Promise<NetworkRouteMutationResponse>;
1108
+ listSiteAuthConnections(workspaceId: string, options?: SiteAuthConnectionListOptions): Promise<SiteAuthConnectionListResponse>;
1109
+ getSiteAuthConnection(workspaceId: string, siteAuthConnectionId: string, options?: OpenGeniRequestOptions): Promise<SiteAuthConnection>;
1110
+ createSiteAuthConnection(workspaceId: string, request: CreateSiteAuthConnectionRequest, options?: OpenGeniRequestOptions): Promise<SiteAuthConnectionMutationResponse>;
1111
+ updateSiteAuthConnection(workspaceId: string, siteAuthConnectionId: string, request: UpdateSiteAuthConnectionRequest, options?: OpenGeniRequestOptions): Promise<SiteAuthConnectionMutationResponse>;
1112
+ listAuthRuns(workspaceId: string, options?: AuthRunListOptions): Promise<AuthRunListResponse>;
1113
+ getAuthRun(workspaceId: string, authRunId: string, options?: OpenGeniRequestOptions): Promise<AuthRun>;
1114
+ startBrowserAuthRun(workspaceId: string, browserSessionId: string, request: StartAuthRunRequest, options?: OpenGeniRequestOptions): Promise<AuthRunMutationResponse>;
1115
+ reportBrowserAuthRun(workspaceId: string, browserSessionId: string, authRunId: string, request: ReportAuthRunRequest, options?: OpenGeniRequestOptions): Promise<AuthRunMutationResponse>;
1116
+ protectedBrowserAuthFill(workspaceId: string, browserSessionId: string, authRunId: string, request: ProtectedAuthFillRequest, options?: OpenGeniRequestOptions): Promise<ProtectedAuthFillResponse>;
1117
+ advanceExternalBrowserAuthRun(workspaceId: string, browserSessionId: string, authRunId: string, request: ExternalAuthRunRequest, options?: OpenGeniRequestOptions): Promise<ExternalAuthRunResponse>;
1118
+ openExternalBrowserAuthFlow(workspaceId: string, browserSessionId: string, authRunId: string, request: ExternalAuthInteractiveRequest, options?: OpenGeniRequestOptions): Promise<ExternalAuthInteractiveResponse>;
1119
+ verifyBrowserAuthRun(workspaceId: string, browserSessionId: string, authRunId: string, request: VerifyAuthRunRequest, options?: OpenGeniRequestOptions): Promise<AuthRunMutationResponse>;
1120
+ listInteractionInterventions(workspaceId: string, options?: InteractionInterventionListOptions): Promise<InteractionInterventionListResponse>;
1121
+ getInteractionIntervention(workspaceId: string, interventionId: string, options?: OpenGeniRequestOptions): Promise<InteractionIntervention>;
1122
+ createInteractionIntervention(workspaceId: string, request: CreateInteractionInterventionRequest, options?: OpenGeniRequestOptions): Promise<InteractionInterventionMutationResponse>;
1123
+ resolveInteractionIntervention(workspaceId: string, interventionId: string, request: ResolveInteractionInterventionRequest, options?: OpenGeniRequestOptions): Promise<InteractionInterventionMutationResponse>;
1124
+ listAttachedBrowsers(workspaceId: string, options?: AttachedBrowserDeviceListOptions): Promise<AttachedBrowserDeviceListResponse>;
1125
+ getAttachedBrowser(workspaceId: string, deviceId: string, options?: OpenGeniRequestOptions): Promise<AttachedBrowserDevice>;
1126
+ listBrowserIdentities(workspaceId: string, options?: BrowserIdentityListOptions): Promise<BrowserIdentityListResponse>;
1127
+ getBrowserIdentity(workspaceId: string, identityId: string, options?: OpenGeniRequestOptions): Promise<BrowserIdentity>;
1128
+ createBrowserIdentity(workspaceId: string, request: CreateBrowserIdentityRequest, options?: OpenGeniRequestOptions): Promise<BrowserIdentityMutationResponse>;
1129
+ updateBrowserIdentity(workspaceId: string, identityId: string, request: UpdateBrowserIdentityRequest, options?: OpenGeniRequestOptions): Promise<BrowserIdentityMutationResponse>;
1130
+ listBrowserRevisions(workspaceId: string, identityId: string, options?: OpenGeniRequestOptions): Promise<BrowserRevisionListResponse>;
1131
+ listBrowserSessions(workspaceId: string, options?: OpenGeniRequestOptions): Promise<BrowserSessionListResponse>;
1132
+ getBrowserSession(workspaceId: string, browserSessionId: string, options?: OpenGeniRequestOptions): Promise<BrowserSession>;
1133
+ readBrowserClipboard(workspaceId: string, browserSessionId: string, options?: OpenGeniRequestOptions): Promise<BrowserClipboard>;
1134
+ listBrowserDownloads(workspaceId: string, browserSessionId: string, options?: OpenGeniRequestOptions): Promise<BrowserDownloadListResponse>;
1135
+ getBrowserDownload(workspaceId: string, browserSessionId: string, downloadId: string, options?: OpenGeniRequestOptions): Promise<BrowserDownload>;
1136
+ saveBrowserDownload(workspaceId: string, browserSessionId: string, downloadId: string, request: BrowserDownloadSaveRequest, options?: OpenGeniRequestOptions): Promise<BrowserDownloadSaveResponse>;
1137
+ createBrowserSession(workspaceId: string, request: CreateBrowserSessionRequest, options?: OpenGeniRequestOptions): Promise<BrowserSessionMutationResponse>;
1138
+ listBrowserTargets(workspaceId: string, browserSessionId: string, options?: OpenGeniRequestOptions): Promise<BrowserTargetListResponse>;
1139
+ openBrowserTarget(workspaceId: string, browserSessionId: string, request?: BrowserOpenTargetRequest, options?: OpenGeniRequestOptions): Promise<BrowserObservation>;
1140
+ selectBrowserTarget(workspaceId: string, browserSessionId: string, targetId: string, options?: OpenGeniRequestOptions): Promise<BrowserObservation>;
1141
+ closeBrowserTarget(workspaceId: string, browserSessionId: string, targetId: string, options?: OpenGeniRequestOptions): Promise<BrowserTargetListResponse>;
1142
+ observeBrowserTarget(workspaceId: string, browserSessionId: string, targetId: string, options?: OpenGeniRequestOptions): Promise<BrowserObservation>;
1143
+ actInBrowser(workspaceId: string, browserSessionId: string, request: BrowserActionRequest, options?: OpenGeniRequestOptions): Promise<BrowserActionReceipt>;
1144
+ getBrowserActionReceipt(workspaceId: string, browserSessionId: string, operationId: string, options?: OpenGeniRequestOptions): Promise<BrowserActionReceipt>;
1145
+ listBrowserDiagnostics(workspaceId: string, browserSessionId: string, targetId: string, options?: BrowserDiagnosticsOptions): Promise<BrowserDiagnosticBatch>;
1146
+ attachBrowserSession(workspaceId: string, browserSessionId: string, request: BrowserSessionAttachmentRequest, options?: OpenGeniRequestOptions): Promise<BrowserSessionAttachment>;
1147
+ heartbeatBrowserSession(workspaceId: string, browserSessionId: string, options?: OpenGeniRequestOptions): Promise<BrowserSessionHeartbeatResponse>;
1148
+ publishBrowserRevision(workspaceId: string, browserSessionId: string, request: PublishBrowserRevisionRequest, options?: OpenGeniRequestOptions): Promise<PublishBrowserRevisionResponse>;
1149
+ suspendBrowserSession(workspaceId: string, browserSessionId: string, request: BrowserSessionLifecycleRequest, options?: OpenGeniRequestOptions): Promise<BrowserSessionMutationResponse>;
1150
+ resumeBrowserSession(workspaceId: string, browserSessionId: string, request: BrowserSessionLifecycleRequest, options?: OpenGeniRequestOptions): Promise<BrowserSessionMutationResponse>;
1151
+ endBrowserSession(workspaceId: string, browserSessionId: string, request: BrowserSessionLifecycleRequest, options?: OpenGeniRequestOptions): Promise<BrowserSessionMutationResponse>;
1152
+ listComputerSessions(workspaceId: string, options?: OpenGeniRequestOptions): Promise<ComputerSessionListResponse>;
1153
+ getComputerSession(workspaceId: string, computerSessionId: string, options?: OpenGeniRequestOptions): Promise<ComputerSession>;
1154
+ readComputerClipboard(workspaceId: string, computerSessionId: string, options?: OpenGeniRequestOptions): Promise<ComputerClipboard>;
1155
+ createComputerSession(workspaceId: string, request: CreateComputerSessionRequest, options?: OpenGeniRequestOptions): Promise<ComputerSessionMutationResponse>;
1156
+ listComputerTargets(workspaceId: string, computerSessionId: string, options?: OpenGeniRequestOptions): Promise<ComputerTargetListResponse>;
1157
+ observeComputerTarget(workspaceId: string, computerSessionId: string, targetId: string, options?: OpenGeniRequestOptions): Promise<ComputerObservation>;
1158
+ actInComputer(workspaceId: string, computerSessionId: string, request: ComputerActionRequest, options?: OpenGeniRequestOptions): Promise<ComputerActionReceipt>;
1159
+ getComputerActionReceipt(workspaceId: string, computerSessionId: string, operationId: string, options?: OpenGeniRequestOptions): Promise<ComputerActionReceipt>;
1160
+ attachComputerSession(workspaceId: string, computerSessionId: string, request: ComputerSessionAttachmentRequest, options?: OpenGeniRequestOptions): Promise<ComputerSessionAttachment>;
1161
+ heartbeatComputerSession(workspaceId: string, computerSessionId: string, options?: OpenGeniRequestOptions): Promise<ComputerSessionHeartbeatResponse>;
1162
+ endComputerSession(workspaceId: string, computerSessionId: string, request: ComputerSessionLifecycleRequest, options?: OpenGeniRequestOptions): Promise<ComputerSessionMutationResponse>;
1163
+ }
1164
+ /** @deprecated Use InteractionTransport. */
1165
+ export type BrowserInteractionTransport = InteractionTransport;
1166
+ export type BrowserIdentityListOptions = OpenGeniRequestOptions & {
1167
+ includeArchived?: boolean | undefined;
1168
+ };
1169
+ export type NetworkRouteListOptions = OpenGeniRequestOptions & {
1170
+ includeArchived?: boolean | undefined;
1171
+ };
1172
+ export type SiteAuthConnectionListOptions = OpenGeniRequestOptions & {
1173
+ includeArchived?: boolean | undefined;
1174
+ };
1175
+ export type AuthRunListOptions = OpenGeniRequestOptions & {
1176
+ browserSessionId?: string | undefined;
1177
+ siteAuthConnectionId?: string | undefined;
1178
+ includeSettled?: boolean | undefined;
1179
+ };
1180
+ export type InteractionInterventionListOptions = OpenGeniRequestOptions & {
1181
+ resourceKind?: "browser_session" | "computer_session" | undefined;
1182
+ resourceId?: string | undefined;
1183
+ includeSettled?: boolean | undefined;
1184
+ };
1185
+ export type AttachedBrowserDeviceListOptions = OpenGeniRequestOptions & {
1186
+ includeDisconnected?: boolean | undefined;
1187
+ };
1188
+ export type BrowserDownloadSaveOptions = OpenGeniRequestOptions & {
1189
+ operationId?: string | undefined;
1190
+ overwrite?: boolean | undefined;
1191
+ };
1192
+ export type CurrentOrOpenBrowserOptions = {
1193
+ workspaceId: string;
1194
+ associationSessionId: string;
1195
+ operationId?: string | undefined;
1196
+ name?: string | undefined;
1197
+ initialUrl?: string | undefined;
1198
+ headless?: boolean | undefined;
1199
+ placement?: InteractionPlacement | undefined;
1200
+ identityId?: string | undefined;
1201
+ baseRevisionId?: string | undefined;
1202
+ networkRouteId?: string | undefined;
1203
+ linkedComputerSessionId?: string | undefined;
1204
+ signal?: AbortSignal | undefined;
1205
+ };
1206
+ export type CurrentOrOpenComputerOptions = {
1207
+ workspaceId: string;
1208
+ associationSessionId: string;
1209
+ operationId?: string | undefined;
1210
+ name?: string | undefined;
1211
+ placement?: InteractionPlacement | undefined;
1212
+ signal?: AbortSignal | undefined;
1213
+ };
1214
+ /** Framework-free resource facade over the public interaction HTTP API. */
1215
+ export declare class OpenGeniInteractionClient {
1216
+ readonly attachedBrowsers: AttachedBrowserDeviceCollection;
1217
+ readonly authRuns: AuthRunCollection;
1218
+ readonly browsers: BrowserSessionCollection;
1219
+ readonly computers: ComputerSessionCollection;
1220
+ readonly identities: BrowserIdentityCollection;
1221
+ readonly interventions: InteractionInterventionCollection;
1222
+ readonly networkRoutes: NetworkRouteCollection;
1223
+ readonly siteAuthConnections: SiteAuthConnectionCollection;
1224
+ constructor(transport: BrowserInteractionTransport);
1225
+ }
1226
+ export declare class NetworkRouteCollection {
1227
+ private readonly transport;
1228
+ constructor(transport: BrowserInteractionTransport);
1229
+ list(workspaceId: string, options?: NetworkRouteListOptions): Promise<NetworkRouteListResponse>;
1230
+ route(workspaceId: string, networkRouteId: string): NetworkRouteResource;
1231
+ create(workspaceId: string, request: CreateNetworkRouteRequest, options?: OpenGeniRequestOptions): Promise<NetworkRouteResource>;
1232
+ }
1233
+ export declare class NetworkRouteResource {
1234
+ private readonly transport;
1235
+ readonly workspaceId: string;
1236
+ readonly id: string;
1237
+ constructor(transport: BrowserInteractionTransport, workspaceId: string, id: string);
1238
+ get(options?: OpenGeniRequestOptions): Promise<NetworkRoute>;
1239
+ update(request: UpdateNetworkRouteRequest, options?: OpenGeniRequestOptions): Promise<NetworkRouteMutationResponse>;
1240
+ }
1241
+ export declare class SiteAuthConnectionCollection {
1242
+ private readonly transport;
1243
+ constructor(transport: BrowserInteractionTransport);
1244
+ list(workspaceId: string, options?: SiteAuthConnectionListOptions): Promise<SiteAuthConnectionListResponse>;
1245
+ connection(workspaceId: string, connectionId: string): SiteAuthConnectionResource;
1246
+ create(workspaceId: string, request: CreateSiteAuthConnectionRequest, options?: OpenGeniRequestOptions): Promise<SiteAuthConnectionResource>;
1247
+ }
1248
+ export declare class SiteAuthConnectionResource {
1249
+ private readonly transport;
1250
+ readonly workspaceId: string;
1251
+ readonly id: string;
1252
+ constructor(transport: BrowserInteractionTransport, workspaceId: string, id: string);
1253
+ get(options?: OpenGeniRequestOptions): Promise<SiteAuthConnection>;
1254
+ update(request: UpdateSiteAuthConnectionRequest, options?: OpenGeniRequestOptions): Promise<SiteAuthConnectionMutationResponse>;
1255
+ }
1256
+ export declare class AuthRunCollection {
1257
+ private readonly transport;
1258
+ constructor(transport: BrowserInteractionTransport);
1259
+ list(workspaceId: string, options?: AuthRunListOptions): Promise<AuthRunListResponse>;
1260
+ get(workspaceId: string, authRunId: string, options?: OpenGeniRequestOptions): Promise<AuthRun>;
1261
+ run(workspaceId: string, browserSessionId: string, authRunId: string): AuthRunResource;
1262
+ }
1263
+ export declare class BrowserAuthRunCollection {
1264
+ private readonly transport;
1265
+ readonly workspaceId: string;
1266
+ readonly browserSessionId: string;
1267
+ constructor(transport: BrowserInteractionTransport, workspaceId: string, browserSessionId: string);
1268
+ list(options?: Omit<AuthRunListOptions, "browserSessionId">): Promise<AuthRunListResponse>;
1269
+ run(authRunId: string): AuthRunResource;
1270
+ start(request: StartAuthRunRequest, options?: OpenGeniRequestOptions): Promise<AuthRunResource>;
1271
+ }
1272
+ export declare class AuthRunResource {
1273
+ private readonly transport;
1274
+ readonly workspaceId: string;
1275
+ readonly browserSessionId: string;
1276
+ readonly id: string;
1277
+ constructor(transport: BrowserInteractionTransport, workspaceId: string, browserSessionId: string, id: string);
1278
+ get(options?: OpenGeniRequestOptions): Promise<AuthRun>;
1279
+ report(request: ReportAuthRunRequest, options?: OpenGeniRequestOptions): Promise<AuthRunMutationResponse>;
1280
+ protectedFill(request: ProtectedAuthFillRequest, options?: OpenGeniRequestOptions): Promise<ProtectedAuthFillResponse>;
1281
+ advanceExternal(request: ExternalAuthRunRequest, options?: OpenGeniRequestOptions): Promise<ExternalAuthRunResponse>;
1282
+ /** Human-session helper. Hosted provider URLs never appear in model tools. */
1283
+ openExternalFlow(request: ExternalAuthInteractiveRequest, options?: OpenGeniRequestOptions): Promise<ExternalAuthInteractiveResponse>;
1284
+ verify(request: VerifyAuthRunRequest, options?: OpenGeniRequestOptions): Promise<AuthRunMutationResponse>;
1285
+ }
1286
+ export declare class InteractionInterventionCollection {
1287
+ private readonly transport;
1288
+ constructor(transport: BrowserInteractionTransport);
1289
+ list(workspaceId: string, options?: InteractionInterventionListOptions): Promise<InteractionInterventionListResponse>;
1290
+ intervention(workspaceId: string, interventionId: string): InteractionInterventionResource;
1291
+ create(workspaceId: string, request: CreateInteractionInterventionRequest, options?: OpenGeniRequestOptions): Promise<InteractionInterventionResource>;
1292
+ }
1293
+ export declare class InteractionInterventionResource {
1294
+ private readonly transport;
1295
+ readonly workspaceId: string;
1296
+ readonly id: string;
1297
+ constructor(transport: BrowserInteractionTransport, workspaceId: string, id: string);
1298
+ get(options?: OpenGeniRequestOptions): Promise<InteractionIntervention>;
1299
+ resolve(request: ResolveInteractionInterventionRequest, options?: OpenGeniRequestOptions): Promise<InteractionInterventionMutationResponse>;
1300
+ }
1301
+ export declare class AttachedBrowserDeviceCollection {
1302
+ private readonly transport;
1303
+ constructor(transport: BrowserInteractionTransport);
1304
+ list(workspaceId: string, options?: AttachedBrowserDeviceListOptions): Promise<AttachedBrowserDeviceListResponse>;
1305
+ device(workspaceId: string, deviceId: string): AttachedBrowserDeviceResource;
1306
+ }
1307
+ export declare class AttachedBrowserDeviceResource {
1308
+ private readonly transport;
1309
+ readonly workspaceId: string;
1310
+ readonly id: string;
1311
+ constructor(transport: BrowserInteractionTransport, workspaceId: string, id: string);
1312
+ get(options?: OpenGeniRequestOptions): Promise<AttachedBrowserDevice>;
1313
+ }
1314
+ export declare class BrowserIdentityCollection {
1315
+ private readonly transport;
1316
+ constructor(transport: BrowserInteractionTransport);
1317
+ list(workspaceId: string, options?: BrowserIdentityListOptions): Promise<BrowserIdentityListResponse>;
1318
+ identity(workspaceId: string, identityId: string): BrowserIdentityResource;
1319
+ create(workspaceId: string, request: CreateBrowserIdentityRequest, options?: OpenGeniRequestOptions): Promise<BrowserIdentityResource>;
1320
+ }
1321
+ export declare class BrowserIdentityResource {
1322
+ private readonly transport;
1323
+ readonly workspaceId: string;
1324
+ readonly id: string;
1325
+ constructor(transport: BrowserInteractionTransport, workspaceId: string, id: string);
1326
+ get(options?: OpenGeniRequestOptions): Promise<BrowserIdentity>;
1327
+ revisions(options?: OpenGeniRequestOptions): Promise<BrowserRevisionListResponse>;
1328
+ update(request: UpdateBrowserIdentityRequest, options?: OpenGeniRequestOptions): Promise<BrowserIdentityMutationResponse>;
1329
+ }
1330
+ export declare class BrowserSessionCollection {
1331
+ private readonly transport;
1332
+ constructor(transport: BrowserInteractionTransport);
1333
+ list(workspaceId: string, options?: OpenGeniRequestOptions): Promise<BrowserSessionListResponse>;
1334
+ session(workspaceId: string, browserSessionId: string): BrowserSessionResource;
1335
+ open(workspaceId: string, request: CreateBrowserSessionRequest, options?: OpenGeniRequestOptions): Promise<BrowserSessionResource>;
1336
+ currentOrOpen(options: CurrentOrOpenBrowserOptions): Promise<BrowserSessionResource>;
1337
+ }
1338
+ export declare class BrowserSessionResource {
1339
+ private readonly transport;
1340
+ readonly workspaceId: string;
1341
+ readonly id: string;
1342
+ readonly auth: BrowserAuthRunCollection;
1343
+ readonly clipboard: BrowserClipboardResource;
1344
+ readonly downloads: BrowserDownloadCollection;
1345
+ readonly tabs: BrowserTargetCollection;
1346
+ /** Alias for hosts that prefer the protocol term. */
1347
+ readonly targets: BrowserTargetCollection;
1348
+ constructor(transport: BrowserInteractionTransport, workspaceId: string, id: string);
1349
+ get(options?: OpenGeniRequestOptions): Promise<BrowserSession>;
1350
+ observe(targetId: string, options?: OpenGeniRequestOptions): Promise<BrowserObservation>;
1351
+ act(request: BrowserActionRequest, options?: OpenGeniRequestOptions): Promise<BrowserActionReceipt>;
1352
+ receipt(operationId: string, options?: OpenGeniRequestOptions): Promise<BrowserActionReceipt>;
1353
+ diagnostics(targetId: string, options?: BrowserDiagnosticsOptions): Promise<BrowserDiagnosticBatch>;
1354
+ attach(request: BrowserSessionAttachmentRequest, options?: OpenGeniRequestOptions): Promise<BrowserSessionAttachment>;
1355
+ heartbeat(options?: OpenGeniRequestOptions): Promise<BrowserSessionHeartbeatResponse>;
1356
+ publishRevision(request: PublishBrowserRevisionRequest, options?: OpenGeniRequestOptions): Promise<PublishBrowserRevisionResponse>;
1357
+ suspend(request?: BrowserSessionLifecycleRequest, options?: OpenGeniRequestOptions): Promise<BrowserSessionMutationResponse>;
1358
+ resume(request?: BrowserSessionLifecycleRequest, options?: OpenGeniRequestOptions): Promise<BrowserSessionMutationResponse>;
1359
+ end(request?: BrowserSessionLifecycleRequest, options?: OpenGeniRequestOptions): Promise<BrowserSessionMutationResponse>;
1360
+ }
1361
+ export declare class BrowserClipboardResource {
1362
+ private readonly transport;
1363
+ readonly workspaceId: string;
1364
+ readonly browserSessionId: string;
1365
+ constructor(transport: BrowserInteractionTransport, workspaceId: string, browserSessionId: string);
1366
+ read(options?: OpenGeniRequestOptions): Promise<BrowserClipboard>;
1367
+ }
1368
+ export declare class BrowserDownloadCollection {
1369
+ private readonly transport;
1370
+ readonly workspaceId: string;
1371
+ readonly browserSessionId: string;
1372
+ constructor(transport: BrowserInteractionTransport, workspaceId: string, browserSessionId: string);
1373
+ list(options?: OpenGeniRequestOptions): Promise<BrowserDownloadListResponse>;
1374
+ download(downloadId: string): BrowserDownloadResource;
1375
+ }
1376
+ export declare class BrowserDownloadResource {
1377
+ private readonly transport;
1378
+ readonly workspaceId: string;
1379
+ readonly browserSessionId: string;
1380
+ readonly id: string;
1381
+ constructor(transport: BrowserInteractionTransport, workspaceId: string, browserSessionId: string, id: string);
1382
+ get(options?: OpenGeniRequestOptions): Promise<BrowserDownload>;
1383
+ /** Publish this exact private browser download into the source session's
1384
+ * workspace. Pass an operationId when the caller needs retry identity across
1385
+ * process boundaries; otherwise one is generated for this call. */
1386
+ saveToWorkspace(destinationPath: string, options?: BrowserDownloadSaveOptions): Promise<BrowserDownloadSaveResponse>;
1387
+ }
1388
+ export declare class BrowserTargetCollection {
1389
+ private readonly transport;
1390
+ private readonly workspaceId;
1391
+ private readonly browserSessionId;
1392
+ constructor(transport: BrowserInteractionTransport, workspaceId: string, browserSessionId: string);
1393
+ list(options?: OpenGeniRequestOptions): Promise<BrowserTargetListResponse>;
1394
+ open(url?: string, options?: OpenGeniRequestOptions): Promise<BrowserObservation>;
1395
+ select(targetId: string, options?: OpenGeniRequestOptions): Promise<BrowserObservation>;
1396
+ close(targetId: string, options?: OpenGeniRequestOptions): Promise<BrowserTargetListResponse>;
1397
+ }
1398
+ export declare class ComputerSessionCollection {
1399
+ private readonly transport;
1400
+ constructor(transport: BrowserInteractionTransport);
1401
+ list(workspaceId: string, options?: OpenGeniRequestOptions): Promise<ComputerSessionListResponse>;
1402
+ session(workspaceId: string, computerSessionId: string): ComputerSessionResource;
1403
+ open(workspaceId: string, request: CreateComputerSessionRequest, options?: OpenGeniRequestOptions): Promise<ComputerSessionResource>;
1404
+ currentOrOpen(options: CurrentOrOpenComputerOptions): Promise<ComputerSessionResource>;
1405
+ }
1406
+ export declare class ComputerSessionResource {
1407
+ private readonly transport;
1408
+ readonly workspaceId: string;
1409
+ readonly id: string;
1410
+ readonly targets: ComputerTargetCollection;
1411
+ /** Native application/window targets are also the public app collection. */
1412
+ readonly apps: ComputerTargetCollection;
1413
+ readonly clipboard: ComputerClipboardResource;
1414
+ constructor(transport: BrowserInteractionTransport, workspaceId: string, id: string);
1415
+ get(options?: OpenGeniRequestOptions): Promise<ComputerSession>;
1416
+ observe(targetId: string, options?: OpenGeniRequestOptions): Promise<ComputerObservation>;
1417
+ act(request: ComputerActionRequest, options?: OpenGeniRequestOptions): Promise<ComputerActionReceipt>;
1418
+ receipt(operationId: string, options?: OpenGeniRequestOptions): Promise<ComputerActionReceipt>;
1419
+ attach(request: ComputerSessionAttachmentRequest, options?: OpenGeniRequestOptions): Promise<ComputerSessionAttachment>;
1420
+ heartbeat(options?: OpenGeniRequestOptions): Promise<ComputerSessionHeartbeatResponse>;
1421
+ end(request?: ComputerSessionLifecycleRequest, options?: OpenGeniRequestOptions): Promise<ComputerSessionMutationResponse>;
1422
+ }
1423
+ export declare class ComputerClipboardResource {
1424
+ private readonly transport;
1425
+ readonly workspaceId: string;
1426
+ readonly computerSessionId: string;
1427
+ constructor(transport: BrowserInteractionTransport, workspaceId: string, computerSessionId: string);
1428
+ read(options?: OpenGeniRequestOptions): Promise<ComputerClipboard>;
1429
+ }
1430
+ export declare class ComputerTargetCollection {
1431
+ private readonly transport;
1432
+ private readonly workspaceId;
1433
+ private readonly computerSessionId;
1434
+ constructor(transport: BrowserInteractionTransport, workspaceId: string, computerSessionId: string);
1435
+ list(options?: OpenGeniRequestOptions): Promise<ComputerTargetListResponse>;
1436
+ }
1437
+ export type BrowserFrameMetadata = {
1438
+ frameId: string;
1439
+ browserSessionId: string;
1440
+ controllerGeneration: string;
1441
+ targetId: string;
1442
+ targetGeneration: string;
1443
+ documentGeneration: string;
1444
+ sequence: number;
1445
+ mediaType: "image/jpeg" | "image/png";
1446
+ width: number;
1447
+ height: number;
1448
+ deviceScaleFactor: number;
1449
+ scrollX: number;
1450
+ scrollY: number;
1451
+ capturedAt: string;
1452
+ };
1453
+ export type BrowserFrame = BrowserFrameMetadata & {
1454
+ data: Uint8Array;
1455
+ };
1456
+ export type ComputerFrameMetadata = {
1457
+ frameId: string;
1458
+ computerSessionId: string;
1459
+ controllerGeneration: string;
1460
+ targetId: string;
1461
+ targetGeneration: string;
1462
+ sequence: number;
1463
+ mediaType: "image/jpeg" | "image/png";
1464
+ width: number;
1465
+ height: number;
1466
+ capturedAt: string;
1467
+ sha256: string;
1468
+ };
1469
+ export type ComputerFrame = ComputerFrameMetadata & {
1470
+ data: Uint8Array;
1471
+ };
1472
+ export type BrowserFrameStreamOptions = InteractionFrameStreamOptions;
1473
+ /** Convert a short-lived HTTP attachment URL into its browser WebSocket URL. */
1474
+ export declare function browserFrameSocketUrl(attachment: BrowserSessionAttachment, options?: BrowserFrameStreamOptions): string;
1475
+ /** Convert a direct ComputerSession attachment into its WebSocket URL. */
1476
+ export declare function computerFrameSocketUrl(attachment: ComputerSessionAttachment, options?: ComputerFrameStreamOptions): string;
1477
+ /** Decode one bounded binary frame message from the placement controller. */
1478
+ export declare function decodeBrowserFrameMessage(message: ArrayBuffer | Uint8Array): BrowserFrame;
1479
+ /** Decode and authenticate one bounded ComputerSession frame. Computer frames
1480
+ * carry a content digest because native capture adapters may cross process and
1481
+ * relay boundaries before reaching the SDK. */
1482
+ export declare function decodeComputerFrameMessage(message: ArrayBuffer | Uint8Array): Promise<ComputerFrame>;
1483
+ export declare function parseBrowserFrameMetadata(value: unknown): BrowserFrameMetadata;
1484
+ export declare function parseComputerFrameMetadata(value: unknown): ComputerFrameMetadata;