@bitmagic/cli 0.1.65-dev.16 → 0.1.65-dev.17

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.
@@ -12,18 +12,16 @@
12
12
  * that redirection: which hosts are ours to fetch on the browser's behalf, and the reversible path
13
13
  * that carries one.
14
14
  *
15
- * The host suffixes are the same environment classification `rehost-imported-assets.ts` uses in
16
- * game-play-agent: `bitmagic.ai` is prod (`mini.bitmagic.ai`, `forged-assets.bitmagic.ai`, ...) and
17
- * `bitmagic.cloud` is dev/sandbox (`beta.portal.bitmagic.cloud`,
18
- * `magic-mesh-gen.sandbox.dev.bitmagic.cloud`, ...). Everything else is deliberately left alone:
19
- * `esm.sh` serves the import map's modules and already answers `*`, and an unrecognised host is
20
- * more likely to be a creator's own endpoint than an asset we should be relaying.
15
+ * The host allowlist itself lives in `@bitmagic/asset-core` (`managed-hosts.ts`) and is
16
+ * re-exported here, because api-server needs the same answer when it decides whether a
17
+ * caller-supplied library `assetUrl` may be stored — and two copies of a security-relevant
18
+ * allowlist drift. `esm.sh` and everything else is deliberately left alone: it serves the import
19
+ * map's modules and already answers `*`.
21
20
  */
21
+ import { isManagedAssetHost, MANAGED_HOST_SUFFIXES } from '@bitmagic/asset-core';
22
+ export { isManagedAssetHost, MANAGED_HOST_SUFFIXES };
22
23
  /** The bridge route every proxied asset is fetched through. Trailing slash included. */
23
24
  export declare const CDN_PROXY_PREFIX = "/__bm/cdn/";
24
- /** Host suffixes that identify a bitmagic-controlled asset host. See the file header. */
25
- export declare const MANAGED_HOST_SUFFIXES: readonly ["bitmagic.ai", "bitmagic.cloud"];
26
- export declare function isManagedAssetHost(hostname: string): boolean;
27
25
  /**
28
26
  * The same-origin path that stands in for `url`, or null when the URL is not ours to proxy.
29
27
  *
@@ -12,25 +12,16 @@
12
12
  * that redirection: which hosts are ours to fetch on the browser's behalf, and the reversible path
13
13
  * that carries one.
14
14
  *
15
- * The host suffixes are the same environment classification `rehost-imported-assets.ts` uses in
16
- * game-play-agent: `bitmagic.ai` is prod (`mini.bitmagic.ai`, `forged-assets.bitmagic.ai`, ...) and
17
- * `bitmagic.cloud` is dev/sandbox (`beta.portal.bitmagic.cloud`,
18
- * `magic-mesh-gen.sandbox.dev.bitmagic.cloud`, ...). Everything else is deliberately left alone:
19
- * `esm.sh` serves the import map's modules and already answers `*`, and an unrecognised host is
20
- * more likely to be a creator's own endpoint than an asset we should be relaying.
15
+ * The host allowlist itself lives in `@bitmagic/asset-core` (`managed-hosts.ts`) and is
16
+ * re-exported here, because api-server needs the same answer when it decides whether a
17
+ * caller-supplied library `assetUrl` may be stored — and two copies of a security-relevant
18
+ * allowlist drift. `esm.sh` and everything else is deliberately left alone: it serves the import
19
+ * map's modules and already answers `*`.
21
20
  */
21
+ import { isManagedAssetHost, MANAGED_HOST_SUFFIXES } from '@bitmagic/asset-core';
22
+ export { isManagedAssetHost, MANAGED_HOST_SUFFIXES };
22
23
  /** The bridge route every proxied asset is fetched through. Trailing slash included. */
23
24
  export const CDN_PROXY_PREFIX = '/__bm/cdn/';
