@instruktlabs/kiln 0.0.0-stage → 1.0.0

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 (947) hide show
  1. package/.agents/plugins/marketplace.json +20 -0
  2. package/.claude-plugin/marketplace.json +19 -0
  3. package/.claude-plugin/plugin.json +30 -0
  4. package/.codex-plugin/plugin.json +37 -0
  5. package/.mcp.json +10 -0
  6. package/CHANGELOG.md +2579 -0
  7. package/CONTRIBUTING.md +130 -0
  8. package/LICENSE +21 -0
  9. package/README.md +443 -2
  10. package/THIRD_PARTY_NOTICES.md +62 -0
  11. package/dist/agent-providers.mjs +310 -0
  12. package/dist/agent-run.mjs +40433 -0
  13. package/dist/build.json +215 -0
  14. package/dist/cli.mjs +48027 -0
  15. package/dist/evaluator-worker.mjs +27572 -0
  16. package/dist/mcp-engine.mjs +43537 -0
  17. package/dist/mcp-server.mjs +2388 -0
  18. package/dist/viewer/app.js +4281 -0
  19. package/dist/viewer/chat.html +4409 -0
  20. package/dist/viewer/index.html +51 -0
  21. package/dist/viewer/style.css +51 -0
  22. package/docs/architecture.md +77 -0
  23. package/docs/cameras.md +181 -0
  24. package/docs/chatgpt.md +48 -0
  25. package/docs/collections.md +195 -0
  26. package/docs/community-exporter.md +95 -0
  27. package/docs/engine-handoff.md +221 -0
  28. package/docs/examples.md +171 -0
  29. package/docs/export-profiles.md +223 -0
  30. package/docs/extending.md +43 -0
  31. package/docs/geometry.md +505 -0
  32. package/docs/google.md +121 -0
  33. package/docs/harnesses.md +372 -0
  34. package/docs/install.md +542 -0
  35. package/docs/material-library.md +133 -0
  36. package/docs/migration.md +809 -0
  37. package/docs/programs.md +123 -0
  38. package/docs/projects-and-live-review.md +94 -0
  39. package/docs/rendering.md +250 -0
  40. package/docs/runtime.md +223 -0
  41. package/docs/sdk.md +137 -0
  42. package/docs/tools.md +1874 -0
  43. package/lib/_types/render-service/src/build-identity.d.mts +24 -0
  44. package/lib/_types/render-service/src/instance.d.mts +47 -0
  45. package/lib/agent/call-budget.d.ts +55 -0
  46. package/lib/agent/call-budget.js +52 -0
  47. package/lib/agent/compaction.d.ts +83 -0
  48. package/lib/agent/compaction.js +124 -0
  49. package/lib/agent/concurrency.d.ts +8 -0
  50. package/lib/agent/concurrency.js +24 -0
  51. package/lib/agent/diff.d.ts +23 -0
  52. package/lib/agent/diff.js +124 -0
  53. package/lib/agent/generate.d.ts +192 -0
  54. package/lib/agent/generate.js +240 -0
  55. package/lib/agent/hooks.d.ts +91 -0
  56. package/lib/agent/hooks.js +158 -0
  57. package/lib/agent/index.d.ts +42 -0
  58. package/lib/agent/index.js +30 -0
  59. package/lib/agent/native-prompt.d.ts +15 -0
  60. package/lib/agent/native-prompt.js +29 -0
  61. package/lib/agent/native-workflow.d.ts +4 -0
  62. package/lib/agent/native-workflow.js +30 -0
  63. package/lib/agent/providers.d.ts +188 -0
  64. package/lib/agent/providers.js +392 -0
  65. package/lib/agent/run.d.ts +72 -0
  66. package/lib/agent/run.js +245 -0
  67. package/lib/agent/skill-resources.d.ts +9 -0
  68. package/lib/agent/skill-resources.js +178 -0
  69. package/lib/agent/split-tool-result-images.d.ts +33 -0
  70. package/lib/agent/split-tool-result-images.js +47 -0
  71. package/lib/agent/stream-start.d.ts +30 -0
  72. package/lib/agent/stream-start.js +32 -0
  73. package/lib/agent/tools.d.ts +12 -0
  74. package/lib/agent/tools.js +77 -0
  75. package/lib/agent/view-render-timeout.d.ts +40 -0
  76. package/lib/agent/view-render-timeout.js +71 -0
  77. package/lib/animation-cubic.d.ts +12 -0
  78. package/lib/animation-cubic.js +44 -0
  79. package/lib/animation-spline.d.ts +50 -0
  80. package/lib/animation-spline.js +168 -0
  81. package/lib/architecture.d.ts +146 -0
  82. package/lib/architecture.js +498 -0
  83. package/lib/arena/adaptive.d.ts +38 -0
  84. package/lib/arena/adaptive.js +87 -0
  85. package/lib/arena/bradley-terry.d.ts +63 -0
  86. package/lib/arena/bradley-terry.js +165 -0
  87. package/lib/arena/index.d.ts +15 -0
  88. package/lib/arena/index.js +13 -0
  89. package/lib/assembly-transform.d.ts +7 -0
  90. package/lib/assembly-transform.js +21 -0
  91. package/lib/assembly.d.ts +105 -0
  92. package/lib/assembly.js +587 -0
  93. package/lib/asset-catalog.d.ts +13 -0
  94. package/lib/asset-catalog.js +21 -0
  95. package/lib/asset-export.d.ts +41 -0
  96. package/lib/asset-export.js +106 -0
  97. package/lib/asset-materials-node.d.ts +5 -0
  98. package/lib/asset-materials-node.js +56 -0
  99. package/lib/asset-widget.d.ts +10 -0
  100. package/lib/asset-widget.js +23 -0
  101. package/lib/assets-node.d.ts +33 -0
  102. package/lib/assets-node.js +348 -0
  103. package/lib/assets-resources.d.ts +33 -0
  104. package/lib/assets-resources.js +109 -0
  105. package/lib/assets.d.ts +91 -0
  106. package/lib/assets.js +205 -0
  107. package/lib/atomic-directory.d.ts +9 -0
  108. package/lib/atomic-directory.js +31 -0
  109. package/lib/authoring-style.d.ts +3 -0
  110. package/lib/authoring-style.js +42 -0
  111. package/lib/build-cache-node.d.ts +12 -0
  112. package/lib/build-cache-node.js +87 -0
  113. package/lib/build-cache.d.ts +24 -0
  114. package/lib/build-cache.js +229 -0
  115. package/lib/character.d.ts +132 -0
  116. package/lib/character.js +612 -0
  117. package/lib/cli-render-mode.d.ts +31 -0
  118. package/lib/cli-render-mode.js +204 -0
  119. package/lib/community-exporter.d.ts +13 -0
  120. package/lib/community-exporter.js +237 -0
  121. package/lib/composer/agent/compaction.d.ts +72 -0
  122. package/lib/composer/agent/compaction.js +103 -0
  123. package/lib/composer/agent/index.d.ts +25 -0
  124. package/lib/composer/agent/index.js +19 -0
  125. package/lib/composer/agent/prompt.d.ts +25 -0
  126. package/lib/composer/agent/prompt.js +100 -0
  127. package/lib/composer/agent/run.d.ts +91 -0
  128. package/lib/composer/agent/run.js +212 -0
  129. package/lib/composer/agent/tools.d.ts +75 -0
  130. package/lib/composer/agent/tools.js +643 -0
  131. package/lib/composer/agent/world-run.d.ts +50 -0
  132. package/lib/composer/agent/world-run.js +295 -0
  133. package/lib/composer/agent/world-tools.d.ts +20 -0
  134. package/lib/composer/agent/world-tools.js +311 -0
  135. package/lib/composer/collision.d.ts +109 -0
  136. package/lib/composer/collision.js +339 -0
  137. package/lib/composer/contract-utils.d.ts +6 -0
  138. package/lib/composer/contract-utils.js +48 -0
  139. package/lib/composer/dsl.d.ts +52 -0
  140. package/lib/composer/dsl.js +147 -0
  141. package/lib/composer/ground.d.ts +22 -0
  142. package/lib/composer/ground.js +9 -0
  143. package/lib/composer/index.d.ts +19 -0
  144. package/lib/composer/index.js +19 -0
  145. package/lib/composer/layout.d.ts +106 -0
  146. package/lib/composer/layout.js +216 -0
  147. package/lib/composer/model.d.ts +298 -0
  148. package/lib/composer/model.js +441 -0
  149. package/lib/composer/overlap.d.ts +89 -0
  150. package/lib/composer/overlap.js +139 -0
  151. package/lib/composer/presentation.d.ts +123 -0
  152. package/lib/composer/presentation.js +256 -0
  153. package/lib/composer/reachability.d.ts +78 -0
  154. package/lib/composer/reachability.js +303 -0
  155. package/lib/composer/render-port.d.ts +293 -0
  156. package/lib/composer/render-port.js +172 -0
  157. package/lib/composer/terrain-runtime.d.ts +73 -0
  158. package/lib/composer/terrain-runtime.js +328 -0
  159. package/lib/composer/terrain.d.ts +43 -0
  160. package/lib/composer/terrain.js +49 -0
  161. package/lib/composer/world-document.d.ts +722 -0
  162. package/lib/composer/world-document.js +857 -0
  163. package/lib/composer/world-integration.d.ts +78 -0
  164. package/lib/composer/world-integration.js +452 -0
  165. package/lib/composer/world-package.d.ts +312 -0
  166. package/lib/composer/world-package.js +209 -0
  167. package/lib/contracts/asset.d.ts +270 -0
  168. package/lib/contracts/asset.js +1616 -0
  169. package/lib/contracts/breadth.d.ts +197 -0
  170. package/lib/contracts/breadth.js +631 -0
  171. package/lib/contracts/environment.d.ts +13 -0
  172. package/lib/contracts/environment.js +67 -0
  173. package/lib/contracts/index.d.ts +5 -0
  174. package/lib/contracts/index.js +5 -0
  175. package/lib/contracts/integration.d.ts +94 -0
  176. package/lib/contracts/integration.js +10 -0
  177. package/lib/contracts/requirements-migration.d.ts +61 -0
  178. package/lib/contracts/requirements-migration.js +401 -0
  179. package/lib/contracts/requirements.d.ts +815 -0
  180. package/lib/contracts/requirements.js +266 -0
  181. package/lib/contracts/semantic.d.ts +124 -0
  182. package/lib/contracts/semantic.js +421 -0
  183. package/lib/deform.d.ts +31 -0
  184. package/lib/deform.js +137 -0
  185. package/lib/deformation-normals.d.ts +3 -0
  186. package/lib/deformation-normals.js +72 -0
  187. package/lib/discovery/articulation-recipes.d.ts +6 -0
  188. package/lib/discovery/articulation-recipes.js +184 -0
  189. package/lib/discovery/catalog-schema.d.ts +175 -0
  190. package/lib/discovery/catalog-schema.js +118 -0
  191. package/lib/discovery/catalog.d.ts +25 -0
  192. package/lib/discovery/catalog.js +84 -0
  193. package/lib/discovery/construction-recipes.d.ts +7 -0
  194. package/lib/discovery/construction-recipes.js +236 -0
  195. package/lib/discovery/helper-contracts.d.ts +19 -0
  196. package/lib/discovery/helper-contracts.js +1940 -0
  197. package/lib/discovery/helper-specs.d.ts +40 -0
  198. package/lib/discovery/helper-specs.js +800 -0
  199. package/lib/discovery/index.d.ts +9 -0
  200. package/lib/discovery/index.js +20 -0
  201. package/lib/discovery/intents.d.ts +3 -0
  202. package/lib/discovery/intents.js +117 -0
  203. package/lib/discovery/lexical-index.d.ts +5 -0
  204. package/lib/discovery/lexical-index.js +67 -0
  205. package/lib/discovery/query-schema.d.ts +35 -0
  206. package/lib/discovery/query-schema.js +66 -0
  207. package/lib/discovery/recipes.d.ts +6 -0
  208. package/lib/discovery/recipes.js +191 -0
  209. package/lib/discovery/service.d.ts +57 -0
  210. package/lib/discovery/service.js +234 -0
  211. package/lib/discovery/shapes.d.ts +6 -0
  212. package/lib/discovery/shapes.js +65 -0
  213. package/lib/discovery/structural-recipes.d.ts +6 -0
  214. package/lib/discovery/structural-recipes.js +193 -0
  215. package/lib/discovery/surface-recipes.d.ts +7 -0
  216. package/lib/discovery/surface-recipes.js +124 -0
  217. package/lib/draw-diagnostics.d.ts +57 -0
  218. package/lib/draw-diagnostics.js +239 -0
  219. package/lib/edit-buffer.d.ts +86 -0
  220. package/lib/edit-buffer.js +99 -0
  221. package/lib/engine-identity.d.ts +44 -0
  222. package/lib/engine-identity.js +41 -0
  223. package/lib/evaluator/authoring-diagnostic.d.ts +38 -0
  224. package/lib/evaluator/authoring-diagnostic.js +128 -0
  225. package/lib/evaluator/handler.d.ts +14 -0
  226. package/lib/evaluator/handler.js +86 -0
  227. package/lib/evaluator/index.d.ts +4 -0
  228. package/lib/evaluator/index.js +4 -0
  229. package/lib/evaluator/isolation.d.ts +45 -0
  230. package/lib/evaluator/isolation.js +362 -0
  231. package/lib/evaluator/probe-invariants.d.ts +2 -0
  232. package/lib/evaluator/probe-invariants.js +7 -0
  233. package/lib/evaluator/probe-worker.d.ts +1 -0
  234. package/lib/evaluator/probe-worker.js +134 -0
  235. package/lib/evaluator/protocol.d.ts +105 -0
  236. package/lib/evaluator/protocol.js +512 -0
  237. package/lib/evaluator/source-check.d.ts +7 -0
  238. package/lib/evaluator/source-check.js +57 -0
  239. package/lib/evaluator/subprocess.d.ts +26 -0
  240. package/lib/evaluator/subprocess.js +212 -0
  241. package/lib/evaluator/transport-worker.d.mts +1 -0
  242. package/lib/evaluator/transport-worker.mjs +3 -0
  243. package/lib/evaluator/worker-urls.d.ts +6 -0
  244. package/lib/evaluator/worker-urls.js +12 -0
  245. package/lib/evaluator/worker.d.ts +1 -0
  246. package/lib/evaluator/worker.js +26 -0
  247. package/lib/exporter-node.d.ts +16 -0
  248. package/lib/exporter-node.js +58 -0
  249. package/lib/gears.d.ts +68 -0
  250. package/lib/gears.js +259 -0
  251. package/lib/geometry-budget.d.ts +15 -0
  252. package/lib/geometry-budget.js +36 -0
  253. package/lib/geometry-catalog.d.ts +5 -0
  254. package/lib/geometry-catalog.js +161 -0
  255. package/lib/geometry-export.d.ts +11 -0
  256. package/lib/geometry-export.js +160 -0
  257. package/lib/geometry.d.ts +46 -0
  258. package/lib/geometry.js +311 -0
  259. package/lib/gltf-io.d.ts +38 -0
  260. package/lib/gltf-io.js +95 -0
  261. package/lib/implicit.d.ts +20 -0
  262. package/lib/implicit.js +58 -0
  263. package/lib/index-policy.d.ts +13 -0
  264. package/lib/index-policy.js +41 -0
  265. package/lib/index.d.ts +5 -0
  266. package/lib/index.js +5 -0
  267. package/lib/inspect.d.ts +76 -0
  268. package/lib/inspect.js +206 -0
  269. package/lib/kit.d.ts +90 -0
  270. package/lib/kit.js +459 -0
  271. package/lib/live-review-node.d.ts +70 -0
  272. package/lib/live-review-node.js +961 -0
  273. package/lib/live-review.d.ts +65 -0
  274. package/lib/live-review.js +1 -0
  275. package/lib/local-runtime.d.ts +25 -0
  276. package/lib/local-runtime.js +272 -0
  277. package/lib/lod-export.d.ts +39 -0
  278. package/lib/lod-export.js +102 -0
  279. package/lib/lod.d.ts +56 -0
  280. package/lib/lod.js +138 -0
  281. package/lib/material-library-node.d.ts +56 -0
  282. package/lib/material-library-node.js +402 -0
  283. package/lib/material-library.d.ts +731 -0
  284. package/lib/material-library.js +425 -0
  285. package/lib/material-metrics.d.ts +72 -0
  286. package/lib/material-metrics.js +276 -0
  287. package/lib/material-presets.d.ts +29 -0
  288. package/lib/material-presets.js +181 -0
  289. package/lib/material-recipe-prompt.d.ts +23 -0
  290. package/lib/material-recipe-prompt.js +72 -0
  291. package/lib/material-recipe-runtime.d.ts +31 -0
  292. package/lib/material-recipe-runtime.js +91 -0
  293. package/lib/material-recipes.d.ts +131 -0
  294. package/lib/material-recipes.js +543 -0
  295. package/lib/material-resources.d.ts +181 -0
  296. package/lib/material-resources.js +416 -0
  297. package/lib/material-texture-library.generated.d.ts +1311 -0
  298. package/lib/material-texture-library.generated.js +11308 -0
  299. package/lib/metrics.d.ts +98 -0
  300. package/lib/metrics.js +210 -0
  301. package/lib/node-visibility.d.ts +31 -0
  302. package/lib/node-visibility.js +105 -0
  303. package/lib/open-shell.d.ts +21 -0
  304. package/lib/open-shell.js +83 -0
  305. package/lib/ops.d.ts +197 -0
  306. package/lib/ops.js +630 -0
  307. package/lib/palette-snap.d.ts +74 -0
  308. package/lib/palette-snap.js +151 -0
  309. package/lib/palette.d.ts +75 -0
  310. package/lib/palette.js +273 -0
  311. package/lib/portable-material-runtime.d.ts +14 -0
  312. package/lib/portable-material-runtime.js +81 -0
  313. package/lib/primitives.d.ts +483 -0
  314. package/lib/primitives.js +1553 -0
  315. package/lib/procedural-material-v2.d.ts +189 -0
  316. package/lib/procedural-material-v2.js +452 -0
  317. package/lib/procedural-texture.d.ts +90 -0
  318. package/lib/procedural-texture.js +306 -0
  319. package/lib/profile.d.ts +190 -0
  320. package/lib/profile.js +366 -0
  321. package/lib/program-store-node.d.ts +14 -0
  322. package/lib/program-store-node.js +137 -0
  323. package/lib/program-store.d.ts +43 -0
  324. package/lib/program-store.js +89 -0
  325. package/lib/project-bundle-node.d.ts +15 -0
  326. package/lib/project-bundle-node.js +175 -0
  327. package/lib/project-bundle.d.ts +65 -0
  328. package/lib/project-bundle.js +322 -0
  329. package/lib/projects-node.d.ts +17 -0
  330. package/lib/projects-node.js +227 -0
  331. package/lib/projects.d.ts +312 -0
  332. package/lib/projects.js +216 -0
  333. package/lib/prompt-api.d.ts +32 -0
  334. package/lib/prompt-api.js +223 -0
  335. package/lib/qa/architecture-corpus.d.ts +31 -0
  336. package/lib/qa/architecture-corpus.js +438 -0
  337. package/lib/qa/architecture-repairs.d.ts +17 -0
  338. package/lib/qa/architecture-repairs.js +73 -0
  339. package/lib/qa/architecture.d.ts +56 -0
  340. package/lib/qa/architecture.js +985 -0
  341. package/lib/qa/benchmark-fixtures.d.ts +42 -0
  342. package/lib/qa/benchmark-fixtures.js +191 -0
  343. package/lib/qa/breadth-corpus.d.ts +17 -0
  344. package/lib/qa/breadth-corpus.js +125 -0
  345. package/lib/qa/breadth-evidence.d.ts +18 -0
  346. package/lib/qa/breadth-evidence.js +514 -0
  347. package/lib/qa/breadth-final.d.ts +46 -0
  348. package/lib/qa/breadth-final.js +359 -0
  349. package/lib/qa/breadth.d.ts +66 -0
  350. package/lib/qa/breadth.js +539 -0
  351. package/lib/qa/character-advisory.d.ts +7 -0
  352. package/lib/qa/character-advisory.js +488 -0
  353. package/lib/qa/character-repairs.d.ts +11 -0
  354. package/lib/qa/character-repairs.js +68 -0
  355. package/lib/qa/character-vehicle-corpus.d.ts +32 -0
  356. package/lib/qa/character-vehicle-corpus.js +525 -0
  357. package/lib/qa/character.d.ts +66 -0
  358. package/lib/qa/character.js +712 -0
  359. package/lib/qa/corpus.d.ts +185 -0
  360. package/lib/qa/corpus.js +396 -0
  361. package/lib/qa/environment.d.ts +44 -0
  362. package/lib/qa/environment.js +725 -0
  363. package/lib/qa/geometry-relations.d.ts +94 -0
  364. package/lib/qa/geometry-relations.js +552 -0
  365. package/lib/qa/gltf.d.ts +29 -0
  366. package/lib/qa/gltf.js +66 -0
  367. package/lib/qa/index.d.ts +32 -0
  368. package/lib/qa/index.js +34 -0
  369. package/lib/qa/lod.d.ts +14 -0
  370. package/lib/qa/lod.js +25 -0
  371. package/lib/qa/material.d.ts +5 -0
  372. package/lib/qa/material.js +223 -0
  373. package/lib/qa/part-connectivity.d.ts +73 -0
  374. package/lib/qa/part-connectivity.js +216 -0
  375. package/lib/qa/prop-environment-prompt.d.ts +6 -0
  376. package/lib/qa/prop-environment-prompt.js +43 -0
  377. package/lib/qa/prop-helper-policy.d.ts +37 -0
  378. package/lib/qa/prop-helper-policy.js +65 -0
  379. package/lib/qa/prop.d.ts +44 -0
  380. package/lib/qa/prop.js +702 -0
  381. package/lib/qa/reference-comparison.d.ts +183 -0
  382. package/lib/qa/reference-comparison.js +420 -0
  383. package/lib/qa/registry.d.ts +159 -0
  384. package/lib/qa/registry.js +406 -0
  385. package/lib/qa/requirements-applicability.d.ts +33 -0
  386. package/lib/qa/requirements-applicability.js +189 -0
  387. package/lib/qa/requirements-report.d.ts +38 -0
  388. package/lib/qa/requirements-report.js +202 -0
  389. package/lib/qa/requirements-run.d.ts +20 -0
  390. package/lib/qa/requirements-run.js +370 -0
  391. package/lib/qa/run.d.ts +54 -0
  392. package/lib/qa/run.js +240 -0
  393. package/lib/qa/self-intersection.d.ts +157 -0
  394. package/lib/qa/self-intersection.js +633 -0
  395. package/lib/qa/sweep.d.ts +4 -0
  396. package/lib/qa/sweep.js +65 -0
  397. package/lib/qa/types.d.ts +90 -0
  398. package/lib/qa/types.js +81 -0
  399. package/lib/qa/universal.d.ts +14 -0
  400. package/lib/qa/universal.js +398 -0
  401. package/lib/qa/vegetation-corpus.d.ts +18 -0
  402. package/lib/qa/vegetation-corpus.js +304 -0
  403. package/lib/qa/vegetation.d.ts +133 -0
  404. package/lib/qa/vegetation.js +933 -0
  405. package/lib/qa/vehicle-advisory.d.ts +8 -0
  406. package/lib/qa/vehicle-advisory.js +395 -0
  407. package/lib/qa/vehicle.d.ts +19 -0
  408. package/lib/qa/vehicle.js +594 -0
  409. package/lib/rebuild-options.d.ts +31 -0
  410. package/lib/rebuild-options.js +13 -0
  411. package/lib/render-capabilities.d.ts +25 -0
  412. package/lib/render-capabilities.js +100 -0
  413. package/lib/render-service-client.d.ts +59 -0
  414. package/lib/render-service-client.js +194 -0
  415. package/lib/render-service-host.d.ts +44 -0
  416. package/lib/render-service-host.js +236 -0
  417. package/lib/render-service-windows.d.ts +12 -0
  418. package/lib/render-service-windows.js +72 -0
  419. package/lib/render.d.ts +565 -0
  420. package/lib/render.js +1978 -0
  421. package/lib/requirements-assets.d.ts +6 -0
  422. package/lib/requirements-assets.js +33 -0
  423. package/lib/requirements-context.d.ts +1658 -0
  424. package/lib/requirements-context.js +126 -0
  425. package/lib/requirements-identity.d.ts +3 -0
  426. package/lib/requirements-identity.js +38 -0
  427. package/lib/requirements-json.d.ts +12 -0
  428. package/lib/requirements-json.js +58 -0
  429. package/lib/requirements-store.d.ts +42 -0
  430. package/lib/requirements-store.js +86 -0
  431. package/lib/requirements.d.ts +4 -0
  432. package/lib/requirements.js +4 -0
  433. package/lib/revision-comparison.d.ts +85 -0
  434. package/lib/revision-comparison.js +334 -0
  435. package/lib/rig-export.d.ts +5 -0
  436. package/lib/rig-export.js +19 -0
  437. package/lib/rigid-merge.d.ts +90 -0
  438. package/lib/rigid-merge.js +585 -0
  439. package/lib/runtime-identity.d.ts +20 -0
  440. package/lib/runtime-identity.js +193 -0
  441. package/lib/solids.d.ts +29 -0
  442. package/lib/solids.js +523 -0
  443. package/lib/source-bindings.d.ts +6 -0
  444. package/lib/source-bindings.js +96 -0
  445. package/lib/source-runtime-checks.d.ts +14 -0
  446. package/lib/source-runtime-checks.js +169 -0
  447. package/lib/sweep-analysis.d.ts +22 -0
  448. package/lib/sweep-analysis.js +109 -0
  449. package/lib/sweep.d.ts +34 -0
  450. package/lib/sweep.js +347 -0
  451. package/lib/texture-bake.d.ts +125 -0
  452. package/lib/texture-bake.js +395 -0
  453. package/lib/texture-contract.d.ts +3 -0
  454. package/lib/texture-contract.js +10 -0
  455. package/lib/texture-resolver.d.ts +22 -0
  456. package/lib/texture-resolver.js +28 -0
  457. package/lib/textures.d.ts +90 -0
  458. package/lib/textures.js +240 -0
  459. package/lib/tools/actions.d.ts +35 -0
  460. package/lib/tools/actions.js +69 -0
  461. package/lib/tools/capture-input.d.ts +373 -0
  462. package/lib/tools/capture-input.js +193 -0
  463. package/lib/tools/discovery.d.ts +3 -0
  464. package/lib/tools/discovery.js +177 -0
  465. package/lib/tools/materials.d.ts +29 -0
  466. package/lib/tools/materials.js +168 -0
  467. package/lib/tools/preview-fidelity.d.ts +6 -0
  468. package/lib/tools/preview-fidelity.js +23 -0
  469. package/lib/tools/program-artifacts.d.ts +30 -0
  470. package/lib/tools/program-artifacts.js +76 -0
  471. package/lib/tools/programs.d.ts +9 -0
  472. package/lib/tools/programs.js +151 -0
  473. package/lib/tools/projects.d.ts +27 -0
  474. package/lib/tools/projects.js +98 -0
  475. package/lib/tools/registry.d.ts +792 -0
  476. package/lib/tools/registry.js +2123 -0
  477. package/lib/tools/review-detail.d.ts +106 -0
  478. package/lib/tools/review-detail.js +740 -0
  479. package/lib/tools/review.d.ts +40 -0
  480. package/lib/tools/review.js +230 -0
  481. package/lib/tools/skill-resource.d.ts +8 -0
  482. package/lib/tools/skill-resource.js +1 -0
  483. package/lib/tools/workspace.d.ts +8 -0
  484. package/lib/tools/workspace.js +87 -0
  485. package/lib/user-data-extras.d.ts +40 -0
  486. package/lib/user-data-extras.js +158 -0
  487. package/lib/user-data-validation.d.ts +18 -0
  488. package/lib/user-data-validation.js +201 -0
  489. package/lib/uv-project.d.ts +14 -0
  490. package/lib/uv-project.js +145 -0
  491. package/lib/uv-shapes.d.ts +11 -0
  492. package/lib/uv-shapes.js +48 -0
  493. package/lib/uv.d.ts +39 -0
  494. package/lib/uv.js +216 -0
  495. package/lib/validation.d.ts +90 -0
  496. package/lib/validation.js +1099 -0
  497. package/lib/vehicle.d.ts +128 -0
  498. package/lib/vehicle.js +487 -0
  499. package/lib/views/annotate.d.ts +41 -0
  500. package/lib/views/annotate.js +131 -0
  501. package/lib/views/architecture.d.ts +22 -0
  502. package/lib/views/architecture.js +55 -0
  503. package/lib/views/background.d.ts +54 -0
  504. package/lib/views/background.js +65 -0
  505. package/lib/views/camera-capture.d.ts +15 -0
  506. package/lib/views/camera-capture.js +101 -0
  507. package/lib/views/camera.d.ts +106 -0
  508. package/lib/views/camera.js +488 -0
  509. package/lib/views/capture-cache.d.ts +48 -0
  510. package/lib/views/capture-cache.js +239 -0
  511. package/lib/views/capture-limits.d.ts +19 -0
  512. package/lib/views/capture-limits.js +61 -0
  513. package/lib/views/capture.d.ts +124 -0
  514. package/lib/views/capture.js +210 -0
  515. package/lib/views/character-capture.d.ts +20 -0
  516. package/lib/views/character-capture.js +180 -0
  517. package/lib/views/character.d.ts +64 -0
  518. package/lib/views/character.js +176 -0
  519. package/lib/views/diagnostic.d.ts +90 -0
  520. package/lib/views/diagnostic.js +627 -0
  521. package/lib/views/evidence-history.d.ts +13 -0
  522. package/lib/views/evidence-history.js +131 -0
  523. package/lib/views/glb.d.ts +36 -0
  524. package/lib/views/glb.js +524 -0
  525. package/lib/views/grid.d.ts +46 -0
  526. package/lib/views/grid.js +81 -0
  527. package/lib/views/index.d.ts +257 -0
  528. package/lib/views/index.js +624 -0
  529. package/lib/views/inspect.d.ts +110 -0
  530. package/lib/views/inspect.js +195 -0
  531. package/lib/views/lod.d.ts +30 -0
  532. package/lib/views/lod.js +79 -0
  533. package/lib/views/measurement.d.ts +47 -0
  534. package/lib/views/measurement.js +60 -0
  535. package/lib/views/part-placement.d.ts +25 -0
  536. package/lib/views/part-placement.js +26 -0
  537. package/lib/views/png.d.ts +23 -0
  538. package/lib/views/png.js +162 -0
  539. package/lib/views/port.d.ts +74 -0
  540. package/lib/views/port.js +250 -0
  541. package/lib/views/pose.d.ts +113 -0
  542. package/lib/views/pose.js +433 -0
  543. package/lib/views/raster.d.ts +164 -0
  544. package/lib/views/raster.js +508 -0
  545. package/lib/views/renderer-id.d.ts +11 -0
  546. package/lib/views/renderer-id.js +29 -0
  547. package/lib/views/scene-raster.d.ts +41 -0
  548. package/lib/views/scene-raster.js +84 -0
  549. package/lib/views/surface-distance.d.ts +51 -0
  550. package/lib/views/surface-distance.js +343 -0
  551. package/lib/views/vehicle.d.ts +57 -0
  552. package/lib/views/vehicle.js +288 -0
  553. package/lib/wall-panels.d.ts +38 -0
  554. package/lib/wall-panels.js +99 -0
  555. package/lib/widget-transfer.d.ts +12 -0
  556. package/lib/widget-transfer.js +117 -0
  557. package/lib/workspace-location.d.ts +6 -0
  558. package/lib/workspace-location.js +16 -0
  559. package/lib/workspace-node.d.ts +15 -0
  560. package/lib/workspace-node.js +74 -0
  561. package/lib/workspace.d.ts +26 -0
  562. package/lib/workspace.js +22 -0
  563. package/lib/written-nodes.d.ts +10 -0
  564. package/lib/written-nodes.js +32 -0
  565. package/package.json +385 -4
  566. package/plugin.json +16 -0
  567. package/plugins/kiln-engine/.claude-plugin/plugin.json +18 -0
  568. package/plugins/kiln-engine/LICENSE +21 -0
  569. package/plugins/kiln-engine/README.md +25 -0
  570. package/plugins/kiln-engine/package-provenance.json +15 -0
  571. package/plugins/kiln-engine/plugin.json +38 -0
  572. package/plugins/kiln-engine/runtime.json +4 -0
  573. package/plugins/kiln-engine/scripts/setup-workspace.mjs +337 -0
  574. package/plugins/kiln-engine/skills/kiln-setup-workspace/SKILL.md +108 -0
  575. package/plugins/kiln-engine/skills/kiln-setup-workspace/references/plugin-install.md +66 -0
  576. package/render-service/README.md +139 -0
  577. package/render-service/package-lock.json +72 -0
  578. package/render-service/package.json +22 -0
  579. package/render-service/src/backdrops.mjs +26 -0
  580. package/render-service/src/bind-policy.mjs +80 -0
  581. package/render-service/src/build-identity.mjs +83 -0
  582. package/render-service/src/cache-identity.mjs +65 -0
  583. package/render-service/src/contract.mjs +494 -0
  584. package/render-service/src/display-output.mjs +18 -0
  585. package/render-service/src/display-transform.mjs +192 -0
  586. package/render-service/src/framing.mjs +114 -0
  587. package/render-service/src/glb-input.mjs +259 -0
  588. package/render-service/src/gpu.mjs +101 -0
  589. package/render-service/src/health-contract.mjs +40 -0
  590. package/render-service/src/instance.mjs +146 -0
  591. package/render-service/src/node-visibility.mjs +49 -0
  592. package/render-service/src/png-input.mjs +77 -0
  593. package/render-service/src/presentation-presets.mjs +216 -0
  594. package/render-service/src/readback.mjs +16 -0
  595. package/render-service/src/register-hooks.mjs +2 -0
  596. package/render-service/src/render-queue.mjs +144 -0
  597. package/render-service/src/renderer.mjs +473 -0
  598. package/render-service/src/request-limits.mjs +72 -0
  599. package/render-service/src/review-tone-mapping.mjs +55 -0
  600. package/render-service/src/server.mjs +387 -0
  601. package/render-service/src/three-alias-hooks.mjs +6 -0
  602. package/scripts/create-workspace.mjs +808 -0
  603. package/scripts/package-plugin.mjs +67 -0
  604. package/skills/kiln-author-asset/SKILL.md +104 -0
  605. package/skills/kiln-author-asset/references/camera-cli.md +33 -0
  606. package/skills/kiln-author-asset/references/camera-recipes.md +73 -0
  607. package/skills/kiln-author-asset/references/export-profiles.md +216 -0
  608. package/skills/kiln-author-asset/references/geometry-recipes.md +329 -0
  609. package/skills/kiln-author-asset/references/program-contract.md +44 -0
  610. package/skills/kiln-author-asset/references/projects-and-materials.md +158 -0
  611. package/skills/kiln-author-asset/references/reusable-frame.kiln.js +32 -0
  612. package/skills/kiln-batch-dispatch/SKILL.md +22 -0
  613. package/skills/kiln-batch-dispatch/references/clean-room-evaluation.md +35 -0
  614. package/skills/kiln-compose-scene/SKILL.md +38 -0
  615. package/skills/kiln-compose-scene/references/composition-api.md +29 -0
  616. package/skills/kiln-compose-scene/references/runtime-scenes.md +363 -0
  617. package/skills/kiln-qa-asset/SKILL.md +99 -0
  618. package/skills/kiln-qa-asset/references/engine-handoff.md +246 -0
  619. package/skills/kiln-qa-asset/references/integration-checks.md +96 -0
  620. package/skills/kiln-refine-asset/SKILL.md +136 -0
  621. package/skills/kiln-refine-asset/references/revision-and-views.md +205 -0
  622. package/skills/kiln-refine-asset/references/revision-cli.md +39 -0
  623. package/skills/kiln-setup-workspace/SKILL.md +108 -0
  624. package/skills/kiln-setup-workspace/references/plugin-install.md +66 -0
  625. package/src/agent/call-budget.ts +106 -0
  626. package/src/agent/compaction.ts +197 -0
  627. package/src/agent/concurrency.ts +30 -0
  628. package/src/agent/diff.ts +141 -0
  629. package/src/agent/generate.ts +448 -0
  630. package/src/agent/hooks.ts +204 -0
  631. package/src/agent/index.ts +114 -0
  632. package/src/agent/native-prompt.ts +51 -0
  633. package/src/agent/native-workflow.ts +33 -0
  634. package/src/agent/providers.ts +529 -0
  635. package/src/agent/run.ts +356 -0
  636. package/src/agent/skill-resources.ts +198 -0
  637. package/src/agent/split-tool-result-images.ts +80 -0
  638. package/src/agent/stream-start.ts +61 -0
  639. package/src/agent/tools.ts +113 -0
  640. package/src/agent/view-render-timeout.ts +110 -0
  641. package/src/animation-cli.ts +251 -0
  642. package/src/animation-cubic.ts +57 -0
  643. package/src/animation-spline.ts +183 -0
  644. package/src/architecture.ts +871 -0
  645. package/src/arena/adaptive.ts +119 -0
  646. package/src/arena/bradley-terry.ts +221 -0
  647. package/src/arena/index.ts +21 -0
  648. package/src/assembly-transform.ts +34 -0
  649. package/src/assembly.ts +762 -0
  650. package/src/asset-catalog.ts +30 -0
  651. package/src/asset-cli.ts +505 -0
  652. package/src/asset-export.ts +141 -0
  653. package/src/asset-materials-node.ts +78 -0
  654. package/src/asset-viewer.ts +160 -0
  655. package/src/asset-widget-uri.ts +9 -0
  656. package/src/asset-widget.ts +38 -0
  657. package/src/assets-node.ts +412 -0
  658. package/src/assets-resources.ts +137 -0
  659. package/src/assets.ts +252 -0
  660. package/src/atomic-directory.ts +45 -0
  661. package/src/authoring-style.ts +49 -0
  662. package/src/breadth-prompt.ts +79 -0
  663. package/src/build-cache-node.ts +99 -0
  664. package/src/build-cache.ts +253 -0
  665. package/src/character.ts +776 -0
  666. package/src/cli-json.ts +29 -0
  667. package/src/cli-output.ts +135 -0
  668. package/src/cli-render-mode.ts +270 -0
  669. package/src/cli.ts +809 -0
  670. package/src/community-exporter.ts +268 -0
  671. package/src/composer/agent/compaction.ts +146 -0
  672. package/src/composer/agent/index.ts +41 -0
  673. package/src/composer/agent/prompt.ts +126 -0
  674. package/src/composer/agent/run.ts +317 -0
  675. package/src/composer/agent/tools.ts +847 -0
  676. package/src/composer/agent/world-run.ts +421 -0
  677. package/src/composer/agent/world-tools.ts +411 -0
  678. package/src/composer/collision.ts +448 -0
  679. package/src/composer/contract-utils.ts +52 -0
  680. package/src/composer/dsl.ts +196 -0
  681. package/src/composer/ground.ts +27 -0
  682. package/src/composer/index.ts +19 -0
  683. package/src/composer/layout.ts +357 -0
  684. package/src/composer/model.ts +688 -0
  685. package/src/composer/overlap.ts +220 -0
  686. package/src/composer/presentation.ts +309 -0
  687. package/src/composer/reachability.ts +407 -0
  688. package/src/composer/render-port.ts +516 -0
  689. package/src/composer/terrain-runtime.ts +415 -0
  690. package/src/composer/terrain.ts +53 -0
  691. package/src/composer/world-document.ts +1019 -0
  692. package/src/composer/world-integration.ts +589 -0
  693. package/src/composer/world-package.ts +255 -0
  694. package/src/contracts/asset.ts +2030 -0
  695. package/src/contracts/breadth.ts +888 -0
  696. package/src/contracts/environment.ts +81 -0
  697. package/src/contracts/index.ts +5 -0
  698. package/src/contracts/integration.ts +100 -0
  699. package/src/contracts/requirements-migration.ts +536 -0
  700. package/src/contracts/requirements.ts +357 -0
  701. package/src/contracts/semantic.ts +544 -0
  702. package/src/deform.ts +215 -0
  703. package/src/deformation-normals.ts +84 -0
  704. package/src/direct-entry.ts +28 -0
  705. package/src/discovery/articulation-recipes.ts +190 -0
  706. package/src/discovery/catalog-schema.ts +125 -0
  707. package/src/discovery/catalog.ts +88 -0
  708. package/src/discovery/construction-recipes.ts +243 -0
  709. package/src/discovery/helper-contracts.ts +2388 -0
  710. package/src/discovery/helper-specs.ts +1046 -0
  711. package/src/discovery/index.ts +36 -0
  712. package/src/discovery/intents.ts +120 -0
  713. package/src/discovery/lexical-index.ts +72 -0
  714. package/src/discovery/query-schema.ts +71 -0
  715. package/src/discovery/recipes.ts +215 -0
  716. package/src/discovery/service.ts +329 -0
  717. package/src/discovery/shapes.ts +120 -0
  718. package/src/discovery/structural-recipes.ts +199 -0
  719. package/src/discovery/surface-recipes.ts +130 -0
  720. package/src/discovery-cli.ts +106 -0
  721. package/src/draw-diagnostics.ts +313 -0
  722. package/src/edit-buffer.ts +134 -0
  723. package/src/edit-cli.ts +125 -0
  724. package/src/engine-identity.ts +50 -0
  725. package/src/evaluator/authoring-diagnostic.ts +168 -0
  726. package/src/evaluator/handler.ts +114 -0
  727. package/src/evaluator/index.ts +50 -0
  728. package/src/evaluator/isolation.ts +454 -0
  729. package/src/evaluator/probe-invariants.ts +9 -0
  730. package/src/evaluator/probe-worker.ts +158 -0
  731. package/src/evaluator/protocol.ts +701 -0
  732. package/src/evaluator/source-check.ts +64 -0
  733. package/src/evaluator/subprocess.ts +294 -0
  734. package/src/evaluator/transport-worker.mjs +8 -0
  735. package/src/evaluator/worker-urls.ts +16 -0
  736. package/src/evaluator/worker.ts +26 -0
  737. package/src/experiments/geometry-acceptance.ts +278 -0
  738. package/src/experiments/geometry-frontier.ts +181 -0
  739. package/src/experiments/program-aliases.ts +96 -0
  740. package/src/experiments/run-w6-material-vegetation.ts +7 -0
  741. package/src/experiments/run-w7-vegetation-lod.ts +6 -0
  742. package/src/experiments/w6-material-vegetation.ts +772 -0
  743. package/src/experiments/w7-vegetation-lod.ts +335 -0
  744. package/src/exporter-node.ts +68 -0
  745. package/src/gears.ts +334 -0
  746. package/src/generated/mcp-manifest.json +2050 -0
  747. package/src/geometry-budget.ts +50 -0
  748. package/src/geometry-catalog.ts +215 -0
  749. package/src/geometry-export.ts +193 -0
  750. package/src/geometry.ts +379 -0
  751. package/src/gltf-io.ts +129 -0
  752. package/src/gltf-validator-shims.d.ts +12 -0
  753. package/src/implicit.ts +106 -0
  754. package/src/index-policy.ts +52 -0
  755. package/src/index.ts +5 -0
  756. package/src/inspect-cli.ts +198 -0
  757. package/src/inspect.ts +290 -0
  758. package/src/kit.ts +547 -0
  759. package/src/live-review-node.ts +1011 -0
  760. package/src/live-review.ts +55 -0
  761. package/src/local-runtime.ts +336 -0
  762. package/src/lod-export.ts +120 -0
  763. package/src/lod.ts +192 -0
  764. package/src/loopback.ts +6 -0
  765. package/src/material-library-node.ts +488 -0
  766. package/src/material-library.ts +481 -0
  767. package/src/material-metrics.ts +392 -0
  768. package/src/material-presets.ts +207 -0
  769. package/src/material-recipe-prompt.ts +99 -0
  770. package/src/material-recipe-runtime.ts +162 -0
  771. package/src/material-recipes.ts +748 -0
  772. package/src/material-resources.ts +640 -0
  773. package/src/material-texture-library.generated.ts +11408 -0
  774. package/src/mcp-core.ts +437 -0
  775. package/src/mcp-engine.ts +383 -0
  776. package/src/mcp-manifest.ts +104 -0
  777. package/src/mcp-server.ts +118 -0
  778. package/src/metrics.ts +277 -0
  779. package/src/migration-cli.ts +105 -0
  780. package/src/migration-rebuild.ts +265 -0
  781. package/src/node-visibility.ts +116 -0
  782. package/src/open-shell.ts +104 -0
  783. package/src/ops.ts +751 -0
  784. package/src/palette-snap.ts +209 -0
  785. package/src/palette.ts +307 -0
  786. package/src/portable-material-runtime.ts +109 -0
  787. package/src/primitives.ts +2299 -0
  788. package/src/procedural-material-v2.ts +720 -0
  789. package/src/procedural-texture.ts +427 -0
  790. package/src/profile.ts +485 -0
  791. package/src/program-store-node.ts +138 -0
  792. package/src/program-store.ts +116 -0
  793. package/src/project-bundle-node.ts +220 -0
  794. package/src/project-bundle.ts +392 -0
  795. package/src/project-cli.ts +248 -0
  796. package/src/projects-node.ts +270 -0
  797. package/src/projects.ts +274 -0
  798. package/src/prompt-api.ts +231 -0
  799. package/src/qa/architecture-corpus.ts +828 -0
  800. package/src/qa/architecture-repairs.ts +92 -0
  801. package/src/qa/architecture.ts +1358 -0
  802. package/src/qa/benchmark-fixtures.ts +441 -0
  803. package/src/qa/breadth-corpus.ts +168 -0
  804. package/src/qa/breadth-evidence.ts +595 -0
  805. package/src/qa/breadth-final.ts +453 -0
  806. package/src/qa/breadth.ts +690 -0
  807. package/src/qa/character-advisory.ts +596 -0
  808. package/src/qa/character-repairs.ts +185 -0
  809. package/src/qa/character-vehicle-corpus.ts +802 -0
  810. package/src/qa/character.ts +998 -0
  811. package/src/qa/corpus.ts +499 -0
  812. package/src/qa/environment.ts +903 -0
  813. package/src/qa/geometry-relations.ts +843 -0
  814. package/src/qa/gltf.ts +103 -0
  815. package/src/qa/index.ts +34 -0
  816. package/src/qa/lod.ts +28 -0
  817. package/src/qa/material.ts +302 -0
  818. package/src/qa/part-connectivity.ts +252 -0
  819. package/src/qa/prop-environment-prompt.ts +58 -0
  820. package/src/qa/prop-helper-policy.ts +118 -0
  821. package/src/qa/prop.ts +828 -0
  822. package/src/qa/reference-comparison.ts +495 -0
  823. package/src/qa/registry.ts +604 -0
  824. package/src/qa/requirements-applicability.ts +241 -0
  825. package/src/qa/requirements-report.ts +280 -0
  826. package/src/qa/requirements-run.ts +470 -0
  827. package/src/qa/run.ts +329 -0
  828. package/src/qa/self-intersection.ts +741 -0
  829. package/src/qa/sweep.ts +68 -0
  830. package/src/qa/types.ts +187 -0
  831. package/src/qa/universal.ts +506 -0
  832. package/src/qa/vegetation-corpus.ts +404 -0
  833. package/src/qa/vegetation.ts +1174 -0
  834. package/src/qa/vehicle-advisory.ts +468 -0
  835. package/src/qa/vehicle.ts +756 -0
  836. package/src/rebuild-options.ts +16 -0
  837. package/src/render-capabilities.ts +140 -0
  838. package/src/render-service-client.ts +297 -0
  839. package/src/render-service-host.ts +278 -0
  840. package/src/render-service-windows.ts +80 -0
  841. package/src/render.ts +2748 -0
  842. package/src/requirements-assets.ts +53 -0
  843. package/src/requirements-context.ts +170 -0
  844. package/src/requirements-file.ts +10 -0
  845. package/src/requirements-identity.ts +43 -0
  846. package/src/requirements-json.ts +65 -0
  847. package/src/requirements-store.ts +150 -0
  848. package/src/requirements.ts +4 -0
  849. package/src/review-cli.ts +81 -0
  850. package/src/revision-comparison.ts +425 -0
  851. package/src/rig-export.ts +29 -0
  852. package/src/rigid-merge.ts +691 -0
  853. package/src/runtime-identity.ts +207 -0
  854. package/src/runtime-support.mjs +20 -0
  855. package/src/service-cli.ts +210 -0
  856. package/src/solids.ts +650 -0
  857. package/src/source-bindings.ts +90 -0
  858. package/src/source-runtime-checks.ts +189 -0
  859. package/src/sweep-analysis.ts +168 -0
  860. package/src/sweep.ts +482 -0
  861. package/src/texture-bake.ts +526 -0
  862. package/src/texture-contract.ts +12 -0
  863. package/src/texture-resolver.ts +61 -0
  864. package/src/textures.ts +345 -0
  865. package/src/tools/actions.ts +124 -0
  866. package/src/tools/capture-input.ts +233 -0
  867. package/src/tools/discovery.ts +194 -0
  868. package/src/tools/materials.ts +206 -0
  869. package/src/tools/preview-fidelity.ts +31 -0
  870. package/src/tools/program-artifacts.ts +107 -0
  871. package/src/tools/programs.ts +190 -0
  872. package/src/tools/projects.ts +141 -0
  873. package/src/tools/registry.ts +3111 -0
  874. package/src/tools/review-detail.ts +788 -0
  875. package/src/tools/review.ts +269 -0
  876. package/src/tools/skill-resource.ts +9 -0
  877. package/src/tools/workspace.ts +112 -0
  878. package/src/user-data-extras.ts +181 -0
  879. package/src/user-data-validation.ts +211 -0
  880. package/src/uv-project.ts +185 -0
  881. package/src/uv-shapes.ts +63 -0
  882. package/src/uv.ts +301 -0
  883. package/src/validation.ts +1257 -0
  884. package/src/vegetation-prompt.ts +109 -0
  885. package/src/vehicle.ts +742 -0
  886. package/src/viewer/app.ts +666 -0
  887. package/src/viewer/attribution.ts +17 -0
  888. package/src/viewer/camera-state.ts +45 -0
  889. package/src/viewer/chat-app.ts +221 -0
  890. package/src/viewer/chat-download.ts +53 -0
  891. package/src/viewer/dashboard.ts +59 -0
  892. package/src/viewer/deep-link.ts +34 -0
  893. package/src/viewer/dom.ts +63 -0
  894. package/src/viewer/framing.ts +55 -0
  895. package/src/viewer/library-state.ts +34 -0
  896. package/src/viewer/live-panel.ts +742 -0
  897. package/src/viewer/live-state.ts +99 -0
  898. package/src/viewer/load-guard.ts +10 -0
  899. package/src/viewer/lod-control.ts +98 -0
  900. package/src/viewer/lod.ts +172 -0
  901. package/src/viewer/material-preset-form.ts +34 -0
  902. package/src/viewer/materials-panel.ts +335 -0
  903. package/src/viewer/membership-panel.ts +122 -0
  904. package/src/viewer/navigation.ts +9 -0
  905. package/src/viewer/performance-control.ts +75 -0
  906. package/src/viewer/performance.ts +61 -0
  907. package/src/viewer/project-editor.ts +37 -0
  908. package/src/viewer/project-membership.ts +20 -0
  909. package/src/viewer/projects-panel.ts +374 -0
  910. package/src/viewer/scene.ts +426 -0
  911. package/src/viewer/visibility.ts +73 -0
  912. package/src/views/annotate.ts +138 -0
  913. package/src/views/architecture.ts +77 -0
  914. package/src/views/background.ts +87 -0
  915. package/src/views/camera-capture.ts +143 -0
  916. package/src/views/camera.ts +622 -0
  917. package/src/views/capture-cache.ts +272 -0
  918. package/src/views/capture-limits.ts +73 -0
  919. package/src/views/capture.ts +300 -0
  920. package/src/views/character-capture.ts +279 -0
  921. package/src/views/character.ts +267 -0
  922. package/src/views/diagnostic.ts +853 -0
  923. package/src/views/evidence-history.ts +166 -0
  924. package/src/views/glb.ts +747 -0
  925. package/src/views/grid.ts +118 -0
  926. package/src/views/index.ts +1071 -0
  927. package/src/views/inspect.ts +296 -0
  928. package/src/views/lod.ts +117 -0
  929. package/src/views/measurement.ts +69 -0
  930. package/src/views/part-placement.ts +50 -0
  931. package/src/views/png.ts +175 -0
  932. package/src/views/port.ts +335 -0
  933. package/src/views/pose.ts +541 -0
  934. package/src/views/raster.ts +627 -0
  935. package/src/views/renderer-id.ts +31 -0
  936. package/src/views/scene-raster.ts +139 -0
  937. package/src/views/surface-distance.ts +403 -0
  938. package/src/views/vehicle.ts +431 -0
  939. package/src/wall-panels.ts +127 -0
  940. package/src/widget-transfer.ts +115 -0
  941. package/src/workspace-cli.ts +41 -0
  942. package/src/workspace-http.ts +219 -0
  943. package/src/workspace-location.ts +20 -0
  944. package/src/workspace-node.ts +91 -0
  945. package/src/workspace.ts +43 -0
  946. package/src/written-nodes.ts +39 -0
  947. package/src/xatlasjs-shims.d.ts +16 -0
