@alpsckr/unitycli 0.4.5 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (341) hide show
  1. package/contracts/command-contract.json +591 -591
  2. package/contracts/package-files.json +367 -367
  3. package/contracts/stable-session/direct-call-semantics.json +3 -3
  4. package/contracts/stable-session/request-digest-v1-golden.json +2 -2
  5. package/contracts/tool-completion-contract.json +322 -322
  6. package/dist/bridge/domains/animation.js +37 -37
  7. package/dist/bridge/domains/animation.js.map +1 -1
  8. package/dist/bridge/domains/asset.js +15 -16
  9. package/dist/bridge/domains/asset.js.map +1 -1
  10. package/dist/bridge/domains/build.js +13 -13
  11. package/dist/bridge/domains/build.js.map +1 -1
  12. package/dist/bridge/domains/camera.js +7 -7
  13. package/dist/bridge/domains/camera.js.map +1 -1
  14. package/dist/bridge/domains/catalog-editor.d.ts +2 -0
  15. package/dist/bridge/domains/{project-tool.js → catalog-editor.js} +10 -10
  16. package/dist/bridge/domains/catalog-editor.js.map +1 -0
  17. package/dist/bridge/domains/catalog-player.d.ts +2 -0
  18. package/dist/bridge/domains/{runtime-tool.js → catalog-player.js} +9 -9
  19. package/dist/bridge/domains/catalog-player.js.map +1 -0
  20. package/dist/bridge/domains/code.js +1 -1
  21. package/dist/bridge/domains/code.js.map +1 -1
  22. package/dist/bridge/domains/console.js +2 -2
  23. package/dist/bridge/domains/console.js.map +1 -1
  24. package/dist/bridge/domains/doctor.js +3 -3
  25. package/dist/bridge/domains/doctor.js.map +1 -1
  26. package/dist/bridge/domains/editor.js +14 -14
  27. package/dist/bridge/domains/editor.js.map +1 -1
  28. package/dist/bridge/domains/game-object.js +16 -16
  29. package/dist/bridge/domains/game-object.js.map +1 -1
  30. package/dist/bridge/domains/lighting.d.ts +2 -0
  31. package/dist/bridge/domains/lighting.js +127 -0
  32. package/dist/bridge/domains/lighting.js.map +1 -0
  33. package/dist/bridge/domains/material.js +5 -5
  34. package/dist/bridge/domains/material.js.map +1 -1
  35. package/dist/bridge/domains/navmesh.js +3 -3
  36. package/dist/bridge/domains/navmesh.js.map +1 -1
  37. package/dist/bridge/domains/occlusion.js +1 -9
  38. package/dist/bridge/domains/occlusion.js.map +1 -1
  39. package/dist/bridge/domains/physics.js +14 -14
  40. package/dist/bridge/domains/physics.js.map +1 -1
  41. package/dist/bridge/domains/prefab.js +12 -12
  42. package/dist/bridge/domains/prefab.js.map +1 -1
  43. package/dist/bridge/domains/profiler.js +25 -25
  44. package/dist/bridge/domains/profiler.js.map +1 -1
  45. package/dist/bridge/domains/rendering.d.ts +2 -0
  46. package/dist/bridge/domains/rendering.js +71 -0
  47. package/dist/bridge/domains/rendering.js.map +1 -0
  48. package/dist/bridge/domains/runtime-reflection.d.ts +2 -0
  49. package/dist/bridge/domains/{reflection.js → runtime-reflection.js} +7 -7
  50. package/dist/bridge/domains/runtime-reflection.js.map +1 -0
  51. package/dist/bridge/domains/scene.js +15 -15
  52. package/dist/bridge/domains/scene.js.map +1 -1
  53. package/dist/bridge/domains/screenshot.js +6 -6
  54. package/dist/bridge/domains/screenshot.js.map +1 -1
  55. package/dist/bridge/domains/scriptable-object.js +4 -4
  56. package/dist/bridge/domains/scriptable-object.js.map +1 -1
  57. package/dist/bridge/domains/serialized-object.d.ts +2 -0
  58. package/dist/bridge/domains/{object.js → serialized-object.js} +6 -6
  59. package/dist/bridge/domains/serialized-object.js.map +1 -0
  60. package/dist/bridge/domains/shader.js +7 -7
  61. package/dist/bridge/domains/shader.js.map +1 -1
  62. package/dist/bridge/domains/texture.js +7 -7
  63. package/dist/bridge/domains/texture.js.map +1 -1
  64. package/dist/bridge/domains/timeline.js +4 -4
  65. package/dist/bridge/domains/timeline.js.map +1 -1
  66. package/dist/bridge/domains/ui.js +18 -18
  67. package/dist/bridge/domains/ui.js.map +1 -1
  68. package/dist/bridge/domains/volume.d.ts +2 -0
  69. package/dist/bridge/domains/volume.js +26 -0
  70. package/dist/bridge/domains/volume.js.map +1 -0
  71. package/dist/bridge/index.js +3 -3
  72. package/dist/bridge/index.js.map +1 -1
  73. package/dist/bridge/registry.js +15 -13
  74. package/dist/bridge/registry.js.map +1 -1
  75. package/dist/bridge/session-supervisor.js +4 -4
  76. package/dist/bridge/session-supervisor.js.map +1 -1
  77. package/dist/bridge/types.d.ts +1 -1
  78. package/dist/catalog-protocol.js +3 -3
  79. package/dist/catalog-protocol.js.map +1 -1
  80. package/dist/extensions/.generated-bridge-domains/cinemachine.js +14 -14
  81. package/dist/extensions/.generated-bridge-domains/cinemachine.js.map +1 -1
  82. package/dist/extensions/.generated-bridge-domains/hdrp.js +7 -7
  83. package/dist/extensions/.generated-bridge-domains/hdrp.js.map +1 -1
  84. package/dist/extensions/.generated-bridge-domains/probuilder.d.ts +3 -3
  85. package/dist/extensions/.generated-bridge-domains/probuilder.js +40 -40
  86. package/dist/extensions/.generated-bridge-domains/probuilder.js.map +1 -1
  87. package/dist/extensions/.generated-bridge-domains/urp.js +12 -12
  88. package/dist/extensions/.generated-bridge-domains/urp.js.map +1 -1
  89. package/dist/extensions/.generated-bridge-domains/vfx.js +27 -27
  90. package/dist/extensions/.generated-bridge-domains/vfx.js.map +1 -1
  91. package/dist/package-manager.js +1 -1
  92. package/dist/project-tool-discovery.d.ts +1 -1
  93. package/dist/project-tool-discovery.js +5 -5
  94. package/dist/project-tool-discovery.js.map +1 -1
  95. package/dist/runtime-code.js +2 -2
  96. package/dist/runtime-code.js.map +1 -1
  97. package/dist/services/reflect-service.d.ts +3 -3
  98. package/dist/services/reflect-service.js +5 -5
  99. package/dist/services/reflect-service.js.map +1 -1
  100. package/dist/tools/.generated-completion-registry.js +689 -689
  101. package/dist/tools/.generated-completion-registry.js.map +1 -1
  102. package/dist/tools/.generated-registry.d.ts +12 -12
  103. package/dist/tools/.generated-registry.js +12 -12
  104. package/dist/tools/.generated-registry.js.map +1 -1
  105. package/dist/tools/.generated-schemas.js +13 -13
  106. package/dist/tools/.generated-schemas.js.map +1 -1
  107. package/dist/tools/catalog.d.ts +1 -1
  108. package/dist/tools/catalog.js +1 -1
  109. package/dist/tools/code/{exec.d.ts → execute.d.ts} +1 -1
  110. package/dist/tools/code/{exec.js → execute.js} +5 -5
  111. package/dist/tools/code/execute.js.map +1 -0
  112. package/dist/tools/dispatcher.js +12 -8
  113. package/dist/tools/dispatcher.js.map +1 -1
  114. package/dist/tools/editor/compile.d.ts +3 -2
  115. package/dist/tools/editor/compile.js +23 -13
  116. package/dist/tools/editor/compile.js.map +1 -1
  117. package/dist/tools/editor/play-mode-status.js +2 -2
  118. package/dist/tools/editor/play-mode-status.js.map +1 -1
  119. package/dist/tools/editor/refresh.js +2 -2
  120. package/dist/tools/editor/refresh.js.map +1 -1
  121. package/dist/tools/metadata/derived.d.ts +0 -7
  122. package/dist/tools/metadata/derived.js +7 -16
  123. package/dist/tools/metadata/derived.js.map +1 -1
  124. package/dist/tools/metadata/index.d.ts +1 -1
  125. package/dist/tools/metadata/index.js +1 -1
  126. package/dist/tools/metadata/index.js.map +1 -1
  127. package/dist/tools/metadata/status.js +1 -1
  128. package/dist/tools/metadata/status.js.map +1 -1
  129. package/dist/tools/{runtime → player-runtime}/console.js +4 -4
  130. package/dist/tools/player-runtime/console.js.map +1 -0
  131. package/dist/tools/{runtime → player-runtime}/input/key.js +4 -4
  132. package/dist/tools/player-runtime/input/key.js.map +1 -0
  133. package/dist/tools/{runtime → player-runtime}/input/pointer.js +4 -4
  134. package/dist/tools/player-runtime/input/pointer.js.map +1 -0
  135. package/dist/tools/{runtime → player-runtime}/log.js +5 -5
  136. package/dist/tools/player-runtime/log.js.map +1 -0
  137. package/dist/tools/{runtime → player-runtime}/state.js +4 -4
  138. package/dist/tools/player-runtime/state.js.map +1 -0
  139. package/dist/tools/{runtime → player-runtime}/target-framerate/set.js +4 -4
  140. package/dist/tools/player-runtime/target-framerate/set.js.map +1 -0
  141. package/dist/tools/{runtime → player-runtime}/time-scale/set.js +4 -4
  142. package/dist/tools/player-runtime/time-scale/set.js.map +1 -0
  143. package/dist/tools/{runtime → player-runtime}/ui/capture-element.js +4 -4
  144. package/dist/tools/player-runtime/ui/capture-element.js.map +1 -0
  145. package/dist/tools/tools/group-summaries.js +17 -14
  146. package/dist/tools/tools/group-summaries.js.map +1 -1
  147. package/dist/tools/{reflect/member.js → type-inspection/get-member.js} +6 -6
  148. package/dist/tools/type-inspection/get-member.js.map +1 -0
  149. package/dist/tools/{reflect/type.js → type-inspection/get-type.js} +6 -6
  150. package/dist/tools/type-inspection/get-type.js.map +1 -0
  151. package/dist/tools/{reflect → type-inspection}/search.js +5 -5
  152. package/dist/tools/type-inspection/search.js.map +1 -0
  153. package/docs/README.md +1 -2
  154. package/docs/architecture.md +1 -1
  155. package/docs/availability-differences.md +2 -2
  156. package/docs/development.md +1 -1
  157. package/docs/error-codes.md +5 -5
  158. package/docs/extensions.md +2 -2
  159. package/docs/risk-and-side-effects.md +12 -12
  160. package/docs/safety-boundaries.md +7 -7
  161. package/docs/tool-discovery.md +1 -1
  162. package/docs/tool-execution.md +16 -16
  163. package/extensions/cinemachine/bridge/domains/cinemachine.ts +14 -14
  164. package/extensions/hdrp/bridge/domains/hdrp.ts +7 -7
  165. package/extensions/hdrp/unitypkg/Editor/Hdrp/HdrpToolSupport.cs +2 -2
  166. package/extensions/probuilder/bridge/domains/probuilder.ts +40 -40
  167. package/extensions/probuilder/unitypkg/Editor/ProBuilder/ProBuilderErrors.cs +1 -1
  168. package/extensions/urp/bridge/domains/urp.ts +12 -12
  169. package/extensions/urp/unitypkg/Editor/Urp/UrpToolSupport.cs +2 -2
  170. package/extensions/vfx-graph/bridge/domains/vfx.ts +27 -27
  171. package/package.json +1 -1
  172. package/skills/unitycli/SKILL.md +1 -1
  173. package/skills/unitycli/manifest.json +1 -1
  174. package/skills/unitycli/references/operation-protocol.md +1 -1
  175. package/unitypkg/Editor/Bridge/BridgeHttpServer.cs +2 -2
  176. package/unitypkg/Editor/Commands/ProjectToolCommands.cs +7 -7
  177. package/unitypkg/Editor/Commands/RuntimeToolCommands.cs +6 -6
  178. package/unitypkg/Editor/Generated/UnityCliToolCompletionRegistry.g.cs +147 -147
  179. package/unitypkg/Editor/Infrastructure/CodeExecSupport.cs +4 -4
  180. package/unitypkg/Editor/Infrastructure/UnityCliAdmission.cs +17 -17
  181. package/unitypkg/Editor/Infrastructure/UnityCliCompileCoordinator.cs +61 -54
  182. package/unitypkg/Editor/Infrastructure/UnityCliJson.cs +0 -18
  183. package/unitypkg/Editor/Infrastructure/UnityCliLiveRefreshCoordinator.cs +26 -21
  184. package/unitypkg/Editor/Infrastructure/UnityCliObjectPatch.cs +1 -1
  185. package/unitypkg/Editor/Infrastructure/UnityCliObjectRef.cs +5 -5
  186. package/unitypkg/Editor/Infrastructure/UnityCliOperationCoordinator.cs +32 -32
  187. package/unitypkg/Editor/Infrastructure/UnityCliReflection.cs +12 -12
  188. package/unitypkg/Editor/Infrastructure/UnityCliRuntimeExecutor.cs +1 -1
  189. package/unitypkg/Editor/ProjectTools/ProjectToolRegistry.cs +5 -5
  190. package/unitypkg/Editor/Tools/{animation → animation-clip}/AnimationToolSupport.cs +3 -3
  191. package/unitypkg/Editor/Tools/{animation/clip → animation-clip}/create.cs +4 -4
  192. package/unitypkg/Editor/Tools/{animation/clip.cs → animation-clip/read.cs} +3 -3
  193. package/unitypkg/Editor/Tools/{animation/clip/modify.cs → animation-clip/update.cs} +5 -5
  194. package/unitypkg/Editor/Tools/{animation/animator → animator}/crossfade.cs +1 -1
  195. package/unitypkg/Editor/Tools/{animation/animator → animator}/get-info.cs +1 -1
  196. package/unitypkg/Editor/Tools/{animation/animator → animator}/get-parameter.cs +1 -1
  197. package/unitypkg/Editor/Tools/{animation/state.cs → animator/get-state.cs} +3 -3
  198. package/unitypkg/Editor/Tools/{animation → animator}/play.cs +5 -5
  199. package/unitypkg/Editor/Tools/{animation/animator → animator}/set-enabled.cs +1 -1
  200. package/unitypkg/Editor/Tools/{animation/animator → animator}/set-parameter.cs +1 -1
  201. package/unitypkg/Editor/Tools/{animation/animator → animator}/set-speed.cs +1 -1
  202. package/unitypkg/Editor/Tools/{animation → animator}/stop.cs +4 -4
  203. package/unitypkg/Editor/Tools/{controller → animator-controller}/add-blend-tree-child.cs +10 -10
  204. package/unitypkg/Editor/Tools/{controller → animator-controller}/add-layer.cs +6 -6
  205. package/unitypkg/Editor/Tools/{controller → animator-controller}/add-parameter.cs +6 -6
  206. package/unitypkg/Editor/Tools/{controller → animator-controller}/add-state.cs +7 -7
  207. package/unitypkg/Editor/Tools/{controller → animator-controller}/add-transition.cs +9 -9
  208. package/unitypkg/Editor/Tools/{controller → animator-controller}/assign.cs +6 -6
  209. package/unitypkg/Editor/Tools/{controller → animator-controller}/create-blend-tree-1d.cs +7 -7
  210. package/unitypkg/Editor/Tools/{controller → animator-controller}/create-blend-tree-2d.cs +7 -7
  211. package/unitypkg/Editor/Tools/{controller → animator-controller}/create.cs +4 -4
  212. package/unitypkg/Editor/Tools/{controller → animator-controller}/get-info.cs +4 -4
  213. package/unitypkg/Editor/Tools/{controller → animator-controller}/remove-layer.cs +8 -8
  214. package/unitypkg/Editor/Tools/{controller → animator-controller}/set-layer-weight.cs +6 -6
  215. package/unitypkg/Editor/Tools/asset/preview.cs +1 -1
  216. package/unitypkg/Editor/Tools/asset/{modify.cs → write-text.cs} +6 -6
  217. package/unitypkg/Editor/Tools/component/get.cs +1 -1
  218. package/unitypkg/Editor/Tools/component/list-types.cs +2 -2
  219. package/unitypkg/Editor/Tools/component/modify.cs +1 -1
  220. package/unitypkg/Editor/Tools/component/set.cs +1 -1
  221. package/unitypkg/Editor/Tools/console/{get.cs → read.cs} +3 -3
  222. package/unitypkg/Editor/Tools/editor/{play.cs → play-mode/start.cs} +5 -5
  223. package/unitypkg/Editor/Tools/editor/{stop.cs → play-mode/stop.cs} +5 -5
  224. package/unitypkg/Editor/Tools/editor/search.cs +1 -1
  225. package/unitypkg/Editor/Tools/{go → game-object}/GameObjectToolSupport.cs +5 -22
  226. package/unitypkg/Editor/Tools/{go → game-object}/create.cs +11 -11
  227. package/unitypkg/Editor/Tools/{go → game-object}/delete.cs +7 -7
  228. package/unitypkg/Editor/Tools/{go → game-object}/duplicate.cs +6 -6
  229. package/unitypkg/Editor/Tools/{go → game-object}/find.cs +5 -5
  230. package/unitypkg/Editor/Tools/{go → game-object}/look-at.cs +8 -8
  231. package/unitypkg/Editor/Tools/{go → game-object}/modify.cs +9 -9
  232. package/unitypkg/Editor/Tools/{go → game-object}/move-relative.cs +7 -7
  233. package/unitypkg/Editor/Tools/{scene/move-object.cs → game-object/move-to-scene.cs} +7 -7
  234. package/unitypkg/Editor/Tools/{go → game-object}/set-parent.cs +9 -9
  235. package/unitypkg/Editor/Tools/{graphics/bake-cancel.cs → lighting/bake/cancel.cs} +4 -4
  236. package/unitypkg/Editor/Tools/{graphics/bake-clear.cs → lighting/bake/clear.cs} +4 -4
  237. package/unitypkg/Editor/Tools/{graphics/bake-reflection-probe.cs → lighting/bake/reflection-probe.cs} +3 -3
  238. package/unitypkg/Editor/Tools/{graphics/bake-settings.cs → lighting/bake/settings.cs} +12 -12
  239. package/unitypkg/Editor/Tools/{graphics/bake-start.cs → lighting/bake/start.cs} +5 -5
  240. package/unitypkg/Editor/Tools/{graphics/bake-status.cs → lighting/bake/status.cs} +3 -3
  241. package/unitypkg/Editor/Tools/{graphics → lighting}/light-probe-group.cs +7 -7
  242. package/unitypkg/Editor/Tools/{graphics → lighting}/reflection-probe.cs +12 -12
  243. package/unitypkg/Editor/Tools/{graphics/skybox-get.cs → lighting/skybox/get.cs} +3 -3
  244. package/unitypkg/Editor/Tools/{graphics/skybox-set-ambient.cs → lighting/skybox/set-ambient.cs} +3 -3
  245. package/unitypkg/Editor/Tools/{graphics/skybox-set-fog.cs → lighting/skybox/set-fog.cs} +3 -3
  246. package/unitypkg/Editor/Tools/{graphics/skybox-set-material.cs → lighting/skybox/set-material.cs} +5 -5
  247. package/unitypkg/Editor/Tools/{graphics/skybox-set-properties.cs → lighting/skybox/set-properties.cs} +5 -5
  248. package/unitypkg/Editor/Tools/{graphics/skybox-set-reflection.cs → lighting/skybox/set-reflection.cs} +3 -3
  249. package/unitypkg/Editor/Tools/{graphics/skybox-set-sun.cs → lighting/skybox/set-sun.cs} +5 -5
  250. package/unitypkg/Editor/Tools/{project → project-settings}/ProjectSettingsToolSupport.cs +5 -5
  251. package/unitypkg/Editor/Tools/{project → project-settings}/audio-settings/set.cs +3 -3
  252. package/unitypkg/Editor/Tools/{project → project-settings}/audio-settings.cs +4 -4
  253. package/unitypkg/Editor/Tools/{project → project-settings}/info.cs +4 -4
  254. package/unitypkg/Editor/Tools/{project → project-settings}/input-settings/set.cs +3 -3
  255. package/unitypkg/Editor/Tools/{project → project-settings}/input-settings.cs +4 -4
  256. package/unitypkg/Editor/Tools/project-settings/layer/add.cs +3 -0
  257. package/unitypkg/Editor/Tools/project-settings/layer/remove.cs +3 -0
  258. package/unitypkg/Editor/Tools/{project → project-settings}/layers.cs +4 -4
  259. package/unitypkg/Editor/Tools/{project → project-settings}/player-settings/set.cs +4 -4
  260. package/unitypkg/Editor/Tools/{project → project-settings}/player-settings.cs +4 -4
  261. package/unitypkg/Editor/Tools/project-settings/tag/add.cs +3 -0
  262. package/unitypkg/Editor/Tools/project-settings/tag/remove.cs +3 -0
  263. package/unitypkg/Editor/Tools/{project → project-settings}/tags.cs +4 -4
  264. package/unitypkg/Editor/Tools/{project → project-settings}/time-settings/set.cs +3 -3
  265. package/unitypkg/Editor/Tools/{project → project-settings}/time-settings.cs +4 -4
  266. package/unitypkg/Editor/Tools/{graphics → rendering}/GraphicsToolSupport.cs +3 -3
  267. package/unitypkg/Editor/Tools/rendering/pipeline/info.cs +19 -0
  268. package/unitypkg/Editor/Tools/{graphics/pipeline-settings.cs → rendering/pipeline/settings.cs} +4 -4
  269. package/unitypkg/Editor/Tools/{graphics → rendering}/quality.cs +17 -17
  270. package/unitypkg/Editor/Tools/{graphics → rendering}/scene-debug.cs +4 -4
  271. package/unitypkg/Editor/Tools/rendering/stats.cs +17 -0
  272. package/unitypkg/Editor/Tools/{reflection → runtime-reflection}/method/find.cs +5 -5
  273. package/unitypkg/Editor/Tools/{reflection/method/call.cs → runtime-reflection/method/invoke.cs} +7 -7
  274. package/unitypkg/Editor/Tools/{reflection → runtime-reflection}/type/schema.cs +5 -5
  275. package/unitypkg/Editor/Tools/scene/gameobject-support.cs +1 -1
  276. package/unitypkg/Editor/Tools/scene/gameobject.cs +1 -1
  277. package/unitypkg/Editor/Tools/scene/hierarchy.cs +1 -1
  278. package/unitypkg/Editor/Tools/{camera/screenshot.cs → screenshot/from-camera.cs} +4 -4
  279. package/unitypkg/Editor/Tools/{object/modify.cs → serialized-object/patch.cs} +8 -8
  280. package/unitypkg/Editor/Tools/{object/get-data.cs → serialized-object/read.cs} +4 -4
  281. package/unitypkg/Editor/Tools/{graphics/volume.cs → volume/list.cs} +3 -3
  282. package/unitypkg/Editor/UnityCliBridge.cs +3 -22
  283. package/unitypkg/Runtime/Infrastructure/UnityCliRuntimeBridge.cs +15 -15
  284. package/unitypkg/Runtime/Infrastructure/UnityCliRuntimeRegistry.cs +1 -1
  285. package/unitypkg/Runtime/Tools/UnityCliRuntimeTools.cs +22 -22
  286. package/unitypkg/Shared/UnityCliBridgeQueuePolicy.cs +1 -1
  287. package/unitypkg/Tests/Editor/UnityCliAdmissionCoordinatorIntegrationTests.cs +7 -7
  288. package/unitypkg/Tests/Editor/UnityCliBridgeAdmissionIntegrationTests.cs +6 -6
  289. package/unitypkg/Tests/Editor/UnityCliBridgeQueuePolicyTests.cs +3 -3
  290. package/unitypkg/Tests/Editor/UnityCliContinuationIntegrationTests.cs +1 -1
  291. package/unitypkg/Tests/Editor/UnityCliRequestBudgetTests.cs +4 -4
  292. package/unitypkg/Tests/Editor/UnityCliRuntimeBridgeIntegrationTests.cs +15 -15
  293. package/unitypkg/Tests/Runtime/UnityCliRuntimeCatalogValidationTests.cs +5 -5
  294. package/unitypkg/package.json +1 -1
  295. package/dist/bridge/domains/graphics.d.ts +0 -2
  296. package/dist/bridge/domains/graphics.js +0 -170
  297. package/dist/bridge/domains/graphics.js.map +0 -1
  298. package/dist/bridge/domains/object.d.ts +0 -2
  299. package/dist/bridge/domains/object.js.map +0 -1
  300. package/dist/bridge/domains/package.d.ts +0 -2
  301. package/dist/bridge/domains/package.js +0 -2
  302. package/dist/bridge/domains/package.js.map +0 -1
  303. package/dist/bridge/domains/project-tool.d.ts +0 -2
  304. package/dist/bridge/domains/project-tool.js.map +0 -1
  305. package/dist/bridge/domains/reflection.d.ts +0 -2
  306. package/dist/bridge/domains/reflection.js.map +0 -1
  307. package/dist/bridge/domains/runtime-tool.d.ts +0 -2
  308. package/dist/bridge/domains/runtime-tool.js.map +0 -1
  309. package/dist/tools/code/exec.js.map +0 -1
  310. package/dist/tools/reflect/member.js.map +0 -1
  311. package/dist/tools/reflect/search.js.map +0 -1
  312. package/dist/tools/reflect/type.js.map +0 -1
  313. package/dist/tools/runtime/console.js.map +0 -1
  314. package/dist/tools/runtime/input/key.js.map +0 -1
  315. package/dist/tools/runtime/input/pointer.js.map +0 -1
  316. package/dist/tools/runtime/log.js.map +0 -1
  317. package/dist/tools/runtime/state.js.map +0 -1
  318. package/dist/tools/runtime/target-framerate/set.js.map +0 -1
  319. package/dist/tools/runtime/time-scale/set.js.map +0 -1
  320. package/dist/tools/runtime/ui/capture-element.js.map +0 -1
  321. package/unitypkg/Editor/Tools/graphics/pipeline-info.cs +0 -19
  322. package/unitypkg/Editor/Tools/graphics/stats.cs +0 -17
  323. package/unitypkg/Editor/Tools/project/layer/add.cs +0 -3
  324. package/unitypkg/Editor/Tools/project/layer/remove.cs +0 -3
  325. package/unitypkg/Editor/Tools/project/tag/add.cs +0 -3
  326. package/unitypkg/Editor/Tools/project/tag/remove.cs +0 -3
  327. /package/dist/tools/{runtime → player-runtime}/console.d.ts +0 -0
  328. /package/dist/tools/{runtime → player-runtime}/input/key.d.ts +0 -0
  329. /package/dist/tools/{runtime → player-runtime}/input/pointer.d.ts +0 -0
  330. /package/dist/tools/{runtime → player-runtime}/log.d.ts +0 -0
  331. /package/dist/tools/{runtime → player-runtime}/state.d.ts +0 -0
  332. /package/dist/tools/{runtime → player-runtime}/target-framerate/set.d.ts +0 -0
  333. /package/dist/tools/{runtime → player-runtime}/time-scale/set.d.ts +0 -0
  334. /package/dist/tools/{runtime → player-runtime}/ui/capture-element.d.ts +0 -0
  335. /package/dist/tools/{reflect/member.d.ts → type-inspection/get-member.d.ts} +0 -0
  336. /package/dist/tools/{reflect/type.d.ts → type-inspection/get-type.d.ts} +0 -0
  337. /package/dist/tools/{reflect → type-inspection}/search.d.ts +0 -0
  338. /package/unitypkg/Editor/Tools/{animation → animator}/AnimatorRuntimeToolSupport.cs +0 -0
  339. /package/unitypkg/Editor/Tools/{project → project-settings}/ProjectSettingsReader.cs +0 -0
  340. /package/unitypkg/Editor/Tools/{project → project-settings}/ProjectTagLayerToolSupport.cs +0 -0
  341. /package/unitypkg/Editor/Tools/{object → serialized-object}/ObjectToolSupport.cs +0 -0
