@opengeni/sdk 1.0.2 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/adapters/next.js +2 -2
  2. package/dist/artifact-catalog.d.ts +7 -0
  3. package/dist/artifacts.js +4 -4
  4. package/dist/browser.js +2 -2
  5. package/dist/chat/index.js +8 -7
  6. package/dist/chat/index.js.map +1 -1
  7. package/dist/{chunk-FG3OO5LM.js → chunk-BNZNLUD4.js} +12 -2
  8. package/dist/chunk-BNZNLUD4.js.map +1 -0
  9. package/dist/{chunk-AH5D5Q5V.js → chunk-E3KHK7FG.js} +2 -2
  10. package/dist/{chunk-MOTJYIYL.js → chunk-H6WMYN23.js} +2 -2
  11. package/dist/{chunk-YIKA2QT4.js → chunk-RLLUZFOW.js} +1 -1
  12. package/dist/{chunk-YIKA2QT4.js.map → chunk-RLLUZFOW.js.map} +1 -1
  13. package/dist/{chunk-DUVIYER4.js → chunk-T6HNHCN2.js} +2 -2
  14. package/dist/{chunk-RWKB6YZG.js → chunk-YH3W3HZZ.js} +2 -2
  15. package/dist/{chunk-HMGADJGZ.js → chunk-ZBMS2HCV.js} +2 -2
  16. package/dist/client.d.ts +5 -1
  17. package/dist/core.js +3 -3
  18. package/dist/document-authority.js +3 -3
  19. package/dist/editable-artifacts.js +1 -1
  20. package/dist/index.d.ts +1 -1
  21. package/dist/index.js +7 -7
  22. package/dist/session-proxy.js +2 -2
  23. package/dist/site-browser-runtime.gen.d.ts +1 -1
  24. package/dist/site-document.js +1 -1
  25. package/dist/site-document.js.map +1 -1
  26. package/dist/site.js +3 -3
  27. package/dist/types.d.ts +1 -1
  28. package/package.json +5 -4
  29. package/src/artifact-catalog.ts +8 -0
  30. package/src/chat/opengeni.ts +3 -2
  31. package/src/client.ts +23 -1
  32. package/src/index.ts +1 -0
  33. package/src/site-browser-runtime.gen.ts +1 -1
  34. package/src/types.ts +1 -0
  35. package/dist/chunk-FG3OO5LM.js.map +0 -1
  36. /package/dist/{chunk-AH5D5Q5V.js.map → chunk-E3KHK7FG.js.map} +0 -0
  37. /package/dist/{chunk-MOTJYIYL.js.map → chunk-H6WMYN23.js.map} +0 -0
  38. /package/dist/{chunk-DUVIYER4.js.map → chunk-T6HNHCN2.js.map} +0 -0
  39. /package/dist/{chunk-RWKB6YZG.js.map → chunk-YH3W3HZZ.js.map} +0 -0
  40. /package/dist/{chunk-HMGADJGZ.js.map → chunk-ZBMS2HCV.js.map} +0 -0
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  createSessionProxyHandler
3
- } from "../chunk-RWKB6YZG.js";
3
+ } from "../chunk-YH3W3HZZ.js";
4
4
  import "../chunk-UM4ZXXJR.js";
5
5
  import "../chunk-U6CV2SXO.js";
6
6
  import "../chunk-APXVSSSY.js";
7
- import "../chunk-YIKA2QT4.js";
7
+ import "../chunk-RLLUZFOW.js";
8
8
  import "../chunk-V6GIY62B.js";
9
9
 
10
10
  // src/adapters/next.ts
