@genex-ai/cli-demo 1.14.3-dev.576 → 1.15.0-dev.577

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-TFRTQ37H.js";
10
+ } from "./chunk-YSX7SJFM.js";
11
11
  import {
12
12
  getCliVersion
13
13
  } from "./chunk-HYCSNWYX.js";
@@ -11,9 +11,15 @@ import {
11
11
  // src/lib/api.ts
12
12
  var CLI_VERSION_HEADER = "x-genex-cli-version";
13
13
  var WORKSPACE_HEADER = "x-genex-workspace";
14
+ function workspaceHeaderValue(label) {
15
+ if (label === null) return null;
16
+ if (label === "tools") return "tools";
17
+ const slug = label.game.trim();
18
+ return slug ? `game:${slug}` : null;
19
+ }
14
20
  var workspaceLabel = null;
15
21
  function setWorkspaceHeader(label) {
16
- workspaceLabel = label;
22
+ workspaceLabel = workspaceHeaderValue(label);
17
23
  }
18
24
  function formatUpdateRequired(body) {
19
25
  const action = body.action ?? `npm i -D @genex-ai/cli-demo@${CLI_CHANNEL}`;
package/dist/index.js CHANGED
@@ -22,7 +22,7 @@ import {
22
22
  writeProject,
23
23
  writeUserToken,
24
24
  writeWorkspace
25
- } from "./chunk-TFRTQ37H.js";
25
+ } from "./chunk-YSX7SJFM.js";
26
26
  import {
27
27
  CLI_CHANNEL,
28
28
  DEFAULT_API_URL,
@@ -873,10 +873,22 @@ import os4 from "os";
873
873
  import path4 from "path";
874
874
 
875
875
  // src/lib/workspace.ts
876
- async function workspaceMode(cwd = process.cwd()) {
877
- if (await readProject(cwd)) return "game";
876
+ async function resolveWorkspace(cwd = process.cwd()) {
877
+ const project = await readProject(cwd);
878
+ if (project) {
879
+ const slug = typeof project.slug === "string" && project.slug.trim() ? project.slug.trim() : null;
880
+ return { mode: "game", slug };
881
+ }
878
882
  const ws = await readWorkspace(cwd);
879
- return ws?.mode === "tools" ? "tools" : null;
883
+ return { mode: ws?.mode === "tools" ? "tools" : null, slug: null };
884
+ }
885
+ async function workspaceMode(cwd = process.cwd()) {
886
+ return (await resolveWorkspace(cwd)).mode;
887
+ }
888
+ function workspaceHeaderLabel(ws) {
889
+ if (ws.mode === "tools") return "tools";
890
+ if (ws.mode === "game" && ws.slug) return { game: ws.slug };
891
+ return null;
880
892
  }
881
893
  var REFUSED_IN_TOOLS = /* @__PURE__ */ new Set([
882
894
  "link",
@@ -20665,7 +20677,7 @@ async function runBlender(opts) {
20665
20677
  return serveLocalBlender({ port, log });
20666
20678
  }
20667
20679
  if (sub === "mcp") {
20668
- const { runBlenderMcp } = await import("./blender-mcp-6GQRUQWF.js");
20680
+ const { runBlenderMcp } = await import("./blender-mcp-5NBIVBE6.js");
20669
20681
  return runBlenderMcp();
20670
20682
  }
20671
20683
  let base = blenderEndpoint();
@@ -22825,8 +22837,9 @@ async function main() {
22825
22837
  log.plain(getCliVersion());
22826
22838
  return;
22827
22839
  }
22828
- const mode = await workspaceMode();
22829
- setWorkspaceHeader(mode === "tools" ? "tools" : null);
22840
+ const workspace = await resolveWorkspace();
22841
+ const mode = workspace.mode;
22842
+ setWorkspaceHeader(workspaceHeaderLabel(workspace));
22830
22843
  if (parsed.help || parsed.command === void 0) {
22831
22844
  const perCommand = parsed.command === void 0 ? void 0 : COMMAND_HELP[parsed.command];
22832
22845
  log.plain(perCommand ?? (mode === "tools" ? HELP_TOOLS : HELP));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@genex-ai/cli-demo",
3
- "version": "1.14.3-dev.576",
3
+ "version": "1.15.0-dev.577",
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": {