@@ -36,7 +36,7 @@ namespace UnityCli
36
36
  private static void RegisterCodeExecCommand(BridgeCommandRegistry registry)
37
37
  {
38
38
  registry.Register<UnityCli.Protocol.BridgeRequest>(
39
- "code.exec",
39
+ "code.execute",
40
40
  "code",
41
41
  true,
42
42
  60000,
@@ -49,7 +49,7 @@ namespace UnityCli
49
49
  private static string CodeExec(UnityCli.Protocol.BridgeRequest request, CancellationToken cancellationToken)
50
50
  {
51
51
  if (request.Execution != null && request.Execution.DryRun == true)
52
- throw new BridgeCommandException("E_DRY_RUN_UNSUPPORTED", "Raw Bridge code.exec dry-run cannot execute or compile caller source.", "Use the public tools run code.exec --dry-run path, which returns the CLI-side source preview without Bridge dispatch.");
52
+ throw new BridgeCommandException("E_DRY_RUN_UNSUPPORTED", "Raw Bridge code.execute dry-run cannot execute or compile caller source.", "Use the public tools run code.execute --dry-run path, which returns the CLI-side source preview without Bridge dispatch.");
53
53
  var source = request.StringArg("sourceText");
54
54
  // raw Bridge不读取调用方路径;公开CLI已按入口deadline有界读取并内联唯一源码。
55
55
  if (string.IsNullOrWhiteSpace(source))
@@ -60,11 +60,11 @@ namespace UnityCli
60
60
  var result = ExecuteCodeSource(request, source, cancellationToken);
61
61
  WriteLog("code_exec requestId=" + request.RequestId + " ok=" + result.Ok + " exitState=" + result.ExitState);
62
62
  var serialized = SerializeCodeExecutionResult(request.RequestId, result);
63
- if (result.Ok) RecordDirectCompletionEvidence(request.RequestId, "code.exec", ResolveRequestCompletionContract(request), result.Data);
63
+ if (result.Ok) RecordDirectCompletionEvidence(request.RequestId, "code.execute", ResolveRequestCompletionContract(request), result.Data);
64
64
  return serialized;
65
65
  }
66
66
 
67
- /// <summary>所有 code.exec terminal 统一经过同一 Bridge envelope 与总 byte 上限。</summary>
67
+ /// <summary>所有 code.execute terminal 统一经过同一 Bridge envelope 与总 byte 上限。</summary>
68
68
  private static string SerializeCodeExecutionResult(string requestId, CodeExecutionResult result)
69
69
  {
70
70
  object envelope = result.Ok
@@ -1398,7 +1398,7 @@ namespace UnityCli
1398
1398
  /// <summary>root观察不确定时用队列冻结身份建立可执行Recovery marker;候选缺失时继续保留WorkItem。</summary>
1399
1399
  private static AdmissionTransferResult PersistWorkItemRecoveryAfterTransferFailure(BridgeQueueState state, BridgeWorkItem item, AdmissionOwnerIdentity identity, string command, string response)
1400
1400
  {
1401
- if (identity == null || (!AdmissionDurableRootCommand(command) && command != "project-tool.run" && command != "code.exec"))
1401
+ if (identity == null || (!AdmissionDurableRootCommand(command) && command != "catalog.editor.run" && command != "code.execute"))
1402
1402
  return AdmissionTransferResult.TransferPending;
1403
1403
  try
1404
1404
  {
@@ -1439,7 +1439,7 @@ namespace UnityCli
1439
1439
  private static AdmissionTransferResult TransferAdmissionAfterAcceptedWork(BridgeQueueState state, BridgeWorkItem item, AdmissionOwnerIdentity identity, string command, string response)
1440
1440
  {
1441
1441
  if (identity == null) return AdmissionTransferResult.NotAccepted;
1442
- var directMutation = command == "project-tool.run" || command == "code.exec";
1442
+ var directMutation = command == "catalog.editor.run" || command == "code.execute";
1443
1443
  if (!AdmissionDurableRootCommand(command) && !directMutation) return AdmissionTransferResult.NotAccepted;
1444
1444
  string markerScope;
1445
1445
  string rootScope;
@@ -1733,7 +1733,7 @@ namespace UnityCli
1733
1733
  if (command == "internal.test.run.cancel") return false;
1734
1734
  bool ownsLease;
1735
1735
  if (!queueState.TryIsLeaseOwned(identity.RequestId, identity.RequestDigest, out ownsLease)) return false;
1736
- if (command == "project-tool.run" || command == "code.exec")
1736
+ if (command == "catalog.editor.run" || command == "code.execute")
1737
1737
  {
1738
1738
  durable = ownsLease;
1739
1739
  return true;
@@ -1769,7 +1769,7 @@ namespace UnityCli
1769
1769
  /// <summary>deadline之后仍允许同字节direct request读取已发布terminal,不入队也不重新占slot。</summary>
1770
1770
  private static string AdmissionRecoveredDirectTerminal(UnityCli.Protocol.BridgeRequest request, byte[] rawRequestBytes)
1771
1771
  {
1772
- if (request == null || rawRequestBytes == null || (request.Command != "code.exec" && request.Command != "project-tool.run")) return null;
1772
+ if (request == null || rawRequestBytes == null || (request.Command != "code.execute" && request.Command != "catalog.editor.run")) return null;
1773
1773
  var digest = UnityCliRequestDigest.Compute(rawRequestBytes, request.InstanceId);
1774
1774
  object terminal;
1775
1775
  if (!UnityCliActiveOperation.TryGetTerminal("direct-mutation", request.RequestId, digest, out terminal)) return null;
@@ -1801,8 +1801,8 @@ namespace UnityCli
1801
1801
  case "internal.test.run.cancel": return "test-cancel";
1802
1802
  case "internal.navmesh.bake.start": return "navmesh-bake";
1803
1803
  case "internal.occlusion.bake.start": return "occlusion-bake";
1804
- case "project-tool.run":
1805
- case "code.exec":
1804
+ case "catalog.editor.run":
1805
+ case "code.execute":
1806
1806
  return "direct-mutation";
1807
1807
  default:
1808
1808
  return null;
@@ -1833,7 +1833,7 @@ namespace UnityCli
1833
1833
  || command == "internal.package.embed.start" || command == "internal.package.resolve.start"
1834
1834
  || command == "internal.test.run.start" || command == "internal.test.run.cancel"
1835
1835
  || command == "internal.navmesh.bake.start" || command == "internal.occlusion.bake.start"
1836
- || command == "project-tool.run" || command == "code.exec";
1836
+ || command == "catalog.editor.run" || command == "code.execute";
1837
1837
  }
1838
1838
 
1839
1839
  private static string AdmissionAcceptedTopDigest(BridgeQueueState state, string response, AdmissionOwnerIdentity identity, string command)
@@ -1867,7 +1867,7 @@ namespace UnityCli
1867
1867
  || UnityCliPackageEmbedCoordinator.IsCommand(command) || UnityCliPackageResolveCoordinator.IsCommand(command)
1868
1868
  || UnityCliTestRunCoordinator.IsCommand(command) || UnityCliNavMeshBakeCoordinator.IsCommand(command)
1869
1869
  || UnityCliOcclusionBakeCoordinator.IsCommand(command)
1870
- || command == "project-tool.run" || command == "code.exec";
1870
+ || command == "catalog.editor.run" || command == "code.execute";
1871
1871
  }
1872
1872
 
1873
1873
  private static bool AdmissionBypassCommand(string command)
@@ -1875,15 +1875,15 @@ namespace UnityCli
1875
1875
  if (IsDoctorAdmissionBypassCommand(command)) return true;
1876
1876
  switch (command)
1877
1877
  {
1878
- case "project-tool.health":
1879
- case "project-tool.groups":
1880
- case "project-tool.summary":
1881
- case "project-tool.describe":
1882
- case "project-tool.list":
1883
- case "runtime-tool.groups":
1884
- case "runtime-tool.summary":
1885
- case "runtime-tool.describe":
1886
- case "runtime-tool.list":
1878
+ case "catalog.editor.health":
1879
+ case "catalog.editor.groups":
1880
+ case "catalog.editor.summary":
1881
+ case "catalog.editor.describe":
1882
+ case "catalog.editor.list":
1883
+ case "catalog.player.groups":
1884
+ case "catalog.player.summary":
1885
+ case "catalog.player.describe":
1886
+ case "catalog.player.list":
1887
1887
  case "internal.editor.state.snapshot":
1888
1888
  case "internal.editor.compile.status":
1889
1889
  case "internal.editor.refresh.status":
@@ -6,7 +6,6 @@ using System.IO;
6
6
  using System.Linq;
7
7
  using System.Text;
8
8
  using UnityEditor;
9
- using UnityEditor.Compilation;
10
9
  using UnityCli.Protocol;
11
10
 
12
11
  namespace UnityCli
@@ -31,30 +30,36 @@ namespace UnityCli
31
30
  }
32
31
  protected override void ValidateLoadedRoot(Dictionary<string, object> root)
33
32
  {
34
- ValidateRootContract(root, new[] { "sequence", "runId", "refresh", "path", "forceUpdate", "importRecursive", "includeWarnings", "diagnostics", "diagnosticErrorCount", "diagnosticWarningCount", "diagnosticInfoCount", "diagnosticsTruncated", "startedCycle", "startedAt", "finishedAt", "reloadObserved", "rootContractDigest" },
33
+ ValidateRootContract(root, new[] { "sequence", "runId", "refresh", "path", "forceUpdate", "importRecursive", "includeWarnings", "compilationObserved", "compileObservationSequence", "startedSequence", "diagnostics", "diagnosticErrorCount", "diagnosticWarningCount", "diagnosticInfoCount", "diagnosticsTruncated", "stableFrames", "startedCycle", "startedAt", "finishedAt", "reloadObserved", "rootContractDigest" },
35
34
  "queued", "prepared", "dispatching", "awaiting_started", "compiling", "cycle_finished");
36
- object sequence; object refresh; object forceUpdate; object recursive; object warnings; object diagnostics; object errorCount; object warningCount; object infoCount; object truncated;
35
+ object sequence; object refresh; object forceUpdate; object recursive; object warnings; object observed; object diagnostics; object errorCount; object warningCount; object infoCount; object truncated; object stableFrames;
37
36
  if (!root.TryGetValue("sequence", out sequence) || !(sequence is long) || (long)sequence <= 0
38
37
  || string.IsNullOrWhiteSpace(Text(root, "runId"))
39
38
  || !root.TryGetValue("refresh", out refresh) || !(refresh is bool)
40
39
  || !root.TryGetValue("forceUpdate", out forceUpdate) || !(forceUpdate is bool)
41
40
  || !root.TryGetValue("importRecursive", out recursive) || !(recursive is bool)
42
41
  || !root.TryGetValue("includeWarnings", out warnings) || !(warnings is bool)
42
+ || !root.TryGetValue("compilationObserved", out observed) || !(observed is bool)
43
+ || !root.TryGetValue("compileObservationSequence", out sequence) || !(sequence is long) || (long)sequence < 0
44
+ || !root.TryGetValue("startedSequence", out sequence) || !(sequence is long) || (long)sequence < 0
43
45
  || !root.TryGetValue("diagnostics", out diagnostics) || !(diagnostics is List<object>)
44
46
  || !root.TryGetValue("diagnosticErrorCount", out errorCount) || !(errorCount is long) || (long)errorCount < 0 || (long)errorCount > 1000000
45
47
  || !root.TryGetValue("diagnosticWarningCount", out warningCount) || !(warningCount is long) || (long)warningCount < 0 || (long)warningCount > 1000000
46
48
  || !root.TryGetValue("diagnosticInfoCount", out infoCount) || !(infoCount is long) || (long)infoCount < 0 || (long)infoCount > 1000000
47
- || !root.TryGetValue("diagnosticsTruncated", out truncated) || !(truncated is long) || (long)truncated < 0 || (long)truncated > 1000000)
49
+ || !root.TryGetValue("diagnosticsTruncated", out truncated) || !(truncated is long) || (long)truncated < 0 || (long)truncated > 1000000
50
+ || !root.TryGetValue("stableFrames", out stableFrames) || !(stableFrames is long) || (long)stableFrames < 0
51
+ || string.IsNullOrWhiteSpace(Text(root, "startedAt")))
48
52
  throw new InvalidDataException("Compile active root fields are invalid.");
49
53
  if (!string.Equals(Text(root, "rootContractDigest"), CompileRootContractDigest(root), StringComparison.Ordinal))
50
54
  throw new InvalidDataException("Compile immutable root contract changed.");
51
55
  ValidateBoundedDiagnostics(root, "diagnostics", "diagnosticErrorCount", "diagnosticWarningCount", "diagnosticInfoCount", "diagnosticsTruncated", (bool)warnings);
52
56
  var phase = Text(root, "phase");
53
- var fenced = HasExactEffectFence("compile", root, "compile-dispatch");
57
+ var fenced = HasExactEffectFence("compile", root, "asset-refresh-dispatch");
54
58
  if ((phase == "queued" || phase == "prepared") == fenced)
55
59
  throw new InvalidDataException("Compile effect fence is inconsistent with phase.");
56
- if ((phase == "compiling" || phase == "cycle_finished")
57
- && (Long(root, "startedCycle") <= 0 || string.IsNullOrWhiteSpace(Text(root, "startedAt"))))
60
+ if ((bool)observed != (phase == "compiling" || phase == "cycle_finished"))
61
+ throw new InvalidDataException("Compile observation state is inconsistent with phase.");
62
+ if ((bool)observed && (Long(root, "startedCycle") <= 0 || Long(root, "startedSequence") <= Long(root, "compileObservationSequence")))
58
63
  throw new InvalidDataException("Compile active cycle identity is invalid.");
59
64
  }
60
65
 
@@ -67,11 +72,20 @@ namespace UnityCli
67
72
  });
68
73
  }
69
74
 
70
- protected override object Planned(object value) { return new Dictionary<string, object> { { "plannedEffects", new List<object> { new Dictionary<string, object> { { "type", "script-compile" } } } } }; }
75
+ protected override object Planned(object value)
76
+ {
77
+ var args = (StartArgs)value;
78
+ var effects = new List<object>();
79
+ if (!string.IsNullOrEmpty(args.Path)) effects.Add(new Dictionary<string, object> { { "type", "asset-import" }, { "path", args.Path } });
80
+ else effects.Add(new Dictionary<string, object> { { "type", "asset-refresh" } });
81
+ effects.Add(new Dictionary<string, object> { { "type", "script-compile" } });
82
+ effects.Add(new Dictionary<string, object> { { "type", "domain-reload" } });
83
+ return new Dictionary<string, object> { { "plannedEffects", effects } };
84
+ }
71
85
  protected override Dictionary<string, object> CreateRoot(BridgeRequest request, string digest, object value)
72
86
  {
73
87
  var args = (StartArgs)value;
74
- var root = new Dictionary<string, object> { { "requestId", request.RequestId }, { "editorSessionId", EditorSessionId() }, { "requestDigest", digest }, { "deadline", request.Execution.AbsoluteDeadlineUtc }, { "phase", "queued" }, { "sequence", NextSequenceLocked() }, { "runId", "compile-" + digest.Substring(0, 32) }, { "refresh", args.Refresh ?? true }, { "path", args.Path }, { "forceUpdate", args.ForceUpdate ?? false }, { "importRecursive", args.ImportRecursive ?? false }, { "includeWarnings", args.IncludeWarnings ?? true }, { "diagnostics", new List<object>() }, { "diagnosticErrorCount", 0L }, { "diagnosticWarningCount", 0L }, { "diagnosticInfoCount", 0L }, { "diagnosticsTruncated", 0L } };
88
+ var root = new Dictionary<string, object> { { "requestId", request.RequestId }, { "editorSessionId", EditorSessionId() }, { "requestDigest", digest }, { "deadline", request.Execution.AbsoluteDeadlineUtc }, { "phase", "queued" }, { "sequence", NextSequenceLocked() }, { "runId", "compile-" + digest.Substring(0, 32) }, { "refresh", string.IsNullOrEmpty(args.Path) }, { "path", args.Path }, { "forceUpdate", args.ForceUpdate ?? false }, { "importRecursive", args.ImportRecursive ?? false }, { "includeWarnings", args.IncludeWarnings ?? true }, { "compilationObserved", false }, { "compileObservationSequence", 0L }, { "startedSequence", 0L }, { "diagnostics", new List<object>() }, { "diagnosticErrorCount", 0L }, { "diagnosticWarningCount", 0L }, { "diagnosticInfoCount", 0L }, { "diagnosticsTruncated", 0L }, { "stableFrames", 0L }, { "startedAt", DateTime.UtcNow.ToString("O", CultureInfo.InvariantCulture) }, { "reloadObserved", false } };
75
89
  root["rootContractDigest"] = CompileRootContractDigest(root);
76
90
  return root;
77
91
  }
@@ -81,6 +95,14 @@ namespace UnityCli
81
95
  var phase = Text(root, "phase");
82
96
  if (phase == "queued") { Update(x => x["phase"] = "prepared"); return; }
83
97
  if (phase == "prepared") { if (!EditorApplication.isCompiling && !EditorApplication.isUpdating && !IsDomainReloading()) Dispatch(root); return; }
98
+ if (phase == "awaiting_started" && !EditorApplication.isCompiling && !EditorApplication.isUpdating && !IsDomainReloading())
99
+ {
100
+ var frames = Long(root, "stableFrames") + 1L;
101
+ root["stableFrames"] = frames;
102
+ Update(x => x["stableFrames"] = frames);
103
+ if (frames >= 3L) Complete(root);
104
+ return;
105
+ }
84
106
  if (phase == "cycle_finished" && !EditorApplication.isCompiling && !EditorApplication.isUpdating && !IsDomainReloading()) Complete(root);
85
107
  }
86
108
  protected override object BuildSuccessData(Dictionary<string, object> root)
@@ -90,17 +112,30 @@ namespace UnityCli
90
112
  var assemblies = typed.Where(x => !string.IsNullOrEmpty(Text(x, "assembly"))).Select(x => Text(x, "assembly")).Distinct(StringComparer.Ordinal).Count();
91
113
  var startedAt = Text(root, "startedAt"); var finishedAt = DateTime.UtcNow.ToString("O", CultureInfo.InvariantCulture);
92
114
  var durationMs = DateTimeOffset.TryParse(startedAt, out var started) ? (long)Math.Max(0, (DateTimeOffset.UtcNow - started).TotalMilliseconds) : 0L;
93
- var refresh = Bool(root, "refresh"); var path = string.IsNullOrEmpty(Text(root, "path")) ? null : Text(root, "path");
94
- var compile = new Dictionary<string, object> { { "completed", true }, { "refresh", refresh }, { "path", path }, { "startedAt", startedAt }, { "finishedAt", finishedAt }, { "durationMs", durationMs }, { "assemblyCount", (long)assemblies }, { "errorCount", (long)errors }, { "warningCount", (long)warnings }, { "status", warnings > 0 ? "warnings" : "clean" } };
95
- var effects = new List<object>(); if (path != null) effects.Add(new Dictionary<string, object> { { "type", "asset-import" }, { "path", path } }); else if (refresh) effects.Add(new Dictionary<string, object> { { "type", "asset-refresh" } }); effects.Add(new Dictionary<string, object> { { "type", "script-compile" } }); effects.Add(new Dictionary<string, object> { { "type", "domain-reload" } });
115
+ var refresh = Bool(root, "refresh"); var path = string.IsNullOrEmpty(Text(root, "path")) ? null : Text(root, "path"); var compilationTriggered = Bool(root, "compilationObserved");
116
+ var status = compilationTriggered ? (warnings > 0 ? "warnings" : "clean") : "unchanged";
117
+ var compile = new Dictionary<string, object> { { "completed", true }, { "compilationTriggered", compilationTriggered }, { "noOpReason", compilationTriggered ? null : "no-script-changes" }, { "refresh", refresh }, { "path", path }, { "startedAt", startedAt }, { "finishedAt", finishedAt }, { "durationMs", durationMs }, { "assemblyCount", (long)assemblies }, { "errorCount", (long)errors }, { "warningCount", (long)warnings }, { "status", status } };
118
+ var effects = new List<object>(); if (path != null) effects.Add(new Dictionary<string, object> { { "type", "asset-import" }, { "path", path } }); else if (refresh) effects.Add(new Dictionary<string, object> { { "type", "asset-refresh" } }); if (compilationTriggered) { effects.Add(new Dictionary<string, object> { { "type", "script-compile" } }); effects.Add(new Dictionary<string, object> { { "type", "domain-reload" } }); }
96
119
  var state = new Dictionary<string, object> { { "status", "ready" }, { "compile", new Dictionary<string, object> { { "known", true }, { "value", false } } }, { "import", new Dictionary<string, object> { { "known", true }, { "value", false } } }, { "playMode", new Dictionary<string, object> { { "known", true }, { "value", EditorApplication.isPlaying ? "play" : "edit" } } } };
97
120
  return new Dictionary<string, object> { { "compile", compile }, { "diagnostics", diagnostics }, { "editorState", state }, { "plannedEffects", effects } };
98
121
  }
122
+ /// <summary>刷新前冻结事件序号;刷新后的编译是否发生完全由 Unity Asset Pipeline 决定。</summary>
99
123
  private void Dispatch(Dictionary<string, object> root)
100
124
  {
101
125
  var id = Text(root, "requestId"); if (!string.IsNullOrEmpty(activeDispatchRequestId)) return; activeDispatchRequestId = id;
102
- try { root = CrossEffectFence(root, "compile-dispatch", "dispatching"); var path = Text(root, "path"); if (!string.IsNullOrEmpty(path)) AssetDatabase.ImportAsset(path); else if (Bool(root, "refresh")) AssetDatabase.Refresh(Bool(root, "forceUpdate") ? ImportAssetOptions.ForceUpdate : ImportAssetOptions.Default); if (!EditorApplication.isCompiling) CompilationPipeline.RequestScriptCompilation(); Update(x => { if (Text(x, "phase") == "dispatching") x["phase"] = "awaiting_started"; }); }
103
- catch (Exception e) { Fail(root, "E_EXECUTION_TIMEOUT", "Compilation dispatch result cannot be confirmed: " + e.Message + "; check the business state."); }
126
+ try
127
+ {
128
+ var observationSequence = UnityCliCompilationEventBroker.CurrentCompilationEventSequence();
129
+ if (UnityCliCompilationEventBroker.SequenceCorrupt) throw new BridgeCommandException("E_EXECUTION_TIMEOUT", "Compilation event sequence is corrupt; refresh is forbidden.");
130
+ Update(x => { x["compileObservationSequence"] = observationSequence; x["stableFrames"] = 0L; });
131
+ root["compileObservationSequence"] = observationSequence;
132
+ root = CrossEffectFence(root, "asset-refresh-dispatch", "dispatching");
133
+ var path = Text(root, "path");
134
+ if (!string.IsNullOrEmpty(path)) AssetDatabase.ImportAsset(path);
135
+ else AssetDatabase.Refresh(Bool(root, "forceUpdate") ? ImportAssetOptions.ForceUpdate : ImportAssetOptions.Default);
136
+ Update(x => { if (Text(x, "phase") == "dispatching") x["phase"] = "awaiting_started"; });
137
+ }
138
+ catch (Exception e) { Fail(root, "E_EXECUTION_TIMEOUT", "Compilation refresh result cannot be confirmed: " + e.Message + "; check the business state."); }
104
139
  finally { activeDispatchRequestId = null; }
105
140
  }
106
141
  private void Complete(Dictionary<string, object> root) { if (Long(root, "diagnosticErrorCount") > 0) Fail(root, "E_UNITY_COMPILE_FAILED", "Unity reported compiler errors.", BuildCompileFailureDetails(root), new[] { "Fix the listed compiler diagnostics before retrying." }); else Succeed(root); }
@@ -108,13 +143,13 @@ namespace UnityCli
108
143
  {
109
144
  return new Dictionary<string, object>
110
145
  {
111
- { "compile", new Dictionary<string, object> { { "completed", true }, { "errorCount", Long(root, "diagnosticErrorCount") }, { "warningCount", Long(root, "diagnosticWarningCount") }, { "status", "errors" }, { "diagnosticsTruncated", Long(root, "diagnosticsTruncated") } } },
146
+ { "compile", new Dictionary<string, object> { { "completed", true }, { "compilationTriggered", true }, { "noOpReason", null }, { "errorCount", Long(root, "diagnosticErrorCount") }, { "warningCount", Long(root, "diagnosticWarningCount") }, { "status", "errors" }, { "diagnosticsTruncated", Long(root, "diagnosticsTruncated") } } },
112
147
  { "diagnostics", root["diagnostics"] }
113
148
  };
114
149
  }
115
150
  internal void BeforeReload() { Update(x => x["reloadObserved"] = true); }
116
151
  internal long CurrentOwnedCycle() { var root = Load(); return root != null && UnityCliSessionMutationLease.IsOwnedBy(Text(root, "requestId"), Text(root, "requestDigest")) ? Long(root, "startedCycle") : 0; }
117
- internal void OnCompilationStarted(long cycle, DateTime startedAt) { Update(x => { if (Text(x, "phase") == "dispatching" || Text(x, "phase") == "awaiting_started") { x["startedCycle"] = cycle; x["startedAt"] = startedAt.ToString("O", CultureInfo.InvariantCulture); x["phase"] = "compiling"; } }); }
152
+ internal void OnCompilationStarted(long cycle, long sequence, DateTime startedAt) { Update(x => { if ((Text(x, "phase") == "dispatching" || Text(x, "phase") == "awaiting_started") && sequence > Long(x, "compileObservationSequence")) { x["startedCycle"] = cycle; x["startedSequence"] = sequence; x["compilationObserved"] = true; x["stableFrames"] = 0L; x["phase"] = "compiling"; } }); }
118
153
  internal void OnAssemblyCompilationFinished(long cycle, List<Dictionary<string, object>> diagnostics) { Update(x => { if (Text(x, "phase") == "compiling" && Long(x, "startedCycle") == cycle) AppendBoundedDiagnostics(x, "diagnostics", "diagnosticErrorCount", "diagnosticWarningCount", "diagnosticInfoCount", "diagnosticsTruncated", Bool(x, "includeWarnings"), diagnostics); }); }
119
154
  internal void OnCompilationFinished(long cycle, DateTime finishedAt) { Update(x => { if (Text(x, "phase") == "compiling" && Long(x, "startedCycle") == cycle) { x["finishedAt"] = finishedAt.ToString("O", CultureInfo.InvariantCulture); x["phase"] = "cycle_finished"; } }); }
120
155
  }
