@bitmagic/cli 0.1.61-dev.7 → 0.1.61-dev.9

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.
Files changed (36) hide show
  1. package/dist/cli.d.ts +20 -0
  2. package/dist/commands/build.d.ts +4 -0
  3. package/dist/commands/build.js +2 -0
  4. package/dist/commands/build.js.map +1 -1
  5. package/dist/commands/dev.d.ts +4 -0
  6. package/dist/commands/dev.js +2 -0
  7. package/dist/commands/dev.js.map +1 -1
  8. package/dist/commands/publish.d.ts +4 -0
  9. package/dist/commands/publish.js +2 -0
  10. package/dist/commands/publish.js.map +1 -1
  11. package/dist/commands/reload.d.ts +4 -0
  12. package/dist/commands/reload.js +2 -0
  13. package/dist/commands/reload.js.map +1 -1
  14. package/dist/commands/verify.d.ts +4 -0
  15. package/dist/commands/verify.js +2 -0
  16. package/dist/commands/verify.js.map +1 -1
  17. package/dist/project/context.d.ts +10 -0
  18. package/dist/project/context.js +21 -0
  19. package/dist/project/context.js.map +1 -1
  20. package/dist/scaffold/project-files.js +132 -252
  21. package/dist/scaffold/project-files.js.map +1 -1
  22. package/dist/scaffold/project.js +3 -1
  23. package/dist/scaffold/project.js.map +1 -1
  24. package/dist/scaffold/reference-guidance.d.ts +1 -1
  25. package/dist/scaffold/reference-guidance.js +3 -2
  26. package/dist/scaffold/reference-guidance.js.map +1 -1
  27. package/dist/scaffold/skill-files.d.ts +28 -1
  28. package/dist/scaffold/skill-files.js +212 -2
  29. package/dist/scaffold/skill-files.js.map +1 -1
  30. package/dist/telemetry/creator-prompt.d.ts +25 -2
  31. package/dist/telemetry/creator-prompt.js +33 -2
  32. package/dist/telemetry/creator-prompt.js.map +1 -1
  33. package/dist/telemetry/report.d.ts +2 -0
  34. package/dist/telemetry/report.js +24 -3
  35. package/dist/telemetry/report.js.map +1 -1
  36. package/package.json +4 -4
@@ -1 +1 @@
1
- {"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/scaffold/project.ts"],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E,MAAM,CAAC,CAAC;IACnC,CAAC;IAED,iBAAiB,CAAC;QAChB,SAAS;QACT,QAAQ;QACR,WAAW;QACX,GAAG,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACxC,CAAC,CAAC;AACL,CAAC"}
@@ -9,7 +9,7 @@
9
9
  * markdown, so backticks are escaped exactly as project-files.ts escapes them.
10
10
  */
11
11
  /** The `## Reference image` section of the scaffolded AGENTS.md, placed before the cover section. */
12
- export declare const AGENTS_MD_REFERENCE_SECTION = "## Reference image \u2014 offer it when the idea has a strong setting\n\nWhen the idea names a **place or a look** \u2014 a tropical island, a neon city \u2014 offer to make a\nconcept image of the world before generating anything else:\n\n```\nbitmagic reference make # a candidate lands in .bitmagic/reference/\nbitmagic reference make --from <id> --prompt \"same island, but at dusk\"\nbitmagic reference accept <id> # the human's call, never yours\n```\n\nShow the human each image file and let THEM iterate and accept. Once accepted, it is the default\nstyle reference for `generate skybox|background|block-type|image`, `bitmagic cover` and\n`bitmagic forge` (whose designer literally sees the picture) \u2014 one look across the whole game;\n`--no-reference` exempts a call, and a picture the human hands you for ONE request rides that\ncall as `--reference-image <file>` instead. Accepting prints a durable URL: paste it into\n`GAME-DESIGN.md`'s world/look section, since `.bitmagic/` is not committed and\n`bitmagic reference accept <url>` is how a fresh clone gets it back. Details are in the\n`generating-assets` skill; skip the offer when the idea has no visual identity yet.\n\n";
12
+ export declare const AGENTS_MD_REFERENCE_SECTION = "## Reference image \u2014 offer it when the idea has a strong setting\n\nWhen the idea names a **place or a look** \u2014 a tropical island, a neon city \u2014 offer to make a\nconcept image of the world before generating anything else:\n\n```\nbitmagic reference make # a candidate lands in .bitmagic/reference/\nbitmagic reference make --from <id> --prompt \"same island, but at dusk\"\nbitmagic reference accept <id> # the human's call, never yours\n```\n\nShow the human each image file and let THEM iterate and accept. Once accepted, it is the default\nstyle reference for `generate skybox|background|block-type|image`, `bitmagic cover` and\n`bitmagic forge` (whose designer literally sees the picture) \u2014 one look across the whole game;\n`--no-reference` exempts a call, and a picture the human hands you for ONE request rides that\ncall as `--reference-image <file>` instead. Accepting prints a durable URL: paste it into\n`GAME-DESIGN.md`'s world/look section, since `.bitmagic/` is not committed and\n`bitmagic reference accept <url>` is how a fresh clone gets it back. Details are in\n`.claude/skills/generating-assets/SKILL.md`; skip the offer when the idea has no visual identity\nyet.\n\n";
13
13
  /** The planning skill's step-1 paragraph on offering a reference image. */
