@opengeni/sdk 7.4.0-canary.36855269964001 → 7.4.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 (89) hide show
  1. package/README.md +0 -31
  2. package/dist/adapters/next.js +4 -4
  3. package/dist/artifacts.js +7 -7
  4. package/dist/browser.d.ts +1 -1
  5. package/dist/browser.js +6 -8
  6. package/dist/chat/fold.d.ts +0 -1
  7. package/dist/chat/index.js +9 -15
  8. package/dist/chat/index.js.map +1 -1
  9. package/dist/chat/types.d.ts +0 -4
  10. package/dist/{chunk-Y7UZBXVN.js → chunk-6NEPJ7NC.js} +2 -2
  11. package/dist/{chunk-45PCMV3K.js → chunk-7HIA2AI3.js} +2 -2
  12. package/dist/{chunk-CHFRWUPS.js → chunk-A73QXCBW.js} +7 -388
  13. package/dist/chunk-A73QXCBW.js.map +1 -0
  14. package/dist/{chunk-W4ZUQGOC.js → chunk-BX5ETUM7.js} +2 -2
  15. package/dist/{chunk-G4JBTVCL.js → chunk-FLOL2IES.js} +2 -2
  16. package/dist/{chunk-KSPK3BF4.js → chunk-FMLDFJ2Q.js} +2 -2
  17. package/dist/{chunk-5VTRBY4Z.js → chunk-GT2I4X7R.js} +5 -40
  18. package/dist/chunk-GT2I4X7R.js.map +1 -0
  19. package/dist/{chunk-W7VLV6NZ.js → chunk-HGGK2BW2.js} +2 -2
  20. package/dist/{chunk-IY5ATZY6.js → chunk-HZH5DJNN.js} +4 -4
  21. package/dist/{chunk-5K6KZAAK.js → chunk-MV2PNVU4.js} +1 -4
  22. package/dist/chunk-MV2PNVU4.js.map +1 -0
  23. package/dist/{chunk-KCE5UPK5.js → chunk-OO5LPTO7.js} +1 -40
  24. package/dist/chunk-OO5LPTO7.js.map +1 -0
  25. package/dist/{chunk-A6KD473F.js → chunk-QSCQUITU.js} +20 -105
  26. package/dist/chunk-QSCQUITU.js.map +1 -0
  27. package/dist/{chunk-Q2O2MEHA.js → chunk-VF2IW4M5.js} +3 -100
  28. package/dist/chunk-VF2IW4M5.js.map +1 -0
  29. package/dist/client.d.ts +3 -37
  30. package/dist/codex-realtime-controller.js +2 -2
  31. package/dist/core.js +7 -7
  32. package/dist/document-authority.js +6 -6
  33. package/dist/editable-artifacts.js +1 -1
  34. package/dist/embedding-client.d.ts +0 -39
  35. package/dist/errors.d.ts +0 -13
  36. package/dist/index.d.ts +6 -9
  37. package/dist/index.js +141 -47
  38. package/dist/index.js.map +1 -1
  39. package/dist/interaction.js +2 -2
  40. package/dist/message-links.d.ts +0 -5
  41. package/dist/realtime.js +2 -2
  42. package/dist/session-proxy.d.ts +1 -44
  43. package/dist/site-browser-runtime.gen.d.ts +1 -1
  44. package/dist/site-document.js +1 -1
  45. package/dist/site-document.js.map +1 -1
  46. package/dist/site.js +7 -7
  47. package/dist/{tools-52AEE64Y.js → tools-FSTY4FAY.js} +3 -3
  48. package/dist/types.d.ts +3 -55
  49. package/dist/workspace-integrations.d.ts +5 -22
  50. package/dist/workspace-integrations.js +1 -11
  51. package/package.json +3 -15
  52. package/src/browser.ts +0 -1
  53. package/src/chat/fold.ts +0 -12
  54. package/src/chat/types.ts +0 -4
  55. package/src/client.ts +15 -140
  56. package/src/embedding-client.ts +0 -130
  57. package/src/errors.ts +0 -56
  58. package/src/index.ts +1 -45
  59. package/src/message-links.ts +0 -6
  60. package/src/session-proxy.ts +2 -310
  61. package/src/site-browser-runtime.gen.ts +1 -1
  62. package/src/types.ts +2 -60
  63. package/src/workspace-integrations.ts +4 -76
  64. package/dist/allowance-refusal.d.ts +0 -2
  65. package/dist/allowance-refusal.js +0 -50
  66. package/dist/allowance-refusal.js.map +0 -1
  67. package/dist/chunk-5K6KZAAK.js.map +0 -1
  68. package/dist/chunk-5VTRBY4Z.js.map +0 -1
  69. package/dist/chunk-A6KD473F.js.map +0 -1
  70. package/dist/chunk-CHFRWUPS.js.map +0 -1
  71. package/dist/chunk-KCE5UPK5.js.map +0 -1
  72. package/dist/chunk-Q2O2MEHA.js.map +0 -1
  73. package/dist/session-proxy-client.d.ts +0 -24
  74. package/dist/session-proxy.js +0 -22
  75. package/dist/tools-52AEE64Y.js.map +0 -1
  76. package/dist/usage-allowances.d.ts +0 -36
  77. package/dist/usage-allowances.js +0 -80
  78. package/dist/usage-allowances.js.map +0 -1
  79. package/src/allowance-refusal.ts +0 -5
  80. package/src/session-proxy-client.ts +0 -64
  81. package/src/usage-allowances.ts +0 -189
  82. /package/dist/{chunk-Y7UZBXVN.js.map → chunk-6NEPJ7NC.js.map} +0 -0
  83. /package/dist/{chunk-45PCMV3K.js.map → chunk-7HIA2AI3.js.map} +0 -0
  84. /package/dist/{chunk-W4ZUQGOC.js.map → chunk-BX5ETUM7.js.map} +0 -0
  85. /package/dist/{chunk-G4JBTVCL.js.map → chunk-FLOL2IES.js.map} +0 -0
  86. /package/dist/{chunk-KSPK3BF4.js.map → chunk-FMLDFJ2Q.js.map} +0 -0
  87. /package/dist/{chunk-W7VLV6NZ.js.map → chunk-HGGK2BW2.js.map} +0 -0
  88. /package/dist/{chunk-IY5ATZY6.js.map → chunk-HZH5DJNN.js.map} +0 -0
  89. /package/dist/{session-proxy.js.map → tools-FSTY4FAY.js.map} +0 -0
