summer-engine 3.1.0 → 3.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (366) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +27 -5
  3. package/.codex-plugin/plugin.json +28 -6
  4. package/.cursor-plugin/plugin.json +27 -5
  5. package/.factory-plugin/plugin.json +27 -5
  6. package/.opencode/plugins/summer.js +1 -1
  7. package/CHANGELOG.md +107 -0
  8. package/README.md +40 -12
  9. package/assets/audit/scene_audit.gd +4136 -0
  10. package/assets/seeing/seeing_probe.gd +1873 -0
  11. package/dist/cli/commands/skills.js +20 -2
  12. package/dist/core/api-client.d.ts +9 -1
  13. package/dist/core/api-client.js +21 -4
  14. package/dist/core/capabilities/agent-playbook.js +46 -0
  15. package/dist/core/capabilities/audit/accept.d.ts +55 -0
  16. package/dist/core/capabilities/audit/accept.js +147 -0
  17. package/dist/core/capabilities/audit/args.d.ts +95 -0
  18. package/dist/core/capabilities/audit/args.js +89 -0
  19. package/dist/core/capabilities/audit/audit.d.ts +56 -0
  20. package/dist/core/capabilities/audit/audit.js +287 -0
  21. package/dist/core/capabilities/audit/frame.d.ts +14 -0
  22. package/dist/core/capabilities/audit/frame.js +35 -0
  23. package/dist/core/capabilities/audit/gaps.d.ts +96 -0
  24. package/dist/core/capabilities/audit/gaps.js +257 -0
  25. package/dist/core/capabilities/audit/judge.d.ts +162 -0
  26. package/dist/core/capabilities/audit/judge.js +1134 -0
  27. package/dist/core/capabilities/audit/math.d.ts +110 -0
  28. package/dist/core/capabilities/audit/math.js +263 -0
  29. package/dist/core/capabilities/audit/summary.d.ts +74 -0
  30. package/dist/core/capabilities/audit/summary.js +212 -0
  31. package/dist/core/capabilities/board.d.ts +31 -0
  32. package/dist/core/capabilities/board.js +43 -0
  33. package/dist/core/capabilities/camera-view.d.ts +4 -2
  34. package/dist/core/capabilities/camera-view.js +6 -3
  35. package/dist/core/capabilities/connect-signal.d.ts +85 -0
  36. package/dist/core/capabilities/connect-signal.js +285 -0
  37. package/dist/core/capabilities/engine-fallbacks.d.ts +5 -0
  38. package/dist/core/capabilities/engine-fallbacks.js +5 -0
  39. package/dist/core/capabilities/engine-ops.d.ts +5 -1
  40. package/dist/core/capabilities/engine-ops.js +0 -3
  41. package/dist/core/capabilities/engine-receipt.d.ts +12 -0
  42. package/dist/core/capabilities/engine-receipt.js +26 -0
  43. package/dist/core/capabilities/file-read.d.ts +64 -0
  44. package/dist/core/capabilities/file-read.js +325 -0
  45. package/dist/core/capabilities/game-task-plan.js +4 -2
  46. package/dist/core/capabilities/grep.d.ts +60 -0
  47. package/dist/core/capabilities/grep.js +190 -0
  48. package/dist/core/capabilities/inspect-node.d.ts +56 -0
  49. package/dist/core/capabilities/inspect-node.js +225 -0
  50. package/dist/core/capabilities/inspect-resource.d.ts +61 -0
  51. package/dist/core/capabilities/inspect-resource.js +376 -0
  52. package/dist/core/capabilities/math3d.d.ts +28 -0
  53. package/dist/core/capabilities/math3d.js +88 -0
  54. package/dist/core/capabilities/motion-generation.d.ts +62 -0
  55. package/dist/core/capabilities/motion-generation.js +138 -0
  56. package/dist/core/capabilities/placement-batch.d.ts +102 -0
  57. package/dist/core/capabilities/placement-batch.js +483 -0
  58. package/dist/core/capabilities/placement-math.d.ts +70 -0
  59. package/dist/core/capabilities/placement-math.js +209 -0
  60. package/dist/core/capabilities/placement-script.d.ts +42 -0
  61. package/dist/core/capabilities/placement-script.js +1096 -0
  62. package/dist/core/capabilities/placement.d.ts +485 -0
  63. package/dist/core/capabilities/placement.js +1731 -0
  64. package/dist/core/capabilities/project-context.d.ts +33 -2
  65. package/dist/core/capabilities/project-context.js +87 -4
  66. package/dist/core/capabilities/replace-node.d.ts +91 -0
  67. package/dist/core/capabilities/replace-node.js +423 -0
  68. package/dist/core/capabilities/runtime-control.d.ts +18 -2
  69. package/dist/core/capabilities/runtime-control.js +67 -2
  70. package/dist/core/capabilities/scene-batch.d.ts +63 -0
  71. package/dist/core/capabilities/scene-batch.js +394 -0
  72. package/dist/core/capabilities/scene-readback.d.ts +36 -0
  73. package/dist/core/capabilities/scene-readback.js +54 -0
  74. package/dist/core/capabilities/seeing/args.d.ts +348 -0
  75. package/dist/core/capabilities/seeing/args.js +178 -0
  76. package/dist/core/capabilities/seeing/candidates.d.ts +127 -0
  77. package/dist/core/capabilities/seeing/candidates.js +282 -0
  78. package/dist/core/capabilities/seeing/math.d.ts +134 -0
  79. package/dist/core/capabilities/seeing/math.js +269 -0
  80. package/dist/core/capabilities/seeing/probe.d.ts +62 -0
  81. package/dist/core/capabilities/seeing/probe.js +188 -0
  82. package/dist/core/capabilities/seeing/scoring.d.ts +235 -0
  83. package/dist/core/capabilities/seeing/scoring.js +639 -0
  84. package/dist/core/capabilities/seeing/seeing.d.ts +233 -0
  85. package/dist/core/capabilities/seeing/seeing.js +1341 -0
  86. package/dist/core/capabilities/seeing/shot-store.d.ts +52 -0
  87. package/dist/core/capabilities/seeing/shot-store.js +204 -0
  88. package/dist/core/capabilities/surface-snap-mesh.d.ts +88 -0
  89. package/dist/core/capabilities/surface-snap-mesh.js +425 -0
  90. package/dist/core/capabilities/surface-snap.d.ts +77 -0
  91. package/dist/core/capabilities/surface-snap.js +461 -0
  92. package/dist/core/capabilities/tool-dispatch.js +231 -72
  93. package/dist/core/capabilities/tscn.d.ts +85 -0
  94. package/dist/core/capabilities/tscn.js +391 -0
  95. package/dist/core/capabilities/world-snapshot.d.ts +58 -0
  96. package/dist/core/capabilities/world-snapshot.js +150 -0
  97. package/dist/core/capability-skew.d.ts +5 -5
  98. package/dist/core/capability-skew.js +14 -6
  99. package/dist/core/headless/worker-engine-client.d.ts +1 -1
  100. package/dist/core/headless/worker-engine-client.js +2 -2
  101. package/dist/core/library-read.d.ts +37 -5
  102. package/dist/core/library-read.js +264 -33
  103. package/dist/core/library-search.d.ts +2 -2
  104. package/dist/installer/agent-config.js +5 -3
  105. package/dist/installer/agent-table.d.ts +16 -0
  106. package/dist/installer/agent-table.js +52 -17
  107. package/dist/mcp/server.js +9 -3
  108. package/dist/mcp/tools/asset-tools.js +21 -3
  109. package/dist/mcp/tools/audit-tools.d.ts +23 -0
  110. package/dist/mcp/tools/audit-tools.js +60 -0
  111. package/dist/mcp/tools/debug-tools.js +3 -1
  112. package/dist/mcp/tools/file-tools.js +17 -4
  113. package/dist/mcp/tools/generate-tools.js +74 -66
  114. package/dist/mcp/tools/library-tools.js +2 -0
  115. package/dist/mcp/tools/perception-tools.js +6 -19
  116. package/dist/mcp/tools/placement-tools.d.ts +24 -0
  117. package/dist/mcp/tools/placement-tools.js +91 -0
  118. package/dist/mcp/tools/project-tools.js +18 -15
  119. package/dist/mcp/tools/scene-tools.js +71 -83
  120. package/dist/mcp/tools/seeing-tools.d.ts +24 -0
  121. package/dist/mcp/tools/seeing-tools.js +64 -0
  122. package/dist/mcp/tools/spatial-tools.js +17 -9
  123. package/dist/mcp/tools/visual-tools.js +59 -7
  124. package/gemini-extension.json +26 -4
  125. package/integrations/amp/README.md +1 -1
  126. package/integrations/crush/README.md +1 -1
  127. package/integrations/grok-build/README.md +1 -1
  128. package/integrations/hermes/README.md +1 -1
  129. package/integrations/kimi-code/README.md +1 -1
  130. package/integrations/mistral-vibe/README.md +1 -1
  131. package/integrations/opencode/README.md +1 -1
  132. package/integrations/rovo-dev/README.md +1 -1
  133. package/integrations/vscode-copilot/README.md +1 -1
  134. package/integrations/warp/README.md +1 -1
  135. package/integrations/windsurf/README.md +1 -1
  136. package/library/references/mcp-tools-reference/mcp-tools-reference.md +59 -15
  137. package/library/references/mcp-tools-reference/resource.yaml +1 -1
  138. package/library/references/summer-folder/resource.yaml +1 -1
  139. package/library/references/summer-folder/summer-folder.md +1 -1
  140. package/library/skills/3d-lighting/SKILL.md +1 -1
  141. package/library/skills/README.md +36 -14
  142. package/library/skills/adaptive-music/SKILL.md +1 -1
  143. package/library/skills/agent-playtesting/SKILL.md +1 -1
  144. package/library/skills/ai-characters-in-games/SKILL.md +220 -0
  145. package/library/skills/ai-characters-in-games/resource.yaml +30 -0
  146. package/library/skills/ambient-bed/SKILL.md +1 -1
  147. package/library/skills/animated-loop/SKILL.md +1 -1
  148. package/library/skills/animation-tree/SKILL.md +1 -1
  149. package/library/skills/art-direction/SKILL.md +1 -1
  150. package/library/skills/asset-strategy/SKILL.md +2 -1
  151. package/library/skills/asset-strategy/resource.yaml +2 -1
  152. package/library/skills/audio-direction/SKILL.md +1 -1
  153. package/library/skills/auto-fire-targeting/SKILL.md +1 -1
  154. package/library/skills/brainstorm-game/SKILL.md +1 -1
  155. package/library/skills/brainstorming/SKILL.md +1 -1
  156. package/library/skills/browse-templates/SKILL.md +3 -3
  157. package/library/skills/browse-templates/resource.yaml +1 -1
  158. package/library/skills/camera-rigs/SKILL.md +128 -0
  159. package/library/skills/camera-rigs/resource.yaml +29 -0
  160. package/library/skills/celeste-momentum-platforming/SKILL.md +1 -1
  161. package/library/skills/character-animation-wiring/SKILL.md +1 -1
  162. package/library/skills/character-model/SKILL.md +1 -1
  163. package/library/skills/character-movement/SKILL.md +326 -0
  164. package/library/skills/character-movement/references/default-third-person-controller.gd +201 -0
  165. package/library/skills/character-movement/references/default-third-person-verification-probe.gd +154 -0
  166. package/library/skills/character-movement/references/movement-3d.md +136 -0
  167. package/library/skills/character-movement/references/platformer-feel.md +83 -0
  168. package/library/skills/character-movement/resource.yaml +40 -0
  169. package/library/skills/character-portrait/SKILL.md +1 -1
  170. package/library/skills/cinematic-cutscene/SKILL.md +1 -1
  171. package/library/skills/combat-basics/SKILL.md +159 -0
  172. package/library/skills/combat-basics/references/projectiles-and-aoe.md +100 -0
  173. package/library/skills/combat-basics/resource.yaml +34 -0
  174. package/library/skills/concept-art/SKILL.md +1 -1
  175. package/library/skills/create-asset-sheet/SKILL.md +1 -1
  176. package/library/skills/debug/SKILL.md +1 -1
  177. package/library/skills/debugging-game-feel/SKILL.md +1 -1
  178. package/library/skills/design-level/SKILL.md +1 -1
  179. package/library/skills/design-mechanic/SKILL.md +1 -1
  180. package/library/skills/design-npc/SKILL.md +1 -1
  181. package/library/skills/diagnosing-perf-regressions/SKILL.md +1 -1
  182. package/library/skills/dispatching-parallel-agents/SKILL.md +1 -1
  183. package/library/skills/driving-the-editor-ui/SKILL.md +1 -1
  184. package/library/skills/environment-kit/SKILL.md +1 -1
  185. package/library/skills/export-and-ship/SKILL.md +1 -1
  186. package/library/skills/fabricating-assets/SKILL.md +1 -1
  187. package/library/skills/facial-and-lipsync/SKILL.md +1 -1
  188. package/library/skills/fps-controller/SKILL.md +9 -7
  189. package/library/skills/fps-controller/resource.yaml +4 -1
  190. package/library/skills/game-feel/SKILL.md +1 -1
  191. package/library/skills/gameskill/SKILL.md +1 -1
  192. package/library/skills/gdscript-patterns/SKILL.md +1 -1
  193. package/library/skills/generate-motion/SKILL.md +9 -9
  194. package/library/skills/generate-motion/resource.yaml +2 -1
  195. package/library/skills/godogen-visual-proof-game-generation/SKILL.md +1 -1
  196. package/library/skills/headless-scripting/SKILL.md +1 -1
  197. package/library/skills/in-game-purchases/SKILL.md +254 -0
  198. package/library/skills/in-game-purchases/resource.yaml +29 -0
  199. package/library/skills/instantiate-asset-pack/SKILL.md +1 -1
  200. package/library/skills/investigating-bugs/SKILL.md +1 -1
  201. package/library/skills/lumera-single-image-scene-reconstruction/SKILL.md +1 -1
  202. package/library/skills/make-game/SKILL.md +25 -3
  203. package/library/skills/make-game/references/2d-platformer-polish.md +93 -0
  204. package/library/skills/make-game/references/2d-platformer.md +117 -0
  205. package/library/skills/make-game/references/2d-rpg-content.md +234 -0
  206. package/library/skills/make-game/references/2d-rpg.md +241 -0
  207. package/library/skills/make-game/references/2d-survivors-progression.md +201 -0
  208. package/library/skills/make-game/references/2d-survivors.md +237 -0
  209. package/library/skills/make-game/references/3d-fps-systems.md +216 -0
  210. package/library/skills/make-game/references/3d-fps.md +177 -0
  211. package/library/skills/make-game/references/3d-horror-systems.md +186 -0
  212. package/library/skills/make-game/references/3d-horror.md +201 -0
  213. package/library/skills/make-game/references/3d-third-person-systems.md +220 -0
  214. package/library/skills/make-game/references/3d-third-person.md +215 -0
  215. package/library/skills/make-game/resource.yaml +6 -1
  216. package/library/skills/multiplayer/SKILL.md +150 -0
  217. package/library/skills/multiplayer/resource.yaml +33 -0
  218. package/library/skills/multiplayer-movement/SKILL.md +510 -0
  219. package/library/skills/multiplayer-movement/files.md +501 -0
  220. package/library/skills/multiplayer-movement/resource.yaml +30 -0
  221. package/library/skills/multiplayer-project/SKILL.md +521 -0
  222. package/library/skills/multiplayer-project/files.md +448 -0
  223. package/library/skills/multiplayer-project/resource.yaml +36 -0
  224. package/library/skills/multiplayer-publish/SKILL.md +229 -0
  225. package/library/skills/multiplayer-publish/export-errors.md +89 -0
  226. package/library/skills/multiplayer-publish/resource.yaml +28 -0
  227. package/library/skills/multiplayer-state/SKILL.md +438 -0
  228. package/library/skills/multiplayer-state/files.md +592 -0
  229. package/library/skills/multiplayer-state/resource.yaml +35 -0
  230. package/library/skills/multiplayer-testing/SKILL.md +236 -0
  231. package/library/skills/multiplayer-testing/resource.yaml +39 -0
  232. package/library/skills/music-track/SKILL.md +1 -1
  233. package/library/skills/navigate-summer/SKILL.md +1 -1
  234. package/library/skills/new-project/SKILL.md +1 -1
  235. package/library/skills/organic-model/SKILL.md +1 -1
  236. package/library/skills/pixel-art/SKILL.md +1 -1
  237. package/library/skills/play/SKILL.md +1 -1
  238. package/library/skills/playtesting-a-feature/SKILL.md +1 -1
  239. package/library/skills/procedural-animation/SKILL.md +2 -2
  240. package/library/skills/procedural-animation/resource.yaml +1 -1
  241. package/library/skills/prop-model/SKILL.md +1 -1
  242. package/library/skills/psx-retro-rendering/SKILL.md +1 -1
  243. package/library/skills/realtime-wet-surfaces/SKILL.md +2 -2
  244. package/library/skills/remote-deploy/SKILL.md +1 -1
  245. package/library/skills/retarget/SKILL.md +1 -1
  246. package/library/skills/running-in-the-cloud/SKILL.md +1 -1
  247. package/library/skills/save-load/SKILL.md +156 -0
  248. package/library/skills/save-load/resource.yaml +27 -0
  249. package/library/skills/scene-composition/SKILL.md +1 -1
  250. package/library/skills/scene-hierarchy-design/SKILL.md +1 -1
  251. package/library/skills/scene-scripting/SKILL.md +1 -1
  252. package/library/skills/scene-to-level/SKILL.md +1 -1
  253. package/library/skills/skill-create/SKILL.md +1 -1
  254. package/library/skills/skill-improve/SKILL.md +1 -1
  255. package/library/skills/skill-test/SKILL.md +1 -1
  256. package/library/skills/skintokens-auto-rigging/SKILL.md +1 -1
  257. package/library/skills/skybox-panorama/SKILL.md +1 -1
  258. package/library/skills/sound-effect/SKILL.md +1 -1
  259. package/library/skills/spatial-placement/SKILL.md +134 -3
  260. package/library/skills/spatial-placement/references/kit-placement-tools.md +364 -0
  261. package/library/skills/spatial-placement/resource.yaml +16 -2
  262. package/library/skills/sprite-sheet/SKILL.md +1 -1
  263. package/library/skills/summer-analytics/SKILL.md +147 -0
  264. package/library/skills/summer-analytics/resource.yaml +28 -0
  265. package/library/skills/summer-friends/SKILL.md +226 -0
  266. package/library/skills/summer-friends/resource.yaml +28 -0
  267. package/library/skills/summer-leaderboards/SKILL.md +231 -0
  268. package/library/skills/summer-leaderboards/resource.yaml +30 -0
  269. package/library/skills/summer-match-results/SKILL.md +286 -0
  270. package/library/skills/summer-match-results/resource.yaml +32 -0
  271. package/library/skills/summer-matchmaking/SKILL.md +301 -0
  272. package/library/skills/summer-matchmaking/resource.yaml +32 -0
  273. package/library/skills/summer-parties/SKILL.md +253 -0
  274. package/library/skills/summer-parties/resource.yaml +30 -0
  275. package/library/skills/summer-player-data/SKILL.md +322 -0
  276. package/library/skills/summer-player-data/resource.yaml +30 -0
  277. package/library/skills/summer-store/SKILL.md +271 -0
  278. package/library/skills/summer-store/resource.yaml +29 -0
  279. package/library/skills/summer-world-chat/SKILL.md +195 -0
  280. package/library/skills/summer-world-chat/resource.yaml +30 -0
  281. package/library/skills/summer-world-saves/SKILL.md +284 -0
  282. package/library/skills/summer-world-saves/resource.yaml +29 -0
  283. package/library/skills/text-to-motion/SKILL.md +99 -0
  284. package/library/skills/text-to-motion/prompts-and-controls.md +34 -0
  285. package/library/skills/text-to-motion/resource.yaml +41 -0
  286. package/library/skills/text-to-motion/rigging-for-text-motion.md +54 -0
  287. package/library/skills/tileable-texture/SKILL.md +1 -1
  288. package/library/skills/trailer-shot/SKILL.md +1 -1
  289. package/library/skills/tune-performance/SKILL.md +1 -1
  290. package/library/skills/ui-basics/SKILL.md +10 -1
  291. package/library/skills/ui-graphics/SKILL.md +1 -1
  292. package/library/skills/use-widget-asset/SKILL.md +1 -1
  293. package/library/skills/using-summer/SKILL.md +2 -2
  294. package/library/skills/using-summer/resource.yaml +2 -2
  295. package/library/skills/vehicle-model/SKILL.md +1 -1
  296. package/library/skills/verification-before-completion/SKILL.md +1 -1
  297. package/library/skills/verifying-scenes/SKILL.md +76 -2
  298. package/library/skills/verifying-scenes/resource.yaml +13 -2
  299. package/library/skills/vfx-dissolve/SKILL.md +1 -1
  300. package/library/skills/vfx-fire/SKILL.md +1 -1
  301. package/library/skills/vfx-hit-spark/SKILL.md +1 -1
  302. package/library/skills/vfx-lightning/SKILL.md +1 -1
  303. package/library/skills/vfx-magic-glow/SKILL.md +1 -1
  304. package/library/skills/vfx-muzzle-flash/SKILL.md +1 -1
  305. package/library/skills/vfx-smoke/SKILL.md +1 -1
  306. package/library/skills/vfx-water-ripple/SKILL.md +1 -1
  307. package/library/skills/voice-line/SKILL.md +1 -1
  308. package/library/skills/web-and-touch-input/SKILL.md +38 -0
  309. package/library/skills/web-and-touch-input/resource.yaml +28 -0
  310. package/library/skills/web-compatibility-look/SKILL.md +62 -0
  311. package/library/skills/web-compatibility-look/resource.yaml +30 -0
  312. package/library/skills/world-building-3d/SKILL.md +8 -1
  313. package/library/skills/world-building-3d/references/spatial-tools.md +1 -1
  314. package/library/skills/world-building-3d/resource.yaml +2 -1
  315. package/library/skills/writing-plans/SKILL.md +1 -1
  316. package/library/skills/writing-skills/SKILL.md +1 -1
  317. package/library/templates/3d-lan-multiplayer-starter/resource.yaml +2 -2
  318. package/library/tools/attach-to-surface/resource.yaml +142 -0
  319. package/library/tools/batch/resource.yaml +9 -3
  320. package/library/tools/connect-ports/resource.yaml +120 -0
  321. package/library/tools/connect-signal/resource.yaml +3 -2
  322. package/library/tools/debug-views/resource.yaml +94 -0
  323. package/library/tools/frame-nodes/resource.yaml +104 -0
  324. package/library/tools/frame-shot/resource.yaml +134 -0
  325. package/library/tools/generate-motion/resource.yaml +44 -9
  326. package/library/tools/get-board/resource.yaml +50 -0
  327. package/library/tools/get-project-context/resource.yaml +13 -2
  328. package/library/tools/grep/resource.yaml +77 -0
  329. package/library/tools/inspect-asset/resource.yaml +71 -0
  330. package/library/tools/inspect-node/resource.yaml +9 -2
  331. package/library/tools/inspect-resource/resource.yaml +16 -5
  332. package/library/tools/instantiate-scene/resource.yaml +27 -2
  333. package/library/tools/measure/resource.yaml +96 -0
  334. package/library/tools/place-adjacent/resource.yaml +113 -0
  335. package/library/tools/play/resource.yaml +15 -2
  336. package/library/tools/raycast/resource.yaml +101 -0
  337. package/library/tools/read-file/resource.yaml +36 -2
  338. package/library/tools/read-library/resource.yaml +2 -2
  339. package/library/tools/repeat-along/resource.yaml +129 -0
  340. package/library/tools/replace-node/resource.yaml +11 -5
  341. package/library/tools/scene-audit/resource.yaml +144 -0
  342. package/library/tools/screenshot/resource.yaml +13 -2
  343. package/library/tools/search-assets/resource.yaml +18 -0
  344. package/library/tools/shot-sheet/resource.yaml +110 -0
  345. package/library/tools/snap-to-surface/resource.yaml +4 -1
  346. package/library/tools/world-snapshot/resource.yaml +24 -3
  347. package/library/tools/zoom/resource.yaml +105 -0
  348. package/package.json +1 -1
  349. package/registry/generated/aliases.json +17 -3
  350. package/registry/generated/counts.json +3 -3
  351. package/registry/generated/gemini-extension.json +26 -4
  352. package/registry/generated/index.json +2154 -469
  353. package/registry/generated/marketplace.claude.json +2 -2
  354. package/registry/generated/plugin.claude.json +27 -5
  355. package/registry/generated/plugin.codex.json +28 -6
  356. package/registry/generated/plugin.cursor.json +27 -5
  357. package/registry/generated/plugin.factory.json +27 -5
  358. package/registry/generated/skills-index.md +36 -14
  359. package/registry/generated/skills-registry.json +421 -124
  360. package/registry/generated/templates-registry.json +2 -2
  361. package/library/skills/host-authoritative-state/SKILL.md +0 -332
  362. package/library/skills/host-authoritative-state/resource.yaml +0 -28
  363. package/library/skills/peer-to-peer-multiplayer/SKILL.md +0 -373
  364. package/library/skills/peer-to-peer-multiplayer/resource.yaml +0 -28
  365. package/library/skills/setup-multiplayer/SKILL.md +0 -336
  366. package/library/skills/setup-multiplayer/resource.yaml +0 -28
