@bendyline/molen-tooling 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/capture/harness.js +216 -216
- package/dist/capture/worldgen-preview.js +288 -288
- package/dist/cli.mjs +110 -10
- package/dist/docs-src/guide/3d-model-assets.md +35 -3
- package/dist/docs-src/guide/adaptive-performance.md +4 -0
- package/dist/docs-src/guide/agent-loop.md +6 -6
- package/dist/docs-src/guide/aircraft.md +16 -7
- package/dist/docs-src/guide/audio.md +247 -0
- package/dist/docs-src/guide/browser-mount.md +3 -1
- package/dist/docs-src/guide/building-interiors.md +5 -4
- package/dist/docs-src/guide/determinism.md +12 -12
- package/dist/docs-src/guide/earth-view.md +444 -0
- package/dist/docs-src/guide/entities.md +1 -1
- package/dist/docs-src/guide/examples.md +2 -1
- package/dist/docs-src/guide/game-samples.md +21 -4
- package/dist/docs-src/guide/graphics-performance.md +40 -8
- package/dist/docs-src/guide/input.md +9 -0
- package/dist/docs-src/guide/markers.md +52 -0
- package/dist/docs-src/guide/materials.md +10 -3
- package/dist/docs-src/guide/navigation.md +144 -0
- package/dist/docs-src/guide/project.md +1 -1
- package/dist/docs-src/guide/quickstart.md +2 -2
- package/dist/docs-src/guide/recognizable-places.md +3 -2
- package/dist/docs-src/guide/scripting.md +4 -2
- package/dist/docs-src/guide/sky.md +16 -0
- package/dist/docs-src/guide/source-bundles.md +0 -1
- package/dist/docs-src/guide/structure-library.md +2 -2
- package/dist/docs-src/guide/terrain.md +45 -2
- package/dist/docs-src/guide/vehicles.md +18 -9
- package/dist/docs-src/guide/worldgen.md +3 -3
- package/dist/docs-src/llms.txt +10 -4
- package/dist/docs-src/schemas/README.md +3 -0
- package/dist/docs-src/schemas/archive-set.md +175 -0
- package/dist/docs-src/schemas/components.md +1104 -1
- package/dist/docs-src/schemas/matgraph.md +6 -0
- package/dist/docs-src/schemas/soundbank.md +251 -0
- package/dist/docs-src/schemas/structure-placements.md +496 -0
- package/dist/docs-src/schemas/terrain-package.md +120 -0
- package/dist/index.d.mts +5 -1
- package/dist/index.mjs +1 -1
- package/dist/{mcp-AOfIp89b.mjs → mcp-BTVwVKFb.mjs} +67 -3
- package/dist/{ops-C4BvDgP-.mjs → ops-BPdHodFR.mjs} +915 -29
- package/dist/templates/city-courier/README.md +13 -0
- package/dist/templates/city-courier/delivery-run.replay.json +151 -151
- package/dist/templates/city-courier/gen/molen-types.ts +142 -4
- package/dist/templates/city-courier/package.json +1 -0
- package/dist/templates/city-courier/scene.json +79 -0
- package/dist/templates/city-courier/scripts/game.ts +5 -1
- package/dist/templates/city-courier/scripts/molen-scripts.d.ts +167 -4
- package/dist/templates/city-courier/src/audio.ts +96 -0
- package/dist/templates/city-courier/src/game-shell.css +8 -0
- package/dist/templates/city-courier/src/main.ts +3 -0
- package/dist/templates/city-courier/test/headless.test.ts +1 -1
- package/dist/templates/index.json +3 -0
- package/dist/templates/skybound/README.md +13 -0
- package/dist/templates/skybound/first-leap.replay.json +152 -152
- package/dist/templates/skybound/gen/molen-types.ts +142 -4
- package/dist/templates/skybound/package.json +1 -0
- package/dist/templates/skybound/scene.json +40 -0
- package/dist/templates/skybound/scripts/game.ts +8 -5
- package/dist/templates/skybound/scripts/molen-scripts.d.ts +167 -4
- package/dist/templates/skybound/src/audio.ts +96 -0
- package/dist/templates/skybound/src/game-shell.css +8 -0
- package/dist/templates/skybound/src/main.ts +3 -0
- package/dist/templates/skybound/test/headless.test.ts +1 -1
- package/dist/templates/top-down-arena/README.md +14 -1
- package/dist/templates/top-down-arena/arena-skirmish.replay.json +152 -152
- package/dist/templates/top-down-arena/package.json +1 -0
- package/dist/templates/top-down-arena/scene.json +20 -0
- package/dist/templates/top-down-arena/scripts/combat.ts +1 -0
- package/dist/templates/top-down-arena/scripts/molen-scripts.d.ts +167 -4
- package/dist/templates/top-down-arena/src/audio.ts +96 -0
- package/dist/templates/top-down-arena/src/gen/molen-types.ts +142 -4
- package/dist/templates/top-down-arena/src/main.ts +3 -0
- package/dist/templates/top-down-arena/test/headless.test.ts +1 -1
- package/package.json +11 -11
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as inspectContentPack, C as checkTypesOp, D as buildContentPack, E as reserveNamespace, F as listFigurePresets, H as formatOp, I as exportFrames, K as
|
|
1
|
+
import { $ as packAsset, A as inspectContentPack, C as checkTypesOp, D as buildContentPack, E as reserveNamespace, F as listFigurePresets, G as planAudio, H as formatOp, I as exportFrames, K as importSound, L as driveScene, M as generateTypes, O as extractContentPack, P as previewFigure, Q as formatPacked, S as rasterizeMaterial, T as projectInfo, U as checkScripts, V as describeOps, X as screenshotAsset, Y as stageAssets, _ as loadComponentRegistry, b as diffSnapshots, c as validateAsset, d as runSimulation, et as inspectAsset, f as screenshotScene, g as listSchemasOp, h as listComponentsOp, i as bakeWorldgen, j as verifyContentPack, k as fetchContentPack, l as applyUvPaintOp, m as getSchemaOp, n as worldgenStats, p as getComponentOp, q as checkSoundbank, r as previewWorldgen, rt as importAsset, tt as listAssets, u as testTypes, ut as playExperience, v as scaffoldExperience, w as listTypes, x as runReplayFile, y as listTemplates, z as searchDocs } from "./ops-BPdHodFR.mjs";
|
|
2
2
|
import { mkdtemp, readFile, rm } from "node:fs/promises";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { z } from "zod";
|
|
@@ -167,7 +167,7 @@ function createMcpServer() {
|
|
|
167
167
|
}, async (args) => {
|
|
168
168
|
const r = await runReplayFile(args);
|
|
169
169
|
if (r.error !== void 0) return text(r.error, true);
|
|
170
|
-
return text(r.report ?? (r.ok ? "✓ replay matches" : "
|
|
170
|
+
return text(r.report ?? (r.ok ? "✓ replay matches" : "× replay diverged"), !r.ok);
|
|
171
171
|
});
|
|
172
172
|
server.registerTool("apply_uv_paint", {
|
|
173
173
|
title: "Apply UV paint",
|
|
@@ -503,7 +503,7 @@ function createMcpServer() {
|
|
|
503
503
|
}, async (args) => {
|
|
504
504
|
const r = await testTypes(args);
|
|
505
505
|
if (r.error !== void 0) return text(r.error, true);
|
|
506
|
-
return text((r.results ?? []).map((t) => `${t.ok ? "✓" : "
|
|
506
|
+
return text((r.results ?? []).map((t) => `${t.ok ? "✓" : "×"} ${t.id}${t.error !== void 0 ? ` — ${t.error}` : ""}${t.issues !== void 0 ? ` — ${t.issues.map((i) => i.message).join("; ")}` : ""}`).join("\n") || "(no types registered)", !r.ok);
|
|
507
507
|
});
|
|
508
508
|
server.registerTool("import_asset", {
|
|
509
509
|
title: "Import asset",
|
|
@@ -512,6 +512,7 @@ function createMcpServer() {
|
|
|
512
512
|
path: z.string(),
|
|
513
513
|
id: z.string().optional(),
|
|
514
514
|
outDir: z.string().optional(),
|
|
515
|
+
assetDir: z.string().optional(),
|
|
515
516
|
trimesh: z.boolean().optional(),
|
|
516
517
|
optimize: z.boolean().optional(),
|
|
517
518
|
projectPath: z.string().optional(),
|
|
@@ -645,6 +646,69 @@ function createMcpServer() {
|
|
|
645
646
|
if (!r.ok) return text(r.error ?? "pack fetch failed", true);
|
|
646
647
|
return text([...(r.packs ?? []).map((pack) => `${pack.id}@${pack.version} -> ${r.outDir}/${pack.file} (${pack.size} bytes)`), r.projectPath !== void 0 ? `pinned in ${r.projectPath}` : "no project.json to pin in"].join("\n"));
|
|
647
648
|
});
|
|
649
|
+
server.registerTool("plan_audio", {
|
|
650
|
+
title: "Plan a scene's audio",
|
|
651
|
+
description: "Run a scene headlessly and list the sounds it would play: looping voices with start/stop ticks, peak gain and pitch range, one-shots by tick, audio.* script events, plus unknown sound ids and signals. Sound banks come from bankPaths or the project's packs (provides.soundbank). Returns the text timeline followed by the JSON report.",
|
|
652
|
+
inputSchema: {
|
|
653
|
+
scenePath: z.string(),
|
|
654
|
+
ticks: z.number().int().positive(),
|
|
655
|
+
bankPaths: z.array(z.string()).optional(),
|
|
656
|
+
commandsPath: z.string().optional(),
|
|
657
|
+
setupModule: z.string().optional(),
|
|
658
|
+
listener: z.string().optional(),
|
|
659
|
+
mode: z.string().optional(),
|
|
660
|
+
weather: z.string().optional(),
|
|
661
|
+
daylight: z.number().min(0).max(1).optional(),
|
|
662
|
+
projectPath: z.string().optional()
|
|
663
|
+
}
|
|
664
|
+
}, async (args) => {
|
|
665
|
+
const r = await planAudio(args);
|
|
666
|
+
if (r.error !== void 0) return text(r.error, true);
|
|
667
|
+
const { timeline, ...report } = r;
|
|
668
|
+
return text(`${timeline}\n\n${JSON.stringify(report, null, 2)}`, !r.ok);
|
|
669
|
+
});
|
|
670
|
+
server.registerTool("import_sound", {
|
|
671
|
+
title: "Import a sound",
|
|
672
|
+
description: "Add an audio clip to a molen/soundbank@1 file: copy it beside the bank, hash it, probe its duration, record license and provenance (source url, site, author, or prompt + generator). append adds a variation to an existing sound id. Rejects a license the bank policy does not allow.",
|
|
673
|
+
inputSchema: {
|
|
674
|
+
file: z.string(),
|
|
675
|
+
id: z.string(),
|
|
676
|
+
bankPath: z.string(),
|
|
677
|
+
license: z.string(),
|
|
678
|
+
source: z.string().optional(),
|
|
679
|
+
site: z.string().optional(),
|
|
680
|
+
author: z.string().optional(),
|
|
681
|
+
prompt: z.string().optional(),
|
|
682
|
+
generator: z.string().optional(),
|
|
683
|
+
description: z.string().optional(),
|
|
684
|
+
loop: z.boolean().optional(),
|
|
685
|
+
loopStart: z.number().nonnegative().optional(),
|
|
686
|
+
loopEnd: z.number().nonnegative().optional(),
|
|
687
|
+
bus: z.string().optional(),
|
|
688
|
+
gain: z.number().nonnegative().optional(),
|
|
689
|
+
durationS: z.number().positive().optional(),
|
|
690
|
+
append: z.boolean().optional(),
|
|
691
|
+
copyTo: z.string().optional()
|
|
692
|
+
}
|
|
693
|
+
}, async (args) => {
|
|
694
|
+
const r = await importSound(args);
|
|
695
|
+
const notes = r.warnings.map((w) => `! ${w}`).join("\n");
|
|
696
|
+
if (!r.ok) return text([notes, r.error ?? "import failed"].filter(Boolean).join("\n"), true);
|
|
697
|
+
return text([
|
|
698
|
+
notes,
|
|
699
|
+
`${r.id}: ${r.clip} -> ${r.bankPath}`,
|
|
700
|
+
JSON.stringify(r.entry, null, 2)
|
|
701
|
+
].filter(Boolean).join("\n"));
|
|
702
|
+
});
|
|
703
|
+
server.registerTool("check_soundbank", {
|
|
704
|
+
title: "Check a sound bank",
|
|
705
|
+
description: "Check a molen/soundbank@1 file and every clip it names: files present, hashes unchanged since import, durations and loop points consistent, provenance recorded. Returns issues and a license summary as JSON.",
|
|
706
|
+
inputSchema: { bankPath: z.string() }
|
|
707
|
+
}, async (args) => {
|
|
708
|
+
const r = await checkSoundbank(args);
|
|
709
|
+
if (r.error !== void 0) return text(r.error, true);
|
|
710
|
+
return text(JSON.stringify(r, null, 2), !r.ok);
|
|
711
|
+
});
|
|
648
712
|
server.registerTool("list_assets", {
|
|
649
713
|
title: "List assets",
|
|
650
714
|
description: "List the assets registered in the surrounding project.",
|