unity-open-mcp 0.7.0 → 0.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (899) hide show
  1. package/dist/batch-spawn.d.ts +12 -0
  2. package/dist/batch-spawn.js +106 -10
  3. package/dist/batch-spawn.js.map +1 -1
  4. package/dist/bridge-tools-cache.d.ts +46 -0
  5. package/dist/bridge-tools-cache.js +83 -0
  6. package/dist/bridge-tools-cache.js.map +1 -0
  7. package/dist/capabilities/build-capabilities.d.ts +34 -0
  8. package/dist/capabilities/build-capabilities.js +188 -450
  9. package/dist/capabilities/build-capabilities.js.map +1 -1
  10. package/dist/capabilities/intent-groups.d.ts +99 -0
  11. package/dist/capabilities/intent-groups.js +518 -0
  12. package/dist/capabilities/intent-groups.js.map +1 -0
  13. package/dist/capabilities/list-rules.js +12 -20
  14. package/dist/capabilities/list-rules.js.map +1 -1
  15. package/dist/capabilities/rule-catalog.d.ts +22 -1
  16. package/dist/capabilities/rule-catalog.js +53 -20
  17. package/dist/capabilities/rule-catalog.js.map +1 -1
  18. package/dist/capabilities/tool-groups.d.ts +8 -4
  19. package/dist/capabilities/tool-groups.js +36 -9
  20. package/dist/capabilities/tool-groups.js.map +1 -1
  21. package/dist/cli/cli.js +65 -8
  22. package/dist/cli/cli.js.map +1 -1
  23. package/dist/cli/commands.d.ts +20 -0
  24. package/dist/cli/commands.js +142 -73
  25. package/dist/cli/commands.js.map +1 -1
  26. package/dist/cli/help-text.d.ts +2 -0
  27. package/dist/cli/help-text.js +77 -0
  28. package/dist/cli/help-text.js.map +1 -0
  29. package/dist/cli/ping-poller.d.ts +7 -5
  30. package/dist/cli/ping-poller.js +16 -15
  31. package/dist/cli/ping-poller.js.map +1 -1
  32. package/dist/compressible-router.d.ts +9 -2
  33. package/dist/compressible-router.js +64 -7
  34. package/dist/compressible-router.js.map +1 -1
  35. package/dist/compression/compact.d.ts +1 -0
  36. package/dist/compression/compact.js +82 -14
  37. package/dist/compression/compact.js.map +1 -1
  38. package/dist/constants.d.ts +6 -5
  39. package/dist/constants.js +6 -5
  40. package/dist/constants.js.map +1 -1
  41. package/dist/dialog-dismiss.d.ts +10 -0
  42. package/dist/dialog-dismiss.js +110 -10
  43. package/dist/dialog-dismiss.js.map +1 -1
  44. package/dist/editor-process-control.d.ts +68 -0
  45. package/dist/editor-process-control.js +249 -0
  46. package/dist/editor-process-control.js.map +1 -0
  47. package/dist/event-stream.d.ts +2 -1
  48. package/dist/event-stream.js +43 -8
  49. package/dist/event-stream.js.map +1 -1
  50. package/dist/index.d.ts +1 -2
  51. package/dist/index.js +18 -140
  52. package/dist/index.js.map +1 -1
  53. package/dist/live-client.d.ts +52 -10
  54. package/dist/live-client.js +399 -42
  55. package/dist/live-client.js.map +1 -1
  56. package/dist/offline/api.js +333 -91
  57. package/dist/offline/api.js.map +1 -1
  58. package/dist/offline/hierarchy.js +100 -3
  59. package/dist/offline/hierarchy.js.map +1 -1
  60. package/dist/offline/index-builders.d.ts +120 -2
  61. package/dist/offline/index-builders.js +374 -35
  62. package/dist/offline/index-builders.js.map +1 -1
  63. package/dist/offline/overrides.js +5 -1
  64. package/dist/offline/overrides.js.map +1 -1
  65. package/dist/offline/parse.js +21 -9
  66. package/dist/offline/parse.js.map +1 -1
  67. package/dist/offline/paths.d.ts +32 -0
  68. package/dist/offline/paths.js +71 -2
  69. package/dist/offline/paths.js.map +1 -1
  70. package/dist/offline/primitives.d.ts +15 -0
  71. package/dist/offline/primitives.js +130 -6
  72. package/dist/offline/primitives.js.map +1 -1
  73. package/dist/offline/types.d.ts +29 -0
  74. package/dist/offline/types.js.map +1 -1
  75. package/dist/ping-cache.d.ts +35 -0
  76. package/dist/ping-cache.js +70 -0
  77. package/dist/ping-cache.js.map +1 -1
  78. package/dist/process-diagnostics.d.ts +146 -0
  79. package/dist/process-diagnostics.js +333 -0
  80. package/dist/process-diagnostics.js.map +1 -0
  81. package/dist/schema-defaults.d.ts +11 -0
  82. package/dist/schema-defaults.js +32 -1
  83. package/dist/schema-defaults.js.map +1 -1
  84. package/dist/server-instructions.js +7 -2
  85. package/dist/server-instructions.js.map +1 -1
  86. package/dist/server.d.ts +17 -0
  87. package/dist/server.js +195 -0
  88. package/dist/server.js.map +1 -0
  89. package/dist/skill/client-paths.d.ts +23 -0
  90. package/dist/skill/client-paths.js +46 -1
  91. package/dist/skill/client-paths.js.map +1 -1
  92. package/dist/tool-router.d.ts +54 -0
  93. package/dist/tool-router.js +689 -51
  94. package/dist/tool-router.js.map +1 -1
  95. package/dist/tool-session-state.d.ts +82 -10
  96. package/dist/tool-session-state.js +116 -13
  97. package/dist/tool-session-state.js.map +1 -1
  98. package/dist/tools/agent-capabilities.d.ts +40 -2
  99. package/dist/tools/agent-capabilities.js +16 -21
  100. package/dist/tools/agent-capabilities.js.map +1 -1
  101. package/dist/tools/animation-create.d.ts +40 -2
  102. package/dist/tools/animation-create.js +17 -26
  103. package/dist/tools/animation-create.js.map +1 -1
  104. package/dist/tools/animation-get-data.d.ts +40 -2
  105. package/dist/tools/animation-get-data.js +13 -18
  106. package/dist/tools/animation-get-data.js.map +1 -1
  107. package/dist/tools/animation-modify.d.ts +40 -2
  108. package/dist/tools/animation-modify.js +31 -40
  109. package/dist/tools/animation-modify.js.map +1 -1
  110. package/dist/tools/animator-create.d.ts +40 -2
  111. package/dist/tools/animator-create.js +17 -26
  112. package/dist/tools/animator-create.js.map +1 -1
  113. package/dist/tools/animator-get-data.d.ts +40 -2
  114. package/dist/tools/animator-get-data.js +13 -18
  115. package/dist/tools/animator-get-data.js.map +1 -1
  116. package/dist/tools/animator-modify.d.ts +40 -2
  117. package/dist/tools/animator-modify.js +37 -46
  118. package/dist/tools/animator-modify.js.map +1 -1
  119. package/dist/tools/apply-fix.d.ts +40 -2
  120. package/dist/tools/apply-fix.js +41 -57
  121. package/dist/tools/apply-fix.js.map +1 -1
  122. package/dist/tools/asmdef-create.d.ts +40 -2
  123. package/dist/tools/asmdef-create.js +82 -100
  124. package/dist/tools/asmdef-create.js.map +1 -1
  125. package/dist/tools/asmdef-get.d.ts +40 -2
  126. package/dist/tools/asmdef-get.js +14 -19
  127. package/dist/tools/asmdef-get.js.map +1 -1
  128. package/dist/tools/asmdef-list.d.ts +40 -2
  129. package/dist/tools/asmdef-list.js +25 -30
  130. package/dist/tools/asmdef-list.js.map +1 -1
  131. package/dist/tools/asmdef-modify.d.ts +40 -2
  132. package/dist/tools/asmdef-modify.js +76 -94
  133. package/dist/tools/asmdef-modify.js.map +1 -1
  134. package/dist/tools/assets-copy.d.ts +40 -2
  135. package/dist/tools/assets-copy.js +26 -38
  136. package/dist/tools/assets-copy.js.map +1 -1
  137. package/dist/tools/assets-create-folder.d.ts +40 -2
  138. package/dist/tools/assets-create-folder.js +28 -41
  139. package/dist/tools/assets-create-folder.js.map +1 -1
  140. package/dist/tools/assets-delete.d.ts +40 -2
  141. package/dist/tools/assets-delete.js +16 -28
  142. package/dist/tools/assets-delete.js.map +1 -1
  143. package/dist/tools/assets-move.d.ts +40 -2
  144. package/dist/tools/assets-move.js +27 -39
  145. package/dist/tools/assets-move.js.map +1 -1
  146. package/dist/tools/assets-refresh.d.ts +40 -2
  147. package/dist/tools/assets-refresh.js +16 -28
  148. package/dist/tools/assets-refresh.js.map +1 -1
  149. package/dist/tools/audio-listener-get.d.ts +40 -2
  150. package/dist/tools/audio-listener-get.js +8 -13
  151. package/dist/tools/audio-listener-get.js.map +1 -1
  152. package/dist/tools/audio-mixer-get-parameter.d.ts +40 -2
  153. package/dist/tools/audio-mixer-get-parameter.js +15 -20
  154. package/dist/tools/audio-mixer-get-parameter.js.map +1 -1
  155. package/dist/tools/audio-mixer-set-parameter.d.ts +40 -2
  156. package/dist/tools/audio-mixer-set-parameter.js +29 -38
  157. package/dist/tools/audio-mixer-set-parameter.js.map +1 -1
  158. package/dist/tools/audio-source-add.d.ts +40 -2
  159. package/dist/tools/audio-source-add.js +58 -70
  160. package/dist/tools/audio-source-add.js.map +1 -1
  161. package/dist/tools/audio-source-modify.d.ts +40 -2
  162. package/dist/tools/audio-source-modify.js +36 -46
  163. package/dist/tools/audio-source-modify.js.map +1 -1
  164. package/dist/tools/baseline-create.d.ts +40 -2
  165. package/dist/tools/baseline-create.js +12 -17
  166. package/dist/tools/baseline-create.js.map +1 -1
  167. package/dist/tools/batch-execute.d.ts +40 -2
  168. package/dist/tools/batch-execute.js +64 -74
  169. package/dist/tools/batch-execute.js.map +1 -1
  170. package/dist/tools/bridge-status.d.ts +40 -2
  171. package/dist/tools/bridge-status.js +33 -38
  172. package/dist/tools/bridge-status.js.map +1 -1
  173. package/dist/tools/build-get-active-target.d.ts +40 -2
  174. package/dist/tools/build-get-active-target.js +7 -12
  175. package/dist/tools/build-get-active-target.js.map +1 -1
  176. package/dist/tools/build-get-defines.d.ts +40 -2
  177. package/dist/tools/build-get-defines.js +7 -12
  178. package/dist/tools/build-get-defines.js.map +1 -1
  179. package/dist/tools/build-get-scenes.d.ts +40 -2
  180. package/dist/tools/build-get-scenes.js +7 -12
  181. package/dist/tools/build-get-scenes.js.map +1 -1
  182. package/dist/tools/build-get-targets.d.ts +40 -2
  183. package/dist/tools/build-get-targets.js +8 -13
  184. package/dist/tools/build-get-targets.js.map +1 -1
  185. package/dist/tools/build-set-defines.d.ts +40 -2
  186. package/dist/tools/build-set-defines.js +22 -40
  187. package/dist/tools/build-set-defines.js.map +1 -1
  188. package/dist/tools/build-set-scenes.d.ts +40 -2
  189. package/dist/tools/build-set-scenes.js +36 -49
  190. package/dist/tools/build-set-scenes.js.map +1 -1
  191. package/dist/tools/build-set-target.d.ts +40 -2
  192. package/dist/tools/build-set-target.js +17 -38
  193. package/dist/tools/build-set-target.js.map +1 -1
  194. package/dist/tools/build-start.d.ts +40 -2
  195. package/dist/tools/build-start.js +34 -50
  196. package/dist/tools/build-start.js.map +1 -1
  197. package/dist/tools/capture-inline.d.ts +40 -2
  198. package/dist/tools/capture-inline.js +43 -48
  199. package/dist/tools/capture-inline.js.map +1 -1
  200. package/dist/tools/checkpoint-create.d.ts +40 -2
  201. package/dist/tools/checkpoint-create.js +13 -14
  202. package/dist/tools/checkpoint-create.js.map +1 -1
  203. package/dist/tools/cinemachine-brain-ensure.d.ts +40 -2
  204. package/dist/tools/cinemachine-brain-ensure.js +14 -23
  205. package/dist/tools/cinemachine-brain-ensure.js.map +1 -1
  206. package/dist/tools/cinemachine-camera-list.d.ts +40 -2
  207. package/dist/tools/cinemachine-camera-list.js +6 -11
  208. package/dist/tools/cinemachine-camera-list.js.map +1 -1
  209. package/dist/tools/cinemachine-create-camera.d.ts +40 -2
  210. package/dist/tools/cinemachine-create-camera.js +38 -47
  211. package/dist/tools/cinemachine-create-camera.js.map +1 -1
  212. package/dist/tools/cinemachine-set-body.d.ts +40 -2
  213. package/dist/tools/cinemachine-set-body.js +20 -29
  214. package/dist/tools/cinemachine-set-body.js.map +1 -1
  215. package/dist/tools/cinemachine-set-lens.d.ts +40 -2
  216. package/dist/tools/cinemachine-set-lens.js +28 -37
  217. package/dist/tools/cinemachine-set-lens.js.map +1 -1
  218. package/dist/tools/cinemachine-set-noise.d.ts +40 -2
  219. package/dist/tools/cinemachine-set-noise.js +18 -27
  220. package/dist/tools/cinemachine-set-noise.js.map +1 -1
  221. package/dist/tools/cinemachine-set-targets.d.ts +40 -2
  222. package/dist/tools/cinemachine-set-targets.js +17 -26
  223. package/dist/tools/cinemachine-set-targets.js.map +1 -1
  224. package/dist/tools/compile-check.d.ts +40 -2
  225. package/dist/tools/compile-check.js +18 -23
  226. package/dist/tools/compile-check.js.map +1 -1
  227. package/dist/tools/component-add.d.ts +40 -2
  228. package/dist/tools/component-add.js +30 -42
  229. package/dist/tools/component-add.js.map +1 -1
  230. package/dist/tools/component-destroy.d.ts +40 -2
  231. package/dist/tools/component-destroy.js +29 -41
  232. package/dist/tools/component-destroy.js.map +1 -1
  233. package/dist/tools/component-get.d.ts +40 -2
  234. package/dist/tools/component-get.js +77 -82
  235. package/dist/tools/component-get.js.map +1 -1
  236. package/dist/tools/component-list-all.d.ts +40 -2
  237. package/dist/tools/component-list-all.js +29 -34
  238. package/dist/tools/component-list-all.js.map +1 -1
  239. package/dist/tools/component-modify.d.ts +40 -2
  240. package/dist/tools/component-modify.js +60 -72
  241. package/dist/tools/component-modify.js.map +1 -1
  242. package/dist/tools/console-clear.d.ts +40 -2
  243. package/dist/tools/console-clear.js +9 -14
  244. package/dist/tools/console-clear.js.map +1 -1
  245. package/dist/tools/console-log.d.ts +40 -2
  246. package/dist/tools/console-log.js +34 -39
  247. package/dist/tools/console-log.js.map +1 -1
  248. package/dist/tools/constraint-add.d.ts +40 -2
  249. package/dist/tools/constraint-add.js +49 -61
  250. package/dist/tools/constraint-add.js.map +1 -1
  251. package/dist/tools/delta.d.ts +40 -2
  252. package/dist/tools/delta.js +10 -15
  253. package/dist/tools/delta.js.map +1 -1
  254. package/dist/tools/dependencies.d.ts +40 -2
  255. package/dist/tools/dependencies.js +55 -60
  256. package/dist/tools/dependencies.js.map +1 -1
  257. package/dist/tools/editor-add-layer.d.ts +40 -2
  258. package/dist/tools/editor-add-layer.js +30 -43
  259. package/dist/tools/editor-add-layer.js.map +1 -1
  260. package/dist/tools/editor-add-tag.d.ts +40 -2
  261. package/dist/tools/editor-add-tag.js +20 -33
  262. package/dist/tools/editor-add-tag.js.map +1 -1
  263. package/dist/tools/editor-clear-history.d.ts +40 -2
  264. package/dist/tools/editor-clear-history.js +9 -21
  265. package/dist/tools/editor-clear-history.js.map +1 -1
  266. package/dist/tools/editor-get-layers.d.ts +40 -2
  267. package/dist/tools/editor-get-layers.js +12 -17
  268. package/dist/tools/editor-get-layers.js.map +1 -1
  269. package/dist/tools/editor-get-tags.d.ts +40 -2
  270. package/dist/tools/editor-get-tags.js +10 -15
  271. package/dist/tools/editor-get-tags.js.map +1 -1
  272. package/dist/tools/editor-redo.d.ts +40 -2
  273. package/dist/tools/editor-redo.js +15 -20
  274. package/dist/tools/editor-redo.js.map +1 -1
  275. package/dist/tools/editor-set-state.d.ts +40 -2
  276. package/dist/tools/editor-set-state.js +33 -42
  277. package/dist/tools/editor-set-state.js.map +1 -1
  278. package/dist/tools/editor-status.d.ts +40 -2
  279. package/dist/tools/editor-status.js +9 -14
  280. package/dist/tools/editor-status.js.map +1 -1
  281. package/dist/tools/editor-undo-history.d.ts +40 -2
  282. package/dist/tools/editor-undo-history.js +11 -16
  283. package/dist/tools/editor-undo-history.js.map +1 -1
  284. package/dist/tools/editor-undo.d.ts +40 -2
  285. package/dist/tools/editor-undo.js +17 -22
  286. package/dist/tools/editor-undo.js.map +1 -1
  287. package/dist/tools/editorprefs-delete.d.ts +40 -2
  288. package/dist/tools/editorprefs-delete.js +12 -17
  289. package/dist/tools/editorprefs-delete.js.map +1 -1
  290. package/dist/tools/editorprefs-get.d.ts +40 -2
  291. package/dist/tools/editorprefs-get.js +17 -22
  292. package/dist/tools/editorprefs-get.js.map +1 -1
  293. package/dist/tools/editorprefs-set.d.ts +40 -2
  294. package/dist/tools/editorprefs-set.js +22 -27
  295. package/dist/tools/editorprefs-set.js.map +1 -1
  296. package/dist/tools/execute-csharp.d.ts +40 -2
  297. package/dist/tools/execute-csharp.js +44 -71
  298. package/dist/tools/execute-csharp.js.map +1 -1
  299. package/dist/tools/execute-menu.d.ts +40 -2
  300. package/dist/tools/execute-menu.js +12 -37
  301. package/dist/tools/execute-menu.js.map +1 -1
  302. package/dist/tools/find-members.d.ts +40 -2
  303. package/dist/tools/find-members.js +41 -46
  304. package/dist/tools/find-members.js.map +1 -1
  305. package/dist/tools/find-references.d.ts +40 -2
  306. package/dist/tools/find-references.js +48 -53
  307. package/dist/tools/find-references.js.map +1 -1
  308. package/dist/tools/frame-debugger.d.ts +40 -2
  309. package/dist/tools/frame-debugger.js +27 -32
  310. package/dist/tools/frame-debugger.js.map +1 -1
  311. package/dist/tools/gameobject-create.d.ts +40 -2
  312. package/dist/tools/gameobject-create.js +44 -56
  313. package/dist/tools/gameobject-create.js.map +1 -1
  314. package/dist/tools/gameobject-destroy.d.ts +40 -2
  315. package/dist/tools/gameobject-destroy.js +21 -33
  316. package/dist/tools/gameobject-destroy.js.map +1 -1
  317. package/dist/tools/gameobject-duplicate.d.ts +40 -2
  318. package/dist/tools/gameobject-duplicate.js +23 -35
  319. package/dist/tools/gameobject-duplicate.js.map +1 -1
  320. package/dist/tools/gameobject-find.d.ts +40 -2
  321. package/dist/tools/gameobject-find.js +49 -54
  322. package/dist/tools/gameobject-find.js.map +1 -1
  323. package/dist/tools/gameobject-modify.d.ts +40 -2
  324. package/dist/tools/gameobject-modify.js +101 -113
  325. package/dist/tools/gameobject-modify.js.map +1 -1
  326. package/dist/tools/gameobject-set-parent.d.ts +40 -2
  327. package/dist/tools/gameobject-set-parent.js +42 -50
  328. package/dist/tools/gameobject-set-parent.js.map +1 -1
  329. package/dist/tools/gate-budget-estimate.d.ts +40 -2
  330. package/dist/tools/gate-budget-estimate.js +35 -40
  331. package/dist/tools/gate-budget-estimate.js.map +1 -1
  332. package/dist/tools/generate-skill.d.ts +40 -2
  333. package/dist/tools/generate-skill.js +30 -35
  334. package/dist/tools/generate-skill.js.map +1 -1
  335. package/dist/tools/hub-available-releases.d.ts +40 -2
  336. package/dist/tools/hub-available-releases.js +12 -17
  337. package/dist/tools/hub-available-releases.js.map +1 -1
  338. package/dist/tools/hub-get-install-path.d.ts +40 -2
  339. package/dist/tools/hub-get-install-path.js +11 -16
  340. package/dist/tools/hub-get-install-path.js.map +1 -1
  341. package/dist/tools/hub-install-editor.d.ts +40 -2
  342. package/dist/tools/hub-install-editor.js +29 -34
  343. package/dist/tools/hub-install-editor.js.map +1 -1
  344. package/dist/tools/hub-install-modules.d.ts +40 -2
  345. package/dist/tools/hub-install-modules.js +31 -36
  346. package/dist/tools/hub-install-modules.js.map +1 -1
  347. package/dist/tools/hub-list-editors.d.ts +40 -2
  348. package/dist/tools/hub-list-editors.js +14 -19
  349. package/dist/tools/hub-list-editors.js.map +1 -1
  350. package/dist/tools/hub-set-install-path.d.ts +40 -2
  351. package/dist/tools/hub-set-install-path.js +18 -23
  352. package/dist/tools/hub-set-install-path.js.map +1 -1
  353. package/dist/tools/impact-preview.d.ts +40 -2
  354. package/dist/tools/impact-preview.js +31 -36
  355. package/dist/tools/impact-preview.js.map +1 -1
  356. package/dist/tools/index.d.ts +1 -0
  357. package/dist/tools/index.js +17 -0
  358. package/dist/tools/index.js.map +1 -1
  359. package/dist/tools/inputsystem-action-add.d.ts +40 -2
  360. package/dist/tools/inputsystem-action-add.js +48 -57
  361. package/dist/tools/inputsystem-action-add.js.map +1 -1
  362. package/dist/tools/inputsystem-actionmap-add.d.ts +40 -2
  363. package/dist/tools/inputsystem-actionmap-add.js +17 -26
  364. package/dist/tools/inputsystem-actionmap-add.js.map +1 -1
  365. package/dist/tools/inputsystem-asset-create.d.ts +40 -2
  366. package/dist/tools/inputsystem-asset-create.js +19 -28
  367. package/dist/tools/inputsystem-asset-create.js.map +1 -1
  368. package/dist/tools/inputsystem-binding-add.d.ts +40 -2
  369. package/dist/tools/inputsystem-binding-add.js +34 -43
  370. package/dist/tools/inputsystem-binding-add.js.map +1 -1
  371. package/dist/tools/inputsystem-binding-composite-add.d.ts +40 -2
  372. package/dist/tools/inputsystem-binding-composite-add.js +37 -46
  373. package/dist/tools/inputsystem-binding-composite-add.js.map +1 -1
  374. package/dist/tools/inputsystem-controlscheme-add.d.ts +40 -2
  375. package/dist/tools/inputsystem-controlscheme-add.js +29 -38
  376. package/dist/tools/inputsystem-controlscheme-add.js.map +1 -1
  377. package/dist/tools/inputsystem-get.d.ts +40 -2
  378. package/dist/tools/inputsystem-get.js +12 -17
  379. package/dist/tools/inputsystem-get.js.map +1 -1
  380. package/dist/tools/invoke-method.d.ts +40 -2
  381. package/dist/tools/invoke-method.js +73 -91
  382. package/dist/tools/invoke-method.js.map +1 -1
  383. package/dist/tools/light-add.d.ts +40 -2
  384. package/dist/tools/light-add.js +38 -50
  385. package/dist/tools/light-add.js.map +1 -1
  386. package/dist/tools/light-modify.d.ts +40 -2
  387. package/dist/tools/light-modify.js +22 -31
  388. package/dist/tools/light-modify.js.map +1 -1
  389. package/dist/tools/light-set.d.ts +40 -2
  390. package/dist/tools/light-set.js +40 -49
  391. package/dist/tools/light-set.js.map +1 -1
  392. package/dist/tools/list-assets-of-type.d.ts +40 -2
  393. package/dist/tools/list-assets-of-type.js +37 -42
  394. package/dist/tools/list-assets-of-type.js.map +1 -1
  395. package/dist/tools/list-assets.d.ts +40 -2
  396. package/dist/tools/list-assets.js +19 -24
  397. package/dist/tools/list-assets.js.map +1 -1
  398. package/dist/tools/list-rules.d.ts +40 -2
  399. package/dist/tools/list-rules.js +19 -24
  400. package/dist/tools/list-rules.js.map +1 -1
  401. package/dist/tools/lod-add-level.d.ts +40 -2
  402. package/dist/tools/lod-add-level.js +31 -43
  403. package/dist/tools/lod-add-level.js.map +1 -1
  404. package/dist/tools/lod-group-configure.d.ts +40 -2
  405. package/dist/tools/lod-group-configure.js +30 -42
  406. package/dist/tools/lod-group-configure.js.map +1 -1
  407. package/dist/tools/manage-tools.d.ts +40 -2
  408. package/dist/tools/manage-tools.js +70 -36
  409. package/dist/tools/manage-tools.js.map +1 -1
  410. package/dist/tools/material-create.d.ts +40 -2
  411. package/dist/tools/material-create.js +30 -31
  412. package/dist/tools/material-create.js.map +1 -1
  413. package/dist/tools/material-get-keywords.d.ts +40 -2
  414. package/dist/tools/material-get-keywords.js +14 -19
  415. package/dist/tools/material-get-keywords.js.map +1 -1
  416. package/dist/tools/material-get-properties.d.ts +40 -2
  417. package/dist/tools/material-get-properties.js +21 -26
  418. package/dist/tools/material-get-properties.js.map +1 -1
  419. package/dist/tools/material-set-keyword.d.ts +40 -2
  420. package/dist/tools/material-set-keyword.js +26 -38
  421. package/dist/tools/material-set-keyword.js.map +1 -1
  422. package/dist/tools/material-set-property.d.ts +40 -2
  423. package/dist/tools/material-set-property.js +35 -47
  424. package/dist/tools/material-set-property.js.map +1 -1
  425. package/dist/tools/material-set-shader.d.ts +40 -2
  426. package/dist/tools/material-set-shader.js +23 -35
  427. package/dist/tools/material-set-shader.js.map +1 -1
  428. package/dist/tools/memory-snapshot-capture.d.ts +40 -2
  429. package/dist/tools/memory-snapshot-capture.js +37 -42
  430. package/dist/tools/memory-snapshot-capture.js.map +1 -1
  431. package/dist/tools/mutation-explain.d.ts +40 -2
  432. package/dist/tools/mutation-explain.js +19 -24
  433. package/dist/tools/mutation-explain.js.map +1 -1
  434. package/dist/tools/navigation-agent-add.d.ts +40 -2
  435. package/dist/tools/navigation-agent-add.js +24 -33
  436. package/dist/tools/navigation-agent-add.js.map +1 -1
  437. package/dist/tools/navigation-agent-set-destination.d.ts +40 -2
  438. package/dist/tools/navigation-agent-set-destination.js +18 -27
  439. package/dist/tools/navigation-agent-set-destination.js.map +1 -1
  440. package/dist/tools/navigation-get.d.ts +40 -2
  441. package/dist/tools/navigation-get.js +11 -16
  442. package/dist/tools/navigation-get.js.map +1 -1
  443. package/dist/tools/navigation-link-add.d.ts +40 -2
  444. package/dist/tools/navigation-link-add.js +43 -52
  445. package/dist/tools/navigation-link-add.js.map +1 -1
  446. package/dist/tools/navigation-list.d.ts +40 -2
  447. package/dist/tools/navigation-list.js +8 -13
  448. package/dist/tools/navigation-list.js.map +1 -1
  449. package/dist/tools/navigation-modifier-add.d.ts +40 -2
  450. package/dist/tools/navigation-modifier-add.js +28 -37
  451. package/dist/tools/navigation-modifier-add.js.map +1 -1
  452. package/dist/tools/navigation-modifier-volume-add.d.ts +40 -2
  453. package/dist/tools/navigation-modifier-volume-add.js +27 -36
  454. package/dist/tools/navigation-modifier-volume-add.js.map +1 -1
  455. package/dist/tools/navigation-modify.d.ts +40 -2
  456. package/dist/tools/navigation-modify.js +33 -42
  457. package/dist/tools/navigation-modify.js.map +1 -1
  458. package/dist/tools/navigation-set-bake-settings.d.ts +40 -2
  459. package/dist/tools/navigation-set-bake-settings.js +27 -36
  460. package/dist/tools/navigation-set-bake-settings.js.map +1 -1
  461. package/dist/tools/navigation-surface-add.d.ts +40 -2
  462. package/dist/tools/navigation-surface-add.js +27 -39
  463. package/dist/tools/navigation-surface-add.js.map +1 -1
  464. package/dist/tools/navigation-surface-bake.d.ts +40 -2
  465. package/dist/tools/navigation-surface-bake.js +15 -24
  466. package/dist/tools/navigation-surface-bake.js.map +1 -1
  467. package/dist/tools/object-get-data.d.ts +40 -2
  468. package/dist/tools/object-get-data.js +44 -49
  469. package/dist/tools/object-get-data.js.map +1 -1
  470. package/dist/tools/object-modify.d.ts +40 -2
  471. package/dist/tools/object-modify.js +48 -60
  472. package/dist/tools/object-modify.js.map +1 -1
  473. package/dist/tools/package-add.d.ts +40 -2
  474. package/dist/tools/package-add.js +20 -35
  475. package/dist/tools/package-add.js.map +1 -1
  476. package/dist/tools/package-check.d.ts +40 -2
  477. package/dist/tools/package-check.js +15 -20
  478. package/dist/tools/package-check.js.map +1 -1
  479. package/dist/tools/package-get-dependencies.d.ts +40 -2
  480. package/dist/tools/package-get-dependencies.js +8 -13
  481. package/dist/tools/package-get-dependencies.js.map +1 -1
  482. package/dist/tools/package-get-info.d.ts +40 -2
  483. package/dist/tools/package-get-info.js +21 -26
  484. package/dist/tools/package-get-info.js.map +1 -1
  485. package/dist/tools/package-list.d.ts +40 -2
  486. package/dist/tools/package-list.js +45 -50
  487. package/dist/tools/package-list.js.map +1 -1
  488. package/dist/tools/package-remove.d.ts +40 -2
  489. package/dist/tools/package-remove.js +18 -33
  490. package/dist/tools/package-remove.js.map +1 -1
  491. package/dist/tools/package-search.d.ts +40 -2
  492. package/dist/tools/package-search.js +29 -34
  493. package/dist/tools/package-search.js.map +1 -1
  494. package/dist/tools/particle-system-get.d.ts +40 -2
  495. package/dist/tools/particle-system-get.js +24 -29
  496. package/dist/tools/particle-system-get.js.map +1 -1
  497. package/dist/tools/particle-system-modify.d.ts +40 -2
  498. package/dist/tools/particle-system-modify.js +50 -59
  499. package/dist/tools/particle-system-modify.js.map +1 -1
  500. package/dist/tools/ping.d.ts +40 -2
  501. package/dist/tools/ping.js +4 -9
  502. package/dist/tools/ping.js.map +1 -1
  503. package/dist/tools/playerprefs-delete.d.ts +40 -2
  504. package/dist/tools/playerprefs-delete.js +13 -18
  505. package/dist/tools/playerprefs-delete.js.map +1 -1
  506. package/dist/tools/playerprefs-get.d.ts +40 -2
  507. package/dist/tools/playerprefs-get.js +17 -22
  508. package/dist/tools/playerprefs-get.js.map +1 -1
  509. package/dist/tools/playerprefs-set.d.ts +40 -2
  510. package/dist/tools/playerprefs-set.js +25 -30
  511. package/dist/tools/playerprefs-set.js.map +1 -1
  512. package/dist/tools/prefab-apply.d.ts +40 -2
  513. package/dist/tools/prefab-apply.js +22 -34
  514. package/dist/tools/prefab-apply.js.map +1 -1
  515. package/dist/tools/prefab-close.d.ts +40 -2
  516. package/dist/tools/prefab-close.js +13 -25
  517. package/dist/tools/prefab-close.js.map +1 -1
  518. package/dist/tools/prefab-create.d.ts +40 -2
  519. package/dist/tools/prefab-create.js +35 -47
  520. package/dist/tools/prefab-create.js.map +1 -1
  521. package/dist/tools/prefab-get-overrides.d.ts +40 -2
  522. package/dist/tools/prefab-get-overrides.js +18 -23
  523. package/dist/tools/prefab-get-overrides.js.map +1 -1
  524. package/dist/tools/prefab-instantiate.d.ts +40 -2
  525. package/dist/tools/prefab-instantiate.js +35 -47
  526. package/dist/tools/prefab-instantiate.js.map +1 -1
  527. package/dist/tools/prefab-open.d.ts +40 -2
  528. package/dist/tools/prefab-open.js +12 -24
  529. package/dist/tools/prefab-open.js.map +1 -1
  530. package/dist/tools/prefab-revert.d.ts +40 -2
  531. package/dist/tools/prefab-revert.js +21 -33
  532. package/dist/tools/prefab-revert.js.map +1 -1
  533. package/dist/tools/prefab-save.d.ts +40 -2
  534. package/dist/tools/prefab-save.js +8 -20
  535. package/dist/tools/prefab-save.js.map +1 -1
  536. package/dist/tools/prefab-status.d.ts +40 -2
  537. package/dist/tools/prefab-status.js +18 -23
  538. package/dist/tools/prefab-status.js.map +1 -1
  539. package/dist/tools/prefab-unpack.d.ts +40 -2
  540. package/dist/tools/prefab-unpack.js +27 -39
  541. package/dist/tools/prefab-unpack.js.map +1 -1
  542. package/dist/tools/probuilder-create-shape.d.ts +40 -2
  543. package/dist/tools/probuilder-create-shape.js +24 -33
  544. package/dist/tools/probuilder-create-shape.js.map +1 -1
  545. package/dist/tools/probuilder-delete-faces.d.ts +40 -2
  546. package/dist/tools/probuilder-delete-faces.js +24 -33
  547. package/dist/tools/probuilder-delete-faces.js.map +1 -1
  548. package/dist/tools/probuilder-extrude.d.ts +40 -2
  549. package/dist/tools/probuilder-extrude.js +35 -44
  550. package/dist/tools/probuilder-extrude.js.map +1 -1
  551. package/dist/tools/probuilder-get-mesh-info.d.ts +40 -2
  552. package/dist/tools/probuilder-get-mesh-info.js +12 -17
  553. package/dist/tools/probuilder-get-mesh-info.js.map +1 -1
  554. package/dist/tools/probuilder-set-face-material.d.ts +40 -2
  555. package/dist/tools/probuilder-set-face-material.js +30 -39
  556. package/dist/tools/probuilder-set-face-material.js.map +1 -1
  557. package/dist/tools/profiler-capture-frame.d.ts +40 -2
  558. package/dist/tools/profiler-capture-frame.js +59 -63
  559. package/dist/tools/profiler-capture-frame.js.map +1 -1
  560. package/dist/tools/profiler-capture.d.ts +40 -2
  561. package/dist/tools/profiler-capture.js +76 -81
  562. package/dist/tools/profiler-capture.js.map +1 -1
  563. package/dist/tools/profiler-clear-data.d.ts +40 -2
  564. package/dist/tools/profiler-clear-data.js +9 -14
  565. package/dist/tools/profiler-clear-data.js.map +1 -1
  566. package/dist/tools/profiler-enable-module.d.ts +40 -2
  567. package/dist/tools/profiler-enable-module.js +18 -23
  568. package/dist/tools/profiler-enable-module.js.map +1 -1
  569. package/dist/tools/profiler-get-config.d.ts +40 -2
  570. package/dist/tools/profiler-get-config.js +10 -15
  571. package/dist/tools/profiler-get-config.js.map +1 -1
  572. package/dist/tools/profiler-get-script-stats.d.ts +40 -2
  573. package/dist/tools/profiler-get-script-stats.js +9 -14
  574. package/dist/tools/profiler-get-script-stats.js.map +1 -1
  575. package/dist/tools/profiler-get-status.d.ts +40 -2
  576. package/dist/tools/profiler-get-status.js +10 -15
  577. package/dist/tools/profiler-get-status.js.map +1 -1
  578. package/dist/tools/profiler-list-modules.d.ts +40 -2
  579. package/dist/tools/profiler-list-modules.js +9 -14
  580. package/dist/tools/profiler-list-modules.js.map +1 -1
  581. package/dist/tools/profiler-load-data.d.ts +40 -2
  582. package/dist/tools/profiler-load-data.js +23 -28
  583. package/dist/tools/profiler-load-data.js.map +1 -1
  584. package/dist/tools/profiler-memory.d.ts +40 -2
  585. package/dist/tools/profiler-memory.js +13 -18
  586. package/dist/tools/profiler-memory.js.map +1 -1
  587. package/dist/tools/profiler-rendering.d.ts +40 -2
  588. package/dist/tools/profiler-rendering.js +8 -13
  589. package/dist/tools/profiler-rendering.js.map +1 -1
  590. package/dist/tools/profiler-save-data.d.ts +40 -2
  591. package/dist/tools/profiler-save-data.js +16 -28
  592. package/dist/tools/profiler-save-data.js.map +1 -1
  593. package/dist/tools/profiler-set-config.d.ts +40 -2
  594. package/dist/tools/profiler-set-config.js +58 -63
  595. package/dist/tools/profiler-set-config.js.map +1 -1
  596. package/dist/tools/profiler-start.d.ts +40 -2
  597. package/dist/tools/profiler-start.js +16 -21
  598. package/dist/tools/profiler-start.js.map +1 -1
  599. package/dist/tools/profiler-stop.d.ts +40 -2
  600. package/dist/tools/profiler-stop.js +9 -14
  601. package/dist/tools/profiler-stop.js.map +1 -1
  602. package/dist/tools/pull-events.d.ts +40 -2
  603. package/dist/tools/pull-events.js +23 -28
  604. package/dist/tools/pull-events.js.map +1 -1
  605. package/dist/tools/read-asset.d.ts +40 -2
  606. package/dist/tools/read-asset.js +66 -71
  607. package/dist/tools/read-asset.js.map +1 -1
  608. package/dist/tools/read-compile-errors.d.ts +40 -2
  609. package/dist/tools/read-compile-errors.js +40 -45
  610. package/dist/tools/read-compile-errors.js.map +1 -1
  611. package/dist/tools/read-console.d.ts +40 -2
  612. package/dist/tools/read-console.js +49 -54
  613. package/dist/tools/read-console.js.map +1 -1
  614. package/dist/tools/reflection-probe-bake.d.ts +40 -2
  615. package/dist/tools/reflection-probe-bake.js +30 -40
  616. package/dist/tools/reflection-probe-bake.js.map +1 -1
  617. package/dist/tools/reflection-probe-get.d.ts +40 -2
  618. package/dist/tools/reflection-probe-get.js +10 -15
  619. package/dist/tools/reflection-probe-get.js.map +1 -1
  620. package/dist/tools/regression-check.d.ts +40 -2
  621. package/dist/tools/regression-check.js +28 -33
  622. package/dist/tools/regression-check.js.map +1 -1
  623. package/dist/tools/reimport-package.d.ts +40 -2
  624. package/dist/tools/reimport-package.js +22 -38
  625. package/dist/tools/reimport-package.js.map +1 -1
  626. package/dist/tools/reserialize.d.ts +40 -2
  627. package/dist/tools/reserialize.js +19 -28
  628. package/dist/tools/reserialize.js.map +1 -1
  629. package/dist/tools/resource-pressure.d.ts +40 -0
  630. package/dist/tools/resource-pressure.js +57 -0
  631. package/dist/tools/resource-pressure.js.map +1 -0
  632. package/dist/tools/restart-editor.d.ts +40 -0
  633. package/dist/tools/restart-editor.js +74 -0
  634. package/dist/tools/restart-editor.js.map +1 -0
  635. package/dist/tools/run-tests.d.ts +40 -2
  636. package/dist/tools/run-tests.js +41 -46
  637. package/dist/tools/run-tests.js.map +1 -1
  638. package/dist/tools/scan-all.d.ts +40 -2
  639. package/dist/tools/scan-all.js +17 -22
  640. package/dist/tools/scan-all.js.map +1 -1
  641. package/dist/tools/scan-paths.d.ts +40 -2
  642. package/dist/tools/scan-paths.js +51 -56
  643. package/dist/tools/scan-paths.js.map +1 -1
  644. package/dist/tools/scene-create.d.ts +40 -2
  645. package/dist/tools/scene-create.js +41 -42
  646. package/dist/tools/scene-create.js.map +1 -1
  647. package/dist/tools/scene-focus.d.ts +40 -2
  648. package/dist/tools/scene-focus.js +38 -50
  649. package/dist/tools/scene-focus.js.map +1 -1
  650. package/dist/tools/scene-get-data.d.ts +40 -2
  651. package/dist/tools/scene-get-data.js +66 -71
  652. package/dist/tools/scene-get-data.js.map +1 -1
  653. package/dist/tools/scene-get-dirty-summary.d.ts +40 -2
  654. package/dist/tools/scene-get-dirty-summary.js +9 -14
  655. package/dist/tools/scene-get-dirty-summary.js.map +1 -1
  656. package/dist/tools/scene-list-opened.d.ts +40 -2
  657. package/dist/tools/scene-list-opened.js +8 -13
  658. package/dist/tools/scene-list-opened.js.map +1 -1
  659. package/dist/tools/scene-open.d.ts +40 -2
  660. package/dist/tools/scene-open.js +24 -43
  661. package/dist/tools/scene-open.js.map +1 -1
  662. package/dist/tools/scene-save.d.ts +40 -2
  663. package/dist/tools/scene-save.js +25 -38
  664. package/dist/tools/scene-save.js.map +1 -1
  665. package/dist/tools/scene-set-active.d.ts +40 -2
  666. package/dist/tools/scene-set-active.js +27 -39
  667. package/dist/tools/scene-set-active.js.map +1 -1
  668. package/dist/tools/scene-unload.d.ts +40 -2
  669. package/dist/tools/scene-unload.js +25 -38
  670. package/dist/tools/scene-unload.js.map +1 -1
  671. package/dist/tools/sceneview-get-camera.d.ts +40 -2
  672. package/dist/tools/sceneview-get-camera.js +7 -12
  673. package/dist/tools/sceneview-get-camera.js.map +1 -1
  674. package/dist/tools/sceneview-set-camera.d.ts +40 -2
  675. package/dist/tools/sceneview-set-camera.js +38 -50
  676. package/dist/tools/sceneview-set-camera.js.map +1 -1
  677. package/dist/tools/schema-fragments.d.ts +86 -0
  678. package/dist/tools/schema-fragments.js +119 -0
  679. package/dist/tools/schema-fragments.js.map +1 -0
  680. package/dist/tools/screenshot-camera.d.ts +40 -2
  681. package/dist/tools/screenshot-camera.js +47 -52
  682. package/dist/tools/screenshot-camera.js.map +1 -1
  683. package/dist/tools/screenshot-window.d.ts +40 -2
  684. package/dist/tools/screenshot-window.js +40 -45
  685. package/dist/tools/screenshot-window.js.map +1 -1
  686. package/dist/tools/screenshot.d.ts +40 -2
  687. package/dist/tools/screenshot.js +39 -44
  688. package/dist/tools/screenshot.js.map +1 -1
  689. package/dist/tools/script-delete.d.ts +40 -2
  690. package/dist/tools/script-delete.js +18 -30
  691. package/dist/tools/script-delete.js.map +1 -1
  692. package/dist/tools/script-read.d.ts +40 -2
  693. package/dist/tools/script-read.js +34 -39
  694. package/dist/tools/script-read.js.map +1 -1
  695. package/dist/tools/script-write.d.ts +40 -2
  696. package/dist/tools/script-write.js +37 -49
  697. package/dist/tools/script-write.js.map +1 -1
  698. package/dist/tools/scriptableobject-create.d.ts +40 -2
  699. package/dist/tools/scriptableobject-create.js +56 -68
  700. package/dist/tools/scriptableobject-create.js.map +1 -1
  701. package/dist/tools/search-assets.d.ts +40 -2
  702. package/dist/tools/search-assets.js +55 -60
  703. package/dist/tools/search-assets.js.map +1 -1
  704. package/dist/tools/selection-get.d.ts +40 -2
  705. package/dist/tools/selection-get.js +16 -21
  706. package/dist/tools/selection-get.js.map +1 -1
  707. package/dist/tools/selection-set.d.ts +40 -2
  708. package/dist/tools/selection-set.js +57 -62
  709. package/dist/tools/selection-set.js.map +1 -1
  710. package/dist/tools/settings-get-lighting.d.ts +40 -2
  711. package/dist/tools/settings-get-lighting.js +9 -14
  712. package/dist/tools/settings-get-lighting.js.map +1 -1
  713. package/dist/tools/settings-get-physics.d.ts +40 -2
  714. package/dist/tools/settings-get-physics.js +7 -12
  715. package/dist/tools/settings-get-physics.js.map +1 -1
  716. package/dist/tools/settings-get-player.d.ts +40 -2
  717. package/dist/tools/settings-get-player.js +7 -12
  718. package/dist/tools/settings-get-player.js.map +1 -1
  719. package/dist/tools/settings-get-quality.d.ts +40 -2
  720. package/dist/tools/settings-get-quality.js +7 -12
  721. package/dist/tools/settings-get-quality.js.map +1 -1
  722. package/dist/tools/settings-get-render-pipeline.d.ts +40 -2
  723. package/dist/tools/settings-get-render-pipeline.js +10 -15
  724. package/dist/tools/settings-get-render-pipeline.js.map +1 -1
  725. package/dist/tools/settings-get-time.d.ts +40 -2
  726. package/dist/tools/settings-get-time.js +9 -14
  727. package/dist/tools/settings-get-time.js.map +1 -1
  728. package/dist/tools/settings-set-lighting.d.ts +40 -2
  729. package/dist/tools/settings-set-lighting.js +33 -46
  730. package/dist/tools/settings-set-lighting.js.map +1 -1
  731. package/dist/tools/settings-set-physics.d.ts +40 -2
  732. package/dist/tools/settings-set-physics.js +30 -43
  733. package/dist/tools/settings-set-physics.js.map +1 -1
  734. package/dist/tools/settings-set-player.d.ts +40 -2
  735. package/dist/tools/settings-set-player.js +35 -53
  736. package/dist/tools/settings-set-player.js.map +1 -1
  737. package/dist/tools/settings-set-quality-level.d.ts +40 -2
  738. package/dist/tools/settings-set-quality-level.js +25 -38
  739. package/dist/tools/settings-set-quality-level.js.map +1 -1
  740. package/dist/tools/settings-set-quality.d.ts +40 -2
  741. package/dist/tools/settings-set-quality.js +29 -42
  742. package/dist/tools/settings-set-quality.js.map +1 -1
  743. package/dist/tools/settings-set-time.d.ts +40 -2
  744. package/dist/tools/settings-set-time.js +31 -44
  745. package/dist/tools/settings-set-time.js.map +1 -1
  746. package/dist/tools/shader-get-data.d.ts +40 -2
  747. package/dist/tools/shader-get-data.js +20 -25
  748. package/dist/tools/shader-get-data.js.map +1 -1
  749. package/dist/tools/shader-graph-create.d.ts +40 -2
  750. package/dist/tools/shader-graph-create.js +23 -32
  751. package/dist/tools/shader-graph-create.js.map +1 -1
  752. package/dist/tools/shader-graph-node-add.d.ts +40 -2
  753. package/dist/tools/shader-graph-node-add.js +34 -43
  754. package/dist/tools/shader-graph-node-add.js.map +1 -1
  755. package/dist/tools/shader-graph-node-connect.d.ts +40 -2
  756. package/dist/tools/shader-graph-node-connect.js +44 -53
  757. package/dist/tools/shader-graph-node-connect.js.map +1 -1
  758. package/dist/tools/shader-graph-open.d.ts +40 -2
  759. package/dist/tools/shader-graph-open.js +15 -20
  760. package/dist/tools/shader-graph-open.js.map +1 -1
  761. package/dist/tools/shader-list-all.d.ts +40 -2
  762. package/dist/tools/shader-list-all.js +12 -17
  763. package/dist/tools/shader-list-all.js.map +1 -1
  764. package/dist/tools/skybox-get.d.ts +40 -2
  765. package/dist/tools/skybox-get.js +5 -10
  766. package/dist/tools/skybox-get.js.map +1 -1
  767. package/dist/tools/skybox-set.d.ts +40 -2
  768. package/dist/tools/skybox-set.js +16 -27
  769. package/dist/tools/skybox-set.js.map +1 -1
  770. package/dist/tools/spatial-query.d.ts +40 -2
  771. package/dist/tools/spatial-query.js +110 -115
  772. package/dist/tools/spatial-query.js.map +1 -1
  773. package/dist/tools/splines-add-knot.d.ts +40 -2
  774. package/dist/tools/splines-add-knot.js +29 -38
  775. package/dist/tools/splines-add-knot.js.map +1 -1
  776. package/dist/tools/splines-container-create.d.ts +40 -2
  777. package/dist/tools/splines-container-create.js +23 -32
  778. package/dist/tools/splines-container-create.js.map +1 -1
  779. package/dist/tools/splines-evaluate.d.ts +40 -2
  780. package/dist/tools/splines-evaluate.js +21 -26
  781. package/dist/tools/splines-evaluate.js.map +1 -1
  782. package/dist/tools/splines-get-knots.d.ts +40 -2
  783. package/dist/tools/splines-get-knots.js +15 -20
  784. package/dist/tools/splines-get-knots.js.map +1 -1
  785. package/dist/tools/splines-modify.d.ts +40 -2
  786. package/dist/tools/splines-modify.js +20 -29
  787. package/dist/tools/splines-modify.js.map +1 -1
  788. package/dist/tools/splines-set-knot.d.ts +40 -2
  789. package/dist/tools/splines-set-knot.js +26 -35
  790. package/dist/tools/splines-set-knot.js.map +1 -1
  791. package/dist/tools/splines-set-tangent-mode.d.ts +40 -2
  792. package/dist/tools/splines-set-tangent-mode.js +28 -37
  793. package/dist/tools/splines-set-tangent-mode.js.map +1 -1
  794. package/dist/tools/spriteatlas-add-packable.d.ts +40 -2
  795. package/dist/tools/spriteatlas-add-packable.js +22 -34
  796. package/dist/tools/spriteatlas-add-packable.js.map +1 -1
  797. package/dist/tools/spriteatlas-create.d.ts +40 -2
  798. package/dist/tools/spriteatlas-create.js +22 -34
  799. package/dist/tools/spriteatlas-create.js.map +1 -1
  800. package/dist/tools/spriteatlas-delete.d.ts +40 -2
  801. package/dist/tools/spriteatlas-delete.js +14 -26
  802. package/dist/tools/spriteatlas-delete.js.map +1 -1
  803. package/dist/tools/spriteatlas-get.d.ts +40 -2
  804. package/dist/tools/spriteatlas-get.js +13 -18
  805. package/dist/tools/spriteatlas-get.js.map +1 -1
  806. package/dist/tools/spriteatlas-list.d.ts +40 -2
  807. package/dist/tools/spriteatlas-list.js +10 -15
  808. package/dist/tools/spriteatlas-list.js.map +1 -1
  809. package/dist/tools/spriteatlas-modify.d.ts +40 -2
  810. package/dist/tools/spriteatlas-modify.js +36 -48
  811. package/dist/tools/spriteatlas-modify.js.map +1 -1
  812. package/dist/tools/spriteatlas-remove-packable.d.ts +40 -2
  813. package/dist/tools/spriteatlas-remove-packable.js +21 -33
  814. package/dist/tools/spriteatlas-remove-packable.js.map +1 -1
  815. package/dist/tools/terrain-create.d.ts +40 -2
  816. package/dist/tools/terrain-create.js +48 -62
  817. package/dist/tools/terrain-create.js.map +1 -1
  818. package/dist/tools/terrain-paint-layer.d.ts +40 -2
  819. package/dist/tools/terrain-paint-layer.js +47 -61
  820. package/dist/tools/terrain-paint-layer.js.map +1 -1
  821. package/dist/tools/terrain-place-trees.d.ts +40 -2
  822. package/dist/tools/terrain-place-trees.js +56 -68
  823. package/dist/tools/terrain-place-trees.js.map +1 -1
  824. package/dist/tools/terrain-set-heights.d.ts +40 -2
  825. package/dist/tools/terrain-set-heights.js +31 -43
  826. package/dist/tools/terrain-set-heights.js.map +1 -1
  827. package/dist/tools/terrain-set-neighbors.d.ts +40 -2
  828. package/dist/tools/terrain-set-neighbors.js +22 -34
  829. package/dist/tools/terrain-set-neighbors.js.map +1 -1
  830. package/dist/tools/texture-get-importer.d.ts +40 -2
  831. package/dist/tools/texture-get-importer.js +15 -20
  832. package/dist/tools/texture-get-importer.js.map +1 -1
  833. package/dist/tools/texture-get.d.ts +40 -2
  834. package/dist/tools/texture-get.js +12 -17
  835. package/dist/tools/texture-get.js.map +1 -1
  836. package/dist/tools/texture-reimport.d.ts +40 -2
  837. package/dist/tools/texture-reimport.js +15 -27
  838. package/dist/tools/texture-reimport.js.map +1 -1
  839. package/dist/tools/texture-set-import.d.ts +40 -2
  840. package/dist/tools/texture-set-import.js +32 -44
  841. package/dist/tools/texture-set-import.js.map +1 -1
  842. package/dist/tools/tilemap-box-fill.d.ts +40 -2
  843. package/dist/tools/tilemap-box-fill.js +20 -29
  844. package/dist/tools/tilemap-box-fill.js.map +1 -1
  845. package/dist/tools/tilemap-create-rule-tile.d.ts +40 -2
  846. package/dist/tools/tilemap-create-rule-tile.js +22 -31
  847. package/dist/tools/tilemap-create-rule-tile.js.map +1 -1
  848. package/dist/tools/tilemap-create-tile-asset.d.ts +40 -2
  849. package/dist/tools/tilemap-create-tile-asset.js +21 -30
  850. package/dist/tools/tilemap-create-tile-asset.js.map +1 -1
  851. package/dist/tools/tilemap-create.d.ts +40 -2
  852. package/dist/tools/tilemap-create.js +17 -26
  853. package/dist/tools/tilemap-create.js.map +1 -1
  854. package/dist/tools/tilemap-set-tile.d.ts +40 -2
  855. package/dist/tools/tilemap-set-tile.js +20 -29
  856. package/dist/tools/tilemap-set-tile.js.map +1 -1
  857. package/dist/tools/timeline-clip-add.d.ts +40 -2
  858. package/dist/tools/timeline-clip-add.js +30 -39
  859. package/dist/tools/timeline-clip-add.js.map +1 -1
  860. package/dist/tools/timeline-create.d.ts +40 -2
  861. package/dist/tools/timeline-create.js +17 -26
  862. package/dist/tools/timeline-create.js.map +1 -1
  863. package/dist/tools/timeline-director-bind.d.ts +40 -2
  864. package/dist/tools/timeline-director-bind.js +20 -29
  865. package/dist/tools/timeline-director-bind.js.map +1 -1
  866. package/dist/tools/timeline-modify.d.ts +40 -2
  867. package/dist/tools/timeline-modify.js +30 -39
  868. package/dist/tools/timeline-modify.js.map +1 -1
  869. package/dist/tools/timeline-track-add.d.ts +40 -2
  870. package/dist/tools/timeline-track-add.js +24 -33
  871. package/dist/tools/timeline-track-add.js.map +1 -1
  872. package/dist/tools/type-schema.d.ts +40 -2
  873. package/dist/tools/type-schema.js +47 -52
  874. package/dist/tools/type-schema.js.map +1 -1
  875. package/dist/tools/ui-canvas-add.d.ts +40 -2
  876. package/dist/tools/ui-canvas-add.js +29 -41
  877. package/dist/tools/ui-canvas-add.js.map +1 -1
  878. package/dist/tools/ui-element-add.d.ts +40 -2
  879. package/dist/tools/ui-element-add.js +47 -56
  880. package/dist/tools/ui-element-add.js.map +1 -1
  881. package/dist/tools/ui-element-modify.d.ts +40 -2
  882. package/dist/tools/ui-element-modify.js +41 -50
  883. package/dist/tools/ui-element-modify.js.map +1 -1
  884. package/dist/tools/ui-layout-group-add.d.ts +40 -2
  885. package/dist/tools/ui-layout-group-add.js +64 -73
  886. package/dist/tools/ui-layout-group-add.js.map +1 -1
  887. package/dist/tools/validate-edit.d.ts +40 -2
  888. package/dist/tools/validate-edit.js +56 -61
  889. package/dist/tools/validate-edit.js.map +1 -1
  890. package/dist/tools/vfx-block-edit.d.ts +40 -2
  891. package/dist/tools/vfx-block-edit.js +32 -41
  892. package/dist/tools/vfx-block-edit.js.map +1 -1
  893. package/dist/tools/vfx-list.d.ts +40 -2
  894. package/dist/tools/vfx-list.js +17 -22
  895. package/dist/tools/vfx-list.js.map +1 -1
  896. package/dist/tools/vfx-open.d.ts +40 -2
  897. package/dist/tools/vfx-open.js +14 -19
  898. package/dist/tools/vfx-open.js.map +1 -1
  899. package/package.json +1 -1
