@alpsckr/unitycli 0.4.2 → 0.4.4

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 (420) hide show
  1. package/README.md +5 -5
  2. package/contracts/command-contract.json +109 -217
  3. package/contracts/package-files.json +374 -294
  4. package/contracts/stable-session/direct-call-semantics.json +8 -2
  5. package/contracts/tool-completion-contract.json +148 -672
  6. package/dist/bridge/admission.d.ts +17 -1
  7. package/dist/bridge/admission.js +2 -0
  8. package/dist/bridge/admission.js.map +1 -1
  9. package/dist/bridge/domains/asset.js +3 -1
  10. package/dist/bridge/domains/asset.js.map +1 -1
  11. package/dist/bridge/domains/camera.js +39 -7
  12. package/dist/bridge/domains/camera.js.map +1 -1
  13. package/dist/bridge/domains/console.js +2 -1
  14. package/dist/bridge/domains/console.js.map +1 -1
  15. package/dist/bridge/domains/doctor.d.ts +3 -0
  16. package/dist/bridge/domains/doctor.js +8 -0
  17. package/dist/bridge/domains/doctor.js.map +1 -0
  18. package/dist/bridge/domains/editor.js +0 -4
  19. package/dist/bridge/domains/editor.js.map +1 -1
  20. package/dist/bridge/domains/game-object.js +4 -12
  21. package/dist/bridge/domains/game-object.js.map +1 -1
  22. package/dist/bridge/domains/graphics.js +1 -16
  23. package/dist/bridge/domains/graphics.js.map +1 -1
  24. package/dist/bridge/domains/object.js +3 -0
  25. package/dist/bridge/domains/object.js.map +1 -1
  26. package/dist/bridge/domains/physics.js +1 -2
  27. package/dist/bridge/domains/physics.js.map +1 -1
  28. package/dist/bridge/domains/profiler.js +18 -7
  29. package/dist/bridge/domains/profiler.js.map +1 -1
  30. package/dist/bridge/domains/project-tool.js +4 -0
  31. package/dist/bridge/domains/project-tool.js.map +1 -1
  32. package/dist/bridge/domains/reflection.js +10 -2
  33. package/dist/bridge/domains/reflection.js.map +1 -1
  34. package/dist/bridge/domains/runtime-tool.js +3 -0
  35. package/dist/bridge/domains/runtime-tool.js.map +1 -1
  36. package/dist/bridge/domains/scene.js +3 -8
  37. package/dist/bridge/domains/scene.js.map +1 -1
  38. package/dist/bridge/domains/screenshot.js +30 -6
  39. package/dist/bridge/domains/screenshot.js.map +1 -1
  40. package/dist/bridge/domains/ui.js +3 -1
  41. package/dist/bridge/domains/ui.js.map +1 -1
  42. package/dist/bridge/index.d.ts +5 -5
  43. package/dist/bridge/index.js +6 -9
  44. package/dist/bridge/index.js.map +1 -1
  45. package/dist/bridge/registry.js +3 -5
  46. package/dist/bridge/registry.js.map +1 -1
  47. package/dist/bridge/session-supervisor.d.ts +6 -3
  48. package/dist/bridge/session-supervisor.js +122 -34
  49. package/dist/bridge/session-supervisor.js.map +1 -1
  50. package/dist/bridge/types.d.ts +6 -5
  51. package/dist/bridge/types.js +16 -2
  52. package/dist/bridge/types.js.map +1 -1
  53. package/dist/catalog-protocol.d.ts +64 -0
  54. package/dist/catalog-protocol.js +460 -0
  55. package/dist/catalog-protocol.js.map +1 -0
  56. package/dist/cli-commands/command.js +84 -61
  57. package/dist/cli-commands/command.js.map +1 -1
  58. package/dist/cli-commands/extensions.js +70 -50
  59. package/dist/cli-commands/extensions.js.map +1 -1
  60. package/dist/cli-commands/instances.js +1 -1
  61. package/dist/cli-commands/instances.js.map +1 -1
  62. package/dist/cli-process-owners.d.ts +6 -0
  63. package/dist/cli-process-owners.js +27 -0
  64. package/dist/cli-process-owners.js.map +1 -0
  65. package/dist/cli.d.ts +1 -1
  66. package/dist/cli.js +20 -5
  67. package/dist/cli.js.map +1 -1
  68. package/dist/contracts/command-contract.js +14 -4
  69. package/dist/contracts/command-contract.js.map +1 -1
  70. package/dist/doctor.d.ts +4 -6
  71. package/dist/doctor.js +429 -398
  72. package/dist/doctor.js.map +1 -1
  73. package/dist/editor-blocker-observer.d.ts +2 -1
  74. package/dist/editor-blocker-observer.js +40 -13
  75. package/dist/editor-blocker-observer.js.map +1 -1
  76. package/dist/extension-availability.d.ts +27 -9
  77. package/dist/extension-availability.js +96 -56
  78. package/dist/extension-availability.js.map +1 -1
  79. package/dist/extensions/descriptor-loader.d.ts +2 -2
  80. package/dist/extensions/descriptor-loader.js +3 -4
  81. package/dist/extensions/descriptor-loader.js.map +1 -1
  82. package/dist/extensions/index.d.ts +1 -1
  83. package/dist/extensions/index.js +1 -1
  84. package/dist/extensions/index.js.map +1 -1
  85. package/dist/extensions/installer.d.ts +24 -7
  86. package/dist/extensions/installer.js +142 -66
  87. package/dist/extensions/installer.js.map +1 -1
  88. package/dist/extensions/registry.js +3 -5
  89. package/dist/extensions/registry.js.map +1 -1
  90. package/dist/extensions/state-contract.d.ts +11 -0
  91. package/dist/extensions/state-contract.js +50 -0
  92. package/dist/extensions/state-contract.js.map +1 -0
  93. package/dist/instances.d.ts +13 -1
  94. package/dist/instances.js +26 -0
  95. package/dist/instances.js.map +1 -1
  96. package/dist/package-manager.d.ts +0 -24
  97. package/dist/package-manager.js +5 -58
  98. package/dist/package-manager.js.map +1 -1
  99. package/dist/project-tool-discovery.d.ts +5 -2
  100. package/dist/project-tool-discovery.js +22 -18
  101. package/dist/project-tool-discovery.js.map +1 -1
  102. package/dist/runtime-code.js +1 -1
  103. package/dist/runtime-code.js.map +1 -1
  104. package/dist/tool-name.d.ts +4 -0
  105. package/dist/tool-name.js +15 -0
  106. package/dist/tool-name.js.map +1 -0
  107. package/dist/tools/.generated-completion-registry.d.ts +2 -0
  108. package/dist/tools/.generated-completion-registry.js +763 -325
  109. package/dist/tools/.generated-completion-registry.js.map +1 -1
  110. package/dist/tools/.generated-registry.d.ts +6 -11
  111. package/dist/tools/.generated-registry.js +6 -11
  112. package/dist/tools/.generated-registry.js.map +1 -1
  113. package/dist/tools/.generated-schemas.js +11 -16
  114. package/dist/tools/.generated-schemas.js.map +1 -1
  115. package/dist/tools/asset/refresh-status.d.ts +3 -0
  116. package/dist/tools/asset/refresh-status.js +12 -0
  117. package/dist/tools/asset/refresh-status.js.map +1 -0
  118. package/dist/tools/asset/refresh.js +7 -3
  119. package/dist/tools/asset/refresh.js.map +1 -1
  120. package/dist/tools/build/player-status.d.ts +3 -0
  121. package/dist/tools/build/player-status.js +12 -0
  122. package/dist/tools/build/player-status.js.map +1 -0
  123. package/dist/tools/build/run.js +1 -1
  124. package/dist/tools/build/run.js.map +1 -1
  125. package/dist/tools/catalog-control.d.ts +22 -0
  126. package/dist/tools/catalog-control.js +335 -0
  127. package/dist/tools/catalog-control.js.map +1 -0
  128. package/dist/tools/catalog.d.ts +7 -9
  129. package/dist/tools/catalog.js +66 -45
  130. package/dist/tools/catalog.js.map +1 -1
  131. package/dist/tools/commands.d.ts +1 -1
  132. package/dist/tools/commands.js +44 -11
  133. package/dist/tools/commands.js.map +1 -1
  134. package/dist/tools/define.js +3 -2
  135. package/dist/tools/define.js.map +1 -1
  136. package/dist/tools/dispatcher.d.ts +53 -6
  137. package/dist/tools/dispatcher.js +277 -108
  138. package/dist/tools/dispatcher.js.map +1 -1
  139. package/dist/tools/editor/compile.js +1 -1
  140. package/dist/tools/editor/compile.js.map +1 -1
  141. package/dist/tools/editor/play-mode-status.d.ts +3 -0
  142. package/dist/tools/editor/play-mode-status.js +12 -0
  143. package/dist/tools/editor/play-mode-status.js.map +1 -0
  144. package/dist/tools/editor/readiness.d.ts +0 -1
  145. package/dist/tools/editor/readiness.js +0 -1
  146. package/dist/tools/editor/readiness.js.map +1 -1
  147. package/dist/tools/editor/refresh.d.ts +7 -3
  148. package/dist/tools/editor/refresh.js +20 -15
  149. package/dist/tools/editor/refresh.js.map +1 -1
  150. package/dist/tools/editor/state.d.ts +2 -2
  151. package/dist/tools/editor/state.js +13 -12
  152. package/dist/tools/editor/state.js.map +1 -1
  153. package/dist/tools/metadata/derived.js +1 -7
  154. package/dist/tools/metadata/derived.js.map +1 -1
  155. package/dist/tools/metadata/status.js +1 -12
  156. package/dist/tools/metadata/status.js.map +1 -1
  157. package/dist/tools/metadata/types.d.ts +0 -2
  158. package/dist/tools/navmesh/live.js +1 -1
  159. package/dist/tools/navmesh/live.js.map +1 -1
  160. package/dist/tools/occlusion/live.js +1 -1
  161. package/dist/tools/occlusion/live.js.map +1 -1
  162. package/dist/tools/package/deploy.js +2 -2
  163. package/dist/tools/package/deploy.js.map +1 -1
  164. package/dist/tools/package/embed.js +1 -1
  165. package/dist/tools/package/embed.js.map +1 -1
  166. package/dist/tools/package/install-status.d.ts +3 -0
  167. package/dist/tools/package/install-status.js +12 -0
  168. package/dist/tools/package/install-status.js.map +1 -0
  169. package/dist/tools/package/install.js +3 -3
  170. package/dist/tools/package/install.js.map +1 -1
  171. package/dist/tools/package/live-resolve.js +45 -12
  172. package/dist/tools/package/live-resolve.js.map +1 -1
  173. package/dist/tools/package/registry-clear.js.map +1 -1
  174. package/dist/tools/package/registry-set.js.map +1 -1
  175. package/dist/tools/package/remove-status.d.ts +3 -0
  176. package/dist/tools/package/remove-status.js +12 -0
  177. package/dist/tools/package/remove-status.js.map +1 -0
  178. package/dist/tools/package/remove.js +3 -3
  179. package/dist/tools/package/remove.js.map +1 -1
  180. package/dist/tools/package/resolve.js +3 -3
  181. package/dist/tools/package/resolve.js.map +1 -1
  182. package/dist/tools/package/restore.js +2 -2
  183. package/dist/tools/package/restore.js.map +1 -1
  184. package/dist/tools/package/scoped-registry-add.js.map +1 -1
  185. package/dist/tools/status/support.d.ts +13 -0
  186. package/dist/tools/status/support.js +28 -0
  187. package/dist/tools/status/support.js.map +1 -0
  188. package/dist/tools/test/cancel.js +2 -2
  189. package/dist/tools/test/cancel.js.map +1 -1
  190. package/dist/tools/test/run-status.d.ts +3 -0
  191. package/dist/tools/test/run-status.js +12 -0
  192. package/dist/tools/test/run-status.js.map +1 -0
  193. package/dist/tools/test/run.js +7 -4
  194. package/dist/tools/test/run.js.map +1 -1
  195. package/dist/tools/tools/group-summaries.js +10 -14
  196. package/dist/tools/tools/group-summaries.js.map +1 -1
  197. package/docs/architecture.md +4 -4
  198. package/docs/availability-differences.md +4 -4
  199. package/docs/command-execution.md +4 -3
  200. package/docs/error-codes.md +13 -5
  201. package/docs/extensions.md +1 -7
  202. package/docs/risk-and-side-effects.md +4 -3
  203. package/docs/safety-boundaries.md +3 -1
  204. package/docs/target-and-instance.md +1 -1
  205. package/docs/tool-discovery.md +17 -10
  206. package/docs/tool-execution.md +18 -7
  207. package/extensions/cinemachine/unitypkg/Editor/UnityCliExtensionAssembly.cs +3 -0
  208. package/extensions/hdrp/unitypkg/Editor/UnityCliExtensionAssembly.cs +3 -0
  209. package/extensions/probuilder/unitypkg/Editor/UnityCliExtensionAssembly.cs +3 -0
  210. package/extensions/urp/unitypkg/Editor/UnityCliExtensionAssembly.cs +3 -0
  211. package/extensions/vfx-graph/unitypkg/Editor/UnityCliExtensionAssembly.cs +3 -0
  212. package/package.json +2 -4
  213. package/skills/unitycli/SKILL.md +35 -42
  214. package/skills/unitycli/manifest.json +1 -1
  215. package/skills/unitycli/references/operation-protocol.md +3 -3
  216. package/unitypkg/Editor/AssemblyInfo.cs +5 -0
  217. package/unitypkg/Editor/Bridge/BridgeCommandRegistry.cs +49 -14
  218. package/unitypkg/Editor/Bridge/BridgeHttpServer.cs +9 -35
  219. package/unitypkg/Editor/Bridge/BridgeQueueState.cs +672 -0
  220. package/unitypkg/Editor/Bridge/BridgeWorkQueue.cs +970 -120
  221. package/unitypkg/Editor/BridgeStartupStateMachine.cs +59 -1
  222. package/unitypkg/Editor/Commands/ProjectToolCommands.cs +4 -0
  223. package/unitypkg/Editor/Commands/RuntimeToolCommands.cs +3 -0
  224. package/unitypkg/Editor/Generated/UnityCliToolCompletionRegistry.g.cs +379 -14
  225. package/unitypkg/Editor/Infrastructure/CodeExecSupport.cs +28 -13
  226. package/unitypkg/Editor/Infrastructure/RegistryOwnershipResolver.cs +132 -105
  227. package/unitypkg/Editor/Infrastructure/UnityCliActiveOperation.cs +138 -29
  228. package/unitypkg/Editor/Infrastructure/UnityCliAdmission.cs +1856 -237
  229. package/unitypkg/Editor/Infrastructure/UnityCliDoctorDiagnostics.cs +220 -0
  230. package/unitypkg/Editor/Infrastructure/UnityCliDurableStatusCoordinator.cs +118 -0
  231. package/unitypkg/Editor/Infrastructure/UnityCliEditorStateSnapshot.cs +2 -1
  232. package/unitypkg/Editor/Infrastructure/UnityCliHierarchyPager.cs +203 -0
  233. package/unitypkg/Editor/Infrastructure/UnityCliInstanceCleanup.cs +2 -1
  234. package/unitypkg/Editor/Infrastructure/UnityCliInstanceRegistry.cs +201 -63
  235. package/unitypkg/Editor/Infrastructure/UnityCliJson.cs +2 -3
  236. package/unitypkg/Editor/Infrastructure/UnityCliLiveBuildCoordinator.cs +289 -46
  237. package/unitypkg/Editor/Infrastructure/UnityCliLiveRefreshCoordinator.cs +87 -53
  238. package/unitypkg/Editor/Infrastructure/UnityCliNavMeshBakeCoordinator.cs +4 -4
  239. package/unitypkg/Editor/Infrastructure/UnityCliObjectRef.cs +128 -25
  240. package/unitypkg/Editor/Infrastructure/UnityCliObjectSerializer.cs +435 -327
  241. package/unitypkg/Editor/Infrastructure/UnityCliOcclusionBakeCoordinator.cs +4 -4
  242. package/unitypkg/Editor/Infrastructure/UnityCliOperationCoordinator.cs +351 -53
  243. package/unitypkg/Editor/Infrastructure/UnityCliPackageResolveCoordinator.cs +118 -18
  244. package/unitypkg/Editor/Infrastructure/UnityCliPackageResolveState.cs +20 -1
  245. package/unitypkg/Editor/Infrastructure/UnityCliReadGeneration.cs +97 -0
  246. package/unitypkg/Editor/Infrastructure/UnityCliReflection.cs +644 -133
  247. package/unitypkg/Editor/Infrastructure/UnityCliReloadOperation.cs +128 -41
  248. package/unitypkg/Editor/Infrastructure/UnityCliRuntimeExecutor.cs +14 -84
  249. package/unitypkg/Editor/Infrastructure/UnityCliSerializer.cs +220 -0
  250. package/unitypkg/Editor/Infrastructure/UnityCliSessionMutationLease.cs +69 -29
  251. package/unitypkg/Editor/Infrastructure/UnityCliTestRunCoordinator.cs +440 -54
  252. package/unitypkg/Editor/Infrastructure/UnityCliWaiter.cs +128 -35
  253. package/unitypkg/Editor/ProjectTools/IUnityCliTool.cs +9 -1
  254. package/unitypkg/Editor/ProjectTools/OfficialAttributeToolRegistry.cs +32 -31
  255. package/unitypkg/Editor/ProjectTools/ProjectToolRegistry.cs +607 -458
  256. package/unitypkg/Editor/ProjectTools/ProjectToolSchemaValidator.cs +35 -7
  257. package/unitypkg/Editor/ProjectTools/RegisteredTool.cs +501 -60
  258. package/unitypkg/Editor/ProjectTools/UnityCliProjectToolContext.cs +21 -0
  259. package/unitypkg/Editor/ProjectTools/UnityCliSchemaDeriver.cs +36 -7
  260. package/unitypkg/Editor/ProjectTools/UnityCliToolName.cs +30 -0
  261. package/unitypkg/Editor/Properties/AssemblyInfo.cs +3 -0
  262. package/unitypkg/Editor/Tools/asset/get-data.cs +16 -7
  263. package/unitypkg/Editor/Tools/build/BuildSceneStateTool.cs +23 -3
  264. package/unitypkg/Editor/Tools/build/BuildToolDtos.cs +2 -1
  265. package/unitypkg/Editor/Tools/build/scene/add.cs +6 -3
  266. package/unitypkg/Editor/Tools/build/scene/disable.cs +1 -1
  267. package/unitypkg/Editor/Tools/build/scene/enable.cs +1 -1
  268. package/unitypkg/Editor/Tools/build/scene/list.cs +1 -1
  269. package/unitypkg/Editor/Tools/build/scene/remove.cs +13 -3
  270. package/unitypkg/Editor/Tools/camera/CameraToolSupport.cs +38 -38
  271. package/unitypkg/Editor/Tools/camera/multiview.cs +13 -6
  272. package/unitypkg/Editor/Tools/camera/screenshot.cs +14 -7
  273. package/unitypkg/Editor/Tools/component/get.cs +16 -9
  274. package/unitypkg/Editor/Tools/component/modify.cs +6 -4
  275. package/unitypkg/Editor/Tools/console/clear.cs +7 -6
  276. package/unitypkg/Editor/Tools/console/get.cs +48 -16
  277. package/unitypkg/Editor/Tools/editor/EditorToolSupport.cs +143 -28
  278. package/unitypkg/Editor/Tools/editor/menu-items.cs +1 -1
  279. package/unitypkg/Editor/Tools/editor/play.cs +2 -11
  280. package/unitypkg/Editor/Tools/editor/selection.cs +1 -1
  281. package/unitypkg/Editor/Tools/editor/stop.cs +2 -11
  282. package/unitypkg/Editor/Tools/editor/windows.cs +1 -1
  283. package/unitypkg/Editor/Tools/go/GameObjectToolSupport.cs +54 -4
  284. package/unitypkg/Editor/Tools/go/delete.cs +1 -1
  285. package/unitypkg/Editor/Tools/go/find.cs +167 -70
  286. package/unitypkg/Editor/Tools/graphics/GraphicsToolSupport.cs +25 -0
  287. package/unitypkg/Editor/Tools/graphics/light-probe-group.cs +9 -3
  288. package/unitypkg/Editor/Tools/graphics/pipeline-info.cs +1 -1
  289. package/unitypkg/Editor/Tools/graphics/pipeline-settings.cs +1 -1
  290. package/unitypkg/Editor/Tools/graphics/quality.cs +2 -2
  291. package/unitypkg/Editor/Tools/graphics/reflection-probe.cs +3 -3
  292. package/unitypkg/Editor/Tools/graphics/stats.cs +1 -1
  293. package/unitypkg/Editor/Tools/object/ObjectToolSupport.cs +4 -4
  294. package/unitypkg/Editor/Tools/object/get-data.cs +9 -7
  295. package/unitypkg/Editor/Tools/object/modify.cs +7 -5
  296. package/unitypkg/Editor/Tools/physics/raycast.cs +24 -6
  297. package/unitypkg/Editor/Tools/prefab/stage.cs +1 -1
  298. package/unitypkg/Editor/Tools/profiler/ProfilerFrameDebuggerSupport.cs +94 -21
  299. package/unitypkg/Editor/Tools/profiler/ProfilerMemorySnapshotSupport.cs +397 -10
  300. package/unitypkg/Editor/Tools/profiler/ProfilerToolSupport.cs +18 -4
  301. package/unitypkg/Editor/Tools/profiler/frame-debugger/enable.cs +1 -1
  302. package/unitypkg/Editor/Tools/profiler/frame-debugger/events.cs +88 -87
  303. package/unitypkg/Editor/Tools/profiler/hierarchy.cs +278 -112
  304. package/unitypkg/Editor/Tools/profiler/memory-snapshot/compare.cs +9 -5
  305. package/unitypkg/Editor/Tools/profiler/memory-snapshot/list.cs +37 -35
  306. package/unitypkg/Editor/Tools/profiler/memory-snapshot/take.cs +99 -97
  307. package/unitypkg/Editor/Tools/project/info.cs +1 -1
  308. package/unitypkg/Editor/Tools/project/layers.cs +1 -1
  309. package/unitypkg/Editor/Tools/project/tags.cs +1 -1
  310. package/unitypkg/Editor/Tools/reflection/method/call.cs +9 -7
  311. package/unitypkg/Editor/Tools/reflection/method/find.cs +27 -37
  312. package/unitypkg/Editor/Tools/reflection/type/schema.cs +24 -28
  313. package/unitypkg/Editor/Tools/scene/gameobject/component.cs +8 -5
  314. package/unitypkg/Editor/Tools/scene/gameobject/components.cs +10 -7
  315. package/unitypkg/Editor/Tools/scene/gameobject-support.cs +104 -8
  316. package/unitypkg/Editor/Tools/scene/gameobject.cs +37 -16
  317. package/unitypkg/Editor/Tools/scene/hierarchy.cs +146 -142
  318. package/unitypkg/Editor/Tools/screenshot/EditorElementCaptureToolSupport.cs +77 -25
  319. package/unitypkg/Editor/Tools/screenshot/ScreenshotToolSupport.cs +315 -95
  320. package/unitypkg/Editor/Tools/screenshot/editor-element.cs +7 -5
  321. package/unitypkg/Editor/Tools/screenshot/game-view.cs +35 -21
  322. package/unitypkg/Editor/Tools/screenshot/isolated-object.cs +29 -23
  323. package/unitypkg/Editor/Tools/screenshot/orbit.cs +37 -25
  324. package/unitypkg/Editor/Tools/screenshot/scene-view.cs +25 -18
  325. package/unitypkg/Editor/Tools/screenshot/screen.cs +177 -17
  326. package/unitypkg/Editor/Tools/screenshot/surround.cs +83 -79
  327. package/unitypkg/Editor/Tools/ui/render-preview.cs +16 -11
  328. package/unitypkg/Editor/UnityCliBridge.cs +97 -34
  329. package/unitypkg/Runtime/Infrastructure/UnityCliRuntimeBridge.cs +753 -122
  330. package/unitypkg/Runtime/Properties/AssemblyInfo.cs +5 -0
  331. package/unitypkg/Runtime/UnityCli.Runtime.asmdef +1 -1
  332. package/unitypkg/Shared/AssemblyInfo.cs +4 -0
  333. package/unitypkg/Shared/UnityCliAdmissionPool.cs +265 -75
  334. package/unitypkg/Shared/UnityCliBridgeQueuePolicy.cs +410 -0
  335. package/unitypkg/Shared/UnityCliBridgeWorkItemState.cs +47 -0
  336. package/unitypkg/Shared/UnityCliExceptionProjection.cs +151 -0
  337. package/unitypkg/Shared/UnityCliQueuePublication.cs +30 -0
  338. package/unitypkg/Shared/UnityCliRequestBudget.cs +352 -0
  339. package/unitypkg/Shared/UnityCliRuntimeRequestPublication.cs +107 -0
  340. package/unitypkg/Tests/Editor/UnityCli.Editor.Tests.asmdef +2 -2
  341. package/unitypkg/Tests/Editor/UnityCliAdmissionCoordinatorIntegrationTests.cs +1329 -0
  342. package/unitypkg/Tests/Editor/UnityCliAdmissionPoolTests.cs +311 -114
  343. package/unitypkg/Tests/Editor/UnityCliAdmissionRepairStateTests.cs +94 -0
  344. package/unitypkg/Tests/Editor/UnityCliBridgeAdmissionIntegrationTests.cs +1229 -0
  345. package/unitypkg/Tests/Editor/UnityCliBridgeQueuePolicyTests.cs +412 -0
  346. package/unitypkg/Tests/Editor/UnityCliContinuationIntegrationTests.cs +292 -0
  347. package/unitypkg/Tests/Editor/UnityCliDiagnosticBoundaryTests.cs +120 -0
  348. package/unitypkg/Tests/Editor/UnityCliDurableStatusTests.cs +84 -0
  349. package/unitypkg/Tests/Editor/UnityCliExceptionProjectionTests.cs +72 -0
  350. package/unitypkg/Tests/Editor/UnityCliInstancePublicationRetryTests.cs +180 -97
  351. package/unitypkg/Tests/Editor/UnityCliMemoryReflectionIntegrationTests.cs +434 -0
  352. package/unitypkg/Tests/Editor/UnityCliRequestBudgetTests.cs +615 -0
  353. package/unitypkg/Tests/Editor/UnityCliRuntimeBridgeIntegrationTests.cs +520 -0
  354. package/unitypkg/Tests/Editor/UnityCliToolCatalogTests.cs +562 -0
  355. package/unitypkg/Tests/Runtime/UnityCli.Runtime.Tests.asmdef +23 -0
  356. package/unitypkg/Tests/Runtime/UnityCliRuntimeCatalogValidationTests.cs +29 -0
  357. package/unitypkg/package.json +1 -1
  358. package/contracts/static-capability-catalog.json +0 -48226
  359. package/dist/bridge/domains/diagnose.d.ts +0 -2
  360. package/dist/bridge/domains/diagnose.js +0 -11
  361. package/dist/bridge/domains/diagnose.js.map +0 -1
  362. package/dist/bridge/domains/extension.d.ts +0 -8
  363. package/dist/bridge/domains/extension.js +0 -20
  364. package/dist/bridge/domains/extension.js.map +0 -1
  365. package/dist/capabilities.d.ts +0 -5
  366. package/dist/capabilities.js +0 -84
  367. package/dist/capabilities.js.map +0 -1
  368. package/dist/static-capability-catalog.d.ts +0 -13
  369. package/dist/static-capability-catalog.js +0 -41
  370. package/dist/static-capability-catalog.js.map +0 -1
  371. package/dist/tools/diagnose/capabilities.d.ts +0 -13
  372. package/dist/tools/diagnose/capabilities.js +0 -34
  373. package/dist/tools/diagnose/capabilities.js.map +0 -1
  374. package/dist/tools/package/info.d.ts +0 -19
  375. package/dist/tools/package/info.js +0 -27
  376. package/dist/tools/package/info.js.map +0 -1
  377. package/dist/tools/package/list.d.ts +0 -27
  378. package/dist/tools/package/list.js +0 -21
  379. package/dist/tools/package/list.js.map +0 -1
  380. package/dist/tools/package/registry-get.d.ts +0 -10
  381. package/dist/tools/package/registry-get.js +0 -22
  382. package/dist/tools/package/registry-get.js.map +0 -1
  383. package/dist/tools/package/scoped-registry-list.d.ts +0 -14
  384. package/dist/tools/package/scoped-registry-list.js +0 -22
  385. package/dist/tools/package/scoped-registry-list.js.map +0 -1
  386. package/dist/tools/package/search.d.ts +0 -17
  387. package/dist/tools/package/search.js +0 -39
  388. package/dist/tools/package/search.js.map +0 -1
  389. package/dist/tools/package/status.d.ts +0 -21
  390. package/dist/tools/package/status.js +0 -37
  391. package/dist/tools/package/status.js.map +0 -1
  392. package/dist/tools/tools/describe.d.ts +0 -27
  393. package/dist/tools/tools/describe.js +0 -35
  394. package/dist/tools/tools/describe.js.map +0 -1
  395. package/dist/tools/tools/group-list.d.ts +0 -16
  396. package/dist/tools/tools/group-list.js +0 -38
  397. package/dist/tools/tools/group-list.js.map +0 -1
  398. package/dist/tools/tools/group.d.ts +0 -13
  399. package/dist/tools/tools/group.js +0 -34
  400. package/dist/tools/tools/group.js.map +0 -1
  401. package/dist/tools/tools/pagination.d.ts +0 -17
  402. package/dist/tools/tools/pagination.js +0 -28
  403. package/dist/tools/tools/pagination.js.map +0 -1
  404. package/dist/tools/tools/search.d.ts +0 -15
  405. package/dist/tools/tools/search.js +0 -42
  406. package/dist/tools/tools/search.js.map +0 -1
  407. package/unitypkg/Editor/Tools/diagnose/preflight.cs +0 -269
  408. package/unitypkg/Editor/Tools/editor/console.cs +0 -26
  409. package/unitypkg/Editor/Tools/extension/status.cs +0 -87
  410. package/unitypkg/Editor/Tools/go/inspect.cs +0 -49
  411. package/unitypkg/Editor/Tools/graphics/pipeline-quality.cs +0 -24
  412. package/unitypkg/Editor/Tools/graphics/probe-positions.cs +0 -58
  413. package/unitypkg/Editor/Tools/graphics/settings.cs +0 -104
  414. package/unitypkg/Editor/Tools/graphics/stats-counters.cs +0 -28
  415. package/unitypkg/Editor/Tools/graphics/stats-memory.cs +0 -21
  416. package/unitypkg/Editor/Tools/instances/list.cs +0 -71
  417. package/unitypkg/Editor/Tools/physics/raycast-all.cs +0 -67
  418. package/unitypkg/Editor/Tools/scene/build-settings.cs +0 -69
  419. package/unitypkg/Editor/Tools/scene/data.cs +0 -125
  420. package/unitypkg/Editor/Tools/tests/list.cs +0 -98
