@genex-ai/embed-sdk 0.36.0 → 0.38.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/index.js CHANGED
@@ -6,7 +6,10 @@ import {
6
6
  buy,
7
7
  consumeEntitlement,
8
8
  copyText,
9
+ createSpeaker,
10
+ createVoiceRecorder,
9
11
  deleteShared,
12
+ foldGenerationRequest,
10
13
  generate,
11
14
  generateStream,
12
15
  generationErrorMessage,
@@ -30,12 +33,14 @@ import {
30
33
  getShop,
31
34
  getSpendGrant,
32
35
  getUser,
36
+ getVoiceCatalog,
33
37
  getWorkflowOfferings,
34
38
  haptic,
35
39
  initEmbed,
36
40
  isEmbedded,
37
41
  judge,
38
42
  keepAwake,
43
+ lendSpendGrantToRoom,
39
44
  listEvents,
40
45
  listShared,
41
46
  loadPlayerState,
@@ -48,19 +53,22 @@ import {
48
53
  requestSpendGrant,
49
54
  requestWorkflow,
50
55
  resumeWorkflow,
56
+ returnSpendGrantFromRoom,
51
57
  saveFile,
52
58
  savePlayerState,
53
59
  saveWorldState,
54
60
  setFullscreen,
55
61
  share,
62
+ speak,
56
63
  stopSpendGrant,
57
64
  submitScore,
58
65
  supports,
66
+ transcribe,
59
67
  waitForAuth,
60
68
  waitForGeneration,
61
69
  waitForPlayer
62
- } from "./chunk-RAAJ2ZK5.js";
63
- import "./chunk-QBCWKMVQ.js";
70
+ } from "./chunk-M2KOZMPE.js";
71
+ import "./chunk-YQY2WLAJ.js";
64
72
  export {
65
73
  ItemState,
66
74
  __resetForTests,
@@ -69,7 +77,10 @@ export {
69
77
  buy,
70
78
  consumeEntitlement,
71
79
  copyText,
80
+ createSpeaker,
81
+ createVoiceRecorder,
72
82
  deleteShared,
83
+ foldGenerationRequest,
73
84
  generate,
74
85
  generateStream,
75
86
  generationErrorMessage,
@@ -93,12 +104,14 @@ export {
93
104
  getShop,
94
105
  getSpendGrant,
95
106
  getUser,
107
+ getVoiceCatalog,
96
108
  getWorkflowOfferings,
97
109
  haptic,
98
110
  initEmbed,
99
111
  isEmbedded,
100
112
  judge,
101
113
  keepAwake,
114
+ lendSpendGrantToRoom,
102
115
  listEvents,
103
116
  listShared,
104
117
  loadPlayerState,
@@ -111,14 +124,17 @@ export {
111
124
  requestSpendGrant,
112
125
  requestWorkflow,
113
126
  resumeWorkflow,
127
+ returnSpendGrantFromRoom,
114
128
  saveFile,
115
129
  savePlayerState,
116
130
  saveWorldState,
117
131
  setFullscreen,
118
132
  share,
133
+ speak,
119
134
  stopSpendGrant,
120
135
  submitScore,
121
136
  supports,
137
+ transcribe,
122
138
  waitForAuth,
123
139
  waitForGeneration,
124
140
  waitForPlayer
@@ -1,3 +1,240 @@
1
+ /**
2
+ * VOICE on the player-funded lane: a game hears its player and speaks back.
3
+ *
4
+ * Two calls under a standing budget whose approved terms carry `voice`, each
5
+ * billed as used on the budget's meter like every other call it admits:
6
+ *
7
+ * transcription `POST /api/runtime/grants/:id/transcriptions`
8
+ * body: one WAV file (PCM 16-bit), at most
9
+ * `limits.maxSeconds` long; answers the words as JSON.
10
+ * speech `POST /api/runtime/grants/:id/speech`
11
+ * body: JSON text + a voice of the catalog; answers
12
+ * `text/event-stream` — one `start`, raw PCM in `audio`
13
+ * events as it is made, one `done`.
14
+ *
15
+ * Served only where `GET /api/runtime/models` says `features.voice: true`;
16
+ * `GET /api/runtime/voice` is the catalog (models, voices, limits, prices).
17
+ * Genex stores no audio: a recording is forwarded to the speech provider and
18
+ * dropped, and spoken audio is streamed and never kept.
19
+ *
20
+ * This file is dependency-free and runs in a browser, in Node and in the
21
+ * practice helper: types, limits, the WAV helpers both ends share, and the
22
+ * stream's event parser.
23
+ */
24
+
25
+ /** How good, and how dear, a spoken voice is. A game names a tier, never a vendor. */
26
+ declare const VoiceTier: {
27
+ readonly Premium: "premium";
28
+ readonly Standard: "standard";
29
+ readonly Economy: "economy";
30
+ };
31
+ type VoiceTier = (typeof VoiceTier)[keyof typeof VoiceTier];
32
+ /** The two kinds of voice call, as a call's `kind` and a row's `outputFormat`. */
33
+ declare const VoiceCallKind: {
34
+ readonly Transcription: "transcription";
35
+ readonly Speech: "speech";
36
+ };
37
+ type VoiceCallKind = (typeof VoiceCallKind)[keyof typeof VoiceCallKind];
38
+ /** Spoken audio as every tier streams it: 16-bit signed little-endian PCM, one channel. */
39
+ declare const VOICE_SPEECH_ENCODING = "pcm_s16le";
40
+ interface RuntimeSpeechModel {
41
+ id: string;
42
+ label: string;
43
+ tier: VoiceTier;
44
+ /** Who makes the audio (`ElevenLabs`, `Google`): named on the approval sheet. */
45
+ provider: string;
46
+ /** What a typical line costs before the fee, per million characters. A
47
+ * figure for estimates: a call is billed its real cost. */
48
+ estimatedUsdPerMillionCharacters: number;
49
+ /** Reads a `style` direction (`a tired whisper`). */
50
+ styles: boolean;
51
+ }
52
+ interface RuntimeTranscriptionModel {
53
+ id: string;
54
+ label: string;
55
+ provider: string;
56
+ usdPerMinute: number;
57
+ }
58
+ interface RuntimeVoice {
59
+ /** What a game sends as `voice`. */
60
+ id: string;
61
+ label: string;
62
+ /** One line a designer can cast from: age, manner, the roles it suits. */
63
+ description: string;
64
+ gender: 'female' | 'male' | 'neutral';
65
+ /** The tiers that can speak it. */
66
+ tiers: VoiceTier[];
67
+ }
68
+ interface RuntimeVoiceLimits {
69
+ speech: {
70
+ /** Characters of `text` in one call. */
71
+ maxCharacters: number;
72
+ maxStyleCharacters: number;
73
+ encoding: typeof VOICE_SPEECH_ENCODING;
74
+ sampleRate: number;
75
+ channels: number;
76
+ };
77
+ transcription: {
78
+ maxSeconds: number;
79
+ minSeconds: number;
80
+ maxBytes: number;
81
+ contentTypes: string[];
82
+ };
83
+ }
84
+ /** What `GET /api/runtime/voice` serves. A stand without voice answers 404. */
85
+ interface RuntimeVoiceCatalog {
86
+ enabled: true;
87
+ currency: RuntimeCurrency;
88
+ /** The fee a call is billed at over its real cost, in basis points. */
89
+ feeBps: number;
90
+ usdCentsPerCredit: number;
91
+ speech: {
92
+ models: RuntimeSpeechModel[];
93
+ voices: RuntimeVoice[];
94
+ };
95
+ transcription: {
96
+ models: RuntimeTranscriptionModel[];
97
+ };
98
+ limits: RuntimeVoiceLimits;
99
+ /** `practice`: the builder's local helper, never a stand's catalog. */
100
+ source?: 'practice';
101
+ }
102
+ /** What a game asks for beside its models when it requests a budget. */
103
+ interface RuntimeGrantVoiceRequest {
104
+ /** The game speaks. `tiers` are the ones it will call (default: `standard`);
105
+ * the estimate is the characters it expects to speak per disclosure period. */
106
+ speech?: {
107
+ tiers?: VoiceTier[];
108
+ estimatedCharactersPerPeriod: number;
109
+ };
110
+ /** The game listens. The estimate is seconds of recorded speech per period. */
111
+ transcription?: {
112
+ estimatedSecondsPerPeriod: number;
113
+ };
114
+ }
115
+ /** A budget's voice terms, frozen with it and shown on the approval sheet. */
116
+ interface RuntimeGrantVoiceTerms {
117
+ billingPolicy: 'metered-credits-v1';
118
+ /** Every company a recording or a line of text is sent to. */
119
+ providers: string[];
120
+ speech?: {
121
+ /** The model each approved tier speaks with. */
122
+ models: {
123
+ tier: VoiceTier;
124
+ modelId: string;
125
+ label: string;
126
+ provider: string;
127
+ }[];
128
+ estimatedCharactersPerPeriod: number;
129
+ /** The SERVER's figure for that estimate at the dearest approved tier, fee included. */
130
+ estimatedCreditsPerPeriod: number;
131
+ maxCharacters: number;
132
+ };
133
+ transcription?: {
134
+ /** In the order they are tried. */
135
+ models: {
136
+ modelId: string;
137
+ label: string;
138
+ provider: string;
139
+ }[];
140
+ estimatedSecondsPerPeriod: number;
141
+ estimatedCreditsPerPeriod: number;
142
+ maxSeconds: number;
143
+ };
144
+ }
145
+ /** What `POST /api/runtime/grants/:id/speech` accepts. */
146
+ interface RuntimeSpeechRequest {
147
+ /** Used once: a spoken line is never replayed, so a reused key is `idempotency_conflict`. */
148
+ idempotencyKey: string;
149
+ text: string;
150
+ /** A voice id of the catalog. */
151
+ voice: string;
152
+ /** One of the budget's approved tiers; its first when absent. */
153
+ tier?: VoiceTier;
154
+ /** How to say it, in a few words. Read by models whose `styles` is true, ignored by the rest. */
155
+ style?: string;
156
+ language?: string;
157
+ }
158
+ /** Where a voice call's money went: the budget's meter, as for the judge. */
159
+ interface RuntimeVoiceBilling {
160
+ billingPolicy: 'metered-credits-v1';
161
+ billingStatus: 'pending' | 'final';
162
+ /** A call under a budget charges no credit of its own — the meter does. A
163
+ * development call (the builder's own credits) is charged whole credits. */
164
+ chargedCredits: number;
165
+ /** USD pico-dollars as decimal strings: the call's real cost (null while
166
+ * unknown) and what it added to the meter, fee included. */
167
+ costUsdPicos: string | null;
168
+ chargedUsdPicos: string | null;
169
+ }
170
+ interface RuntimeVoiceGrantCounters {
171
+ status: RuntimeGrantStatus;
172
+ spentCredits: number;
173
+ heldCredits: number;
174
+ remainingCredits: number;
175
+ }
176
+ interface RuntimeVoiceCallView {
177
+ generationId: string;
178
+ grantId: string | null;
179
+ modelId: string;
180
+ /** `dispatching` only on a replay of a call still running. */
181
+ status: 'succeeded' | 'failed' | 'unknown' | 'canceled' | 'dispatching';
182
+ error?: string;
183
+ /** Set with `content_blocked`: which side the stand's content check refused. */
184
+ contentBlocked?: 'input' | 'output';
185
+ billing: RuntimeVoiceBilling;
186
+ grant?: RuntimeVoiceGrantCounters;
187
+ createdAt: string;
188
+ completedAt?: string;
189
+ /** `practice`: answered by the builder's local helper. Absent on every real answer. */
190
+ source?: 'practice';
191
+ }
192
+ /** The transcription door's answer. `text` is present on `succeeded`, and is
193
+ * empty when nobody spoke. */
194
+ interface RuntimeTranscriptionView extends RuntimeVoiceCallView {
195
+ kind: typeof VoiceCallKind.Transcription;
196
+ text?: string;
197
+ /** The language heard, as the provider names it (`en`, `eng`), when it says. */
198
+ language?: string;
199
+ /** The recording's length. */
200
+ durationMs: number;
201
+ }
202
+ /** The speech door's last event. The audio itself is the `audio` events before it. */
203
+ interface RuntimeSpeechView extends RuntimeVoiceCallView {
204
+ kind: typeof VoiceCallKind.Speech;
205
+ voice: string;
206
+ tier: VoiceTier;
207
+ characters: number;
208
+ /** Length of the audio that was made; absent when none was. */
209
+ durationMs?: number;
210
+ }
211
+ /**
212
+ * What the speech door sends, as `text/event-stream`, in this order: one
213
+ * `start`, any number of `audio`, one `done`. `audio.data` is base64 of PCM in
214
+ * the format `start` names; pieces are whole samples and play in order. A
215
+ * stream that ends without `done` was cut: what arrived is all there is, and
216
+ * the call settles on the server either way.
217
+ */
218
+ type RuntimeSpeechStreamEvent = {
219
+ event: 'start';
220
+ data: {
221
+ generationId: string;
222
+ encoding: string;
223
+ sampleRate: number;
224
+ channels: number;
225
+ };
226
+ } | {
227
+ event: 'audio';
228
+ data: {
229
+ data: string;
230
+ };
231
+ } | {
232
+ event: 'done';
233
+ data: RuntimeSpeechView;
234
+ };
235
+
236
+ /** Web-only generation bridge. This does not extend the native vocabulary. */
237
+
1
238
  type RuntimeGenerationStatus = 'requires_confirmation' | 'queued' | 'dispatching' | 'awaiting_external' | 'succeeded' | 'failed' | 'unknown' | 'canceled' | 'expired';
2
239
  /**
3
240
  * Who pays. `credits` is the player's Genex credits — every quote and budget
@@ -20,8 +257,50 @@ type RuntimeCurrency = 'coins' | 'credits';
20
257
  * credits: `declared-v1` a fixed coin price per started attempt, `consumed-v1`
21
258
  * a coin charge for consumed work, `standing-v1` / `standing-judge-v1` a coin
22
259
  * budget, and `metered-v1` its judge calls on a coin meter.
260
+ *
261
+ * `standing-sponsored-v1` is a budget the game's CREATOR pays for (a sponsored
262
+ * allowance): nobody approves it and no sheet may, because the money is not
263
+ * the player's.
23
264
  */
24
- type RuntimeBillingPolicy = 'consumed-v1' | 'declared-v1' | 'standing-v1' | 'standing-judge-v1' | 'metered-v1' | 'metered-credits-v1' | 'standing-credits-v1';
265
+ type RuntimeBillingPolicy = 'consumed-v1' | 'declared-v1' | 'standing-v1' | 'standing-judge-v1' | 'metered-v1' | 'metered-credits-v1' | 'standing-credits-v1' | 'standing-sponsored-v1';
266
+ /** One turn of a conversation. Exactly two roles and plain text: a game can
267
+ * never write a `system`, `tool` or `developer` turn, or a non-text part. */
268
+ interface RuntimeMessage {
269
+ role: 'user' | 'assistant';
270
+ content: string;
271
+ }
272
+ /** How hard a thinking model may think. `none` switches thinking off. */
273
+ type RuntimeReasoningEffort = 'none' | 'low' | 'medium' | 'high';
274
+ /** The controls a model has to support; a model's row lists the ones it takes. */
275
+ type RuntimeControl = 'temperature' | 'topP' | 'stop' | 'seed' | 'reasoningEffort';
276
+ /** What a call may carry beside (or instead of) `prompt`. */
277
+ interface RuntimeConversationFields {
278
+ /** The game's own instruction. Genex's fixed line stays ahead of it. */
279
+ system?: string;
280
+ /** `user` / `assistant` turns, alternating, starting with `user`. With a
281
+ * `prompt` they end on `assistant` (the prompt is the last user turn);
282
+ * without one they end on `user`. */
283
+ messages?: RuntimeMessage[];
284
+ }
285
+ /** Sampling and reasoning controls. Each needs a model that takes it
286
+ * (`RuntimeGenerationModels.models[].controls`), else `unsupported_parameter`. */
287
+ interface RuntimeControlFields {
288
+ /** 0–2. */
289
+ temperature?: number;
290
+ /** 0–1. */
291
+ topP?: number;
292
+ /** A few short strings (the stand serves how many and how long). */
293
+ stop?: string[];
294
+ /** A whole number, 0 to 2,147,483,647. Best effort: not every model is deterministic. */
295
+ seed?: number;
296
+ /** One of the model's `reasoningEfforts`. Reasoning tokens are output
297
+ * tokens: they count against the answer's funded length, so `none` or
298
+ * `low` is the way out for an answer cut off while thinking. */
299
+ reasoningEffort?: RuntimeReasoningEffort;
300
+ /** Mark the `system` block as a cacheable prefix where the vendor needs to
301
+ * be told (Anthropic); a no-op where caching is automatic or absent. */
302
+ cacheSystem?: boolean;
303
+ }
25
304
  /** One option of a `choice`: a description, or a sharper one with its opposite and examples. */
26
305
  type RuntimeJudgeCriterion = string | {
27
306
  what: string;
@@ -112,6 +391,9 @@ interface RuntimeJudgmentView {
112
391
  };
113
392
  createdAt: string;
114
393
  completedAt?: string;
394
+ /** `practice`: answered by the builder's local helper (`genex llm practice`),
395
+ * never by the classifier. Absent on every real answer. */
396
+ source?: 'practice';
115
397
  }
116
398
  /**
117
399
  * Execution may be terminal while unresolved provider expense still holds money.
@@ -185,7 +467,7 @@ interface RuntimeWorkflowOfferings {
185
467
  }[];
186
468
  externalProviders: RuntimeExternalProvider[];
187
469
  }
188
- interface RuntimeGenerationView extends RuntimeGenerationBilling {
470
+ interface RuntimeGenerationView extends RuntimeGenerationBilling, RuntimeConversationFields, RuntimeControlFields {
189
471
  id: string;
190
472
  status: RuntimeGenerationStatus;
191
473
  funding: null | RuntimeGenerationFunding;
@@ -201,10 +483,19 @@ interface RuntimeGenerationView extends RuntimeGenerationBilling {
201
483
  * published game. Absent on a stand older than the tag and on development
202
484
  * rows; read absence as "the published game". */
203
485
  channel?: 'production' | 'staging';
486
+ /** Who asked, when it was not the player's own browser: `room` is the game's multiplayer
487
+ * server, on a budget the player lent it. Only on the player's own reads on Genex. */
488
+ origin?: 'room';
204
489
  modelId: string;
205
- /** For a judge call, the game's state as JSON text. */
490
+ /** For a judge call, the game's state as JSON text. Empty on a call that
491
+ * sent `messages` alone; `system`, `messages` and the controls are beside
492
+ * it, as sent. */
206
493
  prompt: string;
207
- outputFormat: 'text' | 'json' | 'judge';
494
+ /** Controls this call asked for that its funding cannot honour: a call
495
+ * answered on the player's own plan is run as one prompt and takes none. */
496
+ ignoredControls?: string[];
497
+ /** `transcription` and `speech` are voice calls (`runtime-voice.ts`). */
498
+ outputFormat: 'text' | 'json' | 'judge' | 'transcription' | 'speech';
208
499
  schema?: Record<string, unknown>;
209
500
  /** A judge call's questions. */
210
501
  questions?: Record<string, RuntimeJudgeQuestion>;
@@ -270,6 +561,10 @@ interface RuntimeGenerationView extends RuntimeGenerationBilling {
270
561
  /** Provider-reported input and output tokens (output includes reasoning); null when none was reported. */
271
562
  inputTokens?: number | null;
272
563
  outputTokens?: number | null;
564
+ /** Of the input, what the provider read from its cache; of the output,
565
+ * what was reasoning. Present only when the provider reported one. */
566
+ cachedInputTokens?: number;
567
+ reasoningTokens?: number;
273
568
  /** This call's own `max_tokens`, funded from its declared ceiling. */
274
569
  maxOutputTokens?: number;
275
570
  /** The smallest declared price whose funded `max_tokens` holds this answer
@@ -297,8 +592,18 @@ interface RuntimeGenerationView extends RuntimeGenerationBilling {
297
592
  slotHeld?: boolean;
298
593
  allowExternal: boolean;
299
594
  output?: unknown;
300
- source?: 'openrouter' | 'external' | 'typesafe';
595
+ /** `practice` is the builder's local helper (`genex llm practice`): made-up
596
+ * output on a dev server, which authorizes nothing. */
597
+ source?: 'openrouter' | 'external' | 'typesafe' | 'practice';
301
598
  error?: string;
599
+ /** Beside the error `content_blocked` only: which side the content check
600
+ * refused (`RUNTIME_CONTENT_BLOCKED`). Absent on every other call. */
601
+ contentBlocked?: RuntimeContentBlockedSide;
602
+ /** When the stand removed this settled call's stored text under its
603
+ * retention setting: `prompt` is then empty and `output` null, whatever the
604
+ * status — keep what your game needs when the call resolves. Absent on a
605
+ * call whose text is still stored. */
606
+ textRemovedAt?: string;
302
607
  /** The SERVER's clock: when the player asked, when the provider call actually
303
608
  * started, and when it stopped running. Measure elapsed from these rather
304
609
  * than from when a client first saw the row — that invents a duration for
@@ -309,6 +614,8 @@ interface RuntimeGenerationView extends RuntimeGenerationBilling {
309
614
  completedAt?: string;
310
615
  /** Set when a standing budget admitted this call instead of a popup. */
311
616
  grantId?: string;
617
+ /** The game's creator paid for this call (a sponsored budget), not the player. */
618
+ sponsored?: true;
312
619
  /** A local watcher is answering personal-plan work for this player right now. */
313
620
  watcherOnline?: boolean;
314
621
  }
@@ -334,7 +641,7 @@ interface RuntimeGrantJudgeTerms {
334
641
  interface RuntimeGrantTerms {
335
642
  /** `standing-credits-v1` for every budget quoted since 2026-09-25 (judge or
336
643
  * not); `standing-v1` / `standing-judge-v1` are the dormant coin budgets. */
337
- billingPolicy: 'standing-v1' | 'standing-judge-v1' | 'standing-credits-v1';
644
+ billingPolicy: 'standing-v1' | 'standing-judge-v1' | 'standing-credits-v1' | 'standing-sponsored-v1';
338
645
  /** Absent on a coin budget quoted before credits. */
339
646
  currency?: RuntimeCurrency;
340
647
  models: string[];
@@ -373,6 +680,24 @@ interface RuntimeGrantTerms {
373
680
  };
374
681
  /** Present when the budget also admits the judge. */
375
682
  judge?: RuntimeGrantJudgeTerms;
683
+ /** Present when the budget also admits voice calls: the game listens to
684
+ * the player's microphone, speaks, or both. The approval sheet says so. */
685
+ voice?: RuntimeGrantVoiceTerms;
686
+ /** The game's multiplayer server may also spend this budget, in a server-authoritative room its
687
+ * owner lends it to. Present, and `true`, only on a budget that was requested that way; the
688
+ * approval sheet says so. */
689
+ shareWithRooms?: true;
690
+ }
691
+ /** A budget lent to one server-authoritative room, as its owner reads it. */
692
+ interface RuntimeRoomLendView {
693
+ id: string;
694
+ grantId: string;
695
+ roomId: string;
696
+ /** `ended`: the room's calls no longer run on this budget. */
697
+ status: 'active' | 'ended';
698
+ /** Why it ended: `returned` (the player took it back), `left_room`, or the budget's own end. */
699
+ endReason?: string;
700
+ createdAt: string;
376
701
  }
377
702
  interface RuntimeGrantView {
378
703
  id: string;
@@ -429,9 +754,41 @@ interface RuntimeGrantView {
429
754
  * the live budgets of this game that approving it would replace, one per
430
755
  * funding door at most. Never sent to a game. */
431
756
  replaces?: RuntimeGrantView[];
757
+ /** A SPONSORED budget: the game's creator pays for every call under it, not
758
+ * the player. Nobody approved it, its limit is the player's allowance for
759
+ * the day, and it is never offered a personal plan. */
760
+ sponsored?: true;
761
+ /** `practice`: a pretend budget kept by the builder's local helper
762
+ * (`genex llm practice`). No player approved it and nothing is charged. */
763
+ source?: 'practice';
764
+ }
765
+ /**
766
+ * What this stand's in-game model lane can do beyond the baseline, one key per
767
+ * capability. A game (and the SDK) decides from these, never from a version
768
+ * number: a key that is absent or false is a capability this stand does not
769
+ * serve. Absent altogether on a stand that predates every one of them.
770
+ */
771
+ interface RuntimeGenerationFeatures {
772
+ /** A game's creator can pay for players' calls: `requestSpendGrant({ sponsored: true })`. */
773
+ sponsor?: boolean;
774
+ /** A guest (no account) may use a sponsored budget, where the creator allowed it. */
775
+ sponsorGuests?: boolean;
776
+ /** A call may carry `system`, `messages`, the controls and `cacheSystem`. */
777
+ messages?: boolean;
778
+ /** The content check on every generation: `off` (none), `log` (recorded for
779
+ * operators, never blocks) or `enforce` (a flagged request or answer fails
780
+ * as `content_blocked`). */
781
+ moderation?: 'off' | 'log' | 'enforce';
782
+ /** A budget may be requested with `shareWithRooms` and lent to a
783
+ * server-authoritative room (`lendSpendGrantToRoom`). */
784
+ roomCalls?: boolean;
785
+ /** The stand serves voice (`runtime-voice.ts`): a budget may be requested
786
+ * with `voice`, and its calls may be transcribed and spoken. */
787
+ voice?: boolean;
432
788
  }
433
789
  interface RuntimeGenerationModels {
434
790
  enabled: true;
791
+ features?: RuntimeGenerationFeatures;
435
792
  /**
436
793
  * Every model this stand serves, FEATURED FIRST then by vendor and label.
437
794
  *
@@ -460,7 +817,22 @@ interface RuntimeGenerationModels {
460
817
  * judge (`judge()` under a budget that enabled it). Absent on a stand
461
818
  * that predates the judge, where every model is `openrouter`. */
462
819
  kind?: 'openrouter' | 'typesafe';
820
+ /** The optional controls a call to this model may carry on this stand;
821
+ * one it does not list is refused `unsupported_parameter`, nothing
822
+ * charged. Empty while `features.messages` is off; absent on a stand
823
+ * that predates the field. */
824
+ controls?: RuntimeControl[];
825
+ /** The values `reasoningEffort` may take, where the model takes it. */
826
+ reasoningEfforts?: RuntimeReasoningEffort[];
463
827
  }[];
828
+ /** The sizes of a conversation, where `features.messages` is on: turns in
829
+ * `messages`, and how many `stop` strings of how many UTF-8 bytes. The text
830
+ * itself — prompt, system and every turn together — fits `limits.maxPromptBytes`. */
831
+ messageLimits?: {
832
+ maxMessages: number;
833
+ maxStopSequences: number;
834
+ maxStopBytes: number;
835
+ };
464
836
  externalProviders: RuntimeExternalProvider[];
465
837
  /** How many rows are in `models`. */
466
838
  total?: number;
@@ -508,6 +880,9 @@ interface RuntimeGenerationModels {
508
880
  * not reach the provider. Absent on a stand that predates the probe.
509
881
  */
510
882
  providerKey?: 'ok' | 'rejected' | 'unknown';
883
+ /** `practice`: the list of the builder's local helper (`genex llm practice`),
884
+ * not a stand's catalog. */
885
+ source?: 'practice';
511
886
  }
512
887
  /**
513
888
  * What `POST /api/runtime/grants/:id/generations/stream` sends, as
@@ -532,5 +907,6 @@ type RuntimeGenerationStreamEvent = {
532
907
  event: 'done';
533
908
  data: RuntimeGenerationView;
534
909
  };
910
+ type RuntimeContentBlockedSide = 'input' | 'output';
535
911
 
536
- export type { RuntimeJudgeQuestion as R, RuntimeWorkflowInput as a, RuntimeGenerationView as b, RuntimeJudgeAnswer as c, RuntimeJudgmentView as d, RuntimeGenerationBilling as e, RuntimeGenerationFunding as f, RuntimeGrantView as g, RuntimeGenerationModels as h, RuntimeWorkflowOfferings as i, RuntimeBillingPolicy as j, RuntimeCurrency as k, RuntimeExternalProvider as l, RuntimeGenerationStatus as m, RuntimeGenerationStreamEvent as n, RuntimeGrantJudgeTerms as o, RuntimeGrantStatus as p, RuntimeGrantTerms as q, RuntimeJudgeCriterion as r };
912
+ export { type RuntimeGrantVoiceTerms as A, type RuntimeJudgeCriterion as B, type RuntimeReasoningEffort as C, type RuntimeSpeechModel as D, type RuntimeSpeechRequest as E, type RuntimeSpeechStreamEvent as F, type RuntimeSpeechView as G, type RuntimeTranscriptionModel as H, type RuntimeTranscriptionView as I, type RuntimeVoice as J, type RuntimeVoiceGrantCounters as K, type RuntimeVoiceLimits as L, type RuntimeConversationFields as R, VoiceTier as V, type RuntimeControlFields as a, type RuntimeJudgeQuestion as b, type RuntimeWorkflowInput as c, type RuntimeGenerationView as d, type RuntimeJudgeAnswer as e, type RuntimeJudgmentView as f, type RuntimeGenerationBilling as g, type RuntimeGenerationFunding as h, type RuntimeGrantVoiceRequest as i, type RuntimeGrantView as j, type RuntimeMessage as k, type RuntimeGenerationModels as l, type RuntimeWorkflowOfferings as m, type RuntimeRoomLendView as n, type RuntimeVoiceBilling as o, type RuntimeVoiceCatalog as p, type RuntimeBillingPolicy as q, type RuntimeControl as r, type RuntimeCurrency as s, type RuntimeExternalProvider as t, type RuntimeGenerationFeatures as u, type RuntimeGenerationStatus as v, type RuntimeGenerationStreamEvent as w, type RuntimeGrantJudgeTerms as x, type RuntimeGrantStatus as y, type RuntimeGrantTerms as z };
package/dist/sentry.js CHANGED
@@ -2,8 +2,8 @@ import {
2
2
  _stashTicketFromUrl,
3
3
  getUser,
4
4
  on
5
- } from "./chunk-RAAJ2ZK5.js";
6
- import "./chunk-QBCWKMVQ.js";
5
+ } from "./chunk-M2KOZMPE.js";
6
+ import "./chunk-YQY2WLAJ.js";
7
7
 
8
8
  // src/sentry.ts
9
9
  import * as Sentry from "@sentry/browser";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@genex-ai/embed-sdk",
3
- "version": "0.36.0",
3
+ "version": "0.38.0",
4
4
  "description": "Player identity + durable game state for genex games \u2014 signed-in or guest play, per-player save slots, shared world state, soft-trust leaderboards, and shared collections and event streams.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",