@genex-ai/cli-demo 1.31.0 → 1.31.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@genex-ai/cli-demo",
3
- "version": "1.31.0",
3
+ "version": "1.31.2",
4
4
  "description": "Set up your project's agent workspace (.claude/.codex/.cursor in the game folder), authorize, create a game project, generate AI assets, and publish (genex CLI).",
5
5
  "type": "module",
6
6
  "bin": {
@@ -323,12 +323,14 @@ generateButton.addEventListener('click', async () => {
323
323
 
324
324
  Call `generate()` before any await in the click handler. The SDK opens Genex's
325
325
  trusted modal or popup, showing the game, frozen request, fixed attempt price and
326
- USD equivalent. `estimateCoins` is required (integer 0..1,000,000); the player
326
+ USD equivalent. `estimateCoins` is required (integer 1..1,000,000 for API-backed selections); the player
327
327
  approves this fixed amount and the game cannot confirm. New `declared-v1`
328
328
  quotes charge the full price once model work starts, even if usage costs less,
329
329
  generation fails, is canceled, or reaches its budget limit before a usable result.
330
- Fixed 5 charges 5 even if actual usage would bill 2. No model work means zero;
331
- zero is accepted only for server-authorized free or personal options. Unknown
330
+ Fixed 5 charges 5 even if actual usage would bill 2. No model work means zero; an
331
+ unsuccessful attempt with verified zero model cost is also uncharged.
332
+ Every Genex API model requires a positive price, including Gemini and GLM;
333
+ personal funding in the Genex modal remains zero coin. Unknown
332
334
  provider expense keeps billing pending and its hold intact. The provider budget
333
335
  fits inside these coins after the frozen platform tariff. This
334
336
  compute price is independent of the shop's item grid and pays no developer share.
@@ -338,9 +340,12 @@ text/JSON data, not meshes or images. Validate the data before using it and neve
338
340
  execute generated code. Creature appearance or narrative may vary; keep gameplay
339
341
  stats and rewards governed by game rules rather than a paid random rarity roll.
340
342
 
341
- `allowExternal: true` offers configured personal Claude/ChatGPT options beside
342
- coins on the same quote. Each uses the player's own account and plan limits for
343
- zero coin, with no paid fallback. Genex freezes the choices and gives connector
343
+ `allowExternal: true` offers the configured personal plan matching the selected
344
+ model beside coins: Claude for Claude models, ChatGPT for ChatGPT models, and
345
+ neither for other model families. The choice belongs only in the trusted Genex approval modal;
346
+ never add a "Your Plan" row to the game's model picker. Each uses the player's
347
+ own account and plan limits for zero coin, with no paid fallback. Genex freezes
348
+ the matching choices and gives connector
344
349
  instructions; never collect subscription tokens. `source: 'external'` and
345
350
  `modelProvenance: 'unverified'` mean user-supplied output, not proof of a model
346
351
  or authority for rewards. Omit `allowExternal` to disable optional personal choices.
@@ -413,13 +418,19 @@ Previously issued `consumed-v1` quotes keep their actual-usage billing and
413
418
  untagged quotes keep original success/refund terms. Never substitute a current
414
419
  catalog policy for a saved quote. `resumeWorkflow(generationId)` reopens a
415
420
  saved approval from a click using GET only, with no new price or operation.
421
+ Already-approved zero-price API requests retain their terms. An old unconfirmed
422
+ zero-price API quote needs a fresh price review before coin approval; never
423
+ silently reprice it or launch paid work during recovery.
416
424
  The trusted UI sends the exact policy acknowledgement. Backend validation and
417
425
  staging remain required before delivery; the browser cannot submit costs or
418
426
  settle a bill.
419
427
 
420
- The designated `google/gemini-3.8-flash` and `z-ai/glm-5.3-flash` offerings
421
- and personal Claude/ChatGPT offerings are **0 coins**. Do not infer free status
422
- from a low price or a client flag. Personal options use the player's own account
428
+ The public workflow catalog contains paid API/model rows, including
429
+ `google/gemini-3.8-flash` and `z-ai/glm-5.3-flash`. Airena sponsors those models
430
+ through its own direct OpenRouter path, outside the Genex runtime API.
431
+ Personal Claude/ChatGPT funding in the Genex modal costs **0 coins**, but is
432
+ not an in-game model option. Do not infer a free API tariff from a low price or a
433
+ client flag. Personal choices use the player's own account
423
434
  through the provider-specific connector shown by Genex: `/player/mcp` for Claude,
424
435
  `/player/chatgpt/mcp` for ChatGPT. Account/plan limits apply; ChatGPT connector
425
436
  availability also depends on workspace policy. Genex gives the stage-by-stage
@@ -427,13 +438,14 @@ instructions and keeps them open when the SDK returns approval. One external
427
438
  request may be active per player. Never collect subscription tokens, use the
428
439
  creator's subscription on a player's behalf, or silently switch to paid API
429
440
  work. Outputs remain user-supplied and must pass the registered backend's
430
- validation before delivery. Generic and workflow `allowExternal` can offer both configured providers.
441
+ validation before delivery. Both APIs restrict personal funding to the selected
442
+ model's provider; already-approved personal requests keep their connector for recovery.
431
443
 
432
444
  Persist the exact input, offering, idempotency key and generation ID through
433
445
  sign-in, cancellation and reload; never store the embed token. Recovery reads
434
446
  existing state and never auto-charges. A changed input or expired quote requires
435
447
  a new intentional request. The Genex workflow API requires signed-in production
436
- play even for zero-coin offerings. Keep a game's separately sponsored free guest
448
+ play even for personal funding. Keep Airena's separately sponsored direct guest
437
449
  path separate; do not weaken Genex's paid or session checks.
438
450
 
439
451
  ### Calibrate before choosing the public fixed price
@@ -444,8 +456,8 @@ maxCoins, request: { modelId, prompt, outputFormat, schema?, idempotencyKey? } }
444
456
  The full creator credential spends only your own wallet; never put it in a game,
445
457
  Vite environment or logs. No play token is needed. The browser export is blocked.
446
458
  Development bills actual usage under `consumed-v1`, including failed work,
447
- within your explicit maximum. A maximum 5 may charge 2. Public-sponsored API
448
- models are developer-paid at the normal tariff in this lane; personal-only
459
+ within your explicit maximum. A maximum 5 may charge 2. Every API model is
460
+ developer-paid at the normal tariff in this lane; personal-only
449
461
  options are rejected. Inspect the authoritative charged coins/USD and `usage`
450
462
  cost/unknown-exposure receipt before choosing the public fixed `estimateCoins`.
451
463
 
@@ -159,8 +159,10 @@ Runtime generation (SDK 0.21.0+, signed-in production play, default-off service)
159
159
  - Required `estimateCoins` is the fixed price of a started attempt, despite its
160
160
  name: fixed 5 charges 5 even if usage would cost 2. New `declared-v1` quotes
161
161
  charge that full price on failure, cancellation or a budget limit after work
162
- starts. No model work is zero; a usable result is not guaranteed. Zero is
163
- accepted only when the server allows a free or personal-only option.
162
+ starts. No model work is zero; an unsuccessful attempt with verified zero model
163
+ cost is also uncharged. A usable result is not guaranteed. Every API
164
+ model requires a positive price, including Gemini and GLM. Personal funding
165
+ selected in the trusted Genex modal remains zero coin.
164
166
  - `getGeneration(id)` reads the private player/game-scoped receipt;
165
167
  `waitForGeneration(id)` waits for execution. A timeout does not cancel.
166
168
  Keep reading while billing is pending; unknown expense retains the hold and
@@ -171,6 +173,8 @@ Registered workflows require an existing trusted, operator-registered executor:
171
173
  - `getWorkflowOfferings(workflowId)` supplies model, bundle, availability,
172
174
  suggested prices and frozen operator tariff. Calibrate the game's fixed price
173
175
  with development benchmarks, then show coin and USD beside the selected option.
176
+ Its public offerings contain paid API/model rows;
177
+ personal plan funding appears only in the trusted Genex approval modal.
174
178
  - `requestWorkflow({ workflowId, offeringId, input, estimateCoins, allowExternal?,
175
179
  idempotencyKey?, timeoutMs? })` returns **approval**, not completion. Call from
176
180
  the click, then send its generation ID, exact input and fresh `getEmbedToken()`
@@ -179,14 +183,19 @@ Registered workflows require an existing trusted, operator-registered executor:
179
183
  reloads. Never persist the token or auto-charge on boot. Use
180
184
  `resumeWorkflow(generationId)` from a click to reopen saved approval through
181
185
  GET only, preserving pre-0.21 quotes without a replacement price.
186
+ Already-approved zero-price API requests retain their terms; an old unconfirmed
187
+ zero-price API quote needs a fresh price review before coin approval.
182
188
  - The server derives the hard model budget from the fixed price after its tariff.
183
189
  Only the selected model runs. The trusted executor validates staged artifacts;
184
190
  the browser cannot submit costs, settle a bill or claim delivery.
185
191
 
186
- Both APIs with `allowExternal: true` can offer the quote's configured personal
187
- Claude/ChatGPT choices alongside coins. Each costs zero, uses that player's own
188
- plan limits and never falls back to paid work. Personal-only offerings cannot
189
- become free coin execution. Submitted results are `source: 'external'` and
192
+ Both APIs with `allowExternal: true` can offer a configured personal plan beside
193
+ coins: Claude for Claude models, ChatGPT for ChatGPT models, and neither for
194
+ other model families. Keep this choice in the trusted Genex approval modal; never
195
+ render a "Your Plan" entry in the game's model picker. Each costs zero, uses that
196
+ player's own plan limits and never falls back to paid work. Approved personal
197
+ requests retain their connector for recovery; historical personal-only offerings
198
+ cannot become free coin execution. Submitted results are `source: 'external'` and
190
199
  `modelProvenance: 'unverified'`; never treat them as authority for rewards.
191
200
  Genex handles connector setup; games never collect subscription credentials.
192
201
 
@@ -194,7 +203,7 @@ For calibration, server-only `@genex-ai/embed-sdk/development` uses your full
194
203
  creator bearer credential, owned project and explicit `maxCoins` to benchmark
195
204
  actual usage against your own wallet, with no production-play token. It uses
196
205
  `consumed-v1`, including failed work, and returns charged coins, output and
197
- actual/unknown provider cost. Public-sponsored API models are paid at the normal
206
+ actual/unknown provider cost. All API models are paid at the normal
198
207
  tariff here; personal-only options are refused. Never bundle a creator credential
199
208
  or expose it through Vite variables. Read `$genex-monetization` for generic and
200
209
  registered-workflow examples. Native WebViews and local-test player identity