@@ -20,7 +20,7 @@ namespace UnityCli
20
20
  UnityCliMainThreadAwaitable<bool> UntilStable(Func<bool> predicate, TimeSpan timeout, int minimumFrames = 2, TimeSpan minimumDuration = default, CancellationToken ct = default);
21
21
  UnityCliMainThreadAwaitable<bool> UntilEditorReady(TimeSpan timeout, CancellationToken ct = default);
22
22
  UnityCliMainThreadAwaitable<bool> UntilPlayModeState(PlayModeStateChange state, TimeSpan timeout, CancellationToken ct = default);
23
- UnityCliMainThreadAwaitable<T> ForCallback<T>(Action<Action<T>, Action<Exception>> start, TimeSpan timeout, CancellationToken ct = default);
23
+ UnityCliMainThreadAwaitable<T> ForCallback<T>(Action<Func<Func<T>, bool>, Func<Exception, bool>> start, TimeSpan timeout, CancellationToken ct = default, Action onAbandoned = null);
24
24
  }
25
25
 
26
26
  internal interface IMainThreadAwaitableSource<out T>
@@ -60,6 +60,78 @@ namespace UnityCli
60
60
  }
61
61
  }
62
62
 
63
+ /// <summary>callback 结果工厂必须先赢得一次性 terminal ownership;迟到 callback 不能执行 publication。</summary>
64
+ internal sealed class UnityCliCallbackPublication<T>
65
+ {
66
+ private readonly object sync = new object();
67
+ private bool terminal;
68
+ private bool completed;
69
+ private bool failed;
70
+ private T result;
71
+ private Exception exception;
72
+
73
+ internal bool TryComplete(Func<T> createResult, Func<bool> unavailable = null)
74
+ {
75
+ lock (sync)
76
+ {
77
+ if (terminal || unavailable != null && unavailable())
78
+ {
79
+ terminal = true;
80
+ return false;
81
+ }
82
+ terminal = true;
83
+ try
84
+ {
85
+ result = createResult == null ? default : createResult();
86
+ completed = true;
87
+ }
88
+ catch (Exception error)
89
+ {
90
+ exception = error;
91
+ failed = true;
92
+ }
93
+ return true;
94
+ }
95
+ }
96
+
97
+ internal bool TryFail(Exception error, Func<bool> unavailable = null)
98
+ {
99
+ lock (sync)
100
+ {
101
+ if (terminal || unavailable != null && unavailable())
102
+ {
103
+ terminal = true;
104
+ return false;
105
+ }
106
+ terminal = true;
107
+ exception = error;
108
+ failed = true;
109
+ return true;
110
+ }
111
+ }
112
+
113
+ internal bool TryAbandon()
114
+ {
115
+ lock (sync)
116
+ {
117
+ if (terminal) return false;
118
+ terminal = true;
119
+ return true;
120
+ }
121
+ }
122
+
123
+ internal void Read(out bool isCompleted, out bool isFailed, out T value, out Exception error)
124
+ {
125
+ lock (sync)
126
+ {
127
+ isCompleted = completed;
128
+ isFailed = failed;
129
+ value = result;
130
+ error = exception;
131
+ }
132
+ }
133
+ }
134
+
63
135
  internal sealed class UnityCliWaiter : IUnityCliWaiter
