@genex-ai/cli-demo 1.31.1 → 1.32.0-dev.650

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.
Files changed (46) hide show
  1. package/README.md +18 -0
  2. package/dist/blender-mcp-Q6PSFYSE.js +241 -0
  3. package/dist/blender-serve-BF4FZ55Z.js +244 -0
  4. package/dist/chunk-2COG4P3T.js +968 -0
  5. package/dist/chunk-HYCSNWYX.js +126 -0
  6. package/dist/index.js +4759 -2830
  7. package/package.json +3 -3
  8. package/templates/blender-service/demo/castle.py +117 -0
  9. package/templates/blender-service/gpu_witness.py +245 -0
  10. package/templates/blender-service/ops.py +225 -0
  11. package/templates/blender-service/pool.py +910 -0
  12. package/templates/blender-service/server.py +611 -0
  13. package/templates/blender-service/supervisor.py +221 -0
  14. package/templates/blender-service/views.py +281 -0
  15. package/templates/controllers/character/follow-camera.ts +16 -1
  16. package/templates/controllers/character/meshy/meshy-loader.ts +3 -2
  17. package/templates/controllers/quality/deadline.ts +117 -0
  18. package/templates/controllers/quality/pick-asset.ts +49 -16
  19. package/templates/controllers/shared/physics-world.ts +6 -4
  20. package/templates/skills/genex-ai-character/SKILL.md +77 -15
  21. package/templates/skills/genex-ai-menu/SKILL.md +15 -11
  22. package/templates/skills/genex-ai-model/SKILL.md +45 -7
  23. package/templates/skills/genex-ai-texture/SKILL.md +1 -1
  24. package/templates/skills/genex-ai-video/SKILL.md +75 -17
  25. package/templates/skills/genex-blender-scene/SKILL.md +243 -0
  26. package/templates/skills/genex-game-director/SKILL.md +112 -46
  27. package/templates/skills/genex-game-director/references/design-contract.md +13 -5
  28. package/templates/skills/genex-game-director/references/routing-map.md +30 -45
  29. package/templates/skills/genex-getting-started/SKILL.md +2 -2
  30. package/templates/skills/genex-lane-card/SKILL.md +78 -0
  31. package/templates/skills/genex-threejs-adaptive-quality/SKILL.md +21 -0
  32. package/templates/skills/genex-threejs-character-controller/SKILL.md +17 -5
  33. package/templates/skills/genex-threejs-creatures/SKILL.md +8 -1
  34. package/templates/skills/genex-threejs-embed-auth/SKILL.md +8 -0
  35. package/templates/skills/genex-threejs-game-ui/SKILL.md +55 -6
  36. package/templates/skills/genex-threejs-procedural-assets/SKILL.md +17 -10
  37. package/templates/skills/genex-threejs-visual-validation/SKILL.md +12 -2
  38. package/templates/skills/genex-tool-audio/SKILL.md +3 -2
  39. package/templates/skills/genex-tool-character/SKILL.md +36 -5
  40. package/templates/skills/genex-tool-image/SKILL.md +4 -2
  41. package/templates/skills/genex-tool-model/SKILL.md +32 -6
  42. package/templates/skills/genex-tool-publish/SKILL.md +100 -0
  43. package/templates/skills/genex-tool-texture/SKILL.md +1 -1
  44. package/templates/skills/genex-tool-video/SKILL.md +28 -5
  45. package/templates/skills/genex-tool-workflow/SKILL.md +4 -1
  46. package/templates/skills/genex-updates/SKILL.md +1 -1