@@ -1,5 +1,6 @@
1
+ import { BridgeToolsCache } from "./bridge-tools-cache.js";
1
2
  import { deriveIsError } from "./gate-error.js";
2
- import { existsSync, readFileSync, readdirSync, statSync, unlinkSync } from "node:fs";
3
+ import { readFileSync, readdirSync, statSync, unlinkSync } from "node:fs";
3
4
  import { join } from "node:path";
4
5
  import { pollAndDismissDialogs, readDismissConfig, } from "./dialog-dismiss.js";
5
6
  import { readInstanceLock, classifyInstance, lockPath, isPidAlive, statusDir, hasRecentPendingTestRun } from "./instance-discovery.js";
@@ -53,6 +54,39 @@ const DIRECT_RESPONSE_TOOLS = new Set([
53
54
  "unity_senses_profiler_rendering",
54
55
  "unity_senses_spatial_query",
55
56
  ]);
57
+ // M4 — compile-reload tools whose PURPOSE is to trigger or observe a domain
58
+ // reload, so a no-op compile is a meaningful signal worth annotating. This is
59
+ // the annotation target set; it is a strict subset of the lifecycle
60
+ // `compile-reload` class (capabilities/lifecycle.ts). The three "invoke
61
+ // arbitrary code" tools — execute_csharp, invoke_method, execute_menu — are
62
+ // deliberately EXCLUDED: they are classified `compile-reload` on the recovery
63
+ // axis (the invoked code *can* trigger a reload), but most invocations
64
+ // compile nothing, so the no-op detector fired a false `compile_noop` on
65
+ // every such call (e.g. `execute_csharp {code:"return 42;"}` came back
66
+ // carrying a "force a rebuild" recommendation). scene_open is also excluded:
67
+ // its reload concern is unsaved-scene loss, not a script compile.
68
+ const COMPILE_RELOAD_ANNOTATION_TOOLS = new Set([
69
+ "unity_open_mcp_asmdef_create",
70
+ "unity_open_mcp_asmdef_modify",
71
+ "unity_open_mcp_script_write",
72
+ "unity_open_mcp_script_delete",
73
+ "unity_open_mcp_build_set_target",
74
+ "unity_open_mcp_build_set_defines",
75
+ "unity_open_mcp_settings_set_player",
76
+ "unity_open_mcp_package_add",
77
+ "unity_open_mcp_package_remove",
78
+ "unity_open_mcp_reimport_package",
79
+ "unity_open_mcp_compile_check",
80
+ ]);
81
+ /**
82
+ * M4 — should the compile-verify annotation run for this tool? Returns true
83
+ * only for compile-reload tools that reliably trigger (or observe) a domain
84
+ * reload, so the no-op detector is not handed a trivially-unchanged snapshot
85
+ * for tools whose normal success involves no recompile.
86
+ */
87
+ function shouldAnnotateCompileVerify(toolName) {
88
+ return COMPILE_RELOAD_ANNOTATION_TOOLS.has(toolName);
89
+ }
56
90
  function sleep(ms) {
57
91
  return new Promise((resolve) => setTimeout(resolve, ms));
58
92
  }