24
- /** Host suffixes that identify a bitmagic-controlled asset host. See the file header. */
25
- export const MANAGED_HOST_SUFFIXES = ['bitmagic.ai', 'bitmagic.cloud'];
26
- /** A hostname with no port and no credentials — what a proxy path's first segment may hold. */
27
- const HOSTNAME = /^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/;
28
- export function isManagedAssetHost(hostname) {
29
- const host = hostname.toLowerCase();
30
- if (!HOSTNAME.test(host))
31
- return false;
32
- return MANAGED_HOST_SUFFIXES.some((suffix) => host === suffix || host.endsWith(`.${suffix}`));
33
- }
34
25
  /**
35
26
  * The same-origin path that stands in for `url`, or null when the URL is not ours to proxy.
36
27
  *
@@ -1 +1 @@
1
- {"version":3,"file":"asset-hosts.js","sourceRoot":"","sources":["../../src/mobile/asset-hosts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;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AAM,CAAC,IAAI,KAAK,EAAE,IAAI,MAAM,CAAC,QAAQ,KAAK,EAAE,IAAI,MAAM,CAAC,QAAQ,KAAK,EAAE;QAAE,OAAO,IAAI,CAAC;IACxF,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,QAAQ,CAAC;QAAE,OAAO,IAAI,CAAC;IACtD,OAAO,GAAG,gBAAgB,GAAG,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;AACnF,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,aAAa,CAAC,WAAmB;IAC/C,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,gBAAgB,CAAC;QAAE,OAAO,IAAI,CAAC;IAC3D,MAAM,IAAI,GAAG,WAAW,CAAC,KAAK,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACxD,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAChC,IAAI,KAAK,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IAC5B,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC;IAChD,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IAC3C,OAAO,WAAW,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;AAC/C,CAAC"}
@@ -0,0 +1,30 @@
1
+ export declare function characterSearchPath(root: string): string;
2
+ /** One row as the search displayed it. The shape `libraryPick` needs, plus the caption. */
3
+ export interface CharacterCandidate {
4
+ sid: string;
5
+ assetUrl: string;
6
+ description: string;
7
+ subject: string | null;
8
+ similarity: number;
9
+ }
10
+ export interface CharacterSearchRecord {
11
+ /** The prompt that produced this list — `add --id` reuses it as the asset's brief. */
12
+ prompt: string;
13
+ /** Which shelf was searched. `add` sends the matching `voxelize` so the media cannot cross. */
14
+ representation: 'voxel' | 'lowpoly';
15
+ /** The floor automatic substitution would have applied, for the "auto" column. */
16
+ threshold: number;
17
+ searchedAt: string;
18
+ candidates: CharacterCandidate[];
19
+ }
20
+ /** The last search, or null when there is none to trust. */
21
+ export declare function readCharacterSearch(root: string): CharacterSearchRecord | null;
22
+ export declare function writeCharacterSearch(root: string, record: CharacterSearchRecord): void;
23
+ /**
24
+ * The cached row with this id, or null.
25
+ *
26
+ * Case-insensitive on the id because a creator reads it off a table and retypes
27
+ * it, and the corpus uses one case throughout — so a capital letter is a typo
28
+ * with an obvious intent, not a different character.
29
+ */
30
+ export declare function findCachedCandidate(record: CharacterSearchRecord, sid: string): CharacterCandidate | null;
@@ -0,0 +1,82 @@
1
+ /**
2
+ * The candidates the last `bitmagic character search` returned, so
3
+ * `bitmagic character add --id <sid>` can name one of them.
4
+ *
5
+ * The search already fetched every row it displayed — sid, URL, caption and
6
+ * score. Keeping them means `add --id` needs nothing but the id: no second
7
+ * query, no re-ranking, and no asking the creator to retype the prompt that
8
+ * produced the list they are looking at. It also means `add` cannot drift from
9
+ * what was on screen, which a re-search could (the catalogue grows).
10
+ *
11
+ * Lives under `.bitmagic/` like `reference.json` and `cover.json`: generated,
12
+ * machine-written state. NOT in `bitmagic.json`, deliberately — that file is
13
+ * inside the publish fingerprint (shared/asset-core's publish-source.ts), so
14
+ * recording a search there would invalidate a passing `bitmagic verify` every
15
+ * time somebody browsed the shelf.
16
+ *
17
+ * Readers are lenient, like `readCoverRecord` and the reference records: a
18
+ * corrupt or absent file reads as "no search yet", because the worst case is one
19
+ * re-run of a free command, and a hard error would wedge the very command that
20
+ * would have replaced the bad file.
21
+ *
22
+ * There is deliberately no expiry. The catalogue only changes when someone
23
+ * promotes to it, and a stale row fails loudly and harmlessly (the URL 404s) —
24
+ * where a timeout would expire a list the creator is still reading. `add` prints
25
+ * the search's own timestamp instead, so age is visible rather than enforced.
26
+ */
27
+ import * as path from 'path';
28
+ import { readJsonFile, writeJsonAtomic } from '../atomic-json.js';
29
+ const SEARCH_FILE = path.join('.bitmagic', 'character-search.json');
30
+ export function characterSearchPath(root) {
31
+ return path.join(root, SEARCH_FILE);
32
+ }
33
+ function isCandidate(value) {
34
+ if (typeof value !== 'object' || value === null)
35
+ return false;
36
+ const row = value;
37
+ return typeof row.sid === 'string' && row.sid !== ''
38
+ && typeof row.assetUrl === 'string' && row.assetUrl !== ''
39
+ && typeof row.similarity === 'number';
40
+ }
41
+ /** The last search, or null when there is none to trust. */
42
+ export function readCharacterSearch(root) {
43
+ const raw = readJsonFile(characterSearchPath(root));
44
+ if (typeof raw !== 'object' || raw === null)
45
+ return null;
46
+ const record = raw;
47
+ if (typeof record.prompt !== 'string')
48
+ return null;
49
+ if (record.representation !== 'voxel' && record.representation !== 'lowpoly')
50
+ return null;
51
+ if (!Array.isArray(record.candidates))
52
+ return null;
53
+ const candidates = record.candidates.filter(isCandidate).map((row) => ({
54
+ sid: row.sid,
55
+ assetUrl: row.assetUrl,
56
+ description: typeof row.description === 'string' ? row.description : '',
57
+ subject: typeof row.subject === 'string' ? row.subject : null,
58
+ similarity: row.similarity,
59
+ }));
60
+ return {
61
+ prompt: record.prompt,
62
+ representation: record.representation,
63
+ threshold: typeof record.threshold === 'number' ? record.threshold : 0,
64
+ searchedAt: typeof record.searchedAt === 'string' ? record.searchedAt : '',
65
+ candidates,
66
+ };
67
+ }
68
+ export function writeCharacterSearch(root, record) {
69
+ writeJsonAtomic(characterSearchPath(root), record);
70
+ }
71
+ /**
72
+ * The cached row with this id, or null.
73
+ *
74
+ * Case-insensitive on the id because a creator reads it off a table and retypes
75
+ * it, and the corpus uses one case throughout — so a capital letter is a typo
76
+ * with an obvious intent, not a different character.
77
+ */
78
+ export function findCachedCandidate(record, sid) {
79
+ const wanted = sid.trim().toLowerCase();
80
+ return record.candidates.find((row) => row.sid.toLowerCase() === wanted) ?? null;
81
+ }
82
+ //# sourceMappingURL=character-search.js.map
@@ -0,0 +1 @@
1
+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AU,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC;AACnF,CAAC"}
@@ -60,7 +60,7 @@ any kind; this path is for places that are designed, not grown.
60
60
  assumes voxels until told otherwise: put \`"artStyle": "low-poly"\` at the top level of
61
61
  \`src/work/game.json\` (or scaffold with \`bitmagic init --art-style low-poly\`). That one field
62
62
  switches the cover and reference prompts to low-poly, makes \`assets add\` and \`generate model|prop\`
63
- keep meshes instead of voxelizing, makes \`generate character\` keep the textured rig, drops the
63
+ keep meshes instead of voxelizing, makes \`bitmagic character generate\` keep the textured rig, drops the
64
64
  engine's voxel lighting/bloom presets, and gives \`bitmagic judge\` the medium when
65
65
  \`## Art direction\` is missing. Set it before the first cover, or the cover is a picture of cubes.
66
66
 
@@ -600,7 +600,8 @@ bitmagic assets add build/level/<name>.glb --name <name> --keep-glb --asset-id l
600
600
  | \`bitmagic cover\`, \`bitmagic reference make\` | MagicaVoxel-style prompt lead and tail | flat-shaded low-poly lead and tail; same image model |
601
601
  | \`bitmagic assets add x.glb\` | voxelized in a headless browser | kept as a \`glb\` asset (\`--voxelize\` to bake) |
602
602
  | \`bitmagic generate model\` / \`prop\` | voxel master baked in the browser | mesh generated, re-uploaded, registered as \`glb\` (\`--voxelize\` to bake) |
603
- | \`bitmagic generate character\` | voxelized rig, library search | textured low-poly rig, its own library shelf where enabled (\`--voxelize\` to override) |
603
+ | \`bitmagic character generate\` | voxelized rig, library search | textured low-poly rig, its own library shelf where enabled (\`--voxelize\` to override) |
604
+ | \`bitmagic character search\` / \`add\` | searches the voxel shelf | searches the low-poly shelf; free, never forges |
604
605
  | \`bitmagic generate vehicle\` | voxel car | voxel car anyway — the builder is voxel-native; it says so |
605
606
  | engine on load | sunset hemisphere light + faint bloom | neither; \`MeshLevel\`'s own lighting stands |
606
607
  | \`bitmagic judge\` with no \`## Art direction\` | grades style as it finds it | judges within low-poly |
@@ -1 +1 @@
1
- {"version":3,"file":"blender-level-skill-files.js","sourceRoot":"","sources":["../../src/scaffold/blender-level-skill-files.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,MAAM,UAAU,wBAAwB;IACtC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8QR,CAAC;AACF,CAAC;AAED,MAAM,UAAU,iCAAiC;IAC/C,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyFR,CAAC;AACF,CAAC;AAED,MAAM,UAAU,4BAA4B;IAC1C,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2FR,CAAC;AACF,CAAC;AAED,MAAM,UAAU,4BAA4B;IAC1C,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyER,CAAC;AACF,CAAC;AAED,MAAM,UAAU,mCAAmC;IACjD,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+GR,CAAC;AACF,CAAC"}
1
+ {"version":3,"file":"blender-level-skill-files.js","sourceRoot":"","sources":["../../src/scaffold/blender-level-skill-files.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,MAAM,UAAU,wBAAwB;IACtC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8QR,CAAC;AACF,CAAC;AAED,MAAM,UAAU,iCAAiC;IAC/C,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyFR,CAAC;AACF,CAAC;AAED,MAAM,UAAU,4BAA4B;IAC1C,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2FR,CAAC;AACF,CAAC;AAED,MAAM,UAAU,4BAA4B;IAC1C,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyER,CAAC;AACF,CAAC;AAED,MAAM,UAAU,mCAAmC;IACjD,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgHR,CAAC;AACF,CAAC"}
@@ -1079,7 +1079,7 @@ bitmagic generate block-type --name mossy_brick --description "damp green moss o
1079
1079
  bitmagic generate sound --prompt "heavy wooden door slamming" [--duration 3] [--loop]
1080
1080
  bitmagic generate music --prompt "driving synthwave, no vocals" [--duration 30] [--instrumental] [--out bed.mp3 --no-world]
1081
1081
  bitmagic generate image --name hero-portrait --prompt "..." [--width 512] [--height 512]
1082
- bitmagic generate character --name guard --prompt "..." [--apply-to-player] [--no-library]
1082
+ bitmagic character generate --name guard --prompt "..." [--apply-to-player] [--fresh] # or FREE off the shelf: character search --prompt "..." then character add --name guard --id <sid>
1083
1083
  bitmagic generate animation --family gait --name LimpStride --based-on walk [--dial limpSide=right]
1084
1084
  bitmagic generate animation --spec clip.json # melee and oneShot clips: a spec file
1085
1085
  bitmagic generate video --prompt "the castle gates swing open" [--duration 5] [--image cover.png]
@@ -1087,7 +1087,7 @@ bitmagic generate model --prompt "a mossy stone arch" [--height 3]
1087
1087
  bitmagic generate vehicle --prompt "a rusty orange pickup" | --preset VAN
1088
1088
  \`\`\`
1089
1089
 
1090
- Run \`bitmagic generate <type> --help\` for the full flags of any one.
1090
+ Run \`bitmagic generate <type> --help\` for the full flags of any one, or \`bitmagic character <verb> --help\` — characters are their own group, where \`generate\` costs sparks and \`search\`/\`add\` are free because they use the ready-made library instead of forging.
1091
1091
 
1092
1092
  **Always add \`--original-prompt "<creator's request, verbatim>"\`** — to EVERY \`bitmagic\` command, \`build\`/\`verify\`/\`dev\`/\`reload\`/\`publish\` included. Never affects output; it is what counts the prompts shown on the game's public page.
1093
1093
 
@@ -1535,7 +1535,7 @@ The \`bitmagic\` CLI generates content directly into this project. Eleven types
1535
1535
  | \`bitmagic generate sound --prompt "..."\` | a sound effect | \`assets[]\` |
1536
1536
  | \`bitmagic generate music --prompt "..." [--duration 30]\` | a music track (loops by default; billed per second) | \`assets[]\` (or a file with \`--out <mp3> --no-world\`) |
1537
1537
  | \`bitmagic generate image --name <id> --prompt "..."\` | a 2D image | \`assets[]\` |
1538
- | \`bitmagic generate character --name <id> --prompt "..."\` | a rigged character (a close-enough ready-made one when the library has it, in seconds; \`--no-library\` always makes a new one) | \`assets[]\` |
1538
+ | \`bitmagic character generate --name <id> --prompt "..."\` | a rigged character; substitutes a close-enough ready-made one when the library has it (\`--fresh\` always forges). \`character search --prompt "..."\` then \`character add --name <id> --id <sid>\` instead is **free** and never forges — prefer it when any plausible body will do | \`assets[]\` |
1539
1539
  | \`bitmagic generate animation --family gait ...\` or \`--spec <file>\` | an animation clip | \`assets[]\` |
1540
1540
  | \`bitmagic generate video --prompt "..." [--duration 5] [--image <png>]\` | a short 720p clip for a cutscene (billed per second) | \`assets[]\`, played with \`engine.playVideo("<id>")\` |
1541
1541
  | \`bitmagic generate model --prompt "..."\` | a new 3D model | \`assets[]\` |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitmagic/cli",
3
- "version": "0.1.65-dev.16",
3
+ "version": "0.1.65-dev.17",
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.20-dev.16",
29
- "@bitmagic/world-forger": "0.1.25-dev.16",
30
- "@bitmagic/asset-core": "0.2.20-dev.16"
28
+ "@bitmagic/animation-forger": "0.1.20-dev.17",
29
+ "@bitmagic/asset-core": "0.2.20-dev.17",
30
+ "@bitmagic/world-forger": "0.1.25-dev.17"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@eslint/js": "^9.38.0",