@craft_eco/craft-mcp 0.0.0-stage → 0.1.18
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 +32 -2
- package/bin/craft-mcp.mjs +7 -0
- package/dist-server/core/app-paths.mjs +15 -0
- package/dist-server/core/auth-store.mjs +70 -0
- package/dist-server/core/connector-auth.mjs +30 -0
- package/dist-server/core/http-utils.mjs +14 -0
- package/dist-server/game-workflow/asset-formats.mjs +76 -0
- package/dist-server/game-workflow/asset-import.mjs +113 -0
- package/dist-server/game-workflow/asset-inputs.mjs +10 -0
- package/dist-server/game-workflow/assets.mjs +161 -0
- package/dist-server/game-workflow/capture-worker.mjs +14 -0
- package/dist-server/game-workflow/check.mjs +74 -0
- package/dist-server/game-workflow/draft-archive.mjs +53 -0
- package/dist-server/game-workflow/draft-bindings.mjs +35 -0
- package/dist-server/game-workflow/draft-uploads.mjs +207 -0
- package/dist-server/game-workflow/engines.mjs +30 -0
- package/dist-server/game-workflow/library-assets.mjs +77 -0
- package/dist-server/game-workflow/library-candidates.mjs +37 -0
- package/dist-server/game-workflow/library-catalog.mjs +45 -0
- package/dist-server/game-workflow/project-leases.mjs +52 -0
- package/dist-server/game-workflow/projects.mjs +92 -0
- package/dist-server/game-workflow/publication-materials.mjs +67 -0
- package/dist-server/game-workflow/publications.mjs +148 -0
- package/dist-server/game-workflow/publish-capture-worker.mjs +57 -0
- package/dist-server/game-workflow/publish-capture.mjs +75 -0
- package/dist-server/game-workflow/request-store.mjs +52 -0
- package/dist-server/game-workflow/resource-catalog.mjs +97 -0
- package/dist-server/game-workflow/tasks.mjs +93 -0
- package/dist-server/mcp/asset-tools.mjs +42 -0
- package/dist-server/mcp/control-panel.html +17 -0
- package/dist-server/mcp/control-panel.mjs +59 -0
- package/dist-server/mcp/publication-page.html +86 -0
- package/dist-server/mcp/publication-page.mjs +347 -0
- package/dist-server/mcp/publication-preview.mjs +49 -0
- package/dist-server/mcp/publication-tools.mjs +22 -0
- package/dist-server/mcp/publish-panel.mjs +191 -0
- package/dist-server/mcp/server.mjs +312 -0
- package/dist-server/mcp/start.mjs +20 -0
- package/dist-server/preview/local-static-preview.mjs +71 -0
- package/dist-server/preview/preview-control.mjs +35 -0
- package/dist-server/preview/preview-launcher.mjs +26 -0
- package/dist-server/preview/preview-snapshot.mjs +35 -0
- package/dist-server/preview/preview-start.mjs +12 -0
- package/dist-server/preview/preview-worker.mjs +68 -0
- package/dist-server/upstream/craft-aigc.mjs +169 -0
- package/dist-server/upstream/library-url.mjs +14 -0
- package/dist-server/upstream/publication-transport.mjs +81 -0
- package/package.json +33 -4
- package/resources/craft-game-maker/SKILL.md +69 -0
- package/resources/craft-game-maker/js.md +9 -0
- package/resources/craft-game-maker/js3d.md +12 -0
- package/resources/game_visual_qa.mjs +1143 -0
- package/resources/js/context/CLAUDE.md +54 -0
- package/resources/js/context/agents/aigc-manager.md +91 -0
- package/resources/js/context/hooks/hooks.json +20 -0
- package/resources/js/context/knowledge/AigcEnabled.md +41 -0
- package/resources/js/context/knowledge/AigcWiring.md +200 -0
- package/resources/js/context/knowledge/AssetUrl.md +24 -0
- package/resources/js/context/knowledge/FrontendComponents.md +23 -0
- package/resources/js/context/knowledge/GameProbe.md +74 -0
- package/resources/js/context/knowledge/Lifecycle.md +27 -0
- package/resources/js/context/knowledge/Multiplayer/GameplaySystemKnowledge.md +114 -0
- package/resources/js/context/knowledge/Multiplayer/OverviewKnowledge.md +115 -0
- package/resources/js/context/knowledge/Multiplayer/StateSyncKnowledge.md +392 -0
- package/resources/js/context/knowledge/PlatformServices.md +184 -0
- package/resources/js/context/knowledge/Subsystems/Optional/MultiplayerManagerKnowledge.md +242 -0
- package/resources/js/context/knowledge/Ui.md +11 -0
- package/resources/js/context/knowledge/UiEditorCompat.md +21 -0
- package/resources/js/context/rules/MultiplayerCapability.md +23 -0
- package/resources/js/context/rules/MultiplayerRoomEntryUX.md +63 -0
- package/resources/js/context/rules/PlatformBoundaryModules.md +43 -0
- package/resources/js/context/skills/aigc-generate/SKILL.md +301 -0
- package/resources/js/context/skills/aigc-generate/knowledge/audio.md +39 -0
- package/resources/js/context/skills/aigc-generate/knowledge/batch-replace.md +14 -0
- package/resources/js/context/skills/aigc-generate/knowledge/character2d.md +129 -0
- package/resources/js/context/skills/aigc-generate/knowledge/non-stepwise-aigc.md +54 -0
- package/resources/js/context/skills/aigc-generate/knowledge/texture-prop.md +50 -0
- package/resources/js/context/skills/aigc-generate/knowledge/texture-scene.md +201 -0
- package/resources/js/context/skills/aigc-generate/knowledge/texture-ui.md +53 -0
- package/resources/js/context/skills/aigc-generate/scripts/apply-results.mjs +83 -0
- package/resources/js/context/skills/aigc-generate/scripts/config.json +29 -0
- package/resources/js/context/skills/aigc-generate/scripts/generate.mjs +1016 -0
- package/resources/js/context/skills/aigc-generate/scripts/lib/client.mjs +228 -0
- package/resources/js/context/skills/aigc-generate/scripts/lib/ledger.mjs +119 -0
- package/resources/js/context/skills/aigc-generate/scripts/lib/nstep-handoff.mjs +100 -0
- package/resources/js/context/skills/aigc-generate/scripts/lib/pipelines.mjs +441 -0
- package/resources/js/context/skills/aigc-generate/scripts/lib/queue.mjs +283 -0
- package/resources/js/context/skills/aigc-generate/scripts/lib/submit.mjs +122 -0
- package/resources/js/context/skills/aigc-generate/scripts/worker.mjs +171 -0
- package/resources/js/context/skills/asset-search/SKILL.md +73 -0
- package/resources/js/context/skills/asset-search/scripts/asset_display.mjs +62 -0
- package/resources/js/context/skills/asset-search/scripts/config.json +5 -0
- package/resources/js/context/skills/asset-search/scripts/provided_assets.mjs +125 -0
- package/resources/js/context/skills/asset-search/scripts/recalled_sprite_paths.mjs +47 -0
- package/resources/js/context/skills/asset-search/scripts/search.mjs +749 -0
- package/resources/js/context/skills/asset-search/scripts/sprite_source_materializer.mjs +723 -0
- package/resources/js/context/skills/asset-search/strategies/audio.md +34 -0
- package/resources/js/context/skills/asset-search/strategies/character2d.md +33 -0
- package/resources/js/context/skills/asset-search/strategies/effect2d.md +31 -0
- package/resources/js/context/skills/asset-search/strategies/texture-prop.md +22 -0
- package/resources/js/context/skills/asset-search/strategies/texture-ui.md +35 -0
- package/resources/js/context/skills/asset-search/strategies/ui-common.md +40 -0
- package/resources/js/context/skills/asset-search/strategies/ui-style.md +28 -0
- package/resources/js/context/skills/display-info-setup/SKILL.md +32 -0
- package/resources/js/context/skills/display-info-setup/scripts/init_project.mjs +38 -0
- package/resources/js/context/skills/export-config/SKILL.md +20 -0
- package/resources/js/context/skills/export-config/scripts/assert-asset-wiring.mjs +72 -0
- package/resources/js/context/skills/export-config/scripts/export-config.mjs +43 -0
- package/resources/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/js/context/skills/export-config/scripts/sync-asset-controls.mjs +351 -0
- package/resources/js/context/skills/export-config/scripts/translate-asset-titles.mjs +163 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/SKILL.md +92 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/game-runtime.json +7 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/package.json +22 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/config.d.mts +19 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/config.mjs +1 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/leaderboard.d.mts +39 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/leaderboard.mjs +1 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/platform-capture-video.mjs +227 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/platform-service.d.mts +25 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/platform-service.mjs +1 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/platform.d.mts +79 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/platform.mjs +29 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/save.d.mts +49 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/save.mjs +1 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/release.json +37 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tooling/cli.mjs +2 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tooling/project.d.mts +8 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tooling/project.mjs +2 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tooling/vite.d.mts +3 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tooling/vite.mjs +8 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/assets.d.mts +24 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/assets.mjs +2 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/astc.d.mts +10 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/astc.mjs +1 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/audio.d.mts +20 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/audio.mjs +1 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/canvas.d.mts +21 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/canvas.mjs +1 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/input.d.mts +17 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/input.mjs +1 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/three.d.mts +40 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/three.mjs +1 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/ui.d.mts +10 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/ui.mjs +1 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/video.d.mts +8 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/video.mjs +1 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/config-export.mjs +32 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/refresh-runtime.mjs +50 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/src/display/ui-stage.ts +121 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/src/display/viewport.ts +254 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/src/main.ts +99 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/src/platform.ts +14 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/src/screenUi.ts +172 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/src/style.css +165 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/tsconfig.json +20 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/project/vite.config.ts +4 -0
- package/resources/js/context/skills/lightgame-runtime-adapt/scripts/install-template.mjs +109 -0
- package/resources/js/context/skills/mobile-adaptation/SKILL.md +260 -0
- package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-config.json +50 -0
- package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-layer.ts +881 -0
- package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-platform.ts +92 -0
- package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/look-pad.ts +245 -0
- package/resources/js/context/skills/mobile-adaptation/assets/example/src/ui/touch-controls.css +134 -0
- package/resources/js/context/skills/mobile-adaptation/references/input-config.md +311 -0
- package/resources/js/context/skills/mobile-adaptation/references/verification.md +106 -0
- package/resources/js/context/skills/optimization-suggestions/SKILL.md +89 -0
- package/resources/js/context/skills/platform-services/SKILL.md +94 -0
- package/resources/js/context/skills/platform-services/assets/modules/MultiplayerManager.ts +783 -0
- package/resources/js/context/skills/platform-services/assets/modules/eventBus.ts +57 -0
- package/resources/js/context/skills/platform-services/assets/modules/leaderboard.d.mts +39 -0
- package/resources/js/context/skills/platform-services/assets/modules/leaderboard.mjs +1 -0
- package/resources/js/context/skills/platform-services/assets/modules/log.ts +35 -0
- package/resources/js/context/skills/platform-services/assets/modules/platform-service.d.mts +25 -0
- package/resources/js/context/skills/platform-services/assets/modules/platform-service.mjs +1 -0
- package/resources/js/context/skills/platform-services/assets/modules/save.d.mts +49 -0
- package/resources/js/context/skills/platform-services/assets/modules/save.mjs +1 -0
- package/resources/js/context/skills/platform-services/assets/release.json +44 -0
- package/resources/js/context/skills/platform-services/assets/scaffold/ds/main.mjs +7 -0
- package/resources/js/context/skills/platform-services/assets/scaffold/ds/rooms/SyncRoom.mjs +264 -0
- package/resources/js/context/skills/platform-services/assets/scaffold/ds/rooms/syncSchema.mjs +39 -0
- package/resources/js/context/skills/platform-services/references/SERVER_GUIDE.md +139 -0
- package/resources/js/context/skills/platform-services/references/api_reference.md +18 -0
- package/resources/js/context/skills/platform-services/scripts/install.mjs +134 -0
- package/resources/js/context/skills/resolution-adaptation/SKILL.md +202 -0
- package/resources/js/context/skills/resolution-adaptation/assets/display/ui-stage.ts +121 -0
- package/resources/js/context/skills/resolution-adaptation/assets/display/viewport.ts +254 -0
- package/resources/js/context/skills/resolution-adaptation/assets/example/main.ts +98 -0
- package/resources/js/context/skills/resolution-adaptation/assets/example/ui-tokens.css +200 -0
- package/resources/js/context/skills/resolution-adaptation/references/layout-rules.md +134 -0
- package/resources/js/context/skills/resolution-adaptation/references/viewport-api.md +119 -0
- package/resources/js/context/skills/resolution-adaptation/scripts/aspect_audit.mjs +338 -0
- package/resources/js/context/skills/scene-editor-compat/SKILL.md +94 -0
- package/resources/js/context/skills/scene-editor-compat/assets/example/localcraft.assets.json +13 -0
- package/resources/js/context/skills/scene-editor-compat/assets/example/localcraft.scene-editor.json +6 -0
- package/resources/js/context/skills/scene-editor-compat/assets/example/src/game/sceneAdapter.ts +25 -0
- package/resources/js/context/skills/scene-editor-compat/assets/example/src/scenes/main.scene.json +18 -0
- package/resources/js/context/skills/scene-editor-compat/assets/runtime/release.json +7 -0
- package/resources/js/context/skills/scene-editor-compat/assets/runtime/scene.d.mts +42 -0
- package/resources/js/context/skills/scene-editor-compat/assets/runtime/scene.mjs +144 -0
- package/resources/js/context/skills/scene-editor-compat/docs/contract.md +330 -0
- package/resources/js/context/skills/scene-editor-compat/docs/resource-sync.md +64 -0
- package/resources/js/context/skills/scene-editor-compat/docs/runtime-state.md +28 -0
- package/resources/js/context/skills/scene-editor-compat/docs/terrain-contract.md +47 -0
- package/resources/js/context/skills/scene-editor-compat/docs/visual-contract.md +64 -0
- package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/localcraft.assets.json +38 -0
- package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/localcraft.scene-editor.json +9 -0
- package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/game/sceneAdapter.ts +59 -0
- package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/game/sceneBlockers.ts +30 -0
- package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/game/sceneFileAssets.ts +66 -0
- package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/scenes/Main.Scene.ts +20 -0
- package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/scenes/SceneTypes.ts +26 -0
- package/resources/js/context/skills/scene-editor-compat/references/contract.md +73 -0
- package/resources/js/context/skills/scene-editor-compat/scripts/apply_scene_marker.py +162 -0
- package/resources/js/context/skills/scene-editor-compat/scripts/check_scene_contract.py +853 -0
- package/resources/js/context/skills/scene-editor-compat/scripts/check_scene_resource_urls.py +173 -0
- package/resources/js/context/skills/scene-editor-compat/scripts/scene-editor.mjs +427 -0
- package/resources/js/context/skills/scene-editor-compat/version.json +1 -0
- package/resources/js/context/skills/ui-editor-compat/SKILL.md +48 -0
- package/resources/js/context/skills/ui-editor-compat/assets/example/hud/WidgetLayout_Hud.ts +35 -0
- package/resources/js/context/skills/ui-editor-compat/assets/example/hud/WidgetLogic_Hud.ts +74 -0
- package/resources/js/context/skills/ui-editor-compat/assets/example/hud/hud.css +60 -0
- package/resources/js/context/skills/ui-editor-compat/assets/runtime/dom-ui.d.mts +45 -0
- package/resources/js/context/skills/ui-editor-compat/assets/runtime/dom-ui.mjs +265 -0
- package/resources/js/context/skills/ui-editor-compat/assets/runtime/release.json +7 -0
- package/resources/js/context/skills/ui-editor-compat/references/contract.md +132 -0
- package/resources/js/context/skills/ui-editor-compat/scripts/editor-contract.mjs +327 -0
- package/resources/js/context/skills/ui-editor-compat/scripts/project-files.mjs +80 -0
- package/resources/js/context/skills/ui-editor-compat/scripts/ui-editor.mjs +84 -0
- package/resources/js/context/skills/version-update/SKILL.md +192 -0
- package/resources/js/context/skills/version-update/scripts/check_runtime_refs.mjs +129 -0
- package/resources/js/context/skills/version-update/scripts/feature_snapshot.mjs +159 -0
- package/resources/js/context/skills/version-update/scripts/update_feature_version.mjs +157 -0
- package/resources/js/context/skills/version-update/upgrade_diffs/.gitkeep +0 -0
- package/resources/js/context/skills/visual-qa/SKILL.md +36 -0
- package/resources/js/context/version/version.json +1 -0
- package/resources/js/project/.gitattributes +2 -0
- package/resources/js/project/README.md +99 -0
- package/resources/js/project/SPEC/assist/.gitkeep +0 -0
- package/resources/js/project/SPEC/guide/.gitkeep +0 -0
- package/resources/js/project/SPEC/plan/.gitkeep +0 -0
- package/resources/js/project/SPEC/readme.md +6 -0
- package/resources/js/project/SPEC/res/.gitkeep +0 -0
- package/resources/js/project/SPEC/task-item/.gitkeep +0 -0
- package/resources/js/project/configs/assets.json +1 -0
- package/resources/js/project/configs/game.controls.json +3 -0
- package/resources/js/project/configs/game.json +3 -0
- package/resources/js/project/game-runtime.json +7 -0
- package/resources/js/project/gameplay-probe.json +37 -0
- package/resources/js/project/index.html +20 -0
- package/resources/js/project/package-lock.json +1155 -0
- package/resources/js/project/package.json +23 -0
- package/resources/js/project/projectDisplayInfo.json +7 -0
- package/resources/js/project/runtime/lightgame/1.0.0/platform/config.d.mts +19 -0
- package/resources/js/project/runtime/lightgame/1.0.0/platform/config.mjs +1 -0
- package/resources/js/project/runtime/lightgame/1.0.0/platform/leaderboard.d.mts +39 -0
- package/resources/js/project/runtime/lightgame/1.0.0/platform/leaderboard.mjs +1 -0
- package/resources/js/project/runtime/lightgame/1.0.0/platform/platform-capture-video.mjs +227 -0
- package/resources/js/project/runtime/lightgame/1.0.0/platform/platform-service.d.mts +25 -0
- package/resources/js/project/runtime/lightgame/1.0.0/platform/platform-service.mjs +1 -0
- package/resources/js/project/runtime/lightgame/1.0.0/platform/platform.d.mts +79 -0
- package/resources/js/project/runtime/lightgame/1.0.0/platform/platform.mjs +29 -0
- package/resources/js/project/runtime/lightgame/1.0.0/platform/save.d.mts +49 -0
- package/resources/js/project/runtime/lightgame/1.0.0/platform/save.mjs +1 -0
- package/resources/js/project/runtime/lightgame/1.0.0/release.json +37 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tooling/cli.mjs +2 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tooling/project.d.mts +8 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tooling/project.mjs +2 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tooling/vite.d.mts +3 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tooling/vite.mjs +8 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tools/assets.d.mts +24 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tools/assets.mjs +2 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tools/astc.d.mts +10 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tools/astc.mjs +1 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tools/audio.d.mts +20 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tools/audio.mjs +1 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tools/canvas.d.mts +21 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tools/canvas.mjs +1 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tools/input.d.mts +17 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tools/input.mjs +1 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tools/three.d.mts +40 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tools/three.mjs +1 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tools/ui.d.mts +10 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tools/ui.mjs +1 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tools/video.d.mts +8 -0
- package/resources/js/project/runtime/lightgame/1.0.0/tools/video.mjs +1 -0
- package/resources/js/project/scripts/config-export.mjs +32 -0
- package/resources/js/project/scripts/refresh-runtime.mjs +50 -0
- package/resources/js/project/src/display/ui-stage.ts +121 -0
- package/resources/js/project/src/display/viewport.ts +254 -0
- package/resources/js/project/src/main.ts +99 -0
- package/resources/js/project/src/platform.ts +14 -0
- package/resources/js/project/src/scenes/LoadScene.ts +89 -0
- package/resources/js/project/src/scenes/PlayScene.ts +17 -0
- package/resources/js/project/src/screenUi.ts +172 -0
- package/resources/js/project/src/style.css +165 -0
- package/resources/js/project/tsconfig.json +20 -0
- package/resources/js/project/unified_data_control_config.json +20 -0
- package/resources/js/project/vendor/core-manager-js/package.json +33 -0
- package/resources/js/project/vendor/core-manager-js/src/.versions.json +42 -0
- package/resources/js/project/vendor/core-manager-js/src/CoreManagerPlugin.ts +41 -0
- package/resources/js/project/vendor/core-manager-js/src/assetManager/AssetRef.ts +90 -0
- package/resources/js/project/vendor/core-manager-js/src/assetManager/AstcFirstImageFile.ts +203 -0
- package/resources/js/project/vendor/core-manager-js/src/assetManager/AstcTextureLoader.ts +106 -0
- package/resources/js/project/vendor/core-manager-js/src/assetManager/resolveAssetUrl.test.ts +25 -0
- package/resources/js/project/vendor/core-manager-js/src/assetManager/resolveAssetUrl.ts +21 -0
- package/resources/js/project/vendor/core-manager-js/src/audioManager/AudioManager.test.ts +65 -0
- package/resources/js/project/vendor/core-manager-js/src/audioManager/AudioManager.ts +340 -0
- package/resources/js/project/vendor/core-manager-js/src/configManager/FeatureConfig.ts +87 -0
- package/resources/js/project/vendor/core-manager-js/src/configManager/tuneRuntime.d.mts +92 -0
- package/resources/js/project/vendor/core-manager-js/src/configManager/tuneRuntime.mjs +271 -0
- package/resources/js/project/vendor/core-manager-js/src/index.ts +31 -0
- package/resources/js/project/vendor/core-manager-js/src/inputManager/InputConfig.ts +81 -0
- package/resources/js/project/vendor/core-manager-js/src/inputManager/InputManager.test.ts +43 -0
- package/resources/js/project/vendor/core-manager-js/src/inputManager/InputManager.ts +32 -0
- package/resources/js/project/vendor/core-manager-js/src/inputManager/InputRuntime.test.ts +141 -0
- package/resources/js/project/vendor/core-manager-js/src/inputManager/InputRuntime.ts +20 -0
- package/resources/js/project/vendor/core-manager-js/src/inputManager/KeyboardProvider.ts +183 -0
- package/resources/js/project/vendor/core-manager-js/src/inputManager/TouchProvider.ts +304 -0
- package/resources/js/project/vendor/core-manager-js/src/inputManager/VirtualJoystick.ts +351 -0
- package/resources/js/project/vendor/core-manager-js/src/inputManager/_internal/InputManagerImpl.ts +180 -0
- package/resources/js/project/vendor/core-manager-js/src/inputManager/icons.b64 +13 -0
- package/resources/js/project/vendor/core-manager-js/src/inputManager/icons.b64.d.ts +14 -0
- package/resources/js/project/vendor/core-manager-js/src/inputManager/input_config.example.json +68 -0
- package/resources/js/project/vendor/core-manager-js/src/logManager/DebugConsole.ts +433 -0
- package/resources/js/project/vendor/core-manager-js/src/logManager/LogCapture.ts +118 -0
- package/resources/js/project/vendor/core-manager-js/src/logManager/LogManager.ts +444 -0
- package/resources/js/project/vendor/core-manager-js/src/logManager/ScreenCapture.ts +485 -0
- package/resources/js/project/vendor/core-manager-js/src/logManager/ScreenCaptureVideo.test.ts +66 -0
- package/resources/js/project/vendor/core-manager-js/src/logManager/ScreenCaptureVideo.ts +149 -0
- package/resources/js/project/vendor/core-manager-js/src/logManager/icons.b64 +9 -0
- package/resources/js/project/vendor/core-manager-js/src/resourceManager/AssetUrlResolver.ts +29 -0
- package/resources/js/project/vendor/core-manager-js/src/resourceManager/ResourceManager.test.ts +88 -0
- package/resources/js/project/vendor/core-manager-js/src/resourceManager/ResourceManager.ts +122 -0
- package/resources/js/project/vendor/core-manager-js/src/runtime.ts +24 -0
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/CharacterEntity.ts +318 -0
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/CharacterPhysicsBinding.test.ts +151 -0
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/CharacterPhysicsBinding.ts +235 -0
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/EffectComposite.test.ts +98 -0
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/EffectComposite.ts +94 -0
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/EffectEntity.ts +209 -0
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxManager.test.ts +106 -0
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxManager.ts +341 -0
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxRecipe.test.ts +68 -0
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxRecipe.ts +236 -0
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/SpriteAnimManager.test.ts +22 -0
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/SpriteAnimManager.ts +29 -0
- package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/SpriteEntity.test.ts +197 -0
- package/resources/js/project/vendor/core-manager-js/src/uiManager/DomUiContracts.ts +9 -0
- package/resources/js/project/vendor/core-manager-js/src/uiManager/DomUiKit.ts +555 -0
- package/resources/js/project/vendor/core-manager-js/src/uiManager/UIFacadePlugin.test.ts +112 -0
- package/resources/js/project/vendor/core-manager-js/src/uiManager/UIFacadePlugin.ts +178 -0
- package/resources/js/project/vendor/core-manager-js/src/uiManager/ui-base.css +246 -0
- package/resources/js/project/vendor/core-manager-js/src/videoManager/VideoManager.ts +139 -0
- package/resources/js/project/vendor/core-manager-js/tsconfig.json +15 -0
- package/resources/js/project/vendor/run.sh +107 -0
- package/resources/js/project/version/craft_feature_version.json +42 -0
- package/resources/js/project/version/project_feature_version.json +11 -0
- package/resources/js/project/vite.config.ts +4 -0
- package/resources/js3d/context/CLAUDE.md +50 -0
- package/resources/js3d/context/hooks/hooks.json +20 -0
- package/resources/js3d/context/knowledge/3D/PoseInterpolationKnowledge.md +87 -0
- package/resources/js3d/context/knowledge/CodingGuide/Pitfalls.md +69 -0
- package/resources/js3d/context/knowledge/CodingGuide/SceneEditableGuide.md +42 -0
- package/resources/js3d/context/knowledge/FrontendComponents.md +23 -0
- package/resources/js3d/context/knowledge/Multiplayer/GameplaySystemKnowledge.md +114 -0
- package/resources/js3d/context/knowledge/Multiplayer/OverviewKnowledge.md +117 -0
- package/resources/js3d/context/knowledge/Multiplayer/StateSyncKnowledge.md +430 -0
- package/resources/js3d/context/knowledge/PlatformServices.md +162 -0
- package/resources/js3d/context/knowledge/Runtime.md +30 -0
- package/resources/js3d/context/knowledge/SceneEditorCompat.md +34 -0
- package/resources/js3d/context/knowledge/StepByStep.md +21 -0
- package/resources/js3d/context/knowledge/Subsystems/Optional/MultiplayerManagerKnowledge.md +242 -0
- package/resources/js3d/context/knowledge/UiEditorCompat.md +21 -0
- package/resources/js3d/context/rules/MultiplayerCapability.md +27 -0
- package/resources/js3d/context/rules/MultiplayerRoomEntryUX.md +63 -0
- package/resources/js3d/context/rules/PlatformBoundaryModules.md +43 -0
- package/resources/js3d/context/skills/aigc-integration/SKILL.md +176 -0
- package/resources/js3d/context/skills/aigc-integration/callback.md +56 -0
- package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/README.md +22 -0
- package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/audio-aigc-knowledge.md +38 -0
- package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/staticmesh-aigc-knowledge.md +33 -0
- package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/texture-prop-aigc-knowledge.md +36 -0
- package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/texture-scene-aigc-knowledge.md +37 -0
- package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/texture-ui-aigc-knowledge.md +35 -0
- package/resources/js3d/context/skills/aigc-integration/scripts/config.json +3 -0
- package/resources/js3d/context/skills/aigc-integration/scripts/lib/submit.mjs +344 -0
- package/resources/js3d/context/skills/aigc-integration/scripts/query-music.mjs +53 -0
- package/resources/js3d/context/skills/aigc-integration/scripts/query-results.mjs +53 -0
- package/resources/js3d/context/skills/aigc-integration/scripts/submit-cover.mjs +44 -0
- package/resources/js3d/context/skills/aigc-integration/scripts/submit-image.mjs +48 -0
- package/resources/js3d/context/skills/aigc-integration/scripts/submit-music.mjs +34 -0
- package/resources/js3d/context/skills/aigc-integration/scripts/submit-staticmesh.mjs +39 -0
- package/resources/js3d/context/skills/asset-search/SKILL.md +159 -0
- package/resources/js3d/context/skills/asset-search/references/resource-config.md +56 -0
- package/resources/js3d/context/skills/asset-search/scripts/asset_display.mjs +62 -0
- package/resources/js3d/context/skills/asset-search/scripts/config.json +213 -0
- package/resources/js3d/context/skills/asset-search/scripts/manifest_pipeline.mjs +885 -0
- package/resources/js3d/context/skills/asset-search/scripts/preflight.mjs +79 -0
- package/resources/js3d/context/skills/asset-search/scripts/provided_assets.mjs +74 -0
- package/resources/js3d/context/skills/asset-search/scripts/search.mjs +597 -0
- package/resources/js3d/context/skills/export-config/scripts/assert-asset-wiring.mjs +83 -0
- package/resources/js3d/context/skills/export-config/scripts/export-config.mjs +53 -0
- package/resources/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/js3d/context/skills/export-config/scripts/sync-asset-controls.mjs +325 -0
- package/resources/js3d/context/skills/export-config/scripts/sync-scene-assets.mjs +181 -0
- package/resources/js3d/context/skills/export-config/scripts/translate-asset-titles.mjs +163 -0
- package/resources/js3d/context/skills/game-art-style/SKILL.md +60 -0
- package/resources/js3d/context/skills/game-art-style/assets/previews/cartoon.png +0 -0
- package/resources/js3d/context/skills/game-art-style/assets/previews/comic.png +0 -0
- package/resources/js3d/context/skills/game-art-style/assets/previews/cozy.png +0 -0
- package/resources/js3d/context/skills/game-art-style/assets/previews/cyber.png +0 -0
- package/resources/js3d/context/skills/game-art-style/assets/previews/horror.png +0 -0
- package/resources/js3d/context/skills/game-art-style/assets/previews/lowpoly.png +0 -0
- package/resources/js3d/context/skills/game-art-style/assets/previews/paper.png +0 -0
- package/resources/js3d/context/skills/game-art-style/assets/previews/voxel.png +0 -0
- package/resources/js3d/context/skills/game-art-style/references/art-parameters-lite.md +38 -0
- package/resources/js3d/context/skills/game-art-style/references/construction.md +111 -0
- package/resources/js3d/context/skills/game-art-style/references/materials-textures.md +105 -0
- package/resources/js3d/context/skills/game-art-style/references/sources.md +25 -0
- package/resources/js3d/context/skills/game-art-style/references/styles/cartoon.md +175 -0
- package/resources/js3d/context/skills/game-art-style/references/styles/comic.md +168 -0
- package/resources/js3d/context/skills/game-art-style/references/styles/cozy.md +191 -0
- package/resources/js3d/context/skills/game-art-style/references/styles/cyber.md +165 -0
- package/resources/js3d/context/skills/game-art-style/references/styles/horror.md +173 -0
- package/resources/js3d/context/skills/game-art-style/references/styles/lowpoly.md +185 -0
- package/resources/js3d/context/skills/game-art-style/references/styles/paper.md +181 -0
- package/resources/js3d/context/skills/game-art-style/references/styles/voxel.md +189 -0
- package/resources/js3d/context/skills/game-art-style/references/user-style-document.md +88 -0
- package/resources/js3d/context/skills/mobile-adaptation/SKILL.md +284 -0
- package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-config.json +104 -0
- package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-layer.ts +952 -0
- package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-platform.ts +92 -0
- package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/look-pad.ts +245 -0
- package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/ui/touch-controls.css +256 -0
- package/resources/js3d/context/skills/mobile-adaptation/references/input-config.md +311 -0
- package/resources/js3d/context/skills/mobile-adaptation/references/verification.md +106 -0
- package/resources/js3d/context/skills/optimization-suggestions/SKILL.md +74 -0
- package/resources/js3d/context/skills/platform-services/SKILL.md +94 -0
- package/resources/js3d/context/skills/platform-services/assets/modules/MultiplayerManager.ts +783 -0
- package/resources/js3d/context/skills/platform-services/assets/modules/eventBus.ts +57 -0
- package/resources/js3d/context/skills/platform-services/assets/modules/leaderboard.d.mts +39 -0
- package/resources/js3d/context/skills/platform-services/assets/modules/leaderboard.mjs +1 -0
- package/resources/js3d/context/skills/platform-services/assets/modules/log.ts +35 -0
- package/resources/js3d/context/skills/platform-services/assets/modules/platform-service.d.mts +25 -0
- package/resources/js3d/context/skills/platform-services/assets/modules/platform-service.mjs +1 -0
- package/resources/js3d/context/skills/platform-services/assets/modules/save.d.mts +49 -0
- package/resources/js3d/context/skills/platform-services/assets/modules/save.mjs +1 -0
- package/resources/js3d/context/skills/platform-services/assets/release.json +44 -0
- package/resources/js3d/context/skills/platform-services/assets/scaffold/ds/main.mjs +7 -0
- package/resources/js3d/context/skills/platform-services/assets/scaffold/ds/rooms/SyncRoom.mjs +264 -0
- package/resources/js3d/context/skills/platform-services/assets/scaffold/ds/rooms/syncSchema.mjs +39 -0
- package/resources/js3d/context/skills/platform-services/references/SERVER_GUIDE.md +139 -0
- package/resources/js3d/context/skills/platform-services/references/api_reference.md +18 -0
- package/resources/js3d/context/skills/platform-services/scripts/install.mjs +134 -0
- package/resources/js3d/context/skills/resolution-adaptation/SKILL.md +170 -0
- package/resources/js3d/context/skills/resolution-adaptation/assets/display/ui-stage.ts +121 -0
- package/resources/js3d/context/skills/resolution-adaptation/assets/display/viewport.ts +244 -0
- package/resources/js3d/context/skills/resolution-adaptation/assets/example/main.ts +127 -0
- package/resources/js3d/context/skills/resolution-adaptation/assets/example/ui-tokens.css +188 -0
- package/resources/js3d/context/skills/resolution-adaptation/references/layout-rules.md +124 -0
- package/resources/js3d/context/skills/resolution-adaptation/references/viewport-api.md +117 -0
- package/resources/js3d/context/skills/resolution-adaptation/scripts/aspect_audit.mjs +338 -0
- package/resources/js3d/context/skills/scene-editor-compat/SKILL.md +599 -0
- package/resources/js3d/context/skills/scene-editor-compat/references/bundle-contract.md +141 -0
- package/resources/js3d/context/skills/scene-editor-compat/references/editor-integration.md +92 -0
- package/resources/js3d/context/skills/scene-editor-compat/references/scene-data-format.md +125 -0
- package/resources/js3d/context/skills/scene-editor-compat/references/slots-rules.md +113 -0
- package/resources/js3d/context/skills/scene-editor-compat/scripts/scene-editor.mjs +1187 -0
- package/resources/js3d/context/skills/threejs-game-quality/SKILL.md +52 -0
- package/resources/js3d/context/skills/threejs-game-quality/agents/openai.yaml +4 -0
- package/resources/js3d/context/skills/threejs-game-quality/references/01-build.md +94 -0
- package/resources/js3d/context/skills/threejs-game-quality/references/02-avoid.md +50 -0
- package/resources/js3d/context/skills/threejs-game-quality/references/03-detect.md +105 -0
- package/resources/js3d/context/skills/threejs-game-quality/references/camera-by-genre.md +147 -0
- package/resources/js3d/context/skills/threejs-game-quality/references/camera-distance.md +79 -0
- package/resources/js3d/context/skills/threejs-game-quality/references/camera-sources.md +56 -0
- package/resources/js3d/context/skills/threejs-game-quality/references/character-motion-face.md +51 -0
- package/resources/js3d/context/skills/threejs-game-quality/references/parameter-contract.md +55 -0
- package/resources/js3d/context/skills/threejs-game-quality/references/refine-existing.md +78 -0
- package/resources/js3d/context/skills/threejs-game-quality/references/rendering-stability.md +84 -0
- package/resources/js3d/context/skills/threejs-game-quality/references/runtime-tools.md +120 -0
- package/resources/js3d/context/skills/threejs-game-quality/scripts/package.json +4 -0
- package/resources/js3d/context/skills/threejs-game-quality/scripts/runtime-audit.js +238 -0
- package/resources/js3d/context/skills/ui-editor-compat/SKILL.md +59 -0
- package/resources/js3d/context/skills/ui-editor-compat/assets/example/hud/WidgetLayout_Hud.ts +35 -0
- package/resources/js3d/context/skills/ui-editor-compat/assets/example/hud/WidgetLogic_Hud.ts +61 -0
- package/resources/js3d/context/skills/ui-editor-compat/assets/example/hud/hud.css +60 -0
- package/resources/js3d/context/skills/ui-editor-compat/assets/runtime/dom-ui.d.mts +45 -0
- package/resources/js3d/context/skills/ui-editor-compat/assets/runtime/dom-ui.mjs +265 -0
- package/resources/js3d/context/skills/ui-editor-compat/assets/runtime/release.json +7 -0
- package/resources/js3d/context/skills/ui-editor-compat/references/contract.md +110 -0
- package/resources/js3d/context/skills/ui-editor-compat/scripts/editor-contract.mjs +327 -0
- package/resources/js3d/context/skills/ui-editor-compat/scripts/project-files.mjs +80 -0
- package/resources/js3d/context/skills/ui-editor-compat/scripts/ui-editor.mjs +84 -0
- package/resources/js3d/context/skills/version-update/SKILL.md +191 -0
- package/resources/js3d/context/skills/version-update/scripts/check_runtime_refs.mjs +129 -0
- package/resources/js3d/context/skills/version-update/scripts/feature_snapshot.mjs +159 -0
- package/resources/js3d/context/skills/version-update/scripts/update_feature_version.mjs +157 -0
- package/resources/js3d/context/skills/version-update/upgrade_diffs/.gitkeep +0 -0
- package/resources/js3d/context/version/version.json +1 -0
- package/resources/js3d/project/.gitattributes +2 -0
- package/resources/js3d/project/README.md +100 -0
- package/resources/js3d/project/configs/game.controls.json +3 -0
- package/resources/js3d/project/configs/game.json +3 -0
- package/resources/js3d/project/game-runtime.json +7 -0
- package/resources/js3d/project/gameplay-probe.json +38 -0
- package/resources/js3d/project/index.html +12 -0
- package/resources/js3d/project/package-lock.json +1204 -0
- package/resources/js3d/project/package.json +24 -0
- package/resources/js3d/project/projectDisplayInfo.json +7 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/config.d.mts +19 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/config.mjs +1 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/leaderboard.d.mts +39 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/leaderboard.mjs +1 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform-capture-video.mjs +227 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform-service.d.mts +25 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform-service.mjs +1 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform.d.mts +79 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform.mjs +30 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/save.d.mts +49 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/platform/save.mjs +1 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/release.json +39 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/cli.mjs +2 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/project.d.mts +8 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/project.mjs +2 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/vite.d.mts +3 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/vite.mjs +7 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/assets.d.mts +24 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/assets.mjs +2 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/astc.d.mts +10 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/astc.mjs +1 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/audio.d.mts +20 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/audio.mjs +1 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/canvas.d.mts +21 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/canvas.mjs +1 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/glb.d.mts +36 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/glb.mjs +359 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/glb.test.mjs +25 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/input.d.mts +17 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/input.mjs +1 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/three.d.mts +40 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/three.mjs +1 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/ui.d.mts +10 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/ui.mjs +1 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/video.d.mts +8 -0
- package/resources/js3d/project/runtime/lightgame/1.0.0/tools/video.mjs +1 -0
- package/resources/js3d/project/scripts/config-export.mjs +32 -0
- package/resources/js3d/project/scripts/refresh-runtime.mjs +50 -0
- package/resources/js3d/project/src/display/ui-stage.ts +121 -0
- package/resources/js3d/project/src/display/viewport.ts +244 -0
- package/resources/js3d/project/src/main.ts +83 -0
- package/resources/js3d/project/src/platform.ts +14 -0
- package/resources/js3d/project/src/style.css +17 -0
- package/resources/js3d/project/tsconfig.json +20 -0
- package/resources/js3d/project/unified_data_control_config.json +20 -0
- package/resources/js3d/project/vendor/core-manager-three/package.json +12 -0
- package/resources/js3d/project/vendor/core-manager-three/src/index.ts +2 -0
- package/resources/js3d/project/vendor/run.sh +4 -0
- package/resources/js3d/project/version/craft_feature_version.json +42 -0
- package/resources/js3d/project/version/project_feature_version.json +11 -0
- package/resources/js3d/project/vite.config.ts +4 -0
- package/vendor/agent-cli/dist/runtime-tools/registry.json +6 -0
- package/vendor/agent-cli/dist/runtime-tools/tool-bundle-types.d.cts +15 -0
- package/vendor/agent-cli/dist/runtime-tools/tool-bundle.cjs +129 -0
- package/vendor/agent-cli/dist/runtime-tools/ue/blender-cook-assets.cjs +296 -0
- package/vendor/agent-cli/dist/runtime-tools/ue/context-adapter.cjs +48 -0
- package/vendor/agent-cli/dist/runtime-tools/ue/scene-process-lock.cjs +110 -0
- package/vendor/agent-cli/dist/runtime-tools/ue/tool-manifest.json +22 -0
- package/vendor/agent-cli/dist/runtime-tools/ue/ue-asset-references.cjs +305 -0
- package/vendor/agent-cli/dist/src/artifacts/context-finalize.d.ts +3 -0
- package/vendor/agent-cli/dist/src/artifacts/context-finalize.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/context-finalize.js +45 -0
- package/vendor/agent-cli/dist/src/artifacts/context-finalize.js.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/external-game-archive.d.ts +19 -0
- package/vendor/agent-cli/dist/src/artifacts/external-game-archive.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/external-game-archive.js +107 -0
- package/vendor/agent-cli/dist/src/artifacts/external-game-archive.js.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/external-game-upload.d.ts +44 -0
- package/vendor/agent-cli/dist/src/artifacts/external-game-upload.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/external-game-upload.js +106 -0
- package/vendor/agent-cli/dist/src/artifacts/external-game-upload.js.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/prepare.d.ts +57 -0
- package/vendor/agent-cli/dist/src/artifacts/prepare.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/prepare.js +198 -0
- package/vendor/agent-cli/dist/src/artifacts/prepare.js.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/process-artifacts.d.ts +32 -0
- package/vendor/agent-cli/dist/src/artifacts/process-artifacts.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/process-artifacts.js +146 -0
- package/vendor/agent-cli/dist/src/artifacts/process-artifacts.js.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/restore.d.ts +28 -0
- package/vendor/agent-cli/dist/src/artifacts/restore.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/restore.js +384 -0
- package/vendor/agent-cli/dist/src/artifacts/restore.js.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/static.d.ts +15 -0
- package/vendor/agent-cli/dist/src/artifacts/static.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/artifacts/static.js +152 -0
- package/vendor/agent-cli/dist/src/artifacts/static.js.map +1 -0
- package/vendor/agent-cli/dist/src/cli/commands/process.d.ts +4 -0
- package/vendor/agent-cli/dist/src/cli/commands/process.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/cli/commands/process.js +24 -0
- package/vendor/agent-cli/dist/src/cli/commands/process.js.map +1 -0
- package/vendor/agent-cli/dist/src/cli/commands/run-controls.d.ts +23 -0
- package/vendor/agent-cli/dist/src/cli/commands/run-controls.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/cli/commands/run-controls.js +62 -0
- package/vendor/agent-cli/dist/src/cli/commands/run-controls.js.map +1 -0
- package/vendor/agent-cli/dist/src/cli/commands/run-mock.d.ts +9 -0
- package/vendor/agent-cli/dist/src/cli/commands/run-mock.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/cli/commands/run-mock.js +15 -0
- package/vendor/agent-cli/dist/src/cli/commands/run-mock.js.map +1 -0
- package/vendor/agent-cli/dist/src/cli/commands/run.d.ts +3 -0
- package/vendor/agent-cli/dist/src/cli/commands/run.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/cli/commands/run.js +284 -0
- package/vendor/agent-cli/dist/src/cli/commands/run.js.map +1 -0
- package/vendor/agent-cli/dist/src/cli/commands/setup.d.ts +11 -0
- package/vendor/agent-cli/dist/src/cli/commands/setup.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/cli/commands/setup.js +161 -0
- package/vendor/agent-cli/dist/src/cli/commands/setup.js.map +1 -0
- package/vendor/agent-cli/dist/src/cli/options.d.ts +83 -0
- package/vendor/agent-cli/dist/src/cli/options.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/cli/options.js +213 -0
- package/vendor/agent-cli/dist/src/cli/options.js.map +1 -0
- package/vendor/agent-cli/dist/src/cli/process-protocol.d.ts +5 -0
- package/vendor/agent-cli/dist/src/cli/process-protocol.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/cli/process-protocol.js +276 -0
- package/vendor/agent-cli/dist/src/cli/process-protocol.js.map +1 -0
- package/vendor/agent-cli/dist/src/cli/registry.d.ts +55 -0
- package/vendor/agent-cli/dist/src/cli/registry.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/cli/registry.js +99 -0
- package/vendor/agent-cli/dist/src/cli/registry.js.map +1 -0
- package/vendor/agent-cli/dist/src/cli/render/jsonl-sink.d.ts +44 -0
- package/vendor/agent-cli/dist/src/cli/render/jsonl-sink.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/cli/render/jsonl-sink.js +83 -0
- package/vendor/agent-cli/dist/src/cli/render/jsonl-sink.js.map +1 -0
- package/vendor/agent-cli/dist/src/cli/render/text-sink.d.ts +28 -0
- package/vendor/agent-cli/dist/src/cli/render/text-sink.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/cli/render/text-sink.js +52 -0
- package/vendor/agent-cli/dist/src/cli/render/text-sink.js.map +1 -0
- package/vendor/agent-cli/dist/src/cli.d.ts +9 -0
- package/vendor/agent-cli/dist/src/cli.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/cli.js +54 -0
- package/vendor/agent-cli/dist/src/cli.js.map +1 -0
- package/vendor/agent-cli/dist/src/component/execution.d.ts +24 -0
- package/vendor/agent-cli/dist/src/component/execution.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/component/execution.js +131 -0
- package/vendor/agent-cli/dist/src/component/execution.js.map +1 -0
- package/vendor/agent-cli/dist/src/component/platform-access/server.d.ts +24 -0
- package/vendor/agent-cli/dist/src/component/platform-access/server.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/component/platform-access/server.js +200 -0
- package/vendor/agent-cli/dist/src/component/platform-access/server.js.map +1 -0
- package/vendor/agent-cli/dist/src/component/preparation-diagnostics.d.ts +31 -0
- package/vendor/agent-cli/dist/src/component/preparation-diagnostics.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/component/preparation-diagnostics.js +57 -0
- package/vendor/agent-cli/dist/src/component/preparation-diagnostics.js.map +1 -0
- package/vendor/agent-cli/dist/src/component/preparation.d.ts +10 -0
- package/vendor/agent-cli/dist/src/component/preparation.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/component/preparation.js +35 -0
- package/vendor/agent-cli/dist/src/component/preparation.js.map +1 -0
- package/vendor/agent-cli/dist/src/component/runtime-tools.d.ts +15 -0
- package/vendor/agent-cli/dist/src/component/runtime-tools.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/component/runtime-tools.js +37 -0
- package/vendor/agent-cli/dist/src/component/runtime-tools.js.map +1 -0
- package/vendor/agent-cli/dist/src/component/runtime.d.ts +8 -0
- package/vendor/agent-cli/dist/src/component/runtime.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/component/runtime.js +95 -0
- package/vendor/agent-cli/dist/src/component/runtime.js.map +1 -0
- package/vendor/agent-cli/dist/src/config/config-store.d.ts +50 -0
- package/vendor/agent-cli/dist/src/config/config-store.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/config/config-store.js +117 -0
- package/vendor/agent-cli/dist/src/config/config-store.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/cache-lease.d.ts +17 -0
- package/vendor/agent-cli/dist/src/context/cache-lease.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/cache-lease.js +133 -0
- package/vendor/agent-cli/dist/src/context/cache-lease.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/cache-prune-diagnostics.d.ts +9 -0
- package/vendor/agent-cli/dist/src/context/cache-prune-diagnostics.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/cache-prune-diagnostics.js +51 -0
- package/vendor/agent-cli/dist/src/context/cache-prune-diagnostics.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/cache-publication.d.ts +4 -0
- package/vendor/agent-cli/dist/src/context/cache-publication.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/cache-publication.js +54 -0
- package/vendor/agent-cli/dist/src/context/cache-publication.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/client-context-view.d.ts +12 -0
- package/vendor/agent-cli/dist/src/context/client-context-view.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/client-context-view.js +100 -0
- package/vendor/agent-cli/dist/src/context/client-context-view.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/context-budget.d.ts +3 -0
- package/vendor/agent-cli/dist/src/context/context-budget.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/context-budget.js +10 -0
- package/vendor/agent-cli/dist/src/context/context-budget.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/context-cache.d.ts +108 -0
- package/vendor/agent-cli/dist/src/context/context-cache.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/context-cache.js +357 -0
- package/vendor/agent-cli/dist/src/context/context-cache.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/context-project.d.ts +26 -0
- package/vendor/agent-cli/dist/src/context/context-project.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/context-project.js +113 -0
- package/vendor/agent-cli/dist/src/context/context-project.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/context-resource.d.ts +4 -0
- package/vendor/agent-cli/dist/src/context/context-resource.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/context-resource.js +11 -0
- package/vendor/agent-cli/dist/src/context/context-resource.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/context-snapshot-cache.d.ts +9 -0
- package/vendor/agent-cli/dist/src/context/context-snapshot-cache.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/context-snapshot-cache.js +134 -0
- package/vendor/agent-cli/dist/src/context/context-snapshot-cache.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/local-skills.d.ts +4 -0
- package/vendor/agent-cli/dist/src/context/local-skills.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/local-skills.js +157 -0
- package/vendor/agent-cli/dist/src/context/local-skills.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/member-context.d.ts +19 -0
- package/vendor/agent-cli/dist/src/context/member-context.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/member-context.js +105 -0
- package/vendor/agent-cli/dist/src/context/member-context.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/member-documents.d.ts +3 -0
- package/vendor/agent-cli/dist/src/context/member-documents.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/member-documents.js +38 -0
- package/vendor/agent-cli/dist/src/context/member-documents.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/member-profile-header.d.ts +3 -0
- package/vendor/agent-cli/dist/src/context/member-profile-header.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/member-profile-header.js +62 -0
- package/vendor/agent-cli/dist/src/context/member-profile-header.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/member-profile.d.ts +43 -0
- package/vendor/agent-cli/dist/src/context/member-profile.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/member-profile.js +91 -0
- package/vendor/agent-cli/dist/src/context/member-profile.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/member-selection.d.ts +7 -0
- package/vendor/agent-cli/dist/src/context/member-selection.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/member-selection.js +58 -0
- package/vendor/agent-cli/dist/src/context/member-selection.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/script-dependencies.d.ts +6 -0
- package/vendor/agent-cli/dist/src/context/script-dependencies.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/script-dependencies.js +24 -0
- package/vendor/agent-cli/dist/src/context/script-dependencies.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/shared-cache-build.d.ts +3 -0
- package/vendor/agent-cli/dist/src/context/shared-cache-build.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/shared-cache-build.js +55 -0
- package/vendor/agent-cli/dist/src/context/shared-cache-build.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/team-definition.d.ts +39 -0
- package/vendor/agent-cli/dist/src/context/team-definition.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/team-definition.js +78 -0
- package/vendor/agent-cli/dist/src/context/team-definition.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/team-knowledge.d.ts +7 -0
- package/vendor/agent-cli/dist/src/context/team-knowledge.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/team-knowledge.js +37 -0
- package/vendor/agent-cli/dist/src/context/team-knowledge.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/template-cache.d.ts +27 -0
- package/vendor/agent-cli/dist/src/context/template-cache.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/template-cache.js +100 -0
- package/vendor/agent-cli/dist/src/context/template-cache.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/template-seed.d.ts +32 -0
- package/vendor/agent-cli/dist/src/context/template-seed.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/template-seed.js +117 -0
- package/vendor/agent-cli/dist/src/context/template-seed.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/user-skill-bundle.d.ts +19 -0
- package/vendor/agent-cli/dist/src/context/user-skill-bundle.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/user-skill-bundle.js +292 -0
- package/vendor/agent-cli/dist/src/context/user-skill-bundle.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/user-skill-context.d.ts +13 -0
- package/vendor/agent-cli/dist/src/context/user-skill-context.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/user-skill-context.js +178 -0
- package/vendor/agent-cli/dist/src/context/user-skill-context.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/user-skill-install.d.ts +54 -0
- package/vendor/agent-cli/dist/src/context/user-skill-install.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/user-skill-install.js +184 -0
- package/vendor/agent-cli/dist/src/context/user-skill-install.js.map +1 -0
- package/vendor/agent-cli/dist/src/context/zip-extract.d.ts +14 -0
- package/vendor/agent-cli/dist/src/context/zip-extract.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/context/zip-extract.js +130 -0
- package/vendor/agent-cli/dist/src/context/zip-extract.js.map +1 -0
- package/vendor/agent-cli/dist/src/index.d.ts +58 -0
- package/vendor/agent-cli/dist/src/index.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/index.js +84 -0
- package/vendor/agent-cli/dist/src/index.js.map +1 -0
- package/vendor/agent-cli/dist/src/lifecycle/engine-hooks.d.ts +68 -0
- package/vendor/agent-cli/dist/src/lifecycle/engine-hooks.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/lifecycle/engine-hooks.js +242 -0
- package/vendor/agent-cli/dist/src/lifecycle/engine-hooks.js.map +1 -0
- package/vendor/agent-cli/dist/src/lifecycle/hook-command.d.ts +40 -0
- package/vendor/agent-cli/dist/src/lifecycle/hook-command.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/lifecycle/hook-command.js +87 -0
- package/vendor/agent-cli/dist/src/lifecycle/hook-command.js.map +1 -0
- package/vendor/agent-cli/dist/src/lifecycle/registry.d.ts +134 -0
- package/vendor/agent-cli/dist/src/lifecycle/registry.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/lifecycle/registry.js +152 -0
- package/vendor/agent-cli/dist/src/lifecycle/registry.js.map +1 -0
- package/vendor/agent-cli/dist/src/lifecycle/workspace-change.d.ts +40 -0
- package/vendor/agent-cli/dist/src/lifecycle/workspace-change.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/lifecycle/workspace-change.js +149 -0
- package/vendor/agent-cli/dist/src/lifecycle/workspace-change.js.map +1 -0
- package/vendor/agent-cli/dist/src/mcp/client.d.ts +12 -0
- package/vendor/agent-cli/dist/src/mcp/client.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/mcp/client.js +95 -0
- package/vendor/agent-cli/dist/src/mcp/client.js.map +1 -0
- package/vendor/agent-cli/dist/src/mcp/connection.d.ts +14 -0
- package/vendor/agent-cli/dist/src/mcp/connection.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/mcp/connection.js +115 -0
- package/vendor/agent-cli/dist/src/mcp/connection.js.map +1 -0
- package/vendor/agent-cli/dist/src/mcp/execute.d.ts +5 -0
- package/vendor/agent-cli/dist/src/mcp/execute.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/mcp/execute.js +26 -0
- package/vendor/agent-cli/dist/src/mcp/execute.js.map +1 -0
- package/vendor/agent-cli/dist/src/mcp/instance-lock.d.ts +11 -0
- package/vendor/agent-cli/dist/src/mcp/instance-lock.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/mcp/instance-lock.js +51 -0
- package/vendor/agent-cli/dist/src/mcp/instance-lock.js.map +1 -0
- package/vendor/agent-cli/dist/src/mcp/types.d.ts +27 -0
- package/vendor/agent-cli/dist/src/mcp/types.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/mcp/types.js +2 -0
- package/vendor/agent-cli/dist/src/mcp/types.js.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/input.d.ts +21 -0
- package/vendor/agent-cli/dist/src/protocol/input.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/input.js +95 -0
- package/vendor/agent-cli/dist/src/protocol/input.js.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/link/channel.d.ts +58 -0
- package/vendor/agent-cli/dist/src/protocol/link/channel.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/link/channel.js +337 -0
- package/vendor/agent-cli/dist/src/protocol/link/channel.js.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/link/codec-json.d.ts +13 -0
- package/vendor/agent-cli/dist/src/protocol/link/codec-json.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/link/codec-json.js +27 -0
- package/vendor/agent-cli/dist/src/protocol/link/codec-json.js.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/link/envelope.d.ts +57 -0
- package/vendor/agent-cli/dist/src/protocol/link/envelope.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/link/envelope.js +93 -0
- package/vendor/agent-cli/dist/src/protocol/link/envelope.js.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/link/liveness.d.ts +28 -0
- package/vendor/agent-cli/dist/src/protocol/link/liveness.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/link/liveness.js +86 -0
- package/vendor/agent-cli/dist/src/protocol/link/liveness.js.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/link/middleware.d.ts +14 -0
- package/vendor/agent-cli/dist/src/protocol/link/middleware.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/link/middleware.js +40 -0
- package/vendor/agent-cli/dist/src/protocol/link/middleware.js.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/link/rpc.d.ts +31 -0
- package/vendor/agent-cli/dist/src/protocol/link/rpc.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/link/rpc.js +90 -0
- package/vendor/agent-cli/dist/src/protocol/link/rpc.js.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/link/transport-ws.d.ts +32 -0
- package/vendor/agent-cli/dist/src/protocol/link/transport-ws.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/link/transport-ws.js +106 -0
- package/vendor/agent-cli/dist/src/protocol/link/transport-ws.js.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/messages/errors.gen.d.ts +509 -0
- package/vendor/agent-cli/dist/src/protocol/messages/errors.gen.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/messages/errors.gen.js +131 -0
- package/vendor/agent-cli/dist/src/protocol/messages/errors.gen.js.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.d.ts +351 -0
- package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.js +103 -0
- package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.js.map +1 -0
- package/vendor/agent-cli/dist/src/security/binary-read-receipts.d.ts +9 -0
- package/vendor/agent-cli/dist/src/security/binary-read-receipts.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/security/binary-read-receipts.js +58 -0
- package/vendor/agent-cli/dist/src/security/binary-read-receipts.js.map +1 -0
- package/vendor/agent-cli/dist/src/security/command-parse.d.ts +21 -0
- package/vendor/agent-cli/dist/src/security/command-parse.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/security/command-parse.js +395 -0
- package/vendor/agent-cli/dist/src/security/command-parse.js.map +1 -0
- package/vendor/agent-cli/dist/src/security/command-translate.d.ts +30 -0
- package/vendor/agent-cli/dist/src/security/command-translate.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/security/command-translate.js +161 -0
- package/vendor/agent-cli/dist/src/security/command-translate.js.map +1 -0
- package/vendor/agent-cli/dist/src/security/context-write-policy.d.ts +18 -0
- package/vendor/agent-cli/dist/src/security/context-write-policy.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/security/context-write-policy.js +121 -0
- package/vendor/agent-cli/dist/src/security/context-write-policy.js.map +1 -0
- package/vendor/agent-cli/dist/src/security/guard.d.ts +41 -0
- package/vendor/agent-cli/dist/src/security/guard.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/security/guard.js +154 -0
- package/vendor/agent-cli/dist/src/security/guard.js.map +1 -0
- package/vendor/agent-cli/dist/src/security/mount-table.d.ts +47 -0
- package/vendor/agent-cli/dist/src/security/mount-table.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/security/mount-table.js +164 -0
- package/vendor/agent-cli/dist/src/security/mount-table.js.map +1 -0
- package/vendor/agent-cli/dist/src/security/sandbox-path.d.ts +23 -0
- package/vendor/agent-cli/dist/src/security/sandbox-path.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/security/sandbox-path.js +110 -0
- package/vendor/agent-cli/dist/src/security/sandbox-path.js.map +1 -0
- package/vendor/agent-cli/dist/src/security/tool-run-owner.d.ts +5 -0
- package/vendor/agent-cli/dist/src/security/tool-run-owner.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/security/tool-run-owner.js +16 -0
- package/vendor/agent-cli/dist/src/security/tool-run-owner.js.map +1 -0
- package/vendor/agent-cli/dist/src/security/tool-scope.d.ts +16 -0
- package/vendor/agent-cli/dist/src/security/tool-scope.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/security/tool-scope.js +88 -0
- package/vendor/agent-cli/dist/src/security/tool-scope.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/client.d.ts +116 -0
- package/vendor/agent-cli/dist/src/session/client.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/client.js +376 -0
- package/vendor/agent-cli/dist/src/session/client.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/custom-context.d.ts +6 -0
- package/vendor/agent-cli/dist/src/session/custom-context.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/custom-context.js +100 -0
- package/vendor/agent-cli/dist/src/session/custom-context.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/engine-decide.d.ts +38 -0
- package/vendor/agent-cli/dist/src/session/engine-decide.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/engine-decide.js +87 -0
- package/vendor/agent-cli/dist/src/session/engine-decide.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/execution-settlement.d.ts +4 -0
- package/vendor/agent-cli/dist/src/session/execution-settlement.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/execution-settlement.js +15 -0
- package/vendor/agent-cli/dist/src/session/execution-settlement.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/link-config.d.ts +13 -0
- package/vendor/agent-cli/dist/src/session/link-config.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/link-config.js +29 -0
- package/vendor/agent-cli/dist/src/session/link-config.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/link-outcome.d.ts +30 -0
- package/vendor/agent-cli/dist/src/session/link-outcome.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/link-outcome.js +67 -0
- package/vendor/agent-cli/dist/src/session/link-outcome.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/link-session.d.ts +76 -0
- package/vendor/agent-cli/dist/src/session/link-session.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/link-session.js +412 -0
- package/vendor/agent-cli/dist/src/session/link-session.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/local-execution.d.ts +28 -0
- package/vendor/agent-cli/dist/src/session/local-execution.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/local-execution.js +119 -0
- package/vendor/agent-cli/dist/src/session/local-execution.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/member-tools.d.ts +22 -0
- package/vendor/agent-cli/dist/src/session/member-tools.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/member-tools.js +72 -0
- package/vendor/agent-cli/dist/src/session/member-tools.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/process-artifact-publisher.d.ts +7 -0
- package/vendor/agent-cli/dist/src/session/process-artifact-publisher.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/process-artifact-publisher.js +30 -0
- package/vendor/agent-cli/dist/src/session/process-artifact-publisher.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/process-environment.d.ts +3 -0
- package/vendor/agent-cli/dist/src/session/process-environment.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/process-environment.js +22 -0
- package/vendor/agent-cli/dist/src/session/process-environment.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/process-request.d.ts +36 -0
- package/vendor/agent-cli/dist/src/session/process-request.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/process-request.js +494 -0
- package/vendor/agent-cli/dist/src/session/process-request.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/reference-tools.d.ts +8 -0
- package/vendor/agent-cli/dist/src/session/reference-tools.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/reference-tools.js +34 -0
- package/vendor/agent-cli/dist/src/session/reference-tools.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/run-events.d.ts +81 -0
- package/vendor/agent-cli/dist/src/session/run-events.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/run-events.js +160 -0
- package/vendor/agent-cli/dist/src/session/run-events.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/run-setup.d.ts +76 -0
- package/vendor/agent-cli/dist/src/session/run-setup.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/run-setup.js +273 -0
- package/vendor/agent-cli/dist/src/session/run-setup.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/run-start-body.d.ts +41 -0
- package/vendor/agent-cli/dist/src/session/run-start-body.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/run-start-body.js +64 -0
- package/vendor/agent-cli/dist/src/session/run-start-body.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/team-persistence.d.ts +17 -0
- package/vendor/agent-cli/dist/src/session/team-persistence.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/team-persistence.js +75 -0
- package/vendor/agent-cli/dist/src/session/team-persistence.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/tool-scheduler.d.ts +37 -0
- package/vendor/agent-cli/dist/src/session/tool-scheduler.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/tool-scheduler.js +232 -0
- package/vendor/agent-cli/dist/src/session/tool-scheduler.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/user-choice.d.ts +5 -0
- package/vendor/agent-cli/dist/src/session/user-choice.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/user-choice.js +80 -0
- package/vendor/agent-cli/dist/src/session/user-choice.js.map +1 -0
- package/vendor/agent-cli/dist/src/session/user-skill-loaded.d.ts +31 -0
- package/vendor/agent-cli/dist/src/session/user-skill-loaded.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/session/user-skill-loaded.js +104 -0
- package/vendor/agent-cli/dist/src/session/user-skill-loaded.js.map +1 -0
- package/vendor/agent-cli/dist/src/shared/app-id.d.ts +13 -0
- package/vendor/agent-cli/dist/src/shared/app-id.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/shared/app-id.js +25 -0
- package/vendor/agent-cli/dist/src/shared/app-id.js.map +1 -0
- package/vendor/agent-cli/dist/src/shared/auth-headers.d.ts +13 -0
- package/vendor/agent-cli/dist/src/shared/auth-headers.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/shared/auth-headers.js +16 -0
- package/vendor/agent-cli/dist/src/shared/auth-headers.js.map +1 -0
- package/vendor/agent-cli/dist/src/shared/cli-version.d.ts +3 -0
- package/vendor/agent-cli/dist/src/shared/cli-version.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/shared/cli-version.js +22 -0
- package/vendor/agent-cli/dist/src/shared/cli-version.js.map +1 -0
- package/vendor/agent-cli/dist/src/shared/error-detail.d.ts +14 -0
- package/vendor/agent-cli/dist/src/shared/error-detail.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/shared/error-detail.js +29 -0
- package/vendor/agent-cli/dist/src/shared/error-detail.js.map +1 -0
- package/vendor/agent-cli/dist/src/shared/output-guard.d.ts +36 -0
- package/vendor/agent-cli/dist/src/shared/output-guard.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/shared/output-guard.js +94 -0
- package/vendor/agent-cli/dist/src/shared/output-guard.js.map +1 -0
- package/vendor/agent-cli/dist/src/shared/process-cwd.d.ts +3 -0
- package/vendor/agent-cli/dist/src/shared/process-cwd.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/shared/process-cwd.js +11 -0
- package/vendor/agent-cli/dist/src/shared/process-cwd.js.map +1 -0
- package/vendor/agent-cli/dist/src/shared/process-types.d.ts +60 -0
- package/vendor/agent-cli/dist/src/shared/process-types.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/shared/process-types.js +10 -0
- package/vendor/agent-cli/dist/src/shared/process-types.js.map +1 -0
- package/vendor/agent-cli/dist/src/shared/server-headers.d.ts +7 -0
- package/vendor/agent-cli/dist/src/shared/server-headers.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/shared/server-headers.js +113 -0
- package/vendor/agent-cli/dist/src/shared/server-headers.js.map +1 -0
- package/vendor/agent-cli/dist/src/shared/shell-runtime.d.ts +47 -0
- package/vendor/agent-cli/dist/src/shared/shell-runtime.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/shared/shell-runtime.js +210 -0
- package/vendor/agent-cli/dist/src/shared/shell-runtime.js.map +1 -0
- package/vendor/agent-cli/dist/src/shared/types.d.ts +458 -0
- package/vendor/agent-cli/dist/src/shared/types.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/shared/types.js +2 -0
- package/vendor/agent-cli/dist/src/shared/types.js.map +1 -0
- package/vendor/agent-cli/dist/src/shared/user-choice.d.ts +22 -0
- package/vendor/agent-cli/dist/src/shared/user-choice.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/shared/user-choice.js +2 -0
- package/vendor/agent-cli/dist/src/shared/user-choice.js.map +1 -0
- package/vendor/agent-cli/dist/src/tools/artifact-publisher.d.ts +9 -0
- package/vendor/agent-cli/dist/src/tools/artifact-publisher.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/tools/artifact-publisher.js +85 -0
- package/vendor/agent-cli/dist/src/tools/artifact-publisher.js.map +1 -0
- package/vendor/agent-cli/dist/src/tools/command-executor.d.ts +30 -0
- package/vendor/agent-cli/dist/src/tools/command-executor.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/tools/command-executor.js +96 -0
- package/vendor/agent-cli/dist/src/tools/command-executor.js.map +1 -0
- package/vendor/agent-cli/dist/src/tools/context-program-publish.d.ts +16 -0
- package/vendor/agent-cli/dist/src/tools/context-program-publish.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/tools/context-program-publish.js +104 -0
- package/vendor/agent-cli/dist/src/tools/context-program-publish.js.map +1 -0
- package/vendor/agent-cli/dist/src/tools/context-program.d.ts +21 -0
- package/vendor/agent-cli/dist/src/tools/context-program.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/tools/context-program.js +207 -0
- package/vendor/agent-cli/dist/src/tools/context-program.js.map +1 -0
- package/vendor/agent-cli/dist/src/tools/file-ops.d.ts +61 -0
- package/vendor/agent-cli/dist/src/tools/file-ops.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/tools/file-ops.js +477 -0
- package/vendor/agent-cli/dist/src/tools/file-ops.js.map +1 -0
- package/vendor/agent-cli/dist/src/tools/local-hands.d.ts +58 -0
- package/vendor/agent-cli/dist/src/tools/local-hands.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/tools/local-hands.js +322 -0
- package/vendor/agent-cli/dist/src/tools/local-hands.js.map +1 -0
- package/vendor/agent-cli/dist/src/tools/ripgrep-search.d.ts +24 -0
- package/vendor/agent-cli/dist/src/tools/ripgrep-search.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/tools/ripgrep-search.js +160 -0
- package/vendor/agent-cli/dist/src/tools/ripgrep-search.js.map +1 -0
- package/vendor/agent-cli/dist/src/tools/tool-contract.gen.d.ts +66 -0
- package/vendor/agent-cli/dist/src/tools/tool-contract.gen.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/tools/tool-contract.gen.js +65 -0
- package/vendor/agent-cli/dist/src/tools/tool-contract.gen.js.map +1 -0
- package/vendor/agent-cli/dist/src/tools/tool-timeout.d.ts +29 -0
- package/vendor/agent-cli/dist/src/tools/tool-timeout.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/tools/tool-timeout.js +88 -0
- package/vendor/agent-cli/dist/src/tools/tool-timeout.js.map +1 -0
- package/vendor/agent-cli/dist/src/tools/write-guard.d.ts +42 -0
- package/vendor/agent-cli/dist/src/tools/write-guard.d.ts.map +1 -0
- package/vendor/agent-cli/dist/src/tools/write-guard.js +34 -0
- package/vendor/agent-cli/dist/src/tools/write-guard.js.map +1 -0
- package/vendor/agent-cli/package.json +29 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: version-update
|
|
3
|
+
description: >
|
|
4
|
+
按用户勾选的功能升级项目。runtime(平台内置基础功能)改接到 runtime/lightgame 目标版本,升级后只引用该版本;uieditor、sceneeditor、
|
|
5
|
+
multiplayer、cloudsave、leaderboard 改走各自 skill 接入或重新适配。每一项成功后用脚本回写
|
|
6
|
+
project_feature_version.json;某项失败时用快照把该项改动恢复到升级前,并报告失败原因。用户消息以「通过skill进行版本升级」开头,
|
|
7
|
+
或明确要求按功能版本升级时使用。普通开发不触发。
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# version-update Skill
|
|
11
|
+
|
|
12
|
+
> **路径约定**:文件工具访问业务工程使用 `workspace/project/...`;shell 命令体中的业务根使用 `${CLAUDE_PROJECT_DIR}`,当前 Skill 资源使用 `${CLAUDE_SKILL_DIR}`,只读上下文使用 `${CLAUDE_DIR}`。禁止用 `$(pwd)` 推断路径。
|
|
13
|
+
> **先 `skill_load({"skill":"version-update"})` 再执行。**
|
|
14
|
+
|
|
15
|
+
平台清单是 `workspace/project/version/craft_feature_version.json`,只读,其中版本号由开发者手动维护。项目已应用版本是 `workspace/project/version/project_feature_version.json`。写入只通过 `scripts/update_feature_version.mjs`:本 skill 在每一项成功后调用;`ui-editor-compat`、`scene-editor-compat`、`platform-services` 在各自最后一步调用;某项失败时由 `scripts/feature_snapshot.mjs` 随该项一起恢复。禁止 `write_file` / `edit_file` 改这两份文件。
|
|
16
|
+
|
|
17
|
+
## 何时使用
|
|
18
|
+
|
|
19
|
+
- 用户消息以平台文件的 `prompt` 开头(当前为「通过skill进行版本升级,升级以下几项:」),后面每行一个 `displayName`。
|
|
20
|
+
- 用户明确要求按功能版本升级,并点名功能。
|
|
21
|
+
|
|
22
|
+
普通对话不检测、不执行。
|
|
23
|
+
|
|
24
|
+
## 功能对照
|
|
25
|
+
|
|
26
|
+
按平台 `features` 的顺序处理用户勾选的项。`displayName` 必须与平台文件完全一致,对不上的项记失败,不猜测 `id`。
|
|
27
|
+
|
|
28
|
+
| id | displayName | 怎么升级 |
|
|
29
|
+
|---|---|---|
|
|
30
|
+
| `runtime` | 平台内置基础功能 | 按下面的 runtime 流程改接到 `runtime/lightgame/<目标版本>/` |
|
|
31
|
+
| `uieditor` | 界面编辑器 | `skill_load` `ui-editor-compat`,按该 skill 接入或重新适配 |
|
|
32
|
+
| `sceneeditor` | 场景编辑器 | `skill_load` `scene-editor-compat`,按该 skill 接入或重新适配 |
|
|
33
|
+
| `multiplayer` | 多人联机 | `skill_load` `platform-services`,只装 `multiplayer`,按该 skill 接入或重新适配 |
|
|
34
|
+
| `cloudsave` | 云存档 | `skill_load` `platform-services`,只装 `save`,按该 skill 接入或重新适配 |
|
|
35
|
+
| `leaderboard` | 云排名 | `skill_load` `platform-services`,只装 `leaderboard`,按该 skill 接入或重新适配 |
|
|
36
|
+
|
|
37
|
+
## 总流程
|
|
38
|
+
|
|
39
|
+
1. `read_files` 读平台文件。用 `prompt` 之后的各行,或用户点名的 `displayName`,映射到 `id`。没有可识别功能 → 最后只输出 `UPGRADE_SKIP: no features selected`。
|
|
40
|
+
2. 按平台 `features` 顺序逐项处理。一项失败不跳过其余勾选项。
|
|
41
|
+
3. 每项动代码之前先存快照(见「失败回滚」)。快照没存成功,该项不动代码,直接记失败。
|
|
42
|
+
4. 该项适配成功后,立刻运行回写脚本。脚本非 0、stdout 没有 `FEATURE_VERSION_UPDATED: <id> <version>`、或读回的 `currentVersion` 与平台该 `id` 的 `currentVersion` 不一致,都算该项失败。回写通过后删除该项快照。
|
|
43
|
+
5. 该项失败(适配失败或回写校验失败):不运行、也不重试回写脚本,按「失败回滚」把该项改动恢复到升级前,记下失败原因,再处理下一项。判定失败前可以在该项范围内修正;一旦判定失败就回滚,回滚后不再修补该项。
|
|
44
|
+
6. 过程中不要输出 `UPGRADE_` 开头的行。每一项都要有结果:成功项已由脚本写入平台当前版本,失败项已回滚或注明未改动工程。全部勾选项都有结果后(回滚失败时提前停止),才按「结束」输出最终锚点。只改完代码、版本文件还没写完,不算有结果。
|
|
45
|
+
|
|
46
|
+
其他功能已有版本与平台 `currentVersion` 相同:跳过适配,仍运行一次回写脚本。`runtime` 是否需要改接以下文 Step 1 的扫描结果为准,不看项目文件里记录的版本。
|
|
47
|
+
|
|
48
|
+
## runtime(平台内置基础功能)
|
|
49
|
+
|
|
50
|
+
升级目标:业务代码与工程接线只引用 `runtime/lightgame/<TO>/`。其他版本目录由平台随模板维护,不删除、不修改,也不再引用。勾选本项即用户明确要求迁移 runtime;`${CLAUDE_DIR}` 中「旧工程保留 `1.0.0` 接线、不自动迁移」的约定不适用于本项。
|
|
51
|
+
|
|
52
|
+
- `TO` = 平台文件中 `runtime` 的 `currentVersion`,对应目录 `runtime/lightgame/<TO>/`。
|
|
53
|
+
- `FROM` = `workspace/project/game-runtime.json` 的 `version`。
|
|
54
|
+
- 两端必须匹配 `^[0-9]+\.[0-9]+\.[0-9]+$`,否则该项失败。
|
|
55
|
+
|
|
56
|
+
没有 `game-runtime.json`(vendor / CoreManager 旧工程):`skill_load` `lightgame-runtime-adapt` 并按其正文迁移,本次勾选即视为用户已明确要求迁移。迁移失败则该项失败,按「失败回滚」恢复,迁移写入的 `runtime/lightgame/<版本>/` 一并撤销;成功后重新读取 `game-runtime.json` 得到 `FROM`,从 Step 1 继续。
|
|
57
|
+
|
|
58
|
+
### 可写 / 只读
|
|
59
|
+
|
|
60
|
+
路径相对 `workspace/project/`。
|
|
61
|
+
|
|
62
|
+
- **可写**:`src/`、`ds/`、`SPEC/`、`configs/`、`.upgrade/`;接线文件 `game-runtime.json`(只改 `version`、`root`)、`vite.config.ts`、`package.json`(只改 `scripts` 中的 runtime 路径)、`scripts/config-export.mjs`;skill 安装器写入的 `scripts/skill-modules/`、`src/skill-modules/`。
|
|
63
|
+
- **只读**:整个 `${CLAUDE_DIR}/`、`runtime/`(含 `<TO>` 在内的所有版本)、`vendor/`、`node_modules/`、`index.html`、`tsconfig.json`、`.npmrc`、`unified_data_control_config.json`、两份功能版本 JSON、`.upgrade/snapshots/`。
|
|
64
|
+
|
|
65
|
+
### Step 1 · 扫描引用
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
run_shell: node "${CLAUDE_SKILL_DIR}/scripts/check_runtime_refs.mjs" --project "${CLAUDE_PROJECT_DIR}" --to <TO>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
脚本先确认 `runtime/lightgame/<TO>/release.json` 存在且 `version` 等于 `TO`,再检查 `game-runtime.json`,最后扫描工程里的代码与 JSON(跳过 `runtime/`、`vendor/`、`node_modules/`、`SPEC/`、`version/`、`.upgrade/`)。
|
|
72
|
+
|
|
73
|
+
- `MANIFEST …`:`game-runtime.json` 的 `version` 或 `root` 不是 `TO`。
|
|
74
|
+
- `REF <文件>:<行> <版本><子路径> <状态>`:引用了非 `TO` 版本。`available` 表示 `<TO>` 有同名文件;`removed` 表示 `<TO>` 已没有该文件;`dir` 表示只引用了版本目录。
|
|
75
|
+
|
|
76
|
+
退出码 `0`(`RUNTIME_REFS_CLEAN <TO>`):已只引用 `TO`,跳过 Step 2~3,直接回写。`3`(`RUNTIME_REFS_PENDING`):继续 Step 2。`2`(`RUNTIME_MANIFEST_MISSING`):按上面的旧工程处理。`1`:目标目录缺失或参数错误,该项失败。
|
|
77
|
+
|
|
78
|
+
### Step 2 · 改接
|
|
79
|
+
|
|
80
|
+
只改与 runtime 版本相关的代码:不重构、不顺手优化、不改玩法。
|
|
81
|
+
|
|
82
|
+
1. `read_files` 读 `runtime/lightgame/<FROM>/release.json` 与 `runtime/lightgame/<TO>/release.json`,按 `files` 的键得出 `<TO>` 删除和新增的文件。`<FROM>` 目录不存在时只读 `<TO>`,以 Step 1 的 `removed` 为准。
|
|
83
|
+
2. `available`:路径改到 `<TO>`。对比 `<FROM>` 与 `<TO>` 的同名 `.d.mts`,导出或签名有变化的调用点按 `<TO>` 改。声明不足以判断时才读同名 `.mjs`,不通读 SDK。
|
|
84
|
+
3. `removed`:按下表改接。不把旧版本文件复制进项目,不保留对旧版本的任何 import。
|
|
85
|
+
4. `MANIFEST` 与 `dir`:按「工程接线」改到 `<TO>`。
|
|
86
|
+
5. 命中行只是注释时,改写或删除其中的旧版本路径;它不代表业务用到了该模块,不按下表接入。
|
|
87
|
+
|
|
88
|
+
| `<FROM>` 中被删的模块 | 改接到 |
|
|
89
|
+
|---|---|
|
|
90
|
+
| `platform/config` | 项目内 `scripts/skill-modules/export-config/`(见下方「跨过 1.1.0」)。业务配置保持普通 JSON import |
|
|
91
|
+
| `platform/platform-service`、`platform/leaderboard`、`platform/save` | `skill_load` `platform-services`,只装业务实际用到的 `leaderboard` / `save` / `multiplayer`,身份随模块安装;该 skill 会回写对应功能版本。入口在可能 `markReady()` 之前 `void PlatformServiceManager.init()` |
|
|
92
|
+
| `tools/input` | Phaser 输入 |
|
|
93
|
+
| `tools/ui` | 已有 HUD 保留,用 DOM 改写调用;`createUiStage` 对照 `${CLAUDE_DIR}/skills/resolution-adaptation/assets/display/ui-stage.ts` 内联到 `src/display/ui-stage.ts` |
|
|
94
|
+
| `tools/audio`、`tools/video`、`tools/canvas`、`tools/three` | Phaser / 浏览器 API 在业务里实现 |
|
|
95
|
+
| 表里没有的模块 | 查 `${CLAUDE_DIR}/CLAUDE.md` 与 `${CLAUDE_DIR}/knowledge/` 中该能力在 `<TO>` 的归属;仍找不到 → 该模块记 `failed` |
|
|
96
|
+
|
|
97
|
+
**工程接线**
|
|
98
|
+
|
|
99
|
+
| 文件 | `<TO>` 下应为 |
|
|
100
|
+
|---|---|
|
|
101
|
+
| `game-runtime.json` | `version` 为 `TO`,`root` 为 `runtime/lightgame/<TO>`,其余字段保留 |
|
|
102
|
+
| `vite.config.ts` | 从 `./runtime/lightgame/<TO>/tooling/vite.mjs` 引入 `lightgame()` |
|
|
103
|
+
| `package.json` | `scripts` 里的 runtime 路径指向 `<TO>`,其余脚本与依赖不动 |
|
|
104
|
+
| `src/platform.ts` | 只转出 `../runtime/lightgame/<TO>/platform/platform.mjs` 的预览桥,不挂身份 |
|
|
105
|
+
|
|
106
|
+
**跨过 1.1.0**(`FROM` 低于 `1.1.0`、`TO` 不低于 `1.1.0`):1.1.0 把配置能力移出 runtime,另需:
|
|
107
|
+
|
|
108
|
+
1. `run_shell: node "${CLAUDE_DIR}/skills/export-config/scripts/install.mjs" --project "${CLAUDE_PROJECT_DIR}"`,安装到 `scripts/skill-modules/export-config/`。
|
|
109
|
+
2. `vite.config.ts` 中 `lightgame()` 与 `./scripts/skill-modules/export-config/vite.mjs` 的 `gameConfig()` 并列。
|
|
110
|
+
3. `scripts/config-export.mjs` 找不到 `.claude` 时的回退分支,对 `TO` 改走 `./skill-modules/export-config/cli.mjs` 的 `runCli(['export-config', '--project', project])`,不再调用 runtime CLI 导出。
|
|
111
|
+
|
|
112
|
+
### Step 3 · 复查
|
|
113
|
+
|
|
114
|
+
1. 重跑 Step 1 的脚本,必须退出码 `0` 且输出 `RUNTIME_REFS_CLEAN <TO>`。
|
|
115
|
+
2. 按 `${CLAUDE_DIR}/CLAUDE.md` 的交付要求在 `${CLAUDE_PROJECT_DIR}` 通过 `npm run build`;改动涉及画面、HUD 或输入时,按同一要求做视觉验收。
|
|
116
|
+
|
|
117
|
+
`write_file` 写 `workspace/project/.upgrade/report.json`(`overwrite=true`)。上面任一条不满足,或 `failed` 非空,`runtime` 失败:不回写,按「失败回滚」恢复。`report.json` 不在快照范围内,回滚后保留,其中 `failed[].reason` 是报告失败原因的依据。
|
|
118
|
+
|
|
119
|
+
```json
|
|
120
|
+
{
|
|
121
|
+
"from": "<FROM>",
|
|
122
|
+
"to": "<TO>",
|
|
123
|
+
"at": "<ISO8601>",
|
|
124
|
+
"repointed": [{ "module": "platform/platform.mjs", "files": ["src/platform.ts"] }],
|
|
125
|
+
"replaced": [{ "module": "tools/input.mjs", "by": "…", "files": ["…"] }],
|
|
126
|
+
"failed": [{ "module": "…", "reason": "…", "files": ["…"] }]
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## 其他功能
|
|
131
|
+
|
|
132
|
+
本次勾选视为用户已确认要接入或升级该功能。`skill_load` 对照表里的 skill,按那个 skill 的正文执行。
|
|
133
|
+
|
|
134
|
+
- 项目中该项不存在:按该 skill 做首次接入。
|
|
135
|
+
- 已有版本但与平台 `currentVersion` 不同:按该 skill 把现有接入适配到当前平台要求,不重做无关玩法。
|
|
136
|
+
- `platform-services` 一次只传这一项的模块名。不要顺便装上另外两项。
|
|
137
|
+
- 该 skill 的完成条件未满足:该项失败,不回写,按「失败回滚」恢复,继续下一项。子 skill 已在最后一步写入的版本也随回滚撤销。
|
|
138
|
+
|
|
139
|
+
## 回写
|
|
140
|
+
|
|
141
|
+
每一项适配成功后立刻执行,不能攒到最后:
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
run_shell: node "${CLAUDE_SKILL_DIR}/scripts/update_feature_version.mjs" --project "${CLAUDE_PROJECT_DIR}" --id <id>
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
脚本把该 `id` 写成平台文件中的 `id`、`displayName`、`currentVersion`、`oldestCompatibleVersion`。项目文件不存在时会创建。写入的不是 `runtime` 且文件里还没有 `runtime` 时,补一条 `currentVersion` 为 `0.0.0` 的 `runtime`。
|
|
148
|
+
|
|
149
|
+
## 失败回滚
|
|
150
|
+
|
|
151
|
+
每项动代码之前存快照:
|
|
152
|
+
|
|
153
|
+
```
|
|
154
|
+
run_shell: node "${CLAUDE_SKILL_DIR}/scripts/feature_snapshot.mjs" --project "${CLAUDE_PROJECT_DIR}" --id <id> --action save
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
输出 `FEATURE_SNAPSHOT_SAVED: <id> files=<n>` 才算存好。快照在 `.upgrade/snapshots/<id>/`,覆盖工程内除 `node_modules/`、`.git/`、`dist/`、`build/`、`vendor/`、`.upgrade/` 以外的全部文件,包括 `runtime/` 与 `version/project_feature_version.json`。
|
|
158
|
+
|
|
159
|
+
该项回写通过后用 `--action drop` 删除快照。该项判定失败时用 `--action restore`:
|
|
160
|
+
|
|
161
|
+
- 改过的文件写回原内容,删掉的文件补回,该项新建的文件和目录删除。输出 `FEATURE_RESTORED: <id> restored=<n> removed=<n>` 才算恢复完成,快照随之删除。
|
|
162
|
+
- `node_modules/` 不还原,该项装进去的依赖留着;`.upgrade/report.json` 保留作失败记录。
|
|
163
|
+
- `restore` 非 0 或没有 `FEATURE_RESTORED`:停止处理后续勾选项,直接进入「结束」。该项按「回滚失败」报告,后续没处理的勾选项按「未处理」报告。
|
|
164
|
+
|
|
165
|
+
每个失败项记一条原因:失败在哪一步(快照、扫描、改接、构建、子 skill 完成条件、回写校验),以及具体依据(脚本退出码与关键输出行、构建报错首条、缺失的模块或对不上的 `displayName`)。不写「适配失败」这类笼统描述。
|
|
166
|
+
|
|
167
|
+
## 结束
|
|
168
|
+
|
|
169
|
+
核对项目文件后,按顺序取第一条命中的锚点:
|
|
170
|
+
|
|
171
|
+
- 没有可识别功能 → `UPGRADE_SKIP: no features selected`。
|
|
172
|
+
- 任一项回滚失败,或没有一项成功 → `UPGRADE_FAILED: updated=<id,...> failed=<id,...>`,中止本轮业务。
|
|
173
|
+
- 有失败项 → `UPGRADE_PARTIAL: updated=<id,...> failed=<id,...>`,中止本轮业务。
|
|
174
|
+
- 每一项脚本都已成功,且 `currentVersion` 都等于平台当前版本 → `UPGRADE_OK: <id> <from>→<to>, ...`,本轮升级结束。
|
|
175
|
+
|
|
176
|
+
`updated` 没有项时写成 `updated=`。`displayName` 对不上的项在 `failed` 里记为 `unknown`,行内 `<displayName>` 写用户原文。`UPGRADE_FAILED` 与 `UPGRADE_PARTIAL` 锚点下一行起,`failed` 里每一项一行,按该项实际情况选一种:
|
|
177
|
+
|
|
178
|
+
| 情况 | 行格式 |
|
|
179
|
+
|---|---|
|
|
180
|
+
| 已回滚 | `- <id>(<displayName>):<失败步骤> — <原因>;已恢复到升级前(restored=<n> removed=<n>)`,计数取自 `FEATURE_RESTORED` |
|
|
181
|
+
| 没改过工程(`displayName` 对不上、快照没存成功) | `- <id>(<displayName>):<失败步骤> — <原因>;未改动工程` |
|
|
182
|
+
| 回滚失败 | `- <id>(<displayName>):<失败步骤> — <原因>;回滚失败,工程可能停留在半升级状态` |
|
|
183
|
+
| 回滚失败后没处理 | `- <id>(<displayName>):未处理 — 前一项回滚失败后停止` |
|
|
184
|
+
|
|
185
|
+
最终锚点放在业务回答之前,单独成行。前端匹配 `^UPGRADE_(OK|PARTIAL|FAILED|SKIP):`。锚点之后除失败项列表外,不再写 Skill 调试过程。
|
|
186
|
+
|
|
187
|
+
## 资源
|
|
188
|
+
|
|
189
|
+
- `runtime` 扫描引用:`${CLAUDE_SKILL_DIR}/scripts/check_runtime_refs.mjs`
|
|
190
|
+
- 回写项目版本:`${CLAUDE_SKILL_DIR}/scripts/update_feature_version.mjs`
|
|
191
|
+
- 单项快照与回滚:`${CLAUDE_SKILL_DIR}/scripts/feature_snapshot.mjs`
|
|
192
|
+
- `runtime` 审计:`workspace/project/.upgrade/report.json`
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { readFile, readdir, lstat } from 'node:fs/promises';
|
|
2
|
+
import { join, relative, resolve } from 'node:path';
|
|
3
|
+
import { pathToFileURL } from 'node:url';
|
|
4
|
+
|
|
5
|
+
const SEMVER = /^\d+\.\d+\.\d+$/;
|
|
6
|
+
const REF = /lightgame\/(\d+\.\d+\.\d+)((?:\/[\w.@-]+)*)/g;
|
|
7
|
+
const MANIFEST = 'game-runtime.json';
|
|
8
|
+
const SKIP_DIRS = new Set(['.git', 'node_modules', 'dist', 'build', 'runtime', 'vendor', 'version', 'SPEC', '.upgrade']);
|
|
9
|
+
const CODE_EXT = /\.(?:[cm]?[jt]sx?|json|html)$/;
|
|
10
|
+
const MAX_BYTES = 2 * 1024 * 1024;
|
|
11
|
+
|
|
12
|
+
export const EXIT = { clean: 0, error: 1, noManifest: 2, pending: 3 };
|
|
13
|
+
|
|
14
|
+
function usage() {
|
|
15
|
+
return 'usage: check_runtime_refs.mjs --project <dir> --to <x.y.z>';
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function parseArgs(argv) {
|
|
19
|
+
const out = { project: '', to: '' };
|
|
20
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
21
|
+
const key = argv[i];
|
|
22
|
+
if (key !== '--project' && key !== '--to') throw new Error(usage());
|
|
23
|
+
const value = argv[i + 1];
|
|
24
|
+
if (!value || value.startsWith('--')) throw new Error(usage());
|
|
25
|
+
out[key.slice(2)] = value;
|
|
26
|
+
i += 1;
|
|
27
|
+
}
|
|
28
|
+
if (!out.project || !out.to) throw new Error(usage());
|
|
29
|
+
return out;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
async function exists(path) {
|
|
33
|
+
try {
|
|
34
|
+
await lstat(path);
|
|
35
|
+
return true;
|
|
36
|
+
} catch (error) {
|
|
37
|
+
if (error && error.code === 'ENOENT') return false;
|
|
38
|
+
throw error;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
async function readJsonOrNull(path) {
|
|
43
|
+
try {
|
|
44
|
+
return JSON.parse(await readFile(path, 'utf8'));
|
|
45
|
+
} catch (error) {
|
|
46
|
+
if (error && error.code === 'ENOENT') return null;
|
|
47
|
+
throw error;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
async function* walk(root, dir) {
|
|
52
|
+
for (const entry of await readdir(dir, { withFileTypes: true })) {
|
|
53
|
+
if (entry.isSymbolicLink()) continue;
|
|
54
|
+
const path = join(dir, entry.name);
|
|
55
|
+
if (entry.isDirectory()) {
|
|
56
|
+
if (dir === root && SKIP_DIRS.has(entry.name)) continue;
|
|
57
|
+
if (entry.name === 'node_modules' || entry.name === '.git') continue;
|
|
58
|
+
yield* walk(root, path);
|
|
59
|
+
} else if (entry.isFile() && CODE_EXT.test(entry.name)) {
|
|
60
|
+
yield path;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export async function scanRuntimeRefs(project, to) {
|
|
66
|
+
if (!SEMVER.test(to)) throw new Error(`invalid target version: ${to}`);
|
|
67
|
+
const root = resolve(project);
|
|
68
|
+
const targetRoot = `runtime/lightgame/${to}`;
|
|
69
|
+
const release = await readJsonOrNull(join(root, targetRoot, 'release.json'));
|
|
70
|
+
if (!release || release.version !== to) throw new Error(`target runtime missing: ${targetRoot}`);
|
|
71
|
+
|
|
72
|
+
const manifest = await readJsonOrNull(join(root, MANIFEST));
|
|
73
|
+
if (!manifest) return { to, manifest: null, issues: [], refs: [] };
|
|
74
|
+
|
|
75
|
+
const issues = [];
|
|
76
|
+
if (manifest.version !== to) issues.push(`${MANIFEST} version=${manifest.version ?? '<none>'}`);
|
|
77
|
+
if (manifest.root !== targetRoot) issues.push(`${MANIFEST} root=${manifest.root ?? '<none>'}`);
|
|
78
|
+
|
|
79
|
+
const refs = [];
|
|
80
|
+
for await (const file of walk(root, root)) {
|
|
81
|
+
const rel = relative(root, file).replaceAll('\\', '/');
|
|
82
|
+
if (rel === MANIFEST) continue;
|
|
83
|
+
const info = await lstat(file);
|
|
84
|
+
if (info.size > MAX_BYTES) continue;
|
|
85
|
+
const lines = (await readFile(file, 'utf8')).split('\n');
|
|
86
|
+
for (let index = 0; index < lines.length; index += 1) {
|
|
87
|
+
for (const match of lines[index].matchAll(REF)) {
|
|
88
|
+
const [, version, subpath] = match;
|
|
89
|
+
if (version === to) continue;
|
|
90
|
+
const status = subpath ? ((await exists(join(root, targetRoot, subpath))) ? 'available' : 'removed') : 'dir';
|
|
91
|
+
refs.push({ file: rel, line: index + 1, version, subpath, status });
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return { to, manifest, issues, refs };
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function report(result) {
|
|
99
|
+
if (!result.manifest) {
|
|
100
|
+
process.stdout.write(`RUNTIME_MANIFEST_MISSING ${MANIFEST}\n`);
|
|
101
|
+
return EXIT.noManifest;
|
|
102
|
+
}
|
|
103
|
+
for (const issue of result.issues) process.stdout.write(`MANIFEST ${issue}\n`);
|
|
104
|
+
for (const ref of result.refs) {
|
|
105
|
+
process.stdout.write(`REF ${ref.file}:${ref.line} ${ref.version}${ref.subpath} ${ref.status}\n`);
|
|
106
|
+
}
|
|
107
|
+
const pending = result.issues.length + result.refs.length;
|
|
108
|
+
if (pending === 0) {
|
|
109
|
+
process.stdout.write(`RUNTIME_REFS_CLEAN ${result.to}\n`);
|
|
110
|
+
return EXIT.clean;
|
|
111
|
+
}
|
|
112
|
+
process.stdout.write(`RUNTIME_REFS_PENDING ${pending}\n`);
|
|
113
|
+
return EXIT.pending;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function isDirectRun() {
|
|
117
|
+
const entry = process.argv[1];
|
|
118
|
+
return Boolean(entry) && import.meta.url === pathToFileURL(resolve(entry)).href;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
if (isDirectRun()) {
|
|
122
|
+
try {
|
|
123
|
+
const { project, to } = parseArgs(process.argv.slice(2));
|
|
124
|
+
process.exitCode = report(await scanRuntimeRefs(project, to));
|
|
125
|
+
} catch (error) {
|
|
126
|
+
process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);
|
|
127
|
+
process.exitCode = EXIT.error;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { copyFile, lstat, mkdir, readdir, readFile, rm, rmdir, writeFile } from 'node:fs/promises';
|
|
2
|
+
import { dirname, join, relative, resolve } from 'node:path';
|
|
3
|
+
import { pathToFileURL } from 'node:url';
|
|
4
|
+
|
|
5
|
+
const ID = /^[a-z0-9][a-z0-9_-]*$/;
|
|
6
|
+
const ACTIONS = new Set(['save', 'restore', 'drop']);
|
|
7
|
+
const ROOT_SKIP = new Set(['dist', 'build', 'vendor', '.upgrade']);
|
|
8
|
+
const ANY_SKIP = new Set(['.git', 'node_modules']);
|
|
9
|
+
|
|
10
|
+
function usage() {
|
|
11
|
+
return 'usage: feature_snapshot.mjs --project <dir> --id <featureId> --action save|restore|drop';
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function parseArgs(argv) {
|
|
15
|
+
const out = { project: '', id: '', action: '' };
|
|
16
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
17
|
+
const key = argv[i];
|
|
18
|
+
if (key !== '--project' && key !== '--id' && key !== '--action') throw new Error(usage());
|
|
19
|
+
const value = argv[i + 1];
|
|
20
|
+
if (!value || value.startsWith('--')) throw new Error(usage());
|
|
21
|
+
out[key.slice(2)] = value;
|
|
22
|
+
i += 1;
|
|
23
|
+
}
|
|
24
|
+
if (!out.project || !ID.test(out.id) || !ACTIONS.has(out.action)) throw new Error(usage());
|
|
25
|
+
return out;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const toPosix = (path) => path.split('\\').join('/');
|
|
29
|
+
|
|
30
|
+
async function typeOf(path) {
|
|
31
|
+
try {
|
|
32
|
+
const stat = await lstat(path);
|
|
33
|
+
if (stat.isSymbolicLink()) return 'link';
|
|
34
|
+
return stat.isDirectory() ? 'dir' : 'file';
|
|
35
|
+
} catch (error) {
|
|
36
|
+
if (error && error.code === 'ENOENT') return null;
|
|
37
|
+
throw error;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** 符号链接不进快照,回滚时也不删;node_modules 不快照也不还原。 */
|
|
42
|
+
async function scan(project) {
|
|
43
|
+
const files = [];
|
|
44
|
+
const dirs = [];
|
|
45
|
+
async function visit(dir) {
|
|
46
|
+
for (const entry of await readdir(dir, { withFileTypes: true })) {
|
|
47
|
+
if (entry.isSymbolicLink() || ANY_SKIP.has(entry.name)) continue;
|
|
48
|
+
if (dir === project && ROOT_SKIP.has(entry.name)) continue;
|
|
49
|
+
const path = join(dir, entry.name);
|
|
50
|
+
const rel = toPosix(relative(project, path));
|
|
51
|
+
if (entry.isDirectory()) {
|
|
52
|
+
dirs.push(rel);
|
|
53
|
+
await visit(path);
|
|
54
|
+
} else if (entry.isFile()) {
|
|
55
|
+
files.push(rel);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
await visit(project);
|
|
60
|
+
return { files: files.sort(), dirs: dirs.sort() };
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function snapshotDir(project, id) {
|
|
64
|
+
return join(project, '.upgrade', 'snapshots', id);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
async function readManifest(snapshot, id) {
|
|
68
|
+
try {
|
|
69
|
+
return JSON.parse(await readFile(join(snapshot, 'manifest.json'), 'utf8'));
|
|
70
|
+
} catch (error) {
|
|
71
|
+
if (error && error.code === 'ENOENT') throw new Error(`snapshot missing: ${id}`);
|
|
72
|
+
throw error;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
async function sameContent(a, b) {
|
|
77
|
+
const [left, right] = await Promise.all([readFile(a), readFile(b)]);
|
|
78
|
+
return left.equals(right);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export async function saveSnapshot(project, id) {
|
|
82
|
+
const snapshot = snapshotDir(project, id);
|
|
83
|
+
await rm(snapshot, { recursive: true, force: true });
|
|
84
|
+
const { files, dirs } = await scan(project);
|
|
85
|
+
for (const rel of files) {
|
|
86
|
+
const target = join(snapshot, 'files', rel);
|
|
87
|
+
await mkdir(dirname(target), { recursive: true });
|
|
88
|
+
await copyFile(join(project, rel), target);
|
|
89
|
+
}
|
|
90
|
+
await writeFile(join(snapshot, 'manifest.json'), `${JSON.stringify({ id, at: new Date().toISOString(), files, dirs }, null, 2)}\n`);
|
|
91
|
+
return { files: files.length };
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export async function restoreSnapshot(project, id) {
|
|
95
|
+
const snapshot = snapshotDir(project, id);
|
|
96
|
+
const manifest = await readManifest(snapshot, id);
|
|
97
|
+
const keepFiles = new Set(manifest.files);
|
|
98
|
+
const keepDirs = new Set(manifest.dirs);
|
|
99
|
+
const current = await scan(project);
|
|
100
|
+
let removed = 0;
|
|
101
|
+
for (const rel of current.files) {
|
|
102
|
+
if (keepFiles.has(rel)) continue;
|
|
103
|
+
await rm(join(project, rel), { force: true });
|
|
104
|
+
removed += 1;
|
|
105
|
+
}
|
|
106
|
+
let restored = 0;
|
|
107
|
+
for (const rel of manifest.files) {
|
|
108
|
+
const target = join(project, rel);
|
|
109
|
+
const source = join(snapshot, 'files', rel);
|
|
110
|
+
const type = await typeOf(target);
|
|
111
|
+
if (type === 'file' && (await sameContent(source, target))) continue;
|
|
112
|
+
if (type === 'dir') await rm(target, { recursive: true, force: true });
|
|
113
|
+
await mkdir(dirname(target), { recursive: true });
|
|
114
|
+
await copyFile(source, target);
|
|
115
|
+
restored += 1;
|
|
116
|
+
}
|
|
117
|
+
for (const rel of [...current.dirs].reverse()) {
|
|
118
|
+
if (keepDirs.has(rel)) continue;
|
|
119
|
+
const path = join(project, rel);
|
|
120
|
+
if ((await typeOf(path)) !== 'dir' || (await readdir(path)).length > 0) continue;
|
|
121
|
+
await rmdir(path);
|
|
122
|
+
removed += 1;
|
|
123
|
+
}
|
|
124
|
+
for (const rel of manifest.dirs) await mkdir(join(project, rel), { recursive: true });
|
|
125
|
+
await rm(snapshot, { recursive: true, force: true });
|
|
126
|
+
return { restored, removed };
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export async function dropSnapshot(project, id) {
|
|
130
|
+
await rm(snapshotDir(project, id), { recursive: true, force: true });
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function isDirectRun() {
|
|
134
|
+
const entry = process.argv[1];
|
|
135
|
+
return Boolean(entry) && import.meta.url === pathToFileURL(resolve(entry)).href;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
async function main(argv) {
|
|
139
|
+
const { project: raw, id, action } = parseArgs(argv);
|
|
140
|
+
const project = resolve(raw);
|
|
141
|
+
if ((await typeOf(project)) !== 'dir') throw new Error(`project not found: ${raw}`);
|
|
142
|
+
if (action === 'save') {
|
|
143
|
+
const { files } = await saveSnapshot(project, id);
|
|
144
|
+
process.stdout.write(`FEATURE_SNAPSHOT_SAVED: ${id} files=${files}\n`);
|
|
145
|
+
} else if (action === 'restore') {
|
|
146
|
+
const { restored, removed } = await restoreSnapshot(project, id);
|
|
147
|
+
process.stdout.write(`FEATURE_RESTORED: ${id} restored=${restored} removed=${removed}\n`);
|
|
148
|
+
} else {
|
|
149
|
+
await dropSnapshot(project, id);
|
|
150
|
+
process.stdout.write(`FEATURE_SNAPSHOT_DROPPED: ${id}\n`);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
if (isDirectRun()) {
|
|
155
|
+
main(process.argv.slice(2)).catch((error) => {
|
|
156
|
+
process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);
|
|
157
|
+
process.exit(1);
|
|
158
|
+
});
|
|
159
|
+
}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { readFile, writeFile, mkdir } from 'node:fs/promises';
|
|
2
|
+
import { dirname, join, resolve } from 'node:path';
|
|
3
|
+
import { pathToFileURL } from 'node:url';
|
|
4
|
+
|
|
5
|
+
const COMMENT = '本文档用作版本升级使用,触发相关skill时更新,Agent正常开发时忽略本文件';
|
|
6
|
+
const CORE_ID = 'runtime';
|
|
7
|
+
const SEMVER = /^\d+\.\d+\.\d+$/;
|
|
8
|
+
const CRAFT_FILE = 'version/craft_feature_version.json';
|
|
9
|
+
const PROJECT_FILE = 'version/project_feature_version.json';
|
|
10
|
+
|
|
11
|
+
function usage() {
|
|
12
|
+
return 'usage: update_feature_version.mjs --project <dir> --id <featureId> [--check | --if-present]';
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function parseArgs(argv) {
|
|
16
|
+
const out = { project: '', id: '', check: false, ifPresent: false };
|
|
17
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
18
|
+
const key = argv[i];
|
|
19
|
+
if (key === '--check') {
|
|
20
|
+
out.check = true;
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
if (key === '--if-present') {
|
|
24
|
+
out.ifPresent = true;
|
|
25
|
+
continue;
|
|
26
|
+
}
|
|
27
|
+
if (key !== '--project' && key !== '--id') throw new Error(usage());
|
|
28
|
+
const value = argv[i + 1];
|
|
29
|
+
if (!value || value.startsWith('--')) throw new Error(usage());
|
|
30
|
+
out[key.slice(2)] = value;
|
|
31
|
+
i += 1;
|
|
32
|
+
}
|
|
33
|
+
if (!out.project || !out.id || (out.check && out.ifPresent)) throw new Error(usage());
|
|
34
|
+
return out;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function asFeature(raw, label) {
|
|
38
|
+
if (!raw || typeof raw.id !== 'string' || typeof raw.displayName !== 'string') {
|
|
39
|
+
throw new Error(`${label} missing id or displayName`);
|
|
40
|
+
}
|
|
41
|
+
if (typeof raw.currentVersion !== 'string' || !SEMVER.test(raw.currentVersion)) {
|
|
42
|
+
throw new Error(`${label} invalid currentVersion`);
|
|
43
|
+
}
|
|
44
|
+
if (typeof raw.oldestCompatibleVersion !== 'string' || !SEMVER.test(raw.oldestCompatibleVersion)) {
|
|
45
|
+
throw new Error(`${label} invalid oldestCompatibleVersion`);
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
id: raw.id,
|
|
49
|
+
displayName: raw.displayName,
|
|
50
|
+
currentVersion: raw.currentVersion,
|
|
51
|
+
oldestCompatibleVersion: raw.oldestCompatibleVersion,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function findFeature(features, id, label) {
|
|
56
|
+
if (!Array.isArray(features)) throw new Error(`${label} features must be an array`);
|
|
57
|
+
const found = features.find((item) => item && item.id === id);
|
|
58
|
+
if (!found) throw new Error(`${label} feature not found: ${id}`);
|
|
59
|
+
return asFeature(found, `${label} ${id}`);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
async function readOptionalJson(path) {
|
|
63
|
+
try {
|
|
64
|
+
return JSON.parse(await readFile(path, 'utf8'));
|
|
65
|
+
} catch (error) {
|
|
66
|
+
if (error && error.code === 'ENOENT') return null;
|
|
67
|
+
throw error;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function cloneFeatures(list) {
|
|
72
|
+
if (!Array.isArray(list)) throw new Error('project features must be an array');
|
|
73
|
+
return list.map((item) => {
|
|
74
|
+
if (!item || typeof item.id !== 'string') throw new Error('project feature missing id');
|
|
75
|
+
return { ...item };
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function upsert(features, feature) {
|
|
80
|
+
const index = features.findIndex((item) => item.id === feature.id);
|
|
81
|
+
if (index >= 0) features[index] = feature;
|
|
82
|
+
else features.push(feature);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function rootFrom(doc) {
|
|
86
|
+
const next = { _comment: COMMENT };
|
|
87
|
+
if (doc && typeof doc === 'object' && !Array.isArray(doc)) {
|
|
88
|
+
if (typeof doc._comment === 'string' && doc._comment.trim()) next._comment = doc._comment;
|
|
89
|
+
for (const [key, value] of Object.entries(doc)) {
|
|
90
|
+
if (key === '_comment' || key === 'features') continue;
|
|
91
|
+
next[key] = value;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return next;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
async function planUpdate(project, id) {
|
|
98
|
+
const craft = await readOptionalJson(join(project, CRAFT_FILE));
|
|
99
|
+
if (craft === null) return null;
|
|
100
|
+
const target = findFeature(craft.features, id, 'craft');
|
|
101
|
+
const projectPath = join(project, PROJECT_FILE);
|
|
102
|
+
const current = await readOptionalJson(projectPath);
|
|
103
|
+
if (current !== null && (typeof current !== 'object' || Array.isArray(current))) {
|
|
104
|
+
throw new Error('project_feature_version.json must be an object');
|
|
105
|
+
}
|
|
106
|
+
const features = current ? cloneFeatures(current.features) : [];
|
|
107
|
+
if (id !== CORE_ID && !features.some((item) => item.id === CORE_ID)) {
|
|
108
|
+
const core = findFeature(craft.features, CORE_ID, 'craft');
|
|
109
|
+
features.unshift({ ...core, currentVersion: '0.0.0' });
|
|
110
|
+
}
|
|
111
|
+
upsert(features, target);
|
|
112
|
+
const next = rootFrom(current);
|
|
113
|
+
next.features = features;
|
|
114
|
+
return { target, projectPath, next };
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/** 只校验不写入。平台清单不存在时返回 null;清单或项目文件不合法、缺少该 id 时抛错。 */
|
|
118
|
+
export async function checkFeatureVersion(project, id) {
|
|
119
|
+
const plan = await planUpdate(project, id);
|
|
120
|
+
return plan ? plan.target : null;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/** ifPresent 为 true 时,平台清单不存在则跳过写入并返回 null。 */
|
|
124
|
+
export async function updateFeatureVersion(project, id, { ifPresent = false } = {}) {
|
|
125
|
+
const plan = await planUpdate(project, id);
|
|
126
|
+
if (!plan) {
|
|
127
|
+
if (!ifPresent) throw new Error(`${CRAFT_FILE} not found in ${project}`);
|
|
128
|
+
process.stdout.write(`FEATURE_VERSION_SKIPPED: ${id} no ${CRAFT_FILE}\n`);
|
|
129
|
+
return null;
|
|
130
|
+
}
|
|
131
|
+
await mkdir(dirname(plan.projectPath), { recursive: true });
|
|
132
|
+
await writeFile(plan.projectPath, `${JSON.stringify(plan.next, null, 2)}\n`);
|
|
133
|
+
process.stdout.write(`FEATURE_VERSION_UPDATED: ${plan.target.id} ${plan.target.currentVersion}\n`);
|
|
134
|
+
return plan.target;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
async function main(argv) {
|
|
138
|
+
const { project, id, check, ifPresent } = parseArgs(argv);
|
|
139
|
+
if (!check) {
|
|
140
|
+
await updateFeatureVersion(project, id, { ifPresent });
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
const target = await checkFeatureVersion(project, id);
|
|
144
|
+
process.stdout.write(target ? `FEATURE_VERSION_CHECKED: ${id} ${target.currentVersion}\n` : `FEATURE_VERSION_SKIPPED: ${id} no ${CRAFT_FILE}\n`);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
function isDirectRun() {
|
|
148
|
+
const entry = process.argv[1];
|
|
149
|
+
return Boolean(entry) && import.meta.url === pathToFileURL(resolve(entry)).href;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
if (isDirectRun()) {
|
|
153
|
+
main(process.argv.slice(2)).catch((error) => {
|
|
154
|
+
process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);
|
|
155
|
+
process.exit(1);
|
|
156
|
+
});
|
|
157
|
+
}
|
|
File without changes
|