@@ -8,6 +8,8 @@ export type ArtifactCatalogItem = {
8
8
  createdAt: string;
9
9
  updatedAt: string;
10
10
  status: "active" | "archived";
11
+ /** Shared workspace pin; absent on older servers. Never grants content access. */
12
+ pinned?: boolean;
11
13
  /** Present only when the viewer can read this session. */
12
14
  sourceSessionId?: string;
13
15
  versionId?: string;
@@ -29,3 +31,8 @@ export type ArtifactCatalogListResponse = {
29
31
  items: ArtifactCatalogItem[];
30
32
  nextCursor: string | null;
31
33
  };
34
+ export type ArtifactPinResponse = {
35
+ kind: ArtifactCatalogKind;
36
+ artifactId: string;
37
+ pinned: boolean;
38
+ };
package/dist/artifacts.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  OpenGeniClient
3
- } from "./chunk-AH5D5Q5V.js";
4
- import "./chunk-HMGADJGZ.js";
5
- import "./chunk-FG3OO5LM.js";
3
+ } from "./chunk-E3KHK7FG.js";
4
+ import "./chunk-ZBMS2HCV.js";
5
+ import "./chunk-BNZNLUD4.js";
6
6
  import "./chunk-APXVSSSY.js";
7
- import "./chunk-YIKA2QT4.js";
7
+ import "./chunk-RLLUZFOW.js";
8
8
  import "./chunk-NC57YMUO.js";
9
9
  import "./chunk-V6GIY62B.js";
10
10
  export {
package/dist/browser.js CHANGED
@@ -8,12 +8,12 @@ import {
8
8
  } from "./chunk-4SMEOV3P.js";
9
9
  import {
10
10
  OpenGeniClient
11
- } from "./chunk-FG3OO5LM.js";
11
+ } from "./chunk-BNZNLUD4.js";
12
12
  import "./chunk-APXVSSSY.js";
13
13
  import {
14
14
  OPENGENI_API_CONTRACT_HEADER,
15
15
  OPENGENI_API_CONTRACT_REVISION
16
- } from "./chunk-YIKA2QT4.js";
16
+ } from "./chunk-RLLUZFOW.js";
17
17
  import "./chunk-NC57YMUO.js";
18
18
  import {
19
19
  OpenGeniAllowanceExhaustedError,
@@ -11,17 +11,17 @@ import {
11
11
  EMPTY_FINAL_REPLY_NOTICE,
12
12
  OpenGeniEmbeddingClient,
13
13
  turnCompletedWithEmptyFinalReply
14
- } from "../chunk-MOTJYIYL.js";
15
- import "../chunk-AH5D5Q5V.js";
16
- import "../chunk-HMGADJGZ.js";
14
+ } from "../chunk-H6WMYN23.js";
15
+ import "../chunk-E3KHK7FG.js";
16
+ import "../chunk-ZBMS2HCV.js";
17
17
  import {
18
18
  chatDefaults
19
19
  } from "../chunk-UM4ZXXJR.js";
20
- import "../chunk-FG3OO5LM.js";
20
+ import "../chunk-BNZNLUD4.js";
21
21
  import {
22
22
  parseSseStream
23
23
  } from "../chunk-APXVSSSY.js";
24
- import "../chunk-YIKA2QT4.js";
24
+ import "../chunk-RLLUZFOW.js";
25
25
  import "../chunk-NC57YMUO.js";
26
26
  import {
27
27
  OpenGeniApiError,
@@ -393,11 +393,12 @@ var OpenGeni = class {
393
393
  constructor(options) {
394
394
  if (!options.apiKey) throw new TypeError("Opengeni requires an apiKey.");
395
395
  this.client = new OpenGeniEmbeddingClient({
396
- baseUrl: options.baseUrl ?? DEFAULT_OPENGENI_BASE_URL,
396
+ // An empty value (a blank `OPENGENI_API_BASE_URL=` in .env) means the default.
397
+ baseUrl: options.baseUrl?.trim() || DEFAULT_OPENGENI_BASE_URL,
397
398
  apiKey: options.apiKey,
398
399
  ...options.fetch ? { fetch: options.fetch } : {}
399
400
  });
400
- this.organizationId = options.organizationId ?? "";
401
+ this.organizationId = options.organizationId?.trim() ?? "";
401
402
  this.source = options.source ?? DEFAULT_CHAT_SOURCE;
402
403
  this.resolveWorkspaceId = createWorkspaceIdResolver(this.client, {
403
404
  organizationId: () => this.resolveOrganizationId(),