@@ -0,0 +1,56 @@
1
+ import { type CapabilityAdvertisingClient } from "../../capability-skew.js";
2
+ import { type SeeingImage } from "../seeing/seeing.js";
3
+ import { type ProbeClient } from "../seeing/probe.js";
4
+ import { type AuditCheck, type SceneAuditArgs, type Severity } from "./args.js";
5
+ import { type AuditIssue, type KernelResult } from "./judge.js";
6
+ export declare const AUDIT_KERNEL_PATH: string;
7
+ export declare function loadAuditKernel(): string;
8
+ export declare const AUDIT_FALLBACK = "read the scene with summer_world_snapshot and look with summer_frame_nodes / summer_shot_sheet; cast single rays with summer_raycast";
9
+ export interface AuditClient extends ProbeClient, CapabilityAdvertisingClient {
10
+ getSceneState(scenePath?: string, options?: {
11
+ depth?: number;
12
+ limit?: number;
13
+ }): Promise<unknown>;
14
+ getProjectRoot?(): string | undefined;
15
+ }
16
+ export interface AuditSuccess {
17
+ ok: true;
18
+ /** The page: at most 5 KB of JSON. */
19
+ summary: Record<string, unknown>;
20
+ image: SeeingImage | null;
21
+ }
22
+ export interface AuditFailure {
23
+ ok: false;
24
+ failure_reason: string;
25
+ error: string;
26
+ hint?: string;
27
+ detail?: Record<string, unknown>;
28
+ }
29
+ export type AuditResult = AuditSuccess | AuditFailure;
30
+ export interface ValidatedAuditArgs {
31
+ scenePath?: string;
32
+ checks: AuditCheck[];
33
+ root?: string;
34
+ minSeverity: Severity;
35
+ offset: number;
36
+ limit: number;
37
+ render: "sheet" | "none";
38
+ budgetMs: number;
39
+ accept: Array<{
40
+ key: string;
41
+ reason: string;
42
+ }>;
43
+ showAccepted: boolean;
44
+ }
45
+ /** Strict validation; throws ToolInputError (nothing is sent). */
46
+ export declare function validateAuditArgs(args: SceneAuditArgs): ValidatedAuditArgs;
47
+ /** Raw kernel measurements -> sorted issues (all checks that ran). */
48
+ export declare function judgeAll(result: KernelResult, checks: readonly AuditCheck[]): AuditIssue[];
49
+ export interface JudgedAudit {
50
+ issues: AuditIssue[];
51
+ notes: string[];
52
+ /** Checks that ran but could measure nothing (never listed clean). */
53
+ unmeasured: AuditCheck[];
54
+ }
55
+ export declare function judgeAllDetailed(result: KernelResult, checks: readonly AuditCheck[]): JudgedAudit;
56
+ export declare function sceneAudit(client: AuditClient, rawArgs: SceneAuditArgs): Promise<AuditResult>;
@@ -0,0 +1,287 @@
1
+ /**
2
+ * summer_scene_audit — ONE implementation for both faces (MCP:
3
+ * src/mcp/tools/audit-tools.ts; CLI: `summer tool scene-audit`).
4
+ *
5
+ * One fast, read-only pass over every node of a 3D scene that reports likely
6
+ * visual and placement problems, so a build agent knows exactly where to look.
7
+ *
8
+ * How (no new engine op): the seeing tools' private-copy path. A throwaway
9
+ * wrapper scene in a private OS temp directory instances the SAVED scene and
10
+ * carries the audit kernel (assets/audit/scene_audit.gd) as a built-in @tool
11
+ * script; the existing ScenePreview op instantiates it in an offscreen
12
+ * SubViewport with its own World3D. The kernel works on that copy: the open
13
+ * tab, its unsaved state, its undo history and every project file stay
14
+ * untouched (RunSceneScript would mark the tab unsaved after every run).
15
+ *
16
+ * The kernel measures (capped ray grids and probes against a physics space
17
+ * built from the visible meshes, shapes cached per mesh resource); judge.ts
18
+ * decides; summary.ts pages the result under 5 KB. render:"sheet" renders the
19
+ * first 6 issues of the page through the seeing kernel in one more call.
20
+ */
21
+ import { readFileSync } from "node:fs";
22
+ import { join } from "node:path";
23
+ import { PACKAGE_ROOT } from "../../package-root.js";
24
+ import { missingEngineOpResult } from "../../capability-skew.js";
25
+ import { ToolInputError } from "../../tool-errors.js";
26
+ import { resolveCurrentScene } from "../project-context.js";
27
+ import { layoutGrid, validateNodePath, validateScenePath } from "../seeing/seeing.js";
28
+ import { runProbe } from "../seeing/probe.js";
29
+ import { AUDIT_CHECKS, AUDIT_DEFAULT_BUDGET_MS, AUDIT_DEFAULT_LIMIT, AUDIT_MAX_ACCEPT, AUDIT_MAX_BUDGET_MS, AUDIT_MAX_LIMIT, AUDIT_MIN_BUDGET_MS, } from "./args.js";
30
+ import { AcceptStoreError, applyAccepts, mergeAccepts, parseAcceptFile, validIssueKey, writeAcceptFile } from "./accept.js";
31
+ import { judgeGaps } from "./gaps.js";
32
+ import { groupRepeats, judgeDuplicates, judgeFloorGaps, judgeLights, judgeLongProps, judgeOverlaps, judgeResources, judgeSupport, judgeThroughHoles, judgeTransforms, judgeUv, judgeZFight, judgeZFightGeometry, } from "./judge.js";
33
+ import { buildPage, countIssues, filterIssues, partialChecks, sortIssues, timingPerCheck } from "./summary.js";
34
+ import { choosePose, SHEET_TILES } from "./frame.js";
35
+ export const AUDIT_KERNEL_PATH = join(PACKAGE_ROOT, "assets", "audit", "scene_audit.gd");
36
+ let kernelCache = null;
37
+ export function loadAuditKernel() {
38
+ if (kernelCache === null)
39
+ kernelCache = readFileSync(AUDIT_KERNEL_PATH, "utf-8");
40
+ return kernelCache;
41
+ }
42
+ export const AUDIT_FALLBACK = "read the scene with summer_world_snapshot and look with summer_frame_nodes / summer_shot_sheet; cast single rays with summer_raycast";
43
+ function fail(failure_reason, error, hint, detail) {
44
+ return { ok: false, failure_reason, error, ...(hint ? { hint } : {}), ...(detail ? { detail } : {}) };
45
+ }
46
+ /** Strict validation; throws ToolInputError (nothing is sent). */
47
+ export function validateAuditArgs(args) {
48
+ const checks = args.checks?.length ? [...new Set(args.checks)] : [...AUDIT_CHECKS];
49
+ for (const c of checks) {
50
+ if (!AUDIT_CHECKS.includes(c))
51
+ throw new ToolInputError(`checks: unknown check ${JSON.stringify(c)}. Nothing was sent.`);
52
+ }
53
+ const offset = args.offset ?? 0;
54
+ const limit = args.limit ?? AUDIT_DEFAULT_LIMIT;
55
+ if (!Number.isInteger(offset) || offset < 0)
56
+ throw new ToolInputError("offset must be a non-negative integer. Nothing was sent.");
57
+ if (!Number.isInteger(limit) || limit < 1 || limit > AUDIT_MAX_LIMIT)
58
+ throw new ToolInputError(`limit must be 1-${AUDIT_MAX_LIMIT}. Nothing was sent.`);
59
+ const budgetMs = args.budget_ms ?? AUDIT_DEFAULT_BUDGET_MS;
60
+ if (!Number.isInteger(budgetMs) || budgetMs < AUDIT_MIN_BUDGET_MS || budgetMs > AUDIT_MAX_BUDGET_MS) {
61
+ throw new ToolInputError(`budget_ms must be an integer ${AUDIT_MIN_BUDGET_MS}-${AUDIT_MAX_BUDGET_MS}. Nothing was sent.`);
62
+ }
63
+ const root = args.root !== undefined && args.root.trim() !== "" && args.root.trim() !== "." ? validateNodePath(args.root.trim(), "root") : undefined;
64
+ const accept = (args.accept ?? []).map((a) => {
65
+ if (!a || typeof a.key !== "string" || !validIssueKey(a.key)) {
66
+ throw new ToolInputError(`accept: ${JSON.stringify(a?.key ?? a).slice(0, 80)} is not an issue key (check:path@x,y,z, from issues[].key). Nothing was sent.`);
67
+ }
68
+ const reason = typeof a.reason === "string" ? a.reason.trim() : "";
69
+ if (reason.length < 3 || reason.length > 200 || /[\r\n]/.test(reason))
70
+ throw new ToolInputError("accept: each reason must be one line of 3-200 characters. Nothing was sent.");
71
+ return { key: a.key, reason };
72
+ });
73
+ if (accept.length > AUDIT_MAX_ACCEPT)
74
+ throw new ToolInputError(`accept: at most ${AUDIT_MAX_ACCEPT} per call. Nothing was sent.`);
75
+ return {
76
+ ...(args.scenePath !== undefined ? { scenePath: validateScenePath(args.scenePath) } : {}),
77
+ checks: AUDIT_CHECKS.filter((c) => checks.includes(c)),
78
+ ...(root ? { root } : {}),
79
+ minSeverity: args.min_severity ?? "look",
80
+ offset,
81
+ limit,
82
+ render: args.render ?? "none",
83
+ budgetMs,
84
+ accept,
85
+ showAccepted: args.show_accepted === true,
86
+ };
87
+ }
88
+ /** Raw kernel measurements -> sorted issues (all checks that ran). */
89
+ export function judgeAll(result, checks) {
90
+ return judgeAllDetailed(result, checks).issues;
91
+ }
92
+ export function judgeAllDetailed(result, checks) {
93
+ const inst = (Array.isArray(result.instances) ? result.instances : []);
94
+ const want = new Set(checks);
95
+ const lines = Array.isArray(result.lines) ? result.lines : [];
96
+ const issues = [];
97
+ const holes = want.has("through_hole") ? judgeThroughHoles(lines, inst) : [];
98
+ issues.push(...holes);
99
+ const gaps = judgeGaps(result, inst, want, holes);
100
+ issues.push(...gaps.issues);
101
+ if (want.has("floor_gap"))
102
+ issues.push(...judgeFloorGaps(result.floors, inst));
103
+ if (want.has("floating") || want.has("sunken")) {
104
+ issues.push(...judgeSupport(Array.isArray(result.support) ? result.support : [], inst).filter((i) => want.has(i.check)));
105
+ }
106
+ if (want.has("interpenetration"))
107
+ issues.push(...judgeOverlaps(Array.isArray(result.overlaps) ? result.overlaps : [], inst));
108
+ if (want.has("orientation"))
109
+ issues.push(...judgeLongProps(Array.isArray(result.long_props) ? result.long_props : [], inst));
110
+ if (want.has("uv_stretch"))
111
+ issues.push(...judgeUv(Array.isArray(result.uv) ? result.uv : [], inst));
112
+ const dup = judgeDuplicates(inst);
113
+ if (want.has("duplicate"))
114
+ issues.push(...dup.issues);
115
+ if (want.has("z_fight")) {
116
+ const geo = judgeZFightGeometry(result.zfight_geo, inst, dup.pairs);
117
+ issues.push(...geo.issues, ...judgeZFight(lines, result.floors, inst, dup.pairs, geo.pairs));
118
+ }
119
+ if (want.has("lights"))
120
+ issues.push(...judgeLights(result.lights, inst));
121
+ if (want.has("transform"))
122
+ issues.push(...judgeTransforms(inst));
123
+ if (want.has("resource"))
124
+ issues.push(...judgeResources(result.resources, inst));
125
+ return { issues: sortIssues(groupRepeats(issues, inst)), notes: gaps.notes, unmeasured: gaps.unmeasured };
126
+ }
127
+ function sceneStats(result) {
128
+ const s = (result.stats ?? {});
129
+ const pick = (k) => (typeof s[k] === "number" ? s[k] : undefined);
130
+ return {
131
+ nodes: pick("nodes"),
132
+ instances: pick("instances"),
133
+ meshes: pick("mesh_instances"),
134
+ unique_meshes: pick("unique_meshes"),
135
+ tris_unique: pick("tris_unique"),
136
+ rays: pick("rays"),
137
+ };
138
+ }
139
+ function lightStats(result) {
140
+ const l = result.lights;
141
+ if (!l)
142
+ return undefined;
143
+ const c = (l.counts ?? {});
144
+ const sh = (l.shadowed ?? {});
145
+ const n = (v) => (typeof v === "number" ? v : 0);
146
+ return { renderer: l.renderer, omni: n(c.omni), spot: n(c.spot), directional: n(c.directional), shadowed: n(sh.omni) + n(sh.spot) + n(sh.directional), per_object_limit: l.limit };
147
+ }
148
+ export async function sceneAudit(client, rawArgs) {
149
+ const args = validateAuditArgs(rawArgs);
150
+ let scenePath = args.scenePath;
151
+ if (!scenePath) {
152
+ const current = resolveCurrentScene(undefined, await client.getSceneState(), undefined);
153
+ if (!current)
154
+ throw new ToolInputError('No scenePath given and no scene is open in the editor. Pass scenePath ("res://...tscn"). Nothing was sent.');
155
+ scenePath = validateScenePath(current);
156
+ }
157
+ const missing = missingEngineOpResult(client, "ScenePreview", AUDIT_FALLBACK);
158
+ if (missing)
159
+ return fail(missing.failure_reason, missing.error, missing.hint, { op: "ScenePreview", engine_version: missing.engine_version });
160
+ const config = {
161
+ mode: "audit",
162
+ checks: args.checks,
163
+ ...(args.root ? { root: args.root } : {}),
164
+ poses: args.render === "sheet",
165
+ budget_ms: args.budgetMs,
166
+ };
167
+ const started = Date.now();
168
+ const run = await runProbe(client, { scenePath, config, size: [16, 16], kernel: loadAuditKernel(), timeoutMs: 120_000 });
169
+ const roundtrip = Date.now() - started;
170
+ try {
171
+ if (!run.ok || !run.result) {
172
+ if (run.failureReason === "probe_did_not_run") {
173
+ return fail("audit_did_not_run", "The audit kernel never wrote its result: the wrapper scene loaded but the built-in @tool script did not run (a script error, or the scene failed to load). Read summer_get_console for the engine's error.", undefined, { stage: run.result?.stage ?? null });
174
+ }
175
+ return fail(run.failureReason ?? "audit_failed", run.error ?? "The audit failed.", undefined, run.result ? { stage: run.result.stage ?? null, errors: run.result.errors ?? [] } : undefined);
176
+ }
177
+ const result = run.result;
178
+ const judgeStarted = Date.now();
179
+ const judged = judgeAllDetailed(result, args.checks);
180
+ const judgeMs = Date.now() - judgeStarted;
181
+ const partial = partialChecks(result.partial, args.checks);
182
+ for (const c of judged.unmeasured)
183
+ partial.checks[c] = 0;
184
+ // Accepted items: merge this call's accept list into the file, then hide
185
+ // what is accepted (stale entries show again).
186
+ let acceptEntries = parseAcceptFile(result.accept);
187
+ let acceptResult;
188
+ if (args.accept.length) {
189
+ const merged = mergeAccepts(acceptEntries, args.accept, judged.issues, scenePath);
190
+ acceptResult = { added: merged.added.length, ...(merged.refused.length ? { refused: merged.refused.slice(0, 5) } : {}) };
191
+ if (merged.entries) {
192
+ try {
193
+ await writeAcceptFile(client.getProjectRoot?.(), merged.entries);
194
+ acceptEntries = merged.entries;
195
+ }
196
+ catch (err) {
197
+ const reason = err instanceof AcceptStoreError ? err.reason : "write_failed";
198
+ return fail(`accept_${reason}`, `Accepted items were not saved: ${err instanceof Error ? err.message : String(err)}`, "Run the audit without accept, or connect to the project's editor so its folder is known.");
199
+ }
200
+ }
201
+ }
202
+ const split = applyAccepts(judged.issues, acceptEntries, scenePath);
203
+ for (const st of split.stale)
204
+ st.issue.acceptStale = st.why;
205
+ for (const a of split.accepted)
206
+ a.issue.accepted = a.entry.reason;
207
+ const all = args.showAccepted ? judged.issues : split.shown;
208
+ const accepted = split.accepted.map((a) => a.issue);
209
+ const { counts, clean } = countIssues(split.shown, args.checks, partial.checks, accepted);
210
+ const matching = filterIssues(all, args.minSeverity);
211
+ const notes = ["Read-only: audited the SAVED file in a private copy (open tab, undo and file untouched); save first."];
212
+ if (accepted.length)
213
+ notes.push(`${accepted.length} accepted item(s) ${args.showAccepted ? "listed (show_accepted)" : "hidden (counts.<check>.accepted; show_accepted:true lists them)"}${split.stale.length ? `; ${split.stale.length} shown again because their evidence changed (accept_stale)` : ""}.`);
214
+ else if (split.stale.length)
215
+ notes.push(`${split.stale.length} accepted item(s) shown again because their evidence changed (accept_stale).`);
216
+ notes.push(...judged.notes);
217
+ if (args.minSeverity !== "look")
218
+ notes.push(`min_severity ${args.minSeverity}: ${all.length - matching.length} lower-severity issue(s) hidden.`);
219
+ const lights = lightStats(result);
220
+ if (lights && args.checks.includes("lights") && lights.renderer === "forward_plus")
221
+ notes.push("lights: forward_plus has no per-object light limit; only spot rims were checked.");
222
+ const stopped = Object.entries(partial.checks).map(([c, share]) => `${c} ${Math.round(share * 100)}%`);
223
+ if (stopped.length)
224
+ notes.push(`budget_ms ${args.budgetMs}: stopped early (editor time): ${stopped.join(", ")} covered; rerun those with checks:[...] or a larger budget_ms.`);
225
+ if (partial.other.poses !== undefined)
226
+ notes.push(`framing: views measured for ${Math.round(partial.other.poses * 100)}% of the pieces (budget); the rest have no sheet tile.`);
227
+ for (const w of Array.isArray(result.warnings) ? result.warnings.slice(0, 3) : [])
228
+ notes.push(String(w).slice(0, 160));
229
+ const base = {
230
+ ok: true,
231
+ tool: "summer_scene_audit",
232
+ scenePath,
233
+ ...(args.root ? { root: args.root } : {}),
234
+ budget_ms: args.budgetMs,
235
+ scene: sceneStats(result),
236
+ counts,
237
+ clean,
238
+ ms: timingPerCheck(result.ms, { judge: judgeMs, roundtrip }),
239
+ ...(lights ? { lights } : {}),
240
+ total: all.length,
241
+ ...(accepted.length || split.stale.length ? { accepted: { hidden: args.showAccepted ? 0 : accepted.length, stale: split.stale.length } } : {}),
242
+ ...(acceptResult ? { accept_result: acceptResult } : {}),
243
+ notes,
244
+ };
245
+ let page = buildPage({ base, issues: matching, offset: args.offset, limit: args.limit });
246
+ // The sheet (one more engine call): the first issues of THIS page.
247
+ let image = null;
248
+ if (args.render === "sheet") {
249
+ const first = page.shown.slice(0, SHEET_TILES).map((c) => ({ n: c.n, issue: matching[c.n - 1] }));
250
+ const posed = first.map((f) => ({ ...f, pose: choosePose(f.issue.frame) })).filter((p) => p.pose !== null);
251
+ const unposed = first.filter((f) => !posed.some((p) => p.n === f.n)).map((f) => f.n);
252
+ let sheet;
253
+ if (!posed.length) {
254
+ sheet = { tiles: [], ...(unposed.length ? { no_clear_view: unposed } : {}) };
255
+ }
256
+ else {
257
+ const layout = layoutGrid(posed.length, 16 / 9, 1536);
258
+ const tiles = posed.map((p, k) => ({
259
+ kind: "shot",
260
+ rect: layout.rects[k],
261
+ label: `#${p.n} ${p.issue.check}`,
262
+ view: "beauty",
263
+ pose: { position: [...p.pose.position], look_at: [...p.pose.look_at], fov: p.pose.fov },
264
+ }));
265
+ const renderStarted = Date.now();
266
+ const render = await runProbe(client, { scenePath, size: layout.canvas, config: { mode: "render", canvas: layout.canvas, tiles }, timeoutMs: 120_000 });
267
+ try {
268
+ if (render.ok && render.image) {
269
+ image = { ...render.image };
270
+ sheet = { tiles: posed.map((p) => p.n), ...(unposed.length ? { no_clear_view: unposed } : {}), render_ms: Date.now() - renderStarted };
271
+ }
272
+ else {
273
+ sheet = { error: render.failureReason ?? "render_failed", detail: (render.error ?? "").slice(0, 160) };
274
+ }
275
+ }
276
+ finally {
277
+ await render.dispose();
278
+ }
279
+ }
280
+ page = buildPage({ base: { ...base, sheet }, issues: matching, offset: args.offset, limit: args.limit });
281
+ }
282
+ return { ok: true, summary: page.body, image };
283
+ }
284
+ finally {
285
+ await run.dispose();
286
+ }
287
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Framing for render:"sheet": a camera per issue, on the OPEN side of the
3
+ * problem. Each issue carries directions the kernel measured with two-sided
4
+ * rays (any surface counts, front or back face), so a camera placed within
5
+ * the measured clear distance is never behind a wall or inside geometry:
6
+ * walls render one-sided, and a camera behind one sees straight through it.
7
+ */
8
+ import { type CameraPose } from "../seeing/math.js";
9
+ import type { FrameHint } from "./judge.js";
10
+ export declare const SHEET_FOV = 50;
11
+ export declare const SHEET_TILES = 6;
12
+ /** The pose from the best measured direction: preference x share of the
13
+ * wanted distance that is actually clear. Null when nothing is clear. */
14
+ export declare function choosePose(hint: FrameHint | undefined, fov?: number): CameraPose | null;
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Framing for render:"sheet": a camera per issue, on the OPEN side of the
3
+ * problem. Each issue carries directions the kernel measured with two-sided
4
+ * rays (any surface counts, front or back face), so a camera placed within
5
+ * the measured clear distance is never behind a wall or inside geometry:
6
+ * walls render one-sided, and a camera behind one sees straight through it.
7
+ */
8
+ import { add, clamp, scale } from "../seeing/math.js";
9
+ import { fitCameraDistance } from "./math.js";
10
+ export const SHEET_FOV = 50;
11
+ export const SHEET_TILES = 6;
12
+ const MIN_DISTANCE = 0.7;
13
+ const CLEARANCE_MARGIN = 0.3;
14
+ /** The pose from the best measured direction: preference x share of the
15
+ * wanted distance that is actually clear. Null when nothing is clear. */
16
+ export function choosePose(hint, fov = SHEET_FOV) {
17
+ if (!hint)
18
+ return null;
19
+ if (hint.viewer)
20
+ return { position: hint.viewer, look_at: hint.focus, fov };
21
+ const want = clamp(fitCameraDistance(hint.size, fov), 1.5, 9);
22
+ let best = null;
23
+ for (const d of hint.dirs) {
24
+ const available = d.clear - CLEARANCE_MARGIN;
25
+ if (available < MIN_DISTANCE || d.pref <= 0)
26
+ continue;
27
+ const dist = Math.min(want, available);
28
+ const score = d.pref * (dist / want);
29
+ if (!best || score > best.score)
30
+ best = { dir: d.dir, dist, score };
31
+ }
32
+ if (!best)
33
+ return null;
34
+ return { position: add(hint.focus, scale(best.dir, best.dist)), look_at: hint.focus, fov };
35
+ }
@@ -0,0 +1,96 @@
1
+ /**
2
+ * Judgment for the gap detectors of summer_scene_audit. The kernel
3
+ * measures; this file decides.
4
+ *
5
+ * - exposed_edge (A): open outline edges of walls and facade members (bands,
6
+ * piers, joints: the kernel's geometric roles) that nothing covers within
7
+ * 4-7 mm, seen from walkable space, with a 2-60 cm reveal behind them or a
8
+ * coplanar continuation within 4 cm (seam) or 35 cm (bridged gap).
9
+ * - open_fixture_end: open ends of run pieces (two or more open rims of one
10
+ * size) nothing joins within a sleeve tolerance, seen from the open side.
11
+ * - depth_step (C): runs of recessed or proud depth along each facade row.
12
+ *
13
+ * Severity: exposed_edge warns on band pieces (and on walls when depth_step
14
+ * agrees), else look; open_fixture_end warns; depth_step is look, and a
15
+ * depth_step hole next to a through_hole confirms it (warn -> error). A
16
+ * confirming flag is folded into the issue it confirms.
17
+ */
18
+ import { type Vec3 } from "../seeing/math.js";
19
+ import type { AuditCheck } from "./args.js";
20
+ import type { AuditIssue, InstRow, KernelResult } from "./judge.js";
21
+ import { type Box } from "./math.js";
22
+ export declare const CONFIRM_RADIUS = 0.6;
23
+ /** exposed_edge classes that count (sky, far and mixed are silhouettes, not gaps). */
24
+ export declare const EDGE_CLASSES: Set<string>;
25
+ export interface GkLine {
26
+ b: number;
27
+ ax: 0 | 2;
28
+ c: number;
29
+ lo: number;
30
+ hi: number;
31
+ y0: number;
32
+ y1: number;
33
+ tmin: number;
34
+ tmax: number;
35
+ sides: number[];
36
+ pieces: number[];
37
+ }
38
+ export interface EdgeFlag {
39
+ owner: number;
40
+ cls: string;
41
+ len: number;
42
+ n: number;
43
+ c: Vec3;
44
+ box: Box;
45
+ step: number;
46
+ counts: {
47
+ gap: number;
48
+ seam: number;
49
+ bridge: number;
50
+ sky: number;
51
+ far: number;
52
+ };
53
+ eye: Vec3;
54
+ hit: number;
55
+ }
56
+ export interface FixtureEnd {
57
+ i: number;
58
+ c: Vec3;
59
+ out: Vec3;
60
+ r: number;
61
+ eye: Vec3;
62
+ }
63
+ export interface DepthFlag {
64
+ kind: string;
65
+ line: number;
66
+ side: number;
67
+ s0: number;
68
+ s1: number;
69
+ y0: number;
70
+ y1: number;
71
+ rows: number;
72
+ depth: number;
73
+ c: Vec3;
74
+ }
75
+ export declare function parseGkLines(raw: unknown): GkLine[];
76
+ /** Door-like openings the kernel found (inserts reaching the floor, 1.8 m
77
+ * or taller): world boxes. */
78
+ export declare function parseDoors(raw: unknown): Box[];
79
+ export declare function parseEdgeFlags(raw: unknown): EdgeFlag[];
80
+ export declare function parseFixtureEnds(raw: unknown): FixtureEnd[];
81
+ export declare function parseDepthFlags(raw: unknown): DepthFlag[];
82
+ export declare function instBox(r: InstRow): Box;
83
+ /** The world box a depth_step run covers (its rows, 10 cm deep at the facade). */
84
+ export declare function depthBox(f: DepthFlag, lines: readonly GkLine[]): Box;
85
+ export interface GapJudgement {
86
+ issues: AuditIssue[];
87
+ /** Checks that ran but could measure nothing (no walkable eye points). */
88
+ unmeasured: AuditCheck[];
89
+ notes: string[];
90
+ }
91
+ /**
92
+ * exposed_edge, open_fixture_end and depth_step issues,
93
+ * with confirmation folded in. `holes` (the through_hole issues) are
94
+ * updated in place when a depth_step hole confirms one.
95
+ */
96
+ export declare function judgeGaps(result: KernelResult, inst: readonly InstRow[], want: ReadonlySet<AuditCheck>, holes?: AuditIssue[]): GapJudgement;