@opengeni/sdk 3.1.0 → 3.1.2
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 +1037 -71
- package/dist/accounts.d.ts +5 -1
- package/dist/accounts.js +13 -1
- package/dist/accounts.js.map +1 -1
- 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 +7 -2
- package/dist/browser.js +27 -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 +1703 -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-6HZGAIUE.js +1665 -0
- package/dist/chunk-6HZGAIUE.js.map +1 -0
- package/dist/chunk-7EWT3PV6.js +368 -0
- package/dist/chunk-7EWT3PV6.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-JXXCTW5W.js +1392 -0
- package/dist/chunk-JXXCTW5W.js.map +1 -0
- package/dist/{chunk-YTAWBDO2.js → chunk-KADZ5PGG.js} +28 -2
- package/dist/chunk-KADZ5PGG.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-7ZXBPJZP.js → chunk-NEM5N6C6.js} +3902 -1457
- package/dist/chunk-NEM5N6C6.js.map +1 -0
- package/dist/{chunk-GW3EJ2GP.js → chunk-O7KANXC3.js} +86 -13
- package/dist/chunk-O7KANXC3.js.map +1 -0
- package/dist/{chunk-VUQZAB3O.js → chunk-OAKHWFSV.js} +28 -32
- package/dist/chunk-OAKHWFSV.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-RJHCBZF7.js +270 -0
- package/dist/chunk-RJHCBZF7.js.map +1 -0
- package/dist/chunk-S3D75WSQ.js +340 -0
- package/dist/chunk-S3D75WSQ.js.map +1 -0
- package/dist/chunk-UM4ZXXJR.js +9 -0
- package/dist/chunk-UM4ZXXJR.js.map +1 -0
- package/dist/chunk-VPVMLM7Q.js +15 -0
- package/dist/chunk-VPVMLM7Q.js.map +1 -0
- package/dist/{chunk-C2H7HBNP.js → chunk-WVCJRSGJ.js} +119 -14
- package/dist/chunk-WVCJRSGJ.js.map +1 -0
- package/dist/chunk-XA7HVIHI.js +126 -0
- package/dist/chunk-XA7HVIHI.js.map +1 -0
- package/dist/{chunk-TX3EIENU.js → chunk-YDVPI7WT.js} +73 -2
- package/dist/chunk-YDVPI7WT.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 +1065 -124
- 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/company-profile.d.ts +13 -0
- package/dist/core.d.ts +7 -2
- package/dist/core.js +25 -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 +76 -1
- 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 +64 -11
- package/dist/index.js +566 -141
- 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 +103 -71
- package/dist/interaction.js +4 -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/model-picker-order.d.ts +1 -0
- package/dist/model-picker-order.js +10 -0
- package/dist/model-picker-order.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 +4 -2
- 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 -0
- 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-bridge-host.d.ts +112 -0
- package/dist/site-bridge-host.js +285 -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 +182 -0
- package/dist/site.js +62 -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 +2848 -573
- 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 +236 -0
- package/dist/vaults-api.d.ts +57 -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 +65 -0
- package/dist/workspace-integrations.js.map +1 -0
- package/dist/workspace-state.d.ts +8 -71
- package/package.json +99 -5
- package/src/accounts.ts +18 -0
- 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 +37 -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 +5822 -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/company-profile.ts +13 -0
- package/src/core.ts +20 -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 +303 -4
- 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 +611 -64
- package/src/insights-usage.ts +61 -0
- package/src/interaction.ts +274 -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/model-picker-order.ts +6 -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 +16 -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 +10 -0
- package/src/session-usage-limits.ts +71 -0
- package/src/shared-catalog-loader.ts +169 -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 +867 -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 +3216 -581
- package/src/usage-allowances.ts +189 -0
- package/src/vault-types.ts +293 -0
- package/src/vaults-api.ts +288 -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-7ZXBPJZP.js.map +0 -1
- package/dist/chunk-C2H7HBNP.js.map +0 -1
- package/dist/chunk-C4DJPZRU.js +0 -119
- package/dist/chunk-C4DJPZRU.js.map +0 -1
- package/dist/chunk-GW3EJ2GP.js.map +0 -1
- package/dist/chunk-TX3EIENU.js.map +0 -1
- package/dist/chunk-VUQZAB3O.js.map +0 -1
- package/dist/chunk-VYCTL62C.js.map +0 -1
- package/dist/chunk-YTAWBDO2.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;
|
|
@@ -896,12 +867,16 @@ export type ComputerFrameStreamAttachment = InteractionFrameStreamAttachment<4>
|
|
|
896
867
|
kind: "direct_rfb";
|
|
897
868
|
url: string;
|
|
898
869
|
protocols: string[];
|
|
870
|
+
inputAllowed: boolean;
|
|
899
871
|
};
|
|
900
872
|
export type BrowserSessionAttachment = {
|
|
901
873
|
browserSessionId: string;
|
|
902
874
|
controllerGeneration: string;
|
|
903
875
|
targetId: string;
|
|
904
876
|
stream: InteractionFrameStreamAttachment<3>;
|
|
877
|
+
/** Negotiated from this attachment’s live controller, absent on older helpers. */
|
|
878
|
+
fencedInputBatches?: true | undefined;
|
|
879
|
+
focusedInputObservations?: true | undefined;
|
|
905
880
|
expiresAt: string;
|
|
906
881
|
};
|
|
907
882
|
export type BrowserSessionAttachmentRequest = {
|
|
@@ -912,10 +887,15 @@ export type BrowserSessionAttachmentRequest = {
|
|
|
912
887
|
export type BrowserActionRequest = {
|
|
913
888
|
operationId: string;
|
|
914
889
|
targetId: string;
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
890
|
+
/** Omit the three fences to act on the target's current state; the API reads
|
|
891
|
+
* them from the live controller in the same request. */
|
|
892
|
+
expectedTargetGeneration?: string | undefined;
|
|
893
|
+
expectedDocumentGeneration?: string | null | undefined;
|
|
894
|
+
expectedFrameId?: string | null | undefined;
|
|
895
|
+
/** `input` is negotiated by focusedInputObservations on a live attachment.
|
|
896
|
+
* It returns optional native-select metadata after a pointer click, and null
|
|
897
|
+
* for ordinary input. Use full for agent observations. */
|
|
898
|
+
observationMode?: "full" | "none" | "input" | undefined;
|
|
919
899
|
action: BrowserAction | BrowserActionBatch;
|
|
920
900
|
};
|
|
921
901
|
export type BrowserActionReceipt = {
|
|
@@ -929,6 +909,19 @@ export type BrowserActionReceipt = {
|
|
|
929
909
|
settledAt: string | null;
|
|
930
910
|
observation: BrowserObservation | null;
|
|
931
911
|
error: InteractionError | null;
|
|
912
|
+
/** Elements the action's locators resolved to, in dispatch order. */
|
|
913
|
+
targets?: BrowserActionResolvedTarget[] | undefined;
|
|
914
|
+
};
|
|
915
|
+
export type BrowserActionResolvedTarget = {
|
|
916
|
+
actionIndex: number;
|
|
917
|
+
ref: string | null;
|
|
918
|
+
role: string;
|
|
919
|
+
name: string | null;
|
|
920
|
+
/** Nearest dialog, landmark, menu or toolbar around the element. */
|
|
921
|
+
container: {
|
|
922
|
+
role: string;
|
|
923
|
+
name: string | null;
|
|
924
|
+
} | null;
|
|
932
925
|
};
|
|
933
926
|
export type BrowserSessionHeartbeatResponse = {
|
|
934
927
|
browserSessionId: string;
|
|
@@ -943,9 +936,13 @@ export type ComputerSessionCapabilities = {
|
|
|
943
936
|
screenCapture: boolean;
|
|
944
937
|
semanticActions: boolean;
|
|
945
938
|
pointerInput: boolean;
|
|
939
|
+
/** Causal count-2 input requires its exact confirmed first operation. Absent means unsupported. */
|
|
940
|
+
pointerClickContinuation?: boolean | undefined;
|
|
946
941
|
keyboardInput: boolean;
|
|
947
942
|
clipboard: boolean;
|
|
948
943
|
backgroundActions: boolean;
|
|
944
|
+
/** Raw window input stays in the background. Absent means foreground-only. */
|
|
945
|
+
backgroundInput?: boolean | undefined;
|
|
949
946
|
parallelApps: boolean;
|
|
950
947
|
};
|
|
951
948
|
export type ComputerClipboard = {
|
|
@@ -1034,6 +1031,9 @@ export type ComputerAction = {
|
|
|
1034
1031
|
deltaX?: number | undefined;
|
|
1035
1032
|
deltaY?: number | undefined;
|
|
1036
1033
|
button?: "left" | "right" | "middle" | undefined;
|
|
1034
|
+
/** Click only; 2 delivers one second click pair after a completed first click. */
|
|
1035
|
+
clickCount?: 1 | 2 | undefined;
|
|
1036
|
+
continuationOfOperationId?: string | undefined;
|
|
1037
1037
|
} | {
|
|
1038
1038
|
type: "keyboard";
|
|
1039
1039
|
action: "type" | "press";
|
|
@@ -1083,9 +1083,17 @@ export type ComputerSessionAttachment = {
|
|
|
1083
1083
|
computerSessionId: string;
|
|
1084
1084
|
controllerGeneration: string;
|
|
1085
1085
|
targetId: string;
|
|
1086
|
+
/** Viewer posture when attached; actions still reauthorize the live source. */
|
|
1087
|
+
inputAllowed?: boolean | undefined;
|
|
1086
1088
|
stream: ComputerFrameStreamAttachment;
|
|
1087
1089
|
expiresAt: string;
|
|
1088
1090
|
};
|
|
1091
|
+
/** Caller-specific hint only; every action still requires live authorization. */
|
|
1092
|
+
export type ComputerSessionInputPosture = {
|
|
1093
|
+
computerSessionId: string;
|
|
1094
|
+
controllerGeneration: string;
|
|
1095
|
+
inputAllowed: boolean;
|
|
1096
|
+
};
|
|
1089
1097
|
export type ComputerSessionAttachmentRequest = {
|
|
1090
1098
|
targetId: string;
|
|
1091
1099
|
expiresInSeconds?: number | undefined;
|
|
@@ -1136,7 +1144,6 @@ export interface InteractionTransport {
|
|
|
1136
1144
|
getAuthRun(workspaceId: string, authRunId: string, options?: OpenGeniRequestOptions): Promise<AuthRun>;
|
|
1137
1145
|
startBrowserAuthRun(workspaceId: string, browserSessionId: string, request: StartAuthRunRequest, options?: OpenGeniRequestOptions): Promise<AuthRunMutationResponse>;
|
|
1138
1146
|
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
1147
|
advanceExternalBrowserAuthRun(workspaceId: string, browserSessionId: string, authRunId: string, request: ExternalAuthRunRequest, options?: OpenGeniRequestOptions): Promise<ExternalAuthRunResponse>;
|
|
1141
1148
|
openExternalBrowserAuthFlow(workspaceId: string, browserSessionId: string, authRunId: string, request: ExternalAuthInteractiveRequest, options?: OpenGeniRequestOptions): Promise<ExternalAuthInteractiveResponse>;
|
|
1142
1149
|
verifyBrowserAuthRun(workspaceId: string, browserSessionId: string, authRunId: string, request: VerifyAuthRunRequest, options?: OpenGeniRequestOptions): Promise<AuthRunMutationResponse>;
|
|
@@ -1151,7 +1158,7 @@ export interface InteractionTransport {
|
|
|
1151
1158
|
createBrowserIdentity(workspaceId: string, request: CreateBrowserIdentityRequest, options?: OpenGeniRequestOptions): Promise<BrowserIdentityMutationResponse>;
|
|
1152
1159
|
updateBrowserIdentity(workspaceId: string, identityId: string, request: UpdateBrowserIdentityRequest, options?: OpenGeniRequestOptions): Promise<BrowserIdentityMutationResponse>;
|
|
1153
1160
|
listBrowserRevisions(workspaceId: string, identityId: string, options?: OpenGeniRequestOptions): Promise<BrowserRevisionListResponse>;
|
|
1154
|
-
listBrowserSessions(workspaceId: string, options?: OpenGeniRequestOptions): Promise<BrowserSessionListResponse>;
|
|
1161
|
+
listBrowserSessions(workspaceId: string, options?: OpenGeniRequestOptions | InteractionSessionListOptions): Promise<BrowserSessionListResponse>;
|
|
1155
1162
|
getBrowserSession(workspaceId: string, browserSessionId: string, options?: OpenGeniRequestOptions): Promise<BrowserSession>;
|
|
1156
1163
|
readBrowserClipboard(workspaceId: string, browserSessionId: string, options?: OpenGeniRequestOptions): Promise<BrowserClipboard>;
|
|
1157
1164
|
listBrowserDownloads(workspaceId: string, browserSessionId: string, options?: OpenGeniRequestOptions): Promise<BrowserDownloadListResponse>;
|
|
@@ -1160,9 +1167,14 @@ export interface InteractionTransport {
|
|
|
1160
1167
|
createBrowserSession(workspaceId: string, request: CreateBrowserSessionRequest, options?: OpenGeniRequestOptions): Promise<BrowserSessionMutationResponse>;
|
|
1161
1168
|
listBrowserTargets(workspaceId: string, browserSessionId: string, options?: OpenGeniRequestOptions): Promise<BrowserTargetListResponse>;
|
|
1162
1169
|
openBrowserTarget(workspaceId: string, browserSessionId: string, request?: BrowserOpenTargetRequest, options?: OpenGeniRequestOptions): Promise<BrowserObservation>;
|
|
1170
|
+
/** Optional for custom transports predating metadata-only tab opening. */
|
|
1171
|
+
openBrowserTargetWithInventory?(workspaceId: string, browserSessionId: string, request?: BrowserOpenTargetRequest, options?: OpenGeniRequestOptions): Promise<BrowserTargetListResponse>;
|
|
1163
1172
|
selectBrowserTarget(workspaceId: string, browserSessionId: string, targetId: string, options?: OpenGeniRequestOptions): Promise<BrowserObservation>;
|
|
1164
1173
|
closeBrowserTarget(workspaceId: string, browserSessionId: string, targetId: string, options?: OpenGeniRequestOptions): Promise<BrowserTargetListResponse>;
|
|
1165
1174
|
observeBrowserTarget(workspaceId: string, browserSessionId: string, targetId: string, options?: OpenGeniRequestOptions): Promise<BrowserObservation>;
|
|
1175
|
+
getBrowserTargetState(workspaceId: string, browserSessionId: string, targetId: string, options?: OpenGeniRequestOptions): Promise<BrowserTargetState>;
|
|
1176
|
+
readBrowserDom(workspaceId: string, browserSessionId: string, targetId: string, request: BrowserDomReadRequest, options?: OpenGeniRequestOptions): Promise<BrowserDomReadResponse>;
|
|
1177
|
+
captureBrowserTarget(workspaceId: string, browserSessionId: string, targetId: string, options?: OpenGeniRequestOptions, captureOptions?: BrowserScreenshotOptions): Promise<BrowserFrame>;
|
|
1166
1178
|
actInBrowser(workspaceId: string, browserSessionId: string, request: BrowserActionRequest, options?: OpenGeniRequestOptions): Promise<BrowserActionReceipt>;
|
|
1167
1179
|
getBrowserActionReceipt(workspaceId: string, browserSessionId: string, operationId: string, options?: OpenGeniRequestOptions): Promise<BrowserActionReceipt>;
|
|
1168
1180
|
listBrowserDiagnostics(workspaceId: string, browserSessionId: string, targetId: string, options?: BrowserDiagnosticsOptions): Promise<BrowserDiagnosticBatch>;
|
|
@@ -1172,13 +1184,17 @@ export interface InteractionTransport {
|
|
|
1172
1184
|
suspendBrowserSession(workspaceId: string, browserSessionId: string, request: BrowserSessionLifecycleRequest, options?: OpenGeniRequestOptions): Promise<BrowserSessionMutationResponse>;
|
|
1173
1185
|
resumeBrowserSession(workspaceId: string, browserSessionId: string, request: BrowserSessionLifecycleRequest, options?: OpenGeniRequestOptions): Promise<BrowserSessionMutationResponse>;
|
|
1174
1186
|
endBrowserSession(workspaceId: string, browserSessionId: string, request: BrowserSessionLifecycleRequest, options?: OpenGeniRequestOptions): Promise<BrowserSessionMutationResponse>;
|
|
1175
|
-
listComputerSessions(workspaceId: string, options?: OpenGeniRequestOptions): Promise<ComputerSessionListResponse>;
|
|
1187
|
+
listComputerSessions(workspaceId: string, options?: OpenGeniRequestOptions | InteractionSessionListOptions): Promise<ComputerSessionListResponse>;
|
|
1176
1188
|
getComputerSession(workspaceId: string, computerSessionId: string, options?: OpenGeniRequestOptions): Promise<ComputerSession>;
|
|
1189
|
+
getComputerInputPosture?(workspaceId: string, computerSessionId: string, options?: OpenGeniRequestOptions): Promise<ComputerSessionInputPosture>;
|
|
1177
1190
|
readComputerClipboard(workspaceId: string, computerSessionId: string, options?: OpenGeniRequestOptions): Promise<ComputerClipboard>;
|
|
1178
1191
|
createComputerSession(workspaceId: string, request: CreateComputerSessionRequest, options?: OpenGeniRequestOptions): Promise<ComputerSessionMutationResponse>;
|
|
1179
1192
|
listComputerTargets(workspaceId: string, computerSessionId: string, options?: OpenGeniRequestOptions): Promise<ComputerTargetListResponse>;
|
|
1180
1193
|
observeComputerTarget(workspaceId: string, computerSessionId: string, targetId: string, options?: OpenGeniRequestOptions): Promise<ComputerObservation>;
|
|
1194
|
+
captureComputerTarget(workspaceId: string, computerSessionId: string, targetId: string, options?: OpenGeniRequestOptions): Promise<ComputerFrame>;
|
|
1195
|
+
callNativeComputerTool?(workspaceId: string, computerSessionId: string, request: ComputerNativeCallRequest, options?: OpenGeniRequestOptions): Promise<ComputerNativeReceipt>;
|
|
1181
1196
|
actInComputer(workspaceId: string, computerSessionId: string, request: ComputerActionRequest, options?: OpenGeniRequestOptions): Promise<ComputerActionReceipt>;
|
|
1197
|
+
getNativeComputerToolReceipt?(workspaceId: string, computerSessionId: string, operationId: string, options?: OpenGeniRequestOptions): Promise<ComputerNativeReceipt>;
|
|
1182
1198
|
getComputerActionReceipt(workspaceId: string, computerSessionId: string, operationId: string, options?: OpenGeniRequestOptions): Promise<ComputerActionReceipt>;
|
|
1183
1199
|
attachComputerSession(workspaceId: string, computerSessionId: string, request: ComputerSessionAttachmentRequest, options?: OpenGeniRequestOptions): Promise<ComputerSessionAttachment>;
|
|
1184
1200
|
heartbeatComputerSession(workspaceId: string, computerSessionId: string, options?: OpenGeniRequestOptions): Promise<ComputerSessionHeartbeatResponse>;
|
|
@@ -1219,6 +1235,7 @@ export type CurrentOrOpenBrowserOptions = {
|
|
|
1219
1235
|
name?: string | undefined;
|
|
1220
1236
|
initialUrl?: string | undefined;
|
|
1221
1237
|
headless?: boolean | undefined;
|
|
1238
|
+
storageMode?: "private_profile" | "ephemeral_context" | undefined;
|
|
1222
1239
|
placement?: InteractionPlacement | undefined;
|
|
1223
1240
|
identityId?: string | undefined;
|
|
1224
1241
|
baseRevisionId?: string | undefined;
|
|
@@ -1300,7 +1317,6 @@ export declare class AuthRunResource {
|
|
|
1300
1317
|
constructor(transport: BrowserInteractionTransport, workspaceId: string, browserSessionId: string, id: string);
|
|
1301
1318
|
get(options?: OpenGeniRequestOptions): Promise<AuthRun>;
|
|
1302
1319
|
report(request: ReportAuthRunRequest, options?: OpenGeniRequestOptions): Promise<AuthRunMutationResponse>;
|
|
1303
|
-
protectedFill(request: ProtectedAuthFillRequest, options?: OpenGeniRequestOptions): Promise<ProtectedAuthFillResponse>;
|
|
1304
1320
|
advanceExternal(request: ExternalAuthRunRequest, options?: OpenGeniRequestOptions): Promise<ExternalAuthRunResponse>;
|
|
1305
1321
|
/** Human-session helper. Hosted provider URLs never appear in model tools. */
|
|
1306
1322
|
openExternalFlow(request: ExternalAuthInteractiveRequest, options?: OpenGeniRequestOptions): Promise<ExternalAuthInteractiveResponse>;
|
|
@@ -1353,7 +1369,7 @@ export declare class BrowserIdentityResource {
|
|
|
1353
1369
|
export declare class BrowserSessionCollection {
|
|
1354
1370
|
private readonly transport;
|
|
1355
1371
|
constructor(transport: BrowserInteractionTransport);
|
|
1356
|
-
list(workspaceId: string, options?: OpenGeniRequestOptions): Promise<BrowserSessionListResponse>;
|
|
1372
|
+
list(workspaceId: string, options?: OpenGeniRequestOptions | InteractionSessionListOptions): Promise<BrowserSessionListResponse>;
|
|
1357
1373
|
session(workspaceId: string, browserSessionId: string): BrowserSessionResource;
|
|
1358
1374
|
open(workspaceId: string, request: CreateBrowserSessionRequest, options?: OpenGeniRequestOptions): Promise<BrowserSessionResource>;
|
|
1359
1375
|
currentOrOpen(options: CurrentOrOpenBrowserOptions): Promise<BrowserSessionResource>;
|
|
@@ -1371,6 +1387,10 @@ export declare class BrowserSessionResource {
|
|
|
1371
1387
|
constructor(transport: BrowserInteractionTransport, workspaceId: string, id: string);
|
|
1372
1388
|
get(options?: OpenGeniRequestOptions): Promise<BrowserSession>;
|
|
1373
1389
|
observe(targetId: string, options?: OpenGeniRequestOptions): Promise<BrowserObservation>;
|
|
1390
|
+
targetState(targetId: string, options?: OpenGeniRequestOptions): Promise<BrowserTargetState>;
|
|
1391
|
+
readDom(targetId: string, request: BrowserDomReadRequest, options?: OpenGeniRequestOptions): Promise<BrowserDomReadResponse>;
|
|
1392
|
+
capture(targetId: string, options?: OpenGeniRequestOptions, captureOptions?: BrowserScreenshotOptions): Promise<BrowserFrame>;
|
|
1393
|
+
screenshot(targetId: string, captureOptions?: BrowserScreenshotOptions, options?: OpenGeniRequestOptions): Promise<BrowserFrame>;
|
|
1374
1394
|
act(request: BrowserActionRequest, options?: OpenGeniRequestOptions): Promise<BrowserActionReceipt>;
|
|
1375
1395
|
receipt(operationId: string, options?: OpenGeniRequestOptions): Promise<BrowserActionReceipt>;
|
|
1376
1396
|
diagnostics(targetId: string, options?: BrowserDiagnosticsOptions): Promise<BrowserDiagnosticBatch>;
|
|
@@ -1421,7 +1441,7 @@ export declare class BrowserTargetCollection {
|
|
|
1421
1441
|
export declare class ComputerSessionCollection {
|
|
1422
1442
|
private readonly transport;
|
|
1423
1443
|
constructor(transport: BrowserInteractionTransport);
|
|
1424
|
-
list(workspaceId: string, options?: OpenGeniRequestOptions): Promise<ComputerSessionListResponse>;
|
|
1444
|
+
list(workspaceId: string, options?: OpenGeniRequestOptions | InteractionSessionListOptions): Promise<ComputerSessionListResponse>;
|
|
1425
1445
|
session(workspaceId: string, computerSessionId: string): ComputerSessionResource;
|
|
1426
1446
|
open(workspaceId: string, request: CreateComputerSessionRequest, options?: OpenGeniRequestOptions): Promise<ComputerSessionResource>;
|
|
1427
1447
|
currentOrOpen(options: CurrentOrOpenComputerOptions): Promise<ComputerSessionResource>;
|
|
@@ -1437,9 +1457,13 @@ export declare class ComputerSessionResource {
|
|
|
1437
1457
|
constructor(transport: BrowserInteractionTransport, workspaceId: string, id: string);
|
|
1438
1458
|
get(options?: OpenGeniRequestOptions): Promise<ComputerSession>;
|
|
1439
1459
|
observe(targetId: string, options?: OpenGeniRequestOptions): Promise<ComputerObservation>;
|
|
1460
|
+
capture(targetId: string, options?: OpenGeniRequestOptions): Promise<ComputerFrame>;
|
|
1461
|
+
callNativeTool(request: ComputerNativeCallRequest, options?: OpenGeniRequestOptions): Promise<ComputerNativeReceipt>;
|
|
1440
1462
|
act(request: ComputerActionRequest, options?: OpenGeniRequestOptions): Promise<ComputerActionReceipt>;
|
|
1463
|
+
nativeReceipt(operationId: string, options?: OpenGeniRequestOptions): Promise<ComputerNativeReceipt>;
|
|
1441
1464
|
receipt(operationId: string, options?: OpenGeniRequestOptions): Promise<ComputerActionReceipt>;
|
|
1442
1465
|
attach(request: ComputerSessionAttachmentRequest, options?: OpenGeniRequestOptions): Promise<ComputerSessionAttachment>;
|
|
1466
|
+
inputPosture(options?: OpenGeniRequestOptions): Promise<ComputerSessionInputPosture>;
|
|
1443
1467
|
heartbeat(options?: OpenGeniRequestOptions): Promise<ComputerSessionHeartbeatResponse>;
|
|
1444
1468
|
end(request?: ComputerSessionLifecycleRequest, options?: OpenGeniRequestOptions): Promise<ComputerSessionMutationResponse>;
|
|
1445
1469
|
}
|
|
@@ -1476,6 +1500,13 @@ export type BrowserFrameMetadata = {
|
|
|
1476
1500
|
export type BrowserFrame = BrowserFrameMetadata & {
|
|
1477
1501
|
data: Uint8Array;
|
|
1478
1502
|
};
|
|
1503
|
+
export type BrowserScreenshotOptions = {
|
|
1504
|
+
/** Capture the document content instead of the visible viewport. */
|
|
1505
|
+
fullPage?: boolean;
|
|
1506
|
+
format?: "jpeg" | "png";
|
|
1507
|
+
/** JPEG quality, from 1 to 100. Ignored for PNG. */
|
|
1508
|
+
quality?: number;
|
|
1509
|
+
};
|
|
1479
1510
|
export type ComputerFrameMetadata = {
|
|
1480
1511
|
frameId: string;
|
|
1481
1512
|
computerSessionId: string;
|
|
@@ -1505,3 +1536,4 @@ export declare function decodeBrowserFrameMessage(message: ArrayBuffer | Uint8Ar
|
|
|
1505
1536
|
export declare function decodeComputerFrameMessage(message: ArrayBuffer | Uint8Array): Promise<ComputerFrame>;
|
|
1506
1537
|
export declare function parseBrowserFrameMetadata(value: unknown): BrowserFrameMetadata;
|
|
1507
1538
|
export declare function parseComputerFrameMetadata(value: unknown): ComputerFrameMetadata;
|
|
1539
|
+
export declare function decodeComputerFrameMetadataHeader(value: string): ComputerFrameMetadata;
|
package/dist/interaction.js
CHANGED
|
@@ -35,11 +35,12 @@ import {
|
|
|
35
35
|
computerFrameSocketUrl,
|
|
36
36
|
decodeBrowserFrameMessage,
|
|
37
37
|
decodeComputerFrameMessage,
|
|
38
|
+
decodeComputerFrameMetadataHeader,
|
|
38
39
|
interactionControlFailureFromError,
|
|
39
40
|
parseBrowserFrameMetadata,
|
|
40
41
|
parseComputerFrameMetadata
|
|
41
|
-
} from "./chunk-
|
|
42
|
-
import "./chunk-
|
|
42
|
+
} from "./chunk-O7KANXC3.js";
|
|
43
|
+
import "./chunk-7EWT3PV6.js";
|
|
43
44
|
export {
|
|
44
45
|
AttachedBrowserDeviceCollection,
|
|
45
46
|
AttachedBrowserDeviceResource,
|
|
@@ -77,6 +78,7 @@ export {
|
|
|
77
78
|
computerFrameSocketUrl,
|
|
78
79
|
decodeBrowserFrameMessage,
|
|
79
80
|
decodeComputerFrameMessage,
|
|
81
|
+
decodeComputerFrameMetadataHeader,
|
|
80
82
|
interactionControlFailureFromError,
|
|
81
83
|
parseBrowserFrameMetadata,
|
|
82
84
|
parseComputerFrameMetadata
|
|
@@ -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
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
humanizeModelSlug,
|
|
3
|
+
isRawModelLabel,
|
|
4
|
+
modelDisplayName,
|
|
5
|
+
modelLogoUrl,
|
|
6
|
+
modelSlug,
|
|
7
|
+
modelVendor
|
|
8
|
+
} from "./chunk-YKIHNLWD.js";
|
|
9
|
+
export {
|
|
10
|
+
humanizeModelSlug,
|
|
11
|
+
isRawModelLabel,
|
|
12
|
+
modelDisplayName,
|
|
13
|
+
modelLogoUrl,
|
|
14
|
+
modelSlug,
|
|
15
|
+
modelVendor
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=model-display.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { compareModelPickerOrder, modelPickerBillingClassFor, type ModelPickerBillingCandidate, type ModelPickerBillingClass, } from "@opengeni/contracts/model-picker-order";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// src/model-picker-order.ts
|
|
2
|
+
import {
|
|
3
|
+
compareModelPickerOrder,
|
|
4
|
+
modelPickerBillingClassFor
|
|
5
|
+
} from "@opengeni/contracts/model-picker-order";
|
|
6
|
+
export {
|
|
7
|
+
compareModelPickerOrder,
|
|
8
|
+
modelPickerBillingClassFor
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=model-picker-order.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/model-picker-order.ts"],"sourcesContent":["export {\n compareModelPickerOrder,\n modelPickerBillingClassFor,\n type ModelPickerBillingCandidate,\n type ModelPickerBillingClass,\n} from \"@opengeni/contracts/model-picker-order\";\n"],"mappings":";AAAA;AAAA,EACE;AAAA,EACA;AAAA,OAGK;","names":[]}
|