@genex-ai/cli-demo 1.0.0-dev.305 → 1.2.0-dev.314

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/dist/index.js CHANGED
@@ -4258,7 +4258,7 @@ async function deployGame(ctx, opts, log) {
4258
4258
  log.error("Couldn't upload your game \u2014 please try again.");
4259
4259
  return false;
4260
4260
  }
4261
- if (!await pushSource(cwd, ctx, log)) return false;
4261
+ if (!await pushSource(cwd, ctx, log, opts.channel === "staging" ? "preview" : "main")) return false;
4262
4262
  log.step("Publishing\u2026");
4263
4263
  const published = await callPublish(ctx, commit, opts, log);
4264
4264
  if (!published) return false;
@@ -4499,21 +4499,22 @@ async function callPublish(ctx, commit, opts, log) {
4499
4499
  }
4500
4500
  return { url: body?.url ?? "" };
4501
4501
  }
4502
- async function pushSource(cwd, ctx, log) {
4502
+ async function pushSource(cwd, ctx, log, branch = "main") {
4503
4503
  const target = await fetchPushUrl(ctx, log);
4504
4504
  if (!target) return false;
4505
- if (await pushWorktree(cwd, target.pushUrl, target.managed, log)) return true;
4505
+ const ref = target.managed ? branch : "main";
4506
+ if (await pushWorktree(cwd, target.pushUrl, target.managed, log, ref)) return true;
4506
4507
  if (!target.managed) return false;
4507
4508
  log.info("Retrying the source push\u2026");
4508
4509
  await new Promise((r) => setTimeout(r, 2e3));
4509
4510
  const fresh = await fetchPushUrl(ctx, log);
4510
4511
  if (!fresh) return false;
4511
- return pushWorktree(cwd, fresh.pushUrl, fresh.managed, log);
4512
+ return pushWorktree(cwd, fresh.pushUrl, fresh.managed, log, ref);
4512
4513
  }
4513
4514
  function urlHasEmbeddedCredentials(pushUrl) {
4514
4515
  return /^[a-z][a-z0-9+.-]*:\/\/[^/@]+@/i.test(pushUrl);
4515
4516
  }
4516
- async function pushWorktree(cwd, pushUrl, managed, log) {
4517
+ async function pushWorktree(cwd, pushUrl, managed, log, branch = "main") {
4517
4518
  const EMPTY_TREE = "4b825dc642cb6eb9a060e54bf8d69288fbee4904";
4518
4519
  const failed = () => {
4519
4520
  log.error("Couldn't save your game's source \u2014 please try again.");
@@ -4576,7 +4577,7 @@ async function pushWorktree(cwd, pushUrl, managed, log) {
4576
4577
  }
4577
4578
  const push = await run(
4578
4579
  "git",
4579
- ["-c", "http.postBuffer=536870912", "push", "-q", pushUrl, "+refs/heads/main:main"],
4580
+ ["-c", "http.postBuffer=536870912", "push", "-q", pushUrl, `+refs/heads/main:${branch}`],
4580
4581
  base
4581
4582
  );
4582
4583
  if (push.code === 0) return true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@genex-ai/cli-demo",
3
- "version": "1.0.0-dev.305",
3
+ "version": "1.2.0-dev.314",
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": {
@@ -35,8 +35,8 @@ hosting, or deploy skills. **They are not Genex lanes.** All generated art,
35
35
  audio, video, characters, and UI come from `genex` commands unless the player
36
36
  explicitly asks for another tool by name. A local reference image is not a
37
37
  reason to switch tools: `genex image --edit` and `--inpaint` accept local
38
- paths. Building, previewing, and publishing use `genex preview` /
39
- `genex publish`; do not load a competing hosting workflow.
38
+ paths. Building, previewing, promoting and publishing use `genex preview` /
39
+ `genex promote` / `genex publish`; do not load a competing hosting workflow.
40
40
 
41
41
  ## 2. Route the latest request
42
42
 
@@ -107,8 +107,11 @@ already serves a **standard placeholder world** — the owner's avatar in a smal
107
107
  playground, unrelated to your code. It is NOT in your repo; never treat it as a
108
108
  starting point or try to modify it. Your first `preview` replaces it automatically.
109
109
 
110
- `npx genex preview` deploys to your unlisted draft URL; `npx genex publish`
111
- lists the game in the public gallery. When publishing, pick 1–3 gallery
110
+ `npx genex preview` deploys to your preview URL and **never touches the build
111
+ players are on**; `npx genex promote` makes that exact build live for them (no
112
+ rebuild). `npx genex publish` does build + make-live + lists the game in the
113
+ public gallery, for the first release. So: preview, show the player, and promote
114
+ once they are happy — don't promote every milestone by reflex. When publishing, pick 1–3 gallery
112
115
  categories from what you actually built — `games`, `assets`, `physics`,
113
116
  `terrain`, `lighting`, `vfx` — and pass them comma-separated:
114
117
 
@@ -53,8 +53,8 @@ translation may be normalized for Rapier.
53
53
  For plain game tasks — nothing from the procedural/visual-system pack loaded —
54
54
  this is the whole acceptance gate, and it is also the *ceiling*: a smoke check,
55
55
  not a certification. Run it ONCE per milestone, against that milestone's
56
- `genex preview` build the player may already be walking around it while
57
- you check. Catch obvious
56
+ `genex preview` build. That build is on the preview URL, not the one players
57
+ are on, so checking it disturbs nobody. Catch obvious
58
58
  breakage, fix what's clearly broken, and hand the feel/polish judgment to the
59
59
  player — don't loop re-testing the same build, don't re-test after cosmetic
60
60
  tweaks (sounds, colors, tuning values), and don't try to exercise every button