@genex-ai/cli-demo 1.27.1-dev.631 → 1.29.0-dev.633

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.
@@ -7,7 +7,7 @@ import {
7
7
  isRenderMode,
8
8
  sceneSummary,
9
9
  sheetOf
10
- } from "./chunk-I77A53C6.js";
10
+ } from "./chunk-KVWA6BLY.js";
11
11
  import {
12
12
  getCliVersion
13
13
  } from "./chunk-HYCSNWYX.js";
@@ -17,6 +17,22 @@ import fs from "fs/promises";
17
17
  import path from "path";
18
18
  import os from "os";
19
19
 
20
+ // src/lib/source-exclude.ts
21
+ var SOURCE_EXCLUDE = [
22
+ "node_modules/",
23
+ "dist/",
24
+ ".git/",
25
+ // Local project metadata, per-device by design.
26
+ ".genex/",
27
+ // Secrets — never publish them; `!` keeps the non-secret template.
28
+ ".env",
29
+ ".env.*",
30
+ "!.env.example"
31
+ ];
32
+ function excludeFile() {
33
+ return [...SOURCE_EXCLUDE, ""].join("\n");
34
+ }
35
+
20
36
  // src/utils/run.ts
21
37
  import { spawn } from "child_process";
22
38
  var WIN_SHELL_COMMANDS = /* @__PURE__ */ new Set(["npm", "npx"]);
