@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,597 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* search.mjs — asset-search skill 的本地脚本
|
|
4
|
+
*
|
|
5
|
+
* 职责:调用资产检索 HTTP 接口,返回命中结果并保存原始召回 JSON;
|
|
6
|
+
* display 模式按当前资源配置匹配候选,不修改 manifest 或业务配置。
|
|
7
|
+
*
|
|
8
|
+
* 用法:
|
|
9
|
+
* node search.mjs --category skeletalmesh --queries '<json>'
|
|
10
|
+
* node search.mjs --requests '<跨 category JSON>'
|
|
11
|
+
* node search.mjs --provide --requests '<用户提供资源 JSON>'
|
|
12
|
+
*
|
|
13
|
+
* 参数:
|
|
14
|
+
* --category 资产大类(由 config.json 中 categories 定义)
|
|
15
|
+
* --queries JSON 数组,每条含 { slot_id, query }
|
|
16
|
+
* --requests 跨大类 JSON 数组,每条含 { slot_id, category, query }
|
|
17
|
+
* --provide 登记用户提供的官方资源;不连接检索服务或修改 manifest
|
|
18
|
+
* --project-dir 项目根目录(默认 CLAUDE_PROJECT_DIR 或 cwd)
|
|
19
|
+
* --config config.json 路径(默认同目录下 config.json)
|
|
20
|
+
* --display 输出完整 asset_display 文本,不请求检索服务
|
|
21
|
+
* --assets-file 可重复指定业务配置,默认 configs/assets.json,仅用于 --display
|
|
22
|
+
* --aigc-results 可指定含 items 的生成结果 JSON;默认读取 .aigc-queue/results.json 和 .aigc-results/
|
|
23
|
+
*
|
|
24
|
+
* 环境变量:
|
|
25
|
+
* 本轮平台入口与票据由宿主注入;平台 token 不进入技能环境。
|
|
26
|
+
*
|
|
27
|
+
* 资产检索固定经 宿主本机平台入口 转发到 craft 网关(/api/ms/agent/toolbox/search/js/...);
|
|
28
|
+
* 脚本使用本轮本机地址与访问票据,不持有平台 token。
|
|
29
|
+
*
|
|
30
|
+
* 输出:
|
|
31
|
+
* - 原始召回结果保存到项目 .asset-search/;调用方按 slot 回填 asset-manifest.json。
|
|
32
|
+
* - stdout 输出 JSON: { categories, slot_ids, assets, misses, status, total, matched, missed, report_path }
|
|
33
|
+
* 其中 assets[].asset 为后端返回的完整资产对象,调用方只提取真实 Path 回填 manifest。
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
import { dirname, resolve } from "node:path";
|
|
37
|
+
import { fileURLToPath } from "node:url";
|
|
38
|
+
import { existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
|
|
39
|
+
import { randomUUID } from "node:crypto";
|
|
40
|
+
import { displayNewAssets, resolveProjectJson } from "./asset_display.mjs";
|
|
41
|
+
import { addProvidedAssetIds, normalizeAssetPath, normalizeResourceId, saveProvidedAssets } from "./provided_assets.mjs";
|
|
42
|
+
|
|
43
|
+
const SCRIPT_DIR = dirname(fileURLToPath(import.meta.url));
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
// ── 加载配置 ──────────────────────────────────────────────────────────
|
|
47
|
+
function loadConfig(configPath) {
|
|
48
|
+
if (!configPath) configPath = resolve(SCRIPT_DIR, "config.json");
|
|
49
|
+
const defaults = { score_threshold: 0.6, limit: 3, timeout_ms: 15000, categories: {} };
|
|
50
|
+
if (!existsSync(configPath)) {
|
|
51
|
+
process.stderr.write(`[warn] config.json 不存在: ${configPath},使用默认值\n`);
|
|
52
|
+
return defaults;
|
|
53
|
+
}
|
|
54
|
+
try {
|
|
55
|
+
const raw = readFileSync(configPath, "utf8");
|
|
56
|
+
const parsed = JSON.parse(raw);
|
|
57
|
+
return {
|
|
58
|
+
score_threshold: typeof parsed.score_threshold === "number" ? parsed.score_threshold : defaults.score_threshold,
|
|
59
|
+
limit: typeof parsed.limit === "number" ? parsed.limit : defaults.limit,
|
|
60
|
+
timeout_ms: typeof parsed.timeout_ms === "number" ? parsed.timeout_ms : defaults.timeout_ms,
|
|
61
|
+
categories: parsed.categories && typeof parsed.categories === "object" ? parsed.categories : {},
|
|
62
|
+
};
|
|
63
|
+
} catch {
|
|
64
|
+
process.stderr.write(`[warn] config.json 读取失败,使用默认值: ${JSON.stringify(defaults)}\n`);
|
|
65
|
+
return defaults;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// ── 从配置构建 category → asset_type 映射 ────────────────────────────
|
|
70
|
+
function buildCategoryMap(config) {
|
|
71
|
+
const map = {};
|
|
72
|
+
for (const [category, catConfig] of Object.entries(config.categories)) {
|
|
73
|
+
if (catConfig.asset_type) {
|
|
74
|
+
map[category] = catConfig.asset_type;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return map;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// ── 参数解析 ──────────────────────────────────────────────────────────
|
|
81
|
+
function parseArgs(categoryMap) {
|
|
82
|
+
const args = process.argv.slice(2);
|
|
83
|
+
const opts = {
|
|
84
|
+
category: "",
|
|
85
|
+
queries: [],
|
|
86
|
+
requests: [],
|
|
87
|
+
projectDir: process.env.CLAUDE_PROJECT_DIR || process.cwd(),
|
|
88
|
+
display: false,
|
|
89
|
+
displayJSON: false,
|
|
90
|
+
provide: false,
|
|
91
|
+
assetsFiles: [],
|
|
92
|
+
aigcResults: "",
|
|
93
|
+
configPath: "",
|
|
94
|
+
};
|
|
95
|
+
for (let i = 0; i < args.length; i++) {
|
|
96
|
+
const arg = args[i];
|
|
97
|
+
const next = args[i + 1];
|
|
98
|
+
switch (arg) {
|
|
99
|
+
case "--provide":
|
|
100
|
+
opts.provide = true;
|
|
101
|
+
break;
|
|
102
|
+
case "--display-json":
|
|
103
|
+
opts.displayJSON = true;
|
|
104
|
+
opts.display = true;
|
|
105
|
+
break;
|
|
106
|
+
case "--display":
|
|
107
|
+
opts.display = true;
|
|
108
|
+
break;
|
|
109
|
+
case "--aigc-results":
|
|
110
|
+
if (!next || next.startsWith("--")) throw new Error(`${arg} 缺少路径`);
|
|
111
|
+
opts.aigcResults = next;
|
|
112
|
+
i++;
|
|
113
|
+
break;
|
|
114
|
+
case "--assets-file":
|
|
115
|
+
if (!next || next.startsWith("--")) throw new Error(`${arg} 缺少路径`);
|
|
116
|
+
opts.assetsFiles.push(next);
|
|
117
|
+
i++;
|
|
118
|
+
break;
|
|
119
|
+
case "--category":
|
|
120
|
+
opts.category = next ?? "";
|
|
121
|
+
i++;
|
|
122
|
+
break;
|
|
123
|
+
case "--queries":
|
|
124
|
+
try {
|
|
125
|
+
opts.queries = JSON.parse(next ?? "[]");
|
|
126
|
+
} catch {
|
|
127
|
+
process.stderr.write(`[error] --queries JSON 解析失败: ${next}\n`);
|
|
128
|
+
process.exit(2);
|
|
129
|
+
}
|
|
130
|
+
i++;
|
|
131
|
+
break;
|
|
132
|
+
case "--requests":
|
|
133
|
+
try {
|
|
134
|
+
opts.requests = JSON.parse(next ?? "[]");
|
|
135
|
+
} catch {
|
|
136
|
+
process.stderr.write(`[error] --requests JSON 解析失败: ${next}\n`);
|
|
137
|
+
process.exit(2);
|
|
138
|
+
}
|
|
139
|
+
i++;
|
|
140
|
+
break;
|
|
141
|
+
case "--project-dir":
|
|
142
|
+
opts.projectDir = next ?? opts.projectDir;
|
|
143
|
+
i++;
|
|
144
|
+
break;
|
|
145
|
+
case "--config":
|
|
146
|
+
opts.configPath = next ?? "";
|
|
147
|
+
i++;
|
|
148
|
+
break;
|
|
149
|
+
default:
|
|
150
|
+
break;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
const hasRequests = Array.isArray(opts.requests) && opts.requests.length > 0;
|
|
154
|
+
if (opts.display) {
|
|
155
|
+
if (opts.provide || opts.category || opts.requests.length || opts.queries.length) {
|
|
156
|
+
throw new Error("--display 不能与召回或 --provide 参数混用");
|
|
157
|
+
}
|
|
158
|
+
return opts;
|
|
159
|
+
}
|
|
160
|
+
if (opts.assetsFiles.length || opts.aigcResults) throw new Error("--assets-file / --aigc-results 仅用于 --display");
|
|
161
|
+
if (opts.provide) {
|
|
162
|
+
if (!hasRequests) throw new Error("--provide 必须配合非空 --requests");
|
|
163
|
+
return opts;
|
|
164
|
+
}
|
|
165
|
+
if (!hasRequests && !opts.category) {
|
|
166
|
+
process.stderr.write("[error] 使用 --queries 时必须提供 --category\n");
|
|
167
|
+
process.exit(2);
|
|
168
|
+
}
|
|
169
|
+
if (!hasRequests && !categoryMap[opts.category]) {
|
|
170
|
+
process.stderr.write(
|
|
171
|
+
`[error] 未知 category: ${opts.category},支持: ${Object.keys(categoryMap).join(", ")}\n`,
|
|
172
|
+
);
|
|
173
|
+
process.exit(2);
|
|
174
|
+
}
|
|
175
|
+
if (!hasRequests && (!Array.isArray(opts.queries) || opts.queries.length === 0)) {
|
|
176
|
+
process.stderr.write("[error] --queries 或 --requests 必须是非空 JSON 数组\n");
|
|
177
|
+
process.exit(2);
|
|
178
|
+
}
|
|
179
|
+
return opts;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// ── HTTP 调用资产检索 ─────────────────────────────────────────────────
|
|
183
|
+
async function batchSemanticSearch(items, opts) {
|
|
184
|
+
const body = {
|
|
185
|
+
items: items.map((it) => {
|
|
186
|
+
const o = {
|
|
187
|
+
item_id: it.id,
|
|
188
|
+
id: it.id,
|
|
189
|
+
query: it.query,
|
|
190
|
+
asset_type: it.asset_type,
|
|
191
|
+
limit: it.limit ?? 3,
|
|
192
|
+
};
|
|
193
|
+
if (it.filters && Object.keys(it.filters).length > 0) {
|
|
194
|
+
o.filters = it.filters;
|
|
195
|
+
}
|
|
196
|
+
// 骨骼 AssetId:后端据此反查骨骼强制过滤 + 同骨骼亲缘加分
|
|
197
|
+
if (it.skeletal_id) {
|
|
198
|
+
o.skeletal_id = it.skeletal_id;
|
|
199
|
+
}
|
|
200
|
+
return o;
|
|
201
|
+
}),
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
let resp;
|
|
205
|
+
try {
|
|
206
|
+
const { PLATFORM_ACCESS_URL: platformUrl, PLATFORM_ACCESS_KEY: platformKey } = process.env;
|
|
207
|
+
if (!platformUrl || !platformKey) throw new Error("未配置本轮平台访问入口");
|
|
208
|
+
resp = await fetch(platformUrl + "/api/ms/agent/toolbox/search/js/batch-semantic-search", {
|
|
209
|
+
method: "POST",
|
|
210
|
+
// 请求头原样传递;平台鉴权留在宿主。
|
|
211
|
+
headers: {
|
|
212
|
+
"content-type": "application/json",
|
|
213
|
+
"x-platform-run-key": platformKey,
|
|
214
|
+
"x-platform-timeout-ms": String(opts.timeoutMs),
|
|
215
|
+
},
|
|
216
|
+
body: JSON.stringify(body),
|
|
217
|
+
redirect: "manual",
|
|
218
|
+
signal: AbortSignal.timeout(opts.timeoutMs),
|
|
219
|
+
});
|
|
220
|
+
} catch (cause) {
|
|
221
|
+
throw new Error(`HTTP 请求失败: ${cause instanceof Error ? cause.message : String(cause)}`);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
if (!resp.ok) {
|
|
225
|
+
const text = await resp.text().catch(() => "");
|
|
226
|
+
throw new Error(`HTTP ${resp.status} ${resp.statusText} - ${text.slice(0, 200)}`);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
const json = await resp.json();
|
|
230
|
+
const candidate =
|
|
231
|
+
(Array.isArray(json.groups) ? json.groups : undefined) ??
|
|
232
|
+
(Array.isArray(json.results) ? json.results : undefined) ??
|
|
233
|
+
[];
|
|
234
|
+
|
|
235
|
+
const groups = [];
|
|
236
|
+
for (const g of candidate) {
|
|
237
|
+
if (Array.isArray(g)) {
|
|
238
|
+
groups.push({ results: g });
|
|
239
|
+
} else if (g && typeof g === "object") {
|
|
240
|
+
const rec = g;
|
|
241
|
+
const dataObj = rec.data && typeof rec.data === "object" && !Array.isArray(rec.data) ? rec.data : null;
|
|
242
|
+
groups.push({
|
|
243
|
+
results: Array.isArray(rec.results)
|
|
244
|
+
? rec.results
|
|
245
|
+
: Array.isArray(rec.items)
|
|
246
|
+
? rec.items
|
|
247
|
+
: dataObj && Array.isArray(dataObj.results)
|
|
248
|
+
? dataObj.results
|
|
249
|
+
: Array.isArray(rec.data)
|
|
250
|
+
? rec.data
|
|
251
|
+
: [],
|
|
252
|
+
});
|
|
253
|
+
} else {
|
|
254
|
+
groups.push({ results: [] });
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
return { groups, raw: json };
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
function saveRecallResult(projectDir, items, response) {
|
|
261
|
+
const reportPath = `.asset-search/recall-${randomUUID()}.json`;
|
|
262
|
+
const file = resolve(projectDir, reportPath);
|
|
263
|
+
const snapshot = {
|
|
264
|
+
assets: items.map((item, i) => ({
|
|
265
|
+
slot_id: item.id,
|
|
266
|
+
category: item.category,
|
|
267
|
+
candidates: response.groups[i]?.results ?? [],
|
|
268
|
+
})),
|
|
269
|
+
raw: response.raw,
|
|
270
|
+
};
|
|
271
|
+
mkdirSync(dirname(file), { recursive: true });
|
|
272
|
+
writeFileSync(file, JSON.stringify(snapshot, null, 2) + "\n", { encoding: "utf8", flag: "wx" });
|
|
273
|
+
return reportPath;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
function readAigcItems(opts) {
|
|
277
|
+
const file = opts.aigcResults
|
|
278
|
+
? resolveProjectJson(opts.projectDir, opts.aigcResults)
|
|
279
|
+
: resolve(opts.projectDir, ".aigc-queue/results.json");
|
|
280
|
+
const items = [];
|
|
281
|
+
try {
|
|
282
|
+
const ledger = JSON.parse(readFileSync(file, "utf8"));
|
|
283
|
+
if (!Array.isArray(ledger.items)) throw new Error(`AIGC 结果缺少 items: ${file}`);
|
|
284
|
+
items.push(...ledger.items);
|
|
285
|
+
} catch (error) {
|
|
286
|
+
if (opts.aigcResults || error.code !== "ENOENT") throw error;
|
|
287
|
+
}
|
|
288
|
+
if (!opts.aigcResults) {
|
|
289
|
+
const directory = resolve(opts.projectDir, ".aigc-results");
|
|
290
|
+
let files = [];
|
|
291
|
+
try { files = readdirSync(directory).filter((name) => /^\d+\.json$/.test(name)).sort(); }
|
|
292
|
+
catch (error) { if (error.code !== "ENOENT") throw error; }
|
|
293
|
+
for (const name of files) items.push(JSON.parse(readFileSync(resolve(directory, name), "utf8")));
|
|
294
|
+
}
|
|
295
|
+
return items;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
async function displayAssets(opts) {
|
|
299
|
+
const normalizePath = normalizeAssetPath;
|
|
300
|
+
const usedPaths = new Set();
|
|
301
|
+
const collect = (value) => {
|
|
302
|
+
if (typeof value === "string" && value.trim()) usedPaths.add(normalizePath(value));
|
|
303
|
+
else if (value && typeof value === "object") Object.values(value).forEach(collect);
|
|
304
|
+
};
|
|
305
|
+
for (const file of opts.assetsFiles.length ? opts.assetsFiles : ["configs/assets.json"]) {
|
|
306
|
+
const config = JSON.parse(readFileSync(resolveProjectJson(opts.projectDir, file), "utf8"));
|
|
307
|
+
if (!config || typeof config !== "object" || Array.isArray(config)) {
|
|
308
|
+
throw new Error(`资源配置必须是 JSON 对象: ${file}`);
|
|
309
|
+
}
|
|
310
|
+
collect(config);
|
|
311
|
+
}
|
|
312
|
+
const directory = resolve(opts.projectDir, ".asset-search");
|
|
313
|
+
let files;
|
|
314
|
+
try {
|
|
315
|
+
files = readdirSync(directory).filter((file) => /^recall-[\da-f-]+\.json$/.test(file)).sort();
|
|
316
|
+
} catch (error) {
|
|
317
|
+
if (error.code !== "ENOENT") throw error;
|
|
318
|
+
files = [];
|
|
319
|
+
}
|
|
320
|
+
const byPath = new Map();
|
|
321
|
+
for (const file of files) {
|
|
322
|
+
const report = JSON.parse(readFileSync(resolve(directory, file), "utf8"));
|
|
323
|
+
if (!Array.isArray(report.assets)) throw new Error(`召回报告缺少 assets: ${file}`);
|
|
324
|
+
for (const entry of report.assets) {
|
|
325
|
+
if (!Array.isArray(entry.candidates)) throw new Error(`召回报告缺少 candidates: ${file}`);
|
|
326
|
+
for (const candidate of entry.candidates) {
|
|
327
|
+
const path = ["Path", "FilePath", "path", "file_path", "asset_path"]
|
|
328
|
+
.map((key) => candidate?.[key]).find((value) => typeof value === "string" && value.trim());
|
|
329
|
+
if (!path || !usedPaths.has(normalizePath(path))) continue;
|
|
330
|
+
const rawId = candidate.AssetId;
|
|
331
|
+
const id = typeof rawId === "string" ? rawId : Number.isSafeInteger(rawId) && rawId > 0 ? String(rawId) : "";
|
|
332
|
+
const ids = byPath.get(normalizePath(path)) ?? new Set();
|
|
333
|
+
ids.add(/^\d+$/.test(id) && /[1-9]/.test(id) ? id : null);
|
|
334
|
+
byPath.set(normalizePath(path), ids);
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
for (const item of readAigcItems(opts)) {
|
|
339
|
+
if (item?.status !== "completed" || typeof item.result_url !== "string" || !item.result_url.trim()) continue;
|
|
340
|
+
const path = normalizePath(item.result_url);
|
|
341
|
+
if (!usedPaths.has(path)) continue;
|
|
342
|
+
const rawId = item.task_id;
|
|
343
|
+
const id = typeof rawId === "string" ? rawId : Number.isSafeInteger(rawId) && rawId > 0 ? String(rawId) : "";
|
|
344
|
+
const ids = byPath.get(path) ?? new Set();
|
|
345
|
+
ids.add(/^\d+$/.test(id) && /[1-9]/.test(id) ? id : null);
|
|
346
|
+
byPath.set(path, ids);
|
|
347
|
+
}
|
|
348
|
+
addProvidedAssetIds(opts.projectDir, usedPaths, byPath);
|
|
349
|
+
const usedIds = new Set();
|
|
350
|
+
for (const path of usedPaths) {
|
|
351
|
+
const ids = byPath.get(path);
|
|
352
|
+
if (ids?.size === 1 && !ids.has(null)) usedIds.add([...ids][0]);
|
|
353
|
+
else if (ids || path.startsWith("Game/") || path.includes("ai-resource/")) {
|
|
354
|
+
process.stderr.write(`[warn] 无法唯一匹配原始资源 ID(AssetId / task_id),跳过: ${path}\n`);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
await displayNewAssets(opts.projectDir, usedIds, { json: opts.displayJSON });
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
// 用户提供资源登记不需要检索端点,也不改 manifest 或业务配置。
|
|
361
|
+
function providedResourcePath(value) {
|
|
362
|
+
if (typeof value !== "string" || !value.trim()) throw new Error("resourcePath 必须是非空官方资源地址");
|
|
363
|
+
const path = value.trim();
|
|
364
|
+
if (/[\u0000-\u001F\u007F\\]/.test(path) || path.startsWith("//")) {
|
|
365
|
+
throw new Error("resourcePath 含非法路径字符");
|
|
366
|
+
}
|
|
367
|
+
const segments = path.split(/[?#]/, 1)[0].split("/");
|
|
368
|
+
if (segments.some((part) => [".", ".."].includes(decodeURIComponent(part)))) {
|
|
369
|
+
throw new Error("resourcePath 不接受路径穿越片段");
|
|
370
|
+
}
|
|
371
|
+
const absolute = /^[a-z][a-z\d+.-]*:/i.test(path);
|
|
372
|
+
if (!absolute && /^(?:public|src|dist|node_modules|assets)\//.test(path.replace(/^\/+/, ""))) {
|
|
373
|
+
throw new Error("resourcePath 不接受项目本地路径");
|
|
374
|
+
}
|
|
375
|
+
const url = absolute ? new URL(path) : new URL(encodeURI(path.replace(/^\/+/, "")), "https://file.craft.qq.com/");
|
|
376
|
+
if (url.protocol !== "https:" || url.hostname !== "file.craft.qq.com" || url.username || url.password || url.port) {
|
|
377
|
+
throw new Error("resourcePath 只接受官方资源地址或 https://file.craft.qq.com URL");
|
|
378
|
+
}
|
|
379
|
+
if (/^\/(?:public\/)?assets\/generated\//.test(url.pathname)) {
|
|
380
|
+
throw new Error("resourcePath 不接受伪装成 CDN 的项目本地路径");
|
|
381
|
+
}
|
|
382
|
+
const relative = decodeURI(url.pathname).replace(/^\/+/, "");
|
|
383
|
+
return relative.startsWith("Game/") ? relative : url.href;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
function runProvide(opts, categoryMap) {
|
|
387
|
+
const assets = [];
|
|
388
|
+
const misses = [];
|
|
389
|
+
for (const [index, req] of opts.requests.entries()) {
|
|
390
|
+
const slotId = typeof req?.slot_id === "string" ? req.slot_id.trim() : "";
|
|
391
|
+
const category = typeof req?.category === "string" ? req.category.trim() : "";
|
|
392
|
+
try {
|
|
393
|
+
if (!slotId) throw new Error("missing_slot_id");
|
|
394
|
+
if (!Object.hasOwn(categoryMap, category)) throw new Error(`unknown_category: ${category}`);
|
|
395
|
+
const path = providedResourcePath(req.resourcePath);
|
|
396
|
+
const resourceId = req.resource_id === undefined ? undefined : normalizeResourceId(req.resource_id);
|
|
397
|
+
assets.push({ slot_id: slotId, category, status: "READY", path,
|
|
398
|
+
...(resourceId !== undefined ? { resource_id: resourceId } : {}),
|
|
399
|
+
});
|
|
400
|
+
} catch (error) {
|
|
401
|
+
misses.push({ slot_id: slotId || `#${index}`, category, reason: error.message });
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
saveProvidedAssets(opts.projectDir, assets);
|
|
405
|
+
process.stdout.write(JSON.stringify({
|
|
406
|
+
categories: [...new Set(assets.map((asset) => asset.category))],
|
|
407
|
+
assets, misses, status: misses.length ? "partial" : "success",
|
|
408
|
+
total: opts.requests.length, matched: assets.length, missed: misses.length,
|
|
409
|
+
}, null, 2) + "\n");
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
// ── 主流程 ────────────────────────────────────────────────────────────
|
|
413
|
+
async function main() {
|
|
414
|
+
if (process.argv.includes("--display") || process.argv.includes("--display-json")) {
|
|
415
|
+
return displayAssets(parseArgs({}));
|
|
416
|
+
}
|
|
417
|
+
// 先加载配置(需要提前解析 --config 参数)
|
|
418
|
+
let configPath = "";
|
|
419
|
+
const rawArgs = process.argv.slice(2);
|
|
420
|
+
for (let i = 0; i < rawArgs.length; i++) {
|
|
421
|
+
if (rawArgs[i] === "--config" && rawArgs[i + 1]) {
|
|
422
|
+
configPath = rawArgs[i + 1];
|
|
423
|
+
break;
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
const cfg = loadConfig(configPath);
|
|
427
|
+
const categoryMap = buildCategoryMap(cfg);
|
|
428
|
+
|
|
429
|
+
const opts = parseArgs(categoryMap);
|
|
430
|
+
if (opts.provide) return runProvide(opts, categoryMap);
|
|
431
|
+
const now = new Date().toISOString();
|
|
432
|
+
|
|
433
|
+
const rawRequests =
|
|
434
|
+
opts.requests.length > 0
|
|
435
|
+
? opts.requests
|
|
436
|
+
: opts.queries.map((query) => ({
|
|
437
|
+
...query,
|
|
438
|
+
category: opts.category,
|
|
439
|
+
purpose: query.purpose ?? query.query,
|
|
440
|
+
}));
|
|
441
|
+
|
|
442
|
+
// 构造跨 category 检索 items
|
|
443
|
+
const items = [];
|
|
444
|
+
for (const [idx, q] of rawRequests.entries()) {
|
|
445
|
+
const slotId = typeof q.slot_id === "string" ? q.slot_id.trim() : "";
|
|
446
|
+
const query = typeof q.query === "string" ? q.query.trim() : "";
|
|
447
|
+
const category = typeof q.category === "string" ? q.category.trim() : "";
|
|
448
|
+
const purpose = typeof q.purpose === "string" && q.purpose.trim() ? q.purpose.trim() : query;
|
|
449
|
+
const assetType = categoryMap[category];
|
|
450
|
+
if (!slotId || !query || !assetType) {
|
|
451
|
+
process.stderr.write(
|
|
452
|
+
`[warn] requests[${idx}] 缺少 slot_id/query 或 category 非法,跳过\n`,
|
|
453
|
+
);
|
|
454
|
+
continue;
|
|
455
|
+
}
|
|
456
|
+
// 合并 config.json 中的 static_filters 与请求中的 filters
|
|
457
|
+
const catConfig = cfg.categories[category] || {};
|
|
458
|
+
const staticFilters = catConfig.static_filters || {};
|
|
459
|
+
const requestFilters = q.filters || {};
|
|
460
|
+
const mergedFilters = { ...staticFilters, ...requestFilters };
|
|
461
|
+
|
|
462
|
+
items.push({
|
|
463
|
+
id: slotId,
|
|
464
|
+
query,
|
|
465
|
+
category,
|
|
466
|
+
purpose,
|
|
467
|
+
asset_type: assetType,
|
|
468
|
+
limit: q.limit ?? cfg.limit,
|
|
469
|
+
...(Object.keys(mergedFilters).length > 0 ? { filters: mergedFilters } : {}),
|
|
470
|
+
...(q.skeletal_id ? { skeletal_id: q.skeletal_id } : {}),
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
if (items.length === 0) {
|
|
475
|
+
process.stderr.write("[error] 没有有效的检索项\n");
|
|
476
|
+
process.exit(1);
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
process.stderr.write(
|
|
480
|
+
`[info] 开始批量检索: categories=${Array.from(new Set(items.map((item) => item.category))).join(",")}, items=${items.length}, score_threshold=${cfg.score_threshold}\n`,
|
|
481
|
+
);
|
|
482
|
+
|
|
483
|
+
// 调用检索
|
|
484
|
+
let groups;
|
|
485
|
+
let reportPath;
|
|
486
|
+
try {
|
|
487
|
+
const resp = await batchSemanticSearch(items, {
|
|
488
|
+
timeoutMs: cfg.timeout_ms,
|
|
489
|
+
});
|
|
490
|
+
reportPath = saveRecallResult(opts.projectDir, items, resp);
|
|
491
|
+
groups = resp.groups;
|
|
492
|
+
} catch (e) {
|
|
493
|
+
process.stderr.write(`[error] 检索失败: ${e instanceof Error ? e.message : String(e)}\n`);
|
|
494
|
+
process.exit(1);
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
// 阈值判定
|
|
498
|
+
const cacheEntries = [];
|
|
499
|
+
const missSlots = [];
|
|
500
|
+
|
|
501
|
+
for (let i = 0; i < items.length; i++) {
|
|
502
|
+
const g = groups[i] ?? { results: [] };
|
|
503
|
+
const item = items[i];
|
|
504
|
+
const results = g.results || [];
|
|
505
|
+
const top1 = results[0];
|
|
506
|
+
|
|
507
|
+
// 收集 top-N 候选摘要,供 agent 审查
|
|
508
|
+
const candidates = results
|
|
509
|
+
.filter((r) => r && typeof r === "object")
|
|
510
|
+
.slice(0, 3)
|
|
511
|
+
.map((r) => ({
|
|
512
|
+
name: r.Name ?? null,
|
|
513
|
+
path: r.Path ?? r.FilePath ?? r.path ?? r.file_path ?? null,
|
|
514
|
+
score: Number.isFinite(Number(r.embedding_score)) ? Number(r.embedding_score) : null,
|
|
515
|
+
}));
|
|
516
|
+
|
|
517
|
+
if (!top1 || typeof top1 !== "object") {
|
|
518
|
+
process.stderr.write(`[warn] slot_id=${item.id} 无检索结果\n`);
|
|
519
|
+
missSlots.push({
|
|
520
|
+
slot_id: item.id,
|
|
521
|
+
category: item.category,
|
|
522
|
+
purpose: item.purpose,
|
|
523
|
+
query: item.query,
|
|
524
|
+
reason: "no_result",
|
|
525
|
+
score: null,
|
|
526
|
+
candidates,
|
|
527
|
+
});
|
|
528
|
+
continue;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
const score = Number(top1.embedding_score);
|
|
532
|
+
const scoreValid = Number.isFinite(score);
|
|
533
|
+
|
|
534
|
+
if (!scoreValid || score < cfg.score_threshold) {
|
|
535
|
+
process.stderr.write(
|
|
536
|
+
`[warn] slot_id=${item.id} 召回分数 ${scoreValid ? score.toFixed(4) : "N/A"} 低于阈值 ${cfg.score_threshold},跳过\n`,
|
|
537
|
+
);
|
|
538
|
+
missSlots.push({
|
|
539
|
+
slot_id: item.id,
|
|
540
|
+
category: item.category,
|
|
541
|
+
purpose: item.purpose,
|
|
542
|
+
query: item.query,
|
|
543
|
+
reason: "below_threshold",
|
|
544
|
+
score: scoreValid ? score : null,
|
|
545
|
+
candidates,
|
|
546
|
+
});
|
|
547
|
+
continue;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
top1.embedding_score = score;
|
|
551
|
+
cacheEntries.push({
|
|
552
|
+
slot_id: item.id,
|
|
553
|
+
category: item.category,
|
|
554
|
+
purpose: item.purpose,
|
|
555
|
+
query: item.query,
|
|
556
|
+
source: "recall",
|
|
557
|
+
name: top1.Name ?? item.id,
|
|
558
|
+
asset: top1,
|
|
559
|
+
candidates,
|
|
560
|
+
cached_at: now,
|
|
561
|
+
});
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
process.stderr.write(
|
|
565
|
+
`[info] 检索完成: matched=${cacheEntries.length}, missed=${missSlots.length}\n`,
|
|
566
|
+
);
|
|
567
|
+
|
|
568
|
+
const assets = cacheEntries.map((e) => ({
|
|
569
|
+
slot_id: e.slot_id,
|
|
570
|
+
category: e.category,
|
|
571
|
+
purpose: e.purpose,
|
|
572
|
+
source: "recall",
|
|
573
|
+
name: e.name,
|
|
574
|
+
asset: e.asset,
|
|
575
|
+
candidates: e.candidates,
|
|
576
|
+
}));
|
|
577
|
+
|
|
578
|
+
const report = {
|
|
579
|
+
report_path: reportPath,
|
|
580
|
+
category: opts.category || "mixed",
|
|
581
|
+
categories: Array.from(new Set(items.map((item) => item.category))),
|
|
582
|
+
slot_ids: cacheEntries.map((e) => e.slot_id),
|
|
583
|
+
assets,
|
|
584
|
+
misses: missSlots,
|
|
585
|
+
miss_slots: missSlots,
|
|
586
|
+
status: missSlots.length === 0 ? "success" : "partial",
|
|
587
|
+
total: items.length,
|
|
588
|
+
matched: cacheEntries.length,
|
|
589
|
+
missed: missSlots.length,
|
|
590
|
+
};
|
|
591
|
+
process.stdout.write(JSON.stringify(report, null, 2) + "\n");
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
main().catch((e) => {
|
|
595
|
+
process.stderr.write(`[fatal] ${e instanceof Error ? e.message : String(e)}\n`);
|
|
596
|
+
process.exit(1);
|
|
597
|
+
});
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { existsSync, readdirSync, readFileSync } from 'node:fs';
|
|
2
|
+
import { join, relative } from 'node:path';
|
|
3
|
+
import { isExportableUrl } from './sync-asset-controls.mjs';
|
|
4
|
+
|
|
5
|
+
const QUOTED_URL = /(['"`])((?:https?:\/\/file\.craft\.qq\.com\/|\/Game\/|Game\/)[^'"`\\]*)\1/g;
|
|
6
|
+
|
|
7
|
+
function walkTsFiles(dir, acc = []) {
|
|
8
|
+
if (!existsSync(dir)) return acc;
|
|
9
|
+
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
10
|
+
if (entry.name.startsWith('.')) continue;
|
|
11
|
+
const path = join(dir, entry.name);
|
|
12
|
+
if (entry.isDirectory()) {
|
|
13
|
+
walkTsFiles(path, acc);
|
|
14
|
+
continue;
|
|
15
|
+
}
|
|
16
|
+
if (entry.isFile() && entry.name.endsWith('.ts') && !entry.name.endsWith('.d.ts')) acc.push(path);
|
|
17
|
+
}
|
|
18
|
+
return acc;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function readJson(path, fallback) {
|
|
22
|
+
if (!existsSync(path)) return fallback;
|
|
23
|
+
try {
|
|
24
|
+
return JSON.parse(readFileSync(path, 'utf8'));
|
|
25
|
+
} catch {
|
|
26
|
+
return fallback;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// 场景编辑器持有的场景数据 `src/scenes/**/scene.ts` 以云资产虚拟路径 `/Game/...` 引用 glb:
|
|
31
|
+
// 该路径是编辑器的数据契约(`editor/src/core/sceneSource.ts` 只接受纯字面量),
|
|
32
|
+
// 不能改成 `configs/assets.json` 的导入引用。它走的是另一条链——清单环:
|
|
33
|
+
// `/Game/` 引用登记进 `configs/scene_assets.json`(编辑器退出保存与 export-config 两处同键生成)。
|
|
34
|
+
// 契约见 knowledge/SceneEditorCompat.md 与 skills/scene-editor-compat/SKILL.md 第 8 步。
|
|
35
|
+
function isSceneEditorSceneData(projectRoot, file) {
|
|
36
|
+
const rel = relative(projectRoot, file).replaceAll('\\', '/');
|
|
37
|
+
return rel.startsWith('src/scenes/') && rel.endsWith('/scene.ts');
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function findHardcodedAssetUrls(projectRoot) {
|
|
41
|
+
const srcRoot = join(projectRoot, 'src');
|
|
42
|
+
const found = [];
|
|
43
|
+
for (const file of walkTsFiles(srcRoot)) {
|
|
44
|
+
if (isSceneEditorSceneData(projectRoot, file)) continue;
|
|
45
|
+
const text = readFileSync(file, 'utf8');
|
|
46
|
+
if (text.includes('configs/assets.json')) continue;
|
|
47
|
+
for (const match of text.matchAll(QUOTED_URL)) {
|
|
48
|
+
const url = match[2].trim();
|
|
49
|
+
if (!isExportableUrl(url)) continue;
|
|
50
|
+
found.push({ file: relative(projectRoot, file), url });
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return found;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function findMissingAssetSchemas(projectRoot) {
|
|
57
|
+
const assets = readJson(join(projectRoot, 'configs', 'assets.json'), {});
|
|
58
|
+
const snapshot = readJson(join(projectRoot, 'unified_data_control_config.json'), []);
|
|
59
|
+
if (!assets || typeof assets !== 'object' || Array.isArray(assets)) return [];
|
|
60
|
+
const schemas = new Set(
|
|
61
|
+
(Array.isArray(snapshot) ? snapshot : [])
|
|
62
|
+
.map((entry) => entry?.schema)
|
|
63
|
+
.filter((schema) => typeof schema === 'string'),
|
|
64
|
+
);
|
|
65
|
+
const missing = [];
|
|
66
|
+
for (const [name, value] of Object.entries(assets)) {
|
|
67
|
+
if (!isExportableUrl(value)) continue;
|
|
68
|
+
if (!schemas.has(`assets.${name}`)) missing.push(name);
|
|
69
|
+
}
|
|
70
|
+
return missing;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function assertAssetsWired(projectRoot) {
|
|
74
|
+
const literals = findHardcodedAssetUrls(projectRoot);
|
|
75
|
+
if (literals.length) {
|
|
76
|
+
const lines = literals.map((item) => `${item.file}: ${item.url}`).join('\n');
|
|
77
|
+
throw new Error(`资源地址写在源码里,未从 configs/assets.json 导入:\n${lines}`);
|
|
78
|
+
}
|
|
79
|
+
const missing = findMissingAssetSchemas(projectRoot);
|
|
80
|
+
if (missing.length) {
|
|
81
|
+
throw new Error(`configs/assets.json 的这些键没有进入 unified_data_control_config.json:${missing.join(', ')}`);
|
|
82
|
+
}
|
|
83
|
+
}
|