@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
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import os from 'node:os';
|
|
3
|
+
import { readFile, lstat, realpath } from 'node:fs/promises';
|
|
4
|
+
import { isDeepStrictEqual } from 'node:util';
|
|
5
|
+
import { hosts, hostPaths, hostCommandOptions } from './hosts.mjs';
|
|
6
|
+
import { craftRegistrations, importZcodeFallback } from './config.mjs';
|
|
7
|
+
import { optionalFile, assertPlainPath } from './files.mjs';
|
|
8
|
+
import { installHosts } from './install.mjs';
|
|
9
|
+
import { compareVersions } from './version-policy.mjs';
|
|
10
|
+
import { readInstallation, registryOrigin } from './installation-state.mjs';
|
|
11
|
+
import { hostReloadProfile } from './host-reload.mjs';
|
|
12
|
+
import { readProjectInstall } from '../game-workflow/project-install.mjs';
|
|
13
|
+
import { readContextLock, checkProjectCompatibility } from '../game-workflow/project-bundles.mjs';
|
|
14
|
+
import { safeProjectFile } from '../game-workflow/asset-import.mjs';
|
|
15
|
+
import { engineDefinition } from '../game-workflow/engines.mjs';
|
|
16
|
+
import { verifyBundle } from '../game-workflow/bundle-files.mjs';
|
|
17
|
+
import { assertHostConfigScope } from './host-config-scope.mjs';
|
|
18
|
+
|
|
19
|
+
const samePath = (left, right) => typeof left === 'string' && typeof right === 'string' &&
|
|
20
|
+
(process.platform === 'win32' ? path.resolve(left).toLowerCase() === path.resolve(right).toLowerCase() : path.resolve(left) === path.resolve(right));
|
|
21
|
+
|
|
22
|
+
function connectionRequirements(project, ide, manifest) {
|
|
23
|
+
return {
|
|
24
|
+
status: 'unverified', trust: 'unknown', source: 'current_host_session',
|
|
25
|
+
tool: 'craft_game_info', arguments: { name: path.basename(project) },
|
|
26
|
+
expected: { host: ide, workspace: path.dirname(project), project, engine: manifest.engine,
|
|
27
|
+
platform: manifest.platform, minimum_version: manifest.minimum_mcp_version },
|
|
28
|
+
instructions: 'Discover Craft tools using the host tool catalog, including deferred tools and their actual names. Call craft_game_info in this host session and verify version/build_id, active_verified, host, workspace, platform and project. An installation receipt or standalone doctor does not confirm this connection. After verification call craft_game_prepare(mode=resume) with a new request_key, then reread the project entrypoints and Skill index.',
|
|
29
|
+
reconnect: hostReloadProfile(ide),
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function bootstrapCommand(project, ide, manifest, paths, hostOptions) {
|
|
34
|
+
return { command: 'npx', args: ['-y', '--registry=' + manifest.registry,
|
|
35
|
+
manifest.package_name + '@' + manifest.minimum_mcp_version,
|
|
36
|
+
'project-setup', '--project', project, '--ide', ide,
|
|
37
|
+
...(hosts[ide].explicitConfig || hostOptions.configPath || hostOptions.hostConfigs?.[ide] ? ['--host-config',paths.config] : []),
|
|
38
|
+
...(ide==='trae' ? ['--trae-region',hostOptions.traeRegion??'global'] : [])] };
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
async function validateGame(project, manifest) {
|
|
42
|
+
const definition = engineDefinition(manifest.engine);
|
|
43
|
+
const runtime = JSON.parse(await readFile(await safeProjectFile(project, 'game-runtime.json'), 'utf8'));
|
|
44
|
+
const pkg = JSON.parse(await readFile(await safeProjectFile(project, 'package.json'), 'utf8'));
|
|
45
|
+
if (typeof runtime.version !== 'string' || !pkg.scripts?.build || !pkg.dependencies?.[definition.dependency]) throw new Error('Project installation metadata does not describe a valid Craft ' + manifest.engine + ' game');
|
|
46
|
+
for (const relative of ['configs/game.json', 'src/main.ts', ...definition.files]) {
|
|
47
|
+
if (!(await lstat(await safeProjectFile(project, relative))).isFile()) throw new Error('Missing Craft game file: ' + relative);
|
|
48
|
+
}
|
|
49
|
+
return readContextLock(project, manifest.engine);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
async function readHostRegistration(paths, ide) {
|
|
53
|
+
await assertHostConfigScope(paths.config,ide,paths.configPeers);
|
|
54
|
+
await assertPlainPath(paths.config);
|
|
55
|
+
let content = await optionalFile(paths.config) ?? '';
|
|
56
|
+
if (paths.fallbackConfig) {
|
|
57
|
+
await assertPlainPath(paths.fallbackConfig);
|
|
58
|
+
content = importZcodeFallback(content, await optionalFile(paths.fallbackConfig));
|
|
59
|
+
}
|
|
60
|
+
return craftRegistrations(content, ide);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
async function projectRegistration(project, ide) {
|
|
64
|
+
const candidates = {
|
|
65
|
+
codex: ['.codex/config.toml'], workbuddy: ['.workbuddy/mcp.json'],
|
|
66
|
+
cursor: ['.cursor/mcp.json'], codebuddy: ['.codebuddy/.mcp.json', '.codebuddy/mcp.json'],
|
|
67
|
+
claude: ['.mcp.json'],
|
|
68
|
+
trae: ['.trae/mcp.json'],
|
|
69
|
+
comate: ['.comate/mcp.json'], opencode: ['opencode.jsonc','opencode.json','.opencode/opencode.jsonc','.opencode/opencode.json'],
|
|
70
|
+
qwen: ['.qwen/settings.json'],
|
|
71
|
+
}[ide] ?? [];
|
|
72
|
+
for (const relative of candidates) {
|
|
73
|
+
const config = path.join(project, relative);
|
|
74
|
+
await assertPlainPath(config);
|
|
75
|
+
const content = await optionalFile(config);
|
|
76
|
+
if (content !== null && craftRegistrations(content, ide).length) return config;
|
|
77
|
+
}
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// This command inspects configuration only. It cannot observe host trust,
|
|
82
|
+
// deferred-tool discovery, or the connection attached to the user's chat.
|
|
83
|
+
export async function setupProject({ project, ide, packageRoot, install = false,
|
|
84
|
+
home = os.homedir(), codexHome, hostOptions = {}, runtimeRoot, stateRoot,
|
|
85
|
+
installer = installHosts } = {}) {
|
|
86
|
+
if (!Object.hasOwn(hosts, ide ?? '')) throw new Error('--ide must select exactly one supported host');
|
|
87
|
+
if (typeof project !== 'string' || !path.isAbsolute(project)) throw new Error('--project must be an absolute existing Craft game directory');
|
|
88
|
+
if (typeof packageRoot !== 'string' || !path.isAbsolute(packageRoot)) throw new Error('Craft packageRoot must be absolute');
|
|
89
|
+
if (typeof install !== 'boolean') throw new Error('--install is a boolean flag');
|
|
90
|
+
project = path.resolve(project);
|
|
91
|
+
const stat = await lstat(project);
|
|
92
|
+
const canonicalProject = await realpath(project);
|
|
93
|
+
if (!stat.isDirectory() || stat.isSymbolicLink() || !samePath(canonicalProject, project)) throw new Error('Craft game directory must not be a symbolic link');
|
|
94
|
+
// Windows accepts case variants, while game file guards require the actual
|
|
95
|
+
// canonical path. Keep the stored directory spelling for the engine name too.
|
|
96
|
+
project = canonicalProject;
|
|
97
|
+
if (!/^[a-z][a-z0-9-]{0,47}$/.test(path.basename(project))) throw new Error('Existing Craft game directory name must match [a-z][a-z0-9-]{0,47}');
|
|
98
|
+
const paths = hostPaths(home, ide, codexHome, hostOptions);
|
|
99
|
+
const base = { project, name: path.basename(project), host: ide, config: paths.config, changed: false, inspection_scope: 'standard_host_configuration',
|
|
100
|
+
host_connection: 'unverified', trust: 'unknown' };
|
|
101
|
+
const manifest = await readProjectInstall(project);
|
|
102
|
+
if (!manifest) return { ...base, status: 'missing_project_install_metadata',
|
|
103
|
+
next: 'Use the original verified Craft connection to prepare(mode=resume) and save project-install.json. If that connection is unavailable, recover the project platform and package source explicitly; do not guess a platform or install into the default workspace.' };
|
|
104
|
+
const lock = await validateGame(project, manifest);
|
|
105
|
+
const verification = connectionRequirements(project, ide, manifest);
|
|
106
|
+
const expected = { engine: manifest.engine, workspace: path.dirname(project), platform: manifest.platform,
|
|
107
|
+
registry: manifest.registry, channel: manifest.channel, minimum_version: manifest.minimum_mcp_version };
|
|
108
|
+
const response = { ...base, expected, verification };
|
|
109
|
+
const localConfig = await projectRegistration(project, ide);
|
|
110
|
+
if (localConfig) return { ...response, status: 'project_configuration_unverified', project_config: localConfig,
|
|
111
|
+
next: 'A project-scoped Craft registration exists. Verify its effective configuration, trust and actual connection in the host before considering a user-level installation. It was preserved and no duplicate registration was installed.' };
|
|
112
|
+
const registrations = await readHostRegistration(paths, ide);
|
|
113
|
+
if (registrations.length > 1) return { ...response, status: 'multiple_installations',
|
|
114
|
+
next: 'Several Craft registrations exist. Select the intended connection without replacing other environments.' };
|
|
115
|
+
const existing = registrations[0];
|
|
116
|
+
if (existing) {
|
|
117
|
+
const connection = existing.connection;
|
|
118
|
+
if (!connection || typeof connection !== 'object') return { ...response, status: 'invalid_configuration', next: 'Repair the existing Craft configuration; it was preserved.' };
|
|
119
|
+
if (connection.disabled === true || connection.enabled === false || connection.enable === false) return { ...response, status: 'disabled',
|
|
120
|
+
next: 'Craft is installed but explicitly disabled. Enable it through the current host only when the user intends to do so; do not reinstall to bypass this setting.' };
|
|
121
|
+
if (connection.args !== undefined && (!Array.isArray(connection.args) || connection.args.some(arg => typeof arg !== 'string'))) return { ...response, status: 'invalid_configuration', next: 'Craft startup arguments are invalid; preserve and repair the configuration.' };
|
|
122
|
+
const args = connection.args ?? [], indexes = args.flatMap((arg, i) => arg === '--workspace' ? [i] : []);
|
|
123
|
+
if (indexes.length > 1 || (indexes.length && (!args[indexes[0] + 1] || !path.isAbsolute(args[indexes[0] + 1])))) return { ...response, status: 'invalid_configuration', next: 'Craft workspace arguments are ambiguous or relative; preserve and repair the configuration.' };
|
|
124
|
+
const workspace = indexes.length ? args[indexes[0] + 1] : connection.env?.CLIENT_WORKSPACE_ROOT;
|
|
125
|
+
const platform = connection.env?.CRAFT_WEB_URL, host = connection.env?.CRAFT_CLIENT_IDE;
|
|
126
|
+
if ((workspace !== undefined && (typeof workspace !== 'string' || !path.isAbsolute(workspace))) ||
|
|
127
|
+
(platform !== undefined && typeof platform !== 'string') || (host !== undefined && typeof host !== 'string')) return { ...response, status: 'invalid_configuration',
|
|
128
|
+
next: 'Craft environment scope values are invalid or relative; preserve and repair the existing registration.' };
|
|
129
|
+
const mismatches = [];
|
|
130
|
+
if (workspace !== undefined && !samePath(workspace, expected.workspace)) mismatches.push('workspace');
|
|
131
|
+
if (platform !== undefined && (typeof platform !== 'string' || platform.replace(/\/$/, '') !== expected.platform)) mismatches.push('platform');
|
|
132
|
+
if (host !== undefined && host !== ide) mismatches.push('host');
|
|
133
|
+
if (mismatches.length) return { ...response, status: 'scope_mismatch', mismatches,
|
|
134
|
+
next: 'The current host Craft connection targets another project scope or platform. Preserve it and explicitly choose/reconfigure the intended connection before resuming; --install will not overwrite it.' };
|
|
135
|
+
if (!connection.env?.CRAFT_INSTALLATION_FILE) return { ...response, status: 'legacy_installation',
|
|
136
|
+
next: 'An existing Craft registration is present. Discover its actual tools and verify its current scope/version first. Migrate it with the standard installer only after resolving its identity; this command does not overwrite legacy connections.' };
|
|
137
|
+
let state;
|
|
138
|
+
try {
|
|
139
|
+
if (typeof connection.env.CRAFT_INSTALLATION_FILE !== 'string' || !path.isAbsolute(connection.env.CRAFT_INSTALLATION_FILE)) throw new Error('Invalid installation state path');
|
|
140
|
+
await assertPlainPath(connection.env.CRAFT_INSTALLATION_FILE);
|
|
141
|
+
state = await readInstallation(connection.env.CRAFT_INSTALLATION_FILE);
|
|
142
|
+
} catch { return { ...response, status: 'invalid_installation', next: 'The existing Craft installation state is missing or invalid. Preserve the configuration and repair that installation before continuing.' }; }
|
|
143
|
+
if (state.host !== ide || !samePath(state.config, paths.config) || !samePath(state.workspace, expected.workspace) || state.platform !== expected.platform ||
|
|
144
|
+
state.source.package !== manifest.package_name || registryOrigin(state.source.registry) !== registryOrigin(manifest.registry) || state.source.channel !== manifest.channel) return { ...response, status: 'scope_mismatch',
|
|
145
|
+
next: 'The recorded installation host, project scope, platform or package source differs from this project. Preserve it and resolve the intended connection explicitly.' };
|
|
146
|
+
if (!workspace || !platform || host !== ide || !connection.command) return { ...response, status: 'invalid_configuration',
|
|
147
|
+
next: 'The Craft registration is incomplete or differs from its installation state; repair it without guessing startup defaults.' };
|
|
148
|
+
const target = { version: state.target.version, build_id: state.target.build_id };
|
|
149
|
+
verification.expected.installed_target = target;
|
|
150
|
+
if (compareVersions(state.target.version, manifest.minimum_mcp_version) < 0) return { ...response, status: 'update_required', installed_target: target,
|
|
151
|
+
next: 'Update the existing Craft installation to a compatible release, reconnect if required, and verify the actual host connection before preparing this project.' };
|
|
152
|
+
return { ...response, status: 'configured_unverified', installed_target: target,
|
|
153
|
+
next: 'Craft is configured. Discover and call its actual tools in this host session. If tools remain unavailable, inspect connection/startup errors and host trust; do not treat this as a missing installation. Reconnect only as needed, then verify and resume.' };
|
|
154
|
+
}
|
|
155
|
+
const pkg = JSON.parse(await readFile(path.join(packageRoot, 'package.json'), 'utf8'));
|
|
156
|
+
if (pkg.name !== manifest.package_name) throw new Error('Running CLI package does not match the project installation package');
|
|
157
|
+
if (compareVersions(pkg.version, manifest.minimum_mcp_version) < 0) return { ...response, status: 'installer_update_required',
|
|
158
|
+
bootstrap: bootstrapCommand(project, ide, manifest, paths, hostOptions), next: 'Use the project-compatible CLI version, then repeat project-setup. No installation was changed.' };
|
|
159
|
+
const bundle = await verifyBundle(path.join(packageRoot, 'resources/targets', ide, manifest.engine), manifest.engine);
|
|
160
|
+
if (bundle.host !== ide) throw new Error('Installer context belongs to another host');
|
|
161
|
+
await checkProjectCompatibility(project, bundle);
|
|
162
|
+
if (lock?.compatibility && !isDeepStrictEqual(lock.compatibility, bundle.compatibility)) throw new Error('Installer engine compatibility differs from the project binding');
|
|
163
|
+
const bound = lock?.contexts?.[ide];
|
|
164
|
+
if (bound && (compareVersions(bundle.version, bound.version) < 0 || (bundle.version === bound.version && bundle.id !== bound.bundle_id))) return { ...response, status: 'installer_update_required',
|
|
165
|
+
bootstrap: bootstrapCommand(project, ide, manifest, paths, hostOptions), next: 'This package cannot preserve the project host context binding. Select a newer compatible Craft release; context downgrade or same-version replacement is refused.' };
|
|
166
|
+
if (!install) return { ...response, status: 'missing_installation',
|
|
167
|
+
next: 'No Craft registration exists for this host. Repeat this command with --install to install only this host using the project platform, source and actual parent directory. Host trust and connection must still be verified.' };
|
|
168
|
+
if (!isDeepStrictEqual(await readProjectInstall(project, { required: true }), manifest)) throw new Error('Project installation metadata changed during setup; retry');
|
|
169
|
+
const result = await installer({ ide, workspace: expected.workspace, platform: manifest.platform,
|
|
170
|
+
registry: manifest.registry, channel: manifest.channel, packageRoot, home, codexHome, hostOptions,
|
|
171
|
+
...(runtimeRoot ? { runtimeRoot } : {}), ...(stateRoot ? { stateRoot } : {}), onlyIfMissing: true });
|
|
172
|
+
const installed = result.hosts?.find(item => item.host === ide);
|
|
173
|
+
if (!installed) throw new Error('Installer did not return the selected host');
|
|
174
|
+
verification.expected.installed_target = { version: result.runtime.version,
|
|
175
|
+
build_id: installed.activation?.expected?.build_id ?? installed.verified?.runtime?.build_id };
|
|
176
|
+
return { ...response, status: 'pending_connection_verification', changed: true,
|
|
177
|
+
installation: installed.installation, installed_target: verification.expected.installed_target,
|
|
178
|
+
connection_handoff: installed.connection_handoff,
|
|
179
|
+
next: 'Installation completed for this host. Wait for the host to load Craft; reconnect or restart only when needed. Confirm trust only if the host requests it. Verify the actual connection with craft_game_info, then prepare(mode=resume). No game files were changed.' };
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export function parseProjectSetupArgs(args) {
|
|
183
|
+
if (args[0] !== 'project-setup') throw new Error('Expected project-setup command');
|
|
184
|
+
const options = {};
|
|
185
|
+
for (let i = 1; i < args.length; i++) {
|
|
186
|
+
const key = args[i];
|
|
187
|
+
if (key === '--install') {
|
|
188
|
+
if (options.install !== undefined) throw new Error('Repeated --install option');
|
|
189
|
+
options.install = true;
|
|
190
|
+
} else if (['--project', '--ide', '--host-config', '--trae-region'].includes(key)) {
|
|
191
|
+
const name = key.slice(2), value = args[++i];
|
|
192
|
+
if (!value || value.startsWith('--') || Object.hasOwn(options, name)) throw new Error('Invalid or repeated ' + key);
|
|
193
|
+
options[name] = value;
|
|
194
|
+
} else throw new Error('Unknown project-setup option: ' + key);
|
|
195
|
+
}
|
|
196
|
+
if (!options.project || !options.ide) throw new Error('project-setup requires --project and --ide');
|
|
197
|
+
return options;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export async function runProjectSetupCommand(args, packageRoot) {
|
|
201
|
+
const options = parseProjectSetupArgs(args);
|
|
202
|
+
const result = await setupProject({ ...options, packageRoot,
|
|
203
|
+
codexHome: process.env.CODEX_HOME, hostOptions: hostCommandOptions(options) });
|
|
204
|
+
process.stdout.write(JSON.stringify(result, null, 2) + '\n');
|
|
205
|
+
return result;
|
|
206
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { hosts } from './hosts.mjs';
|
|
2
|
+
|
|
3
|
+
// Classification only: never read or execute a configuration-provided path.
|
|
4
|
+
// Recognize renamed and damaged managed registrations so setup cannot mistake
|
|
5
|
+
// them for absent installations and overwrite their configuration/state.
|
|
6
|
+
export function hasCraftConnectionIdentity(connection) {
|
|
7
|
+
const args = Array.isArray(connection?.args) ? connection.args.filter(arg => typeof arg === 'string') : [];
|
|
8
|
+
if (args.some(arg => /^@craft_eco\/craft-mcp(?:@[^\s]+)?$/.test(arg))) return true;
|
|
9
|
+
const env = connection?.env;
|
|
10
|
+
if (!env || typeof env !== 'object' || Array.isArray(env)) return false;
|
|
11
|
+
const knownHost = typeof env.CRAFT_CLIENT_IDE === 'string' && Object.hasOwn(hosts, env.CRAFT_CLIENT_IDE);
|
|
12
|
+
const managedLauncher = args.some(arg => /(?:^|[\\/])[^\\/]+\.launcher\.mjs$/.test(arg));
|
|
13
|
+
if (Object.hasOwn(env, 'CRAFT_INSTALLATION_FILE') && (knownHost || managedLauncher)) return true;
|
|
14
|
+
return knownHost && args.some(arg => /(?:^|[\\/])craft-mcp\.mjs$/.test(arg));
|
|
15
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { mkdir, mkdtemp, lstat, readFile, rename, rm } from 'node:fs/promises';
|
|
3
|
+
import { getRuntimeIdentity } from './runtime-identity.mjs';
|
|
4
|
+
import { assertPlainPath } from './files.mjs';
|
|
5
|
+
|
|
6
|
+
const within = (root, file) => {
|
|
7
|
+
const relative = path.relative(path.resolve(root), path.resolve(file));
|
|
8
|
+
return relative !== '' && relative !== '..' && !relative.startsWith('..' + path.sep) && !path.isAbsolute(relative);
|
|
9
|
+
};
|
|
10
|
+
const changed = message => Object.assign(new Error(message), { code: 'INSTALLATION_CHANGED' });
|
|
11
|
+
const signature = info => [info.dev, info.ino, info.birthtimeMs, info.mtimeMs].map(String).join(':');
|
|
12
|
+
async function directoryStamp(directory) {
|
|
13
|
+
try {
|
|
14
|
+
const info = await lstat(directory);
|
|
15
|
+
if (!info.isDirectory() || info.isSymbolicLink()) throw new Error('Invalid existing Craft runtime directory');
|
|
16
|
+
return signature(info);
|
|
17
|
+
} catch (error) { if (error.code === 'ENOENT') return null; throw error; }
|
|
18
|
+
}
|
|
19
|
+
function relocated(candidate) {
|
|
20
|
+
const { runtime, identity, destination, sourceDirectory } = candidate;
|
|
21
|
+
return { ...runtime, ...identity,
|
|
22
|
+
directory: destination,
|
|
23
|
+
package_root: path.join(destination, path.relative(sourceDirectory, identity.package_root)),
|
|
24
|
+
entry: path.join(destination, path.relative(sourceDirectory, identity.entry)) };
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Preparation and complete content verification happen outside installation
|
|
28
|
+
// locks. GC only visits the runtime root's direct version directories.
|
|
29
|
+
export async function prepareRuntimeCandidate(runtimeRoot, materialize) {
|
|
30
|
+
runtimeRoot = path.resolve(runtimeRoot);
|
|
31
|
+
await assertPlainPath(path.join(runtimeRoot, '.candidate-path-check'));
|
|
32
|
+
const parent = path.join(runtimeRoot, '.candidates');
|
|
33
|
+
await mkdir(parent, { recursive: true });
|
|
34
|
+
await assertPlainPath(path.join(parent, '.candidate-path-check'));
|
|
35
|
+
const staging = await mkdtemp(path.join(parent, 'prepare-'));
|
|
36
|
+
const candidate = { runtimeRoot, staging, managed: false };
|
|
37
|
+
try {
|
|
38
|
+
candidate.runtime = await materialize(staging);
|
|
39
|
+
const runtime = candidate.runtime;
|
|
40
|
+
candidate.identity = await getRuntimeIdentity(runtime.package_root ?? path.resolve(path.dirname(runtime.entry), '..'));
|
|
41
|
+
if (path.resolve(runtime.entry) !== candidate.identity.entry) throw new Error('Candidate runtime entry differs from its verified package');
|
|
42
|
+
if (runtime.directory && within(staging, runtime.directory)) {
|
|
43
|
+
candidate.sourceDirectory = path.resolve(runtime.directory);
|
|
44
|
+
if (path.dirname(candidate.sourceDirectory) !== staging || !within(candidate.sourceDirectory, candidate.identity.package_root) || !within(candidate.sourceDirectory, candidate.identity.entry)) throw new Error('Candidate runtime escaped its isolated directory');
|
|
45
|
+
candidate.destination = path.join(runtimeRoot, path.basename(candidate.sourceDirectory));
|
|
46
|
+
candidate.managed = true;
|
|
47
|
+
await refreshRuntimeCandidate(candidate);
|
|
48
|
+
}
|
|
49
|
+
// Injectable materializers may return pre-existing fixture/runtime paths.
|
|
50
|
+
// These are never moved or removed by candidate cleanup.
|
|
51
|
+
return candidate;
|
|
52
|
+
} catch (error) { await disposeRuntimeCandidate(candidate); throw error; }
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// A concurrent publication may appear after preparation. Refresh its complete
|
|
56
|
+
// identity outside locks before retrying the short commit section.
|
|
57
|
+
export async function refreshRuntimeCandidate(candidate) {
|
|
58
|
+
if (!candidate.managed) return;
|
|
59
|
+
const before = await directoryStamp(candidate.destination);
|
|
60
|
+
candidate.existing = null;
|
|
61
|
+
if (before === null) return;
|
|
62
|
+
try {
|
|
63
|
+
const final = relocated(candidate);
|
|
64
|
+
const identity = await getRuntimeIdentity(final.package_root);
|
|
65
|
+
const metadataText = await readFile(path.join(candidate.destination, 'craft-runtime.json'), 'utf8');
|
|
66
|
+
const metadata = JSON.parse(metadataText);
|
|
67
|
+
if (identity.package !== final.package || identity.version !== final.version || identity.build_id !== final.build_id ||
|
|
68
|
+
metadata.package !== final.package || metadata.version !== final.version || metadata.build_id !== final.build_id || metadata.sha256 !== candidate.runtime.sha256) throw new Error('Existing Craft runtime differs from the verified candidate');
|
|
69
|
+
if (before !== await directoryStamp(candidate.destination)) throw changed('Craft runtime changed during candidate verification');
|
|
70
|
+
candidate.existing = { stamp: before, metadataText };
|
|
71
|
+
} catch (error) {
|
|
72
|
+
if (error.code === 'ENOENT') {
|
|
73
|
+
// GC can remove an unreferenced former candidate while it is inspected.
|
|
74
|
+
// Our private copy is still complete and can be published on retry.
|
|
75
|
+
if (await directoryStamp(candidate.destination) === null) return;
|
|
76
|
+
throw changed('Craft runtime was removed while its existing copy was being verified');
|
|
77
|
+
}
|
|
78
|
+
throw error;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Caller holds the runtime-root lock until state/Skills/config commit finishes.
|
|
83
|
+
// Never remove or overwrite a shared target, including on a later commit error.
|
|
84
|
+
export async function publishRuntimeCandidate(candidate) {
|
|
85
|
+
if (!candidate.managed) return { ...candidate.runtime, ...candidate.identity };
|
|
86
|
+
const stamp = await directoryStamp(candidate.destination);
|
|
87
|
+
if (stamp !== null) {
|
|
88
|
+
if (!candidate.existing || stamp !== candidate.existing.stamp ||
|
|
89
|
+
await readFile(path.join(candidate.destination, 'craft-runtime.json'), 'utf8') !== candidate.existing.metadataText) throw changed('Another installer published this Craft runtime; verify it before retrying');
|
|
90
|
+
} else {
|
|
91
|
+
if (candidate.existing) throw changed('Previously verified Craft runtime was removed; retry candidate publication');
|
|
92
|
+
await rename(candidate.sourceDirectory, candidate.destination);
|
|
93
|
+
}
|
|
94
|
+
return relocated(candidate);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export async function disposeRuntimeCandidate(candidate) {
|
|
98
|
+
const parent = path.join(path.resolve(candidate.runtimeRoot), '.candidates');
|
|
99
|
+
const staging = path.resolve(candidate.staging);
|
|
100
|
+
if (path.dirname(staging) !== parent || !path.basename(staging).startsWith('prepare-')) throw new Error('Candidate cleanup escaped its private staging directory');
|
|
101
|
+
await assertPlainPath(path.join(staging, '.candidate-path-check'));
|
|
102
|
+
await rm(staging, { recursive: true, force: true, maxRetries: 5, retryDelay: 100 });
|
|
103
|
+
}
|
|
@@ -5,12 +5,16 @@ import { readInstallation, readInstallationSnapshot, activationStatus, registryO
|
|
|
5
5
|
import { compareVersions, requireForwardVersion, parseVersion } from './version-policy.mjs';
|
|
6
6
|
import { stageRegistryRuntime, getRuntimeIdentity, probeRuntime } from './runtime.mjs';
|
|
7
7
|
import { optionalFile, assertPlainPath, commitFiles } from './files.mjs';
|
|
8
|
-
import { hostPaths,
|
|
8
|
+
import { hostPaths, hostCommandOptions, installTargets } from './hosts.mjs';
|
|
9
9
|
import { craftConfig, mergeConfig } from './config.mjs';
|
|
10
10
|
import { assertDshSharedScope } from './dsh-config.mjs';
|
|
11
11
|
import { connectionHandoff } from './connection-handoff.mjs';
|
|
12
12
|
import { planLauncher, verifyLauncher } from './fixed-launcher.mjs';
|
|
13
13
|
import os from 'node:os';
|
|
14
|
+
import { setTimeout as delay } from 'node:timers/promises';
|
|
15
|
+
import { unchangedInstallation, installationChanged, installationBusy } from './installation-transaction.mjs';
|
|
16
|
+
import { prepareRuntimeCandidate, publishRuntimeCandidate, disposeRuntimeCandidate, refreshRuntimeCandidate } from './runtime-candidate.mjs';
|
|
17
|
+
import { assertHostConfigScope } from './host-config-scope.mjs';
|
|
14
18
|
|
|
15
19
|
export { readInstallation } from './installation-state.mjs';
|
|
16
20
|
const pending = new Map();
|
|
@@ -66,17 +70,35 @@ async function candidateSkills(state, identity) {
|
|
|
66
70
|
return changes;
|
|
67
71
|
}
|
|
68
72
|
|
|
73
|
+
const shortLock = { stale: 120000, retries: 0 };
|
|
74
|
+
|
|
75
|
+
async function confirmationSnapshot(installationFile, current) {
|
|
76
|
+
const snapshot = await readInstallationSnapshot(installationFile), { state } = snapshot;
|
|
77
|
+
await assertHostConfigScope(state.config,state.host,state.config_peers);
|
|
78
|
+
if (state.schema !== 2 || state.activation_mode !== activationMode) throw new Error('Legacy Craft installation requires the standard installer before reconnecting');
|
|
79
|
+
if (activationStatus(current, state.target).status !== 'active_verified') throw installationChanged('The current connection does not match the configured update target');
|
|
80
|
+
await verifyLauncher(state, installationFile);
|
|
81
|
+
const skills = await candidateSkills(state, current);
|
|
82
|
+
if (skills.some(change => change.before !== change.after)) throw new Error('Installed global Skills differ from the configured runtime; run install again');
|
|
83
|
+
return snapshot;
|
|
84
|
+
}
|
|
85
|
+
|
|
69
86
|
export async function confirmActiveInstallation({ installationFile, current }) {
|
|
70
87
|
if (!current?.instance_id) throw new Error('An actual runtime instance is required to confirm the installation');
|
|
71
|
-
|
|
88
|
+
// Capture small shared files consistently. Full package hashing never blocks
|
|
89
|
+
// installers; a second short transaction detects concurrent scope/target changes.
|
|
90
|
+
let unlock = await lockfile.lock(installationFile, shortLock), snapshot;
|
|
91
|
+
try { snapshot = await confirmationSnapshot(installationFile, current); }
|
|
92
|
+
finally { await unlock(); }
|
|
93
|
+
let identity, integrityError;
|
|
94
|
+
try { identity = await getRuntimeIdentity(current.package_root); }
|
|
95
|
+
catch (error) { integrityError = error; }
|
|
96
|
+
unlock = await lockfile.lock(installationFile, shortLock);
|
|
72
97
|
try {
|
|
73
|
-
|
|
74
|
-
if (
|
|
75
|
-
if (
|
|
76
|
-
|
|
77
|
-
await verifyLauncher(state, installationFile);
|
|
78
|
-
const skills = await candidateSkills(state, current);
|
|
79
|
-
if (skills.some(change => change.before !== change.after)) throw new Error('Installed global Skills differ from the configured runtime; run install again');
|
|
98
|
+
await unchangedInstallation(installationFile, snapshot.state);
|
|
99
|
+
if (integrityError) throw integrityError;
|
|
100
|
+
if (!sameRuntimeIdentity(identity, snapshot.state.target)) throw new Error('The running package files do not match the configured update target');
|
|
101
|
+
const { state, text: before } = await confirmationSnapshot(installationFile, current);
|
|
80
102
|
const previous = state.connection_verification;
|
|
81
103
|
const receipt = previous?.instance_id === current.instance_id ? previous : { version: current.version, build_id: current.build_id, instance_id: current.instance_id, confirmed_at: new Date().toISOString() };
|
|
82
104
|
const written = await commitFiles([{ file: installationFile, before, after: receipt === previous ? before : JSON.stringify({ ...state, connection_verification: receipt }, null, 2) + '\n' }]);
|
|
@@ -84,7 +106,18 @@ export async function confirmActiveInstallation({ installationFile, current }) {
|
|
|
84
106
|
} finally { await unlock(); }
|
|
85
107
|
}
|
|
86
108
|
|
|
109
|
+
async function saveCheckReceipt(installationFile, expected, receipt) {
|
|
110
|
+
const unlock = await lockfile.lock(installationFile, { ...shortLock, retries: { retries: 3, minTimeout: 25, maxTimeout: 100 } });
|
|
111
|
+
try {
|
|
112
|
+
const { state, text: before } = await unchangedInstallation(installationFile, expected);
|
|
113
|
+
const after = { ...state, last_check: receipt };
|
|
114
|
+
await commitFiles([{ file: installationFile, before, after: JSON.stringify(after, null, 2) + '\n' }]);
|
|
115
|
+
return after;
|
|
116
|
+
} finally { await unlock(); }
|
|
117
|
+
}
|
|
118
|
+
|
|
87
119
|
async function hostUpdate(state, installationFile, launcher, identity) {
|
|
120
|
+
await assertHostConfigScope(state.config,state.host,state.config_peers);
|
|
88
121
|
await assertPlainPath(state.config);
|
|
89
122
|
if (state.host === 'dsh') assertDshSharedScope({ dshHome: path.dirname(state.config) });
|
|
90
123
|
const before = await optionalFile(state.config);
|
|
@@ -103,9 +136,8 @@ async function hostUpdate(state, installationFile, launcher, identity) {
|
|
|
103
136
|
return { file: state.config, before, after: mergeConfig(before, state.host, connection, { previousName: state.server_id, enable: false }) };
|
|
104
137
|
}
|
|
105
138
|
|
|
106
|
-
async function
|
|
107
|
-
|
|
108
|
-
let state = snapshot.state;
|
|
139
|
+
async function checkSnapshot({ installationFile, current, intent, requestKey, projectCompatibility, registryReceipt, lookup, materialize, probe }) {
|
|
140
|
+
let state = (await readInstallationSnapshot(installationFile)).state;
|
|
109
141
|
if (current.package !== state.source.package) return result(state, current, 'error', { code: 'package_mismatch', can_continue: false });
|
|
110
142
|
try { requireForwardVersion(state.target, current); }
|
|
111
143
|
catch (error) { return result(state, current, 'error', { code: 'target_not_forward', message: error.message, can_continue: false }); }
|
|
@@ -121,8 +153,11 @@ async function checkLocked({ installationFile, current, intent, requestKey, proj
|
|
|
121
153
|
try { if (projectCompatibility) await projectCompatibility(current.package_root); }
|
|
122
154
|
catch (error) { currentIncompatible = error.message; }
|
|
123
155
|
}
|
|
124
|
-
const keepCurrent = (status, extra = {}) =>
|
|
125
|
-
|
|
156
|
+
const keepCurrent = async (status, extra = {}) => {
|
|
157
|
+
await unchangedInstallation(installationFile, state);
|
|
158
|
+
return result(state, current, currentIncompatible ? 'incompatible' : status,
|
|
159
|
+
{ ...extra, can_continue: state.schema === 2 && !activationPending && !currentIncompatible && extra.can_continue !== false, ...(currentIncompatible ? { underlying_status: status, message: currentIncompatible } : {}) });
|
|
160
|
+
};
|
|
126
161
|
if (state.policy.mode === 'off' && !['inspect', 'update'].includes(intent)) return keepCurrent('disabled');
|
|
127
162
|
let remote, checkedAt;
|
|
128
163
|
const last = registryReceipt ?? state.last_check;
|
|
@@ -152,10 +187,9 @@ async function checkLocked({ installationFile, current, intent, requestKey, proj
|
|
|
152
187
|
// Public version checks are read-only. Their receipts live in the MCP
|
|
153
188
|
// connection; only an installer/preparation may persist a receipt.
|
|
154
189
|
if (intent !== 'inspect') {
|
|
155
|
-
|
|
156
|
-
await commitFiles([{ file: installationFile, before, after: JSON.stringify(after, null, 2) + '\n' }]);
|
|
157
|
-
state = after;
|
|
190
|
+
state = await saveCheckReceipt(installationFile, state, receipt);
|
|
158
191
|
}
|
|
192
|
+
await unchangedInstallation(installationFile, state);
|
|
159
193
|
if (currentIncompatible && comparison <= 0) return keepCurrent(comparison < 0 ? 'local_ahead' : 'current', { checked_at: checkedAt, remote });
|
|
160
194
|
const remoteStatus = comparison < 0 ? 'local_ahead' : comparison === 0 ? 'current' : 'available';
|
|
161
195
|
return result(state, current, state.schema === 1 && comparison <= 0 ? 'migration_required' : activationPending && comparison <= 0 ? 'pending_reconnect' : remoteStatus, { checked_at: checkedAt, remote,
|
|
@@ -167,12 +201,11 @@ async function checkLocked({ installationFile, current, intent, requestKey, proj
|
|
|
167
201
|
const runtimeRoot = state.runtime_root;
|
|
168
202
|
if (!path.isAbsolute(runtimeRoot ?? '')) return result(state, current, 'error', { code: 'invalid_runtime_root', can_continue: false });
|
|
169
203
|
await mkdir(runtimeRoot, { recursive: true });
|
|
170
|
-
|
|
171
|
-
let originalConfig;
|
|
204
|
+
let candidate, originalConfig;
|
|
172
205
|
try {
|
|
173
206
|
originalConfig = await optionalFile(state.config);
|
|
174
|
-
|
|
175
|
-
|
|
207
|
+
candidate = await prepareRuntimeCandidate(runtimeRoot, stagingRoot => materialize(state.source, remote, stagingRoot));
|
|
208
|
+
let identity = candidate.identity;
|
|
176
209
|
if (!within(runtimeRoot, identity.package_root) || identity.package !== state.source.package || identity.version !== remote.version) throw new Error('Candidate runtime identity/path mismatch');
|
|
177
210
|
requireForwardVersion(identity, state.target);
|
|
178
211
|
if (projectCompatibility) {
|
|
@@ -182,50 +215,84 @@ async function checkLocked({ installationFile, current, intent, requestKey, proj
|
|
|
182
215
|
const verified = await probe({ command: process.execPath, args: [identity.entry, '--workspace', state.workspace], env: { CRAFT_CLIENT_IDE: state.host, CRAFT_WEB_URL: state.platform, CLIENT_WORKSPACE_ROOT: state.workspace } },
|
|
183
216
|
{ version: identity.version, build_id: identity.build_id, host: state.host, workspace: state.workspace, platform: state.platform });
|
|
184
217
|
if (verified.runtime?.activation_mode !== activationMode) throw new Error('Candidate runtime does not support activation at the next MCP start');
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
const
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
218
|
+
if (!sameRuntimeIdentity(await getRuntimeIdentity(identity.package_root), identity)) throw new Error('Candidate runtime changed during startup verification');
|
|
219
|
+
// Neither registry traffic nor materialization/probing owns a shared lock.
|
|
220
|
+
// Re-read the authoritative state before publishing; receipt-only writes merge.
|
|
221
|
+
const commitCandidate = async () => {
|
|
222
|
+
const unlockState = await lockfile.lock(installationFile, shortLock);
|
|
223
|
+
let unlockRuntime;
|
|
224
|
+
try {
|
|
225
|
+
const latest = await unchangedInstallation(installationFile, state);
|
|
226
|
+
state = latest.state;
|
|
227
|
+
unlockRuntime = await lockfile.lock(runtimeRoot, shortLock);
|
|
228
|
+
identity = await publishRuntimeCandidate(candidate);
|
|
229
|
+
requireForwardVersion(identity, state.target);
|
|
230
|
+
const launcherPlan = await planLauncher(installationFile, state.launcher, identity.package_root);
|
|
231
|
+
const skillChanges = await candidateSkills(state, identity), configChange = await hostUpdate(state, installationFile, launcherPlan.launcher, identity);
|
|
232
|
+
const target = { ...identity, origin: { kind: 'npm', registry: state.source.registry, integrity: remote.integrity } };
|
|
233
|
+
const after = { ...state, schema: 2, activation_mode: activationMode, launcher: launcherPlan.launcher, anchor: identity, target, skills_runtime: skillRuntimeIdentity(identity), last_check: receipt, updated_at: new Date().toISOString() };
|
|
234
|
+
delete after.connection_verification;
|
|
235
|
+
await commitFiles([...skillChanges, launcherPlan.change, { file: installationFile, before: latest.text, after: JSON.stringify(after, null, 2) + '\n' }, configChange]);
|
|
236
|
+
state = after;
|
|
237
|
+
return result(state, current, 'pending_reconnect', { checked_at: checkedAt, remote, reconnect_required: true, can_continue: false, verified: { ...verified, scope: 'standalone_probe' } });
|
|
238
|
+
} finally { try { await unlockRuntime?.(); } finally { await unlockState(); } }
|
|
239
|
+
};
|
|
240
|
+
for (let attempt = 0; ; attempt++) {
|
|
241
|
+
try { return await commitCandidate(); }
|
|
242
|
+
catch (error) {
|
|
243
|
+
if (!['INSTALLATION_CHANGED','ELOCKED'].includes(error.code) || attempt >= 3) throw error;
|
|
244
|
+
// A second host can publish identical bytes while our own installation
|
|
245
|
+
// remains unchanged. Reuse the complete download and revalidate the
|
|
246
|
+
// existing target outside locks, rather than downloading a second time.
|
|
247
|
+
await unchangedInstallation(installationFile, state);
|
|
248
|
+
if (error.code === 'INSTALLATION_CHANGED') await refreshRuntimeCandidate(candidate);
|
|
249
|
+
await delay(100 * (attempt + 1));
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
|
|
193
254
|
} catch (error) {
|
|
255
|
+
if (['ELOCKED', 'INSTALLATION_CHANGED'].includes(error.code)) throw error;
|
|
194
256
|
const failure = { checked_at: checkedAt, remote, code: 'candidate_rejected', message: error.message, ...(error.npm_code?{npm_code:error.npm_code}:{}) };
|
|
195
257
|
try {
|
|
196
258
|
// A failed candidate must not disable a verified existing installation.
|
|
197
259
|
// Recheck the rollback, scope and complete old package before allowing work.
|
|
198
260
|
if (state.schema !== 2 || activationPending || currentIncompatible) throw new Error(currentIncompatible ?? 'No compatible active installation to retain');
|
|
199
|
-
|
|
261
|
+
await unchangedInstallation(installationFile, state);
|
|
200
262
|
if (originalConfig === undefined || originalConfig === null || await optionalFile(state.config) !== originalConfig) throw new Error('Host configuration changed; rollback could not be verified');
|
|
201
263
|
if (!sameRuntimeIdentity(await getRuntimeIdentity(current.package_root), state.target)) throw new Error('Existing runtime integrity check failed');
|
|
202
264
|
await hostUpdate(state, installationFile, state.launcher ?? { entry: current.entry }, current);
|
|
203
265
|
if (!state.launcher && path.resolve(craftConfig(originalConfig, state.host, state.server_id).args[0]) !== path.resolve(current.entry)) throw new Error('Existing runtime entry differs from the configured connection');
|
|
204
266
|
const skills = await candidateSkills(state, current);
|
|
205
267
|
if (skills.some(change => change.before !== change.after)) throw new Error('Existing managed Skills differ from the current runtime');
|
|
268
|
+
await unchangedInstallation(installationFile, state);
|
|
206
269
|
return result(state, current, 'update_failed', { ...failure, can_continue: true, retained_version: current.version,
|
|
207
270
|
next: 'Report the update failure and continue with the verified existing version. A later new work can retry the update; do not claim the newest version is running.' });
|
|
208
271
|
} catch (fallbackError) {
|
|
272
|
+
if (fallbackError.code === 'INSTALLATION_CHANGED') throw fallbackError;
|
|
209
273
|
return result(state, current, 'error', { ...failure, can_continue: false, fallback_error: fallbackError.message });
|
|
210
274
|
}
|
|
211
275
|
}
|
|
212
|
-
finally { await
|
|
276
|
+
finally { if (candidate) await disposeRuntimeCandidate(candidate); }
|
|
213
277
|
}
|
|
214
278
|
|
|
215
279
|
export async function checkForUpdate({ installationFile, current, intent = 'inspect', requestKey, projectCompatibility, registryReceipt, lookup = queryRegistry, materialize = stageRegistryRuntime, probe = probeRuntime }) {
|
|
216
280
|
if (!installationFile) return { status: 'unmanaged', current, can_continue: true, activation_required: false, note: 'Install Craft once to enable automatic updates.' };
|
|
217
281
|
if (!['inspect', 'auto', 'create', 'resume', 'update'].includes(intent)) throw new Error('Invalid update intent');
|
|
218
|
-
//
|
|
219
|
-
//
|
|
282
|
+
// Deduplicate only the same logical request. Other readers and downloads
|
|
283
|
+
// proceed independently; the short commit compares their installation snapshot.
|
|
220
284
|
const key = requestKey ? JSON.stringify([installationFile, current.build_id, current.instance_id, intent, requestKey]) : Symbol('unkeyed update');
|
|
221
285
|
if (pending.has(key)) return pending.get(key);
|
|
222
286
|
const operation = (async () => {
|
|
223
|
-
let
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
287
|
+
for (let attempt = 0; attempt < 3; attempt++) {
|
|
288
|
+
try {
|
|
289
|
+
return await checkSnapshot({ installationFile, current, intent, requestKey, projectCompatibility, registryReceipt, lookup, materialize, probe });
|
|
290
|
+
} catch (error) {
|
|
291
|
+
if (error.code === 'INSTALLATION_CHANGED' && attempt < 2) continue;
|
|
292
|
+
if (['ELOCKED', 'INSTALLATION_CHANGED'].includes(error.code)) return installationBusy(error, current);
|
|
293
|
+
return { status: 'error', code: 'update_failed', message: error.message, current, can_continue: false, activation_required: false };
|
|
294
|
+
}
|
|
295
|
+
}
|
|
229
296
|
})();
|
|
230
297
|
pending.set(key, operation);
|
|
231
298
|
try { return await operation; } finally { if (pending.get(key) === operation) pending.delete(key); }
|
|
@@ -235,12 +302,13 @@ export async function runUpdateCommand(args) {
|
|
|
235
302
|
const [command, ...rest] = args, options = {};
|
|
236
303
|
for (let i = 0; i < rest.length; i += 2) {
|
|
237
304
|
const key = rest[i]?.replace(/^--/, '');
|
|
238
|
-
if (
|
|
305
|
+
if (!['--ide','--host-config','--trae-region'].includes(rest[i]) || !rest[i + 1] || Object.hasOwn(options, key)) throw new Error('Use craft-mcp ' + command + ' --ide <host> [--host-config ABS] [--trae-region global|cn]');
|
|
239
306
|
options[key] = rest[i + 1];
|
|
240
307
|
}
|
|
241
308
|
const results = [];
|
|
309
|
+
const hostOptions = hostCommandOptions(options);
|
|
242
310
|
for (const host of installTargets(options.ide)) {
|
|
243
|
-
const paths = hostPaths(os.homedir(), host, process.env.CODEX_HOME,
|
|
311
|
+
const paths = hostPaths(os.homedir(), host, process.env.CODEX_HOME, hostOptions);
|
|
244
312
|
await assertPlainPath(paths.config);
|
|
245
313
|
assertDshSharedScope(paths);
|
|
246
314
|
const connection = craftConfig(await optionalFile(paths.config) ?? '', host);
|
|
@@ -249,6 +317,11 @@ export async function runUpdateCommand(args) {
|
|
|
249
317
|
const state = await readInstallation(installationFile);
|
|
250
318
|
const current = await getRuntimeIdentity(state.target.package_root);
|
|
251
319
|
const update = await checkForUpdate({ installationFile, current, intent: command === 'update' ? 'update' : 'inspect', requestKey: 'cli-' + Date.now() });
|
|
320
|
+
if (update.status === 'installation_busy') {
|
|
321
|
+
results.push({ host, ...update, scope: 'configured_runtime' });
|
|
322
|
+
process.exitCode = 1;
|
|
323
|
+
continue;
|
|
324
|
+
}
|
|
252
325
|
// A CLI can inspect configured files, but cannot prove a host connection.
|
|
253
326
|
results.push({ host, ...update, activation: { status: 'pending_connection_verification', expected: update.target }, can_continue: false, scope: 'configured_runtime', note: 'Call craft_game_info in the actual host connection to confirm activation.',
|
|
254
327
|
...(!['error','update_failed','incompatible','migration_required'].includes(update.status) ? {connection_handoff:connectionHandoff({host,target:update.target,workspace:state.workspace,platform:state.platform,intent:command==='update'?'update':'inspect'})} : {}) });
|