@fleox/agent3d 0.2.3 → 0.3.1

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 (70) hide show
  1. package/README.md +20 -13
  2. package/changelog.json +26 -0
  3. package/dist/agent/agent3d.mjs +228 -53
  4. package/dist/agent/chunks/{assets-BUUM9TUB.mjs → assets-YBkgdfgy.mjs} +27 -8
  5. package/dist/agent/chunks/{browser-Br1tURgt.mjs → browser-Dil7VM5m.mjs} +1 -1
  6. package/dist/agent/chunks/{cdp-Bdtm4fBN.mjs → cdp-DLEis_Z3.mjs} +1 -1
  7. package/dist/agent/chunks/{check-CfZcfaPs.mjs → check-DP9fRYbK.mjs} +64 -4
  8. package/dist/agent/chunks/depth-BZT4gseQ.mjs +483 -0
  9. package/dist/agent/chunks/depth-CD_ql3QJ.mjs +190 -0
  10. package/dist/agent/chunks/{export-BHugc2H7.mjs → export-bJwh2SqG.mjs} +12 -6
  11. package/dist/agent/chunks/{imageCodec-QM0EXQDJ.mjs → imageCodec-DeGfmBp3.mjs} +3 -3
  12. package/dist/agent/chunks/{objects-DBAws7uf.mjs → objects-DuytRxiC.mjs} +3 -3
  13. package/dist/agent/chunks/{optimizeSizing-CkZ3fZRp.mjs → optimizeSizing-B-BBiUkD.mjs} +51 -3
  14. package/dist/agent/chunks/{package-fw4h5vsh.mjs → package-fMbw9UGh.mjs} +2 -1
  15. package/dist/agent/chunks/{render-EHb40avl.mjs → render-B05DU4Q5.mjs} +4 -4
  16. package/dist/agent/chunks/{scene-BgajNvBf.mjs → scene-DWgXH6As.mjs} +2 -2
  17. package/dist/agent/chunks/{server-CACCerkZ.mjs → server-Dt_YFvN7.mjs} +6 -2
  18. package/dist/agent/chunks/{tools-DKxgjQSJ.mjs → tools-Cm4BqDkO.mjs} +60 -6
  19. package/dist/agent/chunks/{tree-BrNYGui2.mjs → tree-CqSj-o8T.mjs} +1 -0
  20. package/dist/agent/ort/LICENSE.txt +9 -0
  21. package/dist/agent/ort/ort-wasm-simd-threaded.wasm +0 -0
  22. package/dist/agent/ort/ort.wasm.bundle.min.mjs +9 -0
  23. package/dist/runtime/agent3d-runtime.js +6 -6
  24. package/dist/runtime/agent3d-runtime.single.js +311 -62
  25. package/dist/runtime/chunks/assets-qnxDnVkj.js +1 -0
  26. package/dist/runtime/chunks/materials-dC4vDNHh.js +107 -0
  27. package/dist/runtime/chunks/{model-DbfZaLni.js → model-BCAl_NRl.js} +1 -1
  28. package/dist/runtime/chunks/photo-DNf14X7B.js +250 -0
  29. package/dist/runtime/chunks/svg-CLUxY6Zy.js +1 -0
  30. package/dist/runtime/chunks/{text-BaON-ISS.js → text-rSo_2Luk.js} +2 -2
  31. package/dist/studio/assets/assets-BW5lQkYR.js +1 -0
  32. package/dist/studio/assets/{camera-Be6lnp3k.js → camera-BgzPVnn-.js} +1 -1
  33. package/dist/studio/assets/{editor-Mpnz-b2E.js → editor-NkBUKsDB.js} +1 -1
  34. package/dist/studio/assets/{game-WMgRSJUD.js → game-DARpu0ah.js} +3 -3
  35. package/dist/studio/assets/{generators-DozXE7ta.js → generators-BjIs-kHx.js} +1 -1
  36. package/dist/studio/assets/index-L-N-e2KM.js +479 -0
  37. package/dist/studio/assets/{model-C2bZTK7-.js → model-CqI8j03Z.js} +1 -1
  38. package/dist/studio/assets/params-DhsDKSDs.js +1 -0
  39. package/dist/studio/assets/photo-DAHd1yNF.js +250 -0
  40. package/dist/studio/assets/{physicsHost-CTRsIvfu.js → physicsHost-tEUto2-_.js} +1 -1
  41. package/dist/studio/assets/{postfx-DQtp0JIy.js → postfx-BGu30OJK.js} +1 -1
  42. package/dist/studio/assets/runtime-C_qkIpAK.js +572 -0
  43. package/dist/studio/assets/{shaders-BOb6Uter.js → shaders-Dt6FGXH_.js} +12 -12
  44. package/dist/studio/assets/svg-ZZt5MdNf.js +2 -0
  45. package/dist/studio/assets/{text-CGIZs8HE.js → text-B-HM422i.js} +2 -2
  46. package/dist/studio/index.html +1 -1
  47. package/package.json +2 -1
  48. package/plugin/.claude-plugin/plugin.json +1 -1
  49. package/plugin/skills/agent3d-assets/SKILL.md +40 -25
  50. package/plugin/skills/agent3d-create/SKILL.md +57 -21
  51. package/plugin/skills/agent3d-create/references/art-direction.md +3 -3
  52. package/plugin/skills/agent3d-create/references/recipes.md +71 -6
  53. package/plugin/skills/agent3d-edit/SKILL.md +22 -22
  54. package/plugin/skills/agent3d-edit/references/patch-ops.md +11 -3
  55. package/plugin/skills/agent3d-game/SKILL.md +7 -7
  56. package/plugin/skills/agent3d-publish/SKILL.md +23 -21
  57. package/plugin/skills/agent3d-publish/references/integrations.md +1 -1
  58. package/templates/hero-photo-3d/README.md +28 -0
  59. package/templates/hero-photo-3d/agent3d.json +8 -0
  60. package/templates/hero-photo-3d/assets/depth/street-depth.png +0 -0
  61. package/templates/hero-photo-3d/assets/manifest.json +25 -0
  62. package/templates/hero-photo-3d/assets/textures/street.webp +0 -0
  63. package/templates/hero-photo-3d/preview.png +0 -0
  64. package/templates/hero-photo-3d/scene.json +120 -0
  65. package/templates/hero-photo-3d/template.json +8 -0
  66. package/dist/runtime/chunks/materials-w3EW0g-7.js +0 -107
  67. package/dist/runtime/chunks/svg-CfPIQnDG.js +0 -1
  68. package/dist/studio/assets/index-tSGZFEt5.js +0 -479
  69. package/dist/studio/assets/runtime-NGp1VdnH.js +0 -572
  70. package/dist/studio/assets/svg-CnUMpv_N.js +0 -2
