@opengeni/sdk 7.1.0 → 7.1.1-canary.36199476632001

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/README.md +13 -0
  2. package/dist/artifacts.js +5 -5
  3. package/dist/browser.d.ts +1 -1
  4. package/dist/browser.js +3 -3
  5. package/dist/chat/index.js +6 -6
  6. package/dist/{chunk-MG4QFBKR.js → chunk-2XGVG66G.js} +2 -2
  7. package/dist/{chunk-YHF66FWZ.js → chunk-HTXCZV7W.js} +2 -2
  8. package/dist/{chunk-ZN6WWXAX.js → chunk-MBSACUH7.js} +2 -2
  9. package/dist/{chunk-LSO66LQA.js → chunk-SN5ICTG6.js} +1 -1
  10. package/dist/chunk-SN5ICTG6.js.map +1 -0
  11. package/dist/{chunk-X6Y2JCAN.js → chunk-TN5VV5D5.js} +2 -2
  12. package/dist/{chunk-Y7DRKEFZ.js → chunk-W2YQLWXT.js} +94 -5
  13. package/dist/chunk-W2YQLWXT.js.map +1 -0
  14. package/dist/{chunk-QTBAMHEF.js → chunk-YUOPVPZW.js} +25 -1
  15. package/dist/chunk-YUOPVPZW.js.map +1 -0
  16. package/dist/client.d.ts +10 -2
  17. package/dist/core.js +4 -4
  18. package/dist/document-authority.js +4 -4
  19. package/dist/editable-artifacts.js +1 -1
  20. package/dist/index.d.ts +2 -2
  21. package/dist/index.js +7 -7
  22. package/dist/index.js.map +1 -1
  23. package/dist/interaction.d.ts +35 -0
  24. package/dist/interaction.js +1 -1
  25. package/dist/knowledge.d.ts +1 -1
  26. package/dist/knowledge.js.map +1 -1
  27. package/dist/model-context.d.ts +1 -1
  28. package/dist/session-message-search.d.ts +12 -0
  29. package/dist/site-browser-runtime.gen.d.ts +1 -1
  30. package/dist/site-document.js +1 -1
  31. package/dist/site-document.js.map +1 -1
  32. package/dist/site.js +4 -4
  33. package/dist/types.d.ts +56 -4
  34. package/package.json +3 -3
  35. package/src/browser.ts +2 -0
  36. package/src/client.ts +146 -2
  37. package/src/index.ts +4 -0
  38. package/src/interaction.ts +102 -0
  39. package/src/knowledge.ts +1 -0
  40. package/src/model-context.ts +1 -0
  41. package/src/session-message-search.ts +8 -0
  42. package/src/site-browser-runtime.gen.ts +1 -1
  43. package/src/types.ts +65 -6
  44. package/dist/chunk-LSO66LQA.js.map +0 -1
  45. package/dist/chunk-QTBAMHEF.js.map +0 -1
  46. package/dist/chunk-Y7DRKEFZ.js.map +0 -1
  47. /package/dist/{chunk-MG4QFBKR.js.map → chunk-2XGVG66G.js.map} +0 -0
  48. /package/dist/{chunk-YHF66FWZ.js.map → chunk-HTXCZV7W.js.map} +0 -0
  49. /package/dist/{chunk-ZN6WWXAX.js.map → chunk-MBSACUH7.js.map} +0 -0
  50. /package/dist/{chunk-X6Y2JCAN.js.map → chunk-TN5VV5D5.js.map} +0 -0
package/README.md CHANGED
@@ -81,6 +81,13 @@ const og = new OpenGeni({
81
81
  // baseUrl defaults to https://app.opengeni.ai; source (default "app") labels your product.
82
82
  });
83
83
 
