@opengeni/sdk 3.3.2-canary.1 → 3.4.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.
- package/README.md +1007 -72
- package/dist/adapters/express.d.ts +31 -0
- package/dist/adapters/express.js +87 -0
- package/dist/adapters/express.js.map +1 -0
- package/dist/adapters/hono.d.ts +16 -0
- package/dist/adapters/hono.js +8 -0
- package/dist/adapters/hono.js.map +1 -0
- package/dist/adapters/next.d.ts +29 -0
- package/dist/adapters/next.js +22 -0
- package/dist/adapters/next.js.map +1 -0
- package/dist/allowance-refusal.d.ts +2 -0
- package/dist/allowance-refusal.js +50 -0
- package/dist/allowance-refusal.js.map +1 -0
- package/dist/app-links.d.ts +42 -0
- package/dist/app-links.js +66 -0
- package/dist/app-links.js.map +1 -0
- package/dist/artifact-catalog.d.ts +40 -0
- package/dist/artifact-client.d.ts +20 -8
- package/dist/artifacts.d.ts +1 -1
- package/dist/artifacts.js +8 -6
- package/dist/automations.js +8 -2
- package/dist/automations.js.map +1 -1
- package/dist/azure-live-transport.d.ts +32 -0
- package/dist/browser.d.ts +6 -2
- package/dist/browser.js +25 -5
- package/dist/chat/fold.d.ts +75 -0
- package/dist/chat/handler.d.ts +41 -0
- package/dist/chat/http.d.ts +67 -0
- package/dist/chat/ids.d.ts +34 -0
- package/dist/chat/index.d.ts +9 -0
- package/dist/chat/index.js +1369 -0
- package/dist/chat/index.js.map +1 -0
- package/dist/chat/openai.d.ts +30 -0
- package/dist/chat/opengeni.d.ts +129 -0
- package/dist/chat/types.d.ts +207 -0
- package/dist/chat/vercel.d.ts +49 -0
- package/dist/chats.d.ts +8 -0
- package/dist/chunk-4AHR4KGA.js +301 -0
- package/dist/chunk-4AHR4KGA.js.map +1 -0
- package/dist/chunk-6GYGMLX4.js +332 -0
- package/dist/chunk-6GYGMLX4.js.map +1 -0
- package/dist/chunk-7EWT3PV6.js +368 -0
- package/dist/chunk-7EWT3PV6.js.map +1 -0
- package/dist/chunk-FTWVVPR6.js +1665 -0
- package/dist/chunk-FTWVVPR6.js.map +1 -0
- package/dist/{chunk-VYCTL62C.js → chunk-GZQSWAKD.js} +1 -1
- package/dist/chunk-GZQSWAKD.js.map +1 -0
- package/dist/chunk-KGEABAID.js +71 -0
- package/dist/chunk-KGEABAID.js.map +1 -0
- package/dist/{chunk-YKZME56C.js → chunk-KWADQ227.js} +3 -3
- package/dist/{chunk-YKZME56C.js.map → chunk-KWADQ227.js.map} +1 -1
- package/dist/{chunk-E5BNEG2D.js → chunk-NCU5OAN7.js} +27 -2
- package/dist/chunk-NCU5OAN7.js.map +1 -0
- package/dist/{chunk-BESZFWMU.js → chunk-OI5YLASH.js} +73 -2
- package/dist/chunk-OI5YLASH.js.map +1 -0
- package/dist/chunk-OV3POE62.js +359 -0
- package/dist/chunk-OV3POE62.js.map +1 -0
- package/dist/chunk-P7UWKORG.js +561 -0
- package/dist/chunk-P7UWKORG.js.map +1 -0
- package/dist/chunk-QGEIL4TR.js +195 -0
- package/dist/chunk-QGEIL4TR.js.map +1 -0
- package/dist/{chunk-GY6RQPCG.js → chunk-S2NLS3ES.js} +3598 -1278
- package/dist/chunk-S2NLS3ES.js.map +1 -0
- package/dist/chunk-UM4ZXXJR.js +9 -0
- package/dist/chunk-UM4ZXXJR.js.map +1 -0
- package/dist/{chunk-TFCLHRZK.js → chunk-UME3X7CP.js} +28 -32
- package/dist/chunk-UME3X7CP.js.map +1 -0
- package/dist/chunk-VT4YM4XQ.js +210 -0
- package/dist/chunk-VT4YM4XQ.js.map +1 -0
- package/dist/chunk-WSYYXONG.js +1602 -0
- package/dist/chunk-WSYYXONG.js.map +1 -0
- package/dist/{chunk-6NEPJ7NC.js → chunk-WVCJRSGJ.js} +119 -14
- package/dist/chunk-WVCJRSGJ.js.map +1 -0
- package/dist/chunk-X5ITQVXE.js +15 -0
- package/dist/chunk-X5ITQVXE.js.map +1 -0
- package/dist/chunk-XA7HVIHI.js +126 -0
- package/dist/chunk-XA7HVIHI.js.map +1 -0
- package/dist/{chunk-QTBAMHEF.js → chunk-YJCHB7R3.js} +60 -12
- package/dist/chunk-YJCHB7R3.js.map +1 -0
- package/dist/chunk-YKIHNLWD.js +153 -0
- package/dist/chunk-YKIHNLWD.js.map +1 -0
- package/dist/chunk-ZDUBPV33.js +277 -0
- package/dist/chunk-ZDUBPV33.js.map +1 -0
- package/dist/client.d.ts +1056 -118
- package/dist/codex-realtime-controller.d.ts +13 -0
- package/dist/codex-realtime-controller.js +4 -2
- package/dist/codex-realtime-v3-wire.d.ts +3 -2
- package/dist/codex-realtime.d.ts +5 -1
- package/dist/company-brain.d.ts +1 -11
- package/dist/core.d.ts +6 -2
- package/dist/core.js +23 -6
- package/dist/deprecation.d.ts +47 -0
- package/dist/document-authority-client.d.ts +24 -2
- package/dist/document-authority.js +7 -5
- package/dist/editable-artifacts/index.d.ts +1 -1
- package/dist/editable-artifacts/types.d.ts +12 -2
- package/dist/editable-artifacts.js +19 -3
- package/dist/editable-artifacts.js.map +1 -1
- package/dist/embedding-client.d.ts +129 -0
- package/dist/errors.d.ts +64 -1
- package/dist/external-vault-receiver.d.ts +203 -0
- package/dist/external-vault-receiver.js +564 -0
- package/dist/external-vault-receiver.js.map +1 -0
- package/dist/feedback.d.ts +23 -0
- package/dist/gateway-realtime-transport.js +1 -1
- package/dist/github-repositories.d.ts +10 -0
- package/dist/github-repositories.js +36 -0
- package/dist/github-repositories.js.map +1 -0
- package/dist/index.d.ts +61 -11
- package/dist/index.js +555 -338
- package/dist/index.js.map +1 -1
- package/dist/insights-usage.d.ts +33 -0
- package/dist/insights-usage.js +7 -0
- package/dist/insights-usage.js.map +1 -0
- package/dist/interaction.d.ts +165 -71
- package/dist/interaction.js +2 -2
- package/dist/knowledge.d.ts +7 -0
- package/dist/knowledge.js +20 -0
- package/dist/knowledge.js.map +1 -0
- package/dist/known-tools.d.ts +4 -0
- package/dist/message-links.d.ts +68 -0
- package/dist/model-context.d.ts +68 -0
- package/dist/model-display.d.ts +2 -0
- package/dist/model-display.js +17 -0
- package/dist/model-display.js.map +1 -0
- package/dist/organization-integration-policy.d.ts +26 -0
- package/dist/organization-integration-policy.js +26 -0
- package/dist/organization-integration-policy.js.map +1 -0
- package/dist/pr-review-client.d.ts +1 -1
- package/dist/pr-review.d.ts +1 -1
- package/dist/pr-review.js.map +1 -1
- package/dist/preference-registry.d.ts +1 -1
- package/dist/prepared-mcp-setup.d.ts +5 -0
- package/dist/proxy.d.ts +13 -11
- package/dist/realtime.d.ts +1 -1
- package/dist/realtime.js +253 -7
- package/dist/realtime.js.map +1 -1
- package/dist/session-history-import.d.ts +22 -0
- package/dist/session-history-import.js +36 -0
- package/dist/session-history-import.js.map +1 -0
- package/dist/session-list-entries.d.ts +1 -0
- package/dist/session-list-entries.js +7 -0
- package/dist/session-list-entries.js.map +1 -0
- package/dist/session-message-search.d.ts +53 -0
- package/dist/session-proxy-client.d.ts +28 -0
- package/dist/session-proxy.d.ts +334 -0
- package/dist/session-proxy.js +24 -0
- package/dist/session-proxy.js.map +1 -0
- package/dist/session-titles.d.ts +2 -28
- package/dist/session-usage-limits.d.ts +10 -0
- package/dist/session-usage-limits.js +43 -0
- package/dist/session-usage-limits.js.map +1 -0
- package/dist/shared-catalog-loader.d.ts +34 -0
- package/dist/site-ai.d.ts +35 -0
- package/dist/site-bridge-host.d.ts +112 -0
- package/dist/site-bridge-host.js +286 -0
- package/dist/site-bridge-host.js.map +1 -0
- package/dist/site-browser-entry.d.ts +1 -0
- package/dist/site-browser-runtime.gen.d.ts +1 -0
- package/dist/site-data.d.ts +178 -0
- package/dist/site-document.d.ts +5 -0
- package/dist/site-document.js +20 -0
- package/dist/site-document.js.map +1 -0
- package/dist/site-document.test.d.ts +1 -0
- package/dist/site-http.d.ts +17 -0
- package/dist/site-sql.d.ts +31 -0
- package/dist/site-tool-bridge.d.ts +57 -0
- package/dist/site.d.ts +186 -0
- package/dist/site.js +63 -0
- package/dist/site.js.map +1 -0
- package/dist/skills.d.ts +75 -0
- package/dist/sse.d.ts +1 -1
- package/dist/stream.d.ts +2 -0
- package/dist/tenant-workspaces.d.ts +47 -0
- package/dist/tenant-workspaces.js +8 -0
- package/dist/tenant-workspaces.js.map +1 -0
- package/dist/tool-auth.d.ts +87 -0
- package/dist/tool-auth.js +23 -0
- package/dist/tool-auth.js.map +1 -0
- package/dist/tool-display-metadata.d.ts +3 -0
- package/dist/tools-37DCTCNZ.js +12 -0
- package/dist/tools-37DCTCNZ.js.map +1 -0
- package/dist/tools.d.ts +81 -0
- package/dist/transcription.d.ts +1 -1
- package/dist/types.d.ts +2785 -592
- package/dist/usage-allowances.d.ts +36 -0
- package/dist/usage-allowances.js +80 -0
- package/dist/usage-allowances.js.map +1 -0
- package/dist/vault-types.d.ts +324 -0
- package/dist/vaults-api.d.ts +65 -0
- package/dist/workspace-artifacts.d.ts +47 -5
- package/dist/workspace-instruction-policies.d.ts +2 -2
- package/dist/workspace-integrations.d.ts +74 -0
- package/dist/workspace-integrations.js +67 -0
- package/dist/workspace-integrations.js.map +1 -0
- package/dist/workspace-state.d.ts +8 -71
- package/package.json +99 -5
- package/src/adapters/express.ts +136 -0
- package/src/adapters/hono.ts +18 -0
- package/src/adapters/next.ts +42 -0
- package/src/allowance-refusal.ts +5 -0
- package/src/app-links.ts +117 -0
- package/src/artifact-catalog.ts +51 -0
- package/src/artifact-client.ts +40 -49
- package/src/artifacts.ts +1 -0
- package/src/automations-client.ts +8 -2
- package/src/azure-live-transport.ts +286 -0
- package/src/browser.ts +35 -0
- package/src/chat/fold.ts +431 -0
- package/src/chat/handler.ts +240 -0
- package/src/chat/http.ts +257 -0
- package/src/chat/ids.ts +85 -0
- package/src/chat/index.ts +88 -0
- package/src/chat/openai.ts +439 -0
- package/src/chat/opengeni.ts +737 -0
- package/src/chat/types.ts +219 -0
- package/src/chat/vercel.ts +204 -0
- package/src/chats.ts +16 -0
- package/src/client.ts +5595 -1847
- package/src/codex-realtime-controller.ts +163 -8
- package/src/codex-realtime-v3-wire.ts +4 -3
- package/src/codex-realtime-v3.ts +12 -3
- package/src/codex-realtime.ts +11 -3
- package/src/company-brain.ts +0 -40
- package/src/core.ts +18 -0
- package/src/deprecation.ts +149 -0
- package/src/document-authority-client.ts +104 -1
- package/src/editable-artifacts/controller.ts +36 -2
- package/src/editable-artifacts/index.ts +1 -0
- package/src/editable-artifacts/types.ts +29 -16
- package/src/embedding-client.ts +519 -0
- package/src/errors.ts +281 -5
- package/src/external-vault-receiver.ts +914 -0
- package/src/feedback.ts +20 -0
- package/src/gateway-realtime-transport.ts +3 -3
- package/src/github-repositories.ts +60 -0
- package/src/index.ts +592 -65
- package/src/insights-usage.ts +64 -0
- package/src/interaction.ts +315 -93
- package/src/knowledge.ts +72 -0
- package/src/known-tools.ts +279 -0
- package/src/message-links.ts +178 -0
- package/src/model-context.ts +113 -0
- package/src/model-display.ts +11 -0
- package/src/organization-integration-policy.ts +54 -0
- package/src/pr-review-client.ts +1 -1
- package/src/pr-review.ts +1 -1
- package/src/preference-registry.ts +2 -0
- package/src/prepared-mcp-setup.ts +123 -0
- package/src/proxy.ts +23 -12
- package/src/realtime.ts +15 -6
- package/src/session-history-import.ts +84 -0
- package/src/session-list-entries.ts +1 -0
- package/src/session-message-search.ts +47 -0
- package/src/session-proxy-client.ts +68 -0
- package/src/session-proxy.ts +2098 -0
- package/src/session-titles.ts +8 -82
- package/src/session-usage-limits.ts +71 -0
- package/src/shared-catalog-loader.ts +169 -0
- package/src/site-ai.ts +284 -0
- package/src/site-bridge-host.ts +422 -0
- package/src/site-browser-entry.ts +6 -0
- package/src/site-browser-runtime.gen.ts +2 -0
- package/src/site-data.ts +372 -0
- package/src/site-document.test.ts +64 -0
- package/src/site-document.ts +18 -0
- package/src/site-http.ts +171 -0
- package/src/site-sql.ts +153 -0
- package/src/site-tool-bridge.ts +401 -0
- package/src/site.ts +878 -0
- package/src/skills.ts +69 -0
- package/src/sse.ts +9 -3
- package/src/stream.ts +33 -10
- package/src/tenant-workspaces.ts +148 -0
- package/src/tool-auth.ts +301 -0
- package/src/tool-display-metadata.ts +27 -0
- package/src/tools.ts +452 -0
- package/src/transcription.ts +3 -0
- package/src/types.ts +3142 -594
- package/src/usage-allowances.ts +189 -0
- package/src/vault-types.ts +379 -0
- package/src/vaults-api.ts +339 -0
- package/src/workspace-artifacts.ts +55 -6
- package/src/workspace-instruction-policies.ts +2 -1
- package/src/workspace-integrations.ts +402 -0
- package/src/workspace-state.ts +8 -82
- package/dist/chunk-6NEPJ7NC.js.map +0 -1
- package/dist/chunk-BESZFWMU.js.map +0 -1
- package/dist/chunk-E5BNEG2D.js.map +0 -1
- package/dist/chunk-GY6RQPCG.js.map +0 -1
- package/dist/chunk-OO5LPTO7.js +0 -132
- package/dist/chunk-OO5LPTO7.js.map +0 -1
- package/dist/chunk-QTBAMHEF.js.map +0 -1
- package/dist/chunk-TFCLHRZK.js.map +0 -1
- package/dist/chunk-VYCTL62C.js.map +0 -1
package/dist/interaction.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComputerNativeCallRequest, ComputerNativeReceipt } from "@opengeni/contracts";
|
|
2
|
+
export type { ComputerNativeCallRequest, ComputerNativeReceipt, ComputerOperationReceipt, } from "@opengeni/contracts";
|
|
3
|
+
import type { InteractionSessionListOptions, OpenGeniRequestOptions } from "./client.js";
|
|
4
|
+
import type { BrowserDomReadRequest, BrowserDomReadResponse, BrowserTargetState } from "@opengeni/contracts";
|
|
5
|
+
export type { BrowserDomReadRequest, BrowserDomReadResponse, BrowserDomSafeAttribute, BrowserTargetState, } from "@opengeni/contracts";
|
|
2
6
|
import type { RetainedArtifactReference } from "./types.js";
|
|
3
7
|
/** Public Browser/Computer protocol version. Driver and provider details stay private. */
|
|
4
8
|
export declare const INTERACTION_PROTOCOL_VERSION: 1;
|
|
@@ -31,7 +35,7 @@ export type InteractionControlFailure = {
|
|
|
31
35
|
controlRequestId: string | undefined;
|
|
32
36
|
message: string;
|
|
33
37
|
};
|
|
34
|
-
/** Decodes the bounded typed control-failure details emitted by
|
|
38
|
+
/** Decodes the bounded typed control-failure details emitted by Opengeni. Raw
|
|
35
39
|
* provider/OS detail is intentionally absent; both correlation ids are opaque. */
|
|
36
40
|
export declare function interactionControlFailureFromError(error: unknown): InteractionControlFailure | null;
|
|
37
41
|
export type InteractionPlacement = {
|
|
@@ -234,29 +238,7 @@ export type NetworkRouteMutationResponse = {
|
|
|
234
238
|
operationId: string;
|
|
235
239
|
replayed: boolean;
|
|
236
240
|
};
|
|
237
|
-
export type SiteAuthFieldPurpose = "identifier" | "password" | "secret" | "totp";
|
|
238
241
|
export type SiteAuthAuthority = {
|
|
239
|
-
id: string;
|
|
240
|
-
kind: "connection_fields";
|
|
241
|
-
label: string;
|
|
242
|
-
credential: InteractionCredentialAuthorityRef;
|
|
243
|
-
fields: Array<{
|
|
244
|
-
id: string;
|
|
245
|
-
purpose: SiteAuthFieldPurpose;
|
|
246
|
-
credentialKey: string;
|
|
247
|
-
digits?: number | undefined;
|
|
248
|
-
periodSeconds?: number | undefined;
|
|
249
|
-
algorithm?: "sha1" | "sha256" | "sha512" | undefined;
|
|
250
|
-
}>;
|
|
251
|
-
} | {
|
|
252
|
-
id: string;
|
|
253
|
-
kind: "human";
|
|
254
|
-
label: string;
|
|
255
|
-
fields: Array<{
|
|
256
|
-
id: string;
|
|
257
|
-
purpose: SiteAuthFieldPurpose;
|
|
258
|
-
}>;
|
|
259
|
-
} | {
|
|
260
242
|
id: string;
|
|
261
243
|
kind: "external_provider";
|
|
262
244
|
label: string;
|
|
@@ -340,17 +322,12 @@ export type AuthRun = {
|
|
|
340
322
|
purpose: "authenticate" | "health_check" | "repair";
|
|
341
323
|
methodId: string | null;
|
|
342
324
|
authorityId: string | null;
|
|
343
|
-
state: "discovering" | "awaiting_choice" | "
|
|
325
|
+
state: "discovering" | "awaiting_choice" | "awaiting_external_action" | "working" | "verified" | "failed" | "cancelled";
|
|
344
326
|
choices: Array<{
|
|
345
327
|
id: string;
|
|
346
328
|
label: string;
|
|
347
329
|
methodId: string;
|
|
348
330
|
}>;
|
|
349
|
-
pendingFields: Array<{
|
|
350
|
-
id: string;
|
|
351
|
-
label: string;
|
|
352
|
-
purpose: SiteAuthFieldPurpose;
|
|
353
|
-
}>;
|
|
354
331
|
externalAction: {
|
|
355
332
|
kind: "push" | "security_key" | "passkey" | "device" | "human" | "other";
|
|
356
333
|
label: string;
|
|
@@ -389,40 +366,11 @@ export type ReportAuthRunRequest = {
|
|
|
389
366
|
expectedVersion: number;
|
|
390
367
|
methodId?: string | undefined;
|
|
391
368
|
authorityId?: string | undefined;
|
|
392
|
-
state: "awaiting_choice" | "
|
|
369
|
+
state: "awaiting_choice" | "awaiting_external_action" | "working" | "failed" | "cancelled";
|
|
393
370
|
choices?: AuthRun["choices"] | undefined;
|
|
394
|
-
pendingFields?: AuthRun["pendingFields"] | undefined;
|
|
395
371
|
externalAction?: AuthRun["externalAction"] | undefined;
|
|
396
372
|
failureCode?: string | null | undefined;
|
|
397
373
|
};
|
|
398
|
-
export type ProtectedAuthFillRequest = {
|
|
399
|
-
operationId: string;
|
|
400
|
-
expectedVersion: number;
|
|
401
|
-
expectedTargetGeneration: string;
|
|
402
|
-
expectedDocumentGeneration: string | null;
|
|
403
|
-
expectedFrameId: string | null;
|
|
404
|
-
authorityId: string;
|
|
405
|
-
fields: Array<{
|
|
406
|
-
fieldId: string;
|
|
407
|
-
locator: BrowserLocator;
|
|
408
|
-
}>;
|
|
409
|
-
submit: {
|
|
410
|
-
type: "none";
|
|
411
|
-
} | {
|
|
412
|
-
type: "click";
|
|
413
|
-
locator: BrowserLocator;
|
|
414
|
-
} | {
|
|
415
|
-
type: "press";
|
|
416
|
-
key: string;
|
|
417
|
-
locator?: BrowserLocator | undefined;
|
|
418
|
-
};
|
|
419
|
-
};
|
|
420
|
-
export type ProtectedAuthFillResponse = {
|
|
421
|
-
run: AuthRun;
|
|
422
|
-
status: "submitted" | "working" | "needs_human" | "stale" | "failed";
|
|
423
|
-
operationId: string;
|
|
424
|
-
replayed: boolean;
|
|
425
|
-
};
|
|
426
374
|
export type ExternalAuthRunRequest = {
|
|
427
375
|
operationId: string;
|
|
428
376
|
expectedVersion: number;
|
|
@@ -691,6 +639,14 @@ export type BrowserObservation = {
|
|
|
691
639
|
frameId: string | null;
|
|
692
640
|
semantic: InteractionSemanticSnapshot | InteractionSemanticDiff | null;
|
|
693
641
|
screenshot: RetainedArtifactReference | null;
|
|
642
|
+
viewport?: {
|
|
643
|
+
width: number;
|
|
644
|
+
height: number;
|
|
645
|
+
visualWidth: number;
|
|
646
|
+
visualHeight: number;
|
|
647
|
+
deviceScaleFactor: number;
|
|
648
|
+
maxTouchPoints: number;
|
|
649
|
+
} | null | undefined;
|
|
694
650
|
focusedRef: string | null;
|
|
695
651
|
changedRegions: InteractionRect[];
|
|
696
652
|
diagnostics: InteractionDiagnosticSummary;
|
|
@@ -747,6 +703,17 @@ export type BrowserPermissionSetting = "granted" | "denied" | "prompt";
|
|
|
747
703
|
export type BrowserAction = {
|
|
748
704
|
type: "navigate";
|
|
749
705
|
url: string;
|
|
706
|
+
} | {
|
|
707
|
+
type: "history";
|
|
708
|
+
direction: "back" | "forward";
|
|
709
|
+
} | {
|
|
710
|
+
type: "activate";
|
|
711
|
+
} | {
|
|
712
|
+
type: "viewport";
|
|
713
|
+
width: number;
|
|
714
|
+
height: number;
|
|
715
|
+
mobile: boolean;
|
|
716
|
+
deviceScaleFactor?: number | undefined;
|
|
750
717
|
} | {
|
|
751
718
|
type: "click";
|
|
752
719
|
locator: BrowserLocator;
|
|
@@ -765,6 +732,8 @@ export type BrowserAction = {
|
|
|
765
732
|
type: "type";
|
|
766
733
|
locator?: BrowserLocator | undefined;
|
|
767
734
|
text: string;
|
|
735
|
+
/** `keys` sends one key press per character (split one-time-code boxes). */
|
|
736
|
+
mode?: "insert" | "keys" | undefined;
|
|
768
737
|
} | {
|
|
769
738
|
type: "press";
|
|
770
739
|
locator?: BrowserLocator | undefined;
|
|
@@ -824,9 +793,10 @@ export type BrowserAction = {
|
|
|
824
793
|
export type BrowserActionBatch = {
|
|
825
794
|
type: "batch";
|
|
826
795
|
actions: BrowserAction[];
|
|
796
|
+
fenceEachAction?: true | undefined;
|
|
827
797
|
};
|
|
828
798
|
export type InteractionError = {
|
|
829
|
-
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";
|
|
799
|
+
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" | "tab_not_responding" | "tab_crashed" | "controller_lost" | "driver_failed";
|
|
830
800
|
message: string;
|
|
831
801
|
retryable: boolean;
|
|
832
802
|
details?: Record<string, InteractionJsonValue> | undefined;
|
|
@@ -850,6 +820,7 @@ export type CreateBrowserSessionRequest = {
|
|
|
850
820
|
name?: string | undefined;
|
|
851
821
|
initialUrl?: string | undefined;
|
|
852
822
|
headless?: boolean | undefined;
|
|
823
|
+
storageMode?: "private_profile" | "ephemeral_context" | undefined;
|
|
853
824
|
engine?: "chromium" | "lightpanda" | undefined;
|
|
854
825
|
placement?: InteractionPlacement | undefined;
|
|
855
826
|
identityId?: string | undefined;
|
|
@@ -864,10 +835,75 @@ export type BrowserSessionListResponse = {
|
|
|
864
835
|
export type BrowserSessionMutationResponse = {
|
|
865
836
|
session: BrowserSession;
|
|
866
837
|
operation: InteractionLifecycleOperationReceipt;
|
|
838
|
+
/** Present only on a create that launched the browser in this request. */
|
|
839
|
+
initialView?: {
|
|
840
|
+
targets: BrowserTarget[];
|
|
841
|
+
observation: BrowserObservation;
|
|
842
|
+
} | undefined;
|
|
867
843
|
};
|
|
868
844
|
export type BrowserSessionLifecycleRequest = {
|
|
869
845
|
operationId: string;
|
|
870
846
|
};
|
|
847
|
+
/** Why a browser's preserved working copy cannot be adopted as it is. */
|
|
848
|
+
export type BrowserWorkingCopyRefusal = "unsupported_platform" | "unsupported_browser" | "browser_running" | "working_copy_invalid" | "receipt_not_adoptable" | "authority_changed" | "process_state_unknown" | "adoption_not_needed" | "adoption_unresolved";
|
|
849
|
+
/** One adoption of a copied working directory, as its controller recorded it. */
|
|
850
|
+
export type BrowserWorkingCopyAdoption = {
|
|
851
|
+
operationId: string;
|
|
852
|
+
browserSessionId: string;
|
|
853
|
+
controllerGeneration: string;
|
|
854
|
+
manifestDigest: string;
|
|
855
|
+
phase: "intent" | "copied" | "receipt" | "source_preserved" | "adopted" | "interrupted" | "failed" | "collision" | "reverting" | "reverted";
|
|
856
|
+
failureCode: string | null;
|
|
857
|
+
retainedDirectories: string[];
|
|
858
|
+
createdAt: string;
|
|
859
|
+
updatedAt: string;
|
|
860
|
+
};
|
|
861
|
+
/** Evidence about a browser's preserved working copy after its controller lost
|
|
862
|
+
* it. Freshness is never machine-proven. */
|
|
863
|
+
export type BrowserWorkingCopyInspection = {
|
|
864
|
+
browserSessionId: string;
|
|
865
|
+
controllerGeneration: string;
|
|
866
|
+
adoptable: boolean;
|
|
867
|
+
refusal: BrowserWorkingCopyRefusal | null;
|
|
868
|
+
explanation: string;
|
|
869
|
+
/** `excluded` lists the controller-owned derived entries left out of the
|
|
870
|
+
* copy (journal shared-memory indexes and the per-launch launcher folder). */
|
|
871
|
+
manifest: {
|
|
872
|
+
digest: string;
|
|
873
|
+
entries: number;
|
|
874
|
+
bytes: number;
|
|
875
|
+
excluded: string[];
|
|
876
|
+
} | null;
|
|
877
|
+
platformSupported: boolean;
|
|
878
|
+
profileIdentityMatches: boolean;
|
|
879
|
+
profileInUse: boolean | null;
|
|
880
|
+
receipt: {
|
|
881
|
+
operationId: string;
|
|
882
|
+
intent: "launch" | "suspend" | "retire" | "adopt";
|
|
883
|
+
state: string;
|
|
884
|
+
directoryLaunchAllowed: boolean;
|
|
885
|
+
authorityMatches: boolean;
|
|
886
|
+
launchedFromCheckpoint: boolean;
|
|
887
|
+
adoption: {
|
|
888
|
+
operationId: string;
|
|
889
|
+
manifestDigest: string;
|
|
890
|
+
} | null;
|
|
891
|
+
} | null;
|
|
892
|
+
freshness: {
|
|
893
|
+
status: "unknown";
|
|
894
|
+
latestCheckpointAt: string | null;
|
|
895
|
+
};
|
|
896
|
+
activeAdoption: BrowserWorkingCopyAdoption | null;
|
|
897
|
+
};
|
|
898
|
+
export type BrowserWorkingCopyAdoptionRequest = {
|
|
899
|
+
operationId: string;
|
|
900
|
+
manifestDigest: string;
|
|
901
|
+
};
|
|
902
|
+
export type BrowserWorkingCopyAdoptionResponse = {
|
|
903
|
+
inFlight: boolean;
|
|
904
|
+
adoption: BrowserWorkingCopyAdoption | null;
|
|
905
|
+
explanation: string;
|
|
906
|
+
};
|
|
871
907
|
export type BrowserOpenTargetRequest = {
|
|
872
908
|
url?: string | undefined;
|
|
873
909
|
};
|
|
@@ -896,12 +932,16 @@ export type ComputerFrameStreamAttachment = InteractionFrameStreamAttachment<4>
|
|
|
896
932
|
kind: "direct_rfb";
|
|
897
933
|
url: string;
|
|
898
934
|
protocols: string[];
|
|
935
|
+
inputAllowed: boolean;
|
|
899
936
|
};
|
|
900
937
|
export type BrowserSessionAttachment = {
|
|
901
938
|
browserSessionId: string;
|
|
902
939
|
controllerGeneration: string;
|
|
903
940
|
targetId: string;
|
|
904
941
|
stream: InteractionFrameStreamAttachment<3>;
|
|
942
|
+
/** Negotiated from this attachment’s live controller, absent on older helpers. */
|
|
943
|
+
fencedInputBatches?: true | undefined;
|
|
944
|
+
focusedInputObservations?: true | undefined;
|
|
905
945
|
expiresAt: string;
|
|
906
946
|
};
|
|
907
947
|
export type BrowserSessionAttachmentRequest = {
|
|
@@ -912,10 +952,15 @@ export type BrowserSessionAttachmentRequest = {
|
|
|
912
952
|
export type BrowserActionRequest = {
|
|
913
953
|
operationId: string;
|
|
914
954
|
targetId: string;
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
955
|
+
/** Omit the three fences to act on the target's current state; the API reads
|
|
956
|
+
* them from the live controller in the same request. */
|
|
957
|
+
expectedTargetGeneration?: string | undefined;
|
|
958
|
+
expectedDocumentGeneration?: string | null | undefined;
|
|
959
|
+
expectedFrameId?: string | null | undefined;
|
|
960
|
+
/** `input` is negotiated by focusedInputObservations on a live attachment.
|
|
961
|
+
* It returns optional native-select metadata after a pointer click, and null
|
|
962
|
+
* for ordinary input. Use full for agent observations. */
|
|
963
|
+
observationMode?: "full" | "none" | "input" | undefined;
|
|
919
964
|
action: BrowserAction | BrowserActionBatch;
|
|
920
965
|
};
|
|
921
966
|
export type BrowserActionReceipt = {
|
|
@@ -929,6 +974,19 @@ export type BrowserActionReceipt = {
|
|
|
929
974
|
settledAt: string | null;
|
|
930
975
|
observation: BrowserObservation | null;
|
|
931
976
|
error: InteractionError | null;
|
|
977
|
+
/** Elements the action's locators resolved to, in dispatch order. */
|
|
978
|
+
targets?: BrowserActionResolvedTarget[] | undefined;
|
|
979
|
+
};
|
|
980
|
+
export type BrowserActionResolvedTarget = {
|
|
981
|
+
actionIndex: number;
|
|
982
|
+
ref: string | null;
|
|
983
|
+
role: string;
|
|
984
|
+
name: string | null;
|
|
985
|
+
/** Nearest dialog, landmark, menu or toolbar around the element. */
|
|
986
|
+
container: {
|
|
987
|
+
role: string;
|
|
988
|
+
name: string | null;
|
|
989
|
+
} | null;
|
|
932
990
|
};
|
|
933
991
|
export type BrowserSessionHeartbeatResponse = {
|
|
934
992
|
browserSessionId: string;
|
|
@@ -943,9 +1001,13 @@ export type ComputerSessionCapabilities = {
|
|
|
943
1001
|
screenCapture: boolean;
|
|
944
1002
|
semanticActions: boolean;
|
|
945
1003
|
pointerInput: boolean;
|
|
1004
|
+
/** Causal count-2 input requires its exact confirmed first operation. Absent means unsupported. */
|
|
1005
|
+
pointerClickContinuation?: boolean | undefined;
|
|
946
1006
|
keyboardInput: boolean;
|
|
947
1007
|
clipboard: boolean;
|
|
948
1008
|
backgroundActions: boolean;
|
|
1009
|
+
/** Raw window input stays in the background. Absent means foreground-only. */
|
|
1010
|
+
backgroundInput?: boolean | undefined;
|
|
949
1011
|
parallelApps: boolean;
|
|
950
1012
|
};
|
|
951
1013
|
export type ComputerClipboard = {
|
|
@@ -1034,6 +1096,9 @@ export type ComputerAction = {
|
|
|
1034
1096
|
deltaX?: number | undefined;
|
|
1035
1097
|
deltaY?: number | undefined;
|
|
1036
1098
|
button?: "left" | "right" | "middle" | undefined;
|
|
1099
|
+
/** Click only; 2 delivers one second click pair after a completed first click. */
|
|
1100
|
+
clickCount?: 1 | 2 | undefined;
|
|
1101
|
+
continuationOfOperationId?: string | undefined;
|
|
1037
1102
|
} | {
|
|
1038
1103
|
type: "keyboard";
|
|
1039
1104
|
action: "type" | "press";
|
|
@@ -1083,9 +1148,17 @@ export type ComputerSessionAttachment = {
|
|
|
1083
1148
|
computerSessionId: string;
|
|
1084
1149
|
controllerGeneration: string;
|
|
1085
1150
|
targetId: string;
|
|
1151
|
+
/** Viewer posture when attached; actions still reauthorize the live source. */
|
|
1152
|
+
inputAllowed?: boolean | undefined;
|
|
1086
1153
|
stream: ComputerFrameStreamAttachment;
|
|
1087
1154
|
expiresAt: string;
|
|
1088
1155
|
};
|
|
1156
|
+
/** Caller-specific hint only; every action still requires live authorization. */
|
|
1157
|
+
export type ComputerSessionInputPosture = {
|
|
1158
|
+
computerSessionId: string;
|
|
1159
|
+
controllerGeneration: string;
|
|
1160
|
+
inputAllowed: boolean;
|
|
1161
|
+
};
|
|
1089
1162
|
export type ComputerSessionAttachmentRequest = {
|
|
1090
1163
|
targetId: string;
|
|
1091
1164
|
expiresInSeconds?: number | undefined;
|
|
@@ -1136,7 +1209,6 @@ export interface InteractionTransport {
|
|
|
1136
1209
|
getAuthRun(workspaceId: string, authRunId: string, options?: OpenGeniRequestOptions): Promise<AuthRun>;
|
|
1137
1210
|
startBrowserAuthRun(workspaceId: string, browserSessionId: string, request: StartAuthRunRequest, options?: OpenGeniRequestOptions): Promise<AuthRunMutationResponse>;
|
|
1138
1211
|
reportBrowserAuthRun(workspaceId: string, browserSessionId: string, authRunId: string, request: ReportAuthRunRequest, options?: OpenGeniRequestOptions): Promise<AuthRunMutationResponse>;
|
|
1139
|
-
protectedBrowserAuthFill(workspaceId: string, browserSessionId: string, authRunId: string, request: ProtectedAuthFillRequest, options?: OpenGeniRequestOptions): Promise<ProtectedAuthFillResponse>;
|
|
1140
1212
|
advanceExternalBrowserAuthRun(workspaceId: string, browserSessionId: string, authRunId: string, request: ExternalAuthRunRequest, options?: OpenGeniRequestOptions): Promise<ExternalAuthRunResponse>;
|
|
1141
1213
|
openExternalBrowserAuthFlow(workspaceId: string, browserSessionId: string, authRunId: string, request: ExternalAuthInteractiveRequest, options?: OpenGeniRequestOptions): Promise<ExternalAuthInteractiveResponse>;
|
|
1142
1214
|
verifyBrowserAuthRun(workspaceId: string, browserSessionId: string, authRunId: string, request: VerifyAuthRunRequest, options?: OpenGeniRequestOptions): Promise<AuthRunMutationResponse>;
|
|
@@ -1151,7 +1223,7 @@ export interface InteractionTransport {
|
|
|
1151
1223
|
createBrowserIdentity(workspaceId: string, request: CreateBrowserIdentityRequest, options?: OpenGeniRequestOptions): Promise<BrowserIdentityMutationResponse>;
|
|
1152
1224
|
updateBrowserIdentity(workspaceId: string, identityId: string, request: UpdateBrowserIdentityRequest, options?: OpenGeniRequestOptions): Promise<BrowserIdentityMutationResponse>;
|
|
1153
1225
|
listBrowserRevisions(workspaceId: string, identityId: string, options?: OpenGeniRequestOptions): Promise<BrowserRevisionListResponse>;
|
|
1154
|
-
listBrowserSessions(workspaceId: string, options?: OpenGeniRequestOptions): Promise<BrowserSessionListResponse>;
|
|
1226
|
+
listBrowserSessions(workspaceId: string, options?: OpenGeniRequestOptions | InteractionSessionListOptions): Promise<BrowserSessionListResponse>;
|
|
1155
1227
|
getBrowserSession(workspaceId: string, browserSessionId: string, options?: OpenGeniRequestOptions): Promise<BrowserSession>;
|
|
1156
1228
|
readBrowserClipboard(workspaceId: string, browserSessionId: string, options?: OpenGeniRequestOptions): Promise<BrowserClipboard>;
|
|
1157
1229
|
listBrowserDownloads(workspaceId: string, browserSessionId: string, options?: OpenGeniRequestOptions): Promise<BrowserDownloadListResponse>;
|
|
@@ -1160,9 +1232,14 @@ export interface InteractionTransport {
|
|
|
1160
1232
|
createBrowserSession(workspaceId: string, request: CreateBrowserSessionRequest, options?: OpenGeniRequestOptions): Promise<BrowserSessionMutationResponse>;
|
|
1161
1233
|
listBrowserTargets(workspaceId: string, browserSessionId: string, options?: OpenGeniRequestOptions): Promise<BrowserTargetListResponse>;
|
|
1162
1234
|
openBrowserTarget(workspaceId: string, browserSessionId: string, request?: BrowserOpenTargetRequest, options?: OpenGeniRequestOptions): Promise<BrowserObservation>;
|
|
1235
|
+
/** Optional for custom transports predating metadata-only tab opening. */
|
|
1236
|
+
openBrowserTargetWithInventory?(workspaceId: string, browserSessionId: string, request?: BrowserOpenTargetRequest, options?: OpenGeniRequestOptions): Promise<BrowserTargetListResponse>;
|
|
1163
1237
|
selectBrowserTarget(workspaceId: string, browserSessionId: string, targetId: string, options?: OpenGeniRequestOptions): Promise<BrowserObservation>;
|
|
1164
1238
|
closeBrowserTarget(workspaceId: string, browserSessionId: string, targetId: string, options?: OpenGeniRequestOptions): Promise<BrowserTargetListResponse>;
|
|
1165
1239
|
observeBrowserTarget(workspaceId: string, browserSessionId: string, targetId: string, options?: OpenGeniRequestOptions): Promise<BrowserObservation>;
|
|
1240
|
+
getBrowserTargetState(workspaceId: string, browserSessionId: string, targetId: string, options?: OpenGeniRequestOptions): Promise<BrowserTargetState>;
|
|
1241
|
+
readBrowserDom(workspaceId: string, browserSessionId: string, targetId: string, request: BrowserDomReadRequest, options?: OpenGeniRequestOptions): Promise<BrowserDomReadResponse>;
|
|
1242
|
+
captureBrowserTarget(workspaceId: string, browserSessionId: string, targetId: string, options?: OpenGeniRequestOptions, captureOptions?: BrowserScreenshotOptions): Promise<BrowserFrame>;
|
|
1166
1243
|
actInBrowser(workspaceId: string, browserSessionId: string, request: BrowserActionRequest, options?: OpenGeniRequestOptions): Promise<BrowserActionReceipt>;
|
|
1167
1244
|
getBrowserActionReceipt(workspaceId: string, browserSessionId: string, operationId: string, options?: OpenGeniRequestOptions): Promise<BrowserActionReceipt>;
|
|
1168
1245
|
listBrowserDiagnostics(workspaceId: string, browserSessionId: string, targetId: string, options?: BrowserDiagnosticsOptions): Promise<BrowserDiagnosticBatch>;
|
|
@@ -1172,14 +1249,17 @@ export interface InteractionTransport {
|
|
|
1172
1249
|
suspendBrowserSession(workspaceId: string, browserSessionId: string, request: BrowserSessionLifecycleRequest, options?: OpenGeniRequestOptions): Promise<BrowserSessionMutationResponse>;
|
|
1173
1250
|
resumeBrowserSession(workspaceId: string, browserSessionId: string, request: BrowserSessionLifecycleRequest, options?: OpenGeniRequestOptions): Promise<BrowserSessionMutationResponse>;
|
|
1174
1251
|
endBrowserSession(workspaceId: string, browserSessionId: string, request: BrowserSessionLifecycleRequest, options?: OpenGeniRequestOptions): Promise<BrowserSessionMutationResponse>;
|
|
1175
|
-
listComputerSessions(workspaceId: string, options?: OpenGeniRequestOptions): Promise<ComputerSessionListResponse>;
|
|
1252
|
+
listComputerSessions(workspaceId: string, options?: OpenGeniRequestOptions | InteractionSessionListOptions): Promise<ComputerSessionListResponse>;
|
|
1176
1253
|
getComputerSession(workspaceId: string, computerSessionId: string, options?: OpenGeniRequestOptions): Promise<ComputerSession>;
|
|
1254
|
+
getComputerInputPosture?(workspaceId: string, computerSessionId: string, options?: OpenGeniRequestOptions): Promise<ComputerSessionInputPosture>;
|
|
1177
1255
|
readComputerClipboard(workspaceId: string, computerSessionId: string, options?: OpenGeniRequestOptions): Promise<ComputerClipboard>;
|
|
1178
1256
|
createComputerSession(workspaceId: string, request: CreateComputerSessionRequest, options?: OpenGeniRequestOptions): Promise<ComputerSessionMutationResponse>;
|
|
1179
1257
|
listComputerTargets(workspaceId: string, computerSessionId: string, options?: OpenGeniRequestOptions): Promise<ComputerTargetListResponse>;
|
|
1180
1258
|
observeComputerTarget(workspaceId: string, computerSessionId: string, targetId: string, options?: OpenGeniRequestOptions): Promise<ComputerObservation>;
|
|
1181
1259
|
captureComputerTarget(workspaceId: string, computerSessionId: string, targetId: string, options?: OpenGeniRequestOptions): Promise<ComputerFrame>;
|
|
1260
|
+
callNativeComputerTool?(workspaceId: string, computerSessionId: string, request: ComputerNativeCallRequest, options?: OpenGeniRequestOptions): Promise<ComputerNativeReceipt>;
|
|
1182
1261
|
actInComputer(workspaceId: string, computerSessionId: string, request: ComputerActionRequest, options?: OpenGeniRequestOptions): Promise<ComputerActionReceipt>;
|
|
1262
|
+
getNativeComputerToolReceipt?(workspaceId: string, computerSessionId: string, operationId: string, options?: OpenGeniRequestOptions): Promise<ComputerNativeReceipt>;
|
|
1183
1263
|
getComputerActionReceipt(workspaceId: string, computerSessionId: string, operationId: string, options?: OpenGeniRequestOptions): Promise<ComputerActionReceipt>;
|
|
1184
1264
|
attachComputerSession(workspaceId: string, computerSessionId: string, request: ComputerSessionAttachmentRequest, options?: OpenGeniRequestOptions): Promise<ComputerSessionAttachment>;
|
|
1185
1265
|
heartbeatComputerSession(workspaceId: string, computerSessionId: string, options?: OpenGeniRequestOptions): Promise<ComputerSessionHeartbeatResponse>;
|
|
@@ -1220,6 +1300,7 @@ export type CurrentOrOpenBrowserOptions = {
|
|
|
1220
1300
|
name?: string | undefined;
|
|
1221
1301
|
initialUrl?: string | undefined;
|
|
1222
1302
|
headless?: boolean | undefined;
|
|
1303
|
+
storageMode?: "private_profile" | "ephemeral_context" | undefined;
|
|
1223
1304
|
placement?: InteractionPlacement | undefined;
|
|
1224
1305
|
identityId?: string | undefined;
|
|
1225
1306
|
baseRevisionId?: string | undefined;
|
|
@@ -1301,7 +1382,6 @@ export declare class AuthRunResource {
|
|
|
1301
1382
|
constructor(transport: BrowserInteractionTransport, workspaceId: string, browserSessionId: string, id: string);
|
|
1302
1383
|
get(options?: OpenGeniRequestOptions): Promise<AuthRun>;
|
|
1303
1384
|
report(request: ReportAuthRunRequest, options?: OpenGeniRequestOptions): Promise<AuthRunMutationResponse>;
|
|
1304
|
-
protectedFill(request: ProtectedAuthFillRequest, options?: OpenGeniRequestOptions): Promise<ProtectedAuthFillResponse>;
|
|
1305
1385
|
advanceExternal(request: ExternalAuthRunRequest, options?: OpenGeniRequestOptions): Promise<ExternalAuthRunResponse>;
|
|
1306
1386
|
/** Human-session helper. Hosted provider URLs never appear in model tools. */
|
|
1307
1387
|
openExternalFlow(request: ExternalAuthInteractiveRequest, options?: OpenGeniRequestOptions): Promise<ExternalAuthInteractiveResponse>;
|
|
@@ -1354,7 +1434,7 @@ export declare class BrowserIdentityResource {
|
|
|
1354
1434
|
export declare class BrowserSessionCollection {
|
|
1355
1435
|
private readonly transport;
|
|
1356
1436
|
constructor(transport: BrowserInteractionTransport);
|
|
1357
|
-
list(workspaceId: string, options?: OpenGeniRequestOptions): Promise<BrowserSessionListResponse>;
|
|
1437
|
+
list(workspaceId: string, options?: OpenGeniRequestOptions | InteractionSessionListOptions): Promise<BrowserSessionListResponse>;
|
|
1358
1438
|
session(workspaceId: string, browserSessionId: string): BrowserSessionResource;
|
|
1359
1439
|
open(workspaceId: string, request: CreateBrowserSessionRequest, options?: OpenGeniRequestOptions): Promise<BrowserSessionResource>;
|
|
1360
1440
|
currentOrOpen(options: CurrentOrOpenBrowserOptions): Promise<BrowserSessionResource>;
|
|
@@ -1372,6 +1452,10 @@ export declare class BrowserSessionResource {
|
|
|
1372
1452
|
constructor(transport: BrowserInteractionTransport, workspaceId: string, id: string);
|
|
1373
1453
|
get(options?: OpenGeniRequestOptions): Promise<BrowserSession>;
|
|
1374
1454
|
observe(targetId: string, options?: OpenGeniRequestOptions): Promise<BrowserObservation>;
|
|
1455
|
+
targetState(targetId: string, options?: OpenGeniRequestOptions): Promise<BrowserTargetState>;
|
|
1456
|
+
readDom(targetId: string, request: BrowserDomReadRequest, options?: OpenGeniRequestOptions): Promise<BrowserDomReadResponse>;
|
|
1457
|
+
capture(targetId: string, options?: OpenGeniRequestOptions, captureOptions?: BrowserScreenshotOptions): Promise<BrowserFrame>;
|
|
1458
|
+
screenshot(targetId: string, captureOptions?: BrowserScreenshotOptions, options?: OpenGeniRequestOptions): Promise<BrowserFrame>;
|
|
1375
1459
|
act(request: BrowserActionRequest, options?: OpenGeniRequestOptions): Promise<BrowserActionReceipt>;
|
|
1376
1460
|
receipt(operationId: string, options?: OpenGeniRequestOptions): Promise<BrowserActionReceipt>;
|
|
1377
1461
|
diagnostics(targetId: string, options?: BrowserDiagnosticsOptions): Promise<BrowserDiagnosticBatch>;
|
|
@@ -1422,7 +1506,7 @@ export declare class BrowserTargetCollection {
|
|
|
1422
1506
|
export declare class ComputerSessionCollection {
|
|
1423
1507
|
private readonly transport;
|
|
1424
1508
|
constructor(transport: BrowserInteractionTransport);
|
|
1425
|
-
list(workspaceId: string, options?: OpenGeniRequestOptions): Promise<ComputerSessionListResponse>;
|
|
1509
|
+
list(workspaceId: string, options?: OpenGeniRequestOptions | InteractionSessionListOptions): Promise<ComputerSessionListResponse>;
|
|
1426
1510
|
session(workspaceId: string, computerSessionId: string): ComputerSessionResource;
|
|
1427
1511
|
open(workspaceId: string, request: CreateComputerSessionRequest, options?: OpenGeniRequestOptions): Promise<ComputerSessionResource>;
|
|
1428
1512
|
currentOrOpen(options: CurrentOrOpenComputerOptions): Promise<ComputerSessionResource>;
|
|
@@ -1439,9 +1523,12 @@ export declare class ComputerSessionResource {
|
|
|
1439
1523
|
get(options?: OpenGeniRequestOptions): Promise<ComputerSession>;
|
|
1440
1524
|
observe(targetId: string, options?: OpenGeniRequestOptions): Promise<ComputerObservation>;
|
|
1441
1525
|
capture(targetId: string, options?: OpenGeniRequestOptions): Promise<ComputerFrame>;
|
|
1526
|
+
callNativeTool(request: ComputerNativeCallRequest, options?: OpenGeniRequestOptions): Promise<ComputerNativeReceipt>;
|
|
1442
1527
|
act(request: ComputerActionRequest, options?: OpenGeniRequestOptions): Promise<ComputerActionReceipt>;
|
|
1528
|
+
nativeReceipt(operationId: string, options?: OpenGeniRequestOptions): Promise<ComputerNativeReceipt>;
|
|
1443
1529
|
receipt(operationId: string, options?: OpenGeniRequestOptions): Promise<ComputerActionReceipt>;
|
|
1444
1530
|
attach(request: ComputerSessionAttachmentRequest, options?: OpenGeniRequestOptions): Promise<ComputerSessionAttachment>;
|
|
1531
|
+
inputPosture(options?: OpenGeniRequestOptions): Promise<ComputerSessionInputPosture>;
|
|
1445
1532
|
heartbeat(options?: OpenGeniRequestOptions): Promise<ComputerSessionHeartbeatResponse>;
|
|
1446
1533
|
end(request?: ComputerSessionLifecycleRequest, options?: OpenGeniRequestOptions): Promise<ComputerSessionMutationResponse>;
|
|
1447
1534
|
}
|
|
@@ -1478,6 +1565,13 @@ export type BrowserFrameMetadata = {
|
|
|
1478
1565
|
export type BrowserFrame = BrowserFrameMetadata & {
|
|
1479
1566
|
data: Uint8Array;
|
|
1480
1567
|
};
|
|
1568
|
+
export type BrowserScreenshotOptions = {
|
|
1569
|
+
/** Capture the document content instead of the visible viewport. */
|
|
1570
|
+
fullPage?: boolean;
|
|
1571
|
+
format?: "jpeg" | "png";
|
|
1572
|
+
/** JPEG quality, from 1 to 100. Ignored for PNG. */
|
|
1573
|
+
quality?: number;
|
|
1574
|
+
};
|
|
1481
1575
|
export type ComputerFrameMetadata = {
|
|
1482
1576
|
frameId: string;
|
|
1483
1577
|
computerSessionId: string;
|
package/dist/interaction.js
CHANGED
|
@@ -39,8 +39,8 @@ import {
|
|
|
39
39
|
interactionControlFailureFromError,
|
|
40
40
|
parseBrowserFrameMetadata,
|
|
41
41
|
parseComputerFrameMetadata
|
|
42
|
-
} from "./chunk-
|
|
43
|
-
import "./chunk-
|
|
42
|
+
} from "./chunk-YJCHB7R3.js";
|
|
43
|
+
import "./chunk-7EWT3PV6.js";
|
|
44
44
|
export {
|
|
45
45
|
AttachedBrowserDeviceCollection,
|
|
46
46
|
AttachedBrowserDeviceResource,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type { AgentLearningMode, AgentLearningCategory, AgentLearningDefaults, AgentLearningOverrides, AgentLearningContext, AgentLearningOverridePatch, AgentLearningSettingsRecord, AgentLearningOverrideRecord, SaveAgentLearningSettingsRequest, KnowledgeFilePreparationResult, KnowledgeSavePreparationRequest, KnowledgeSavePreparationResponse, KnowledgeOriginalFileDownload, KnowledgeEntryKind, KnowledgeEntryScope, KnowledgeIndexStatus, KnowledgeEntryContent, KnowledgeEntrySource, KnowledgeEntryEvidence, KnowledgeEntryRelationship, KnowledgeEntryRecord, KnowledgeEntrySummary, KnowledgeEntrySaveRequest, KnowledgeEntryReviewRequest, KnowledgeEntryBatchReviewRequest, KnowledgeEntryRestoreRequest, KnowledgeEntryWriteReceipt, KnowledgeEntryListRequest, KnowledgeEntryListResponse, KnowledgeReviewBatch, KnowledgeReviewBatchListRequest, KnowledgeReviewBatchListResponse, AgentInstructionReviewRequest, AgentInstructionReceipt, AgentInstructionReviewItem, AgentInstructionReviewListResponse, } from "@opengeni/contracts";
|
|
2
|
+
import type { OpenGeniClient } from "./client.js";
|
|
3
|
+
import type { KnowledgeSavePreparationRequest, KnowledgeSavePreparationResponse, KnowledgeFilePreparationResult } from "@opengeni/contracts";
|
|
4
|
+
/** Agent-only source preparation is a focused transport surface, outside the browser client. */
|
|
5
|
+
export declare function prepareKnowledgeFile(client: Pick<OpenGeniClient, "requestJson">, workspaceId: string, fileId: string, purpose?: "evidence" | "reference"): Promise<KnowledgeFilePreparationResult>;
|
|
6
|
+
/** Read-only collection/duplicate discovery for a live selected agent or human Knowledge reviewer. */
|
|
7
|
+
export declare function prepareKnowledgeSave(client: Pick<OpenGeniClient, "requestJson">, workspaceId: string, request: KnowledgeSavePreparationRequest): Promise<KnowledgeSavePreparationResponse>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// src/knowledge.ts
|
|
2
|
+
async function prepareKnowledgeFile(client, workspaceId, fileId, purpose) {
|
|
3
|
+
return client.requestJson(
|
|
4
|
+
"POST",
|
|
5
|
+
`/v1/workspaces/${encodeURIComponent(workspaceId)}/knowledge/files/${encodeURIComponent(fileId)}/prepare`,
|
|
6
|
+
purpose ? { purpose } : void 0
|
|
7
|
+
);
|
|
8
|
+
}
|
|
9
|
+
async function prepareKnowledgeSave(client, workspaceId, request) {
|
|
10
|
+
return client.requestJson(
|
|
11
|
+
"POST",
|
|
12
|
+
`/v1/workspaces/${encodeURIComponent(workspaceId)}/knowledge/entries/prepare-save`,
|
|
13
|
+
request
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
prepareKnowledgeFile,
|
|
18
|
+
prepareKnowledgeSave
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=knowledge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/knowledge.ts"],"sourcesContent":["export type {\n AgentLearningMode,\n AgentLearningCategory,\n AgentLearningDefaults,\n AgentLearningOverrides,\n AgentLearningContext,\n AgentLearningOverridePatch,\n AgentLearningSettingsRecord,\n AgentLearningOverrideRecord,\n SaveAgentLearningSettingsRequest,\n KnowledgeFilePreparationResult,\n KnowledgeSavePreparationRequest,\n KnowledgeSavePreparationResponse,\n KnowledgeOriginalFileDownload,\n KnowledgeEntryKind,\n KnowledgeEntryScope,\n KnowledgeIndexStatus,\n KnowledgeEntryContent,\n KnowledgeEntrySource,\n KnowledgeEntryEvidence,\n KnowledgeEntryRelationship,\n KnowledgeEntryRecord,\n KnowledgeEntrySummary,\n KnowledgeEntrySaveRequest,\n KnowledgeEntryReviewRequest,\n KnowledgeEntryBatchReviewRequest,\n KnowledgeEntryRestoreRequest,\n KnowledgeEntryWriteReceipt,\n KnowledgeEntryListRequest,\n KnowledgeEntryListResponse,\n KnowledgeReviewBatch,\n KnowledgeReviewBatchListRequest,\n KnowledgeReviewBatchListResponse,\n AgentInstructionReviewRequest,\n AgentInstructionReceipt,\n AgentInstructionReviewItem,\n AgentInstructionReviewListResponse,\n} from \"@opengeni/contracts\";\n\nimport type { OpenGeniClient } from \"./client\";\nimport type {\n KnowledgeSavePreparationRequest,\n KnowledgeSavePreparationResponse,\n KnowledgeFilePreparationResult,\n} from \"@opengeni/contracts\";\n\n/** Agent-only source preparation is a focused transport surface, outside the browser client. */\nexport async function prepareKnowledgeFile(\n client: Pick<OpenGeniClient, \"requestJson\">,\n workspaceId: string,\n fileId: string,\n purpose?: \"evidence\" | \"reference\",\n): Promise<KnowledgeFilePreparationResult> {\n return client.requestJson(\n \"POST\",\n `/v1/workspaces/${encodeURIComponent(workspaceId)}/knowledge/files/${encodeURIComponent(fileId)}/prepare`,\n purpose ? { purpose } : undefined,\n );\n}\n\n/** Read-only collection/duplicate discovery for a live selected agent or human Knowledge reviewer. */\nexport async function prepareKnowledgeSave(\n client: Pick<OpenGeniClient, \"requestJson\">,\n workspaceId: string,\n request: KnowledgeSavePreparationRequest,\n): Promise<KnowledgeSavePreparationResponse> {\n return client.requestJson(\n \"POST\",\n `/v1/workspaces/${encodeURIComponent(workspaceId)}/knowledge/entries/prepare-save`,\n request,\n );\n}\n"],"mappings":";AA+CA,eAAsB,qBACpB,QACA,aACA,QACA,SACyC;AACzC,SAAO,OAAO;AAAA,IACZ;AAAA,IACA,kBAAkB,mBAAmB,WAAW,CAAC,oBAAoB,mBAAmB,MAAM,CAAC;AAAA,IAC/F,UAAU,EAAE,QAAQ,IAAI;AAAA,EAC1B;AACF;AAGA,eAAsB,qBACpB,QACA,aACA,SAC2C;AAC3C,SAAO,OAAO;AAAA,IACZ;AAAA,IACA,kBAAkB,mBAAmB,WAAW,CAAC;AAAA,IACjD;AAAA,EACF;AACF;","names":[]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type OpenGeniToolTransport, type OpenGeniWorkspaceTools } from "./tools.js";
|
|
2
|
+
export declare const isToolDefinitionStale: (error: unknown) => boolean;
|
|
3
|
+
/** Per-facade metadata only. Never coalesce invocations or retain credentials. */
|
|
4
|
+
export declare function createKnownWorkspaceTools(transport: OpenGeniToolTransport, workspaceId: string, createLegacy: () => OpenGeniWorkspaceTools): OpenGeniWorkspaceTools;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Links an agent writes into chat Markdown that point at Opengeni-owned objects.
|
|
3
|
+
*
|
|
4
|
+
* Agents write these forms (tool receipts and bundled Skills teach them):
|
|
5
|
+
*
|
|
6
|
+
* - `artifact:<file uuid>` — a retained workspace file (exports, published files, images).
|
|
7
|
+
* - `sandbox:<path>[:<line>]` — a file in the session's sandbox or Connected Machine.
|
|
8
|
+
* - `/workspaces/<ws>/artifacts/editable/<32-hex id>` — a live editable document,
|
|
9
|
+
* workbook, or presentation.
|
|
10
|
+
* - `/workspaces/<ws>/artifacts/<uuid>` — a saved Site / published HTML artifact.
|
|
11
|
+
* - `/workspaces/<ws>/artifacts/files/<uuid>` — a retained file (console path form).
|
|
12
|
+
*
|
|
13
|
+
* None of them is a URL a browser can navigate on its own: the `/workspaces/...`
|
|
14
|
+
* forms are Opengeni console routes, so inside another product they resolve
|
|
15
|
+
* against that product's origin and 404. Parse them with {@link parseOpenGeniLink}
|
|
16
|
+
* and route each target to the host's own UI (download, panel, page).
|
|
17
|
+
*/
|
|
18
|
+
export type OpenGeniLinkTarget = {
|
|
19
|
+
kind: "file";
|
|
20
|
+
fileId: string;
|
|
21
|
+
workspaceId: string | null;
|
|
22
|
+
fromSession?: string;
|
|
23
|
+
} | {
|
|
24
|
+
kind: "editable-artifact";
|
|
25
|
+
artifactId: string;
|
|
26
|
+
workspaceId: string;
|
|
27
|
+
fromSession?: string;
|
|
28
|
+
} | {
|
|
29
|
+
kind: "site";
|
|
30
|
+
artifactId: string;
|
|
31
|
+
workspaceId: string;
|
|
32
|
+
fromSession?: string;
|
|
33
|
+
} | {
|
|
34
|
+
kind: "sandbox-file";
|
|
35
|
+
path: string;
|
|
36
|
+
line: number | null;
|
|
37
|
+
};
|
|
38
|
+
/** Application scheme names are case-insensitive, unlike their payloads. */
|
|
39
|
+
export declare function openGeniLinkScheme(href: string | undefined): "artifact" | "sandbox" | null;
|
|
40
|
+
/** Reserved references must never fall back to navigation on a host origin. */
|
|
41
|
+
export declare function isReservedOpenGeniLink(href: string | undefined): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Parse an Opengeni `sandbox:` href (plus the historical bare `/workspace/...`
|
|
44
|
+
* form). The decoded path is intentionally opaque: target selection, path
|
|
45
|
+
* policy, and filesystem authority belong to the session-aware host.
|
|
46
|
+
*/
|
|
47
|
+
export declare function parseSandboxLink(href: string | undefined): {
|
|
48
|
+
path: string;
|
|
49
|
+
line: number | null;
|
|
50
|
+
} | null;
|
|
51
|
+
/** Return the retained-file id of an exact `artifact:<uuid>` reference. */
|
|
52
|
+
export declare function parseRetainedFileReference(href: string | undefined): string | null;
|
|
53
|
+
/**
|
|
54
|
+
* Classify an agent-authored Markdown href. Returns `null` for ordinary links
|
|
55
|
+
* (`https://…`, `mailto:`, relative host links), which render as-is.
|
|
56
|
+
*
|
|
57
|
+
* Only root-relative console paths are recognized; an absolute URL is always an
|
|
58
|
+
* ordinary link, so a host's own `https://` routes are never reinterpreted.
|
|
59
|
+
* A validated `?fromSession=<uuid>` return hint is preserved.
|
|
60
|
+
*/
|
|
61
|
+
export declare function parseOpenGeniLink(href: string | undefined): OpenGeniLinkTarget | null;
|
|
62
|
+
/** The Opengeni console route for a target (the form agents write). */
|
|
63
|
+
export declare function openGeniConsolePath(target: OpenGeniLinkTarget, workspaceId: string): string | null;
|
|
64
|
+
/**
|
|
65
|
+
* Request header naming the session an embedded artifact read belongs to.
|
|
66
|
+
* `createSessionProxyHandler` only serves artifacts Opengeni lists for it.
|
|
67
|
+
*/
|
|
68
|
+
export declare const SESSION_SCOPE_HEADER = "x-opengeni-session-id";
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export type ModelContextInstructionLayerId = "operational_contract" | "persona_and_core" | "workspace_governance" | "session_instructions" | "workspace_memory" | "skill_catalog" | "codemode" | "code_search" | "git_bindings" | "builtin_skills" | "genesis_title" | "sdk_capability_instructions" | "sandbox_preamble" | "sandbox_filesystem" | "sent_system_instructions" | "identity";
|
|
2
|
+
/** Sections of a modular operational contract, in composition order. */
|
|
3
|
+
export type AgentPromptModuleId = "base_behavior" | "runtime_mechanics" | "renderer_markdown" | "sandbox" | "connected_machine" | "repositories" | "workspace_environment" | "rig" | "artifacts" | "media" | "goals" | "subagents" | "knowledge" | "skills" | "secrets" | "admin" | "attachments";
|
|
4
|
+
export type ModelContextInstructionModule = {
|
|
5
|
+
id: AgentPromptModuleId;
|
|
6
|
+
chars: number;
|
|
7
|
+
};
|
|
8
|
+
export type ModelContextInstructionLayer = {
|
|
9
|
+
id: ModelContextInstructionLayerId;
|
|
10
|
+
title: string;
|
|
11
|
+
content: string;
|
|
12
|
+
utf8Bytes: number;
|
|
13
|
+
estimatedTokens: number;
|
|
14
|
+
/** Present on the operational contract of sessions with an agent configuration. */
|
|
15
|
+
modules?: ModelContextInstructionModule[] | undefined;
|
|
16
|
+
};
|
|
17
|
+
export type ModelContextToolVisibility = "eager" | "searchable";
|
|
18
|
+
export type ModelContextTool = {
|
|
19
|
+
name: string;
|
|
20
|
+
type: string;
|
|
21
|
+
visibility: ModelContextToolVisibility;
|
|
22
|
+
description?: string | undefined;
|
|
23
|
+
namespace?: string | undefined;
|
|
24
|
+
schema?: unknown | undefined;
|
|
25
|
+
utf8Bytes: number;
|
|
26
|
+
estimatedTokens: number;
|
|
27
|
+
};
|
|
28
|
+
export type ModelContextSkillKind = "preference_descriptor" | "runtime_skill" | "native_tool_skill";
|
|
29
|
+
export type ModelContextSkill = {
|
|
30
|
+
kind: ModelContextSkillKind;
|
|
31
|
+
name: string;
|
|
32
|
+
description: string;
|
|
33
|
+
source?: string | undefined;
|
|
34
|
+
path?: string | undefined;
|
|
35
|
+
};
|
|
36
|
+
export type ModelContextTokenCounts = {
|
|
37
|
+
instructions: number;
|
|
38
|
+
tools: number;
|
|
39
|
+
prefix: number;
|
|
40
|
+
};
|
|
41
|
+
export type ModelContextSnapshot = {
|
|
42
|
+
providerRequest?: {
|
|
43
|
+
provider: string;
|
|
44
|
+
body: string | null;
|
|
45
|
+
unavailableReason?: string | undefined;
|
|
46
|
+
parts: {
|
|
47
|
+
key: string;
|
|
48
|
+
estimatedTokens: number | null;
|
|
49
|
+
utf8Bytes: number;
|
|
50
|
+
itemEstimatedTokens?: (number | null)[] | undefined;
|
|
51
|
+
}[];
|
|
52
|
+
} | undefined;
|
|
53
|
+
version: 1;
|
|
54
|
+
capturedAt: string;
|
|
55
|
+
source: "model_request";
|
|
56
|
+
requestIndex: number;
|
|
57
|
+
instructions: string;
|
|
58
|
+
layers: ModelContextInstructionLayer[];
|
|
59
|
+
tools: ModelContextTool[];
|
|
60
|
+
skills: ModelContextSkill[];
|
|
61
|
+
tokens: ModelContextTokenCounts;
|
|
62
|
+
};
|
|
63
|
+
export type SessionModelContextResponse = {
|
|
64
|
+
sessionId: string;
|
|
65
|
+
attemptId: string | null;
|
|
66
|
+
turnId: string | null;
|
|
67
|
+
snapshot: ModelContextSnapshot | null;
|
|
68
|
+
};
|