@craft_eco/craft-mcp 0.1.28 → 0.1.30
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 +21 -60
- package/bin/craft-mcp.mjs +7 -1
- package/dist-server/game-workflow/asset-import.mjs +5 -1
- package/dist-server/game-workflow/assets.mjs +6 -2
- package/dist-server/game-workflow/bundle-files.mjs +9 -6
- package/dist-server/game-workflow/check.mjs +8 -2
- package/dist-server/game-workflow/context-state.mjs +67 -0
- package/dist-server/game-workflow/draft-archive.mjs +147 -2
- package/dist-server/game-workflow/draft-upload-identity.mjs +11 -0
- package/dist-server/game-workflow/draft-uploads.mjs +108 -60
- package/dist-server/game-workflow/engines.mjs +3 -3
- package/dist-server/game-workflow/library-assets.mjs +2 -1
- package/dist-server/game-workflow/local-context.mjs +62 -0
- package/dist-server/game-workflow/native-context.mjs +289 -0
- package/dist-server/game-workflow/project-bundles.mjs +121 -4
- package/dist-server/game-workflow/project-context.mjs +183 -45
- package/dist-server/game-workflow/project-leases.mjs +101 -30
- package/dist-server/game-workflow/projects.mjs +92 -14
- package/dist-server/game-workflow/tasks.mjs +7 -2
- package/dist-server/game-workflow/work-scope.mjs +7 -0
- package/dist-server/integrations/config.mjs +90 -16
- package/dist-server/integrations/connect.mjs +36 -0
- package/dist-server/integrations/connection-handoff.mjs +36 -0
- package/dist-server/integrations/dsh-config.mjs +182 -0
- package/dist-server/integrations/fixed-launcher.mjs +31 -0
- package/dist-server/integrations/host-reload.mjs +19 -0
- package/dist-server/integrations/hosts.mjs +27 -7
- package/dist-server/integrations/install.mjs +168 -31
- package/dist-server/integrations/installation-state.mjs +84 -0
- package/dist-server/integrations/launcher-start.mjs +52 -0
- package/dist-server/integrations/npm-diagnostics.mjs +32 -0
- package/dist-server/integrations/runtime-gc.mjs +191 -0
- package/dist-server/integrations/runtime-identity.mjs +22 -0
- package/dist-server/integrations/runtime.mjs +64 -25
- package/dist-server/integrations/updates.mjs +258 -0
- package/dist-server/integrations/version-policy.mjs +32 -0
- package/dist-server/launcher.mjs +1845 -0
- package/dist-server/mcp/control-panel.mjs +12 -24
- package/dist-server/mcp/server.mjs +150 -91
- package/dist-server/mcp/start.mjs +8 -2
- package/dist-server/mcp/update-session.mjs +107 -0
- package/dist-server/upstream/craft-aigc.mjs +43 -16
- package/dist-server/upstream/draft-source.mjs +29 -0
- package/package.json +4 -3
- package/resources/context-filter-report.json +177 -0
- package/resources/craft-create/SKILL.md +10 -2
- package/resources/craft-update/SKILL.md +23 -0
- package/resources/targets/claude/js/bootstrap/SKILL.md +20 -0
- package/resources/targets/claude/js/context-filter-report.json +27 -0
- package/resources/targets/claude/js/craft-game-maker/SKILL.md +72 -0
- package/resources/targets/claude/js/craft-game-maker/js.md +10 -0
- package/resources/targets/claude/js/js/bundle.json +97 -0
- package/resources/targets/claude/js/js/context/AGENTS.md +29 -0
- package/resources/targets/claude/js/js/context/hooks/hooks.json +14 -0
- package/resources/targets/claude/js/js/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/claude/js/js/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/claude/js/js/context/knowledge/Layout.md +7 -0
- package/resources/targets/claude/js/js/context/knowledge/Lifecycle.md +11 -0
- package/resources/targets/claude/js/js/context/knowledge/ResourceLoading.md +9 -0
- package/resources/targets/claude/js/js/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/claude/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/claude/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/claude/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/claude/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/claude/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/claude/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/claude/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/claude/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/claude/js/js/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/claude/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/claude/js/js/context/skills/index.json +19 -0
- package/resources/targets/claude/js/js/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/claude/js/js/project/README.md +7 -0
- package/resources/targets/claude/js/js/project/configs/assets.json +1 -0
- package/resources/targets/claude/js/js/project/configs/game.controls.json +3 -0
- package/resources/targets/claude/js/js/project/configs/game.json +3 -0
- package/resources/targets/claude/js/js/project/game-runtime.json +7 -0
- package/resources/targets/claude/js/js/project/game.config.json +7 -0
- package/resources/targets/claude/js/js/project/index.html +20 -0
- package/resources/targets/claude/js/js/project/package.json +22 -0
- package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
- package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
- package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/claude/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/claude/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
- package/resources/targets/claude/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/claude/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
- package/resources/targets/claude/js/js/project/scripts/config-export.mjs +13 -0
- package/resources/targets/claude/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/claude/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/claude/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/claude/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/claude/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/claude/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/claude/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/claude/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/claude/js/js/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/claude/js/js/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/claude/js/js/project/src/display/viewport.ts +249 -0
- package/resources/targets/claude/js/js/project/src/main.ts +87 -0
- package/resources/targets/claude/js/js/project/src/platform.ts +2 -0
- package/resources/targets/claude/js/js/project/src/scenes/LoadScene.ts +89 -0
- package/resources/targets/claude/js/js/project/src/scenes/PlayScene.ts +17 -0
- package/resources/targets/claude/js/js/project/src/screenUi.ts +185 -0
- package/resources/targets/claude/js/js/project/src/style.css +294 -0
- package/resources/targets/claude/js/js/project/tsconfig.json +20 -0
- package/resources/targets/claude/js/js/project/unified_data_control_config.json +20 -0
- package/resources/targets/claude/js/js/project/vite.config.ts +5 -0
- package/resources/targets/claude/js/recovery.md +17 -0
- package/resources/targets/claude/js/target.json +61 -0
- package/resources/targets/claude/js3d/bootstrap/SKILL.md +20 -0
- package/resources/targets/claude/js3d/context-filter-report.json +27 -0
- package/resources/targets/claude/js3d/craft-game-maker/SKILL.md +72 -0
- package/resources/targets/claude/js3d/craft-game-maker/js3d.md +12 -0
- package/resources/targets/claude/js3d/js3d/bundle.json +108 -0
- package/resources/targets/claude/js3d/js3d/context/AGENTS.md +30 -0
- package/resources/targets/claude/js3d/js3d/context/hooks/hooks.json +14 -0
- package/resources/targets/claude/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/claude/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/claude/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
- package/resources/targets/claude/js3d/js3d/context/knowledge/Layout.md +7 -0
- package/resources/targets/{workbuddy/js3d/js3d/context/skills/asset-search/references/resource-config.md → claude/js3d/js3d/context/knowledge/ResourceLoading.md} +2 -2
- package/resources/targets/claude/js3d/js3d/context/knowledge/Runtime.md +9 -0
- package/resources/targets/claude/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
- package/resources/targets/claude/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
- package/resources/targets/claude/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
- package/resources/targets/claude/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
- package/resources/targets/claude/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
- package/resources/targets/claude/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
- package/resources/targets/claude/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/claude/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/claude/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/claude/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/claude/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/claude/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/claude/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/claude/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/claude/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/claude/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/claude/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/claude/js3d/js3d/context/skills/index.json +31 -0
- package/resources/targets/claude/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
- package/resources/targets/claude/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
- package/resources/targets/claude/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
- package/resources/targets/claude/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
- package/resources/targets/claude/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
- package/resources/targets/claude/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/claude/js3d/js3d/project/README.md +7 -0
- package/resources/targets/claude/js3d/js3d/project/configs/game.controls.json +3 -0
- package/resources/targets/claude/js3d/js3d/project/configs/game.json +3 -0
- package/resources/targets/claude/js3d/js3d/project/game-runtime.json +7 -0
- package/resources/targets/claude/js3d/js3d/project/game.config.json +7 -0
- package/resources/targets/claude/js3d/js3d/project/index.html +12 -0
- package/resources/targets/claude/js3d/js3d/project/package.json +23 -0
- package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
- package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
- package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
- package/resources/targets/claude/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
- package/resources/targets/claude/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
- package/resources/targets/claude/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/claude/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
- package/resources/targets/claude/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
- package/resources/targets/claude/js3d/js3d/project/scripts/config-export.mjs +15 -0
- package/resources/targets/claude/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/claude/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/claude/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/claude/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/claude/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/claude/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/claude/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/claude/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/claude/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/claude/js3d/js3d/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/claude/js3d/js3d/project/src/display/viewport.ts +239 -0
- package/resources/targets/claude/js3d/js3d/project/src/main.ts +85 -0
- package/resources/targets/claude/js3d/js3d/project/src/platform.ts +2 -0
- package/resources/targets/claude/js3d/js3d/project/src/style.css +83 -0
- package/resources/targets/claude/js3d/js3d/project/tsconfig.json +20 -0
- package/resources/targets/claude/js3d/js3d/project/unified_data_control_config.json +20 -0
- package/resources/targets/claude/js3d/js3d/project/vite.config.ts +5 -0
- package/resources/targets/claude/js3d/recovery.md +17 -0
- package/resources/targets/claude/js3d/target.json +60 -0
- package/resources/targets/codebuddy/js/bootstrap/SKILL.md +7 -1
- package/resources/targets/codebuddy/js/context-filter-report.json +27 -0
- package/resources/targets/codebuddy/js/craft-game-maker/SKILL.md +24 -29
- package/resources/targets/codebuddy/js/craft-game-maker/js.md +2 -2
- package/resources/targets/codebuddy/js/js/bundle.json +16 -18
- package/resources/targets/codebuddy/js/js/context/AGENTS.md +10 -6
- package/resources/targets/codebuddy/js/js/context/knowledge/AssetUrl.md +4 -4
- package/resources/targets/codebuddy/js/js/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/codebuddy/js/js/context/knowledge/ResourceLoading.md +9 -0
- package/resources/targets/codebuddy/js/js/context/skills/export-config/SKILL.md +2 -2
- package/resources/targets/codebuddy/js/js/context/skills/index.json +2 -14
- package/resources/targets/codebuddy/js/js/context/skills/visual-qa/SKILL.md +1 -1
- package/resources/targets/codebuddy/js/recovery.md +14 -4
- package/resources/targets/codebuddy/js/target.json +1 -1
- package/resources/targets/codebuddy/js3d/bootstrap/SKILL.md +7 -1
- package/resources/targets/codebuddy/js3d/context-filter-report.json +27 -0
- package/resources/targets/codebuddy/js3d/craft-game-maker/SKILL.md +24 -29
- package/resources/targets/codebuddy/js3d/craft-game-maker/js3d.md +3 -4
- package/resources/targets/codebuddy/js3d/js3d/bundle.json +19 -21
- package/resources/targets/codebuddy/js3d/js3d/context/AGENTS.md +10 -6
- package/resources/targets/codebuddy/js3d/js3d/context/knowledge/AssetUrl.md +4 -4
- package/resources/targets/codebuddy/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/{codex/js3d/js3d/context/skills/asset-search/references/resource-config.md → codebuddy/js3d/js3d/context/knowledge/ResourceLoading.md} +2 -2
- package/resources/targets/codebuddy/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +1 -1
- package/resources/targets/codebuddy/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
- package/resources/targets/codebuddy/js3d/js3d/context/skills/export-config/SKILL.md +2 -2
- package/resources/targets/codebuddy/js3d/js3d/context/skills/index.json +4 -16
- package/resources/targets/codebuddy/js3d/js3d/context/skills/performance-audit/SKILL.md +1 -1
- package/resources/targets/codebuddy/js3d/js3d/context/skills/visual-qa/SKILL.md +1 -1
- package/resources/targets/codebuddy/js3d/recovery.md +14 -4
- package/resources/targets/codebuddy/js3d/target.json +1 -1
- package/resources/targets/codex/js/bootstrap/SKILL.md +7 -1
- package/resources/targets/codex/js/context-filter-report.json +27 -0
- package/resources/targets/codex/js/craft-game-maker/SKILL.md +24 -29
- package/resources/targets/codex/js/craft-game-maker/js.md +2 -2
- package/resources/targets/codex/js/js/bundle.json +16 -18
- package/resources/targets/codex/js/js/context/AGENTS.md +10 -6
- package/resources/targets/codex/js/js/context/knowledge/AssetUrl.md +4 -4
- package/resources/targets/codex/js/js/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/codex/js/js/context/knowledge/ResourceLoading.md +9 -0
- package/resources/targets/codex/js/js/context/skills/export-config/SKILL.md +2 -2
- package/resources/targets/codex/js/js/context/skills/index.json +2 -14
- package/resources/targets/codex/js/js/context/skills/visual-qa/SKILL.md +1 -1
- package/resources/targets/codex/js/recovery.md +14 -4
- package/resources/targets/codex/js/target.json +1 -1
- package/resources/targets/codex/js3d/bootstrap/SKILL.md +7 -1
- package/resources/targets/codex/js3d/context-filter-report.json +27 -0
- package/resources/targets/codex/js3d/craft-game-maker/SKILL.md +24 -29
- package/resources/targets/codex/js3d/craft-game-maker/js3d.md +3 -4
- package/resources/targets/codex/js3d/js3d/bundle.json +19 -21
- package/resources/targets/codex/js3d/js3d/context/AGENTS.md +10 -6
- package/resources/targets/codex/js3d/js3d/context/knowledge/AssetUrl.md +4 -4
- package/resources/targets/codex/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/{codebuddy/js3d/js3d/context/skills/asset-search/references/resource-config.md → codex/js3d/js3d/context/knowledge/ResourceLoading.md} +2 -2
- package/resources/targets/codex/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +1 -1
- package/resources/targets/codex/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
- package/resources/targets/codex/js3d/js3d/context/skills/export-config/SKILL.md +2 -2
- package/resources/targets/codex/js3d/js3d/context/skills/index.json +4 -16
- package/resources/targets/codex/js3d/js3d/context/skills/performance-audit/SKILL.md +1 -1
- package/resources/targets/codex/js3d/js3d/context/skills/visual-qa/SKILL.md +1 -1
- package/resources/targets/codex/js3d/recovery.md +14 -4
- package/resources/targets/codex/js3d/target.json +1 -1
- package/resources/targets/cursor/js/bootstrap/SKILL.md +20 -0
- package/resources/targets/cursor/js/context-filter-report.json +27 -0
- package/resources/targets/cursor/js/craft-game-maker/SKILL.md +72 -0
- package/resources/targets/cursor/js/craft-game-maker/js.md +10 -0
- package/resources/targets/cursor/js/js/bundle.json +97 -0
- package/resources/targets/cursor/js/js/context/AGENTS.md +29 -0
- package/resources/targets/cursor/js/js/context/hooks/hooks.json +14 -0
- package/resources/targets/cursor/js/js/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/cursor/js/js/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/cursor/js/js/context/knowledge/Layout.md +7 -0
- package/resources/targets/cursor/js/js/context/knowledge/Lifecycle.md +11 -0
- package/resources/targets/cursor/js/js/context/knowledge/ResourceLoading.md +9 -0
- package/resources/targets/cursor/js/js/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/cursor/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/cursor/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/cursor/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/cursor/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/cursor/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/cursor/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/cursor/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/cursor/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/cursor/js/js/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/cursor/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/cursor/js/js/context/skills/index.json +19 -0
- package/resources/targets/cursor/js/js/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/cursor/js/js/project/README.md +7 -0
- package/resources/targets/cursor/js/js/project/configs/assets.json +1 -0
- package/resources/targets/cursor/js/js/project/configs/game.controls.json +3 -0
- package/resources/targets/cursor/js/js/project/configs/game.json +3 -0
- package/resources/targets/cursor/js/js/project/game-runtime.json +7 -0
- package/resources/targets/cursor/js/js/project/game.config.json +7 -0
- package/resources/targets/cursor/js/js/project/index.html +20 -0
- package/resources/targets/cursor/js/js/project/package.json +22 -0
- package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
- package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
- package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/cursor/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/cursor/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
- package/resources/targets/cursor/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/cursor/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
- package/resources/targets/cursor/js/js/project/scripts/config-export.mjs +13 -0
- package/resources/targets/cursor/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/cursor/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/cursor/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/cursor/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/cursor/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/cursor/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/cursor/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/cursor/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/cursor/js/js/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/cursor/js/js/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/cursor/js/js/project/src/display/viewport.ts +249 -0
- package/resources/targets/cursor/js/js/project/src/main.ts +87 -0
- package/resources/targets/cursor/js/js/project/src/platform.ts +2 -0
- package/resources/targets/cursor/js/js/project/src/scenes/LoadScene.ts +89 -0
- package/resources/targets/cursor/js/js/project/src/scenes/PlayScene.ts +17 -0
- package/resources/targets/cursor/js/js/project/src/screenUi.ts +185 -0
- package/resources/targets/cursor/js/js/project/src/style.css +294 -0
- package/resources/targets/cursor/js/js/project/tsconfig.json +20 -0
- package/resources/targets/cursor/js/js/project/unified_data_control_config.json +20 -0
- package/resources/targets/cursor/js/js/project/vite.config.ts +5 -0
- package/resources/targets/cursor/js/recovery.md +17 -0
- package/resources/targets/cursor/js/target.json +61 -0
- package/resources/targets/cursor/js3d/bootstrap/SKILL.md +20 -0
- package/resources/targets/cursor/js3d/context-filter-report.json +27 -0
- package/resources/targets/cursor/js3d/craft-game-maker/SKILL.md +72 -0
- package/resources/targets/cursor/js3d/craft-game-maker/js3d.md +12 -0
- package/resources/targets/cursor/js3d/js3d/bundle.json +108 -0
- package/resources/targets/cursor/js3d/js3d/context/AGENTS.md +30 -0
- package/resources/targets/cursor/js3d/js3d/context/hooks/hooks.json +14 -0
- package/resources/targets/cursor/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/cursor/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/cursor/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
- package/resources/targets/cursor/js3d/js3d/context/knowledge/Layout.md +7 -0
- package/resources/targets/cursor/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
- package/resources/targets/cursor/js3d/js3d/context/knowledge/Runtime.md +9 -0
- package/resources/targets/cursor/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
- package/resources/targets/cursor/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
- package/resources/targets/cursor/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
- package/resources/targets/cursor/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
- package/resources/targets/cursor/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
- package/resources/targets/cursor/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
- package/resources/targets/cursor/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/cursor/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/cursor/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/cursor/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/cursor/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/cursor/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/cursor/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/cursor/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/cursor/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/cursor/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/cursor/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/cursor/js3d/js3d/context/skills/index.json +31 -0
- package/resources/targets/cursor/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
- package/resources/targets/cursor/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
- package/resources/targets/cursor/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
- package/resources/targets/cursor/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
- package/resources/targets/cursor/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
- package/resources/targets/cursor/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/cursor/js3d/js3d/project/README.md +7 -0
- package/resources/targets/cursor/js3d/js3d/project/configs/game.controls.json +3 -0
- package/resources/targets/cursor/js3d/js3d/project/configs/game.json +3 -0
- package/resources/targets/cursor/js3d/js3d/project/game-runtime.json +7 -0
- package/resources/targets/cursor/js3d/js3d/project/game.config.json +7 -0
- package/resources/targets/cursor/js3d/js3d/project/index.html +12 -0
- package/resources/targets/cursor/js3d/js3d/project/package.json +23 -0
- package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
- package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
- package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
- package/resources/targets/cursor/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
- package/resources/targets/cursor/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
- package/resources/targets/cursor/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/cursor/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
- package/resources/targets/cursor/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
- package/resources/targets/cursor/js3d/js3d/project/scripts/config-export.mjs +15 -0
- package/resources/targets/cursor/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/cursor/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/cursor/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/cursor/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/cursor/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/cursor/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/cursor/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/cursor/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/cursor/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/cursor/js3d/js3d/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/cursor/js3d/js3d/project/src/display/viewport.ts +239 -0
- package/resources/targets/cursor/js3d/js3d/project/src/main.ts +85 -0
- package/resources/targets/cursor/js3d/js3d/project/src/platform.ts +2 -0
- package/resources/targets/cursor/js3d/js3d/project/src/style.css +83 -0
- package/resources/targets/cursor/js3d/js3d/project/tsconfig.json +20 -0
- package/resources/targets/cursor/js3d/js3d/project/unified_data_control_config.json +20 -0
- package/resources/targets/cursor/js3d/js3d/project/vite.config.ts +5 -0
- package/resources/targets/cursor/js3d/recovery.md +17 -0
- package/resources/targets/cursor/js3d/target.json +60 -0
- package/resources/targets/dsh/js/bootstrap/SKILL.md +20 -0
- package/resources/targets/dsh/js/context-filter-report.json +27 -0
- package/resources/targets/dsh/js/craft-game-maker/SKILL.md +72 -0
- package/resources/targets/dsh/js/craft-game-maker/js.md +10 -0
- package/resources/targets/dsh/js/js/bundle.json +97 -0
- package/resources/targets/dsh/js/js/context/AGENTS.md +29 -0
- package/resources/targets/dsh/js/js/context/hooks/hooks.json +14 -0
- package/resources/targets/dsh/js/js/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/dsh/js/js/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/dsh/js/js/context/knowledge/Layout.md +7 -0
- package/resources/targets/dsh/js/js/context/knowledge/Lifecycle.md +11 -0
- package/resources/targets/dsh/js/js/context/knowledge/ResourceLoading.md +9 -0
- package/resources/targets/dsh/js/js/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/dsh/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/dsh/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/dsh/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/dsh/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/dsh/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/dsh/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/dsh/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/dsh/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/dsh/js/js/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/dsh/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/dsh/js/js/context/skills/index.json +19 -0
- package/resources/targets/dsh/js/js/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/dsh/js/js/project/README.md +7 -0
- package/resources/targets/dsh/js/js/project/configs/assets.json +1 -0
- package/resources/targets/dsh/js/js/project/configs/game.controls.json +3 -0
- package/resources/targets/dsh/js/js/project/configs/game.json +3 -0
- package/resources/targets/dsh/js/js/project/game-runtime.json +7 -0
- package/resources/targets/dsh/js/js/project/game.config.json +7 -0
- package/resources/targets/dsh/js/js/project/index.html +20 -0
- package/resources/targets/dsh/js/js/project/package.json +22 -0
- package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
- package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
- package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/dsh/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/dsh/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
- package/resources/targets/dsh/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/dsh/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
- package/resources/targets/dsh/js/js/project/scripts/config-export.mjs +13 -0
- package/resources/targets/dsh/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/dsh/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/dsh/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/dsh/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/dsh/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/dsh/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/dsh/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/dsh/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/dsh/js/js/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/dsh/js/js/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/dsh/js/js/project/src/display/viewport.ts +249 -0
- package/resources/targets/dsh/js/js/project/src/main.ts +87 -0
- package/resources/targets/dsh/js/js/project/src/platform.ts +2 -0
- package/resources/targets/dsh/js/js/project/src/scenes/LoadScene.ts +89 -0
- package/resources/targets/dsh/js/js/project/src/scenes/PlayScene.ts +17 -0
- package/resources/targets/dsh/js/js/project/src/screenUi.ts +185 -0
- package/resources/targets/dsh/js/js/project/src/style.css +294 -0
- package/resources/targets/dsh/js/js/project/tsconfig.json +20 -0
- package/resources/targets/dsh/js/js/project/unified_data_control_config.json +20 -0
- package/resources/targets/dsh/js/js/project/vite.config.ts +5 -0
- package/resources/targets/dsh/js/recovery.md +17 -0
- package/resources/targets/dsh/js/target.json +61 -0
- package/resources/targets/dsh/js3d/bootstrap/SKILL.md +20 -0
- package/resources/targets/dsh/js3d/context-filter-report.json +27 -0
- package/resources/targets/dsh/js3d/craft-game-maker/SKILL.md +72 -0
- package/resources/targets/dsh/js3d/craft-game-maker/js3d.md +12 -0
- package/resources/targets/dsh/js3d/js3d/bundle.json +108 -0
- package/resources/targets/dsh/js3d/js3d/context/AGENTS.md +30 -0
- package/resources/targets/dsh/js3d/js3d/context/hooks/hooks.json +14 -0
- package/resources/targets/dsh/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/dsh/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/dsh/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
- package/resources/targets/dsh/js3d/js3d/context/knowledge/Layout.md +7 -0
- package/resources/targets/dsh/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
- package/resources/targets/dsh/js3d/js3d/context/knowledge/Runtime.md +9 -0
- package/resources/targets/dsh/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
- package/resources/targets/dsh/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
- package/resources/targets/dsh/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
- package/resources/targets/dsh/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
- package/resources/targets/dsh/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
- package/resources/targets/dsh/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
- package/resources/targets/dsh/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/dsh/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/dsh/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/dsh/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/dsh/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/dsh/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/dsh/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/dsh/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/dsh/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/dsh/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/dsh/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/dsh/js3d/js3d/context/skills/index.json +31 -0
- package/resources/targets/dsh/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
- package/resources/targets/dsh/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
- package/resources/targets/dsh/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
- package/resources/targets/dsh/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
- package/resources/targets/dsh/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
- package/resources/targets/dsh/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/dsh/js3d/js3d/project/README.md +7 -0
- package/resources/targets/dsh/js3d/js3d/project/configs/game.controls.json +3 -0
- package/resources/targets/dsh/js3d/js3d/project/configs/game.json +3 -0
- package/resources/targets/dsh/js3d/js3d/project/game-runtime.json +7 -0
- package/resources/targets/dsh/js3d/js3d/project/game.config.json +7 -0
- package/resources/targets/dsh/js3d/js3d/project/index.html +12 -0
- package/resources/targets/dsh/js3d/js3d/project/package.json +23 -0
- package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
- package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
- package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
- package/resources/targets/dsh/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
- package/resources/targets/dsh/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
- package/resources/targets/dsh/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/dsh/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
- package/resources/targets/dsh/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
- package/resources/targets/dsh/js3d/js3d/project/scripts/config-export.mjs +15 -0
- package/resources/targets/dsh/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/dsh/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/dsh/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/dsh/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/dsh/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/dsh/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/dsh/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/dsh/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/dsh/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/dsh/js3d/js3d/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/dsh/js3d/js3d/project/src/display/viewport.ts +239 -0
- package/resources/targets/dsh/js3d/js3d/project/src/main.ts +85 -0
- package/resources/targets/dsh/js3d/js3d/project/src/platform.ts +2 -0
- package/resources/targets/dsh/js3d/js3d/project/src/style.css +83 -0
- package/resources/targets/dsh/js3d/js3d/project/tsconfig.json +20 -0
- package/resources/targets/dsh/js3d/js3d/project/unified_data_control_config.json +20 -0
- package/resources/targets/dsh/js3d/js3d/project/vite.config.ts +5 -0
- package/resources/targets/dsh/js3d/recovery.md +17 -0
- package/resources/targets/dsh/js3d/target.json +60 -0
- package/resources/targets/index.json +72 -12
- package/resources/targets/kimi/js/bootstrap/SKILL.md +20 -0
- package/resources/targets/kimi/js/context-filter-report.json +27 -0
- package/resources/targets/kimi/js/craft-game-maker/SKILL.md +72 -0
- package/resources/targets/kimi/js/craft-game-maker/js.md +10 -0
- package/resources/targets/kimi/js/js/bundle.json +97 -0
- package/resources/targets/kimi/js/js/context/AGENTS.md +29 -0
- package/resources/targets/kimi/js/js/context/hooks/hooks.json +14 -0
- package/resources/targets/kimi/js/js/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/kimi/js/js/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/kimi/js/js/context/knowledge/Layout.md +7 -0
- package/resources/targets/kimi/js/js/context/knowledge/Lifecycle.md +11 -0
- package/resources/targets/kimi/js/js/context/knowledge/ResourceLoading.md +9 -0
- package/resources/targets/kimi/js/js/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/kimi/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/kimi/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/kimi/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/kimi/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/kimi/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/kimi/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/kimi/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/kimi/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/kimi/js/js/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/kimi/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/kimi/js/js/context/skills/index.json +19 -0
- package/resources/targets/kimi/js/js/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/kimi/js/js/project/README.md +7 -0
- package/resources/targets/kimi/js/js/project/configs/assets.json +1 -0
- package/resources/targets/kimi/js/js/project/configs/game.controls.json +3 -0
- package/resources/targets/kimi/js/js/project/configs/game.json +3 -0
- package/resources/targets/kimi/js/js/project/game-runtime.json +7 -0
- package/resources/targets/kimi/js/js/project/game.config.json +7 -0
- package/resources/targets/kimi/js/js/project/index.html +20 -0
- package/resources/targets/kimi/js/js/project/package.json +22 -0
- package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
- package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
- package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/kimi/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/kimi/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
- package/resources/targets/kimi/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/kimi/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
- package/resources/targets/kimi/js/js/project/scripts/config-export.mjs +13 -0
- package/resources/targets/kimi/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/kimi/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/kimi/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/kimi/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/kimi/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/kimi/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/kimi/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/kimi/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/kimi/js/js/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/kimi/js/js/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/kimi/js/js/project/src/display/viewport.ts +249 -0
- package/resources/targets/kimi/js/js/project/src/main.ts +87 -0
- package/resources/targets/kimi/js/js/project/src/platform.ts +2 -0
- package/resources/targets/kimi/js/js/project/src/scenes/LoadScene.ts +89 -0
- package/resources/targets/kimi/js/js/project/src/scenes/PlayScene.ts +17 -0
- package/resources/targets/kimi/js/js/project/src/screenUi.ts +185 -0
- package/resources/targets/kimi/js/js/project/src/style.css +294 -0
- package/resources/targets/kimi/js/js/project/tsconfig.json +20 -0
- package/resources/targets/kimi/js/js/project/unified_data_control_config.json +20 -0
- package/resources/targets/kimi/js/js/project/vite.config.ts +5 -0
- package/resources/targets/kimi/js/recovery.md +17 -0
- package/resources/targets/kimi/js/target.json +61 -0
- package/resources/targets/kimi/js3d/bootstrap/SKILL.md +20 -0
- package/resources/targets/kimi/js3d/context-filter-report.json +27 -0
- package/resources/targets/kimi/js3d/craft-game-maker/SKILL.md +72 -0
- package/resources/targets/kimi/js3d/craft-game-maker/js3d.md +12 -0
- package/resources/targets/kimi/js3d/js3d/bundle.json +108 -0
- package/resources/targets/kimi/js3d/js3d/context/AGENTS.md +30 -0
- package/resources/targets/kimi/js3d/js3d/context/hooks/hooks.json +14 -0
- package/resources/targets/kimi/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/kimi/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/kimi/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
- package/resources/targets/kimi/js3d/js3d/context/knowledge/Layout.md +7 -0
- package/resources/targets/kimi/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
- package/resources/targets/kimi/js3d/js3d/context/knowledge/Runtime.md +9 -0
- package/resources/targets/kimi/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
- package/resources/targets/kimi/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
- package/resources/targets/kimi/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
- package/resources/targets/kimi/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
- package/resources/targets/kimi/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
- package/resources/targets/kimi/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
- package/resources/targets/kimi/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/kimi/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/kimi/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/kimi/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/kimi/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/kimi/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/kimi/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/kimi/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/kimi/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/kimi/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/kimi/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/kimi/js3d/js3d/context/skills/index.json +31 -0
- package/resources/targets/kimi/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
- package/resources/targets/kimi/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
- package/resources/targets/kimi/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
- package/resources/targets/kimi/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
- package/resources/targets/kimi/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
- package/resources/targets/kimi/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/kimi/js3d/js3d/project/README.md +7 -0
- package/resources/targets/kimi/js3d/js3d/project/configs/game.controls.json +3 -0
- package/resources/targets/kimi/js3d/js3d/project/configs/game.json +3 -0
- package/resources/targets/kimi/js3d/js3d/project/game-runtime.json +7 -0
- package/resources/targets/kimi/js3d/js3d/project/game.config.json +7 -0
- package/resources/targets/kimi/js3d/js3d/project/index.html +12 -0
- package/resources/targets/kimi/js3d/js3d/project/package.json +23 -0
- package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
- package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
- package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
- package/resources/targets/kimi/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
- package/resources/targets/kimi/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
- package/resources/targets/kimi/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/kimi/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
- package/resources/targets/kimi/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
- package/resources/targets/kimi/js3d/js3d/project/scripts/config-export.mjs +15 -0
- package/resources/targets/kimi/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/kimi/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/kimi/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/kimi/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/kimi/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/kimi/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/kimi/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/kimi/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/kimi/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/kimi/js3d/js3d/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/kimi/js3d/js3d/project/src/display/viewport.ts +239 -0
- package/resources/targets/kimi/js3d/js3d/project/src/main.ts +85 -0
- package/resources/targets/kimi/js3d/js3d/project/src/platform.ts +2 -0
- package/resources/targets/kimi/js3d/js3d/project/src/style.css +83 -0
- package/resources/targets/kimi/js3d/js3d/project/tsconfig.json +20 -0
- package/resources/targets/kimi/js3d/js3d/project/unified_data_control_config.json +20 -0
- package/resources/targets/kimi/js3d/js3d/project/vite.config.ts +5 -0
- package/resources/targets/kimi/js3d/recovery.md +17 -0
- package/resources/targets/kimi/js3d/target.json +60 -0
- package/resources/targets/workbuddy/js/bootstrap/SKILL.md +9 -1
- package/resources/targets/workbuddy/js/context-filter-report.json +27 -0
- package/resources/targets/workbuddy/js/craft-game-maker/SKILL.md +24 -29
- package/resources/targets/workbuddy/js/craft-game-maker/js.md +2 -2
- package/resources/targets/workbuddy/js/js/bundle.json +16 -18
- package/resources/targets/workbuddy/js/js/context/AGENTS.md +10 -6
- package/resources/targets/workbuddy/js/js/context/knowledge/AssetUrl.md +4 -4
- package/resources/targets/workbuddy/js/js/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/workbuddy/js/js/context/knowledge/ResourceLoading.md +9 -0
- package/resources/targets/workbuddy/js/js/context/skills/export-config/SKILL.md +2 -2
- package/resources/targets/workbuddy/js/js/context/skills/index.json +2 -14
- package/resources/targets/workbuddy/js/js/context/skills/visual-qa/SKILL.md +1 -1
- package/resources/targets/workbuddy/js/recovery.md +16 -4
- package/resources/targets/workbuddy/js/target.json +1 -1
- package/resources/targets/workbuddy/js3d/bootstrap/SKILL.md +9 -1
- package/resources/targets/workbuddy/js3d/context-filter-report.json +27 -0
- package/resources/targets/workbuddy/js3d/craft-game-maker/SKILL.md +24 -29
- package/resources/targets/workbuddy/js3d/craft-game-maker/js3d.md +3 -4
- package/resources/targets/workbuddy/js3d/js3d/bundle.json +19 -21
- package/resources/targets/workbuddy/js3d/js3d/context/AGENTS.md +10 -6
- package/resources/targets/workbuddy/js3d/js3d/context/knowledge/AssetUrl.md +4 -4
- package/resources/targets/workbuddy/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/workbuddy/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
- package/resources/targets/workbuddy/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +1 -1
- package/resources/targets/workbuddy/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +2 -2
- package/resources/targets/workbuddy/js3d/js3d/context/skills/export-config/SKILL.md +2 -2
- package/resources/targets/workbuddy/js3d/js3d/context/skills/index.json +4 -16
- package/resources/targets/workbuddy/js3d/js3d/context/skills/performance-audit/SKILL.md +1 -1
- package/resources/targets/workbuddy/js3d/js3d/context/skills/visual-qa/SKILL.md +1 -1
- package/resources/targets/workbuddy/js3d/recovery.md +16 -4
- package/resources/targets/workbuddy/js3d/target.json +1 -1
- package/resources/targets/zcode/js/bootstrap/SKILL.md +20 -0
- package/resources/targets/zcode/js/context-filter-report.json +27 -0
- package/resources/targets/zcode/js/craft-game-maker/SKILL.md +72 -0
- package/resources/targets/zcode/js/craft-game-maker/js.md +10 -0
- package/resources/targets/zcode/js/js/bundle.json +97 -0
- package/resources/targets/zcode/js/js/context/AGENTS.md +29 -0
- package/resources/targets/zcode/js/js/context/hooks/hooks.json +14 -0
- package/resources/targets/zcode/js/js/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/zcode/js/js/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/zcode/js/js/context/knowledge/Layout.md +7 -0
- package/resources/targets/zcode/js/js/context/knowledge/Lifecycle.md +11 -0
- package/resources/targets/zcode/js/js/context/knowledge/ResourceLoading.md +9 -0
- package/resources/targets/zcode/js/js/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/zcode/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/zcode/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/zcode/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/zcode/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/zcode/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/zcode/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/zcode/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/zcode/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/zcode/js/js/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/zcode/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/zcode/js/js/context/skills/index.json +19 -0
- package/resources/targets/zcode/js/js/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/zcode/js/js/project/README.md +7 -0
- package/resources/targets/zcode/js/js/project/configs/assets.json +1 -0
- package/resources/targets/zcode/js/js/project/configs/game.controls.json +3 -0
- package/resources/targets/zcode/js/js/project/configs/game.json +3 -0
- package/resources/targets/zcode/js/js/project/game-runtime.json +7 -0
- package/resources/targets/zcode/js/js/project/game.config.json +7 -0
- package/resources/targets/zcode/js/js/project/index.html +20 -0
- package/resources/targets/zcode/js/js/project/package.json +22 -0
- package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
- package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
- package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/zcode/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/zcode/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
- package/resources/targets/zcode/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/zcode/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
- package/resources/targets/zcode/js/js/project/scripts/config-export.mjs +13 -0
- package/resources/targets/zcode/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/zcode/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/zcode/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/zcode/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/zcode/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/zcode/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/zcode/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/zcode/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/zcode/js/js/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/zcode/js/js/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/zcode/js/js/project/src/display/viewport.ts +249 -0
- package/resources/targets/zcode/js/js/project/src/main.ts +87 -0
- package/resources/targets/zcode/js/js/project/src/platform.ts +2 -0
- package/resources/targets/zcode/js/js/project/src/scenes/LoadScene.ts +89 -0
- package/resources/targets/zcode/js/js/project/src/scenes/PlayScene.ts +17 -0
- package/resources/targets/zcode/js/js/project/src/screenUi.ts +185 -0
- package/resources/targets/zcode/js/js/project/src/style.css +294 -0
- package/resources/targets/zcode/js/js/project/tsconfig.json +20 -0
- package/resources/targets/zcode/js/js/project/unified_data_control_config.json +20 -0
- package/resources/targets/zcode/js/js/project/vite.config.ts +5 -0
- package/resources/targets/zcode/js/recovery.md +17 -0
- package/resources/targets/zcode/js/target.json +61 -0
- package/resources/targets/zcode/js3d/bootstrap/SKILL.md +20 -0
- package/resources/targets/zcode/js3d/context-filter-report.json +27 -0
- package/resources/targets/zcode/js3d/craft-game-maker/SKILL.md +72 -0
- package/resources/targets/zcode/js3d/craft-game-maker/js3d.md +12 -0
- package/resources/targets/zcode/js3d/js3d/bundle.json +108 -0
- package/resources/targets/zcode/js3d/js3d/context/AGENTS.md +30 -0
- package/resources/targets/zcode/js3d/js3d/context/hooks/hooks.json +14 -0
- package/resources/targets/zcode/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/zcode/js3d/js3d/context/knowledge/AssetWiring.md +7 -0
- package/resources/targets/zcode/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
- package/resources/targets/zcode/js3d/js3d/context/knowledge/Layout.md +7 -0
- package/resources/targets/zcode/js3d/js3d/context/knowledge/ResourceLoading.md +11 -0
- package/resources/targets/zcode/js3d/js3d/context/knowledge/Runtime.md +9 -0
- package/resources/targets/zcode/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
- package/resources/targets/zcode/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
- package/resources/targets/zcode/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
- package/resources/targets/zcode/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
- package/resources/targets/zcode/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
- package/resources/targets/zcode/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
- package/resources/targets/zcode/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/zcode/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/zcode/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/zcode/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/zcode/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/zcode/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/zcode/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/zcode/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/zcode/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/zcode/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/zcode/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/zcode/js3d/js3d/context/skills/index.json +31 -0
- package/resources/targets/zcode/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
- package/resources/targets/zcode/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
- package/resources/targets/zcode/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
- package/resources/targets/zcode/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
- package/resources/targets/zcode/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
- package/resources/targets/zcode/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/zcode/js3d/js3d/project/README.md +7 -0
- package/resources/targets/zcode/js3d/js3d/project/configs/game.controls.json +3 -0
- package/resources/targets/zcode/js3d/js3d/project/configs/game.json +3 -0
- package/resources/targets/zcode/js3d/js3d/project/game-runtime.json +7 -0
- package/resources/targets/zcode/js3d/js3d/project/game.config.json +7 -0
- package/resources/targets/zcode/js3d/js3d/project/index.html +12 -0
- package/resources/targets/zcode/js3d/js3d/project/package.json +23 -0
- package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
- package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
- package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
- package/resources/targets/zcode/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
- package/resources/targets/zcode/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
- package/resources/targets/zcode/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/zcode/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
- package/resources/targets/zcode/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
- package/resources/targets/zcode/js3d/js3d/project/scripts/config-export.mjs +15 -0
- package/resources/targets/zcode/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/zcode/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/zcode/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/zcode/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/zcode/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/zcode/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/zcode/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/zcode/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/zcode/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/zcode/js3d/js3d/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/zcode/js3d/js3d/project/src/display/viewport.ts +239 -0
- package/resources/targets/zcode/js3d/js3d/project/src/main.ts +85 -0
- package/resources/targets/zcode/js3d/js3d/project/src/platform.ts +2 -0
- package/resources/targets/zcode/js3d/js3d/project/src/style.css +83 -0
- package/resources/targets/zcode/js3d/js3d/project/tsconfig.json +20 -0
- package/resources/targets/zcode/js3d/js3d/project/unified_data_control_config.json +20 -0
- package/resources/targets/zcode/js3d/js3d/project/vite.config.ts +5 -0
- package/resources/targets/zcode/js3d/recovery.md +17 -0
- package/resources/targets/zcode/js3d/target.json +60 -0
- package/vendor/craft-runtime/SOURCE.json +3 -3
- package/vendor/craft-runtime/package.json +1 -1
- package/dist-server/game-workflow/publication-materials.mjs +0 -92
- package/dist-server/game-workflow/publications.mjs +0 -164
- package/dist-server/game-workflow/publish-capture-worker.mjs +0 -57
- package/dist-server/game-workflow/publish-capture.mjs +0 -75
- package/dist-server/mcp/publication-page.html +0 -86
- package/dist-server/mcp/publication-page.mjs +0 -375
- package/dist-server/mcp/publication-preview.mjs +0 -63
- package/dist-server/mcp/publication-tools.mjs +0 -22
- package/dist-server/mcp/publish-panel.mjs +0 -205
- package/dist-server/upstream/publication-transport.mjs +0 -101
- package/resources/targets/codebuddy/js/js/context/knowledge/AigcWiring.md +0 -9
- package/resources/targets/codebuddy/js/js/context/skills/aigc-generate/SKILL.md +0 -14
- package/resources/targets/codebuddy/js/js/context/skills/asset-search/SKILL.md +0 -12
- package/resources/targets/codebuddy/js/js/context/skills/asset-search/references/resource-config.md +0 -9
- package/resources/targets/codebuddy/js3d/js3d/context/knowledge/AigcWiring.md +0 -9
- package/resources/targets/codebuddy/js3d/js3d/context/skills/aigc-integration/SKILL.md +0 -14
- package/resources/targets/codebuddy/js3d/js3d/context/skills/asset-search/SKILL.md +0 -12
- package/resources/targets/codex/js/js/context/knowledge/AigcWiring.md +0 -9
- package/resources/targets/codex/js/js/context/skills/aigc-generate/SKILL.md +0 -14
- package/resources/targets/codex/js/js/context/skills/asset-search/SKILL.md +0 -12
- package/resources/targets/codex/js/js/context/skills/asset-search/references/resource-config.md +0 -9
- package/resources/targets/codex/js3d/js3d/context/knowledge/AigcWiring.md +0 -9
- package/resources/targets/codex/js3d/js3d/context/skills/aigc-integration/SKILL.md +0 -14
- package/resources/targets/codex/js3d/js3d/context/skills/asset-search/SKILL.md +0 -12
- package/resources/targets/workbuddy/js/js/context/knowledge/AigcWiring.md +0 -9
- package/resources/targets/workbuddy/js/js/context/skills/aigc-generate/SKILL.md +0 -14
- package/resources/targets/workbuddy/js/js/context/skills/asset-search/SKILL.md +0 -12
- package/resources/targets/workbuddy/js/js/context/skills/asset-search/references/resource-config.md +0 -9
- package/resources/targets/workbuddy/js3d/js3d/context/knowledge/AigcWiring.md +0 -9
- package/resources/targets/workbuddy/js3d/js3d/context/skills/aigc-integration/SKILL.md +0 -14
- package/resources/targets/workbuddy/js3d/js3d/context/skills/asset-search/SKILL.md +0 -12
package/README.md
CHANGED
|
@@ -1,91 +1,52 @@
|
|
|
1
1
|
# @craft_eco/craft-mcp
|
|
2
2
|
|
|
3
|
-
Craft MCP 是面向支持本地 stdio MCP 的 AI IDE 的游戏制作服务,例如 Codex、WorkBuddy、CodeBuddy。宿主负责理解需求、设计和编码,MCP 提供 Phaser 2D / Three.js 3D 工程、素材搜索与生成、玩法及截图检查、本地预览、私有草稿上传和发布工具。
|
|
3
|
+
Craft MCP 是面向支持本地 stdio MCP 的 AI IDE 的游戏制作服务,例如 Codex、Cursor、WorkBuddy、CodeBuddy、Claude Code、DSH、ZCode、Kimi Code。宿主负责理解需求、设计和编码,MCP 提供 Phaser 2D / Three.js 3D 工程、素材搜索与生成、玩法及截图检查、本地预览、私有草稿上传和发布工具。
|
|
4
4
|
|
|
5
|
-
需要 Node.js 22.12 或更新版本及 npm
|
|
5
|
+
需要 Node.js 22.12 或更新版本及 npm。八个宿主各自的两套引擎上下文、基础模板和共享 SDK 已包含,无需安装桌面客户端。
|
|
6
6
|
|
|
7
7
|
## AI IDE 安装指引
|
|
8
8
|
|
|
9
|
-
###
|
|
9
|
+
### 按宿主安装(推荐)
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
显式选择当前宿主;只有同时接入时才用逗号列出多个宿主。安装完整 MCP 程序包、固定启动入口及全局 craft-create、craft-update Skill,保留已有平台和工作区。默认启用 stable 渠道自动检查和安装;新版在下次 MCP 启动或用户重连后加载。
|
|
12
12
|
|
|
13
13
|
```sh
|
|
14
|
-
|
|
15
|
-
npx --yes --registry=https://registry.npmjs.org/ @craft_eco/craft-mcp@0.1.
|
|
14
|
+
# 在 Codex 中安装
|
|
15
|
+
npx --yes --registry=https://registry.npmjs.org/ @craft_eco/craft-mcp@0.1.30 install --ide codex
|
|
16
|
+
# 在 WorkBuddy 中安装
|
|
17
|
+
npx --yes --registry=https://registry.npmjs.org/ @craft_eco/craft-mcp@0.1.30 install --ide workbuddy
|
|
16
18
|
```
|
|
17
19
|
|
|
18
|
-
|
|
20
|
+
其他宿主将 --ide 改为 cursor、codebuddy、claude、dsh、zcode 或 kimi。kimi 指当前 Kimi Code CLI,不写旧 Python Kimi CLI 的 ~/.kimi。可用 --workspace <绝对游戏父目录> 和 --platform <HTTPS origin> 指定目录与平台;未提供时保留现有配置,新安装默认 ~/CraftGames 和本包平台。安装不创建游戏、不修改信任权限;低版本或同版不同构建不会覆盖现有新版。
|
|
19
21
|
|
|
20
|
-
Codex 配置 ~/.codex/config.toml(设置 CODEX_HOME 时使用其 config.toml),全局 Skill ~/.agents/skills
|
|
22
|
+
Codex 配置 ~/.codex/config.toml(设置 CODEX_HOME 时使用其 config.toml),全局 Skill 在 ~/.agents/skills;WorkBuddy 配置 ~/.workbuddy/mcp.json,全局 Skill 在 ~/.workbuddy/skills。CodeBuddy 使用 ~/.codebuddy/.mcp.json 与 ~/.codebuddy/skills,已有旧 MCP 配置按官方优先级沿用。初次安装后完成宿主连接与信任,再调用当前连接的 craft_game_info 核对 runtime 和 update.activation。doctor --ide <当前宿主> 仅验证独立探测和文件,不证明当前聊天已切版或发现 Skill。
|
|
21
23
|
|
|
22
|
-
|
|
24
|
+
Claude Code 使用 ~/.claude.json 与 ~/.claude/skills;DSH 使用 ~/.dsh/cordis.patch.yml 与 ~/.dsh/skills;ZCode 使用 ~/.zcode/cli/config.json 的 mcp.servers 和 ~/.zcode/skills;Kimi Code CLI 使用 ~/.kimi-code/mcp.json 与 ~/.kimi-code/skills。DSH 配置是 YAML 插件 patch,ZCode 不是 mcpServers。对应目录覆盖通过 CLAUDE_CONFIG_DIR、DSH_HOME、KIMI_CODE_HOME 指定。不要把不同宿主的配置格式互换。
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
新会话首次处理 Craft 请求时,Skill 调用只读 craft_update_check(request_key),旧项目传 name;制作前发现 update_available=true 且 automatic_update_enabled=true 时自动 craft_update(mode=auto,request_key)。两个工具与 prepare 复用 request_key;prepare 也会兜底检查和更新。pending_reconnect 时告知新版已安装、等待下次启动或用户重连,不主动重载或中断工作。重连后调用 craft_game_info 核对 version、build_id、active_verified 与宿主范围,再 prepare(resume) 更新当前项目对应宿主和原引擎的上下文、技能索引、受管 Skill 与恢复入口,保留源码和用户进度,随后重读正文。纯查看不改项目,离线报告未确认最新。
|
|
25
27
|
|
|
26
|
-
|
|
27
|
-
npx --yes --prefer-online --registry=https://registry.npmjs.org/ @craft_eco/craft-mcp@0.1.28 guide
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
1. 识别当前 AI IDE 的 MCP 设置入口和配置格式,按下方示例添加 Craft 服务,保留其他服务。只有需要相同环境的 Craft 服务才复用现有配置。
|
|
31
|
-
2. 若无权修改宿主配置,展示匹配该宿主的配置让用户添加。不要把 JSON 写入 TOML,也不要覆盖用户整个配置文件。
|
|
32
|
-
3. 在 AI IDE 中启用并重连 MCP 服务。普通终端执行启动命令不代表宿主已加载工具;服务参数不添加 guide。
|
|
33
|
-
4. 调用 craft_game_info,核对版本 0.1.28 和平台 https://craft.qq.com,再介绍实际可用功能。制作游戏前完整读取 context.engine.entrypoint 返回的 AGENTS.md 及其按需引用。
|
|
34
|
-
5. 需要登录时调用 craft_auth_open,让用户只在返回的本机页面填写 CLI Key;凭据不进入聊天、游戏工程或共享配置。
|
|
35
|
-
|
|
36
|
-
### Codex:TOML 配置
|
|
28
|
+
### 给 Agent 的安装入口
|
|
37
29
|
|
|
38
|
-
|
|
30
|
+
执行本包 guide,根据当前宿主调用上面的标准 install。八种宿主使用同一安装流程,无需选择连接模式。当前进程不会因安装新版而切换版本;固定入口在下次启动时读取已安装目标。
|
|
39
31
|
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
command = "npx"
|
|
43
|
-
args = ["--yes","--prefer-online","--registry=https://registry.npmjs.org/","@craft_eco/craft-mcp@0.1.28"]
|
|
44
|
-
startup_timeout_sec = 120
|
|
45
|
-
|
|
46
|
-
[mcp_servers.craft.env]
|
|
47
|
-
CRAFT_WEB_URL = "https://craft.qq.com"
|
|
48
|
-
CRAFT_CLIENT_IDE = "codex"
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### WorkBuddy 与支持 mcpServers JSON 的宿主
|
|
52
|
-
|
|
53
|
-
在当前 AI IDE 的 MCP 管理页面添加本地 stdio 服务。Trae 官方说明:https://docs.trae.cn/ide_add-mcp-servers 。其他宿主按自身格式填写相同 command、args、env;宿主专属扩展字段不跨 IDE 复制。
|
|
54
|
-
|
|
55
|
-
```json
|
|
56
|
-
{
|
|
57
|
-
"mcpServers": {
|
|
58
|
-
"craft": {
|
|
59
|
-
"command": "npx",
|
|
60
|
-
"args": [
|
|
61
|
-
"--yes",
|
|
62
|
-
"--prefer-online",
|
|
63
|
-
"--registry=https://registry.npmjs.org/",
|
|
64
|
-
"@craft_eco/craft-mcp@0.1.28"
|
|
65
|
-
],
|
|
66
|
-
"env": {
|
|
67
|
-
"CRAFT_WEB_URL": "https://craft.qq.com",
|
|
68
|
-
"CRAFT_CLIENT_IDE": "workbuddy"
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
32
|
+
```sh
|
|
33
|
+
npx --yes --registry=https://registry.npmjs.org/ @craft_eco/craft-mcp@0.1.30 guide
|
|
73
34
|
```
|
|
74
35
|
|
|
75
|
-
|
|
36
|
+
专家和连接器只通过 connect --ide workbuddy 解析标准安装并启动同一受管入口,首次使用也须先执行标准 install。connect 不安装程序、不改宿主配置、不创建游戏;安装缺失、禁用或平台/工作区不一致时明确失败。不要用无参数 npx 直接启动业务包来替代标准安装。未适配宿主的原始 stdio 调试不包含自动更新和 Skill 安装。
|
|
76
37
|
|
|
77
38
|
## 连接后的使用
|
|
78
39
|
|
|
79
|
-
默认游戏父目录为用户目录下的 CraftGames,游戏实际位于 <workspace>/<name
|
|
40
|
+
默认游戏父目录为用户目录下的 CraftGames,游戏实际位于 <workspace>/<name>,不会自动跟随宿主当前目录。需要修改标准安装的范围时,重新执行 install --ide <当前宿主> --workspace <绝对游戏父目录>;平台变更使用 --platform。由安装器同步配置和安装实例,再按回执重连并核对 craft_game_info 的 workspace/platform,不单独改固定入口参数或环境变量绕过范围校验。准备完成后在宿主打开返回的 project 目录。
|
|
80
41
|
|
|
81
|
-
|
|
42
|
+
工程创建时提供 .agents、.cursor、.workbuddy、.codebuddy、.claude、.dsh、.zcode、.kimi-code 八个独立目录,每个目录只携带当前引擎的上下文及 skills/craft-project。Claude 另有 .claude/CLAUDE.md 恢复入口,其余宿主按根 AGENTS 或原生 Skill 读取对应目录。查询 craft_game_info(name) 只读;制作前 prepare(mode=create/resume,request_key),完成后保存 work_id/context_revision 并重读本宿主资料,结束后 release。resume 不安装依赖或重建模板,同版不重写,用户源码、规则和进度保留。
|
|
82
43
|
|
|
83
44
|
素材按所选引擎原始契约引用:AIGC 使用平台返回的原始 URL,素材库使用候选原始 Path;不下载到 public、不改写模型依赖、不生成本地序列帧清单。以工具返回的 config_file 和 slot 定位配置,并由原始引擎解析器与 CDN 配置加载。
|
|
84
45
|
|
|
85
46
|
先读取 craft_game_info 的通用流程及所选 js / js3d 引擎 AGENTS.md。使用 craft_game_check 和 craft_game_review 验收真实玩法及画面,再由宿主终端按 craft_game_deliver 返回的命令启动本地预览。
|
|
86
47
|
|
|
87
|
-
|
|
48
|
+
使用 craft_game_upload 上传同次验收的源码与 dist。draft_ready 后把 project_url 交给用户,在 Craft 网页完成发布。
|
|
88
49
|
|
|
89
|
-
当前业务平台是 https://craft.qq.com。npm 程序公开可下载不代表生产环境或公开发布开关已启用;上传和提审需要匹配的 Web 服务与审核配置。
|
|
50
|
+
当前业务平台是 https://test.craft.qq.com。npm 程序公开可下载不代表生产环境或公开发布开关已启用;上传和提审需要匹配的 Web 服务与审核配置。
|
|
90
51
|
|
|
91
52
|
发布图片上传后可公开访问,游戏审核通过后可能公开。平台审核覆盖提交的文案与图片,不会扫描或执行整个游戏压缩包。
|
package/bin/craft-mcp.mjs
CHANGED
|
@@ -15,13 +15,19 @@ if (args.length === 0 || (args.length === 2 && args[0] === '--workspace' && path
|
|
|
15
15
|
await import('../dist-server/mcp/start.mjs');
|
|
16
16
|
} else if (args.length === 1 && args[0] === 'guide') {
|
|
17
17
|
process.stdout.write(await readFile(new URL('../README.md', import.meta.url), 'utf8'));
|
|
18
|
+
} else if (args.length === 3 && args[0] === 'connect' && args[1] === '--ide') {
|
|
19
|
+
try { const { connectInstalledHost } = await import('../dist-server/integrations/connect.mjs'); await connectInstalledHost(args[2]); }
|
|
20
|
+
catch (error) { process.stderr.write('Craft connect failed: ' + error.message + '\n'); process.exitCode = 1; }
|
|
18
21
|
} else if (['install', 'doctor'].includes(args[0])) {
|
|
19
22
|
try {
|
|
20
23
|
const { runIntegrationCommand } = await import('../dist-server/integrations/install.mjs');
|
|
21
24
|
await runIntegrationCommand(args, fileURLToPath(new URL('..', import.meta.url)));
|
|
22
25
|
} catch (error) { process.stderr.write('Craft ' + args[0] + ' failed: ' + error.message + '\n'); process.exitCode = 1; }
|
|
26
|
+
} else if (['check', 'update'].includes(args[0])) {
|
|
27
|
+
try { const { runUpdateCommand } = await import('../dist-server/integrations/updates.mjs'); await runUpdateCommand(args); }
|
|
28
|
+
catch (error) { process.stderr.write('Craft ' + args[0] + ' failed: ' + error.message + '\n'); process.exitCode = 1; }
|
|
23
29
|
} else if (args.length === 1 && ['--help', '-h', 'help'].includes(args[0])) {
|
|
24
|
-
process.stdout.write('Usage: craft-mcp [--workspace <absolute games directory>|guide|--help]\n craft-mcp install --ide
|
|
30
|
+
process.stdout.write('Usage: craft-mcp [--workspace <absolute games directory>|guide|--help]\n craft-mcp install --ide <host[,host]> [--workspace <absolute games directory>] [--platform <HTTPS origin>] [--registry <HTTPS registry>] [--channel <npm tag>] [--updates auto|off]\n craft-mcp connect --ide <host>\n craft-mcp doctor --ide <host[,host]>\n craft-mcp check --ide <host[,host]>\n craft-mcp update --ide <host[,host]>\nHosts: codex, workbuddy, codebuddy, cursor, claude, dsh, zcode, kimi.\n\nNo arguments: start the stdio MCP server from this package.\n--workspace: override CLIENT_WORKSPACE_ROOT; games are created under <workspace>/<name>.\nDefault workspace: ~/CraftGames. The host current directory is not used.\nguide: print AI IDE installation instructions and exit.\ninstall: install this package, verify it, merge selected host configurations and install managed Skills. Preserve existing workspace/platform and update policy; new installations use a fixed next-start launcher and automatic stable-channel installation.\nconnect: start the existing standard installation; never installs or rewrites host settings.\ncheck: inspect the configured npm channel without installing a new runtime.\nupdate: install a verified newer compatible runtime and update the host configuration, including when automatic updates are off. The current process stays on its original package. Load the target at the next MCP start or user-requested reconnect, verify its identity, then prepare the current project to update context and Skills.\ndoctor: verify configured files and candidate MCP in an isolated process; does not confirm the current host connection.\n');
|
|
25
31
|
} else {
|
|
26
32
|
process.stderr.write('Unknown command or extra arguments. Use craft-mcp --help.\n');
|
|
27
33
|
process.exitCode = 1;
|
|
@@ -5,6 +5,7 @@ import { atomicJson } from './request-store.mjs';
|
|
|
5
5
|
import { outputType } from './resource-catalog.mjs';
|
|
6
6
|
import { readSpriteManifest, spriteLayout } from './asset-formats.mjs';
|
|
7
7
|
import { assertSafeResourcePath } from '../upstream/resource-path.mjs';
|
|
8
|
+
import { guardWork, currentWork } from './work-scope.mjs';
|
|
8
9
|
|
|
9
10
|
export async function safeProjectFile(project, relative, createParents = false) {
|
|
10
11
|
const root = await realpath(project);
|
|
@@ -31,6 +32,7 @@ export async function assetConfig(project, name = 'assets.json', create = false)
|
|
|
31
32
|
if (!['assets.json','models.json','animations.json','audio.json','videos.json','spritesheets.json'].includes(name)) throw new Error('Invalid asset config');
|
|
32
33
|
const file = await safeProjectFile(project, 'configs/'+name);
|
|
33
34
|
if (create) {
|
|
35
|
+
await guardWork();
|
|
34
36
|
try { await writeFile(file,'{}\n',{flag:'wx'}); }
|
|
35
37
|
catch (error) { if (error.code!=='EEXIST') throw error; }
|
|
36
38
|
}
|
|
@@ -74,7 +76,7 @@ async function validateReference(platform, value, family, library) {
|
|
|
74
76
|
async function exportedAddress(value, contextDirectory) {
|
|
75
77
|
if (!contextDirectory) return value;
|
|
76
78
|
const file = path.join(contextDirectory, 'skills/export-config/scripts/panel-resource-path.mjs');
|
|
77
|
-
const { toPanelResourcePath } = await import(pathToFileURL(file).href);
|
|
79
|
+
const { toPanelResourcePath } = await import(pathToFileURL(file).href+'?revision='+encodeURIComponent(currentWork()?.context_revision??'legacy'));
|
|
78
80
|
return toPanelResourcePath(value);
|
|
79
81
|
}
|
|
80
82
|
|
|
@@ -119,8 +121,10 @@ export async function importAsset(platform, record, signal, contextDirectory) {
|
|
|
119
121
|
(control.asset_type && control.asset_type !== assetType)) throw new Error('Asset controls changed; refusing to overwrite');
|
|
120
122
|
account(); signal?.throwIfAborted();
|
|
121
123
|
Object.defineProperty(controls, record.slot, { value:{ ...control, type:'resource', asset_type:assetType }, enumerable:true, writable:true, configurable:true });
|
|
124
|
+
await guardWork();
|
|
122
125
|
await atomicJson(controlsFile, controls);
|
|
123
126
|
Object.defineProperty(config.data, record.slot, { value:keepNormalized ? current : value, enumerable:true, writable:true, configurable:true });
|
|
127
|
+
await guardWork();
|
|
124
128
|
await atomicJson(config.file, config.data);
|
|
125
129
|
return { slot:record.slot, asset_type:assetType, config_file:'configs/' + configName, asset_url:value,
|
|
126
130
|
source:library ? 'library' : 'aigc', ...(library ? { library_asset_id:output.asset_id } : { resource_id:record.resource_id }),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { digest } from './request-store.mjs';
|
|
2
|
+
import { guardWork } from './work-scope.mjs';
|
|
2
3
|
import { assetConfig, importAsset } from './asset-import.mjs';
|
|
3
4
|
import { setTimeout as delay } from 'node:timers/promises';
|
|
4
5
|
import { makeGeneration, outputType, outputTypes, storedGeneration } from './resource-catalog.mjs';
|
|
@@ -114,6 +115,7 @@ export class Assets {
|
|
|
114
115
|
// Deliberately bounded to one submission at a time; backend admission still owns the global limit.
|
|
115
116
|
for (const record of records) {
|
|
116
117
|
signal.throwIfAborted();
|
|
118
|
+
await guardWork();
|
|
117
119
|
if(record.source==='library')throw new Error('Library assets must use the library import path; generation is not permitted');
|
|
118
120
|
if (terminal.has(record.status)) throw new Error(`Asset ${record.slot} is ${record.status}; inspect the result before explicitly requesting a new asset`);
|
|
119
121
|
// The existing API has no request-level idempotency key. Reconcile an uncertain send; never blindly repeat its paid POST.
|
|
@@ -122,6 +124,7 @@ export class Assets {
|
|
|
122
124
|
const {type,body}=storedGeneration(record.spec);
|
|
123
125
|
record.status = 'submitting'; await this.store.save(record);
|
|
124
126
|
try {
|
|
127
|
+
await guardWork();
|
|
125
128
|
const result = await this.platform.request(type.endpoint,{...body,resource_name:'craft-mcp-'+record.request_id},record.owner,signal);
|
|
126
129
|
const ids=type.stages===2?[Number(result?.stage1_resource_id),Number(result?.stage2_resource_id)]:[Number(result?.id)];
|
|
127
130
|
if (ids.some(id=>!Number.isSafeInteger(id) || id<1) || new Set(ids).size!==ids.length) throw new Error('Invalid generation receipt');
|
|
@@ -147,7 +150,8 @@ export class Assets {
|
|
|
147
150
|
signal.throwIfAborted();
|
|
148
151
|
// Original references remain bound to the request owner, source and slot before-image.
|
|
149
152
|
try {
|
|
150
|
-
|
|
153
|
+
const selected=await this.projects.resourcesFor?.({project:record.project,engine:record.engine});
|
|
154
|
+
record.asset=await importAsset(this.platform,record,signal,selected?.context.engine.directory??this.projects.engines?.[record.engine]?.context.engine.directory);record.import_status='completed';delete record.import_error;
|
|
151
155
|
} catch (error) {
|
|
152
156
|
record.import_status='failed';record.import_error={message:error.message};await this.store.save(record);throw error;
|
|
153
157
|
}
|
|
@@ -202,7 +206,7 @@ export class Assets {
|
|
|
202
206
|
return [...origins].sort();
|
|
203
207
|
}
|
|
204
208
|
async list(name) {
|
|
205
|
-
const project = await this.projects.owned(name), owner = this.platform.account().user_id;
|
|
209
|
+
const project = this.projects.inspect ? (await this.projects.inspect(name)).project : await this.projects.owned(name), owner = this.platform.account().user_id;
|
|
206
210
|
return (await this.store.list()).filter(r=>r.project === project && r.owner === owner && r.platform === this.platform.base)
|
|
207
211
|
.map(r=>({slot:r.slot,request_key:r.request_key,status:r.status,resource_id:r.resource_id,resource_ids:r.resource_ids,
|
|
208
212
|
source:r.source ?? 'aigc',library_asset_id:r.library?.asset_id,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import { lstat, readdir, readFile } from 'node:fs/promises';
|
|
3
3
|
import { createHash } from 'node:crypto';
|
|
4
|
+
import { hosts } from '../integrations/hosts.mjs';
|
|
4
5
|
|
|
5
6
|
export const bundleContracts = Object.freeze({ export:1, skills:1, mcp:1, sdk_lifecycle:1 });
|
|
6
7
|
export const digest = value => createHash('sha256').update(value).digest('hex');
|
|
@@ -11,7 +12,7 @@ export function bundleId(manifest) {
|
|
|
11
12
|
|
|
12
13
|
// Hash the complete engine payload, including executable skills, hooks and template.
|
|
13
14
|
// Common workflow and the selected engine guide travel with each version as well.
|
|
14
|
-
export async function bundleFiles(root, engine, target = false) {
|
|
15
|
+
export async function bundleFiles(root, engine, target = false, contextOnly = false) {
|
|
15
16
|
if (!['js','js3d'].includes(engine)) throw new Error('Unsupported bundle engine');
|
|
16
17
|
const files = {};
|
|
17
18
|
async function visit(relative) {
|
|
@@ -24,25 +25,27 @@ export async function bundleFiles(root, engine, target = false) {
|
|
|
24
25
|
}
|
|
25
26
|
if ((await lstat(root)).isSymbolicLink() || (await lstat(path.join(root,engine))).isSymbolicLink() ||
|
|
26
27
|
(await lstat(path.join(root,'craft-game-maker'))).isSymbolicLink()) throw new Error('Context bundle root contains a link');
|
|
27
|
-
for (const relative of [engine+'/context'
|
|
28
|
+
for (const relative of [engine+'/context',...(!contextOnly ? [engine+'/project'] : []),'craft-game-maker/SKILL.md','craft-game-maker/'+engine+'.md']) await visit(relative);
|
|
28
29
|
if (target) for (const relative of ['target.json','bootstrap','recovery.md']) await visit(relative);
|
|
29
30
|
return files;
|
|
30
31
|
}
|
|
31
32
|
|
|
32
|
-
export async function verifyBundle(root, engine, expectedId) {
|
|
33
|
+
export async function verifyBundle(root, engine, expectedId, {contextOnly = false} = {}) {
|
|
33
34
|
const file = path.join(root,engine,'bundle.json');
|
|
34
35
|
if (!(await lstat(file)).isFile() || (await lstat(file)).isSymbolicLink()) throw new Error('Invalid bundle manifest');
|
|
35
36
|
const manifest = JSON.parse(await readFile(file,'utf8'));
|
|
36
37
|
if (![1,2].includes(manifest.schema) || manifest.engine !== engine || manifest.id !== bundleId(manifest) ||
|
|
37
38
|
(expectedId && manifest.id !== expectedId)) throw new Error('Context bundle identity mismatch: ' + engine);
|
|
38
39
|
for (const [key,version] of Object.entries(bundleContracts)) {
|
|
40
|
+
if (key === 'mcp' && manifest.schema === 2 && manifest.contracts?.mcp === 2) continue;
|
|
39
41
|
if (manifest.contracts?.[key] !== version) throw new Error('Incompatible context contract: ' + key + '; install a Craft version supporting this bundle');
|
|
40
42
|
}
|
|
41
43
|
if (manifest.schema === 2) {
|
|
42
44
|
const target = JSON.parse(await readFile(path.join(root,'target.json'),'utf8'));
|
|
43
|
-
if (!
|
|
45
|
+
if (!Object.hasOwn(hosts,manifest.host) || target.host !== manifest.host || target.engine !== engine || target.version !== manifest.version) throw new Error('Context target identity mismatch');
|
|
44
46
|
}
|
|
45
|
-
const actual = await bundleFiles(root,engine,manifest.schema === 2);
|
|
46
|
-
|
|
47
|
+
const actual = await bundleFiles(root,engine,manifest.schema === 2,contextOnly);
|
|
48
|
+
const expected = contextOnly ? Object.fromEntries(Object.entries(manifest.files).filter(([name])=>!name.startsWith(engine+'/project/'))) : manifest.files;
|
|
49
|
+
if (JSON.stringify(actual) !== JSON.stringify(expected)) throw new Error('Context bundle integrity check failed: ' + engine);
|
|
47
50
|
return manifest;
|
|
48
51
|
}
|
|
@@ -6,7 +6,8 @@ import { finalizeGameContext, buildJsStatic, prepareStaticArtifacts, prepareBrow
|
|
|
6
6
|
import { fingerprint } from './projects.mjs';
|
|
7
7
|
import { atomicJson } from './request-store.mjs';
|
|
8
8
|
import { engineDefinition } from './engines.mjs';
|
|
9
|
-
import { freezeCheckedBuild } from './draft-archive.mjs';
|
|
9
|
+
import { freezeCheckedBuild, freezeCheckedSource } from './draft-archive.mjs';
|
|
10
|
+
import { guardWork } from './work-scope.mjs';
|
|
10
11
|
|
|
11
12
|
export function validateSteps(steps) {
|
|
12
13
|
if (!Array.isArray(steps) || steps.length !== 3) throw new Error('Provide three test steps: loop, settlement, restart');
|
|
@@ -45,10 +46,13 @@ export async function checkGame(project, resources, brief, steps, signal) {
|
|
|
45
46
|
validateSteps(steps);
|
|
46
47
|
const engine = resources.engine;
|
|
47
48
|
engineDefinition(engine);
|
|
49
|
+
await guardWork();
|
|
48
50
|
await finalizeGameContext({ workspaceDir:project, contextDir:resources.context,
|
|
49
51
|
engine, onLog:line=>process.stderr.write('[craft] ' + line + '\n') },signal);
|
|
50
52
|
const source = await fingerprint(project);
|
|
53
|
+
await guardWork();
|
|
51
54
|
await buildJsStatic(project,120000,{},signal);
|
|
55
|
+
await guardWork();
|
|
52
56
|
if (source !== await fingerprint(project)) throw new Error('Sources changed during build; finish editing and check again');
|
|
53
57
|
const artifacts = await prepareStaticArtifacts(path.join(project,'dist'));
|
|
54
58
|
const browserEnv = await prepareBrowserEnvironment({ cwd:project, env:process.env, signal });
|
|
@@ -57,6 +61,7 @@ export async function checkGame(project, resources, brief, steps, signal) {
|
|
|
57
61
|
const snapshotId = randomUUID(), runDir = path.join(await realpath(resources.evidence),snapshotId);
|
|
58
62
|
await mkdir(runDir,{ mode:0o700 });
|
|
59
63
|
await freezeCheckedBuild(project,runDir,artifacts,signal);
|
|
64
|
+
const sourceSnapshot = await freezeCheckedSource(project,runDir,signal);
|
|
60
65
|
const requestFile = path.join(runDir,'request.json');
|
|
61
66
|
await atomicJson(requestFile,{ project, engine, brief, steps, limits:{ browser_deadline_ms:180000, screenshot_timeout_ms:15000 } });
|
|
62
67
|
const result = await runProcess(process.execPath,[fileURLToPath(new URL('./capture-worker.mjs',import.meta.url)), resources.capture, requestFile],{
|
|
@@ -64,10 +69,11 @@ export async function checkGame(project, resources, brief, steps, signal) {
|
|
|
64
69
|
env:{ PATH:process.env.PATH ?? '', HOME:process.env.HOME ?? '', ...browserEnv },
|
|
65
70
|
});
|
|
66
71
|
signal.throwIfAborted();
|
|
72
|
+
await guardWork();
|
|
67
73
|
if (result.exitCode !== 0 || result.timedOut) throw new Error('Game capture failed: ' + (result.stderr || result.stdout).slice(-1500));
|
|
68
74
|
const capture = JSON.parse(await readFile(path.join(runDir,'capture.json'),'utf8'));
|
|
69
75
|
if (source !== await fingerprint(project)) throw new Error('Sources changed during browser verification; check again');
|
|
70
76
|
const gate = evaluateCapture(capture,steps,engine);
|
|
71
|
-
return { engine, source, artifacts, snapshot_id:snapshotId, gate, capture, screenshots:capture.shots.map(shot=>path.join(runDir,shot.file)),
|
|
77
|
+
return { engine, source, artifacts, snapshot_id:snapshotId, source_snapshot:sourceSnapshot, gate, capture, screenshots:capture.shots.map(shot=>path.join(runDir,shot.file)),
|
|
72
78
|
visual_review:'required', next:gate.passed ? 'Inspect the screenshots using the host AI IDE; then craft_game_deliver with this check task id.' : 'Fix the reported errors, then check again.' };
|
|
73
79
|
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { readFile, rm } from 'node:fs/promises';
|
|
2
|
+
import { createHash } from 'node:crypto';
|
|
3
|
+
import { safeProjectFile } from './asset-import.mjs';
|
|
4
|
+
import { atomicJson } from './request-store.mjs';
|
|
5
|
+
import { projectSkillPath } from '../integrations/hosts.mjs';
|
|
6
|
+
import { entryPolicyVersion, projectEntryPolicy, validateProjectRecoveryEntries } from './project-context.mjs';
|
|
7
|
+
|
|
8
|
+
const readyFile='.craft/context-ready.json';
|
|
9
|
+
export const preparingFile='.craft/context-preparing.json';
|
|
10
|
+
const hash=value=>createHash('sha256').update(value).digest('hex');
|
|
11
|
+
async function optional(project,file) {
|
|
12
|
+
try {return JSON.parse(await readFile(await safeProjectFile(project,file),'utf8'));}
|
|
13
|
+
catch(error) {if(error.code==='ENOENT') return null; throw error;}
|
|
14
|
+
}
|
|
15
|
+
// Skill metadata affects discovery and is part of the revision. User text outside
|
|
16
|
+
// managed memory/rule sections remains project-owned and does not invalidate work.
|
|
17
|
+
async function entryHash(project,file) {
|
|
18
|
+
const text=await readFile(await safeProjectFile(project,file),'utf8');
|
|
19
|
+
if(file.endsWith('/SKILL.md')) return hash(text);
|
|
20
|
+
const start='<!-- craft-mcp:project:start -->',end='<!-- craft-mcp:project:end -->';
|
|
21
|
+
const a=text.indexOf(start),b=text.indexOf(end);
|
|
22
|
+
const metadata=file.endsWith('.mdc') ? text.match(/^---\r?\n[\s\S]*?\r?\n---(?:\r?\n|$)/)?.[0] ?? '' : '';
|
|
23
|
+
return hash(a>=0 && b>a ? metadata+text.slice(a,b+end.length) : text);
|
|
24
|
+
}
|
|
25
|
+
function recoveryFiles(lock) {
|
|
26
|
+
const entries=['AGENTS.md'];
|
|
27
|
+
for(const [directory,host] of Object.entries(lock?.active_hosts??{})) {
|
|
28
|
+
entries.push(projectSkillPath(host));
|
|
29
|
+
if(directory==='.codebuddy') entries.push(directory+'/CODEBUDDY.md');
|
|
30
|
+
if(directory==='.cursor') entries.push(directory+'/rules/craft.mdc');
|
|
31
|
+
if(host==='claude') entries.push(directory+'/CLAUDE.md');
|
|
32
|
+
}
|
|
33
|
+
return [...new Set(entries.filter(Boolean))].sort();
|
|
34
|
+
}
|
|
35
|
+
export async function inspectContextState(project,lock,{full=false,ignorePreparing=false}={}) {
|
|
36
|
+
try {
|
|
37
|
+
const ready=await optional(project,readyFile);
|
|
38
|
+
if(ready?.schema>2 || ready?.entry_policy_version>entryPolicyVersion) return {status:'blocked',reason:'Recovery entries require a newer Craft runtime; entry policy cannot be downgraded'};
|
|
39
|
+
if(!ignorePreparing && await optional(project,preparingFile)) return {status:'recovery_required',reason:'Context preparation has not committed all recovery entries'};
|
|
40
|
+
if(!ready || ready.schema!==2 || !ready.files || Array.isArray(ready.files) || ready.lock_hash!==hash(JSON.stringify(lock)) ||
|
|
41
|
+
JSON.stringify(Object.keys(ready.files).sort())!==JSON.stringify(recoveryFiles(lock))) return {status:'required',reason:'Context and recovery entries need preparation'};
|
|
42
|
+
const content={lock_hash:ready.lock_hash,entry_policy_version:ready.entry_policy_version,entry_policy_hash:ready.entry_policy_hash,files:ready.files};
|
|
43
|
+
if(ready.revision!==hash(JSON.stringify(content))) return {status:'required',reason:'Recovery entry revision needs preparation'};
|
|
44
|
+
const expected=projectEntryPolicy(project,lock);
|
|
45
|
+
if(ready.entry_policy_version!==expected.entry_policy_version || ready.entry_policy_hash!==expected.entry_policy_hash) return {status:'required',reason:'Installed recovery entry policy changed',...expected};
|
|
46
|
+
if(full) for(const [file,checksum] of Object.entries(ready.files)) if(await entryHash(project,file)!==checksum) return {status:'required',reason:'Managed recovery entry changed: '+file};
|
|
47
|
+
const discovery=await validateProjectRecoveryEntries(project,lock);
|
|
48
|
+
return {status:'ready',context_revision:ready.revision,...expected,discovery};
|
|
49
|
+
} catch(error) {return {status:'recovery_required',reason:error.message};}
|
|
50
|
+
}
|
|
51
|
+
export async function beginContextPreparation(project,host) {
|
|
52
|
+
await atomicJson(await safeProjectFile(project,preparingFile,true),{schema:1,host,started_at:new Date().toISOString()});
|
|
53
|
+
}
|
|
54
|
+
export async function finishContextPreparation(project,lock,guard=async()=>{}) {
|
|
55
|
+
await guard();
|
|
56
|
+
await validateProjectRecoveryEntries(project,lock);
|
|
57
|
+
const files={};
|
|
58
|
+
for(const file of recoveryFiles(lock)) files[file]=await entryHash(project,file);
|
|
59
|
+
const content={lock_hash:hash(JSON.stringify(lock)),...projectEntryPolicy(project,lock),files};
|
|
60
|
+
const revision=hash(JSON.stringify(content));
|
|
61
|
+
await guard();
|
|
62
|
+
await validateProjectRecoveryEntries(project,lock);
|
|
63
|
+
for(const [file,checksum] of Object.entries(files)) if(await entryHash(project,file)!==checksum) throw new Error('Recovery entry changed before readiness commit: '+file);
|
|
64
|
+
await atomicJson(await safeProjectFile(project,readyFile,true),{schema:2,...content,revision});
|
|
65
|
+
await rm(await safeProjectFile(project,preparingFile),{force:true});
|
|
66
|
+
return revision;
|
|
67
|
+
}
|
|
@@ -1,7 +1,129 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
|
+
import { isUtf8 } from 'node:buffer';
|
|
3
|
+
import { constants as fsConstants } from 'node:fs';
|
|
4
|
+
import { createHash } from 'node:crypto';
|
|
2
5
|
import { encodeExternalGameArchive } from '#craft-sdk';
|
|
3
|
-
import { lstat, mkdir, realpath, writeFile } from 'node:fs/promises';
|
|
6
|
+
import { lstat, mkdir, open, readdir, realpath, unlink, writeFile } from 'node:fs/promises';
|
|
4
7
|
import { snapshotFiles } from '../preview/preview-snapshot.mjs';
|
|
8
|
+
import { legacySourceFormat, sourceFormat, validSourceMetadata } from '../upstream/draft-source.mjs';
|
|
9
|
+
|
|
10
|
+
const sourceMaxFiles = 2000;
|
|
11
|
+
const sourceReadFlags = fsConstants.O_RDONLY | (fsConstants.O_NOFOLLOW ?? 0) | (fsConstants.O_NONBLOCK ?? 0);
|
|
12
|
+
const windowsDevice = /^(?:con|prn|aux|nul|com[1-9¹²³]|lpt[1-9¹²³])(?:\.|$)/i;
|
|
13
|
+
const credentialName = /(?:^|[._-])(?:env|secret|secrets|credential|credentials|token|private[_-]?key)(?:$|[._-])/i;
|
|
14
|
+
const credentialExtension = /\.(?:pem|p12|pfx|key|keystore)$/i;
|
|
15
|
+
const sourceExcludedDirectories = new Set(['node_modules','dist']);
|
|
16
|
+
// Match the Web editor's codeFileContent.ts. Other extensions use Base64 even when the bytes are UTF-8.
|
|
17
|
+
const textExtensions = new Set([
|
|
18
|
+
'b64','bat','c','cfg','cmd','conf','cpp','cs','css','csv','env','gd','gdshader','gitignore','glsl','go','h','hpp',
|
|
19
|
+
'html','htm','import','ini','java','js','json','jsx','less','lua','md','mjs','php','proto','py','rb','rs','scss',
|
|
20
|
+
'sh','sql','svg','toml','tres','tscn','ts','tsx','txt','vue','xml','yaml','yml','mts',
|
|
21
|
+
]);
|
|
22
|
+
|
|
23
|
+
function skipSourceEntry(name, relative) {
|
|
24
|
+
const lower = name.toLowerCase(), match = relative.toLowerCase();
|
|
25
|
+
return name.startsWith('.') || credentialName.test(name) || credentialExtension.test(name) ||
|
|
26
|
+
sourceExcludedDirectories.has(lower) || match === 'vendor' || match === 'spec/progress.md' || match === 'spec/cloud-import';
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function checkSourcePath(name, relative) {
|
|
30
|
+
if (!name || name !== name.normalize('NFC') || Buffer.byteLength(relative) > 240 ||
|
|
31
|
+
/[\\:%?#<>|"*\p{Cc}]/u.test(name) || /[. ]$/.test(name) || windowsDevice.test(name)) {
|
|
32
|
+
throw new Error('Project source contains a path that cannot be restored across platforms');
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function sameSourceFile(before, after, allowMissingPathDevice = false) {
|
|
37
|
+
const missingPathDevice = allowMissingPathDevice && process.platform === 'win32' && before.dev === 0n;
|
|
38
|
+
return after.isFile() && (before.dev === after.dev || missingPathDevice) && before.ino !== 0n && before.ino === after.ino &&
|
|
39
|
+
before.size === after.size && before.mtimeNs === after.mtimeNs && before.ctimeNs === after.ctimeNs;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
async function readSourceFile(handle, size, signal, changed) {
|
|
43
|
+
const data = Buffer.alloc(size + 1);
|
|
44
|
+
let offset = 0;
|
|
45
|
+
while (offset < data.length) {
|
|
46
|
+
signal?.throwIfAborted();
|
|
47
|
+
const { bytesRead } = await handle.read(data,offset,data.length - offset,offset);
|
|
48
|
+
if (!bytesRead) break;
|
|
49
|
+
offset += bytesRead;
|
|
50
|
+
}
|
|
51
|
+
if (offset !== size) throw changed();
|
|
52
|
+
return data.subarray(0,offset);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export async function freezeCheckedSource(project, runDirectory, signal) {
|
|
56
|
+
signal?.throwIfAborted();
|
|
57
|
+
const root = await realpath(project);
|
|
58
|
+
const output = path.join(runDirectory,'source');
|
|
59
|
+
const relativeOutput = path.relative(root,await realpath(runDirectory));
|
|
60
|
+
if (!path.isAbsolute(relativeOutput) && relativeOutput !== '..' && !relativeOutput.startsWith('..' + path.sep)) {
|
|
61
|
+
throw new Error('Project source snapshots must be stored outside the project');
|
|
62
|
+
}
|
|
63
|
+
await mkdir(output,{ mode:0o700 });
|
|
64
|
+
const snapshot = path.join(output,'files.json');
|
|
65
|
+
const handle = await open(snapshot,'wx',0o600);
|
|
66
|
+
const hash = createHash('sha256');
|
|
67
|
+
let files = 0, bytes = 0;
|
|
68
|
+
async function append(value) {
|
|
69
|
+
bytes += Buffer.byteLength(value);
|
|
70
|
+
await handle.writeFile(value,{ signal });
|
|
71
|
+
hash.update(value);
|
|
72
|
+
}
|
|
73
|
+
async function collect(directory, prefix) {
|
|
74
|
+
const entries = await readdir(directory,{ withFileTypes:true });
|
|
75
|
+
entries.sort((left,right)=>Buffer.compare(Buffer.from(left.name),Buffer.from(right.name)));
|
|
76
|
+
const names = new Set();
|
|
77
|
+
for (const entry of entries) {
|
|
78
|
+
signal?.throwIfAborted();
|
|
79
|
+
const relative = prefix + entry.name;
|
|
80
|
+
if (skipSourceEntry(entry.name,relative) || entry.isSymbolicLink()) continue;
|
|
81
|
+
checkSourcePath(entry.name,relative);
|
|
82
|
+
const nameKey = entry.name.toLowerCase();
|
|
83
|
+
if (names.has(nameKey)) throw new Error('Project source contains conflicting paths');
|
|
84
|
+
names.add(nameKey);
|
|
85
|
+
const file = path.join(directory,entry.name);
|
|
86
|
+
if (await realpath(file) !== file) throw new Error('Project source path changed during collection');
|
|
87
|
+
if (entry.isDirectory()) {
|
|
88
|
+
await collect(file,relative + '/');
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
if (!entry.isFile()) throw new Error('Project source must be a regular file');
|
|
92
|
+
if (++files > sourceMaxFiles) throw new Error('Project source snapshot exceeds the 2000 file limit');
|
|
93
|
+
const dot = entry.name.lastIndexOf('.');
|
|
94
|
+
const binary = dot > 0 && !textExtensions.has(entry.name.slice(dot + 1).toLowerCase());
|
|
95
|
+
const changed = () => new Error('Project source changed during collection');
|
|
96
|
+
const before = await lstat(file,{ bigint:true });
|
|
97
|
+
if (!before.isFile()) throw changed();
|
|
98
|
+
const source = await open(file,sourceReadFlags);
|
|
99
|
+
let data;
|
|
100
|
+
try {
|
|
101
|
+
const opened = await source.stat({ bigint:true });
|
|
102
|
+
if (!sameSourceFile(before,opened,true) || await realpath(file) !== file) throw changed();
|
|
103
|
+
const size = Number(opened.size);
|
|
104
|
+
data = await readSourceFile(source,size,signal,changed);
|
|
105
|
+
if (!sameSourceFile(opened,await source.stat({ bigint:true })) || await realpath(file) !== file ||
|
|
106
|
+
!sameSourceFile(before,await lstat(file,{ bigint:true }))) throw changed();
|
|
107
|
+
} finally { await source.close(); }
|
|
108
|
+
if (!binary && (!isUtf8(data) || data.includes(0))) throw new Error(`Project source file must contain UTF-8 text: ${relative}`);
|
|
109
|
+
const content = data.toString(binary ? 'base64' : 'utf8');
|
|
110
|
+
await append((files > 1 ? ',' : '') + JSON.stringify({ path:relative,content }));
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
let complete = false;
|
|
114
|
+
try {
|
|
115
|
+
await append('[');
|
|
116
|
+
await collect(root,'');
|
|
117
|
+
if (!files) throw new Error('Project source snapshot is empty');
|
|
118
|
+
await append(']');
|
|
119
|
+
signal?.throwIfAborted();
|
|
120
|
+
complete = true;
|
|
121
|
+
} finally {
|
|
122
|
+
await handle.close();
|
|
123
|
+
if (!complete) await unlink(snapshot).catch(()=>{});
|
|
124
|
+
}
|
|
125
|
+
return { format:sourceFormat,bytes,sha256:hash.digest('hex') };
|
|
126
|
+
}
|
|
5
127
|
|
|
6
128
|
function checkedName(name) {
|
|
7
129
|
const parts = name.split('/');
|
|
@@ -28,7 +150,7 @@ export async function freezeCheckedBuild(project, runDirectory, artifacts, signa
|
|
|
28
150
|
return output;
|
|
29
151
|
}
|
|
30
152
|
|
|
31
|
-
|
|
153
|
+
async function checkedRunDirectory(evidence, snapshotId) {
|
|
32
154
|
if (typeof snapshotId !== 'string' || !/^[0-9a-f-]{36}$/.test(snapshotId)) {
|
|
33
155
|
throw new Error('The check has no frozen build. Run craft_game_check again');
|
|
34
156
|
}
|
|
@@ -37,6 +159,29 @@ export async function checkedDraftFiles(evidence, snapshotId, artifacts, signal)
|
|
|
37
159
|
if ((await lstat(runDirectory)).isSymbolicLink() || await realpath(runDirectory) !== runDirectory) {
|
|
38
160
|
throw new Error('Invalid frozen build directory');
|
|
39
161
|
}
|
|
162
|
+
return runDirectory;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export async function checkedDraftSource(evidence, snapshotId, metadata, signal) {
|
|
166
|
+
if (!validSourceMetadata(metadata)) throw new Error('This check has no valid frozen project source. Run craft_game_check again');
|
|
167
|
+
const directory = path.join(await checkedRunDirectory(evidence,snapshotId),'source');
|
|
168
|
+
const file = path.join(directory,metadata.format === legacySourceFormat ? 'code.json' : 'files.json');
|
|
169
|
+
if ((await lstat(directory)).isSymbolicLink() || (await lstat(file)).isSymbolicLink() || await realpath(file) !== file) {
|
|
170
|
+
throw new Error('Invalid frozen project source path');
|
|
171
|
+
}
|
|
172
|
+
const changed = () => new Error('Frozen project source changed. Run craft_game_check again');
|
|
173
|
+
const handle = await open(file,sourceReadFlags);
|
|
174
|
+
try {
|
|
175
|
+
const stat = await handle.stat();
|
|
176
|
+
if (!stat.isFile() || stat.size !== metadata.bytes) throw changed();
|
|
177
|
+
const content = await readSourceFile(handle,metadata.bytes,signal,changed);
|
|
178
|
+
if (createHash('sha256').update(content).digest('hex') !== metadata.sha256) throw changed();
|
|
179
|
+
return content;
|
|
180
|
+
} finally { await handle.close(); }
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export async function checkedDraftFiles(evidence, snapshotId, artifacts, signal) {
|
|
184
|
+
const runDirectory = await checkedRunDirectory(evidence,snapshotId);
|
|
40
185
|
const frozen = artifacts.map(artifact => {
|
|
41
186
|
checkedName(artifact.relativePath);
|
|
42
187
|
return { ...artifact, path: path.join(runDirectory, 'dist', ...artifact.relativePath.split('/')) };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
|
|
3
|
+
export function draftUploadIdentity(checkId, { upload_mode = 'current_project', request_key } = {}) {
|
|
4
|
+
if (!['current_project','new_project'].includes(upload_mode)) throw new Error('Invalid upload_mode');
|
|
5
|
+
if (request_key !== undefined && (typeof request_key !== 'string' || !/^[A-Za-z0-9_-]{1,80}$/.test(request_key))) throw new Error('Invalid upload request_key');
|
|
6
|
+
if (upload_mode === 'new_project' && !request_key) throw new Error('New project uploads require a request_key; reuse it when retrying');
|
|
7
|
+
if (!request_key) return { id:checkId, upload_mode };
|
|
8
|
+
const hash = createHash('sha256').update(JSON.stringify(['draft-upload-v1',checkId,upload_mode,request_key])).digest('hex');
|
|
9
|
+
const id = [hash.slice(0,8),hash.slice(8,12),'5'+hash.slice(13,16),'8'+hash.slice(17,20),hash.slice(20,32)].join('-');
|
|
10
|
+
return { id, upload_mode, request_key };
|
|
11
|
+
}
|