64
136
  {
65
137
  private readonly string requestId;
@@ -101,9 +173,9 @@ namespace UnityCli
101
173
  return UnityCliWaitScheduler.UntilPlayModeState(requestId, owner, state, timeout, ct);
102
174
  }
103
175
 
104
- public UnityCliMainThreadAwaitable<T> ForCallback<T>(Action<Action<T>, Action<Exception>> start, TimeSpan timeout, CancellationToken ct = default)
176
+ public UnityCliMainThreadAwaitable<T> ForCallback<T>(Action<Func<Func<T>, bool>, Func<Exception, bool>> start, TimeSpan timeout, CancellationToken ct = default, Action onAbandoned = null)
105
177
  {
106
- return UnityCliWaitScheduler.ForCallback(requestId, owner, start, timeout, ct);
178
+ return UnityCliWaitScheduler.ForCallback(requestId, owner, start, timeout, ct, onAbandoned);
107
179
  }
108
180
  }
109
181
 
@@ -224,7 +296,7 @@ namespace UnityCli
224
296
  }
225
297
  }
226
298
 
227
- public void Cancel(Exception exception)
299
+ public virtual void Cancel(Exception exception)
228
300
  {
229
301
  if (IsCompleted) return;
230
302
  Fail(exception);
@@ -392,35 +464,38 @@ namespace UnityCli
392
464
 
393
465
  private sealed class CallbackWait<T> : PendingWaitBase<T>
394
466
  {
395
- private readonly object callbackLock = new object();
396
467
  private readonly DateTime deadlineUtc;
397
- private bool callbackCompleted;
398
- private bool callbackFailed;
399
- private bool callbackTerminal;
400
- private T callbackResult;
401
- private Exception callbackException;
468
+ private readonly CancellationToken callbackCancellationToken;
469
+ private readonly UnityCliCallbackPublication<T> publication = new UnityCliCallbackPublication<T>();
470
+ private readonly Action onAbandoned;
402
471
 
403
- public CallbackWait(string requestId, string owner, Action<Action<T>, Action<Exception>> start, TimeSpan timeout, CancellationToken cancellationToken)
472
+ public CallbackWait(string requestId, string owner, Action<Func<Func<T>, bool>, Func<Exception, bool>> start, TimeSpan timeout, CancellationToken cancellationToken, Action onAbandoned)
404
473
  : base(requestId, owner, cancellationToken)
405
474
  {
475
+ this.onAbandoned = onAbandoned;
476
+ callbackCancellationToken = cancellationToken;
406
477
  deadlineUtc = DateTime.UtcNow.Add(timeout < TimeSpan.Zero ? TimeSpan.Zero : timeout);
407
478
  start?.Invoke(OnComplete, OnFail);
408
479
  }
409
480
 
410
481
  protected override bool Advance(DateTime utcNow)
411
482
  {
483
+ if (utcNow >= deadlineUtc && publication.TryAbandon())
484
+ {
485
+ NotifyAbandoned();
486
+ return Fail(new UnityCliBridge.BridgeCommandException(
487
+ "E_EXECUTION_TIMEOUT",
488
+ "Callback wait timed out.",
489
+ "Retry or reduce scope.",
490
+ transient: false,
491
+ retryAfterMs: 0));
492
+ }
493
+
412
494
  bool completed;
413
495
  bool failed;
414
496
  T result;
415
497
  Exception exception;
416
- lock (callbackLock)
417
- {
418
- completed = callbackCompleted;
419
- failed = callbackFailed;
420
- result = callbackResult;
421
- exception = callbackException;
422
- if (!completed && !failed && utcNow >= deadlineUtc) callbackTerminal = true;
423
- }
498
+ publication.Read(out completed, out failed, out result, out exception);
424
499
  if (failed) return Fail(exception ?? new Exception("Callback wait failed."));
425
500
  if (completed) return Succeed(result);
426
501
  if (utcNow >= deadlineUtc)
@@ -435,26 +510,44 @@ namespace UnityCli
435
510
  return false;
436
511
  }
437
512
 
438
- private void OnComplete(T result)
513
+ public override void Cancel(Exception exception)
439
514
  {
440
- lock (callbackLock)
515
+ if (publication.TryAbandon())
441
516
  {
442
- if (callbackTerminal || IsCompleted) return;
443
- callbackTerminal = true;
444
- callbackResult = result;
445
- callbackCompleted = true;
517
+ NotifyAbandoned();
518
+ base.Cancel(exception);
519
+ return;
446
520
  }
521
+
522
+ bool completed;
523
+ bool failed;
524
+ T result;
525
+ Exception callbackError;
526
+ publication.Read(out completed, out failed, out result, out callbackError);
527
+ if (completed) { Succeed(result); return; }
528
+ if (failed) { Fail(callbackError ?? exception); return; }
529
+ base.Cancel(exception);
447
530
  }
448
531
 
449
- private void OnFail(Exception exception)
532
+ private void NotifyAbandoned()
450
533
  {
451
- lock (callbackLock)
452
- {
453
- if (callbackTerminal || IsCompleted) return;
454
- callbackTerminal = true;
455
- callbackException = exception;
456
- callbackFailed = true;
457
- }
534
+ try { onAbandoned?.Invoke(); }
535
+ catch { /* abandonment cleanup must not replace the scheduler terminal */ }
536
+ }
537
+
538
+ private bool OnComplete(Func<T> createResult)
539
+ {
540
+ return publication.TryComplete(createResult, CallbackUnavailable);
541
+ }
542
+
543
+ private bool OnFail(Exception exception)
544
+ {
545
+ return publication.TryFail(exception, CallbackUnavailable);
546
+ }
547
+
548
+ private bool CallbackUnavailable()
549
+ {
550
+ return IsCompleted || callbackCancellationToken.IsCancellationRequested || DateTime.UtcNow >= deadlineUtc;
458
551
  }
459
552
  }
460
553
 
@@ -521,9 +614,9 @@ namespace UnityCli
521
614
  }