@@ -0,0 +1,100 @@
1
+ ---
2
+ name: genex-tool-publish
3
+ description: Put the game in this folder on the web with Genex — the draft page, `npx genex preview`, then `promote` / `publish`; the link you hand the user, the size limits, and what to do with the preflight lines. Installed once the folder is connected to a hosted Genex game (`npx genex init --convert`). Load it before the first preview.
4
+ ---
5
+
6
+ # Genex Tools · Publish
7
+
8
+ The user built this game themselves and asked for it online. Your job is to
9
+ put it there **as it is** — the code, the structure and the assets stay
10
+ exactly what they are. Publishing adds glue and nothing else; it never starts
11
+ a rework, a design document or a build plan.
12
+
13
+ ## The glue (all of it)
14
+
15
+ 1. **A static build.** The game must build to files with its own build
16
+ command — `npm run build` into `dist/`, or an `index.html` at the root
17
+ with no build step. Asset paths must work from the game's own hosted URL,
18
+ so prefer relative ones (Vite: `base: './'`). Files the game loads at
19
+ runtime — everything in `./assets` — must end up inside the build (Vite:
20
+ a `public/` folder, or copy `assets/` into `dist/` in the build).
21
+ 2. **Player identity.** Load `$genex-threejs-embed-auth` and add the one
22
+ `initEmbed(...)` call at the very top of the boot code. Create the
23
+ renderer and draw a frame BEFORE any `await waitForPlayer()` — on a hosted
24
+ page identity takes seconds, and a game that awaits it first ships black.
25
+ 3. **The CLI as a dev dependency** so plain `npx genex` keeps resolving here
26
+ (setup already did this; check `package.json` if in doubt).
27
+
28
+ Commit the glue as its own small commit when the folder is a git repo, so the
29
+ line between the user's game and what publishing added stays visible.
30
+
31
+ ## Preview
32
+
33
+ ```bash
34
+ npx genex preview
35
+ ```
36
+
37
+ Builds, uploads and puts the build on the game's **draft page** — unlisted,
38
+ only the user can open it. When it reports live, open the hosted build once
39
+ yourself and confirm it loads with no missing files (the dev server forgives
40
+ paths the hosted build will not), then hand over the link.
41
+
42
+ **The link is always the game's page on Genex, never the raw play address,
43
+ never localhost, never a file path:**
44
+
45
+ - draft: `<dashboard>/draft/<slug>`
46
+ - public, once published: `<dashboard>/world/<slug>`
47
+
48
+ `<dashboard>` is the first `dashboardOrigins` entry in `.genex/project.json`
49
+ and `<slug>` is the `slug` there. `preview` prints the exact page link as
50
+ "your game's page" — use that line verbatim.
51
+
52
+ ## The preflight is a report, not a to-do list
53
+
54
+ `preview` prints warning lines before it uploads — an estimated phone GPU
55
+ budget, a music track with no volume slider, a paid asset nobody wired, a
56
+ viewport meta line. None of them blocks the deploy, and none of them was
57
+ asked for. So: **ship first**, hand over the link, then relay each line to
58
+ the user in one plain sentence with an offer ("phones will struggle with the
59
+ textures — want me to shrink them?"). Fix one only on the user's yes. Never
60
+ turn the report into a milestone before the link.
61
+
62
+ ## Draft and public version
63
+
64
+ `preview` updates the **draft** and never touches what players are on. The
65
+ first release lists the game:
66
+
67
+ ```bash
68
+ npx genex publish --categories games
69
+ ```
70
+
71
+ Pick 1–3 categories that fit (`games`, `assets`, `physics`, `terrain`,
72
+ `lighting`, `vfx`); `games` when unsure. Ask before the first publish — "This
73
+ is a private draft only you can open. Say the word and I'll publish it for
74
+ anyone to play." — and celebrate the public page link when it lands.
75
+
76
+ After that first release the game is two versions, and the user only ever
77
+ hears these two words for them: the **draft** (updated by `preview`) and the
78
+ **public version** (what everyone plays). "Publish it", "update it" and "yes"
79
+ after the first release ALL mean:
80
+
81
+ ```bash
82
+ npx genex promote # the exact draft build goes public — no rebuild
83
+ ```
84
+
85
+ Never run `publish` a second time (it would ship an untried rebuild). If
86
+ anything changed since the last `preview`, preview again before promoting.
87
+ Ask once per round of work, in one line, and keep working while you wait.
88
+
89
+ ## Limits and refusals
90
+
91
+ - **Upload size**: ~95 MB per file, ~500 MB in total. Over that, tell the user
92
+ plainly which part is too large (usually a video, model or audio file) and by
93
+ roughly how much; ask before compressing or removing anything.
94
+ - **Terms refusal**: the CLI prints a link, waits for the user's click and
95
+ re-sends by itself — hand the link over and let it finish.
96
+ - **`preview` says the folder is behind another machine** (`stale_source`):
97
+ `npx genex pull` takes the newer draft, then redo the change — never
98
+ `--force` over somebody else's work.
99
+ - **Out of credits or a lane down**: `npx genex doctor` says which; publishing
100
+ itself costs nothing.
@@ -39,7 +39,7 @@ repeat — the file names carry the role, so the mapping is unambiguous.
39
39
 
40
40
  ## Cost
41
41
 
42
- Typical: **3 credits** for the whole set the cheapest lane. Live prices and
42
+ From **5 credits** for the whole set (1 credit = $0.01). Live prices and
43
43
  your balance: `npx genex doctor`.
44
44
 
45
45
  ## Waiting
@@ -18,6 +18,10 @@ npx genex video "candle flame flickering in the dark" --loop
18
18
  Blocks until ready, saves the mp4 into `./assets`, and prints the path. Wire the
19
19
  local path — a shipped build must never fetch the URL at runtime.
20
20
 
21
+ Every clip carries a **native stereo audio track** (score, foley, ambience).
22
+ Browsers only autoplay muted video, so keep the `<video>` element muted unless
23
+ the sound is the point — and route it through your game's volume control.
24
+
21
25
  ## Animating a still
22
26
 
23
27
  The strongest results come from conditioning on an image you already approved,
@@ -29,13 +33,30 @@ npx genex video "camera drifts slowly forward, banners stirring" --frame ./asset
29
33
  ```
30
34
 
31
35
  - `--frame <path|url>` — animate FROM this frame back to itself, i.e. a seamless loop. Local file (≤ 4 MB) or a previous generation's URL.
32
- - `--first-frame <url>` / `--last-frame <url>`a two-frame motion between them.
36
+ - `--start-frame <path|url>` continue from this frame, no end anchor the clip-chaining primitive.
37
+ - `--first-frame <path|url>` / `--last-frame <path|url>` — a two-frame motion between them. All frame anchors take local files.
38
+
39
+ Frame anchors are **compositional guidance, not pixel-pinning** — the model
40
+ repaints the frame (same scene and composition, not the same pixels), and
41
+ regenerating doesn't change that. Chained clips (a cutscene sequence, a
42
+ branching video story) stay coherent when each clip starts from the previous
43
+ clip's REAL last frame, so drift never accumulates:
44
+
45
+ ```bash
46
+ ffmpeg -sseof -0.2 -i ./assets/prev.mp4 -update 1 -q:v 1 last.png
47
+ npx genex video "she turns and walks toward the far door" --start-frame last.png
48
+ ```
49
+
50
+ Write chained prompts as CHANGE ONLY — the start frame already says everything
51
+ else. Cut clip-to-clip, or crossfade ~200 ms to hide the residual repaint.
33
52
 
34
53
  ## Options
35
54
 
36
- - `--duration <sec>` — target clip length.
55
+ - `--duration <sec>` — target clip length, 5–15 seconds (default 5; clips bill
56
+ per second).
37
57
  - `--loop` — a seamless loop.
38
- - `--resolution <720p|1080p>` — default 1080p. `720p` halves the cost, for clips where fidelity genuinely does not matter. Loop clips ignore it.
58
+ - `--resolution <480p|768p|2k|4k>` — default 768p (the top native mode). `2k`/`4k` upscale the same base at ~2–3× the cost; `480p` is the opt-down for clips where fidelity genuinely does not matter. Loop clips ignore it.
59
+ - `--ref <path|url>` — repeatable, up to 9 subject/style reference images, cited in the prompt as "Image 1"…"Image N" — the way one character or art style holds across many clips. Cannot combine with `--frame`/`--loop`.
39
60
  - `--open` — also open it in a browser, for something the user must approve.
40
61
  - `--out-dir <dir>` — where the file lands (default `./assets`).
41
62
  - `--no-download` — print the URL only.
@@ -43,8 +64,9 @@ npx genex video "camera drifts slowly forward, banners stirring" --frame ./asset
43
64
 
44
65
  ## Cost
45
66
 
46
- Typical: **20 credits** per video. Live prices and your balance:
47
- `npx genex doctor`.
67
+ From **23 credits** for a 5 s 768p clip (1 credit = $0.01); longer clips, 2K/4K
68
+ and `--frame` menu loops cost more, and the command prints the exact quote
69
+ before it waits. Live prices and your balance: `npx genex doctor`.
48
70
 
49
71
  ## Waiting
50
72
 
@@ -55,5 +77,6 @@ command bills a NEW clip** — it is never a way to check on one already running
55
77
  ## Troubleshooting
56
78
 
57
79
  - **It failed** — video fails server-side more often than any other lane, and every attempt is minutes. The CLI counts failures in this folder and tells you when to stop: after the second, use a still image instead and say so in one plain line. A third attempt bills the same and returns the same.
80
+ - **"Prompt rejected"** — the content-safety filter; never retryable with the same wording. The measured false-positive class is anatomy being pierced or entered (cables/wires/needles into a body — biomech vocabulary trips it). Describe the object or machine instead: "a statue-like figure threaded into the wall" passes where "cables entering her spine" fails.
58
81
  - **Out of credits** — the error prints balance, price and refill date. Relay it; don't retry.
59
82
  - **Anything else** — `npx genex doctor` reports sign-in, credits, and whether the video lane is live.
@@ -92,4 +92,7 @@ tiling floor and three paid assets nobody loaded.
92
92
  Hosting, publishing, multiplayer, remixing and custom domains are the Genex
93
93
  platform, not this toolkit — those commands are refused in this folder by
94
94
  design, and the refusal says where they live. This workspace generates assets
95
- for a game you build and ship yourself.
95
+ for a game you build and ship yourself. When the user wants that game live on
96
+ Genex with its own URL, the AGENTS.md rules say how to offer it; on a yes the
97
+ folder is connected to a hosted game in place — same cards, same rules — and
98
+ the `$genex-tool-publish` card arrives with the publishing commands.
@@ -38,7 +38,7 @@ update, so update immediately.)
38
38
  Run exactly the command the nudge printed, from the game project root:
39
39
 
40
40
  ```bash
41
- npm i -D @genex-ai/cli-demo@latest # the genex CLI (a dev dependency)
41
+ npm i -D @genex-ai/cli-demo@dev # the genex CLI (a dev dependency)
42
42
  npm i @genex-ai/embed-sdk@latest # identity/saves SDK (ships inside the game)
43
43
  npm i @genex-ai/multiplayer@latest # multiplayer SDK (only if the game uses it)
44
44
  ```