@bitmagic/cli 0.1.60-dev.1 → 0.1.60-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 (53) hide show
  1. package/README.md +49 -0
  2. package/dist/cli.d.ts +36 -0
  3. package/dist/cli.js +2 -0
  4. package/dist/cli.js.map +1 -1
  5. package/dist/commands/forge.js +15 -25
  6. package/dist/commands/forge.js.map +1 -1
  7. package/dist/commands/import.d.ts +75 -0
  8. package/dist/commands/import.js +338 -0
  9. package/dist/commands/import.js.map +1 -0
  10. package/dist/commands/init.js +1 -45
  11. package/dist/commands/init.js.map +1 -1
  12. package/dist/commands/verify.js +17 -29
  13. package/dist/commands/verify.js.map +1 -1
  14. package/dist/editor/motion-panel.d.ts +3 -3
  15. package/dist/editor/motion-panel.js +50 -5
  16. package/dist/editor/motion-panel.js.map +1 -1
  17. package/dist/local-port.d.ts +23 -4
  18. package/dist/local-port.js +44 -13
  19. package/dist/local-port.js.map +1 -1
  20. package/dist/scaffold/export-zip.d.ts +48 -0
  21. package/dist/scaffold/export-zip.js +167 -0
  22. package/dist/scaffold/export-zip.js.map +1 -0
  23. package/dist/scaffold/import-project.d.ts +34 -0
  24. package/dist/scaffold/import-project.js +108 -0
  25. package/dist/scaffold/import-project.js.map +1 -0
  26. package/dist/scaffold/project-files.js +9 -1
  27. package/dist/scaffold/project-files.js.map +1 -1
  28. package/dist/scaffold/project.d.ts +34 -0
  29. package/dist/scaffold/project.js +53 -22
  30. package/dist/scaffold/project.js.map +1 -1
  31. package/dist/scaffold/rehost-assets.d.ts +63 -0
  32. package/dist/scaffold/rehost-assets.js +270 -0
  33. package/dist/scaffold/rehost-assets.js.map +1 -0
  34. package/dist/scaffold/scaffold-run.d.ts +17 -0
  35. package/dist/scaffold/scaffold-run.js +57 -0
  36. package/dist/scaffold/scaffold-run.js.map +1 -0
  37. package/dist/theme/hud-theme-catalog.d.ts +0 -1
  38. package/dist/theme/hud-theme-catalog.js +9 -6
  39. package/dist/theme/hud-theme-catalog.js.map +1 -1
  40. package/dist/theme/theme-io.js +2 -1
  41. package/dist/theme/theme-io.js.map +1 -1
  42. package/dist/verify/browser.js +87 -18
  43. package/dist/verify/browser.js.map +1 -1
  44. package/dist/verify/classify.d.ts +12 -0
  45. package/dist/verify/classify.js +24 -3
  46. package/dist/verify/classify.js.map +1 -1
  47. package/dist/verify/start.d.ts +23 -3
  48. package/dist/verify/start.js +13 -1
  49. package/dist/verify/start.js.map +1 -1
  50. package/dist/verify/wait-for-server.d.ts +11 -0
  51. package/dist/verify/wait-for-server.js +29 -1
  52. package/dist/verify/wait-for-server.js.map +1 -1
  53. package/package.json +7 -5