522
615
  }
523
616
 
524
- public static UnityCliMainThreadAwaitable<T> ForCallback<T>(string requestId, string owner, Action<Action<T>, Action<Exception>> start, TimeSpan timeout, CancellationToken cancellationToken)
617
+ public static UnityCliMainThreadAwaitable<T> ForCallback<T>(string requestId, string owner, Action<Func<Func<T>, bool>, Func<Exception, bool>> start, TimeSpan timeout, CancellationToken cancellationToken, Action onAbandoned = null)
525
618
  {
526
- var wait = new CallbackWait<T>(requestId, owner, start, timeout, cancellationToken);
619
+ var wait = new CallbackWait<T>(requestId, owner, start, timeout, cancellationToken, onAbandoned);
527
620
  Register(wait);
528
621
  return new UnityCliMainThreadAwaitable<T>(wait);
529
622
  }
@@ -6,6 +6,14 @@ using System.Threading.Tasks;
6
6
 
7
7
  namespace UnityCli
8
8
  {
9
+ /// <summary>Extension asmdef 的编译期 owner claim;runtime 仍需与 generated exact inventory 全集一致。</summary>
10
+ [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)]
11
+ public sealed class UnityCliExtensionAssemblyAttribute : Attribute
12
+ {
13
+ public UnityCliExtensionAssemblyAttribute(string extensionId) { ExtensionId = extensionId; }
14
+ public string ExtensionId { get; private set; }
15
+ }
16
+
9
17
  /// <summary>