@@ -6,11 +6,11 @@ __a3dRequire(import.meta.url);
6
6
  const __filename = __a3dPath(import.meta.url);
7
7
  __a3dDirname(__filename);
8
8
  import { t as __exportAll } from "./chunks/rolldown-runtime-ebOQtxsr.mjs";
9
- import { r as version, t as package_default } from "./chunks/package-fw4h5vsh.mjs";
9
+ import { r as version, t as package_default } from "./chunks/package-fMbw9UGh.mjs";
10
10
  import { n as didYouMean, r as listOptions, t as closest } from "./chunks/suggest-Cpcgv1RP.mjs";
11
11
  import { format, parseArgs } from "node:util";
12
12
  import { createReadStream, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, realpathSync, rmSync, statSync, watch, writeFileSync } from "node:fs";
13
- import { inflateRawSync } from "node:zlib";
13
+ import { deflateSync, inflateRawSync } from "node:zlib";
14
14
  import { mkdir, readFile, readdir, rm, stat, writeFile } from "node:fs/promises";
15
15
  import { createHash } from "node:crypto";
16
16
  import { tmpdir } from "node:os";
@@ -62,6 +62,7 @@ var TOOL_COMMANDS = {
62
62
  assets_search: "agent3d assets search",
63
63
  assets_add: "agent3d assets add",
64
64
  assets_optimize: "agent3d assets optimize",
65
+ image_depth: "agent3d assets depth",
65
66
  library_list: "agent3d assets library",
66
67
  render_preview: "agent3d render"
67
68
  };
@@ -171,6 +172,10 @@ function readVersionInfo() {
171
172
  };
172
173
  }
173
174
  package_default.name;
175
+ var ORT_FILES = ["ort.wasm.bundle.min.mjs", "ort-wasm-simd-threaded.wasm"];
176
+ function ortDir() {
177
+ return [join(distRoot(), "agent", "ort"), join(packageRoot(), "node_modules", "onnxruntime-web", "dist")].find((d) => ORT_FILES.every((f) => existsSync(join(d, f)))) ?? null;
178
+ }
174
179
  // src/core/fs.ts
