@bitmagic/cli 0.1.55-dev.0 → 0.1.55-dev.2

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 (73) hide show
  1. package/README.md +45 -3
  2. package/dist/cli.d.ts +23 -1
  3. package/dist/cli.js +4 -0
  4. package/dist/cli.js.map +1 -1
  5. package/dist/commands/cover.d.ts +13 -2
  6. package/dist/commands/cover.js +21 -7
  7. package/dist/commands/cover.js.map +1 -1
  8. package/dist/commands/forge.d.ts +14 -0
  9. package/dist/commands/forge.js +41 -3
  10. package/dist/commands/forge.js.map +1 -1
  11. package/dist/commands/generate.d.ts +12 -0
  12. package/dist/commands/generate.js +77 -24
  13. package/dist/commands/generate.js.map +1 -1
  14. package/dist/commands/init.js +4 -0
  15. package/dist/commands/init.js.map +1 -1
  16. package/dist/commands/ios.d.ts +2 -0
  17. package/dist/commands/ios.js +333 -0
  18. package/dist/commands/ios.js.map +1 -0
  19. package/dist/commands/reference.d.ts +41 -0
  20. package/dist/commands/reference.js +398 -0
  21. package/dist/commands/reference.js.map +1 -0
  22. package/dist/generate/stream.d.ts +6 -0
  23. package/dist/generate/stream.js +2 -1
  24. package/dist/generate/stream.js.map +1 -1
  25. package/dist/ios/app-config.d.ts +54 -0
  26. package/dist/ios/app-config.js +109 -0
  27. package/dist/ios/app-config.js.map +1 -0
  28. package/dist/ios/collect-urls.d.ts +73 -0
  29. package/dist/ios/collect-urls.js +230 -0
  30. package/dist/ios/collect-urls.js.map +1 -0
  31. package/dist/ios/icon.d.ts +12 -0
  32. package/dist/ios/icon.js +70 -0
  33. package/dist/ios/icon.js.map +1 -0
  34. package/dist/ios/local-server.d.ts +11 -0
  35. package/dist/ios/local-server.js +88 -0
  36. package/dist/ios/local-server.js.map +1 -0
  37. package/dist/ios/paths.d.ts +21 -0
  38. package/dist/ios/paths.js +23 -0
  39. package/dist/ios/paths.js.map +1 -0
  40. package/dist/ios/record-validate.d.ts +25 -0
  41. package/dist/ios/record-validate.js +98 -0
  42. package/dist/ios/record-validate.js.map +1 -0
  43. package/dist/ios/transform.d.ts +47 -0
  44. package/dist/ios/transform.js +67 -0
  45. package/dist/ios/transform.js.map +1 -0
  46. package/dist/ios/vendor.d.ts +29 -0
  47. package/dist/ios/vendor.js +113 -0
  48. package/dist/ios/vendor.js.map +1 -0
  49. package/dist/ios/xcode-template.d.ts +11 -0
  50. package/dist/ios/xcode-template.js +615 -0
  51. package/dist/ios/xcode-template.js.map +1 -0
  52. package/dist/ios/xcodebuild.d.ts +71 -0
  53. package/dist/ios/xcodebuild.js +216 -0
  54. package/dist/ios/xcodebuild.js.map +1 -0
  55. package/dist/project/jobs.d.ts +1 -1
  56. package/dist/project/reference-file.d.ts +44 -0
  57. package/dist/project/reference-file.js +94 -0
  58. package/dist/project/reference-file.js.map +1 -0
  59. package/dist/project/reference.d.ts +78 -0
  60. package/dist/project/reference.js +175 -0
  61. package/dist/project/reference.js.map +1 -0
  62. package/dist/scaffold/project-files.js +19 -16
  63. package/dist/scaffold/project-files.js.map +1 -1
  64. package/dist/scaffold/reference-guidance.d.ts +20 -0
  65. package/dist/scaffold/reference-guidance.js +79 -0
  66. package/dist/scaffold/reference-guidance.js.map +1 -0
  67. package/dist/update/self-install.d.ts +15 -6
  68. package/dist/update/self-install.js +56 -15
  69. package/dist/update/self-install.js.map +1 -1
  70. package/dist/verify/browser.d.ts +8 -0
  71. package/dist/verify/browser.js +2 -0
  72. package/dist/verify/browser.js.map +1 -1
  73. package/package.json +4 -4
