@craft_eco/craft-mcp 0.1.26 → 0.1.28
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 +15 -15
- package/bin/craft-mcp.mjs +1 -1
- package/dist-server/game-workflow/bundle-files.mjs +48 -43
- package/dist-server/game-workflow/check.mjs +3 -4
- package/dist-server/game-workflow/engines.mjs +16 -7
- package/dist-server/game-workflow/project-bundles.mjs +129 -90
- package/dist-server/game-workflow/project-context.mjs +97 -91
- package/dist-server/game-workflow/projects.mjs +13 -8
- package/dist-server/integrations/config.mjs +71 -71
- package/dist-server/integrations/files.mjs +54 -54
- package/dist-server/integrations/hosts.mjs +35 -30
- package/dist-server/integrations/install.mjs +86 -86
- package/dist-server/integrations/runtime.mjs +72 -71
- package/dist-server/mcp/server.mjs +6 -5
- package/dist-server/mcp/start.mjs +3 -1
- package/package.json +8 -10
- package/resources/craft-create/SKILL.md +3 -6
- package/resources/targets/codebuddy/js/bootstrap/SKILL.md +14 -0
- package/resources/targets/codebuddy/js/craft-game-maker/SKILL.md +77 -0
- package/resources/targets/codebuddy/js/craft-game-maker/js.md +10 -0
- package/resources/targets/codebuddy/js/js/bundle.json +99 -0
- package/resources/targets/codebuddy/js/js/context/AGENTS.md +25 -0
- package/resources/targets/codebuddy/js/js/context/hooks/hooks.json +14 -0
- package/resources/targets/codebuddy/js/js/context/knowledge/AigcWiring.md +9 -0
- package/resources/targets/codebuddy/js/js/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/codebuddy/js/js/context/knowledge/Layout.md +7 -0
- package/resources/targets/codebuddy/js/js/context/knowledge/Lifecycle.md +11 -0
- package/resources/targets/codebuddy/js/js/context/skills/aigc-generate/SKILL.md +14 -0
- package/resources/targets/codebuddy/js/js/context/skills/asset-search/SKILL.md +12 -0
- package/resources/targets/codebuddy/js/js/context/skills/asset-search/references/resource-config.md +9 -0
- package/resources/targets/codebuddy/js/js/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/codebuddy/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/codebuddy/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/codebuddy/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/codebuddy/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/codebuddy/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/codebuddy/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/codebuddy/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/codebuddy/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/codebuddy/js/js/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/codebuddy/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/codebuddy/js/js/context/skills/index.json +31 -0
- package/resources/targets/codebuddy/js/js/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/codebuddy/js/js/project/README.md +7 -0
- package/resources/targets/codebuddy/js/js/project/configs/assets.json +1 -0
- package/resources/targets/codebuddy/js/js/project/configs/game.controls.json +3 -0
- package/resources/targets/codebuddy/js/js/project/configs/game.json +3 -0
- package/resources/targets/codebuddy/js/js/project/game-runtime.json +7 -0
- package/resources/targets/codebuddy/js/js/project/game.config.json +7 -0
- package/resources/targets/codebuddy/js/js/project/index.html +20 -0
- package/resources/targets/codebuddy/js/js/project/package.json +22 -0
- package/resources/targets/codebuddy/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/codebuddy/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/codebuddy/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/codebuddy/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/codebuddy/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/codebuddy/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/codebuddy/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/codebuddy/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
- package/resources/targets/codebuddy/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
- package/resources/targets/codebuddy/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/codebuddy/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/codebuddy/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/codebuddy/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/codebuddy/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/codebuddy/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/codebuddy/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/codebuddy/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/codebuddy/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/codebuddy/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
- package/resources/targets/codebuddy/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/codebuddy/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
- package/resources/targets/codebuddy/js/js/project/scripts/config-export.mjs +13 -0
- package/resources/targets/codebuddy/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/codebuddy/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/codebuddy/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/codebuddy/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/codebuddy/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/codebuddy/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/codebuddy/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/codebuddy/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/codebuddy/js/js/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/codebuddy/js/js/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/codebuddy/js/js/project/src/display/viewport.ts +249 -0
- package/resources/targets/codebuddy/js/js/project/src/main.ts +87 -0
- package/resources/targets/codebuddy/js/js/project/src/platform.ts +2 -0
- package/resources/targets/codebuddy/js/js/project/src/scenes/LoadScene.ts +89 -0
- package/resources/targets/codebuddy/js/js/project/src/scenes/PlayScene.ts +17 -0
- package/resources/targets/codebuddy/js/js/project/src/screenUi.ts +185 -0
- package/resources/targets/codebuddy/js/js/project/src/style.css +294 -0
- package/resources/targets/codebuddy/js/js/project/tsconfig.json +20 -0
- package/resources/targets/codebuddy/js/js/project/unified_data_control_config.json +20 -0
- package/resources/targets/codebuddy/js/js/project/vite.config.ts +5 -0
- package/resources/targets/codebuddy/js/recovery.md +7 -0
- package/resources/targets/codebuddy/js/target.json +61 -0
- package/resources/targets/codebuddy/js3d/bootstrap/SKILL.md +14 -0
- package/resources/targets/codebuddy/js3d/craft-game-maker/SKILL.md +77 -0
- package/resources/targets/codebuddy/js3d/craft-game-maker/js3d.md +13 -0
- package/resources/targets/codebuddy/js3d/js3d/bundle.json +110 -0
- package/resources/targets/codebuddy/js3d/js3d/context/AGENTS.md +26 -0
- package/resources/targets/codebuddy/js3d/js3d/context/hooks/hooks.json +14 -0
- package/resources/targets/codebuddy/js3d/js3d/context/knowledge/AigcWiring.md +9 -0
- package/resources/targets/codebuddy/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/codebuddy/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
- package/resources/targets/codebuddy/js3d/js3d/context/knowledge/Layout.md +7 -0
- package/resources/targets/codebuddy/js3d/js3d/context/knowledge/Runtime.md +9 -0
- package/resources/targets/codebuddy/js3d/js3d/context/skills/aigc-integration/SKILL.md +14 -0
- package/resources/targets/codebuddy/js3d/js3d/context/skills/asset-search/SKILL.md +12 -0
- package/resources/targets/codebuddy/js3d/js3d/context/skills/asset-search/references/resource-config.md +11 -0
- package/resources/targets/codebuddy/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
- package/resources/targets/codebuddy/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
- package/resources/targets/codebuddy/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
- package/resources/targets/codebuddy/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
- package/resources/targets/codebuddy/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
- package/resources/targets/codebuddy/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
- package/resources/targets/codebuddy/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/codebuddy/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/codebuddy/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/codebuddy/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/codebuddy/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/codebuddy/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/codebuddy/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/codebuddy/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/codebuddy/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/codebuddy/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/codebuddy/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/codebuddy/js3d/js3d/context/skills/index.json +43 -0
- package/resources/targets/codebuddy/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
- package/resources/targets/codebuddy/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
- package/resources/targets/codebuddy/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
- package/resources/targets/codebuddy/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
- package/resources/targets/codebuddy/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
- package/resources/targets/codebuddy/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/codebuddy/js3d/js3d/project/README.md +7 -0
- package/resources/targets/codebuddy/js3d/js3d/project/configs/game.controls.json +3 -0
- package/resources/targets/codebuddy/js3d/js3d/project/configs/game.json +3 -0
- package/resources/targets/codebuddy/js3d/js3d/project/game-runtime.json +7 -0
- package/resources/targets/codebuddy/js3d/js3d/project/game.config.json +7 -0
- package/resources/targets/codebuddy/js3d/js3d/project/index.html +12 -0
- package/resources/targets/codebuddy/js3d/js3d/project/package.json +23 -0
- package/resources/targets/codebuddy/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/codebuddy/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/codebuddy/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/codebuddy/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/codebuddy/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/codebuddy/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/codebuddy/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/codebuddy/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
- package/resources/targets/codebuddy/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
- package/resources/targets/codebuddy/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/codebuddy/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/codebuddy/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/codebuddy/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/codebuddy/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/codebuddy/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/codebuddy/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/codebuddy/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/codebuddy/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/codebuddy/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
- package/resources/targets/codebuddy/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
- package/resources/targets/codebuddy/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
- package/resources/targets/codebuddy/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/codebuddy/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
- package/resources/targets/codebuddy/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
- package/resources/targets/codebuddy/js3d/js3d/project/scripts/config-export.mjs +15 -0
- package/resources/targets/codebuddy/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/codebuddy/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/codebuddy/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/codebuddy/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/codebuddy/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/codebuddy/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/codebuddy/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/codebuddy/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/codebuddy/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/codebuddy/js3d/js3d/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/codebuddy/js3d/js3d/project/src/display/viewport.ts +239 -0
- package/resources/targets/codebuddy/js3d/js3d/project/src/main.ts +85 -0
- package/resources/targets/codebuddy/js3d/js3d/project/src/platform.ts +2 -0
- package/resources/targets/codebuddy/js3d/js3d/project/src/style.css +83 -0
- package/resources/targets/codebuddy/js3d/js3d/project/tsconfig.json +20 -0
- package/resources/targets/codebuddy/js3d/js3d/project/unified_data_control_config.json +20 -0
- package/resources/targets/codebuddy/js3d/js3d/project/vite.config.ts +5 -0
- package/resources/targets/codebuddy/js3d/recovery.md +7 -0
- package/resources/targets/codebuddy/js3d/target.json +60 -0
- package/resources/targets/codex/js/bootstrap/SKILL.md +14 -0
- package/resources/targets/codex/js/craft-game-maker/SKILL.md +77 -0
- package/resources/targets/codex/js/craft-game-maker/js.md +10 -0
- package/resources/targets/codex/js/js/bundle.json +99 -0
- package/resources/targets/codex/js/js/context/AGENTS.md +25 -0
- package/resources/targets/codex/js/js/context/hooks/hooks.json +14 -0
- package/resources/targets/codex/js/js/context/knowledge/AigcWiring.md +9 -0
- package/resources/targets/codex/js/js/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/codex/js/js/context/knowledge/Layout.md +7 -0
- package/resources/targets/codex/js/js/context/knowledge/Lifecycle.md +11 -0
- package/resources/targets/codex/js/js/context/skills/aigc-generate/SKILL.md +14 -0
- package/resources/targets/codex/js/js/context/skills/asset-search/SKILL.md +12 -0
- package/resources/targets/codex/js/js/context/skills/asset-search/references/resource-config.md +9 -0
- package/resources/targets/codex/js/js/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/codex/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/codex/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/codex/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/codex/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/codex/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/codex/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/codex/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/codex/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/codex/js/js/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/codex/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/codex/js/js/context/skills/index.json +31 -0
- package/resources/targets/codex/js/js/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/codex/js/js/project/README.md +7 -0
- package/resources/targets/codex/js/js/project/configs/assets.json +1 -0
- package/resources/targets/codex/js/js/project/configs/game.controls.json +3 -0
- package/resources/targets/codex/js/js/project/configs/game.json +3 -0
- package/resources/targets/codex/js/js/project/game-runtime.json +7 -0
- package/resources/targets/codex/js/js/project/game.config.json +7 -0
- package/resources/targets/codex/js/js/project/index.html +20 -0
- package/resources/targets/codex/js/js/project/package.json +22 -0
- package/resources/targets/codex/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/codex/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/codex/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/codex/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/codex/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/codex/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/codex/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/codex/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
- package/resources/targets/codex/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
- package/resources/targets/codex/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/codex/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/codex/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/codex/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/codex/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/codex/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/codex/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/codex/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/codex/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/codex/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
- package/resources/targets/codex/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/codex/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
- package/resources/targets/codex/js/js/project/scripts/config-export.mjs +13 -0
- package/resources/targets/codex/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/codex/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/codex/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/codex/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/codex/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/codex/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/codex/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/codex/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/codex/js/js/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/codex/js/js/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/codex/js/js/project/src/display/viewport.ts +249 -0
- package/resources/targets/codex/js/js/project/src/main.ts +87 -0
- package/resources/targets/codex/js/js/project/src/platform.ts +2 -0
- package/resources/targets/codex/js/js/project/src/scenes/LoadScene.ts +89 -0
- package/resources/targets/codex/js/js/project/src/scenes/PlayScene.ts +17 -0
- package/resources/targets/codex/js/js/project/src/screenUi.ts +185 -0
- package/resources/targets/codex/js/js/project/src/style.css +294 -0
- package/resources/targets/codex/js/js/project/tsconfig.json +20 -0
- package/resources/targets/codex/js/js/project/unified_data_control_config.json +20 -0
- package/resources/targets/codex/js/js/project/vite.config.ts +5 -0
- package/resources/targets/codex/js/recovery.md +7 -0
- package/resources/targets/codex/js/target.json +61 -0
- package/resources/targets/codex/js3d/bootstrap/SKILL.md +14 -0
- package/resources/targets/codex/js3d/craft-game-maker/SKILL.md +77 -0
- package/resources/targets/codex/js3d/craft-game-maker/js3d.md +13 -0
- package/resources/targets/codex/js3d/js3d/bundle.json +110 -0
- package/resources/targets/codex/js3d/js3d/context/AGENTS.md +26 -0
- package/resources/targets/codex/js3d/js3d/context/hooks/hooks.json +14 -0
- package/resources/targets/codex/js3d/js3d/context/knowledge/AigcWiring.md +9 -0
- package/resources/targets/codex/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/codex/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
- package/resources/targets/codex/js3d/js3d/context/knowledge/Layout.md +7 -0
- package/resources/targets/codex/js3d/js3d/context/knowledge/Runtime.md +9 -0
- package/resources/targets/codex/js3d/js3d/context/skills/aigc-integration/SKILL.md +14 -0
- package/resources/targets/codex/js3d/js3d/context/skills/asset-search/SKILL.md +12 -0
- package/resources/targets/codex/js3d/js3d/context/skills/asset-search/references/resource-config.md +11 -0
- package/resources/targets/codex/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
- package/resources/targets/codex/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
- package/resources/targets/codex/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
- package/resources/targets/codex/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
- package/resources/targets/codex/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
- package/resources/targets/codex/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
- package/resources/targets/codex/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/codex/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/codex/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/codex/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/codex/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/codex/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/codex/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/codex/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/codex/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/codex/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/codex/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/codex/js3d/js3d/context/skills/index.json +43 -0
- package/resources/targets/codex/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
- package/resources/targets/codex/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
- package/resources/targets/codex/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
- package/resources/targets/codex/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
- package/resources/targets/codex/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
- package/resources/targets/codex/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/codex/js3d/js3d/project/README.md +7 -0
- package/resources/targets/codex/js3d/js3d/project/configs/game.controls.json +3 -0
- package/resources/targets/codex/js3d/js3d/project/configs/game.json +3 -0
- package/resources/targets/codex/js3d/js3d/project/game-runtime.json +7 -0
- package/resources/targets/codex/js3d/js3d/project/game.config.json +7 -0
- package/resources/targets/codex/js3d/js3d/project/index.html +12 -0
- package/resources/targets/codex/js3d/js3d/project/package.json +23 -0
- package/resources/targets/codex/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/codex/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/codex/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/codex/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/codex/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/codex/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/codex/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/codex/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
- package/resources/targets/codex/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
- package/resources/targets/codex/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/codex/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/codex/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/codex/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/codex/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/codex/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/codex/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/codex/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/codex/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/codex/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
- package/resources/targets/codex/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
- package/resources/targets/codex/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
- package/resources/targets/codex/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/codex/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
- package/resources/targets/codex/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
- package/resources/targets/codex/js3d/js3d/project/scripts/config-export.mjs +15 -0
- package/resources/targets/codex/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/codex/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/codex/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/codex/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/codex/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/codex/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/codex/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/codex/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/codex/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/codex/js3d/js3d/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/codex/js3d/js3d/project/src/display/viewport.ts +239 -0
- package/resources/targets/codex/js3d/js3d/project/src/main.ts +85 -0
- package/resources/targets/codex/js3d/js3d/project/src/platform.ts +2 -0
- package/resources/targets/codex/js3d/js3d/project/src/style.css +83 -0
- package/resources/targets/codex/js3d/js3d/project/tsconfig.json +20 -0
- package/resources/targets/codex/js3d/js3d/project/unified_data_control_config.json +20 -0
- package/resources/targets/codex/js3d/js3d/project/vite.config.ts +5 -0
- package/resources/targets/codex/js3d/recovery.md +7 -0
- package/resources/targets/codex/js3d/target.json +60 -0
- package/resources/targets/index.json +41 -0
- package/resources/targets/workbuddy/js/bootstrap/SKILL.md +14 -0
- package/resources/targets/workbuddy/js/craft-game-maker/SKILL.md +77 -0
- package/resources/targets/workbuddy/js/craft-game-maker/js.md +10 -0
- package/resources/targets/workbuddy/js/js/bundle.json +99 -0
- package/resources/targets/workbuddy/js/js/context/AGENTS.md +25 -0
- package/resources/targets/workbuddy/js/js/context/hooks/hooks.json +14 -0
- package/resources/targets/workbuddy/js/js/context/knowledge/AigcWiring.md +9 -0
- package/resources/targets/workbuddy/js/js/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/workbuddy/js/js/context/knowledge/Layout.md +7 -0
- package/resources/targets/workbuddy/js/js/context/knowledge/Lifecycle.md +11 -0
- package/resources/targets/workbuddy/js/js/context/skills/aigc-generate/SKILL.md +14 -0
- package/resources/targets/workbuddy/js/js/context/skills/asset-search/SKILL.md +12 -0
- package/resources/targets/workbuddy/js/js/context/skills/asset-search/references/resource-config.md +9 -0
- package/resources/targets/workbuddy/js/js/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/workbuddy/js/js/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/workbuddy/js/js/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/workbuddy/js/js/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/workbuddy/js/js/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/workbuddy/js/js/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/workbuddy/js/js/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/workbuddy/js/js/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/workbuddy/js/js/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/workbuddy/js/js/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/workbuddy/js/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/workbuddy/js/js/context/skills/index.json +31 -0
- package/resources/targets/workbuddy/js/js/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/workbuddy/js/js/project/README.md +7 -0
- package/resources/targets/workbuddy/js/js/project/configs/assets.json +1 -0
- package/resources/targets/workbuddy/js/js/project/configs/game.controls.json +3 -0
- package/resources/targets/workbuddy/js/js/project/configs/game.json +3 -0
- package/resources/targets/workbuddy/js/js/project/game-runtime.json +7 -0
- package/resources/targets/workbuddy/js/js/project/game.config.json +7 -0
- package/resources/targets/workbuddy/js/js/project/index.html +20 -0
- package/resources/targets/workbuddy/js/js/project/package.json +22 -0
- package/resources/targets/workbuddy/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/workbuddy/js/js/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/workbuddy/js/js/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/workbuddy/js/js/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/workbuddy/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/workbuddy/js/js/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/workbuddy/js/js/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/workbuddy/js/js/project/runtime/lightgame/1.1.0/platform/platform.mjs +29 -0
- package/resources/targets/workbuddy/js/js/project/runtime/lightgame/1.1.0/release.json +22 -0
- package/resources/targets/workbuddy/js/js/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/workbuddy/js/js/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/workbuddy/js/js/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/workbuddy/js/js/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/workbuddy/js/js/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/workbuddy/js/js/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/workbuddy/js/js/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/workbuddy/js/js/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/workbuddy/js/js/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/workbuddy/js/js/project/scripts/config-export/assert-asset-wiring.mjs +72 -0
- package/resources/targets/workbuddy/js/js/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/workbuddy/js/js/project/scripts/config-export/sync-asset-controls.mjs +316 -0
- package/resources/targets/workbuddy/js/js/project/scripts/config-export.mjs +13 -0
- package/resources/targets/workbuddy/js/js/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/workbuddy/js/js/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/workbuddy/js/js/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/workbuddy/js/js/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/workbuddy/js/js/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/workbuddy/js/js/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/workbuddy/js/js/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/workbuddy/js/js/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/workbuddy/js/js/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/workbuddy/js/js/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/workbuddy/js/js/project/src/display/viewport.ts +249 -0
- package/resources/targets/workbuddy/js/js/project/src/main.ts +87 -0
- package/resources/targets/workbuddy/js/js/project/src/platform.ts +2 -0
- package/resources/targets/workbuddy/js/js/project/src/scenes/LoadScene.ts +89 -0
- package/resources/targets/workbuddy/js/js/project/src/scenes/PlayScene.ts +17 -0
- package/resources/targets/workbuddy/js/js/project/src/screenUi.ts +185 -0
- package/resources/targets/workbuddy/js/js/project/src/style.css +294 -0
- package/resources/targets/workbuddy/js/js/project/tsconfig.json +20 -0
- package/resources/targets/workbuddy/js/js/project/unified_data_control_config.json +20 -0
- package/resources/targets/workbuddy/js/js/project/vite.config.ts +5 -0
- package/resources/targets/workbuddy/js/recovery.md +7 -0
- package/resources/targets/workbuddy/js/target.json +61 -0
- package/resources/targets/workbuddy/js3d/bootstrap/SKILL.md +14 -0
- package/resources/targets/workbuddy/js3d/craft-game-maker/SKILL.md +77 -0
- package/resources/targets/workbuddy/js3d/craft-game-maker/js3d.md +13 -0
- package/resources/targets/workbuddy/js3d/js3d/bundle.json +110 -0
- package/resources/targets/workbuddy/js3d/js3d/context/AGENTS.md +26 -0
- package/resources/targets/workbuddy/js3d/js3d/context/hooks/hooks.json +14 -0
- package/resources/targets/workbuddy/js3d/js3d/context/knowledge/AigcWiring.md +9 -0
- package/resources/targets/workbuddy/js3d/js3d/context/knowledge/AssetUrl.md +9 -0
- package/resources/targets/workbuddy/js3d/js3d/context/knowledge/CodingGuide/Pitfalls.md +11 -0
- package/resources/targets/workbuddy/js3d/js3d/context/knowledge/Layout.md +7 -0
- package/resources/targets/workbuddy/js3d/js3d/context/knowledge/Runtime.md +9 -0
- package/resources/targets/workbuddy/js3d/js3d/context/skills/aigc-integration/SKILL.md +14 -0
- package/resources/targets/workbuddy/js3d/js3d/context/skills/asset-search/SKILL.md +12 -0
- package/resources/targets/workbuddy/js3d/js3d/context/skills/asset-search/references/resource-config.md +11 -0
- package/resources/targets/workbuddy/js3d/js3d/context/skills/asset-usage-audit/SKILL.md +16 -0
- package/resources/targets/workbuddy/js3d/js3d/context/skills/asset-usage-audit/scripts/compare-animations.mjs +48 -0
- package/resources/targets/workbuddy/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/anim.mjs +266 -0
- package/resources/targets/workbuddy/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/glb.mjs +241 -0
- package/resources/targets/workbuddy/js3d/js3d/context/skills/asset-usage-audit/scripts/lib/scan.mjs +455 -0
- package/resources/targets/workbuddy/js3d/js3d/context/skills/asset-usage-audit/scripts/scan-assets.mjs +77 -0
- package/resources/targets/workbuddy/js3d/js3d/context/skills/export-config/SKILL.md +16 -0
- package/resources/targets/workbuddy/js3d/js3d/context/skills/export-config/assets/tooling/cli.mjs +20 -0
- package/resources/targets/workbuddy/js3d/js3d/context/skills/export-config/assets/tooling/config.d.mts +19 -0
- package/resources/targets/workbuddy/js3d/js3d/context/skills/export-config/assets/tooling/config.mjs +1 -0
- package/resources/targets/workbuddy/js3d/js3d/context/skills/export-config/assets/tooling/project.d.mts +6 -0
- package/resources/targets/workbuddy/js3d/js3d/context/skills/export-config/assets/tooling/project.mjs +77 -0
- package/resources/targets/workbuddy/js3d/js3d/context/skills/export-config/assets/tooling/vite.d.mts +2 -0
- package/resources/targets/workbuddy/js3d/js3d/context/skills/export-config/assets/tooling/vite.mjs +34 -0
- package/resources/targets/workbuddy/js3d/js3d/context/skills/export-config/scripts/export-config.mjs +4 -0
- package/resources/targets/workbuddy/js3d/js3d/context/skills/export-config/scripts/install.mjs +89 -0
- package/resources/targets/workbuddy/js3d/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
- package/resources/targets/workbuddy/js3d/js3d/context/skills/index.json +43 -0
- package/resources/targets/workbuddy/js3d/js3d/context/skills/performance-audit/SKILL.md +21 -0
- package/resources/targets/workbuddy/js3d/js3d/context/skills/performance-audit/scripts/lib/rules.mjs +470 -0
- package/resources/targets/workbuddy/js3d/js3d/context/skills/performance-audit/scripts/lib/scan.mjs +387 -0
- package/resources/targets/workbuddy/js3d/js3d/context/skills/performance-audit/scripts/lib/source.mjs +398 -0
- package/resources/targets/workbuddy/js3d/js3d/context/skills/performance-audit/scripts/scan-perf.mjs +130 -0
- package/resources/targets/workbuddy/js3d/js3d/context/skills/visual-qa/SKILL.md +14 -0
- package/resources/targets/workbuddy/js3d/js3d/project/README.md +7 -0
- package/resources/targets/workbuddy/js3d/js3d/project/configs/game.controls.json +3 -0
- package/resources/targets/workbuddy/js3d/js3d/project/configs/game.json +3 -0
- package/resources/targets/workbuddy/js3d/js3d/project/game-runtime.json +7 -0
- package/resources/targets/workbuddy/js3d/js3d/project/game.config.json +7 -0
- package/resources/targets/workbuddy/js3d/js3d/project/index.html +12 -0
- package/resources/targets/workbuddy/js3d/js3d/project/package.json +23 -0
- package/resources/targets/workbuddy/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-ai-game-sdk.min.js +5 -0
- package/resources/targets/workbuddy/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/qq-session.mjs +208 -0
- package/resources/targets/workbuddy/js3d/js3d/project/runtime/lightgame/1.1.0/platform/identity/shared.mjs +37 -0
- package/resources/targets/workbuddy/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-capture-video.mjs +227 -0
- package/resources/targets/workbuddy/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.d.mts +31 -0
- package/resources/targets/workbuddy/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform-service.mjs +272 -0
- package/resources/targets/workbuddy/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.d.mts +79 -0
- package/resources/targets/workbuddy/js3d/js3d/project/runtime/lightgame/1.1.0/platform/platform.mjs +30 -0
- package/resources/targets/workbuddy/js3d/js3d/project/runtime/lightgame/1.1.0/release.json +24 -0
- package/resources/targets/workbuddy/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/cli.mjs +16 -0
- package/resources/targets/workbuddy/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.d.mts +4 -0
- package/resources/targets/workbuddy/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/project.mjs +50 -0
- package/resources/targets/workbuddy/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.d.mts +3 -0
- package/resources/targets/workbuddy/js3d/js3d/project/runtime/lightgame/1.1.0/tooling/vite.mjs +72 -0
- package/resources/targets/workbuddy/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.d.mts +24 -0
- package/resources/targets/workbuddy/js3d/js3d/project/runtime/lightgame/1.1.0/tools/assets.mjs +2 -0
- package/resources/targets/workbuddy/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.d.mts +10 -0
- package/resources/targets/workbuddy/js3d/js3d/project/runtime/lightgame/1.1.0/tools/astc.mjs +1 -0
- package/resources/targets/workbuddy/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.d.mts +26 -0
- package/resources/targets/workbuddy/js3d/js3d/project/runtime/lightgame/1.1.0/tools/glb.mjs +351 -0
- package/resources/targets/workbuddy/js3d/js3d/project/scripts/config-export/assert-asset-wiring.mjs +97 -0
- package/resources/targets/workbuddy/js3d/js3d/project/scripts/config-export/panel-resource-path.mjs +106 -0
- package/resources/targets/workbuddy/js3d/js3d/project/scripts/config-export/sync-asset-controls.mjs +327 -0
- package/resources/targets/workbuddy/js3d/js3d/project/scripts/config-export/sync-scene-assets.mjs +191 -0
- package/resources/targets/workbuddy/js3d/js3d/project/scripts/config-export.mjs +15 -0
- package/resources/targets/workbuddy/js3d/js3d/project/scripts/skill-modules/export-config/cli.mjs +20 -0
- package/resources/targets/workbuddy/js3d/js3d/project/scripts/skill-modules/export-config/config.d.mts +19 -0
- package/resources/targets/workbuddy/js3d/js3d/project/scripts/skill-modules/export-config/config.mjs +1 -0
- package/resources/targets/workbuddy/js3d/js3d/project/scripts/skill-modules/export-config/installed.json +6 -0
- package/resources/targets/workbuddy/js3d/js3d/project/scripts/skill-modules/export-config/project.d.mts +6 -0
- package/resources/targets/workbuddy/js3d/js3d/project/scripts/skill-modules/export-config/project.mjs +77 -0
- package/resources/targets/workbuddy/js3d/js3d/project/scripts/skill-modules/export-config/vite.d.mts +2 -0
- package/resources/targets/workbuddy/js3d/js3d/project/scripts/skill-modules/export-config/vite.mjs +34 -0
- package/resources/targets/workbuddy/js3d/js3d/project/scripts/write-preview-ready.mjs +22 -0
- package/resources/targets/workbuddy/js3d/js3d/project/src/display/ui-stage.ts +156 -0
- package/resources/targets/workbuddy/js3d/js3d/project/src/display/viewport.ts +239 -0
- package/resources/targets/workbuddy/js3d/js3d/project/src/main.ts +85 -0
- package/resources/targets/workbuddy/js3d/js3d/project/src/platform.ts +2 -0
- package/resources/targets/workbuddy/js3d/js3d/project/src/style.css +83 -0
- package/resources/targets/workbuddy/js3d/js3d/project/tsconfig.json +20 -0
- package/resources/targets/workbuddy/js3d/js3d/project/unified_data_control_config.json +20 -0
- package/resources/targets/workbuddy/js3d/js3d/project/vite.config.ts +5 -0
- package/resources/targets/workbuddy/js3d/recovery.md +7 -0
- package/resources/targets/workbuddy/js3d/target.json +60 -0
- package/vendor/craft-runtime/NOTICE.md +3 -0
- package/vendor/craft-runtime/SOURCE.json +63 -0
- package/vendor/craft-runtime/index.js +1716 -0
- package/vendor/craft-runtime/isolated-launcher.js +94 -0
- package/vendor/craft-runtime/isolated-preload.js +80 -0
- package/vendor/craft-runtime/package.json +8 -0
- package/vendor/agent-cli/dist/runtime-tools/registry.json +0 -6
- package/vendor/agent-cli/dist/runtime-tools/tool-bundle-types.d.cts +0 -15
- package/vendor/agent-cli/dist/runtime-tools/tool-bundle.cjs +0 -129
- package/vendor/agent-cli/dist/runtime-tools/ue/blender-cook-assets.cjs +0 -296
- package/vendor/agent-cli/dist/runtime-tools/ue/context-adapter.cjs +0 -48
- package/vendor/agent-cli/dist/runtime-tools/ue/scene-process-lock.cjs +0 -110
- package/vendor/agent-cli/dist/runtime-tools/ue/tool-manifest.json +0 -22
- package/vendor/agent-cli/dist/runtime-tools/ue/ue-asset-references.cjs +0 -305
- package/vendor/agent-cli/dist/src/artifacts/build-failure.d.ts +0 -8
- package/vendor/agent-cli/dist/src/artifacts/build-failure.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/artifacts/build-failure.js +0 -39
- package/vendor/agent-cli/dist/src/artifacts/build-failure.js.map +0 -1
- package/vendor/agent-cli/dist/src/artifacts/context-finalize.d.ts +0 -3
- package/vendor/agent-cli/dist/src/artifacts/context-finalize.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/artifacts/context-finalize.js +0 -54
- package/vendor/agent-cli/dist/src/artifacts/context-finalize.js.map +0 -1
- package/vendor/agent-cli/dist/src/artifacts/dependency-toolchain.d.ts +0 -5
- package/vendor/agent-cli/dist/src/artifacts/dependency-toolchain.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/artifacts/dependency-toolchain.js +0 -45
- package/vendor/agent-cli/dist/src/artifacts/dependency-toolchain.js.map +0 -1
- package/vendor/agent-cli/dist/src/artifacts/external-game-archive.d.ts +0 -19
- package/vendor/agent-cli/dist/src/artifacts/external-game-archive.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/artifacts/external-game-archive.js +0 -107
- package/vendor/agent-cli/dist/src/artifacts/external-game-archive.js.map +0 -1
- package/vendor/agent-cli/dist/src/artifacts/external-game-upload.d.ts +0 -44
- package/vendor/agent-cli/dist/src/artifacts/external-game-upload.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/artifacts/external-game-upload.js +0 -106
- package/vendor/agent-cli/dist/src/artifacts/external-game-upload.js.map +0 -1
- package/vendor/agent-cli/dist/src/artifacts/native-source.d.ts +0 -3
- package/vendor/agent-cli/dist/src/artifacts/native-source.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/artifacts/native-source.js +0 -13
- package/vendor/agent-cli/dist/src/artifacts/native-source.js.map +0 -1
- package/vendor/agent-cli/dist/src/artifacts/preinstalled-dependencies.d.ts +0 -13
- package/vendor/agent-cli/dist/src/artifacts/preinstalled-dependencies.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/artifacts/preinstalled-dependencies.js +0 -365
- package/vendor/agent-cli/dist/src/artifacts/preinstalled-dependencies.js.map +0 -1
- package/vendor/agent-cli/dist/src/artifacts/prepare.d.ts +0 -63
- package/vendor/agent-cli/dist/src/artifacts/prepare.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/artifacts/prepare.js +0 -216
- package/vendor/agent-cli/dist/src/artifacts/prepare.js.map +0 -1
- package/vendor/agent-cli/dist/src/artifacts/process-artifacts.d.ts +0 -41
- package/vendor/agent-cli/dist/src/artifacts/process-artifacts.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/artifacts/process-artifacts.js +0 -184
- package/vendor/agent-cli/dist/src/artifacts/process-artifacts.js.map +0 -1
- package/vendor/agent-cli/dist/src/artifacts/restore-permissions.d.ts +0 -27
- package/vendor/agent-cli/dist/src/artifacts/restore-permissions.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/artifacts/restore-permissions.js +0 -112
- package/vendor/agent-cli/dist/src/artifacts/restore-permissions.js.map +0 -1
- package/vendor/agent-cli/dist/src/artifacts/restore.d.ts +0 -37
- package/vendor/agent-cli/dist/src/artifacts/restore.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/artifacts/restore.js +0 -465
- package/vendor/agent-cli/dist/src/artifacts/restore.js.map +0 -1
- package/vendor/agent-cli/dist/src/artifacts/scene-asset-references.d.ts +0 -14
- package/vendor/agent-cli/dist/src/artifacts/scene-asset-references.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/artifacts/scene-asset-references.js +0 -119
- package/vendor/agent-cli/dist/src/artifacts/scene-asset-references.js.map +0 -1
- package/vendor/agent-cli/dist/src/artifacts/static.d.ts +0 -19
- package/vendor/agent-cli/dist/src/artifacts/static.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/artifacts/static.js +0 -238
- package/vendor/agent-cli/dist/src/artifacts/static.js.map +0 -1
- package/vendor/agent-cli/dist/src/cli/commands/process.d.ts +0 -4
- package/vendor/agent-cli/dist/src/cli/commands/process.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/cli/commands/process.js +0 -24
- package/vendor/agent-cli/dist/src/cli/commands/process.js.map +0 -1
- package/vendor/agent-cli/dist/src/cli/commands/run-controls.d.ts +0 -23
- package/vendor/agent-cli/dist/src/cli/commands/run-controls.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/cli/commands/run-controls.js +0 -62
- package/vendor/agent-cli/dist/src/cli/commands/run-controls.js.map +0 -1
- package/vendor/agent-cli/dist/src/cli/commands/run-mock.d.ts +0 -9
- package/vendor/agent-cli/dist/src/cli/commands/run-mock.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/cli/commands/run-mock.js +0 -15
- package/vendor/agent-cli/dist/src/cli/commands/run-mock.js.map +0 -1
- package/vendor/agent-cli/dist/src/cli/commands/run.d.ts +0 -3
- package/vendor/agent-cli/dist/src/cli/commands/run.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/cli/commands/run.js +0 -284
- package/vendor/agent-cli/dist/src/cli/commands/run.js.map +0 -1
- package/vendor/agent-cli/dist/src/cli/commands/setup.d.ts +0 -11
- package/vendor/agent-cli/dist/src/cli/commands/setup.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/cli/commands/setup.js +0 -161
- package/vendor/agent-cli/dist/src/cli/commands/setup.js.map +0 -1
- package/vendor/agent-cli/dist/src/cli/options.d.ts +0 -83
- package/vendor/agent-cli/dist/src/cli/options.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/cli/options.js +0 -213
- package/vendor/agent-cli/dist/src/cli/options.js.map +0 -1
- package/vendor/agent-cli/dist/src/cli/process-protocol.d.ts +0 -5
- package/vendor/agent-cli/dist/src/cli/process-protocol.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/cli/process-protocol.js +0 -301
- package/vendor/agent-cli/dist/src/cli/process-protocol.js.map +0 -1
- package/vendor/agent-cli/dist/src/cli/process-steering.d.ts +0 -21
- package/vendor/agent-cli/dist/src/cli/process-steering.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/cli/process-steering.js +0 -66
- package/vendor/agent-cli/dist/src/cli/process-steering.js.map +0 -1
- package/vendor/agent-cli/dist/src/cli/registry.d.ts +0 -55
- package/vendor/agent-cli/dist/src/cli/registry.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/cli/registry.js +0 -99
- package/vendor/agent-cli/dist/src/cli/registry.js.map +0 -1
- package/vendor/agent-cli/dist/src/cli/render/jsonl-sink.d.ts +0 -44
- package/vendor/agent-cli/dist/src/cli/render/jsonl-sink.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/cli/render/jsonl-sink.js +0 -83
- package/vendor/agent-cli/dist/src/cli/render/jsonl-sink.js.map +0 -1
- package/vendor/agent-cli/dist/src/cli/render/text-sink.d.ts +0 -28
- package/vendor/agent-cli/dist/src/cli/render/text-sink.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/cli/render/text-sink.js +0 -52
- package/vendor/agent-cli/dist/src/cli/render/text-sink.js.map +0 -1
- package/vendor/agent-cli/dist/src/cli.d.ts +0 -9
- package/vendor/agent-cli/dist/src/cli.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/cli.js +0 -54
- package/vendor/agent-cli/dist/src/cli.js.map +0 -1
- package/vendor/agent-cli/dist/src/component/browser-queue.d.ts +0 -55
- package/vendor/agent-cli/dist/src/component/browser-queue.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/component/browser-queue.js +0 -63
- package/vendor/agent-cli/dist/src/component/browser-queue.js.map +0 -1
- package/vendor/agent-cli/dist/src/component/execution.d.ts +0 -28
- package/vendor/agent-cli/dist/src/component/execution.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/component/execution.js +0 -143
- package/vendor/agent-cli/dist/src/component/execution.js.map +0 -1
- package/vendor/agent-cli/dist/src/component/isolated-launcher.d.ts +0 -2
- package/vendor/agent-cli/dist/src/component/isolated-launcher.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/component/isolated-launcher.js +0 -76
- package/vendor/agent-cli/dist/src/component/isolated-launcher.js.map +0 -1
- package/vendor/agent-cli/dist/src/component/isolated-preload.d.ts +0 -2
- package/vendor/agent-cli/dist/src/component/isolated-preload.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/component/isolated-preload.js +0 -27
- package/vendor/agent-cli/dist/src/component/isolated-preload.js.map +0 -1
- package/vendor/agent-cli/dist/src/component/platform-access/server.d.ts +0 -19
- package/vendor/agent-cli/dist/src/component/platform-access/server.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/component/platform-access/server.js +0 -206
- package/vendor/agent-cli/dist/src/component/platform-access/server.js.map +0 -1
- package/vendor/agent-cli/dist/src/component/preparation-diagnostics.d.ts +0 -31
- package/vendor/agent-cli/dist/src/component/preparation-diagnostics.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/component/preparation-diagnostics.js +0 -62
- package/vendor/agent-cli/dist/src/component/preparation-diagnostics.js.map +0 -1
- package/vendor/agent-cli/dist/src/component/preparation.d.ts +0 -10
- package/vendor/agent-cli/dist/src/component/preparation.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/component/preparation.js +0 -35
- package/vendor/agent-cli/dist/src/component/preparation.js.map +0 -1
- package/vendor/agent-cli/dist/src/component/process-diagnostics.d.ts +0 -25
- package/vendor/agent-cli/dist/src/component/process-diagnostics.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/component/process-diagnostics.js +0 -137
- package/vendor/agent-cli/dist/src/component/process-diagnostics.js.map +0 -1
- package/vendor/agent-cli/dist/src/component/process-isolation.d.ts +0 -10
- package/vendor/agent-cli/dist/src/component/process-isolation.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/component/process-isolation.js +0 -59
- package/vendor/agent-cli/dist/src/component/process-isolation.js.map +0 -1
- package/vendor/agent-cli/dist/src/component/proxied-fetch.d.ts +0 -2
- package/vendor/agent-cli/dist/src/component/proxied-fetch.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/component/proxied-fetch.js +0 -46
- package/vendor/agent-cli/dist/src/component/proxied-fetch.js.map +0 -1
- package/vendor/agent-cli/dist/src/component/public-egress.d.ts +0 -17
- package/vendor/agent-cli/dist/src/component/public-egress.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/component/public-egress.js +0 -246
- package/vendor/agent-cli/dist/src/component/public-egress.js.map +0 -1
- package/vendor/agent-cli/dist/src/component/runtime-tools.d.ts +0 -15
- package/vendor/agent-cli/dist/src/component/runtime-tools.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/component/runtime-tools.js +0 -37
- package/vendor/agent-cli/dist/src/component/runtime-tools.js.map +0 -1
- package/vendor/agent-cli/dist/src/component/runtime.d.ts +0 -8
- package/vendor/agent-cli/dist/src/component/runtime.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/component/runtime.js +0 -95
- package/vendor/agent-cli/dist/src/component/runtime.js.map +0 -1
- package/vendor/agent-cli/dist/src/config/config-store.d.ts +0 -50
- package/vendor/agent-cli/dist/src/config/config-store.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/config/config-store.js +0 -117
- package/vendor/agent-cli/dist/src/config/config-store.js.map +0 -1
- package/vendor/agent-cli/dist/src/context/cache-lease.d.ts +0 -17
- package/vendor/agent-cli/dist/src/context/cache-lease.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/context/cache-lease.js +0 -133
- package/vendor/agent-cli/dist/src/context/cache-lease.js.map +0 -1
- package/vendor/agent-cli/dist/src/context/cache-prune-diagnostics.d.ts +0 -9
- package/vendor/agent-cli/dist/src/context/cache-prune-diagnostics.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/context/cache-prune-diagnostics.js +0 -51
- package/vendor/agent-cli/dist/src/context/cache-prune-diagnostics.js.map +0 -1
- package/vendor/agent-cli/dist/src/context/cache-publication-lock.d.ts +0 -3
- package/vendor/agent-cli/dist/src/context/cache-publication-lock.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/context/cache-publication-lock.js +0 -68
- package/vendor/agent-cli/dist/src/context/cache-publication-lock.js.map +0 -1
- package/vendor/agent-cli/dist/src/context/cache-publication.d.ts +0 -4
- package/vendor/agent-cli/dist/src/context/cache-publication.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/context/cache-publication.js +0 -58
- package/vendor/agent-cli/dist/src/context/cache-publication.js.map +0 -1
- package/vendor/agent-cli/dist/src/context/client-context-view.d.ts +0 -12
- package/vendor/agent-cli/dist/src/context/client-context-view.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/context/client-context-view.js +0 -100
- package/vendor/agent-cli/dist/src/context/client-context-view.js.map +0 -1
- package/vendor/agent-cli/dist/src/context/context-budget.d.ts +0 -3
- package/vendor/agent-cli/dist/src/context/context-budget.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/context/context-budget.js +0 -10
- package/vendor/agent-cli/dist/src/context/context-budget.js.map +0 -1
- package/vendor/agent-cli/dist/src/context/context-cache.d.ts +0 -108
- package/vendor/agent-cli/dist/src/context/context-cache.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/context/context-cache.js +0 -360
- package/vendor/agent-cli/dist/src/context/context-cache.js.map +0 -1
- package/vendor/agent-cli/dist/src/context/context-project.d.ts +0 -67
- package/vendor/agent-cli/dist/src/context/context-project.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/context/context-project.js +0 -254
- package/vendor/agent-cli/dist/src/context/context-project.js.map +0 -1
- package/vendor/agent-cli/dist/src/context/context-resource.d.ts +0 -4
- package/vendor/agent-cli/dist/src/context/context-resource.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/context/context-resource.js +0 -11
- package/vendor/agent-cli/dist/src/context/context-resource.js.map +0 -1
- package/vendor/agent-cli/dist/src/context/context-scoped-source.d.ts +0 -13
- package/vendor/agent-cli/dist/src/context/context-scoped-source.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/context/context-scoped-source.js +0 -78
- package/vendor/agent-cli/dist/src/context/context-scoped-source.js.map +0 -1
- package/vendor/agent-cli/dist/src/context/context-snapshot-cache.d.ts +0 -23
- package/vendor/agent-cli/dist/src/context/context-snapshot-cache.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/context/context-snapshot-cache.js +0 -200
- package/vendor/agent-cli/dist/src/context/context-snapshot-cache.js.map +0 -1
- package/vendor/agent-cli/dist/src/context/local-skills.d.ts +0 -6
- package/vendor/agent-cli/dist/src/context/local-skills.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/context/local-skills.js +0 -174
- package/vendor/agent-cli/dist/src/context/local-skills.js.map +0 -1
- package/vendor/agent-cli/dist/src/context/member-context.d.ts +0 -20
- package/vendor/agent-cli/dist/src/context/member-context.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/context/member-context.js +0 -113
- package/vendor/agent-cli/dist/src/context/member-context.js.map +0 -1
- package/vendor/agent-cli/dist/src/context/member-documents.d.ts +0 -3
- package/vendor/agent-cli/dist/src/context/member-documents.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/context/member-documents.js +0 -38
- package/vendor/agent-cli/dist/src/context/member-documents.js.map +0 -1
- package/vendor/agent-cli/dist/src/context/member-profile-header.d.ts +0 -3
- package/vendor/agent-cli/dist/src/context/member-profile-header.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/context/member-profile-header.js +0 -62
- package/vendor/agent-cli/dist/src/context/member-profile-header.js.map +0 -1
- package/vendor/agent-cli/dist/src/context/member-profile.d.ts +0 -43
- package/vendor/agent-cli/dist/src/context/member-profile.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/context/member-profile.js +0 -91
- package/vendor/agent-cli/dist/src/context/member-profile.js.map +0 -1
- package/vendor/agent-cli/dist/src/context/member-selection.d.ts +0 -7
- package/vendor/agent-cli/dist/src/context/member-selection.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/context/member-selection.js +0 -58
- package/vendor/agent-cli/dist/src/context/member-selection.js.map +0 -1
- package/vendor/agent-cli/dist/src/context/script-dependencies.d.ts +0 -14
- package/vendor/agent-cli/dist/src/context/script-dependencies.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/context/script-dependencies.js +0 -40
- package/vendor/agent-cli/dist/src/context/script-dependencies.js.map +0 -1
- package/vendor/agent-cli/dist/src/context/shared-cache-build.d.ts +0 -3
- package/vendor/agent-cli/dist/src/context/shared-cache-build.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/context/shared-cache-build.js +0 -56
- package/vendor/agent-cli/dist/src/context/shared-cache-build.js.map +0 -1
- package/vendor/agent-cli/dist/src/context/team-definition.d.ts +0 -39
- package/vendor/agent-cli/dist/src/context/team-definition.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/context/team-definition.js +0 -78
- package/vendor/agent-cli/dist/src/context/team-definition.js.map +0 -1
- package/vendor/agent-cli/dist/src/context/team-knowledge.d.ts +0 -7
- package/vendor/agent-cli/dist/src/context/team-knowledge.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/context/team-knowledge.js +0 -46
- package/vendor/agent-cli/dist/src/context/team-knowledge.js.map +0 -1
- package/vendor/agent-cli/dist/src/context/template-cache.d.ts +0 -31
- package/vendor/agent-cli/dist/src/context/template-cache.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/context/template-cache.js +0 -100
- package/vendor/agent-cli/dist/src/context/template-cache.js.map +0 -1
- package/vendor/agent-cli/dist/src/context/template-refresh.d.ts +0 -6
- package/vendor/agent-cli/dist/src/context/template-refresh.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/context/template-refresh.js +0 -45
- package/vendor/agent-cli/dist/src/context/template-refresh.js.map +0 -1
- package/vendor/agent-cli/dist/src/context/template-seed.d.ts +0 -45
- package/vendor/agent-cli/dist/src/context/template-seed.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/context/template-seed.js +0 -169
- package/vendor/agent-cli/dist/src/context/template-seed.js.map +0 -1
- package/vendor/agent-cli/dist/src/context/template-sync.d.ts +0 -11
- package/vendor/agent-cli/dist/src/context/template-sync.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/context/template-sync.js +0 -167
- package/vendor/agent-cli/dist/src/context/template-sync.js.map +0 -1
- package/vendor/agent-cli/dist/src/context/user-skill-bundle.d.ts +0 -19
- package/vendor/agent-cli/dist/src/context/user-skill-bundle.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/context/user-skill-bundle.js +0 -292
- package/vendor/agent-cli/dist/src/context/user-skill-bundle.js.map +0 -1
- package/vendor/agent-cli/dist/src/context/user-skill-context.d.ts +0 -15
- package/vendor/agent-cli/dist/src/context/user-skill-context.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/context/user-skill-context.js +0 -217
- package/vendor/agent-cli/dist/src/context/user-skill-context.js.map +0 -1
- package/vendor/agent-cli/dist/src/context/user-skill-install.d.ts +0 -54
- package/vendor/agent-cli/dist/src/context/user-skill-install.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/context/user-skill-install.js +0 -184
- package/vendor/agent-cli/dist/src/context/user-skill-install.js.map +0 -1
- package/vendor/agent-cli/dist/src/context/zip-extract.d.ts +0 -14
- package/vendor/agent-cli/dist/src/context/zip-extract.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/context/zip-extract.js +0 -130
- package/vendor/agent-cli/dist/src/context/zip-extract.js.map +0 -1
- package/vendor/agent-cli/dist/src/index.d.ts +0 -65
- package/vendor/agent-cli/dist/src/index.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/index.js +0 -91
- package/vendor/agent-cli/dist/src/index.js.map +0 -1
- package/vendor/agent-cli/dist/src/lifecycle/engine-hooks.d.ts +0 -68
- package/vendor/agent-cli/dist/src/lifecycle/engine-hooks.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/lifecycle/engine-hooks.js +0 -244
- package/vendor/agent-cli/dist/src/lifecycle/engine-hooks.js.map +0 -1
- package/vendor/agent-cli/dist/src/lifecycle/hook-command.d.ts +0 -40
- package/vendor/agent-cli/dist/src/lifecycle/hook-command.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/lifecycle/hook-command.js +0 -87
- package/vendor/agent-cli/dist/src/lifecycle/hook-command.js.map +0 -1
- package/vendor/agent-cli/dist/src/lifecycle/registry.d.ts +0 -134
- package/vendor/agent-cli/dist/src/lifecycle/registry.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/lifecycle/registry.js +0 -152
- package/vendor/agent-cli/dist/src/lifecycle/registry.js.map +0 -1
- package/vendor/agent-cli/dist/src/lifecycle/workspace-change.d.ts +0 -40
- package/vendor/agent-cli/dist/src/lifecycle/workspace-change.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/lifecycle/workspace-change.js +0 -149
- package/vendor/agent-cli/dist/src/lifecycle/workspace-change.js.map +0 -1
- package/vendor/agent-cli/dist/src/mcp/client.d.ts +0 -12
- package/vendor/agent-cli/dist/src/mcp/client.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/mcp/client.js +0 -95
- package/vendor/agent-cli/dist/src/mcp/client.js.map +0 -1
- package/vendor/agent-cli/dist/src/mcp/connection.d.ts +0 -14
- package/vendor/agent-cli/dist/src/mcp/connection.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/mcp/connection.js +0 -115
- package/vendor/agent-cli/dist/src/mcp/connection.js.map +0 -1
- package/vendor/agent-cli/dist/src/mcp/execute.d.ts +0 -5
- package/vendor/agent-cli/dist/src/mcp/execute.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/mcp/execute.js +0 -26
- package/vendor/agent-cli/dist/src/mcp/execute.js.map +0 -1
- package/vendor/agent-cli/dist/src/mcp/instance-lock.d.ts +0 -11
- package/vendor/agent-cli/dist/src/mcp/instance-lock.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/mcp/instance-lock.js +0 -51
- package/vendor/agent-cli/dist/src/mcp/instance-lock.js.map +0 -1
- package/vendor/agent-cli/dist/src/mcp/types.d.ts +0 -27
- package/vendor/agent-cli/dist/src/mcp/types.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/mcp/types.js +0 -2
- package/vendor/agent-cli/dist/src/mcp/types.js.map +0 -1
- package/vendor/agent-cli/dist/src/protocol/input.d.ts +0 -21
- package/vendor/agent-cli/dist/src/protocol/input.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/protocol/input.js +0 -95
- package/vendor/agent-cli/dist/src/protocol/input.js.map +0 -1
- package/vendor/agent-cli/dist/src/protocol/link/channel.d.ts +0 -58
- package/vendor/agent-cli/dist/src/protocol/link/channel.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/protocol/link/channel.js +0 -337
- package/vendor/agent-cli/dist/src/protocol/link/channel.js.map +0 -1
- package/vendor/agent-cli/dist/src/protocol/link/codec-json.d.ts +0 -13
- package/vendor/agent-cli/dist/src/protocol/link/codec-json.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/protocol/link/codec-json.js +0 -27
- package/vendor/agent-cli/dist/src/protocol/link/codec-json.js.map +0 -1
- package/vendor/agent-cli/dist/src/protocol/link/envelope.d.ts +0 -57
- package/vendor/agent-cli/dist/src/protocol/link/envelope.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/protocol/link/envelope.js +0 -93
- package/vendor/agent-cli/dist/src/protocol/link/envelope.js.map +0 -1
- package/vendor/agent-cli/dist/src/protocol/link/liveness.d.ts +0 -28
- package/vendor/agent-cli/dist/src/protocol/link/liveness.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/protocol/link/liveness.js +0 -86
- package/vendor/agent-cli/dist/src/protocol/link/liveness.js.map +0 -1
- package/vendor/agent-cli/dist/src/protocol/link/middleware.d.ts +0 -14
- package/vendor/agent-cli/dist/src/protocol/link/middleware.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/protocol/link/middleware.js +0 -40
- package/vendor/agent-cli/dist/src/protocol/link/middleware.js.map +0 -1
- package/vendor/agent-cli/dist/src/protocol/link/rpc.d.ts +0 -31
- package/vendor/agent-cli/dist/src/protocol/link/rpc.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/protocol/link/rpc.js +0 -90
- package/vendor/agent-cli/dist/src/protocol/link/rpc.js.map +0 -1
- package/vendor/agent-cli/dist/src/protocol/link/transport-ws.d.ts +0 -32
- package/vendor/agent-cli/dist/src/protocol/link/transport-ws.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/protocol/link/transport-ws.js +0 -106
- package/vendor/agent-cli/dist/src/protocol/link/transport-ws.js.map +0 -1
- package/vendor/agent-cli/dist/src/protocol/messages/errors.gen.d.ts +0 -533
- package/vendor/agent-cli/dist/src/protocol/messages/errors.gen.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/protocol/messages/errors.gen.js +0 -137
- package/vendor/agent-cli/dist/src/protocol/messages/errors.gen.js.map +0 -1
- package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.d.ts +0 -448
- package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.js +0 -133
- package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.js.map +0 -1
- package/vendor/agent-cli/dist/src/security/binary-read-receipts.d.ts +0 -9
- package/vendor/agent-cli/dist/src/security/binary-read-receipts.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/security/binary-read-receipts.js +0 -58
- package/vendor/agent-cli/dist/src/security/binary-read-receipts.js.map +0 -1
- package/vendor/agent-cli/dist/src/security/command-parse.d.ts +0 -21
- package/vendor/agent-cli/dist/src/security/command-parse.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/security/command-parse.js +0 -395
- package/vendor/agent-cli/dist/src/security/command-parse.js.map +0 -1
- package/vendor/agent-cli/dist/src/security/command-translate.d.ts +0 -30
- package/vendor/agent-cli/dist/src/security/command-translate.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/security/command-translate.js +0 -165
- package/vendor/agent-cli/dist/src/security/command-translate.js.map +0 -1
- package/vendor/agent-cli/dist/src/security/context-write-policy.d.ts +0 -18
- package/vendor/agent-cli/dist/src/security/context-write-policy.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/security/context-write-policy.js +0 -121
- package/vendor/agent-cli/dist/src/security/context-write-policy.js.map +0 -1
- package/vendor/agent-cli/dist/src/security/guard.d.ts +0 -45
- package/vendor/agent-cli/dist/src/security/guard.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/security/guard.js +0 -166
- package/vendor/agent-cli/dist/src/security/guard.js.map +0 -1
- package/vendor/agent-cli/dist/src/security/mount-table.d.ts +0 -56
- package/vendor/agent-cli/dist/src/security/mount-table.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/security/mount-table.js +0 -251
- package/vendor/agent-cli/dist/src/security/mount-table.js.map +0 -1
- package/vendor/agent-cli/dist/src/security/sandbox-path.d.ts +0 -23
- package/vendor/agent-cli/dist/src/security/sandbox-path.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/security/sandbox-path.js +0 -110
- package/vendor/agent-cli/dist/src/security/sandbox-path.js.map +0 -1
- package/vendor/agent-cli/dist/src/security/tool-run-owner.d.ts +0 -5
- package/vendor/agent-cli/dist/src/security/tool-run-owner.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/security/tool-run-owner.js +0 -16
- package/vendor/agent-cli/dist/src/security/tool-run-owner.js.map +0 -1
- package/vendor/agent-cli/dist/src/security/tool-scope.d.ts +0 -19
- package/vendor/agent-cli/dist/src/security/tool-scope.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/security/tool-scope.js +0 -122
- package/vendor/agent-cli/dist/src/security/tool-scope.js.map +0 -1
- package/vendor/agent-cli/dist/src/session/client.d.ts +0 -146
- package/vendor/agent-cli/dist/src/session/client.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/session/client.js +0 -410
- package/vendor/agent-cli/dist/src/session/client.js.map +0 -1
- package/vendor/agent-cli/dist/src/session/custom-context.d.ts +0 -6
- package/vendor/agent-cli/dist/src/session/custom-context.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/session/custom-context.js +0 -106
- package/vendor/agent-cli/dist/src/session/custom-context.js.map +0 -1
- package/vendor/agent-cli/dist/src/session/engine-decide.d.ts +0 -38
- package/vendor/agent-cli/dist/src/session/engine-decide.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/session/engine-decide.js +0 -87
- package/vendor/agent-cli/dist/src/session/engine-decide.js.map +0 -1
- package/vendor/agent-cli/dist/src/session/execution-recovery.d.ts +0 -9
- package/vendor/agent-cli/dist/src/session/execution-recovery.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/session/execution-recovery.js +0 -49
- package/vendor/agent-cli/dist/src/session/execution-recovery.js.map +0 -1
- package/vendor/agent-cli/dist/src/session/execution-settlement.d.ts +0 -4
- package/vendor/agent-cli/dist/src/session/execution-settlement.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/session/execution-settlement.js +0 -15
- package/vendor/agent-cli/dist/src/session/execution-settlement.js.map +0 -1
- package/vendor/agent-cli/dist/src/session/expert-definition.d.ts +0 -4
- package/vendor/agent-cli/dist/src/session/expert-definition.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/session/expert-definition.js +0 -20
- package/vendor/agent-cli/dist/src/session/expert-definition.js.map +0 -1
- package/vendor/agent-cli/dist/src/session/link-config.d.ts +0 -13
- package/vendor/agent-cli/dist/src/session/link-config.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/session/link-config.js +0 -29
- package/vendor/agent-cli/dist/src/session/link-config.js.map +0 -1
- package/vendor/agent-cli/dist/src/session/link-outcome.d.ts +0 -30
- package/vendor/agent-cli/dist/src/session/link-outcome.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/session/link-outcome.js +0 -67
- package/vendor/agent-cli/dist/src/session/link-outcome.js.map +0 -1
- package/vendor/agent-cli/dist/src/session/link-session.d.ts +0 -80
- package/vendor/agent-cli/dist/src/session/link-session.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/session/link-session.js +0 -445
- package/vendor/agent-cli/dist/src/session/link-session.js.map +0 -1
- package/vendor/agent-cli/dist/src/session/local-execution.d.ts +0 -28
- package/vendor/agent-cli/dist/src/session/local-execution.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/session/local-execution.js +0 -119
- package/vendor/agent-cli/dist/src/session/local-execution.js.map +0 -1
- package/vendor/agent-cli/dist/src/session/member-tools.d.ts +0 -22
- package/vendor/agent-cli/dist/src/session/member-tools.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/session/member-tools.js +0 -72
- package/vendor/agent-cli/dist/src/session/member-tools.js.map +0 -1
- package/vendor/agent-cli/dist/src/session/process-artifact-publisher.d.ts +0 -7
- package/vendor/agent-cli/dist/src/session/process-artifact-publisher.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/session/process-artifact-publisher.js +0 -30
- package/vendor/agent-cli/dist/src/session/process-artifact-publisher.js.map +0 -1
- package/vendor/agent-cli/dist/src/session/process-environment.d.ts +0 -3
- package/vendor/agent-cli/dist/src/session/process-environment.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/session/process-environment.js +0 -33
- package/vendor/agent-cli/dist/src/session/process-environment.js.map +0 -1
- package/vendor/agent-cli/dist/src/session/process-lifecycle.d.ts +0 -5
- package/vendor/agent-cli/dist/src/session/process-lifecycle.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/session/process-lifecycle.js +0 -18
- package/vendor/agent-cli/dist/src/session/process-lifecycle.js.map +0 -1
- package/vendor/agent-cli/dist/src/session/process-observability.d.ts +0 -7
- package/vendor/agent-cli/dist/src/session/process-observability.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/session/process-observability.js +0 -25
- package/vendor/agent-cli/dist/src/session/process-observability.js.map +0 -1
- package/vendor/agent-cli/dist/src/session/process-request.d.ts +0 -38
- package/vendor/agent-cli/dist/src/session/process-request.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/session/process-request.js +0 -491
- package/vendor/agent-cli/dist/src/session/process-request.js.map +0 -1
- package/vendor/agent-cli/dist/src/session/process-restore.d.ts +0 -4
- package/vendor/agent-cli/dist/src/session/process-restore.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/session/process-restore.js +0 -21
- package/vendor/agent-cli/dist/src/session/process-restore.js.map +0 -1
- package/vendor/agent-cli/dist/src/session/process-summary-output.d.ts +0 -15
- package/vendor/agent-cli/dist/src/session/process-summary-output.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/session/process-summary-output.js +0 -46
- package/vendor/agent-cli/dist/src/session/process-summary-output.js.map +0 -1
- package/vendor/agent-cli/dist/src/session/process-workspace.d.ts +0 -3
- package/vendor/agent-cli/dist/src/session/process-workspace.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/session/process-workspace.js +0 -21
- package/vendor/agent-cli/dist/src/session/process-workspace.js.map +0 -1
- package/vendor/agent-cli/dist/src/session/reference-tools.d.ts +0 -8
- package/vendor/agent-cli/dist/src/session/reference-tools.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/session/reference-tools.js +0 -35
- package/vendor/agent-cli/dist/src/session/reference-tools.js.map +0 -1
- package/vendor/agent-cli/dist/src/session/run-events.d.ts +0 -81
- package/vendor/agent-cli/dist/src/session/run-events.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/session/run-events.js +0 -160
- package/vendor/agent-cli/dist/src/session/run-events.js.map +0 -1
- package/vendor/agent-cli/dist/src/session/run-setup.d.ts +0 -78
- package/vendor/agent-cli/dist/src/session/run-setup.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/session/run-setup.js +0 -294
- package/vendor/agent-cli/dist/src/session/run-setup.js.map +0 -1
- package/vendor/agent-cli/dist/src/session/run-start-body.d.ts +0 -48
- package/vendor/agent-cli/dist/src/session/run-start-body.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/session/run-start-body.js +0 -82
- package/vendor/agent-cli/dist/src/session/run-start-body.js.map +0 -1
- package/vendor/agent-cli/dist/src/session/run-steer.d.ts +0 -42
- package/vendor/agent-cli/dist/src/session/run-steer.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/session/run-steer.js +0 -205
- package/vendor/agent-cli/dist/src/session/run-steer.js.map +0 -1
- package/vendor/agent-cli/dist/src/session/team-persistence.d.ts +0 -17
- package/vendor/agent-cli/dist/src/session/team-persistence.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/session/team-persistence.js +0 -75
- package/vendor/agent-cli/dist/src/session/team-persistence.js.map +0 -1
- package/vendor/agent-cli/dist/src/session/tool-scheduler.d.ts +0 -37
- package/vendor/agent-cli/dist/src/session/tool-scheduler.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/session/tool-scheduler.js +0 -242
- package/vendor/agent-cli/dist/src/session/tool-scheduler.js.map +0 -1
- package/vendor/agent-cli/dist/src/session/user-choice-policy.d.ts +0 -25
- package/vendor/agent-cli/dist/src/session/user-choice-policy.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/session/user-choice-policy.js +0 -70
- package/vendor/agent-cli/dist/src/session/user-choice-policy.js.map +0 -1
- package/vendor/agent-cli/dist/src/session/user-choice.d.ts +0 -6
- package/vendor/agent-cli/dist/src/session/user-choice.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/session/user-choice.js +0 -101
- package/vendor/agent-cli/dist/src/session/user-choice.js.map +0 -1
- package/vendor/agent-cli/dist/src/session/user-skill-compatibility.d.ts +0 -4
- package/vendor/agent-cli/dist/src/session/user-skill-compatibility.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/session/user-skill-compatibility.js +0 -25
- package/vendor/agent-cli/dist/src/session/user-skill-compatibility.js.map +0 -1
- package/vendor/agent-cli/dist/src/session/user-skill-loaded.d.ts +0 -31
- package/vendor/agent-cli/dist/src/session/user-skill-loaded.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/session/user-skill-loaded.js +0 -105
- package/vendor/agent-cli/dist/src/session/user-skill-loaded.js.map +0 -1
- package/vendor/agent-cli/dist/src/session/user-skill-prompt.d.ts +0 -4
- package/vendor/agent-cli/dist/src/session/user-skill-prompt.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/session/user-skill-prompt.js +0 -15
- package/vendor/agent-cli/dist/src/session/user-skill-prompt.js.map +0 -1
- package/vendor/agent-cli/dist/src/shared/app-id.d.ts +0 -13
- package/vendor/agent-cli/dist/src/shared/app-id.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/shared/app-id.js +0 -25
- package/vendor/agent-cli/dist/src/shared/app-id.js.map +0 -1
- package/vendor/agent-cli/dist/src/shared/auth-headers.d.ts +0 -13
- package/vendor/agent-cli/dist/src/shared/auth-headers.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/shared/auth-headers.js +0 -16
- package/vendor/agent-cli/dist/src/shared/auth-headers.js.map +0 -1
- package/vendor/agent-cli/dist/src/shared/cli-version.d.ts +0 -3
- package/vendor/agent-cli/dist/src/shared/cli-version.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/shared/cli-version.js +0 -22
- package/vendor/agent-cli/dist/src/shared/cli-version.js.map +0 -1
- package/vendor/agent-cli/dist/src/shared/error-detail.d.ts +0 -14
- package/vendor/agent-cli/dist/src/shared/error-detail.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/shared/error-detail.js +0 -29
- package/vendor/agent-cli/dist/src/shared/error-detail.js.map +0 -1
- package/vendor/agent-cli/dist/src/shared/output-guard.d.ts +0 -36
- package/vendor/agent-cli/dist/src/shared/output-guard.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/shared/output-guard.js +0 -94
- package/vendor/agent-cli/dist/src/shared/output-guard.js.map +0 -1
- package/vendor/agent-cli/dist/src/shared/process-cwd.d.ts +0 -3
- package/vendor/agent-cli/dist/src/shared/process-cwd.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/shared/process-cwd.js +0 -11
- package/vendor/agent-cli/dist/src/shared/process-cwd.js.map +0 -1
- package/vendor/agent-cli/dist/src/shared/process-types.d.ts +0 -60
- package/vendor/agent-cli/dist/src/shared/process-types.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/shared/process-types.js +0 -10
- package/vendor/agent-cli/dist/src/shared/process-types.js.map +0 -1
- package/vendor/agent-cli/dist/src/shared/replace-file.d.ts +0 -3
- package/vendor/agent-cli/dist/src/shared/replace-file.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/shared/replace-file.js +0 -34
- package/vendor/agent-cli/dist/src/shared/replace-file.js.map +0 -1
- package/vendor/agent-cli/dist/src/shared/server-headers.d.ts +0 -7
- package/vendor/agent-cli/dist/src/shared/server-headers.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/shared/server-headers.js +0 -113
- package/vendor/agent-cli/dist/src/shared/server-headers.js.map +0 -1
- package/vendor/agent-cli/dist/src/shared/shell-runtime.d.ts +0 -47
- package/vendor/agent-cli/dist/src/shared/shell-runtime.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/shared/shell-runtime.js +0 -210
- package/vendor/agent-cli/dist/src/shared/shell-runtime.js.map +0 -1
- package/vendor/agent-cli/dist/src/shared/types.d.ts +0 -519
- package/vendor/agent-cli/dist/src/shared/types.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/shared/types.js +0 -2
- package/vendor/agent-cli/dist/src/shared/types.js.map +0 -1
- package/vendor/agent-cli/dist/src/shared/user-choice.d.ts +0 -41
- package/vendor/agent-cli/dist/src/shared/user-choice.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/shared/user-choice.js +0 -2
- package/vendor/agent-cli/dist/src/shared/user-choice.js.map +0 -1
- package/vendor/agent-cli/dist/src/tools/artifact-publisher.d.ts +0 -9
- package/vendor/agent-cli/dist/src/tools/artifact-publisher.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/tools/artifact-publisher.js +0 -85
- package/vendor/agent-cli/dist/src/tools/artifact-publisher.js.map +0 -1
- package/vendor/agent-cli/dist/src/tools/command-executor.d.ts +0 -33
- package/vendor/agent-cli/dist/src/tools/command-executor.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/tools/command-executor.js +0 -133
- package/vendor/agent-cli/dist/src/tools/command-executor.js.map +0 -1
- package/vendor/agent-cli/dist/src/tools/context-program-publish.d.ts +0 -16
- package/vendor/agent-cli/dist/src/tools/context-program-publish.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/tools/context-program-publish.js +0 -104
- package/vendor/agent-cli/dist/src/tools/context-program-publish.js.map +0 -1
- package/vendor/agent-cli/dist/src/tools/context-program-receipt.d.ts +0 -21
- package/vendor/agent-cli/dist/src/tools/context-program-receipt.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/tools/context-program-receipt.js +0 -102
- package/vendor/agent-cli/dist/src/tools/context-program-receipt.js.map +0 -1
- package/vendor/agent-cli/dist/src/tools/context-program.d.ts +0 -21
- package/vendor/agent-cli/dist/src/tools/context-program.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/tools/context-program.js +0 -236
- package/vendor/agent-cli/dist/src/tools/context-program.js.map +0 -1
- package/vendor/agent-cli/dist/src/tools/file-ops.d.ts +0 -52
- package/vendor/agent-cli/dist/src/tools/file-ops.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/tools/file-ops.js +0 -403
- package/vendor/agent-cli/dist/src/tools/file-ops.js.map +0 -1
- package/vendor/agent-cli/dist/src/tools/file-search.d.ts +0 -29
- package/vendor/agent-cli/dist/src/tools/file-search.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/tools/file-search.js +0 -98
- package/vendor/agent-cli/dist/src/tools/file-search.js.map +0 -1
- package/vendor/agent-cli/dist/src/tools/file-stat.d.ts +0 -9
- package/vendor/agent-cli/dist/src/tools/file-stat.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/tools/file-stat.js +0 -29
- package/vendor/agent-cli/dist/src/tools/file-stat.js.map +0 -1
- package/vendor/agent-cli/dist/src/tools/local-hands.d.ts +0 -58
- package/vendor/agent-cli/dist/src/tools/local-hands.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/tools/local-hands.js +0 -330
- package/vendor/agent-cli/dist/src/tools/local-hands.js.map +0 -1
- package/vendor/agent-cli/dist/src/tools/ripgrep-search.d.ts +0 -24
- package/vendor/agent-cli/dist/src/tools/ripgrep-search.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/tools/ripgrep-search.js +0 -160
- package/vendor/agent-cli/dist/src/tools/ripgrep-search.js.map +0 -1
- package/vendor/agent-cli/dist/src/tools/tool-contract.gen.d.ts +0 -69
- package/vendor/agent-cli/dist/src/tools/tool-contract.gen.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/tools/tool-contract.gen.js +0 -68
- package/vendor/agent-cli/dist/src/tools/tool-contract.gen.js.map +0 -1
- package/vendor/agent-cli/dist/src/tools/tool-timeout.d.ts +0 -29
- package/vendor/agent-cli/dist/src/tools/tool-timeout.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/tools/tool-timeout.js +0 -88
- package/vendor/agent-cli/dist/src/tools/tool-timeout.js.map +0 -1
- package/vendor/agent-cli/dist/src/tools/write-guard.d.ts +0 -42
- package/vendor/agent-cli/dist/src/tools/write-guard.d.ts.map +0 -1
- package/vendor/agent-cli/dist/src/tools/write-guard.js +0 -34
- package/vendor/agent-cli/dist/src/tools/write-guard.js.map +0 -1
- package/vendor/agent-cli/package.json +0 -29
|
@@ -1,337 +0,0 @@
|
|
|
1
|
-
import { ErrProtocolInvalid, ErrUnsupportedMessage, ErrCLIExecutionFailed } from '../messages/errors.gen.js';
|
|
2
|
-
/**
|
|
3
|
-
* agent-cli 协议通用链路:seq、心跳、Middleware、分派与 RPC(不承载 run/tool 业务语义)。
|
|
4
|
-
*/
|
|
5
|
-
import { REGISTRY } from '../messages/messages.gen.js';
|
|
6
|
-
import { JsonCodec } from './codec-json.js';
|
|
7
|
-
import { CodecError, FrameTooLargeError, LinkError, isKnownMessageType, validateEnvelopeShell, } from './envelope.js';
|
|
8
|
-
import { Liveness } from './liveness.js';
|
|
9
|
-
import { applyInboundMiddlewares, applyOutboundMiddlewares } from './middleware.js';
|
|
10
|
-
import { RpcState, callerCancelledError, connectionClosedError, deadlineExceededError, } from './rpc.js';
|
|
11
|
-
const CLOSE_CODE_PROTOCOL = 4400;
|
|
12
|
-
const CLOSE_CODE_HEARTBEAT = 4408;
|
|
13
|
-
export class Channel {
|
|
14
|
-
closed;
|
|
15
|
-
conn;
|
|
16
|
-
codec;
|
|
17
|
-
middlewares;
|
|
18
|
-
handlers = new Map();
|
|
19
|
-
rpc = new RpcState();
|
|
20
|
-
liveness;
|
|
21
|
-
onUnknownEvent;
|
|
22
|
-
warn;
|
|
23
|
-
peerMaxFrameBytes;
|
|
24
|
-
seq = 0;
|
|
25
|
-
closeReason;
|
|
26
|
-
resolveClosed;
|
|
27
|
-
constructor(conn, options) {
|
|
28
|
-
this.conn = conn;
|
|
29
|
-
this.codec = options.codec ?? new JsonCodec();
|
|
30
|
-
this.middlewares = options.middlewares ?? [];
|
|
31
|
-
this.onUnknownEvent = options.onUnknownEvent;
|
|
32
|
-
this.warn = options.warn ?? (() => undefined);
|
|
33
|
-
this.peerMaxFrameBytes = options.peerMaxFrameBytes;
|
|
34
|
-
this.closed = new Promise((resolve) => {
|
|
35
|
-
this.resolveClosed = resolve;
|
|
36
|
-
});
|
|
37
|
-
this.liveness = new Liveness({
|
|
38
|
-
onPing: () => {
|
|
39
|
-
void this.sendEnvelope(this.buildEnvelope({ kind: 'event', type: 'link.ping', body: {} })).catch(() => undefined);
|
|
40
|
-
},
|
|
41
|
-
onDead: () => this.close(CLOSE_CODE_HEARTBEAT, 'heartbeat timeout'),
|
|
42
|
-
}, options.limits);
|
|
43
|
-
conn.onMessage((data) => this.handleRawMessage(data));
|
|
44
|
-
conn.onClose((code, reason) => {
|
|
45
|
-
this.finishClose({ code, reason, by: 'remote' });
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
handle(kind, type, handler) {
|
|
49
|
-
this.handlers.set(`${kind}:${type}`, handler);
|
|
50
|
-
return this;
|
|
51
|
-
}
|
|
52
|
-
emit(type, body, run) {
|
|
53
|
-
const entry = isKnownMessageType(type) ? REGISTRY[type] : undefined;
|
|
54
|
-
if (!entry || entry.kind !== 'event') {
|
|
55
|
-
throw new Error(`emit 需要已注册的 event 类型:${type}`);
|
|
56
|
-
}
|
|
57
|
-
void this.sendEnvelope(this.buildEnvelope({ kind: 'event', type, body: asBody(body), run }));
|
|
58
|
-
}
|
|
59
|
-
call(type, body, opts = {}) {
|
|
60
|
-
const entry = isKnownMessageType(type) ? REGISTRY[type] : undefined;
|
|
61
|
-
if (!entry || entry.kind !== 'request') {
|
|
62
|
-
return Promise.reject(new Error(`call 需要已注册的 request 类型:${type}`));
|
|
63
|
-
}
|
|
64
|
-
const id = this.rpc.allocClientRequestId();
|
|
65
|
-
const env = this.buildEnvelope({
|
|
66
|
-
kind: 'request',
|
|
67
|
-
type,
|
|
68
|
-
id,
|
|
69
|
-
body: asBody(body),
|
|
70
|
-
run: opts.run,
|
|
71
|
-
deadline_ms: opts.deadlineMs,
|
|
72
|
-
});
|
|
73
|
-
return new Promise((resolve, reject) => {
|
|
74
|
-
const cleanups = [];
|
|
75
|
-
const cleanup = () => {
|
|
76
|
-
for (const fn of cleanups) {
|
|
77
|
-
fn();
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
if (opts.deadlineMs !== undefined && opts.deadlineMs > 0) {
|
|
81
|
-
const timer = setTimeout(() => {
|
|
82
|
-
this.emitCancel(id, 'deadline');
|
|
83
|
-
this.rpc.rejectOutbound(id, deadlineExceededError(type, opts.deadlineMs));
|
|
84
|
-
}, opts.deadlineMs);
|
|
85
|
-
cleanups.push(() => clearTimeout(timer));
|
|
86
|
-
}
|
|
87
|
-
const onAbort = () => {
|
|
88
|
-
this.emitCancel(id, 'caller_cancelled');
|
|
89
|
-
this.rpc.rejectOutbound(id, callerCancelledError());
|
|
90
|
-
};
|
|
91
|
-
if (opts.signal) {
|
|
92
|
-
if (opts.signal.aborted) {
|
|
93
|
-
onAbort();
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
opts.signal.addEventListener('abort', onAbort, { once: true });
|
|
97
|
-
cleanups.push(() => opts.signal?.removeEventListener('abort', onAbort));
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
this.rpc.registerOutboundCall(id, resolve, reject, cleanup);
|
|
101
|
-
void this.sendEnvelope(env).catch((err) => {
|
|
102
|
-
cleanup();
|
|
103
|
-
this.rpc.rejectOutbound(id, err);
|
|
104
|
-
});
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
setLimits(limits) {
|
|
108
|
-
this.liveness.setLimits(limits);
|
|
109
|
-
}
|
|
110
|
-
setPeerMaxFrameBytes(bytes) {
|
|
111
|
-
this.peerMaxFrameBytes = bytes;
|
|
112
|
-
}
|
|
113
|
-
close(code, reason) {
|
|
114
|
-
if (this.closeReason) {
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
this.finishClose({ code, reason, by: 'local' });
|
|
118
|
-
this.conn.close(code, reason);
|
|
119
|
-
}
|
|
120
|
-
buildEnvelope(parts) {
|
|
121
|
-
const env = {
|
|
122
|
-
v: 1,
|
|
123
|
-
kind: parts.kind,
|
|
124
|
-
type: parts.type,
|
|
125
|
-
seq: this.nextSeq(),
|
|
126
|
-
ts: Date.now(),
|
|
127
|
-
body: parts.body,
|
|
128
|
-
};
|
|
129
|
-
if (parts.id) {
|
|
130
|
-
env.id = parts.id;
|
|
131
|
-
}
|
|
132
|
-
if (parts.re) {
|
|
133
|
-
env.re = parts.re;
|
|
134
|
-
}
|
|
135
|
-
if (parts.run) {
|
|
136
|
-
env.run = parts.run;
|
|
137
|
-
}
|
|
138
|
-
if (parts.deadline_ms !== undefined) {
|
|
139
|
-
env.deadline_ms = parts.deadline_ms;
|
|
140
|
-
}
|
|
141
|
-
if (parts.error) {
|
|
142
|
-
env.error = parts.error;
|
|
143
|
-
}
|
|
144
|
-
return env;
|
|
145
|
-
}
|
|
146
|
-
nextSeq() {
|
|
147
|
-
this.seq += 1;
|
|
148
|
-
return this.seq;
|
|
149
|
-
}
|
|
150
|
-
async sendEnvelope(env) {
|
|
151
|
-
if (this.closeReason) {
|
|
152
|
-
throw connectionClosedError(this.closeReason.code, this.closeReason.reason);
|
|
153
|
-
}
|
|
154
|
-
const outbound = applyOutboundMiddlewares(env, this.middlewares);
|
|
155
|
-
if (!outbound) {
|
|
156
|
-
return;
|
|
157
|
-
}
|
|
158
|
-
const json = this.codec.encode(outbound);
|
|
159
|
-
const bytes = Buffer.byteLength(json, 'utf8');
|
|
160
|
-
if (bytes > this.peerMaxFrameBytes) {
|
|
161
|
-
throw new FrameTooLargeError(bytes, this.peerMaxFrameBytes);
|
|
162
|
-
}
|
|
163
|
-
await this.conn.send(json);
|
|
164
|
-
this.liveness.onSent();
|
|
165
|
-
}
|
|
166
|
-
emitCancel(id, reason) {
|
|
167
|
-
void this.sendEnvelope(this.buildEnvelope({
|
|
168
|
-
kind: 'event',
|
|
169
|
-
type: 'link.cancel',
|
|
170
|
-
body: { id, reason },
|
|
171
|
-
})).catch(() => undefined);
|
|
172
|
-
}
|
|
173
|
-
handleRawMessage(data) {
|
|
174
|
-
if (this.closeReason) {
|
|
175
|
-
return;
|
|
176
|
-
}
|
|
177
|
-
let env;
|
|
178
|
-
try {
|
|
179
|
-
env = this.codec.decode(data);
|
|
180
|
-
}
|
|
181
|
-
catch (err) {
|
|
182
|
-
if (err instanceof CodecError) {
|
|
183
|
-
this.close(CLOSE_CODE_PROTOCOL, err.message);
|
|
184
|
-
return;
|
|
185
|
-
}
|
|
186
|
-
this.close(CLOSE_CODE_PROTOCOL, 'decode failed');
|
|
187
|
-
return;
|
|
188
|
-
}
|
|
189
|
-
const inbound = applyInboundMiddlewares(env, this.middlewares);
|
|
190
|
-
if (!inbound) {
|
|
191
|
-
return;
|
|
192
|
-
}
|
|
193
|
-
this.liveness.onReceived();
|
|
194
|
-
void this.dispatch(inbound);
|
|
195
|
-
}
|
|
196
|
-
async dispatch(env) {
|
|
197
|
-
if (env.kind === 'response') {
|
|
198
|
-
if (!this.rpc.settleOutboundResponse(env)) {
|
|
199
|
-
this.warn(`丢弃未知或过期 response re=${env.re ?? ''}`);
|
|
200
|
-
}
|
|
201
|
-
return;
|
|
202
|
-
}
|
|
203
|
-
if (env.type === 'link.cancel' && env.kind === 'event') {
|
|
204
|
-
const body = env.body;
|
|
205
|
-
const id = body.id;
|
|
206
|
-
const reason = typeof body.reason === 'string' ? body.reason : undefined;
|
|
207
|
-
if (typeof id === 'string') {
|
|
208
|
-
this.rpc.cancelInbound(id, reason);
|
|
209
|
-
}
|
|
210
|
-
return;
|
|
211
|
-
}
|
|
212
|
-
if (env.type === 'link.ping' && env.kind === 'event') {
|
|
213
|
-
return;
|
|
214
|
-
}
|
|
215
|
-
const shellErr = validateEnvelopeShell(env);
|
|
216
|
-
if (shellErr) {
|
|
217
|
-
if (env.kind === 'event') {
|
|
218
|
-
this.warn(`丢弃字段不合规的 event:${shellErr}`);
|
|
219
|
-
return;
|
|
220
|
-
}
|
|
221
|
-
if (env.kind === 'request' && env.id) {
|
|
222
|
-
await this.respondError(env, new LinkError(ErrProtocolInvalid, shellErr));
|
|
223
|
-
}
|
|
224
|
-
return;
|
|
225
|
-
}
|
|
226
|
-
if (!isKnownMessageType(env.type)) {
|
|
227
|
-
if (env.kind === 'event') {
|
|
228
|
-
this.onUnknownEvent?.(env);
|
|
229
|
-
return;
|
|
230
|
-
}
|
|
231
|
-
if (env.kind === 'request' && env.id) {
|
|
232
|
-
await this.respondError(env, new LinkError(ErrUnsupportedMessage, env.type));
|
|
233
|
-
}
|
|
234
|
-
return;
|
|
235
|
-
}
|
|
236
|
-
if (env.kind === 'event') {
|
|
237
|
-
const handler = this.handlers.get(`event:${env.type}`);
|
|
238
|
-
if (!handler) {
|
|
239
|
-
this.onUnknownEvent?.(env);
|
|
240
|
-
return;
|
|
241
|
-
}
|
|
242
|
-
void this.runEventHandler(handler, env);
|
|
243
|
-
return;
|
|
244
|
-
}
|
|
245
|
-
if (env.kind === 'request' && env.id) {
|
|
246
|
-
const handler = this.handlers.get(`request:${env.type}`);
|
|
247
|
-
if (!handler) {
|
|
248
|
-
await this.respondError(env, new LinkError(ErrUnsupportedMessage, env.type));
|
|
249
|
-
return;
|
|
250
|
-
}
|
|
251
|
-
void this.runRequestHandler(handler, env);
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
runEventHandler(handler, env) {
|
|
255
|
-
void (async () => {
|
|
256
|
-
try {
|
|
257
|
-
await handler(env, { signal: new AbortController().signal });
|
|
258
|
-
}
|
|
259
|
-
catch {
|
|
260
|
-
// event 处理失败不断连
|
|
261
|
-
}
|
|
262
|
-
})();
|
|
263
|
-
}
|
|
264
|
-
runRequestHandler(handler, env) {
|
|
265
|
-
const id = env.id;
|
|
266
|
-
const abort = this.rpc.registerInboundRequest(id);
|
|
267
|
-
void (async () => {
|
|
268
|
-
let body = {};
|
|
269
|
-
let error;
|
|
270
|
-
try {
|
|
271
|
-
body = asBody(await handler(env, { signal: abort.signal }));
|
|
272
|
-
}
|
|
273
|
-
catch (err) {
|
|
274
|
-
error = err instanceof LinkError ? err : new LinkError(ErrCLIExecutionFailed, err);
|
|
275
|
-
}
|
|
276
|
-
try {
|
|
277
|
-
if (this.rpc.isInboundCancelled(id) || !this.rpc.markInboundResponded(id)) {
|
|
278
|
-
return;
|
|
279
|
-
}
|
|
280
|
-
await this.sendResponse(env, body, error);
|
|
281
|
-
}
|
|
282
|
-
catch (err) {
|
|
283
|
-
this.warn(`response re=${id} 发送失败:${String(err)}`);
|
|
284
|
-
}
|
|
285
|
-
finally {
|
|
286
|
-
this.rpc.finishInbound(id);
|
|
287
|
-
}
|
|
288
|
-
})();
|
|
289
|
-
}
|
|
290
|
-
/** 正常应答超过对端上限时改回 link.too_large:什么都不发,对端只能干等到 deadline。 */
|
|
291
|
-
async sendResponse(req, body, error) {
|
|
292
|
-
const build = (b, e) => this.buildEnvelope({ kind: 'response', type: req.type, re: req.id, run: req.run, body: b, error: e });
|
|
293
|
-
try {
|
|
294
|
-
await this.sendEnvelope(build(body, error));
|
|
295
|
-
}
|
|
296
|
-
catch (err) {
|
|
297
|
-
if (!(err instanceof FrameTooLargeError) || error) {
|
|
298
|
-
throw err;
|
|
299
|
-
}
|
|
300
|
-
await this.sendEnvelope(build({}, err));
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
async respondError(req, error) {
|
|
304
|
-
if (!req.id) {
|
|
305
|
-
return;
|
|
306
|
-
}
|
|
307
|
-
await this.sendEnvelope(this.buildEnvelope({
|
|
308
|
-
kind: 'response',
|
|
309
|
-
type: req.type,
|
|
310
|
-
re: req.id,
|
|
311
|
-
run: req.run,
|
|
312
|
-
body: {},
|
|
313
|
-
error,
|
|
314
|
-
}));
|
|
315
|
-
}
|
|
316
|
-
finishClose(reason) {
|
|
317
|
-
if (this.closeReason) {
|
|
318
|
-
return;
|
|
319
|
-
}
|
|
320
|
-
this.closeReason = reason;
|
|
321
|
-
this.liveness.dispose();
|
|
322
|
-
const err = connectionClosedError(reason.code, reason.reason);
|
|
323
|
-
this.rpc.rejectAllOutbound(err);
|
|
324
|
-
this.rpc.abortAllInbound();
|
|
325
|
-
this.resolveClosed(reason);
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
function asBody(body) {
|
|
329
|
-
if (body === null || body === undefined) {
|
|
330
|
-
return {};
|
|
331
|
-
}
|
|
332
|
-
if (typeof body === 'object' && !Array.isArray(body)) {
|
|
333
|
-
return body;
|
|
334
|
-
}
|
|
335
|
-
return { value: body };
|
|
336
|
-
}
|
|
337
|
-
//# sourceMappingURL=channel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"channel.js","sourceRoot":"","sources":["../../../../src/protocol/link/channel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAC7G;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAGL,UAAU,EACV,kBAAkB,EAClB,SAAS,EAET,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,uBAAuB,EAAE,wBAAwB,EAAmB,MAAM,iBAAiB,CAAC;AACrG,OAAO,EACL,QAAQ,EACR,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,UAAU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,SAAS,EAAE,CAAC;QACxC,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QACrD,OAAO,IAA+B,CAAC;IACzC,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AACzB,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* v1 信封 JSON 编解码。
|
|
3
|
-
*/
|
|
4
|
-
import type { Envelope } from './envelope.js';
|
|
5
|
-
export interface Codec {
|
|
6
|
-
encode(env: Envelope): string;
|
|
7
|
-
decode(data: string): Envelope;
|
|
8
|
-
}
|
|
9
|
-
export declare class JsonCodec implements Codec {
|
|
10
|
-
encode(env: Envelope): string;
|
|
11
|
-
decode(data: string): Envelope;
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=codec-json.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codec-json.d.ts","sourceRoot":"","sources":["../../../../src/protocol/link/codec-json.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG9C,MAAM,WAAW,KAAK;IACpB,MAAM,CAAC,GAAG,EAAE,QAAQ,GAAG,MAAM,CAAC;IAC9B,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,CAAC;CAChC;AAED,qBAAa,SAAU,YAAW,KAAK;IAC9B,MAAM,CAAC,GAAG,EAAE,QAAQ,GAAG,MAAM;IAI7B,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ;CAgBtC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* v1 信封 JSON 编解码。
|
|
3
|
-
*/
|
|
4
|
-
import { CodecError } from './envelope.js';
|
|
5
|
-
export class JsonCodec {
|
|
6
|
-
encode(env) {
|
|
7
|
-
return JSON.stringify(env);
|
|
8
|
-
}
|
|
9
|
-
decode(data) {
|
|
10
|
-
let parsed;
|
|
11
|
-
try {
|
|
12
|
-
parsed = JSON.parse(data);
|
|
13
|
-
}
|
|
14
|
-
catch {
|
|
15
|
-
throw new CodecError('json_parse');
|
|
16
|
-
}
|
|
17
|
-
if (typeof parsed !== 'object' || parsed === null) {
|
|
18
|
-
throw new CodecError('json_parse');
|
|
19
|
-
}
|
|
20
|
-
const env = parsed;
|
|
21
|
-
if (env.v !== 1) {
|
|
22
|
-
throw new CodecError('bad_version');
|
|
23
|
-
}
|
|
24
|
-
return env;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=codec-json.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codec-json.js","sourceRoot":"","sources":["../../../../src/protocol/link/codec-json.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAO3C,MAAM,OAAO,SAAS;IACb,MAAM,CAAC,GAAa;QACzB,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAC7B,CAAC;IAEM,MAAM,CAAC,IAAY;QACxB,IAAI,MAAe,CAAC;QACpB,IAAI,CAAC;YACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC;QAAC,MAAM,CAAC;YACP,MAAM,IAAI,UAAU,CAAC,YAAY,CAAC,CAAC;QACrC,CAAC;QACD,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;YAClD,MAAM,IAAI,UAAU,CAAC,YAAY,CAAC,CAAC;QACrC,CAAC;QACD,MAAM,GAAG,GAAG,MAAkB,CAAC;QAC/B,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC;YAChB,MAAM,IAAI,UAAU,CAAC,aAAa,CAAC,CAAC;QACtC,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC;CACF"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* agent-cli 协议信封类型、关闭原因与链路层可识别错误。
|
|
3
|
-
* 形状与 spec/agent-cli/v1/envelope.json 一致;业务 body 类型见 messages.gen.ts。
|
|
4
|
-
*/
|
|
5
|
-
import type { ErrorBody, Kind, Limits, MessageType } from '../messages/messages.gen.js';
|
|
6
|
-
/** 线上信封(01 §2) */
|
|
7
|
-
export interface Envelope {
|
|
8
|
-
v: number;
|
|
9
|
-
kind: Kind;
|
|
10
|
-
type: string;
|
|
11
|
-
id?: string;
|
|
12
|
-
re?: string;
|
|
13
|
-
run?: string;
|
|
14
|
-
seq: number;
|
|
15
|
-
ack?: number;
|
|
16
|
-
ts: number;
|
|
17
|
-
deadline_ms?: number;
|
|
18
|
-
trace?: string;
|
|
19
|
-
body: Record<string, unknown>;
|
|
20
|
-
error?: ErrorBody;
|
|
21
|
-
}
|
|
22
|
-
export type CloseBy = 'local' | 'remote';
|
|
23
|
-
/** 连接关闭原因:恰好产生一次,只 resolve 不 reject */
|
|
24
|
-
export interface CloseReason {
|
|
25
|
-
code: number;
|
|
26
|
-
reason: string;
|
|
27
|
-
error?: unknown;
|
|
28
|
-
by: CloseBy;
|
|
29
|
-
}
|
|
30
|
-
/** 统一错误:code/message 对外传递,cause 留在本地诊断。 */
|
|
31
|
-
export declare class LinkError extends Error {
|
|
32
|
-
readonly code: number;
|
|
33
|
-
constructor(err: ErrorBody, cause?: unknown);
|
|
34
|
-
/** JSON 输出只包含公开字段,不传出内部原因。 */
|
|
35
|
-
toJSON(): ErrorBody;
|
|
36
|
-
}
|
|
37
|
-
/** 发送前帧大小超过对端 max_frame_bytes */
|
|
38
|
-
export declare class FrameTooLargeError extends LinkError {
|
|
39
|
-
readonly actualBytes: number;
|
|
40
|
-
readonly maxBytes: number;
|
|
41
|
-
constructor(actualBytes: number, maxBytes: number);
|
|
42
|
-
}
|
|
43
|
-
/** Codec 解码失败(JSON 或版本) */
|
|
44
|
-
export declare class CodecError extends LinkError {
|
|
45
|
-
readonly kind: 'json_parse' | 'bad_version';
|
|
46
|
-
constructor(kind: 'json_parse' | 'bad_version', message?: string);
|
|
47
|
-
}
|
|
48
|
-
/** 心跳时序:握手前用本地值,握手后换成 `welcome.limits` 里的同名字段 */
|
|
49
|
-
export type LinkTiming = Pick<Limits, 'heartbeat_ms' | 'dead_after_ms'>;
|
|
50
|
-
/** 握手前心跳时序(02 §3);其余时序与上限只认服务端 `welcome.limits` */
|
|
51
|
-
export declare const PRE_HANDSHAKE_TIMING: LinkTiming;
|
|
52
|
-
export declare function isKnownMessageType(type: string): type is MessageType;
|
|
53
|
-
/** 信封壳层必填字段(01 §2);不校验 body 内业务字段 */
|
|
54
|
-
export declare function validateEnvelopeShell(env: Envelope): string | null;
|
|
55
|
-
/** HTTP 升级的鉴权失败,状态码选择只在链路层进行。 */
|
|
56
|
-
export declare function authFailure(status: number, detail: string): LinkError | null;
|
|
57
|
-
//# sourceMappingURL=envelope.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"envelope.d.ts","sourceRoot":"","sources":["../../../../src/protocol/link/envelope.ts"],"names":[],"mappings":"AACA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAIxF,kBAAkB;AAClB,MAAM,WAAW,QAAQ;IACvB,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IAC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,GAAG,MAAM,GAAG,IAAI,CAsClE;AAED,iCAAiC;AACjC,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAI5E"}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { ErrBadVersion, ErrFrameTooLarge, ErrPermissionDenied, ErrProtocolInvalid, ErrUnauthorized } from '../messages/errors.gen.js';
|
|
2
|
-
import { REGISTRY } from '../messages/messages.gen.js';
|
|
3
|
-
/** 统一错误:code/message 对外传递,cause 留在本地诊断。 */
|
|
4
|
-
export class LinkError extends Error {
|
|
5
|
-
code;
|
|
6
|
-
constructor(err, cause) {
|
|
7
|
-
super(err.message, cause === undefined ? undefined : { cause });
|
|
8
|
-
this.name = 'AgentRunError';
|
|
9
|
-
this.code = err.code;
|
|
10
|
-
}
|
|
11
|
-
/** JSON 输出只包含公开字段,不传出内部原因。 */
|
|
12
|
-
toJSON() {
|
|
13
|
-
return { code: this.code, message: this.message };
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
/** 发送前帧大小超过对端 max_frame_bytes */
|
|
17
|
-
export class FrameTooLargeError extends LinkError {
|
|
18
|
-
actualBytes;
|
|
19
|
-
maxBytes;
|
|
20
|
-
constructor(actualBytes, maxBytes) {
|
|
21
|
-
super(ErrFrameTooLarge, { actualBytes, maxBytes });
|
|
22
|
-
this.name = 'FrameTooLargeError';
|
|
23
|
-
this.actualBytes = actualBytes;
|
|
24
|
-
this.maxBytes = maxBytes;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
/** Codec 解码失败(JSON 或版本) */
|
|
28
|
-
export class CodecError extends LinkError {
|
|
29
|
-
kind;
|
|
30
|
-
constructor(kind, message) {
|
|
31
|
-
super(kind === 'bad_version' ? ErrBadVersion : ErrProtocolInvalid, message);
|
|
32
|
-
this.name = 'CodecError';
|
|
33
|
-
this.kind = kind;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
/** 握手前心跳时序(02 §3);其余时序与上限只认服务端 `welcome.limits` */
|
|
37
|
-
export const PRE_HANDSHAKE_TIMING = {
|
|
38
|
-
heartbeat_ms: 15_000,
|
|
39
|
-
dead_after_ms: 45_000,
|
|
40
|
-
};
|
|
41
|
-
const KINDS = ['event', 'request', 'response'];
|
|
42
|
-
export function isKnownMessageType(type) {
|
|
43
|
-
return Object.prototype.hasOwnProperty.call(REGISTRY, type);
|
|
44
|
-
}
|
|
45
|
-
/** 信封壳层必填字段(01 §2);不校验 body 内业务字段 */
|
|
46
|
-
export function validateEnvelopeShell(env) {
|
|
47
|
-
if (env.v !== 1) {
|
|
48
|
-
return 'v 必须为 1';
|
|
49
|
-
}
|
|
50
|
-
if (!KINDS.includes(env.kind)) {
|
|
51
|
-
return 'kind 无效';
|
|
52
|
-
}
|
|
53
|
-
if (typeof env.type !== 'string' || env.type.length === 0) {
|
|
54
|
-
return 'type 无效';
|
|
55
|
-
}
|
|
56
|
-
if (typeof env.seq !== 'number' || !Number.isFinite(env.seq)) {
|
|
57
|
-
return 'seq 无效';
|
|
58
|
-
}
|
|
59
|
-
if (typeof env.ts !== 'number' || !Number.isFinite(env.ts)) {
|
|
60
|
-
return 'ts 无效';
|
|
61
|
-
}
|
|
62
|
-
if (typeof env.body !== 'object' || env.body === null || Array.isArray(env.body)) {
|
|
63
|
-
return 'body 必须为对象';
|
|
64
|
-
}
|
|
65
|
-
if (env.kind === 'request') {
|
|
66
|
-
if (typeof env.id !== 'string' || env.id.length === 0) {
|
|
67
|
-
return 'request 缺少 id';
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
if (env.kind === 'response') {
|
|
71
|
-
if (typeof env.re !== 'string' || env.re.length === 0) {
|
|
72
|
-
return 'response 缺少 re';
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
if (isKnownMessageType(env.type)) {
|
|
76
|
-
const entry = REGISTRY[env.type];
|
|
77
|
-
if (entry.runScoped) {
|
|
78
|
-
if (typeof env.run !== 'string' || env.run.length === 0) {
|
|
79
|
-
return 'run 作用域消息缺少 run';
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
return null;
|
|
84
|
-
}
|
|
85
|
-
/** HTTP 升级的鉴权失败,状态码选择只在链路层进行。 */
|
|
86
|
-
export function authFailure(status, detail) {
|
|
87
|
-
if (status === 401)
|
|
88
|
-
return new LinkError(ErrUnauthorized, detail);
|
|
89
|
-
if (status === 403)
|
|
90
|
-
return new LinkError(ErrPermissionDenied, detail);
|
|
91
|
-
return null;
|
|
92
|
-
}
|
|
93
|
-
//# sourceMappingURL=envelope.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"envelope.js","sourceRoot":"","sources":["../../../../src/protocol/link/envelope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAOtI,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AA8BvD,2CAA2C;AAC3C,MAAM,OAAO,SAAU,SAAQ,KAAK;IAClB,IAAI,CAAS;IAE7B,YAAY,GAAc,EAAE,KAAe;QACzC,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;QAChE,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;QAC5B,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;IACvB,CAAC;IAED,8BAA8B;IACvB,MAAM;QACX,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC;IACpD,CAAC;CACF;AAED,iCAAiC;AACjC,MAAM,OAAO,kBAAmB,SAAQ,SAAS;IAC/B,WAAW,CAAS;IACpB,QAA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AK,QAAQ,IAAI,GAAG,CAAC,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACxD,OAAO,iBAAiB,CAAC;YAC3B,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,iCAAiC;AACjC,MAAM,UAAU,WAAW,CAAC,MAAc,EAAE,MAAc;IACxD,IAAI,MAAM,KAAK,GAAG;QAAE,OAAO,IAAI,SAAS,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;IAClE,IAAI,MAAM,KAAK,GAAG;QAAE,OAAO,IAAI,SAAS,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC;IACtE,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 应用层心跳:空闲发 link.ping,长时间收不到任何消息以 4408 关闭(02 §3)。
|
|
3
|
-
*/
|
|
4
|
-
import { type LinkTiming } from './envelope.js';
|
|
5
|
-
export interface LivenessCallbacks {
|
|
6
|
-
onPing: () => void;
|
|
7
|
-
onDead: () => void;
|
|
8
|
-
}
|
|
9
|
-
export declare class Liveness {
|
|
10
|
-
private heartbeatMs;
|
|
11
|
-
private deadAfterMs;
|
|
12
|
-
private readonly callbacks;
|
|
13
|
-
private sendTimer?;
|
|
14
|
-
private deadTimer?;
|
|
15
|
-
private lastSentAt;
|
|
16
|
-
private lastRecvAt;
|
|
17
|
-
private disposed;
|
|
18
|
-
constructor(callbacks: LivenessCallbacks, limits?: LinkTiming);
|
|
19
|
-
/** 握手后切换到服务端下发的 limits */
|
|
20
|
-
setLimits(limits: LinkTiming): void;
|
|
21
|
-
onSent(): void;
|
|
22
|
-
onReceived(): void;
|
|
23
|
-
dispose(): void;
|
|
24
|
-
private arm;
|
|
25
|
-
private armSend;
|
|
26
|
-
private armDead;
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=liveness.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"liveness.d.ts","sourceRoot":"","sources":["../../../../src/protocol/link/liveness.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAwB,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAEtE,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,qBAAa,QAAQ;IACnB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAoB;IAC9C,OAAO,CAAC,SAAS,CAAC,CAAgC;IAClD,OAAO,CAAC,SAAS,CAAC,CAAgC;IAClD,OAAO,CAAC,UAAU,CAAc;IAChC,OAAO,CAAC,UAAU,CAAc;IAChC,OAAO,CAAC,QAAQ,CAAS;gBAEb,SAAS,EAAE,iBAAiB,EAAE,MAAM,GAAE,UAAiC;IAOnF,0BAA0B;IACnB,SAAS,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;IAQnC,MAAM,IAAI,IAAI;IAKd,UAAU,IAAI,IAAI;IAKlB,OAAO,IAAI,IAAI;IAYtB,OAAO,CAAC,GAAG;IAKX,OAAO,CAAC,OAAO;IAmBf,OAAO,CAAC,OAAO;CAgBhB"}
|