package/README.md CHANGED
@@ -25,31 +25,6 @@ bearer design, but an organization API key belongs on the product server.
25
25
  Browser cookies are accepted cross-origin only from operator-configured trusted
26
26
  origins; arbitrary embedding origins never receive credentialed CORS responses.
27
27
 
28
- ## Allowance lifecycle recovery
29
-
30
- `getWorkspaceAllowance(workspaceId)` still returns nullable configuration.
31
- Use `getWorkspaceAllowanceState(workspaceId)` when you also need the lifecycle
32
- version: `{ version: 0, config: null }` means never configured, while a positive
33
- version with null configuration means cleared. Recreation uses that exact
34
- version as `expectedVersion`.
35
-
36
- `clearWorkspaceAllowance(workspaceId, { expectedVersion, operationId })` returns
37
- `{ version }`. The optional operation ID makes a lost response recoverable:
38
- reuse the same actor, operation ID and exact request. Replay rechecks current
39
- authority and returns 409 after any later allowance lifecycle change. On 409,
40
- read the current state and decide whether a new operation is intended; never
41
- guess a CAS version. The SDK does not automatically retry mutations.
42
-
43
- The same reads and administration are free functions on the
44
- `@opengeni/sdk/usage-allowances` subpath for browser code that only has the
45
- narrow `OpenGeniBrowserClient` (`getMyUsage(client, workspaceId)`,
46
- `getAllUsage`, `setMemberAllowance`, ...); they call the same routes as the root methods.
47
-
48
- State reads require the same budget-read authority as configuration reads.
49
- Full usage additionally requires target workspace access; organization budget
50
- authority alone does not expose the member roster. Agents cannot read or
51
- change allowances.
52
-
53
28
  ## Embed the conversation (default)
54
29
 
55
30
  The default product integration is the full OpenGeni conversation:
@@ -613,12 +588,6 @@ const request = await verifyCredentialProviderRequest({
613
588
  });