@@ -0,0 +1,175 @@
1
+ /**
2
+ * The project's reference image — the accepted concept shot of the game's world, and the
3
+ * candidates the creator iterated through to get there (`bitmagic reference`).
4
+ *
5
+ * Everything lives under `.bitmagic/`, like `cover.json`: generated, machine-written state that
6
+ * the server can always re-create. NOT in `bitmagic.json`, deliberately — that file is inside the
7
+ * publish fingerprint (see shared/asset-core's publish-source.ts), so recording an accepted
8
+ * reference there would invalidate a passing `bitmagic verify` on every accept. A fresh clone
9
+ * that wants the same reference re-accepts by URL (`bitmagic reference accept <url>`); the
10
+ * durable copy of that URL belongs in GAME-DESIGN.md's prose, which IS committed.
11
+ *
12
+ * Layout:
13
+ * .bitmagic/reference/<id>.webp candidate bytes (what the creator looks at)
14
+ * .bitmagic/reference/<id>.json the candidate's record
15
+ * .bitmagic/reference.json the accepted reference — absent means none
16
+ *
17
+ * Readers are lenient, like `readCoverRecord`: a corrupt file reads as absent, because the worst
18
+ * case of "absent" is one regeneration or a re-accept, and a hard error would wedge every
19
+ * generate command on a file nobody edits by hand.
20
+ */
21
+ import * as fs from 'fs';
22
+ import * as path from 'path';
23
+ export const REFERENCE_DIR = path.join('.bitmagic', 'reference');
24
+ const ACCEPTED_FILE = path.join('.bitmagic', 'reference.json');
25
+ export function referenceDirPath(root) {
26
+ return path.join(root, REFERENCE_DIR);
27
+ }
28
+ export function acceptedReferencePath(root) {
29
+ return path.join(root, ACCEPTED_FILE);
30
+ }
31
+ export function candidateImagePath(root, id) {
32
+ return path.join(referenceDirPath(root), `${id}.webp`);
33
+ }
34
+ function candidateRecordPath(root, id) {
35
+ return path.join(referenceDirPath(root), `${id}.json`);
36
+ }
37
+ function readJsonFile(file) {
38
+ let raw;
39
+ try {
40
+ raw = fs.readFileSync(file, 'utf-8');
41
+ }
42
+ catch {
43
+ return null;
44
+ }
45
+ let parsed;
46
+ try {
47
+ parsed = JSON.parse(raw);
48
+ }
49
+ catch {
50
+ return null;
51
+ }
52
+ return typeof parsed === 'object' && parsed !== null ? parsed : null;
53
+ }
54
+ const isString = (value) => typeof value === 'string';
55
+ export function readAcceptedReference(root) {
56
+ const parsed = readJsonFile(acceptedReferencePath(root));
57
+ if (!parsed)
58
+ return null;
59
+ const { url, hosted, sourceUrl, candidateId, imagePath, acceptedAt } = parsed;
60
+ if (!isString(url) || url.length === 0 || typeof hosted !== 'boolean' || !isString(sourceUrl) || !isString(acceptedAt)) {
61
+ return null;
62
+ }
63
+ return {
64
+ url,
65
+ hosted,
66
+ sourceUrl,
67
+ acceptedAt,
68
+ ...(isString(candidateId) ? { candidateId } : {}),
69
+ ...(isString(imagePath) ? { imagePath } : {}),
70
+ };
71
+ }
72
+ export function writeAcceptedReference(root, accepted) {
73
+ fs.mkdirSync(path.dirname(acceptedReferencePath(root)), { recursive: true });
74
+ fs.writeFileSync(acceptedReferencePath(root), `${JSON.stringify(accepted, null, 2)}\n`);
75
+ }
76
+ /** Remove the accepted reference. Candidates stay — clearing a decision is not deleting the work. */
77
+ export function clearAcceptedReference(root) {
78
+ try {
79
+ fs.unlinkSync(acceptedReferencePath(root));
80
+ return true;
81
+ }
82
+ catch {
83
+ return false;
84
+ }
85
+ }
86
+ export function readCandidate(root, id) {
87
+ if (!isSafeCandidateId(id))
88
+ return null;
89
+ const parsed = readJsonFile(candidateRecordPath(root, id));
90
+ if (!parsed)
91
+ return null;
92
+ const { url, prompt, from, referenceImageUrl, createdAt } = parsed;
93
+ if (!isString(url) || url.length === 0 || !isString(prompt) || !isString(createdAt))
94
+ return null;
95
+ return {
96
+ id,
97
+ url,
98
+ prompt,
99
+ createdAt,
100
+ ...(isString(from) ? { from } : {}),
101
+ ...(isString(referenceImageUrl) ? { referenceImageUrl } : {}),
102
+ };
103
+ }
104
+ export function writeCandidate(root, record) {
105
+ fs.mkdirSync(referenceDirPath(root), { recursive: true });
106
+ fs.writeFileSync(candidateRecordPath(root, record.id), `${JSON.stringify(record, null, 2)}\n`);
107
+ }
108
+ /** Every readable candidate, newest first (ids sort chronologically by construction). */
109
+ export function listCandidates(root) {
110
+ let entries;
111
+ try {
112
+ entries = fs.readdirSync(referenceDirPath(root));
113
+ }
114
+ catch {
115
+ return [];
116
+ }
117
+ return entries
118
+ .filter((name) => name.endsWith('.json'))
119
+ .map((name) => readCandidate(root, name.slice(0, -'.json'.length)))
120
+ .filter((record) => record !== null)
121
+ .sort((a, b) => b.id.localeCompare(a.id));
122
+ }
123
+ /** `ref-<yyyymmdd-hhmmss>-<4 rand>` — short enough to type, sortable by creation time. */
124
+ export function newCandidateId(now = new Date()) {
125
+ const pad = (n) => String(n).padStart(2, '0');
126
+ const stamp = `${now.getFullYear()}${pad(now.getMonth() + 1)}${pad(now.getDate())}` +
127
+ `-${pad(now.getHours())}${pad(now.getMinutes())}${pad(now.getSeconds())}`;
128
+ const rand = Math.random().toString(36).slice(2, 6).padEnd(4, '0');
129
+ return `ref-${stamp}-${rand}`;
130
+ }
131
+ /** Candidate ids become file names, so anything path-shaped is refused, never sanitised. */
132
+ export function isSafeCandidateId(id) {
133
+ return /^[a-z0-9][a-z0-9-]{0,63}$/.test(id);
134
+ }
135
+ /**
136
+ * The reference a generating command should send, in precedence order: an explicit
137
+ * `--reference-image-url` wins outright (it IS a reference choice), `--no-reference` disables,
138
+ * and otherwise the project's accepted reference applies — that inheritance being the whole
139
+ * point of accepting one.
140
+ */
141
+ export function resolveReferenceImageUrl(args, root) {
142
+ const explicit = args['reference-image-url'];
143
+ if (explicit !== undefined && explicit !== '')
144
+ return { url: explicit, source: 'flag' };
145
+ if (args.reference === false)
146
+ return { source: 'disabled' };
147
+ const accepted = readAcceptedReference(root);
148
+ return accepted ? { url: accepted.url, source: 'project' } : { source: 'none' };
149
+ }
150
+ /**
151
+ * The one line a command logs when the PROJECT's reference was applied — so the agent driving
152
+ * the CLI can see the default took effect (and knows the switch that turns it off). Explicit
153
+ * flags echo nothing: the caller chose, and repeating their own flag back is noise.
154
+ */
155
+ export function describeAppliedReference(resolved) {
156
+ return resolved.source === 'project'
157
+ ? "Using the project's reference image (bitmagic reference show); pass --no-reference to skip it."
158
+ : null;
159
+ }
160
+ // ============================================================================
161
+ // Flags — declared once, imported by every reference-aware command
162
+ // ============================================================================
163
+ export const REFERENCE_IMAGE_FLAG = {
164
+ type: 'string',
165
+ description: 'Style/composition reference image URL forwarded to the image model. Overrides the accepted project reference for this call.',
166
+ };
167
+ export const NO_REFERENCE_FLAG = {
168
+ type: 'boolean',
169
+ negativeDescription: 'Do not apply the accepted project reference image (`bitmagic reference`) to this call.',
170
+ };
171
+ export const REFERENCE_FILE_FLAG = {
172
+ type: 'string',
173
+ description: 'A local image file (PNG/JPEG/WebP) to use as the reference for this call — uploaded to the game\'s storage first. Overrides the accepted project reference.',
174
+ };
175
+ //# sourceMappingURL=reference.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reference.js","sourceRoot":"","sources":["../../src/project/reference.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AACjE,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC;AAE/D,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC3C,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,IAAY;IAChD,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,IAAY,EAAE,EAAU;IACzD,OAAO,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;AACzD,CAAC;AAED,SAAS,mBAAmB,CAAC,IAAY,EAAE,EAAU;IACnD,OAAO,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;AACzD,CAAC;AAmCD,SAAS,YAAY,CAAC,IAAY;IAChC,IAAI,GAAW,CAAC;IAChB,IAAI,CAAC;QACH,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CA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,UAAU,EAAE,CAAC;IAC5D,MAAM,QAAQ,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAC;IAC7C,OAAO,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAClF,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CAAC,QAA2B;IAClE,OAAO,QAAQ,CAAC,MAAM,KAAK,SAAS;QAClC,CAAC,CAAC,gGAAgG;QAClG,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAED,+EAA+E;AAC/E,mEAAmE;AACnE,+EAA+E;AAE/E,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,6HAA6H;CAClI,CAAC;AAEX,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,IAAI,EAAE,SAAS;IACf,mBAAmB,EAAE,wFAAwF;CACrG,CAAC;AAEX,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,6JAA6J;CAClK,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { FAVICON_LINK_ID } from '@bitmagic/asset-core/favicon';
2
2
  import { tsconfigPaths, importMapEntries, viteAliasEntries } from './aliases.js';
