@craft_eco/craft-mcp 0.1.30 → 0.1.31
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 +11 -9
- package/bin/craft-mcp.mjs +6 -3
- package/dist-server/game-workflow/context-state.mjs +9 -8
- package/dist-server/game-workflow/local-context.mjs +62 -62
- package/dist-server/game-workflow/project-context.mjs +49 -11
- package/dist-server/game-workflow/project-install.mjs +81 -0
- package/dist-server/game-workflow/projects.mjs +31 -3
- package/dist-server/integrations/config.mjs +20 -3
- package/dist-server/integrations/connect.mjs +15 -3
- package/dist-server/integrations/dsh-config.mjs +2 -2
- package/dist-server/integrations/files.mjs +54 -54
- package/dist-server/integrations/host-config-scope.mjs +16 -0
- package/dist-server/integrations/host-reload.mjs +6 -0
- package/dist-server/integrations/hosts.mjs +44 -6
- package/dist-server/integrations/install.mjs +193 -79
- package/dist-server/integrations/installation-state.mjs +1 -0
- package/dist-server/integrations/installation-transaction.mjs +27 -0
- package/dist-server/integrations/jsonc-config.mjs +56 -0
- package/dist-server/integrations/opencode-config.mjs +94 -0
- package/dist-server/integrations/project-setup.mjs +206 -0
- package/dist-server/integrations/registration-identity.mjs +15 -0
- package/dist-server/integrations/runtime-candidate.mjs +103 -0
- package/dist-server/integrations/updates.mjs +114 -41
- package/dist-server/launcher.mjs +8 -1
- package/dist-server/mcp/server.mjs +16 -2
- package/dist-server/mcp/update-session.mjs +88 -10
- package/package.json +3 -2
- package/resources/context-filter-report.json +121 -1
- package/resources/targets/claude/js/context-filter-report.json +1 -1
- package/resources/targets/claude/js3d/context-filter-report.json +1 -1
- package/resources/targets/claude/js3d/js3d/bundle.json +5 -5
- package/resources/targets/claude/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
- package/resources/targets/claude/js3d/target.json +1 -1
- package/resources/targets/codebuddy/js/context-filter-report.json +1 -1
- package/resources/targets/codebuddy/js3d/context-filter-report.json +1 -1
- package/resources/targets/codebuddy/js3d/js3d/bundle.json +5 -5
- package/resources/targets/codebuddy/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
- package/resources/targets/codebuddy/js3d/target.json +1 -1
- package/resources/targets/codex/js/context-filter-report.json +1 -1
- package/resources/targets/codex/js3d/context-filter-report.json +1 -1
- package/resources/targets/codex/js3d/js3d/bundle.json +5 -5
- package/resources/targets/codex/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
- package/resources/targets/codex/js3d/target.json +1 -1
- package/resources/targets/comate/js/bootstrap/SKILL.md +20 -0
- package/resources/targets/comate/js/context-filter-report.json +27 -0
- package/resources/targets/comate/js/craft-game-maker/SKILL.md +72 -0
- package/resources/targets/comate/js/craft-game-maker/js.md +10 -0
- package/resources/targets/comate/js/js/bundle.json +97 -0
- package/resources/targets/comate/js/js/context/AGENTS.md +29 -0
- package/resources/targets/comate/js/js/context/hooks/hooks.json +14 -0
- package/resources/targets/comate/js/js/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/comate/js/js/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/comate/js/js/context/knowledge/Layout.md +7 -0
- package/resources/targets/comate/js/js/context/knowledge/Lifecycle.md +11 -0
- package/resources/targets/comate/js/js/context/knowledge/ResourceLoading.md +9 -0
- package/resources/targets/comate/js/js/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/comate/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/comate/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/comate/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/comate/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/comate/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/comate/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/comate/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/comate/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/comate/js/js/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/comate/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/comate/js/js/context/skills/index.json +19 -0
- package/resources/targets/comate/js/js/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/comate/js/js/project/README.md +7 -0
- package/resources/targets/comate/js/js/project/configs/assets.json +1 -0
- package/resources/targets/comate/js/js/project/configs/game.controls.json +3 -0
- package/resources/targets/comate/js/js/project/configs/game.json +3 -0
- package/resources/targets/comate/js/js/project/game-runtime.json +7 -0
- package/resources/targets/comate/js/js/project/game.config.json +7 -0
- package/resources/targets/comate/js/js/project/index.html +20 -0
- package/resources/targets/comate/js/js/project/package.json +22 -0
- package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
- package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
- package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/comate/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/comate/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
- package/resources/targets/comate/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/comate/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
- package/resources/targets/comate/js/js/project/scripts/config-export.mjs +13 -0
- package/resources/targets/comate/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/comate/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/comate/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/comate/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/comate/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/comate/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/comate/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/comate/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/comate/js/js/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/comate/js/js/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/comate/js/js/project/src/display/viewport.ts +249 -0
- package/resources/targets/comate/js/js/project/src/main.ts +87 -0
- package/resources/targets/comate/js/js/project/src/platform.ts +2 -0
- package/resources/targets/comate/js/js/project/src/scenes/LoadScene.ts +89 -0
- package/resources/targets/comate/js/js/project/src/scenes/PlayScene.ts +17 -0
- package/resources/targets/comate/js/js/project/src/screenUi.ts +185 -0
- package/resources/targets/comate/js/js/project/src/style.css +294 -0
- package/resources/targets/comate/js/js/project/tsconfig.json +20 -0
- package/resources/targets/comate/js/js/project/unified_data_control_config.json +20 -0
- package/resources/targets/comate/js/js/project/vite.config.ts +5 -0
- package/resources/targets/comate/js/recovery.md +17 -0
- package/resources/targets/comate/js/target.json +61 -0
- package/resources/targets/comate/js3d/bootstrap/SKILL.md +20 -0
- package/resources/targets/comate/js3d/context-filter-report.json +27 -0
- package/resources/targets/comate/js3d/craft-game-maker/SKILL.md +72 -0
- package/resources/targets/comate/js3d/craft-game-maker/js3d.md +12 -0
- package/resources/targets/comate/js3d/js3d/bundle.json +108 -0
- package/resources/targets/comate/js3d/js3d/context/AGENTS.md +30 -0
- package/resources/targets/comate/js3d/js3d/context/hooks/hooks.json +14 -0
- package/resources/targets/comate/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/comate/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/comate/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
- package/resources/targets/comate/js3d/js3d/context/knowledge/Layout.md +7 -0
- package/resources/targets/comate/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
- package/resources/targets/comate/js3d/js3d/context/knowledge/Runtime.md +9 -0
- package/resources/targets/comate/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
- package/resources/targets/comate/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
- package/resources/targets/comate/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
- package/resources/targets/comate/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
- package/resources/targets/comate/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
- package/resources/targets/comate/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
- package/resources/targets/comate/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/comate/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/comate/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/comate/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/comate/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/comate/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/comate/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/comate/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/comate/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/comate/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/comate/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/comate/js3d/js3d/context/skills/index.json +31 -0
- package/resources/targets/comate/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
- package/resources/targets/comate/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
- package/resources/targets/comate/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
- package/resources/targets/comate/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
- package/resources/targets/comate/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
- package/resources/targets/comate/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/comate/js3d/js3d/project/README.md +7 -0
- package/resources/targets/comate/js3d/js3d/project/configs/game.controls.json +3 -0
- package/resources/targets/comate/js3d/js3d/project/configs/game.json +3 -0
- package/resources/targets/comate/js3d/js3d/project/game-runtime.json +7 -0
- package/resources/targets/comate/js3d/js3d/project/game.config.json +7 -0
- package/resources/targets/comate/js3d/js3d/project/index.html +12 -0
- package/resources/targets/comate/js3d/js3d/project/package.json +23 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
- package/resources/targets/comate/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
- package/resources/targets/comate/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
- package/resources/targets/comate/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/comate/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
- package/resources/targets/comate/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
- package/resources/targets/comate/js3d/js3d/project/scripts/config-export.mjs +15 -0
- package/resources/targets/comate/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/comate/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/comate/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/comate/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/comate/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/comate/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/comate/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/comate/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/comate/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/comate/js3d/js3d/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/comate/js3d/js3d/project/src/display/viewport.ts +239 -0
- package/resources/targets/comate/js3d/js3d/project/src/main.ts +85 -0
- package/resources/targets/comate/js3d/js3d/project/src/platform.ts +2 -0
- package/resources/targets/comate/js3d/js3d/project/src/style.css +83 -0
- package/resources/targets/comate/js3d/js3d/project/tsconfig.json +20 -0
- package/resources/targets/comate/js3d/js3d/project/unified_data_control_config.json +20 -0
- package/resources/targets/comate/js3d/js3d/project/vite.config.ts +5 -0
- package/resources/targets/comate/js3d/recovery.md +17 -0
- package/resources/targets/comate/js3d/target.json +60 -0
- package/resources/targets/cursor/js/context-filter-report.json +1 -1
- package/resources/targets/cursor/js3d/context-filter-report.json +1 -1
- package/resources/targets/cursor/js3d/js3d/bundle.json +5 -5
- package/resources/targets/cursor/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
- package/resources/targets/cursor/js3d/target.json +1 -1
- package/resources/targets/dsh/js/context-filter-report.json +1 -1
- package/resources/targets/dsh/js3d/context-filter-report.json +1 -1
- package/resources/targets/dsh/js3d/js3d/bundle.json +5 -5
- package/resources/targets/dsh/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
- package/resources/targets/dsh/js3d/target.json +1 -1
- package/resources/targets/index.json +88 -16
- package/resources/targets/kimi/js/context-filter-report.json +1 -1
- package/resources/targets/kimi/js3d/context-filter-report.json +1 -1
- package/resources/targets/kimi/js3d/js3d/bundle.json +5 -5
- package/resources/targets/kimi/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
- package/resources/targets/kimi/js3d/target.json +1 -1
- package/resources/targets/opencode/js/bootstrap/SKILL.md +20 -0
- package/resources/targets/opencode/js/context-filter-report.json +27 -0
- package/resources/targets/opencode/js/craft-game-maker/SKILL.md +72 -0
- package/resources/targets/opencode/js/craft-game-maker/js.md +10 -0
- package/resources/targets/opencode/js/js/bundle.json +97 -0
- package/resources/targets/opencode/js/js/context/AGENTS.md +29 -0
- package/resources/targets/opencode/js/js/context/hooks/hooks.json +14 -0
- package/resources/targets/opencode/js/js/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/opencode/js/js/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/opencode/js/js/context/knowledge/Layout.md +7 -0
- package/resources/targets/opencode/js/js/context/knowledge/Lifecycle.md +11 -0
- package/resources/targets/opencode/js/js/context/knowledge/ResourceLoading.md +9 -0
- package/resources/targets/opencode/js/js/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/opencode/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/opencode/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/opencode/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/opencode/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/opencode/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/opencode/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/opencode/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/opencode/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/opencode/js/js/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/opencode/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/opencode/js/js/context/skills/index.json +19 -0
- package/resources/targets/opencode/js/js/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/opencode/js/js/project/README.md +7 -0
- package/resources/targets/opencode/js/js/project/configs/assets.json +1 -0
- package/resources/targets/opencode/js/js/project/configs/game.controls.json +3 -0
- package/resources/targets/opencode/js/js/project/configs/game.json +3 -0
- package/resources/targets/opencode/js/js/project/game-runtime.json +7 -0
- package/resources/targets/opencode/js/js/project/game.config.json +7 -0
- package/resources/targets/opencode/js/js/project/index.html +20 -0
- package/resources/targets/opencode/js/js/project/package.json +22 -0
- package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
- package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
- package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/opencode/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/opencode/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
- package/resources/targets/opencode/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/opencode/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
- package/resources/targets/opencode/js/js/project/scripts/config-export.mjs +13 -0
- package/resources/targets/opencode/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/opencode/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/opencode/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/opencode/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/opencode/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/opencode/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/opencode/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/opencode/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/opencode/js/js/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/opencode/js/js/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/opencode/js/js/project/src/display/viewport.ts +249 -0
- package/resources/targets/opencode/js/js/project/src/main.ts +87 -0
- package/resources/targets/opencode/js/js/project/src/platform.ts +2 -0
- package/resources/targets/opencode/js/js/project/src/scenes/LoadScene.ts +89 -0
- package/resources/targets/opencode/js/js/project/src/scenes/PlayScene.ts +17 -0
- package/resources/targets/opencode/js/js/project/src/screenUi.ts +185 -0
- package/resources/targets/opencode/js/js/project/src/style.css +294 -0
- package/resources/targets/opencode/js/js/project/tsconfig.json +20 -0
- package/resources/targets/opencode/js/js/project/unified_data_control_config.json +20 -0
- package/resources/targets/opencode/js/js/project/vite.config.ts +5 -0
- package/resources/targets/opencode/js/recovery.md +17 -0
- package/resources/targets/opencode/js/target.json +61 -0
- package/resources/targets/opencode/js3d/bootstrap/SKILL.md +20 -0
- package/resources/targets/opencode/js3d/context-filter-report.json +27 -0
- package/resources/targets/opencode/js3d/craft-game-maker/SKILL.md +72 -0
- package/resources/targets/opencode/js3d/craft-game-maker/js3d.md +12 -0
- package/resources/targets/opencode/js3d/js3d/bundle.json +108 -0
- package/resources/targets/opencode/js3d/js3d/context/AGENTS.md +30 -0
- package/resources/targets/opencode/js3d/js3d/context/hooks/hooks.json +14 -0
- package/resources/targets/opencode/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/opencode/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/opencode/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
- package/resources/targets/opencode/js3d/js3d/context/knowledge/Layout.md +7 -0
- package/resources/targets/opencode/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
- package/resources/targets/opencode/js3d/js3d/context/knowledge/Runtime.md +9 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/index.json +31 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
- package/resources/targets/opencode/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/opencode/js3d/js3d/project/README.md +7 -0
- package/resources/targets/opencode/js3d/js3d/project/configs/game.controls.json +3 -0
- package/resources/targets/opencode/js3d/js3d/project/configs/game.json +3 -0
- package/resources/targets/opencode/js3d/js3d/project/game-runtime.json +7 -0
- package/resources/targets/opencode/js3d/js3d/project/game.config.json +7 -0
- package/resources/targets/opencode/js3d/js3d/project/index.html +12 -0
- package/resources/targets/opencode/js3d/js3d/project/package.json +23 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
- package/resources/targets/opencode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
- package/resources/targets/opencode/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
- package/resources/targets/opencode/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/opencode/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
- package/resources/targets/opencode/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
- package/resources/targets/opencode/js3d/js3d/project/scripts/config-export.mjs +15 -0
- package/resources/targets/opencode/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/opencode/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/opencode/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/opencode/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/opencode/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/opencode/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/opencode/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/opencode/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/opencode/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/opencode/js3d/js3d/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/opencode/js3d/js3d/project/src/display/viewport.ts +239 -0
- package/resources/targets/opencode/js3d/js3d/project/src/main.ts +85 -0
- package/resources/targets/opencode/js3d/js3d/project/src/platform.ts +2 -0
- package/resources/targets/opencode/js3d/js3d/project/src/style.css +83 -0
- package/resources/targets/opencode/js3d/js3d/project/tsconfig.json +20 -0
- package/resources/targets/opencode/js3d/js3d/project/unified_data_control_config.json +20 -0
- package/resources/targets/opencode/js3d/js3d/project/vite.config.ts +5 -0
- package/resources/targets/opencode/js3d/recovery.md +17 -0
- package/resources/targets/opencode/js3d/target.json +60 -0
- package/resources/targets/qoder/js/bootstrap/SKILL.md +20 -0
- package/resources/targets/qoder/js/context-filter-report.json +27 -0
- package/resources/targets/qoder/js/craft-game-maker/SKILL.md +72 -0
- package/resources/targets/qoder/js/craft-game-maker/js.md +10 -0
- package/resources/targets/qoder/js/js/bundle.json +97 -0
- package/resources/targets/qoder/js/js/context/AGENTS.md +31 -0
- package/resources/targets/qoder/js/js/context/hooks/hooks.json +14 -0
- package/resources/targets/qoder/js/js/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/qoder/js/js/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/qoder/js/js/context/knowledge/Layout.md +7 -0
- package/resources/targets/qoder/js/js/context/knowledge/Lifecycle.md +11 -0
- package/resources/targets/qoder/js/js/context/knowledge/ResourceLoading.md +9 -0
- package/resources/targets/qoder/js/js/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/qoder/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/qoder/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/qoder/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/qoder/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/qoder/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/qoder/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/qoder/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/qoder/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/qoder/js/js/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/qoder/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/qoder/js/js/context/skills/index.json +19 -0
- package/resources/targets/qoder/js/js/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/qoder/js/js/project/README.md +7 -0
- package/resources/targets/qoder/js/js/project/configs/assets.json +1 -0
- package/resources/targets/qoder/js/js/project/configs/game.controls.json +3 -0
- package/resources/targets/qoder/js/js/project/configs/game.json +3 -0
- package/resources/targets/qoder/js/js/project/game-runtime.json +7 -0
- package/resources/targets/qoder/js/js/project/game.config.json +7 -0
- package/resources/targets/qoder/js/js/project/index.html +20 -0
- package/resources/targets/qoder/js/js/project/package.json +22 -0
- package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
- package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
- package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/qoder/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/qoder/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
- package/resources/targets/qoder/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/qoder/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
- package/resources/targets/qoder/js/js/project/scripts/config-export.mjs +13 -0
- package/resources/targets/qoder/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/qoder/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/qoder/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/qoder/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/qoder/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/qoder/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/qoder/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/qoder/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/qoder/js/js/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/qoder/js/js/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/qoder/js/js/project/src/display/viewport.ts +249 -0
- package/resources/targets/qoder/js/js/project/src/main.ts +87 -0
- package/resources/targets/qoder/js/js/project/src/platform.ts +2 -0
- package/resources/targets/qoder/js/js/project/src/scenes/LoadScene.ts +89 -0
- package/resources/targets/qoder/js/js/project/src/scenes/PlayScene.ts +17 -0
- package/resources/targets/qoder/js/js/project/src/screenUi.ts +185 -0
- package/resources/targets/qoder/js/js/project/src/style.css +294 -0
- package/resources/targets/qoder/js/js/project/tsconfig.json +20 -0
- package/resources/targets/qoder/js/js/project/unified_data_control_config.json +20 -0
- package/resources/targets/qoder/js/js/project/vite.config.ts +5 -0
- package/resources/targets/qoder/js/recovery.md +17 -0
- package/resources/targets/qoder/js/target.json +61 -0
- package/resources/targets/qoder/js3d/bootstrap/SKILL.md +20 -0
- package/resources/targets/qoder/js3d/context-filter-report.json +27 -0
- package/resources/targets/qoder/js3d/craft-game-maker/SKILL.md +72 -0
- package/resources/targets/qoder/js3d/craft-game-maker/js3d.md +12 -0
- package/resources/targets/qoder/js3d/js3d/bundle.json +108 -0
- package/resources/targets/qoder/js3d/js3d/context/AGENTS.md +32 -0
- package/resources/targets/qoder/js3d/js3d/context/hooks/hooks.json +14 -0
- package/resources/targets/qoder/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/qoder/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/qoder/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
- package/resources/targets/qoder/js3d/js3d/context/knowledge/Layout.md +7 -0
- package/resources/targets/qoder/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
- package/resources/targets/qoder/js3d/js3d/context/knowledge/Runtime.md +9 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/index.json +31 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
- package/resources/targets/qoder/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/qoder/js3d/js3d/project/README.md +7 -0
- package/resources/targets/qoder/js3d/js3d/project/configs/game.controls.json +3 -0
- package/resources/targets/qoder/js3d/js3d/project/configs/game.json +3 -0
- package/resources/targets/qoder/js3d/js3d/project/game-runtime.json +7 -0
- package/resources/targets/qoder/js3d/js3d/project/game.config.json +7 -0
- package/resources/targets/qoder/js3d/js3d/project/index.html +12 -0
- package/resources/targets/qoder/js3d/js3d/project/package.json +23 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
- package/resources/targets/qoder/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
- package/resources/targets/qoder/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
- package/resources/targets/qoder/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/qoder/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
- package/resources/targets/qoder/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
- package/resources/targets/qoder/js3d/js3d/project/scripts/config-export.mjs +15 -0
- package/resources/targets/qoder/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/qoder/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/qoder/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/qoder/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/qoder/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/qoder/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/qoder/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/qoder/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/qoder/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/qoder/js3d/js3d/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/qoder/js3d/js3d/project/src/display/viewport.ts +239 -0
- package/resources/targets/qoder/js3d/js3d/project/src/main.ts +85 -0
- package/resources/targets/qoder/js3d/js3d/project/src/platform.ts +2 -0
- package/resources/targets/qoder/js3d/js3d/project/src/style.css +83 -0
- package/resources/targets/qoder/js3d/js3d/project/tsconfig.json +20 -0
- package/resources/targets/qoder/js3d/js3d/project/unified_data_control_config.json +20 -0
- package/resources/targets/qoder/js3d/js3d/project/vite.config.ts +5 -0
- package/resources/targets/qoder/js3d/recovery.md +17 -0
- package/resources/targets/qoder/js3d/target.json +60 -0
- package/resources/targets/qoder-cn/js/bootstrap/SKILL.md +20 -0
- package/resources/targets/qoder-cn/js/context-filter-report.json +27 -0
- package/resources/targets/qoder-cn/js/craft-game-maker/SKILL.md +72 -0
- package/resources/targets/qoder-cn/js/craft-game-maker/js.md +10 -0
- package/resources/targets/qoder-cn/js/js/bundle.json +97 -0
- package/resources/targets/qoder-cn/js/js/context/AGENTS.md +31 -0
- package/resources/targets/qoder-cn/js/js/context/hooks/hooks.json +14 -0
- package/resources/targets/qoder-cn/js/js/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/qoder-cn/js/js/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/qoder-cn/js/js/context/knowledge/Layout.md +7 -0
- package/resources/targets/qoder-cn/js/js/context/knowledge/Lifecycle.md +11 -0
- package/resources/targets/qoder-cn/js/js/context/knowledge/ResourceLoading.md +9 -0
- package/resources/targets/qoder-cn/js/js/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/qoder-cn/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/qoder-cn/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/qoder-cn/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/qoder-cn/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/qoder-cn/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/qoder-cn/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/qoder-cn/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/qoder-cn/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/qoder-cn/js/js/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/qoder-cn/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/qoder-cn/js/js/context/skills/index.json +19 -0
- package/resources/targets/qoder-cn/js/js/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/qoder-cn/js/js/project/README.md +7 -0
- package/resources/targets/qoder-cn/js/js/project/configs/assets.json +1 -0
- package/resources/targets/qoder-cn/js/js/project/configs/game.controls.json +3 -0
- package/resources/targets/qoder-cn/js/js/project/configs/game.json +3 -0
- package/resources/targets/qoder-cn/js/js/project/game-runtime.json +7 -0
- package/resources/targets/qoder-cn/js/js/project/game.config.json +7 -0
- package/resources/targets/qoder-cn/js/js/project/index.html +20 -0
- package/resources/targets/qoder-cn/js/js/project/package.json +22 -0
- package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
- package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
- package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/qoder-cn/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/qoder-cn/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
- package/resources/targets/qoder-cn/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/qoder-cn/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
- package/resources/targets/qoder-cn/js/js/project/scripts/config-export.mjs +13 -0
- package/resources/targets/qoder-cn/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/qoder-cn/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/qoder-cn/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/qoder-cn/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/qoder-cn/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/qoder-cn/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/qoder-cn/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/qoder-cn/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/qoder-cn/js/js/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/qoder-cn/js/js/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/qoder-cn/js/js/project/src/display/viewport.ts +249 -0
- package/resources/targets/qoder-cn/js/js/project/src/main.ts +87 -0
- package/resources/targets/qoder-cn/js/js/project/src/platform.ts +2 -0
- package/resources/targets/qoder-cn/js/js/project/src/scenes/LoadScene.ts +89 -0
- package/resources/targets/qoder-cn/js/js/project/src/scenes/PlayScene.ts +17 -0
- package/resources/targets/qoder-cn/js/js/project/src/screenUi.ts +185 -0
- package/resources/targets/qoder-cn/js/js/project/src/style.css +294 -0
- package/resources/targets/qoder-cn/js/js/project/tsconfig.json +20 -0
- package/resources/targets/qoder-cn/js/js/project/unified_data_control_config.json +20 -0
- package/resources/targets/qoder-cn/js/js/project/vite.config.ts +5 -0
- package/resources/targets/qoder-cn/js/recovery.md +17 -0
- package/resources/targets/qoder-cn/js/target.json +61 -0
- package/resources/targets/qoder-cn/js3d/bootstrap/SKILL.md +20 -0
- package/resources/targets/qoder-cn/js3d/context-filter-report.json +27 -0
- package/resources/targets/qoder-cn/js3d/craft-game-maker/SKILL.md +72 -0
- package/resources/targets/qoder-cn/js3d/craft-game-maker/js3d.md +12 -0
- package/resources/targets/qoder-cn/js3d/js3d/bundle.json +108 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/AGENTS.md +32 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/hooks/hooks.json +14 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/knowledge/Layout.md +7 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/knowledge/Runtime.md +9 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/index.json +31 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
- package/resources/targets/qoder-cn/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/README.md +7 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/configs/game.controls.json +3 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/configs/game.json +3 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/game-runtime.json +7 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/game.config.json +7 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/index.html +12 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/package.json +23 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/scripts/config-export.mjs +15 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/src/display/viewport.ts +239 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/src/main.ts +85 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/src/platform.ts +2 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/src/style.css +83 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/tsconfig.json +20 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/unified_data_control_config.json +20 -0
- package/resources/targets/qoder-cn/js3d/js3d/project/vite.config.ts +5 -0
- package/resources/targets/qoder-cn/js3d/recovery.md +17 -0
- package/resources/targets/qoder-cn/js3d/target.json +60 -0
- package/resources/targets/qwen/js/bootstrap/SKILL.md +20 -0
- package/resources/targets/qwen/js/context-filter-report.json +27 -0
- package/resources/targets/qwen/js/craft-game-maker/SKILL.md +72 -0
- package/resources/targets/qwen/js/craft-game-maker/js.md +10 -0
- package/resources/targets/qwen/js/js/bundle.json +97 -0
- package/resources/targets/qwen/js/js/context/AGENTS.md +29 -0
- package/resources/targets/qwen/js/js/context/hooks/hooks.json +14 -0
- package/resources/targets/qwen/js/js/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/qwen/js/js/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/qwen/js/js/context/knowledge/Layout.md +7 -0
- package/resources/targets/qwen/js/js/context/knowledge/Lifecycle.md +11 -0
- package/resources/targets/qwen/js/js/context/knowledge/ResourceLoading.md +9 -0
- package/resources/targets/qwen/js/js/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/qwen/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/qwen/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/qwen/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/qwen/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/qwen/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/qwen/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/qwen/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/qwen/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/qwen/js/js/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/qwen/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/qwen/js/js/context/skills/index.json +19 -0
- package/resources/targets/qwen/js/js/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/qwen/js/js/project/README.md +7 -0
- package/resources/targets/qwen/js/js/project/configs/assets.json +1 -0
- package/resources/targets/qwen/js/js/project/configs/game.controls.json +3 -0
- package/resources/targets/qwen/js/js/project/configs/game.json +3 -0
- package/resources/targets/qwen/js/js/project/game-runtime.json +7 -0
- package/resources/targets/qwen/js/js/project/game.config.json +7 -0
- package/resources/targets/qwen/js/js/project/index.html +20 -0
- package/resources/targets/qwen/js/js/project/package.json +22 -0
- package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
- package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
- package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/qwen/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/qwen/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
- package/resources/targets/qwen/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/qwen/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
- package/resources/targets/qwen/js/js/project/scripts/config-export.mjs +13 -0
- package/resources/targets/qwen/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/qwen/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/qwen/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/qwen/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/qwen/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/qwen/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/qwen/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/qwen/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/qwen/js/js/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/qwen/js/js/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/qwen/js/js/project/src/display/viewport.ts +249 -0
- package/resources/targets/qwen/js/js/project/src/main.ts +87 -0
- package/resources/targets/qwen/js/js/project/src/platform.ts +2 -0
- package/resources/targets/qwen/js/js/project/src/scenes/LoadScene.ts +89 -0
- package/resources/targets/qwen/js/js/project/src/scenes/PlayScene.ts +17 -0
- package/resources/targets/qwen/js/js/project/src/screenUi.ts +185 -0
- package/resources/targets/qwen/js/js/project/src/style.css +294 -0
- package/resources/targets/qwen/js/js/project/tsconfig.json +20 -0
- package/resources/targets/qwen/js/js/project/unified_data_control_config.json +20 -0
- package/resources/targets/qwen/js/js/project/vite.config.ts +5 -0
- package/resources/targets/qwen/js/recovery.md +17 -0
- package/resources/targets/qwen/js/target.json +61 -0
- package/resources/targets/qwen/js3d/bootstrap/SKILL.md +20 -0
- package/resources/targets/qwen/js3d/context-filter-report.json +27 -0
- package/resources/targets/qwen/js3d/craft-game-maker/SKILL.md +72 -0
- package/resources/targets/qwen/js3d/craft-game-maker/js3d.md +12 -0
- package/resources/targets/qwen/js3d/js3d/bundle.json +108 -0
- package/resources/targets/qwen/js3d/js3d/context/AGENTS.md +30 -0
- package/resources/targets/qwen/js3d/js3d/context/hooks/hooks.json +14 -0
- package/resources/targets/qwen/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/qwen/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/qwen/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
- package/resources/targets/qwen/js3d/js3d/context/knowledge/Layout.md +7 -0
- package/resources/targets/qwen/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
- package/resources/targets/qwen/js3d/js3d/context/knowledge/Runtime.md +9 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/index.json +31 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
- package/resources/targets/qwen/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/qwen/js3d/js3d/project/README.md +7 -0
- package/resources/targets/qwen/js3d/js3d/project/configs/game.controls.json +3 -0
- package/resources/targets/qwen/js3d/js3d/project/configs/game.json +3 -0
- package/resources/targets/qwen/js3d/js3d/project/game-runtime.json +7 -0
- package/resources/targets/qwen/js3d/js3d/project/game.config.json +7 -0
- package/resources/targets/qwen/js3d/js3d/project/index.html +12 -0
- package/resources/targets/qwen/js3d/js3d/project/package.json +23 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
- package/resources/targets/qwen/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
- package/resources/targets/qwen/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
- package/resources/targets/qwen/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/qwen/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
- package/resources/targets/qwen/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
- package/resources/targets/qwen/js3d/js3d/project/scripts/config-export.mjs +15 -0
- package/resources/targets/qwen/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/qwen/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/qwen/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/qwen/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/qwen/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/qwen/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/qwen/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/qwen/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/qwen/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/qwen/js3d/js3d/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/qwen/js3d/js3d/project/src/display/viewport.ts +239 -0
- package/resources/targets/qwen/js3d/js3d/project/src/main.ts +85 -0
- package/resources/targets/qwen/js3d/js3d/project/src/platform.ts +2 -0
- package/resources/targets/qwen/js3d/js3d/project/src/style.css +83 -0
- package/resources/targets/qwen/js3d/js3d/project/tsconfig.json +20 -0
- package/resources/targets/qwen/js3d/js3d/project/unified_data_control_config.json +20 -0
- package/resources/targets/qwen/js3d/js3d/project/vite.config.ts +5 -0
- package/resources/targets/qwen/js3d/recovery.md +17 -0
- package/resources/targets/qwen/js3d/target.json +60 -0
- package/resources/targets/trae/js/bootstrap/SKILL.md +20 -0
- package/resources/targets/trae/js/context-filter-report.json +27 -0
- package/resources/targets/trae/js/craft-game-maker/SKILL.md +72 -0
- package/resources/targets/trae/js/craft-game-maker/js.md +10 -0
- package/resources/targets/trae/js/js/bundle.json +97 -0
- package/resources/targets/trae/js/js/context/AGENTS.md +29 -0
- package/resources/targets/trae/js/js/context/hooks/hooks.json +14 -0
- package/resources/targets/trae/js/js/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/trae/js/js/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/trae/js/js/context/knowledge/Layout.md +7 -0
- package/resources/targets/trae/js/js/context/knowledge/Lifecycle.md +11 -0
- package/resources/targets/trae/js/js/context/knowledge/ResourceLoading.md +9 -0
- package/resources/targets/trae/js/js/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/trae/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/trae/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/trae/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/trae/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/trae/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/trae/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/trae/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/trae/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/trae/js/js/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/trae/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/trae/js/js/context/skills/index.json +19 -0
- package/resources/targets/trae/js/js/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/trae/js/js/project/README.md +7 -0
- package/resources/targets/trae/js/js/project/configs/assets.json +1 -0
- package/resources/targets/trae/js/js/project/configs/game.controls.json +3 -0
- package/resources/targets/trae/js/js/project/configs/game.json +3 -0
- package/resources/targets/trae/js/js/project/game-runtime.json +7 -0
- package/resources/targets/trae/js/js/project/game.config.json +7 -0
- package/resources/targets/trae/js/js/project/index.html +20 -0
- package/resources/targets/trae/js/js/project/package.json +22 -0
- package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
- package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
- package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/trae/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/trae/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
- package/resources/targets/trae/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/trae/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
- package/resources/targets/trae/js/js/project/scripts/config-export.mjs +13 -0
- package/resources/targets/trae/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/trae/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/trae/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/trae/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/trae/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/trae/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/trae/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/trae/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/trae/js/js/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/trae/js/js/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/trae/js/js/project/src/display/viewport.ts +249 -0
- package/resources/targets/trae/js/js/project/src/main.ts +87 -0
- package/resources/targets/trae/js/js/project/src/platform.ts +2 -0
- package/resources/targets/trae/js/js/project/src/scenes/LoadScene.ts +89 -0
- package/resources/targets/trae/js/js/project/src/scenes/PlayScene.ts +17 -0
- package/resources/targets/trae/js/js/project/src/screenUi.ts +185 -0
- package/resources/targets/trae/js/js/project/src/style.css +294 -0
- package/resources/targets/trae/js/js/project/tsconfig.json +20 -0
- package/resources/targets/trae/js/js/project/unified_data_control_config.json +20 -0
- package/resources/targets/trae/js/js/project/vite.config.ts +5 -0
- package/resources/targets/trae/js/recovery.md +17 -0
- package/resources/targets/trae/js/target.json +61 -0
- package/resources/targets/trae/js3d/bootstrap/SKILL.md +20 -0
- package/resources/targets/trae/js3d/context-filter-report.json +27 -0
- package/resources/targets/trae/js3d/craft-game-maker/SKILL.md +72 -0
- package/resources/targets/trae/js3d/craft-game-maker/js3d.md +12 -0
- package/resources/targets/trae/js3d/js3d/bundle.json +108 -0
- package/resources/targets/trae/js3d/js3d/context/AGENTS.md +30 -0
- package/resources/targets/trae/js3d/js3d/context/hooks/hooks.json +14 -0
- package/resources/targets/trae/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/trae/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/trae/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
- package/resources/targets/trae/js3d/js3d/context/knowledge/Layout.md +7 -0
- package/resources/targets/trae/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
- package/resources/targets/trae/js3d/js3d/context/knowledge/Runtime.md +9 -0
- package/resources/targets/trae/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
- package/resources/targets/trae/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
- package/resources/targets/trae/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
- package/resources/targets/trae/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
- package/resources/targets/trae/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
- package/resources/targets/trae/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
- package/resources/targets/trae/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/trae/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/trae/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/trae/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/trae/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/trae/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/trae/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/trae/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/trae/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/trae/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/trae/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/trae/js3d/js3d/context/skills/index.json +31 -0
- package/resources/targets/trae/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
- package/resources/targets/trae/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
- package/resources/targets/trae/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
- package/resources/targets/trae/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
- package/resources/targets/trae/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
- package/resources/targets/trae/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/trae/js3d/js3d/project/README.md +7 -0
- package/resources/targets/trae/js3d/js3d/project/configs/game.controls.json +3 -0
- package/resources/targets/trae/js3d/js3d/project/configs/game.json +3 -0
- package/resources/targets/trae/js3d/js3d/project/game-runtime.json +7 -0
- package/resources/targets/trae/js3d/js3d/project/game.config.json +7 -0
- package/resources/targets/trae/js3d/js3d/project/index.html +12 -0
- package/resources/targets/trae/js3d/js3d/project/package.json +23 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
- package/resources/targets/trae/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
- package/resources/targets/trae/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
- package/resources/targets/trae/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/trae/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
- package/resources/targets/trae/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
- package/resources/targets/trae/js3d/js3d/project/scripts/config-export.mjs +15 -0
- package/resources/targets/trae/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/trae/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/trae/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/trae/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/trae/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/trae/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/trae/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/trae/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/trae/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/trae/js3d/js3d/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/trae/js3d/js3d/project/src/display/viewport.ts +239 -0
- package/resources/targets/trae/js3d/js3d/project/src/main.ts +85 -0
- package/resources/targets/trae/js3d/js3d/project/src/platform.ts +2 -0
- package/resources/targets/trae/js3d/js3d/project/src/style.css +83 -0
- package/resources/targets/trae/js3d/js3d/project/tsconfig.json +20 -0
- package/resources/targets/trae/js3d/js3d/project/unified_data_control_config.json +20 -0
- package/resources/targets/trae/js3d/js3d/project/vite.config.ts +5 -0
- package/resources/targets/trae/js3d/recovery.md +17 -0
- package/resources/targets/trae/js3d/target.json +60 -0
- package/resources/targets/workbuddy/js/context-filter-report.json +1 -1
- package/resources/targets/workbuddy/js3d/context-filter-report.json +1 -1
- package/resources/targets/workbuddy/js3d/js3d/bundle.json +5 -5
- package/resources/targets/workbuddy/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
- package/resources/targets/workbuddy/js3d/target.json +1 -1
- package/resources/targets/zcode/js/context-filter-report.json +1 -1
- package/resources/targets/zcode/js3d/context-filter-report.json +1 -1
- package/resources/targets/zcode/js3d/js3d/bundle.json +5 -5
- package/resources/targets/zcode/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
- package/resources/targets/zcode/js3d/target.json +1 -1
- package/vendor/craft-runtime/SOURCE.json +1 -1
|
@@ -3,7 +3,7 @@ import os from 'node:os';
|
|
|
3
3
|
import { readFile, mkdir } from 'node:fs/promises';
|
|
4
4
|
import lockfile from 'proper-lockfile';
|
|
5
5
|
import { getAppDataRoot } from '../core/app-paths.mjs';
|
|
6
|
-
import { hostPaths,
|
|
6
|
+
import { hostPaths, hostCommandOptions, installTargets } from './hosts.mjs';
|
|
7
7
|
import { craftConfig, craftRegistrations, mergeConfig, importZcodeFallback } from './config.mjs';
|
|
8
8
|
import { assertDshSharedScope } from './dsh-config.mjs';
|
|
9
9
|
import { optionalFile, assertPlainPath, commitFiles } from './files.mjs';
|
|
@@ -12,6 +12,9 @@ import { installationPath, readInstallation, readInstallationSnapshot, updateSou
|
|
|
12
12
|
import { requireForwardVersion } from './version-policy.mjs';
|
|
13
13
|
import { connectionHandoff } from './connection-handoff.mjs';
|
|
14
14
|
import { planLauncher, verifyLauncher } from './fixed-launcher.mjs';
|
|
15
|
+
import { prepareRuntimeCandidate, refreshRuntimeCandidate, publishRuntimeCandidate, disposeRuntimeCandidate } from './runtime-candidate.mjs';
|
|
16
|
+
import { sameInstallation, installationChanged } from './installation-transaction.mjs';
|
|
17
|
+
import { assertHostConfigScope } from './host-config-scope.mjs';
|
|
15
18
|
|
|
16
19
|
const bootstrapMarker = '<!-- craft-mcp:bootstrap:v1 -->';
|
|
17
20
|
function legacyNpmSource(connection, packageName) {
|
|
@@ -36,13 +39,26 @@ function hostConnectionOptions(host) {
|
|
|
36
39
|
if (host === 'zcode') return { type: 'stdio', timeoutMs: 120000 };
|
|
37
40
|
if (host === 'kimi') return { enabled: true, startupTimeoutMs: 120000 };
|
|
38
41
|
if (host === 'dsh') return {};
|
|
42
|
+
if (host === 'trae') return {command:'node'};
|
|
43
|
+
if (['qoder-cn','qoder','comate','opencode'].includes(host)) return {};
|
|
44
|
+
if (host === 'qwen') return { timeout: 120000 };
|
|
39
45
|
return { type: 'stdio', timeout: 120000 };
|
|
40
46
|
}
|
|
41
47
|
|
|
48
|
+
function hostRuntimeEnvironment(host, existing = {}) {
|
|
49
|
+
// TRAE documents a single executable name without spaces. Pin its lookup to
|
|
50
|
+
// the Node used for installation; the launcher path remains an args element.
|
|
51
|
+
if(host !== 'trae') return {};
|
|
52
|
+
const directory=path.dirname(process.execPath), same=(value)=>process.platform==='win32'?value.toLowerCase()===directory.toLowerCase():value===directory;
|
|
53
|
+
const rest=(existing.PATH ?? existing.Path ?? process.env.PATH ?? process.env.Path ?? '').split(path.delimiter).filter(value=>value&&!same(value));
|
|
54
|
+
return {PATH:[directory,...rest].join(path.delimiter)};
|
|
55
|
+
}
|
|
56
|
+
|
|
42
57
|
export async function installHosts({ ide, workspace, platform, packageRoot, home = os.homedir(), codexHome, hostOptions = {},
|
|
43
58
|
runtimeRoot = path.join(getAppDataRoot(), 'runtimes'), stateRoot = path.join(path.dirname(runtimeRoot), 'installations'),
|
|
44
|
-
registry, channel, updates, materialize = stageRuntime, probe = probeRuntime }) {
|
|
59
|
+
registry, channel, updates, onlyIfMissing = false, materialize = stageRuntime, probe = probeRuntime }) {
|
|
45
60
|
const targets = installTargets(ide);
|
|
61
|
+
if (hostOptions.configPath && targets.length !== 1) throw new Error('--host-config requires exactly one --ide');
|
|
46
62
|
if (workspace !== undefined && !path.isAbsolute(workspace)) throw new Error('--workspace must be absolute');
|
|
47
63
|
if (platform !== undefined) platform = platformOrigin(platform);
|
|
48
64
|
if (updates !== undefined && !['auto', 'off'].includes(updates)) throw new Error('--updates must be auto or off');
|
|
@@ -53,22 +69,13 @@ export async function installHosts({ ide, workspace, platform, packageRoot, home
|
|
|
53
69
|
if (desiredUpdateSkill !== null && !desiredUpdateSkill.includes('<!-- craft-mcp:update:v1 -->')) throw new Error('Craft update Skill has an invalid distribution marker');
|
|
54
70
|
await mkdir(runtimeRoot, { recursive: true });
|
|
55
71
|
const targetPaths = new Map(targets.map(host => [host, hostPaths(home, host, codexHome, hostOptions)]));
|
|
56
|
-
|
|
57
|
-
let release;
|
|
58
|
-
try {
|
|
59
|
-
// Same lock order as automatic updates: installation first, runtime root
|
|
60
|
-
// second. Keep info/check receipts from invalidating the install snapshot
|
|
61
|
-
// during materialization and probe, without waiting on a lock in reverse order.
|
|
62
|
-
for (const file of lockPaths) {
|
|
63
|
-
await assertPlainPath(file); await mkdir(path.dirname(file), { recursive: true });
|
|
64
|
-
stateLocks.push(await lockfile.lock(file, { realpath: false, stale: 120000, retries: { retries: 120, minTimeout: 100, maxTimeout: 500 } }));
|
|
65
|
-
}
|
|
66
|
-
release = await lockfile.lock(runtimeRoot, { stale: 120000, retries: 0 });
|
|
72
|
+
async function readPlans() {
|
|
67
73
|
const plans = [];
|
|
68
74
|
for (const host of targets) {
|
|
69
75
|
const paths = targetPaths.get(host);
|
|
70
76
|
await assertPlainPath(paths.config); await assertPlainPath(paths.skill); await assertPlainPath(paths.updateSkill);
|
|
71
77
|
assertDshSharedScope(paths);
|
|
78
|
+
await assertHostConfigScope(paths.config,host,paths.configPeers);
|
|
72
79
|
const original = await optionalFile(paths.config), existingSkill = await optionalFile(paths.skill);
|
|
73
80
|
let configInput = original ?? '', fallbackSnapshot;
|
|
74
81
|
if (paths.fallbackConfig) {
|
|
@@ -81,6 +88,7 @@ export async function installHosts({ ide, workspace, platform, packageRoot, home
|
|
|
81
88
|
if (existingSkill && !existingSkill.includes(bootstrapMarker)) throw new Error('User-owned craft-create Skill preserved; rename it before installing: ' + paths.skill);
|
|
82
89
|
if (desiredUpdateSkill && existingUpdateSkill && !existingUpdateSkill.includes('<!-- craft-mcp:update:v1 -->')) throw new Error('User-owned craft-update Skill preserved; rename it before installing: ' + paths.updateSkill);
|
|
83
90
|
const registrations = craftRegistrations(configInput, host);
|
|
91
|
+
if (onlyIfMissing && registrations.length) throw new Error(host + ': Craft was configured while project setup was running; preserve the registration and inspect it again');
|
|
84
92
|
if (registrations.length > 1) throw new Error(host + ': Multiple Craft registrations found; preserve separate environments and select one installation before updating');
|
|
85
93
|
const previousName = registrations[0]?.name ?? 'craft', old = registrations[0]?.connection;
|
|
86
94
|
const legacySource = legacyNpmSource(old, pkg.name);
|
|
@@ -105,62 +113,126 @@ export async function installHosts({ ide, workspace, platform, packageRoot, home
|
|
|
105
113
|
const origin = platformOrigin(platform ?? old?.env?.CRAFT_WEB_URL ?? pkg.craft?.platform);
|
|
106
114
|
plans.push({ host, paths, original, configInput, fallbackSnapshot, existingSkill, existingUpdateSkill, previousName, previousRuntime, previousState, legacySource, statePath, stateBefore, workspace: path.resolve(games), platform: origin });
|
|
107
115
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
const migration = plan.previousState?.migration ?? (plan.legacySource ? { from_server: plan.previousName, ...plan.legacySource } : undefined);
|
|
114
|
-
const launcherPlan = await planLauncher(plan.statePath.file, plan.previousState?.launcher, identity.package_root);
|
|
115
|
-
const state = { schema: 2, activation_mode: activationMode, id: plan.statePath.id, host: plan.host, server_id: 'craft', config: plan.paths.config,
|
|
116
|
-
launcher: launcherPlan.launcher,
|
|
117
|
-
workspace: plan.workspace, platform: plan.platform, runtime_root: runtimeRoot, source,
|
|
118
|
-
...(migration ? { migration } : {}),
|
|
119
|
-
skills: { 'craft-create': plan.paths.skill, ...(desiredUpdateSkill ? { 'craft-update': plan.paths.updateSkill } : {}) },
|
|
120
|
-
policy: { mode: updates ?? plan.previousState?.policy.mode ?? 'auto', offline: 'allow-existing' }, anchor: identity, target: identity, skills_runtime: skillRuntimeIdentity(identity) };
|
|
121
|
-
if (plan.previousState?.connection_verification && sameRuntimeIdentity(identity, plan.previousState.target) && plan.workspace === plan.previousState.workspace && plan.platform === plan.previousState.platform) state.connection_verification = plan.previousState.connection_verification;
|
|
122
|
-
// Reinstalling the same build must not reset check receipts or touch files.
|
|
123
|
-
const priorComparable = plan.previousState && { ...plan.previousState };
|
|
124
|
-
if (priorComparable) { delete priorComparable.updated_at; delete priorComparable.last_check; }
|
|
125
|
-
const same = priorComparable && JSON.stringify(priorComparable) === JSON.stringify(state);
|
|
126
|
-
const desiredState = same ? plan.previousState : { ...state, updated_at: new Date().toISOString() };
|
|
127
|
-
const connection = { command: process.execPath, args: [launcherPlan.launcher.entry, '--workspace', plan.workspace],
|
|
128
|
-
env: { CRAFT_CLIENT_IDE: plan.host, CRAFT_WEB_URL: plan.platform, CLIENT_WORKSPACE_ROOT: plan.workspace, CRAFT_INSTALLATION_FILE: plan.statePath.file, CRAFT_RUNTIME_REVISION: identity.build_id },
|
|
129
|
-
...hostConnectionOptions(plan.host) };
|
|
130
|
-
const configured = craftConfig(plan.configInput, plan.host, plan.previousName);
|
|
131
|
-
// Some hosts omit an enabled flag when saving their configuration. Do not
|
|
132
|
-
// reinsert defaults into an already enabled registration.
|
|
133
|
-
const alreadyEnabled = configured && configured.disabled !== true && configured.enabled !== false && configured.enable !== false;
|
|
134
|
-
const updated = mergeConfig(plan.configInput, plan.host, connection, { previousName: plan.previousName, enable: !alreadyEnabled });
|
|
135
|
-
const verified = await probe({ ...craftConfig(updated, plan.host), args: [runtime.entry, '--workspace', plan.workspace] }, { version: runtime.version, build_id: identity.build_id, host: plan.host, workspace: plan.workspace, platform: plan.platform });
|
|
136
|
-
if (verified.runtime?.activation_mode !== activationMode) throw new Error('Craft runtime requires a legacy frontend; install a next_mcp_start distribution');
|
|
137
|
-
changes.push({ file: plan.paths.skill, before: plan.existingSkill, after: desiredSkill });
|
|
138
|
-
if (desiredUpdateSkill) changes.push({ file: plan.paths.updateSkill, before: plan.existingUpdateSkill, after: desiredUpdateSkill });
|
|
139
|
-
// A host may react as soon as its config changes. Make the state and
|
|
140
|
-
// managed entrypoints available before exposing the new launch command.
|
|
141
|
-
changes.push(launcherPlan.change, { file: plan.statePath.file, before: plan.stateBefore, after: same ? plan.stateBefore : JSON.stringify(desiredState, null, 2) + '\n' },
|
|
142
|
-
{ file: plan.paths.config, before: plan.original, after: updated });
|
|
143
|
-
results.push({ host: plan.host, ...plan.paths, installation: plan.statePath.file, launcher: state.launcher, source, policy: state.policy, ...(migration ? { migration } : {}), ...(plan.previousName !== 'craft' ? { migrated_from: plan.previousName } : {}), ...(plan.fallbackSnapshot ? { imported_from: plan.fallbackSnapshot.file } : {}), verified,
|
|
144
|
-
activation_mode: activationMode, reconnect_required: true, activation: { status: 'pending_connection_verification', expected: identity },
|
|
145
|
-
connection_handoff: connectionHandoff({host:plan.host,target:identity,workspace:plan.workspace,platform:plan.platform,intent:'install'}) });
|
|
146
|
-
}
|
|
116
|
+
return plans;
|
|
117
|
+
}
|
|
118
|
+
// Re-read everything that can affect a host before a short commit. Receipt
|
|
119
|
+
// changes are independent and are retained instead of invalidating a plan.
|
|
120
|
+
async function verifyPlans(plans) {
|
|
147
121
|
for (const plan of plans) {
|
|
148
|
-
|
|
122
|
+
for (const [file, expected] of [[plan.paths.config, plan.original], [plan.paths.skill, plan.existingSkill], [plan.paths.updateSkill, plan.existingUpdateSkill]]) {
|
|
123
|
+
await assertPlainPath(file);
|
|
124
|
+
if (await optionalFile(file) !== expected) throw installationChanged('Craft host files changed while the candidate was prepared');
|
|
125
|
+
}
|
|
149
126
|
assertDshSharedScope(plan.paths);
|
|
127
|
+
await assertHostConfigScope(plan.paths.config,plan.host,plan.paths.configPeers);
|
|
150
128
|
if (plan.fallbackSnapshot && await optionalFile(plan.fallbackSnapshot.file) !== plan.fallbackSnapshot.text) throw new Error('ZCode fallback MCP configuration changed during installation; retry without changing the fallback');
|
|
129
|
+
const text = await optionalFile(plan.statePath.file);
|
|
130
|
+
if (text !== plan.stateBefore) {
|
|
131
|
+
const latest = text === null ? null : await readInstallation(plan.statePath.file);
|
|
132
|
+
if (!latest || !plan.previousState || !sameInstallation(latest, plan.previousState)) throw installationChanged();
|
|
133
|
+
plan.previousState = latest;
|
|
134
|
+
plan.stateBefore = text;
|
|
135
|
+
}
|
|
136
|
+
// A migrated installation can still point at a distinct historical file.
|
|
137
|
+
const oldFile = craftConfig(plan.configInput, plan.host, plan.previousName)?.env?.CRAFT_INSTALLATION_FILE;
|
|
138
|
+
if (oldFile && path.resolve(oldFile) !== path.resolve(plan.statePath.file)) {
|
|
139
|
+
const latest = await readInstallation(oldFile);
|
|
140
|
+
if (!sameInstallation(latest, plan.previousState)) throw installationChanged();
|
|
141
|
+
plan.previousState = latest;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
const initialPlans = await readPlans();
|
|
146
|
+
const candidate = await prepareRuntimeCandidate(runtimeRoot, staging => materialize(packageRoot, staging));
|
|
147
|
+
const verifiedCache = new Map();
|
|
148
|
+
try {
|
|
149
|
+
for (let attempt = 0; attempt < 4; attempt++) {
|
|
150
|
+
let plans, stateLocks = [], release;
|
|
151
|
+
try {
|
|
152
|
+
plans = attempt === 0 ? initialPlans : await readPlans();
|
|
153
|
+
const verifiedByHost = new Map();
|
|
154
|
+
for (const plan of plans) {
|
|
155
|
+
requireForwardVersion(candidate.identity, plan.previousRuntime);
|
|
156
|
+
const old = craftConfig(plan.configInput, plan.host, plan.previousName);
|
|
157
|
+
const connection = { ...old, command: process.execPath, args: [candidate.identity.entry, '--workspace', plan.workspace],
|
|
158
|
+
env: { ...old?.env, ...hostRuntimeEnvironment(plan.host,old?.env), CRAFT_CLIENT_IDE: plan.host, CRAFT_WEB_URL: plan.platform, CLIENT_WORKSPACE_ROOT: plan.workspace,
|
|
159
|
+
CRAFT_INSTALLATION_FILE: plan.statePath.file, CRAFT_RUNTIME_REVISION: candidate.identity.build_id }, ...hostConnectionOptions(plan.host) };
|
|
160
|
+
const expected = { version: candidate.identity.version, build_id: candidate.identity.build_id, host: plan.host, workspace: plan.workspace, platform: plan.platform };
|
|
161
|
+
const key = JSON.stringify({ connection, expected });
|
|
162
|
+
const verified = verifiedCache.get(key) ?? await probe(connection, expected);
|
|
163
|
+
if (verified.runtime?.activation_mode !== activationMode) throw new Error('Craft runtime requires a legacy frontend; install a next_mcp_start distribution');
|
|
164
|
+
verifiedCache.set(key, verified);
|
|
165
|
+
verifiedByHost.set(plan.host, verified);
|
|
166
|
+
}
|
|
167
|
+
if (!sameRuntimeIdentity(await getRuntimeIdentity(candidate.identity.package_root), candidate.identity)) throw new Error('Craft candidate changed during verification; installation refused');
|
|
168
|
+
await refreshRuntimeCandidate(candidate);
|
|
169
|
+
const lockPaths = [...new Set(plans.flatMap(plan => [plan.statePath.file, craftConfig(plan.configInput, plan.host, plan.previousName)?.env?.CRAFT_INSTALLATION_FILE].filter(Boolean)).map(file => path.resolve(file)))].sort();
|
|
170
|
+
for (const file of lockPaths) {
|
|
171
|
+
await assertPlainPath(file); await mkdir(path.dirname(file), { recursive: true });
|
|
172
|
+
stateLocks.push(await lockfile.lock(file, { realpath: false, stale: 120000, retries: 0 }));
|
|
173
|
+
}
|
|
174
|
+
// Never hold installation-state locks while waiting on launcher or GC.
|
|
175
|
+
release = await lockfile.lock(runtimeRoot, { stale: 120000, retries: 0 });
|
|
176
|
+
await verifyPlans(plans);
|
|
177
|
+
const runtime = await publishRuntimeCandidate(candidate);
|
|
178
|
+
const identity = { package: runtime.package, version: runtime.version, build_id: runtime.build_id, package_root: runtime.package_root, entry: runtime.entry };
|
|
179
|
+
const changes = [], results = [];
|
|
180
|
+
for (const plan of plans) {
|
|
181
|
+
requireForwardVersion(identity, plan.previousRuntime);
|
|
182
|
+
const source = updateSource(pkg, { registry: registry ?? (!plan.previousState ? plan.legacySource?.registry : undefined), channel: channel ?? (!plan.previousState ? plan.legacySource?.channel : undefined) }, plan.previousState?.source);
|
|
183
|
+
const migration = plan.previousState?.migration ?? (plan.legacySource ? { from_server: plan.previousName, ...plan.legacySource } : undefined);
|
|
184
|
+
const launcherPlan = await planLauncher(plan.statePath.file, plan.previousState?.launcher, identity.package_root);
|
|
185
|
+
const state = { schema: 2, activation_mode: activationMode, id: plan.statePath.id, host: plan.host, server_id: 'craft', config: plan.paths.config,
|
|
186
|
+
launcher: launcherPlan.launcher,
|
|
187
|
+
workspace: plan.workspace, platform: plan.platform, runtime_root: runtimeRoot, source,
|
|
188
|
+
...(plan.paths.configPeers?{config_peers:plan.paths.configPeers}:{}),
|
|
189
|
+
...(migration ? { migration } : {}),
|
|
190
|
+
skills: { 'craft-create': plan.paths.skill, ...(desiredUpdateSkill ? { 'craft-update': plan.paths.updateSkill } : {}) },
|
|
191
|
+
policy: { mode: updates ?? plan.previousState?.policy.mode ?? 'auto', offline: 'allow-existing' }, anchor: identity, target: identity, skills_runtime: skillRuntimeIdentity(identity) };
|
|
192
|
+
if (plan.previousState?.connection_verification && sameRuntimeIdentity(identity, plan.previousState.target) && plan.workspace === plan.previousState.workspace && plan.platform === plan.previousState.platform) state.connection_verification = plan.previousState.connection_verification;
|
|
193
|
+
// Reinstalling the same build must not reset check receipts or touch files.
|
|
194
|
+
const priorComparable = plan.previousState && { ...plan.previousState };
|
|
195
|
+
if (priorComparable) { delete priorComparable.updated_at; delete priorComparable.last_check; }
|
|
196
|
+
const same = priorComparable && JSON.stringify(priorComparable) === JSON.stringify(state);
|
|
197
|
+
const desiredState = same ? plan.previousState : { ...state, updated_at: new Date().toISOString() };
|
|
198
|
+
const connection = { command: process.execPath, args: [launcherPlan.launcher.entry, '--workspace', plan.workspace],
|
|
199
|
+
env: { ...hostRuntimeEnvironment(plan.host,craftConfig(plan.configInput,plan.host,plan.previousName)?.env), CRAFT_CLIENT_IDE: plan.host, CRAFT_WEB_URL: plan.platform, CLIENT_WORKSPACE_ROOT: plan.workspace, CRAFT_INSTALLATION_FILE: plan.statePath.file, CRAFT_RUNTIME_REVISION: identity.build_id },
|
|
200
|
+
...hostConnectionOptions(plan.host) };
|
|
201
|
+
const configured = craftConfig(plan.configInput, plan.host, plan.previousName);
|
|
202
|
+
// Some hosts omit an enabled flag when saving their configuration. Do not
|
|
203
|
+
// reinsert defaults into an already enabled registration.
|
|
204
|
+
const alreadyEnabled = configured && configured.disabled !== true && configured.enabled !== false && configured.enable !== false;
|
|
205
|
+
const updated = mergeConfig(plan.configInput, plan.host, connection, { previousName: plan.previousName, enable: !alreadyEnabled });
|
|
206
|
+
const verified = verifiedByHost.get(plan.host);
|
|
207
|
+
changes.push({ file: plan.paths.skill, before: plan.existingSkill, after: desiredSkill });
|
|
208
|
+
if (desiredUpdateSkill) changes.push({ file: plan.paths.updateSkill, before: plan.existingUpdateSkill, after: desiredUpdateSkill });
|
|
209
|
+
// A host may react as soon as its config changes. Make the state and
|
|
210
|
+
// managed entrypoints available before exposing the new launch command.
|
|
211
|
+
changes.push(launcherPlan.change, { file: plan.statePath.file, before: plan.stateBefore, after: same ? plan.stateBefore : JSON.stringify(desiredState, null, 2) + '\n' },
|
|
212
|
+
{ file: plan.paths.config, before: plan.original, after: updated });
|
|
213
|
+
results.push({ host: plan.host, ...plan.paths, installation: plan.statePath.file, launcher: state.launcher, source, policy: state.policy, ...(migration ? { migration } : {}), ...(plan.previousName !== 'craft' ? { migrated_from: plan.previousName } : {}), ...(plan.fallbackSnapshot ? { imported_from: plan.fallbackSnapshot.file } : {}), verified,
|
|
214
|
+
activation_mode: activationMode, reconnect_required: true, activation: { status: 'pending_connection_verification', expected: identity },
|
|
215
|
+
connection_handoff: connectionHandoff({host:plan.host,target:identity,workspace:plan.workspace,platform:plan.platform,intent:'install'}) });
|
|
216
|
+
}
|
|
217
|
+
const written = await commitFiles(changes);
|
|
218
|
+
return { runtime, hosts: results, ...written,
|
|
219
|
+
next: 'The installed package loads at the next MCP start or user-requested reconnect. Verify the actual runtime version/build_id, then prepare the current project to update its context and Skills. Standalone probes do not confirm host activation.' };
|
|
220
|
+
} catch (error) {
|
|
221
|
+
if (!['ELOCKED', 'INSTALLATION_CHANGED'].includes(error.code) || attempt === 3) throw error;
|
|
222
|
+
} finally {
|
|
223
|
+
try { await release?.(); } finally { for (const unlock of stateLocks.reverse()) await unlock(); }
|
|
224
|
+
}
|
|
225
|
+
await new Promise(resolve => setTimeout(resolve, 100 * (attempt + 1)));
|
|
151
226
|
}
|
|
152
|
-
|
|
153
|
-
return { runtime, hosts: results, ...written,
|
|
154
|
-
next: 'The installed package loads at the next MCP start or user-requested reconnect. Verify the actual runtime version/build_id, then prepare the current project to update its context and Skills. Standalone probes do not confirm host activation.' };
|
|
155
|
-
} finally { try { await release?.(); } finally { for (const unlock of stateLocks.reverse()) await unlock(); } }
|
|
227
|
+
} finally { await disposeRuntimeCandidate(candidate); }
|
|
156
228
|
}
|
|
157
229
|
|
|
158
|
-
async function verifyInstalledSkills(installation, paths, connection) {
|
|
230
|
+
async function verifyInstalledSkills(installation, paths, connection, snapshot) {
|
|
159
231
|
const entries = installation?.skills ? installedSkillEntries(installation) : [{ name: 'craft-create', file: paths.skill, marker: bootstrapMarker }];
|
|
160
232
|
const contents = new Map();
|
|
161
233
|
for (const { name, file, marker } of entries) {
|
|
162
234
|
await assertPlainPath(file);
|
|
163
|
-
const content = await optionalFile(file);
|
|
235
|
+
const content = snapshot ? snapshot.get(file) : await optionalFile(file);
|
|
164
236
|
if (!content?.includes(marker)) throw new Error('Craft ' + name + ' Skill missing or not managed by installer: ' + file);
|
|
165
237
|
contents.set(name, content);
|
|
166
238
|
}
|
|
@@ -184,25 +256,67 @@ async function verifyInstalledSkills(installation, paths, connection) {
|
|
|
184
256
|
export async function doctorHosts({ ide, home = os.homedir(), codexHome, hostOptions = {}, probe = probeRuntime }) {
|
|
185
257
|
const results = [];
|
|
186
258
|
for (const host of installTargets(ide)) {
|
|
187
|
-
|
|
188
|
-
await assertPlainPath(paths.config);
|
|
189
|
-
assertDshSharedScope(paths);
|
|
190
|
-
const connection = craftConfig(await optionalFile(paths.config) ?? '', host);
|
|
191
|
-
if (!connection?.command || connection.env?.CRAFT_CLIENT_IDE !== host) throw new Error(host + ': Craft installation missing or host marker incorrect; run install --ide ' + host);
|
|
192
|
-
if (connection.disabled === true || connection.enabled === false || connection.enable === false) throw new Error(host + ': Craft MCP is disabled');
|
|
193
|
-
let installation = null, skillsVerification;
|
|
194
|
-
if (connection.env.CRAFT_INSTALLATION_FILE) {
|
|
195
|
-
const unlock = await lockfile.lock(connection.env.CRAFT_INSTALLATION_FILE, { stale: 120000, retries: { retries: 30, minTimeout: 100, maxTimeout: 500 } });
|
|
259
|
+
for (let attempt = 0; attempt < 4; attempt++) {
|
|
196
260
|
try {
|
|
197
|
-
|
|
198
|
-
await
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
261
|
+
const paths = hostPaths(home, host, codexHome, hostOptions);
|
|
262
|
+
await assertHostConfigScope(paths.config,host,paths.configPeers);
|
|
263
|
+
await assertPlainPath(paths.config);
|
|
264
|
+
assertDshSharedScope(paths);
|
|
265
|
+
const configText = await optionalFile(paths.config) ?? '';
|
|
266
|
+
const connection = craftConfig(configText, host);
|
|
267
|
+
if (!connection?.command || connection.env?.CRAFT_CLIENT_IDE !== host) throw new Error(host + ': Craft installation missing or host marker incorrect; run install --ide ' + host);
|
|
268
|
+
if (connection.disabled === true || connection.enabled === false || connection.enable === false) throw new Error(host + ': Craft MCP is disabled');
|
|
269
|
+
let installation = null, skillsVerification, verificationError;
|
|
270
|
+
const file = connection.env.CRAFT_INSTALLATION_FILE, skillSnapshots = new Map();
|
|
271
|
+
if (file) {
|
|
272
|
+
const unlock = await lockfile.lock(file, { stale: 120000, retries: 0 });
|
|
273
|
+
try {
|
|
274
|
+
if (await optionalFile(paths.config) !== configText) throw installationChanged();
|
|
275
|
+
installation = await readInstallation(file);
|
|
276
|
+
const entries = installation.skills ? installedSkillEntries(installation) : [{ file: paths.skill }];
|
|
277
|
+
for (const entry of entries) {
|
|
278
|
+
await assertPlainPath(entry.file);
|
|
279
|
+
skillSnapshots.set(entry.file, await optionalFile(entry.file));
|
|
280
|
+
}
|
|
281
|
+
await verifyLauncher(installation, file, connection);
|
|
282
|
+
} finally { await unlock(); }
|
|
283
|
+
}
|
|
284
|
+
// Hash immutable package content outside the state lock. Use captured
|
|
285
|
+
// Skill bytes, then distinguish a changed snapshot from real corruption.
|
|
286
|
+
try { skillsVerification = await verifyInstalledSkills(installation, paths, connection, file ? skillSnapshots : undefined); }
|
|
287
|
+
catch (error) { verificationError = error; }
|
|
288
|
+
async function stableSnapshot() {
|
|
289
|
+
if (!file) {
|
|
290
|
+
if (await optionalFile(paths.config) !== configText) throw installationChanged();
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
const unlock = await lockfile.lock(file, { stale: 120000, retries: 0 });
|
|
294
|
+
try {
|
|
295
|
+
const latest = await readInstallation(file);
|
|
296
|
+
if (!sameInstallation(latest, installation) || await optionalFile(paths.config) !== configText) throw installationChanged();
|
|
297
|
+
for (const [skill, text] of skillSnapshots) if (await optionalFile(skill) !== text) throw installationChanged('Craft Skills changed during diagnosis');
|
|
298
|
+
await verifyLauncher(latest, file, connection);
|
|
299
|
+
installation = latest;
|
|
300
|
+
} finally { await unlock(); }
|
|
301
|
+
}
|
|
302
|
+
await stableSnapshot();
|
|
303
|
+
if (verificationError) throw verificationError;
|
|
304
|
+
const skillsPending = Boolean(installation && skillsVerification.runtime?.build_id !== installation.target.build_id);
|
|
305
|
+
const checkConnection = installation && !installation.launcher ? { ...connection, args: [installation.target.entry, '--workspace', installation.workspace] } : connection;
|
|
306
|
+
let verified, probeError;
|
|
307
|
+
try { verified = await probe(checkConnection, { host, ...(installation ? { version: installation.target.version, build_id: installation.target.build_id, workspace: installation.workspace, platform: installation.platform } : {}) }); }
|
|
308
|
+
catch (error) { probeError = error; }
|
|
309
|
+
// The launcher may observe a newer target while a diagnostic probe is
|
|
310
|
+
// starting. Re-read all scope/config fields on the next bounded attempt.
|
|
311
|
+
await stableSnapshot();
|
|
312
|
+
if (probeError) throw probeError;
|
|
313
|
+
results.push({ host, ...paths, entry: connection.args[0], target: installation?.target, skills_pending_activation: skillsPending, skills_verification: skillsVerification, verified });
|
|
314
|
+
break;
|
|
315
|
+
} catch (error) {
|
|
316
|
+
if (!['ELOCKED', 'INSTALLATION_CHANGED'].includes(error.code) || attempt === 3) throw error;
|
|
317
|
+
}
|
|
318
|
+
await new Promise(resolve => setTimeout(resolve, 100 * (attempt + 1)));
|
|
319
|
+
}
|
|
206
320
|
}
|
|
207
321
|
return { hosts: results, note: results.some(item => item.skills_verification.status !== 'verified')
|
|
208
322
|
? 'Candidate MCP protocol verified; legacy global Skill identity remains unverified. Complete activation on the actual connection, then run doctor again. Host trust and Skill discovery require host verification.'
|
|
@@ -213,11 +327,11 @@ export async function runIntegrationCommand(args, packageRoot) {
|
|
|
213
327
|
const [command, ...rest] = args, options = {};
|
|
214
328
|
for (let i = 0; i < rest.length; i += 2) {
|
|
215
329
|
const name = rest[i].replace(/^--/, '');
|
|
216
|
-
if (!rest[i].startsWith('--') || !['ide', ...(command === 'install' ? ['workspace', 'platform', 'registry', 'channel', 'updates'] : [])].includes(name) || !rest[i + 1] || Object.hasOwn(options, name)) throw new Error('Invalid or repeated option. Use craft-mcp --help.');
|
|
330
|
+
if (!rest[i].startsWith('--') || !['ide', 'host-config', 'trae-region', ...(command === 'install' ? ['workspace', 'platform', 'registry', 'channel', 'updates'] : [])].includes(name) || !rest[i + 1] || Object.hasOwn(options, name)) throw new Error('Invalid or repeated option. Use craft-mcp --help.');
|
|
217
331
|
options[name] = rest[i + 1];
|
|
218
332
|
}
|
|
219
333
|
options.codexHome = process.env.CODEX_HOME;
|
|
220
|
-
options.hostOptions =
|
|
334
|
+
options.hostOptions = hostCommandOptions(options);
|
|
221
335
|
const result = command === 'install' ? await installHosts({ ...options, packageRoot }) : await doctorHosts(options);
|
|
222
336
|
process.stdout.write(JSON.stringify(result, null, 2) + '\n');
|
|
223
337
|
}
|
|
@@ -58,6 +58,7 @@ export async function readInstallationSnapshot(file) {
|
|
|
58
58
|
const state = JSON.parse(text);
|
|
59
59
|
if (![1, 2].includes(state.schema) || (state.schema === 2 && state.activation_mode !== activationMode) || !state.id || !Object.hasOwn(hosts, state.host) || !path.isAbsolute(state.config ?? '') || !path.isAbsolute(state.workspace ?? '') || !state.server_id || !['auto', 'off'].includes(state.policy?.mode)) throw new Error('Invalid Craft installation state');
|
|
60
60
|
validateIdentity(state.anchor); validateIdentity(state.target);
|
|
61
|
+
if(state.config_peers!==undefined && (!Array.isArray(state.config_peers)||state.config_peers.some(file=>typeof file!=='string'||!path.isAbsolute(file)))) throw new Error('Invalid additional host configuration paths');
|
|
61
62
|
if (state.source?.package !== state.anchor.package || state.target.package !== state.anchor.package) throw new Error('Craft installation package identity mismatch');
|
|
62
63
|
installedSkillEntries(state);
|
|
63
64
|
if (state.skills_runtime !== undefined) {
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { isDeepStrictEqual } from 'node:util';
|
|
2
|
+
import { readInstallationSnapshot } from './installation-state.mjs';
|
|
3
|
+
|
|
4
|
+
// Connection and registry receipts may advance independently of an installation.
|
|
5
|
+
// Every field affecting scope, policy, files or target remains in this comparison.
|
|
6
|
+
export function sameInstallation(left, right) {
|
|
7
|
+
const identity = ({ connection_verification, last_check, ...state }) => state;
|
|
8
|
+
return isDeepStrictEqual(identity(left), identity(right));
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function installationChanged(message = 'Craft installation changed during verification; retry using its current state') {
|
|
12
|
+
return Object.assign(new Error(message), { code: 'INSTALLATION_CHANGED' });
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export async function unchangedInstallation(file, expected) {
|
|
16
|
+
const snapshot = await readInstallationSnapshot(file);
|
|
17
|
+
if (!sameInstallation(snapshot.state, expected)) throw installationChanged();
|
|
18
|
+
return snapshot;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function installationBusy(error, current) {
|
|
22
|
+
return { status: 'installation_busy', code: error.code === 'INSTALLATION_CHANGED' ? 'installation_changed' : 'installation_locked',
|
|
23
|
+
message: error.message, ...(error.file ? { lock_path: error.file + '.lock' } : {}),
|
|
24
|
+
current, retryable: true, retry_after_ms: 1000, can_continue: false, reconnect_required: false,
|
|
25
|
+
activation_required: false, explicitly_not_started: true,
|
|
26
|
+
next: 'Another installation operation is finishing. Retry the same request shortly; reconnecting or deleting lock files is not required.' };
|
|
27
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { applyEdits, findNodeAtLocation, modify, parseTree, printParseErrorCode } from 'jsonc-parser';
|
|
2
|
+
import { isDeepStrictEqual } from 'node:util';
|
|
3
|
+
|
|
4
|
+
// Preserve source formatting and comments outside the values we actually own.
|
|
5
|
+
// Duplicate keys are rejected: choosing one could update an inactive registration.
|
|
6
|
+
function valueOf(node) {
|
|
7
|
+
if (node.type === 'object') {
|
|
8
|
+
const result = {};
|
|
9
|
+
for (const property of node.children ?? []) {
|
|
10
|
+
const [key, value] = property.children;
|
|
11
|
+
if (Object.hasOwn(result, key.value)) throw new Error('Duplicate JSON configuration key: ' + key.value);
|
|
12
|
+
Object.defineProperty(result, key.value, { value: valueOf(value), enumerable: true, writable: true, configurable: true });
|
|
13
|
+
}
|
|
14
|
+
return result;
|
|
15
|
+
}
|
|
16
|
+
if (node.type === 'array') return (node.children ?? []).map(valueOf);
|
|
17
|
+
return node.value;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function document(text) {
|
|
21
|
+
const errors = [], tree = parseTree(text, errors, { allowTrailingComma: true, allowEmptyContent: true });
|
|
22
|
+
if (errors.length) throw new Error('Invalid JSONC configuration: ' + printParseErrorCode(errors[0].error) + ' at ' + errors[0].offset);
|
|
23
|
+
const value = tree ? valueOf(tree) : {};
|
|
24
|
+
if (value === null || typeof value !== 'object' || Array.isArray(value)) throw new Error('Expected an object config');
|
|
25
|
+
return { tree, value };
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const readJsonc = text => document(text).value;
|
|
29
|
+
|
|
30
|
+
export function updateJsonc(text, changes, { rename } = {}) {
|
|
31
|
+
let output = text;
|
|
32
|
+
if (rename) {
|
|
33
|
+
const { tree } = document(output), current = findNodeAtLocation(tree, rename.from);
|
|
34
|
+
if (!current || findNodeAtLocation(tree, rename.to)) throw new Error('JSONC registration rename is ambiguous');
|
|
35
|
+
if (!isDeepStrictEqual(rename.from.slice(0, -1), rename.to.slice(0, -1))) throw new Error('JSONC registration rename must stay in the same table');
|
|
36
|
+
const key = current.parent.children[0];
|
|
37
|
+
output = output.slice(0, key.offset) + JSON.stringify(rename.to.at(-1)) + output.slice(key.offset + key.length);
|
|
38
|
+
}
|
|
39
|
+
const format = { insertSpaces: !/^\t+\S/m.test(text), tabSize: 2, eol: text.includes('\r\n') ? '\r\n' : '\n' };
|
|
40
|
+
for (const { path, value } of changes) {
|
|
41
|
+
const { tree } = document(output), node = tree && findNodeAtLocation(tree, path);
|
|
42
|
+
if (node && isDeepStrictEqual(valueOf(node), value)) continue;
|
|
43
|
+
if (!node && value === undefined) continue;
|
|
44
|
+
output = applyEdits(output, modify(output, path, value, { formattingOptions: format }));
|
|
45
|
+
}
|
|
46
|
+
document(output);
|
|
47
|
+
return output;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function updateJsoncEntry(text, tablePath, name, previous, next, { previousName = name } = {}) {
|
|
51
|
+
const path = [...tablePath, name];
|
|
52
|
+
const changes = previous === undefined ? [{ path, value: next }] : [...new Set([...Object.keys(previous), ...Object.keys(next)])]
|
|
53
|
+
.filter(key => !isDeepStrictEqual(previous[key], next[key]) || Object.hasOwn(previous, key) !== Object.hasOwn(next, key))
|
|
54
|
+
.map(key => ({ path: [...path, key], value: Object.hasOwn(next, key) ? next[key] : undefined }));
|
|
55
|
+
return updateJsonc(text, changes, { ...(previousName !== name ? { rename: { from: [...tablePath, previousName], to: path } } : {}) });
|
|
56
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { isDeepStrictEqual } from 'node:util';
|
|
2
|
+
import { hasCraftConnectionIdentity } from './registration-identity.mjs';
|
|
3
|
+
import { readJsonc, updateJsoncEntry } from './jsonc-config.mjs';
|
|
4
|
+
|
|
5
|
+
const object = value => value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
6
|
+
const reserved = new Set(['servers', 'timeout']);
|
|
7
|
+
|
|
8
|
+
export function readOpenCodeConfig(text) {
|
|
9
|
+
const config = readJsonc(text);
|
|
10
|
+
if (config.mcp !== undefined && !object(config.mcp)) throw new Error('Invalid OpenCode MCP config');
|
|
11
|
+
if (config.mcp?.servers !== undefined && (!object(config.mcp.servers) || typeof config.mcp.servers.type === 'string' || Array.isArray(config.mcp.servers.command))) {
|
|
12
|
+
throw new Error('Ambiguous OpenCode mcp.servers: expected a V2 server table; preserve and resolve the V1 name before installing');
|
|
13
|
+
}
|
|
14
|
+
return config;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Installation state and probes use one internal stdio shape. Host files retain
|
|
18
|
+
// their native command array and environment fields, including V1 compatibility.
|
|
19
|
+
export function normalizeOpenCodeConnection(value) {
|
|
20
|
+
if (!object(value)) return value;
|
|
21
|
+
const next = { ...value };
|
|
22
|
+
if (Array.isArray(value.command)) { next.command = value.command[0]; next.args = value.command.slice(1); }
|
|
23
|
+
if (value.environment !== undefined) { next.env = value.environment; delete next.environment; }
|
|
24
|
+
return next;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function entries(config) {
|
|
28
|
+
const legacy = Object.entries(config.mcp ?? {}).filter(([name, raw]) => !reserved.has(name) ||
|
|
29
|
+
(name === 'timeout' && object(raw) && (typeof raw.type === 'string' || Array.isArray(raw.command))))
|
|
30
|
+
.map(([name, raw]) => ({ name, raw, table: ['mcp'], version: 1 }));
|
|
31
|
+
const native = Object.entries(config.mcp?.servers ?? {})
|
|
32
|
+
.map(([name, raw]) => ({ name, raw, table: ['mcp', 'servers'], version: 2 }));
|
|
33
|
+
return [...legacy, ...native];
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function craftEntries(config) {
|
|
37
|
+
return entries(config).filter(({ name, raw }) => name === 'craft' || hasCraftConnectionIdentity(normalizeOpenCodeConnection(raw)));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function openCodeRegistrations(text) {
|
|
41
|
+
const matches = craftEntries(readOpenCodeConfig(text));
|
|
42
|
+
const names = new Set();
|
|
43
|
+
for (const entry of matches) {
|
|
44
|
+
if (names.has(entry.name)) throw new Error('Craft registration exists in both OpenCode V1 and V2 tables; preserve the config and resolve the duplicate');
|
|
45
|
+
names.add(entry.name);
|
|
46
|
+
}
|
|
47
|
+
return matches.map(({ name, raw }) => ({ name, connection: normalizeOpenCodeConnection(raw) }));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function openCodeConfig(text, name = 'craft') {
|
|
51
|
+
// Validate all Craft registrations so a second table cannot hide a stale one.
|
|
52
|
+
openCodeRegistrations(text);
|
|
53
|
+
const found = entries(readOpenCodeConfig(text)).filter(entry => entry.name === name);
|
|
54
|
+
if (found.length > 1) throw new Error('Ambiguous OpenCode MCP registration: ' + name);
|
|
55
|
+
return normalizeOpenCodeConnection(found[0]?.raw);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function mergeOpenCodeConfig(text, connection, { previousName = 'craft', enable = true } = {}) {
|
|
59
|
+
const config = readOpenCodeConfig(text);
|
|
60
|
+
openCodeRegistrations(text);
|
|
61
|
+
const all = entries(config), existing = all.filter(entry => entry.name === previousName);
|
|
62
|
+
if (existing.length > 1) throw new Error('Ambiguous OpenCode MCP registration: ' + previousName);
|
|
63
|
+
if (previousName !== 'craft' && all.some(entry => entry.name === 'craft')) throw new Error('Craft installation conflicts with an existing craft registration');
|
|
64
|
+
const entry = existing[0];
|
|
65
|
+
if (entry && !object(entry.raw)) throw new Error('Invalid craft server entry');
|
|
66
|
+
// Existing V1 files remain V1; native or empty files use V2. Never migrate
|
|
67
|
+
// unrelated server declarations or settings as a side effect of installation.
|
|
68
|
+
const version = entry?.version ?? (config.mcp?.servers !== undefined || !all.length ? 2 : 1);
|
|
69
|
+
const table = entry?.table ?? (version === 2 ? ['mcp', 'servers'] : ['mcp']);
|
|
70
|
+
const previous = entry?.raw;
|
|
71
|
+
const next = { ...previous, type: 'local', command: [connection.command, ...(connection.args ?? [])],
|
|
72
|
+
environment: { ...previous?.environment, ...connection.env } };
|
|
73
|
+
if (typeof connection.command !== 'string' || !connection.command || next.command.some(value => typeof value !== 'string')) throw new Error('Invalid OpenCode local command');
|
|
74
|
+
for (const key of ['args', 'env', 'url', 'httpUrl', 'headers', 'oauth', 'auth']) delete next[key];
|
|
75
|
+
if (version === 2) {
|
|
76
|
+
delete next.enabled;
|
|
77
|
+
if (enable) next.disabled = false;
|
|
78
|
+
if (typeof connection.timeout === 'number') next.timeout = { ...(object(previous?.timeout) ? previous.timeout : {}), startup: connection.timeout };
|
|
79
|
+
else if (object(connection.timeout)) next.timeout = { ...(object(previous?.timeout) ? previous.timeout : {}), ...connection.timeout };
|
|
80
|
+
} else {
|
|
81
|
+
delete next.disabled;
|
|
82
|
+
if (enable) next.enabled = true;
|
|
83
|
+
if (typeof connection.timeout === 'number') next.timeout = connection.timeout;
|
|
84
|
+
else if (object(connection.timeout) && typeof connection.timeout.startup === 'number') next.timeout = connection.timeout.startup;
|
|
85
|
+
}
|
|
86
|
+
const output = updateJsoncEntry(text, table, 'craft', previous, next, { previousName });
|
|
87
|
+
const after = readOpenCodeConfig(output), expected = structuredClone(config);
|
|
88
|
+
let target = expected;
|
|
89
|
+
for (const key of table) { target[key] ??= {}; target = target[key]; }
|
|
90
|
+
if (previousName !== 'craft') delete target[previousName];
|
|
91
|
+
target.craft = next;
|
|
92
|
+
if (!isDeepStrictEqual(after, expected)) throw new Error('OpenCode merge changed unrelated settings; config was preserved');
|
|
93
|
+
return output;
|
|
94
|
+
}
|