@@ -91,10 +107,7 @@ async function sourceTreeHash(cwd) {
91
107
  const base = { GIT_DIR: gitDir };
92
108
  try {
93
109
  if ((await run("git", ["init", "-q"], base)).code !== 0) return null;
94
- await fs.writeFile(
95
- path.join(gitDir, "info", "exclude"),
96
- ["node_modules/", "dist/", ".git/", ".genex/", ".env", ".env.*", "!.env.example", ""].join("\n")
97
- );
110
+ await fs.writeFile(path.join(gitDir, "info", "exclude"), excludeFile());
98
111
  if ((await run("git", ["lfs", "version"], base)).code === 0) {
99
112
  const filters = [
100
113
  ["filter.lfs.clean", "git-lfs clean -- %f"],
@@ -620,9 +633,12 @@ async function readProject(cwd = process.cwd()) {
620
633
  return null;
621
634
  }
622
635
  }
636
+ var SCRATCH_DIR = ".genex/scratch";
623
637
  async function writeProject(meta, cwd = process.cwd()) {
624
638
  const file = getProjectMetadataPath(cwd);
625
639
  await fs3.mkdir(path3.dirname(file), { recursive: true });
640
+ await fs3.mkdir(path3.join(cwd, SCRATCH_DIR), { recursive: true }).catch(() => {
641
+ });
626
642
  await fs3.writeFile(file, JSON.stringify(meta, null, 2) + "\n", { mode: 384 });
627
643
  await fs3.chmod(file, 384).catch(() => {
628
644
  });
@@ -895,6 +911,7 @@ async function releaseCliSeat(opts) {
895
911
  }
896
912
 
897
913
  export {
914
+ excludeFile,
898
915
  run,
899
916
  readRemoteSource,
900
917
  isStale,
package/dist/index.js CHANGED
@@ -12,6 +12,7 @@ import {
12
12
  blenderEndpoint,
13
13
  blenderSetupHint,
14
14
  cloneSource,
15
+ excludeFile,
15
16
  fetchCloneGrant,
16
17
  fetchSignedInEmail,
17
18
  inHostedSession,
@@ -41,7 +42,7 @@ import {
41
42
  writeProject,
42
43
  writeUserToken,
43
44
  writeWorkspace
44
- } from "./chunk-I77A53C6.js";
45
+ } from "./chunk-KVWA6BLY.js";
45
46
  import {
46
47
  CLI_CHANNEL,
47
48
  DEFAULT_API_URL,
@@ -870,6 +871,7 @@ Important note: put soul into your creations, with many details and love. Aim to
870
871
  20. When the player names a specific thing to integrate \u2014 a library, a controller, an asset, a part of an existing game, or a tagged reference the platform placed in \`.genex/refs/<slug>/\` \u2014 integrate the real thing: read its source first and build from it, never a lighter look-alike written from scratch because it was faster. A tagged reference owns the subsystem it was tagged for, outranking the default lane and the vendored controllers for that subsystem. If you genuinely can't use it, say so in one plain line and ask how to proceed.
871
872
  21. A turn ends in exactly one of two ways: on a question the player must answer before the next step can be chosen, or on a handoff \u2014 the draft link, what changed, what to try, and what is still open. Never close a turn on a promise. "I'll keep building", "while I keep working", "adding that now" are things you say and then DO before you stop; if you are stopping, say that you have stopped and what remains. While the Build plan's \`Now:\` line has open work and no answer is needed from the player, the turn is not over: preview, hand off, and start the next milestone in the same turn, until the requested outcome is reached or the platform's own budget ends the session. If a stop was forced on you anyway, the first line of your next turn is the promise you left and where it stands.
872
873
  22. **What the player sees must read as the thing it is**, in this game's own style: a building as that building, a person as a person, a prop as that prop, a surface as its material \u2014 and a coloured box, a capsule, or a flat grey block standing in for one of them is never its finished version. Generation is the default route to that bar wherever code will not honestly reach it: the player's character, whatever the request names, whatever the player walks up to, enters, or interacts with, and the music and sound underneath \u2014 reach for the belt on your own judgment, without stopping to ask; a status line saying what you queued is enough, and \`--no-wait\` keeps you building while it lands. Procedural code is a first-class engine for what is structural, repeated, distant, or parametric \u2014 terrain, sky, fences, paving, modular kits, filler \u2014 and for anything else only when the result meets the same bar and you have looked at it in a capture before its row says \`landed\`. Decide per object, not per category, and write the route on each Assets row in \`DESIGN.md\` \u2014 the paid flow for generated pieces, the procedural flow with its local path for code-built ones. An Assets table with no generation in it is a decision, not a default: record it as \`Generation: none \u2014 <why code alone reaches the bar here>\` or generate.
874
+ 23. **The screenshots you take to look at your own work go in \`.genex/scratch/\`.** Captures, render comparisons, before/after strips, traces and metrics dumps are how you SEE what you built \u2014 they are not part of what you built, and \`genex preview\` pushes the whole folder to the game's source, every time, forever. \`.genex/scratch/\` already exists for this and is already ignored, so there is nothing to set up: write the capture as \`.genex/scratch/arena-before.png\` and read it back from there. Never put them in a folder of your own at the top level: \`progress/\`, \`reports/\`, \`shots/\` and their kind are pushed like source and become permanent weight in the game and in every remix of it \u2014 one real game reached 11 GB and 10,332 committed screenshots exactly this way. If you find such a folder already there, add it to \`.gitignore\`; never delete the player's files (law 18).
873
875
  ${CONTRACT_END}
874
876
  `;
875
877
  var TOOLS_CONTRACT_HEAD = `# Genex Tools (always in effect in this folder)
@@ -5391,11 +5393,7 @@ async function pushWorktree(cwd, pushUrl, managed, log, branch = "main", onCommi
5391
5393
  };
5392
5394
  try {
5393
5395
  if ((await run("git", ["init", "-q"], base)).code !== 0) return failed();
5394
- await fs16.writeFile(
5395
- path15.join(gitDir, "info", "exclude"),
5396
- // .env* are secrets — never publish them; `!` keeps the non-secret template.
5397
- ["node_modules/", "dist/", ".git/", ".genex/", ".env", ".env.*", "!.env.example", ""].join("\n")
5398
- );
5396
+ await fs16.writeFile(path15.join(gitDir, "info", "exclude"), excludeFile());
5399
5397
  const env = { ...base, GIT_WORK_TREE: cwd, GIT_INDEX_FILE: path15.join(gitDir, "index-source") };
5400
5398
  let lfs = (await run("git", ["lfs", "version"], base)).code !== 0 ? false : true;
5401
5399
  if (!lfs) {
@@ -22011,7 +22009,7 @@ async function runBlender(opts) {
22011
22009
  return serveLocalBlender({ port, log });
22012
22010
  }
22013
22011
  if (sub === "mcp") {
22014
- const { runBlenderMcp } = await import("./blender-mcp-DPH5PIVX.js");
22012
+ const { runBlenderMcp } = await import("./blender-mcp-5JSAV6XI.js");
22015
22013
  return runBlenderMcp();
22016
22014
  }
22017
22015
  if (sub === "seat") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@genex-ai/cli-demo",
3
- "version": "1.27.1-dev.631",
3
+ "version": "1.29.0-dev.633",
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": {