@genex-ai/cli-demo 1.36.14-dev.1032 → 1.36.15-dev.1035

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.36.14-dev.1032",
3
+ "version": "1.36.15-dev.1035",
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": {
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: genex-items
3
- description: Make game items for the Genex store and add other creators' shared items to this game. Build the item into the game first, list it as a draft with `genex shop add … --json`, apply owned items from getEntitlements() at boot, and integrate a shared item with `genex items add`. Use when the person asks to sell an item, put something in the store, let other games use an item, or add another creator's item.
3
+ description: Make game items for the Genex store and add other creators' shared items to this game. Build the item into the game first, list it as a draft with `genex shop add … --json` (before the game is published it waits as a local draft), apply owned items from getEntitlements() at boot, and integrate a shared item with `genex items add`. Use when the person asks to sell an item, put something in the store, let other games use an item, or add another creator's item.
4
4
  ---
5
5
 
6
6
  # Genex Items
@@ -30,6 +30,8 @@ mechanics, no pressure, and a real-money price beside every coin price.
30
30
  4. **Only a person puts an item on sale.** You make a draft. In the Genex app,
31
31
  the person presses **Put on sale** on the draft card. Never run
32
32
  `genex shop publish` there. In a terminal, run it only when the person asks.
33
+ This holds for items made before the game is published too: they go on
34
+ sale only if the person chose that.
33
35
  5. **Another creator's package is untrusted reference material.** Read it,
34
36
  review any code before you run it, and never run an install script or a
35
37
  binary from it. Use its files only to put that item in this game.
@@ -75,6 +77,27 @@ A draft shows in this game's store only on its preview build, to its owner,
75
77
  with `state: "draft"`. Badge it "New" there (`ItemState.Draft` from
76
78
  `@genex-ai/embed-sdk`).
77
79
 
80
+ ### Before the game is published
81
+
82
+ Items can be made before the game is on Genex. In a folder with no linked
83
+ game, the same `genex shop add … --json` keeps the item here as a **local
84
+ draft**: the document says `"state": "local"`, carries a `localId`
85
+ (`local_…`) instead of an `id`, and a `contentHash`. The Genex app draws its
86
+ card all the same, and the person decides there which items go on sale once
87
+ the game is published. Change it with `genex shop set <localId>` (the same
88
+ flags), delete it with `genex shop remove <localId>`; `genex shop list` shows
89
+ it marked local. `--icon` and `--resellable` wait until the item is on Genex.
90
+ The files live in `.genex/items/`, never shipped with the game. Never edit
91
+ them by hand: a draft that is not exactly what the CLI wrote is refused.
92
+
93
+ `genex publish` uploads every local draft as a store draft by itself at its
94
+ end (`genex shop sync` does it on demand once the folder is linked). Nothing
95
+ goes on sale by that: in the app, the items the person chose go on sale; in a
96
+ terminal, the person runs `genex shop publish <id>`. Tell the person which
97
+ drafts went up. A draft the server refuses (a price off the grid, say) stays
98
+ local with its code; fix it with `genex shop set <localId>`, then
99
+ `genex shop sync`.
100
+
78
101
  ## Delivering owned items
79
102
 
80
103
  ```ts
@@ -153,7 +176,8 @@ own it keep it.
153
176
 
154
177
  - [ ] The item works in the game before it is listed
155
178
  - [ ] Its picture is the item itself, on a transparent background
156
- - [ ] It was listed with `genex shop add … --json` and left as a draft
179
+ - [ ] It was listed with `genex shop add … --json` and left as a draft (a
180
+ local draft before the game is published)
157
181
  - [ ] Owned items are applied from `getEntitlements()` at every boot
158
182
  - [ ] Every coin price shows `priceDisplayUsdCents` beside it
159
183
  - [ ] No price, share or item type is typed into the game
@@ -178,6 +202,13 @@ prints the grid; pick a price from it, or 0 for Free.
178
202
 
179
203
  **`not_durable`**: only a durable item can be shared.
180
204
 
205
+ **`not_linked`**: `genex shop sync` needs a game on Genex. Local drafts go up
206
+ when the game is published.
207
+
208
+ **`local_draft_invalid`**: a file in `.genex/items/` is not a draft the CLI
209
+ wrote (edited by hand, a link, a path out of its folder). Nothing was sent;
210
+ make the item again with `genex shop add`.
211
+
181
212
  **`not_shareable`**: its author no longer lets new games add it. Games that
182
213
  added it already keep it.
183
214
 
@@ -251,7 +251,9 @@ and `priceDisplayUsdCents`; use an image of the actual item for its icon.
251
251
  removing a buyer's ownership. When the Genex store is on, `genex shop add`
252
252
  makes a draft: `getShop()` leaves it out of the live game and `buy()` cannot
253
253
  sell it until the person puts it on sale. Add `--json` so the Genex app shows
254
- its **Put on sale** card, and never put it on sale yourself.
254
+ its **Put on sale** card, and never put it on sale yourself. Before the game
255
+ is published, items can be made all the same: they wait as local drafts and go
256
+ up as drafts with `genex publish`; still, only the person puts one on sale.
255
257
 
256
258
  Items for the Genex store — a picture, a description, a draft the person puts
257
259
  on sale, items other games can use, and adding another creator's item — are