@aqian0/dsh-unity 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +53 -0
- package/LICENSE-UNITY-COMPANION.md +122 -0
- package/LICENSE.md +31 -0
- package/NOTICE.md +90 -0
- package/README.md +273 -2
- package/cordis.patch.yml +22 -0
- package/docs/design.md +297 -0
- package/icon.svg +16 -0
- package/lib/frontmatter.js +392 -0
- package/lib/gating.js +105 -0
- package/lib/harness.js +16 -0
- package/lib/index.js +171 -0
- package/lib/project.js +210 -0
- package/lib/registry.js +268 -0
- package/lib/requirements.js +214 -0
- package/lib/skills.js +191 -0
- package/lib/types/frontmatter.d.ts +84 -0
- package/lib/types/gating.d.ts +80 -0
- package/lib/types/harness.d.ts +152 -0
- package/lib/types/index.d.ts +75 -0
- package/lib/types/project.d.ts +93 -0
- package/lib/types/registry.d.ts +96 -0
- package/lib/types/requirements.d.ts +67 -0
- package/lib/types/skills.d.ts +54 -0
- package/lib/types/watch.d.ts +34 -0
- package/lib/watch.js +84 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +70 -4
- package/skills/2d-pixel-perfect/SKILL.md +208 -0
- package/skills/2d-pixel-perfect/references/api-reference.md +81 -0
- package/skills/2d-pixel-perfect/references/camera-setup-builtin.cs +40 -0
- package/skills/2d-pixel-perfect/references/camera-setup-urp.cs +49 -0
- package/skills/2d-pixel-perfect/references/pipeline-detection.cs +50 -0
- package/skills/2d-pixel-perfect/references/sprite-settings.cs +37 -0
- package/skills/asset-transformer-toolkit/SECURITY.md +15 -0
- package/skills/asset-transformer-toolkit/SKILL.md +39 -0
- package/skills/asset-transformer-toolkit/references/create-importer.md +121 -0
- package/skills/asset-transformer-toolkit/references/lods.md +61 -0
- package/skills/asset-transformer-toolkit/references/rule-api.md +154 -0
- package/skills/asset-transformer-toolkit/references/ruleblock-api.md +37 -0
- package/skills/asset-transformer-toolkit/references/ruleset-api.md +138 -0
- package/skills/asset-transformer-toolkit/references/rulesets-and-actions.md +227 -0
- package/skills/audio-setup-mixers/SECURITY.md +16 -0
- package/skills/audio-setup-mixers/SKILL.md +127 -0
- package/skills/audio-setup-mixers/references/api.md +162 -0
- package/skills/build-gtk/SECURITY.md +16 -0
- package/skills/build-gtk/SKILL.md +200 -0
- package/skills/build-gtk/references/api-reference.md +33 -0
- package/skills/build-gtk/references/graph-api-gaps.md +96 -0
- package/skills/build-gtk/references/runtime-and-visualization.md +191 -0
- package/skills/build-gtk/references/state-machine-api.md +270 -0
- package/skills/build-gtk/references/where-the-docs-stop.md +49 -0
- package/skills/build-live-game/SKILL.md +159 -0
- package/skills/build-live-game/references/achievements.md +757 -0
- package/skills/build-live-game/references/apis.md +271 -0
- package/skills/build-live-game/references/authentication.md +431 -0
- package/skills/build-live-game/references/battlepass.md +904 -0
- package/skills/build-live-game/references/blueprints-and-samples.md +75 -0
- package/skills/build-live-game/references/cloud-code-cloudbehaviours.md +1111 -0
- package/skills/build-live-game/references/cloud-code-modules.md +1276 -0
- package/skills/build-live-game/references/cloud-code.md +58 -0
- package/skills/build-live-game/references/cloud-save.md +464 -0
- package/skills/build-live-game/references/deployment.md +231 -0
- package/skills/build-live-game/references/orientation.md +30 -0
- package/skills/build-live-game/references/player-account.md +821 -0
- package/skills/build-live-game/references/remote-config.md +96 -0
- package/skills/build-live-game/references/services-overview.md +76 -0
- package/skills/build-live-game/references/tooling.md +375 -0
- package/skills/build-live-game/references/ugs-cli.md +86 -0
- package/skills/craft-game-floors/SECURITY.md +23 -0
- package/skills/craft-game-floors/SKILL.md +134 -0
- package/skills/craft-game-floors/references/art-direction.md +85 -0
- package/skills/craft-game-floors/references/camera-rigs.md +51 -0
- package/skills/craft-game-floors/references/character-motion.md +35 -0
- package/skills/craft-game-floors/references/game-audio.md +47 -0
- package/skills/craft-game-floors/references/game-feel.md +68 -0
- package/skills/craft-game-floors/references/game-shell.md +45 -0
- package/skills/craft-game-floors/references/live-floor.md +35 -0
- package/skills/craft-game-floors/references/placeholder-assets.md +35 -0
- package/skills/craft-game-floors/references/scene-lighting.md +52 -0
- package/skills/craft-game-floors/references/toon-shading.md +34 -0
- package/skills/craft-game-floors/references/vfx.md +40 -0
- package/skills/craft-game-floors/references/visual-scorecard.md +43 -0
- package/skills/create-2d-physics/SECURITY.md +16 -0
- package/skills/create-2d-physics/SKILL.md +128 -0
- package/skills/create-2d-physics/references/2d-physics-core.md +155 -0
- package/skills/create-2d-physics/references/legacy-2d-physics.md +45 -0
- package/skills/create-tile-palette-or-rule-tiles/SKILL.md +95 -0
- package/skills/create-tile-palette-or-rule-tiles/references/hexagonalruletile.md +71 -0
- package/skills/create-tile-palette-or-rule-tiles/references/palette-create.md +38 -0
- package/skills/create-tile-palette-or-rule-tiles/references/ruletile-createempty.md +37 -0
- package/skills/create-tile-palette-or-rule-tiles/references/ruletile-createfromsegment.md +219 -0
- package/skills/create-tile-palette-or-rule-tiles/references/ruletile.md +95 -0
- package/skills/create-tile-palette-or-rule-tiles/scripts/CreatePaletteTemplate.cs +148 -0
- package/skills/create-tile-palette-or-rule-tiles/scripts/ManualWorkflowExample.cs +63 -0
- package/skills/create-tile-palette-or-rule-tiles/scripts/RuleTileGenerator.cs +61 -0
- package/skills/create-tile-palette-or-rule-tiles/scripts/TilemapRuleTileCreateFromSegment.cs +225 -0
- package/skills/fix-3d-physics-collisions/SECURITY.md +17 -0
- package/skills/fix-3d-physics-collisions/SKILL.md +139 -0
- package/skills/fix-3d-physics-collisions/references/collision-checklist.md +80 -0
- package/skills/fix-3d-physics-collisions/references/collision-debugger.md +18 -0
- package/skills/fix-3d-physics-collisions/references/console-errors-table.md +9 -0
- package/skills/fix-3d-physics-collisions/references/kinematic-trigger-facts.md +18 -0
- package/skills/fix-3d-physics-collisions/references/other-symptoms.md +29 -0
- package/skills/fix-3d-physics-collisions/references/raycast-checklist.md +8 -0
- package/skills/fix-3d-physics-collisions/references/topic-map.md +42 -0
- package/skills/fix-3d-physics-collisions/references/trigger-checklist.md +9 -0
- package/skills/fix-3d-physics-collisions/scripts/CollisionDebugger.cs +561 -0
- package/skills/generate-editor-search-query/SECURITY.md +17 -0
- package/skills/generate-editor-search-query/SKILL.md +117 -0
- package/skills/generate-editor-search-query/references/open-search-window.md +70 -0
- package/skills/generate-editor-search-query/references/query-patterns.md +124 -0
- package/skills/implement-in-app-purchases/SKILL.md +82 -0
- package/skills/implement-in-app-purchases/references/api-details.md +41 -0
- package/skills/implement-in-app-purchases/references/api-notes.md +105 -0
- package/skills/implement-in-app-purchases/references/codeless-catalog.md +197 -0
- package/skills/implement-in-app-purchases/references/convert-adapty.md +270 -0
- package/skills/implement-in-app-purchases/references/convert-essentialkit.md +239 -0
- package/skills/implement-in-app-purchases/references/convert-revenuecat.md +277 -0
- package/skills/implement-in-app-purchases/references/convert-unipay.md +145 -0
- package/skills/implement-in-app-purchases/references/migration-v4-to-v5.md +46 -0
- package/skills/implement-in-app-purchases/references/path-add-iap-to-new-project.md +197 -0
- package/skills/implement-in-app-purchases/references/path-convert-native-google-billing.md +302 -0
- package/skills/implement-in-app-purchases/references/path-convert-native-storekit.md +357 -0
- package/skills/implement-in-app-purchases/references/path-implement-iap-d2c.md +253 -0
- package/skills/implement-in-app-purchases/references/platform-notes.md +55 -0
- package/skills/implement-in-app-purchases/references/pre-check.md +207 -0
- package/skills/implement-in-app-purchases/references/topic-map.md +46 -0
- package/skills/initialize-ai-navigation/SKILL.md +109 -0
- package/skills/initialize-ai-navigation/references/navigation-system.md +793 -0
- package/skills/initialize-ai-navigation/references/topic-map.md +66 -0
- package/skills/levelplay-unity-integration/SKILL.md +122 -0
- package/skills/levelplay-unity-integration/references/adding-more-ad-formats.md +15 -0
- package/skills/levelplay-unity-integration/references/banner-api.md +927 -0
- package/skills/levelplay-unity-integration/references/best-practices.md +604 -0
- package/skills/levelplay-unity-integration/references/dependency-resolution.md +94 -0
- package/skills/levelplay-unity-integration/references/examples.md +10 -0
- package/skills/levelplay-unity-integration/references/ilrd-api.md +337 -0
- package/skills/levelplay-unity-integration/references/initialization-api.md +851 -0
- package/skills/levelplay-unity-integration/references/interstitial-api.md +907 -0
- package/skills/levelplay-unity-integration/references/ios-setup.md +463 -0
- package/skills/levelplay-unity-integration/references/migration-sdk-9.md +666 -0
- package/skills/levelplay-unity-integration/references/privacy-settings.md +593 -0
- package/skills/levelplay-unity-integration/references/production-release-checklist.md +22 -0
- package/skills/levelplay-unity-integration/references/rewarded-api.md +918 -0
- package/skills/levelplay-unity-integration/references/step-0-new-or-migration.md +8 -0
- package/skills/levelplay-unity-integration/references/step-1-verify-environment.md +4 -0
- package/skills/levelplay-unity-integration/references/step-10-testing.md +15 -0
- package/skills/levelplay-unity-integration/references/step-2-business-goals.md +12 -0
- package/skills/levelplay-unity-integration/references/step-3-install-sdk.md +55 -0
- package/skills/levelplay-unity-integration/references/step-4-native-dependencies.md +22 -0
- package/skills/levelplay-unity-integration/references/step-5-app-key-and-ad-units.md +18 -0
- package/skills/levelplay-unity-integration/references/step-6-5-privacy-and-regulation.md +51 -0
- package/skills/levelplay-unity-integration/references/step-6-admob-keys.md +16 -0
- package/skills/levelplay-unity-integration/references/step-7-initialize.md +50 -0
- package/skills/levelplay-unity-integration/references/step-8-ad-unit-strategy.md +16 -0
- package/skills/levelplay-unity-integration/references/step-9-implement-ad-units.md +66 -0
- package/skills/levelplay-unity-integration/references/testing-and-validation.md +222 -0
- package/skills/levelplay-unity-integration/references/troubleshooting.md +99 -0
- package/skills/localize-unity-project/SKILL.md +159 -0
- package/skills/localize-unity-project/references/api-notes.md +15 -0
- package/skills/localize-unity-project/references/cjk-fonts.md +83 -0
- package/skills/localize-unity-project/references/docs-map.md +42 -0
- package/skills/localize-unity-project/references/documentation-lookup.md +33 -0
- package/skills/localize-unity-project/references/locale-switching.md +17 -0
- package/skills/localize-unity-project/references/table-completeness-check.md +47 -0
- package/skills/localize-unity-project/references/translating-existing-project.md +47 -0
- package/skills/localize-unity-project/references/translation-strategy.md +41 -0
- package/skills/localize-unity-project/references/troubleshooting.md +12 -0
- package/skills/localize-unity-project/scripts/L10nBatchProcessor.cs +191 -0
- package/skills/localize-unity-project/scripts/LocalizedFontAsset.cs +18 -0
- package/skills/manage-sprite-atlas/SKILL.md +202 -0
- package/skills/manage-sprite-atlas/references/addressables-delivery.md +58 -0
- package/skills/manage-sprite-atlas/references/advanced-manual-authoring.md +19 -0
- package/skills/manage-sprite-atlas/references/api.md +382 -0
- package/skills/manage-sprite-atlas/references/best-practices.md +183 -0
- package/skills/manage-sprite-atlas/references/common-errors.md +123 -0
- package/skills/manage-sprite-atlas/references/complete-workflow.md +61 -0
- package/skills/manage-sprite-atlas/references/custom-packing.md +147 -0
- package/skills/manage-sprite-atlas/references/delivery-mechanism.md +30 -0
- package/skills/manage-sprite-atlas/references/key-requirements.md +21 -0
- package/skills/manage-sprite-atlas/references/manual-authoring.md +39 -0
- package/skills/manage-sprite-atlas/references/namespaces.md +15 -0
- package/skills/manage-sprite-atlas/references/v2-architecture.md +21 -0
- package/skills/manage-sprite-atlas/resources/authoringvsruntime.cs +176 -0
- package/skills/manage-sprite-atlas/resources/buildaddressablespostprocess.cs +59 -0
- package/skills/manage-sprite-atlas/resources/cacheloadedatlases.cs +145 -0
- package/skills/manage-sprite-atlas/resources/cleanupbatchoperations.cs +119 -0
- package/skills/manage-sprite-atlas/resources/createandconfiguremasteratlas.cs +57 -0
- package/skills/manage-sprite-atlas/resources/custompackersetup.cs +88 -0
- package/skills/manage-sprite-atlas/resources/deprecatedmethods.cs +142 -0
- package/skills/manage-sprite-atlas/resources/dontmodifywithoutsaving.cs +120 -0
- package/skills/manage-sprite-atlas/resources/dontpackinruntimebuilds.cs +190 -0
- package/skills/manage-sprite-atlas/resources/dontscriptspriteatlasineditor.cs +114 -0
- package/skills/manage-sprite-atlas/resources/editorconfiguration.cs +95 -0
- package/skills/manage-sprite-atlas/resources/enablespritepacking.cs +172 -0
- package/skills/manage-sprite-atlas/resources/gridspritepacker.cs +50 -0
- package/skills/manage-sprite-atlas/resources/handlelatebinding.cs +147 -0
- package/skills/manage-sprite-atlas/resources/handlenullcases.cs +141 -0
- package/skills/manage-sprite-atlas/resources/migratev1tov2.cs +335 -0
- package/skills/manage-sprite-atlas/resources/multipagepacker.cs +80 -0
- package/skills/manage-sprite-atlas/resources/optimizetexturesettings.cs +191 -0
- package/skills/manage-sprite-atlas/resources/packerdebugging.cs +158 -0
- package/skills/manage-sprite-atlas/resources/packtransform.cs +51 -0
- package/skills/manage-sprite-atlas/resources/platformnames.cs +127 -0
- package/skills/manage-sprite-atlas/resources/queryspritesefficiently.cs +222 -0
- package/skills/manage-sprite-atlas/resources/registercallbacks.cs +152 -0
- package/skills/manage-sprite-atlas/resources/runtimeatlasloader.cs +15 -0
- package/skills/manage-sprite-atlas/resources/runtimespriteaccess.cs +19 -0
- package/skills/manage-sprite-atlas/resources/savespriteatlasasset.cs +107 -0
- package/skills/manage-sprite-atlas/resources/scriptablepacker.cs +81 -0
- package/skills/manage-sprite-atlas/resources/setincludeinbuild.cs +164 -0
- package/skills/manage-sprite-atlas/resources/sizeoptimizedpacker.cs +88 -0
- package/skills/manage-sprite-atlas/resources/spriteatlaslatebinding.cs +123 -0
- package/skills/manage-sprite-atlas/resources/spriteatlasprebuildgenerator.cs +219 -0
- package/skills/manage-sprite-atlas/resources/spritedata.cs +35 -0
- package/skills/manage-sprite-atlas/resources/spritepack.cs +39 -0
- package/skills/manage-sprite-atlas/resources/texturedata.cs +15 -0
- package/skills/manage-sprite-atlas/resources/updatebuildscripts.cs +357 -0
- package/skills/manage-sprite-atlas/resources/updatesettingsconfiguration.cs +135 -0
- package/skills/manage-sprite-atlas/resources/usevariantswisely.cs +179 -0
- package/skills/manage-sprite-atlas/resources/variantatlas.cs +39 -0
- package/skills/migrate-birp-to-urp/SECURITY.md +16 -0
- package/skills/migrate-birp-to-urp/SKILL.md +167 -0
- package/skills/migrate-birp-to-urp/references/capturing-the-editor.md +66 -0
- package/skills/migrate-birp-to-urp/references/complex-shader-situations.md +272 -0
- package/skills/migrate-birp-to-urp/references/conversion-and-rendering-triage.md +113 -0
- package/skills/migrate-birp-to-urp/references/custom-shader-triage.md +123 -0
- package/skills/migrate-birp-to-urp/references/implementation-patterns.md +529 -0
- package/skills/migrate-birp-to-urp/references/migration-workflow.md +265 -0
- package/skills/migrate-birp-to-urp/references/parity-validation-and-troubleshooting.md +114 -0
- package/skills/migrate-birp-to-urp/references/preflight-and-urp-setup.md +195 -0
- package/skills/migrate-birp-to-urp/references/quality-settings-map.md +69 -0
- package/skills/new-unity-project/SECURITY.md +26 -0
- package/skills/new-unity-project/SKILL.md +171 -0
- package/skills/new-unity-project/references/checklist.md +18 -0
- package/skills/new-unity-project/references/common-mistakes.md +15 -0
- package/skills/new-unity-project/references/skill-setup.md +66 -0
- package/skills/new-unity-project/references/step-1-concept.md +13 -0
- package/skills/new-unity-project/references/step-2-platforms-and-create.md +31 -0
- package/skills/new-unity-project/references/step-3-join-and-reconcile.md +16 -0
- package/skills/new-unity-project/references/step-4-source-control.md +9 -0
- package/skills/new-unity-project/references/step-5-packages.md +18 -0
- package/skills/new-unity-project/references/step-6-identity-and-floors.md +20 -0
- package/skills/new-unity-project/references/step-7-visual-baseline.md +75 -0
- package/skills/new-unity-project/references/step-8-first-commit.md +21 -0
- package/skills/new-unity-project/references/step-9-handoff.md +23 -0
- package/skills/optimize-audio/SECURITY.md +16 -0
- package/skills/optimize-audio/SKILL.md +120 -0
- package/skills/optimize-audio/references/diagnostics.md +42 -0
- package/skills/optimize-audio/references/troubleshooting.md +41 -0
- package/skills/optimize-audio/resources/audio-import-api.md +149 -0
- package/skills/optimize-audio/resources/platform-settings.md +48 -0
- package/skills/optimize-text-mesh-pro/SKILL.md +181 -0
- package/skills/optimize-text-mesh-pro/references/dynamic-atlas-and-profiling.md +28 -0
- package/skills/optimize-text-mesh-pro/references/topic-map.md +36 -0
- package/skills/optimize-web/SECURITY.md +16 -0
- package/skills/optimize-web/SKILL.md +157 -0
- package/skills/optimize-web/references/editor-csharp.md +120 -0
- package/skills/optimize-web/references/topic-map.md +49 -0
- package/skills/optimize-web/references/troubleshooting.md +45 -0
- package/skills/optimize-web/references/understand-request.md +19 -0
- package/skills/optimize-web/references/web-assets-quality.md +59 -0
- package/skills/optimize-web/references/web-player-settings.md +39 -0
- package/skills/optimize-web/references/web-profiling-memory.md +71 -0
- package/skills/optimize-web/scripts/WebOptimizer.cs +46 -0
- package/skills/optimize-web/scripts/toktx-examples.sh +11 -0
- package/skills/setup-multiplayer-services/SKILL.md +36 -0
- package/skills/setup-multiplayer-services/references/dgs-entrypoint.md +79 -0
- package/skills/setup-multiplayer-services/references/entrypoints.md +213 -0
- package/skills/setup-multiplayer-services/references/examples.md +33 -0
- package/skills/setup-multiplayer-services/references/implementation-fit.md +30 -0
- package/skills/setup-multiplayer-services/references/underlying-services.md +11 -0
- package/skills/setup-multiplayer-services/references/workflows-prerequisites.md +17 -0
- package/skills/setup-vivox-voice-chat/SECURITY.md +16 -0
- package/skills/setup-vivox-voice-chat/SKILL.md +166 -0
- package/skills/setup-vivox-voice-chat/references/api-reference-lookup.md +28 -0
- package/skills/setup-vivox-voice-chat/references/docs-topic-map.md +13 -0
- package/skills/setup-vivox-voice-chat/references/events-and-participants.md +79 -0
- package/skills/setup-vivox-voice-chat/references/init-and-login.md +92 -0
- package/skills/setup-vivox-voice-chat/references/text-chat.md +93 -0
- package/skills/setup-vivox-voice-chat/references/troubleshooting.md +47 -0
- package/skills/setup-vivox-voice-chat/references/voice-channels.md +92 -0
- package/skills/shader-graph-create-custom-node/SKILL.md +25 -0
- package/skills/shader-graph-create-custom-node/resources/all_hints.hlsl +182 -0
- package/skills/sprite-editor/SECURITY.md +16 -0
- package/skills/sprite-editor/SKILL.md +66 -0
- package/skills/sprite-editor/references/api_reference.md +151 -0
- package/skills/sprite-editor/references/background.md +112 -0
- package/skills/sprite-editor/references/templates.md +72 -0
- package/skills/sprite-editor/scripts/AutomaticSliceTexture.cs +40 -0
- package/skills/sprite-editor/scripts/GenerateNewSpriteRects.cs +200 -0
- package/skills/sprite-editor/scripts/GetTextureSourceImageSize.cs +32 -0
- package/skills/sprite-editor/scripts/GetTextureToSlice.cs +55 -0
- package/skills/sprite-editor/scripts/GridSliceTexture.cs +40 -0
- package/skills/sprite-editor/scripts/IsometricSliceTexture.cs +141 -0
- package/skills/sprite-editor/scripts/README.md +134 -0
- package/skills/sprite-editor/scripts/SetPivotExample.cs +58 -0
- package/skills/sprite-editor/scripts/SpriteToPng.cs +88 -0
- package/skills/sprite-segment-3x3grid/SKILL.md +177 -0
- package/skills/sprite-segment-3x3grid/references/topic-map.md +37 -0
- package/skills/sprite-segment-3x3grid/scripts/SpriteGridAnalysis.cs +119 -0
- package/skills/ui/SKILL.md +142 -0
- package/skills/ui-imgui/SKILL.md +180 -0
- package/skills/ui-imgui/references/gui-elements.md +156 -0
- package/skills/ui-imgui/references/templates.md +141 -0
- package/skills/ui-ugui/SKILL.md +217 -0
- package/skills/ui-ugui/references/layout-and-anchors.md +61 -0
- package/skills/ui-ugui/references/scrollview-setup.md +29 -0
- package/skills/ui-uitk/SKILL.md +229 -0
- package/skills/ui-uitk/references/common-issues.md +74 -0
- package/skills/ui-uitk/references/custom-elements.md +241 -0
- package/skills/ui-uitk/references/painter2d.md +282 -0
- package/skills/ui-uitk/references/pointermanipulator-guide.md +94 -0
- package/skills/ui-uitk/references/svg-icons.md +136 -0
- package/skills/ui-uitk/references/ui-runtime-binding.md +234 -0
- package/skills/ui-uitk/references/uss-guide.md +138 -0
- package/skills/unity-cli/CHANGELOG.md +524 -0
- package/skills/unity-cli/SECURITY.md +68 -0
- package/skills/unity-cli/SKILL.md +160 -0
- package/skills/unity-cli/references/auth-license-cloud.md +318 -0
- package/skills/unity-cli/references/bootstrap-project.md +177 -0
- package/skills/unity-cli/references/build-run-test.md +555 -0
- package/skills/unity-cli/references/catalog-plugins.md +86 -0
- package/skills/unity-cli/references/ci-recipes.md +76 -0
- package/skills/unity-cli/references/cloud-automation.md +819 -0
- package/skills/unity-cli/references/cloud-workflows.md +19 -0
- package/skills/unity-cli/references/collaboration.md +533 -0
- package/skills/unity-cli/references/config-hub.md +239 -0
- package/skills/unity-cli/references/diagnostics-maintenance.md +718 -0
- package/skills/unity-cli/references/docs-workflow.md +179 -0
- package/skills/unity-cli/references/editor-targeting.md +29 -0
- package/skills/unity-cli/references/editors-install.md +490 -0
- package/skills/unity-cli/references/environment-variables.md +42 -0
- package/skills/unity-cli/references/exit-codes.md +47 -0
- package/skills/unity-cli/references/global-flags.md +32 -0
- package/skills/unity-cli/references/integration-advanced.md +1130 -0
- package/skills/unity-cli/references/notes.md +20 -0
- package/skills/unity-cli/references/notifications.md +39 -0
- package/skills/unity-cli/references/playmode-verification-loop.md +279 -0
- package/skills/unity-cli/references/projects-templates.md +997 -0
- package/skills/unity-cli/references/scene-editing-preflight.md +25 -0
- package/skills/unity-cli/references/setup-and-help.md +54 -0
- package/skills/unity-cli/references/version-control.md +612 -0
- package/skills/unity-package-management/SKILL.md +169 -0
- package/skills/unity-package-management/references/discovering-packages.md +66 -0
- package/skills/unity-package-management/references/headless-run.md +31 -0
- package/skills/unity-package-management/references/installer-script.md +92 -0
- package/skills/unity-package-management/references/select-packages.md +126 -0
- package/skills/unity-pipeline/SECURITY.md +17 -0
- package/skills/unity-pipeline/SKILL.md +205 -0
- package/skills/unity-pipeline/references/csharp-eval.md +23 -0
- package/skills/unity-pipeline/references/multiplayer-play-mode.md +103 -0
- package/skills/urp-postprocessing/SECURITY.md +16 -0
- package/skills/urp-postprocessing/SKILL.md +188 -0
- package/skills/urp-postprocessing/references/code-templates.md +150 -0
- package/skills/urp-postprocessing/references/effect-reference.md +86 -0
- package/skills/validate-urp-render-graph-renderer-feature/SKILL.md +92 -0
- package/skills/validate-urp-render-graph-renderer-feature/references/validation-checklist.md +179 -0
package/lib/skills.js
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Discovery and loading for the packaged Unity skills.
|
|
3
|
+
*
|
|
4
|
+
* Each skill is a directory bundle `<skillDir>/<name>/SKILL.md`, the same shape
|
|
5
|
+
* the harness filesystem provider reads, so the tree needs no transformation.
|
|
6
|
+
* Discovery parses frontmatter into a catalog candidate and every load re-reads
|
|
7
|
+
* the file, matching the harness convention that a skill body has no separate
|
|
8
|
+
* cache.
|
|
9
|
+
*
|
|
10
|
+
* One parse cache is shared by every agent's provider: discovery runs per agent
|
|
11
|
+
* scope, but the files belong to this package, so one cache keyed by path plus
|
|
12
|
+
* modification time and size keeps N agents from re-parsing the same documents
|
|
13
|
+
* while still noticing an edit.
|
|
14
|
+
*
|
|
15
|
+
* @module dsh-unity/lib/skills
|
|
16
|
+
*/
|
|
17
|
+
import { readdir, readFile, realpath, stat } from 'node:fs/promises';
|
|
18
|
+
import { join } from 'node:path';
|
|
19
|
+
import { SKILL_NAME, parseInvocation, parseSkillMarkdown } from './frontmatter.js';
|
|
20
|
+
import { readRequirements } from './requirements.js';
|
|
21
|
+
/**
|
|
22
|
+
* Create a frontmatter cache keyed by path and file identity.
|
|
23
|
+
*
|
|
24
|
+
* @returns the cache.
|
|
25
|
+
*/
|
|
26
|
+
export function createParseCache() {
|
|
27
|
+
const entries = new Map();
|
|
28
|
+
return {
|
|
29
|
+
async read(file) {
|
|
30
|
+
let info;
|
|
31
|
+
try {
|
|
32
|
+
info = await stat(file);
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
const cached = entries.get(file);
|
|
38
|
+
if (cached !== undefined && cached.mtimeMs === info.mtimeMs && cached.size === info.size)
|
|
39
|
+
return cached.parsed;
|
|
40
|
+
const parsed = parseSkillMarkdown(await readFile(file, 'utf8'));
|
|
41
|
+
entries.set(file, { mtimeMs: info.mtimeMs, size: info.size, parsed });
|
|
42
|
+
return parsed;
|
|
43
|
+
},
|
|
44
|
+
clear() {
|
|
45
|
+
entries.clear();
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Create a reader for one packaged skill directory.
|
|
51
|
+
*
|
|
52
|
+
* @param options - reader settings.
|
|
53
|
+
* @returns the reader.
|
|
54
|
+
*/
|
|
55
|
+
export function createUnitySkillReader(options) {
|
|
56
|
+
const { skillDir, providerName, source, rank, exclude, logger } = options;
|
|
57
|
+
const cache = options.parseCache ?? createParseCache();
|
|
58
|
+
/** Parse one skill bundle into a catalog candidate. */
|
|
59
|
+
async function parseBundle(entryName, dir) {
|
|
60
|
+
const file = join(dir, 'SKILL.md');
|
|
61
|
+
const parsed = await cache.read(file);
|
|
62
|
+
if (parsed === undefined) {
|
|
63
|
+
logger.warn(`unity skills: ${file} skipped because it has no YAML frontmatter`);
|
|
64
|
+
return undefined;
|
|
65
|
+
}
|
|
66
|
+
const { data } = parsed;
|
|
67
|
+
const skillName = typeof data.name === 'string' ? data.name.trim() : '';
|
|
68
|
+
const description = typeof data.description === 'string' ? data.description.trim() : '';
|
|
69
|
+
if (!SKILL_NAME.test(skillName) || description.length === 0) {
|
|
70
|
+
logger.warn(`unity skills: ${file} skipped because frontmatter requires a kebab-case name and a description`);
|
|
71
|
+
return undefined;
|
|
72
|
+
}
|
|
73
|
+
if (skillName !== entryName) {
|
|
74
|
+
logger.warn(`unity skills: ${file} declares name "${skillName}" but its folder is "${entryName}"`);
|
|
75
|
+
}
|
|
76
|
+
const whenToUse = typeof data.whenToUse === 'string' && data.whenToUse.trim() !== '' ? data.whenToUse.trim() : undefined;
|
|
77
|
+
const metadata = typeof data.metadata === 'object' && data.metadata !== null && !Array.isArray(data.metadata)
|
|
78
|
+
? data.metadata
|
|
79
|
+
: undefined;
|
|
80
|
+
return {
|
|
81
|
+
name: skillName,
|
|
82
|
+
description,
|
|
83
|
+
...(whenToUse === undefined ? {} : { whenToUse }),
|
|
84
|
+
invocation: parseInvocation(data),
|
|
85
|
+
requirements: readRequirements(data),
|
|
86
|
+
provider: providerName,
|
|
87
|
+
source,
|
|
88
|
+
rank,
|
|
89
|
+
locator: { dir, file },
|
|
90
|
+
resourceBase: { kind: 'directory', path: dir },
|
|
91
|
+
path: file,
|
|
92
|
+
...(metadata === undefined ? {} : { metadata }),
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
return {
|
|
96
|
+
skillDir,
|
|
97
|
+
async list(lookup = {}) {
|
|
98
|
+
lookup.signal?.throwIfAborted();
|
|
99
|
+
let entries;
|
|
100
|
+
try {
|
|
101
|
+
entries = await readdir(skillDir, { withFileTypes: true });
|
|
102
|
+
}
|
|
103
|
+
catch (error) {
|
|
104
|
+
if (error.code === 'ENOENT' || error.code === 'ENOTDIR')
|
|
105
|
+
return [];
|
|
106
|
+
throw error;
|
|
107
|
+
}
|
|
108
|
+
const candidates = [];
|
|
109
|
+
for (const entry of [...entries].sort((left, right) => left.name.localeCompare(right.name))) {
|
|
110
|
+
lookup.signal?.throwIfAborted();
|
|
111
|
+
if (exclude !== undefined && exclude.has(entry.name))
|
|
112
|
+
continue;
|
|
113
|
+
const dir = join(skillDir, entry.name);
|
|
114
|
+
if (!(await isDirectory(dir, entry.isDirectory(), entry.isSymbolicLink())))
|
|
115
|
+
continue;
|
|
116
|
+
try {
|
|
117
|
+
const candidate = await parseBundle(entry.name, dir);
|
|
118
|
+
if (candidate !== undefined)
|
|
119
|
+
candidates.push(candidate);
|
|
120
|
+
}
|
|
121
|
+
catch (error) {
|
|
122
|
+
lookup.signal?.throwIfAborted();
|
|
123
|
+
logger.warn(`unity skills: ${dir} skipped: ${String(error)}`);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return candidates;
|
|
127
|
+
},
|
|
128
|
+
async load(candidate, lookup = {}) {
|
|
129
|
+
lookup.signal?.throwIfAborted();
|
|
130
|
+
const locator = candidate?.locator;
|
|
131
|
+
if (locator === undefined)
|
|
132
|
+
return undefined;
|
|
133
|
+
let raw;
|
|
134
|
+
try {
|
|
135
|
+
raw = await readFile(locator.file, 'utf8');
|
|
136
|
+
}
|
|
137
|
+
catch (error) {
|
|
138
|
+
if (error.code === 'ENOENT' || error.code === 'ENOTDIR')
|
|
139
|
+
return undefined;
|
|
140
|
+
throw error;
|
|
141
|
+
}
|
|
142
|
+
lookup.signal?.throwIfAborted();
|
|
143
|
+
const parsed = parseSkillMarkdown(raw);
|
|
144
|
+
if (parsed === undefined)
|
|
145
|
+
return undefined;
|
|
146
|
+
const { data, body } = parsed;
|
|
147
|
+
const skillName = typeof data.name === 'string' ? data.name.trim() : '';
|
|
148
|
+
const description = typeof data.description === 'string' ? data.description.trim() : '';
|
|
149
|
+
if (!SKILL_NAME.test(skillName) || description.length === 0)
|
|
150
|
+
return undefined;
|
|
151
|
+
const whenToUse = typeof data.whenToUse === 'string' && data.whenToUse.trim() !== '' ? data.whenToUse.trim() : undefined;
|
|
152
|
+
const metadata = typeof data.metadata === 'object' && data.metadata !== null && !Array.isArray(data.metadata)
|
|
153
|
+
? data.metadata
|
|
154
|
+
: undefined;
|
|
155
|
+
return {
|
|
156
|
+
name: skillName,
|
|
157
|
+
description,
|
|
158
|
+
...(whenToUse === undefined ? {} : { whenToUse }),
|
|
159
|
+
invocation: parseInvocation(data),
|
|
160
|
+
source,
|
|
161
|
+
provider: providerName,
|
|
162
|
+
resourceBase: { kind: 'directory', path: locator.dir },
|
|
163
|
+
path: await resolveDisplayPath(locator.file),
|
|
164
|
+
...(metadata === undefined ? {} : { metadata }),
|
|
165
|
+
content: body,
|
|
166
|
+
};
|
|
167
|
+
},
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
/** Whether a directory entry is a directory, following symlinks. */
|
|
171
|
+
async function isDirectory(dir, isDir, isLink) {
|
|
172
|
+
if (isDir)
|
|
173
|
+
return true;
|
|
174
|
+
if (!isLink)
|
|
175
|
+
return false;
|
|
176
|
+
try {
|
|
177
|
+
return (await stat(dir)).isDirectory();
|
|
178
|
+
}
|
|
179
|
+
catch {
|
|
180
|
+
return false;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
/** Prefer the real path for previews, falling back to the discovered path. */
|
|
184
|
+
async function resolveDisplayPath(file) {
|
|
185
|
+
try {
|
|
186
|
+
return await realpath(file);
|
|
187
|
+
}
|
|
188
|
+
catch {
|
|
189
|
+
return file;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* YAML frontmatter reader for SKILL.md files.
|
|
3
|
+
*
|
|
4
|
+
* The skill documents use a small, well-understood subset of YAML, so the plugin
|
|
5
|
+
* carries its own reader instead of a parser dependency: the package must install
|
|
6
|
+
* with no build-time or run-time third-party code. Supported syntax:
|
|
7
|
+
*
|
|
8
|
+
* - top-level `key: value` mappings, including nested block mappings
|
|
9
|
+
* (`required_packages`, `metadata`);
|
|
10
|
+
* - block sequences (`allowed-tools` followed by `- item` lines);
|
|
11
|
+
* - flow sequences (`modes: [agent, ask]`);
|
|
12
|
+
* - plain, single-quoted, and double-quoted scalars;
|
|
13
|
+
* - literal (`|`, `|-`, `|+`) and folded (`>`, `>-`, `>+`) block scalars;
|
|
14
|
+
* - full-line comments and inline ` #` comments on plain scalars.
|
|
15
|
+
*
|
|
16
|
+
* Scalars resolve through the YAML 1.2 core schema, matching what a full parser
|
|
17
|
+
* would produce for these documents. The invocation policy uses the registry's
|
|
18
|
+
* strict boolean grammar. A value this reader cannot represent is reported as a
|
|
19
|
+
* syntax error so the caller can skip the skill instead of advertising a wrong
|
|
20
|
+
* description.
|
|
21
|
+
*
|
|
22
|
+
* @module dsh-unity/lib/frontmatter
|
|
23
|
+
*/
|
|
24
|
+
/** A parsed YAML scalar, sequence, or mapping. */
|
|
25
|
+
export type YamlValue = string | number | boolean | null | YamlValue[] | YamlMapping;
|
|
26
|
+
/** A parsed YAML mapping. */
|
|
27
|
+
export interface YamlMapping {
|
|
28
|
+
[key: string]: YamlValue;
|
|
29
|
+
}
|
|
30
|
+
/** Parsed frontmatter plus the Markdown body that follows it. */
|
|
31
|
+
export interface ParsedSkill {
|
|
32
|
+
readonly data: YamlMapping;
|
|
33
|
+
readonly body: string;
|
|
34
|
+
}
|
|
35
|
+
/** The two invocation controls the registry understands. */
|
|
36
|
+
export interface InvocationPolicy {
|
|
37
|
+
readonly modelInvocable: boolean;
|
|
38
|
+
readonly userInvocable: boolean;
|
|
39
|
+
}
|
|
40
|
+
/** Kebab-case grammar shared by the harness skill registry. */
|
|
41
|
+
export declare const SKILL_NAME: RegExp;
|
|
42
|
+
/**
|
|
43
|
+
* Split a Markdown document into its YAML frontmatter block and body.
|
|
44
|
+
*
|
|
45
|
+
* @param raw - complete file text.
|
|
46
|
+
* @returns the frontmatter source and body, or `undefined` without a fence.
|
|
47
|
+
*/
|
|
48
|
+
export declare function splitFrontmatter(raw: string): {
|
|
49
|
+
yaml: string;
|
|
50
|
+
body: string;
|
|
51
|
+
} | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Parse a SKILL.md document into frontmatter fields and body.
|
|
54
|
+
*
|
|
55
|
+
* @param raw - complete file text.
|
|
56
|
+
* @returns parsed frontmatter and the trimmed body, or `undefined` without a fence.
|
|
57
|
+
* @throws {SyntaxError} when the frontmatter is not the supported YAML subset.
|
|
58
|
+
*/
|
|
59
|
+
export declare function parseSkillMarkdown(raw: string): ParsedSkill | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* Parse the supported YAML subset into a plain value.
|
|
62
|
+
*
|
|
63
|
+
* @param source - YAML text without the surrounding fences.
|
|
64
|
+
* @returns a mapping, sequence, scalar, or `null` for a `key:` without a value.
|
|
65
|
+
* @throws {SyntaxError} on indentation this subset cannot represent.
|
|
66
|
+
*/
|
|
67
|
+
export declare function parseYamlSubset(source: string): YamlValue;
|
|
68
|
+
/**
|
|
69
|
+
* Read a frontmatter boolean with the registry's strict grammar.
|
|
70
|
+
*
|
|
71
|
+
* @param data - parsed frontmatter.
|
|
72
|
+
* @param key - exact frontmatter key.
|
|
73
|
+
* @returns the value, or `undefined` when the key is absent.
|
|
74
|
+
* @throws {TypeError} when the key is present but is not a boolean spelling.
|
|
75
|
+
*/
|
|
76
|
+
export declare function frontmatterBoolean(data: YamlMapping, key: string): boolean | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* Resolve the invocation policy from frontmatter.
|
|
79
|
+
*
|
|
80
|
+
* @param data - parsed frontmatter.
|
|
81
|
+
* @returns the policy; absent keys keep both surfaces permitted.
|
|
82
|
+
* @throws {Error} when a legacy camelCase key is present.
|
|
83
|
+
*/
|
|
84
|
+
export declare function parseInvocation(data: YamlMapping): InvocationPolicy;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Visibility decisions for one agent's skill catalog.
|
|
3
|
+
*
|
|
4
|
+
* The harness separates two questions about a skill: whether the model may see
|
|
5
|
+
* and load it (`modelInvocable`) and whether a person may invoke it by name
|
|
6
|
+
* (`userInvocable`). That split is exactly what project-aware gating needs: a
|
|
7
|
+
* skill that does not apply to the current project should leave the model's
|
|
8
|
+
* catalog to save context and avoid wrong suggestions, while staying reachable
|
|
9
|
+
* through an explicit `/skill-name` request.
|
|
10
|
+
*
|
|
11
|
+
* The rules here are intentionally conservative:
|
|
12
|
+
*
|
|
13
|
+
* - outside a Unity project only the configured workspace skills stay visible;
|
|
14
|
+
* - an unmet editor or package requirement hides the skill;
|
|
15
|
+
* - an *unknown* fact never hides a skill, so a broken manifest cannot silently
|
|
16
|
+
* empty the catalog;
|
|
17
|
+
* - a skill the project provides itself is not offered by this plugin at all,
|
|
18
|
+
* which is what keeps a project's own customization authoritative.
|
|
19
|
+
*
|
|
20
|
+
* @module dsh-unity/lib/gating
|
|
21
|
+
*/
|
|
22
|
+
import type { SkillCandidate } from './harness.ts';
|
|
23
|
+
import type { ProjectFacts } from './project.ts';
|
|
24
|
+
/** The settings that change a gating decision. */
|
|
25
|
+
export interface GatingSettings {
|
|
26
|
+
readonly enforceRequirements: boolean;
|
|
27
|
+
readonly gateByProject: boolean;
|
|
28
|
+
readonly workspaceSkills: ReadonlySet<string>;
|
|
29
|
+
}
|
|
30
|
+
/** One skill left out of the model catalog, with the reason shown to the model. */
|
|
31
|
+
export interface HiddenSkill {
|
|
32
|
+
readonly name: string;
|
|
33
|
+
readonly reason: string;
|
|
34
|
+
}
|
|
35
|
+
/** The catalog this plugin serves for one agent. */
|
|
36
|
+
export interface GatedCatalog {
|
|
37
|
+
/** Every candidate, with `modelInvocable` adjusted for hidden skills. */
|
|
38
|
+
readonly candidates: SkillCandidate[];
|
|
39
|
+
readonly hidden: HiddenSkill[];
|
|
40
|
+
readonly projectOverridden: string[];
|
|
41
|
+
}
|
|
42
|
+
/** The model-visibility decision for a single skill. */
|
|
43
|
+
export interface VisibilityDecision {
|
|
44
|
+
readonly modelInvocable: boolean;
|
|
45
|
+
readonly reason: string | undefined;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Decide the model-visibility of one skill candidate.
|
|
49
|
+
*
|
|
50
|
+
* @param candidate - candidate carrying its `requirements`.
|
|
51
|
+
* @param facts - project facts from `detectProject`.
|
|
52
|
+
* @param settings - resolved plugin settings.
|
|
53
|
+
* @returns the decision and, when hidden, a short human-readable reason.
|
|
54
|
+
*/
|
|
55
|
+
export declare function decideVisibility(candidate: SkillCandidate, facts: ProjectFacts | undefined, settings: GatingSettings): VisibilityDecision;
|
|
56
|
+
/**
|
|
57
|
+
* Build the catalog this plugin serves for one agent.
|
|
58
|
+
*
|
|
59
|
+
* Every candidate stays in the list so a person can still invoke a hidden skill
|
|
60
|
+
* by name; only its `modelInvocable` flag changes. Candidates the project
|
|
61
|
+
* overrides are dropped instead, so the project's own copy wins the name.
|
|
62
|
+
*
|
|
63
|
+
* @param candidates - candidates from the skill reader.
|
|
64
|
+
* @param facts - project facts, or `undefined` outside a project.
|
|
65
|
+
* @param settings - resolved plugin settings.
|
|
66
|
+
* @param projectSkills - skill names the project supplies itself.
|
|
67
|
+
* @returns gated candidates and the reasons for every hidden skill.
|
|
68
|
+
*/
|
|
69
|
+
export declare function gateCatalog(candidates: readonly SkillCandidate[], facts: ProjectFacts | undefined, settings: GatingSettings, projectSkills?: ReadonlySet<string>): GatedCatalog;
|
|
70
|
+
/**
|
|
71
|
+
* Render the runtime-context line contributed for one agent.
|
|
72
|
+
*
|
|
73
|
+
* Kept to one short paragraph: it is re-read on every prompt assembly, so it must
|
|
74
|
+
* describe facts the model cannot infer and nothing else.
|
|
75
|
+
*
|
|
76
|
+
* @param facts - project facts.
|
|
77
|
+
* @param hidden - gated-away skills.
|
|
78
|
+
* @returns the context text, or `undefined` when there is nothing to say.
|
|
79
|
+
*/
|
|
80
|
+
export declare function renderContext(facts: ProjectFacts | undefined, hidden: readonly HiddenSkill[]): string | undefined;
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structural declarations for the harness surfaces this plugin uses.
|
|
3
|
+
*
|
|
4
|
+
* The package is a plugin bundle, not a harness package: it never imports
|
|
5
|
+
* `@deepseek-ai/*` at runtime, and it deliberately keeps no build-time dependency
|
|
6
|
+
* on them so a local checkout type-checks without a network install. The
|
|
7
|
+
* interfaces below transcribe the parts of the harness contracts that matter
|
|
8
|
+
* here — the skill registry provider contract, the prompt-context contribution,
|
|
9
|
+
* the agent-scope boundary, and the optional services reached through `ctx.get`.
|
|
10
|
+
*
|
|
11
|
+
* Each type names the harness contract it mirrors. When the harness changes one
|
|
12
|
+
* of them, this file is the single place to update.
|
|
13
|
+
*
|
|
14
|
+
* @module dsh-unity/lib/harness
|
|
15
|
+
*/
|
|
16
|
+
/** `SkillInvocationPolicy` from the `skills` service contract. */
|
|
17
|
+
export interface SkillInvocationPolicy {
|
|
18
|
+
readonly modelInvocable: boolean;
|
|
19
|
+
readonly userInvocable: boolean;
|
|
20
|
+
}
|
|
21
|
+
/** What a skill declares about the project it needs. */
|
|
22
|
+
export interface SkillRequirements {
|
|
23
|
+
readonly editor?: string;
|
|
24
|
+
readonly packages: ReadonlyArray<{
|
|
25
|
+
readonly name: string;
|
|
26
|
+
readonly range: string;
|
|
27
|
+
}>;
|
|
28
|
+
}
|
|
29
|
+
/** The opaque handle a provider hands back to the registry and receives again on load. */
|
|
30
|
+
export interface SkillLocator {
|
|
31
|
+
readonly dir: string;
|
|
32
|
+
readonly file: string;
|
|
33
|
+
}
|
|
34
|
+
/** `SkillCandidate` — a catalog entry with its provider-private locator. */
|
|
35
|
+
export interface SkillCandidate {
|
|
36
|
+
readonly name: string;
|
|
37
|
+
readonly description: string;
|
|
38
|
+
readonly whenToUse?: string;
|
|
39
|
+
readonly invocation: SkillInvocationPolicy;
|
|
40
|
+
readonly requirements?: SkillRequirements;
|
|
41
|
+
readonly source: string;
|
|
42
|
+
readonly provider: string;
|
|
43
|
+
readonly rank: number;
|
|
44
|
+
readonly locator: SkillLocator;
|
|
45
|
+
readonly resourceBase: {
|
|
46
|
+
readonly kind: 'directory';
|
|
47
|
+
readonly path: string;
|
|
48
|
+
};
|
|
49
|
+
readonly path?: string;
|
|
50
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
51
|
+
}
|
|
52
|
+
/** `SkillDefinition` — a loaded body plus everything the candidate carried. */
|
|
53
|
+
export interface SkillDefinition {
|
|
54
|
+
readonly name: string;
|
|
55
|
+
readonly description: string;
|
|
56
|
+
readonly whenToUse?: string;
|
|
57
|
+
readonly invocation: SkillInvocationPolicy;
|
|
58
|
+
readonly source: string;
|
|
59
|
+
readonly provider: string;
|
|
60
|
+
readonly resourceBase: {
|
|
61
|
+
readonly kind: 'directory';
|
|
62
|
+
readonly path: string;
|
|
63
|
+
};
|
|
64
|
+
readonly path?: string;
|
|
65
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
66
|
+
readonly content: string;
|
|
67
|
+
}
|
|
68
|
+
/** `SkillProviderControl` — the registration's lifecycle and cache invalidation. */
|
|
69
|
+
export interface SkillProviderControl {
|
|
70
|
+
readonly signal: AbortSignal;
|
|
71
|
+
readonly invalidate: () => void;
|
|
72
|
+
}
|
|
73
|
+
/** Options the registry passes to discovery and loading. */
|
|
74
|
+
export interface SkillLookupOptions {
|
|
75
|
+
readonly cwd?: string | undefined;
|
|
76
|
+
readonly signal?: AbortSignal | undefined;
|
|
77
|
+
}
|
|
78
|
+
/** `SkillProvider` — what this plugin registers. */
|
|
79
|
+
export interface SkillProvider {
|
|
80
|
+
readonly name: string;
|
|
81
|
+
list(options: SkillLookupOptions): Promise<readonly SkillCandidate[]>;
|
|
82
|
+
get(candidate: SkillCandidate, options: SkillLookupOptions): Promise<SkillDefinition | undefined>;
|
|
83
|
+
}
|
|
84
|
+
/** The `skills` registry surface this plugin touches. */
|
|
85
|
+
export interface SkillsService {
|
|
86
|
+
registerProvider(create: (control: SkillProviderControl) => SkillProvider): () => void;
|
|
87
|
+
}
|
|
88
|
+
/** `PromptContext` from the `system-prompt` contract. */
|
|
89
|
+
export interface PromptContext {
|
|
90
|
+
readonly name: string;
|
|
91
|
+
readonly order: number;
|
|
92
|
+
readonly text: string | ((context: unknown) => string);
|
|
93
|
+
readonly required?: boolean;
|
|
94
|
+
readonly interpolate?: boolean;
|
|
95
|
+
}
|
|
96
|
+
/** The `systemPrompt` registry surface this plugin touches. */
|
|
97
|
+
export interface SystemPromptService {
|
|
98
|
+
context(context: PromptContext): () => void;
|
|
99
|
+
}
|
|
100
|
+
/** The `workingDirectory` service surface this plugin touches. */
|
|
101
|
+
export interface WorkingDirectoryService {
|
|
102
|
+
get(session: SessionLike | undefined): string | undefined;
|
|
103
|
+
}
|
|
104
|
+
/** The `agents` service surface this plugin touches. */
|
|
105
|
+
export interface AgentsService {
|
|
106
|
+
list(): AgentLike[];
|
|
107
|
+
}
|
|
108
|
+
/** The `subprocess` service surface this plugin touches. */
|
|
109
|
+
export interface SubprocessService {
|
|
110
|
+
resolveExecutable(command: string, env?: Readonly<Record<string, string>>, signal?: AbortSignal): Promise<string>;
|
|
111
|
+
}
|
|
112
|
+
/** Enough of a Session to read an identity and a fallback directory. */
|
|
113
|
+
export interface SessionLike {
|
|
114
|
+
readonly id?: string;
|
|
115
|
+
readonly header?: {
|
|
116
|
+
readonly cwd?: string;
|
|
117
|
+
};
|
|
118
|
+
readonly cwd?: string;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* The agent-scope boundary.
|
|
122
|
+
*
|
|
123
|
+
* Registrations made through this context land in the agent's own scope layer,
|
|
124
|
+
* which is what makes the provider win duplicate names and vary by project.
|
|
125
|
+
*/
|
|
126
|
+
export interface AgentContext {
|
|
127
|
+
get(name: string): unknown;
|
|
128
|
+
}
|
|
129
|
+
/** The agent surface this plugin touches. */
|
|
130
|
+
export interface AgentLike {
|
|
131
|
+
readonly id?: string;
|
|
132
|
+
readonly session?: SessionLike;
|
|
133
|
+
readonly ctx?: AgentContext;
|
|
134
|
+
}
|
|
135
|
+
/** A logger with the two levels this plugin uses. */
|
|
136
|
+
export interface Logger {
|
|
137
|
+
warn(message: string): void;
|
|
138
|
+
debug?(message: string): void;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* The Cordis plugin context, narrowed to what `apply()` uses.
|
|
142
|
+
*
|
|
143
|
+
* `get(name)` is the optional-service accessor; `skills` is declared because the
|
|
144
|
+
* plugin imports it as a hard dependency.
|
|
145
|
+
*/
|
|
146
|
+
export interface PluginContext {
|
|
147
|
+
readonly logger: Logger;
|
|
148
|
+
readonly skills: SkillsService;
|
|
149
|
+
get(name: string): unknown;
|
|
150
|
+
on(event: string, listener: (payload: unknown) => unknown): () => void;
|
|
151
|
+
effect(create: () => () => void, label?: string): () => void;
|
|
152
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unity's curated skills as a DeepSeek Harness plugin.
|
|
3
|
+
*
|
|
4
|
+
* The package carries 34 skills under `skills/` and serves them through the
|
|
5
|
+
* harness skill registry. What distinguishes this from a directory of Markdown
|
|
6
|
+
* files is *where* and *how* they are served:
|
|
7
|
+
*
|
|
8
|
+
* - registration happens per agent, through that agent's own context, so this
|
|
9
|
+
* provider lives in the agent's scope layer and its catalog can depend on the
|
|
10
|
+
* project the agent is working in;
|
|
11
|
+
* - a Unity project is detected from the session's working directory, and skills
|
|
12
|
+
* whose `required_editor_version` / `required_packages` cannot be met leave the
|
|
13
|
+
* model's catalog while staying reachable by explicit name;
|
|
14
|
+
* - the detected project facts are contributed to the agent's runtime context, so
|
|
15
|
+
* the model states the editor version and package situation instead of guessing;
|
|
16
|
+
* - the skill directory is watched, and a frontmatter membership change
|
|
17
|
+
* invalidates the cached catalog instead of requiring a restart.
|
|
18
|
+
*
|
|
19
|
+
* @module @aqian0/dsh-unity
|
|
20
|
+
*/
|
|
21
|
+
import type { RegistrySettings } from './registry.ts';
|
|
22
|
+
import type { ParseCache } from './skills.ts';
|
|
23
|
+
import type { PluginContext } from './harness.ts';
|
|
24
|
+
/** Loader row name. */
|
|
25
|
+
export declare const name = "unity-skills";
|
|
26
|
+
/** The skill registry this provider attaches to. */
|
|
27
|
+
export declare const inject: string[];
|
|
28
|
+
/** Provider name the registry lists the catalog under. */
|
|
29
|
+
export declare const DEFAULT_PROVIDER_NAME = "unity";
|
|
30
|
+
/**
|
|
31
|
+
* Default rank inside one scope layer. The catalog normally lands in the agent's
|
|
32
|
+
* own layer, where the nearest layer already wins duplicates; the rank only
|
|
33
|
+
* orders this provider against runtime (`ctx.skills.register()`) registrations,
|
|
34
|
+
* which use 250.
|
|
35
|
+
*/
|
|
36
|
+
export declare const DEFAULT_RANK = 240;
|
|
37
|
+
/**
|
|
38
|
+
* Skills worth showing outside a Unity project: creating a project, driving the
|
|
39
|
+
* editor from the CLI, and managing packages are all meaningful before a project
|
|
40
|
+
* exists.
|
|
41
|
+
*/
|
|
42
|
+
export declare const DEFAULT_WORKSPACE_SKILLS: readonly string[];
|
|
43
|
+
/** Row config accepted from the loader patch. */
|
|
44
|
+
export interface PluginConfig {
|
|
45
|
+
readonly providerName?: string;
|
|
46
|
+
readonly rank?: number;
|
|
47
|
+
readonly skillDir?: string;
|
|
48
|
+
readonly exclude?: readonly string[];
|
|
49
|
+
readonly workspaceSkills?: readonly string[];
|
|
50
|
+
readonly gateByProject?: boolean;
|
|
51
|
+
readonly enforceRequirements?: boolean;
|
|
52
|
+
readonly injectContext?: boolean;
|
|
53
|
+
readonly watchSkills?: boolean;
|
|
54
|
+
readonly respectProjectRoots?: boolean;
|
|
55
|
+
}
|
|
56
|
+
/** Normalized settings, with the parse cache attached by {@link apply}. */
|
|
57
|
+
export interface ResolvedSettings extends RegistrySettings {
|
|
58
|
+
readonly watchSkills: boolean;
|
|
59
|
+
parseCache: ParseCache | undefined;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Register the Unity skill provider on `ctx.skills`.
|
|
63
|
+
*
|
|
64
|
+
* @param ctx - Cordis plugin context; `skills` is injected.
|
|
65
|
+
* @param config - row config from the loader patch.
|
|
66
|
+
*/
|
|
67
|
+
export declare function apply(ctx: PluginContext, config?: PluginConfig): void;
|
|
68
|
+
/**
|
|
69
|
+
* Validate row config into normalized settings.
|
|
70
|
+
*
|
|
71
|
+
* @param config - row config from the loader patch.
|
|
72
|
+
* @returns normalized settings.
|
|
73
|
+
* @throws {TypeError} when a field is present but unusable.
|
|
74
|
+
*/
|
|
75
|
+
export declare function resolveSettings(config: PluginConfig): ResolvedSettings;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unity project detection.
|
|
3
|
+
*
|
|
4
|
+
* A session's working directory may sit anywhere inside a Unity project, so the
|
|
5
|
+
* plugin walks up to the nearest ancestor that carries
|
|
6
|
+
* `ProjectSettings/ProjectVersion.txt` — the marker Unity itself writes and the
|
|
7
|
+
* same file that names the editor version. From there it reads the facts that
|
|
8
|
+
* decide whether a skill applies: the editor version, the UPM packages in
|
|
9
|
+
* `Packages/manifest.json`, the inferred render pipeline, whether an Editor holds
|
|
10
|
+
* the project lock, and whether the `unity` CLI is on `PATH`.
|
|
11
|
+
*
|
|
12
|
+
* Everything here is read-only and best-effort. A partially readable project is
|
|
13
|
+
* reported with the fields it does have; a directory that is not a Unity project
|
|
14
|
+
* reports `undefined` rather than throwing.
|
|
15
|
+
*
|
|
16
|
+
* @module dsh-unity/lib/project
|
|
17
|
+
*/
|
|
18
|
+
import { readdir, stat } from 'node:fs/promises';
|
|
19
|
+
/** Relative path of the file that identifies a Unity project root. */
|
|
20
|
+
export declare const PROJECT_MARKER: string;
|
|
21
|
+
/** Render pipeline inferred from the installed packages. */
|
|
22
|
+
export type RenderPipeline = 'hdrp' | 'urp' | 'builtin';
|
|
23
|
+
/** What detection learned about one project. */
|
|
24
|
+
export interface ProjectFacts {
|
|
25
|
+
readonly root: string;
|
|
26
|
+
readonly editorVersion?: string;
|
|
27
|
+
readonly packages?: Map<string, string>;
|
|
28
|
+
readonly renderPipeline?: RenderPipeline;
|
|
29
|
+
readonly editorOpen: boolean;
|
|
30
|
+
readonly cliAvailable: boolean;
|
|
31
|
+
}
|
|
32
|
+
/** Collaborators a detection call can substitute, used by tests. */
|
|
33
|
+
export interface DetectOptions {
|
|
34
|
+
readonly stat?: typeof stat;
|
|
35
|
+
readonly readFile?: (path: string) => Promise<string>;
|
|
36
|
+
readonly maxDepth?: number;
|
|
37
|
+
readonly resolveExecutable?: (command: string) => Promise<string | undefined>;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Find the nearest ancestor containing the Unity project marker.
|
|
41
|
+
*
|
|
42
|
+
* @param cwd - directory to start from.
|
|
43
|
+
* @param options - injectable filesystem and walk depth.
|
|
44
|
+
* @returns the absolute project root, or `undefined` when there is none.
|
|
45
|
+
*/
|
|
46
|
+
export declare function findProjectRoot(cwd: string, options?: DetectOptions): Promise<string | undefined>;
|
|
47
|
+
/**
|
|
48
|
+
* Read the editor version from `ProjectVersion.txt`.
|
|
49
|
+
*
|
|
50
|
+
* @param text - file contents.
|
|
51
|
+
* @returns the version such as `6000.3.14f1`, or `undefined` when absent.
|
|
52
|
+
*/
|
|
53
|
+
export declare function parseProjectVersion(text: string): string | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* Read installed UPM packages from a manifest.
|
|
56
|
+
*
|
|
57
|
+
* @param text - `Packages/manifest.json` contents.
|
|
58
|
+
* @returns package id to version, or `undefined` when the manifest is not a mapping.
|
|
59
|
+
*/
|
|
60
|
+
export declare function parsePackages(text: string): Map<string, string> | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Infer the render pipeline from installed packages.
|
|
63
|
+
*
|
|
64
|
+
* @param packages - installed packages, or `undefined` when unknown.
|
|
65
|
+
* @returns the pipeline name, or `undefined` when the package list is unknown.
|
|
66
|
+
*/
|
|
67
|
+
export declare function inferRenderPipeline(packages: Map<string, string> | undefined): RenderPipeline | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* Detect the Unity project that contains a directory.
|
|
70
|
+
*
|
|
71
|
+
* @param cwd - session working directory.
|
|
72
|
+
* @param options - injectable collaborators and walk depth.
|
|
73
|
+
* @returns project facts, or `undefined` outside a project.
|
|
74
|
+
*/
|
|
75
|
+
export declare function detectProject(cwd: string, options?: DetectOptions): Promise<ProjectFacts | undefined>;
|
|
76
|
+
/**
|
|
77
|
+
* Skill names a project provides itself, which this plugin must not shadow.
|
|
78
|
+
*
|
|
79
|
+
* @param root - project root.
|
|
80
|
+
* @param options - injectable filesystem.
|
|
81
|
+
* @returns skill names found under the project skill roots.
|
|
82
|
+
*/
|
|
83
|
+
export declare function readProjectSkillNames(root: string, options?: {
|
|
84
|
+
readdir?: typeof readdir;
|
|
85
|
+
stat?: typeof stat;
|
|
86
|
+
}): Promise<Set<string>>;
|
|
87
|
+
/**
|
|
88
|
+
* A short, stable identity for a fact set, used to notice project changes.
|
|
89
|
+
*
|
|
90
|
+
* @param facts - detected facts.
|
|
91
|
+
* @returns a cache and comparison key.
|
|
92
|
+
*/
|
|
93
|
+
export declare function factsKey(facts: ProjectFacts | undefined): string;
|