@@ -0,0 +1,167 @@
1
+ /**
2
+ * Reading a Bitmagic Creator export — the `.zip` the web Creator's "Export game" button
3
+ * downloads — into the few things a CLI project actually needs from it.
4
+ *
5
+ * The archive is written by game-play-agent's ExportImportController and holds far more than a
6
+ * project does:
7
+ *
8
+ * manifest.json export version, the game id, the genre
9
+ * <gameId>/metadata.json engine version, the Creator template it began from
10
+ * <gameId>/source/ the game itself: .ts, game.json, world.json, design docs, .git
11
+ * <gameId>/edit-sessions/ ┐
12
+ * <gameId>/session-logs/ │ the web lane's own bookkeeping: an audit trail of every AI
13
+ * <gameId>/llm-usage/ │ edit ever made. Nothing in a CLI project reads any of it.
14
+ * <gameId>/operations.json ┘
15
+ *
16
+ * Only the first three are read, and the read is FILTERED rather than "unzip, then pick": the
17
+ * bookkeeping is the bulk of a real export (a 25MB zip whose source/ is 1.5MB), and `source/.git`
18
+ * alone can be hundreds of files. fflate applies the filter before inflating, so what is skipped
19
+ * costs nothing but a central-directory entry.
20
+ */
21
+ import * as fs from 'fs';
22
+ import { unzipSync } from 'fflate';
23
+ import { CliError, describeErrno } from '../errors.js';
24
+ /**
25
+ * Export manifest versions this understands, matching what the Creator's own importer accepts
26
+ * (ExportImportController.parseManifest). A newer version is refused by number rather than
27
+ * guessed at: an export whose layout changed would otherwise be half-read into a broken project.
28
+ */
29
+ const SUPPORTED_MANIFEST_VERSIONS = [1, 2];
30
+ const MANIFEST_NAME = 'manifest.json';
31
+ /**
32
+ * Is this archive entry one of the three things worth inflating?
33
+ *
34
+ * Directory entries (`name` ending in `/`) are excluded explicitly. They inflate to zero bytes
35
+ * rather than failing, so without this they would arrive as empty "files" and be written to disk
36
+ * as such — `<gameId>/source/` splits into three segments the same way a real file does.
37
+ */
38
+ function isWantedEntry(name) {
39
+ if (name.endsWith('/'))
40
+ return false;
41
+ if (name === MANIFEST_NAME)
42
+ return true;
43
+ const parts = name.split('/');
44
+ if (parts.length === 2 && parts[1] === 'metadata.json')
45
+ return true;
46
+ // `.git` is the Creator's own per-game history. Its paths are relative to source/, so replaying
47
+ // it into src/work/ would produce a repository whose every recorded path is wrong.
48
+ return parts.length >= 3 && parts[1] === 'source' && parts[2] !== '.git';
49
+ }
50
+ /** Parse JSON that must be an object, or null for anything else. Never throws. */
51
+ function readJsonObject(bytes) {
52
+ if (bytes === undefined)
53
+ return null;
54
+ let parsed;
55
+ try {
56
+ parsed = JSON.parse(Buffer.from(bytes).toString('utf-8'));
57
+ }
58
+ catch {
59
+ return null;
60
+ }
61
+ if (typeof parsed !== 'object' || parsed === null || Array.isArray(parsed))
62
+ return null;
63
+ return parsed;
64
+ }
65
+ /** A field that is a non-empty string, or null — the shape every optional field here wants. */
66
+ function stringField(source, key) {
67
+ const value = source?.[key];
68
+ return typeof value === 'string' && value.length > 0 ? value : null;
69
+ }
70
+ /**
71
+ * Read and validate the export at `zipPath`.
72
+ *
73
+ * Every failure is a CliError naming the file, because all of them mean the same thing to a
74
+ * creator: this is not an export the CLI can convert, and nothing has been written yet.
75
+ */
76
+ export function readCreatorExport(zipPath) {
77
+ let archive;
78
+ try {
79
+ archive = fs.readFileSync(zipPath);
80
+ }
81
+ catch (error) {
82
+ throw new CliError(`Cannot read ${zipPath}: ${describeErrno(error)}`);
83
+ }
84
+ let entries;
85
+ try {
86
+ entries = unzipSync(archive, { filter: (file) => isWantedEntry(file.name) });
87
+ }
88
+ catch {
89
+ throw new CliError(`${zipPath} is not a readable zip archive.`);
90
+ }
91
+ const manifest = readJsonObject(entries[MANIFEST_NAME]);
92
+ if (manifest === null) {
93
+ throw new CliError(`${zipPath} has no readable ${MANIFEST_NAME} — it is not a Bitmagic Creator export. ` +
94
+ 'Export the game from the Creator with "Export game" and pass the .zip it downloads.');
95
+ }
96
+ const version = manifest.version;
97
+ if (typeof version !== 'number' || !SUPPORTED_MANIFEST_VERSIONS.includes(version)) {
98
+ throw new CliError(`${zipPath} is an export of version ${String(version)}, which this CLI does not understand. ` +
99
+ 'Run `bitmagic self-update` and try again.');
100
+ }
101
+ const gameId = stringField(manifest, 'originalGameId');
102
+ if (gameId === null) {
103
+ throw new CliError(`${zipPath}'s ${MANIFEST_NAME} names no originalGameId.`);
104
+ }
105
+ const sourcePrefix = `${gameId}/source/`;
106
+ const sourceFiles = Object.entries(entries)
107
+ .filter(([name]) => name.startsWith(sourcePrefix))
108
+ .map(([name, contents]) => ({ path: name.slice(sourcePrefix.length), contents }))
109
+ // Code-unit order, not `localeCompare`: the listing is reported back to the creator and
110
+ // asserted on in tests, and locale collation makes both depend on the machine's ICU data.
111
+ .sort((a, b) => (a.path < b.path ? -1 : a.path > b.path ? 1 : 0));
112
+ if (sourceFiles.length === 0) {
113
+ throw new CliError(`${zipPath} carries no ${sourcePrefix} — the export has no game code to convert.`);
114
+ }
115
+ const metadata = readJsonObject(entries[`${gameId}/metadata.json`]);
116
+ const gameJson = readJsonObject(sourceFiles.find((file) => file.path === 'game.json')?.contents);
117
+ return {
118
+ gameId,
119
+ // The manifest's genre is what the export declares; metadata.json is the game folder's own
120
+ // record of it. They agree in every export, and the fallback chain simply refuses to have an
121
+ // opinion about which is right — `unknown` is what the exporter itself writes when it cannot
122
+ // read metadata.json, so it is the honest floor rather than a made-up default.
123
+ genre: stringField(manifest, 'genre') ?? stringField(metadata, 'genre') ?? 'unknown',
124
+ engineVersion: stringField(metadata, 'engineVersion'),
125
+ template: stringField(metadata, 'importedFrom'),
126
+ gameName: stringField(gameJson, 'gameName'),
127
+ sourceFiles,
128
+ };
129
+ }
130
+ /**
131
+ * The hosts serving assets that belong to THIS game — http(s) URLs in `world.json` and
132
+ * `game.json` whose path carries the game's own id.
133
+ *
134
+ * Read for one reason: a game's assets are minted under `worlds/v3/<gameId>/` by the api-server
135
+ * that hosts the Creator, and so is the game row a CLI project adopts by id. Importing a dev game
136
+ * into a project pinned to prod produces something that builds, runs and then fails every server
137
+ * command with a flat "not found or is not owned by the caller" — the one failure this conversion
138
+ * can see coming and the creator cannot. The caller compares these against the environment it
139
+ * resolved; nothing here decides anything.
140
+ *
141
+ * **The gameId filter is the whole point, not a refinement.** Every game — on every environment —
142
+ * references shared defaults that live on prod: `mini.bitmagic.ai/worlds/v3/BaseCharacter.glb` is
143
+ * in the game.json of a dev game and a prod game alike. Classifying on "any bitmagic host" reads
144
+ * that one line and calls every dev export a prod game, which is precisely the mistake this check
145
+ * exists to prevent. Only a URL carrying the game's own id was minted for this game, by the
146
+ * api-server that owns it.
147
+ *
148
+ * Named for what it returns rather than `assetHosts`, which is `mobile/asset-hosts.ts` — a
149
+ * different question (which hosts the LAN bridge proxies for a phone) about the same URLs.
150
+ */
151
+ export function gameAssetHosts(source) {
152
+ const hosts = new Set();
153
+ for (const file of source.sourceFiles) {
154
+ if (file.path !== 'world.json' && file.path !== 'game.json')
155
+ continue;
156
+ const text = Buffer.from(file.contents).toString('utf-8');
157
+ // The path half stops at the first character that cannot appear in a JSON string's URL, so a
158
+ // quote or a comma ends it rather than running into the next field.
159
+ for (const match of text.matchAll(/https?:\/\/([A-Za-z0-9.-]+)([^"'\s,]*)/g)) {
160
+ const host = match[1];
161
+ if (host !== undefined && (match[2] ?? '').includes(source.gameId))
162
+ hosts.add(host);
163
+ }
164
+ }
165
+ return [...hosts].sort();
166
+ }
167
+ //# sourceMappingURL=export-zip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"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AAC,CAAC,CAAC;YACtB,IAAI,IAAI,KAAK,SAAS,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;gBAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACtF,CAAC;IACH,CAAC;IACD,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;AAC3B,CAAC"}
@@ -0,0 +1,34 @@
1
+ import type { CreatorExport } from './export-zip.js';
2
+ import type { ProjectMetadata } from './project-files.js';
3
+ /**
4
+ * Documents the CLI lane keeps at the project ROOT, lifted out of the export's `source/`.
5
+ *
6
+ * `GAME-DESIGN.md` is read by `cover`, `judge` and `reference`, all of which look at the root.
7
+ * `mechanics-plan.md` is where AGENTS.md tells the agent its build order lives, and that
8
+ * instruction names the root too. Both are prose — moving them cannot break a build, and leaving
9
+ * them cannot be noticed until a command quietly reports the project has no design.
10
+ */
11
+ export declare const ROOT_DOC_FILES: string[];
12
+ export interface ImportProjectOptions {
13
+ targetDir: string;
14
+ /** Where extractEngine unpacked game/src/* and game/docs. */
15
+ extractedEngineDir: string;
16
+ source: CreatorExport;
17
+ metadata: ProjectMetadata;
18
+ projectName: string;
19
+ /**
20
+ * The id the project adopts, when it is NOT the one the game was exported under — i.e. `import
21
+ * --new-game`. Undefined means the project keeps the exported id and the two JSON files are
22
+ * written through untouched.
23
+ */
24
+ rewriteGameId?: string;
25
+ }
26
+ export interface ImportProjectResult {
27
+ /** Paths written under `src/work/`, relative to it. */
28
+ workFiles: string[];
29
+ /** Docs lifted to the project root, by name. */
30
+ rootDocs: string[];
31
+ /** Files whose embedded `gameId` was rewritten. Empty unless `rewriteGameId` was given. */
32
+ rewritten: string[];
33
+ }
34
+ export declare function importProject(options: ImportProjectOptions): ImportProjectResult;
@@ -0,0 +1,108 @@
1
+ /**
2
+ * Turning a read Creator export into a project on disk — `scaffoldProject`'s sibling, differing
3
+ * in exactly one thing: where `src/work/` comes from.
4
+ *
5
+ * `init` builds that directory from the genre baseline plus a template overlay. An import already
6
+ * HAS the finished article: the Creator's `source/` IS a project's `src/work/`, baseline files
7
+ * included (the export carries BitmagicPlayerCharacter.ts, Constants.ts and the rest alongside the
8
+ * game's own code, because the web lane's work copy is the same derived tree). So the export's
9
+ * files are written verbatim and nothing is overlaid on top of them — an overlay here would
10
+ * silently replace the creator's Game.ts with a template's.
11
+ *
12
+ * Two adjustments, and only two:
13
+ *
14
+ * - The design docs move to the project root. `bitmagic cover`, `judge` and `reference` all read
15
+ * `<root>/GAME-DESIGN.md`; in the web lane the same file lives beside the code because there is
16
+ * no root to put it at. Left where it was, the creator's design would be invisible to every
17
+ * command that wants it and `cover` would report the project has none.
18
+ * - `gameId` inside game.json and world.json, but only when the caller minted a new one. Both
19
+ * files carry the id the game was exported under, and a project whose bitmagic.json says one id
20
+ * while its world.json says another is a project whose publishes disagree with its assets.
21
+ */
22
+ import * as fs from 'fs';
23
+ import * as path from 'path';
24
+ import { CliError } from '../errors.js';
25
+ import { aliasSourceDir } from './aliases.js';
26
+ import { vendorEngine, writeProjectFiles } from './project.js';
27
+ /**
28
+ * Documents the CLI lane keeps at the project ROOT, lifted out of the export's `source/`.
29
+ *
30
+ * `GAME-DESIGN.md` is read by `cover`, `judge` and `reference`, all of which look at the root.
31
+ * `mechanics-plan.md` is where AGENTS.md tells the agent its build order lives, and that
32
+ * instruction names the root too. Both are prose — moving them cannot break a build, and leaving
33
+ * them cannot be noticed until a command quietly reports the project has no design.
34
+ */
35
+ export const ROOT_DOC_FILES = ['GAME-DESIGN.md', 'mechanics-plan.md'];
36
+ /** The two files in `source/` that carry the game's own id. */
37
+ const GAME_ID_FILES = ['game.json', 'world.json'];
38
+ /**
39
+ * Rewrite the `gameId` of a `source/` JSON file, returning the new bytes.
40
+ *
41
+ * Throws rather than skipping: these are the two files the engine loads to run the game at all, so
42
+ * one that is not a JSON object is a broken export, and an import that silently carried it through
43
+ * would fail far later with a blank screen instead of here with a filename.
44
+ */
45
+ function withGameId(file, gameId) {
46
+ const text = Buffer.from(file.contents).toString('utf-8');
47
+ let parsed;
48
+ try {
49
+ parsed = JSON.parse(text);
50
+ }
51
+ catch {
52
+ throw new CliError(`The export's ${file.path} is not valid JSON, so its game id cannot be updated.`);
53
+ }
54
+ if (typeof parsed !== 'object' || parsed === null || Array.isArray(parsed)) {
55
+ throw new CliError(`The export's ${file.path} does not contain an object.`);
56
+ }
57
+ const updated = { ...parsed, gameId };
58
+ return Buffer.from(`${JSON.stringify(updated, null, 2)}\n`, 'utf-8');
59
+ }
60
+ /**
61
+ * Guard against an export entry escaping the directory it is written into.
62
+ *
63
+ * Zip entry names come from the archive, not from us, and `..` in one is the classic way an
64
+ * archive writes outside its target. The export is produced by our own server, so this has never
65
+ * fired — which is exactly why it is a hard failure rather than a filter: an entry that needs it
66
+ * means something about the archive is not what this code believes.
67
+ */
68
+ function assertContained(root, filePath, entry) {
69
+ const resolved = path.resolve(filePath);
70
+ if (resolved !== root && !resolved.startsWith(root + path.sep)) {
71
+ throw new CliError(`The export entry "${entry}" would be written outside the project.`);
72
+ }
73
+ }
74
+ export function importProject(options) {
75
+ const { targetDir, extractedEngineDir, source, metadata, projectName, rewriteGameId } = options;
76
+ vendorEngine(extractedEngineDir, targetDir);
77
+ const workDir = path.join(targetDir, aliasSourceDir('work'));
78
+ const workRoot = path.resolve(workDir);
79
+ const docRoot = path.resolve(targetDir);
80
+ fs.mkdirSync(workDir, { recursive: true });
81
+ const result = { workFiles: [], rootDocs: [], rewritten: [] };
82
+ for (const file of source.sourceFiles) {
83
+ const lifted = ROOT_DOC_FILES.includes(file.path);
84
+ const destination = lifted ? path.join(targetDir, file.path) : path.join(workDir, file.path);
85
+ assertContained(lifted ? docRoot : workRoot, destination, file.path);
86
+ let contents = file.contents;
87
+ if (rewriteGameId !== undefined && GAME_ID_FILES.includes(file.path)) {
88
+ contents = withGameId(file, rewriteGameId);
89
+ result.rewritten.push(file.path);
90
+ }
91
+ fs.mkdirSync(path.dirname(destination), { recursive: true });
92
+ fs.writeFileSync(destination, contents);
93
+ if (lifted)
94
+ result.rootDocs.push(file.path);
95
+ else
96
+ result.workFiles.push(file.path);
97
+ }
98
+ writeProjectFiles({
99
+ targetDir,
100
+ metadata,
101
+ projectName,
102
+ // The creator's own design document came out of the export; rendering the empty skeleton over
103
+ // it is the one way this conversion could destroy something it was asked to preserve.
104
+ gameDesign: result.rootDocs.includes('GAME-DESIGN.md') ? 'keep' : 'render',
105
+ });
106
+ return result;
107
+ }
108
+ //# sourceMappingURL=import-project.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"import-project.js","sourceRoot":"","sources":["../../src/scaffold/import-project.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAG/D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,CAAC;AAEtE,+DAA+D;AAC/D,MAAM,aAAa,GAAG,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;AA0BlD;;;;;;GAMG;AACH,SAAS,UAAU,CAAC,IAAsB,EAAE,MAAc;IACxD,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC1D,IAAI,MAAe,CAAC;IACpB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IAAC,MAAM,CAAC;QACP,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AC,IAAI,CAAC,IAAI,CAAC,CAAC;;YACvC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;IAED,iBAAiB,CAAC;QAChB,SAAS;QACT,QAAQ;QACR,WAAW;QACX,8FAA8F;QAC9F,sFAAsF;QACtF,UAAU,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ;KAC3E,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -871,6 +871,10 @@ are configured in **code** — there is no panel for them.
871
871
  …)\` for a gameplay action. The first strands phone players and the engine logs a
872
872
  \`[mobile-parity]\` error on game start; the raw listener strands them **silently** — the parity
873
873
  check cannot see a listener that never went through the engine.
874
+ - **A game played by tapping the scene** (board, builder, strategy) has nothing for a joystick to
875
+ drive, and verify treats the missing touch controls as declared when the engine can see why:
876
+ build no player controller (the \`no-character\` template) or declare \`"hasPlayerCharacter":
877
+ false\` in \`worldProfileData\` — never \`forceDisable()\` the controls to get there.
874
878
  - **\`bitmagic verify\` enforces this.** Every run reports the parity gaps, naming the key and the
875
879
  system that registered it — a warning normally, and a **failure** on a game whose
876
880
  \`primaryPlatform\` is \`mobile\`. \`bitmagic verify --platform mobile\` goes further and boots
@@ -1231,6 +1235,7 @@ the engine, already wired** — and hand-building a worse version of it is the m
1231
1235
  | Multiple levels or arenas | \`levels[]\` registry + \`engine.loadLevel()\` | \`level-system.md\` |
1232
1236
  | Voice input, speaking to NPCs | \`engine.enablePushToTalk()\` | \`voice-input.md\` |
1233
1237
  | A key for a new action — shoot, reload, boost, throw | \`registerCustomAction()\` / \`declareMobileActions()\` — one call binds the desktop key AND the phone button | \`control-system.md\` |
1238
+ | A game played by tapping the scene — board, builder, strategy, no player to move | No player controller (the \`no-character\` template) or \`hasPlayerCharacter: false\` in \`worldProfileData\` — the engine builds no joystick and verify treats the missing touch controls as declared | \`control-system.md\` |
1234
1239
  | The default player and its animation set | Already there | — |
1235
1240
 
1236
1241
  A built-in still covers the request when the human names a style ("a katana" → the built-in katana).
@@ -1261,7 +1266,9 @@ that I would otherwise have defaulted differently.
1261
1266
  ## Platform
1262
1267
  \`primaryPlatform\` in \`game.json\` — \`desktop\` or \`mobile\`. Plus \`worldProfileData.mobileOrientation\`
1263
1268
  in \`world.json\` when the game only works one way up. If \`mobile\`: every action needs a touch
1264
- button, and \`bitmagic verify\` fails the run otherwise.
1269
+ button, and \`bitmagic verify\` fails the run otherwise. A game played by tapping the scene (no
1270
+ player to move) either builds no player controller (the \`no-character\` template) or declares
1271
+ \`hasPlayerCharacter: false\`, so the engine and verify know there is no joystick to build.
1265
1272
 
1266
1273
  ## Slice 1 — the smallest playable thing
1267
1274
  - Core verb: the ONE thing the player does
@@ -1390,6 +1397,7 @@ tier 2.
1390
1397
  | Coordinates, forward direction, yaw, rotation, lookAt, spawn offsets | \`coordinate-system.md\` |
1391
1398
  | NPCs, enemies, creatures, companions, pets, followers | \`npc-system.md\` (routes to the four \`npc-*\` docs) |
1392
1399
  | NPC looks — block vs highres GLB, recolouring, animation packs | \`npc-appearance.md\` |
1400
+ | Changing a character's clothes/outfit AT RUNTIME — armour, uniform, costume swap | \`character-outfits.md\` |
1393
1401
  | NPC combat and death — HP, damage, ragdoll, exploding | \`npc-combat-death.md\` |
1394
1402
  | Respawning or bulk NPC populations, \`NpcManager\` | \`npc-managers.md\` |
1395
1403
  | NPC pathing, walkable targets, navmesh cell size | \`npc-navigation.md\` |
@@ -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;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,iB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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkER,CAAC;AACF,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAa;IAC9C,MAAM,KAAK,GAAG,IAAI,EAAE,IAAI,EAAE,CAAC;IAC3B,OAAO;;EAEP,KAAK;QACH,CAAC,CAAC,8GAA8G;QAChH,CAAC,CAAC,0KAA0K;;;;EAI9K,KAAK,IAAI,iEAAiE;;;;;;;;;;EAU1E,0BAA0B;;;;;;;;;;;;CAY3B,CAAC;AACF,CAAC;AAED,MAAM,UAAU,cAAc;IAC5B,OAAO,cAAc,CAAC;AACxB,CAAC;AAED,MAAM,UAAU,kBAAkB;IAChC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCR,CAAC;AACF,CAAC;AAED,MAAM,UAAU,kBAAkB;IAChC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;CAyBR,CAAC;AACF,CAAC"}
@@ -146,4 +146,38 @@ export interface ScaffoldOptions {
146
146
  /** `bitmagic init --idea`, seeding GAME-DESIGN.md's Pitch. Absent leaves the skeleton empty. */
147
147
  idea?: string;
148
148
  }
149
+ /**
150
+ * Puts the platform's own code into the project: the vendored `engine/` tree and the service
151
+ * worker that has to sit beside it at the root.
152
+ *
153
+ * Split out of `scaffoldProject` so `importProject` gets the identical tree — including the
154
+ * "missing is a corrupt tarball" / "missing is just an older tarball" distinction the two
155
+ * constant lists above spend most of their comments on. A second copy of this loop would be a
156
+ * second place for that distinction to be got wrong.
157
+ */
158
+ export declare function vendorEngine(extractedEngineDir: string, targetDir: string): void;
159
+ export interface ProjectFileOptions {
160
+ targetDir: string;
161
+ metadata: ProjectMetadata;
162
+ projectName: string;
163
+ /** `bitmagic init --idea`, seeding GAME-DESIGN.md's Pitch. Ignored when `gameDesign` is 'keep'. */
164
+ idea?: string;
165
+ /**
166
+ * Whether to write GAME-DESIGN.md at all.
167
+ *
168
+ * 'keep' is for `import`, which lifts the creator's own design document out of the export and
169
+ * must not then overwrite it with an empty skeleton. Everything else about the file set is
170
+ * identical, which is why this is a flag rather than a second function.
171
+ */
172
+ gameDesign?: 'render' | 'keep';
173
+ }
174
+ /**
175
+ * Writes every generated file a Bitmagic project has — the platform-owned ones, and the
176
+ * creator-owned ones seeded once.
177
+ *
178
+ * Shared by `scaffoldProject` and `importProject` so the two lanes cannot drift on what a project
179
+ * contains. What belongs in PLATFORM_GENERATED_FILES, and what deliberately stays out of it, is
180
+ * argued on that constant.
181
+ */
182
+ export declare function writeProjectFiles(options: ProjectFileOptions): void;
149
183
  export declare function scaffoldProject(options: ScaffoldOptions): void;
@@ -209,8 +209,16 @@ function copyContents(source, dest) {
209
209
  fs.cpSync(path.join(source, entry), path.join(dest, entry), { recursive: true });
210
210
  }
211
211
  }
212
- export function scaffoldProject(options) {
213
- const { targetDir, extractedEngineDir, templatesDir, template, metadata, projectName, idea } = options;
212
+ /**
213
+ * Puts the platform's own code into the project: the vendored `engine/` tree and the service
214
+ * worker that has to sit beside it at the root.
215
+ *
216
+ * Split out of `scaffoldProject` so `importProject` gets the identical tree — including the
217
+ * "missing is a corrupt tarball" / "missing is just an older tarball" distinction the two
218
+ * constant lists above spend most of their comments on. A second copy of this loop would be a
219
+ * second place for that distinction to be got wrong.
220
+ */
221
+ export function vendorEngine(extractedEngineDir, targetDir) {
214
222
  const engineDir = path.join(targetDir, 'engine');
215
223
  fs.mkdirSync(engineDir, { recursive: true });
216
224
  for (const dir of VENDORED_DIRS) {
@@ -221,26 +229,18 @@ export function scaffoldProject(options) {
221
229
  fs.cpSync(source, path.join(engineDir, dir), { recursive: true });
222
230
  }
223
231
  copyOptionalEngineEntries(extractedEngineDir, engineDir);
224
- // The game: the genre baseline, then the template overlaid on top. Contents are copied, not
225
- // the directory itself — a nested src/work/<genre>/ would break every relative import in
226
- // Game.ts. This is a second copy of the same baseline vendored above as engine/genres/: that
227
- // copy feeds the engine's debug tooling, this one seeds the creator's game.
228
- //
229
- // Derived from the 'work' alias rather than restated as a literal, so this can't drift from
230
- // aliases.ts's sourceDir — which must stay 'src/work' because worldDataLoader.ts fetches that
231
- // literal path (see the comment there). copyContents creates parent directories, so the
232
- // intermediate src/ appears for free.
233
- const srcDir = path.join(targetDir, aliasSourceDir('work'));
234
- const genreDir = path.join(extractedEngineDir, 'genres', template.genre);
235
- if (!fs.existsSync(genreDir)) {
236
- throw new CliError(`The engine bundle has no baseline for genre "${template.genre}".`);
237
- }
238
- copyContents(genreDir, srcDir);
239
- const overlayDir = path.join(templatesDir, template.id, 'source');
240
- if (fs.existsSync(overlayDir)) {
241
- copyContents(overlayDir, srcDir);
242
- }
243
232
  copyServiceWorker(extractedEngineDir, targetDir);
233
+ }
234
+ /**
235
+ * Writes every generated file a Bitmagic project has — the platform-owned ones, and the
236
+ * creator-owned ones seeded once.
237
+ *
238
+ * Shared by `scaffoldProject` and `importProject` so the two lanes cannot drift on what a project
239
+ * contains. What belongs in PLATFORM_GENERATED_FILES, and what deliberately stays out of it, is
240
+ * argued on that constant.
241
+ */
242
+ export function writeProjectFiles(options) {
243
+ const { targetDir, metadata, projectName, idea, gameDesign = 'render' } = options;
244
244
  // Stamped as it is written, so a later `bitmagic upgrade` can tell whether the creator has
245
245
  // edited it since — see scaffold/agents-md.ts for what that decides. The pin goes in because the
246
246
  // file tells the agent which npm line this project's CLI comes from, and that is the environment's
@@ -253,7 +253,9 @@ export function scaffoldProject(options) {
253
253
  ['AGENTS.md', agentsMd],
254
254
  // Creator-owned from here on (see PLATFORM_GENERATED_FILES): the agent rewrites it as the
255
255
  // game takes shape, and `bitmagic cover` reads whatever it says at the time.
256
- ['GAME-DESIGN.md', renderGameDesignMd(idea)],
256
+ ...(gameDesign === 'render'
257
+ ? [['GAME-DESIGN.md', renderGameDesignMd(idea)]]
258
+ : []),
257
259
  ['CLAUDE.md', renderClaudeMd()],
258
260
  ['.gitignore', renderGitignore()],
259
261
  // Also creator-owned, and merged rather than rewritten by `upgrade` for that reason — this is
@@ -265,4 +267,33 @@ export function scaffoldProject(options) {
265
267
  writeProjectFile(targetDir, name, contents);
266
268
  }
267
269
  }
270
+ export function scaffoldProject(options) {
271
+ const { targetDir, extractedEngineDir, templatesDir, template, metadata, projectName, idea } = options;
272
+ vendorEngine(extractedEngineDir, targetDir);
273
+ // The game: the genre baseline, then the template overlaid on top. Contents are copied, not
274
+ // the directory itself — a nested src/work/<genre>/ would break every relative import in
275
+ // Game.ts. This is a second copy of the same baseline vendored above as engine/genres/: that
276
+ // copy feeds the engine's debug tooling, this one seeds the creator's game.
277
+ //
278
+ // Derived from the 'work' alias rather than restated as a literal, so this can't drift from
279
+ // aliases.ts's sourceDir — which must stay 'src/work' because worldDataLoader.ts fetches that
280
+ // literal path (see the comment there). copyContents creates parent directories, so the
281
+ // intermediate src/ appears for free.
282
+ const srcDir = path.join(targetDir, aliasSourceDir('work'));
283
+ const genreDir = path.join(extractedEngineDir, 'genres', template.genre);
284
+ if (!fs.existsSync(genreDir)) {
285
+ throw new CliError(`The engine bundle has no baseline for genre "${template.genre}".`);
286
+ }
287
+ copyContents(genreDir, srcDir);
288
+ const overlayDir = path.join(templatesDir, template.id, 'source');
289
+ if (fs.existsSync(overlayDir)) {
290
+ copyContents(overlayDir, srcDir);
291
+ }
292
+ writeProjectFiles({
293
+ targetDir,
294
+ metadata,
295
+ projectName,
296
+ ...(idea !== undefined ? { idea } : {}),
297
+ });
298
+ }
268
299
  //# sourceMappingURL=project.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/scaffold/project.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,gBAAgB,E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