@@ -128,51 +163,25 @@ namespace UnityCli
128
163
  internal static void BeforeReload() { operation.BeforeReload(); }
129
164
  internal static void Tick() { operation.Tick(); }
130
165
  internal static long CurrentOwnedCycle() { return operation.CurrentOwnedCycle(); }
131
- internal static void RequestRefreshCompilation(string requestId, string requestDigest)
132
- {
133
- if (!UnityCliSessionMutationLease.IsOwnedBy(requestId, requestDigest)) throw new BridgeCommandException("E_UNITY_BUSY", "Refresh root does not own the exact mutation lease.");
134
- var dispatchSequence = UnityCliCompilationEventBroker.CurrentCompilationEventSequence();
135
- if (UnityCliCompilationEventBroker.SequenceCorrupt)
136
- throw new BridgeCommandException("E_EXECUTION_TIMEOUT", "Refresh compilation sequence is corrupt; dispatch is forbidden.");
137
- var refreshRoot = UnityCliActiveOperation.Load("refresh");
138
- if (refreshRoot == null || Text(refreshRoot, "requestId") != requestId || Text(refreshRoot, "requestDigest") != requestDigest)
139
- throw new BridgeCommandException("E_EXECUTION_TIMEOUT", "Refresh compilation root identity cannot be proven.");
140
- if (UnityCliReloadOperation.HasExactEffectFence("refresh", refreshRoot, "compile-dispatch"))
141
- throw new BridgeCommandException("E_EXECUTION_TIMEOUT", "Refresh compilation effect fence was already crossed.");
142
- UnityCliReloadOperation.WriteEffectFence("refresh", refreshRoot, "compile-dispatch");
143
- UpdateRefresh(requestId, requestDigest, x =>
144
- {
145
- if (!Bool(x, "compile") || Bool(x, "compilationRequested") || Text(x, "phase") != "refresh_returned")
146
- throw new BridgeCommandException("E_EXECUTION_TIMEOUT", "Refresh compilation dispatch state is invalid.");
147
- x["compilationRequested"] = true; x["compileDispatchSequence"] = dispatchSequence; x["compilePhase"] = "dispatching";
148
- });
149
- var confirmed = UnityCliActiveOperation.Load("refresh");
150
- if (confirmed == null || Text(confirmed, "requestId") != requestId || Text(confirmed, "requestDigest") != requestDigest
151
- || Text(confirmed, "compilePhase") != "dispatching" || !UnityCliReloadOperation.HasExactEffectFence("refresh", confirmed, "compile-dispatch"))
152
- throw new BridgeCommandException("E_EXECUTION_TIMEOUT", "Refresh compilation post-fence state cannot be confirmed.");
153
- if (!UnityCliSessionMutationLease.IsOwnedBy(requestId, requestDigest)) throw new BridgeCommandException("E_EXECUTION_TIMEOUT", "Refresh lost its exact lease before compilation dispatch.");
154
- CompilationPipeline.RequestScriptCompilation();
155
- UpdateRefresh(requestId, requestDigest, x => { if (Text(x, "compilePhase") == "dispatching") x["compilePhase"] = "awaiting_started"; });
156
- }
157
166
  internal static void OnCompilationStarted(long cycle, long sequence, DateTime startedAt)
