@genex-ai/cli-demo 0.51.0-dev.110 → 0.51.0-dev.99
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
|
@@ -1652,13 +1652,7 @@ async function callPublish(ctx, commit, opts, log) {
|
|
|
1652
1652
|
async function pushSource(cwd, ctx, log) {
|
|
1653
1653
|
const target = await fetchPushUrl(ctx, log);
|
|
1654
1654
|
if (!target) return false;
|
|
1655
|
-
|
|
1656
|
-
if (!target.managed) return false;
|
|
1657
|
-
log.info("Retrying the source push\u2026");
|
|
1658
|
-
await new Promise((r) => setTimeout(r, 2e3));
|
|
1659
|
-
const fresh = await fetchPushUrl(ctx, log);
|
|
1660
|
-
if (!fresh) return false;
|
|
1661
|
-
return pushWorktree(cwd, fresh.pushUrl, fresh.managed, log);
|
|
1655
|
+
return pushWorktree(cwd, target.pushUrl, target.managed, log);
|
|
1662
1656
|
}
|
|
1663
1657
|
async function pushWorktree(cwd, pushUrl, managed, log) {
|
|
1664
1658
|
const EMPTY_TREE = "4b825dc642cb6eb9a060e54bf8d69288fbee4904";
|
|
@@ -2125,44 +2119,6 @@ async function runPreview(opts) {
|
|
|
2125
2119
|
}
|
|
2126
2120
|
}
|
|
2127
2121
|
|
|
2128
|
-
// src/lib/open.ts
|
|
2129
|
-
import { spawn as spawn4 } from "child_process";
|
|
2130
|
-
function tokenize(cmd) {
|
|
2131
|
-
return cmd.trim().split(/\s+/).filter(Boolean);
|
|
2132
|
-
}
|
|
2133
|
-
function openUrl(url) {
|
|
2134
|
-
let command;
|
|
2135
|
-
let args;
|
|
2136
|
-
const custom = (process.env.GENEX_BROWSER || process.env.BROWSER)?.trim();
|
|
2137
|
-
const customParts = custom ? tokenize(custom) : [];
|
|
2138
|
-
if (customParts.length > 0) {
|
|
2139
|
-
command = customParts[0];
|
|
2140
|
-
args = [...customParts.slice(1), url];
|
|
2141
|
-
} else {
|
|
2142
|
-
switch (process.platform) {
|
|
2143
|
-
case "darwin":
|
|
2144
|
-
command = "open";
|
|
2145
|
-
args = [url];
|
|
2146
|
-
break;
|
|
2147
|
-
case "win32":
|
|
2148
|
-
command = "cmd";
|
|
2149
|
-
args = ["/c", "start", "", url];
|
|
2150
|
-
break;
|
|
2151
|
-
default:
|
|
2152
|
-
command = "xdg-open";
|
|
2153
|
-
args = [url];
|
|
2154
|
-
break;
|
|
2155
|
-
}
|
|
2156
|
-
}
|
|
2157
|
-
try {
|
|
2158
|
-
const child = spawn4(command, args, { stdio: "ignore", detached: true });
|
|
2159
|
-
child.on("error", () => {
|
|
2160
|
-
});
|
|
2161
|
-
child.unref();
|
|
2162
|
-
} catch {
|
|
2163
|
-
}
|
|
2164
|
-
}
|
|
2165
|
-
|
|
2166
2122
|
// src/lib/sse.ts
|
|
2167
2123
|
async function* readSSE(body) {
|
|
2168
2124
|
const decoder = new TextDecoder();
|
|
@@ -2299,9 +2255,9 @@ async function runGenerate(kind, opts) {
|
|
|
2299
2255
|
log.dim(" (Re-running the generate command would start \u2014 and bill \u2014 a NEW generation.)");
|
|
2300
2256
|
return;
|
|
2301
2257
|
}
|
|
2302
|
-
await awaitAndReport(apiUrl, token, id, kind, log
|
|
2258
|
+
await awaitAndReport(apiUrl, token, id, kind, log);
|
|
2303
2259
|
}
|
|
2304
|
-
async function awaitAndReport(apiUrl, token, id, kind, log
|
|
2260
|
+
async function awaitAndReport(apiUrl, token, id, kind, log) {
|
|
2305
2261
|
log.step("Generating\u2026 (this can take up to a minute)");
|
|
2306
2262
|
const onProgress = (p) => log.dim(` ${p}%`);
|
|
2307
2263
|
const timeoutMs = waitTimeoutFor(kind);
|
|
@@ -2313,9 +2269,9 @@ async function awaitAndReport(apiUrl, token, id, kind, log, open = false) {
|
|
|
2313
2269
|
process.exitCode = 1;
|
|
2314
2270
|
return;
|
|
2315
2271
|
}
|
|
2316
|
-
await reportTerminal(kind, view, log
|
|
2272
|
+
await reportTerminal(kind, view, log);
|
|
2317
2273
|
}
|
|
2318
|
-
async function reportTerminal(kind, view, log
|
|
2274
|
+
async function reportTerminal(kind, view, log) {
|
|
2319
2275
|
if (view.status !== "completed") {
|
|
2320
2276
|
log.error(`Generation ${view.status}${view.error ? `: ${view.error}` : ""}.`);
|
|
2321
2277
|
process.exitCode = 1;
|
|
@@ -2334,14 +2290,6 @@ async function reportTerminal(kind, view, log, open = false) {
|
|
|
2334
2290
|
log.plain(` ${label}${f.url}`);
|
|
2335
2291
|
}
|
|
2336
2292
|
log.plain("");
|
|
2337
|
-
if (open && files[0]) {
|
|
2338
|
-
openUrl(files[0].url);
|
|
2339
|
-
log.plain(
|
|
2340
|
-
` ${c.bold("\u{1F441} Show this to the user")} \u2014 it just opened in their browser; paste this link in chat too so they can open it themselves:`
|
|
2341
|
-
);
|
|
2342
|
-
log.plain(` ${files[0].url}`);
|
|
2343
|
-
log.plain("");
|
|
2344
|
-
}
|
|
2345
2293
|
printHint(kind, files, log);
|
|
2346
2294
|
await firstPreviewNudge(log);
|
|
2347
2295
|
}
|
|
@@ -2492,10 +2440,10 @@ async function runWait(opts) {
|
|
|
2492
2440
|
log.dim(` ${kind} ${id}`);
|
|
2493
2441
|
log.plain("");
|
|
2494
2442
|
if (TERMINAL2.has(view.status)) {
|
|
2495
|
-
await reportTerminal(kind, view, log
|
|
2443
|
+
await reportTerminal(kind, view, log);
|
|
2496
2444
|
return;
|
|
2497
2445
|
}
|
|
2498
|
-
await awaitAndReport(apiUrl, token, id, kind, log
|
|
2446
|
+
await awaitAndReport(apiUrl, token, id, kind, log);
|
|
2499
2447
|
}
|
|
2500
2448
|
|
|
2501
2449
|
// src/commands/controller.ts
|
|
@@ -4100,8 +4048,6 @@ ${c.bold("Options for the generators (`model` `skybox` `sfx` `texture` `image` `
|
|
|
4100
4048
|
--terrain (texture) seamless tiling surface for terrain/ground.
|
|
4101
4049
|
--duration <sec> (sfx, video) target clip length in seconds.
|
|
4102
4050
|
--transparent (image) transparent background (alpha) \u2014 for decals/stickers.
|
|
4103
|
-
--open (image/video) open the finished asset in the user's browser +
|
|
4104
|
-
print a link \u2014 show them the concept frame / anything they approve.
|
|
4105
4051
|
--aspect <ratio> (image) aspect preset (e.g. square, landscape, portrait).
|
|
4106
4052
|
--quality <q> (image) quality preset: low | medium | high.
|
|
4107
4053
|
--candidates <n> (image) generate 2-4 variants in ONE call and print every
|
|
@@ -4286,9 +4232,6 @@ function parseArgs(argv) {
|
|
|
4286
4232
|
case "--no-wait":
|
|
4287
4233
|
parsed.options.noWait = true;
|
|
4288
4234
|
break;
|
|
4289
|
-
case "--open":
|
|
4290
|
-
parsed.options.open = true;
|
|
4291
|
-
break;
|
|
4292
4235
|
case "--terrain":
|
|
4293
4236
|
parsed.options.terrain = true;
|
|
4294
4237
|
break;
|
package/package.json
CHANGED
|
@@ -79,25 +79,13 @@ lap counter in a game without laps). `--aspect 16:9 --quality high
|
|
|
79
79
|
--no-wait`, enqueued FIRST of all art; the URL goes into the style-brief
|
|
80
80
|
comment.
|
|
81
81
|
|
|
82
|
-
**Share it before building on it
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
change something?" — with 2–3 concrete adjustment options. Keep building
|
|
90
|
-
gameplay-neutral work (scaffold, physics, netcode) while waiting, but do NOT
|
|
91
|
-
anchor further art to an unapproved frame. **Approval is a LOOP, not a
|
|
92
|
-
one-shot:** if the user dislikes ANYTHING, regenerate with their exact notes
|
|
93
|
-
(`--candidates 2–3` gives them options to choose from), open + link the new
|
|
94
|
-
frame, and ask again — repeat until they actually approve. Carry every note
|
|
95
|
-
forward so each round compounds; if two rounds don't converge, offer 2–3
|
|
96
|
-
distinct directions as a structured question instead of re-rolling blind. The
|
|
97
|
-
HUD mockup, the menu, and every downstream asset wait for a frame the user has
|
|
98
|
-
signed off — a single "meh" is never permission to move on. The same "open it +
|
|
99
|
-
paste the link" rule covers every image the user weighs in on — the menu still,
|
|
100
|
-
the HUD mockup candidates.
|
|
82
|
+
**Share it before building on it.** The moment the frame lands, show it to
|
|
83
|
+
the user — "this is roughly how the game will look: keep it, or change
|
|
84
|
+
something?" — as ONE structured question with 2–3 concrete adjustment
|
|
85
|
+
options. Keep building gameplay-neutral work (scaffold, physics, netcode)
|
|
86
|
+
while waiting, but do NOT anchor further art to an unapproved frame; if the
|
|
87
|
+
user redirects, regenerate with their notes before the HUD mockup and menu
|
|
88
|
+
frame go out.
|
|
101
89
|
|
|
102
90
|
**The concept anchors STYLE, not truth.** Palette, materials, light, and
|
|
103
91
|
register come from the frame; CONTENT comes from the game contract. When
|
|
@@ -67,13 +67,11 @@ direction in the same plan block — the camera rig + pointer bucket
|
|
|
67
67
|
(`$genex-threejs-camera-direction`), the renderer baseline (tone mapping,
|
|
68
68
|
exposure, output color space — set deliberately at boot; stock three.js
|
|
69
69
|
defaults are not a look, `$genex-threejs-exposure-color-grading`), the post
|
|
70
|
-
stack this game ships —
|
|
71
|
-
|
|
72
|
-
on
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
`$genex-threejs-image-pipeline` owns ordering when 2+ compose), one named
|
|
76
|
-
**ambient-motion loop** that keeps
|
|
70
|
+
stack this game ships (bloom/AO/grade — at least ONE built render-pass effect
|
|
71
|
+
for EVERY game, justified by the shared style brief; the UI vignette div or a
|
|
72
|
+
CSS filter on the canvas does not count, and a plan that "deliberately skips
|
|
73
|
+
everything" is the stock default, not a look; `$genex-threejs-image-pipeline`
|
|
74
|
+
owns ordering when 2+ compose), one named **ambient-motion loop** that keeps
|
|
77
75
|
the scene alive at rest (emissive pulse, shimmer, drifting dust — shader
|
|
78
76
|
work, zero generations), and the lighting/atmosphere mood from that
|
|
79
77
|
same brief. Planning is not building — effects still land last in the
|
|
@@ -41,19 +41,13 @@ Three.js release or branch, and do not blindly copy demo architecture.
|
|
|
41
41
|
- **renderer baseline**: tone mapping, exposure, and output color space set
|
|
42
42
|
deliberately at boot (`$genex-threejs-exposure-color-grading` owns the
|
|
43
43
|
staging — stock three.js defaults are not a look);
|
|
44
|
-
- **the post stack**:
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
calls for, each effect named and justified. ONE scene-serving render-pass
|
|
52
|
-
effect (bloom, AO, or a LUT/shader grade — a UI vignette div or a CSS
|
|
53
|
-
canvas filter does NOT count) is the FLOOR against "no post", never the
|
|
54
|
-
target: match the concept's richness, don't stop at one token pass. "No
|
|
55
|
-
post at all" is the stock default, not a plan, and "it's only a draft" is
|
|
56
|
-
not a lower floor. When 2+ effects compose, `$genex-threejs-image-pipeline`
|
|
44
|
+
- **the post stack**: which image effects THIS game ships (bloom? AO?
|
|
45
|
+
grade?) — each named and justified by the shared style brief. The floor
|
|
46
|
+
for EVERY game is the deliberate renderer baseline PLUS at least one
|
|
47
|
+
scene-serving render-pass effect (bloom, AO, or a LUT/shader grade — the
|
|
48
|
+
UI vignette div or a CSS filter on the canvas does not count); "no post
|
|
49
|
+
at all" is the stock default, not a plan, and "it's only a draft" is not
|
|
50
|
+
a lower floor. When 2+ effects compose, `$genex-threejs-image-pipeline`
|
|
57
51
|
owns the pass ordering;
|
|
58
52
|
- **references**: name 2–3 AAA games whose look this game borrows
|
|
59
53
|
(conventions, lighting mood, palette, post — never trade dress); the
|