175
180
  var FsError = class extends Error {
176
181
  code;
@@ -4586,7 +4591,8 @@ var OBJECT_KINDS$1 = [
4586
4591
  "generator",
4587
4592
  "particles",
4588
4593
  "instances",
4589
- "svg"
4594
+ "svg",
4595
+ "photo"
4590
4596
  ];
4591
4597
  var LIGHT_TYPES = [
4592
4598
  "ambient",
@@ -4713,6 +4719,36 @@ var AUDIO_EXT = [
4713
4719
  ".webm"
4714
4720
  ];
4715
4721
  var SVG_EXT = [".svg"];
4722
+ var PHOTO_EXT = [
4723
+ ".jpg",
4724
+ ".jpeg",
4725
+ ".png",
4726
+ ".webp"
4727
+ ];
4728
+ var PHOTO_MODES = [
4729
+ "parallax",
4730
+ "mesh",
4731
+ "layers"
4732
+ ];
4733
+ var PHOTO_AUTO_MOTIONS = [
4734
+ "none",
4735
+ "sway",
4736
+ "orbit",
4737
+ "zoom"
4738
+ ];
4739
+ var PHOTO_MOTION_KEYS = [
4740
+ "pointer",
4741
+ "scroll",
4742
+ "gyro",
4743
+ "auto",
4744
+ "speed",
4745
+ "smoothing"
4746
+ ];
4747
+ var PHOTO_MATERIAL_KEYS = [
4748
+ "opacity",
4749
+ "color",
4750
+ "emissiveIntensity"
4751
+ ];
4716
4752
  var BASE_OBJECT_KEYS = [
4717
4753
  "id",
4718
4754
  "kind",
@@ -4783,6 +4819,20 @@ var OBJECT_KEYS = {
4783
4819
  "curveSegments",
4784
4820
  "layerGap",
4785
4821
  "material"
4822
+ ],
4823
+ photo: [
4824
+ "src",
4825
+ "depth",
4826
+ "mode",
4827
+ "width",
4828
+ "height",
4829
+ "strength",
4830
+ "focus",
4831
+ "segments",
4832
+ "layers",
4833
+ "edgeCut",
4834
+ "motion",
4835
+ "material"
4786
4836
  ]
4787
4837
  };
4788
4838
  var SCENE_KEYS = [
@@ -5380,9 +5430,12 @@ function validateScene(scene) {
5380
5430
  if (s.ui !== void 0) ui(v, s.ui);
5381
5431
  if (s.audio !== void 0) audio(v, s.audio);
5382
5432
  const envLit = isObj(s.environment) && (s.environment.rig !== void 0 || isObj(s.environment.background) && isObj(s.environment.background.sky) && (s.environment.background.sky.preset !== void 0 || s.environment.background.sky.physical === true) && s.environment.lighting !== "none");
5383
- if (lights.length === 0 && !envLit && isObj(s.environment) && (s.environment.lighting === "none" || s.environment.lighting === void 0) && objects.length > 0) v.warn("no-lights", "lights", "The scene has no lights and no environment lighting: lit materials (standard, physical, toon…) will render black.", "Add lights (e.g. { \"type\": \"hemisphere\", \"intensity\": 1 } and a directional key light) or set environment.lighting to \"studio\".");
5433
+ if (lights.length === 0 && !envLit && isObj(s.environment) && (s.environment.lighting === "none" || s.environment.lighting === void 0) && needsLight(objects)) v.warn("no-lights", "lights", "The scene has no lights and no environment lighting: lit materials (standard, physical, toon…) will render black.", "Add lights (e.g. { \"type\": \"hemisphere\", \"intensity\": 1 } and a directional key light) or set environment.lighting to \"studio\".");
5384
5434
  return v.issues;
5385
5435
  }
5436
+ function needsLight(objects) {
5437
+ return objects.some((o) => isObj(o) && (o.kind !== "photo" && o.kind !== "group" || Array.isArray(o.children) && needsLight(o.children)));
5438
+ }
5386
5439
  function target(v, t) {
5387
5440
  if (!isObj(t)) return v.error("type", "target", "target must be an object.", "Example: { \"kind\": \"banner\", \"aspect\": \"4:1\" }.");
5388
5441
  v.unknownKeys(t, TARGET_KEYS, "target", "target");
@@ -6146,12 +6199,88 @@ function object(v, o, fallback) {
6146
6199
  });
6147
6200
  v.number(o.layerGap, `${p}.layerGap`, { min: 0 });
6148
6201
  material(v, o.material, `${p}.material`);
6202
+ break;
6203
+ case "photo": photo(v, o, p);
6149
6204
  }
6150
6205
  if (o.children !== void 0) {
6151
6206
  if (!Array.isArray(o.children)) v.error("type", `${p}.children`, "children must be an array of objects.");
6152
6207
  else o.children.forEach((c, i) => object(v, c, `${p}.children[${i}]`));
6153
6208
  }
6154
6209
  }
6210
+ function photo(v, o, p) {
6211
+ if (v.required(o, "src", p, "an image path (\"assets/textures/photo.jpg\") or \"library:<id>\" (.jpg / .png / .webp)")) v.assetPath(o.src, `${p}.src`, PHOTO_EXT, "an image (.jpg / .png / .webp)");
6212
+ v.assetPath(o.depth, `${p}.depth`, PHOTO_EXT, "a depth map image (grayscale PNG, white = near)");
6213
+ v.enumOf(o.mode, PHOTO_MODES, `${p}.mode`);
6214
+ v.number(o.width, `${p}.width`, {
6215
+ min: 0,
6216
+ exclusiveMin: true
6217
+ });
6218
+ v.number(o.height, `${p}.height`, {
6219
+ min: 0,
6220
+ exclusiveMin: true
6221
+ });
6222
+ for (const k of [
6223
+ "strength",
6224
+ "focus",
6225
+ "edgeCut"
6226
+ ]) v.number(o[k], `${p}.${k}`, {
6227
+ min: 0,
6228
+ max: 1
6229
+ });
6230
+ v.number(o.segments, `${p}.segments`, {
6231
+ integer: true,
6232
+ min: 8,
6233
+ max: 1024
6234
+ });
6235
+ v.number(o.layers, `${p}.layers`, {
6236
+ integer: true,
6237
+ min: 2,
6238
+ max: 16
6239
+ });
6240
+ const mode = typeof o.mode === "string" ? o.mode : "parallax";
6241
+ if (o.segments !== void 0 && mode !== "mesh") v.info("ignored", `${p}.segments`, `segments only applies to mode "mesh" (this photo is "${mode}").`, "Set mode: \"mesh\", or remove segments.");
6242
+ if (o.layers !== void 0 && mode !== "layers") v.info("ignored", `${p}.layers`, `layers only applies to mode "layers" (this photo is "${mode}").`, "Set mode: \"layers\", or remove layers.");
6243
+ if (o.depth === void 0 && typeof o.src === "string" && PHOTO_MODES.includes(mode)) v.warn("photo-flat", p, `Photo "${String(o.id)}" has no depth map: it renders flat (mode "${mode}" needs one).`, `Run \`agent3d assets depth ${o.src}\` (writes a depth PNG next to it), then set ${p}.depth to its path.`);
6244
+ if (o.motion !== void 0) {
6245
+ const m = o.motion;
6246
+ if (!isObj(m)) v.error("type", `${p}.motion`, "motion must be an object.", "Example: { \"pointer\": 1, \"scroll\": 0, \"auto\": \"sway\", \"speed\": 1 }.");
6247
+ else {
6248
+ v.unknownKeys(m, PHOTO_MOTION_KEYS, `${p}.motion`, "photo motion");
6249
+ v.number(m.pointer, `${p}.motion.pointer`, {
6250
+ min: 0,
6251
+ max: 1
6252
+ });
6253
+ v.number(m.scroll, `${p}.motion.scroll`, {
6254
+ min: 0,
6255
+ max: 1
6256
+ });
6257
+ v.boolean(m.gyro, `${p}.motion.gyro`);
6258
+ v.enumOf(m.auto, PHOTO_AUTO_MOTIONS, `${p}.motion.auto`);
6259
+ v.number(m.speed, `${p}.motion.speed`, { min: 0 });
6260
+ v.number(m.smoothing, `${p}.motion.smoothing`, {
6261
+ min: 0,
6262
+ max: 1
6263
+ });
6264
+ }
6265
+ }
6266
+ if (o.material !== void 0) {
6267
+ const m = o.material;
6268
+ if (!isObj(m)) v.error("type", `${p}.material`, "material must be an object.", "A photo material only takes { \"opacity\", \"color\", \"emissiveIntensity\" }, e.g. { \"opacity\": 0.9 }.");
6269
+ else {
6270
+ for (const k of Object.keys(m)) {
6271
+ if (PHOTO_MATERIAL_KEYS.includes(k)) continue;
6272
+ const s = closest(k, PHOTO_MATERIAL_KEYS);
6273
+ v.warn("unknown-field", `${p}.material.${k}`, `"${k}" is not supported on a photo material (ignored by the runtime).`, `${s ? `Did you mean "${s}"? ` : ""}A photo is unlit: only ${listOptions(PHOTO_MATERIAL_KEYS)} apply.`);
6274
+ }
6275
+ v.number(m.opacity, `${p}.material.opacity`, {
6276
+ min: 0,
6277
+ max: 1
6278
+ });
6279
+ v.color(m.color, `${p}.material.color`);
6280
+ v.number(m.emissiveIntensity, `${p}.material.emissiveIntensity`, { min: 0 });
6281
+ }
6282
+ }
6283
+ }
6155
6284
  function catalogRef(v, section, id, path) {
6156
6285
  const ids = CATALOG[section].map((x) => x.id);
6157
6286
  if (typeof id !== "string") {
@@ -8138,8 +8267,8 @@ var DIR_BY_KIND = {
8138
8267
  };
8139
8268
  var assetsCommand = {
8140
8269
  name: "assets",
8141
- usage: "assets <list|search|add|optimize|remove|library> [--project <dir>]",
8142
- summary: "Project assets (assets/ + manifest with licences): list, search free CC0 sources (Poly Haven, ambientCG, Kenney, Quaternius, Khronos), add (local file or a search hit — downloaded once into the project), optimize (smart-size + WebP textures, meshopt .glb geometry), remove, and browse the built-in library.",
8270
+ usage: "assets <list|search|add|optimize|depth|remove|library> [--project <dir>]",
8271
+ summary: "Project assets (assets/ + manifest with licences): list, search free CC0 sources (Poly Haven, ambientCG, Kenney, Quaternius, Khronos), add (local file or a search hit — downloaded once into the project), optimize (smart-size + WebP textures, meshopt .glb geometry), depth (estimate a depth map for a 3D photo), remove, and browse the built-in library.",
8143
8272
  subcommands: [
8144
8273
  {
8145
8274
  name: "list",
@@ -8164,6 +8293,12 @@ var assetsCommand = {
8164
8293
  writes: true,
8165
8294
  destructive: true
8166
8295
  },
8296
+ {
8297
+ name: "depth",
8298
+ usage: "assets depth <image> [--out assets/depth/<name>-depth.png] [--size 518] [--max-size 1024]",
8299
+ summary: "Estimate a depth map for a photo of the project (or \"library:<id>\") with Depth Anything V2 Small, run locally in headless Chrome (onnxruntime-web, WASM). Writes a grey PNG (white = near, transparent on depth jumps) at the photo size (capped by --max-size, default 1024) to use as a photo object's `depth`, registered in assets/manifest.json with the photo's licence. The model (27 MB, Apache-2.0) is downloaded once into ~/.agent3d/models (AGENT3D_MODELS overrides); later runs work offline. --size is the model input long side (default 518, up to 1036 for finer edges, slower).",
8300
+ writes: true
8301
+ },
8167
8302
  {
8168
8303
  name: "remove",
8169
8304
  usage: "assets remove <path> [--yes]",
@@ -8233,7 +8368,7 @@ var assetsCommand = {
8233
8368
  {
8234
8369
  name: "max-size",
8235
8370
  type: "string",
8236
- description: "optimize / add --hit: longest texture side in pixels, for every texture (optimize default: a smart size per texture from the scene; never upscales)."
8371
+ description: "optimize / add --hit: longest texture side in pixels, for every texture (optimize default: a smart size per texture from the scene; never upscales). depth: longest side of the depth map (default 1024)."
8237
8372
  },
8238
8373
  {
8239
8374
  name: "quality",
@@ -8265,6 +8400,16 @@ var assetsCommand = {
8265
8400
  type: "boolean",
8266
8401
  description: "optimize: encode everything and report the savings, write nothing."
8267
8402
  },
8403
+ {
8404
+ name: "out",
8405
+ type: "string",
8406
+ description: "depth: project path of the depth PNG (default assets/depth/<image name>-depth.png)."
8407
+ },
8408
+ {
8409
+ name: "size",
8410
+ type: "string",
8411
+ description: "depth: model input long side in pixels (default 518; 140-1036, rounded to a multiple of 14)."
8412
+ },
8268
8413
  {
8269
8414
  name: "path",
8270
8415
  type: "string",
@@ -8290,7 +8435,7 @@ var assetsCommand = {
8290
8435
  async run({ io, options, positionals }) {
8291
8436
  const [action = "list", ...rest] = positionals;
8292
8437
  if (action === "library") {
8293
- const { listLibrary } = await import("./chunks/assets-BUUM9TUB.mjs").then((n) => n.n);
8438
+ const { listLibrary } = await import("./chunks/assets-YBkgdfgy.mjs").then((n) => n.n);
8294
8439
  const r = listLibrary(readLibraryIndex(), {
8295
8440
  query: strOpt(options, "query") ?? rest[0],
8296
8441
  kind: strOpt(options, "kind"),
@@ -8313,7 +8458,7 @@ var assetsCommand = {
8313
8458
  if (action === "search") {
8314
8459
  const query = strOpt(options, "query") ?? rest.join(" ");
8315
8460
  if (!query.trim()) usage("assets search needs a query.", "e.g. agent3d assets search \"pine tree\" --kind model");
8316
- const { searchAssetsDetailed } = await import("./chunks/assets-BUUM9TUB.mjs").then((n) => n.n);
8461
+ const { searchAssetsDetailed } = await import("./chunks/assets-YBkgdfgy.mjs").then((n) => n.n);
8317
8462
  const r = await searchAssetsDetailed({
8318
8463
  query,
8319
8464
  kind: strOpt(options, "kind"),
@@ -8332,7 +8477,7 @@ var assetsCommand = {
8332
8477
  }
8333
8478
  const fs = projectFs(options);
8334
8479
  if (action === "list") {
8335
- const { listAssets } = await import("./chunks/assets-BUUM9TUB.mjs").then((n) => n.n);
8480
+ const { listAssets } = await import("./chunks/assets-YBkgdfgy.mjs").then((n) => n.n);
8336
8481
  const r = await listAssets(fs);
8337
8482
  return printResult(io, r, () => `${table(r.assets, [
8338
8483
  "path",
@@ -8344,7 +8489,7 @@ var assetsCommand = {
8344
8489
  }
8345
8490
  if (action === "add") {
8346
8491
  const hit = jsonObjectOpt(options, "hit");
8347
- const ops = await import("./chunks/assets-BUUM9TUB.mjs").then((n) => n.n);
8492
+ const ops = await import("./chunks/assets-YBkgdfgy.mjs").then((n) => n.n);
8348
8493
  if (hit) {
8349
8494
  const resolution = strOpt(options, "resolution");
8350
8495
  const maxSize = numOpt(options, "max-size") ?? ops.parseResolution(resolution).maxSize;
@@ -8356,8 +8501,8 @@ var assetsCommand = {
8356
8501
  inflate: (d) => new Uint8Array(inflateRawSync(d))
8357
8502
  });
8358
8503
  let entry;
8359
- if (maxSize && (await import("./chunks/browser-Br1tURgt.mjs")).findBrowser()) {
8360
- const { withImageCodec } = await import("./chunks/imageCodec-QM0EXQDJ.mjs");
8504
+ if (maxSize && (await import("./chunks/browser-Dil7VM5m.mjs")).findBrowser()) {
8505
+ const { withImageCodec } = await import("./chunks/imageCodec-DeGfmBp3.mjs");
8361
8506
  entry = await withImageCodec((codec) => dl(codec), { log: log$1 });
8362
8507
  } else entry = await dl();
8363
8508
  return printResult(io, { asset: entry }, () => [
@@ -8414,7 +8559,7 @@ var assetsCommand = {
8414
8559
  } }, () => `Added ${entry.path}.${bounds ? ` Bounds ${bounds.size.join(" × ")} (w × h × d), up axis ${bounds.upAxis}.` : ""}`);
8415
8560
  }
8416
8561
  if (action === "optimize") {
8417
- const { optimizeAssets, planOptimize } = await import("./chunks/assets-BUUM9TUB.mjs").then((n) => n.d);
8562
+ const { optimizeAssets, planOptimize } = await import("./chunks/assets-YBkgdfgy.mjs").then((n) => n.d);
8418
8563
  const all = boolOpt(options, "all");
8419
8564
  if (!rest.length && !all) usage("assets optimize needs paths or --all.", "e.g. agent3d assets optimize --all (plan), then --yes; or a folder: agent3d assets optimize assets/textures/wood --yes (`agent3d assets list` shows sizes).");
8420
8565
  const compressRaw = strOpt(options, "compress") ?? "meshopt";
@@ -8460,7 +8605,7 @@ var assetsCommand = {
8460
8605
  hint: "--dry-run reports the real savings without writing; --max-size forces one size."
8461
8606
  }, humanPlan)) return;
8462
8607
  const needsCodec = plan.entries.some((e) => e.kind === "texture" || (e.images ?? 0) > 0);
8463
- const { findBrowser } = await import("./chunks/browser-Br1tURgt.mjs");
8608
+ const { findBrowser } = await import("./chunks/browser-Dil7VM5m.mjs");
8464
8609
  const run = (codec) => optimizeAssets(fs, {
8465
8610
  ...opts,
8466
8611
  paths: plan.entries.map((e) => e.path),
@@ -8469,7 +8614,7 @@ var assetsCommand = {
8469
8614
  }, codec);
8470
8615
  let r;
8471
8616
  if (needsCodec && findBrowser()) {
8472
- const { withImageCodec } = await import("./chunks/imageCodec-QM0EXQDJ.mjs");
8617
+ const { withImageCodec } = await import("./chunks/imageCodec-DeGfmBp3.mjs");
8473
8618
  r = await withImageCodec((codec) => run(codec), { log: log$1 });
8474
8619
  } else r = await run();
8475
8620
  r.skipped.unshift(...plan.skipped);
@@ -8489,9 +8634,33 @@ var assetsCommand = {
8489
8634
  `${r.dryRun ? "Would save" : "Saved"} ${r.savedKb} KB (${r.beforeKb} → ${r.afterKb} KB).${r.dryRun ? " Dry run: nothing written." : ""}`
8490
8635
  ].join("\n"));
8491
8636
  }
8637
+ if (action === "depth") {
8638
+ const image = positional(rest, 0, "image (project path or library:<id>)", "assets depth assets/textures/photo.jpg");
8639
+ const { checkDepthRequest, estimateDepth } = await import("./chunks/depth-BZT4gseQ.mjs").then((n) => n.r);
8640
+ const { deflateSync } = await import("node:zlib");
8641
+ const req = {
8642
+ image: image.replace(/^\.\//, ""),
8643
+ out: strOpt(options, "out"),
8644
+ size: numOpt(options, "size"),
8645
+ maxSize: numOpt(options, "max-size"),
8646
+ library: libraryProvider(),
8647
+ deflate: (d) => new Uint8Array(deflateSync(d))
8648
+ };
8649
+ if (req.maxSize !== void 0 && !(req.maxSize >= 16 && req.maxSize <= 8192)) usage(`--max-size must be between 16 and 8192, got ${req.maxSize}.`, "e.g. --max-size 1024 (default 2048).");
8650
+ await checkDepthRequest(fs, req);
8651
+ const { withDepthEstimator } = await import("./chunks/depth-CD_ql3QJ.mjs");
8652
+ const r = await withDepthEstimator((estimator) => estimateDepth(fs, req, estimator), { log: log$1 });
8653
+ return printResult(io, {
8654
+ ...r,
8655
+ hint: `Use it on a photo object: agent3d object add --json-def '${JSON.stringify({
8656
+ id: "photo",
8657
+ ...r.suggestion
8658
+ })}'`
8659
+ }, () => `Wrote ${r.path} (${r.width}x${r.height}, ${r.kb} KB, licence ${r.license}) in ${(r.ms / 1e3).toFixed(2)} s — ${r.model.id}, ${r.model.backend ?? "wasm"}, model input ${r.input.width}x${r.input.height}.\nUse it as a photo object's depth: { "kind": "photo", "src": "${r.image}", "depth": "${r.path}" }`);
8660
+ }
8492
8661
  if (action === "remove") {
8493
8662
  const path = positional(rest, 0, "asset path", "assets remove <path>");
8494
- const { listAssets, removeAsset } = await import("./chunks/assets-BUUM9TUB.mjs").then((n) => n.n);
8663
+ const { listAssets, removeAsset } = await import("./chunks/assets-YBkgdfgy.mjs").then((n) => n.n);
8495
8664
  const { assets } = await listAssets(fs);
8496
8665
  const entry = assets.find((a) => a.path === path);
8497
8666
  if (!entry && !await fs.exists(path)) throw new CliError("notFound", `No asset "${path}".`, "`agent3d assets list` lists them.");
@@ -8506,7 +8675,7 @@ var assetsCommand = {
8506
8675
  ...r
8507
8676
  }, () => `Removed ${path}.${r.usedBy.length ? ` Still referenced by: ${r.usedBy.join(", ")} — fix those references.` : ""}`);
8508
8677
  }
8509
- usage(`Unknown assets action "${action}".`, "Use list, search, add, optimize, remove or library.");
8678
+ usage(`Unknown assets action "${action}".`, "Use list, search, add, optimize, depth, remove or library.");
8510
8679
  }
8511
8680
  };
8512
8681
  var log$1 = (m) => void process.stderr.write(`${m}\n`);
@@ -8595,7 +8764,7 @@ var templatesCommand = {
8595
8764
  const scene = sceneBytes ? JSON.parse(new TextDecoder().decode(sceneBytes)) : null;
8596
8765
  let summary = null;
8597
8766
  if (scene) try {
8598
- summary = (await import("./chunks/scene-BgajNvBf.mjs").then((n) => n.a)).summarizeScene(scene);
8767
+ summary = (await import("./chunks/scene-DWgXH6As.mjs").then((n) => n.a)).summarizeScene(scene);
8599
8768
  } catch {
8600
8769
  summary = null;
8601
8770
  }
@@ -8629,14 +8798,14 @@ var checkCommand = {
8629
8798
  ],
8630
8799
  async run({ io, options }) {
8631
8800
  const fs = projectFs(options);
8632
- const { checkProject } = await import("./chunks/check-CfZcfaPs.mjs").then((n) => n.r);
8801
+ const { checkProject } = await import("./chunks/check-DP9fRYbK.mjs").then((n) => n.r);
8633
8802
  let extra = {
8634
8803
  library: readLibraryIndex(),
8635
8804
  ...runtimeKb() !== void 0 ? { runtimeKb: runtimeKb() } : {}
8636
8805
  };
8637
8806
  let renderNote;
8638
8807
  if (boolOpt(options, "render")) {
8639
- const { renderProject } = await import("./chunks/render-EHb40avl.mjs");
8808
+ const { renderProject } = await import("./chunks/render-B05DU4Q5.mjs");
8640
8809
  const out = strOpt(options, "out");
8641
8810
  const outDir = out ? isAbsolute(out) ? out : resolve(fs.root, out) : checkRenderDir(fs.root);
8642
8811
  const r = await renderProject({
@@ -8781,7 +8950,7 @@ var doctorCommand = {
8781
8950
  message: `Node ${process.versions.node}${major >= 22 ? "" : " (Agent3D needs Node 22+)"}`,
8782
8951
  ...major < 22 ? { hint: "Install Node 22 or newer (https://nodejs.org)." } : {}
8783
8952
  });
8784
- const { findBrowser, browserVersion, noBrowserError } = await import("./chunks/browser-Br1tURgt.mjs");
8953
+ const { findBrowser, browserVersion, noBrowserError } = await import("./chunks/browser-Dil7VM5m.mjs");
8785
8954
  const browser = findBrowser();
8786
8955
  if (browser) {
8787
8956
  const version = await browserVersion(browser.path);
@@ -8847,7 +9016,7 @@ var doctorCommand = {
8847
9016
  const dir = mkdtempSync(join(tmpdir(), "agent3d-doctor-"));
8848
9017
  try {
8849
9018
  writeFileSync(join(dir, "scene.json"), JSON.stringify(DOCTOR_SCENE));
8850
- const { renderProject } = await import("./chunks/render-EHb40avl.mjs");
9019
+ const { renderProject } = await import("./chunks/render-B05DU4Q5.mjs");
8851
9020
  const { decodePng, pngVariance } = await import("./chunks/png-DXfSGJZt.mjs");
8852
9021
  const t0 = Date.now();
8853
9022
  const r = await renderProject({
@@ -9001,7 +9170,7 @@ var infoCommand = {
9001
9170
  options: [PROJECT_OPTION],
9002
9171
  async run({ io, options }) {
9003
9172
  const fs = projectFs(options);
9004
- const [{ loadProject }, { summarizeScene }] = await Promise.all([Promise.resolve().then(() => project_exports), import("./chunks/scene-BgajNvBf.mjs").then((n) => n.a)]);
9173
+ const [{ loadProject }, { summarizeScene }] = await Promise.all([Promise.resolve().then(() => project_exports), import("./chunks/scene-DWgXH6As.mjs").then((n) => n.a)]);
9005
9174
  const { manifest, scene } = await loadProject(fs);
9006
9175
  const files = await fs.list();
9007
9176
  const renders = files.filter((f) => f.startsWith("renders/") && f.endsWith(".png")).slice(-8);
@@ -9168,10 +9337,10 @@ var renderCommand = {
9168
9337
  ],
9169
9338
  async run({ io, options }) {
9170
9339
  const fs = projectFs(options);
9171
- const { parseQuality } = await import("./chunks/render-EHb40avl.mjs");
9340
+ const { parseQuality } = await import("./chunks/render-B05DU4Q5.mjs");
9172
9341
  const quality = parseQuality(strOpt(options, "quality"));
9173
9342
  const scroll = numOpt(options, "scroll");
9174
- const { parseInputScript } = await import("./chunks/render-EHb40avl.mjs");
9343
+ const { parseInputScript } = await import("./chunks/render-B05DU4Q5.mjs");
9175
9344
  const rawInput = strOpt(options, "input") !== void 0 ? jsonOpt(options, "input", `--input '[{"t": 0.5, "key": "ArrowRight", "hold": 1}]' or --input @inputs.json`) : void 0;
9176
9345
  const input = rawInput === void 0 ? void 0 : parseInputScript(rawInput);
9177
9346
  const segment = strOpt(options, "segment");
@@ -9185,7 +9354,7 @@ var renderCommand = {
9185
9354
  if (mediaOpts.length) {
9186
9355
  const kind = mediaOpts[0];
9187
9356
  const out = projectPath(fs.root, strOpt(options, kind));
9188
- const { renderMedia, mediaFormatFromPath } = await import("./chunks/render-EHb40avl.mjs");
9357
+ const { renderMedia, mediaFormatFromPath } = await import("./chunks/render-B05DU4Q5.mjs");
9189
9358
  const format = kind === "video" ? mediaFormatFromPath(out) : kind;
9190
9359
  if (kind === "video" && format !== "mp4" && format !== "webm") usage(`--video needs a .mp4 or .webm file name, got "${strOpt(options, kind)}".`, "e.g. --video renders/banner.mp4");
9191
9360
  if (existsSync(out) && !confirmOrPlan(io, options, { overwrite: [out] }, () => `Overwrite ${out}`)) return;
@@ -9223,7 +9392,7 @@ var renderCommand = {
9223
9392
  "canvas",
9224
9393
  "page"
9225
9394
  ].includes(capture)) usage(`--capture must be auto, canvas or page, got "${capture}".`);
9226
- const { renderProject } = await import("./chunks/render-EHb40avl.mjs");
9395
+ const { renderProject } = await import("./chunks/render-B05DU4Q5.mjs");
9227
9396
  const frames = renderFrames(strOpt(options, "frames"), numOpt(options, "count"), scroll);
9228
9397
  const r = await renderProject({
9229
9398
  projectDir: fs.root,
@@ -9398,7 +9567,7 @@ var exportCommand = {
9398
9567
  ];
9399
9568
  if (!FORMATS.includes(format)) usage(`Unknown --format "${format}".`, `Use ${FORMATS.join(", ")}.`);
9400
9569
  const outOpt = strOpt(options, "out");
9401
- const render = () => import("./chunks/render-EHb40avl.mjs");
9570
+ const render = () => import("./chunks/render-B05DU4Q5.mjs");
9402
9571
  if (format === "poster" || format === "video" || format === "gif") {
9403
9572
  const { parseQuality, mediaFormatFromPath } = await render();
9404
9573
  const quality = parseQuality(strOpt(options, "quality"));
@@ -9481,17 +9650,17 @@ var exportCommand = {
9481
9650
  warnings.push(`No poster: ${err.message}${err.hint ? ` (${err.hint})` : ""} — the export works without it (no image before load / without WebGL).`);
9482
9651
  }
9483
9652
  const runtime = { files: readRuntimeFiles(format) };
9484
- const { buildExport } = await import("./chunks/export-BHugc2H7.mjs").then((n) => n.n);
9485
- const { version } = (await import("./chunks/package-fw4h5vsh.mjs").then((n) => n.n)).default;
9653
+ const { buildExport } = await import("./chunks/export-bJwh2SqG.mjs").then((n) => n.n);
9654
+ const { version } = (await import("./chunks/package-fMbw9UGh.mjs").then((n) => n.n)).default;
9486
9655
  let exportFs = fs;
9487
9656
  let exportLibrary = libraryProvider();
9488
9657
  let optimizeReport;
9489
9658
  let closeCodec;
9490
9659
  if (boolOpt(options, "optimize")) {
9491
- const { optimizedExportSources } = await import("./chunks/assets-BUUM9TUB.mjs").then((n) => n.d);
9660
+ const { optimizedExportSources } = await import("./chunks/assets-YBkgdfgy.mjs").then((n) => n.d);
9492
9661
  let codec;
9493
- if ((await import("./chunks/browser-Br1tURgt.mjs")).findBrowser()) {
9494
- const c = await (await import("./chunks/imageCodec-QM0EXQDJ.mjs")).openImageCodec({ log });
9662
+ if ((await import("./chunks/browser-Dil7VM5m.mjs")).findBrowser()) {
9663
+ const c = await (await import("./chunks/imageCodec-DeGfmBp3.mjs")).openImageCodec({ log });
9495
9664
  codec = c.codec;
9496
9665
  closeCodec = c.close;
9497
9666
  } else warnings.push("--optimize: no Chrome found, textures were not resized (geometry was compressed).");
@@ -9580,7 +9749,7 @@ function issuesLine(issues) {
9580
9749
  return issues.map((i) => ` ${i.severity === "error" ? "✗" : i.severity === "warning" ? "!" : "·"} ${i.path}: ${i.message}${i.hint ? ` (${i.hint})` : ""}`).join("\n");
9581
9750
  }
9582
9751
  async function runPatch(io, options, fs, ops, human, opts = {}) {
9583
- const { patchScene, replacedCollections, getScene } = await import("./chunks/scene-BgajNvBf.mjs").then((n) => n.a);
9752
+ const { patchScene, replacedCollections, getScene } = await import("./chunks/scene-DWgXH6As.mjs").then((n) => n.a);
9584
9753
  const dry = await patchScene(fs, ops, { dryRun: true });
9585
9754
  if (errorsOf(dry.issues).length) throw validationError(dry.issues, dry.plan);
9586
9755
  if (dry.plan.empty) return printResult(io, {
@@ -9674,7 +9843,7 @@ var sceneCommand = {
9674
9843
  }
9675
9844
  const fs = projectFs(options);
9676
9845
  if (action === "get") {
9677
- const { getScene } = await import("./chunks/scene-BgajNvBf.mjs").then((n) => n.a);
9846
+ const { getScene } = await import("./chunks/scene-DWgXH6As.mjs").then((n) => n.a);
9678
9847
  const scene = await getScene(fs);
9679
9848
  const path = strOpt(options, "path");
9680
9849
  if (!path) return printResult(io, scene, () => JSON.stringify(scene, null, 2));
@@ -9687,13 +9856,13 @@ var sceneCommand = {
9687
9856
  }, () => JSON.stringify(value, null, 2));
9688
9857
  }
9689
9858
  if (action === "summary") {
9690
- const [{ getScene, summarizeScene }] = await Promise.all([import("./chunks/scene-BgajNvBf.mjs").then((n) => n.a)]);
9859
+ const [{ getScene, summarizeScene }] = await Promise.all([import("./chunks/scene-DWgXH6As.mjs").then((n) => n.a)]);
9691
9860
  const summary = summarizeScene(await getScene(fs));
9692
9861
  return printResult(io, summary, () => JSON.stringify(summary, null, 2));
9693
9862
  }
9694
9863
  if (action === "apply") {
9695
9864
  const next = jsonInput(options, rest, "the scene", "--file scene.json");
9696
- const { applyScene } = await import("./chunks/scene-BgajNvBf.mjs").then((n) => n.a);
9865
+ const { applyScene } = await import("./chunks/scene-DWgXH6As.mjs").then((n) => n.a);
9697
9866
  const dry = await applyScene(fs, next, { dryRun: true });
9698
9867
  if (errorsOf(dry.issues).length) throw validationError(dry.issues, dry.plan);
9699
9868
  if (dry.plan.empty) return printResult(io, {
@@ -9735,7 +9904,8 @@ var OBJECT_KINDS = [
9735
9904
  "generator",
9736
9905
  "particles",
9737
9906
  "instances",
9738
- "svg"
9907
+ "svg",
9908
+ "photo"
9739
9909
  ];
9740
9910
  function objectDef(options, base = {}) {
9741
9911
  const def = {
@@ -9772,7 +9942,7 @@ function objectDef(options, base = {}) {
9772
9942
  const src = strOpt(options, "src");
9773
9943
  if (src) {
9774
9944
  def.src = src;
9775
- def.kind ??= src.endsWith(".svg") || src.trim().startsWith("<svg") ? "svg" : "model";
9945
+ def.kind ??= src.endsWith(".svg") || src.trim().startsWith("<svg") ? "svg" : /\.(jpe?g|png|webp)$/i.test(src) ? "photo" : "model";
9776
9946
  }
9777
9947
  const sets = setPairs(options);
9778
9948
  const merge = (a, b) => {
@@ -9870,7 +10040,7 @@ var objectCommand = {
9870
10040
  {
9871
10041
  name: "src",
9872
10042
  type: "string",
9873
- description: "add: model / svg source (project path or library:<id>)."
10043
+ description: "add: model / svg / photo source (project path or library:<id>; an image makes a photo)."
9874
10044
  },
9875
10045
  {
9876
10046
  name: "parent",
@@ -9896,7 +10066,7 @@ var objectCommand = {
9896
10066
  const fs = projectFs(options);
9897
10067
  const index = numOpt(options, "index");
9898
10068
  if (action === "list" || action === "get") {
9899
- const { listObjects, getObject } = await import("./chunks/objects-DBAws7uf.mjs").then((n) => n.r);
10069
+ const { listObjects, getObject } = await import("./chunks/objects-DuytRxiC.mjs").then((n) => n.r);
9900
10070
  if (action === "list") {
9901
10071
  const rows = await listObjects(fs);
9902
10072
  return printResult(io, { objects: rows }, () => table(rows.map((r) => ({
@@ -10037,7 +10207,7 @@ var timelineCommand = {
10037
10207
  const [action = "get", ...rest] = positionals;
10038
10208
  const fs = projectFs(options);
10039
10209
  if (action === "get") {
10040
- const { getScene } = await import("./chunks/scene-BgajNvBf.mjs").then((n) => n.a);
10210
+ const { getScene } = await import("./chunks/scene-DWgXH6As.mjs").then((n) => n.a);
10041
10211
  const timeline = (await getScene(fs)).timeline ?? null;
10042
10212
  return printResult(io, { timeline }, () => timeline ? JSON.stringify(timeline, null, 2) : "No timeline.");
10043
10213
  }
@@ -10048,7 +10218,7 @@ var timelineCommand = {
10048
10218
  value: jsonInput(options, rest, "the timeline", "--file timeline.json with {\"duration\":4,\"loop\":true,\"tracks\":[]}")
10049
10219
  }], "Replace the timeline", { destructive: true });
10050
10220
  const ops = [];
10051
- const { getScene } = await import("./chunks/scene-BgajNvBf.mjs").then((n) => n.a);
10221
+ const { getScene } = await import("./chunks/scene-DWgXH6As.mjs").then((n) => n.a);
10052
10222
  const has = !!(await getScene(fs)).timeline;
10053
10223
  const duration = numOpt(options, "duration");
10054
10224
  const loop = strOpt(options, "loop");
@@ -10119,7 +10289,7 @@ function runtimeIssueToIssue(i) {
10119
10289
  function nodeHost(fs) {
10120
10290
  return {
10121
10291
  ...fs ? { async render(opts) {
10122
- const { renderProject } = await import("./chunks/render-EHb40avl.mjs");
10292
+ const { renderProject } = await import("./chunks/render-B05DU4Q5.mjs");
10123
10293
  const r = await renderProject({
10124
10294
  projectDir: fs.root,
10125
10295
  frames: opts.frames?.length ? opts.frames.join(",") : void 0,
@@ -10127,7 +10297,7 @@ function nodeHost(fs) {
10127
10297
  size: opts.size,
10128
10298
  sheet: opts.sheet ?? true,
10129
10299
  outDir: opts.out ? fs.resolve(opts.out) : void 0,
10130
- input: opts.input ? (await import("./chunks/render-EHb40avl.mjs")).parseInputScript(opts.input) : void 0,
10300
+ input: opts.input ? (await import("./chunks/render-B05DU4Q5.mjs")).parseInputScript(opts.input) : void 0,
10131
10301
  previewWidth: opts.previewWidth,
10132
10302
  isolate: opts.isolate,
10133
10303
  bg: opts.bg,
@@ -10151,7 +10321,7 @@ function nodeHost(fs) {
10151
10321
  };
10152
10322
  } } : {},
10153
10323
  ...fs ? { async media(opts) {
10154
- const render = await import("./chunks/render-EHb40avl.mjs");
10324
+ const render = await import("./chunks/render-B05DU4Q5.mjs");
10155
10325
  const log = (m) => void process.stderr.write(`${m}\n`);
10156
10326
  if (opts.format === "poster") {
10157
10327
  const r = await render.renderPoster({
@@ -10243,9 +10413,14 @@ function nodeHost(fs) {
10243
10413
  },
10244
10414
  inflate: (data) => new Uint8Array(inflateRawSync(data)),
10245
10415
  async withImageCodec(fn) {
10246
- const { withImageCodec } = await import("./chunks/imageCodec-QM0EXQDJ.mjs");
10416
+ const { withImageCodec } = await import("./chunks/imageCodec-DeGfmBp3.mjs");
10247
10417
  return withImageCodec(fn, { log: (m) => void process.stderr.write(`${m}\n`) });
10248
10418
  },
10419
+ async withDepthEstimator(fn) {
10420
+ const { withDepthEstimator } = await import("./chunks/depth-CD_ql3QJ.mjs");
10421
+ return withDepthEstimator(fn, { log: (m) => void process.stderr.write(`${m}\n`) });
10422
+ },
10423
+ deflate: (data) => new Uint8Array(deflateSync(data)),
10249
10424
  readLocalFile: async (path) => new Uint8Array(readFileSync(resolve(path)))
10250
10425
  };
10251
10426
  }
@@ -10257,7 +10432,7 @@ function toolContext(fs) {
10257
10432
  };
10258
10433
  }
10259
10434
  async function listTools(opts = {}) {
10260
- const { listAiTools } = await import("./chunks/tools-DKxgjQSJ.mjs");
10435
+ const { listAiTools } = await import("./chunks/tools-Cm4BqDkO.mjs");
10261
10436
  const host = nodeHost(null);
10262
10437
  return listAiTools(opts.render === false ? host : {
10263
10438
  ...host,
@@ -10270,7 +10445,7 @@ async function listTools(opts = {}) {
10270
10445
  }));
10271
10446
  }
10272
10447
  async function callTool(fs, name, input) {
10273
- const { callAiTool } = await import("./chunks/tools-DKxgjQSJ.mjs");
10448
+ const { callAiTool } = await import("./chunks/tools-Cm4BqDkO.mjs");
10274
10449
  return callAiTool(toolContext(fs), name, input);
10275
10450
  }
10276
10451
  function previewImages(name, result, root = ".") {
@@ -11065,7 +11240,7 @@ var mcpCommand = {
11065
11240
  const dir = projectDir(options);
11066
11241
  const fs = new NodeFs(dir);
11067
11242
  const log = (msg) => void process.stderr.write(`${msg}\n`);
11068
- const { createMcpServer, serveStdio } = await import("./chunks/server-CACCerkZ.mjs");
11243
+ const { createMcpServer, serveStdio } = await import("./chunks/server-Dt_YFvN7.mjs");
11069
11244
  const server = createMcpServer(mcpOptions(fs, readOnly, await listTools()));
11070
11245
  log(`[agent3d mcp] project ${dir}${readOnly ? " (read-only)" : ""} on stdio — ${server.toolNames().length} tools`);
11071
11246
  await serveStdio(server, process.stdin, (line) => process.stdout.write(line + "\n"), log);
@@ -11097,7 +11272,7 @@ function mcpOptions(fs, readOnly, tools) {
11097
11272
  description: "Compact outline of the scene: objects, lights, camera, timeline, scripts.",
11098
11273
  mimeType: "application/json",
11099
11274
  read: async () => {
11100
- const { getScene, summarizeScene } = await import("./chunks/scene-BgajNvBf.mjs").then((n) => n.a);
11275
+ const { getScene, summarizeScene } = await import("./chunks/scene-DWgXH6As.mjs").then((n) => n.a);
11101
11276
  return summarizeScene(await getScene(fs));
11102
11277
  }
11103
11278
  },
@@ -11250,4 +11425,4 @@ main(process.argv.slice(2)).then(exitWhenFlushed, (err) => {
11250
11425
  console.error(err);
11251
11426
  exitWhenFlushed(1);
11252
11427
  });
11253
- export { hasErrors as A, toCliError as B, GENERATORS as C, slugify as D, isValidId as E, normalizePath as F, libraryDir as I, runtimeBuilt as L, readJsonOr as M, validationError$1 as N, KB as O, writeJson as P, runtimeDir as R, CATALOG as S, parseAspect as T, expandPostFx as _, ASSET_MANIFEST_FILE as a, isLibraryRef as b, createProject as c, saveScene as d, DEFAULT_ASPECT as f, validateScene as g, TARGET_KINDS$1 as h, listTemplates as i, nowIso as j, OpsError as k, loadProject as l, MATERIAL_TEXTURE_SLOTS as m, startLocalServer as n, MANIFEST_FILE as o, DEFAULT_BUDGET_KB as p, findTemplate as r, SCENE_FILE as s, sendText as t, readSceneFile as u, postfxCost as v, catalogEntry as w, libraryId as x, findLibraryAsset as y, CliError as z };
11428
+ export { OpsError as A, runtimeBuilt as B, CATALOG as C, isValidId as D, parseAspect as E, writeJson as F, CliError as H, normalizePath as I, ORT_FILES as L, nowIso as M, readJsonOr as N, slugify as O, validationError$1 as P, libraryDir as R, libraryId as S, catalogEntry as T, toCliError as U, runtimeDir as V, validateScene as _, listTemplates as a, findLibraryAsset as b, SCENE_FILE as c, readSceneFile as d, saveScene as f, TARGET_KINDS$1 as g, MATERIAL_TEXTURE_SLOTS as h, findTemplate as i, hasErrors as j, KB as k, createProject as l, DEFAULT_BUDGET_KB as m, sendText as n, ASSET_MANIFEST_FILE as o, DEFAULT_ASPECT as p, startLocalServer as r, MANIFEST_FILE as s, mimeOf as t, loadProject as u, expandPostFx as v, GENERATORS as w, isLibraryRef as x, postfxCost as y, ortDir as z };