10
18
  /// 工具统一为语言原生异步接口。实现本接口即声明一个工具。
11
19
  /// desc 只声明人写字段;schema 由框架从 TReq/TRes 派生。
@@ -91,7 +99,6 @@ namespace UnityCli
91
99
  public string[] Permissions { get; set; }
92
100
  public string[] RequiresPackages { get; set; }
93
101
  public ToolExample[] Examples { get; set; }
94
- public string Fingerprint { get; set; }
95
102
  public ToolCompletionDescriptor Completion { get; set; }
96
103
  }
97
104
 
@@ -148,5 +155,6 @@ namespace UnityCli
148
155
  public UnityCliStringEnumAttribute(params string[] values) { Values = values ?? Array.Empty<string>(); }
149
156
  public string[] Values { get; private set; }
150
157
  }
158
+
151
159
  }
152
160
  #endif
@@ -95,7 +95,7 @@ namespace UnityCli
95
95
  /// 扫描一个类型声明的官方 attributed static method。所有候选都先写入 pending registry;
96
96
  /// 任一签名、schema、ownership 或名称冲突都会阻止本轮目录发布。
97
97
  /// </summary>
98
- private static void TryRegisterOfficialAttributeTools(Assembly assembly, Type type)
98
+ private static void TryRegisterOfficialAttributeTools(UnityCliToolCatalogBuilder builder, RegistryOwnershipResolver ownershipResolver, Assembly assembly, Type type)
99
99
  {
100
100
  var methods = type.GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance | BindingFlags.DeclaredOnly)
