@alpsckr/unitycli 0.4.3 → 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.
- package/README.md +5 -5
- package/contracts/command-contract.json +109 -217
- package/contracts/package-files.json +374 -294
- package/contracts/stable-session/direct-call-semantics.json +8 -2
- package/contracts/tool-completion-contract.json +148 -672
- package/dist/bridge/admission.d.ts +17 -1
- package/dist/bridge/admission.js +2 -0
- package/dist/bridge/admission.js.map +1 -1
- package/dist/bridge/domains/asset.js +3 -1
- package/dist/bridge/domains/asset.js.map +1 -1
- package/dist/bridge/domains/camera.js +39 -7
- package/dist/bridge/domains/camera.js.map +1 -1
- package/dist/bridge/domains/console.js +2 -1
- package/dist/bridge/domains/console.js.map +1 -1
- package/dist/bridge/domains/doctor.d.ts +3 -0
- package/dist/bridge/domains/doctor.js +8 -0
- package/dist/bridge/domains/doctor.js.map +1 -0
- package/dist/bridge/domains/editor.js +0 -4
- package/dist/bridge/domains/editor.js.map +1 -1
- package/dist/bridge/domains/game-object.js +4 -12
- package/dist/bridge/domains/game-object.js.map +1 -1
- package/dist/bridge/domains/graphics.js +1 -16
- package/dist/bridge/domains/graphics.js.map +1 -1
- package/dist/bridge/domains/object.js +3 -0
- package/dist/bridge/domains/object.js.map +1 -1
- package/dist/bridge/domains/physics.js +1 -2
- package/dist/bridge/domains/physics.js.map +1 -1
- package/dist/bridge/domains/profiler.js +18 -7
- package/dist/bridge/domains/profiler.js.map +1 -1
- package/dist/bridge/domains/project-tool.js +4 -0
- package/dist/bridge/domains/project-tool.js.map +1 -1
- package/dist/bridge/domains/reflection.js +10 -2
- package/dist/bridge/domains/reflection.js.map +1 -1
- package/dist/bridge/domains/runtime-tool.js +3 -0
- package/dist/bridge/domains/runtime-tool.js.map +1 -1
- package/dist/bridge/domains/scene.js +3 -8
- package/dist/bridge/domains/scene.js.map +1 -1
- package/dist/bridge/domains/screenshot.js +30 -6
- package/dist/bridge/domains/screenshot.js.map +1 -1
- package/dist/bridge/domains/ui.js +3 -1
- package/dist/bridge/domains/ui.js.map +1 -1
- package/dist/bridge/index.d.ts +5 -5
- package/dist/bridge/index.js +6 -9
- package/dist/bridge/index.js.map +1 -1
- package/dist/bridge/registry.js +3 -5
- package/dist/bridge/registry.js.map +1 -1
- package/dist/bridge/session-supervisor.d.ts +6 -3
- package/dist/bridge/session-supervisor.js +122 -34
- package/dist/bridge/session-supervisor.js.map +1 -1
- package/dist/bridge/types.d.ts +6 -5
- package/dist/bridge/types.js +16 -2
- package/dist/bridge/types.js.map +1 -1
- package/dist/catalog-protocol.d.ts +64 -0
- package/dist/catalog-protocol.js +460 -0
- package/dist/catalog-protocol.js.map +1 -0
- package/dist/cli-commands/command.js +84 -61
- package/dist/cli-commands/command.js.map +1 -1
- package/dist/cli-commands/extensions.js +70 -50
- package/dist/cli-commands/extensions.js.map +1 -1
- package/dist/cli-commands/instances.js +1 -1
- package/dist/cli-commands/instances.js.map +1 -1
- package/dist/cli-process-owners.d.ts +6 -0
- package/dist/cli-process-owners.js +27 -0
- package/dist/cli-process-owners.js.map +1 -0
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +20 -5
- package/dist/cli.js.map +1 -1
- package/dist/contracts/command-contract.js +14 -4
- package/dist/contracts/command-contract.js.map +1 -1
- package/dist/doctor.d.ts +4 -6
- package/dist/doctor.js +429 -398
- package/dist/doctor.js.map +1 -1
- package/dist/editor-blocker-observer.d.ts +2 -1
- package/dist/editor-blocker-observer.js +40 -13
- package/dist/editor-blocker-observer.js.map +1 -1
- package/dist/extension-availability.d.ts +27 -9
- package/dist/extension-availability.js +96 -56
- package/dist/extension-availability.js.map +1 -1
- package/dist/extensions/descriptor-loader.d.ts +2 -2
- package/dist/extensions/descriptor-loader.js +3 -4
- package/dist/extensions/descriptor-loader.js.map +1 -1
- package/dist/extensions/index.d.ts +1 -1
- package/dist/extensions/index.js +1 -1
- package/dist/extensions/index.js.map +1 -1
- package/dist/extensions/installer.d.ts +24 -7
- package/dist/extensions/installer.js +142 -66
- package/dist/extensions/installer.js.map +1 -1
- package/dist/extensions/registry.js +3 -5
- package/dist/extensions/registry.js.map +1 -1
- package/dist/extensions/state-contract.d.ts +11 -0
- package/dist/extensions/state-contract.js +50 -0
- package/dist/extensions/state-contract.js.map +1 -0
- package/dist/instances.d.ts +13 -1
- package/dist/instances.js +26 -0
- package/dist/instances.js.map +1 -1
- package/dist/package-manager.d.ts +0 -24
- package/dist/package-manager.js +5 -58
- package/dist/package-manager.js.map +1 -1
- package/dist/project-tool-discovery.d.ts +5 -2
- package/dist/project-tool-discovery.js +22 -18
- package/dist/project-tool-discovery.js.map +1 -1
- package/dist/runtime-code.js +1 -1
- package/dist/runtime-code.js.map +1 -1
- package/dist/tool-name.d.ts +4 -0
- package/dist/tool-name.js +15 -0
- package/dist/tool-name.js.map +1 -0
- package/dist/tools/.generated-completion-registry.d.ts +2 -0
- package/dist/tools/.generated-completion-registry.js +763 -325
- package/dist/tools/.generated-completion-registry.js.map +1 -1
- package/dist/tools/.generated-registry.d.ts +6 -11
- package/dist/tools/.generated-registry.js +6 -11
- package/dist/tools/.generated-registry.js.map +1 -1
- package/dist/tools/.generated-schemas.js +11 -16
- package/dist/tools/.generated-schemas.js.map +1 -1
- package/dist/tools/asset/refresh-status.d.ts +3 -0
- package/dist/tools/asset/refresh-status.js +12 -0
- package/dist/tools/asset/refresh-status.js.map +1 -0
- package/dist/tools/asset/refresh.js +7 -3
- package/dist/tools/asset/refresh.js.map +1 -1
- package/dist/tools/build/player-status.d.ts +3 -0
- package/dist/tools/build/player-status.js +12 -0
- package/dist/tools/build/player-status.js.map +1 -0
- package/dist/tools/build/run.js +1 -1
- package/dist/tools/build/run.js.map +1 -1
- package/dist/tools/catalog-control.d.ts +22 -0
- package/dist/tools/catalog-control.js +335 -0
- package/dist/tools/catalog-control.js.map +1 -0
- package/dist/tools/catalog.d.ts +7 -9
- package/dist/tools/catalog.js +66 -45
- package/dist/tools/catalog.js.map +1 -1
- package/dist/tools/commands.d.ts +1 -1
- package/dist/tools/commands.js +44 -11
- package/dist/tools/commands.js.map +1 -1
- package/dist/tools/define.js +3 -2
- package/dist/tools/define.js.map +1 -1
- package/dist/tools/dispatcher.d.ts +53 -6
- package/dist/tools/dispatcher.js +277 -108
- package/dist/tools/dispatcher.js.map +1 -1
- package/dist/tools/editor/compile.js +1 -1
- package/dist/tools/editor/compile.js.map +1 -1
- package/dist/tools/editor/play-mode-status.d.ts +3 -0
- package/dist/tools/editor/play-mode-status.js +12 -0
- package/dist/tools/editor/play-mode-status.js.map +1 -0
- package/dist/tools/editor/readiness.d.ts +0 -1
- package/dist/tools/editor/readiness.js +0 -1
- package/dist/tools/editor/readiness.js.map +1 -1
- package/dist/tools/editor/refresh.d.ts +7 -3
- package/dist/tools/editor/refresh.js +20 -15
- package/dist/tools/editor/refresh.js.map +1 -1
- package/dist/tools/editor/state.d.ts +2 -2
- package/dist/tools/editor/state.js +13 -12
- package/dist/tools/editor/state.js.map +1 -1
- package/dist/tools/metadata/derived.js +1 -7
- package/dist/tools/metadata/derived.js.map +1 -1
- package/dist/tools/metadata/status.js +1 -12
- package/dist/tools/metadata/status.js.map +1 -1
- package/dist/tools/metadata/types.d.ts +0 -2
- package/dist/tools/navmesh/live.js +1 -1
- package/dist/tools/navmesh/live.js.map +1 -1
- package/dist/tools/occlusion/live.js +1 -1
- package/dist/tools/occlusion/live.js.map +1 -1
- package/dist/tools/package/deploy.js +2 -2
- package/dist/tools/package/deploy.js.map +1 -1
- package/dist/tools/package/embed.js +1 -1
- package/dist/tools/package/embed.js.map +1 -1
- package/dist/tools/package/install-status.d.ts +3 -0
- package/dist/tools/package/install-status.js +12 -0
- package/dist/tools/package/install-status.js.map +1 -0
- package/dist/tools/package/install.js +3 -3
- package/dist/tools/package/install.js.map +1 -1
- package/dist/tools/package/live-resolve.js +45 -12
- package/dist/tools/package/live-resolve.js.map +1 -1
- package/dist/tools/package/registry-clear.js.map +1 -1
- package/dist/tools/package/registry-set.js.map +1 -1
- package/dist/tools/package/remove-status.d.ts +3 -0
- package/dist/tools/package/remove-status.js +12 -0
- package/dist/tools/package/remove-status.js.map +1 -0
- package/dist/tools/package/remove.js +3 -3
- package/dist/tools/package/remove.js.map +1 -1
- package/dist/tools/package/resolve.js +3 -3
- package/dist/tools/package/resolve.js.map +1 -1
- package/dist/tools/package/restore.js +2 -2
- package/dist/tools/package/restore.js.map +1 -1
- package/dist/tools/package/scoped-registry-add.js.map +1 -1
- package/dist/tools/status/support.d.ts +13 -0
- package/dist/tools/status/support.js +28 -0
- package/dist/tools/status/support.js.map +1 -0
- package/dist/tools/test/cancel.js +2 -2
- package/dist/tools/test/cancel.js.map +1 -1
- package/dist/tools/test/run-status.d.ts +3 -0
- package/dist/tools/test/run-status.js +12 -0
- package/dist/tools/test/run-status.js.map +1 -0
- package/dist/tools/test/run.js +7 -4
- package/dist/tools/test/run.js.map +1 -1
- package/dist/tools/tools/group-summaries.js +10 -14
- package/dist/tools/tools/group-summaries.js.map +1 -1
- package/docs/architecture.md +4 -4
- package/docs/availability-differences.md +4 -4
- package/docs/command-execution.md +4 -3
- package/docs/error-codes.md +13 -5
- package/docs/extensions.md +1 -7
- package/docs/risk-and-side-effects.md +4 -3
- package/docs/safety-boundaries.md +3 -1
- package/docs/target-and-instance.md +1 -1
- package/docs/tool-discovery.md +17 -10
- package/docs/tool-execution.md +18 -7
- package/extensions/cinemachine/unitypkg/Editor/UnityCliExtensionAssembly.cs +3 -0
- package/extensions/hdrp/unitypkg/Editor/UnityCliExtensionAssembly.cs +3 -0
- package/extensions/probuilder/unitypkg/Editor/UnityCliExtensionAssembly.cs +3 -0
- package/extensions/urp/unitypkg/Editor/UnityCliExtensionAssembly.cs +3 -0
- package/extensions/vfx-graph/unitypkg/Editor/UnityCliExtensionAssembly.cs +3 -0
- package/package.json +2 -4
- package/skills/unitycli/SKILL.md +11 -2
- package/skills/unitycli/manifest.json +1 -1
- package/skills/unitycli/references/operation-protocol.md +3 -3
- package/unitypkg/Editor/AssemblyInfo.cs +5 -0
- package/unitypkg/Editor/Bridge/BridgeCommandRegistry.cs +49 -14
- package/unitypkg/Editor/Bridge/BridgeHttpServer.cs +9 -35
- package/unitypkg/Editor/Bridge/BridgeQueueState.cs +672 -0
- package/unitypkg/Editor/Bridge/BridgeWorkQueue.cs +970 -120
- package/unitypkg/Editor/BridgeStartupStateMachine.cs +59 -1
- package/unitypkg/Editor/Commands/ProjectToolCommands.cs +4 -0
- package/unitypkg/Editor/Commands/RuntimeToolCommands.cs +3 -0
- package/unitypkg/Editor/Generated/UnityCliToolCompletionRegistry.g.cs +379 -14
- package/unitypkg/Editor/Infrastructure/CodeExecSupport.cs +28 -13
- package/unitypkg/Editor/Infrastructure/RegistryOwnershipResolver.cs +132 -105
- package/unitypkg/Editor/Infrastructure/UnityCliActiveOperation.cs +138 -29
- package/unitypkg/Editor/Infrastructure/UnityCliAdmission.cs +1856 -237
- package/unitypkg/Editor/Infrastructure/UnityCliDoctorDiagnostics.cs +220 -0
- package/unitypkg/Editor/Infrastructure/UnityCliDurableStatusCoordinator.cs +118 -0
- package/unitypkg/Editor/Infrastructure/UnityCliEditorStateSnapshot.cs +2 -1
- package/unitypkg/Editor/Infrastructure/UnityCliHierarchyPager.cs +203 -0
- package/unitypkg/Editor/Infrastructure/UnityCliInstanceCleanup.cs +2 -1
- package/unitypkg/Editor/Infrastructure/UnityCliInstanceRegistry.cs +201 -63
- package/unitypkg/Editor/Infrastructure/UnityCliJson.cs +2 -3
- package/unitypkg/Editor/Infrastructure/UnityCliLiveBuildCoordinator.cs +289 -46
- package/unitypkg/Editor/Infrastructure/UnityCliLiveRefreshCoordinator.cs +87 -53
- package/unitypkg/Editor/Infrastructure/UnityCliNavMeshBakeCoordinator.cs +4 -4
- package/unitypkg/Editor/Infrastructure/UnityCliObjectRef.cs +128 -25
- package/unitypkg/Editor/Infrastructure/UnityCliObjectSerializer.cs +435 -327
- package/unitypkg/Editor/Infrastructure/UnityCliOcclusionBakeCoordinator.cs +4 -4
- package/unitypkg/Editor/Infrastructure/UnityCliOperationCoordinator.cs +351 -53
- package/unitypkg/Editor/Infrastructure/UnityCliPackageResolveCoordinator.cs +118 -18
- package/unitypkg/Editor/Infrastructure/UnityCliPackageResolveState.cs +20 -1
- package/unitypkg/Editor/Infrastructure/UnityCliReadGeneration.cs +97 -0
- package/unitypkg/Editor/Infrastructure/UnityCliReflection.cs +644 -133
- package/unitypkg/Editor/Infrastructure/UnityCliReloadOperation.cs +128 -41
- package/unitypkg/Editor/Infrastructure/UnityCliRuntimeExecutor.cs +14 -84
- package/unitypkg/Editor/Infrastructure/UnityCliSerializer.cs +220 -0
- package/unitypkg/Editor/Infrastructure/UnityCliSessionMutationLease.cs +69 -29
- package/unitypkg/Editor/Infrastructure/UnityCliTestRunCoordinator.cs +440 -54
- package/unitypkg/Editor/Infrastructure/UnityCliWaiter.cs +128 -35
- package/unitypkg/Editor/ProjectTools/IUnityCliTool.cs +9 -1
- package/unitypkg/Editor/ProjectTools/OfficialAttributeToolRegistry.cs +32 -31
- package/unitypkg/Editor/ProjectTools/ProjectToolRegistry.cs +607 -458
- package/unitypkg/Editor/ProjectTools/ProjectToolSchemaValidator.cs +35 -7
- package/unitypkg/Editor/ProjectTools/RegisteredTool.cs +501 -60
- package/unitypkg/Editor/ProjectTools/UnityCliProjectToolContext.cs +21 -0
- package/unitypkg/Editor/ProjectTools/UnityCliSchemaDeriver.cs +36 -7
- package/unitypkg/Editor/ProjectTools/UnityCliToolName.cs +30 -0
- package/unitypkg/Editor/Properties/AssemblyInfo.cs +3 -0
- package/unitypkg/Editor/Tools/asset/get-data.cs +16 -7
- package/unitypkg/Editor/Tools/build/BuildSceneStateTool.cs +23 -3
- package/unitypkg/Editor/Tools/build/BuildToolDtos.cs +2 -1
- package/unitypkg/Editor/Tools/build/scene/add.cs +6 -3
- package/unitypkg/Editor/Tools/build/scene/disable.cs +1 -1
- package/unitypkg/Editor/Tools/build/scene/enable.cs +1 -1
- package/unitypkg/Editor/Tools/build/scene/list.cs +1 -1
- package/unitypkg/Editor/Tools/build/scene/remove.cs +13 -3
- package/unitypkg/Editor/Tools/camera/CameraToolSupport.cs +38 -38
- package/unitypkg/Editor/Tools/camera/multiview.cs +13 -6
- package/unitypkg/Editor/Tools/camera/screenshot.cs +14 -7
- package/unitypkg/Editor/Tools/component/get.cs +16 -9
- package/unitypkg/Editor/Tools/component/modify.cs +6 -4
- package/unitypkg/Editor/Tools/console/clear.cs +7 -6
- package/unitypkg/Editor/Tools/console/get.cs +48 -16
- package/unitypkg/Editor/Tools/editor/EditorToolSupport.cs +143 -28
- package/unitypkg/Editor/Tools/editor/menu-items.cs +1 -1
- package/unitypkg/Editor/Tools/editor/play.cs +2 -11
- package/unitypkg/Editor/Tools/editor/selection.cs +1 -1
- package/unitypkg/Editor/Tools/editor/stop.cs +2 -11
- package/unitypkg/Editor/Tools/editor/windows.cs +1 -1
- package/unitypkg/Editor/Tools/go/GameObjectToolSupport.cs +54 -4
- package/unitypkg/Editor/Tools/go/delete.cs +1 -1
- package/unitypkg/Editor/Tools/go/find.cs +167 -70
- package/unitypkg/Editor/Tools/graphics/GraphicsToolSupport.cs +25 -0
- package/unitypkg/Editor/Tools/graphics/light-probe-group.cs +9 -3
- package/unitypkg/Editor/Tools/graphics/pipeline-info.cs +1 -1
- package/unitypkg/Editor/Tools/graphics/pipeline-settings.cs +1 -1
- package/unitypkg/Editor/Tools/graphics/quality.cs +2 -2
- package/unitypkg/Editor/Tools/graphics/reflection-probe.cs +3 -3
- package/unitypkg/Editor/Tools/graphics/stats.cs +1 -1
- package/unitypkg/Editor/Tools/object/ObjectToolSupport.cs +4 -4
- package/unitypkg/Editor/Tools/object/get-data.cs +9 -7
- package/unitypkg/Editor/Tools/object/modify.cs +7 -5
- package/unitypkg/Editor/Tools/physics/raycast.cs +24 -6
- package/unitypkg/Editor/Tools/prefab/stage.cs +1 -1
- package/unitypkg/Editor/Tools/profiler/ProfilerFrameDebuggerSupport.cs +94 -21
- package/unitypkg/Editor/Tools/profiler/ProfilerMemorySnapshotSupport.cs +397 -10
- package/unitypkg/Editor/Tools/profiler/ProfilerToolSupport.cs +18 -4
- package/unitypkg/Editor/Tools/profiler/frame-debugger/enable.cs +1 -1
- package/unitypkg/Editor/Tools/profiler/frame-debugger/events.cs +88 -87
- package/unitypkg/Editor/Tools/profiler/hierarchy.cs +278 -112
- package/unitypkg/Editor/Tools/profiler/memory-snapshot/compare.cs +9 -5
- package/unitypkg/Editor/Tools/profiler/memory-snapshot/list.cs +37 -35
- package/unitypkg/Editor/Tools/profiler/memory-snapshot/take.cs +99 -97
- package/unitypkg/Editor/Tools/project/info.cs +1 -1
- package/unitypkg/Editor/Tools/project/layers.cs +1 -1
- package/unitypkg/Editor/Tools/project/tags.cs +1 -1
- package/unitypkg/Editor/Tools/reflection/method/call.cs +9 -7
- package/unitypkg/Editor/Tools/reflection/method/find.cs +27 -37
- package/unitypkg/Editor/Tools/reflection/type/schema.cs +24 -28
- package/unitypkg/Editor/Tools/scene/gameobject/component.cs +8 -5
- package/unitypkg/Editor/Tools/scene/gameobject/components.cs +10 -7
- package/unitypkg/Editor/Tools/scene/gameobject-support.cs +104 -8
- package/unitypkg/Editor/Tools/scene/gameobject.cs +37 -16
- package/unitypkg/Editor/Tools/scene/hierarchy.cs +146 -142
- package/unitypkg/Editor/Tools/screenshot/EditorElementCaptureToolSupport.cs +77 -25
- package/unitypkg/Editor/Tools/screenshot/ScreenshotToolSupport.cs +315 -95
- package/unitypkg/Editor/Tools/screenshot/editor-element.cs +7 -5
- package/unitypkg/Editor/Tools/screenshot/game-view.cs +35 -21
- package/unitypkg/Editor/Tools/screenshot/isolated-object.cs +29 -23
- package/unitypkg/Editor/Tools/screenshot/orbit.cs +37 -25
- package/unitypkg/Editor/Tools/screenshot/scene-view.cs +25 -18
- package/unitypkg/Editor/Tools/screenshot/screen.cs +177 -17
- package/unitypkg/Editor/Tools/screenshot/surround.cs +83 -79
- package/unitypkg/Editor/Tools/ui/render-preview.cs +16 -11
- package/unitypkg/Editor/UnityCliBridge.cs +97 -34
- package/unitypkg/Runtime/Infrastructure/UnityCliRuntimeBridge.cs +753 -122
- package/unitypkg/Runtime/Properties/AssemblyInfo.cs +5 -0
- package/unitypkg/Runtime/UnityCli.Runtime.asmdef +1 -1
- package/unitypkg/Shared/AssemblyInfo.cs +4 -0
- package/unitypkg/Shared/UnityCliAdmissionPool.cs +265 -75
- package/unitypkg/Shared/UnityCliBridgeQueuePolicy.cs +410 -0
- package/unitypkg/Shared/UnityCliBridgeWorkItemState.cs +47 -0
- package/unitypkg/Shared/UnityCliExceptionProjection.cs +151 -0
- package/unitypkg/Shared/UnityCliQueuePublication.cs +30 -0
- package/unitypkg/Shared/UnityCliRequestBudget.cs +352 -0
- package/unitypkg/Shared/UnityCliRuntimeRequestPublication.cs +107 -0
- package/unitypkg/Tests/Editor/UnityCli.Editor.Tests.asmdef +2 -2
- package/unitypkg/Tests/Editor/UnityCliAdmissionCoordinatorIntegrationTests.cs +1329 -0
- package/unitypkg/Tests/Editor/UnityCliAdmissionPoolTests.cs +311 -114
- package/unitypkg/Tests/Editor/UnityCliAdmissionRepairStateTests.cs +94 -0
- package/unitypkg/Tests/Editor/UnityCliBridgeAdmissionIntegrationTests.cs +1229 -0
- package/unitypkg/Tests/Editor/UnityCliBridgeQueuePolicyTests.cs +412 -0
- package/unitypkg/Tests/Editor/UnityCliContinuationIntegrationTests.cs +292 -0
- package/unitypkg/Tests/Editor/UnityCliDiagnosticBoundaryTests.cs +120 -0
- package/unitypkg/Tests/Editor/UnityCliDurableStatusTests.cs +84 -0
- package/unitypkg/Tests/Editor/UnityCliExceptionProjectionTests.cs +72 -0
- package/unitypkg/Tests/Editor/UnityCliInstancePublicationRetryTests.cs +180 -97
- package/unitypkg/Tests/Editor/UnityCliMemoryReflectionIntegrationTests.cs +434 -0
- package/unitypkg/Tests/Editor/UnityCliRequestBudgetTests.cs +615 -0
- package/unitypkg/Tests/Editor/UnityCliRuntimeBridgeIntegrationTests.cs +520 -0
- package/unitypkg/Tests/Editor/UnityCliToolCatalogTests.cs +562 -0
- package/unitypkg/Tests/Runtime/UnityCli.Runtime.Tests.asmdef +23 -0
- package/unitypkg/Tests/Runtime/UnityCliRuntimeCatalogValidationTests.cs +29 -0
- package/unitypkg/package.json +1 -1
- package/contracts/static-capability-catalog.json +0 -48226
- package/dist/bridge/domains/diagnose.d.ts +0 -2
- package/dist/bridge/domains/diagnose.js +0 -11
- package/dist/bridge/domains/diagnose.js.map +0 -1
- package/dist/bridge/domains/extension.d.ts +0 -8
- package/dist/bridge/domains/extension.js +0 -20
- package/dist/bridge/domains/extension.js.map +0 -1
- package/dist/capabilities.d.ts +0 -5
- package/dist/capabilities.js +0 -84
- package/dist/capabilities.js.map +0 -1
- package/dist/static-capability-catalog.d.ts +0 -13
- package/dist/static-capability-catalog.js +0 -41
- package/dist/static-capability-catalog.js.map +0 -1
- package/dist/tools/diagnose/capabilities.d.ts +0 -13
- package/dist/tools/diagnose/capabilities.js +0 -34
- package/dist/tools/diagnose/capabilities.js.map +0 -1
- package/dist/tools/package/info.d.ts +0 -19
- package/dist/tools/package/info.js +0 -27
- package/dist/tools/package/info.js.map +0 -1
- package/dist/tools/package/list.d.ts +0 -27
- package/dist/tools/package/list.js +0 -21
- package/dist/tools/package/list.js.map +0 -1
- package/dist/tools/package/registry-get.d.ts +0 -10
- package/dist/tools/package/registry-get.js +0 -22
- package/dist/tools/package/registry-get.js.map +0 -1
- package/dist/tools/package/scoped-registry-list.d.ts +0 -14
- package/dist/tools/package/scoped-registry-list.js +0 -22
- package/dist/tools/package/scoped-registry-list.js.map +0 -1
- package/dist/tools/package/search.d.ts +0 -17
- package/dist/tools/package/search.js +0 -39
- package/dist/tools/package/search.js.map +0 -1
- package/dist/tools/package/status.d.ts +0 -21
- package/dist/tools/package/status.js +0 -37
- package/dist/tools/package/status.js.map +0 -1
- package/dist/tools/tools/describe.d.ts +0 -27
- package/dist/tools/tools/describe.js +0 -35
- package/dist/tools/tools/describe.js.map +0 -1
- package/dist/tools/tools/group-list.d.ts +0 -16
- package/dist/tools/tools/group-list.js +0 -38
- package/dist/tools/tools/group-list.js.map +0 -1
- package/dist/tools/tools/group.d.ts +0 -13
- package/dist/tools/tools/group.js +0 -34
- package/dist/tools/tools/group.js.map +0 -1
- package/dist/tools/tools/pagination.d.ts +0 -17
- package/dist/tools/tools/pagination.js +0 -28
- package/dist/tools/tools/pagination.js.map +0 -1
- package/dist/tools/tools/search.d.ts +0 -15
- package/dist/tools/tools/search.js +0 -42
- package/dist/tools/tools/search.js.map +0 -1
- package/unitypkg/Editor/Tools/diagnose/preflight.cs +0 -269
- package/unitypkg/Editor/Tools/editor/console.cs +0 -26
- package/unitypkg/Editor/Tools/extension/status.cs +0 -87
- package/unitypkg/Editor/Tools/go/inspect.cs +0 -49
- package/unitypkg/Editor/Tools/graphics/pipeline-quality.cs +0 -24
- package/unitypkg/Editor/Tools/graphics/probe-positions.cs +0 -58
- package/unitypkg/Editor/Tools/graphics/settings.cs +0 -104
- package/unitypkg/Editor/Tools/graphics/stats-counters.cs +0 -28
- package/unitypkg/Editor/Tools/graphics/stats-memory.cs +0 -21
- package/unitypkg/Editor/Tools/instances/list.cs +0 -71
- package/unitypkg/Editor/Tools/physics/raycast-all.cs +0 -67
- package/unitypkg/Editor/Tools/scene/build-settings.cs +0 -69
- package/unitypkg/Editor/Tools/scene/data.cs +0 -125
- package/unitypkg/Editor/Tools/tests/list.cs +0 -98
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { compactArgs, stringFlag, targetArgs } from "../args.js";
|
|
2
|
-
export const diagnoseBridgeSpecs = [
|
|
3
|
-
{ group: "preflight", command: "", bridgeCommand: "project-tool.run", toolName: "diagnose.preflight", buildArgs: diagnoseArgs },
|
|
4
|
-
{ group: "preflight", command: "run", bridgeCommand: "project-tool.run", toolName: "diagnose.preflight", buildArgs: diagnoseArgs },
|
|
5
|
-
{ group: "diagnose", command: "", bridgeCommand: "project-tool.run", toolName: "diagnose.preflight", buildArgs: diagnoseArgs },
|
|
6
|
-
{ group: "diagnose", command: "run", bridgeCommand: "project-tool.run", toolName: "diagnose.preflight", buildArgs: diagnoseArgs }
|
|
7
|
-
];
|
|
8
|
-
function diagnoseArgs({ flags, positionalTarget }) {
|
|
9
|
-
return compactArgs({ ...targetArgs(flags, positionalTarget), path: stringFlag(flags, "path") ?? positionalTarget, command: stringFlag(flags, "command") });
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=diagnose.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"diagnose.js","sourceRoot":"","sources":["../../../src/bridge/domains/diagnose.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAGjE,MAAM,CAAC,MAAM,mBAAmB,GAAwB;IACtD,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE,EAAE,aAAa,EAAE,kBAAkB,EAAE,QAAQ,EAAE,oBAAoB,EAAE,SAAS,EAAE,YAAY,EAAE;IAC/H,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,QAAQ,EAAE,oBAAoB,EAAE,SAAS,EAAE,YAAY,EAAE;IAClI,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,EAAE,aAAa,EAAE,kBAAkB,EAAE,QAAQ,EAAE,oBAAoB,EAAE,SAAS,EAAE,YAAY,EAAE;IAC9H,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,QAAQ,EAAE,oBAAoB,EAAE,SAAS,EAAE,YAAY,EAAE;CAClI,CAAC;AAEF,SAAS,YAAY,CAAC,EAAE,KAAK,EAAE,gBAAgB,EAAiD;IAC9F,OAAO,WAAW,CAAC,EAAE,GAAG,UAAU,CAAC,KAAK,EAAE,gBAAgB,CAAC,EAAE,IAAI,EAAE,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,gBAAgB,EAAE,OAAO,EAAE,UAAU,CAAC,KAAK,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC;AAC7J,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Bridge domain specs for extension commands.
|
|
3
|
-
*
|
|
4
|
-
* extension.status is a read-only diagnostic command. install/remove are
|
|
5
|
-
* handled by the CLI command layer and are not exposed as bridge commands.
|
|
6
|
-
*/
|
|
7
|
-
import type { BridgeCommandSpec } from "../types.js";
|
|
8
|
-
export declare const extensionBridgeSpecs: BridgeCommandSpec[];
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Bridge domain specs for extension commands.
|
|
3
|
-
*
|
|
4
|
-
* extension.status is a read-only diagnostic command. install/remove are
|
|
5
|
-
* handled by the CLI command layer and are not exposed as bridge commands.
|
|
6
|
-
*/
|
|
7
|
-
export const extensionBridgeSpecs = [
|
|
8
|
-
{
|
|
9
|
-
group: "extension",
|
|
10
|
-
command: "status",
|
|
11
|
-
bridgeCommand: "project-tool.run",
|
|
12
|
-
toolName: "extension.status",
|
|
13
|
-
buildArgs: (ctx) => ({
|
|
14
|
-
extensionId: ctx.flags["id"] ?? ctx.flags["name"] ?? ctx.positionalTarget
|
|
15
|
-
}),
|
|
16
|
-
destructiveHint: false,
|
|
17
|
-
internal: true
|
|
18
|
-
}
|
|
19
|
-
];
|
|
20
|
-
//# sourceMappingURL=extension.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"extension.js","sourceRoot":"","sources":["../../../src/bridge/domains/extension.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,CAAC,MAAM,oBAAoB,GAAwB;IACvD;QACE,KAAK,EAAE,WAAW;QAClB,OAAO,EAAE,QAAQ;QACjB,aAAa,EAAE,kBAAkB;QACjC,QAAQ,EAAE,kBAAkB;QAC5B,SAAS,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;YACnB,WAAW,EAAE,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,gBAAgB;SAC1E,CAAC;QACF,eAAe,EAAE,KAAK;QACtB,QAAQ,EAAE,IAAI;KACf;CACF,CAAC"}
|
package/dist/capabilities.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type BridgeRuntime } from "./bridge/index.js";
|
|
2
|
-
import type { ProjectToolRuntime } from "./project-tool-discovery.js";
|
|
3
|
-
import type { CliResult } from "./types.js";
|
|
4
|
-
/** 公开 capability summary 只汇总当前实例完整目录,不按实现来源拆成不同发现入口。 */
|
|
5
|
-
export declare function handleCapabilitiesCommand(flags: Record<string, string | boolean>, runtime: BridgeRuntime & ProjectToolRuntime, requestId: string): Promise<CliResult>;
|
package/dist/capabilities.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { getString } from "./args.js";
|
|
2
|
-
import { executeBridgePayload } from "./bridge/index.js";
|
|
3
|
-
import { readInstalledExtensions } from "./cli-commands/extensions.js";
|
|
4
|
-
import { extensionAvailabilityFlags } from "./extension-availability.js";
|
|
5
|
-
import { ExtensionRegistry, extensionAvailabilitySummary } from "./extensions/index.js";
|
|
6
|
-
import { builtinExtensionMetadata } from "./extensions/metadata/index.js";
|
|
7
|
-
import { readInstalledUnityPackages } from "./extensions/project-resolver.js";
|
|
8
|
-
import { success } from "./output.js";
|
|
9
|
-
import { loadToolCatalog } from "./tools/catalog.js";
|
|
10
|
-
import { toolSource } from "./tools/metadata/index.js";
|
|
11
|
-
/** 公开 capability summary 只汇总当前实例完整目录,不按实现来源拆成不同发现入口。 */
|
|
12
|
-
export async function handleCapabilitiesCommand(flags, runtime, requestId) {
|
|
13
|
-
const toolCatalog = await loadToolCatalog(flags, runtime, `${requestId}_tools`);
|
|
14
|
-
if (toolCatalog.ok === false)
|
|
15
|
-
return toolCatalog;
|
|
16
|
-
const catalogSummary = buildCatalogSummary(toolCatalog.tools);
|
|
17
|
-
const extensionSummary = await buildExtensionSummary(flags, runtime);
|
|
18
|
-
const runtimeSummary = await readRuntimeSummary(flags, runtime, `${requestId}_runtime`);
|
|
19
|
-
return success(requestId, {
|
|
20
|
-
catalog: catalogSummary,
|
|
21
|
-
...(runtimeSummary ? { runtime: runtimeSummary } : {}),
|
|
22
|
-
extensions: extensionSummary,
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
/** selected instance 是 Tool 路径唯一项目来源;doctor 仍可直接传 project 控制面参数。 */
|
|
26
|
-
async function buildExtensionSummary(flags, runtime) {
|
|
27
|
-
const resolvedFlags = await extensionAvailabilityFlags(flags, runtime);
|
|
28
|
-
const projectPath = getString(resolvedFlags, "project");
|
|
29
|
-
const total = builtinExtensionMetadata().length;
|
|
30
|
-
if (!projectPath)
|
|
31
|
-
return { total, physicalStateKnown: false };
|
|
32
|
-
try {
|
|
33
|
-
const registry = new ExtensionRegistry();
|
|
34
|
-
const installedPackages = await readInstalledUnityPackages(projectPath);
|
|
35
|
-
const summary = extensionAvailabilitySummary(registry, installedPackages);
|
|
36
|
-
const enabled = await readInstalledExtensions(projectPath);
|
|
37
|
-
return {
|
|
38
|
-
total: summary.total,
|
|
39
|
-
available: summary.available,
|
|
40
|
-
unavailable: summary.unavailable,
|
|
41
|
-
unknown: summary.unknown,
|
|
42
|
-
enabled: enabled.size,
|
|
43
|
-
physicalStateKnown: true,
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
catch {
|
|
47
|
-
return { total, physicalStateKnown: false };
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
/** Live preflight 只投影 Bridge 健康与公开能力计数。 */
|
|
51
|
-
async function readRuntimeSummary(flags, runtime, requestId) {
|
|
52
|
-
try {
|
|
53
|
-
const result = await executeBridgePayload(requestId, "diagnose.preflight", {}, flags, runtime, undefined, { mode: "read", mutation: false });
|
|
54
|
-
if (!result.ok || !result.data || typeof result.data !== "object" || Array.isArray(result.data))
|
|
55
|
-
return undefined;
|
|
56
|
-
const bridge = result.data.bridge;
|
|
57
|
-
if (!bridge || typeof bridge !== "object" || Array.isArray(bridge))
|
|
58
|
-
return undefined;
|
|
59
|
-
const value = bridge;
|
|
60
|
-
if (typeof value.ready !== "boolean" || typeof value.toolCount !== "number")
|
|
61
|
-
return undefined;
|
|
62
|
-
return { bridge: { ready: value.ready, toolCount: value.toolCount } };
|
|
63
|
-
}
|
|
64
|
-
catch {
|
|
65
|
-
return undefined;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
/** catalog summary 只汇总唯一 Tool 目录;source 仅作说明维度。 */
|
|
69
|
-
function buildCatalogSummary(tools) {
|
|
70
|
-
const groups = {};
|
|
71
|
-
const sources = {};
|
|
72
|
-
for (const tool of tools) {
|
|
73
|
-
groups[tool.group] = (groups[tool.group] ?? 0) + 1;
|
|
74
|
-
const source = toolSource(tool);
|
|
75
|
-
sources[source] = (sources[source] ?? 0) + 1;
|
|
76
|
-
}
|
|
77
|
-
return {
|
|
78
|
-
toolCount: tools.length,
|
|
79
|
-
groupCount: Object.keys(groups).length,
|
|
80
|
-
groups: Object.fromEntries(Object.entries(groups).sort(([left], [right]) => left.localeCompare(right))),
|
|
81
|
-
sources: Object.fromEntries(Object.entries(sources).sort(([left], [right]) => left.localeCompare(right))),
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
//# sourceMappingURL=capabilities.js.map
|
package/dist/capabilities.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../src/capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,oBAAoB,EAAsB,MAAM,mBAAmB,CAAC;AAC7E,OAAO,EAAE,uBAA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ACtC,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;QACvG,OAAO,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;KAC1G,CAAC;AACJ,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
interface StaticCapabilityCatalogFile {
|
|
2
|
-
version: number;
|
|
3
|
-
semantics: string;
|
|
4
|
-
tools: Array<Record<string, unknown>>;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* 读取 package 自带的 built-in/Extension descriptor snapshot。
|
|
8
|
-
* 该文件不包含 project-defined 能力,仅供生成、contract 与离线审计;不得作为公开 discovery fallback。
|
|
9
|
-
*/
|
|
10
|
-
export declare function staticCapabilityCatalog(): StaticCapabilityCatalogFile;
|
|
11
|
-
/** 测试生成器幂等或替换 fixture 后可清除进程内 cache。 */
|
|
12
|
-
export declare function clearStaticCapabilityCatalogCache(): void;
|
|
13
|
-
export {};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { readFileSync } from "node:fs";
|
|
2
|
-
import { fileURLToPath } from "node:url";
|
|
3
|
-
let cached;
|
|
4
|
-
/**
|
|
5
|
-
* 读取 package 自带的 built-in/Extension descriptor snapshot。
|
|
6
|
-
* 该文件不包含 project-defined 能力,仅供生成、contract 与离线审计;不得作为公开 discovery fallback。
|
|
7
|
-
*/
|
|
8
|
-
export function staticCapabilityCatalog() {
|
|
9
|
-
if (cached)
|
|
10
|
-
return cached;
|
|
11
|
-
const path = fileURLToPath(new URL("../contracts/static-capability-catalog.json", import.meta.url));
|
|
12
|
-
const parsed = JSON.parse(readFileSync(path, "utf8"));
|
|
13
|
-
validateCatalog(parsed);
|
|
14
|
-
cached = parsed;
|
|
15
|
-
return parsed;
|
|
16
|
-
}
|
|
17
|
-
/** 测试生成器幂等或替换 fixture 后可清除进程内 cache。 */
|
|
18
|
-
export function clearStaticCapabilityCatalogCache() {
|
|
19
|
-
cached = undefined;
|
|
20
|
-
}
|
|
21
|
-
/** snapshot 结构异常必须在内部生成/审计边界 fail closed。 */
|
|
22
|
-
function validateCatalog(catalog) {
|
|
23
|
-
if (catalog.version !== 1 || !Array.isArray(catalog.tools) || Object.hasOwn(catalog, "contexts")) {
|
|
24
|
-
throw new Error("Static capability catalog must be version 1 with one tools array and no legacy contexts field.");
|
|
25
|
-
}
|
|
26
|
-
validateEntries(catalog.tools, "Tool");
|
|
27
|
-
}
|
|
28
|
-
function validateEntries(entries, kind) {
|
|
29
|
-
const names = new Set();
|
|
30
|
-
for (const entry of entries) {
|
|
31
|
-
const name = typeof entry?.name === "string" ? entry.name : "";
|
|
32
|
-
const source = entry?.source;
|
|
33
|
-
if (!name || (source !== "built-in" && source !== "extension")) {
|
|
34
|
-
throw new Error(`Static ${kind} descriptor must have a name and built-in/extension source.`);
|
|
35
|
-
}
|
|
36
|
-
if (names.has(name))
|
|
37
|
-
throw new Error(`Duplicate static ${kind} descriptor: ${name}`);
|
|
38
|
-
names.add(name);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=static-capability-catalog.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"static-capability-catalog.js","sourceRoot":"","sources":["../src/static-capability-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAQzC,IAAI,MAA+C,CAAC;AAEpD;;;GA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AC;YAC/D,MAAM,IAAI,KAAK,CAAC,UAAU,IAAI,6DAA6D,CAAC,CAAC;QAC/F,CAAC;QACD,IAAI,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,oBAAoB,IAAI,gBAAgB,IAAI,EAAE,CAAC,CAAC;QACrF,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { AnyJson } from "../../schema/any-json.js";
|
|
2
|
-
export interface DiagnoseCapabilitiesRequest {
|
|
3
|
-
}
|
|
4
|
-
export interface DiagnoseCapabilitiesObject {
|
|
5
|
-
[key: string]: AnyJson;
|
|
6
|
-
}
|
|
7
|
-
export interface DiagnoseCapabilitiesResult {
|
|
8
|
-
catalog: DiagnoseCapabilitiesObject;
|
|
9
|
-
runtime?: DiagnoseCapabilitiesObject;
|
|
10
|
-
extensions: DiagnoseCapabilitiesObject;
|
|
11
|
-
}
|
|
12
|
-
declare const _default: import("../define.js").ToolDefinition<DiagnoseCapabilitiesRequest, DiagnoseCapabilitiesResult>;
|
|
13
|
-
export default _default;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { handleCapabilitiesCommand } from "../../capabilities.js";
|
|
2
|
-
import { defineTool } from "../define.js";
|
|
3
|
-
import { StructuredToolError } from "../errors.js";
|
|
4
|
-
export default defineTool({
|
|
5
|
-
name: "diagnose.capabilities",
|
|
6
|
-
summary: "Summarize the selected Unity instance's complete Tool, Extension, and runtime capabilities.",
|
|
7
|
-
description: "Summarize the complete unified capability catalog of the selected live Unity instance. Package, Extension, and project-defined capabilities use the same catalog.",
|
|
8
|
-
group: "diagnose",
|
|
9
|
-
destructiveHint: false,
|
|
10
|
-
playModeSupport: "supported",
|
|
11
|
-
handler: "offline",
|
|
12
|
-
supportStatus: "cli-only",
|
|
13
|
-
examples: [
|
|
14
|
-
{ description: "Summarize the instance selected from CWD", argv: ["tools", "run", "diagnose.capabilities", "--input", "{}"] },
|
|
15
|
-
{ description: "Summarize an explicitly selected instance", argv: ["tools", "run", "diagnose.capabilities", "--instance", "<projectPath>"] }
|
|
16
|
-
],
|
|
17
|
-
/** 复用统一 live catalog,来源只作为汇总维度。 */
|
|
18
|
-
async execute(request, ctx) {
|
|
19
|
-
const flags = { ...ctx.flags };
|
|
20
|
-
const runtime = {
|
|
21
|
-
dataDir: ctx.dataDir,
|
|
22
|
-
rootAdmission: ctx.rootAdmission,
|
|
23
|
-
rootAdmissions: ctx.rootAdmissions,
|
|
24
|
-
bridgeExecute: ctx.bridgeExecute,
|
|
25
|
-
projectTools: ctx.projectTools
|
|
26
|
-
};
|
|
27
|
-
const result = await handleCapabilitiesCommand(flags, runtime, ctx.requestId);
|
|
28
|
-
if (!result.ok) {
|
|
29
|
-
throw StructuredToolError.from(result.error);
|
|
30
|
-
}
|
|
31
|
-
return result.data;
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
//# sourceMappingURL=capabilities.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../../../src/tools/diagnose/capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAGlE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAanD,eAAe,UAAU,CAA0D;IACjF,IAAI,EAAE,uBAAuB;IAC7B,OAAO,EAAE,6FAA6F;IACtG,WAAW,EAAE,mKAAmK;IAChL,KAAK,EAAE,UAAU;IACjB,eAAe,EAAE,KAAK;IACtB,eAAe,EAAE,WAAW;IAC5B,OAAO,EAAE,SAAS;IAClB,aAAa,EAAE,UAAU;IACzB,QAAQ,EAAE;QACR,EAAE,WAAW,EAAE,0CAA0C,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,uBAAuB,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE;QAC7H,EAAE,WAAW,EAAE,2CAA2C,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,uBAAuB,EAAE,YAAY,EAAE,eAAe,CAAC,EAAE;KAC7I;IACD,mCAAmC;IACnC,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG;QACxB,MAAM,KAAK,GAAG,EAAE,GAAG,GAAG,CAAC,KAAK,EAAE,CAAC;QAC/B,MAAM,OAAO,GAAuC;YAClD,OAAO,EAAE,GAAG,CAAC,OAAO;YACpB,aAAa,EAAE,GAAG,CAAC,aAAa;YAChC,cAAc,EAAE,GAAG,CAAC,cAAc;YAClC,aAAa,EAAE,GAAG,CAAC,aAAa;YAChC,YAAY,EAAE,GAAG,CAAC,YAAY;SAC/B,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,yBAAyB,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC;QAC9E,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;YACf,MAAM,mBAAmB,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC/C,CAAC;QACD,OAAO,MAAM,CAAC,IAAkC,CAAC;IACnD,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export interface PackageInfoRequest {
|
|
2
|
-
name: string;
|
|
3
|
-
project?: string;
|
|
4
|
-
}
|
|
5
|
-
export interface PackageInfoEntry {
|
|
6
|
-
name: string;
|
|
7
|
-
requestedVersion?: string;
|
|
8
|
-
lockedVersion?: string;
|
|
9
|
-
source?: string;
|
|
10
|
-
url?: string;
|
|
11
|
-
hash?: string;
|
|
12
|
-
dependencies?: Record<string, string>;
|
|
13
|
-
}
|
|
14
|
-
export interface PackageInfoResult {
|
|
15
|
-
projectPath: string;
|
|
16
|
-
package: PackageInfoEntry;
|
|
17
|
-
}
|
|
18
|
-
declare const _default: import("../define.js").ToolDefinition<PackageInfoRequest, PackageInfoResult>;
|
|
19
|
-
export default _default;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { resolve } from "node:path";
|
|
2
|
-
import { PackageManagerError, packageInfo, validatePackageName } from "../../package-manager.js";
|
|
3
|
-
import { defineTool } from "../define.js";
|
|
4
|
-
export default defineTool({
|
|
5
|
-
name: "package.info",
|
|
6
|
-
summary: "Show detailed info for one installed package by name.",
|
|
7
|
-
description: "Show detailed info for one installed package by name. Returns PACKAGE_NOT_FOUND if the package is not in the manifest; use package.list first.",
|
|
8
|
-
group: "package",
|
|
9
|
-
destructiveHint: false,
|
|
10
|
-
playModeSupport: "supported",
|
|
11
|
-
handler: "offline",
|
|
12
|
-
supportStatus: "cli-only",
|
|
13
|
-
examples: [
|
|
14
|
-
{ description: "Inspect one package", argv: ["tools", "run", "package.info", "--input", "{\"name\":\"com.alpsckr.unitycli\",\"project\":\"./Dev/UnityProject\"}"] }
|
|
15
|
-
],
|
|
16
|
-
/** 读取单个 package 条目;未找到时返回稳定 PACKAGE_NOT_FOUND。 */
|
|
17
|
-
async execute(request, context) {
|
|
18
|
-
const name = validatePackageName(request.name);
|
|
19
|
-
const projectPath = resolve(request.project ?? context.projectPath);
|
|
20
|
-
const info = await packageInfo(projectPath, name);
|
|
21
|
-
if (!info) {
|
|
22
|
-
throw new PackageManagerError("PACKAGE_NOT_FOUND", `Package not found: ${name}`, ["Run tools run package.list to inspect installed packages."]);
|
|
23
|
-
}
|
|
24
|
-
return { projectPath, package: info };
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
//# sourceMappingURL=info.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"info.js","sourceRoot":"","sources":["../../../src/tools/package/info.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACjG,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAsB1C,eAAe,UAAU,CAAwC;IAC/D,IAAI,EAAE,cAAc;IACpB,OAAO,EAAE,uDAAuD;IAChE,WAAW,EAAE,gJAAgJ;IAC7J,KAAK,EAAE,SAAS;IAChB,eAAe,EAAE,KAAK;IACtB,eAAe,EAAE,WAAW;IAC5B,OAAO,EAAE,SAAS;IAClB,aAAa,EAAE,UAAU;IACzB,QAAQ,EAAE;QACR,EAAE,WAAW,EAAE,qBAAqB,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,wEAAwE,CAAC,EAAE;KACpK;IACD,kDAAkD;IAClD,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO;QAC5B,MAAM,IAAI,GAAG,mBAAmB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC/C,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC;QACpE,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;QAClD,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,MAAM,IAAI,mBAAmB,CAAC,mBAAmB,EAAE,sBAAsB,IAAI,EAAE,EAAE,CAAC,2DAA2D,CAAC,CAAC,CAAC;QAClJ,CAAC;QACD,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IACxC,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export interface PackageListRequest {
|
|
2
|
-
project?: string;
|
|
3
|
-
}
|
|
4
|
-
export interface PackageListScopedRegistry {
|
|
5
|
-
name: string;
|
|
6
|
-
url: string;
|
|
7
|
-
scopes: string[];
|
|
8
|
-
}
|
|
9
|
-
export interface PackageListEntry {
|
|
10
|
-
name: string;
|
|
11
|
-
requestedVersion?: string;
|
|
12
|
-
lockedVersion?: string;
|
|
13
|
-
source?: string;
|
|
14
|
-
url?: string;
|
|
15
|
-
hash?: string;
|
|
16
|
-
dependencies?: Record<string, string>;
|
|
17
|
-
}
|
|
18
|
-
export interface PackageListResult {
|
|
19
|
-
projectPath: string;
|
|
20
|
-
manifestPath: string;
|
|
21
|
-
lockPath: string;
|
|
22
|
-
registry?: string;
|
|
23
|
-
scopedRegistries: PackageListScopedRegistry[];
|
|
24
|
-
packages: PackageListEntry[];
|
|
25
|
-
}
|
|
26
|
-
declare const _default: import("../define.js").ToolDefinition<PackageListRequest, PackageListResult>;
|
|
27
|
-
export default _default;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { resolve } from "node:path";
|
|
2
|
-
import { readSnapshot } from "../../package-manager.js";
|
|
3
|
-
import { defineTool } from "../define.js";
|
|
4
|
-
export default defineTool({
|
|
5
|
-
name: "package.list",
|
|
6
|
-
summary: "List installed packages and their requested/locked versions in the project manifest.",
|
|
7
|
-
description: "List installed packages and their requested/locked versions in the project manifest. Offline (reads manifest directly, no Unity needed). Use package.status for a manifest+lock summary or package.info for one package.",
|
|
8
|
-
group: "package",
|
|
9
|
-
destructiveHint: false,
|
|
10
|
-
playModeSupport: "supported",
|
|
11
|
-
handler: "offline",
|
|
12
|
-
supportStatus: "cli-only",
|
|
13
|
-
examples: [
|
|
14
|
-
{ description: "List installed packages", argv: ["tools", "run", "package.list", "--input", "{\"project\":\"./Dev/UnityProject\"}"] }
|
|
15
|
-
],
|
|
16
|
-
/** 读取 Unity manifest/lock 快照,不触发 Unity Editor 或 PackageManager resolve。 */
|
|
17
|
-
async execute(request, context) {
|
|
18
|
-
return readSnapshot(resolve(request.project ?? context.projectPath));
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
//# sourceMappingURL=list.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/tools/package/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AA+B1C,eAAe,UAAU,CAAwC;IAC/D,IAAI,EAAE,cAAc;IACpB,OAAO,EAAE,sFAAsF;IAC/F,WAAW,EAAE,0NAA0N;IACvO,KAAK,EAAE,SAAS;IAChB,eAAe,EAAE,KAAK;IACtB,eAAe,EAAE,WAAW;IAC5B,OAAO,EAAE,SAAS;IAClB,aAAa,EAAE,UAAU;IACzB,QAAQ,EAAE;QACR,EAAE,WAAW,EAAE,yBAAyB,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,sCAAsC,CAAC,EAAE;KACtI;IACD,2EAA2E;IAC3E,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO;QAC5B,OAAO,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;IACvE,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export interface PackageRegistryGetRequest {
|
|
2
|
-
project?: string;
|
|
3
|
-
}
|
|
4
|
-
export interface PackageRegistryGetResult {
|
|
5
|
-
projectPath: string;
|
|
6
|
-
manifestPath: string;
|
|
7
|
-
registry?: string;
|
|
8
|
-
}
|
|
9
|
-
declare const _default: import("../define.js").ToolDefinition<PackageRegistryGetRequest, PackageRegistryGetResult>;
|
|
10
|
-
export default _default;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { resolve } from "node:path";
|
|
2
|
-
import { readSnapshot } from "../../package-manager.js";
|
|
3
|
-
import { defineTool } from "../define.js";
|
|
4
|
-
export default defineTool({
|
|
5
|
-
name: "package.registry.get",
|
|
6
|
-
summary: "Read the primary registry URL from the project manifest.",
|
|
7
|
-
description: "Read the primary registry URL from Packages/manifest.json. Offline and read-only.",
|
|
8
|
-
group: "package",
|
|
9
|
-
destructiveHint: false,
|
|
10
|
-
playModeSupport: "supported",
|
|
11
|
-
handler: "offline",
|
|
12
|
-
supportStatus: "cli-only",
|
|
13
|
-
examples: [
|
|
14
|
-
{ description: "Read the primary registry", argv: ["tools", "run", "package.registry.get", "--input", "{}"] }
|
|
15
|
-
],
|
|
16
|
-
async execute(request, context) {
|
|
17
|
-
const projectPath = resolve(request.project ?? context.projectPath);
|
|
18
|
-
const snapshot = await readSnapshot(projectPath);
|
|
19
|
-
return { projectPath, manifestPath: snapshot.manifestPath, registry: snapshot.registry };
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
//# sourceMappingURL=registry-get.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registry-get.js","sourceRoot":"","sources":["../../../src/tools/package/registry-get.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAoB,MAAM,cAAc,CAAC;AAY5D,eAAe,UAAU,CAAsD;IAC7E,IAAI,EAAE,sBAAsB;IAC5B,OAAO,EAAE,0DAA0D;IACnE,WAAW,EAAE,mFAAmF;IAChG,KAAK,EAAE,SAAS;IAChB,eAAe,EAAE,KAAK;IACtB,eAAe,EAAE,WAAW;IAC5B,OAAO,EAAE,SAAS;IAClB,aAAa,EAAE,UAAU;IACzB,QAAQ,EAAE;QACR,EAAE,WAAW,EAAE,2BAA2B,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,sBAAsB,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE;KAC9G;IACD,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO;QAC5B,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC;QACpE,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,WAAW,CAAC,CAAC;QACjD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,CAAC,YAAY,EAAE,QAAQ,EAAE,QAAQ,CAAC,QAAQ,EAAE,CAAC;IAC3F,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export interface PackageScopedRegistryListRequest {
|
|
2
|
-
project?: string;
|
|
3
|
-
}
|
|
4
|
-
export interface PackageScopedRegistryListResult {
|
|
5
|
-
projectPath: string;
|
|
6
|
-
manifestPath: string;
|
|
7
|
-
scopedRegistries: Array<{
|
|
8
|
-
name: string;
|
|
9
|
-
url: string;
|
|
10
|
-
scopes: string[];
|
|
11
|
-
}>;
|
|
12
|
-
}
|
|
13
|
-
declare const _default: import("../define.js").ToolDefinition<PackageScopedRegistryListRequest, PackageScopedRegistryListResult>;
|
|
14
|
-
export default _default;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { resolve } from "node:path";
|
|
2
|
-
import { readSnapshot } from "../../package-manager.js";
|
|
3
|
-
import { defineTool } from "../define.js";
|
|
4
|
-
export default defineTool({
|
|
5
|
-
name: "package.scoped-registry.list",
|
|
6
|
-
summary: "List scoped registries from the project manifest.",
|
|
7
|
-
description: "Read scoped registries from Packages/manifest.json. Offline and read-only.",
|
|
8
|
-
group: "package",
|
|
9
|
-
destructiveHint: false,
|
|
10
|
-
playModeSupport: "supported",
|
|
11
|
-
handler: "offline",
|
|
12
|
-
supportStatus: "cli-only",
|
|
13
|
-
examples: [
|
|
14
|
-
{ description: "List scoped registries", argv: ["tools", "run", "package.scoped-registry.list", "--input", "{}"] }
|
|
15
|
-
],
|
|
16
|
-
async execute(request, context) {
|
|
17
|
-
const projectPath = resolve(request.project ?? context.projectPath);
|
|
18
|
-
const snapshot = await readSnapshot(projectPath);
|
|
19
|
-
return { projectPath, manifestPath: snapshot.manifestPath, scopedRegistries: snapshot.scopedRegistries };
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
//# sourceMappingURL=scoped-registry-list.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scoped-registry-list.js","sourceRoot":"","sources":["../../../src/tools/package/scoped-registry-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAoB,MAAM,cAAc,CAAC;AAY5D,eAAe,UAAU,CAAoE;IAC3F,IAAI,EAAE,8BAA8B;IACpC,OAAO,EAAE,mDAAmD;IAC5D,WAAW,EAAE,4EAA4E;IACzF,KAAK,EAAE,SAAS;IAChB,eAAe,EAAE,KAAK;IACtB,eAAe,EAAE,WAAW;IAC5B,OAAO,EAAE,SAAS;IAClB,aAAa,EAAE,UAAU;IACzB,QAAQ,EAAE;QACR,EAAE,WAAW,EAAE,wBAAwB,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,8BAA8B,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE;KACnH;IACD,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO;QAC5B,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC;QACpE,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,WAAW,CAAC,CAAC;QACjD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,CAAC,YAAY,EAAE,gBAAgB,EAAE,QAAQ,CAAC,gBAAgB,EAAE,CAAC;IAC3G,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export interface PackageSearchRequest {
|
|
2
|
-
query: string;
|
|
3
|
-
registry?: string;
|
|
4
|
-
project?: string;
|
|
5
|
-
}
|
|
6
|
-
export interface PackageSearchEntry {
|
|
7
|
-
name: string;
|
|
8
|
-
version?: string;
|
|
9
|
-
description?: string;
|
|
10
|
-
}
|
|
11
|
-
export interface PackageSearchResult {
|
|
12
|
-
registry: string;
|
|
13
|
-
query: string;
|
|
14
|
-
packages: PackageSearchEntry[];
|
|
15
|
-
}
|
|
16
|
-
declare const _default: import("../define.js").ToolDefinition<PackageSearchRequest, PackageSearchResult>;
|
|
17
|
-
export default _default;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { resolve } from "node:path";
|
|
2
|
-
import { PackageManagerError, readSnapshot, searchRegistry, validatePackageName, validateRegistryUrl } from "../../package-manager.js";
|
|
3
|
-
import { defineTool } from "../define.js";
|
|
4
|
-
const DEFAULT_REGISTRY = "https://package.openupm.com";
|
|
5
|
-
/** 解析 registry 来源:显式 registry 优先;显式 project 必须有效;无 project 的非 Unity CWD 回退公开 UPM registry。 */
|
|
6
|
-
async function resolveRegistrySource(request, projectPath) {
|
|
7
|
-
if (request.registry) {
|
|
8
|
-
return request.registry;
|
|
9
|
-
}
|
|
10
|
-
try {
|
|
11
|
-
return (await readSnapshot(resolve(request.project ?? projectPath))).registry ?? DEFAULT_REGISTRY;
|
|
12
|
-
}
|
|
13
|
-
catch (error) {
|
|
14
|
-
if (!request.project && error instanceof PackageManagerError && error.code === "MANIFEST_NOT_FOUND") {
|
|
15
|
-
return DEFAULT_REGISTRY;
|
|
16
|
-
}
|
|
17
|
-
throw error;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
export default defineTool({
|
|
21
|
-
name: "package.search",
|
|
22
|
-
summary: "Search a Unity package registry by name and return candidate packages with versions/descriptions.",
|
|
23
|
-
description: "Search a Unity package registry by name and return candidate packages with versions/descriptions. Offline (HTTP to registry, no Unity needed). Explicit registry avoids reading a project manifest; otherwise the tool reads the project registry and falls back to https://package.openupm.com when no project manifest is available. Use this before package.install.",
|
|
24
|
-
group: "package",
|
|
25
|
-
destructiveHint: false,
|
|
26
|
-
playModeSupport: "supported",
|
|
27
|
-
handler: "offline",
|
|
28
|
-
supportStatus: "cli-only",
|
|
29
|
-
examples: [
|
|
30
|
-
{ description: "Search a registry", argv: ["tools", "run", "package.search", "--input", "{\"query\":\"textmeshpro\",\"registry\":\"https://package.openupm.com\"}"] }
|
|
31
|
-
],
|
|
32
|
-
/** 查询 Unity package registry;不触发 Unity Editor,也不修改 manifest。 */
|
|
33
|
-
async execute(request, context) {
|
|
34
|
-
const query = validatePackageName(request.query);
|
|
35
|
-
const registry = validateRegistryUrl(await resolveRegistrySource(request, context.projectPath));
|
|
36
|
-
return { registry, query, packages: await searchRegistry(registry, query) };
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
//# sourceMappingURL=search.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../../src/tools/package/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,cAAc,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACvI,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAoB1C,MAAM,gBAAgB,GAAG,6BAA6B,CAAC;AAEvD,8FAA8F;AAC9F,KAAK,UAAU,qBAAqB,CAAC,OAA6B,EAAE,WAAmB;IACrF,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;QACrB,OAAO,OAAO,CAAC,QAAQ,CAAC;IAC1B,CAAC;IACD,IAAI,CAAC;QACH,OAAO,CAAC,MAAM,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,IAAI,gBAAgB,CAAC;IACpG,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,KAAK,YAAY,mBAAmB,IAAI,KAAK,CAAC,IAAI,KAAK,oBAAoB,EAAE,CAAC;YACpG,OAAO,gBAAgB,CAAC;QAC1B,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC;AAED,eAAe,UAAU,CAA4C;IACnE,IAAI,EAAE,gBAAgB;IACtB,OAAO,EAAE,mGAAmG;IAC5G,WAAW,EAAE,yWAAyW;IACtX,KAAK,EAAE,SAAS;IAChB,eAAe,EAAE,KAAK;IACtB,eAAe,EAAE,WAAW;IAC5B,OAAO,EAAE,SAAS;IAClB,aAAa,EAAE,UAAU;IACzB,QAAQ,EAAE;QACR,EAAE,WAAW,EAAE,mBAAmB,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,0EAA0E,CAAC,EAAE;KACtK;IACD,gEAAgE;IAChE,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO;QAC5B,MAAM,KAAK,GAAG,mBAAmB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACjD,MAAM,QAAQ,GAAG,mBAAmB,CAAC,MAAM,qBAAqB,CAAC,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;QAChG,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC;IAC9E,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export interface PackageStatusRequest {
|
|
2
|
-
project?: string;
|
|
3
|
-
}
|
|
4
|
-
export interface PackageStatusEntry {
|
|
5
|
-
name: string;
|
|
6
|
-
requestedVersion?: string | null;
|
|
7
|
-
lockedVersion?: string | null;
|
|
8
|
-
source?: string | null;
|
|
9
|
-
resolved: boolean;
|
|
10
|
-
}
|
|
11
|
-
export interface PackageStatusResult {
|
|
12
|
-
projectPath: string;
|
|
13
|
-
manifestPath: string;
|
|
14
|
-
lockPath: string;
|
|
15
|
-
packageCount: number;
|
|
16
|
-
registry?: string | null;
|
|
17
|
-
scopedRegistryCount: number;
|
|
18
|
-
packages: PackageStatusEntry[];
|
|
19
|
-
}
|
|
20
|
-
declare const _default: import("../define.js").ToolDefinition<PackageStatusRequest, PackageStatusResult>;
|
|
21
|
-
export default _default;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { resolve } from "node:path";
|
|
2
|
-
import { readSnapshot } from "../../package-manager.js";
|
|
3
|
-
import { defineTool } from "../define.js";
|
|
4
|
-
export default defineTool({
|
|
5
|
-
name: "package.status",
|
|
6
|
-
summary: "Summarize manifest and lock state: package count, registry, scoped registries, and per-package resolved flag.",
|
|
7
|
-
description: "Summarize manifest and lock state: package count, registry, scoped registries, and per-package resolved flag. Offline.",
|
|
8
|
-
group: "package",
|
|
9
|
-
destructiveHint: false,
|
|
10
|
-
playModeSupport: "supported",
|
|
11
|
-
handler: "offline",
|
|
12
|
-
supportStatus: "cli-only",
|
|
13
|
-
examples: [
|
|
14
|
-
{ description: "Show package status", argv: ["tools", "run", "package.status", "--input", "{\"project\":\"./Dev/UnityProject\"}"] }
|
|
15
|
-
],
|
|
16
|
-
/** 汇总 manifest/lock 快照,不触发 Unity Editor 或 PackageManager resolve。 */
|
|
17
|
-
async execute(request, context) {
|
|
18
|
-
const projectPath = resolve(request.project ?? context.projectPath);
|
|
19
|
-
const snapshot = await readSnapshot(projectPath);
|
|
20
|
-
return {
|
|
21
|
-
projectPath,
|
|
22
|
-
manifestPath: snapshot.manifestPath,
|
|
23
|
-
lockPath: snapshot.lockPath,
|
|
24
|
-
packageCount: snapshot.packages.length,
|
|
25
|
-
registry: snapshot.registry ?? null,
|
|
26
|
-
scopedRegistryCount: snapshot.scopedRegistries.length,
|
|
27
|
-
packages: snapshot.packages.map((entry) => ({
|
|
28
|
-
name: entry.name,
|
|
29
|
-
requestedVersion: entry.requestedVersion ?? null,
|
|
30
|
-
lockedVersion: entry.lockedVersion ?? null,
|
|
31
|
-
source: entry.source ?? null,
|
|
32
|
-
resolved: entry.lockedVersion !== undefined
|
|
33
|
-
}))
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
//# sourceMappingURL=status.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../../src/tools/package/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAwB1C,eAAe,UAAU,CAA4C;IACnE,IAAI,EAAE,gBAAgB;IACtB,OAAO,EAAE,+GAA+G;IACxH,WAAW,EAAE,wHAAwH;IACrI,KAAK,EAAE,SAAS;IAChB,eAAe,EAAE,KAAK;IACtB,eAAe,EAAE,WAAW;IAC5B,OAAO,EAAE,SAAS;IAClB,aAAa,EAAE,UAAU;IACzB,QAAQ,EAAE;QACR,EAAE,WAAW,EAAE,qBAAqB,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,sCAAsC,CAAC,EAAE;KACpI;IACD,qEAAqE;IACrE,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO;QAC5B,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC;QACpE,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,WAAW,CAAC,CAAC;QACjD,OAAO;YACL,WAAW;YACX,YAAY,EAAE,QAAQ,CAAC,YAAY;YACnC,QAAQ,EAAE,QAAQ,CAAC,QAAQ;YAC3B,YAAY,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM;YACtC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,IAAI,IAAI;YACnC,mBAAmB,EAAE,QAAQ,CAAC,gBAAgB,CAAC,MAAM;YACrD,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;gBAC1C,IAAI,EAAE,KAAK,CAAC,IAAI;gBAChB,gBAAgB,EAAE,KAAK,CAAC,gBAAgB,IAAI,IAAI;gBAChD,aAAa,EAAE,KAAK,CAAC,aAAa,IAAI,IAAI;gBAC1C,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,IAAI;gBAC5B,QAAQ,EAAE,KAAK,CAAC,aAAa,KAAK,SAAS;aAC5C,CAAC,CAAC;SACJ,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { AnyJson } from "../../schema/any-json.js";
|
|
2
|
-
export interface ToolsDescribeRequest {
|
|
3
|
-
name: string;
|
|
4
|
-
}
|
|
5
|
-
export interface ToolsDescribeResult {
|
|
6
|
-
name: string;
|
|
7
|
-
description: string;
|
|
8
|
-
inputSchema: Record<string, AnyJson>;
|
|
9
|
-
destructiveHint: boolean;
|
|
10
|
-
sideEffects?: string[];
|
|
11
|
-
playModeSupport: string;
|
|
12
|
-
supportsDryRun: boolean;
|
|
13
|
-
examples?: Array<{
|
|
14
|
-
description: string;
|
|
15
|
-
input: Record<string, AnyJson>;
|
|
16
|
-
execution?: {
|
|
17
|
-
dryRun?: boolean;
|
|
18
|
-
timeoutMs?: number;
|
|
19
|
-
};
|
|
20
|
-
}>;
|
|
21
|
-
target: string;
|
|
22
|
-
available?: false;
|
|
23
|
-
unavailableReason?: string;
|
|
24
|
-
requiresPackages?: string[];
|
|
25
|
-
}
|
|
26
|
-
declare const _default: import("../define.js").ToolDefinition<ToolsDescribeRequest, ToolsDescribeResult>;
|
|
27
|
-
export default _default;
|