@genex-ai/embed-sdk 0.21.1 → 0.22.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.
- package/README.md +17 -10
- package/dist/{chunk-CKFZQ7AP.js → chunk-PXHBV67S.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/sentry.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -47,7 +47,7 @@ trusted Genex parent to show its modal. Native WebViews and local-test identity
|
|
|
47
47
|
return `native_unsupported` and `local_test_unsupported` until they have supported
|
|
48
48
|
confirmation surfaces.
|
|
49
49
|
|
|
50
|
-
`GenerateOptions` requires `estimateCoins` (an integer from
|
|
50
|
+
`GenerateOptions` requires `estimateCoins` (an integer from 1 to 1,000,000 for an API-backed selection), `modelId`, `prompt`, `outputFormat: 'text' | 'json'`,
|
|
51
51
|
optional bounded `schema`, `allowExternal` (default false), `idempotencyKey` and
|
|
52
52
|
`timeoutMs` (default ten minutes). Reuse an idempotency key only for the same
|
|
53
53
|
operation; store it if you need retries to survive a reload. Only models returned
|
|
@@ -75,8 +75,10 @@ the frozen request before approval. New public quotes carry
|
|
|
75
75
|
is the developer-declared **fixed price of a started attempt**: declaring 5 coins
|
|
76
76
|
charges 5 even when actual usage would cost 2. Failure, cancellation or reaching
|
|
77
77
|
the budget limit after work starts also charges the full price; a usable result
|
|
78
|
-
is not guaranteed. No model work means zero charge
|
|
79
|
-
|
|
78
|
+
is not guaranteed. No model work means zero charge; an unsuccessful attempt with
|
|
79
|
+
verified zero model cost is also uncharged. Every Genex API model
|
|
80
|
+
requires a positive price, including Gemini and GLM. Personal funding chosen in
|
|
81
|
+
the trusted approval modal remains zero coin.
|
|
80
82
|
|
|
81
83
|
The provider hard budget is derived from that price after the frozen platform
|
|
82
84
|
tariff, then capped by operator limits. Output is clipped to remaining funding;
|
|
@@ -85,6 +87,9 @@ keeps billing pending and the reservation held until verified. The trusted UI
|
|
|
85
87
|
must acknowledge the quote's exact `billingPolicy` at confirmation; an old UI
|
|
86
88
|
cannot approve new terms. Previously issued `consumed-v1` quotes keep actual-
|
|
87
89
|
usage billing and quotes without a policy keep their original promise.
|
|
90
|
+
Already-approved zero-price API requests retain their saved terms. An old
|
|
91
|
+
unconfirmed zero-price API quote needs a fresh price review before coin approval;
|
|
92
|
+
never silently replace its price or start a paid request during recovery.
|
|
88
93
|
|
|
89
94
|
With `allowExternal: true`, Genex can offer the configured personal plan matching
|
|
90
95
|
the selected model alongside coins: Claude for `anthropic/` models, ChatGPT for
|
|
@@ -115,7 +120,7 @@ import { getWorkflowOfferings, requestWorkflow, getEmbedToken } from '@genex-ai/
|
|
|
115
120
|
|
|
116
121
|
// Load from this game's registered workflow before enabling the model picker.
|
|
117
122
|
const catalog = await getWorkflowOfferings(configuredWorkflowId);
|
|
118
|
-
// Public offerings contain API/model rows
|
|
123
|
+
// Public offerings contain paid API/model rows.
|
|
119
124
|
// Personal plan funding is offered only by the trusted Genex approval modal.
|
|
120
125
|
// Keep the complete selected offering: availability, funding, model and prices.
|
|
121
126
|
renderModelPicker(catalog.offerings);
|
|
@@ -179,9 +184,11 @@ Legacy quotes without `billingPolicy` retain their original fixed-price and
|
|
|
179
184
|
refund terms. Never replace a saved quote's policy with the current catalog's
|
|
180
185
|
policy, infer a missing multiplier, or reprice an approved operation.
|
|
181
186
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
187
|
+
All API-backed Genex offerings are paid, including `google/gemini-3.8-flash` and
|
|
188
|
+
`z-ai/glm-5.3-flash`. Airena's free access to those models is game-funded through
|
|
189
|
+
its own direct OpenRouter path, outside the Genex runtime API.
|
|
190
|
+
Personal Claude/ChatGPT funding choices in the Genex approval modal cost
|
|
191
|
+
**0 coins** and use the player's own account through Genex-owned
|
|
185
192
|
MCP connectors. Claude uses `/player/mcp`; ChatGPT uses `/player/chatgpt/mcp`.
|
|
186
193
|
ChatGPT connector availability depends on account and workspace policy. One
|
|
187
194
|
external request may be active per player across both providers. Follow the
|
|
@@ -191,7 +198,7 @@ Submitted results remain user-supplied; the executor must validate them before
|
|
|
191
198
|
delivery. Both APIs restrict personal funding to the selected model's provider.
|
|
192
199
|
|
|
193
200
|
These workflow endpoints still require signed-in production play, including
|
|
194
|
-
|
|
201
|
+
personal funding. Airena's sponsored direct guest path is separate;
|
|
195
202
|
do not weaken the workflow's player/session checks to reproduce it.
|
|
196
203
|
|
|
197
204
|
The [runtime API contract](../../CLI_INTEGRATION.md#10-player-funded-runtime-generation)
|
|
@@ -209,8 +216,8 @@ the subpath is disabled for browser resolution and rejects browser execution.
|
|
|
209
216
|
|
|
210
217
|
`maxCoins` is an explicit positive maximum from your own wallet. Development
|
|
211
218
|
uses `consumed-v1`: actual model usage at the frozen normal tariff, including
|
|
212
|
-
failed usage, up to that maximum.
|
|
213
|
-
|
|
219
|
+
failed usage, up to that maximum. Gemini/GLM models use this normal paid tariff
|
|
220
|
+
too. Actual zero cost is zero coin;
|
|
214
221
|
unknown expense remains held. No personal or paid fallback occurs.
|
|
215
222
|
|
|
216
223
|
```ts
|
|
@@ -298,7 +298,7 @@ var RETRY_FLAG = "genex:embed:retry";
|
|
|
298
298
|
var POPOVER_DISMISSED_FLAG = "genex:guest:popover-dismissed";
|
|
299
299
|
var LOCAL_AUTH_FLAG = "genex:embed:local-auth";
|
|
300
300
|
var PLAYER_ID_KEY = "genex:player";
|
|
301
|
-
var SDK_VERSION = "0.
|
|
301
|
+
var SDK_VERSION = "0.22.1";
|
|
302
302
|
var config2 = null;
|
|
303
303
|
var state = "pending";
|
|
304
304
|
var user = null;
|
package/dist/index.js
CHANGED
package/dist/sentry.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genex-ai/embed-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.1",
|
|
4
4
|
"description": "Player identity + durable game state for genex games — signed-in or guest play, per-player save slots, shared world state, and soft-trust leaderboards.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|