158
167
  {
159
- operation.OnCompilationStarted(cycle, startedAt);
160
- UpdateRefresh(null, null, x =>
168
+ operation.OnCompilationStarted(cycle, sequence, startedAt);
169
+ UpdateRefresh(x =>
161
170
  {
162
171
  var phase = Text(x, "compilePhase");
163
- if (Bool(x, "compile") && Bool(x, "compilationRequested")
164
- && (phase == "dispatching" || phase == "awaiting_started")
165
- && sequence > Long(x, "compileDispatchSequence"))
172
+ if (Bool(x, "compile") && Bool(x, "compilationObservationStarted")
173
+ && phase == "awaiting_started"
174
+ && sequence > Long(x, "compileObservationSequence"))
166
175
  {
167
176
  x["compileStartedCycle"] = cycle; x["compileStartedSequence"] = sequence;
168
- x["compilePhase"] = "compiling"; x["compilationObserved"] = true;
177
+ x["compilePhase"] = "compiling"; x["compilationObserved"] = true; x["stableFrames"] = 0L;
169
178
  }
170
179
  });
171
180
  }
172
181
  internal static void OnAssemblyCompilationFinished(long cycle, long sequence, string assembly, List<Dictionary<string, object>> diagnostics)
173
182
  {
174
183
  operation.OnAssemblyCompilationFinished(cycle, diagnostics);
175
- UpdateRefresh(null, null, x =>
184
+ UpdateRefresh(x =>
176
185
  {
177
186
  if (Text(x, "compilePhase") == "compiling" && Long(x, "compileStartedCycle") == cycle
178
187
  && sequence > Long(x, "compileStartedSequence"))
@@ -182,19 +191,17 @@ namespace UnityCli
182
191
  internal static void OnCompilationFinished(long cycle, long sequence, DateTime finishedAt)
183
192
  {
184
193
  operation.OnCompilationFinished(cycle, finishedAt);
185
- UpdateRefresh(null, null, x =>
194
+ UpdateRefresh(x =>
186
195
  {
187
196
  if (Text(x, "compilePhase") == "compiling" && Long(x, "compileStartedCycle") == cycle
188
197
  && sequence > Long(x, "compileStartedSequence"))
189
198
  { x["compileFinishedSequence"] = sequence; x["compilePhase"] = "cycle_finished"; }
190
199
  });
191
200
  }
192
- private static void UpdateRefresh(string id, string digest, Action<Dictionary<string, object>> action)
201
+ private static void UpdateRefresh(Action<Dictionary<string, object>> action)
193
202
  {
194
203
  if (!UnityCliActiveOperation.Exists("refresh")) return;
195
204
  var root = UnityCliActiveOperation.Load("refresh");
196
- if (id != null && Text(root, "requestId") != id) return;
197
- if (digest != null && Text(root, "requestDigest") != digest) throw new BridgeCommandException("E_REQUEST_ID_REUSED", "Refresh request identity changed during compilation dispatch.");
198
205
  if (!UnityCliSessionMutationLease.IsOwnedBy(Text(root, "requestId"), Text(root, "requestDigest"))) return;
199
206
  action(root);
200
207
  UnityCliActiveOperation.Save("refresh", root);
@@ -264,7 +271,7 @@ namespace UnityCli
264
271
  private static string Text(IDictionary<string, object> value, string key) { object item; return value != null && value.TryGetValue(key, out item) && item != null ? Convert.ToString(item, CultureInfo.InvariantCulture) : string.Empty; }
265
272
  private static bool Bool(IDictionary<string, object> value, string key) { object item; return value != null && value.TryGetValue(key, out item) && item is bool && (bool)item; }
266
273
  private static long Long(IDictionary<string, object> value, string key) { long result; return long.TryParse(Text(value, key), out result) ? result : 0; }
267
- private sealed class StartArgs { public bool? Refresh { get; set; } public string Path { get; set; } public bool? ForceUpdate { get; set; } public bool? ImportRecursive { get; set; } public bool? IncludeWarnings { get; set; } public string ExpectedEditorSessionId { get; set; } }
274
+ private sealed class StartArgs { public string Path { get; set; } public bool? ForceUpdate { get; set; } public bool? ImportRecursive { get; set; } public bool? IncludeWarnings { get; set; } public string ExpectedEditorSessionId { get; set; } }
268
275
  }
269
276
  }
270
277
  }
@@ -12,24 +12,6 @@ namespace UnityCli
12
12
  {
13
13
  public static partial class UnityCliBridge
14
14
  {
15
- private static List<object> CapabilitiesData()
16
- {
17
- return new List<object> {
18
- CapabilityData("camera", CameraCommands), CapabilityData("scene", SceneCommands), CapabilityData("go", GameObjectCommands), CapabilityData("asset", AssetCommands),
19
- CapabilityData("screenshot", ScreenshotCommands), CapabilityData("prefab", PrefabCommands), CapabilityData("ui", UiCommands),
20
- CapabilityData("material", MaterialCommands), CapabilityData("graphics", GraphicsCommands), CapabilityData("physics", PhysicsCommands), CapabilityData("scriptable-object", ScriptableObjectCommands),
21
- CapabilityData("profiler", ProfilerCommands), CapabilityData("animation", AnimationCommands), CapabilityData("shader", ShaderCommands), CapabilityData("texture", TextureCommands),
22
- CapabilityData("editor", EditorCommands), CapabilityData("code", CodeCommands), CapabilityData("project-tool", ProjectToolCommands), CapabilityData("runtime-tool", RuntimeToolCommands)
23
- };
24
- }
25
-
26
- private static bool IsMutatingCommand(string command) => CommandRegistry.IsMutating(command);
27
-
28
- private static Dictionary<string, object> CapabilityData(string domain, string[] commands)
29
- {
30
- return new Dictionary<string, object> { { "domain", domain }, { "route", "POST /bridge/execute" }, { "commands", (commands ?? Array.Empty<string>()).Cast<object>().ToList() } };
31
- }
32
-
33
15
  private static string HierarchyPath(GameObject gameObject)
34
16
  {
35
17
  var names = new Stack<string>();
@@ -47,14 +47,18 @@ namespace UnityCli
47
47
  {
48
48
  ValidateRootContract(root, new[]
49
49
  {
50
- "compile", "compilationRequested", "compilationObserved", "compilePhase", "compileDispatchSequence", "compileStartedSequence", "compileFinishedSequence", "compileStartedCycle",
50
+ "compile", "compilationObservationStarted", "compilationObserved", "compilePhase", "compileObservationSequence", "compileStartedSequence", "compileFinishedSequence", "compileStartedCycle",
51
51
  "compileDiagnostics", "compileErrorCount", "compileWarningCount", "compileInfoCount", "compileDiagnosticsTruncated", "stableFrames",
52
52
  "beforeDependencyGeneration", "beforeProcessedGeneration", "importObserved", "reloadObserved", "rootContractDigest"
53
53
  }, "queued", "prepared", "dispatching", "refresh_returned", "waiting_stable");
54
- object compile; object requested; object observed; object diagnostics; object errorCount; object warningCount; object infoCount; object truncated; object stableFrames;
54
+ object compile; object observationStarted; object observed; object sequence; object diagnostics; object errorCount; object warningCount; object infoCount; object truncated; object stableFrames;
55
55
  if (!root.TryGetValue("compile", out compile) || !(compile is bool)
56
- || !root.TryGetValue("compilationRequested", out requested) || !(requested is bool)
56
+ || !root.TryGetValue("compilationObservationStarted", out observationStarted) || !(observationStarted is bool)
57
57
  || !root.TryGetValue("compilationObserved", out observed) || !(observed is bool)
58
+ || !root.TryGetValue("compileObservationSequence", out sequence) || !(sequence is long) || (long)sequence < 0L
59
+ || !root.TryGetValue("compileStartedSequence", out sequence) || !(sequence is long) || (long)sequence < 0L
60
+ || !root.TryGetValue("compileFinishedSequence", out sequence) || !(sequence is long) || (long)sequence < 0L
61
+ || !root.TryGetValue("compileStartedCycle", out sequence) || !(sequence is long) || (long)sequence < 0L
58
62
  || !root.TryGetValue("compileDiagnostics", out diagnostics) || !(diagnostics is List<object>)
59
63
  || !root.TryGetValue("compileErrorCount", out errorCount) || !(errorCount is long) || (long)errorCount < 0L || (long)errorCount > 1000000L
60
64
  || !root.TryGetValue("compileWarningCount", out warningCount) || !(warningCount is long) || (long)warningCount < 0L || (long)warningCount > 1000000L
@@ -68,14 +72,16 @@ namespace UnityCli
68
72
  if (!string.Equals(Text(root, "rootContractDigest"), RefreshRootContractDigest(root), StringComparison.Ordinal)) throw new InvalidDataException("Refresh immutable root contract changed.");
69
73
  UnityCliCompileCoordinator.ValidateBoundedDiagnostics(root, "compileDiagnostics", "compileErrorCount", "compileWarningCount", "compileInfoCount", "compileDiagnosticsTruncated", true);
70
74
  var compilePhase = Text(root, "compilePhase");
71
- if (Array.IndexOf(new[] { "idle", "dispatching", "awaiting_started", "compiling", "cycle_finished" }, compilePhase) < 0) throw new InvalidDataException("Refresh compile phase is invalid.");
75
+ if (Array.IndexOf(new[] { "idle", "awaiting_started", "compiling", "cycle_finished" }, compilePhase) < 0) throw new InvalidDataException("Refresh compile phase is invalid.");
72
76
  var refreshFenced = HasExactEffectFence("refresh", root, "refresh-dispatch");
73
77
  var phase = Text(root, "phase");
74
78
  if ((phase == "queued" || phase == "prepared") == refreshFenced) throw new InvalidDataException("Refresh effect fence is inconsistent with phase.");
75
- var compileFenced = HasExactEffectFence("refresh", root, "compile-dispatch");
76
- if ((compilePhase == "idle") == compileFenced) throw new InvalidDataException("Refresh compile fence is inconsistent with phase.");
77
- if (Bool(root, "compilationObserved") && (Long(root, "compileStartedCycle") <= 0L || Long(root, "compileStartedSequence") <= Long(root, "compileDispatchSequence")))
79
+ if ((bool)observationStarted != ((bool)compile && compilePhase != "idle")) throw new InvalidDataException("Refresh compile observation state is inconsistent.");
80
+ if ((bool)observed != (compilePhase == "compiling" || compilePhase == "cycle_finished")) throw new InvalidDataException("Refresh compile observed state is inconsistent with phase.");
81
+ if ((bool)observed && (Long(root, "compileStartedCycle") <= 0L || Long(root, "compileStartedSequence") <= Long(root, "compileObservationSequence")))
78
82
  throw new InvalidDataException("Refresh compile attribution is invalid.");
83
+ if (compilePhase == "cycle_finished" && Long(root, "compileFinishedSequence") <= Long(root, "compileStartedSequence"))
84
+ throw new InvalidDataException("Refresh compile finish attribution is invalid.");
79
85
  }
80
86
 
81
87
  private static string RefreshRootContractDigest(Dictionary<string, object> root)
@@ -101,8 +107,8 @@ namespace UnityCli
101
107
  var root = new Dictionary<string, object>
102
108
  {
103
109
  { "requestId", request.RequestId }, { "editorSessionId", EditorSessionId() }, { "requestDigest", digest }, { "deadline", request.Execution.AbsoluteDeadlineUtc },
104
- { "phase", "queued" }, { "compile", args.Compile }, { "compilationRequested", false }, { "compilationObserved", false }, { "compilePhase", "idle" },
105
- { "compileDispatchSequence", 0L }, { "compileStartedSequence", 0L }, { "compileFinishedSequence", 0L }, { "compileStartedCycle", 0L },
110
+ { "phase", "queued" }, { "compile", args.Compile }, { "compilationObservationStarted", false }, { "compilationObserved", false }, { "compilePhase", "idle" },
111
+ { "compileObservationSequence", 0L }, { "compileStartedSequence", 0L }, { "compileFinishedSequence", 0L }, { "compileStartedCycle", 0L },
106
112
  { "compileDiagnostics", new List<object>() }, { "compileErrorCount", 0L }, { "compileWarningCount", 0L }, { "compileInfoCount", 0L }, { "compileDiagnosticsTruncated", 0L },
107
113
  { "stableFrames", 0L }, { "beforeDependencyGeneration", before.DependencyGeneration }, { "beforeProcessedGeneration", before.ProcessedGeneration },
108
114
  { "importObserved", false }, { "reloadObserved", false }
@@ -119,24 +125,22 @@ namespace UnityCli
119
125
  if (phase == "queued") { if (BusyEditor()) return; Update(value => value["phase"] = "prepared"); return; }
120
126
  if (phase == "prepared")
121
127
  {
128
+ if (Bool(root, "compile"))
129
+ {
130
+ var observationSequence = UnityCliCompilationEventBroker.CurrentCompilationEventSequence();
131
+ if (UnityCliCompilationEventBroker.SequenceCorrupt) { Fail(root, "E_EXECUTION_TIMEOUT", "Refresh compilation event sequence is corrupt; attributed outcome is unknown."); return; }
132
+ Update(value => { value["compilationObservationStarted"] = true; value["compileObservationSequence"] = observationSequence; value["compilePhase"] = "awaiting_started"; value["stableFrames"] = 0L; });
133
+ root["compilationObservationStarted"] = true; root["compileObservationSequence"] = observationSequence; root["compilePhase"] = "awaiting_started";
134
+ }
122
135
  root = CrossEffectFence(root, "refresh-dispatch", "dispatching");
123
136
  try { AssetDatabase.Refresh(); Update(value => value["phase"] = "refresh_returned"); }
124
137
  catch (Exception exception) { Fail(root, "E_EXECUTION_TIMEOUT", "Refresh result cannot be confirmed: " + exception.Message + "; inspect asset state."); }
125
138
  return;
126
139
  }
127
- if (phase == "refresh_returned")
128
- {
129
- if (Bool(root, "compile") && !Bool(root, "compilationObserved") && !Bool(root, "compilationRequested"))
130
- {
131
- if (BusyEditor()) return;
132
- UnityCliCompileCoordinator.RequestRefreshCompilation(Text(root, "requestId"), Text(root, "requestDigest"));
133
- return;
134
- }
135
- Update(value => value["phase"] = "waiting_stable");
136
- return;
137
- }
140
+ if (phase == "refresh_returned") { Update(value => value["phase"] = "waiting_stable"); return; }
138
141
  if (phase != "waiting_stable" || BusyEditor()) return;
139
- if (Bool(root, "compile") && (!Bool(root, "compilationObserved") || Text(root, "compilePhase") != "cycle_finished"))
142
+ var compilePhase = Text(root, "compilePhase");
143
+ if (Bool(root, "compile") && compilePhase != "awaiting_started" && compilePhase != "cycle_finished")
140
144
  {
141
145
  Fail(root, "E_EXECUTION_TIMEOUT", "Refresh compilation result cannot be confirmed; inspect editor.state and compile diagnostics.");
142
146
  return;
@@ -152,6 +156,7 @@ namespace UnityCli
152
156
  return;
153
157
  }
154
158
  var frames = Long(root, "stableFrames") + 1L;
159
+ root["stableFrames"] = frames;
155
160
  Update(value => value["stableFrames"] = frames);
156
161
  if (frames >= 3L) Succeed(root);
157
162
  }
@@ -11,7 +11,7 @@ namespace UnityCli
11
11
  public static partial class UnityCliBridge
12
12
  {
13
13
  /// <summary>
14
- /// object.modify 与 component.modify 共用的 verified SerializedProperty patch 引擎。
14
+ /// serialized-object.patch 与 component.modify 共用的 verified SerializedProperty patch 引擎。
15
15
  /// 公开契约只允许非空 direct replace,不保留 reflection merge/add/remove 旁路。
16
16
  /// </summary>
17
17
  internal static class ObjectPatch
@@ -99,7 +99,7 @@ namespace UnityCli
99
99
 
100
100
  throw new BridgeCommandException("E_OBJECTREF_REQUIRED",
101
101
  "Object reference required: pass instanceId, assetPath/guid, or path/name.",
102
- "Run object.get-data --input '{\"instanceId\":12345}' or '{\"assetPath\":\"Assets/Mat.mat\"}'.");
102
+ "Run serialized-object.read --input '{\"instanceId\":12345}' or '{\"assetPath\":\"Assets/Mat.mat\"}'.");
103
103
  }
104
104
 
105
105
  /// <summary>解析 GameObject 引用。</summary>
@@ -127,12 +127,12 @@ namespace UnityCli
127
127
  if (go != null) return go;
128
128
  throw new BridgeCommandException("E_OBJECTREF_GAMEOBJECT_REQUIRED",
129
129
  "No GameObject matched path/name '" + path + "' in any loaded scene.",
130
- "Run go.find to locate the GameObject and obtain its instanceId, then pass that instanceId.");
130
+ "Run game-object.find to locate the GameObject and obtain its instanceId, then pass that instanceId.");
131
131
  }
132
132
 
133
133
  throw new BridgeCommandException("E_OBJECTREF_GAMEOBJECT_REQUIRED",
134
134
  "GameObject reference required: pass instanceId or path/name.",
135
- "Run go.find to locate the GameObject and obtain its instanceId.");
135
+ "Run game-object.find to locate the GameObject and obtain its instanceId.");
136
136
  }
137
137
 
138
138
  /// <summary>
@@ -282,7 +282,7 @@ namespace UnityCli
282
282
  var secondPath = UnityCliHierarchyPager.Path(second, budget);
283
283
  throw new BridgeCommandException("E_OBJECTREF_AMBIGUOUS",
284
284
  "Path '" + path + "' matches multiple GameObjects: " + firstPath + ", " + secondPath,
285
- "Pass the instanceId from go.find to disambiguate objects in different loaded scenes.");
285
+ "Pass the instanceId from game-object.find to disambiguate objects in different loaded scenes.");
286
286
  }
287
287
 
288
288
  /// <summary>
@@ -373,7 +373,7 @@ namespace UnityCli
373
373
  }
374
374
  throw new BridgeCommandException("E_OBJECTREF_AMBIGUOUS",
375
375
  "Path '" + path + "' matches " + matches.Count + " GameObjects: " + string.Join(", ", candidates),
376
- "Pass the full hierarchy path from a scene root, or use go.find to obtain the instanceId.");
376
+ "Pass the full hierarchy path from a scene root, or use game-object.find to obtain the instanceId.");
377
377
  }
378
378
  }
379
379
  }