@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.
- package/dist/adapters/next.js +2 -2
- package/dist/artifact-catalog.d.ts +7 -0
- package/dist/artifacts.js +4 -4
- package/dist/browser.js +2 -2
- package/dist/chat/index.js +8 -7
- package/dist/chat/index.js.map +1 -1
- package/dist/{chunk-FG3OO5LM.js → chunk-BNZNLUD4.js} +12 -2
- package/dist/chunk-BNZNLUD4.js.map +1 -0
- package/dist/{chunk-AH5D5Q5V.js → chunk-E3KHK7FG.js} +2 -2
- package/dist/{chunk-MOTJYIYL.js → chunk-H6WMYN23.js} +2 -2
- package/dist/{chunk-YIKA2QT4.js → chunk-RLLUZFOW.js} +1 -1
- package/dist/{chunk-YIKA2QT4.js.map → chunk-RLLUZFOW.js.map} +1 -1
- package/dist/{chunk-DUVIYER4.js → chunk-T6HNHCN2.js} +2 -2
- package/dist/{chunk-RWKB6YZG.js → chunk-YH3W3HZZ.js} +2 -2
- package/dist/{chunk-HMGADJGZ.js → chunk-ZBMS2HCV.js} +2 -2
- package/dist/client.d.ts +5 -1
- package/dist/core.js +3 -3
- package/dist/document-authority.js +3 -3
- package/dist/editable-artifacts.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +7 -7
- package/dist/session-proxy.js +2 -2
- 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 +3 -3
- package/dist/types.d.ts +1 -1
- package/package.json +5 -4
- package/src/artifact-catalog.ts +8 -0
- package/src/chat/opengeni.ts +3 -2
- package/src/client.ts +23 -1
- package/src/index.ts +1 -0
- package/src/site-browser-runtime.gen.ts +1 -1
- package/src/types.ts +1 -0
- package/dist/chunk-FG3OO5LM.js.map +0 -1
- /package/dist/{chunk-AH5D5Q5V.js.map → chunk-E3KHK7FG.js.map} +0 -0
- /package/dist/{chunk-MOTJYIYL.js.map → chunk-H6WMYN23.js.map} +0 -0
- /package/dist/{chunk-DUVIYER4.js.map → chunk-T6HNHCN2.js.map} +0 -0
- /package/dist/{chunk-RWKB6YZG.js.map → chunk-YH3W3HZZ.js.map} +0 -0
- /package/dist/{chunk-HMGADJGZ.js.map → chunk-ZBMS2HCV.js.map} +0 -0
package/dist/adapters/next.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createSessionProxyHandler
|
|
3
|
-
} from "../chunk-
|
|
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-
|
|
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-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-E3KHK7FG.js";
|
|
4
|
+
import "./chunk-ZBMS2HCV.js";
|
|
5
|
+
import "./chunk-BNZNLUD4.js";
|
|
6
6
|
import "./chunk-APXVSSSY.js";
|
|
7
|
-
import "./chunk-
|
|
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-
|
|
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-
|
|
16
|
+
} from "./chunk-RLLUZFOW.js";
|
|
17
17
|
import "./chunk-NC57YMUO.js";
|
|
18
18
|
import {
|
|
19
19
|
OpenGeniAllowanceExhaustedError,
|
package/dist/chat/index.js
CHANGED
|
@@ -11,17 +11,17 @@ import {
|
|
|
11
11
|
EMPTY_FINAL_REPLY_NOTICE,
|
|
12
12
|
OpenGeniEmbeddingClient,
|
|
13
13
|
turnCompletedWithEmptyFinalReply
|
|
14
|
-
} from "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
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-
|
|
20
|
+
import "../chunk-BNZNLUD4.js";
|
|
21
21
|
import {
|
|
22
22
|
parseSseStream
|
|
23
23
|
} from "../chunk-APXVSSSY.js";
|
|
24
|
-
import "../chunk-
|
|
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
|
-
|
|
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(),
|