101
101
  .Where(method => FindAttribute(method, OfficialCliCommandAttribute) != null)
@@ -111,9 +111,8 @@ namespace UnityCli
111
111
 
112
112
  foreach (var method in methods)
113
113
  {
114
- var definition = CreateOfficialAttributeTool(assembly, type, method);
115
- RegisterProjectTool(definition);
116
- WriteLog("custom_tool_registered name=" + definition.Name + " source=official-attribute type=" + type.FullName + " method=" + method.Name);
114
+ var definition = CreateOfficialAttributeTool(ownershipResolver, type, method);
115
+ RegisterProjectTool(builder, definition, UnityCliToolProviderKind.OfficialAttribute);
117
116
  }
118
117
  }
119
118
 
@@ -139,9 +138,10 @@ namespace UnityCli
139
138
  return suppressed;
140
139
  }
141
140
 
142
- /// <summary>从 CustomAttributeData 构造保守 descriptor、严格输入 schema 与方法返回完成契约。</summary>
143
- private static RegisteredTool CreateOfficialAttributeTool(Assembly assembly, Type implementationType, MethodInfo method)
141
+ /// <summary>签名和返回形态只读取编译元数据;任一不支持形态在pending publish前失败。</summary>
142
+ private static void ValidateOfficialMethodSignature(MethodInfo method)
144
143
  {
144
+ if (method == null) throw new ArgumentNullException("method");
145
145
  if (!method.IsStatic) throw new InvalidOperationException("Official CLI command method must be static: " + MethodIdentity(method) + ".");
146
146
  if (method.IsGenericMethodDefinition || method.ContainsGenericParameters)
147
147
  throw new InvalidOperationException("Official CLI command method cannot be generic: " + MethodIdentity(method) + ".");
@@ -149,13 +149,18 @@ namespace UnityCli
149
149
  throw new InvalidOperationException("Official CLI command return type is unsupported: " + MethodIdentity(method) + ".");
150
150
  if (method.ReturnType == typeof(void) && method.IsDefined(typeof(AsyncStateMachineAttribute), false))
151
151
  throw new InvalidOperationException("Official CLI command cannot use async void: " + MethodIdentity(method) + ".");
152
+ }
153
+
154
+ /// <summary>从 CustomAttributeData 构造保守 descriptor、严格输入 schema 与方法返回完成契约。</summary>
155
+ private static RegisteredTool CreateOfficialAttributeTool(RegistryOwnershipResolver ownershipResolver, Type implementationType, MethodInfo method)
156
+ {
157
+ ValidateOfficialMethodSignature(method);
152
158
 
153
159
  var command = FindAttribute(method, OfficialCliCommandAttribute);
154
160
  var name = ConstructorString(command, 0, "name", method);
155
161
  var description = ConstructorString(command, 1, "description", method);
156
- if (string.IsNullOrWhiteSpace(name) || !string.Equals(name, name.Trim(), StringComparison.Ordinal) || name.Any(char.IsWhiteSpace))
157
- throw new InvalidOperationException("Official CLI command name must be one non-empty token without whitespace: " + MethodIdentity(method) + ".");
158
- var toolName = OfficialAttributeToolPrefix + name;
162
+ var toolName = OfficialAttributeToolPrefix + (name ?? string.Empty);
163
+ UnityCliToolName.Validate(toolName, "official-attribute");
159
164
  if (string.IsNullOrWhiteSpace(description))
160
165
  throw new InvalidOperationException("Official CLI command description is required: " + MethodIdentity(method) + ".");
161
166
 
@@ -179,8 +184,8 @@ namespace UnityCli
179
184
  NormalizeResultWithNewtonsoft = output.NormalizeWithNewtonsoft,
180
185
  Parameters = parameters
181
186
  };
