@genex-ai/cli-demo 1.13.1-dev.558 → 1.14.0-dev.560
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/{blender-mcp-LLN4FPA4.js → blender-mcp-3U5AG7WS.js} +3 -3
- package/dist/{chunk-WXHTNSFB.js → chunk-2UJK5OCB.js} +17 -9
- package/dist/index.js +327 -155
- package/package.json +1 -1
- package/templates/skills/genex-ai-model/SKILL.md +11 -7
- package/templates/skills/genex-blender-scene/SKILL.md +222 -0
- package/templates/skills/genex-game-director/SKILL.md +81 -38
- package/templates/skills/genex-game-director/references/design-contract.md +13 -5
- package/templates/skills/genex-game-director/references/routing-map.md +16 -45
- package/templates/skills/genex-threejs-procedural-assets/SKILL.md +17 -10
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
|
-
BLENDER_SETUP_HINT,
|
|
3
2
|
SHEET_FORMATS,
|
|
4
3
|
acquireSeat,
|
|
5
4
|
blenderCall,
|
|
6
5
|
blenderEndpoint,
|
|
6
|
+
blenderSetupHint,
|
|
7
7
|
isRenderMode,
|
|
8
8
|
sceneSummary,
|
|
9
9
|
sheetOf
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-2UJK5OCB.js";
|
|
11
11
|
import {
|
|
12
12
|
getCliVersion
|
|
13
13
|
} from "./chunk-HYCSNWYX.js";
|
|
@@ -178,7 +178,7 @@ async function handle(msg) {
|
|
|
178
178
|
if (!tool) return fail(id, -32602, `Unknown tool: ${name}`);
|
|
179
179
|
const base = await mcpEndpoint();
|
|
180
180
|
if (!base) {
|
|
181
|
-
return reply(id, { content: [{ type: "text", text:
|
|
181
|
+
return reply(id, { content: [{ type: "text", text: blenderSetupHint() }], isError: true });
|
|
182
182
|
}
|
|
183
183
|
try {
|
|
184
184
|
return reply(id, await tool.run(args, base));
|
|
@@ -124,13 +124,20 @@ function blenderEndpoint() {
|
|
|
124
124
|
const raw = process.env.GENEX_BLENDER_URL?.trim();
|
|
125
125
|
return raw ? raw.replace(/\/+$/, "") : void 0;
|
|
126
126
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
127
|
+
function blenderSetupHint() {
|
|
128
|
+
if (process.env.GENEX_HOSTED_SESSION === "1") {
|
|
129
|
+
return [
|
|
130
|
+
"The Blender lane is off on this stand \u2014 there is no seat to acquire.",
|
|
131
|
+
" Build the space in code instead ($genex-threejs-procedural-assets); do not wait for it."
|
|
132
|
+
].join("\n");
|
|
133
|
+
}
|
|
134
|
+
return [
|
|
135
|
+
"No Blender endpoint. Run the service against your own Blender in another terminal:",
|
|
136
|
+
" npx genex blender serve",
|
|
137
|
+
" export GENEX_BLENDER_URL=http://localhost:8088",
|
|
138
|
+
" GENEX_BLENDER_URL may also point at any running genex-blender service."
|
|
139
|
+
].join("\n");
|
|
140
|
+
}
|
|
134
141
|
var SHEET_FORMATS = ["webp", "png"];
|
|
135
142
|
function sheetOf(r) {
|
|
136
143
|
if (r.contactSheet?.b64) return { b64: r.contactSheet.b64, mime: r.contactSheet.mime };
|
|
@@ -198,7 +205,8 @@ async function blenderCall(base, route, body) {
|
|
|
198
205
|
seat ? `${route} refused the seat token (401) \u2014 the seat may have been closed; run the command again to acquire a new one` : `${route} refused the request (401) \u2014 set GENEX_BLENDER_SECRET to the service's secret`
|
|
199
206
|
);
|
|
200
207
|
}
|
|
201
|
-
|
|
208
|
+
const detail = typeof json.detail === "string" ? ` \u2014 ${json.detail}` : "";
|
|
209
|
+
throw new Error(`${route} failed (${res.status}): ${json.error ?? text.slice(0, 200)}${detail}`);
|
|
202
210
|
}
|
|
203
211
|
return json;
|
|
204
212
|
} catch (err) {
|
|
@@ -431,7 +439,7 @@ export {
|
|
|
431
439
|
RENDER_MODES,
|
|
432
440
|
isRenderMode,
|
|
433
441
|
blenderEndpoint,
|
|
434
|
-
|
|
442
|
+
blenderSetupHint,
|
|
435
443
|
SHEET_FORMATS,
|
|
436
444
|
sheetOf,
|
|
437
445
|
sheetExt,
|