@@ -0,0 +1,329 @@
1
+ # Choose geometry by the shape you need
2
+
3
+ Search `kiln_discover` for the shape or operation you need, then fetch exact `ids` for unfamiliar helpers. An overview supplies current `family` and `tags` labels when a filter is useful; `{ kind: "recipe" }` browses optional construction recipes. Each example below lives in `build()` with a named root and suitable material. Adapt or combine recipes freely, including with custom equations and topology.
4
+
5
+ Parts use the asset frame: metres, +X forward, +Y up, +Z right. Forward is the direction the object faces; a bench's sitter faces +X. Part `rotation` is in degrees and follows the right-hand rule in this frame: `[0, 90, 0]` turns forward (+X) toward -Z, the object's left; `[0, 0, 90]` tips +X up to +Y; `[90, 0, 0]` rolls +Y toward +Z.
6
+
7
+ For a gripper or carrier, define the payload's occupied volume as well as its
8
+ attachment marker. Check the complete gripper housing, palm and jaws against that
9
+ volume; separated fingers do not prove the central body clears it. Size the open
10
+ jaw gap for approach and release, then verify the closed contact surfaces. Mating
11
+ pins and grooves must agree in count, spacing, orientation, depth and clearance in
12
+ one shared frame. A locator proves a pose, not a physical fit. Keep these mating
13
+ dimensions in the asset brief and shared source parameters.
14
+
15
+ For moving attachments, inspect intermediate poses along approach, pickup, travel
16
+ and release. Matching endpoints can still produce a path through the payload or
17
+ support. Keep joints, contact markers and payload motion in the intended hierarchy;
18
+ repair the geometry or path where the swept volumes collide.
19
+
20
+ For ears, handles or other details attached to a rotated or lofted body, derive
21
+ their bases from the carrier's local surface and transform them through the same
22
+ frame. A nearby world-space point can leave a visible gap after the body rotates.
23
+ Use a small intentional base overlap for a solid join, then inspect the exported
24
+ attachment from both sides and an oblique view. Preserve unrelated joints and
25
+ animation tracks when repairing an attachment; matching names alone does not prove
26
+ their transforms or motion survived the export.
27
+
28
+ ## Surfaces from equations
29
+
30
+ An asymmetric canopy or corrugated sheet can be much shorter as a function than as many primitives:
31
+
32
+ ```js
33
+ const canopy = parametricSurface(
34
+ (u, v) => [u, 0.35 * Math.sin(u * 2) + 0.12 * v * v, v],
35
+ { u: [-2, 2], v: [-1, 1], uSegments: 48, vSegments: 24 },
36
+ );
37
+ createPart('Canopy', canopy, metal, { parent: root });
38
+ ```
39
+
40
+ Domains and segment counts are explicit. `orientation: 'uv'` follows increasing-U cross increasing-V; `'vu'` reverses winding. `periodicU`/`periodicV` require matching endpoints and retain wrapped UV seams. A sampled surface has no automatic thickness or caps.
41
+
42
+ Collapsing an entire parameter row or column to one tip leaves degenerate grid triangles and can produce zero normals. Use a non-collapsed parameterization, or construct the intended tip with explicit `meshGeo` fan topology. `geometryDiagnostics` can expose degenerate triangles; changing normals alone cannot repair the topology.
43
+
44
+ For authored topology, `meshGeo({ positions, indices, normals?, uvs?, tangents? })` uses flat numeric arrays. Triangle winding is counterclockwise. An open sheet is valid geometry; do not label it a watertight solid.
45
+
46
+ Mirrored vertices alone do not establish a symmetric curved surface. The same
47
+ diagonal through warped quads on both sides can produce different surfaces between
48
+ vertices. Mirror the topology with corrected winding, or use symmetric patch
49
+ tessellation, then compare corresponding surface points between stations. Changing
50
+ normals cannot repair a positional asymmetry.
51
+
52
+ For a hollow shell, distinguish the intended opening from unintended end seams.
53
+ Separate inner/outer surfaces and a rim do not automatically join the bow, bottom
54
+ or other end boundaries. Inspect those joins from both sides after resizing; a
55
+ correct bounding box and accepted structural QA do not prove closure. Leave
56
+ surfaces open where the brief calls for them rather than capping every boundary.
57
+
58
+ For a solid wall, gable or roof, review the outside and intended inside separately.
59
+ Matching edge coordinates do not establish a visible join: reversed triangle winding
60
+ can cull the connecting surface even when vertex normals point outward. Repair the
61
+ winding or missing geometry rather than hiding the defect with double-sided shading;
62
+ deliberate thin sheets may need it. Check ceiling and trim extents against the actual sloping roof, including
63
+ the eaves, rather than its bounding box.
64
+
65
+ For a pane or panel fitted into a sloping frame, derive its corners and surface
66
+ normal in the frame's coordinates. A bar's long axis and a sheet's plane may use
67
+ different local axes, so copying a slope angle does not align them. Check all
68
+ four transformed corners against the intended frame plane and opening, then
69
+ inspect an oblique view where an out-of-plane pane is visible. Matching centers
70
+ or bounding boxes alone cannot establish this fit.
71
+
72
+ For attached veins, ribs or seams, discover `recipe:surface-detail-v1`. Its strip
73
+ shares the carrier mesh's sampled boundary vertices and rises along local normals.
74
+ A shared equation followed by a separately interpolated curve does not establish
75
+ contact with the actual mesh. Check both attachment and final dimensions after a
76
+ shape edit; a normal offset can change height as well as depth. This recipe is an
77
+ optional open-surface construction, not a requirement to turn every detail into a strip.
78
+
79
+ For a decal or lamp following a faceted body, ray-projecting the detail's vertices
80
+ outside the body does not prove its connecting triangles stay outside. Coarse detail
81
+ triangles can cut through the host between those vertices. Where the detail must lie
82
+ flush, clip the actual host triangles to the intended footprint and retain their
83
+ facet boundaries before applying a small controlled offset. Check the exported
84
+ surface head-on and obliquely at every promised detail level; preserve the
85
+ footprint and overall dimensions rather than covering the defect with a larger patch.
86
+ Check the entire intended footprint, including points where no detail triangles were
87
+ emitted: sampling only existing triangles cannot detect clipped-away holes. Use the
88
+ first hit on the outward-facing host to distinguish missing coverage from backfaces.
89
+ Contrasting body/detail colours can expose gaps; keep that diagnostic tint separate
90
+ from the saved material design.
91
+
92
+ ## Interfaces that must fit or move
93
+
94
+ Derive mating surfaces from shared dimensions and local frames. Surface contact at
95
+ one point does not establish a flush joint along an edge. For a continuous-looking
96
+ body, align profiles and transitions at the intended seam; unrelated interpenetrating
97
+ primitives may hide a gap in one view while exposing a ledge in another. Separate
98
+ rigid pieces, welded surfaces and deforming joints are all valid when they match the
99
+ requested style and motion.
100
+
101
+ For usable doors or passages, establish the actor envelope, finished floor,
102
+ threshold, clear width and headroom. Split plinths, caps, trim and braces around the
103
+ opening when they would obstruct it. Check the closed position, the hinge sweep and
104
+ the open passage against exported geometry. A wide visible door leaf is not evidence
105
+ of a traversable opening.
106
+
107
+ For a seated operator, fit the posed body as well as the seat marker: pelvis/seat,
108
+ knees/controls, feet/deck and hands/reach. Check relevant steering or pedal travel
109
+ and access for mounting. Keep application-specific poses separate from promised
110
+ asset clips, and report which one was tested.
111
+
112
+ For articulated limbs, place roots and joint transitions within the intended body
113
+ silhouette and inspect the moving seam from several sides. Identify the anatomical
114
+ joint each pivot represents before reversing its bend direction. Correct exposed
115
+ attachment caps, gaps and snapping through the motion, without assuming every
116
+ stylized creature needs one rigging or deformation technique.
117
+
118
+ Before mirroring a hand, inspect its local frame, palm, thumb web and any tool grip.
119
+ Weak anatomical cues can look reversed without a left/right frame error. Refine the
120
+ shape while preserving a correct wrist pivot and attachment frame, then check hand
121
+ clearance through the relevant motion and against the complete carried tool.
122
+
123
+ For a shield or other broad carried plate, define the intended support pose as
124
+ well as its mounting frame: which way the plate faces, where the grip lies, and
125
+ how the forearm runs along the inner surface. Solve the elbow within a plausible
126
+ reachable pose, keeping it clear of both plate and torso. A clearance fix can
127
+ still pull the elbow into the body or turn the plate away from its intended
128
+ direction. Inspect rear and side views through carry, guard and recovery, using
129
+ the actual arm and plate surfaces rather than only their centres or boxes.
130
+ Keep the requested pose and dimensions in the asset brief; preserve unrelated
131
+ geometry, materials and clip channels when refining its support or grip.
132
+
133
+ When reducing draw calls, consolidate compatible geometry within the same rigid
134
+ motion parent. Give independently moving groups real, named `Joint_*` pivots and
135
+ put their rigid geometry beneath them. Preserve attachment markers and consumer
136
+ lookups. In builds with rigid-group `full` optimization, the rigid-merge pass retains
137
+ node names, but a named mesh outside a protected boundary can become empty or contain
138
+ other parts' geometry. If each named part must keep its geometry, use `off` or
139
+ `palette` optimization and disable the separate GPU-instancing pass, which can remove
140
+ named instance nodes (`instance: 'off'` in library calls or `KILN_BAKE_INSTANCE=off`
141
+ in the host). Recheck what each
142
+ lookup controls, clip targets and intermediate poses after export; fewer meshes
143
+ alone does not establish a successful optimization.
144
+
145
+ Budget materials within each rigid group. Reuse the parent's material for tiny
146
+ fixed details when it gives the intended appearance; a separate material adds a
147
+ potential draw even when the detail is small. One material does not guarantee
148
+ one draw: vertex layouts, protected parts, transparency and vertex-limit splits
149
+ also constrain merging. Available `drawDiagnostics` can help locate these costs;
150
+ read its scope and skip reasons, then measure in the destination.
151
+
152
+ Avoid unintentionally overlapping coplanar faces on separate parts. Merging can
153
+ change which face wins a depth tie even when geometry and colours are preserved.
154
+ Use a shared surface, remove hidden duplicate faces or give a deliberate overlay
155
+ the separation it needs. Inspect the actual exported surface from relevant views;
156
+ do not offset every touching joint or treat a sampled coplanar flag as a defect.
157
+
158
+ ## Materials and directional UVs
159
+
160
+ For a leaf-card alpha path, discover `recipe:foliage-cutout-v1`. It binds a real
161
+ alpha-bearing approved texture to `foliageMaterial`; MASK alone does not create a
162
+ leaf silhouette. Its bundled 4×4 texture is a teaching placeholder. Check current
163
+ material capabilities before choosing a delivery resource, then inspect GPU views
164
+ and destination filtering/backfaces. Raw `THREE.DataTexture` is not an available
165
+ authoring route. Solid leaves and custom surfaces remain valid alternatives.
166
+
167
+ For lengthwise grain or stripes through bends, discover `recipe:directional-sweep-v1`.
168
+ It demonstrates sweep side U around the profile and V along path distance. Preserve
169
+ that convention when editing the path; arbitrary atlas rotations suit baked detail
170
+ but can disrupt directional tiling. Caps and physical texture scale need separate
171
+ decisions. Read the GPU image: CPU geometry feedback cannot establish texture direction.
172
+
173
+ ## Shape an existing mesh
174
+
175
+ ```js
176
+ const twisted = twist(column, { angle: 90 });
177
+ const narrowed = taper(column, { endScale: [0.4, 0.7] });
178
+ const curved = bend(rib, { angle: 60 });
179
+ const rippled = displace(sheet, ([x, y, z]) => [0, 0.04 * Math.sin(x * 16), 0]);
180
+ ```
181
+
182
+ All return owned geometry. They work along local +Y; bend turns +Y toward +X. Set `frame: { origin, rotation }` for another local frame; rotations are degrees. `interval: [minY,maxY]` selects local Y distances, with outside vertices unchanged. An optional `falloff(t)` returns 0..1. Displacement returns an offset, not a replacement position.
183
+
184
+ Add enough segments before shaping. UVs remain, normals/bounds are recomputed, and stale tangents are removed. `creaseNormals(geometry, { angle: 45 })` then gives controlled hard/smooth boundaries. `subdivide(geometry, 1, { preserveUV: true })` preserves UV charts; legacy subdivision can discard them. Topology-changing subdivision drops old CSG face provenance rather than guessing.
185
+
186
+ For ordinary geometry scale or rotation, retain the normals those operations already transform. An extra raw `computeVertexNormals()` can replace smooth analytic normals and leave unused sphere-pole vertices with zero normals that fail GLTF validation. Direct position-buffer edits or deliberate shading changes need an appropriate normal update; that is a different case from an affine transform.
187
+
188
+ ## Vary the cross-section
189
+
190
+ ```js
191
+ const profile = [[-.12,-.2],[.12,-.2],[.12,.2],[-.12,.2]];
192
+ const rail = sweepProfile(profile, [[0,0,0],[0,1,0],[.5,2,0]], {
193
+ twist: 20, scale: [[1,1],[.9,.9],[.7,.7]],
194
+ });
195
+ const housing = loftProfiles([
196
+ { profile },
197
+ { profile: [[-.2,-.1],[.3,-.1],[.2,.15],[-.2,.15]],
198
+ frame: { origin: [0,1,0], rotation: [0,15,0] } },
199
+ ]);
200
+ ```
201
+
202
+ Profiles use local `[x,z]`; loft sections lie in local XZ planes. A sweep follows supplied polyline stations using transported frames. Sample a curve first if you need smooth curvature. `up` sets initial profile +Z and must not parallel the path.
203
+
204
+ Caps default on; `cap: 'start'` or `'end'` caps one end of an open path. `creaseAngle` (default 60 degrees) keeps a rectangular or triangular profile hard-edged; raise it to 180 to smooth everything. `extrudeProfile` adds side-wall rings only when `divisions` asks for them. Closed sweeps omit the repeated path endpoint and require total twist to be a multiple of 360. Loft sections require matching point counts and deliberate index correspondence. These versions accept a simple outline without holes; use `extrudeProfile` for straight sections with holes. Review tight turns and nearby surfaces for self-intersections.
205
+
206
+ ## Preserve useful Boolean surfaces
207
+
208
+ ```js
209
+ const housing = await boolDiff('Housing', body, portCutter, { preserveAttributes: true });
210
+ ```
211
+
212
+ Preservation mode carries UV0 and material groups; exposed cuts inherit the cutter's UVs/material. Missing input UVs produce a warning. Normals are regenerated; tangents are not retained. Without the option, legacy calls keep the first material and discard UVs. Use `autoUnwrap` afterward for a new atlas. Convex hulls create new faces and cannot promise source UV/material provenance.
213
+
214
+ `smooth: true` averages normals across sharp boundaries too. If a Boolean rim
215
+ looks scalloped in lighting, compare `housing.geometry = creaseNormals(housing.geometry,
216
+ { angle: 60 })` before adding sections or changing the cutter. This changes normals,
217
+ not the surface positions. Inspect the silhouette and relevant geometry separately:
218
+ normal changes cannot repair a real gap, jagged outline or self-intersection. Choose
219
+ the angle for the intended hard/smooth boundary rather than applying it everywhere.
220
+
221
+ Keep the returned mesh transform. Its position carries the first contributing
222
+ mesh's world origin; its vertices are local to that origin. Extracting geometry
223
+ alone or overwriting the returned position loses that placement. Read world bounds
224
+ with `new THREE.Box3().setFromObject(housing)` and preserve world placement when
225
+ attaching beneath a transformed parent.
226
+
227
+ `roundedBoxGeo` rounds a box's twelve edges. Profile beveling rounds profile corners; extrusion cap edges remain sharp. Subdivision is smoothing, not a dimension-preserving general bevel.
228
+
229
+ ## Reuse structure without a new language
230
+
231
+ Node and material `userData` carries application metadata as glTF extras. Use plain
232
+ JSON and stay within 4 KiB per object and 64 KiB per asset; keys beginning `kiln` are
233
+ reserved. Build warnings name omitted values. `visible = false` preserves hidden
234
+ subtrees in export through `KHR_node_visibility`; their triangles are listed apart
235
+ from headline metrics. Verify visibility support in the target application.
236
+
237
+ Use `markOpenShell(part, 'why the boundary is intentionally open')` for a sheet or
238
+ open tube. This records an acknowledgment when solid overlap cannot be measured;
239
+ it does not suppress a measured collision or certify topology.
240
+
241
+ Track helpers accept `STEP`, `LINEAR`, `CUBICSPLINE`, `EASE_IN`, `EASE_OUT` and
242
+ `EASE_IN_OUT` interpolation. The eased choices apply between each pair of keys and
243
+ export standard cubic sampler tangents. For example,
244
+ `rotationTrack('Joint_Lid', [{ time: 0, rotation: [0,0,0] }, { time: 1, rotation: [0,0,90] }], 'EASE_IN_OUT')`
245
+ starts and ends a swing at rest. Discover the track helper for its exact key format
246
+ before authoring other channels.
247
+
248
+ Source export indexes unindexed geometry using exact full-vertex equality. The
249
+ `indexBuffers` receipt measures accessor bytes before and after this pass. Host
250
+ `KILN_INDEX_POLICY=asBuilt` preserves helper buffers with optimization off; this
251
+ choice belongs to export settings, not asset source.
252
+
253
+ Put repeated assemblies in ordinary functions with JSDoc parameters and named return values. Pass parent/material explicitly; return the assembly root and attachment markers. Change one parameter at the call site for a variant. Give such a function a name prefix or suffix and use it for every part it creates (`Leg_L`, `Leg_R`); calling it twice with the same names makes duplicate node names, which QA reports as `UNIVERSAL_DUPLICATE_NODE_NAME`. The runnable [reusable-frame recipe](reusable-frame.kiln.js) demonstrates this without imports or hidden dependencies.
254
+
255
+ Include the assembly and element index in repeated child names as well, so each
256
+ leaflet, slat or fastener remains addressable during revision comparison. When a
257
+ resize must retain those children, keep their count explicit and redistribute
258
+ their attachment positions; deriving the count from the new length can silently
259
+ delete parts. Check the exported child inventory as well as the changed outline.
260
+
261
+ When components must move or be replaced together, parent them under a real root
262
+ at the assembly's placement datum. Name suffixes alone leave independent siblings.
263
+ `recipe:editable-assembly-v1` demonstrates hierarchy replication and replacing one
264
+ bracket beneath its retained connection root. Use `replicateAssembly(...).nodeMap`
265
+ to find copied nodes; do not guess their generated names. Shared resources need
266
+ copying before independent buffer/material edits. Flat hierarchies are still useful
267
+ for independent components.
268
+
269
+ ## Levels of detail only when the brief asks
270
+
271
+ Build one tier unless the brief asks for level-of-detail tiers. When it does, build
272
+ every tier from one routine parameterised by level and emit the tiers as sibling
273
+ groups under one parent, named with one stem and a level token: `LOD0`, `LOD1`,
274
+ `LOD2`, or `Body_LOD0`, `Body_LOD1`. LOD0 is the full-detail tier. Parts every level
275
+ shares, such as wheels, stay outside the set. Then declare the set once, LOD0 first:
276
+
277
+ ```js
278
+ // Screen fraction of a bounding sphere of radius r at distance d (50 degree vertical FOV, 16:9).
279
+ const coverage = (r, d) => (Math.PI * (r / (2 * d * Math.tan((25 * Math.PI) / 180))) ** 2) / (16 / 9);
280
+ const tiers = [0, 1, 2].map((lod) => {
281
+ const group = new THREE.Group();
282
+ group.name = `Body_LOD${lod}`;
283
+ root.add(group);
284
+ buildBody(group, lod); // your routine, less detail as lod rises
285
+ return group;
286
+ });
287
+ // LOD1 from 60 m, LOD2 from 250 m, culled beyond 1.5 km, for a body of radius 2.5 m.
288
+ defineLod(tiers, { screenCoverage: [coverage(2.5, 60), coverage(2.5, 250), coverage(2.5, 1500)] });
289
+ ```
290
+
291
+ `screenCoverage[i]` is the smallest fraction of the screen, 0 to 1, at which level
292
+ `i` still draws; the values strictly decrease, the set is culled below the last
293
+ one, and a last value of 0 never culls. Compute each set's values from the bounding
294
+ radius of that set's LOD0 and the brief's switch distances, with the brief's field
295
+ of view or the one above when it names none. To make a shared part vanish with the
296
+ last body tier, give it its own set with an empty group as its last level, named for
297
+ example `Wheel_FL_LOD0` and `Wheel_FL_LOD1`, and declare
298
+ `defineLod([wheel, farWheel], { screenCoverage: [coverage(0.35, 250), 0] })`.
299
+
300
+ Two or more sibling tiers without `defineLod`, a gap in the levels, a missing LOD0
301
+ or a set declared inside another tier fail the build with `LOD_SET`, which names
302
+ the fix. A lone token is only a label. QA treats tiers as alternates instead of
303
+ overlapping or disconnected parts. Every GLB Kiln writes carries each set as one
304
+ `MSFT_lod` chain: LOD0 stays in the scene, the lower levels leave it, and LOD0's
305
+ `extras.MSFT_screencoverage` holds your thresholds. A loader without the extension
306
+ draws LOD0, so reported triangles and bounds are LOD0's and the parts outside every
307
+ set; `levelsOfDetail` in the render result lists each level's triangles and path. A
308
+ default sheet draws LOD0. To review a lower level, make that level's `path` a shot's
309
+ subject, with `visibility: "isolate"` to see it alone; the shot draws the level in
310
+ LOD0's place, and each chain's `drawn` says which level every view drew. An imported
311
+ GLB's chains are kept through save and export.
312
+
313
+ ## Implicit fields are experimental
314
+
315
+ ```js
316
+ const blob = await implicitSurface(([x,y,z]) => 1 - Math.hypot(x,y,z), {
317
+ bounds: { min: [-1.2,-1.2,-1.2], max: [1.2,1.2,1.2] }, edgeLength: 0.15,
318
+ });
319
+ ```
320
+
321
+ Positive values are inside. Bounds/resolution are required; smaller cells cost more and thin features can disappear. Explicit grid/evaluation limits apply. Output has no UVs. Use this for a deliberate organic/cellular experiment, not an unsupported promise of general shelling, remeshing, or CAD accuracy.
322
+
323
+
324
+ For textures, preserve valid primitive UVs. Use `copyGeometry` before independent
325
+ buffer edits, `remapUV` to scale/offset UVs, and `projectUV` for explicit planar,
326
+ box or cylindrical mapping in a geometry-local frame. Fetch its exact Discovery
327
+ contract for rotated frames, partial angular ranges, caps and seam sampling.
328
+ `autoUnwrap` is the separate atlas operation. Removed shape unwrap names do not
329
+ select a preservation or projection fallback.
@@ -0,0 +1,44 @@
1
+ # Kiln source contract
2
+
3
+ A `.kiln.js` file is ordinary JavaScript evaluated with Kiln globals. Do not add imports, exports, or TypeScript syntax. JSDoc and local helper functions are supported.
4
+
5
+ ```js
6
+ const meta = { name: 'Reading lamp' };
7
+ function build() {
8
+ const root = createRoot('ReadingLamp');
9
+ const metal = gameMaterial(0x556677);
10
+ createPart('Base', cylinderGeo(0.25, 0.25, 0.06, 32), metal,
11
+ { position: [0, 0.03, 0], parent: root });
12
+ return root;
13
+ }
14
+ ```
15
+
16
+ `meta.name` identifies the asset. No `meta.category` is needed to discover or use helpers. If retained in existing source, it is descriptive metadata and does **not** select validation or QA policy: the host-owned requirements are authoritative so generated source cannot weaken its own checks. Discovery families and tags describe catalog entries, not the category of the asset being built. `meta.role` describes its scene role when composition needs one: `ground`, `building`, `wonder`, `poi`, `prop`, `fill`, or `vehicle`.
17
+
18
+ `build()` returns a `THREE.Object3D` and may be async. Use `async`/`await` for Boolean operations, `roundedBoxGeo`, `extrudeProfile`, `revolveProfile`, `implicitSurface`, approved texture loading, and other catalog signatures marked async. `sweepProfile`, `loftProfiles`, and ordinary deformations are synchronous.
19
+
20
+ Optional `animate(root)` returns an array of `THREE.AnimationClip`. Follow catalog keyframe signatures: rotation tracks use a `rotation` field, position tracks use `position`. Grounded and moving parts need meaningful named pivots.
21
+
22
+ To review that motion, `kiln_screenshot_animation` needs the clip **by name** -- `clip` is required, and a name that matches nothing comes back as an error listing the clips that do exist. `frameTimes` is optional and is expressed as **phases in 0..1**, not seconds: 1 to 9 strictly increasing values, scaled by the clip's own duration. Omit it and six frames are sampled evenly from start to end. A track whose target name binds to no node surfaces in `unresolvedTracks`, which is what a clip that renders frozen actually means -- a joint-name mismatch, not a broken clip.
23
+
24
+ ## Frames and ownership
25
+
26
+ - Asset coordinates: metres; +X forward, +Y up, +Z right.
27
+ - Kiln helper rotations and deformation frame rotations: Euler XYZ degrees.
28
+ - Direct Three.js `object.rotation`: radians.
29
+ - `createPart` prefixes mesh names with `Mesh_`. `createPart(..., { parent })` attaches the part; do not separately add its return value to another parent.
30
+ - `createPivot(name, position?, parent?)` is positional and prefixes the node name with `Joint_`. Rotate the returned object directly if needed.
31
+ - The prefixes are a naming convention, not a requirement. When a delivery contract needs an exact node name, assign `.name` after creation; exported node names, selectors and QA all use the final name.
32
+ - `gameMaterial` and `lambertMaterial` default `flatShading` to true, but glTF has no flat-shading flag: the GLB, the local viewer and GPU views shade from the geometry's normals, and CPU views are flat-lit per face whatever the flag. For hard edges in the delivered asset, split vertices at the edge (for example `sweepProfile` `creaseAngle`, or separate faces).
33
+ - Cached primitives may share geometry. Use `copyGeometry` or `.clone()` before direct vertex/geometry mutation. `copyMaterial` copies material properties while sharing referenced textures.
34
+ - The former `cloneGeometry` and `cloneMaterial` aliases are removed. When migrating saved source, use the original value directly to preserve sharing, or `copyGeometry`/`copyMaterial` when an independent copy is intended.
35
+
36
+ ## Geometry and execution boundaries
37
+
38
+ Custom `THREE.BufferGeometry` is available. `meshGeo` helps validate flat positions, indices, normals, UV0, and tangents. Read export warnings for unsupported attributes; arbitrary Three.js features do not automatically survive GLB export. The host may select `geometryPolicy: 'strict'` to reject unsupported attributes instead of dropping them with warnings. In a local runtime, `KILN_GEOMETRY_POLICY=strict` configures this host policy; generated source and tool arguments cannot weaken it.
39
+
40
+ Use deterministic equations or explicit seeded recipes when repeatable builds matter. Avoid ambient state in reusable geometry functions.
41
+
42
+ The source policy rejects host-global access, network access, dynamic imports/evaluation, constructor chains, and raw `THREE.DataTexture`, `ShaderMaterial`, or `RawShaderMaterial`. Use approved texture/material helpers. Generated code runs in strict mode: `this` is allowed inside object-literal and class methods (an object whose `add` method reads `this.parts`), not at the top level or in a plain function; an assignment to an undeclared name, `with` or a legacy octal literal is an error. Source checks are not an operating-system sandbox; evaluator process boundaries belong to the host.
43
+
44
+ `kiln_validate` checks source without building geometry. `kiln_render` evaluates and returns images and structural findings. A valid program can still make an unsuitable shape or fail a later export check.
@@ -0,0 +1,158 @@
1
+ # Optional projects and exact material dependencies
2
+
3
+ A workspace provides Kiln's tools and local storage. A project adds a versioned brief,
4
+ inventory, design profile, references, delivery intent and material lock for related
5
+ assets. A collection stores saved asset revisions. The default collection is named
6
+ `project`; saving there does not require or create a project record.
7
+
8
+ The dashboard's Library aggregates configured storage collections. Register another
9
+ asset store explicitly with `node kiln.mjs collections add <alias> <absolute-directory>`
10
+ (on Windows a drive or share path such as `C:/Users/you/assets`; a Git Bash `/c/...`
11
+ path is refused) and restart the host; `assets --all` / `kiln_assets` action `catalog` list them together.
12
+ Keep collection IDs in exact asset references because IDs can collide across stores.
13
+ Use named project inventory links for membership, independently of where bytes live.
14
+ The viewer can link, replace or remove a membership; CLI/MCP use the same expected-
15
+ revision project update with the intended inventory. Removing membership never deletes
16
+ an asset. One asset can belong to multiple projects; standalone remains valid.
17
+
18
+ For live iteration, optionally set `KILN_WORK_ITEM` to a stable lowercase identifier
19
+ for one asset/candidate before starting CLI/MCP. Keep it across that item's revisions,
20
+ use distinct IDs for independent candidates, and restart MCP to change it. Historical
21
+ unbound operations remain ungrouped. `view --observe-workspace <directory>` can inspect
22
+ another explicitly registered observation source without merging its project identity.
23
+
24
+ Use a project when shared art direction or an inventory helps the requested work.
25
+ An individual asset, experiment or environment can stay standalone. Do not infer
26
+ project membership from its presence in the same directory. Different projects can
27
+ use different styles, materials and budgets.
28
+
29
+ ## Standalone authoring
30
+
31
+ Normal authoring needs no project setup. Omitted selection stays standalone unless
32
+ the host explicitly configured `KILN_PROJECT`. CLI `--no-project` or MCP
33
+ `projectId: null` overrides that default. Do not combine an explicit opt-out with
34
+ a project revision. Materials and Live Review work in either mode.
35
+
36
+ ```sh
37
+ node kiln.mjs render asset.kiln.js --no-project --out asset.glb --views review.png
38
+ node kiln.mjs view
39
+ ```
40
+
41
+ The CLI writes the review image to disk; read it before judging appearance. The
42
+ browser loads retained GLB artifacts and does not build another copy. When GPU
43
+ material evidence is required, add `--render gpu` and check actual view fidelity.
44
+
45
+ For library materials, use CLI `material create-preset --file options.json`, then
46
+ `material get MATERIAL_ID REVISION` for the code-ready `portableSpec`. Custom recipes
47
+ use `material procedural --file draft.json`. These CLI paths do not need an internal
48
+ `dist/` import or an extra TypeScript loader. Copy the returned spec into source,
49
+ compile it with `compilePortableMaterialSpecV2`, and supply the exact pins below.
50
+
51
+ ## Create and revise a project when useful
52
+
53
+ Discover optional `kiln_project`, `kiln_material` and `kiln_review` tools from the
54
+ connected host. A custom embedding may omit them. These are equivalent entry points:
55
+
56
+ ```sh
57
+ node kiln.mjs project create --id my-pack --name "My pack"
58
+ node kiln.mjs project get my-pack
59
+ node kiln.mjs project update my-pack --expected RETURNED_REVISION --file patch.json
60
+ ```
61
+
62
+ ```json
63
+ {"action":"create","draft":{"projectId":"my-pack","name":"My pack"}}
64
+ ```
65
+
66
+ Pass that JSON to `kiln_project`. To update, use
67
+ `{action:"update", projectId:"my-pack", expectedRevision: RETURNED_REVISION, patch}`.
68
+ Copy the returned revision exactly. A stale revision reports a conflict: read the
69
+ current configuration and reconcile changes before retrying. Every supplied top-level
70
+ field replaces its previous value. Read and merge the full `design` object before
71
+ changing one nested preference; sending only `design.style` also clears omitted
72
+ palette, material roles and conventions to defaults. Preserve array entries the
73
+ task does not remove.
74
+
75
+ Fill only the fields useful to the user's request. An example `patch.json` is:
76
+
77
+ ```json
78
+ {
79
+ "brief": "A coherent set of workshop props for a browser game",
80
+ "design": {
81
+ "style": "Readable stylized shapes with restrained surface detail",
82
+ "scale": "Metres; +Y up; objects rest at Y=0",
83
+ "palette": [{"role":"paint","color":"#526D75"}]
84
+ },
85
+ "inventory": [
86
+ {"id":"workbench","name":"Workbench","kind":"asset","brief":"A usable work surface"}
87
+ ]
88
+ }
89
+ ```
90
+
91
+ Project creation and dashboard selection do not activate a project for future
92
+ authoring. Select it on each operation:
93
+
94
+ ```sh
95
+ node kiln.mjs render asset.kiln.js --project my-pack --project-revision RETURNED_REVISION --out asset.glb
96
+ ```
97
+
98
+ MCP authoring uses `projectId` and optional `projectRevision`. Omit only the revision
99
+ when the intended configuration is the project's current revision. A project is
100
+ editable design guidance, not trusted requirements or release authorization.
101
+
102
+ ## Use library materials with or without a project
103
+
104
+ Inspect `kiln_material` with `action: "presets"`, `"list"` or `"get"`. CLI equivalents
105
+ are `material presets`, `material list`, and `material get ID REVISION`. Creation
106
+ and import preserve creator, license, recipe/seed and source provenance. Copy the
107
+ returned `portableSpec` into source and call `compilePortableMaterialSpecV2(spec)`;
108
+ the host provides the selected immutable map bytes before evaluating source.
109
+
110
+ A pin uses the returned material ID as `resourceId`; both hashes equal its returned
111
+ immutable revision. `pins.json` is an array:
112
+
113
+ ```json
114
+ [
115
+ {"resourceId":"RETURNED_MATERIAL_ID","revisionId":"RETURNED_SHA256_REVISION","sha256":"RETURNED_SHA256_REVISION"}
116
+ ]
117
+ ```
118
+
119
+ For standalone work, pass this array as MCP `materialDependencies`, or use
120
+ `node kiln.mjs render asset.kiln.js --no-project --materials pins.json --out asset.glb`.
121
+ Use the same pins on later edit, inspect, animation and save calls that evaluate
122
+ the source. The source reference alone does not restore dependency context.
123
+
124
+ For a project, put the pins in its `materialDependencies` through a revision-aware
125
+ update. A project-bound invocation (`projectId`, plus `projectRevision` for an exact
126
+ configuration) implies that revision's pins, so the call need not repeat them.
127
+ Call-level pins add resources, and a call-level pin for a resource the project
128
+ already pins replaces the project's for that call. Update the lock deliberately when
129
+ changing shared art direction. A missing resource or mismatched hash must be resolved
130
+ before building; neither source URLs nor material names authorize an implicit download.
131
+
132
+ Material records carry physical repeat scale, but the author controls mesh UV scale.
133
+ Review seams, repeats, roughness and normal strength on representative geometry with
134
+ actual GPU views. A project palette is guidance, not automatic recoloring.
135
+
136
+ ## Retain and deliver the work
137
+
138
+ `kiln_review` can list/get observed operations, pin them against ordinary eviction,
139
+ and save an exact reviewed operation using its `expectedRevision`. Pinning does not
140
+ pause the agent; feedback still belongs in the agent's conversation. Saved collection
141
+ revisions are durable; observation history is bounded and disposable.
142
+
143
+ Preserve the returned collection, asset and revision IDs. When an asset belongs to
144
+ an inventory entry, bind that exact saved revision with a project update. A later
145
+ asset revision does not silently update the project inventory.
146
+
147
+ Deliver a standalone asset directly through its collection exports. When delivering
148
+ a pack, `project export ID --revision REVISION --profile editable|runtime --out FILE`
149
+ packages the linked saved inventory. Editable delivery needs source, build settings
150
+ and complete normalized material resources; runtime delivery needs the GLB and its
151
+ metadata. Project packages exclude referenced concept-image and original acquisition
152
+ archive bytes. Verify the actual exported files and rebuild resource-dependent editable
153
+ deliveries in an independent workspace. Do not create a dummy project for delivery.
154
+
155
+ After import, `node kiln.mjs asset ASSET_ID ASSET_REVISION --rebuild --out rebuilt.glb`
156
+ uses the saved dependency revisions and exporter settings. It reports artifact hash
157
+ equality; historical assets without complete settings need an explicit new build.
158
+ Building or saving does not establish visual, game-runtime or release acceptance.
@@ -0,0 +1,32 @@
1
+ // Ordinary JavaScript: copy this function into your asset source.
2
+ /** @param {{width:number,height:number,depth:number,post:number}} spec */
3
+ function makeFrame(name, spec, material, parent) {
4
+ const { width, height, depth, post } = spec;
5
+ if (![width, height, depth, post].every(v => Number.isFinite(v) && v > 0)
6
+ || post * 2 >= Math.min(width, height)) throw new Error('Invalid frame dimensions');
7
+ const root = createPivot(name, [0, 0, 0], parent);
8
+ createPart('LeftPost', boxGeo(depth, height, post), material,
9
+ { position: [0, height / 2, -(width - post) / 2], parent: root });
10
+ createPart('RightPost', boxGeo(depth, height, post), material,
11
+ { position: [0, height / 2, (width - post) / 2], parent: root });
12
+ createPart('Header', boxGeo(depth, post, width - 2 * post), material,
13
+ { position: [0, height - post / 2, 0], parent: root });
14
+ const top = createPivot('TopAttachment', [0, height, 0], root);
15
+ const base = createPivot('BaseAttachment', [0, 0, 0], root);
16
+ return { root, anchors: { top, base } };
17
+ }
18
+
19
+ const meta = { name: 'Three portal frames' };
20
+ function build() {
21
+ const root = createRoot('PortalFrames');
22
+ const steel = gameMaterial(0x3b7278);
23
+ const near = makeFrame('Near', { width: 2.4, height: 2.6, depth: 0.18, post: 0.14 }, steel, root);
24
+ const middle = makeFrame('Middle', { width: 2.4, height: 3.1, depth: 0.18, post: 0.14 }, steel, root);
25
+ const far = makeFrame('Far', { width: 2.4, height: 2.8, depth: 0.18, post: 0.14 }, steel, root);
26
+ near.root.position.x = -1.5;
27
+ far.root.position.x = 1.5;
28
+ // An attachment follows this frame's dimensions without duplicated coordinates.
29
+ createPart('Marker', sphereGeo(0.09, 12, 8), gameMaterial(0xe6b65c),
30
+ { position: [0, 0.09, 0], parent: middle.anchors.top });
31
+ return root;
32
+ }
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: kiln-batch-dispatch
3
+ description: Run requested Kiln asset batches or compare coding-agent harnesses and models in isolated workspaces. Use for repeatable trials, source-reference workflow checks, and distinguishing provider, tool, and asset-quality failures.
4
+ license: MIT
5
+ metadata:
6
+ kiln-workflow: workspace
7
+ ---
8
+
9
+ # Run comparable asset trials
10
+
11
+ Use the user's requested harness and exact model identifier. Verify what the provider actually ran; do not silently substitute a default or older model.
12
+
13
+ 1. Create a fresh workspace for each candidate using [clean-room evaluation](references/clean-room-evaluation.md). A named Kiln project is optional; use matching project configuration only when the trial calls for it. Keep the engine checkout and example collection outside the agent's task context.
14
+ 2. Give each candidate the same brief, installed skills, image budget, time limit, and starting asset where applicable. Record inherited tools, instructions, memory, and permissions.
15
+ 3. Verify tool access and actual image delivery with one small run before dispatching a batch. Model vision support and harness image forwarding are separate checks.
16
+ 4. Exercise the whole revision loop: render source once, use the returned `programRef`, read a source window, edit an exact anchor, inspect a part, and export the same revision. Check that later calls do not resend the program and that unrelated source survives the edit.
17
+ 5. Retain the brief, exact model, harness version, requested and independently confirmed thinking effort, transcript, source, images, package/skill hashes, and outcome. Leave unexposed effort unknown. Keep the original author and each later refiner distinct. Rebuild the saved source independently of the agent's success claim.
18
+ 6. Review shapes under consistent cameras and lighting. Separate provider outages or quota limits, harness failures, tool/schema failures, engine failures, and visual quality. An interrupted run is not a completed asset.
19
+
20
+ After a shared package or skill change, rerun the affected workflow with the final candidate. A successful earlier revision does not validate later instructions. Record manual repairs separately from model output.
21
+
22
+ Adding a reviewed asset to a gallery is a separate task. Do it only when that addition is requested, retaining model provenance and later edits.
@@ -0,0 +1,35 @@
1
+ # Clean-room evaluation
2
+
3
+ Workspace creation, harness choice and verifying that the tools came up are covered by the `kiln-setup-workspace` skill; this file covers only what an evaluation adds on top. Create the workspace with `--skills batch` so this workflow is present in the candidate, and use a separate fresh workspace per candidate.
4
+
5
+ Keep evaluation notes and output in the workspace. Do not give the model the engine implementation or prior examples unless that is the comparison being tested.
6
+
7
+ ## What isolation means
8
+
9
+ A clean workspace limits task context. It is not an operating-system sandbox or a requirement to create a Kiln project. Record inherited global instructions, tools, memory, authentication, and filesystem permissions without copying secrets into receipts. Do not alter user-wide configuration to make a run appear isolated. Use a separate Hermes profile when required by its launcher; give headless harnesses absolute workspace and artifact paths.
10
+
11
+ Use a new workspace when testing changed skills. `--repair` repairs generated integration files while preserving existing copied skills; it is not a way to refresh a candidate silently.
12
+
13
+ Hash the package and every installed skill resource recursively, not only `SKILL.md`. Keep the exact model identifier and harness version beside the run. When a provider reports a resolved model identity, retain it as well.
14
+
15
+ ## A small but complete trial
16
+
17
+ Use a brief with three recognizable parts and one requested revision. Save the first `programRef`; render, source-view, source-edit, and inspect by reference. Export the revised source and GLB. Compare unrelated source text before and after, and verify the changed part in a targeted image. A source handle proves revision reuse; it does not by itself prove a render-cache hit.
18
+
19
+ Check the actual transcript for tool images received by the model. Metadata that labels a model as vision-capable is insufficient evidence. Keep camera framing and image count comparable between candidates.
20
+
21
+ Repository scripts such as `scripts/dispatch-asset.mjs`, `scripts/check-vision.mjs`, and harness smoke commands are optional developer tools in the engine checkout, not files promised in an installed authoring project. Provider-backed runs can incur usage. Use them only within the requested run and budget.
22
+
23
+ Report completed, interrupted, and failed trials separately. Keep provider availability, image forwarding, tool correctness, source reuse, exported geometry, and visual quality as distinct findings. Do not turn a quota interruption into an engine failure or count an unreviewed partial image as a completed result.
24
+
25
+ Read the final native terminal event and process result when classifying a run.
26
+ A recovered stream error can precede successful completion; retain the error
27
+ without overriding the later result. A live or unknown process is not terminal
28
+ because a poll timed out. Inspect saved artifacts independently of either claim.
29
+
30
+ For Antigravity, use the generated `node agy.mjs` launcher. Print mode disables
31
+ automatic slash-command and skill expansion. In the brief, require the project skill
32
+ copies and `kiln_workspace` server; use absolute task-file paths. Before asset work,
33
+ call that server's `kiln_discover` with `{ capabilities: true }` and retain the
34
+ runtime/store receipt. Global plugins may still be available: audit which server
35
+ and skill paths were actually used, rather than trusting the final message.