182
- var ownership = registryOwnership.Resolve(implementationType);
183
- if (!string.Equals(ownership, "project", StringComparison.Ordinal))
187
+ var ownership = ownershipResolver.Resolve(implementationType, toolName);
188
+ if (!string.Equals(ownership.Source, "project", StringComparison.Ordinal))
184
189
  throw new InvalidOperationException("Official attribute Tool ownership must resolve to project or third-party code: " + MethodIdentity(method) + ".");
185
190
 
186
191
  var completion = new UnityCliToolCompletionContract(
@@ -197,16 +202,12 @@ namespace UnityCli
197
202
  "required",
198
203
  true);
199
204
 
200
- return new RegisteredTool
205
+ var descriptor = new ToolDescriptor
201
206
  {
202
207
  Name = toolName,
203
208
  Summary = OfficialSummary(description),
204
209
  Description = description + " Imported from Unity.Pipeline.Commands.CliCommandAttribute. Risk, PlayMode, dry-run and completion semantics use the conservative official-attribute contract. Schema defaults and examples describe valid default behavior, not caller intent; use caller-requested business values on the first execution.",
205
210
  Group = OfficialAttributeToolGroup,
206
- Source = "project",
207
- Ownership = "project",
208
- InputSchema = UnityCliSerializer.Serialize(inputSchema),
209
- OutputSchema = output.Schema,
210
211
  DestructiveHint = true,
211
212
  SideEffects = new[] { "arbitrary-method-invocation" },
212
213
  SupportsDryRun = false,
@@ -221,22 +222,22 @@ namespace UnityCli
221
222
  }