84
+ // Once per user, when your product admits them to the tenant. Chat requests
85
+ // never grant workspace membership; without it the API answers 403.
86
+ await og.client.addExternalWorkspaceMember(await og.workspaceId({ tenant: "acme" }), {
87
+ identity: { externalId: "u_42", source: og.source },
88
+ permissions: ["workspace:read", "sessions:create", "sessions:read", "sessions:control"],
89
+ });
90
+
84
91
  const chat = await og.chat({
85
92
  tenant: "acme", // one workspace per customer, created on first use
86
93
  user: "u_42", // authenticated product user; onboard workspace membership first
@@ -528,6 +535,8 @@ const browser = await client.interaction.browsers.currentOrOpen({
528
535
  const { targets } = await browser.tabs.list();
529
536
  const target = targets.find((candidate) => candidate.selected) ?? targets[0]!;
530
537
  const page = await browser.observe(target.id);
538
+ const screenshot = await browser.screenshot(target.id, { fullPage: true });
539
+ // screenshot.data is bounded image bytes; mediaType and dimensions travel with it.
531
540
 
532
541
  const receipt = await browser.act({
533
542
  operationId: crypto.randomUUID(),
@@ -544,6 +553,10 @@ if (receipt.state === "outcome_unknown") {
544
553
  }
545
554
  ```
546
555
 
556
+ `browser.targetState(targetId)` reads generation fences without an accessibility
557
+ tree. `browser.readDom(targetId, request)` returns a bounded element or count
558
+ query using those fences; sensitive values are redacted.
559
+
547
560
  Browser identities are immutable version graphs: live browser state stays
548
561
  private until `browser.publishRevision(...)` explicitly creates a new revision.
549
562
  Protected auth fills resolve connection secrets only inside the broker/controller
package/dist/artifacts.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  OpenGeniClient
3
- } from "./chunk-X6Y2JCAN.js";
4
- import "./chunk-ZN6WWXAX.js";
5
- import "./chunk-Y7DRKEFZ.js";
6
- import "./chunk-LSO66LQA.js";
7
- import "./chunk-QTBAMHEF.js";
3
+ } from "./chunk-TN5VV5D5.js";
4
+ import "./chunk-MBSACUH7.js";
5
+ import "./chunk-W2YQLWXT.js";
6
+ import "./chunk-SN5ICTG6.js";
7
+ import "./chunk-YUOPVPZW.js";
8
8
  import "./chunk-OO5LPTO7.js";
9
9
  export {
10
10
  OpenGeniClient
package/dist/browser.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /** Browser-console client. Optional SDK surfaces must not enter this eager graph. */
2
2
  export { OpenGeniClient as OpenGeniBrowserClient } from "./client.js";
3
- export type { SessionMessageSearchRequest, SessionMessageSearchMatch, SessionMessageSearchResponse, } from "./session-message-search.js";
3
+ export type { SessionMessageSearchRequest, SessionMessageSearchMatch, SessionMessageSearchResponse, SessionMessagePreview, SessionMessagePreviewReference, } from "./session-message-search.js";
4
4
  export { OpenGeniToolCallError, OpenGeniToolReapprovalRequiredError, OpenGeniToolsClient, } from "./tools.js";
5
5
  export type { OpenGeniGeneratedTools, OpenGeniDynamicToolNode, OpenGeniToolCallOptions, OpenGeniToolFunction, OpenGeniToolsFacade, OpenGeniWorkspaceTools, } from "./tools.js";
6
6
  export type { FetchLike, FetchResponse, GetSessionOptions, OpenGeniClientOptions, OpenGeniRequestOptions, SendMessageInput, SteerMessageResult, TranscribeAudioInput, WorkspaceControlEventPage, } from "./client.js";
package/dist/browser.js CHANGED
@@ -8,12 +8,12 @@ import {
8
8
  } from "./chunk-FMLDFJ2Q.js";
9
9
  import {
10
10
  OpenGeniClient
11
- } from "./chunk-Y7DRKEFZ.js";
11
+ } from "./chunk-W2YQLWXT.js";
12
12
  import {
13
13
  OPENGENI_API_CONTRACT_HEADER,
14
14
  OPENGENI_API_CONTRACT_REVISION
15
- } from "./chunk-LSO66LQA.js";
16
- import "./chunk-QTBAMHEF.js";
15
+ } from "./chunk-SN5ICTG6.js";
16
+ import "./chunk-YUOPVPZW.js";
17
17
  import {
18
18
  OpenGeniApiContractMismatchError,
19
19
  OpenGeniApiError,
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  OpenGeniEmbeddingClient
3
- } from "../chunk-MG4QFBKR.js";
4
- import "../chunk-X6Y2JCAN.js";
5
- import "../chunk-ZN6WWXAX.js";
3
+ } from "../chunk-2XGVG66G.js";
4
+ import "../chunk-TN5VV5D5.js";
5
+ import "../chunk-MBSACUH7.js";
6
6
  import {
7
7
  parseSseStream
8
- } from "../chunk-Y7DRKEFZ.js";
9
- import "../chunk-LSO66LQA.js";
10
- import "../chunk-QTBAMHEF.js";
8
+ } from "../chunk-W2YQLWXT.js";
9
+ import "../chunk-SN5ICTG6.js";
10
+ import "../chunk-YUOPVPZW.js";
11
11
  import {
12
12
  OpenGeniApiError
13
13
  } from "../chunk-OO5LPTO7.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  OpenGeniClient
3
- } from "./chunk-X6Y2JCAN.js";
3
+ } from "./chunk-TN5VV5D5.js";
4
4
 
5
5
  // src/embedding-client.ts
6
6
  var OpenGeniEmbeddingClient = class extends OpenGeniClient {
@@ -171,4 +171,4 @@ var OpenGeniEmbeddingClient = class extends OpenGeniClient {
171
171
  export {
172
172
  OpenGeniEmbeddingClient
173
173
  };
174
- //# sourceMappingURL=chunk-MG4QFBKR.js.map
174
+ //# sourceMappingURL=chunk-2XGVG66G.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-FMLDFJ2Q.js";
4
4
  import {
5
5
  OpenGeniClient
6
- } from "./chunk-Y7DRKEFZ.js";
6
+ } from "./chunk-W2YQLWXT.js";
7
7
  import {
8
8
  OpenGeniApiError
9
9
  } from "./chunk-OO5LPTO7.js";
@@ -636,4 +636,4 @@ export {
636
636
  isOpenGeniSiteBridgeCancelMessage,
637
637
  sanitizeOpenGeniSiteToolCallRequest
638
638
  };
639
- //# sourceMappingURL=chunk-YHF66FWZ.js.map
639
+ //# sourceMappingURL=chunk-HTXCZV7W.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  OpenGeniClient
3
- } from "./chunk-Y7DRKEFZ.js";
3
+ } from "./chunk-W2YQLWXT.js";
4
4
 
5
5
  // src/document-authority-client.ts
6
6
  var OpenGeniDocumentAuthorityClient = class extends OpenGeniClient {
@@ -132,4 +132,4 @@ var OpenGeniDocumentAuthorityClient = class extends OpenGeniClient {
132
132
  export {
133
133
  OpenGeniDocumentAuthorityClient
134
134
  };
135
- //# sourceMappingURL=chunk-ZN6WWXAX.js.map
135
+ //# sourceMappingURL=chunk-MBSACUH7.js.map
@@ -243,4 +243,4 @@ export {
243
243
  GENERATED_VIDEO_MAX_BYTES,
244
244
  KNOWN_USAGE_EVENT_TYPES
245
245
  };
246
- //# sourceMappingURL=chunk-LSO66LQA.js.map
246
+ //# sourceMappingURL=chunk-SN5ICTG6.js.map