@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 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 0 to 1,000,000), `modelId`, `prompt`, `outputFormat: 'text' | 'json'`,
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. Zero is accepted only for a
79
- server-authorized free or personal-only option.
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, including sponsored free models.
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
- The designated `google/gemini-3.8-flash` and `z-ai/glm-5.3-flash` offerings
183
- cost **0 coins**. Personal Claude/ChatGPT funding choices in the Genex approval
184
- modal also cost **0 coins** and use the player's own account through Genex-owned
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
- zero-coin offerings. Airena's existing sponsored free guest path is separate;
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. Public-sponsored Gemini/GLM models also use
213
- this normal paid tariff when benchmarking. Actual zero cost is zero coin;
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.21.1";
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
@@ -28,7 +28,7 @@ import {
28
28
  waitForAuth,
29
29
  waitForGeneration,
30
30
  waitForPlayer
31
- } from "./chunk-CKFZQ7AP.js";
31
+ } from "./chunk-PXHBV67S.js";
32
32
  import "./chunk-Q476GJHI.js";
33
33
  export {
34
34
  __resetForTests,
package/dist/sentry.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  _stashTicketFromUrl,
3
3
  getUser,
4
4
  on
5
- } from "./chunk-CKFZQ7AP.js";
5
+ } from "./chunk-PXHBV67S.js";
6
6
  import "./chunk-Q476GJHI.js";
7
7
 
8
8
  // src/sentry.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@genex-ai/embed-sdk",
3
- "version": "0.21.1",
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",