@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
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import path from 'node:path';
|
|
2
|
-
import { randomUUID, createHash } from 'node:crypto';
|
|
3
|
-
import { fileURLToPath } from 'node:url';
|
|
4
|
-
import { lstat, mkdir, readFile, realpath } from 'node:fs/promises';
|
|
5
|
-
import { prepareBrowserEnvironment, runProcess } from '#craft-sdk';
|
|
6
|
-
import { checkedDraftArchive } from './draft-archive.mjs';
|
|
7
|
-
import { atomicJson } from './request-store.mjs';
|
|
8
|
-
import { engineDefinition } from './engines.mjs';
|
|
9
|
-
import { validateSteps } from './check.mjs';
|
|
10
|
-
|
|
11
|
-
const environmentKeys = new Set(['PATH','HOME','USERPROFILE','APPDATA','LOCALAPPDATA','SYSTEMROOT','WINDIR',
|
|
12
|
-
'COMSPEC','TEMP','TMP','TMPDIR','XDG_CACHE_HOME','NODE_PATH','PLAYWRIGHT_PACKAGE_ROOT',
|
|
13
|
-
'PLAYWRIGHT_BROWSERS_PATH','CRAFT_BROWSER_EXECUTABLE','CRAFT_RUNTIME_POLICY']);
|
|
14
|
-
|
|
15
|
-
// The SDK browser preparer merges the parent environment. Undefined overrides
|
|
16
|
-
// deliberately erase every other inherited key, including unknown credentials.
|
|
17
|
-
export function publishCaptureEnvironment(source = process.env) {
|
|
18
|
-
return Object.fromEntries(Object.entries(source).map(([key,value])=>[key,environmentKeys.has(key.toUpperCase()) ? value : undefined]));
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
async function ordinaryJson(file, maximum = 256 * 1024) {
|
|
22
|
-
const stat = await lstat(file);
|
|
23
|
-
if (!stat.isFile() || stat.isSymbolicLink() || stat.size > maximum) throw new Error('Invalid publish capture record');
|
|
24
|
-
return JSON.parse(await readFile(file,'utf8'));
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
async function checkedImage(image, directory) {
|
|
28
|
-
if (!image || typeof image.path !== 'string' || path.dirname(image.path) !== directory ||
|
|
29
|
-
!/^shot-[0-8]\.jpg$/.test(path.basename(image.path))) throw new Error('Invalid publish screenshot path');
|
|
30
|
-
const stat = await lstat(image.path);
|
|
31
|
-
if (!stat.isFile() || stat.isSymbolicLink() || stat.size < 4 || stat.size > 2 * 1024 * 1024) throw new Error('Invalid publish screenshot size');
|
|
32
|
-
const data = await readFile(image.path);
|
|
33
|
-
if (data[0] !== 0xff || data[1] !== 0xd8 || data[2] !== 0xff ||
|
|
34
|
-
data.length !== image.bytes || createHash('sha256').update(data).digest('hex') !== image.sha256) throw new Error('Publish screenshot changed');
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export async function capturePublishMaterial(check, evidence, signal) {
|
|
38
|
-
signal.throwIfAborted();
|
|
39
|
-
const result = check?.result;
|
|
40
|
-
if (check?.kind !== 'check' || check.status !== 'completed' || !result?.gate?.passed ||
|
|
41
|
-
!/^[0-9a-f-]{36}$/.test(check.task_id)) throw new Error('A completed passing game check is required for publish capture');
|
|
42
|
-
engineDefinition(result.engine);
|
|
43
|
-
const archive = await checkedDraftArchive(evidence,result.snapshot_id,result.artifacts,signal);
|
|
44
|
-
const evidenceRoot = await realpath(evidence), snapshot = path.join(evidenceRoot,result.snapshot_id);
|
|
45
|
-
const original = await ordinaryJson(path.join(snapshot,'request.json'));
|
|
46
|
-
if (original.engine !== result.engine) throw new Error('Publish capture engine differs from its check');
|
|
47
|
-
validateSteps(original.steps);
|
|
48
|
-
const directory = path.join(snapshot,'publish-' + randomUUID());
|
|
49
|
-
await mkdir(directory,{ mode:0o700 });
|
|
50
|
-
const requestFile = path.join(directory,'request.json');
|
|
51
|
-
await atomicJson(requestFile,{ check_task_id:check.task_id, snapshot_id:result.snapshot_id, engine:result.engine,
|
|
52
|
-
evidence:evidenceRoot, artifacts:result.artifacts, archive_sha256:archive.sha256, steps:original.steps });
|
|
53
|
-
const safe = publishCaptureEnvironment();
|
|
54
|
-
const browser = await prepareBrowserEnvironment({ cwd:snapshot,env:safe,signal });
|
|
55
|
-
const env = Object.fromEntries(Object.entries({ ...safe,...browser }).filter(([,value])=>value !== undefined));
|
|
56
|
-
const resources = process.env.CRAFT_MCP_RESOURCES_DIR || fileURLToPath(new URL('../../resources/',import.meta.url));
|
|
57
|
-
const runner = path.join(resources,'game_visual_qa.mjs');
|
|
58
|
-
const run = await runProcess(process.execPath,[fileURLToPath(new URL('./publish-capture-worker.mjs',import.meta.url)),runner,requestFile],{
|
|
59
|
-
cwd:snapshot,env,signal,timeoutMs:200000,
|
|
60
|
-
});
|
|
61
|
-
signal.throwIfAborted();
|
|
62
|
-
if (run.exitCode !== 0 || run.timedOut || run.aborted) throw new Error('Publish playtest capture failed: ' + (run.stderr || run.stdout).slice(-1500));
|
|
63
|
-
const receipt = await ordinaryJson(path.join(directory,'receipt.json'));
|
|
64
|
-
if (receipt.check_task_id !== check.task_id || receipt.snapshot_id !== result.snapshot_id ||
|
|
65
|
-
receipt.engine !== result.engine || receipt.archive_sha256 !== archive.sha256 ||
|
|
66
|
-
!Number.isFinite(receipt.playtest_seconds) || receipt.playtest_seconds < 30 ||
|
|
67
|
-
!Array.isArray(receipt.screenshots) || receipt.screenshots.length !== 4 ||
|
|
68
|
-
!Array.isArray(receipt.audit_screenshots) || receipt.audit_screenshots.length !== 9) throw new Error('Invalid publish capture receipt');
|
|
69
|
-
for (const image of [...receipt.screenshots,...receipt.audit_screenshots]) await checkedImage(image,directory);
|
|
70
|
-
const after = await checkedDraftArchive(evidenceRoot,result.snapshot_id,result.artifacts,signal);
|
|
71
|
-
if (after.sha256 !== archive.sha256) throw new Error('Frozen build changed during publish capture');
|
|
72
|
-
return { ...receipt, screenshot_files:receipt.screenshots,audit_screenshot_files:receipt.audit_screenshots,
|
|
73
|
-
screenshots:receipt.screenshots.map(image=>image.path),audit_screenshots:receipt.audit_screenshots.map(image=>image.path),
|
|
74
|
-
receipt_path:path.join(directory,'receipt.json') };
|
|
75
|
-
}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="zh-CN">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
6
|
-
<meta name="craft-csrf" content="__CSRF__">
|
|
7
|
-
<title>发布到 Craft</title>
|
|
8
|
-
<style>
|
|
9
|
-
:root{font:15px/1.65 system-ui,-apple-system,"Segoe UI","Microsoft YaHei",sans-serif;color:#18223b;background:#f4f6fb;color-scheme:light;--muted:#5d6981;--line:#dce1ed;--brand:#2858c8;--danger:#a1232c}
|
|
10
|
-
*{box-sizing:border-box}body{margin:0}main{max-width:1120px;margin:0 auto;padding:36px 24px 56px}h1,h2,h3,p{margin:0}h1{font-size:28px;line-height:1.35}h2{font-size:19px}h3{font-size:15px}.intro{margin:10px 0 22px;color:var(--muted)}.topline{display:flex;gap:20px;align-items:flex-start;justify-content:space-between}
|
|
11
|
-
button,input,textarea,select{font:inherit}button{cursor:pointer;border:1px solid transparent;border-radius:8px;padding:10px 17px;background:var(--brand);color:white;font-weight:600}button.secondary{color:var(--brand);border-color:#c6d2ed;background:#fff}button.quiet{padding:5px 8px;background:transparent;color:var(--muted);font-weight:400}button:disabled{opacity:.5;cursor:not-allowed}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #9ab9ff;outline-offset:3px}
|
|
12
|
-
.steps{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;list-style:none;padding:0;margin:0 0 22px}.steps li{border-top:3px solid var(--line);padding-top:8px;color:var(--muted);font-size:13px}.steps li.current{border-color:var(--brand);color:var(--brand);font-weight:600}.steps li.done{border-color:#93abd9}
|
|
13
|
-
.notice{border:1px solid #cedbf4;border-radius:10px;background:#edf3ff;padding:13px 16px;margin-bottom:18px;white-space:pre-wrap}.notice.error{border-color:#ebc8cc;background:#fff2f3;color:var(--danger)}.notice[hidden],section[hidden],div[hidden],p[hidden],a[hidden]{display:none}.layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:20px;align-items:start}.card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:22px}.stack{display:grid;gap:20px}.section-intro{color:var(--muted);font-size:13px;margin:7px 0 18px}
|
|
14
|
-
.context{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:4px 14px;margin:14px 0 0;font-size:13px}.context dt{color:var(--muted)}.context dd{margin:0;overflow-wrap:anywhere}.state{display:inline-block;padding:2px 9px;border-radius:6px;background:#edf3ff;color:var(--brand);font-size:13px;margin-top:12px}
|
|
15
|
-
fieldset{padding:0;border:0;margin:0;min-width:0}label.field{display:block;margin:0 0 17px;font-weight:600}label.field>span{display:block;margin-bottom:6px}input[type=text],textarea,select{width:100%;padding:10px 12px;border:1px solid #aab5cc;border-radius:8px;background:#fff;color:inherit;font-weight:400}textarea{resize:vertical;min-height:125px}input[type=file]{width:100%;font-weight:400;font-size:13px}input[type=checkbox]{width:17px;height:17px;accent-color:var(--brand);flex:none;margin:3px 0 0}small,.help{display:block;font-size:12px;color:var(--muted);font-weight:400;margin-top:5px}.tag-group{margin-bottom:17px}.tag-group legend{font-weight:600;margin-bottom:6px}.tags{display:flex;flex-wrap:wrap;gap:7px;max-height:150px;overflow:auto}.tag{display:flex;gap:7px;align-items:flex-start;border:1px solid var(--line);padding:5px 8px;border-radius:6px;font-size:13px;font-weight:400}.tag input{width:14px;height:14px}.empty{font-size:13px;color:var(--muted)}
|
|
16
|
-
.cover-preview{display:block;width:100%;max-height:220px;object-fit:contain;border-radius:8px;background:#f4f6fb;margin-top:10px}.cover-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:6px}.privacy-note{padding:11px 13px;background:#f4f6fb;border-radius:8px;font-size:13px;color:var(--muted);margin-bottom:17px}.actions{display:flex;flex-wrap:wrap;gap:9px;align-items:center}.preparing{margin-top:10px;font-size:13px;color:var(--brand)}
|
|
17
|
-
.review-data{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:8px 14px;margin:16px 0}.review-data dt{color:var(--muted);font-size:13px}.review-data dd{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}.revision{display:block;overflow-wrap:anywhere;background:#f4f6fb;border-radius:8px;padding:10px 12px;font:12px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace}.image-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0}figure{margin:0;min-width:0}.image-button{display:block;width:100%;padding:0;border:1px solid var(--line);border-radius:8px;background:#f4f6fb;overflow:hidden}.image-button img{display:block;width:100%;height:180px;object-fit:contain}.image-button:focus-visible{outline-offset:3px}figcaption{font-size:12px;color:var(--muted);padding-top:5px}.confirmation{display:flex;gap:10px;padding:14px 0;border-top:1px solid var(--line);font-size:13px}.confirmation strong{color:#18223b}.public-link{display:inline-block;color:var(--brand);font-weight:600;margin-top:10px;text-underline-offset:3px}.pending{font-size:13px;color:var(--muted);white-space:pre-wrap;margin-top:10px}
|
|
18
|
-
details.preview{grid-column:1/-1;background:#fff;border:1px solid var(--line);border-radius:14px;padding:16px 22px}summary{cursor:pointer;font-weight:600}iframe{display:block;width:100%;height:440px;border:1px solid var(--line);border-radius:8px;background:#111;margin-top:12px}.preview p{font-size:13px;color:var(--muted);margin-top:8px}
|
|
19
|
-
dialog{width:min(1000px,calc(100% - 32px));max-height:94vh;border:1px solid var(--line);border-radius:12px;padding:16px;color:#18223b}dialog::backdrop{background:#152344b3}.viewer-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:12px}dialog img{display:block;width:100%;max-height:78vh;object-fit:contain;background:#f4f6fb}.footer-note{margin-top:22px;color:var(--muted);font-size:12px}
|
|
20
|
-
@media(max-width:800px){main{padding:24px 16px 40px}.layout{grid-template-columns:1fr}.topline{gap:12px}h1{font-size:24px}.card{padding:18px}.steps{gap:5px}.steps li{font-size:12px}.image-button img{height:155px}iframe{height:340px}}
|
|
21
|
-
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
|
|
22
|
-
</style>
|
|
23
|
-
</head>
|
|
24
|
-
<body>
|
|
25
|
-
<main>
|
|
26
|
-
<header class="topline">
|
|
27
|
-
<div><h1 id="page-title">发布到 Craft</h1><p class="intro">先在本机准备和审阅材料,确认后再公开上传图片并提交审核。</p></div>
|
|
28
|
-
<button id="refresh" type="button" class="secondary">刷新进度</button>
|
|
29
|
-
</header>
|
|
30
|
-
<ol class="steps" aria-label="发布步骤">
|
|
31
|
-
<li id="step-edit" class="current">填写资料</li><li id="step-prepare">准备与采集</li><li id="step-review">审阅材料</li><li id="step-submit">提交审核</li>
|
|
32
|
-
</ol>
|
|
33
|
-
<div id="message" class="notice" role="status" aria-live="polite">正在读取本地发布会话…</div>
|
|
34
|
-
<div id="error" class="notice error" role="alert" hidden></div>
|
|
35
|
-
<div class="layout">
|
|
36
|
-
<div class="stack">
|
|
37
|
-
<section class="card" aria-labelledby="context-title">
|
|
38
|
-
<h2 id="context-title">当前游戏</h2><dl id="context" class="context"></dl><span id="status" class="state">尚未准备发布材料</span>
|
|
39
|
-
</section>
|
|
40
|
-
<section class="card" aria-labelledby="form-title">
|
|
41
|
-
<h2 id="form-title">发布资料</h2><p id="form-intro" class="section-intro">修改文案或封面后,需要重新准备并确认材料。关闭页面不会自动提交。</p>
|
|
42
|
-
<form id="materials-form">
|
|
43
|
-
<fieldset id="materials-fields" disabled>
|
|
44
|
-
<label class="field" for="game-name"><span>游戏名称</span><input id="game-name" type="text" maxlength="40" required autocomplete="off"><small>最多 40 个字符</small></label>
|
|
45
|
-
<label class="field" for="instructions"><span>简介与操作说明</span><textarea id="instructions" maxlength="8000" required placeholder="介绍玩法、目标和操作方式"></textarea></label>
|
|
46
|
-
<label class="field" for="game-type"><span>游戏分类</span><select id="game-type" required><option value="">请选择分类</option></select></label>
|
|
47
|
-
<fieldset class="tag-group"><legend>美术风格 <small>可不选,最多 12 项</small></legend><div id="art-styles" class="tags"></div></fieldset>
|
|
48
|
-
<fieldset class="tag-group"><legend>玩法标签 <small>可不选,最多 12 项</small></legend><div id="play-tags" class="tags"></div></fieldset>
|
|
49
|
-
<label class="field" for="cover-file"><span>封面图片(可选)</span><input id="cover-file" type="file" accept="image/png,image/jpeg"><small id="cover-help">PNG / JPEG,最大 2 MiB。留空使用本次试玩截图;选图只在本机预览。</small></label>
|
|
50
|
-
<div id="previous-cover" hidden><label class="field" for="reuse-previous-cover"><input id="reuse-previous-cover" type="checkbox" checked> 沿用上次发布的封面<small>取消勾选且未选新图片时,使用本次试玩截图。</small></label></div>
|
|
51
|
-
<div id="cover-selection" hidden><img id="cover-preview" class="cover-preview" alt="本地封面预览"><div class="cover-actions"><small id="cover-name"></small><button id="clear-cover" type="button" class="quiet">移除封面</button></div></div>
|
|
52
|
-
<p class="privacy-note">此版本仅包含游戏成品,二创保持关闭。准备阶段不会公开上传封面或截图。</p>
|
|
53
|
-
<div class="actions"><button id="prepare" type="submit">准备发布材料</button></div>
|
|
54
|
-
<p id="preparing" class="preparing" hidden></p>
|
|
55
|
-
</fieldset>
|
|
56
|
-
</form>
|
|
57
|
-
</section>
|
|
58
|
-
</div>
|
|
59
|
-
<section class="card" aria-labelledby="review-title">
|
|
60
|
-
<h2 id="review-title">审阅与确认</h2>
|
|
61
|
-
<button id="review" type="button" class="quiet" hidden>重新读取本次材料</button>
|
|
62
|
-
<p id="review-empty" class="section-intro">准备完成后,这里会展示本次文案、封面与全部展示截图。请逐项核对后再提交。</p>
|
|
63
|
-
<div id="material-review" hidden>
|
|
64
|
-
<dl id="review-data" class="review-data"></dl>
|
|
65
|
-
<h3>本次材料版本</h3><code id="revision" class="revision"></code>
|
|
66
|
-
<p id="capture-info" class="help"></p>
|
|
67
|
-
<div id="review-images" class="image-grid"></div>
|
|
68
|
-
<p id="image-status" class="help"></p>
|
|
69
|
-
<label class="confirmation" for="confirm"><input id="confirm" type="checkbox" disabled><span><strong>我已核对本次版本的全部文案、封面和展示截图。</strong>确认将这些图片公开上传并提交审核,二创保持关闭。材料变更后,本确认失效。</span></label>
|
|
70
|
-
<button id="submit" type="button" disabled>确认公开图片并提交审核</button>
|
|
71
|
-
</div>
|
|
72
|
-
<p id="publication-progress" class="pending"></p>
|
|
73
|
-
<a id="public-url" class="public-link" target="_blank" rel="noopener noreferrer" hidden>打开已发布游戏</a>
|
|
74
|
-
</section>
|
|
75
|
-
<details id="runtime" class="preview" hidden>
|
|
76
|
-
<summary>本地试玩(可选)</summary>
|
|
77
|
-
<p>这里运行已检查的本地版本。发布准备仍会自动完成原有的 30 秒试玩采集。</p>
|
|
78
|
-
<iframe id="preview" title="已检查游戏的本地试玩" sandbox="allow-scripts" credentialless referrerpolicy="no-referrer"></iframe>
|
|
79
|
-
</details>
|
|
80
|
-
</div>
|
|
81
|
-
<p class="footer-note">平台凭据由本机 Craft MCP 持有,不会进入本页面。材料已准备或已受理审核,不等于游戏已公开发布。</p>
|
|
82
|
-
</main>
|
|
83
|
-
<dialog id="image-viewer" aria-labelledby="viewer-title"><div class="viewer-head"><h2 id="viewer-title">查看图片</h2><button id="close-viewer" class="secondary" type="button">关闭</button></div><img id="viewer-image" alt="发布材料大图"></dialog>
|
|
84
|
-
<script type="module" nonce="__CSRF__" src="/publication-page.mjs"></script>
|
|
85
|
-
</body>
|
|
86
|
-
</html>
|
|
@@ -1,375 +0,0 @@
|
|
|
1
|
-
const byId = id => document.getElementById(id);
|
|
2
|
-
const csrf = document.querySelector('meta[name="craft-csrf"]')?.content;
|
|
3
|
-
const cap = /^\/publish\/([A-Za-z0-9_-]{32,128})\/?$/.exec(location.pathname)?.[1];
|
|
4
|
-
const apiBase = cap ? '/api/publish/' + encodeURIComponent(cap) : '';
|
|
5
|
-
const pageAbort = new AbortController();
|
|
6
|
-
const hashPattern = /^[a-f0-9]{64}$/;
|
|
7
|
-
const idPattern = /^[A-Za-z0-9_-]{1,128}$/;
|
|
8
|
-
const imageLimit = 2 * 1024 * 1024;
|
|
9
|
-
let context, publication, reviewedRevision, busy = false, dirty = false, needsSync = false;
|
|
10
|
-
let disposed = false, formInitialized = false, reviewGeneration = 0, statusTimer;
|
|
11
|
-
let coverData, coverId, coverURL, coverGeneration = 0, coverLoading = false, imagesReady = false;
|
|
12
|
-
const stateNames = { awaiting_confirmation:'等待审阅确认', submitting:'正在提交', submitted:'已提交,等待审核', sharing:'审核中',
|
|
13
|
-
share_repacking:'发布处理中', share_completed:'审核通过', share_failed:'发布未完成', share_delisted:'审核未通过或已下架',
|
|
14
|
-
different_publication:'目标版本存在另一条发布记录', not_submitted:'尚未提交', external_draft:'私有草稿' };
|
|
15
|
-
|
|
16
|
-
function message(text) { byId('message').textContent = text; }
|
|
17
|
-
function showError(error) {
|
|
18
|
-
byId('error').textContent = error instanceof Error ? error.message : String(error);
|
|
19
|
-
byId('error').hidden = false;
|
|
20
|
-
}
|
|
21
|
-
function clearError() { byId('error').textContent = ''; byId('error').hidden = true; }
|
|
22
|
-
function errorText(data) {
|
|
23
|
-
const detail = data && typeof data === 'object' ? data : {};
|
|
24
|
-
return [detail.error || detail.message || '本地请求未完成',
|
|
25
|
-
detail.request_id ? '请求 ID:' + detail.request_id : ''].filter(Boolean).join('\n');
|
|
26
|
-
}
|
|
27
|
-
function taskError(task, fallback) {
|
|
28
|
-
const detail = errorText(task?.error || { error:fallback });
|
|
29
|
-
if (task?.kind === 'publish_prepare' && task.status === 'failed') {
|
|
30
|
-
return new Error('发布材料准备失败。请重新点击「准备发布材料」重试。\n\n' + detail);
|
|
31
|
-
}
|
|
32
|
-
return new Error(detail);
|
|
33
|
-
}
|
|
34
|
-
async function request(route, body, query) {
|
|
35
|
-
const url = new URL(apiBase + '/' + route, location.origin);
|
|
36
|
-
if (query) for (const [key,value] of Object.entries(query)) url.searchParams.set(key,value);
|
|
37
|
-
let response;
|
|
38
|
-
try {
|
|
39
|
-
response = await fetch(url, { method:body === undefined ? 'GET' : 'POST', credentials:'same-origin',
|
|
40
|
-
redirect:'error', cache:'no-store', headers:{ Accept:'application/json', 'x-craft-csrf':csrf,
|
|
41
|
-
...(body === undefined ? {} : { 'Content-Type':'application/json' }) },
|
|
42
|
-
...(body === undefined ? {} : { body:JSON.stringify(body) }),
|
|
43
|
-
signal:AbortSignal.any([pageAbort.signal,AbortSignal.timeout(30000)]) });
|
|
44
|
-
} catch (error) {
|
|
45
|
-
if (disposed) throw error;
|
|
46
|
-
const failure = new Error(body === undefined ? '暂时无法读取进度,请刷新后重试。' :
|
|
47
|
-
'操作响应尚未确认。请先刷新进度恢复原任务,不要重复准备或提交。');
|
|
48
|
-
failure.needsSync = body !== undefined; throw failure;
|
|
49
|
-
}
|
|
50
|
-
const data = await response.json().catch(() => null);
|
|
51
|
-
if (!response.ok || !data || typeof data !== 'object') {
|
|
52
|
-
const error = new Error(errorText(data)); error.httpStatus = response.status;
|
|
53
|
-
error.needsSync = body !== undefined && (!data || typeof data !== 'object' || response.status >= 500); throw error;
|
|
54
|
-
}
|
|
55
|
-
return data;
|
|
56
|
-
}
|
|
57
|
-
function delay(ms) { return new Promise(resolve => setTimeout(resolve,ms)); }
|
|
58
|
-
function addPair(list,label,value) {
|
|
59
|
-
const term = document.createElement('dt'), detail = document.createElement('dd');
|
|
60
|
-
term.textContent = label; detail.textContent = value === undefined || value === '' ? '—' : String(value);
|
|
61
|
-
list.append(term,detail);
|
|
62
|
-
}
|
|
63
|
-
function changeStep(current) {
|
|
64
|
-
['edit','prepare','review','submit'].forEach((name,index) => {
|
|
65
|
-
const item = byId('step-' + name);
|
|
66
|
-
item.classList.toggle('current',index === current); item.classList.toggle('done',index < current);
|
|
67
|
-
if (index === current) item.setAttribute('aria-current','step'); else item.removeAttribute('aria-current');
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
function isInProgress() { return ['submitting','submitted','sharing','share_repacking'].includes(publication?.state); }
|
|
71
|
-
function isLocked() { return publication?.published === true || isInProgress() || publication?.state === 'different_publication'; }
|
|
72
|
-
function canConfirm() {
|
|
73
|
-
return Boolean(publication && reviewedRevision === publication.revision && imagesReady && !dirty && !needsSync &&
|
|
74
|
-
publication.materials?.open_to_recreate === false &&
|
|
75
|
-
(publication.state === 'awaiting_confirmation' || publication.finalization_retry_required === true));
|
|
76
|
-
}
|
|
77
|
-
function updateControls() {
|
|
78
|
-
byId('refresh').disabled = busy;
|
|
79
|
-
byId('materials-fields').disabled = busy || coverLoading || !context || needsSync || isLocked();
|
|
80
|
-
byId('previous-cover').hidden = context?.previous_publication?.cover_available !== true || Boolean(coverData);
|
|
81
|
-
byId('review').hidden = !publication || dirty || !['awaiting_confirmation'].includes(publication.state) && !publication.finalization_retry_required;
|
|
82
|
-
byId('review').disabled = busy || needsSync;
|
|
83
|
-
byId('confirm').disabled = busy || !canConfirm();
|
|
84
|
-
byId('submit').disabled = busy || !canConfirm() || !byId('confirm').checked;
|
|
85
|
-
byId('submit').textContent = publication?.finalization_retry_required ? '重试已确认的发布' : '确认公开图片并提交审核';
|
|
86
|
-
byId('preparing').hidden = !busy;
|
|
87
|
-
}
|
|
88
|
-
function invalidateReview() {
|
|
89
|
-
dirty = true; reviewedRevision = undefined; imagesReady = false; reviewGeneration++;
|
|
90
|
-
byId('confirm').checked = false; byId('material-review').hidden = true;
|
|
91
|
-
byId('review-empty').hidden = false;
|
|
92
|
-
byId('review-empty').textContent = '资料已修改,请重新准备并审阅。本次修改尚未提交。';
|
|
93
|
-
byId('public-url').hidden = true; updateControls();
|
|
94
|
-
}
|
|
95
|
-
function renderContext() {
|
|
96
|
-
const list = byId('context'); list.replaceChildren();
|
|
97
|
-
addPair(list,'工程',context.name); addPair(list,'引擎',context.engine);
|
|
98
|
-
addPair(list,'账号',context.account?.nickname || context.account?.user_id);
|
|
99
|
-
addPair(list,'平台',context.platform);
|
|
100
|
-
addPair(list,'目标项目',publication?.conversation_id || context.draft?.conversation_id);
|
|
101
|
-
addPair(list,'目标版本',publication?.version_id || context.draft?.version_id);
|
|
102
|
-
}
|
|
103
|
-
function renderTags(id,values,selected = []) {
|
|
104
|
-
const root = byId(id); root.replaceChildren();
|
|
105
|
-
const choices = [...new Set([...values,...selected])];
|
|
106
|
-
if (!choices.length) { const empty = document.createElement('span'); empty.className = 'empty'; empty.textContent = '暂无可选项'; root.append(empty); }
|
|
107
|
-
for (const value of choices) {
|
|
108
|
-
const label = document.createElement('label'), input = document.createElement('input'), text = document.createElement('span');
|
|
109
|
-
label.className = 'tag'; input.type = 'checkbox'; input.value = value; input.checked = selected.includes(value);
|
|
110
|
-
text.textContent = value; label.append(input,text); root.append(label);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
function fillForm(materials) {
|
|
114
|
-
const input = materials || {};
|
|
115
|
-
byId('game-name').value = input.game_name || Array.from(context.name || '').slice(0,40).join('');
|
|
116
|
-
byId('instructions').value = input.instructions || '';
|
|
117
|
-
const options = context.options || {}, select = byId('game-type');
|
|
118
|
-
const gameTypes = options.game_types || [];
|
|
119
|
-
select.replaceChildren(new Option('请选择分类',''));
|
|
120
|
-
for (const value of gameTypes) select.add(new Option(value,value));
|
|
121
|
-
if (input.game_type && !gameTypes.includes(input.game_type)) {
|
|
122
|
-
select.add(new Option(gameTypes.length ? input.game_type + '(已停用,请重新选择)' : input.game_type,input.game_type));
|
|
123
|
-
}
|
|
124
|
-
select.value = input.game_type || '';
|
|
125
|
-
renderTags('art-styles',options.art_styles || [],input.art_styles || []);
|
|
126
|
-
renderTags('play-tags',options.play_tags || [],input.play_tags || []);
|
|
127
|
-
formInitialized = true;
|
|
128
|
-
}
|
|
129
|
-
function materialInput() {
|
|
130
|
-
const selected = id => Array.from(byId(id).querySelectorAll('input:checked'),input => input.value);
|
|
131
|
-
const art = selected('art-styles'), tags = selected('play-tags');
|
|
132
|
-
if (art.length > 12 || tags.length > 12) throw new Error('美术风格和玩法标签各最多选择 12 项。');
|
|
133
|
-
const gameType = byId('game-type').value, gameTypes = context.options?.game_types;
|
|
134
|
-
if (gameTypes?.length && !gameTypes.includes(gameType)) throw new Error('上次使用的游戏分类已停用,请选择当前分类后准备材料。');
|
|
135
|
-
return { game_name:byId('game-name').value.trim(), instructions:byId('instructions').value.trim(),
|
|
136
|
-
game_type:gameType, art_styles:art, play_tags:tags, open_to_recreate:false, cover_image_source:2 };
|
|
137
|
-
}
|
|
138
|
-
function renderPublicLink() {
|
|
139
|
-
const link = byId('public-url'); link.hidden = true; link.removeAttribute('href');
|
|
140
|
-
if (publication?.published !== true || publication.state !== 'share_completed' || !publication.public_url) return;
|
|
141
|
-
try {
|
|
142
|
-
const url = new URL(publication.public_url), platform = new URL(context.platform);
|
|
143
|
-
if (url.origin !== platform.origin || url.username || url.password ||
|
|
144
|
-
(url.protocol !== 'https:' && !(url.protocol === 'http:' && url.hostname === '127.0.0.1'))) return;
|
|
145
|
-
link.href = url.href; link.hidden = false;
|
|
146
|
-
} catch {}
|
|
147
|
-
}
|
|
148
|
-
function setPublication(value) {
|
|
149
|
-
if (!value || typeof value !== 'object' || !idPattern.test(value.publication_id || '') || !hashPattern.test(value.revision || '') ||
|
|
150
|
-
value.name !== context.name || value.check_task_id !== context.check_task_id) throw new Error('发布回执与当前检查不一致,请返回 AI IDE 重新打开发布页面。');
|
|
151
|
-
if (reviewedRevision !== value.revision) { reviewedRevision = undefined; imagesReady = false; byId('confirm').checked = false; }
|
|
152
|
-
publication = value;
|
|
153
|
-
byId('status').textContent = stateNames[value.state] || value.state;
|
|
154
|
-
byId('status').dataset.state = value.state;
|
|
155
|
-
byId('publication-progress').textContent = value.status_reason || (value.published ? '当前目标版本已通过审核。' :
|
|
156
|
-
value.finalization_retry_required ? '审核后的发布收尾尚未完成,可重试同一份已确认材料。' :
|
|
157
|
-
isInProgress() ? '材料已受理,正在查询同一发布记录的审核进度。请保留此页面,不要重复提交。' : '');
|
|
158
|
-
if (value.published) { changeStep(3); message('当前目标版本已通过审核,可以打开已发布游戏。'); }
|
|
159
|
-
else if (isInProgress()) { changeStep(3); message('已提交审核,正在等待当前版本的结果。'); }
|
|
160
|
-
else if (!dirty) changeStep(2);
|
|
161
|
-
renderContext(); renderPublicLink(); updateControls();
|
|
162
|
-
}
|
|
163
|
-
function renderReviewMetadata(value) {
|
|
164
|
-
const labels = { game_name:'游戏名称', instructions:'简介与操作说明', game_type:'游戏分类', art_styles:'美术风格',
|
|
165
|
-
play_tags:'玩法标签', open_to_recreate:'开放二创', cover_image_source:'封面来源' };
|
|
166
|
-
const list = byId('review-data'); list.replaceChildren();
|
|
167
|
-
addPair(list,'项目 ID',value.conversation_id); addPair(list,'版本 ID',value.version_id);
|
|
168
|
-
for (const [key,raw] of Object.entries(value.materials || {})) {
|
|
169
|
-
let text = Array.isArray(raw) ? raw.join('、') || '未选择' : raw;
|
|
170
|
-
if (key === 'open_to_recreate') text = raw === false ? '关闭' : '开启';
|
|
171
|
-
if (key === 'cover_image_source') text = raw === 1 ? 'AI 生成' : '本地封面或试玩截图';
|
|
172
|
-
addPair(list,labels[key] || key,typeof text === 'object' ? JSON.stringify(text) : text);
|
|
173
|
-
}
|
|
174
|
-
byId('revision').textContent = value.revision;
|
|
175
|
-
byId('capture-info').textContent = '实际采集 ' + value.playtest_seconds + ' 秒 · ' +
|
|
176
|
-
value.display_screenshot_count + ' 张展示截图 · ' + value.audit_screenshot_count + ' 张审核抽帧。下方含封面及全部展示截图,点击可看大图。';
|
|
177
|
-
}
|
|
178
|
-
async function reviewPublication(value) {
|
|
179
|
-
const generation = ++reviewGeneration;
|
|
180
|
-
reviewedRevision = undefined; imagesReady = false; byId('confirm').checked = false; updateControls();
|
|
181
|
-
const response = await request('review',{ publication_id:value.publication_id });
|
|
182
|
-
const blocks = response.content;
|
|
183
|
-
if (!Array.isArray(blocks)) throw new Error('本地材料审阅响应不完整。');
|
|
184
|
-
const text = blocks.find(block => block.type === 'text');
|
|
185
|
-
let reviewed; try { reviewed = JSON.parse(text?.text); } catch { throw new Error('无法读取本次材料版本。'); }
|
|
186
|
-
if (generation !== reviewGeneration || disposed) return;
|
|
187
|
-
if (reviewed.publication_id !== value.publication_id || reviewed.revision !== value.revision ||
|
|
188
|
-
reviewed.version_id !== value.version_id || reviewed.materials?.open_to_recreate !== false) throw new Error('审阅材料的目标或版本已变化,请重新准备。');
|
|
189
|
-
const images = blocks.filter(block => block.type === 'image');
|
|
190
|
-
if (!Number.isInteger(reviewed.display_screenshot_count) || reviewed.display_screenshot_count < 1 || reviewed.display_screenshot_count > 5 ||
|
|
191
|
-
images.length !== reviewed.display_screenshot_count + 1) throw new Error('封面或展示截图不完整,请重新准备。');
|
|
192
|
-
const sources = images.map(image => {
|
|
193
|
-
if (!['image/png','image/jpeg'].includes(image.mimeType) || typeof image.data !== 'string' ||
|
|
194
|
-
image.data.length > 4 * Math.ceil(imageLimit / 3) || !/^[A-Za-z0-9+/]+={0,2}$/.test(image.data)) throw new Error('发布图片格式或大小不符合要求。');
|
|
195
|
-
let bytes; try { bytes = atob(image.data).length; } catch { throw new Error('发布图片无法解码。'); }
|
|
196
|
-
if (!bytes || bytes > imageLimit) throw new Error('发布图片大小不符合要求。');
|
|
197
|
-
return 'data:' + image.mimeType + ';base64,' + image.data;
|
|
198
|
-
});
|
|
199
|
-
renderReviewMetadata(reviewed);
|
|
200
|
-
const container = byId('review-images'); container.replaceChildren();
|
|
201
|
-
let loaded = 0;
|
|
202
|
-
sources.forEach((source,index) => {
|
|
203
|
-
const figure = document.createElement('figure'), button = document.createElement('button');
|
|
204
|
-
const image = document.createElement('img'), caption = document.createElement('figcaption');
|
|
205
|
-
const title = index === 0 ? '封面' : '展示截图 ' + index;
|
|
206
|
-
button.type = 'button'; button.className = 'image-button'; button.setAttribute('aria-label','查看' + title + '大图');
|
|
207
|
-
image.alt = title; image.decoding = 'async'; caption.textContent = title;
|
|
208
|
-
image.onload = () => {
|
|
209
|
-
if (generation !== reviewGeneration || disposed) return;
|
|
210
|
-
loaded++; imagesReady = loaded === sources.length;
|
|
211
|
-
byId('image-status').textContent = imagesReady ? '全部图片已显示。请逐项核对上方材料后确认。' : '正在载入图片…';
|
|
212
|
-
updateControls();
|
|
213
|
-
};
|
|
214
|
-
image.onerror = () => {
|
|
215
|
-
if (generation !== reviewGeneration || disposed) return;
|
|
216
|
-
imagesReady = false; reviewedRevision = undefined;
|
|
217
|
-
byId('image-status').textContent = '图片未能完整显示,请刷新后重新审阅。'; updateControls();
|
|
218
|
-
};
|
|
219
|
-
button.onclick = () => {
|
|
220
|
-
byId('viewer-title').textContent = title; byId('viewer-image').src = source;
|
|
221
|
-
byId('image-viewer').showModal();
|
|
222
|
-
};
|
|
223
|
-
image.src = source; button.append(image); figure.append(button,caption); container.append(figure);
|
|
224
|
-
});
|
|
225
|
-
reviewedRevision = value.revision; byId('material-review').dataset.revision = value.revision;
|
|
226
|
-
byId('material-review').dataset.publicationId = value.publication_id; byId('material-review').hidden = false; byId('review-empty').hidden = true;
|
|
227
|
-
byId('image-status').textContent = '正在载入图片…'; changeStep(2); updateControls();
|
|
228
|
-
}
|
|
229
|
-
async function waitForTask(task) {
|
|
230
|
-
const deadline = Date.now() + 15 * 60 * 1000;
|
|
231
|
-
while (task?.status === 'running') {
|
|
232
|
-
if (!idPattern.test(task.task_id || '')) throw new Error('任务标识无效。');
|
|
233
|
-
byId('preparing').textContent = task.kind === 'publish_submit' ? '正在提交当前材料,请稍候…' :
|
|
234
|
-
'正在私有上传并采集真实试玩,通常至少需要 30 秒,请保持本机 MCP 运行。';
|
|
235
|
-
if (Date.now() > deadline) { const error = new Error('任务仍在处理中,请刷新进度恢复原任务。'); error.needsSync = true; throw error; }
|
|
236
|
-
await delay(document.hidden ? 3000 : 1200);
|
|
237
|
-
if (disposed) throw new DOMException('Page closed','AbortError');
|
|
238
|
-
try { task = await request('task',undefined,{ task_id:task.task_id }); }
|
|
239
|
-
catch (error) { error.needsSync = true; throw error; }
|
|
240
|
-
}
|
|
241
|
-
if (task?.status !== 'completed' || !task.result) throw taskError(task,'任务已中断,请刷新查看原记录。');
|
|
242
|
-
return task.result;
|
|
243
|
-
}
|
|
244
|
-
function configureRuntime(value) {
|
|
245
|
-
const details = byId('runtime'), frame = byId('preview');
|
|
246
|
-
try {
|
|
247
|
-
const url = new URL(value);
|
|
248
|
-
if (url.protocol !== 'http:' || url.hostname !== '127.0.0.1' || url.origin === location.origin || url.username || url.password) throw new Error();
|
|
249
|
-
details.hidden = false;
|
|
250
|
-
details.ontoggle = () => { if (details.open && !frame.src) frame.src = url.href; };
|
|
251
|
-
} catch { details.hidden = true; frame.removeAttribute('src'); }
|
|
252
|
-
}
|
|
253
|
-
async function loadState() {
|
|
254
|
-
const state = await request('state');
|
|
255
|
-
if (!state.name || !idPattern.test(state.check_task_id || '') || !state.account?.user_id) throw new Error('本地发布会话无效,请从 AI IDE 重新打开。');
|
|
256
|
-
context = state; needsSync = false; renderContext(); configureRuntime(state.runtime_url);
|
|
257
|
-
const previous = state.previous_publication;
|
|
258
|
-
document.title = previous ? '更新 Craft 游戏' : '发布到 Craft';
|
|
259
|
-
byId('page-title').textContent = document.title;
|
|
260
|
-
byId('form-title').textContent = previous ? '更新资料' : '发布资料';
|
|
261
|
-
byId('form-intro').textContent = previous ? '可修改发布资料。准备材料时会重新采集当前版本的截图。' :
|
|
262
|
-
'修改文案或封面后,需要重新准备并确认材料。关闭页面不会自动提交。';
|
|
263
|
-
const coverHelp = 'PNG / JPEG,最大 2 MiB。选图只在本机预览。';
|
|
264
|
-
const coverFallback = previous ? '上次封面不可用,留空使用本次试玩截图。' : '留空使用本次试玩截图。';
|
|
265
|
-
byId('cover-help').textContent = previous?.cover_available === true ? coverHelp : coverHelp + coverFallback;
|
|
266
|
-
if (!formInitialized) fillForm(state.publication?.materials ?? previous?.materials);
|
|
267
|
-
if (state.publication) setPublication(state.publication);
|
|
268
|
-
if (state.task_id) {
|
|
269
|
-
const task = await request('task',undefined,{ task_id:state.task_id });
|
|
270
|
-
if (task.status === 'running') { changeStep(1); message('正在恢复原发布任务…'); }
|
|
271
|
-
if (task.status === 'running' || task.status === 'completed' && !state.publication) {
|
|
272
|
-
const result = await waitForTask(task);
|
|
273
|
-
setPublication(await request('status',undefined,{ publication_id:result.publication_id }));
|
|
274
|
-
if (!dirty) fillForm(publication.materials);
|
|
275
|
-
} else if (task.status !== 'completed' && !state.publication) throw taskError(task,'原任务已中断,请回 AI IDE 查看。');
|
|
276
|
-
}
|
|
277
|
-
if (publication && !dirty && (publication.state === 'awaiting_confirmation' || publication.finalization_retry_required)) {
|
|
278
|
-
await reviewPublication(publication); message('材料已准备。请核对文案、封面和全部展示截图,再确认公开提交。');
|
|
279
|
-
} else if (!publication) {
|
|
280
|
-
changeStep(0);
|
|
281
|
-
message(previous?.materials ? '已带入上次发布的资料。请核对后点击「准备发布材料」。' :
|
|
282
|
-
'填写资料后准备材料。封面和采集结果会先保存在本机。');
|
|
283
|
-
}
|
|
284
|
-
scheduleStatus(); updateControls();
|
|
285
|
-
}
|
|
286
|
-
function scheduleStatus() {
|
|
287
|
-
clearTimeout(statusTimer);
|
|
288
|
-
if (disposed || !publication || !isInProgress()) return;
|
|
289
|
-
statusTimer = setTimeout(async () => {
|
|
290
|
-
if (busy) { scheduleStatus(); return; }
|
|
291
|
-
try {
|
|
292
|
-
const id = publication.publication_id;
|
|
293
|
-
const latest = await request('status',undefined,{ publication_id:id });
|
|
294
|
-
if (!busy && !disposed && publication?.publication_id === id) setPublication(latest);
|
|
295
|
-
scheduleStatus();
|
|
296
|
-
} catch (error) {
|
|
297
|
-
if (busy || disposed) { scheduleStatus(); return; }
|
|
298
|
-
showError(error);
|
|
299
|
-
if (![403,404].includes(error.httpStatus)) statusTimer = setTimeout(scheduleStatus,5000);
|
|
300
|
-
else { needsSync = true; updateControls(); }
|
|
301
|
-
}
|
|
302
|
-
},3000);
|
|
303
|
-
}
|
|
304
|
-
async function perform(action) {
|
|
305
|
-
if (busy || disposed) return;
|
|
306
|
-
busy = true; clearTimeout(statusTimer); clearError(); updateControls();
|
|
307
|
-
try { await action(); }
|
|
308
|
-
catch (error) { if (!disposed) { if (error.needsSync) needsSync = true; showError(error); } }
|
|
309
|
-
finally { busy = false; updateControls(); scheduleStatus(); }
|
|
310
|
-
}
|
|
311
|
-
function clearCover(resetInput = true) {
|
|
312
|
-
coverGeneration++; if (coverURL) URL.revokeObjectURL(coverURL);
|
|
313
|
-
coverData = undefined; coverId = undefined; coverURL = undefined; coverLoading = false;
|
|
314
|
-
if (resetInput) byId('cover-file').value = '';
|
|
315
|
-
byId('cover-preview').removeAttribute('src'); byId('cover-selection').hidden = true;
|
|
316
|
-
}
|
|
317
|
-
byId('materials-form').addEventListener('input',event => { if (event.target.id !== 'cover-file') invalidateReview(); });
|
|
318
|
-
byId('cover-file').addEventListener('change',async () => {
|
|
319
|
-
const file = byId('cover-file').files?.[0]; clearError(); clearCover(false); invalidateReview();
|
|
320
|
-
if (!file) return;
|
|
321
|
-
const generation = coverGeneration; coverLoading = true; updateControls();
|
|
322
|
-
try {
|
|
323
|
-
if (!file.size || file.size > imageLimit) throw new Error('封面必须是最大 2 MiB 的 PNG 或 JPEG。');
|
|
324
|
-
const bytes = new Uint8Array(await file.arrayBuffer());
|
|
325
|
-
if (generation !== coverGeneration || disposed) return;
|
|
326
|
-
const png = [137,80,78,71,13,10,26,10].every((value,index) => bytes[index] === value);
|
|
327
|
-
const jpg = bytes[0] === 255 && bytes[1] === 216 && bytes[2] === 255;
|
|
328
|
-
if (!png && !jpg) throw new Error('请选择有效的 PNG 或 JPEG 图片。');
|
|
329
|
-
let binary = ''; for (let offset = 0; offset < bytes.length; offset += 32768) binary += String.fromCharCode(...bytes.subarray(offset,offset + 32768));
|
|
330
|
-
coverData = btoa(binary); coverURL = URL.createObjectURL(file);
|
|
331
|
-
byId('cover-preview').src = coverURL; byId('cover-name').textContent = file.name; byId('cover-selection').hidden = false;
|
|
332
|
-
} catch (error) { if (generation === coverGeneration) { clearCover(); showError(error); } }
|
|
333
|
-
finally { if (generation === coverGeneration) coverLoading = false; updateControls(); }
|
|
334
|
-
});
|
|
335
|
-
byId('clear-cover').onclick = () => { clearCover(); invalidateReview(); };
|
|
336
|
-
byId('materials-form').onsubmit = event => {
|
|
337
|
-
event.preventDefault();
|
|
338
|
-
if (coverLoading || !byId('materials-form').reportValidity()) return;
|
|
339
|
-
void perform(async () => {
|
|
340
|
-
const materials = materialInput();
|
|
341
|
-
reviewedRevision = undefined; imagesReady = false; byId('confirm').checked = false;
|
|
342
|
-
changeStep(1); message('正在准备本地材料与真实试玩采集,尚未公开上传图片。');
|
|
343
|
-
if (coverData && !coverId) coverId = (await request('cover',{ data:coverData })).cover_id;
|
|
344
|
-
if (coverData && !idPattern.test(coverId || '')) throw new Error('封面暂存回执无效。');
|
|
345
|
-
const skipPreviousCover = context.previous_publication?.cover_available === true && !byId('reuse-previous-cover').checked;
|
|
346
|
-
const task = await request('prepare',{ materials,...(coverId ? { cover_id:coverId } : {}),
|
|
347
|
-
...(skipPreviousCover && !coverId ? { reuse_previous_cover:false } : {}) });
|
|
348
|
-
const result = await waitForTask(task); dirty = false; setPublication(result);
|
|
349
|
-
await reviewPublication(result); message('材料已准备。请逐项审阅,并确认将图片公开上传后提交审核。');
|
|
350
|
-
});
|
|
351
|
-
};
|
|
352
|
-
byId('review').onclick = () => {
|
|
353
|
-
if (!publication || dirty || needsSync) return;
|
|
354
|
-
void perform(() => reviewPublication(publication));
|
|
355
|
-
};
|
|
356
|
-
byId('confirm').onchange = updateControls;
|
|
357
|
-
byId('submit').onclick = () => {
|
|
358
|
-
if (!canConfirm() || !byId('confirm').checked) return;
|
|
359
|
-
const approved = { publication_id:publication.publication_id,revision:reviewedRevision,confirmed:true };
|
|
360
|
-
void perform(async () => {
|
|
361
|
-
if (!canConfirm() || approved.revision !== publication.revision) throw new Error('材料已变化,请重新准备并审阅。');
|
|
362
|
-
byId('confirm').checked = false;
|
|
363
|
-
message('正在公开上传已确认的图片并提交当前版本审核…'); changeStep(3);
|
|
364
|
-
const result = await waitForTask(await request('submit',approved)); setPublication(result); scheduleStatus();
|
|
365
|
-
});
|
|
366
|
-
};
|
|
367
|
-
byId('refresh').onclick = () => void perform(loadState);
|
|
368
|
-
byId('close-viewer').onclick = () => byId('image-viewer').close();
|
|
369
|
-
window.addEventListener('pagehide',() => {
|
|
370
|
-
disposed = true; clearTimeout(statusTimer); pageAbort.abort(); if (coverURL) URL.revokeObjectURL(coverURL);
|
|
371
|
-
byId('preview').removeAttribute('src');
|
|
372
|
-
},{ once:true });
|
|
373
|
-
if (!cap || !csrf || csrf === '__CSRF__') {
|
|
374
|
-
needsSync = true; showError(new Error('发布页面已失效,请从 AI IDE 重新打开。')); updateControls();
|
|
375
|
-
} else void perform(loadState);
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import http from 'node:http';
|
|
2
|
-
import { randomBytes } from 'node:crypto';
|
|
3
|
-
import { checkedDraftFiles } from '../game-workflow/draft-archive.mjs';
|
|
4
|
-
|
|
5
|
-
// Game scripts run on a separate sandboxed origin and only see this frozen file map.
|
|
6
|
-
export async function openPublicationPreview(check, evidence, signal = new AbortController().signal, { assetOrigins = [], platformOrigin } = {}) {
|
|
7
|
-
if (check?.kind !== 'check' || check.status !== 'completed' || !check.result?.gate?.passed) {
|
|
8
|
-
throw new Error('A passing frozen check is required for publication preview');
|
|
9
|
-
}
|
|
10
|
-
const files = await checkedDraftFiles(evidence, check.result.snapshot_id, check.result.artifacts, signal);
|
|
11
|
-
signal.throwIfAborted();
|
|
12
|
-
if (!Array.isArray(assetOrigins) || assetOrigins.length > 64) throw new Error('Invalid verified resource origins');
|
|
13
|
-
const localPlatform = platformOrigin && new URL(platformOrigin);
|
|
14
|
-
const allowLoopback = localPlatform?.protocol === 'http:' && localPlatform.hostname === '127.0.0.1';
|
|
15
|
-
const origins = [...new Set(assetOrigins.map(value => {
|
|
16
|
-
let url;
|
|
17
|
-
try { url = new URL(value); } catch { throw new Error('Invalid verified resource origin'); }
|
|
18
|
-
const localFixture = allowLoopback && url.protocol === 'http:' && url.hostname === '127.0.0.1';
|
|
19
|
-
if (url.origin !== value || url.hostname.includes('*') || url.username || url.password || (url.protocol !== 'https:' && !localFixture)) {
|
|
20
|
-
throw new Error('Invalid verified resource origin');
|
|
21
|
-
}
|
|
22
|
-
return url.origin;
|
|
23
|
-
}))];
|
|
24
|
-
if (origins.join(' ').length > 2048) throw new Error('Verified resource origin budget exceeded');
|
|
25
|
-
const prefix = '/runtime/' + randomBytes(32).toString('hex') + '/';
|
|
26
|
-
let port;
|
|
27
|
-
const server = http.createServer((req, res) => {
|
|
28
|
-
const origin = `http://127.0.0.1:${port}`;
|
|
29
|
-
res.setHeader('Cache-Control', 'no-store');
|
|
30
|
-
res.setHeader('X-Content-Type-Options', 'nosniff');
|
|
31
|
-
res.setHeader('Referrer-Policy', 'no-referrer');
|
|
32
|
-
if (req.headers.host !== `127.0.0.1:${port}` ||
|
|
33
|
-
(req.headers.origin && ![origin, 'null'].includes(req.headers.origin))) {
|
|
34
|
-
req.resume(); res.writeHead(403).end(); return;
|
|
35
|
-
}
|
|
36
|
-
if (!['GET', 'HEAD'].includes(req.method)) { req.resume(); res.writeHead(405).end(); return; }
|
|
37
|
-
let pathname;
|
|
38
|
-
try { pathname = decodeURIComponent(new URL(req.url, origin).pathname); }
|
|
39
|
-
catch { res.writeHead(400).end(); return; }
|
|
40
|
-
if (!pathname.startsWith(prefix)) { res.writeHead(404).end(); return; }
|
|
41
|
-
const entry = files.get('/' + pathname.slice(prefix.length));
|
|
42
|
-
if (!entry) { res.writeHead(404).end(); return; }
|
|
43
|
-
const source = origin + prefix;
|
|
44
|
-
const assetSources = [source,...origins].join(' ');
|
|
45
|
-
res.writeHead(200, {
|
|
46
|
-
'Content-Type': entry.type,
|
|
47
|
-
'Content-Length': entry.data.length,
|
|
48
|
-
'Access-Control-Allow-Origin': 'null',
|
|
49
|
-
'Cross-Origin-Resource-Policy': 'cross-origin',
|
|
50
|
-
'Content-Security-Policy': `sandbox allow-scripts; default-src 'none'; base-uri 'none'; form-action 'none'; script-src ${source} 'unsafe-inline' 'wasm-unsafe-eval'; style-src ${source} 'unsafe-inline'; connect-src ${assetSources}; img-src ${assetSources} data: blob:; media-src ${assetSources} blob:; font-src ${assetSources} data:; worker-src blob:`,
|
|
51
|
-
});
|
|
52
|
-
res.end(req.method === 'HEAD' ? undefined : entry.data);
|
|
53
|
-
});
|
|
54
|
-
await new Promise((resolve, reject) => {
|
|
55
|
-
server.once('error', reject); server.listen(0, '127.0.0.1', resolve);
|
|
56
|
-
});
|
|
57
|
-
port = server.address().port;
|
|
58
|
-
let closing;
|
|
59
|
-
const close = () => closing ??= new Promise((resolve, reject) => {
|
|
60
|
-
server.closeAllConnections(); server.close(error => error ? reject(error) : resolve());
|
|
61
|
-
});
|
|
62
|
-
return { url: `http://127.0.0.1:${port}${prefix}index.html`, close };
|
|
63
|
-
}
|