3
+ import { AGENTS_MD_REFERENCE_SECTION, GAME_DESIGN_REFERENCE_HINT, GENERATE_SKILL_REFERENCE_SECTION, PLANNING_SKILL_REFERENCE_STEP1, PLANNING_SKILL_REFERENCE_STEP4, } from './reference-guidance.js';
3
4
  /**
4
5
  * The legal notice stamped into every game this project publishes.
5
6
  *
@@ -800,7 +801,7 @@ import type { GameData } from 'types/game.js';
800
801
 
801
802
  Always include the \`.js\` extension, even in TypeScript.
802
803
 
803
- ## Cover art — do this early
804
+ ${AGENTS_MD_REFERENCE_SECTION}## Cover art — do this early
804
805
 
805
806
  \`\`\`
806
807
  bitmagic cover # generate the cover from GAME-DESIGN.md and set it as the start screen
@@ -1129,7 +1130,7 @@ sword"), or when the human says it is just one thing. In doubt, write it.
1129
1130
  \`bitmagic cover\` generates the cover art from it and that art is the only thing the human has to
1130
1131
  look at while you build.
1131
1132
 
1132
- If the idea names a genre, read its recipe **before you decide anything else**:
1133
+ ${PLANNING_SKILL_REFERENCE_STEP1}If the idea names a genre, read its recipe **before you decide anything else**:
1133
1134
 
1134
1135
  | The idea mentions… | Read |
1135
1136
  |---|---|
@@ -1243,17 +1244,17 @@ file is excluded from the publish fingerprint, so rewriting it never invalidates
1243
1244
  background task — and everything below is worth more when they can watch it happen. Last in this
1244
1245
  list it is just a server; first, it is the whole reason the rest is visible.
1245
1246
  2. \`GAME-DESIGN.md\` written or confirmed.
1246
- 3. \`bitmagic cover\` — **now**, not later. It takes minutes, and it is what the human looks at
1247
+ ${PLANNING_SKILL_REFERENCE_STEP4}4. \`bitmagic cover\` — **now**, not later. It takes minutes, and it is what the human looks at
1247
1248
  while you work; generated at the end it is the same picture with none of that value. It writes
1248
1249
  \`world.json\`, so it must come before any \`bitmagic verify\`.
1249
- 4. \`mechanics-plan.md\`.
1250
- 5. Write the code. Look up APIs with the \`finding-engine-apis\` skill; do not read engine source to
1250
+ 5. \`mechanics-plan.md\`.
1251
+ 6. Write the code. Look up APIs with the \`finding-engine-apis\` skill; do not read engine source to
1251
1252
  find out what exists.
1252
- 6. \`bitmagic check\` until green.
1253
- 7. \`bitmagic reload\` (the Stop hook in \`.claude/settings.json\` does this for you).
1254
- 8. \`bitmagic verify\` — it boots the game in a real browser and clicks Play. A clean \`check\` is
1253
+ 7. \`bitmagic check\` until green.
1254
+ 8. \`bitmagic reload\` (the Stop hook in \`.claude/settings.json\` does this for you).
1255
+ 9. \`bitmagic verify\` — it boots the game in a real browser and clicks Play. A clean \`check\` is
1255
1256
  not evidence the game runs.
1256
- 9. Report (below). Publish only if they ask.
1257
+ 10. Report (below). Publish only if they ask.
1257
1258
 
1258
1259
  **One forge, and only when the terrain IS the mechanic.** \`bitmagic forge\` runs for many minutes,
1259
1260
  so it sets how long the human waits for slice 1. It belongs in slice 1 for a game that cannot be
@@ -1462,7 +1463,7 @@ you work. Re-read it before editing it.
1462
1463
  export function renderGenerateSkill() {
1463
1464
  return `---
1464
1465
  name: generating-assets
1465
- description: Use when this Bitmagic game needs a new skybox, 2D background, custom block type, sound effect, image, character, animation or drivable vehicle, or when the creator has a model, sound, image or .vxl file of their own to add — anything that would otherwise require the web editor.
1466
+ description: Use when this Bitmagic game needs a new skybox, 2D background, custom block type, sound effect, image, character, animation or drivable vehicle, when a reference image of the world should steer how assets look, or when the creator has a model, sound, image or .vxl file of their own to add — anything that would otherwise require the web editor.
1466
1467
  ---
1467
1468
 
1468
1469
  # Generating game assets
@@ -1528,17 +1529,18 @@ aliases \`trunk\`, \`foliage\`, \`rock\`, \`road\`). Re-running with the same \`
1528
1529
  the entry rather than adding a second one. \`--side-description\` gives the side faces their own
1529
1530
  texture and generates a second one.
1530
1531
 
1531
- Cover art is the one generation that is **not** a \`generate\` subcommand:
1532
+ Cover art and the reference image are the two generations that are **not** \`generate\` subcommands:
1532
1533
 
1533
1534
  | Command | Makes | Lands in |
1534
1535
  |---|---|---|
1535
1536
  | \`bitmagic cover\` | the game's cover art | \`hud.startScreen.imageUrl\`, \`.bitmagic/cover.webp\`, the publish thumbnail |
1537
+ | \`bitmagic reference make\` | a concept image of the world | \`.bitmagic/reference/\` only — nothing in \`world.json\` |
1536
1538
 
1537
- It writes its own prompt from \`GAME-DESIGN.md\` rather than taking one, and it skips generating
1538
- entirely when the design has not changed since the last cover. See AGENTS.md for why it is worth
1539
- running before you start implementing rather than after.
1539
+ \`cover\` writes its own prompt from \`GAME-DESIGN.md\` rather than taking one, and it skips
1540
+ generating entirely when the design has not changed since the last cover. See AGENTS.md for why it
1541
+ is worth running before you start implementing rather than after.
1540
1542
 
1541
- ## Before generating
1543
+ ${GENERATE_SKILL_REFERENCE_SECTION}## Before generating
1542
1544
 
1543
1545
  Generating is included in the creator's Bitmagic Pro subscription and the results are good, so the
1544
1546
  default answer is yes — a placeholder you left in place to be careful is not the safe option, it is
@@ -1750,7 +1752,8 @@ What the player does over and over, and why it stays interesting.
1750
1752
  ## World & look
1751
1753
 
1752
1754
  Setting, mood, palette, time of day, the landmarks a player would remember. This is the section
1753
- the cover art is drawn from.
1755
+ the cover art and any reference image are drawn from.
1756
+ ${GAME_DESIGN_REFERENCE_HINT}
1754
1757
 
1755
1758
  ## Win / lose
1756
1759
 
@@ -1 +1 @@
1
- {"version":3,"file":"project-files.js","sourceRoot":"","sources":["../../src/scaffold/project-files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAKjF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;;;;;;;;;;;;;;;;;;IAkBnC,CAAC;AAEL;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,2BAA2B,EAAE,SAAS;IACtC,2BAA2B,EAAE,SAAS;IACtC,kBAAkB,EAAE,QAAQ;IAC5B,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,kCAAkC,EAAE,QAAQ;IAC5C,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,UAAU;IACjB,4FAA4F;IAC5F,6FAA6F;IAC7F,4CAA4C;CACZ,CAAC;AAEnC,MAAM,CAAC,MAAM,gBAAgB,GAA2B;IACtD,aAAa,EAAE,UAAU;IACzB,cAAc,EAAE,UAAU;IAC1B,8FAA8F;IAC9F,cAAc,EAAE,QAAQ;IACxB,4FAA4F;IAC5F,mFAAmF;IACnF,eAAe,EAAE,SAAS;IAC1B,UAAU,EAAE,QAAQ;IACpB,IAAI,EAAE,Q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CAAC;IAC3B,OAAO;;EAEP,KAAK;QACH,CAAC,CAAC,8GAA8G;QAChH,CAAC,CAAC,0KAA0K;;;;EAI9K,KAAK,IAAI,iEAAiE;;;;;;;;;;EAU1E,0BAA0B;;;;;CAK3B,CAAC;AACF,CAAC;AAED,MAAM,UAAU,cAAc;IAC5B,OAAO,cAAc,CAAC;AACxB,CAAC;AAED,MAAM,UAAU,kBAAkB;IAChC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;CAwBR,CAAC;AACF,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * The scaffolded guidance for `bitmagic reference` — the prose that teaches a creator's agent to
3
+ * OFFER a concept image of the world, let the human iterate and decide, and understand what
4
+ * accepting one changes.
5
+ *
6
+ * Its own module rather than more of project-files.ts for one blunt reason: that file sits near
7
+ * the 2000-line ESLint ceiling, and guidance is the part that grows. The rendering rules are the
8
+ * same as there — these strings land inside template literals ultimately emitted into scaffolded
9
+ * markdown, so backticks are escaped exactly as project-files.ts escapes them.
10
+ */
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";
13
+ /** The planning skill's step-1 paragraph on offering a reference image. */
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
+ /** The planning skill's step-4 list entry (rendered between the design-doc and cover steps). */
16
+ export declare const PLANNING_SKILL_REFERENCE_STEP4 = "3. `bitmagic reference make` / `accept` \u2014 only when the human wants one; it lands BEFORE\n `bitmagic cover` and any forge, since both use the accepted image.\n";
17
+ /** The generating-assets skill's section on the project reference image. */
18
+ export declare const GENERATE_SKILL_REFERENCE_SECTION = "## The project reference image\n\n`bitmagic reference` manages a concept image of the game's world (see AGENTS.md for when to\noffer one). Its subcommands are `make`, `accept <id|url>`, `show` and `clear`; candidates\nlive in `.bitmagic/reference/` and the accepted choice in `.bitmagic/reference.json` \u2014\nnothing in `world.json`, and only `make` costs sparks (the same price as an image).\n\nOnce one is **accepted**, `generate skybox`, `generate background`, `generate block-type`,\n`generate image`, `bitmagic cover` and `bitmagic forge` all use it as their style reference\nby default \u2014 the command logs \"Using the project's reference image\" when that happens. Control it\nper call:\n\n- `--no-reference` \u2014 this asset should NOT look like the world (a hell-dimension portal in a\n tropical game).\n- `--reference-image <file>` / `--reference-image-url <url>` \u2014 a DIFFERENT reference for this\n call only; both override the accepted image.\n- `bitmagic reference show` \u2014 check what is accepted; `clear` stops using it entirely.\n\n**When the human hands you a picture** \u2014 \"create a world like this\", \"a skybox like this photo\" \u2014\nthat image IS the reference for that request: save it to a file and pass\n`--reference-image <path>` (or `--reference-image-url` if they gave a URL) on the command it\napplies to. The CLI uploads the file to the game's storage and forwards its URL; the accepted\nproject reference is not consulted. Only when they mean it as the game's overall look \u2014 \"make the\nwhole game look like this\" \u2014 run `bitmagic reference accept <file>` instead, which makes it the\nproject reference everything inherits.\n\n`make` itself never inherits the accepted image \u2014 each candidate starts fresh unless you pass\n`--from <id>` (or `--reference-image <file>` to iterate from the human's own picture), which is\nhow \"same island, but at dusk\" iterations work.\n\n";
19
+ /** The GAME-DESIGN.md template's hint, placed with the world/look prose. */
20
+ export declare const GAME_DESIGN_REFERENCE_HINT = "<!-- If a reference image was accepted (bitmagic reference show), paste its URL here so a fresh clone can re-accept it. -->";
@@ -0,0 +1,79 @@
1
+ /**
2
+ * The scaffolded guidance for `bitmagic reference` — the prose that teaches a creator's agent to
3
+ * OFFER a concept image of the world, let the human iterate and decide, and understand what
4
+ * accepting one changes.
5
+ *
6
+ * Its own module rather than more of project-files.ts for one blunt reason: that file sits near
7
+ * the 2000-line ESLint ceiling, and guidance is the part that grows. The rendering rules are the
8
+ * same as there — these strings land inside template literals ultimately emitted into scaffolded
9
+ * markdown, so backticks are escaped exactly as project-files.ts escapes them.
10
+ */
11
+ /** The `## Reference image` section of the scaffolded AGENTS.md, placed before the cover section. */
12
+ export const AGENTS_MD_REFERENCE_SECTION = `## Reference image — offer it when the idea has a strong setting
13
+
14
+ When the idea names a **place or a look** — a tropical island, a neon city — offer to make a
15
+ concept image of the world before generating anything else:
16
+
17
+ \`\`\`
18
+ bitmagic reference make # a candidate lands in .bitmagic/reference/
19
+ bitmagic reference make --from <id> --prompt "same island, but at dusk"
20
+ bitmagic reference accept <id> # the human's call, never yours
21
+ \`\`\`
22
+
23
+ Show the human each image file and let THEM iterate and accept. Once accepted, it is the default
24
+ style reference for \`generate skybox|background|block-type|image\`, \`bitmagic cover\` and
25
+ \`bitmagic forge\` (whose designer literally sees the picture) — one look across the whole game;
26
+ \`--no-reference\` exempts a call, and a picture the human hands you for ONE request rides that
27
+ call as \`--reference-image <file>\` instead. Accepting prints a durable URL: paste it into
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.
31
+
32
+ `;
33
+ /** The planning skill's step-1 paragraph on offering a reference image. */
34
+ export const PLANNING_SKILL_REFERENCE_STEP1 = `If the idea describes a **place** — an island, a city, a specific look — offer a reference image
35
+ before anything else is generated: \`bitmagic reference make\`, show the human the file it prints,
36
+ iterate with \`--from <id>\`, and run \`accept\` only when they choose one. Every skybox, block,
37
+ cover and forge after that inherits the accepted image, so it is worth settling first — and worth
38
+ skipping when the idea has no visual identity yet.
39
+
40
+ `;
41
+ /** The planning skill's step-4 list entry (rendered between the design-doc and cover steps). */
42
+ export const PLANNING_SKILL_REFERENCE_STEP4 = `3. \`bitmagic reference make\` / \`accept\` — only when the human wants one; it lands BEFORE
43
+ \`bitmagic cover\` and any forge, since both use the accepted image.
44
+ `;
45
+ /** The generating-assets skill's section on the project reference image. */
46
+ export const GENERATE_SKILL_REFERENCE_SECTION = `## The project reference image
47
+
48
+ \`bitmagic reference\` manages a concept image of the game's world (see AGENTS.md for when to
49
+ offer one). Its subcommands are \`make\`, \`accept <id|url>\`, \`show\` and \`clear\`; candidates
50
+ live in \`.bitmagic/reference/\` and the accepted choice in \`.bitmagic/reference.json\` —
51
+ nothing in \`world.json\`, and only \`make\` costs sparks (the same price as an image).
52
+
53
+ Once one is **accepted**, \`generate skybox\`, \`generate background\`, \`generate block-type\`,
54
+ \`generate image\`, \`bitmagic cover\` and \`bitmagic forge\` all use it as their style reference
55
+ by default — the command logs "Using the project's reference image" when that happens. Control it
56
+ per call:
57
+
58
+ - \`--no-reference\` — this asset should NOT look like the world (a hell-dimension portal in a
59
+ tropical game).
60
+ - \`--reference-image <file>\` / \`--reference-image-url <url>\` — a DIFFERENT reference for this
61
+ call only; both override the accepted image.
62
+ - \`bitmagic reference show\` — check what is accepted; \`clear\` stops using it entirely.
63
+
64
+ **When the human hands you a picture** — "create a world like this", "a skybox like this photo" —
65
+ that image IS the reference for that request: save it to a file and pass
66
+ \`--reference-image <path>\` (or \`--reference-image-url\` if they gave a URL) on the command it
67
+ applies to. The CLI uploads the file to the game's storage and forwards its URL; the accepted
68
+ project reference is not consulted. Only when they mean it as the game's overall look — "make the
69
+ whole game look like this" — run \`bitmagic reference accept <file>\` instead, which makes it the
70
+ project reference everything inherits.
71
+
72
+ \`make\` itself never inherits the accepted image — each candidate starts fresh unless you pass
73
+ \`--from <id>\` (or \`--reference-image <file>\` to iterate from the human's own picture), which is
74
+ how "same island, but at dusk" iterations work.
75
+
76
+ `;
77
+ /** The GAME-DESIGN.md template's hint, placed with the world/look prose. */
78
+ export const GAME_DESIGN_REFERENCE_HINT = '<!-- If a reference image was accepted (bitmagic reference show), paste its URL here so a fresh clone can re-accept it. -->';
79
+ //# sourceMappingURL=reference-guidance.js.map
@@ -0,0 +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"}
@@ -112,14 +112,23 @@ export interface ManagerCommand {
112
112
  */
113
113
  export declare function npmCommand(execPath: string, installPrefix: string | undefined, exists?: Exists): ManagerCommand;
114
114
  /**
115
- * pnpm, which — unlike npm — is not bundled with node and so cannot be located from `execPath`.
115
+ * pnpm, which — unlike npm — is not bundled with node and so cannot be derived from `execPath`.
116
116
  *
117
- * The best that can be done is the directory pnpm itself installed the `bitmagic` command into,
118
- * which for a default install is also where the `pnpm` command lives. Failing that the name is
119
- * left to PATH; a pnpm user whose shell has no pnpm gets a clear refusal naming the resolved
120
- * global dir, which is still strictly better than an install silently landing elsewhere.
117
+ * Searching this widely is safe in a way the npm equivalent is not, and the difference is worth
118
+ * stating: `installArgs` pins pnpm's target with `--global-dir` and `--global-bin-dir`, so WHICH
119
+ * pnpm runs cannot change WHERE it writes. Any pnpm on the disk is therefore a correct one, and
120
+ * the only wrong answer is not finding one which is why the search widens rather than stopping
121
+ * at the two directories that imply the install.
122
+ *
123
+ * The order still runs from most-implied to least: the bin directory this install's own
124
+ * `bitmagic` came from, then pnpm's default root beside the global dir, then the places a pnpm
125
+ * lives on a machine where it was installed independently of either.
126
+ *
127
+ * Failing all of them the name is left to PATH, flagged — and a shell with no pnpm then gets a
128
+ * clear refusal naming the resolved global dir, which is still strictly better than an install
129
+ * silently landing elsewhere.
121
130
  */
122
- export declare function pnpmCommand(globalDir: string, binDir: string | undefined, exists?: Exists): ManagerCommand;
131
+ export declare function pnpmCommand(globalDir: string, binDir: string | undefined, exists?: Exists, execPath?: string): ManagerCommand;
123
132
  /** The manager that owns `location`, resolved without PATH wherever that is possible. */
124
133
  export declare function managerFor(location: UpdatableLocation, execPath: string, exists?: Exists): ManagerCommand;
125
134
  /**
@@ -74,26 +74,43 @@ export function classifyInstall(packageDir, exists = realExists) {
74
74
  return { kind: 'unknown', packageDir };
75
75
  }
76
76
  /**
77
- * pnpm's global store: `<globalDir>/<n>/node_modules/.pnpm/@bitmagic+cli@<v>/node_modules/@bitmagic/cli`.
77
+ * pnpm's global store, in either of the two places pnpm has put it.
78
78
  *
79
- * The numbered directory is pnpm's store-layout version, and requiring it is what separates a
79
+ * pnpm 9 and earlier nested the virtual store inside the links directory
80
+ * `<globalDir>/<n>/node_modules/.pnpm/@bitmagic+cli@<v>/node_modules/@bitmagic/cli`. pnpm 10
81
+ * writes global installs with `virtualStoreDir: ../.pnpm`, hoisting the store to a SIBLING of
82
+ * `node_modules`: `<globalDir>/<n>/.pnpm/@bitmagic+cli@<v>/node_modules/@bitmagic/cli`. Reading
83
+ * only the older shape is what made a perfectly ordinary `pnpm add -g` install — including the
84
+ * README's own two-root recipe, run with any current pnpm — come back as `unknown` and get
85
+ * refused. The `node_modules` segment is therefore optional here, and everything downstream is
86
+ * derived from the numbered directory rather than from the store's depth.
87
+ *
88
+ * That numbered directory is pnpm's store-layout version, and requiring it is what separates a
80
89
  * GLOBAL pnpm install from a project-local one — a `.pnpm` directory inside a project's
81
90
  * node_modules has no such parent, and reinstalling globally on its behalf would be wrong.
82
91
  */
83
92
  function classifyPnpm(segments) {
84
93
  const store = segments.indexOf('.pnpm');
85
- if (store < 2)
94
+ if (store < 1)
95
+ return null;
96
+ // pnpm 10 hoists the store out of `node_modules`; pnpm 9 kept it inside. Skip the segment when
97
+ // it is there, so the layout version is found from either depth.
98
+ const layout = segments[store - 1] === 'node_modules' ? store - 2 : store - 1;
99
+ if (layout < 1)
86
100
  return null;
87
- if (segments[store - 1] !== 'node_modules')
101
+ if (!DIGITS.test(segments[layout] ?? ''))
88
102
  return null;
89
- if (!DIGITS.test(segments[store - 2] ?? ''))
103
+ const globalDir = segments.slice(0, layout).join(path.sep);
104
+ if (globalDir === '')
90
105
  return null;
91
- const modulesRoot = segments.slice(0, store).join(path.sep);
106
+ // Always the links directory beside the layout version, never the store — the same distinction
107
+ // `verifyDir` exists for, and now the only thing that varied between the two layouts.
108
+ const modulesRoot = path.join(segments.slice(0, layout + 1).join(path.sep), 'node_modules');
92
109
  return {
93
110
  kind: 'pnpm-global',
94
111
  verifyDir: path.join(modulesRoot, '@bitmagic', 'cli'),
95
112
  modulesRoot,
96
- globalDir: segments.slice(0, store - 2).join(path.sep),
113
+ globalDir,
97
114
  };
98
115
  }
99
116
  /**
@@ -196,15 +213,39 @@ export function npmCommand(execPath, installPrefix, exists = realExists) {
196
213
  return { command: 'npm', leadingArgs: [], fromPath: true };
197
214
  }
198
215
  /**
199
- * pnpm, which unlike npm is not bundled with node and so cannot be located from `execPath`.
216
+ * Where a `pnpm` executable sits on a machine that did not put it beside its own global dir.
217
+ *
218
+ * `dirname(execPath)` is node's own bin directory, which is where corepack's shim and a plain
219
+ * `npm i -g pnpm` both land — so under nvm it is the same prefix this CLI came from. The two
220
+ * Homebrew prefixes are the mac reality behind the bug that prompted this: node from nvm, pnpm
221
+ * from Homebrew, and therefore a pnpm that is beside neither the install nor the node.
222
+ */
223
+ function pnpmSearchDirs(execPath) {
224
+ return [
225
+ ...(execPath === undefined ? [] : [path.dirname(execPath)]),
226
+ '/opt/homebrew/bin',
227
+ '/usr/local/bin',
228
+ ];
229
+ }
230
+ /**
231
+ * pnpm, which — unlike npm — is not bundled with node and so cannot be derived from `execPath`.
232
+ *
233
+ * Searching this widely is safe in a way the npm equivalent is not, and the difference is worth
234
+ * stating: `installArgs` pins pnpm's target with `--global-dir` and `--global-bin-dir`, so WHICH
235
+ * pnpm runs cannot change WHERE it writes. Any pnpm on the disk is therefore a correct one, and
236
+ * the only wrong answer is not finding one — which is why the search widens rather than stopping
237
+ * at the two directories that imply the install.
238
+ *
239
+ * The order still runs from most-implied to least: the bin directory this install's own
240
+ * `bitmagic` came from, then pnpm's default root beside the global dir, then the places a pnpm
241
+ * lives on a machine where it was installed independently of either.
200
242
  *
201
- * The best that can be done is the directory pnpm itself installed the `bitmagic` command into,
202
- * which for a default install is also where the `pnpm` command lives. Failing that the name is
203
- * left to PATH; a pnpm user whose shell has no pnpm gets a clear refusal naming the resolved
204
- * global dir, which is still strictly better than an install silently landing elsewhere.
243
+ * Failing all of them the name is left to PATH, flagged and a shell with no pnpm then gets a
244
+ * clear refusal naming the resolved global dir, which is still strictly better than an install
245
+ * silently landing elsewhere.
205
246
  */
206
- export function pnpmCommand(globalDir, binDir, exists = realExists) {
207
- const candidates = [binDir, path.dirname(globalDir)].filter((dir) => dir !== undefined);
247
+ export function pnpmCommand(globalDir, binDir, exists = realExists, execPath) {
248
+ const candidates = [binDir, path.dirname(globalDir), ...pnpmSearchDirs(execPath)].filter((dir) => dir !== undefined);
208
249
  for (const dir of candidates) {
209
250
  const binary = path.join(dir, 'pnpm');
210
251
  if (exists(binary))
@@ -216,7 +257,7 @@ export function pnpmCommand(globalDir, binDir, exists = realExists) {
216
257
  export function managerFor(location, execPath, exists = realExists) {
217
258
  return location.kind === 'npm-global'
218
259
  ? npmCommand(execPath, location.prefix, exists)
219
- : pnpmCommand(location.globalDir, location.binDir, exists);
260
+ : pnpmCommand(location.globalDir, location.binDir, exists, execPath);
220
261
  }
221
262
  /**
222
263
  * Install `spec` into exactly this location.
@@ -1 +1 @@
1
- {"version":3,"file":"self-install.js","sourceRoot":"","sources":["../../src/update/self-install.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEvC,gDAAgD;AAChD,MAAM,CAAC,MAAM,YAAY,GAAG,eAAe,CAAC;AAK5C,MAAM,UAAU,GAAW,CAAC,SAAS,EAAE,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;AAgDnE,MAAM,UAAU,WAAW,CAAC,QAAyB;IACnD,OAAO,QAAQ,CAAC,IAAI,KAAK,YAAY,IAAI,QAAQ,CAAC,IAAI,KAAK,aAAa,CAAC;AAC3E,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAAC,SAAiB;IAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC;AAC9E,CAAC;AAED,MAAM,MAAM,GAAG,OAAO,CAAC;AAEvB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