14
14
  export declare const PLANNING_SKILL_REFERENCE_STEP1 = "If the idea describes a **place** \u2014 an island, a city, a specific look \u2014 offer a reference image\nbefore anything else is generated: `bitmagic reference make`, show the human the file it prints,\niterate with `--from <id>`, and run `accept` only when they choose one. Every skybox, block,\ncover and forge after that inherits the accepted image, so it is worth settling first \u2014 and worth\nskipping when the idea has no visual identity yet.\n\n";
15
15
  /** The planning skill's step-4 list entry (rendered between the design-doc and cover steps). */
@@ -26,8 +26,9 @@ style reference for \`generate skybox|background|block-type|image\`, \`bitmagic
26
26
  \`--no-reference\` exempts a call, and a picture the human hands you for ONE request rides that
27
27
  call as \`--reference-image <file>\` instead. Accepting prints a durable URL: paste it into
28
28
  \`GAME-DESIGN.md\`'s world/look section, since \`.bitmagic/\` is not committed and
29
- \`bitmagic reference accept <url>\` is how a fresh clone gets it back. Details are in the
30
- \`generating-assets\` skill; skip the offer when the idea has no visual identity yet.
29
+ \`bitmagic reference accept <url>\` is how a fresh clone gets it back. Details are in
30
+ \`.claude/skills/generating-assets/SKILL.md\`; skip the offer when the idea has no visual identity
31
+ yet.
31
32
 
32
33
  `;
33
34
  /** The planning skill's step-1 paragraph on offering a reference image. */
