@opengeni/sdk 0.52.1 → 1.0.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.
Files changed (56) hide show
  1. package/README.md +67 -7
  2. package/dist/artifacts.js +5 -5
  3. package/dist/{chunk-FRJFNDIR.js → chunk-4DV37UUA.js} +6 -2
  4. package/dist/chunk-4DV37UUA.js.map +1 -0
  5. package/dist/{chunk-KIHGPM7H.js → chunk-A5DC5WEM.js} +288 -45
  6. package/dist/chunk-A5DC5WEM.js.map +1 -0
  7. package/dist/{chunk-V5F253OG.js → chunk-GU6JF75T.js} +6 -3
  8. package/dist/chunk-GU6JF75T.js.map +1 -0
  9. package/dist/{chunk-MZWTWOX6.js → chunk-ST5DDKJP.js} +327 -1
  10. package/dist/chunk-ST5DDKJP.js.map +1 -0
  11. package/dist/{chunk-FHI4DFIG.js → chunk-TYZ4JL4J.js} +2 -2
  12. package/dist/{chunk-ILQZR5N6.js → chunk-YGH5P47G.js} +693 -34
  13. package/dist/chunk-YGH5P47G.js.map +1 -0
  14. package/dist/{chunk-DXDL7EEW.js → chunk-YKZME56C.js} +197 -113
  15. package/dist/chunk-YKZME56C.js.map +1 -0
  16. package/dist/client.d.ts +108 -18
  17. package/dist/codex-realtime-controller.d.ts +5 -0
  18. package/dist/codex-realtime-controller.js +2 -2
  19. package/dist/codex-realtime-v3.d.ts +13 -2
  20. package/dist/core.js +7 -7
  21. package/dist/desktop.d.ts +8 -0
  22. package/dist/editable-artifacts.js +4 -4
  23. package/dist/gateway-realtime-transport.d.ts +1 -0
  24. package/dist/gateway-realtime-transport.js +5 -3
  25. package/dist/index.d.ts +6 -2
  26. package/dist/index.js +68 -34
  27. package/dist/index.js.map +1 -1
  28. package/dist/interaction-revision-stream.d.ts +11 -0
  29. package/dist/interaction.d.ts +604 -5
  30. package/dist/interaction.js +27 -1
  31. package/dist/realtime.d.ts +3 -3
  32. package/dist/realtime.js +11 -7
  33. package/dist/realtime.js.map +1 -1
  34. package/dist/types.d.ts +283 -69
  35. package/dist/workspace-live-stream.d.ts +14 -0
  36. package/package.json +2 -2
  37. package/src/client.ts +863 -62
  38. package/src/codex-realtime-controller.ts +239 -12
  39. package/src/codex-realtime-lifecycle.ts +1 -0
  40. package/src/codex-realtime-v3.ts +162 -31
  41. package/src/desktop.ts +11 -1
  42. package/src/errors.ts +16 -2
  43. package/src/gateway-realtime-transport.ts +252 -109
  44. package/src/index.ts +42 -13
  45. package/src/interaction-revision-stream.ts +117 -0
  46. package/src/interaction.ts +1049 -5
  47. package/src/realtime.ts +14 -4
  48. package/src/types.ts +353 -72
  49. package/src/workspace-live-stream.ts +137 -0
  50. package/dist/chunk-DXDL7EEW.js.map +0 -1
  51. package/dist/chunk-FRJFNDIR.js.map +0 -1
  52. package/dist/chunk-ILQZR5N6.js.map +0 -1
  53. package/dist/chunk-KIHGPM7H.js.map +0 -1
  54. package/dist/chunk-MZWTWOX6.js.map +0 -1
  55. package/dist/chunk-V5F253OG.js.map +0 -1
  56. /package/dist/{chunk-FHI4DFIG.js.map → chunk-TYZ4JL4J.js.map} +0 -0
package/src/realtime.ts CHANGED
@@ -20,7 +20,10 @@ import {
20
20
  type CreateCodexRealtimeControllerOptions,
21
21
  type RealtimeControllerTransportStarter,
22
22
  } from "./codex-realtime-controller";
23
- import { createGatewayRealtimeTransportStarter } from "./gateway-realtime-transport";
23
+ import {
24
+ createGatewayRealtimeTransportStarter,
25
+ createXaiSubscriptionRealtimeTransportStarter,
26
+ } from "./gateway-realtime-transport";
24
27
  import type { SessionRealtimeModel, WorkspaceRealtimeModelCatalogResponse } from "./types";
25
28
 
26
29
  /** Exact backend-facing methods required by the batteries-included realtime SDK. */
@@ -30,7 +33,7 @@ export type SessionRealtimeClientLike = CodexRealtimeControllerClient & {
30
33
  ): Promise<WorkspaceRealtimeModelCatalogResponse>;
31
34
  };
32
35
 
33
- export type SessionRealtimeTransportKind = "codex" | "gateway";
36
+ export type SessionRealtimeTransportKind = "codex" | "gateway" | "xai-subscription";
34
37
 
35
38
  /** Provider-neutral names for the existing, battle-tested controller projection. */
36
39
  export type SessionRealtimeController = CodexRealtimeController;
@@ -53,7 +56,9 @@ export type CreateSessionRealtimeControllerOptions = Omit<
53
56
  export function sessionRealtimeTransportKind(
54
57
  model: SessionRealtimeModel,
55
58
  ): SessionRealtimeTransportKind {
56
- return model === "gpt-live-1-boulder-alpha" ? "codex" : "gateway";
59
+ if (model === "gpt-live-1-boulder-alpha") return "codex";
60
+ if (model === "supergrok/grok-voice-think-fast-2.0") return "xai-subscription";
61
+ return "gateway";
57
62
  }
58
63
 
59
64
  /**
@@ -68,13 +73,18 @@ export function createSessionRealtimeController(
68
73
  return createCodexRealtimeController({
69
74
  ...options,
70
75
  ownerStorageNamespace: sessionRealtimeOwnerStorageNamespace(options.model),
71
- ...(transport === "gateway" ? { startTransport: createGatewayRealtimeTransportStarter() } : {}),
76
+ ...(transport === "gateway"
77
+ ? { startTransport: createGatewayRealtimeTransportStarter() }
78
+ : transport === "xai-subscription"
79
+ ? { startTransport: createXaiSubscriptionRealtimeTransportStarter() }
80
+ : {}),
72
81
  });
73
82
  }
74
83
 
75
84
  export {
76
85
  createCodexRealtimeController,
77
86
  createGatewayRealtimeTransportStarter,
87
+ createXaiSubscriptionRealtimeTransportStarter,
78
88
  hasStoredSessionRealtimeOwnerProof,
79
89
  sessionRealtimeOwnerStorageKey,
80
90
  sessionRealtimeOwnerStorageNamespace,