222
223
  },
223
224
  Target = "editor",
224
- AvailabilityScope = runtimeOnly ? "playModeSession" : "editorSession",
225
225
  PlayModeSupport = playModeSupport,
226
- ContractProfile = "official-attribute",
227
226
  DefaultTimeoutMs = 30000,
228
- MaxTimeoutMs = 600000,
229
- RequiredInput = parameters.Where(parameter => parameter.Required).Select(parameter => parameter.Name).ToArray(),
230
- RegisteredBy = "official-pipeline-attribute",
231
- DescriptorSource = OfficialCliCommandAttribute,
232
- Assembly = assembly.GetName().Name,
233
- Method = MethodIdentity(method),
234
- RequestType = typeof(Dictionary<string, object>),
235
- ResultType = output.ValidationType,
236
- CompletionContract = completion,
237
- OfficialAttributeBinding = binding,
238
- InvokeAsync = (request, context, cancellationToken) => InvokeOfficialAttributeTool(binding, request, context, cancellationToken)
227
+ MaxTimeoutMs = 600000
239
228
  };
229
+ return new RegisteredTool(
230
+ descriptor,
231
+ ownership,
232
+ UnityCliSerializer.Serialize(inputSchema),
233
+ output.Schema,
234
+ runtimeOnly ? "playModeSession" : "editorSession",
235
+ "official-attribute",
236
+ typeof(Dictionary<string, object>),
237
+ output.ValidationType,
238
+ completion,
239
+ binding,
240
+ (request, context, cancellationToken) => InvokeOfficialAttributeTool(binding, request, context, cancellationToken));
240
241
  }
241
242
 
242
243
  /// <summary>解析参数 attribute,严格验证签名和默认值可转换性。</summary>
@@ -631,8 +632,8 @@ namespace UnityCli
631
632
  : Failure(path, "single-character string", ActualType(value));
632
633
  }
633
634
  if (type == typeof(bool)) return value is bool ? null : Failure(path, "boolean", ActualType(value));
634
- if (UnityCliSchemaDeriver.IsInteger(type)) return ValidateInteger(value, type, path);
635
- if (UnityCliSchemaDeriver.IsNumber(type)) return ValidateNumber(value, type, path);
635
+ if (UnityCliSchemaDeriver.IsInteger(type)) return ValidateInteger(value, type, path, null);
636
+ if (UnityCliSchemaDeriver.IsNumber(type)) return ValidateNumber(value, type, path, null);
636
637
  if (type.IsEnum)
637
638
  {
638
639
  var enumName = value as string;