@@ -1 +1 @@
1
- {"version":3,"file":"reference-guidance.js","sourceRoot":"","sources":["../../src/scaffold/reference-guidance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,qGAAqG;AACrG,MAAM,CAAC,MAAM,2BAA2B,GAAG;;;;;;;;;;;;;;;;;;;;CAoB1C,CAAC;AAEF,2EAA2E;AAC3E,MAAM,CAAC,MAAM,8BAA8B,GAAG;;;;;;CAM7C,CAAC;AAEF,gGAAgG;AAChG,MAAM,CAAC,MAAM,8BAA8B,GAAG;;CAE7C,CAAC;AAEF,4EAA4E;AAC5E,MAAM,CAAC,MAAM,gCAAgC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8B/C,CAAC;AAEF,4EAA4E;AAC5E,MAAM,CAAC,MAAM,0BAA0B,GACrC,6HAA6H,CAAC"}
1
+ {"version":3,"file":"reference-guidance.js","sourceRoot":"","sources":["../../src/scaffold/reference-guidance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,qGAAqG;AACrG,MAAM,CAAC,MAAM,2BAA2B,GAAG;;;;;;;;;;;;;;;;;;;;;CAqB1C,CAAC;AAEF,2EAA2E;AAC3E,MAAM,CAAC,MAAM,8BAA8B,GAAG;;;;;;CAM7C,CAAC;AAEF,gGAAgG;AAChG,MAAM,CAAC,MAAM,8BAA8B,GAAG;;CAE7C,CAAC;AAEF,4EAA4E;AAC5E,MAAM,CAAC,MAAM,gCAAgC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8B/C,CAAC;AAEF,4EAA4E;AAC5E,MAAM,CAAC,MAAM,0BAA0B,GACrC,6HAA6H,CAAC"}
@@ -1,5 +1,9 @@
1
1
  /**
2
- * Shipped skills that did not fit in `project-files.ts`, which sits at the 2000-line ESLint cap.
2
+ * Shipped skills that live outside `project-files.ts` — the trailer skill because that file was at
3
+ * the 2000-line ESLint cap when it was written, and `publishing-a-game` / `working-with-the-creator`
4
+ * because they were carved out of AGENTS.md rather than added to it (see the length budget in
5
+ * `__tests__/project-files.test.ts`: a fact whose failure is loud belongs in a skill, and both of
6
+ * those were 116 lines of loud facts riding in every request's context).
3
7
  *
4
8
  * Same contract as the renderers there: each is a pure function returning the file's contents,
5
9
  * registered in `PLATFORM_GENERATED_FILES` (project.ts) so `bitmagic init` writes it and
@@ -20,3 +24,26 @@ export declare function renderSkillsReadme(): string;
20
24
  * the creator actually experiences: a prompt in, a shots.json edit out, one command to see it.
21
25
  */
22
26
  export declare function renderTrailerSkill(): string;
27
+ /**
28
+ * `.claude/skills/publishing-a-game/SKILL.md` — the whole ship-it path, and every way it refuses.
29
+ *
30
+ * This is the largest block that came out of AGENTS.md, and it is the clearest case for the split:
31
+ * an agent about to publish KNOWS it is publishing, and an agent staring at a non-zero exit code
32
+ * knows it needs the table. Neither failure is silent, so neither has to ride in every request's
33
+ * context. What stayed behind in AGENTS.md is only the part an agent cannot discover by trying:
34
+ * the verify-then-don't-edit order, that a bare publish leaves the game private, that the QR image
35
+ * exists, and that the project is uploaded to a public URL (a fact needed BEFORE a credential is
36
+ * written, not when publish is run).
37
+ */
38
+ export declare function renderPublishingSkill(): string;
39
+ /**
40
+ * `.claude/skills/working-with-the-creator/SKILL.md` — the dev view as a two-way channel.
41
+ *
42
+ * The creator is not only watching: they drag gizmos into `world.json`, they paste frames from
43
+ * their running game, and one editor action (`hq.requested`) is a job handed to the agent. Reading
44
+ * `.bitmagic/edit/events.jsonl` is a deliberate act with a stated trigger, and the event shapes are
45
+ * reference material — so the format table lives here, while AGENTS.md keeps only the three facts
46
+ * an agent must hold without being asked: re-read `world.json`, a pasted image is probably live,
47
+ * and that file may be asking you for something.
48
+ */
49
+ export declare function renderCreatorCollaborationSkill(): string;
@@ -1,5 +1,9 @@
1
1
  /**
2
- * Shipped skills that did not fit in `project-files.ts`, which sits at the 2000-line ESLint cap.
2
+ * Shipped skills that live outside `project-files.ts` — the trailer skill because that file was at
3
+ * the 2000-line ESLint cap when it was written, and `publishing-a-game` / `working-with-the-creator`
4
+ * because they were carved out of AGENTS.md rather than added to it (see the length budget in
5
+ * `__tests__/project-files.test.ts`: a fact whose failure is loud belongs in a skill, and both of
6
+ * those were 116 lines of loud facts riding in every request's context).
3
7
  *
4
8
  * Same contract as the renderers there: each is a pure function returning the file's contents,
5
9
  * registered in `PLATFORM_GENERATED_FILES` (project.ts) so `bitmagic init` writes it and
@@ -17,7 +21,8 @@ project root for the guidance an agent should read before editing this game.
17
21
  ## Which of these are yours
18
22
 
19
23
  \`planning-a-game/\`, \`finding-engine-apis/\`, \`generating-assets/\`, \`checking-usage/\`,
20
- \`judging-quality/\`, \`theming-the-hud/\`, \`making-a-trailer/\` — and
24
+ \`judging-quality/\`, \`theming-the-hud/\`, \`making-a-trailer/\`, \`publishing-a-game/\`,
25
+ \`working-with-the-creator/\` — and
21
26
  this README — are shipped by the Bitmagic CLI and **re-rendered by \`bitmagic upgrade\`**. They
22
27
  describe what the CLI and the engine can do, so they have to stay current with both; edits to them
23
28
  are lost on the next upgrade.
@@ -31,6 +36,8 @@ are lost on the next upgrade.
31
36
  | \`judging-quality/\` | a milestone is done and the game deserves an independent quality verdict — \`bitmagic judge\` |
32
37
  | \`theming-the-hud/\` | any ask about the game's LOOK — colors, fonts, rounder/sharper, outlines, glow, glossy, mobile-button styling |
33
38
  | \`making-a-trailer/\` | asked for a trailer, a highlight reel, a gameplay video, or to record gameplay — \`bitmagic trailer\` from recording to a CDN link, and how to tune the cut from prompts |
39
+ | \`publishing-a-game/\` | shipping the game to bitmagic.ai — the verify gate, public vs private, thumbnails, category tags, and every way \`bitmagic publish\` can refuse |
40
+ | \`working-with-the-creator/\` | they are editing alongside you — gizmo drags into \`world.json\`, a pasted frame from their game, \`.bitmagic/edit/events.jsonl\`, their phone |
34
41
 
35
42
  Every other directory here is yours. \`upgrade\` never opens a skill it does not ship, and never
36
43
  deletes anything under \`.claude/\`. Put project-specific guidance in a skill of your own, or in
@@ -200,4 +207,207 @@ Then: **quota check** the labels (rule of three, one standing start), render, ex
200
207
  from the changed region, compare with the previous \`-rN\`, deliver the URL.
201
208
  `;
202
209
  }
210
+ /**
211
+ * `.claude/skills/publishing-a-game/SKILL.md` — the whole ship-it path, and every way it refuses.
212
+ *
213
+ * This is the largest block that came out of AGENTS.md, and it is the clearest case for the split:
214
+ * an agent about to publish KNOWS it is publishing, and an agent staring at a non-zero exit code
215
+ * knows it needs the table. Neither failure is silent, so neither has to ride in every request's
216
+ * context. What stayed behind in AGENTS.md is only the part an agent cannot discover by trying:
217
+ * the verify-then-don't-edit order, that a bare publish leaves the game private, that the QR image
218
+ * exists, and that the project is uploaded to a public URL (a fact needed BEFORE a credential is
219
+ * written, not when publish is run).
220
+ */
221
+ export function renderPublishingSkill() {
222
+ return `---
223
+ name: publishing-a-game
224
+ description: Use when publishing this Bitmagic game to bitmagic.ai, making it public or private, building the bundle, choosing category tags or a thumbnail, sharing the game's link or QR code, or when \`bitmagic publish\` refuses or exits non-zero (verify stale, not logged in, exit 7 and the rest).
225
+ ---
226
+
227
+ # Publishing this game
228
+
229
+ \`\`\`
230
+ bitmagic build # bundle into .bitmagic/build/index.html + .bitmagic/build/manifest.json
231
+ bitmagic publish # verify-gate, build if needed, and ship to bitmagic.ai
232
+ \`\`\`
233
+
234
+ Publish enforces this order and refuses otherwise:
235
+
236
+ 1. **\`bitmagic verify\`, passing.** It writes \`.bitmagic/verify/result.json\`,
237
+ \`.bitmagic/verify/screenshot.png\` and \`.bitmagic/verify/console.log\` — or the
238
+ \`.mobile\`-suffixed names when the run was a phone one.
239
+ 2. **No edit to a tracked file between verifying and publishing.** See the fingerprint rules below.
240
+ 3. **\`bitmagic publish\`.** It rebuilds automatically if the project changed since the last build,
241
+ so a manual \`bitmagic build\` first is optional.
242
+
243
+ ## Public is a flag, not a default
244
+
245
+ Every publish uploads and registers the game, but \`visibility\` defaults to \`private\` — reachable
246
+ by URL, not listed on bitmagic.ai. Pass \`--visibility public\` explicitly, **on that call**, to
247
+ list it. Omit it on a later publish and the game goes back to private: its \`/play/\` page stops
248
+ serving too, so a public game re-published bare disappears from bitmagic.ai entirely until the next
249
+ \`--visibility public\`.
250
+
251
+ ## Show the creator the QR code
252
+
253
+ Publish turns the game's URL into a scannable image. Your output is a pipe, so it cannot be drawn
254
+ in the terminal: publish writes \`.bitmagic/publish-qr.png\` and names it (\`qrPath\` under
255
+ \`--json\`). Surface that image like any artifact you made — scanning it opens the game on a phone,
256
+ and a bare URL leaves your creator retyping a game id into a browser.
257
+
258
+ ## The thumbnail
259
+
260
+ \`.bitmagic/cover.webp\` when \`bitmagic cover\` has produced one, and the verify screenshot
261
+ otherwise. The output names which one it used. \`bitmagic cover\` writes \`world.json\`, so it
262
+ invalidates a passing verify — run it BEFORE \`bitmagic verify\`, never between verifying and
263
+ publishing.
264
+
265
+ ## What invalidates a verify, and what does not
266
+
267
+ Staleness is a **content fingerprint of every tracked file**, not a clock. One edit after verifying
268
+ invalidates it immediately; an untouched project stays fresh no matter how long it has been. There
269
+ is no way to check freshness except running \`bitmagic verify\` again.
270
+
271
+ | Safe between verify and publish | Invalidates the verify |
272
+ |---|---|
273
+ | Git operations — \`.git/\` is excluded, so commit, branch or stash freely | Any edit to a tracked file under \`src/\`, \`index.html\`, \`game.json\`, \`world.json\`, … |
274
+ | \`node_modules/\`, \`dist/\`, \`.bitmagic/\`, \`.vite-cache/\` | \`bitmagic cover\` (it writes \`world.json\`) |
275
+ | \`GAME-DESIGN.md\` and \`mechanics-plan.md\` — no build step reads them, so refining the design or the backlog is free | declaring \`categories\` or \`primaryPlatform\` (tracked-file edits — do them first) |
276
+
277
+ ## Category tags
278
+
279
+ bitmagic.ai files the game under content categories ("Racing", "Puzzle", …), and publish
280
+ auto-classifies an untagged game from its name and description. To choose them yourself, declare
281
+ \`"categories": ["Racing", "Arcade"]\` in \`worldProfileData\` — a declared set wins on every
282
+ publish, and an explicit \`[]\` means "no tags" and suppresses the auto-classify. It is a
283
+ tracked-file edit: declare them BEFORE \`bitmagic verify\`.
284
+
285
+ ## One-shot overrides
286
+
287
+ \`--name\` / \`--description\` apply to that one publish call only. They are never written back to
288
+ \`src/work/game.json\` — doing so by hand would change the fingerprint and invalidate the verify you
289
+ just checked.
290
+
291
+ \`--force\` overrides a **stale or failed** verify verdict, never a **missing** one. A project with
292
+ no cover art has only the verify screenshot to publish a thumbnail from, so \`bitmagic verify\` must
293
+ have produced one at least once before \`--force\` has anything to work with.
294
+
295
+ ## The render smoke test
296
+
297
+ After a successful publish the CLI loads the published game the way the portal does — in an iframe
298
+ that starts at a zero-size viewport — and fails with **exit 7** if it does not render. This catches
299
+ failures that leave no other trace: a wrong Content-Type that makes the browser download the page, a
300
+ bundle that cannot find its own world.json, a canvas nothing ever draws into. Artifacts land in
301
+ \`.bitmagic/smoke/\`.
302
+
303
+ \`--skip-smoke\` skips it. The publish still happens; it is simply not confirmed to render, and the
304
+ output says so.
305
+
306
+ ## When it exits non-zero
307
+
308
+ Branch on the exit code rather than parsing the message.
309
+
310
+ | Code | Meaning | Fix |
311
+ |---|---|---|
312
+ | 1 | Build failed, or what was uploaded was not an engine build | Run \`bitmagic check\` to see the error, fix it. If the message names a missing \`vite.publish*.config.js\`, this project predates it — run \`bitmagic upgrade\`. Do NOT retry an unchanged bundle; the refusal is deterministic |
313
+ | 2 | Not logged in | \`bitmagic login\` |
314
+ | 3 | Verify missing, stale, or failed | \`bitmagic verify\` (then publish again, or add \`--force\` for a stale/failed record) |
315
+ | 5 | Not this game's owner, or the account/game is banned | Not self-serve — stop and report it |
316
+ | 6 | Upload or finalize failed | Usually transient (network/storage). Retry once; if it fails identically, stop and report it — this code also covers permanent failures such as an unknown game or a rejected request |
317
+ | 7 | Published, but the game did not render | The game IS live. Do NOT retry the publish — fix the game and publish again. Artifacts in \`.bitmagic/smoke/\` |
318
+
319
+ ## Every publish uploads your source
320
+
321
+ A **source archive** of this project goes to a publicly readable (though unguessable) URL, which
322
+ Bitmagic checks against the bundle and against an unmodified \`engine/\`; findings print as
323
+ \`warning:\` lines and never block a publish. Credential-shaped files (\`.env*\`, \`*.pem\`,
324
+ \`*.key\`, \`.npmrc\`, service-account JSON) are excluded and named in the output — but that list
325
+ cannot be exhaustive, so **never keep a secret in this directory**.
326
+
327
+ ## An old engine never blocks a publish
328
+
329
+ When a newer engine exists, \`bitmagic dev\` and \`bitmagic publish\` say so and suggest
330
+ \`bitmagic upgrade\`. Upgrade while you are developing, when rebuilding is cheap, rather than being
331
+ blocked at the moment you ship.
332
+ `;
333
+ }
334
+ /**
335
+ * `.claude/skills/working-with-the-creator/SKILL.md` — the dev view as a two-way channel.
336
+ *
337
+ * The creator is not only watching: they drag gizmos into `world.json`, they paste frames from
338
+ * their running game, and one editor action (`hq.requested`) is a job handed to the agent. Reading
339
+ * `.bitmagic/edit/events.jsonl` is a deliberate act with a stated trigger, and the event shapes are
340
+ * reference material — so the format table lives here, while AGENTS.md keeps only the three facts
341
+ * an agent must hold without being asked: re-read `world.json`, a pasted image is probably live,
342
+ * and that file may be asking you for something.
343
+ */
344
+ export function renderCreatorCollaborationSkill() {
345
+ return `---
346
+ name: working-with-the-creator
347
+ description: Use when the creator is watching or editing the game alongside you — they moved or added objects in the Editor tab, pasted a screenshot of the running game, asked to try it on their phone, or pressed "Generate high-quality version"; and whenever you need to read \`.bitmagic/edit/events.jsonl\` or \`.bitmagic/jobs/\` to find out what they did.
348
+ ---
349
+
350
+ # Working alongside the creator
351
+
352
+ \`bitmagic dev\` serves one page with two tabs — **Game**, where the owner plays, and **Editor**,
353
+ where they click an object and drag a gizmo. A drag writes the new transform straight into
354
+ \`src/work/world.json\`, one entry per object touched. So \`world.json\` is shared ground, not yours
355
+ alone.
356
+
357
+ - **Re-read \`src/work/world.json\` before editing it.** The copy you read earlier in the session
358
+ may be stale, and a whole-file rewrite from that copy silently reverts what they just placed.
359
+ - **Prefer changing the entries you mean to change** over regenerating \`environmentObjects\`
360
+ wholesale, so their placements survive your edit.
361
+ - **An image pasted into the conversation is probably a frame from their running game.** The dev
362
+ view has a Screenshot button that copies the current frame to the clipboard, so "look at this"
363
+ usually means the game as it is right now — not a reference or a mock-up.
364
+
365
+ ## They can watch your generations — but not your failures
366
+
367
+ Every \`bitmagic generate\` and \`bitmagic forge\` records itself in \`.bitmagic/jobs/\` while it
368
+ runs, and the dev view lists those with your progress lines and the prompt you used. One that
369
+ FAILS simply drops off that list, with the error reaching your terminal and nowhere else — **a
370
+ failure you do not mention is one they never learn about.**
371
+
372
+ Those files are yours to read too. Check them before starting a second generation that needs a
373
+ browser: a forge and a prop each want one and will fight over it.
374
+
375
+ ## Their phone
376
+
377
+ \`bitmagic dev --mobile\` serves the game to their own network and writes a QR code to
378
+ \`.bitmagic/mobile-qr.png\` (the URL is \`mobileUrl\` in \`.bitmagic/dev.json\`). Hand them the
379
+ image, and say their phone warns once about the certificate — tap Show Details, then Visit Website.
380
+ It is a restart, not a flag you can add to a running server.
381
+
382
+ ## \`.bitmagic/edit/events.jsonl\`
383
+
384
+ Every editor action is appended there as one JSON object per line, and printed to \`bitmagic dev\`'s
385
+ own output. The file is append-only and never rewritten, so you can re-read it from where you left
386
+ off.
387
+
388
+ \`\`\`
389
+ {"at":"…","event":"object.moved","objectId":"inst_…","position":{"from":{…},"to":{…}}}
390
+ {"at":"…","event":"object.added","objectId":"inst_…","type":"tree_oak"}
391
+ {"at":"…","event":"object.deleted","objectId":"inst_…"}
392
+ {"at":"…","event":"hq.requested","assetId":"asset_…","prompt":"…","command":"bitmagic generate prop …"}
393
+ \`\`\`
394
+
395
+ | Event | What it means | Expected of you |
396
+ |---|---|---|
397
+ | \`object.moved\` / \`object.added\` / \`object.deleted\` | History. \`world.json\` already says so; the line tells you WHO changed it and from what | Nothing |
398
+ | \`hq.started\` / \`hq.completed\` | The human pressed "Generate high-quality version" and the editor ran it: an asset's mesh was regenerated and every placed instance upgraded with it | Nothing — but read these rather than being surprised by an asset that changed on its own |
399
+ | \`hq.requested\` | The editor could NOT run that generation, normally because nobody is logged in | **Run the command it carries** |
400
+
401
+ \`hq.requested\` is the one line that asks something of you:
402
+
403
+ \`\`\`
404
+ bitmagic generate prop --asset <assetId> --prompt "<prompt>" --json
405
+ \`\`\`
406
+
407
+ That generates the mesh, voxelizes it to the asset's recorded \`fitBox\`, and upserts it under the
408
+ same asset id, so every placed instance upgrades at once. They asked for it, so run it — just never
409
+ twice for the same request. If it fails after the mesh was generated, the error and the JSON result
410
+ carry the mesh URL: retry with \`--glb-url <url>\` to skip the step that already succeeded.
411
+ `;
412
+ }
203
413
  //# sourceMappingURL=skill-files.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"skill-files.js","sourceRoot":"","sources":["../../src/scaffold/skill-files.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,UAAU,kBAAkB;IAChC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BR,CAAC;AACF,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,kBAAkB;IAChC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsJR,CAAC;AACF,CAAC"}
1
+ {"version":3,"file":"skill-files.js","sourceRoot":"","sources":["../../src/scaffold/skill-files.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,MAAM,UAAU,kBAAkB;IAChC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BR,CAAC;AACF,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,kBAAkB;IAChC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsJR,CAAC;AACF,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,qBAAqB;IACnC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8GR,CAAC;AACF,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,+BAA+B;IAC7C,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkER,CAAC;AACF,CAAC"}
@@ -1,12 +1,18 @@
1
1
  /**
2
2
  * `--original-prompt`: the creator's request in their own words.
3
3
  *
4
- * Every command that takes it — `init`, `forge`, `cover`, and the ten
5
- * `generate` subcommands — declares the flag from here and builds the wire
4
+ * Every command that takes it declares the flag from here and builds the wire
6
5
  * field with the one function below, because the four hand-rolled copies this
7
6
  * replaced had already drifted: three disagreed with the other seven about
8
7
  * whether an empty string counts, and none of them honoured `DO_NOT_TRACK`.
9
8
  *
9
+ * It started on the generators — `init`, `forge`, `cover`, `reference` and the
10
+ * `generate` subcommands — and now rides the everyday loop too (`build`,
11
+ * `verify`, `dev`, `reload`, `publish`). That widening is what makes the count
12
+ * on a game's public page mean anything: a GDK project is built mostly by an
13
+ * agent editing TypeScript, and the only commands that lane runs are the ones
14
+ * that generate no assets at all. See {@link creatorAskDigest}.
15
+ *
10
16
  * The wire field is `creatorPrompt`, deliberately NOT `originalUserPrompt`.
11
17
  * That name already means something on the forge lane —
12
18
  * `ForgeJobInput.originalUserPrompt` is fed to the director and the designer
@@ -33,3 +39,20 @@ export declare function creatorPromptField(override?: unknown): {
33
39
  } | Record<string, never>;
34
40
  /** `body` plus the creator's own words, when the flag was given and telemetry is on. */
35
41
  export declare function withParent(body: Record<string, unknown>): Record<string, unknown>;
42
+ /**
43
+ * The creator's ask as an opaque, stable dedupe key — what the command beacon sends so
44
+ * api-server can count "prompts this game was built with" without ever being told the text.
45
+ *
46
+ * The CLI is the ONLY producer of this value. api-server stores it and compares it to other
47
+ * values from this same function; it never recomputes one from text, so the two sides cannot
48
+ * drift the way they would if both hashed independently. What DOES matter is that this function
49
+ * stays stable across CLI versions — a creator whose CLI changed the digest mid-project would
50
+ * have their earlier asks counted a second time.
51
+ *
52
+ * Capped before hashing for the same reason api-server caps before storing: the value is
53
+ * whatever the agent typed after `--original-prompt`, and nothing upstream bounds it.
54
+ *
55
+ * Returns nothing when the command carried no ask, which is also what an agent that ignores
56
+ * `--original-prompt` produces — the count is a floor, never an overcount.
57
+ */
58
+ export declare function creatorAskDigest(override?: unknown): string | undefined;
@@ -1,12 +1,18 @@
1
1
  /**
2
2
  * `--original-prompt`: the creator's request in their own words.
3
3
  *
4
- * Every command that takes it — `init`, `forge`, `cover`, and the ten
5
- * `generate` subcommands — declares the flag from here and builds the wire
4
+ * Every command that takes it declares the flag from here and builds the wire
6
5
  * field with the one function below, because the four hand-rolled copies this
7
6
  * replaced had already drifted: three disagreed with the other seven about
8
7
  * whether an empty string counts, and none of them honoured `DO_NOT_TRACK`.
9
8
  *
9
+ * It started on the generators — `init`, `forge`, `cover`, `reference` and the
10
+ * `generate` subcommands — and now rides the everyday loop too (`build`,
11
+ * `verify`, `dev`, `reload`, `publish`). That widening is what makes the count
12
+ * on a game's public page mean anything: a GDK project is built mostly by an
13
+ * agent editing TypeScript, and the only commands that lane runs are the ones
14
+ * that generate no assets at all. See {@link creatorAskDigest}.
15
+ *
10
16
  * The wire field is `creatorPrompt`, deliberately NOT `originalUserPrompt`.
11
17
  * That name already means something on the forge lane —
12
18
  * `ForgeJobInput.originalUserPrompt` is fed to the director and the designer
@@ -14,7 +20,10 @@
14
20
  * reusing it made a flag documented as inert change what got built. One name,
15
21
  * one meaning: `creatorPrompt` is analytics-only on every lane.
16
22
  */
23
+ import { createHash } from 'node:crypto';
17
24
  import { currentCommand } from './command-context.js';
25
+ /** Matches api-server's own MAX_PROMPT_LENGTH, so a capped ask means the same thing on both sides. */
26
+ const MAX_ASK_CHARS = 4000;
18
27
  export const ORIGINAL_PROMPT_FLAG = {
19
28
  type: 'string',
20
29
  description: "The creator's request in their own words, verbatim. Recorded for analytics only — "
@@ -42,4 +51,26 @@ export function withParent(body) {
42
51
  // has already validated, and a needless copy is a needless difference for a caller to notice.
43
52
  return 'creatorPrompt' in field ? { ...body, ...field } : body;
44
53
  }
54
+ /**
55
+ * The creator's ask as an opaque, stable dedupe key — what the command beacon sends so
56
+ * api-server can count "prompts this game was built with" without ever being told the text.
57
+ *
58
+ * The CLI is the ONLY producer of this value. api-server stores it and compares it to other
59
+ * values from this same function; it never recomputes one from text, so the two sides cannot
60
+ * drift the way they would if both hashed independently. What DOES matter is that this function
61
+ * stays stable across CLI versions — a creator whose CLI changed the digest mid-project would
62
+ * have their earlier asks counted a second time.
63
+ *
64
+ * Capped before hashing for the same reason api-server caps before storing: the value is
65
+ * whatever the agent typed after `--original-prompt`, and nothing upstream bounds it.
66
+ *
67
+ * Returns nothing when the command carried no ask, which is also what an agent that ignores
68
+ * `--original-prompt` produces — the count is a floor, never an overcount.
69
+ */
70
+ export function creatorAskDigest(override) {
71
+ const field = creatorPromptField(override);
72
+ if (!('creatorPrompt' in field))
73
+ return undefined;
74
+ return createHash('sha256').update(field.creatorPrompt.slice(0, MAX_ASK_CHARS)).digest('hex').slice(0, 16);
75
+ }
45
76
  //# sourceMappingURL=creator-prompt.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"creator-prompt.js","sourceRoot":"","sources":["../../src/telemetry/creator-prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,oFAAoF;UAC7F,iEAAiE;CAC7D,CAAC;AAEX;;;;;;;;;GASG;AACH,MAAM,UAAU,kBAAkB,CAAC,QAAkB;IACnD,MAAM,KAAK,GAAG,QAAQ,IAAI,cAAc,EAAE,EAAE,aAAa,CAAC;IAC1D,oFAAoF;IACpF,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,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F,OAAO,eAAe,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AACjE,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,gBAAgB,CAAC,QAAkB;IACjD,MAAM,KAAK,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IAC3C,IAAI,CAAC,CAAC,eAAe,IAAI,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IAClD,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AAC7G,CAAC"}
@@ -22,6 +22,8 @@ export interface ReportDeps {
22
22
  now?: () => number;
23
23
  /** Where credentials live; tests point this at a temp dir. */
24
24
  baseDir?: string;
25
+ /** Where to look for the project's `bitmagic.json`; defaults to `process.cwd()`. */
26
+ cwd?: string;
25
27
  }
26
28
  /**
27
29
  * The failure category for an error that is not a CliError — a genuine bug, not
@@ -17,8 +17,10 @@
17
17
  * never held open by a sulking network (the same reasoning as
18
18
  * update/check.ts). It never prints.
19
19
  * 2. It sends categories, never messages: the command name, ok/failed, the
20
- * exit code, a `CliError.code`, and a duration. A message can name a path
21
- * or a game; none of that belongs in an analytics event.
20
+ * exit code, a `CliError.code`, and a duration. A message can name a path;
21
+ * that does not belong in an analytics event. The two later additions keep
22
+ * the rule: the project's game id is an id we minted, and the creator's ask
23
+ * travels as an opaque DIGEST, never its words. See {@link CommandProvenance}.
22
24
  * 3. It is authenticated with the creator's own token, so the server can key
23
25
  * the event to the account and look up their real Pro state. No token, no
24
26
  * report — an anonymous beacon would be a spammable endpoint for nothing.
@@ -28,7 +30,9 @@
28
30
  */
29
31
  import { resolveAuth0ClientId } from '../config/environments.js';
30
32
  import { getAccessToken } from '../auth/session.js';
33
+ import { readProjectGameIdOrNull } from '../project/context.js';
31
34
  import { apiServerHeaders } from './request-headers.js';
35
+ import { creatorAskDigest } from './creator-prompt.js';
32
36
  import { currentCommand, isTelemetryDisabled } from './command-context.js';
33
37
  // Re-exported because this is where the opt-out is enforced for a report that is already
34
38
  // under way; `beginCommand` consults the same predicate to skip collecting anything at all.
@@ -80,6 +84,23 @@ async function resolveReportToken(environment, command, deps) {
80
84
  function defaultDeps() {
81
85
  return { fetch: globalThis.fetch, env: process.env };
82
86
  }
87
+ /**
88
+ * The game and the ask, when this command has either. Both keys are omitted rather than sent as
89
+ * null: api-server validates the body strictly, and an absent key is how "nothing to say" is
90
+ * spelled everywhere else on this wire.
91
+ *
92
+ * The digest is only ever present when the command declared `--original-prompt` AND the agent
93
+ * passed it — `creatorAskDigest` reads the value `beginCommand` captured, which is also where
94
+ * `DO_NOT_TRACK` already dropped it. The pair is only sent together: a digest with no game
95
+ * cannot be counted, and a game with no digest is not an ask.
96
+ */
97
+ function provenance(deps) {
98
+ const askDigest = creatorAskDigest();
99
+ if (askDigest === undefined)
100
+ return {};
101
+ const gameId = readProjectGameIdOrNull(deps.cwd);
102
+ return gameId === undefined ? {} : { gameId, askDigest };
103
+ }
83
104
  /**
84
105
  * Report the running command's `report` to api-server. Resolves when the report
85
106
  * has been sent, refused, or given up on — always, and never by throwing.
@@ -112,7 +133,7 @@ export async function reportCommandEvent(report, deps = defaultDeps()) {
112
133
  Authorization: `Bearer ${token}`,
113
134
  'Content-Type': 'application/json',
114
135
  },
115
- body: JSON.stringify({ command: command.name, ...report }),
136
+ body: JSON.stringify({ command: command.name, ...report, ...provenance(deps) }),
116
137
  });
117
138
  }
118
139
  catch {
@@ -1 +1 @@
1
- {"version":3,"file":"report.js","sourceRoot":"","sources":["../../src/telemetry/report.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,EAAE,oBAA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AC,SAAS,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,IAAI,EAAE,GAAG,MAAM,EAAE,GAAG,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;SAChF,CAAC,CAAC;IACL,CAAC;IAAC,MAAM,CAAC;QACP,2EAA2E;QAC3E,kEAAkE;IACpE,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitmagic/cli",
3
- "version": "0.1.61-dev.7",
3
+ "version": "0.1.61-dev.9",
4
4
  "description": "Build Bitmagic games from your own agent tool",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Bitmagic Oy",
@@ -25,9 +25,9 @@
25
25
  "playwright-core": "^1.59.1",
26
26
  "tar": "^7.4.3",
27
27
  "ws": "^8.21.3",
28
- "@bitmagic/animation-forger": "0.1.16-dev.7",
29
- "@bitmagic/world-forger": "0.1.21-dev.7",
30
- "@bitmagic/asset-core": "0.2.16-dev.7"
28
+ "@bitmagic/animation-forger": "0.1.16-dev.9",
29
+ "@bitmagic/world-forger": "0.1.21-dev.9",
30
+ "@bitmagic/asset-core": "0.2.16-dev.9"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@eslint/js": "^9.38.0",