614
589
  ```
615
590
 
616
- To check an endpoint now, `testWorkspaceWebhook(client, workspaceId, webhookId)` sends a
617
- signed `webhook.test` event (acknowledge it with any 2xx) and
618
- `testWorkspaceCredentialProvider(client, workspaceId)` sends a request with
619
- `purpose: "test"`; both come from `@opengeni/sdk/workspace-integrations` and return
620
- what the endpoint answered, naming returned credentials but never their values.
621
-
622
591
  `listWorkspaceSandboxImages` returns the deployment's allowlisted images; set one
623
592
  with `updateWorkspaceSettings(workspaceId, { defaultSandboxImage })`.
624
593
 
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createSessionProxyHandler
3
- } from "../chunk-CHFRWUPS.js";
4
- import "../chunk-W4ZUQGOC.js";
5
- import "../chunk-5K6KZAAK.js";
6
- import "../chunk-KCE5UPK5.js";
3
+ } from "../chunk-A73QXCBW.js";
4
+ import "../chunk-BX5ETUM7.js";
5
+ import "../chunk-MV2PNVU4.js";
6
+ import "../chunk-OO5LPTO7.js";
7
7
 
8
8
  // src/adapters/next.ts
9
9
  function toNextRouteHandlers(handler) {
package/dist/artifacts.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  OpenGeniClient
3
- } from "./chunk-45PCMV3K.js";
4
- import "./chunk-W7VLV6NZ.js";
5
- import "./chunk-A6KD473F.js";
6
- import "./chunk-W4ZUQGOC.js";
7
- import "./chunk-5K6KZAAK.js";
8
- import "./chunk-G4JBTVCL.js";
9
- import "./chunk-KCE5UPK5.js";
3
+ } from "./chunk-7HIA2AI3.js";
4
+ import "./chunk-HGGK2BW2.js";
5
+ import "./chunk-QSCQUITU.js";
6
+ import "./chunk-BX5ETUM7.js";
7
+ import "./chunk-MV2PNVU4.js";
8
+ import "./chunk-FLOL2IES.js";
9
+ import "./chunk-OO5LPTO7.js";
10
10
  export {
11
11
  OpenGeniClient
12
12
  };
package/dist/browser.d.ts CHANGED
@@ -4,7 +4,7 @@ export type { SessionMessageSearchRequest, SessionMessageSearchMatch, SessionMes
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";
7
- export { OpenGeniApiContractMismatchError, OpenGeniApiError, OpenGeniAllowanceExhaustedError, OpenGeniSecureContextRequiredError, OpenGeniSessionListCursorError, OpenGeniStreamError, isRetryableStreamError, } from "./errors.js";
7
+ export { OpenGeniApiContractMismatchError, OpenGeniApiError, OpenGeniSecureContextRequiredError, OpenGeniSessionListCursorError, OpenGeniStreamError, isRetryableStreamError, } from "./errors.js";
8
8
  export type { OpenGeniSecureContextRequiredReason } from "./errors.js";
9
9
  export { resolveWorkspaceVoiceInputEnabled } from "./transcription.js";
10
10
  export { OPENGENI_API_CONTRACT_HEADER, OPENGENI_API_CONTRACT_REVISION } from "./types.js";
package/dist/browser.js CHANGED
@@ -5,29 +5,27 @@ import {
5
5
  OpenGeniToolCallError,
6
6
  OpenGeniToolReapprovalRequiredError,
7
7
  OpenGeniToolsClient
8
- } from "./chunk-KSPK3BF4.js";
8
+ } from "./chunk-FMLDFJ2Q.js";
9
9
  import {
10
10
  OpenGeniClient
11
- } from "./chunk-A6KD473F.js";
12
- import "./chunk-W4ZUQGOC.js";
11
+ } from "./chunk-QSCQUITU.js";
12
+ import "./chunk-BX5ETUM7.js";
13
13
  import {
14
14
  OPENGENI_API_CONTRACT_HEADER,
15
15
  OPENGENI_API_CONTRACT_REVISION
16
- } from "./chunk-5K6KZAAK.js";
17
- import "./chunk-G4JBTVCL.js";
16
+ } from "./chunk-MV2PNVU4.js";
17
+ import "./chunk-FLOL2IES.js";
18
18
  import {
19
- OpenGeniAllowanceExhaustedError,
20
19
  OpenGeniApiContractMismatchError,
21
20
  OpenGeniApiError,
22
21
  OpenGeniSecureContextRequiredError,
23
22
  OpenGeniSessionListCursorError,
24
23
  OpenGeniStreamError,
25
24
  isRetryableStreamError
26
- } from "./chunk-KCE5UPK5.js";
25
+ } from "./chunk-OO5LPTO7.js";
27
26
  export {
28
27
  OPENGENI_API_CONTRACT_HEADER,
29
28
  OPENGENI_API_CONTRACT_REVISION,
30
- OpenGeniAllowanceExhaustedError,
31
29
  OpenGeniApiContractMismatchError,
32
30
  OpenGeniApiError,
33
31
  OpenGeniClient as OpenGeniBrowserClient,
@@ -39,7 +39,6 @@ export declare class ChatTurnFold {
39
39
  turnId: string | null;
40
40
  pending: ChatPending | null;
41
41
  failure: SessionEvent | null;
42
- private emptyFinalReply;
43
42
  private readonly segments;
44
43
  private readonly openTools;
45
44
  constructor(workspaceId: string, sessionId: string, expectedTurnId: string | null);
@@ -1,19 +1,17 @@
1
1
  import {
2
- EMPTY_FINAL_REPLY_NOTICE,
3
- OpenGeniEmbeddingClient,
4
- turnCompletedWithEmptyFinalReply
5
- } from "../chunk-Q2O2MEHA.js";
6
- import "../chunk-45PCMV3K.js";
7
- import "../chunk-W7VLV6NZ.js";
8
- import "../chunk-A6KD473F.js";
2
+ OpenGeniEmbeddingClient
3
+ } from "../chunk-VF2IW4M5.js";
4
+ import "../chunk-7HIA2AI3.js";
5
+ import "../chunk-HGGK2BW2.js";
6
+ import "../chunk-QSCQUITU.js";
9
7
  import {
10
8
  parseSseStream
11
- } from "../chunk-W4ZUQGOC.js";
12
- import "../chunk-5K6KZAAK.js";
13
- import "../chunk-G4JBTVCL.js";
9
+ } from "../chunk-BX5ETUM7.js";
10
+ import "../chunk-MV2PNVU4.js";
11
+ import "../chunk-FLOL2IES.js";
14
12
  import {
15
13
  OpenGeniApiError
16
- } from "../chunk-KCE5UPK5.js";
14
+ } from "../chunk-OO5LPTO7.js";
17
15
 
18
16
  // src/chat/types.ts
19
17
  var OpenGeniChatError = class extends Error {
@@ -79,7 +77,6 @@ var ChatTurnFold = class {
79
77
  turnId;
80
78
  pending = null;
81
79
  failure = null;
82
- emptyFinalReply = false;
83
80
  segments = [];
84
81
  openTools = /* @__PURE__ */ new Map();
85
82
  get text() {
@@ -202,7 +199,6 @@ var ChatTurnFold = class {
202
199
  };
203
200
  }
204
201
  case "turn.completed":
205
- this.emptyFinalReply = turnCompletedWithEmptyFinalReply(payload);
206
202
  return { chunks: this.settleSegments(), terminal: "completed" };
207
203
  case "turn.failed":
208
204
  this.failure = event;
@@ -222,7 +218,6 @@ var ChatTurnFold = class {
222
218
  turnId: this.turnId,
223
219
  status: terminal === "pending" ? "pending" : terminal === "cancelled" ? "cancelled" : "completed",
224
220
  pending: this.pending,
225
- ...this.emptyFinalReply ? { emptyFinalReply: true, notice: EMPTY_FINAL_REPLY_NOTICE } : {},
226
221
  events: [...this.events],
227
222
  toString: () => text
228
223
  };
@@ -304,7 +299,6 @@ var ChatTurnFold = class {
304
299
  */
305
300
  settleSegments() {
306
301
  this.closeSegments();
307
- if (this.emptyFinalReply) return [];
308
302
  if (this.segments.some((segment) => !segment.commentary)) return [];
309
303
  const latest = [...this.segments].reverse().find((segment) => segment.commentary && segment.text);
310
304
  if (!latest) return [];