@opengeni/sdk 7.1.0 → 7.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/artifacts.js +5 -5
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +3 -3
- package/dist/chat/index.js +6 -6
- package/dist/{chunk-MG4QFBKR.js → chunk-B7S4YVGX.js} +2 -2
- package/dist/{chunk-LSO66LQA.js → chunk-E5WAYGHT.js} +1 -1
- package/dist/chunk-E5WAYGHT.js.map +1 -0
- package/dist/{chunk-YHF66FWZ.js → chunk-MPN5UJWE.js} +2 -2
- package/dist/{chunk-Y7DRKEFZ.js → chunk-NP7DDXHK.js} +94 -5
- package/dist/chunk-NP7DDXHK.js.map +1 -0
- package/dist/{chunk-ZN6WWXAX.js → chunk-PCVFOBSV.js} +2 -2
- package/dist/{chunk-X6Y2JCAN.js → chunk-RAG3P2UV.js} +2 -2
- package/dist/{chunk-QTBAMHEF.js → chunk-YUOPVPZW.js} +25 -1
- package/dist/chunk-YUOPVPZW.js.map +1 -0
- package/dist/client.d.ts +10 -2
- package/dist/core.js +4 -4
- package/dist/document-authority.js +4 -4
- package/dist/editable-artifacts.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +7 -7
- package/dist/interaction.d.ts +35 -0
- package/dist/interaction.js +1 -1
- package/dist/knowledge.d.ts +1 -1
- package/dist/knowledge.js.map +1 -1
- package/dist/session-message-search.d.ts +12 -0
- package/dist/site-browser-runtime.gen.d.ts +1 -1
- package/dist/site-document.js +1 -1
- package/dist/site-document.js.map +1 -1
- package/dist/site.js +4 -4
- package/dist/types.d.ts +3 -3
- package/package.json +2 -2
- package/src/browser.ts +2 -0
- package/src/client.ts +146 -2
- package/src/index.ts +2 -0
- package/src/interaction.ts +102 -0
- package/src/knowledge.ts +1 -0
- package/src/session-message-search.ts +8 -0
- package/src/site-browser-runtime.gen.ts +1 -1
- package/src/types.ts +5 -0
- package/dist/chunk-LSO66LQA.js.map +0 -1
- package/dist/chunk-QTBAMHEF.js.map +0 -1
- package/dist/chunk-Y7DRKEFZ.js.map +0 -1
- /package/dist/{chunk-MG4QFBKR.js.map → chunk-B7S4YVGX.js.map} +0 -0
- /package/dist/{chunk-YHF66FWZ.js.map → chunk-MPN5UJWE.js.map} +0 -0
- /package/dist/{chunk-ZN6WWXAX.js.map → chunk-PCVFOBSV.js.map} +0 -0
- /package/dist/{chunk-X6Y2JCAN.js.map → chunk-RAG3P2UV.js.map} +0 -0
package/dist/interaction.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { OpenGeniRequestOptions } from "./client.js";
|
|
2
|
+
import type { BrowserDomReadRequest, BrowserDomReadResponse, BrowserTargetState } from "@opengeni/contracts";
|
|
3
|
+
export type { BrowserDomReadRequest, BrowserDomReadResponse, BrowserDomSafeAttribute, BrowserTargetState, } from "@opengeni/contracts";
|
|
2
4
|
import type { RetainedArtifactReference } from "./types.js";
|
|
3
5
|
/** Public Browser/Computer protocol version. Driver and provider details stay private. */
|
|
4
6
|
export declare const INTERACTION_PROTOCOL_VERSION: 1;
|
|
@@ -691,6 +693,14 @@ export type BrowserObservation = {
|
|
|
691
693
|
frameId: string | null;
|
|
692
694
|
semantic: InteractionSemanticSnapshot | InteractionSemanticDiff | null;
|
|
693
695
|
screenshot: RetainedArtifactReference | null;
|
|
696
|
+
viewport?: {
|
|
697
|
+
width: number;
|
|
698
|
+
height: number;
|
|
699
|
+
visualWidth: number;
|
|
700
|
+
visualHeight: number;
|
|
701
|
+
deviceScaleFactor: number;
|
|
702
|
+
maxTouchPoints: number;
|
|
703
|
+
} | null | undefined;
|
|
694
704
|
focusedRef: string | null;
|
|
695
705
|
changedRegions: InteractionRect[];
|
|
696
706
|
diagnostics: InteractionDiagnosticSummary;
|
|
@@ -747,6 +757,17 @@ export type BrowserPermissionSetting = "granted" | "denied" | "prompt";
|
|
|
747
757
|
export type BrowserAction = {
|
|
748
758
|
type: "navigate";
|
|
749
759
|
url: string;
|
|
760
|
+
} | {
|
|
761
|
+
type: "history";
|
|
762
|
+
direction: "back" | "forward";
|
|
763
|
+
} | {
|
|
764
|
+
type: "activate";
|
|
765
|
+
} | {
|
|
766
|
+
type: "viewport";
|
|
767
|
+
width: number;
|
|
768
|
+
height: number;
|
|
769
|
+
mobile: boolean;
|
|
770
|
+
deviceScaleFactor?: number | undefined;
|
|
750
771
|
} | {
|
|
751
772
|
type: "click";
|
|
752
773
|
locator: BrowserLocator;
|
|
@@ -1163,6 +1184,9 @@ export interface InteractionTransport {
|
|
|
1163
1184
|
selectBrowserTarget(workspaceId: string, browserSessionId: string, targetId: string, options?: OpenGeniRequestOptions): Promise<BrowserObservation>;
|
|
1164
1185
|
closeBrowserTarget(workspaceId: string, browserSessionId: string, targetId: string, options?: OpenGeniRequestOptions): Promise<BrowserTargetListResponse>;
|
|
1165
1186
|
observeBrowserTarget(workspaceId: string, browserSessionId: string, targetId: string, options?: OpenGeniRequestOptions): Promise<BrowserObservation>;
|
|
1187
|
+
getBrowserTargetState(workspaceId: string, browserSessionId: string, targetId: string, options?: OpenGeniRequestOptions): Promise<BrowserTargetState>;
|
|
1188
|
+
readBrowserDom(workspaceId: string, browserSessionId: string, targetId: string, request: BrowserDomReadRequest, options?: OpenGeniRequestOptions): Promise<BrowserDomReadResponse>;
|
|
1189
|
+
captureBrowserTarget(workspaceId: string, browserSessionId: string, targetId: string, options?: OpenGeniRequestOptions, captureOptions?: BrowserScreenshotOptions): Promise<BrowserFrame>;
|
|
1166
1190
|
actInBrowser(workspaceId: string, browserSessionId: string, request: BrowserActionRequest, options?: OpenGeniRequestOptions): Promise<BrowserActionReceipt>;
|
|
1167
1191
|
getBrowserActionReceipt(workspaceId: string, browserSessionId: string, operationId: string, options?: OpenGeniRequestOptions): Promise<BrowserActionReceipt>;
|
|
1168
1192
|
listBrowserDiagnostics(workspaceId: string, browserSessionId: string, targetId: string, options?: BrowserDiagnosticsOptions): Promise<BrowserDiagnosticBatch>;
|
|
@@ -1372,6 +1396,10 @@ export declare class BrowserSessionResource {
|
|
|
1372
1396
|
constructor(transport: BrowserInteractionTransport, workspaceId: string, id: string);
|
|
1373
1397
|
get(options?: OpenGeniRequestOptions): Promise<BrowserSession>;
|
|
1374
1398
|
observe(targetId: string, options?: OpenGeniRequestOptions): Promise<BrowserObservation>;
|
|
1399
|
+
targetState(targetId: string, options?: OpenGeniRequestOptions): Promise<BrowserTargetState>;
|
|
1400
|
+
readDom(targetId: string, request: BrowserDomReadRequest, options?: OpenGeniRequestOptions): Promise<BrowserDomReadResponse>;
|
|
1401
|
+
capture(targetId: string, options?: OpenGeniRequestOptions, captureOptions?: BrowserScreenshotOptions): Promise<BrowserFrame>;
|
|
1402
|
+
screenshot(targetId: string, captureOptions?: BrowserScreenshotOptions, options?: OpenGeniRequestOptions): Promise<BrowserFrame>;
|
|
1375
1403
|
act(request: BrowserActionRequest, options?: OpenGeniRequestOptions): Promise<BrowserActionReceipt>;
|
|
1376
1404
|
receipt(operationId: string, options?: OpenGeniRequestOptions): Promise<BrowserActionReceipt>;
|
|
1377
1405
|
diagnostics(targetId: string, options?: BrowserDiagnosticsOptions): Promise<BrowserDiagnosticBatch>;
|
|
@@ -1478,6 +1506,13 @@ export type BrowserFrameMetadata = {
|
|
|
1478
1506
|
export type BrowserFrame = BrowserFrameMetadata & {
|
|
1479
1507
|
data: Uint8Array;
|
|
1480
1508
|
};
|
|
1509
|
+
export type BrowserScreenshotOptions = {
|
|
1510
|
+
/** Capture the document content instead of the visible viewport. */
|
|
1511
|
+
fullPage?: boolean;
|
|
1512
|
+
format?: "jpeg" | "png";
|
|
1513
|
+
/** JPEG quality, from 1 to 100. Ignored for PNG. */
|
|
1514
|
+
quality?: number;
|
|
1515
|
+
};
|
|
1481
1516
|
export type ComputerFrameMetadata = {
|
|
1482
1517
|
frameId: string;
|
|
1483
1518
|
computerSessionId: string;
|
package/dist/interaction.js
CHANGED
package/dist/knowledge.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { AgentLearningMode, AgentLearningCategory, AgentLearningDefaults, AgentLearningOverrides, AgentLearningContext, AgentLearningOverridePatch, AgentLearningSettingsRecord, AgentLearningOverrideRecord, SaveAgentLearningSettingsRequest, KnowledgeFilePreparationResult, KnowledgeSavePreparationRequest, KnowledgeSavePreparationResponse, KnowledgeOriginalFileDownload, KnowledgeEntryKind, KnowledgeEntryScope, KnowledgeEntryContent, KnowledgeEntrySource, KnowledgeEntryEvidence, KnowledgeEntryRelationship, KnowledgeEntryRecord, KnowledgeEntrySummary, KnowledgeEntrySaveRequest, KnowledgeEntryReviewRequest, KnowledgeEntryBatchReviewRequest, KnowledgeEntryRestoreRequest, KnowledgeEntryWriteReceipt, KnowledgeEntryListRequest, KnowledgeEntryListResponse, KnowledgeReviewBatch, KnowledgeReviewBatchListRequest, KnowledgeReviewBatchListResponse, AgentInstructionReviewRequest, AgentInstructionReceipt, AgentInstructionReviewItem, AgentInstructionReviewListResponse, } from "@opengeni/contracts";
|
|
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
2
|
import type { OpenGeniClient } from "./client.js";
|
|
3
3
|
import type { KnowledgeSavePreparationRequest, KnowledgeSavePreparationResponse, KnowledgeFilePreparationResult } from "@opengeni/contracts";
|
|
4
4
|
/** Agent-only source preparation is a focused transport surface, outside the browser client. */
|
package/dist/knowledge.js.map
CHANGED
|
@@ -1 +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 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":";
|
|
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":[]}
|
|
@@ -39,3 +39,15 @@ export type SessionMessageSearchResponse = {
|
|
|
39
39
|
/** True only on exhaustion. Concurrent mutations require a fresh traversal. */
|
|
40
40
|
countIsExact: boolean;
|
|
41
41
|
};
|
|
42
|
+
/** Exact selected event reference from a search match; no payload fields are read. */
|
|
43
|
+
export type SessionMessagePreviewReference = {
|
|
44
|
+
eventId: string;
|
|
45
|
+
sequence: number;
|
|
46
|
+
};
|
|
47
|
+
/** A complete visible message, or an explicit over-12,000-UTF-16-unit result. */
|
|
48
|
+
export type SessionMessagePreview = {
|
|
49
|
+
status: "available";
|
|
50
|
+
text: string;
|
|
51
|
+
} | {
|
|
52
|
+
status: "unavailable";
|
|
53
|
+
};
|