@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/README.md +326 -4
- package/dist/{chunk-RAAJ2ZK5.js → chunk-M2KOZMPE.js} +964 -56
- package/dist/{chunk-QBCWKMVQ.js → chunk-YQY2WLAJ.js} +180 -1
- package/dist/development.d.ts +10 -3
- package/dist/development.js +4 -2
- package/dist/index.d.ts +318 -10
- package/dist/index.js +18 -2
- package/dist/{runtime-generation-B3oFDmCp.d.ts → runtime-generation-DhyQ9taA.d.ts} +383 -7
- package/dist/sentry.js +2 -2
- package/package.json +1 -1
|
@@ -468,6 +468,35 @@ function parsePlatformResult(value) {
|
|
|
468
468
|
function isGenerationId(value) {
|
|
469
469
|
return typeof value === "string" && /^[A-Za-z0-9_-]{1,128}$/.test(value);
|
|
470
470
|
}
|
|
471
|
+
var RUNTIME_TURN_LABEL = { user: "User", assistant: "Assistant" };
|
|
472
|
+
function runtimeTurns(request) {
|
|
473
|
+
return [...request.messages ?? [], ...request.prompt ? [{ role: "user", content: request.prompt }] : []];
|
|
474
|
+
}
|
|
475
|
+
function runtimeConversationError(request) {
|
|
476
|
+
if (request.system !== void 0 && (typeof request.system !== "string" || !request.system.trim())) return "invalid_request";
|
|
477
|
+
if (request.prompt !== void 0 && typeof request.prompt !== "string") return "invalid_request";
|
|
478
|
+
if (request.messages !== void 0 && (!Array.isArray(request.messages) || request.messages.length === 0 || request.messages.some((turn) => !turn || typeof turn !== "object" || turn.role !== "user" && turn.role !== "assistant" || typeof turn.content !== "string" || !turn.content.trim() || Object.keys(turn).length !== 2))) return "invalid_messages";
|
|
479
|
+
const prompt = typeof request.prompt === "string" ? request.prompt.trim() : "";
|
|
480
|
+
const turns = runtimeTurns({ messages: request.messages, prompt });
|
|
481
|
+
if (turns.length === 0) return "invalid_request";
|
|
482
|
+
const ordered = turns[0].role === "user" && turns[turns.length - 1].role === "user" && turns.every((turn, index) => index === 0 || turn.role !== turns[index - 1].role);
|
|
483
|
+
return ordered ? void 0 : "invalid_messages";
|
|
484
|
+
}
|
|
485
|
+
function foldRuntimeConversation(request) {
|
|
486
|
+
const turns = runtimeTurns(request);
|
|
487
|
+
if (!request.system && turns.length <= 1) return turns[0]?.content ?? "";
|
|
488
|
+
const parts = [];
|
|
489
|
+
if (request.system) parts.push(`Instructions:
|
|
490
|
+
${request.system}`);
|
|
491
|
+
if (turns.length === 1) parts.push(`Request:
|
|
492
|
+
${turns[0].content}`);
|
|
493
|
+
else if (turns.length > 1) {
|
|
494
|
+
parts.push(`Conversation:
|
|
495
|
+
${turns.map((turn) => `${RUNTIME_TURN_LABEL[turn.role]}: ${turn.content}`).join("\n\n")}`);
|
|
496
|
+
parts.push("Answer the last User message as the Assistant.");
|
|
497
|
+
}
|
|
498
|
+
return parts.join("\n\n");
|
|
499
|
+
}
|
|
471
500
|
function parseGenerationStreamEvent(event, data) {
|
|
472
501
|
let value;
|
|
473
502
|
try {
|
|
@@ -497,6 +526,138 @@ function createBridgeId(random = Math.random) {
|
|
|
497
526
|
return out;
|
|
498
527
|
}
|
|
499
528
|
|
|
529
|
+
// ../embed-protocol/src/runtime-voice.ts
|
|
530
|
+
var VoiceTier = { Premium: "premium", Standard: "standard", Economy: "economy" };
|
|
531
|
+
var VOICE_TIERS = [VoiceTier.Premium, VoiceTier.Standard, VoiceTier.Economy];
|
|
532
|
+
function isVoiceTier(value) {
|
|
533
|
+
return typeof value === "string" && VOICE_TIERS.includes(value);
|
|
534
|
+
}
|
|
535
|
+
var VOICE_SPEECH_ENCODING = "pcm_s16le";
|
|
536
|
+
var VOICE_SPEECH_SAMPLE_RATE = 24e3;
|
|
537
|
+
var VOICE_SPEECH_CHANNELS = 1;
|
|
538
|
+
var VOICE_AUDIO_CONTENT_TYPE = "audio/wav";
|
|
539
|
+
var VOICE_RECORDING_SAMPLE_RATE = 16e3;
|
|
540
|
+
var VOICE_IDEMPOTENCY_HEADER = "Idempotency-Key";
|
|
541
|
+
var VOICE_LANGUAGE_PARAM = "language";
|
|
542
|
+
var VOICE_MODEL_PARAM = "model";
|
|
543
|
+
function isVoiceLanguage(value) {
|
|
544
|
+
return typeof value === "string" && /^[a-z]{2,3}(?:-[A-Z]{2})?$/.test(value);
|
|
545
|
+
}
|
|
546
|
+
function parseSpeechStreamEvent(event, data) {
|
|
547
|
+
let value;
|
|
548
|
+
try {
|
|
549
|
+
value = JSON.parse(data);
|
|
550
|
+
} catch {
|
|
551
|
+
return void 0;
|
|
552
|
+
}
|
|
553
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) return void 0;
|
|
554
|
+
const fields = value;
|
|
555
|
+
if (event === "start") {
|
|
556
|
+
const valid = isGenerationId(fields.generationId) && typeof fields.encoding === "string" && typeof fields.sampleRate === "number" && typeof fields.channels === "number";
|
|
557
|
+
return valid ? { event, data: { generationId: fields.generationId, encoding: fields.encoding, sampleRate: fields.sampleRate, channels: fields.channels } } : void 0;
|
|
558
|
+
}
|
|
559
|
+
if (event === "audio") return typeof fields.data === "string" ? { event, data: { data: fields.data } } : void 0;
|
|
560
|
+
if (event === "done") return isGenerationId(fields.generationId) && typeof fields.status === "string" ? { event, data: value } : void 0;
|
|
561
|
+
return void 0;
|
|
562
|
+
}
|
|
563
|
+
var WAV_HEADER_BYTES = 44;
|
|
564
|
+
var WAV_FORMAT_PCM = 1;
|
|
565
|
+
var WAV_FORMAT_EXTENSIBLE = 65534;
|
|
566
|
+
var WAV_BITS = 16;
|
|
567
|
+
var WAV_MAX_CHUNKS = 32;
|
|
568
|
+
function ascii(view, offset, length) {
|
|
569
|
+
let text = "";
|
|
570
|
+
for (let i = 0; i < length; i++) text += String.fromCharCode(view.getUint8(offset + i));
|
|
571
|
+
return text;
|
|
572
|
+
}
|
|
573
|
+
function parseWavPcm16(bytes) {
|
|
574
|
+
if (bytes.byteLength < WAV_HEADER_BYTES) return null;
|
|
575
|
+
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
576
|
+
if (ascii(view, 0, 4) !== "RIFF" || ascii(view, 8, 4) !== "WAVE") return null;
|
|
577
|
+
let offset = 12;
|
|
578
|
+
let format = null;
|
|
579
|
+
for (let chunk = 0; chunk < WAV_MAX_CHUNKS && offset + 8 <= bytes.byteLength; chunk++) {
|
|
580
|
+
const id = ascii(view, offset, 4);
|
|
581
|
+
const size = view.getUint32(offset + 4, true);
|
|
582
|
+
const body = offset + 8;
|
|
583
|
+
if (id === "fmt ") {
|
|
584
|
+
if (size < 16 || body + 16 > bytes.byteLength) return null;
|
|
585
|
+
const tag = view.getUint16(body, true);
|
|
586
|
+
const channels = view.getUint16(body + 2, true);
|
|
587
|
+
const sampleRate = view.getUint32(body + 4, true);
|
|
588
|
+
const bits = view.getUint16(body + 14, true);
|
|
589
|
+
const extensiblePcm = tag === WAV_FORMAT_EXTENSIBLE && size >= 26 && body + 26 <= bytes.byteLength && view.getUint16(body + 24, true) === WAV_FORMAT_PCM;
|
|
590
|
+
if (tag !== WAV_FORMAT_PCM && !extensiblePcm || bits !== WAV_BITS || channels < 1 || sampleRate < 1) return null;
|
|
591
|
+
format = { sampleRate, channels };
|
|
592
|
+
} else if (id === "data") {
|
|
593
|
+
if (!format) return null;
|
|
594
|
+
const frame = format.channels * (WAV_BITS / 8);
|
|
595
|
+
const present = Math.min(size, bytes.byteLength - body);
|
|
596
|
+
const dataBytes = present - present % frame;
|
|
597
|
+
return { ...format, dataOffset: body, dataBytes, durationMs: Math.round(dataBytes / frame / format.sampleRate * 1e3) };
|
|
598
|
+
}
|
|
599
|
+
offset = body + size + size % 2;
|
|
600
|
+
}
|
|
601
|
+
return null;
|
|
602
|
+
}
|
|
603
|
+
function encodeWavPcm16(samples, sampleRate, channels = 1) {
|
|
604
|
+
const dataBytes = samples.length * 2;
|
|
605
|
+
const out = new Uint8Array(WAV_HEADER_BYTES + dataBytes);
|
|
606
|
+
const view = new DataView(out.buffer);
|
|
607
|
+
const put = (offset, text) => {
|
|
608
|
+
for (let i = 0; i < text.length; i++) view.setUint8(offset + i, text.charCodeAt(i));
|
|
609
|
+
};
|
|
610
|
+
put(0, "RIFF");
|
|
611
|
+
view.setUint32(4, 36 + dataBytes, true);
|
|
612
|
+
put(8, "WAVE");
|
|
613
|
+
put(12, "fmt ");
|
|
614
|
+
view.setUint32(16, 16, true);
|
|
615
|
+
view.setUint16(20, WAV_FORMAT_PCM, true);
|
|
616
|
+
view.setUint16(22, channels, true);
|
|
617
|
+
view.setUint32(24, sampleRate, true);
|
|
618
|
+
view.setUint32(28, sampleRate * channels * 2, true);
|
|
619
|
+
view.setUint16(32, channels * 2, true);
|
|
620
|
+
view.setUint16(34, WAV_BITS, true);
|
|
621
|
+
put(36, "data");
|
|
622
|
+
view.setUint32(40, dataBytes, true);
|
|
623
|
+
for (let i = 0; i < samples.length; i++) view.setInt16(WAV_HEADER_BYTES + i * 2, samples[i], true);
|
|
624
|
+
return out;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
// ../embed-protocol/src/runtime-practice.ts
|
|
628
|
+
var PRACTICE_PARAM = "genex_llm_practice";
|
|
629
|
+
var PRACTICE_HOST = "127.0.0.1";
|
|
630
|
+
var PRACTICE_TOKEN_RE = /^[0-9a-f]{32}$/;
|
|
631
|
+
var PRACTICE_PORT_RE = /^[1-9][0-9]{3,4}$/;
|
|
632
|
+
var LOOPBACK_ORIGIN_RE = /^http:\/\/(?:localhost|127\.0\.0\.1|\[::1\])(?::[0-9]{1,5})?$/;
|
|
633
|
+
function isPracticeToken(value) {
|
|
634
|
+
return typeof value === "string" && PRACTICE_TOKEN_RE.test(value);
|
|
635
|
+
}
|
|
636
|
+
function isPracticePort(value) {
|
|
637
|
+
return Number.isInteger(value) && value >= 1024 && value <= 65535;
|
|
638
|
+
}
|
|
639
|
+
function isLoopbackHttpOrigin(origin) {
|
|
640
|
+
return typeof origin === "string" && LOOPBACK_ORIGIN_RE.test(origin);
|
|
641
|
+
}
|
|
642
|
+
function readPracticeKey(search) {
|
|
643
|
+
if (typeof search !== "string") return null;
|
|
644
|
+
const query = search.charAt(0) === "?" ? search.slice(1) : search;
|
|
645
|
+
for (const pair of query.split("&")) {
|
|
646
|
+
const eq = pair.indexOf("=");
|
|
647
|
+
if (eq === -1 || pair.slice(0, eq) !== PRACTICE_PARAM) continue;
|
|
648
|
+
const value = pair.slice(eq + 1);
|
|
649
|
+
const dot = value.indexOf(".");
|
|
650
|
+
const port = value.slice(0, dot === -1 ? 0 : dot);
|
|
651
|
+
const token = value.slice(dot + 1);
|
|
652
|
+
if (!PRACTICE_PORT_RE.test(port) || !isPracticePort(Number(port)) || !isPracticeToken(token)) return null;
|
|
653
|
+
return { port: Number(port), token };
|
|
654
|
+
}
|
|
655
|
+
return null;
|
|
656
|
+
}
|
|
657
|
+
function practiceOrigin(port) {
|
|
658
|
+
return `http://${PRACTICE_HOST}:${port}`;
|
|
659
|
+
}
|
|
660
|
+
|
|
500
661
|
export {
|
|
501
662
|
NATIVE_CHANNEL,
|
|
502
663
|
NATIVE_PROTOCOL_VERSION,
|
|
@@ -529,6 +690,24 @@ export {
|
|
|
529
690
|
parsePlatformRequest,
|
|
530
691
|
parsePlatformResult,
|
|
531
692
|
isGenerationId,
|
|
693
|
+
runtimeConversationError,
|
|
694
|
+
foldRuntimeConversation,
|
|
532
695
|
parseGenerationStreamEvent,
|
|
533
|
-
isGenerationTerminal
|
|
696
|
+
isGenerationTerminal,
|
|
697
|
+
isVoiceTier,
|
|
698
|
+
VOICE_SPEECH_ENCODING,
|
|
699
|
+
VOICE_SPEECH_SAMPLE_RATE,
|
|
700
|
+
VOICE_SPEECH_CHANNELS,
|
|
701
|
+
VOICE_AUDIO_CONTENT_TYPE,
|
|
702
|
+
VOICE_RECORDING_SAMPLE_RATE,
|
|
703
|
+
VOICE_IDEMPOTENCY_HEADER,
|
|
704
|
+
VOICE_LANGUAGE_PARAM,
|
|
705
|
+
VOICE_MODEL_PARAM,
|
|
706
|
+
isVoiceLanguage,
|
|
707
|
+
parseSpeechStreamEvent,
|
|
708
|
+
parseWavPcm16,
|
|
709
|
+
encodeWavPcm16,
|
|
710
|
+
isLoopbackHttpOrigin,
|
|
711
|
+
readPracticeKey,
|
|
712
|
+
practiceOrigin
|
|
534
713
|
};
|
package/dist/development.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as
|
|
1
|
+
import { R as RuntimeConversationFields, a as RuntimeControlFields, b as RuntimeJudgeQuestion, c as RuntimeWorkflowInput, d as RuntimeGenerationView } from './runtime-generation-DhyQ9taA.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Server-only benchmarks spend the authenticated creator's OWN CREDITS
|
|
@@ -21,16 +21,23 @@ interface DevelopmentCap {
|
|
|
21
21
|
maxCoins?: number;
|
|
22
22
|
}
|
|
23
23
|
interface DevelopmentGenerationOptions extends DevelopmentGenerationConfig, DevelopmentCap {
|
|
24
|
+
/**
|
|
25
|
+
* The call to measure, exactly as the game will make it — its `system`,
|
|
26
|
+
* `messages` and controls included, because they change what it costs. They
|
|
27
|
+
* are sent as given: a stand that does not accept them answers
|
|
28
|
+
* `invalid_request` (a benchmark of a different request would price nothing).
|
|
29
|
+
*/
|
|
24
30
|
request: {
|
|
25
31
|
modelId: string;
|
|
26
|
-
|
|
32
|
+
/** Required unless `messages` ends with the user's turn. */
|
|
33
|
+
prompt?: string;
|
|
27
34
|
outputFormat: 'text' | 'json';
|
|
28
35
|
schema?: Record<string, unknown>;
|
|
29
36
|
/** The most output tokens the benchmarked call may write, exactly as the
|
|
30
37
|
* game will ask (`generate({ maxOutputTokens })`); omit for the stand's default. */
|
|
31
38
|
maxOutputTokens?: number;
|
|
32
39
|
idempotencyKey?: string;
|
|
33
|
-
};
|
|
40
|
+
} & RuntimeConversationFields & RuntimeControlFields;
|
|
34
41
|
/** Waiting time only; timeout returns the last server view without canceling.
|
|
35
42
|
* Defaults to 20 minutes, longer than the lane's longest dispatch. */
|
|
36
43
|
timeoutMs?: number;
|
package/dist/development.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isGenerationId,
|
|
3
3
|
isGenerationTerminal
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-YQY2WLAJ.js";
|
|
5
5
|
|
|
6
6
|
// src/development.ts
|
|
7
7
|
var DEVELOPMENT_WAIT_MS = 12e5;
|
|
8
|
+
var CONVERSATION_FIELDS = ["system", "messages", "temperature", "topP", "stop", "seed", "reasoningEffort", "cacheSystem"];
|
|
8
9
|
function assertIdentifier(value) {
|
|
9
10
|
if (!/^[A-Za-z0-9_.:-]{1,120}$/.test(value) || value === "." || value === "..") throw new Error("invalid_development_identifier");
|
|
10
11
|
}
|
|
@@ -52,8 +53,9 @@ async function developmentGenerate(options) {
|
|
|
52
53
|
if (input.maxOutputTokens !== void 0 && (!Number.isSafeInteger(input.maxOutputTokens) || input.maxOutputTokens < 1)) throw new Error("invalid_max_output_tokens");
|
|
53
54
|
const view = await request(options, "/generations", { ...cap, request: {
|
|
54
55
|
modelId: input.modelId,
|
|
55
|
-
prompt: input.prompt,
|
|
56
|
+
...input.prompt === void 0 ? {} : { prompt: input.prompt },
|
|
56
57
|
outputFormat: input.outputFormat,
|
|
58
|
+
...Object.fromEntries(CONVERSATION_FIELDS.filter((key) => input[key] !== void 0).map((key) => [key, input[key]])),
|
|
57
59
|
...input.schema === void 0 ? {} : { schema: input.schema },
|
|
58
60
|
...input.maxOutputTokens === void 0 ? {} : { maxOutputTokens: input.maxOutputTokens },
|
|
59
61
|
idempotencyKey: input.idempotencyKey ?? crypto.randomUUID()
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as RuntimeJudgeQuestion,
|
|
2
|
-
export {
|
|
1
|
+
import { R as RuntimeConversationFields, a as RuntimeControlFields, b as RuntimeJudgeQuestion, e as RuntimeJudgeAnswer, f as RuntimeJudgmentView, c as RuntimeWorkflowInput, g as RuntimeGenerationBilling, h as RuntimeGenerationFunding, i as RuntimeGrantVoiceRequest, j as RuntimeGrantView, k as RuntimeMessage, d as RuntimeGenerationView, l as RuntimeGenerationModels, m as RuntimeWorkflowOfferings, n as RuntimeRoomLendView, V as VoiceTier, o as RuntimeVoiceBilling, p as RuntimeVoiceCatalog } from './runtime-generation-DhyQ9taA.js';
|
|
2
|
+
export { q as RuntimeBillingPolicy, r as RuntimeControl, s as RuntimeCurrency, t as RuntimeExternalProvider, u as RuntimeGenerationFeatures, v as RuntimeGenerationStatus, w as RuntimeGenerationStreamEvent, x as RuntimeGrantJudgeTerms, y as RuntimeGrantStatus, z as RuntimeGrantTerms, A as RuntimeGrantVoiceTerms, B as RuntimeJudgeCriterion, C as RuntimeReasoningEffort, D as RuntimeSpeechModel, E as RuntimeSpeechRequest, F as RuntimeSpeechStreamEvent, G as RuntimeSpeechView, H as RuntimeTranscriptionModel, I as RuntimeTranscriptionView, J as RuntimeVoice, K as RuntimeVoiceGrantCounters, L as RuntimeVoiceLimits } from './runtime-generation-DhyQ9taA.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Why a platform call did not happen. One vocabulary for every SDK function,
|
|
@@ -263,7 +263,18 @@ declare function getPayments(opts?: {
|
|
|
263
263
|
*/
|
|
264
264
|
declare function requestPayment(opts: PaymentOptions): Promise<PaymentResult>;
|
|
265
265
|
|
|
266
|
-
|
|
266
|
+
/**
|
|
267
|
+
* A call may be more than one block of text: `system` is the game's own
|
|
268
|
+
* instruction, `messages` a conversation of `user` / `assistant` turns, and
|
|
269
|
+
* `temperature`, `topP`, `stop`, `seed`, `reasoningEffort` and `cacheSystem`
|
|
270
|
+
* steer the model. They are accepted by a stand whose getGenerationModels()
|
|
271
|
+
* says `features.messages`, and each control by a model that lists it in its
|
|
272
|
+
* `controls` (else `unsupported_parameter`, nothing charged). On a stand that
|
|
273
|
+
* does not accept them the SDK still runs the call: it folds `system`,
|
|
274
|
+
* `messages` and `prompt` into one prompt (foldGenerationRequest() is that
|
|
275
|
+
* text) and drops the controls, so a game written this way works everywhere.
|
|
276
|
+
*/
|
|
277
|
+
interface GenerateOptions extends RuntimeConversationFields, RuntimeControlFields {
|
|
267
278
|
/**
|
|
268
279
|
* The call's CEILING in the player's Genex credits (SDK 0.27+). Not a price:
|
|
269
280
|
* the call is billed AS USED — its real model cost plus the Genex fee, and a
|
|
@@ -276,7 +287,9 @@ interface GenerateOptions {
|
|
|
276
287
|
* as the call's credit ceiling. Kept so games built on earlier versions work. */
|
|
277
288
|
estimateCoins?: number;
|
|
278
289
|
modelId: string;
|
|
279
|
-
|
|
290
|
+
/** What to answer. Required unless `messages` ends with the user's turn;
|
|
291
|
+
* sent with `messages`, it is the last user turn after them. */
|
|
292
|
+
prompt?: string;
|
|
280
293
|
outputFormat: 'text' | 'json';
|
|
281
294
|
schema?: Record<string, unknown>;
|
|
282
295
|
/**
|
|
@@ -312,10 +325,16 @@ interface RuntimeGenerationResult extends RuntimeGenerationBilling {
|
|
|
312
325
|
generationId?: string;
|
|
313
326
|
output?: unknown;
|
|
314
327
|
/** External output is user-supplied; never use it as authority for rewards or money.
|
|
315
|
-
* `typesafe` appears only on a judge call read back through getGeneration().
|
|
316
|
-
|
|
328
|
+
* `typesafe` appears only on a judge call read back through getGeneration().
|
|
329
|
+
* `practice` is the builder's local helper (`genex llm practice`): made-up
|
|
330
|
+
* output on a dev server, which authorizes nothing either. */
|
|
331
|
+
source?: 'openrouter' | 'external' | 'typesafe' | 'practice';
|
|
317
332
|
modelProvenance?: 'unverified';
|
|
318
333
|
error?: string;
|
|
334
|
+
/** With `error: 'content_blocked'`: `input` — what was sent was refused
|
|
335
|
+
* before the model ran, at no charge — or `output` — the model's answer was
|
|
336
|
+
* withheld. Absent otherwise, and on a stand that predates the check. */
|
|
337
|
+
contentBlocked?: 'input' | 'output';
|
|
319
338
|
}
|
|
320
339
|
interface RequestWorkflowOptions {
|
|
321
340
|
/**
|
|
@@ -345,6 +364,16 @@ interface RuntimeWorkflowAuthorization extends RuntimeGenerationBilling {
|
|
|
345
364
|
}
|
|
346
365
|
/** Available models and pricing; the confirmation always uses a fresh server quote. */
|
|
347
366
|
declare function getGenerationModels(): Promise<RuntimeGenerationModels>;
|
|
367
|
+
/**
|
|
368
|
+
* The one prompt a call's `system`, `messages` and `prompt` fold into — what
|
|
369
|
+
* the SDK sends a stand that does not accept them, and the same text Genex
|
|
370
|
+
* hands a player's own plan. A call that is only a prompt is that prompt.
|
|
371
|
+
*/
|
|
372
|
+
declare function foldGenerationRequest(request: {
|
|
373
|
+
system?: string;
|
|
374
|
+
messages?: readonly RuntimeMessage[];
|
|
375
|
+
prompt?: string;
|
|
376
|
+
}): string;
|
|
348
377
|
/** Server-owned estimates, reservation maxima and availability. Confirmation seals the quote. */
|
|
349
378
|
declare function getWorkflowOfferings(workflowId: string): Promise<RuntimeWorkflowOfferings>;
|
|
350
379
|
/** Recover an operation by ID after a reload. Scoped to this player AND this game. */
|
|
@@ -421,14 +450,59 @@ interface SpendGrantOptions {
|
|
|
421
450
|
enabled: boolean;
|
|
422
451
|
estimatedCallsPerPeriod: number;
|
|
423
452
|
};
|
|
453
|
+
/**
|
|
454
|
+
* The game also listens (transcribe()) or speaks (speak(), createSpeaker()),
|
|
455
|
+
* or both. Sent as given; the sheet names every company the player's voice
|
|
456
|
+
* or the game's lines go to, and the budget's `terms.voice` comes back. A
|
|
457
|
+
* voice budget is paid in credits. With `voice`, `models` may be empty for a
|
|
458
|
+
* voice-only budget. Only on a stand whose getGenerationModels() says
|
|
459
|
+
* `features.voice` (getVoiceCatalog() answers `enabled: true` there).
|
|
460
|
+
*/
|
|
461
|
+
voice?: RuntimeGrantVoiceRequest;
|
|
462
|
+
/**
|
|
463
|
+
* The game's multiplayer server may also spend this budget (0.37+): in a
|
|
464
|
+
* server-authoritative room this player lends it to with
|
|
465
|
+
* lendSpendGrantToRoom(), for AI everyone in the room shares. The sheet tells
|
|
466
|
+
* the player so in one sentence, and a budget approved without it can never
|
|
467
|
+
* be spent by a server. Only on a stand whose getGenerationModels() says
|
|
468
|
+
* `features.roomCalls`; on any other the request fails with
|
|
469
|
+
* `room_calls_unavailable` and asks the player nothing.
|
|
470
|
+
*/
|
|
471
|
+
shareWithRooms?: boolean;
|
|
424
472
|
/** Reuse for the same budget request across retries and reloads. */
|
|
425
473
|
idempotencyKey?: string;
|
|
426
474
|
/** Approval waiting time only. A timeout neither cancels nor charges. */
|
|
427
475
|
timeoutMs?: number;
|
|
476
|
+
/** Omit, or `false`: a budget the PLAYER approves and pays (this interface).
|
|
477
|
+
* `true` asks for one the game's creator pays: see SponsoredGrantOptions. */
|
|
478
|
+
sponsored?: false;
|
|
428
479
|
}
|
|
480
|
+
/**
|
|
481
|
+
* A budget paid by the GAME'S CREATOR, from the allowance they set with
|
|
482
|
+
* `genex llm sponsor set`. The player approves nothing and pays nothing: no
|
|
483
|
+
* sheet opens, and the request needs no click.
|
|
484
|
+
*
|
|
485
|
+
* Only what the game NEEDS is asked for — the models and the per-call ceiling
|
|
486
|
+
* — and it must fit what the creator allowed. Everything else is the
|
|
487
|
+
* creator's and the server's: the limit is what is left of this player's
|
|
488
|
+
* allowance for the day, the pace is the creator's, and a personal plan never
|
|
489
|
+
* applies. The other SpendGrantOptions fields are accepted and ignored, so one
|
|
490
|
+
* options object can serve this request and the player-paid fallback.
|
|
491
|
+
*/
|
|
492
|
+
type SponsoredGrantOptions = Omit<Partial<SpendGrantOptions>, 'sponsored' | 'models'> & {
|
|
493
|
+
sponsored: true;
|
|
494
|
+
/** Models this budget may spend on. One to eight, or none for a judge-only budget. */
|
|
495
|
+
models: string[];
|
|
496
|
+
};
|
|
429
497
|
interface SpendGrantResult {
|
|
430
|
-
/**
|
|
431
|
-
|
|
498
|
+
/**
|
|
499
|
+
* `active` means the budget can serve calls and generate({ grantId }) may run.
|
|
500
|
+
* `unavailable` is the answer to a SPONSORED request only: the creator's
|
|
501
|
+
* allowance cannot serve this player now (`error` says why). Nothing was
|
|
502
|
+
* asked of the player and nothing is charged — fall back to a player-paid
|
|
503
|
+
* request, or to content that needs no model.
|
|
504
|
+
*/
|
|
505
|
+
status: 'active' | 'canceled' | 'expired' | 'failed' | 'pending' | 'unavailable';
|
|
432
506
|
grantId?: string;
|
|
433
507
|
/** The authoritative server view: limit, spend, counts and the frozen terms. */
|
|
434
508
|
grant?: RuntimeGrantView;
|
|
@@ -457,6 +531,29 @@ declare function getActiveSpendGrant(): Promise<RuntimeGrantView | null>;
|
|
|
457
531
|
* same lever on Genex and it always outranks the game's.
|
|
458
532
|
*/
|
|
459
533
|
declare function stopSpendGrant(grantId: string): Promise<RuntimeGrantView>;
|
|
534
|
+
/**
|
|
535
|
+
* Lend this player's budget to the server-authoritative room they are in
|
|
536
|
+
* (0.37+), so the game's room module may ask a model on it. `roomId` is the
|
|
537
|
+
* room's id as the multiplayer session names it (`session.code` of
|
|
538
|
+
* `connectAuthority()`). Call it once the player has joined the room; calling
|
|
539
|
+
* it again for the same room is the same lend.
|
|
540
|
+
*
|
|
541
|
+
* Only a budget requested with `shareWithRooms: true` can be lent
|
|
542
|
+
* (`grant_not_shareable` otherwise), only to a live room of this same game
|
|
543
|
+
* (`room_not_found`), and only by its owner. Every call the room makes is an
|
|
544
|
+
* ordinary call of the budget: the same per-call ceiling, limit and pace the
|
|
545
|
+
* player approved, on the same receipts, marked as asked for by the game's
|
|
546
|
+
* server. Rejects with the server's code, like getSpendGrant();
|
|
547
|
+
* `room_calls_unavailable` on a stand that does not have room calls.
|
|
548
|
+
*/
|
|
549
|
+
declare function lendSpendGrantToRoom(grantId: string, roomId: string): Promise<RuntimeRoomLendView>;
|
|
550
|
+
/**
|
|
551
|
+
* Take the budget back from a room (0.37+): nothing more of the room's is
|
|
552
|
+
* admitted on it. A call already running finishes and is charged, as after
|
|
553
|
+
* any stop. Leaving the room, stopping the budget or signing out ends a lend
|
|
554
|
+
* too; this is for a game that offers the player a switch.
|
|
555
|
+
*/
|
|
556
|
+
declare function returnSpendGrantFromRoom(grantId: string, roomId: string): Promise<RuntimeRoomLendView>;
|
|
460
557
|
/**
|
|
461
558
|
* Ask the player for a standing budget. Call it directly from a click handler,
|
|
462
559
|
* before awaiting anything: the trusted surface is reserved synchronously, just
|
|
@@ -472,7 +569,7 @@ declare function stopSpendGrant(grantId: string): Promise<RuntimeGrantView>;
|
|
|
472
569
|
* approve). So ask getActiveSpendGrant() first: a game that reuses the running
|
|
473
570
|
* budget does not ask the player again every session.
|
|
474
571
|
*/
|
|
475
|
-
declare function requestSpendGrant(options: SpendGrantOptions): Promise<SpendGrantResult>;
|
|
572
|
+
declare function requestSpendGrant(options: SpendGrantOptions | SponsoredGrantOptions): Promise<SpendGrantResult>;
|
|
476
573
|
interface GenerateStreamOptions extends GenerateOptions {
|
|
477
574
|
/** A standing budget from requestSpendGrant(). Required: only a budget streams. */
|
|
478
575
|
grantId: string;
|
|
@@ -526,6 +623,9 @@ interface JudgeResult {
|
|
|
526
623
|
error?: string;
|
|
527
624
|
/** Where the call's money went: never a credit of its own, always the budget's meter. */
|
|
528
625
|
billing?: RuntimeJudgmentView['billing'];
|
|
626
|
+
/** `practice`: answered by the builder's local helper (`genex llm practice`),
|
|
627
|
+
* not the classifier. Absent on every real answer. */
|
|
628
|
+
source?: 'practice';
|
|
529
629
|
}
|
|
530
630
|
/**
|
|
531
631
|
* Ask the budget's classifier. No popup, no user gesture — the player approved
|
|
@@ -544,6 +644,214 @@ declare function judge(options: JudgeOptions): Promise<JudgeResult>;
|
|
|
544
644
|
*/
|
|
545
645
|
declare function generationErrorMessage(code: string | undefined): string;
|
|
546
646
|
|
|
647
|
+
/**
|
|
648
|
+
* VOICE on the player-funded lane: the game hears its player (transcribe())
|
|
649
|
+
* and speaks back (speak()). Both are calls under a standing budget the player
|
|
650
|
+
* approved with `voice` terms (requestSpendGrant({ voice })), billed as used
|
|
651
|
+
* on the budget's meter like judge(), and both apply every guard a budget
|
|
652
|
+
* call does. Genex stores no audio.
|
|
653
|
+
*
|
|
654
|
+
* The wire is the protocol's `runtime-voice.ts`. Recording the microphone and
|
|
655
|
+
* playing the spoken audio are the browser helpers in `voice-audio.ts`.
|
|
656
|
+
*/
|
|
657
|
+
|
|
658
|
+
type VoiceStatus = 'succeeded' | 'failed' | 'unknown' | 'canceled' | 'pending';
|
|
659
|
+
/** What every voice call resolves to, as judge() does: never a throw. */
|
|
660
|
+
interface VoiceCallResult {
|
|
661
|
+
/** `pending`: a retry of a call still running — send it again with the same
|
|
662
|
+
* `idempotencyKey` (a transcription) to read its answer. */
|
|
663
|
+
status: VoiceStatus;
|
|
664
|
+
generationId?: string;
|
|
665
|
+
/** Why it did not succeed, as a code for generationErrorMessage(). */
|
|
666
|
+
error?: string;
|
|
667
|
+
/** With `content_blocked`: which side the stand's content check refused. */
|
|
668
|
+
contentBlocked?: 'input' | 'output';
|
|
669
|
+
/** Where the call's money went: never a credit of its own, always the budget's meter. */
|
|
670
|
+
billing?: RuntimeVoiceBilling;
|
|
671
|
+
/** `practice`: answered by the builder's local helper. Absent on every real answer. */
|
|
672
|
+
source?: 'practice';
|
|
673
|
+
}
|
|
674
|
+
/** What transcribe() takes: a budget and one recording. */
|
|
675
|
+
interface TranscribeOptions {
|
|
676
|
+
/** A standing budget approved with `voice: { transcription: … }`. Required. */
|
|
677
|
+
grantId: string;
|
|
678
|
+
/** One WAV file, 16-bit PCM — what createVoiceRecorder().stop() resolves. */
|
|
679
|
+
audio: Blob | ArrayBuffer | Uint8Array;
|
|
680
|
+
/** A hint of the language spoken (`en`, `pt-BR`); the model detects it otherwise. */
|
|
681
|
+
language?: string;
|
|
682
|
+
/** A transcription model of getVoiceCatalog(); the budget's first otherwise. */
|
|
683
|
+
model?: string;
|
|
684
|
+
/** Reuse for retries of the same recording: a replay is answered, never billed twice. */
|
|
685
|
+
idempotencyKey?: string;
|
|
686
|
+
/** Stops WAITING: a call the stand already took still finishes and is charged. */
|
|
687
|
+
signal?: AbortSignal;
|
|
688
|
+
}
|
|
689
|
+
/** What transcribe() resolves: the words heard, on `succeeded`. */
|
|
690
|
+
interface TranscribeResult extends VoiceCallResult {
|
|
691
|
+
/** On `succeeded`: the words heard, `''` when nobody spoke. */
|
|
692
|
+
text?: string;
|
|
693
|
+
/** The language heard, as the provider names it, when it says. */
|
|
694
|
+
language?: string;
|
|
695
|
+
/** The recording's length. */
|
|
696
|
+
durationMs?: number;
|
|
697
|
+
}
|
|
698
|
+
/** What speak() takes: a budget, a line and a voice of the catalog. */
|
|
699
|
+
interface SpeakOptions {
|
|
700
|
+
/** A standing budget approved with `voice: { speech: … }`. Required. */
|
|
701
|
+
grantId: string;
|
|
702
|
+
/** The line to say. At most the catalog's `limits.speech.maxCharacters`. */
|
|
703
|
+
text: string;
|
|
704
|
+
/** A voice id of getVoiceCatalog(), never typed from memory. */
|
|
705
|
+
voice: string;
|
|
706
|
+
/** One of the budget's approved tiers; its first when absent. */
|
|
707
|
+
tier?: VoiceTier;
|
|
708
|
+
/** How to say it, in a few words (`a tired whisper`), for models that read it. */
|
|
709
|
+
style?: string;
|
|
710
|
+
language?: string;
|
|
711
|
+
/** Used once: a spoken line is never replayed, so reusing a key is `idempotency_conflict`. */
|
|
712
|
+
idempotencyKey?: string;
|
|
713
|
+
/** The audio's format, once the stand has started making it. */
|
|
714
|
+
onStart?(info: {
|
|
715
|
+
generationId: string;
|
|
716
|
+
sampleRate: number;
|
|
717
|
+
channels: number;
|
|
718
|
+
}): void;
|
|
719
|
+
/** Each piece of 16-bit little-endian PCM as it arrives, in order. */
|
|
720
|
+
onAudio?(pcm: Uint8Array): void;
|
|
721
|
+
/** Stops READING: the line is still made and charged. Resolves `unknown`
|
|
722
|
+
* with `request_aborted` and the audio that arrived before it. */
|
|
723
|
+
signal?: AbortSignal;
|
|
724
|
+
}
|
|
725
|
+
/** What speak() resolves: the line's receipt and every piece of its audio. */
|
|
726
|
+
interface SpeakResult extends VoiceCallResult {
|
|
727
|
+
voice?: string;
|
|
728
|
+
tier?: VoiceTier;
|
|
729
|
+
/** Characters the line was billed for. */
|
|
730
|
+
characters?: number;
|
|
731
|
+
/** Length of the audio that was made. */
|
|
732
|
+
durationMs?: number;
|
|
733
|
+
/** Every piece of PCM that arrived, joined — on a cut stream too. */
|
|
734
|
+
audio: Uint8Array;
|
|
735
|
+
sampleRate: number;
|
|
736
|
+
channels: number;
|
|
737
|
+
/** `audio` as a WAV file, to keep or hand to an `<audio>` element. */
|
|
738
|
+
wav(): Blob;
|
|
739
|
+
}
|
|
740
|
+
/**
|
|
741
|
+
* The voices, tiers, models, limits and estimated prices this stand serves,
|
|
742
|
+
* or `{ enabled: false }` where the game cannot use voice: a stand without
|
|
743
|
+
* it, a page where budget calls are refused (local test mode without the
|
|
744
|
+
* practice helper, the app, an untrusted frame, no player) or any failure.
|
|
745
|
+
* Never throws. Cast from it: voices and tiers are never typed from memory.
|
|
746
|
+
*/
|
|
747
|
+
declare function getVoiceCatalog(): Promise<RuntimeVoiceCatalog | {
|
|
748
|
+
enabled: false;
|
|
749
|
+
}>;
|
|
750
|
+
/**
|
|
751
|
+
* The words in one recording. No popup, no user gesture — the player approved
|
|
752
|
+
* the budget once — and every guard a budget call has. The recording is sent
|
|
753
|
+
* to the budget's transcription provider and not kept. Resolves, never
|
|
754
|
+
* throws: a refusal is `failed` with the server's code.
|
|
755
|
+
*/
|
|
756
|
+
declare function transcribe(options: TranscribeOptions): Promise<TranscribeResult>;
|
|
757
|
+
/**
|
|
758
|
+
* Say one line in a voice of the catalog, streamed as it is made: `onAudio`
|
|
759
|
+
* receives the PCM in order, and the result carries all of it (`audio`,
|
|
760
|
+
* `wav()`). No popup and no user gesture, and every guard a budget call has.
|
|
761
|
+
* A stream that ends without its last event resolves `unknown` with
|
|
762
|
+
* `provider_outcome_unknown` and the audio that arrived: the call settles on
|
|
763
|
+
* the server either way. To play lines back to back, use createSpeaker().
|
|
764
|
+
*/
|
|
765
|
+
declare function speak(options: SpeakOptions): Promise<SpeakResult>;
|
|
766
|
+
|
|
767
|
+
/**
|
|
768
|
+
* The browser half of voice: a push-to-talk recorder whose WAV transcribe()
|
|
769
|
+
* takes, and a speaker that plays speak()'s lines back to back with no gaps.
|
|
770
|
+
*
|
|
771
|
+
* This module is imported in Node like the rest of the SDK, so every touch of
|
|
772
|
+
* the microphone, the DOM or Web Audio stays inside a function. The arithmetic
|
|
773
|
+
* (resampling, sentences) is pure and exported for tests only.
|
|
774
|
+
*/
|
|
775
|
+
|
|
776
|
+
/** How createVoiceRecorder() records. */
|
|
777
|
+
interface VoiceRecorderOptions {
|
|
778
|
+
/** The longest recording: it stops itself there. Default 30, at most 60. */
|
|
779
|
+
maxSeconds?: number;
|
|
780
|
+
/** The microphone's loudness, 0..1, about twenty times a second — for a meter. */
|
|
781
|
+
onLevel?(level: number): void;
|
|
782
|
+
/** A microphone of `navigator.mediaDevices.enumerateDevices()`; the default one otherwise. */
|
|
783
|
+
deviceId?: string;
|
|
784
|
+
}
|
|
785
|
+
/** A push-to-talk recorder: start on press, stop on release. */
|
|
786
|
+
interface VoiceRecorder {
|
|
787
|
+
/** Ask for the microphone and start recording. Call it from the player's
|
|
788
|
+
* press. Rejects with `code` `microphone_denied` or `microphone_unavailable`. */
|
|
789
|
+
start(): Promise<void>;
|
|
790
|
+
/** The recording as an `audio/wav` Blob for transcribe(). After a recording
|
|
791
|
+
* stopped itself at `maxSeconds`, that one. Rejects `not_recording` otherwise. */
|
|
792
|
+
stop(): Promise<Blob>;
|
|
793
|
+
/** Throw the recording away. */
|
|
794
|
+
cancel(): void;
|
|
795
|
+
readonly recording: boolean;
|
|
796
|
+
}
|
|
797
|
+
/**
|
|
798
|
+
* Push-to-talk recording for transcribe(): `start()` on press, `stop()` on
|
|
799
|
+
* release. Captures mono, resamples to 16 kHz and resolves a WAV Blob. The
|
|
800
|
+
* microphone and the audio graph are let go on stop, cancel and the
|
|
801
|
+
* `maxSeconds` cut-off. On the game's Genex page the build must declare the
|
|
802
|
+
* microphone (`"genex": { "capabilities": ["microphone"] }` in package.json).
|
|
803
|
+
*/
|
|
804
|
+
declare function createVoiceRecorder(options?: VoiceRecorderOptions): VoiceRecorder;
|
|
805
|
+
/** One line a speaker says: its text and its place in the queue, from 0. */
|
|
806
|
+
interface SpeakerLine {
|
|
807
|
+
text: string;
|
|
808
|
+
index: number;
|
|
809
|
+
}
|
|
810
|
+
/** Who a speaker's lines are spoken by, and on which budget. */
|
|
811
|
+
interface SpeakerOptions {
|
|
812
|
+
/** A standing budget approved with `voice: { speech: … }`. */
|
|
813
|
+
grantId: string;
|
|
814
|
+
/** A voice id of getVoiceCatalog(). */
|
|
815
|
+
voice: string;
|
|
816
|
+
tier?: VoiceTier;
|
|
817
|
+
style?: string;
|
|
818
|
+
language?: string;
|
|
819
|
+
/** A line starts playing: show its subtitle. */
|
|
820
|
+
onLineStart?(line: SpeakerLine): void;
|
|
821
|
+
/** A line finished playing, or failed (`grant_limit_reached`, `voice_busy`, …)
|
|
822
|
+
* or was stopped: every line queued ends here, in order. */
|
|
823
|
+
onLineEnd?(line: SpeakerLine & {
|
|
824
|
+
status: string;
|
|
825
|
+
error?: string;
|
|
826
|
+
}): void;
|
|
827
|
+
/** Characters in one call: pass the catalog's `limits.speech.maxCharacters`. Longer lines are split. */
|
|
828
|
+
maxCharacters?: number;
|
|
829
|
+
}
|
|
830
|
+
/** A queue of spoken lines that plays them back to back. */
|
|
831
|
+
interface Speaker {
|
|
832
|
+
/** Queue one line; resolves once it has played (or failed). A line split
|
|
833
|
+
* into several calls resolves with the first that did not succeed, else the last. */
|
|
834
|
+
say(text: string): Promise<SpeakResult>;
|
|
835
|
+
/** Streamed text (a model's `onDelta`): each sentence is queued as it closes. */
|
|
836
|
+
feed(delta: string): void;
|
|
837
|
+
/** Queue what feed() still holds; resolves when everything queued has played. */
|
|
838
|
+
end(): Promise<void>;
|
|
839
|
+
/** Silence at once: the line being made is let go and the queue is dropped. */
|
|
840
|
+
stop(): void;
|
|
841
|
+
readonly speaking: boolean;
|
|
842
|
+
}
|
|
843
|
+
/**
|
|
844
|
+
* Speak a game's lines one after another with no gaps between them, or a
|
|
845
|
+
* model's streamed reply as it arrives: `feed()` each delta and `end()` it.
|
|
846
|
+
* Each line is one speak() call under the budget, made while the line before
|
|
847
|
+
* it plays. Create the speaker, or call `say()`, from a click or a key press:
|
|
848
|
+
* browsers start audio only after the player has interacted with the page.
|
|
849
|
+
* A line refused only because the budget or the stand is busy is asked again
|
|
850
|
+
* after a short pause; one that still fails is reported through `onLineEnd`
|
|
851
|
+
* and the queue moves on.
|
|
852
|
+
*/
|
|
853
|
+
declare function createSpeaker(options: SpeakerOptions): Speaker;
|
|
854
|
+
|
|
547
855
|
/** How a platform call ended: done, or not done and the one reason why. */
|
|
548
856
|
type PlatformOutcome = {
|
|
549
857
|
ok: true;
|
|
@@ -1198,4 +1506,4 @@ declare function __resetForTests(overrides?: {
|
|
|
1198
1506
|
platformConfirmTimeoutMs?: number;
|
|
1199
1507
|
}): void;
|
|
1200
1508
|
|
|
1201
|
-
export { type AppendEventResult, type AuthState, type AuthorityRegion, type DeleteSharedResult, type EmbedConfig, type EmbedEntry, type EmbedEvent, type EmbedShell, type EmbedUser, type Entitlement, type GenerateOptions, type GenerateStreamOptions, type HapticKind, ItemState, type JudgeOptions, type JudgeResult, type Leaderboard, type LeaderboardEntry, type PaymentOptions, type PaymentPage, type PaymentReceipt, type PaymentResult, type PaymentStatus, type PlatformError, type PlatformFeature, type PlatformOutcome, type PlayerStateResult, type PurchaseResult, type PurchaseStatus, type PutSharedResult, type RequestWorkflowOptions, RuntimeGenerationBilling, RuntimeGenerationFunding, RuntimeGenerationModels, type RuntimeGenerationResult, RuntimeGenerationView, RuntimeGrantView, RuntimeJudgeAnswer, RuntimeJudgeQuestion, RuntimeJudgmentView, type RuntimeWorkflowAuthorization, RuntimeWorkflowInput, RuntimeWorkflowOfferings, type SaveStateResult, type ShareOptions, type ShareResult, type SharedEventPage, type SharedEventRecord, type SharedObject, type SharedObjectInfo, type SharedPage, type ShopItem, type SpendGrantDisclosure, type SpendGrantOptions, type SpendGrantResult, type SubmitScoreResult, type WorldStateResult, __resetForTests, _stashTicketFromUrl, appendEvent, buy, consumeEntitlement, copyText, deleteShared, generate, generateStream, generationErrorMessage, getActiveSpendGrant, getAuthState, getAuthorityHome, getAuthorityRegions, getAuthorityUrls, getColyseusAuth, getColyseusUrls, getEmbedToken, getEntitlements, getEntry, getGeneration, getGenerationModels, getLeaderboard, getPayment, getPayments, getShared, getShell, getShop, getSpendGrant, getUser, getWorkflowOfferings, haptic, initEmbed, isEmbedded, judge, keepAwake, listEvents, listShared, loadPlayerState, loadWorldState, on, onShellClosing, openExternal, putShared, requestPayment, requestSpendGrant, requestWorkflow, resumeWorkflow, saveFile, savePlayerState, saveWorldState, setFullscreen, share, stopSpendGrant, submitScore, supports, waitForAuth, waitForGeneration, waitForPlayer };
|
|
1509
|
+
export { type AppendEventResult, type AuthState, type AuthorityRegion, type DeleteSharedResult, type EmbedConfig, type EmbedEntry, type EmbedEvent, type EmbedShell, type EmbedUser, type Entitlement, type GenerateOptions, type GenerateStreamOptions, type HapticKind, ItemState, type JudgeOptions, type JudgeResult, type Leaderboard, type LeaderboardEntry, type PaymentOptions, type PaymentPage, type PaymentReceipt, type PaymentResult, type PaymentStatus, type PlatformError, type PlatformFeature, type PlatformOutcome, type PlayerStateResult, type PurchaseResult, type PurchaseStatus, type PutSharedResult, type RequestWorkflowOptions, RuntimeGenerationBilling, RuntimeGenerationFunding, RuntimeGenerationModels, type RuntimeGenerationResult, RuntimeGenerationView, RuntimeGrantView, RuntimeGrantVoiceRequest, RuntimeJudgeAnswer, RuntimeJudgeQuestion, RuntimeJudgmentView, RuntimeMessage, RuntimeRoomLendView, RuntimeVoiceBilling, RuntimeVoiceCatalog, type RuntimeWorkflowAuthorization, RuntimeWorkflowInput, RuntimeWorkflowOfferings, type SaveStateResult, type ShareOptions, type ShareResult, type SharedEventPage, type SharedEventRecord, type SharedObject, type SharedObjectInfo, type SharedPage, type ShopItem, type SpeakOptions, type SpeakResult, type Speaker, type SpeakerLine, type SpeakerOptions, type SpendGrantDisclosure, type SpendGrantOptions, type SpendGrantResult, type SponsoredGrantOptions, type SubmitScoreResult, type TranscribeOptions, type TranscribeResult, type VoiceCallResult, type VoiceRecorder, type VoiceRecorderOptions, VoiceTier, type WorldStateResult, __resetForTests, _stashTicketFromUrl, appendEvent, buy, consumeEntitlement, copyText, createSpeaker, createVoiceRecorder, deleteShared, foldGenerationRequest, generate, generateStream, generationErrorMessage, getActiveSpendGrant, getAuthState, getAuthorityHome, getAuthorityRegions, getAuthorityUrls, getColyseusAuth, getColyseusUrls, getEmbedToken, getEntitlements, getEntry, getGeneration, getGenerationModels, getLeaderboard, getPayment, getPayments, getShared, getShell, getShop, getSpendGrant, getUser, getVoiceCatalog, getWorkflowOfferings, haptic, initEmbed, isEmbedded, judge, keepAwake, lendSpendGrantToRoom, listEvents, listShared, loadPlayerState, loadWorldState, on, onShellClosing, openExternal, putShared, requestPayment, requestSpendGrant, requestWorkflow, resumeWorkflow, returnSpendGrantFromRoom, saveFile, savePlayerState, saveWorldState, setFullscreen, share, speak, stopSpendGrant, submitScore, supports, transcribe, waitForAuth, waitForGeneration, waitForPlayer };
|