@@ -130,6 +164,14 @@ function buildOfflineHint(projectPath) {
130
164
  export class LiveClient {
131
165
  baseUrl;
132
166
  pingCache;
167
+ /**
168
+ * M31-optimizations Plan 1 / M3 — short-TTL cache for the compiled-state
169
+ * tool inventory (`GET /tools`). The compiled-tool set changes only on a
170
+ * bridge recompile, but the meta-tools re-fetched it per call. Invalidated
171
+ * from the same lifecycle hooks as PingCache (handleTransientOffline,
172
+ * waitForCompile settle) so a reload or compile is observed promptly.
173
+ */
174
+ bridgeToolsCache;
133
175
  dismissEnabled;
134
176
  dismissTimeoutMs;
135
177
  dismissIntervalMs;
@@ -176,11 +218,22 @@ export class LiveClient {
176
218
  constructor(port, pingCache, authToken, projectPath, agentId = PROCESS_AGENT_ID, envPort) {
177
219
  this.baseUrl = bridgeBaseUrl(port);
178
220
  this.pingCache = pingCache;
221
+ this.bridgeToolsCache = new BridgeToolsCache();
179
222
  this.authToken = authToken;
180
223
  this.projectPath = projectPath;
181
224
  this.retry = readRetryTunables();
182
225
  this.agentId = agentId;
183
- this.envPort = envPort;
226
+ // A port of 0 / negative / non-integer is not a real env override. Treating
227
+ // 0 as authoritative would permanently disable the mid-session endpoint
228
+ // refresh that re-points at a restarted Unity bridge (refreshEndpointFromLock
229
+ // bails when envPort is a number). Normalize those to undefined so the
230
+ // lock-driven self-healing path stays live. getEnv() already filters this,
231
+ // but the client is the contract owner and is also reached by per-request
232
+ // port overrides, so defend here too.
233
+ this.envPort =
234
+ typeof envPort === "number" && Number.isInteger(envPort) && envPort >= 1
235
+ ? envPort
236
+ : undefined;
184
237
  // M13 T4.5 + M23 Plan 2 — startup dialog auto-dismissal. Resolved once at
185
238
  // construction; the env vars do not change mid-process. The feature is
186
239
  // enabled by default and runs concurrently with every compile/bridge
@@ -217,9 +270,9 @@ export class LiveClient {
217
270
  console.warn(result.message);
218
271
  }
219
272
  }
220
- async isLiveAvailable() {
273
+ async isLiveAvailable(fetchTimeoutMs) {
221
274
  try {
222
- const res = await this.fetchWithTimeout("/ping", { method: "GET" });
275
+ const res = await this.fetchWithTimeout("/ping", { method: "GET" }, fetchTimeoutMs);
223
276
  if (res.status === 503)
224
277
  return true;
225
278
  if (!res.ok)
@@ -233,6 +286,15 @@ export class LiveClient {
233
286
  return false;
234
287
  }
235
288
  }
289
+ /**
290
+ * M14 — return the most recent cached /ping snapshot (any age), or null when
291
+ * no successful probe has populated the cache. Used by the CLI ping poller
292
+ * so a single {@link isLiveAvailable} probe answers BOTH "is it up?" and
293
+ * "what's its state?" without a second `/ping` round-trip per poll.
294
+ */
295
+ getCachedPing() {
296
+ return this.pingCache.get();
297
+ }
236
298
  async route(toolName, args) {
237
299
  if (toolName === "unity_open_mcp_ping") {
238
300
  return this.handlePing();
@@ -245,6 +307,37 @@ export class LiveClient {
245
307
  async handlePing() {
246
308
  try {
247
309
  const res = await this.fetchWithTimeout("/ping", { method: "GET" });
310
+ // L3 — mirror ensureReady's status discipline. A 503 is the bridge's
311
+ // "compiling / listener starting" signal (non-JSON body): report it as
312
+ // compiling, never as a generic offline or a successful ping. A non-OK
313
+ // status (401/500/…) must not be parsed as PingResponse and cached — the
314
+ // error body would set `connected`/`compiling` to undefined and be
315
+ // reported as isError:false on later cache hits. Only a 2xx carries a
316
+ // valid PingResponse worth recording.
317
+ if (res.status === 503) {
318
+ return makeErrorResult({
319
+ code: "compiling",
320
+ message: `Bridge at ${this.baseUrl} is compiling / restarting its listener (HTTP 503).`,
321
+ detail: {
322
+ error: {
323
+ code: "compiling",
324
+ message: "Bridge listener is not ready (HTTP 503).",
325
+ },
326
+ },
327
+ });
328
+ }
329
+ if (!res.ok) {
330
+ return makeErrorResult({
331
+ code: "bridge_error",
332
+ message: `Bridge /ping returned unexpected HTTP ${res.status}.`,
333
+ detail: {
334
+ error: {
335
+ code: "bridge_error",
336
+ message: `HTTP ${res.status}`,
337
+ },
338
+ },
339
+ });
340
+ }
248
341
  const body = await res.json();
249
342
  this.pingCache.record(body);
250
343
  this.maybeWarnCompat(body.bridgeVersion);
@@ -285,10 +378,21 @@ export class LiveClient {
285
378
  // so the post-call detectCompileVerify() can flag a no-op/stale compile.
286
379
  // Non-compile-reload tools skip this entirely (no extra /tools round-trip,
287
380
  // no fs scan). The annotation is additive: it never blocks a success.
381
+ //
382
+ // M4 — gate the annotation on tools that RELIABLY trigger a domain reload,
383
+ // not on the lifecycle class. `execute_csharp` / `invoke_method` /
384
+ // `execute_menu` are classified `compile-reload` (the recovery axis: they
385
+ // *can* trigger a reload if the invoked code does) but most invocations
386
+ // compile nothing, so `countUnchanged && dllDidNotAdvance` is trivially
387
+ // true and every such call came back carrying a false `compile_noop`
388
+ // warning that told the agent to "force a rebuild" after `return 42;`.
389
+ // The set below is the subset of compile-reload tools whose PURPOSE is to
390
+ // trigger or observe a recompile; see `shouldAnnotateCompileVerify`.
288
391
  const isCompileReload = lifecycleFor(toolName).class === "compile-reload";
289
- const before = isCompileReload ? await this.captureCompileSnapshot() : null;
392
+ const annotate = isCompileReload && shouldAnnotateCompileVerify(toolName);
393
+ const before = annotate ? await this.captureCompileSnapshot() : null;
290
394
  const result = await this.postTool(toolName, args, true);
291
- if (isCompileReload && !result.isError && before !== null) {
395
+ if (annotate && !result.isError && before !== null) {
292
396
  return this.annotateCompileVerify(toolName, result, before, args);
293
397
  }
294
398
  return result;
@@ -325,38 +429,128 @@ export class LiveClient {
325
429
  const minIntervalMs = 250;
326
430
  const maxIntervalMs = 1_000;
327
431
  const resultsPath = join(statusDir(), `test-results-${runId}.json`);
432
+ // M9 (round-2 review) — read the results file atomically. The bridge writes
433
+ // it with a plain `File.WriteAllText` (TestRunnerService.cs:104), which is
434
+ // NOT atomic: a poll landing mid-write observes a partial/truncated body.
435
+ // The previous implementation did `existsSync` → `readFileSync` →
436
+ // `unlinkSync` in one shot, so a mid-write read produced unparseable JSON
437
+ // that was reported as a bogus failure AND deleted (the only copy of the
438
+ // results). To avoid that, require the file's size + mtime to be STABLE
439
+ // across two probes before consuming it, and NEVER unlink a body that
440
+ // failed to parse — leave it for the next poll (it may still be growing).
441
+ // `mtimeMs` granularity is platform-dependent (ms on most FSes, 100ns on
442
+ // NTFS), so size is the primary signal and mtime is the tiebreaker; two
443
+ // equal `{size, mtimeMs}` snapshots mean no writes landed between them.
444
+ let prevSnapshot = null;
445
+ // B-N25 — extract the "read + parse + unlink" consume step so it can run
446
+ // BOTH inside the stability-gated loop AND once more after the loop. The
447
+ // stability gate requires two identical probes, so the file is consumed
448
+ // one poll interval (250 ms – 1 s) AFTER it is first observed. If the
449
+ // results land inside that last interval before `deadline`, the loop
450
+ // exits and used to return `test_results_timeout` even though a complete
451
+ // parseable result was on disk (and since the consume is the only thing
452
+ // that unlinks, the file was left for the next run to trip over). The
453
+ // post-loop attempt is a last-chance read with NO stability requirement —
454
+ // the deadline has passed, so a final single-shot parse is strictly
455
+ // better than declaring a timeout with a result on disk. Returns the
456
+ // CallToolResult on a successful parse, or null to keep polling / fall
457
+ // through to the timeout. `requireStable` gates whether the two-probe
458
+ // stability check must pass first.
459
+ const consumeIfReady = (snapshot, requireStable) => {
460
+ if (snapshot === null)
461
+ return null;
462
+ if (requireStable) {
463
+ const stable = prevSnapshot !== null &&
464
+ prevSnapshot.size === snapshot.size &&
465
+ prevSnapshot.mtimeMs === snapshot.mtimeMs;
466
+ if (!stable)
467
+ return null;
468
+ }
469
+ // Two consecutive identical probes (or the post-loop last chance) → the
470
+ // bridge has finished writing. Read, then unlink ONLY on a successful
471
+ // parse so a truncated body is retried on the next iteration instead of
472
+ // being destroyed.
473
+ let content;
474
+ try {
475
+ content = readFileSync(resultsPath, "utf-8");
476
+ }
477
+ catch {
478
+ // readFileSync threw (e.g. file deleted between stat and read) —
479
+ // reset the baseline so the next poll re-establishes it.
480
+ prevSnapshot = null;
481
+ return null;
482
+ }
483
+ let isError = false;
484
+ try {
485
+ const parsed = JSON.parse(content);
486
+ isError = parsed.status === "error";
487
+ }
488
+ catch {
489
+ // Unparseable → the read raced a writer despite the stability check
490
+ // (rare, e.g. a size match on a still-flushing FS). Do NOT delete:
491
+ // the next poll re-reads once the writer is done.
492
+ prevSnapshot = null;
493
+ return null;
494
+ }
495
+ try {
496
+ unlinkSync(resultsPath);
497
+ }
498
+ catch {
499
+ // best-effort cleanup — the result is already in hand
500
+ }
501
+ prevSnapshot = null;
502
+ return {
503
+ content: [{ type: "text", text: content }],
504
+ isError,
505
+ };
506
+ };
328
507
  let intervalMs = minIntervalMs;
329
508
  while (Date.now() < deadline) {
509
+ let snapshot = null;
330
510
  try {
331
- if (existsSync(resultsPath)) {
332
- const content = readFileSync(resultsPath, "utf-8");
333
- try {
334
- unlinkSync(resultsPath);
335
- }
336
- catch {
337
- // best-effort cleanup
338
- }
339
- let isError = false;
340
- try {
341
- const parsed = JSON.parse(content);
342
- isError = parsed.status === "error";
343
- }
344
- catch {
345
- // unparseable → treat as error
346
- isError = true;
347
- }
348
- return {
349
- content: [{ type: "text", text: content }],
350
- isError,
351
- };
352
- }
511
+ const st = statSync(resultsPath);
512
+ snapshot = { size: st.size, mtimeMs: st.mtimeMs };
353
513
  }
354
514
  catch {
355
- // continue polling
515
+ // File does not exist yet (or vanished between stat and read) — reset
516
+ // the stability tracker so a brand-new file gets a fresh two-probe
517
+ // window rather than inheriting a stale snapshot.
518
+ snapshot = null;
519
+ prevSnapshot = null;
520
+ }
521
+ if (snapshot !== null) {
522
+ const consumed = consumeIfReady(snapshot, true);
523
+ if (consumed)
524
+ return consumed;
525
+ // Not yet stable → first sighting of this file, or it changed since
526
+ // the last probe. B-R2 — refresh the baseline to THIS probe
527
+ // unconditionally: stability means two CONSECUTIVE identical probes.
528
+ // Pinning the first-ever snapshot (a `=== null` guard here) meant one
529
+ // mid-write probe poisoned the baseline forever and the poll burned
530
+ // the full timeout, rescued only by the post-loop unstable read.
531
+ prevSnapshot = snapshot;
356
532
  }
357
533
  await sleep(intervalMs);
358
534
  intervalMs = Math.min(intervalMs * 2, maxIntervalMs);
359
535
  }
536
+ // B-N25 — one final last-chance read after the loop. The stability gate
537
+ // consumes the file one interval after it first appears, so a result that
538
+ // lands in the final interval used to time out with a parseable file on
539
+ // disk (and left there for the next run). The deadline has already
540
+ // passed, so a single-shot parse with no stability requirement is
541
+ // strictly better than the timeout below: a complete result is returned,
542
+ // and only a genuinely missing/incomplete file falls through to the
543
+ // timeout error.
544
+ try {
545
+ const st = statSync(resultsPath);
546
+ const finalSnapshot = { size: st.size, mtimeMs: st.mtimeMs };
547
+ const consumed = consumeIfReady(finalSnapshot, false);
548
+ if (consumed)
549
+ return consumed;
550
+ }
551
+ catch {
552
+ // File is genuinely absent — fall through to the timeout.
553
+ }
360
554
  return makeErrorResult({
361
555
  code: "test_results_timeout",
362
556
  message: `Test results for run ${runId} were not available within ` +
@@ -384,19 +578,30 @@ export class LiveClient {
384
578
  * recovers (re-syncing the endpoint, waiting out a reload, or surfacing
385
579
  * the structured offline/dead-bridge error) and re-POSTs only when safe.
386
580
  *
387
- * The retry/compile contract is unchanged from the former monolithic body.
581
+ * The retry/compile contract is unchanged from the former monolithic body
582
+ * EXCEPT for the recursion bound added in M10 (round-2 review): `attempt`
583
+ * counts the POST tries so the postTool → handlePostFailure → postTool loop
584
+ * cannot run forever. `shouldRetryPostAfterFailure` returns true for every
585
+ * `TypeError`, so if POSTs keep failing at the socket level while `/ping`
586
+ * answers during recovery, the previous code re-POSTed the mutation each pass
587
+ * with no depth limit. The bound is `this.retry.transientRetryAttempts + 1`
588
+ * (1 initial attempt + N retries), matching the documented RETRY_CONFIG
589
+ * semantics; once exhausted the offline error is surfaced instead of recursing.
388
590
  */
389
- async postTool(toolName, args, retryOn503) {
591
+ async postTool(toolName, args, retryOn503, attempt = 1) {
390
592
  try {
391
593
  const res = await this.postToolFetch(toolName, args, retryOn503);
392
- // 503 + compile settled cleanly → re-POST once without 503 retry.
594
+ // 503 + compile settled cleanly → re-POST once without 503 retry. This is
595
+ // a deliberate single re-dispatch (retryOn503 flips to false, so a second
596
+ // 503 surfaces the error), but it still counts as a POST attempt for the
597
+ // recursion bound.
393
598
  if (isCompileRepostSentinel(res)) {
394
- return this.postTool(toolName, args, false);
599
+ return this.postTool(toolName, args, false, attempt + 1);
395
600
  }
396
601
  return res;
397
602
  }
398
603
  catch (err) {
399
- return this.handlePostFailure(toolName, args, err, retryOn503);
604
+ return this.handlePostFailure(toolName, args, err, retryOn503, attempt);
400
605
  }
401
606
  }
402
607
  /**
@@ -636,16 +841,34 @@ export class LiveClient {
636
841
  * when the endpoint is unchanged the same live bridge is still processing —
637
842
  * or has queued — the original POST's Work; re-POSTing would run the mutation
638
843
  * a second time. In that case surface the timeout instead of retrying.
844
+ *
845
+ * M10 (round-2 review) — `attempt` is the 1-based POST attempt counter. When
846
+ * it exceeds the configured retry budget (`this.retry.transientRetryAttempts`
847
+ * retries beyond the initial attempt) the offline error is surfaced instead
848
+ * of recursing. Without this bound `shouldRetryPostAfterFailure` returning
849
+ * true for every `TypeError` made the loop unbounded: POSTs failing at the
850
+ * socket level while `/ping` answers during recovery re-POSTed the mutation
851
+ * each pass forever. The recovery probe inside `handleTransientOffline` is
852
+ * itself bounded (`transientRetryAttempts` iterations of `/ping`); this outer
853
+ * bound caps how many times we re-enter that recovery + re-POST cycle.
639
854
  */
640
- async handlePostFailure(toolName, args, err, retryOn503) {
855
+ async handlePostFailure(toolName, args, err, retryOn503, attempt) {
641
856
  const endpointBefore = this.baseUrl;
642
857
  const recovered = await this.handleTransientOffline("post");
643
858
  if (recovered !== null)
644
859
  return recovered;
645
860
  const endpointChanged = this.baseUrl !== endpointBefore;
646
- if (shouldRetryPostAfterFailure(err, endpointChanged)) {
647
- return this.postTool(toolName, args, retryOn503);
861
+ // M10 — bound the postTool → handlePostFailure → postTool recursion. The
862
+ // budget is the initial attempt plus the configured transient retry count.
863
+ const maxAttempts = 1 + this.retry.transientRetryAttempts;
864
+ const attemptsExhausted = attempt >= maxAttempts;
865
+ if (!attemptsExhausted &&
866
+ shouldRetryPostAfterFailure(err, endpointChanged)) {
867
+ return this.postTool(toolName, args, retryOn503, attempt + 1);
648
868
  }
869
+ const exhaustedNote = attemptsExhausted
870
+ ? ` The POST retry budget (${maxAttempts} attempt${maxAttempts === 1 ? "" : "s"}) was exhausted after ${attempt} attempt${attempt === 1 ? "" : "s"}; the bridge is reachable by /ping but POSTs keep failing.`
871
+ : "";
649
872
  return makeErrorResult({
650
873
  code: "bridge_offline",
651
874
  message: `Tool '${toolName}' did not return from the bridge within the client ` +
@@ -654,7 +877,7 @@ export class LiveClient {
654
877
  `the request was NOT retried — re-POSTing would risk running the ` +
655
878
  `mutation twice on the same bridge. If the editor was briefly slow ` +
656
879
  `(unfocused, GC, a long main-thread op), the original call may still ` +
657
- `complete there; verify the effect before retrying. Endpoint: ${this.baseUrl}.`,
880
+ `complete there; verify the effect before retrying. Endpoint: ${this.baseUrl}.${exhaustedNote}`,
658
881
  detail: {
659
882
  error: {
660
883
  code: "bridge_offline",
@@ -664,6 +887,18 @@ export class LiveClient {
664
887
  });
665
888
  }
666
889
  async ensureReady() {
890
+ // M31-optimizations Plan 1 / H1 — short-circuit the pre-flight probe when
891
+ // the PingCache has a fresh-enough ready snapshot (connected && !compiling
892
+ // && within TTL). The cache is updated on every successful /ping, every
893
+ // waitForCompile poll, and every isLiveAvailable call, so a burst of tool
894
+ // calls within the TTL collapses to zero extra probes. A `compiling` or
895
+ // disconnected snapshot forces a fresh probe (never short-circuit those),
896
+ // and the POST path's 503 / handleTransientOffline handling is unchanged
897
+ // when a cache hit turns out to be stale — the worst case is the existing
898
+ // network-probe path.
899
+ if (this.pingCache.fresh() !== null) {
900
+ return null;
901
+ }
667
902
  try {
668
903
  const res = await this.fetchWithTimeout("/ping", { method: "GET" });
669
904
  if (res.status === 503) {
@@ -780,6 +1015,13 @@ export class LiveClient {
780
1015
  // entry 4A). refreshEndpointFromLock is a no-op when an env-port override
781
1016
  // is in force or nothing has changed.
782
1017
  this.refreshEndpointFromLock();
1018
+ // M31-optimizations Plan 1 / M3 — a transient-offline signal means the
1019
+ // bridge may have recompiled or moved endpoints, so the cached tool
1020
+ // inventory is no longer trustworthy. Drop it; the next listBridgeTools
1021
+ // call refetches even within the TTL. (The ping-cache short-circuit in
1022
+ // ensureReady already probes fresh after a transient failure, so the two
1023
+ // caches stay consistent.)
1024
+ this.bridgeToolsCache.invalidate();
783
1025
  // Dead bridge assembly — not recoverable by waiting. Fail fast so the
784
1026
  // agent can fetch compile errors instead of hanging on /ping.
785
1027
  const deadBridge = this.deadBridgeResult();
@@ -873,7 +1115,7 @@ export class LiveClient {
873
1115
  refreshEndpointFromLock() {
874
1116
  if (!this.projectPath)
875
1117
  return false;
876
- if (typeof this.envPort === "number")
1118
+ if (this.envPort !== undefined)
877
1119
  return false; // env override wins
878
1120
  let lock;
879
1121
  try {
@@ -1069,8 +1311,14 @@ export class LiveClient {
1069
1311
  if (!res.ok)
1070
1312
  continue;
1071
1313
  const body = (await res.json());
1072
- if (!body.compiling && body.connected)
1314
+ if (!body.compiling && body.connected) {
1315
+ // M31-optimizations Plan 1 / M3 — a compile settle means the
1316
+ // bridge recompiled, so its tool inventory likely changed (new /
1317
+ // removed scripts, asmdef edits, package_add/remove, …). Drop the
1318
+ // cache so the next listBridgeTools refetches the fresh set.
1319
+ this.bridgeToolsCache.invalidate();
1073
1320
  return null;
1321
+ }
1074
1322
  }
1075
1323
  catch {
1076
1324
  // Network failure during the poll — normal during a domain reload
@@ -1148,11 +1396,33 @@ export class LiveClient {
1148
1396
  * group availability in `unity_open_mcp_capabilities` and
1149
1397
  * `unity_open_mcp_manage_tools(list_groups)`.
1150
1398
  *
1399
+ * M31-optimizations Plan 1 / M3 — backed by a short-TTL session cache. A
1400
+ * second meta-tool call within the TTL reuses the cached inventory instead
1401
+ * of re-issuing `GET /tools`. The cache is invalidated on dead-bridge /
1402
+ * reload detection ({@link handleTransientOffline}) and on a compile settle
1403
+ * ({@link waitForCompile} exit), so a recompile is observed promptly.
1404
+ *
1151
1405
  * Returns null when the bridge is unreachable or the response is malformed
1152
1406
  * — callers fall back to `available: null` (unknown) so the agent is
1153
1407
  * directed at manage_tools when the bridge comes back up.
1154
1408
  */
1155
1409
  async listBridgeTools() {
1410
+ const cached = this.bridgeToolsCache.get();
1411
+ if (cached !== null)
1412
+ return cached;
1413
+ const fresh = await this.fetchBridgeToolsNow();
1414
+ if (fresh !== null)
1415
+ this.bridgeToolsCache.record(fresh);
1416
+ return fresh;
1417
+ }
1418
+ /**
1419
+ * Fetch the bridge inventory RIGHT NOW, bypassing the TTL cache. Used by
1420
+ * {@link captureCompileSnapshot}, which needs the *actual* post-recompile
1421
+ * tool count to detect a no-op vs. real compile (a cached count would mask
1422
+ * the delta the detector is built around). Also the underlying fetch for
1423
+ * {@link listBridgeTools} when the cache is empty/expired.
1424
+ */
1425
+ async fetchBridgeToolsNow() {
1156
1426
  try {
1157
1427
  const res = await this.fetchWithTimeout("/tools", { method: "GET" }, 5_000);
1158
1428
  if (!res.ok)
@@ -1185,7 +1455,10 @@ export class LiveClient {
1185
1455
  async captureCompileSnapshot() {
1186
1456
  const snap = {};
1187
1457
  try {
1188
- const inventory = await this.listBridgeTools();
1458
+ // Bypass the TTL cache — the compile-verify detector compares before/
1459
+ // after tool counts to flag a no-op vs. real compile, so a cached count
1460
+ // would mask the very delta the detector is built around.
1461
+ const inventory = await this.fetchBridgeToolsNow();
1189
1462
  if (inventory)
1190
1463
  snap.bridgeToolCount = inventory.tools.size;
1191
1464
  }
@@ -1268,6 +1541,58 @@ export class LiveClient {
1268
1541
  fetchWithTimeout(path, init, timeoutMs = PING_TIMEOUT_MS) {
1269
1542
  const controller = new AbortController();
1270
1543
  const timer = setTimeout(() => controller.abort(), timeoutMs);
1544
+ // M11 — the abort timer must cover the BODY read, not just the headers.
1545
+ // Previously `.finally(() => clearTimeout(timer))` cleared the timer as
1546
+ // soon as `fetch()` resolved (headers arrived), so every later
1547
+ // `res.text()`/`res.json()` ran with no deadline: an Editor that flushed
1548
+ // the headers then froze stalled until undici's 300s body timeout.
1549
+ //
1550
+ // The timer is now cleared only once the body is consumed. Rather than
1551
+ // tee/observe the stream (which can deadlock when a caller never drains
1552
+ // the body), we wrap the Response's `text`/`json`/`arrayBuffer` accessors
1553
+ // so the timer is cleared as part of the body-read promise the caller
1554
+ // already awaits. `disposed` guards against double-clear.
1555
+ //
1556
+ // B-N1 — a pending `setTimeout` is a live libuv handle that keeps Node's
1557
+ // event loop alive. Every status-only return path (the caller inspects the
1558
+ // response and returns without reading the body) left the abort timer
1559
+ // armed for the full `timeoutMs` (40 s minimum on the POST path), so
1560
+ // `npm test` printed all subtests as `ok` then never reached the `# tests`
1561
+ // summary — CI hung. The accessor wrappers alone cannot fix this because a
1562
+ // caller that never touches the body never triggers them. Arm a short
1563
+ // fallback `claimTimer` (unref'd so it never pins the loop on its own):
1564
+ // if the body is read within the grace window, `bodyClaimed` flips and the
1565
+ // fallback becomes a no-op (the abort timer stays armed to protect the
1566
+ // in-progress read); if the body is never claimed, the fallback fires and
1567
+ // disposes, releasing the abort timer's loop handle. The abort timer
1568
+ // itself is NOT unref'd — it must still fire to abort a genuinely stalled
1569
+ // request while the process is alive (the in-progress socket keeps the
1570
+ // loop alive in that case, so the abort lands).
1571
+ //
1572
+ // A-R1 — the claim timer is armed inside the fetch *fulfilled* handler
1573
+ // (below, next to the accessor wrappers), NOT here at request creation.
1574
+ // `bodyClaimed` can only flip once the Response exists, so an
1575
+ // arm-at-creation timer fired before the headers arrived on any request
1576
+ // slower than 100 ms and disposed the abort timer — disabling every fetch
1577
+ // timeout exactly in the hung-Editor cases it exists for. Arming after
1578
+ // the headers arrive means the grace window starts when the caller can
1579
+ // first claim the body; until then the abort timer alone bounds the
1580
+ // headers phase. On fetch rejection no claim timer was ever armed and the
1581
+ // rejection handler disposes the abort timer directly.
1582
+ let disposed = false;
1583
+ let bodyClaimed = false;
1584
+ let claimTimer;
1585
+ const dispose = () => {
1586
+ if (disposed)
1587
+ return;
1588
+ disposed = true;
1589
+ clearTimeout(timer);
1590
+ if (claimTimer !== undefined)
1591
+ clearTimeout(claimTimer);
1592
+ };
1593
+ const markBodyClaimed = () => {
1594
+ bodyClaimed = true;
1595
+ };
1271
1596
  // M14 — attach the bearer token to every request when one was discovered
1272
1597
  // from the instance lock. Merge with any caller-supplied headers so we
1273
1598
  // never clobber a per-request value.
@@ -1285,7 +1610,39 @@ export class LiveClient {
1285
1610
  ...init,
1286
1611
  headers,
1287
1612
  signal: controller.signal,
1288
- }).finally(() => clearTimeout(timer));
1613
+ }).then((res) => {
1614
+ // Wrap the body-reading accessors so the abort timer is cleared when
1615
+ // the body is consumed (the common path) or errors. The wrappers
1616
+ // delegate to the original methods; they only add the dispose() side
1617
+ // effect. Non-body responses (no body) clear the timer immediately.
1618
+ const origText = res.text.bind(res);
1619
+ const origJson = res.json.bind(res);
1620
+ const origArrayBuffer = res.arrayBuffer.bind(res);
1621
+ res.text = () => { markBodyClaimed(); return origText().finally(dispose); };
1622
+ res.json = () => { markBodyClaimed(); return origJson().finally(dispose); };
1623
+ res.arrayBuffer = () => { markBodyClaimed(); return origArrayBuffer().finally(dispose); };
1624
+ if (!res.body) {
1625
+ dispose();
1626
+ }
1627
+ else {
1628
+ // A-R1 — short grace window for the caller to claim the body,
1629
+ // armed only now that the Response (and thus the accessors) exist.
1630
+ // Long enough that a synchronous `await res.text()` after an
1631
+ // `await fetchWithTimeout(...)` always wins; short enough that a
1632
+ // status-only caller releases its handles promptly (B-N1). If the
1633
+ // body WAS claimed, the fallback is a no-op — the abort timer
1634
+ // remains armed to protect the in-progress read.
1635
+ claimTimer = setTimeout(() => {
1636
+ if (!bodyClaimed)
1637
+ dispose();
1638
+ }, 100);
1639
+ claimTimer.unref();
1640
+ }
1641
+ return res;
1642
+ }, (err) => {
1643
+ dispose();
1644
+ throw err;
1645
+ });
1289
1646
  }
1290
1647
  }
1291
1648
  //# sourceMappingURL=live-client.js.map