@craft_eco/craft-mcp 0.0.0-stage → 0.1.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1051) hide show
  1. package/README.md +32 -2
  2. package/bin/craft-mcp.mjs +7 -0
  3. package/dist-server/core/app-paths.mjs +15 -0
  4. package/dist-server/core/auth-store.mjs +70 -0
  5. package/dist-server/core/connector-auth.mjs +30 -0
  6. package/dist-server/core/http-utils.mjs +14 -0
  7. package/dist-server/game-workflow/asset-formats.mjs +76 -0
  8. package/dist-server/game-workflow/asset-import.mjs +113 -0
  9. package/dist-server/game-workflow/asset-inputs.mjs +10 -0
  10. package/dist-server/game-workflow/assets.mjs +161 -0
  11. package/dist-server/game-workflow/capture-worker.mjs +14 -0
  12. package/dist-server/game-workflow/check.mjs +74 -0
  13. package/dist-server/game-workflow/draft-archive.mjs +53 -0
  14. package/dist-server/game-workflow/draft-bindings.mjs +35 -0
  15. package/dist-server/game-workflow/draft-uploads.mjs +207 -0
  16. package/dist-server/game-workflow/engines.mjs +30 -0
  17. package/dist-server/game-workflow/library-assets.mjs +77 -0
  18. package/dist-server/game-workflow/library-candidates.mjs +37 -0
  19. package/dist-server/game-workflow/library-catalog.mjs +45 -0
  20. package/dist-server/game-workflow/project-leases.mjs +52 -0
  21. package/dist-server/game-workflow/projects.mjs +92 -0
  22. package/dist-server/game-workflow/publication-materials.mjs +67 -0
  23. package/dist-server/game-workflow/publications.mjs +148 -0
  24. package/dist-server/game-workflow/publish-capture-worker.mjs +57 -0
  25. package/dist-server/game-workflow/publish-capture.mjs +75 -0
  26. package/dist-server/game-workflow/request-store.mjs +52 -0
  27. package/dist-server/game-workflow/resource-catalog.mjs +97 -0
  28. package/dist-server/game-workflow/tasks.mjs +93 -0
  29. package/dist-server/mcp/asset-tools.mjs +42 -0
  30. package/dist-server/mcp/control-panel.html +17 -0
  31. package/dist-server/mcp/control-panel.mjs +59 -0
  32. package/dist-server/mcp/publication-page.html +86 -0
  33. package/dist-server/mcp/publication-page.mjs +347 -0
  34. package/dist-server/mcp/publication-preview.mjs +49 -0
  35. package/dist-server/mcp/publication-tools.mjs +22 -0
  36. package/dist-server/mcp/publish-panel.mjs +191 -0
  37. package/dist-server/mcp/server.mjs +312 -0
  38. package/dist-server/mcp/start.mjs +20 -0
  39. package/dist-server/preview/local-static-preview.mjs +71 -0
  40. package/dist-server/preview/preview-control.mjs +35 -0
  41. package/dist-server/preview/preview-launcher.mjs +26 -0
  42. package/dist-server/preview/preview-snapshot.mjs +35 -0
  43. package/dist-server/preview/preview-start.mjs +12 -0
  44. package/dist-server/preview/preview-worker.mjs +68 -0
  45. package/dist-server/upstream/craft-aigc.mjs +169 -0
  46. package/dist-server/upstream/library-url.mjs +14 -0
  47. package/dist-server/upstream/publication-transport.mjs +81 -0
  48. package/package.json +33 -4
  49. package/resources/craft-game-maker/SKILL.md +69 -0
  50. package/resources/craft-game-maker/js.md +9 -0
  51. package/resources/craft-game-maker/js3d.md +12 -0
  52. package/resources/game_visual_qa.mjs +1143 -0
  53. package/resources/js/context/CLAUDE.md +54 -0
  54. package/resources/js/context/agents/aigc-manager.md +91 -0
  55. package/resources/js/context/hooks/hooks.json +20 -0
  56. package/resources/js/context/knowledge/AigcEnabled.md +41 -0
  57. package/resources/js/context/knowledge/AigcWiring.md +200 -0
  58. package/resources/js/context/knowledge/AssetUrl.md +24 -0
  59. package/resources/js/context/knowledge/FrontendComponents.md +23 -0
  60. package/resources/js/context/knowledge/GameProbe.md +74 -0
  61. package/resources/js/context/knowledge/Lifecycle.md +27 -0
  62. package/resources/js/context/knowledge/Multiplayer/GameplaySystemKnowledge.md +114 -0
  63. package/resources/js/context/knowledge/Multiplayer/OverviewKnowledge.md +115 -0
  64. package/resources/js/context/knowledge/Multiplayer/StateSyncKnowledge.md +392 -0
  65. package/resources/js/context/knowledge/PlatformServices.md +184 -0
  66. package/resources/js/context/knowledge/Subsystems/Optional/MultiplayerManagerKnowledge.md +242 -0
  67. package/resources/js/context/knowledge/Ui.md +11 -0
  68. package/resources/js/context/knowledge/UiEditorCompat.md +21 -0
  69. package/resources/js/context/rules/MultiplayerCapability.md +23 -0
  70. package/resources/js/context/rules/MultiplayerRoomEntryUX.md +63 -0
  71. package/resources/js/context/rules/PlatformBoundaryModules.md +43 -0
  72. package/resources/js/context/skills/aigc-generate/SKILL.md +301 -0
  73. package/resources/js/context/skills/aigc-generate/knowledge/audio.md +39 -0
  74. package/resources/js/context/skills/aigc-generate/knowledge/batch-replace.md +14 -0
  75. package/resources/js/context/skills/aigc-generate/knowledge/character2d.md +129 -0
  76. package/resources/js/context/skills/aigc-generate/knowledge/non-stepwise-aigc.md +54 -0
  77. package/resources/js/context/skills/aigc-generate/knowledge/texture-prop.md +50 -0
  78. package/resources/js/context/skills/aigc-generate/knowledge/texture-scene.md +201 -0
  79. package/resources/js/context/skills/aigc-generate/knowledge/texture-ui.md +53 -0
  80. package/resources/js/context/skills/aigc-generate/scripts/apply-results.mjs +83 -0
  81. package/resources/js/context/skills/aigc-generate/scripts/config.json +29 -0
  82. package/resources/js/context/skills/aigc-generate/scripts/generate.mjs +1016 -0
  83. package/resources/js/context/skills/aigc-generate/scripts/lib/client.mjs +228 -0
  84. package/resources/js/context/skills/aigc-generate/scripts/lib/ledger.mjs +119 -0
  85. package/resources/js/context/skills/aigc-generate/scripts/lib/nstep-handoff.mjs +100 -0
  86. package/resources/js/context/skills/aigc-generate/scripts/lib/pipelines.mjs +441 -0
  87. package/resources/js/context/skills/aigc-generate/scripts/lib/queue.mjs +283 -0
  88. package/resources/js/context/skills/aigc-generate/scripts/lib/submit.mjs +122 -0
  89. package/resources/js/context/skills/aigc-generate/scripts/worker.mjs +171 -0
  90. package/resources/js/context/skills/asset-search/SKILL.md +73 -0
  91. package/resources/js/context/skills/asset-search/scripts/asset_display.mjs +62 -0
  92. package/resources/js/context/skills/asset-search/scripts/config.json +5 -0
  93. package/resources/js/context/skills/asset-search/scripts/provided_assets.mjs +125 -0
  94. package/resources/js/context/skills/asset-search/scripts/recalled_sprite_paths.mjs +47 -0
  95. package/resources/js/context/skills/asset-search/scripts/search.mjs +749 -0
  96. package/resources/js/context/skills/asset-search/scripts/sprite_source_materializer.mjs +723 -0
  97. package/resources/js/context/skills/asset-search/strategies/audio.md +34 -0
  98. package/resources/js/context/skills/asset-search/strategies/character2d.md +33 -0
  99. package/resources/js/context/skills/asset-search/strategies/effect2d.md +31 -0
  100. package/resources/js/context/skills/asset-search/strategies/texture-prop.md +22 -0
  101. package/resources/js/context/skills/asset-search/strategies/texture-ui.md +35 -0
  102. package/resources/js/context/skills/asset-search/strategies/ui-common.md +40 -0
  103. package/resources/js/context/skills/asset-search/strategies/ui-style.md +28 -0
  104. package/resources/js/context/skills/display-info-setup/SKILL.md +32 -0
  105. package/resources/js/context/skills/display-info-setup/scripts/init_project.mjs +38 -0
  106. package/resources/js/context/skills/export-config/SKILL.md +20 -0
  107. package/resources/js/context/skills/export-config/scripts/assert-asset-wiring.mjs +72 -0
  108. package/resources/js/context/skills/export-config/scripts/export-config.mjs +43 -0
  109. package/resources/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  110. package/resources/js/context/skills/export-config/scripts/sync-asset-controls.mjs +351 -0
  111. package/resources/js/context/skills/export-config/scripts/translate-asset-titles.mjs +163 -0
  112. package/resources/js/context/skills/lightgame-runtime-adapt/SKILL.md +92 -0
  113. package/resources/js/context/skills/lightgame-runtime-adapt/project/game-runtime.json +7 -0
  114. package/resources/js/context/skills/lightgame-runtime-adapt/project/package.json +22 -0
  115. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/config.d.mts +19 -0
  116. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/config.mjs +1 -0
  117. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/leaderboard.d.mts +39 -0
  118. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/leaderboard.mjs +1 -0
  119. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/platform-capture-video.mjs +227 -0
  120. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/platform-service.d.mts +25 -0
  121. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/platform-service.mjs +1 -0
  122. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/platform.d.mts +79 -0
  123. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/platform.mjs +29 -0
  124. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/save.d.mts +49 -0
  125. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/save.mjs +1 -0
  126. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/release.json +37 -0
  127. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tooling/cli.mjs +2 -0
  128. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tooling/project.d.mts +8 -0
  129. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tooling/project.mjs +2 -0
  130. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tooling/vite.d.mts +3 -0
  131. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tooling/vite.mjs +8 -0
  132. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/assets.d.mts +24 -0
  133. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/assets.mjs +2 -0
  134. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/astc.d.mts +10 -0
  135. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/astc.mjs +1 -0
  136. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/audio.d.mts +20 -0
  137. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/audio.mjs +1 -0
  138. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/canvas.d.mts +21 -0
  139. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/canvas.mjs +1 -0
  140. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/input.d.mts +17 -0
  141. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/input.mjs +1 -0
  142. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/three.d.mts +40 -0
  143. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/three.mjs +1 -0
  144. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/ui.d.mts +10 -0
  145. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/ui.mjs +1 -0
  146. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/video.d.mts +8 -0
  147. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/video.mjs +1 -0
  148. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/config-export.mjs +32 -0
  149. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/refresh-runtime.mjs +50 -0
  150. package/resources/js/context/skills/lightgame-runtime-adapt/project/src/display/ui-stage.ts +121 -0
  151. package/resources/js/context/skills/lightgame-runtime-adapt/project/src/display/viewport.ts +254 -0
  152. package/resources/js/context/skills/lightgame-runtime-adapt/project/src/main.ts +99 -0
  153. package/resources/js/context/skills/lightgame-runtime-adapt/project/src/platform.ts +14 -0
  154. package/resources/js/context/skills/lightgame-runtime-adapt/project/src/screenUi.ts +172 -0
  155. package/resources/js/context/skills/lightgame-runtime-adapt/project/src/style.css +165 -0
  156. package/resources/js/context/skills/lightgame-runtime-adapt/project/tsconfig.json +20 -0
  157. package/resources/js/context/skills/lightgame-runtime-adapt/project/vite.config.ts +4 -0
  158. package/resources/js/context/skills/lightgame-runtime-adapt/scripts/install-template.mjs +109 -0
  159. package/resources/js/context/skills/mobile-adaptation/SKILL.md +260 -0
  160. package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-config.json +50 -0
  161. package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-layer.ts +881 -0
  162. package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-platform.ts +92 -0
  163. package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/look-pad.ts +245 -0
  164. package/resources/js/context/skills/mobile-adaptation/assets/example/src/ui/touch-controls.css +134 -0
  165. package/resources/js/context/skills/mobile-adaptation/references/input-config.md +311 -0
  166. package/resources/js/context/skills/mobile-adaptation/references/verification.md +106 -0
  167. package/resources/js/context/skills/optimization-suggestions/SKILL.md +89 -0
  168. package/resources/js/context/skills/platform-services/SKILL.md +94 -0
  169. package/resources/js/context/skills/platform-services/assets/modules/MultiplayerManager.ts +783 -0
  170. package/resources/js/context/skills/platform-services/assets/modules/eventBus.ts +57 -0
  171. package/resources/js/context/skills/platform-services/assets/modules/leaderboard.d.mts +39 -0
  172. package/resources/js/context/skills/platform-services/assets/modules/leaderboard.mjs +1 -0
  173. package/resources/js/context/skills/platform-services/assets/modules/log.ts +35 -0
  174. package/resources/js/context/skills/platform-services/assets/modules/platform-service.d.mts +25 -0
  175. package/resources/js/context/skills/platform-services/assets/modules/platform-service.mjs +1 -0
  176. package/resources/js/context/skills/platform-services/assets/modules/save.d.mts +49 -0
  177. package/resources/js/context/skills/platform-services/assets/modules/save.mjs +1 -0
  178. package/resources/js/context/skills/platform-services/assets/release.json +44 -0
  179. package/resources/js/context/skills/platform-services/assets/scaffold/ds/main.mjs +7 -0
  180. package/resources/js/context/skills/platform-services/assets/scaffold/ds/rooms/SyncRoom.mjs +264 -0
  181. package/resources/js/context/skills/platform-services/assets/scaffold/ds/rooms/syncSchema.mjs +39 -0
  182. package/resources/js/context/skills/platform-services/references/SERVER_GUIDE.md +139 -0
  183. package/resources/js/context/skills/platform-services/references/api_reference.md +18 -0
  184. package/resources/js/context/skills/platform-services/scripts/install.mjs +134 -0
  185. package/resources/js/context/skills/resolution-adaptation/SKILL.md +202 -0
  186. package/resources/js/context/skills/resolution-adaptation/assets/display/ui-stage.ts +121 -0
  187. package/resources/js/context/skills/resolution-adaptation/assets/display/viewport.ts +254 -0
  188. package/resources/js/context/skills/resolution-adaptation/assets/example/main.ts +98 -0
  189. package/resources/js/context/skills/resolution-adaptation/assets/example/ui-tokens.css +200 -0
  190. package/resources/js/context/skills/resolution-adaptation/references/layout-rules.md +134 -0
  191. package/resources/js/context/skills/resolution-adaptation/references/viewport-api.md +119 -0
  192. package/resources/js/context/skills/resolution-adaptation/scripts/aspect_audit.mjs +338 -0
  193. package/resources/js/context/skills/scene-editor-compat/SKILL.md +94 -0
  194. package/resources/js/context/skills/scene-editor-compat/assets/example/localcraft.assets.json +13 -0
  195. package/resources/js/context/skills/scene-editor-compat/assets/example/localcraft.scene-editor.json +6 -0
  196. package/resources/js/context/skills/scene-editor-compat/assets/example/src/game/sceneAdapter.ts +25 -0
  197. package/resources/js/context/skills/scene-editor-compat/assets/example/src/scenes/main.scene.json +18 -0
  198. package/resources/js/context/skills/scene-editor-compat/assets/runtime/release.json +7 -0
  199. package/resources/js/context/skills/scene-editor-compat/assets/runtime/scene.d.mts +42 -0
  200. package/resources/js/context/skills/scene-editor-compat/assets/runtime/scene.mjs +144 -0
  201. package/resources/js/context/skills/scene-editor-compat/docs/contract.md +330 -0
  202. package/resources/js/context/skills/scene-editor-compat/docs/resource-sync.md +64 -0
  203. package/resources/js/context/skills/scene-editor-compat/docs/runtime-state.md +28 -0
  204. package/resources/js/context/skills/scene-editor-compat/docs/terrain-contract.md +47 -0
  205. package/resources/js/context/skills/scene-editor-compat/docs/visual-contract.md +64 -0
  206. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/localcraft.assets.json +38 -0
  207. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/localcraft.scene-editor.json +9 -0
  208. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/game/sceneAdapter.ts +59 -0
  209. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/game/sceneBlockers.ts +30 -0
  210. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/game/sceneFileAssets.ts +66 -0
  211. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/scenes/Main.Scene.ts +20 -0
  212. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/scenes/SceneTypes.ts +26 -0
  213. package/resources/js/context/skills/scene-editor-compat/references/contract.md +73 -0
  214. package/resources/js/context/skills/scene-editor-compat/scripts/apply_scene_marker.py +162 -0
  215. package/resources/js/context/skills/scene-editor-compat/scripts/check_scene_contract.py +853 -0
  216. package/resources/js/context/skills/scene-editor-compat/scripts/check_scene_resource_urls.py +173 -0
  217. package/resources/js/context/skills/scene-editor-compat/scripts/scene-editor.mjs +427 -0
  218. package/resources/js/context/skills/scene-editor-compat/version.json +1 -0
  219. package/resources/js/context/skills/ui-editor-compat/SKILL.md +48 -0
  220. package/resources/js/context/skills/ui-editor-compat/assets/example/hud/WidgetLayout_Hud.ts +35 -0
  221. package/resources/js/context/skills/ui-editor-compat/assets/example/hud/WidgetLogic_Hud.ts +74 -0
  222. package/resources/js/context/skills/ui-editor-compat/assets/example/hud/hud.css +60 -0
  223. package/resources/js/context/skills/ui-editor-compat/assets/runtime/dom-ui.d.mts +45 -0
  224. package/resources/js/context/skills/ui-editor-compat/assets/runtime/dom-ui.mjs +265 -0
  225. package/resources/js/context/skills/ui-editor-compat/assets/runtime/release.json +7 -0
  226. package/resources/js/context/skills/ui-editor-compat/references/contract.md +132 -0
  227. package/resources/js/context/skills/ui-editor-compat/scripts/editor-contract.mjs +327 -0
  228. package/resources/js/context/skills/ui-editor-compat/scripts/project-files.mjs +80 -0
  229. package/resources/js/context/skills/ui-editor-compat/scripts/ui-editor.mjs +84 -0
  230. package/resources/js/context/skills/version-update/SKILL.md +192 -0
  231. package/resources/js/context/skills/version-update/scripts/check_runtime_refs.mjs +129 -0
  232. package/resources/js/context/skills/version-update/scripts/feature_snapshot.mjs +159 -0
  233. package/resources/js/context/skills/version-update/scripts/update_feature_version.mjs +157 -0
  234. package/resources/js/context/skills/version-update/upgrade_diffs/.gitkeep +0 -0
  235. package/resources/js/context/skills/visual-qa/SKILL.md +36 -0
  236. package/resources/js/context/version/version.json +1 -0
  237. package/resources/js/project/.gitattributes +2 -0
  238. package/resources/js/project/README.md +99 -0
  239. package/resources/js/project/SPEC/assist/.gitkeep +0 -0
  240. package/resources/js/project/SPEC/guide/.gitkeep +0 -0
  241. package/resources/js/project/SPEC/plan/.gitkeep +0 -0
  242. package/resources/js/project/SPEC/readme.md +6 -0
  243. package/resources/js/project/SPEC/res/.gitkeep +0 -0
  244. package/resources/js/project/SPEC/task-item/.gitkeep +0 -0
  245. package/resources/js/project/configs/assets.json +1 -0
  246. package/resources/js/project/configs/game.controls.json +3 -0
  247. package/resources/js/project/configs/game.json +3 -0
  248. package/resources/js/project/game-runtime.json +7 -0
  249. package/resources/js/project/gameplay-probe.json +37 -0
  250. package/resources/js/project/index.html +20 -0
  251. package/resources/js/project/package-lock.json +1155 -0
  252. package/resources/js/project/package.json +23 -0
  253. package/resources/js/project/projectDisplayInfo.json +7 -0
  254. package/resources/js/project/runtime/lightgame/1.0.0/platform/config.d.mts +19 -0
  255. package/resources/js/project/runtime/lightgame/1.0.0/platform/config.mjs +1 -0
  256. package/resources/js/project/runtime/lightgame/1.0.0/platform/leaderboard.d.mts +39 -0
  257. package/resources/js/project/runtime/lightgame/1.0.0/platform/leaderboard.mjs +1 -0
  258. package/resources/js/project/runtime/lightgame/1.0.0/platform/platform-capture-video.mjs +227 -0
  259. package/resources/js/project/runtime/lightgame/1.0.0/platform/platform-service.d.mts +25 -0
  260. package/resources/js/project/runtime/lightgame/1.0.0/platform/platform-service.mjs +1 -0
  261. package/resources/js/project/runtime/lightgame/1.0.0/platform/platform.d.mts +79 -0
  262. package/resources/js/project/runtime/lightgame/1.0.0/platform/platform.mjs +29 -0
  263. package/resources/js/project/runtime/lightgame/1.0.0/platform/save.d.mts +49 -0
  264. package/resources/js/project/runtime/lightgame/1.0.0/platform/save.mjs +1 -0
  265. package/resources/js/project/runtime/lightgame/1.0.0/release.json +37 -0
  266. package/resources/js/project/runtime/lightgame/1.0.0/tooling/cli.mjs +2 -0
  267. package/resources/js/project/runtime/lightgame/1.0.0/tooling/project.d.mts +8 -0
  268. package/resources/js/project/runtime/lightgame/1.0.0/tooling/project.mjs +2 -0
  269. package/resources/js/project/runtime/lightgame/1.0.0/tooling/vite.d.mts +3 -0
  270. package/resources/js/project/runtime/lightgame/1.0.0/tooling/vite.mjs +8 -0
  271. package/resources/js/project/runtime/lightgame/1.0.0/tools/assets.d.mts +24 -0
  272. package/resources/js/project/runtime/lightgame/1.0.0/tools/assets.mjs +2 -0
  273. package/resources/js/project/runtime/lightgame/1.0.0/tools/astc.d.mts +10 -0
  274. package/resources/js/project/runtime/lightgame/1.0.0/tools/astc.mjs +1 -0
  275. package/resources/js/project/runtime/lightgame/1.0.0/tools/audio.d.mts +20 -0
  276. package/resources/js/project/runtime/lightgame/1.0.0/tools/audio.mjs +1 -0
  277. package/resources/js/project/runtime/lightgame/1.0.0/tools/canvas.d.mts +21 -0
  278. package/resources/js/project/runtime/lightgame/1.0.0/tools/canvas.mjs +1 -0
  279. package/resources/js/project/runtime/lightgame/1.0.0/tools/input.d.mts +17 -0
  280. package/resources/js/project/runtime/lightgame/1.0.0/tools/input.mjs +1 -0
  281. package/resources/js/project/runtime/lightgame/1.0.0/tools/three.d.mts +40 -0
  282. package/resources/js/project/runtime/lightgame/1.0.0/tools/three.mjs +1 -0
  283. package/resources/js/project/runtime/lightgame/1.0.0/tools/ui.d.mts +10 -0
  284. package/resources/js/project/runtime/lightgame/1.0.0/tools/ui.mjs +1 -0
  285. package/resources/js/project/runtime/lightgame/1.0.0/tools/video.d.mts +8 -0
  286. package/resources/js/project/runtime/lightgame/1.0.0/tools/video.mjs +1 -0
  287. package/resources/js/project/scripts/config-export.mjs +32 -0
  288. package/resources/js/project/scripts/refresh-runtime.mjs +50 -0
  289. package/resources/js/project/src/display/ui-stage.ts +121 -0
  290. package/resources/js/project/src/display/viewport.ts +254 -0
  291. package/resources/js/project/src/main.ts +99 -0
  292. package/resources/js/project/src/platform.ts +14 -0
  293. package/resources/js/project/src/scenes/LoadScene.ts +89 -0
  294. package/resources/js/project/src/scenes/PlayScene.ts +17 -0
  295. package/resources/js/project/src/screenUi.ts +172 -0
  296. package/resources/js/project/src/style.css +165 -0
  297. package/resources/js/project/tsconfig.json +20 -0
  298. package/resources/js/project/unified_data_control_config.json +20 -0
  299. package/resources/js/project/vendor/core-manager-js/package.json +33 -0
  300. package/resources/js/project/vendor/core-manager-js/src/.versions.json +42 -0
  301. package/resources/js/project/vendor/core-manager-js/src/CoreManagerPlugin.ts +41 -0
  302. package/resources/js/project/vendor/core-manager-js/src/assetManager/AssetRef.ts +90 -0
  303. package/resources/js/project/vendor/core-manager-js/src/assetManager/AstcFirstImageFile.ts +203 -0
  304. package/resources/js/project/vendor/core-manager-js/src/assetManager/AstcTextureLoader.ts +106 -0
  305. package/resources/js/project/vendor/core-manager-js/src/assetManager/resolveAssetUrl.test.ts +25 -0
  306. package/resources/js/project/vendor/core-manager-js/src/assetManager/resolveAssetUrl.ts +21 -0
  307. package/resources/js/project/vendor/core-manager-js/src/audioManager/AudioManager.test.ts +65 -0
  308. package/resources/js/project/vendor/core-manager-js/src/audioManager/AudioManager.ts +340 -0
  309. package/resources/js/project/vendor/core-manager-js/src/configManager/FeatureConfig.ts +87 -0
  310. package/resources/js/project/vendor/core-manager-js/src/configManager/tuneRuntime.d.mts +92 -0
  311. package/resources/js/project/vendor/core-manager-js/src/configManager/tuneRuntime.mjs +271 -0
  312. package/resources/js/project/vendor/core-manager-js/src/index.ts +31 -0
  313. package/resources/js/project/vendor/core-manager-js/src/inputManager/InputConfig.ts +81 -0
  314. package/resources/js/project/vendor/core-manager-js/src/inputManager/InputManager.test.ts +43 -0
  315. package/resources/js/project/vendor/core-manager-js/src/inputManager/InputManager.ts +32 -0
  316. package/resources/js/project/vendor/core-manager-js/src/inputManager/InputRuntime.test.ts +141 -0
  317. package/resources/js/project/vendor/core-manager-js/src/inputManager/InputRuntime.ts +20 -0
  318. package/resources/js/project/vendor/core-manager-js/src/inputManager/KeyboardProvider.ts +183 -0
  319. package/resources/js/project/vendor/core-manager-js/src/inputManager/TouchProvider.ts +304 -0
  320. package/resources/js/project/vendor/core-manager-js/src/inputManager/VirtualJoystick.ts +351 -0
  321. package/resources/js/project/vendor/core-manager-js/src/inputManager/_internal/InputManagerImpl.ts +180 -0
  322. package/resources/js/project/vendor/core-manager-js/src/inputManager/icons.b64 +13 -0
  323. package/resources/js/project/vendor/core-manager-js/src/inputManager/icons.b64.d.ts +14 -0
  324. package/resources/js/project/vendor/core-manager-js/src/inputManager/input_config.example.json +68 -0
  325. package/resources/js/project/vendor/core-manager-js/src/logManager/DebugConsole.ts +433 -0
  326. package/resources/js/project/vendor/core-manager-js/src/logManager/LogCapture.ts +118 -0
  327. package/resources/js/project/vendor/core-manager-js/src/logManager/LogManager.ts +444 -0
  328. package/resources/js/project/vendor/core-manager-js/src/logManager/ScreenCapture.ts +485 -0
  329. package/resources/js/project/vendor/core-manager-js/src/logManager/ScreenCaptureVideo.test.ts +66 -0
  330. package/resources/js/project/vendor/core-manager-js/src/logManager/ScreenCaptureVideo.ts +149 -0
  331. package/resources/js/project/vendor/core-manager-js/src/logManager/icons.b64 +9 -0
  332. package/resources/js/project/vendor/core-manager-js/src/resourceManager/AssetUrlResolver.ts +29 -0
  333. package/resources/js/project/vendor/core-manager-js/src/resourceManager/ResourceManager.test.ts +88 -0
  334. package/resources/js/project/vendor/core-manager-js/src/resourceManager/ResourceManager.ts +122 -0
  335. package/resources/js/project/vendor/core-manager-js/src/runtime.ts +24 -0
  336. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/CharacterEntity.ts +318 -0
  337. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/CharacterPhysicsBinding.test.ts +151 -0
  338. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/CharacterPhysicsBinding.ts +235 -0
  339. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/EffectComposite.test.ts +98 -0
  340. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/EffectComposite.ts +94 -0
  341. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/EffectEntity.ts +209 -0
  342. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxManager.test.ts +106 -0
  343. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxManager.ts +341 -0
  344. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxRecipe.test.ts +68 -0
  345. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxRecipe.ts +236 -0
  346. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/SpriteAnimManager.test.ts +22 -0
  347. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/SpriteAnimManager.ts +29 -0
  348. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/SpriteEntity.test.ts +197 -0
  349. package/resources/js/project/vendor/core-manager-js/src/uiManager/DomUiContracts.ts +9 -0
  350. package/resources/js/project/vendor/core-manager-js/src/uiManager/DomUiKit.ts +555 -0
  351. package/resources/js/project/vendor/core-manager-js/src/uiManager/UIFacadePlugin.test.ts +112 -0
  352. package/resources/js/project/vendor/core-manager-js/src/uiManager/UIFacadePlugin.ts +178 -0
  353. package/resources/js/project/vendor/core-manager-js/src/uiManager/ui-base.css +246 -0
  354. package/resources/js/project/vendor/core-manager-js/src/videoManager/VideoManager.ts +139 -0
  355. package/resources/js/project/vendor/core-manager-js/tsconfig.json +15 -0
  356. package/resources/js/project/vendor/run.sh +107 -0
  357. package/resources/js/project/version/craft_feature_version.json +42 -0
  358. package/resources/js/project/version/project_feature_version.json +11 -0
  359. package/resources/js/project/vite.config.ts +4 -0
  360. package/resources/js3d/context/CLAUDE.md +50 -0
  361. package/resources/js3d/context/hooks/hooks.json +20 -0
  362. package/resources/js3d/context/knowledge/3D/PoseInterpolationKnowledge.md +87 -0
  363. package/resources/js3d/context/knowledge/CodingGuide/Pitfalls.md +69 -0
  364. package/resources/js3d/context/knowledge/CodingGuide/SceneEditableGuide.md +42 -0
  365. package/resources/js3d/context/knowledge/FrontendComponents.md +23 -0
  366. package/resources/js3d/context/knowledge/Multiplayer/GameplaySystemKnowledge.md +114 -0
  367. package/resources/js3d/context/knowledge/Multiplayer/OverviewKnowledge.md +117 -0
  368. package/resources/js3d/context/knowledge/Multiplayer/StateSyncKnowledge.md +430 -0
  369. package/resources/js3d/context/knowledge/PlatformServices.md +162 -0
  370. package/resources/js3d/context/knowledge/Runtime.md +30 -0
  371. package/resources/js3d/context/knowledge/SceneEditorCompat.md +34 -0
  372. package/resources/js3d/context/knowledge/StepByStep.md +21 -0
  373. package/resources/js3d/context/knowledge/Subsystems/Optional/MultiplayerManagerKnowledge.md +242 -0
  374. package/resources/js3d/context/knowledge/UiEditorCompat.md +21 -0
  375. package/resources/js3d/context/rules/MultiplayerCapability.md +27 -0
  376. package/resources/js3d/context/rules/MultiplayerRoomEntryUX.md +63 -0
  377. package/resources/js3d/context/rules/PlatformBoundaryModules.md +43 -0
  378. package/resources/js3d/context/skills/aigc-integration/SKILL.md +176 -0
  379. package/resources/js3d/context/skills/aigc-integration/callback.md +56 -0
  380. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/README.md +22 -0
  381. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/audio-aigc-knowledge.md +38 -0
  382. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/staticmesh-aigc-knowledge.md +33 -0
  383. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/texture-prop-aigc-knowledge.md +36 -0
  384. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/texture-scene-aigc-knowledge.md +37 -0
  385. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/texture-ui-aigc-knowledge.md +35 -0
  386. package/resources/js3d/context/skills/aigc-integration/scripts/config.json +3 -0
  387. package/resources/js3d/context/skills/aigc-integration/scripts/lib/submit.mjs +344 -0
  388. package/resources/js3d/context/skills/aigc-integration/scripts/query-music.mjs +53 -0
  389. package/resources/js3d/context/skills/aigc-integration/scripts/query-results.mjs +53 -0
  390. package/resources/js3d/context/skills/aigc-integration/scripts/submit-cover.mjs +44 -0
  391. package/resources/js3d/context/skills/aigc-integration/scripts/submit-image.mjs +48 -0
  392. package/resources/js3d/context/skills/aigc-integration/scripts/submit-music.mjs +34 -0
  393. package/resources/js3d/context/skills/aigc-integration/scripts/submit-staticmesh.mjs +39 -0
  394. package/resources/js3d/context/skills/asset-search/SKILL.md +159 -0
  395. package/resources/js3d/context/skills/asset-search/references/resource-config.md +56 -0
  396. package/resources/js3d/context/skills/asset-search/scripts/asset_display.mjs +62 -0
  397. package/resources/js3d/context/skills/asset-search/scripts/config.json +213 -0
  398. package/resources/js3d/context/skills/asset-search/scripts/manifest_pipeline.mjs +885 -0
  399. package/resources/js3d/context/skills/asset-search/scripts/preflight.mjs +79 -0
  400. package/resources/js3d/context/skills/asset-search/scripts/provided_assets.mjs +74 -0
  401. package/resources/js3d/context/skills/asset-search/scripts/search.mjs +597 -0
  402. package/resources/js3d/context/skills/export-config/scripts/assert-asset-wiring.mjs +83 -0
  403. package/resources/js3d/context/skills/export-config/scripts/export-config.mjs +53 -0
  404. package/resources/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  405. package/resources/js3d/context/skills/export-config/scripts/sync-asset-controls.mjs +325 -0
  406. package/resources/js3d/context/skills/export-config/scripts/sync-scene-assets.mjs +181 -0
  407. package/resources/js3d/context/skills/export-config/scripts/translate-asset-titles.mjs +163 -0
  408. package/resources/js3d/context/skills/game-art-style/SKILL.md +60 -0
  409. package/resources/js3d/context/skills/game-art-style/assets/previews/cartoon.png +0 -0
  410. package/resources/js3d/context/skills/game-art-style/assets/previews/comic.png +0 -0
  411. package/resources/js3d/context/skills/game-art-style/assets/previews/cozy.png +0 -0
  412. package/resources/js3d/context/skills/game-art-style/assets/previews/cyber.png +0 -0
  413. package/resources/js3d/context/skills/game-art-style/assets/previews/horror.png +0 -0
  414. package/resources/js3d/context/skills/game-art-style/assets/previews/lowpoly.png +0 -0
  415. package/resources/js3d/context/skills/game-art-style/assets/previews/paper.png +0 -0
  416. package/resources/js3d/context/skills/game-art-style/assets/previews/voxel.png +0 -0
  417. package/resources/js3d/context/skills/game-art-style/references/art-parameters-lite.md +38 -0
  418. package/resources/js3d/context/skills/game-art-style/references/construction.md +111 -0
  419. package/resources/js3d/context/skills/game-art-style/references/materials-textures.md +105 -0
  420. package/resources/js3d/context/skills/game-art-style/references/sources.md +25 -0
  421. package/resources/js3d/context/skills/game-art-style/references/styles/cartoon.md +175 -0
  422. package/resources/js3d/context/skills/game-art-style/references/styles/comic.md +168 -0
  423. package/resources/js3d/context/skills/game-art-style/references/styles/cozy.md +191 -0
  424. package/resources/js3d/context/skills/game-art-style/references/styles/cyber.md +165 -0
  425. package/resources/js3d/context/skills/game-art-style/references/styles/horror.md +173 -0
  426. package/resources/js3d/context/skills/game-art-style/references/styles/lowpoly.md +185 -0
  427. package/resources/js3d/context/skills/game-art-style/references/styles/paper.md +181 -0
  428. package/resources/js3d/context/skills/game-art-style/references/styles/voxel.md +189 -0
  429. package/resources/js3d/context/skills/game-art-style/references/user-style-document.md +88 -0
  430. package/resources/js3d/context/skills/mobile-adaptation/SKILL.md +284 -0
  431. package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-config.json +104 -0
  432. package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-layer.ts +952 -0
  433. package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-platform.ts +92 -0
  434. package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/look-pad.ts +245 -0
  435. package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/ui/touch-controls.css +256 -0
  436. package/resources/js3d/context/skills/mobile-adaptation/references/input-config.md +311 -0
  437. package/resources/js3d/context/skills/mobile-adaptation/references/verification.md +106 -0
  438. package/resources/js3d/context/skills/optimization-suggestions/SKILL.md +74 -0
  439. package/resources/js3d/context/skills/platform-services/SKILL.md +94 -0
  440. package/resources/js3d/context/skills/platform-services/assets/modules/MultiplayerManager.ts +783 -0
  441. package/resources/js3d/context/skills/platform-services/assets/modules/eventBus.ts +57 -0
  442. package/resources/js3d/context/skills/platform-services/assets/modules/leaderboard.d.mts +39 -0
  443. package/resources/js3d/context/skills/platform-services/assets/modules/leaderboard.mjs +1 -0
  444. package/resources/js3d/context/skills/platform-services/assets/modules/log.ts +35 -0
  445. package/resources/js3d/context/skills/platform-services/assets/modules/platform-service.d.mts +25 -0
  446. package/resources/js3d/context/skills/platform-services/assets/modules/platform-service.mjs +1 -0
  447. package/resources/js3d/context/skills/platform-services/assets/modules/save.d.mts +49 -0
  448. package/resources/js3d/context/skills/platform-services/assets/modules/save.mjs +1 -0
  449. package/resources/js3d/context/skills/platform-services/assets/release.json +44 -0
  450. package/resources/js3d/context/skills/platform-services/assets/scaffold/ds/main.mjs +7 -0
  451. package/resources/js3d/context/skills/platform-services/assets/scaffold/ds/rooms/SyncRoom.mjs +264 -0
  452. package/resources/js3d/context/skills/platform-services/assets/scaffold/ds/rooms/syncSchema.mjs +39 -0
  453. package/resources/js3d/context/skills/platform-services/references/SERVER_GUIDE.md +139 -0
  454. package/resources/js3d/context/skills/platform-services/references/api_reference.md +18 -0
  455. package/resources/js3d/context/skills/platform-services/scripts/install.mjs +134 -0
  456. package/resources/js3d/context/skills/resolution-adaptation/SKILL.md +170 -0
  457. package/resources/js3d/context/skills/resolution-adaptation/assets/display/ui-stage.ts +121 -0
  458. package/resources/js3d/context/skills/resolution-adaptation/assets/display/viewport.ts +244 -0
  459. package/resources/js3d/context/skills/resolution-adaptation/assets/example/main.ts +127 -0
  460. package/resources/js3d/context/skills/resolution-adaptation/assets/example/ui-tokens.css +188 -0
  461. package/resources/js3d/context/skills/resolution-adaptation/references/layout-rules.md +124 -0
  462. package/resources/js3d/context/skills/resolution-adaptation/references/viewport-api.md +117 -0
  463. package/resources/js3d/context/skills/resolution-adaptation/scripts/aspect_audit.mjs +338 -0
  464. package/resources/js3d/context/skills/scene-editor-compat/SKILL.md +599 -0
  465. package/resources/js3d/context/skills/scene-editor-compat/references/bundle-contract.md +141 -0
  466. package/resources/js3d/context/skills/scene-editor-compat/references/editor-integration.md +92 -0
  467. package/resources/js3d/context/skills/scene-editor-compat/references/scene-data-format.md +125 -0
  468. package/resources/js3d/context/skills/scene-editor-compat/references/slots-rules.md +113 -0
  469. package/resources/js3d/context/skills/scene-editor-compat/scripts/scene-editor.mjs +1187 -0
  470. package/resources/js3d/context/skills/threejs-game-quality/SKILL.md +52 -0
  471. package/resources/js3d/context/skills/threejs-game-quality/agents/openai.yaml +4 -0
  472. package/resources/js3d/context/skills/threejs-game-quality/references/01-build.md +94 -0
  473. package/resources/js3d/context/skills/threejs-game-quality/references/02-avoid.md +50 -0
  474. package/resources/js3d/context/skills/threejs-game-quality/references/03-detect.md +105 -0
  475. package/resources/js3d/context/skills/threejs-game-quality/references/camera-by-genre.md +147 -0
  476. package/resources/js3d/context/skills/threejs-game-quality/references/camera-distance.md +79 -0
  477. package/resources/js3d/context/skills/threejs-game-quality/references/camera-sources.md +56 -0
  478. package/resources/js3d/context/skills/threejs-game-quality/references/character-motion-face.md +51 -0
  479. package/resources/js3d/context/skills/threejs-game-quality/references/parameter-contract.md +55 -0
  480. package/resources/js3d/context/skills/threejs-game-quality/references/refine-existing.md +78 -0
  481. package/resources/js3d/context/skills/threejs-game-quality/references/rendering-stability.md +84 -0
  482. package/resources/js3d/context/skills/threejs-game-quality/references/runtime-tools.md +120 -0
  483. package/resources/js3d/context/skills/threejs-game-quality/scripts/package.json +4 -0
  484. package/resources/js3d/context/skills/threejs-game-quality/scripts/runtime-audit.js +238 -0
  485. package/resources/js3d/context/skills/ui-editor-compat/SKILL.md +59 -0
  486. package/resources/js3d/context/skills/ui-editor-compat/assets/example/hud/WidgetLayout_Hud.ts +35 -0
  487. package/resources/js3d/context/skills/ui-editor-compat/assets/example/hud/WidgetLogic_Hud.ts +61 -0
  488. package/resources/js3d/context/skills/ui-editor-compat/assets/example/hud/hud.css +60 -0
  489. package/resources/js3d/context/skills/ui-editor-compat/assets/runtime/dom-ui.d.mts +45 -0
  490. package/resources/js3d/context/skills/ui-editor-compat/assets/runtime/dom-ui.mjs +265 -0
  491. package/resources/js3d/context/skills/ui-editor-compat/assets/runtime/release.json +7 -0
  492. package/resources/js3d/context/skills/ui-editor-compat/references/contract.md +110 -0
  493. package/resources/js3d/context/skills/ui-editor-compat/scripts/editor-contract.mjs +327 -0
  494. package/resources/js3d/context/skills/ui-editor-compat/scripts/project-files.mjs +80 -0
  495. package/resources/js3d/context/skills/ui-editor-compat/scripts/ui-editor.mjs +84 -0
  496. package/resources/js3d/context/skills/version-update/SKILL.md +191 -0
  497. package/resources/js3d/context/skills/version-update/scripts/check_runtime_refs.mjs +129 -0
  498. package/resources/js3d/context/skills/version-update/scripts/feature_snapshot.mjs +159 -0
  499. package/resources/js3d/context/skills/version-update/scripts/update_feature_version.mjs +157 -0
  500. package/resources/js3d/context/skills/version-update/upgrade_diffs/.gitkeep +0 -0
  501. package/resources/js3d/context/version/version.json +1 -0
  502. package/resources/js3d/project/.gitattributes +2 -0
  503. package/resources/js3d/project/README.md +100 -0
  504. package/resources/js3d/project/configs/game.controls.json +3 -0
  505. package/resources/js3d/project/configs/game.json +3 -0
  506. package/resources/js3d/project/game-runtime.json +7 -0
  507. package/resources/js3d/project/gameplay-probe.json +38 -0
  508. package/resources/js3d/project/index.html +12 -0
  509. package/resources/js3d/project/package-lock.json +1204 -0
  510. package/resources/js3d/project/package.json +24 -0
  511. package/resources/js3d/project/projectDisplayInfo.json +7 -0
  512. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/config.d.mts +19 -0
  513. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/config.mjs +1 -0
  514. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/leaderboard.d.mts +39 -0
  515. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/leaderboard.mjs +1 -0
  516. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform-capture-video.mjs +227 -0
  517. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform-service.d.mts +25 -0
  518. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform-service.mjs +1 -0
  519. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform.d.mts +79 -0
  520. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform.mjs +30 -0
  521. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/save.d.mts +49 -0
  522. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/save.mjs +1 -0
  523. package/resources/js3d/project/runtime/lightgame/1.0.0/release.json +39 -0
  524. package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/cli.mjs +2 -0
  525. package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/project.d.mts +8 -0
  526. package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/project.mjs +2 -0
  527. package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/vite.d.mts +3 -0
  528. package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/vite.mjs +7 -0
  529. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/assets.d.mts +24 -0
  530. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/assets.mjs +2 -0
  531. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/astc.d.mts +10 -0
  532. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/astc.mjs +1 -0
  533. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/audio.d.mts +20 -0
  534. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/audio.mjs +1 -0
  535. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/canvas.d.mts +21 -0
  536. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/canvas.mjs +1 -0
  537. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/glb.d.mts +36 -0
  538. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/glb.mjs +359 -0
  539. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/glb.test.mjs +25 -0
  540. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/input.d.mts +17 -0
  541. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/input.mjs +1 -0
  542. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/three.d.mts +40 -0
  543. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/three.mjs +1 -0
  544. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/ui.d.mts +10 -0
  545. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/ui.mjs +1 -0
  546. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/video.d.mts +8 -0
  547. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/video.mjs +1 -0
  548. package/resources/js3d/project/scripts/config-export.mjs +32 -0
  549. package/resources/js3d/project/scripts/refresh-runtime.mjs +50 -0
  550. package/resources/js3d/project/src/display/ui-stage.ts +121 -0
  551. package/resources/js3d/project/src/display/viewport.ts +244 -0
  552. package/resources/js3d/project/src/main.ts +83 -0
  553. package/resources/js3d/project/src/platform.ts +14 -0
  554. package/resources/js3d/project/src/style.css +17 -0
  555. package/resources/js3d/project/tsconfig.json +20 -0
  556. package/resources/js3d/project/unified_data_control_config.json +20 -0
  557. package/resources/js3d/project/vendor/core-manager-three/package.json +12 -0
  558. package/resources/js3d/project/vendor/core-manager-three/src/index.ts +2 -0
  559. package/resources/js3d/project/vendor/run.sh +4 -0
  560. package/resources/js3d/project/version/craft_feature_version.json +42 -0
  561. package/resources/js3d/project/version/project_feature_version.json +11 -0
  562. package/resources/js3d/project/vite.config.ts +4 -0
  563. package/vendor/agent-cli/dist/runtime-tools/registry.json +6 -0
  564. package/vendor/agent-cli/dist/runtime-tools/tool-bundle-types.d.cts +15 -0
  565. package/vendor/agent-cli/dist/runtime-tools/tool-bundle.cjs +129 -0
  566. package/vendor/agent-cli/dist/runtime-tools/ue/blender-cook-assets.cjs +296 -0
  567. package/vendor/agent-cli/dist/runtime-tools/ue/context-adapter.cjs +48 -0
  568. package/vendor/agent-cli/dist/runtime-tools/ue/scene-process-lock.cjs +110 -0
  569. package/vendor/agent-cli/dist/runtime-tools/ue/tool-manifest.json +22 -0
  570. package/vendor/agent-cli/dist/runtime-tools/ue/ue-asset-references.cjs +305 -0
  571. package/vendor/agent-cli/dist/src/artifacts/context-finalize.d.ts +3 -0
  572. package/vendor/agent-cli/dist/src/artifacts/context-finalize.d.ts.map +1 -0
  573. package/vendor/agent-cli/dist/src/artifacts/context-finalize.js +45 -0
  574. package/vendor/agent-cli/dist/src/artifacts/context-finalize.js.map +1 -0
  575. package/vendor/agent-cli/dist/src/artifacts/external-game-archive.d.ts +19 -0
  576. package/vendor/agent-cli/dist/src/artifacts/external-game-archive.d.ts.map +1 -0
  577. package/vendor/agent-cli/dist/src/artifacts/external-game-archive.js +107 -0
  578. package/vendor/agent-cli/dist/src/artifacts/external-game-archive.js.map +1 -0
  579. package/vendor/agent-cli/dist/src/artifacts/external-game-upload.d.ts +44 -0
  580. package/vendor/agent-cli/dist/src/artifacts/external-game-upload.d.ts.map +1 -0
  581. package/vendor/agent-cli/dist/src/artifacts/external-game-upload.js +106 -0
  582. package/vendor/agent-cli/dist/src/artifacts/external-game-upload.js.map +1 -0
  583. package/vendor/agent-cli/dist/src/artifacts/prepare.d.ts +57 -0
  584. package/vendor/agent-cli/dist/src/artifacts/prepare.d.ts.map +1 -0
  585. package/vendor/agent-cli/dist/src/artifacts/prepare.js +198 -0
  586. package/vendor/agent-cli/dist/src/artifacts/prepare.js.map +1 -0
  587. package/vendor/agent-cli/dist/src/artifacts/process-artifacts.d.ts +32 -0
  588. package/vendor/agent-cli/dist/src/artifacts/process-artifacts.d.ts.map +1 -0
  589. package/vendor/agent-cli/dist/src/artifacts/process-artifacts.js +146 -0
  590. package/vendor/agent-cli/dist/src/artifacts/process-artifacts.js.map +1 -0
  591. package/vendor/agent-cli/dist/src/artifacts/restore.d.ts +28 -0
  592. package/vendor/agent-cli/dist/src/artifacts/restore.d.ts.map +1 -0
  593. package/vendor/agent-cli/dist/src/artifacts/restore.js +384 -0
  594. package/vendor/agent-cli/dist/src/artifacts/restore.js.map +1 -0
  595. package/vendor/agent-cli/dist/src/artifacts/static.d.ts +15 -0
  596. package/vendor/agent-cli/dist/src/artifacts/static.d.ts.map +1 -0
  597. package/vendor/agent-cli/dist/src/artifacts/static.js +152 -0
  598. package/vendor/agent-cli/dist/src/artifacts/static.js.map +1 -0
  599. package/vendor/agent-cli/dist/src/cli/commands/process.d.ts +4 -0
  600. package/vendor/agent-cli/dist/src/cli/commands/process.d.ts.map +1 -0
  601. package/vendor/agent-cli/dist/src/cli/commands/process.js +24 -0
  602. package/vendor/agent-cli/dist/src/cli/commands/process.js.map +1 -0
  603. package/vendor/agent-cli/dist/src/cli/commands/run-controls.d.ts +23 -0
  604. package/vendor/agent-cli/dist/src/cli/commands/run-controls.d.ts.map +1 -0
  605. package/vendor/agent-cli/dist/src/cli/commands/run-controls.js +62 -0
  606. package/vendor/agent-cli/dist/src/cli/commands/run-controls.js.map +1 -0
  607. package/vendor/agent-cli/dist/src/cli/commands/run-mock.d.ts +9 -0
  608. package/vendor/agent-cli/dist/src/cli/commands/run-mock.d.ts.map +1 -0
  609. package/vendor/agent-cli/dist/src/cli/commands/run-mock.js +15 -0
  610. package/vendor/agent-cli/dist/src/cli/commands/run-mock.js.map +1 -0
  611. package/vendor/agent-cli/dist/src/cli/commands/run.d.ts +3 -0
  612. package/vendor/agent-cli/dist/src/cli/commands/run.d.ts.map +1 -0
  613. package/vendor/agent-cli/dist/src/cli/commands/run.js +284 -0
  614. package/vendor/agent-cli/dist/src/cli/commands/run.js.map +1 -0
  615. package/vendor/agent-cli/dist/src/cli/commands/setup.d.ts +11 -0
  616. package/vendor/agent-cli/dist/src/cli/commands/setup.d.ts.map +1 -0
  617. package/vendor/agent-cli/dist/src/cli/commands/setup.js +161 -0
  618. package/vendor/agent-cli/dist/src/cli/commands/setup.js.map +1 -0
  619. package/vendor/agent-cli/dist/src/cli/options.d.ts +83 -0
  620. package/vendor/agent-cli/dist/src/cli/options.d.ts.map +1 -0
  621. package/vendor/agent-cli/dist/src/cli/options.js +213 -0
  622. package/vendor/agent-cli/dist/src/cli/options.js.map +1 -0
  623. package/vendor/agent-cli/dist/src/cli/process-protocol.d.ts +5 -0
  624. package/vendor/agent-cli/dist/src/cli/process-protocol.d.ts.map +1 -0
  625. package/vendor/agent-cli/dist/src/cli/process-protocol.js +276 -0
  626. package/vendor/agent-cli/dist/src/cli/process-protocol.js.map +1 -0
  627. package/vendor/agent-cli/dist/src/cli/registry.d.ts +55 -0
  628. package/vendor/agent-cli/dist/src/cli/registry.d.ts.map +1 -0
  629. package/vendor/agent-cli/dist/src/cli/registry.js +99 -0
  630. package/vendor/agent-cli/dist/src/cli/registry.js.map +1 -0
  631. package/vendor/agent-cli/dist/src/cli/render/jsonl-sink.d.ts +44 -0
  632. package/vendor/agent-cli/dist/src/cli/render/jsonl-sink.d.ts.map +1 -0
  633. package/vendor/agent-cli/dist/src/cli/render/jsonl-sink.js +83 -0
  634. package/vendor/agent-cli/dist/src/cli/render/jsonl-sink.js.map +1 -0
  635. package/vendor/agent-cli/dist/src/cli/render/text-sink.d.ts +28 -0
  636. package/vendor/agent-cli/dist/src/cli/render/text-sink.d.ts.map +1 -0
  637. package/vendor/agent-cli/dist/src/cli/render/text-sink.js +52 -0
  638. package/vendor/agent-cli/dist/src/cli/render/text-sink.js.map +1 -0
  639. package/vendor/agent-cli/dist/src/cli.d.ts +9 -0
  640. package/vendor/agent-cli/dist/src/cli.d.ts.map +1 -0
  641. package/vendor/agent-cli/dist/src/cli.js +54 -0
  642. package/vendor/agent-cli/dist/src/cli.js.map +1 -0
  643. package/vendor/agent-cli/dist/src/component/execution.d.ts +24 -0
  644. package/vendor/agent-cli/dist/src/component/execution.d.ts.map +1 -0
  645. package/vendor/agent-cli/dist/src/component/execution.js +131 -0
  646. package/vendor/agent-cli/dist/src/component/execution.js.map +1 -0
  647. package/vendor/agent-cli/dist/src/component/platform-access/server.d.ts +24 -0
  648. package/vendor/agent-cli/dist/src/component/platform-access/server.d.ts.map +1 -0
  649. package/vendor/agent-cli/dist/src/component/platform-access/server.js +200 -0
  650. package/vendor/agent-cli/dist/src/component/platform-access/server.js.map +1 -0
  651. package/vendor/agent-cli/dist/src/component/preparation-diagnostics.d.ts +31 -0
  652. package/vendor/agent-cli/dist/src/component/preparation-diagnostics.d.ts.map +1 -0
  653. package/vendor/agent-cli/dist/src/component/preparation-diagnostics.js +57 -0
  654. package/vendor/agent-cli/dist/src/component/preparation-diagnostics.js.map +1 -0
  655. package/vendor/agent-cli/dist/src/component/preparation.d.ts +10 -0
  656. package/vendor/agent-cli/dist/src/component/preparation.d.ts.map +1 -0
  657. package/vendor/agent-cli/dist/src/component/preparation.js +35 -0
  658. package/vendor/agent-cli/dist/src/component/preparation.js.map +1 -0
  659. package/vendor/agent-cli/dist/src/component/runtime-tools.d.ts +15 -0
  660. package/vendor/agent-cli/dist/src/component/runtime-tools.d.ts.map +1 -0
  661. package/vendor/agent-cli/dist/src/component/runtime-tools.js +37 -0
  662. package/vendor/agent-cli/dist/src/component/runtime-tools.js.map +1 -0
  663. package/vendor/agent-cli/dist/src/component/runtime.d.ts +8 -0
  664. package/vendor/agent-cli/dist/src/component/runtime.d.ts.map +1 -0
  665. package/vendor/agent-cli/dist/src/component/runtime.js +95 -0
  666. package/vendor/agent-cli/dist/src/component/runtime.js.map +1 -0
  667. package/vendor/agent-cli/dist/src/config/config-store.d.ts +50 -0
  668. package/vendor/agent-cli/dist/src/config/config-store.d.ts.map +1 -0
  669. package/vendor/agent-cli/dist/src/config/config-store.js +117 -0
  670. package/vendor/agent-cli/dist/src/config/config-store.js.map +1 -0
  671. package/vendor/agent-cli/dist/src/context/cache-lease.d.ts +17 -0
  672. package/vendor/agent-cli/dist/src/context/cache-lease.d.ts.map +1 -0
  673. package/vendor/agent-cli/dist/src/context/cache-lease.js +133 -0
  674. package/vendor/agent-cli/dist/src/context/cache-lease.js.map +1 -0
  675. package/vendor/agent-cli/dist/src/context/cache-prune-diagnostics.d.ts +9 -0
  676. package/vendor/agent-cli/dist/src/context/cache-prune-diagnostics.d.ts.map +1 -0
  677. package/vendor/agent-cli/dist/src/context/cache-prune-diagnostics.js +51 -0
  678. package/vendor/agent-cli/dist/src/context/cache-prune-diagnostics.js.map +1 -0
  679. package/vendor/agent-cli/dist/src/context/cache-publication.d.ts +4 -0
  680. package/vendor/agent-cli/dist/src/context/cache-publication.d.ts.map +1 -0
  681. package/vendor/agent-cli/dist/src/context/cache-publication.js +54 -0
  682. package/vendor/agent-cli/dist/src/context/cache-publication.js.map +1 -0
  683. package/vendor/agent-cli/dist/src/context/client-context-view.d.ts +12 -0
  684. package/vendor/agent-cli/dist/src/context/client-context-view.d.ts.map +1 -0
  685. package/vendor/agent-cli/dist/src/context/client-context-view.js +100 -0
  686. package/vendor/agent-cli/dist/src/context/client-context-view.js.map +1 -0
  687. package/vendor/agent-cli/dist/src/context/context-budget.d.ts +3 -0
  688. package/vendor/agent-cli/dist/src/context/context-budget.d.ts.map +1 -0
  689. package/vendor/agent-cli/dist/src/context/context-budget.js +10 -0
  690. package/vendor/agent-cli/dist/src/context/context-budget.js.map +1 -0
  691. package/vendor/agent-cli/dist/src/context/context-cache.d.ts +108 -0
  692. package/vendor/agent-cli/dist/src/context/context-cache.d.ts.map +1 -0
  693. package/vendor/agent-cli/dist/src/context/context-cache.js +357 -0
  694. package/vendor/agent-cli/dist/src/context/context-cache.js.map +1 -0
  695. package/vendor/agent-cli/dist/src/context/context-project.d.ts +26 -0
  696. package/vendor/agent-cli/dist/src/context/context-project.d.ts.map +1 -0
  697. package/vendor/agent-cli/dist/src/context/context-project.js +113 -0
  698. package/vendor/agent-cli/dist/src/context/context-project.js.map +1 -0
  699. package/vendor/agent-cli/dist/src/context/context-resource.d.ts +4 -0
  700. package/vendor/agent-cli/dist/src/context/context-resource.d.ts.map +1 -0
  701. package/vendor/agent-cli/dist/src/context/context-resource.js +11 -0
  702. package/vendor/agent-cli/dist/src/context/context-resource.js.map +1 -0
  703. package/vendor/agent-cli/dist/src/context/context-snapshot-cache.d.ts +9 -0
  704. package/vendor/agent-cli/dist/src/context/context-snapshot-cache.d.ts.map +1 -0
  705. package/vendor/agent-cli/dist/src/context/context-snapshot-cache.js +134 -0
  706. package/vendor/agent-cli/dist/src/context/context-snapshot-cache.js.map +1 -0
  707. package/vendor/agent-cli/dist/src/context/local-skills.d.ts +4 -0
  708. package/vendor/agent-cli/dist/src/context/local-skills.d.ts.map +1 -0
  709. package/vendor/agent-cli/dist/src/context/local-skills.js +157 -0
  710. package/vendor/agent-cli/dist/src/context/local-skills.js.map +1 -0
  711. package/vendor/agent-cli/dist/src/context/member-context.d.ts +19 -0
  712. package/vendor/agent-cli/dist/src/context/member-context.d.ts.map +1 -0
  713. package/vendor/agent-cli/dist/src/context/member-context.js +105 -0
  714. package/vendor/agent-cli/dist/src/context/member-context.js.map +1 -0
  715. package/vendor/agent-cli/dist/src/context/member-documents.d.ts +3 -0
  716. package/vendor/agent-cli/dist/src/context/member-documents.d.ts.map +1 -0
  717. package/vendor/agent-cli/dist/src/context/member-documents.js +38 -0
  718. package/vendor/agent-cli/dist/src/context/member-documents.js.map +1 -0
  719. package/vendor/agent-cli/dist/src/context/member-profile-header.d.ts +3 -0
  720. package/vendor/agent-cli/dist/src/context/member-profile-header.d.ts.map +1 -0
  721. package/vendor/agent-cli/dist/src/context/member-profile-header.js +62 -0
  722. package/vendor/agent-cli/dist/src/context/member-profile-header.js.map +1 -0
  723. package/vendor/agent-cli/dist/src/context/member-profile.d.ts +43 -0
  724. package/vendor/agent-cli/dist/src/context/member-profile.d.ts.map +1 -0
  725. package/vendor/agent-cli/dist/src/context/member-profile.js +91 -0
  726. package/vendor/agent-cli/dist/src/context/member-profile.js.map +1 -0
  727. package/vendor/agent-cli/dist/src/context/member-selection.d.ts +7 -0
  728. package/vendor/agent-cli/dist/src/context/member-selection.d.ts.map +1 -0
  729. package/vendor/agent-cli/dist/src/context/member-selection.js +58 -0
  730. package/vendor/agent-cli/dist/src/context/member-selection.js.map +1 -0
  731. package/vendor/agent-cli/dist/src/context/script-dependencies.d.ts +6 -0
  732. package/vendor/agent-cli/dist/src/context/script-dependencies.d.ts.map +1 -0
  733. package/vendor/agent-cli/dist/src/context/script-dependencies.js +24 -0
  734. package/vendor/agent-cli/dist/src/context/script-dependencies.js.map +1 -0
  735. package/vendor/agent-cli/dist/src/context/shared-cache-build.d.ts +3 -0
  736. package/vendor/agent-cli/dist/src/context/shared-cache-build.d.ts.map +1 -0
  737. package/vendor/agent-cli/dist/src/context/shared-cache-build.js +55 -0
  738. package/vendor/agent-cli/dist/src/context/shared-cache-build.js.map +1 -0
  739. package/vendor/agent-cli/dist/src/context/team-definition.d.ts +39 -0
  740. package/vendor/agent-cli/dist/src/context/team-definition.d.ts.map +1 -0
  741. package/vendor/agent-cli/dist/src/context/team-definition.js +78 -0
  742. package/vendor/agent-cli/dist/src/context/team-definition.js.map +1 -0
  743. package/vendor/agent-cli/dist/src/context/team-knowledge.d.ts +7 -0
  744. package/vendor/agent-cli/dist/src/context/team-knowledge.d.ts.map +1 -0
  745. package/vendor/agent-cli/dist/src/context/team-knowledge.js +37 -0
  746. package/vendor/agent-cli/dist/src/context/team-knowledge.js.map +1 -0
  747. package/vendor/agent-cli/dist/src/context/template-cache.d.ts +27 -0
  748. package/vendor/agent-cli/dist/src/context/template-cache.d.ts.map +1 -0
  749. package/vendor/agent-cli/dist/src/context/template-cache.js +100 -0
  750. package/vendor/agent-cli/dist/src/context/template-cache.js.map +1 -0
  751. package/vendor/agent-cli/dist/src/context/template-seed.d.ts +32 -0
  752. package/vendor/agent-cli/dist/src/context/template-seed.d.ts.map +1 -0
  753. package/vendor/agent-cli/dist/src/context/template-seed.js +117 -0
  754. package/vendor/agent-cli/dist/src/context/template-seed.js.map +1 -0
  755. package/vendor/agent-cli/dist/src/context/user-skill-bundle.d.ts +19 -0
  756. package/vendor/agent-cli/dist/src/context/user-skill-bundle.d.ts.map +1 -0
  757. package/vendor/agent-cli/dist/src/context/user-skill-bundle.js +292 -0
  758. package/vendor/agent-cli/dist/src/context/user-skill-bundle.js.map +1 -0
  759. package/vendor/agent-cli/dist/src/context/user-skill-context.d.ts +13 -0
  760. package/vendor/agent-cli/dist/src/context/user-skill-context.d.ts.map +1 -0
  761. package/vendor/agent-cli/dist/src/context/user-skill-context.js +178 -0
  762. package/vendor/agent-cli/dist/src/context/user-skill-context.js.map +1 -0
  763. package/vendor/agent-cli/dist/src/context/user-skill-install.d.ts +54 -0
  764. package/vendor/agent-cli/dist/src/context/user-skill-install.d.ts.map +1 -0
  765. package/vendor/agent-cli/dist/src/context/user-skill-install.js +184 -0
  766. package/vendor/agent-cli/dist/src/context/user-skill-install.js.map +1 -0
  767. package/vendor/agent-cli/dist/src/context/zip-extract.d.ts +14 -0
  768. package/vendor/agent-cli/dist/src/context/zip-extract.d.ts.map +1 -0
  769. package/vendor/agent-cli/dist/src/context/zip-extract.js +130 -0
  770. package/vendor/agent-cli/dist/src/context/zip-extract.js.map +1 -0
  771. package/vendor/agent-cli/dist/src/index.d.ts +58 -0
  772. package/vendor/agent-cli/dist/src/index.d.ts.map +1 -0
  773. package/vendor/agent-cli/dist/src/index.js +84 -0
  774. package/vendor/agent-cli/dist/src/index.js.map +1 -0
  775. package/vendor/agent-cli/dist/src/lifecycle/engine-hooks.d.ts +68 -0
  776. package/vendor/agent-cli/dist/src/lifecycle/engine-hooks.d.ts.map +1 -0
  777. package/vendor/agent-cli/dist/src/lifecycle/engine-hooks.js +242 -0
  778. package/vendor/agent-cli/dist/src/lifecycle/engine-hooks.js.map +1 -0
  779. package/vendor/agent-cli/dist/src/lifecycle/hook-command.d.ts +40 -0
  780. package/vendor/agent-cli/dist/src/lifecycle/hook-command.d.ts.map +1 -0
  781. package/vendor/agent-cli/dist/src/lifecycle/hook-command.js +87 -0
  782. package/vendor/agent-cli/dist/src/lifecycle/hook-command.js.map +1 -0
  783. package/vendor/agent-cli/dist/src/lifecycle/registry.d.ts +134 -0
  784. package/vendor/agent-cli/dist/src/lifecycle/registry.d.ts.map +1 -0
  785. package/vendor/agent-cli/dist/src/lifecycle/registry.js +152 -0
  786. package/vendor/agent-cli/dist/src/lifecycle/registry.js.map +1 -0
  787. package/vendor/agent-cli/dist/src/lifecycle/workspace-change.d.ts +40 -0
  788. package/vendor/agent-cli/dist/src/lifecycle/workspace-change.d.ts.map +1 -0
  789. package/vendor/agent-cli/dist/src/lifecycle/workspace-change.js +149 -0
  790. package/vendor/agent-cli/dist/src/lifecycle/workspace-change.js.map +1 -0
  791. package/vendor/agent-cli/dist/src/mcp/client.d.ts +12 -0
  792. package/vendor/agent-cli/dist/src/mcp/client.d.ts.map +1 -0
  793. package/vendor/agent-cli/dist/src/mcp/client.js +95 -0
  794. package/vendor/agent-cli/dist/src/mcp/client.js.map +1 -0
  795. package/vendor/agent-cli/dist/src/mcp/connection.d.ts +14 -0
  796. package/vendor/agent-cli/dist/src/mcp/connection.d.ts.map +1 -0
  797. package/vendor/agent-cli/dist/src/mcp/connection.js +115 -0
  798. package/vendor/agent-cli/dist/src/mcp/connection.js.map +1 -0
  799. package/vendor/agent-cli/dist/src/mcp/execute.d.ts +5 -0
  800. package/vendor/agent-cli/dist/src/mcp/execute.d.ts.map +1 -0
  801. package/vendor/agent-cli/dist/src/mcp/execute.js +26 -0
  802. package/vendor/agent-cli/dist/src/mcp/execute.js.map +1 -0
  803. package/vendor/agent-cli/dist/src/mcp/instance-lock.d.ts +11 -0
  804. package/vendor/agent-cli/dist/src/mcp/instance-lock.d.ts.map +1 -0
  805. package/vendor/agent-cli/dist/src/mcp/instance-lock.js +51 -0
  806. package/vendor/agent-cli/dist/src/mcp/instance-lock.js.map +1 -0
  807. package/vendor/agent-cli/dist/src/mcp/types.d.ts +27 -0
  808. package/vendor/agent-cli/dist/src/mcp/types.d.ts.map +1 -0
  809. package/vendor/agent-cli/dist/src/mcp/types.js +2 -0
  810. package/vendor/agent-cli/dist/src/mcp/types.js.map +1 -0
  811. package/vendor/agent-cli/dist/src/protocol/input.d.ts +21 -0
  812. package/vendor/agent-cli/dist/src/protocol/input.d.ts.map +1 -0
  813. package/vendor/agent-cli/dist/src/protocol/input.js +95 -0
  814. package/vendor/agent-cli/dist/src/protocol/input.js.map +1 -0
  815. package/vendor/agent-cli/dist/src/protocol/link/channel.d.ts +58 -0
  816. package/vendor/agent-cli/dist/src/protocol/link/channel.d.ts.map +1 -0
  817. package/vendor/agent-cli/dist/src/protocol/link/channel.js +337 -0
  818. package/vendor/agent-cli/dist/src/protocol/link/channel.js.map +1 -0
  819. package/vendor/agent-cli/dist/src/protocol/link/codec-json.d.ts +13 -0
  820. package/vendor/agent-cli/dist/src/protocol/link/codec-json.d.ts.map +1 -0
  821. package/vendor/agent-cli/dist/src/protocol/link/codec-json.js +27 -0
  822. package/vendor/agent-cli/dist/src/protocol/link/codec-json.js.map +1 -0
  823. package/vendor/agent-cli/dist/src/protocol/link/envelope.d.ts +57 -0
  824. package/vendor/agent-cli/dist/src/protocol/link/envelope.d.ts.map +1 -0
  825. package/vendor/agent-cli/dist/src/protocol/link/envelope.js +93 -0
  826. package/vendor/agent-cli/dist/src/protocol/link/envelope.js.map +1 -0
  827. package/vendor/agent-cli/dist/src/protocol/link/liveness.d.ts +28 -0
  828. package/vendor/agent-cli/dist/src/protocol/link/liveness.d.ts.map +1 -0
  829. package/vendor/agent-cli/dist/src/protocol/link/liveness.js +86 -0
  830. package/vendor/agent-cli/dist/src/protocol/link/liveness.js.map +1 -0
  831. package/vendor/agent-cli/dist/src/protocol/link/middleware.d.ts +14 -0
  832. package/vendor/agent-cli/dist/src/protocol/link/middleware.d.ts.map +1 -0
  833. package/vendor/agent-cli/dist/src/protocol/link/middleware.js +40 -0
  834. package/vendor/agent-cli/dist/src/protocol/link/middleware.js.map +1 -0
  835. package/vendor/agent-cli/dist/src/protocol/link/rpc.d.ts +31 -0
  836. package/vendor/agent-cli/dist/src/protocol/link/rpc.d.ts.map +1 -0
  837. package/vendor/agent-cli/dist/src/protocol/link/rpc.js +90 -0
  838. package/vendor/agent-cli/dist/src/protocol/link/rpc.js.map +1 -0
  839. package/vendor/agent-cli/dist/src/protocol/link/transport-ws.d.ts +32 -0
  840. package/vendor/agent-cli/dist/src/protocol/link/transport-ws.d.ts.map +1 -0
  841. package/vendor/agent-cli/dist/src/protocol/link/transport-ws.js +106 -0
  842. package/vendor/agent-cli/dist/src/protocol/link/transport-ws.js.map +1 -0
  843. package/vendor/agent-cli/dist/src/protocol/messages/errors.gen.d.ts +509 -0
  844. package/vendor/agent-cli/dist/src/protocol/messages/errors.gen.d.ts.map +1 -0
  845. package/vendor/agent-cli/dist/src/protocol/messages/errors.gen.js +131 -0
  846. package/vendor/agent-cli/dist/src/protocol/messages/errors.gen.js.map +1 -0
  847. package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.d.ts +351 -0
  848. package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.d.ts.map +1 -0
  849. package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.js +103 -0
  850. package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.js.map +1 -0
  851. package/vendor/agent-cli/dist/src/security/binary-read-receipts.d.ts +9 -0
  852. package/vendor/agent-cli/dist/src/security/binary-read-receipts.d.ts.map +1 -0
  853. package/vendor/agent-cli/dist/src/security/binary-read-receipts.js +58 -0
  854. package/vendor/agent-cli/dist/src/security/binary-read-receipts.js.map +1 -0
  855. package/vendor/agent-cli/dist/src/security/command-parse.d.ts +21 -0
  856. package/vendor/agent-cli/dist/src/security/command-parse.d.ts.map +1 -0
  857. package/vendor/agent-cli/dist/src/security/command-parse.js +395 -0
  858. package/vendor/agent-cli/dist/src/security/command-parse.js.map +1 -0
  859. package/vendor/agent-cli/dist/src/security/command-translate.d.ts +30 -0
  860. package/vendor/agent-cli/dist/src/security/command-translate.d.ts.map +1 -0
  861. package/vendor/agent-cli/dist/src/security/command-translate.js +161 -0
  862. package/vendor/agent-cli/dist/src/security/command-translate.js.map +1 -0
  863. package/vendor/agent-cli/dist/src/security/context-write-policy.d.ts +18 -0
  864. package/vendor/agent-cli/dist/src/security/context-write-policy.d.ts.map +1 -0
  865. package/vendor/agent-cli/dist/src/security/context-write-policy.js +121 -0
  866. package/vendor/agent-cli/dist/src/security/context-write-policy.js.map +1 -0
  867. package/vendor/agent-cli/dist/src/security/guard.d.ts +41 -0
  868. package/vendor/agent-cli/dist/src/security/guard.d.ts.map +1 -0
  869. package/vendor/agent-cli/dist/src/security/guard.js +154 -0
  870. package/vendor/agent-cli/dist/src/security/guard.js.map +1 -0
  871. package/vendor/agent-cli/dist/src/security/mount-table.d.ts +47 -0
  872. package/vendor/agent-cli/dist/src/security/mount-table.d.ts.map +1 -0
  873. package/vendor/agent-cli/dist/src/security/mount-table.js +164 -0
  874. package/vendor/agent-cli/dist/src/security/mount-table.js.map +1 -0
  875. package/vendor/agent-cli/dist/src/security/sandbox-path.d.ts +23 -0
  876. package/vendor/agent-cli/dist/src/security/sandbox-path.d.ts.map +1 -0
  877. package/vendor/agent-cli/dist/src/security/sandbox-path.js +110 -0
  878. package/vendor/agent-cli/dist/src/security/sandbox-path.js.map +1 -0
  879. package/vendor/agent-cli/dist/src/security/tool-run-owner.d.ts +5 -0
  880. package/vendor/agent-cli/dist/src/security/tool-run-owner.d.ts.map +1 -0
  881. package/vendor/agent-cli/dist/src/security/tool-run-owner.js +16 -0
  882. package/vendor/agent-cli/dist/src/security/tool-run-owner.js.map +1 -0
  883. package/vendor/agent-cli/dist/src/security/tool-scope.d.ts +16 -0
  884. package/vendor/agent-cli/dist/src/security/tool-scope.d.ts.map +1 -0
  885. package/vendor/agent-cli/dist/src/security/tool-scope.js +88 -0
  886. package/vendor/agent-cli/dist/src/security/tool-scope.js.map +1 -0
  887. package/vendor/agent-cli/dist/src/session/client.d.ts +116 -0
  888. package/vendor/agent-cli/dist/src/session/client.d.ts.map +1 -0
  889. package/vendor/agent-cli/dist/src/session/client.js +376 -0
  890. package/vendor/agent-cli/dist/src/session/client.js.map +1 -0
  891. package/vendor/agent-cli/dist/src/session/custom-context.d.ts +6 -0
  892. package/vendor/agent-cli/dist/src/session/custom-context.d.ts.map +1 -0
  893. package/vendor/agent-cli/dist/src/session/custom-context.js +100 -0
  894. package/vendor/agent-cli/dist/src/session/custom-context.js.map +1 -0
  895. package/vendor/agent-cli/dist/src/session/engine-decide.d.ts +38 -0
  896. package/vendor/agent-cli/dist/src/session/engine-decide.d.ts.map +1 -0
  897. package/vendor/agent-cli/dist/src/session/engine-decide.js +87 -0
  898. package/vendor/agent-cli/dist/src/session/engine-decide.js.map +1 -0
  899. package/vendor/agent-cli/dist/src/session/execution-settlement.d.ts +4 -0
  900. package/vendor/agent-cli/dist/src/session/execution-settlement.d.ts.map +1 -0
  901. package/vendor/agent-cli/dist/src/session/execution-settlement.js +15 -0
  902. package/vendor/agent-cli/dist/src/session/execution-settlement.js.map +1 -0
  903. package/vendor/agent-cli/dist/src/session/link-config.d.ts +13 -0
  904. package/vendor/agent-cli/dist/src/session/link-config.d.ts.map +1 -0
  905. package/vendor/agent-cli/dist/src/session/link-config.js +29 -0
  906. package/vendor/agent-cli/dist/src/session/link-config.js.map +1 -0
  907. package/vendor/agent-cli/dist/src/session/link-outcome.d.ts +30 -0
  908. package/vendor/agent-cli/dist/src/session/link-outcome.d.ts.map +1 -0
  909. package/vendor/agent-cli/dist/src/session/link-outcome.js +67 -0
  910. package/vendor/agent-cli/dist/src/session/link-outcome.js.map +1 -0
  911. package/vendor/agent-cli/dist/src/session/link-session.d.ts +76 -0
  912. package/vendor/agent-cli/dist/src/session/link-session.d.ts.map +1 -0
  913. package/vendor/agent-cli/dist/src/session/link-session.js +412 -0
  914. package/vendor/agent-cli/dist/src/session/link-session.js.map +1 -0
  915. package/vendor/agent-cli/dist/src/session/local-execution.d.ts +28 -0
  916. package/vendor/agent-cli/dist/src/session/local-execution.d.ts.map +1 -0
  917. package/vendor/agent-cli/dist/src/session/local-execution.js +119 -0
  918. package/vendor/agent-cli/dist/src/session/local-execution.js.map +1 -0
  919. package/vendor/agent-cli/dist/src/session/member-tools.d.ts +22 -0
  920. package/vendor/agent-cli/dist/src/session/member-tools.d.ts.map +1 -0
  921. package/vendor/agent-cli/dist/src/session/member-tools.js +72 -0
  922. package/vendor/agent-cli/dist/src/session/member-tools.js.map +1 -0
  923. package/vendor/agent-cli/dist/src/session/process-artifact-publisher.d.ts +7 -0
  924. package/vendor/agent-cli/dist/src/session/process-artifact-publisher.d.ts.map +1 -0
  925. package/vendor/agent-cli/dist/src/session/process-artifact-publisher.js +30 -0
  926. package/vendor/agent-cli/dist/src/session/process-artifact-publisher.js.map +1 -0
  927. package/vendor/agent-cli/dist/src/session/process-environment.d.ts +3 -0
  928. package/vendor/agent-cli/dist/src/session/process-environment.d.ts.map +1 -0
  929. package/vendor/agent-cli/dist/src/session/process-environment.js +22 -0
  930. package/vendor/agent-cli/dist/src/session/process-environment.js.map +1 -0
  931. package/vendor/agent-cli/dist/src/session/process-request.d.ts +36 -0
  932. package/vendor/agent-cli/dist/src/session/process-request.d.ts.map +1 -0
  933. package/vendor/agent-cli/dist/src/session/process-request.js +494 -0
  934. package/vendor/agent-cli/dist/src/session/process-request.js.map +1 -0
  935. package/vendor/agent-cli/dist/src/session/reference-tools.d.ts +8 -0
  936. package/vendor/agent-cli/dist/src/session/reference-tools.d.ts.map +1 -0
  937. package/vendor/agent-cli/dist/src/session/reference-tools.js +34 -0
  938. package/vendor/agent-cli/dist/src/session/reference-tools.js.map +1 -0
  939. package/vendor/agent-cli/dist/src/session/run-events.d.ts +81 -0
  940. package/vendor/agent-cli/dist/src/session/run-events.d.ts.map +1 -0
  941. package/vendor/agent-cli/dist/src/session/run-events.js +160 -0
  942. package/vendor/agent-cli/dist/src/session/run-events.js.map +1 -0
  943. package/vendor/agent-cli/dist/src/session/run-setup.d.ts +76 -0
  944. package/vendor/agent-cli/dist/src/session/run-setup.d.ts.map +1 -0
  945. package/vendor/agent-cli/dist/src/session/run-setup.js +273 -0
  946. package/vendor/agent-cli/dist/src/session/run-setup.js.map +1 -0
  947. package/vendor/agent-cli/dist/src/session/run-start-body.d.ts +41 -0
  948. package/vendor/agent-cli/dist/src/session/run-start-body.d.ts.map +1 -0
  949. package/vendor/agent-cli/dist/src/session/run-start-body.js +64 -0
  950. package/vendor/agent-cli/dist/src/session/run-start-body.js.map +1 -0
  951. package/vendor/agent-cli/dist/src/session/team-persistence.d.ts +17 -0
  952. package/vendor/agent-cli/dist/src/session/team-persistence.d.ts.map +1 -0
  953. package/vendor/agent-cli/dist/src/session/team-persistence.js +75 -0
  954. package/vendor/agent-cli/dist/src/session/team-persistence.js.map +1 -0
  955. package/vendor/agent-cli/dist/src/session/tool-scheduler.d.ts +37 -0
  956. package/vendor/agent-cli/dist/src/session/tool-scheduler.d.ts.map +1 -0
  957. package/vendor/agent-cli/dist/src/session/tool-scheduler.js +232 -0
  958. package/vendor/agent-cli/dist/src/session/tool-scheduler.js.map +1 -0
  959. package/vendor/agent-cli/dist/src/session/user-choice.d.ts +5 -0
  960. package/vendor/agent-cli/dist/src/session/user-choice.d.ts.map +1 -0
  961. package/vendor/agent-cli/dist/src/session/user-choice.js +80 -0
  962. package/vendor/agent-cli/dist/src/session/user-choice.js.map +1 -0
  963. package/vendor/agent-cli/dist/src/session/user-skill-loaded.d.ts +31 -0
  964. package/vendor/agent-cli/dist/src/session/user-skill-loaded.d.ts.map +1 -0
  965. package/vendor/agent-cli/dist/src/session/user-skill-loaded.js +104 -0
  966. package/vendor/agent-cli/dist/src/session/user-skill-loaded.js.map +1 -0
  967. package/vendor/agent-cli/dist/src/shared/app-id.d.ts +13 -0
  968. package/vendor/agent-cli/dist/src/shared/app-id.d.ts.map +1 -0
  969. package/vendor/agent-cli/dist/src/shared/app-id.js +25 -0
  970. package/vendor/agent-cli/dist/src/shared/app-id.js.map +1 -0
  971. package/vendor/agent-cli/dist/src/shared/auth-headers.d.ts +13 -0
  972. package/vendor/agent-cli/dist/src/shared/auth-headers.d.ts.map +1 -0
  973. package/vendor/agent-cli/dist/src/shared/auth-headers.js +16 -0
  974. package/vendor/agent-cli/dist/src/shared/auth-headers.js.map +1 -0
  975. package/vendor/agent-cli/dist/src/shared/cli-version.d.ts +3 -0
  976. package/vendor/agent-cli/dist/src/shared/cli-version.d.ts.map +1 -0
  977. package/vendor/agent-cli/dist/src/shared/cli-version.js +22 -0
  978. package/vendor/agent-cli/dist/src/shared/cli-version.js.map +1 -0
  979. package/vendor/agent-cli/dist/src/shared/error-detail.d.ts +14 -0
  980. package/vendor/agent-cli/dist/src/shared/error-detail.d.ts.map +1 -0
  981. package/vendor/agent-cli/dist/src/shared/error-detail.js +29 -0
  982. package/vendor/agent-cli/dist/src/shared/error-detail.js.map +1 -0
  983. package/vendor/agent-cli/dist/src/shared/output-guard.d.ts +36 -0
  984. package/vendor/agent-cli/dist/src/shared/output-guard.d.ts.map +1 -0
  985. package/vendor/agent-cli/dist/src/shared/output-guard.js +94 -0
  986. package/vendor/agent-cli/dist/src/shared/output-guard.js.map +1 -0
  987. package/vendor/agent-cli/dist/src/shared/process-cwd.d.ts +3 -0
  988. package/vendor/agent-cli/dist/src/shared/process-cwd.d.ts.map +1 -0
  989. package/vendor/agent-cli/dist/src/shared/process-cwd.js +11 -0
  990. package/vendor/agent-cli/dist/src/shared/process-cwd.js.map +1 -0
  991. package/vendor/agent-cli/dist/src/shared/process-types.d.ts +60 -0
  992. package/vendor/agent-cli/dist/src/shared/process-types.d.ts.map +1 -0
  993. package/vendor/agent-cli/dist/src/shared/process-types.js +10 -0
  994. package/vendor/agent-cli/dist/src/shared/process-types.js.map +1 -0
  995. package/vendor/agent-cli/dist/src/shared/server-headers.d.ts +7 -0
  996. package/vendor/agent-cli/dist/src/shared/server-headers.d.ts.map +1 -0
  997. package/vendor/agent-cli/dist/src/shared/server-headers.js +113 -0
  998. package/vendor/agent-cli/dist/src/shared/server-headers.js.map +1 -0
  999. package/vendor/agent-cli/dist/src/shared/shell-runtime.d.ts +47 -0
  1000. package/vendor/agent-cli/dist/src/shared/shell-runtime.d.ts.map +1 -0
  1001. package/vendor/agent-cli/dist/src/shared/shell-runtime.js +210 -0
  1002. package/vendor/agent-cli/dist/src/shared/shell-runtime.js.map +1 -0
  1003. package/vendor/agent-cli/dist/src/shared/types.d.ts +458 -0
  1004. package/vendor/agent-cli/dist/src/shared/types.d.ts.map +1 -0
  1005. package/vendor/agent-cli/dist/src/shared/types.js +2 -0
  1006. package/vendor/agent-cli/dist/src/shared/types.js.map +1 -0
  1007. package/vendor/agent-cli/dist/src/shared/user-choice.d.ts +22 -0
  1008. package/vendor/agent-cli/dist/src/shared/user-choice.d.ts.map +1 -0
  1009. package/vendor/agent-cli/dist/src/shared/user-choice.js +2 -0
  1010. package/vendor/agent-cli/dist/src/shared/user-choice.js.map +1 -0
  1011. package/vendor/agent-cli/dist/src/tools/artifact-publisher.d.ts +9 -0
  1012. package/vendor/agent-cli/dist/src/tools/artifact-publisher.d.ts.map +1 -0
  1013. package/vendor/agent-cli/dist/src/tools/artifact-publisher.js +85 -0
  1014. package/vendor/agent-cli/dist/src/tools/artifact-publisher.js.map +1 -0
  1015. package/vendor/agent-cli/dist/src/tools/command-executor.d.ts +30 -0
  1016. package/vendor/agent-cli/dist/src/tools/command-executor.d.ts.map +1 -0
  1017. package/vendor/agent-cli/dist/src/tools/command-executor.js +96 -0
  1018. package/vendor/agent-cli/dist/src/tools/command-executor.js.map +1 -0
  1019. package/vendor/agent-cli/dist/src/tools/context-program-publish.d.ts +16 -0
  1020. package/vendor/agent-cli/dist/src/tools/context-program-publish.d.ts.map +1 -0
  1021. package/vendor/agent-cli/dist/src/tools/context-program-publish.js +104 -0
  1022. package/vendor/agent-cli/dist/src/tools/context-program-publish.js.map +1 -0
  1023. package/vendor/agent-cli/dist/src/tools/context-program.d.ts +21 -0
  1024. package/vendor/agent-cli/dist/src/tools/context-program.d.ts.map +1 -0
  1025. package/vendor/agent-cli/dist/src/tools/context-program.js +207 -0
  1026. package/vendor/agent-cli/dist/src/tools/context-program.js.map +1 -0
  1027. package/vendor/agent-cli/dist/src/tools/file-ops.d.ts +61 -0
  1028. package/vendor/agent-cli/dist/src/tools/file-ops.d.ts.map +1 -0
  1029. package/vendor/agent-cli/dist/src/tools/file-ops.js +477 -0
  1030. package/vendor/agent-cli/dist/src/tools/file-ops.js.map +1 -0
  1031. package/vendor/agent-cli/dist/src/tools/local-hands.d.ts +58 -0
  1032. package/vendor/agent-cli/dist/src/tools/local-hands.d.ts.map +1 -0
  1033. package/vendor/agent-cli/dist/src/tools/local-hands.js +322 -0
  1034. package/vendor/agent-cli/dist/src/tools/local-hands.js.map +1 -0
  1035. package/vendor/agent-cli/dist/src/tools/ripgrep-search.d.ts +24 -0
  1036. package/vendor/agent-cli/dist/src/tools/ripgrep-search.d.ts.map +1 -0
  1037. package/vendor/agent-cli/dist/src/tools/ripgrep-search.js +160 -0
  1038. package/vendor/agent-cli/dist/src/tools/ripgrep-search.js.map +1 -0
  1039. package/vendor/agent-cli/dist/src/tools/tool-contract.gen.d.ts +66 -0
  1040. package/vendor/agent-cli/dist/src/tools/tool-contract.gen.d.ts.map +1 -0
  1041. package/vendor/agent-cli/dist/src/tools/tool-contract.gen.js +65 -0
  1042. package/vendor/agent-cli/dist/src/tools/tool-contract.gen.js.map +1 -0
  1043. package/vendor/agent-cli/dist/src/tools/tool-timeout.d.ts +29 -0
  1044. package/vendor/agent-cli/dist/src/tools/tool-timeout.d.ts.map +1 -0
  1045. package/vendor/agent-cli/dist/src/tools/tool-timeout.js +88 -0
  1046. package/vendor/agent-cli/dist/src/tools/tool-timeout.js.map +1 -0
  1047. package/vendor/agent-cli/dist/src/tools/write-guard.d.ts +42 -0
  1048. package/vendor/agent-cli/dist/src/tools/write-guard.d.ts.map +1 -0
  1049. package/vendor/agent-cli/dist/src/tools/write-guard.js +34 -0
  1050. package/vendor/agent-cli/dist/src/tools/write-guard.js.map +1 -0
  1051. package/vendor/agent-cli/package.json +29 -0
@@ -0,0 +1,292 @@
1
+ import { inflateRawSync } from 'node:zlib';
2
+ export const MAX_USER_SKILL_ARCHIVE_BYTES = 5 * 1024 * 1024;
3
+ export const MAX_USER_SKILL_FILE_BYTES = 3 * 1024 * 1024;
4
+ export const MAX_USER_SKILL_TOTAL_BYTES = 20 * 1024 * 1024;
5
+ export const MAX_USER_SKILL_ENTRIES = 256;
6
+ export const MAX_USER_SKILLS_PER_INSTALL = 50;
7
+ export const MAX_USER_SKILL_INSTALL_BYTES = 64 * 1024 * 1024;
8
+ const SIG_LOCAL = 0x04034b50;
9
+ const SIG_CENTRAL = 0x02014b50;
10
+ const SIG_EOCD = 0x06054b50;
11
+ const utf8 = new TextDecoder('utf-8', { fatal: true });
12
+ const CRC_TABLE = (() => {
13
+ const table = new Uint32Array(256);
14
+ for (let n = 0; n < 256; n++) {
15
+ let value = n;
16
+ for (let bit = 0; bit < 8; bit++)
17
+ value = value & 1 ? 0xedb88320 ^ (value >>> 1) : value >>> 1;
18
+ table[n] = value >>> 0;
19
+ }
20
+ return table;
21
+ })();
22
+ function crc32(bytes) {
23
+ let crc = 0xffffffff;
24
+ for (const byte of bytes)
25
+ crc = CRC_TABLE[(crc ^ byte) & 0xff] ^ (crc >>> 8);
26
+ return (crc ^ 0xffffffff) >>> 0;
27
+ }
28
+ function fail(message) {
29
+ throw new Error(`invalid user skill bundle: ${message}`);
30
+ }
31
+ function isZip(bytes) {
32
+ return bytes.length >= 4 && [SIG_LOCAL, SIG_EOCD, 0x08074b50].includes(bytes.readUInt32LE(0));
33
+ }
34
+ function findEocd(bytes) {
35
+ const min = Math.max(0, bytes.length - 22 - 0xffff);
36
+ for (let offset = bytes.length - 22; offset >= min; offset--) {
37
+ if (bytes.readUInt32LE(offset) !== SIG_EOCD)
38
+ continue;
39
+ const commentSize = bytes.readUInt16LE(offset + 20);
40
+ if (offset + 22 + commentSize === bytes.length)
41
+ return offset;
42
+ }
43
+ return fail('end record missing or malformed');
44
+ }
45
+ function decodeName(bytes, start, size, utf8Names) {
46
+ if (start < 0 || size < 0 || start + size > bytes.length)
47
+ return fail('truncated entry name');
48
+ const value = bytes.subarray(start, start + size);
49
+ if (!utf8Names && value.some((byte) => byte >= 0x80))
50
+ return fail('non-UTF-8 entry names are unsupported');
51
+ try {
52
+ return utf8.decode(value);
53
+ }
54
+ catch {
55
+ return fail('entry name is not valid UTF-8');
56
+ }
57
+ }
58
+ function safeEntryPath(raw, directory) {
59
+ if (!raw || raw.includes('\0'))
60
+ return fail('empty or invalid path');
61
+ const slashPath = raw.replace(/\\/g, '/');
62
+ if (slashPath.startsWith('/') || /^[a-z]:/i.test(slashPath) || slashPath.startsWith('//')) {
63
+ return fail('absolute or drive path is forbidden');
64
+ }
65
+ const parts = slashPath.split('/');
66
+ if (directory && parts.at(-1) === '')
67
+ parts.pop();
68
+ if (parts.length === 0 || parts.some((part) => !part || part === '.' || part === '..')) {
69
+ return fail('dot or empty path segment is forbidden');
70
+ }
71
+ for (const part of parts) {
72
+ if (Buffer.byteLength(part, 'utf8') > 255 || /[\x00-\x1f\x7f<>:"|?*]/.test(part) || /[ .]$/.test(part)) {
73
+ return fail('unsafe path segment');
74
+ }
75
+ const base = part.split('.')[0].toUpperCase();
76
+ if (/^(CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9])$/.test(base))
77
+ return fail('reserved device name');
78
+ }
79
+ const name = parts.join('/');
80
+ return { name, key: name.normalize('NFC').toLocaleLowerCase('en-US') };
81
+ }
82
+ function readEntries(bytes) {
83
+ if (bytes.length > MAX_USER_SKILL_ARCHIVE_BYTES)
84
+ return fail('archive exceeds size limit');
85
+ const eocd = findEocd(bytes);
86
+ const disk = bytes.readUInt16LE(eocd + 4);
87
+ const centralDisk = bytes.readUInt16LE(eocd + 6);
88
+ const diskCount = bytes.readUInt16LE(eocd + 8);
89
+ const count = bytes.readUInt16LE(eocd + 10);
90
+ const centralSize = bytes.readUInt32LE(eocd + 12);
91
+ const centralOffset = bytes.readUInt32LE(eocd + 16);
92
+ if (disk !== 0 || centralDisk !== 0 || diskCount !== count || count === 0xffff || centralSize === 0xffffffff || centralOffset === 0xffffffff) {
93
+ return fail('multi-disk and Zip64 archives are unsupported');
94
+ }
95
+ if (count === 0 || count > MAX_USER_SKILL_ENTRIES || centralOffset + centralSize !== eocd) {
96
+ return fail('invalid entry count or directory bounds');
97
+ }
98
+ const entries = [];
99
+ const kinds = new Map();
100
+ let offset = centralOffset;
101
+ let total = 0;
102
+ for (let index = 0; index < count; index++) {
103
+ if (offset + 46 > eocd || bytes.readUInt32LE(offset) !== SIG_CENTRAL)
104
+ return fail('invalid central directory entry');
105
+ const madeBy = bytes.readUInt16LE(offset + 4) >>> 8;
106
+ const flags = bytes.readUInt16LE(offset + 8);
107
+ const method = bytes.readUInt16LE(offset + 10);
108
+ const crc = bytes.readUInt32LE(offset + 16);
109
+ const compressedSize = bytes.readUInt32LE(offset + 20);
110
+ const size = bytes.readUInt32LE(offset + 24);
111
+ const nameSize = bytes.readUInt16LE(offset + 28);
112
+ const extraSize = bytes.readUInt16LE(offset + 30);
113
+ const commentSize = bytes.readUInt16LE(offset + 32);
114
+ const externalAttrs = bytes.readUInt32LE(offset + 38);
115
+ const localOffset = bytes.readUInt32LE(offset + 42);
116
+ const recordEnd = offset + 46 + nameSize + extraSize + commentSize;
117
+ if (recordEnd > eocd || compressedSize === 0xffffffff || size === 0xffffffff || localOffset === 0xffffffff)
118
+ return fail('truncated or Zip64 entry');
119
+ const rawName = decodeName(bytes, offset + 46, nameSize, (flags & 0x0800) !== 0);
120
+ offset = recordEnd;
121
+ if (flags & 0x0001)
122
+ return fail('encrypted entries are unsupported');
123
+ if (method !== 0 && method !== 8)
124
+ return fail('unsupported compression method');
125
+ const trailingSlash = /[\\/]$/.test(rawName);
126
+ const unixMode = madeBy === 3 ? (externalAttrs >>> 16) & 0xffff : 0;
127
+ const fileType = unixMode & 0o170000;
128
+ if (fileType === 0o120000 || (fileType !== 0 && fileType !== 0o100000 && fileType !== 0o040000)) {
129
+ return fail('symlinks and special files are forbidden');
130
+ }
131
+ const directory = trailingSlash || fileType === 0o040000;
132
+ if (directory && size !== 0)
133
+ return fail('directory entries must be empty');
134
+ const safe = safeEntryPath(rawName, directory);
135
+ if (directory && size)
136
+ return fail('directory entries must be empty');
137
+ if (!directory) {
138
+ if (size > MAX_USER_SKILL_FILE_BYTES)
139
+ return fail('file exceeds size limit');
140
+ total += size;
141
+ if (total > MAX_USER_SKILL_TOTAL_BYTES)
142
+ return fail('expanded bundle exceeds size limit');
143
+ }
144
+ const previous = kinds.get(safe.key);
145
+ if (previous && (previous.name !== safe.name || previous.directory !== directory || !directory)) {
146
+ return fail('duplicate or case-colliding paths');
147
+ }
148
+ kinds.set(safe.key, { name: safe.name, directory });
149
+ const parts = safe.name.split('/');
150
+ for (let parent = 1; parent < parts.length; parent++) {
151
+ const parentName = parts.slice(0, parent).join('/');
152
+ const parentKey = parentName.normalize('NFC').toLocaleLowerCase('en-US');
153
+ const known = kinds.get(parentKey);
154
+ if (known && (!known.directory || known.name !== parentName))
155
+ return fail('file/directory path collision');
156
+ kinds.set(parentKey, { name: parentName, directory: true });
157
+ }
158
+ if (!directory && [...kinds.entries()].some(([key, known]) => key !== safe.key && key.startsWith(`${safe.key}/`) && known.name !== safe.name)) {
159
+ return fail('file/directory path collision');
160
+ }
161
+ entries.push({ name: safe.name, key: safe.key, directory, method, flags, crc, compressedSize, size, executable: !directory && (unixMode & 0o111) !== 0, localOffset });
162
+ }
163
+ if (offset !== eocd)
164
+ return fail('central directory size mismatch');
165
+ return entries;
166
+ }
167
+ function inflateEntry(bytes, entry, centralOffset) {
168
+ const offset = entry.localOffset;
169
+ if (offset + 30 > centralOffset || bytes.readUInt32LE(offset) !== SIG_LOCAL)
170
+ return fail('invalid local header');
171
+ const flags = bytes.readUInt16LE(offset + 6);
172
+ const method = bytes.readUInt16LE(offset + 8);
173
+ const nameSize = bytes.readUInt16LE(offset + 26);
174
+ const extraSize = bytes.readUInt16LE(offset + 28);
175
+ if ((flags & 0x0001) || flags !== entry.flags || method !== entry.method)
176
+ return fail('local header mismatch');
177
+ const localName = decodeName(bytes, offset + 30, nameSize, (flags & 0x0800) !== 0);
178
+ if (safeEntryPath(localName, entry.directory).name !== entry.name)
179
+ return fail('local path mismatch');
180
+ const start = offset + 30 + nameSize + extraSize;
181
+ const end = start + entry.compressedSize;
182
+ if (start > centralOffset || end > centralOffset || end < start)
183
+ return fail('truncated entry data');
184
+ let data;
185
+ try {
186
+ const compressed = bytes.subarray(start, end);
187
+ data = entry.method === 0 ? Buffer.from(compressed) : inflateRawSync(compressed, { maxOutputLength: entry.size });
188
+ }
189
+ catch {
190
+ return fail('entry decompression failed');
191
+ }
192
+ if (data.length !== entry.size || crc32(data) !== entry.crc)
193
+ return fail('entry size or checksum mismatch');
194
+ return data;
195
+ }
196
+ export function readSkillFrontmatter(content) {
197
+ const normalized = content.replace(/^\uFEFF/, '');
198
+ if (!normalized.startsWith('---'))
199
+ return {};
200
+ const end = normalized.search(/\r?\n---(?:\r?$)/m);
201
+ if (end < 0)
202
+ return {};
203
+ const frontmatter = normalized.slice(3, end);
204
+ const readScalar = (key) => {
205
+ const match = frontmatter.match(new RegExp(`^${key}:\\s*(.+)$`, 'm'));
206
+ if (!match)
207
+ return '';
208
+ const raw = match[1].trim();
209
+ if ((raw.startsWith('"') && raw.endsWith('"')) || (raw.startsWith("'") && raw.endsWith("'")))
210
+ return raw.slice(1, -1).trim();
211
+ return raw;
212
+ };
213
+ const name = readScalar('name');
214
+ const description = readScalar('description');
215
+ return { ...(name ? { name } : {}), ...(description ? { description } : {}) };
216
+ }
217
+ function parseSkillMd(content) {
218
+ const metadata = readSkillFrontmatter(content);
219
+ if (!isSafeSkillName(metadata.name ?? '') || !metadata.description)
220
+ return fail('SKILL.md name or description is invalid');
221
+ return { name: metadata.name, description: metadata.description };
222
+ }
223
+ export function isSafeSkillName(name) {
224
+ if (!name || name !== name.trim() || name.endsWith('.') || name.length > 128 || !/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(name) || name === '.' || name === '..')
225
+ return false;
226
+ const base = name.split('.')[0].toUpperCase();
227
+ return !/^(CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9])$/.test(base);
228
+ }
229
+ export function parseUserSkillBundle(input) {
230
+ const bytes = Buffer.from(input);
231
+ if (bytes.length === 0 || bytes.length > MAX_USER_SKILL_ARCHIVE_BYTES)
232
+ return fail('bundle is empty or exceeds size limit');
233
+ let files = new Map();
234
+ let executableFiles = new Set();
235
+ if (isZip(bytes)) {
236
+ const eocd = findEocd(bytes);
237
+ const centralOffset = bytes.readUInt32LE(eocd + 16);
238
+ const entries = readEntries(bytes);
239
+ let total = 0;
240
+ const markdownPaths = [];
241
+ for (const entry of entries) {
242
+ if (entry.directory)
243
+ continue;
244
+ const content = inflateEntry(bytes, entry, centralOffset);
245
+ total += content.length;
246
+ if (total > MAX_USER_SKILL_TOTAL_BYTES)
247
+ return fail('expanded bundle exceeds size limit');
248
+ files.set(entry.name, content);
249
+ if (entry.executable)
250
+ executableFiles.add(entry.name);
251
+ if (entry.name.split('/').at(-1).toLowerCase() === 'skill.md')
252
+ markdownPaths.push(entry.name);
253
+ }
254
+ if (markdownPaths.length !== 1)
255
+ return fail('bundle must contain exactly one SKILL.md');
256
+ const skillDir = markdownPaths[0].includes('/') ? markdownPaths[0].slice(0, markdownPaths[0].lastIndexOf('/')) : '';
257
+ if (skillDir) {
258
+ const prefix = `${skillDir}/`;
259
+ files = new Map([...files.entries()].filter(([name]) => name.startsWith(prefix)).map(([name, data]) => [name.slice(prefix.length), data]));
260
+ executableFiles = new Set([...executableFiles].filter((name) => name.startsWith(prefix)).map((name) => name.slice(prefix.length)));
261
+ }
262
+ const md = [...files.entries()].find(([name]) => name.toLowerCase() === 'skill.md');
263
+ if (!md)
264
+ return fail('normalized SKILL.md is missing');
265
+ files.delete(md[0]);
266
+ files.set('SKILL.md', md[1]);
267
+ if (executableFiles.delete(md[0]))
268
+ executableFiles.add('SKILL.md');
269
+ }
270
+ else {
271
+ if (bytes.length > MAX_USER_SKILL_FILE_BYTES)
272
+ return fail('file exceeds size limit');
273
+ files.set('SKILL.md', bytes);
274
+ }
275
+ let content;
276
+ try {
277
+ content = utf8.decode(files.get('SKILL.md'));
278
+ }
279
+ catch {
280
+ return fail('SKILL.md is not valid UTF-8');
281
+ }
282
+ const metadata = parseSkillMd(content);
283
+ const duplicateNames = new Set();
284
+ for (const name of files.keys()) {
285
+ const key = name.toLocaleLowerCase('en-US');
286
+ if (duplicateNames.has(key))
287
+ return fail('case-colliding files');
288
+ duplicateNames.add(key);
289
+ }
290
+ return { ...metadata, files, executableFiles };
291
+ }
292
+ //# sourceMappingURL=user-skill-bundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-skill-bundle.js","sourceRoot":"","sources":["../../../src/context/user-skill-bundle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAE3C,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;AAC5D,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;AACzD,MAAM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U,CAAE,CAAC,CAAC;IAAC,CAAC;IAAC,MAAM,CAAC;QAAC,OAAO,IAAI,CAAC,6BAA6B,CAAC,CAAC;IAAC,CAAC;IAC5G,MAAM,QAAQ,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;IACvC,MAAM,cAAc,GAAG,IAAI,GAAG,EAAU,CAAC;IACzC,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC;QAChC,MAAM,GAAG,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC5C,IAAI,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,OAAO,IAAI,CAAC,sBAAsB,CAAC,CAAC;QACjE,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC;IACD,OAAO,EAAE,GAAG,QAAQ,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC;AACjD,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { UserSkillBundleInput } from '../shared/types.js';
2
+ export interface UserSkillContextResult {
3
+ contextDir: string;
4
+ cleanupRoot: string;
5
+ }
6
+ /** Build a disposable copy of one engine context with pinned user skill packages merged under skills/. */
7
+ export declare function createUserSkillContext(args: {
8
+ engineContextDir?: string;
9
+ workspaceDir: string;
10
+ bundles: readonly UserSkillBundleInput[];
11
+ }): Promise<UserSkillContextResult>;
12
+ export declare function cleanupUserSkillContext(cleanupRoot: string): Promise<void>;
13
+ //# sourceMappingURL=user-skill-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-skill-context.d.ts","sourceRoot":"","sources":["../../../src/context/user-skill-context.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAM/D,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB;AAsGD,0GAA0G;AAC1G,wBAAsB,sBAAsB,CAAC,IAAI,EAAE;IACjD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,SAAS,oBAAoB,EAAE,CAAC;CAC1C,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAyClC;AAED,wBAAsB,uBAAuB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEhF"}
@@ -0,0 +1,178 @@
1
+ import fs from 'node:fs/promises';
2
+ import { constants as fsConstants } from 'node:fs';
3
+ import os from 'node:os';
4
+ import path from 'node:path';
5
+ import { installUserSkillBundles, UserSkillInstallRecoveryError } from './user-skill-install.js';
6
+ import { MAX_USER_SKILL_FILE_BYTES, readSkillFrontmatter } from './user-skill-bundle.js';
7
+ const MAX_CONTEXT_ENTRIES = 50_000;
8
+ const MAX_CONTEXT_BYTES = 1024 * 1024 * 1024;
9
+ const MAX_CONTEXT_FILE_BYTES = 32 * 1024 * 1024;
10
+ function pathKey(name) {
11
+ return name.normalize('NFC').toLocaleLowerCase('en-US');
12
+ }
13
+ function assertSafeName(name) {
14
+ if (!name || name === '.' || name === '..' || /[\\/\0<>:"|?*]/.test(name) || /[ .]$/.test(name)) {
15
+ throw new Error(`unsafe context entry name: ${name}`);
16
+ }
17
+ const device = name.split('.')[0].toUpperCase();
18
+ if (/^(CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9])$/.test(device))
19
+ throw new Error(`reserved context entry name: ${name}`);
20
+ }
21
+ async function copyDirectory(source, destination, state) {
22
+ const rootInfo = await fs.lstat(source);
23
+ if (rootInfo.isSymbolicLink() || !rootInfo.isDirectory())
24
+ throw new Error(`context source must be a real directory: ${source}`);
25
+ await fs.mkdir(destination, { recursive: true, mode: rootInfo.mode & 0o777 });
26
+ const rootReal = await fs.realpath(source);
27
+ for (const entry of await fs.readdir(source, { withFileTypes: true })) {
28
+ assertSafeName(entry.name);
29
+ const from = path.join(source, entry.name);
30
+ const to = path.join(destination, entry.name);
31
+ const info = await fs.lstat(from);
32
+ state.entries++;
33
+ if (state.entries > MAX_CONTEXT_ENTRIES)
34
+ throw new Error('engine context contains too many entries');
35
+ if (info.isSymbolicLink())
36
+ throw new Error(`engine context symlink is not allowed: ${from}`);
37
+ if (info.isDirectory()) {
38
+ await copyDirectory(from, to, state);
39
+ continue;
40
+ }
41
+ if (!info.isFile())
42
+ throw new Error(`engine context contains a special file: ${from}`);
43
+ if (info.size > MAX_CONTEXT_FILE_BYTES)
44
+ throw new Error(`engine context file exceeds copy limit: ${from}`);
45
+ state.bytes += info.size;
46
+ if (state.bytes > MAX_CONTEXT_BYTES)
47
+ throw new Error('engine context exceeds temporary copy size limit');
48
+ const noFollow = fsConstants.O_NOFOLLOW ?? 0;
49
+ const handle = await fs.open(from, fsConstants.O_RDONLY | noFollow);
50
+ try {
51
+ const opened = await handle.stat();
52
+ if (!opened.isFile() || opened.size !== info.size || opened.size > MAX_CONTEXT_FILE_BYTES)
53
+ throw new Error(`engine context changed during copy: ${from}`);
54
+ const real = await fs.realpath(from);
55
+ const relative = path.relative(rootReal, real);
56
+ if (relative === '..' || relative.startsWith(`..${path.sep}`) || path.isAbsolute(relative)) {
57
+ throw new Error(`engine context path escaped its root: ${from}`);
58
+ }
59
+ const data = await readHandleBounded(handle, MAX_CONTEXT_FILE_BYTES);
60
+ if (data.length !== opened.size || (await handle.stat()).size !== opened.size)
61
+ throw new Error(`engine context changed during copy: ${from}`);
62
+ await fs.writeFile(to, data, { flag: 'wx', mode: info.mode & 0o777 });
63
+ }
64
+ finally {
65
+ await handle.close();
66
+ }
67
+ }
68
+ }
69
+ async function readHandleBounded(handle, maxBytes) {
70
+ const chunks = [];
71
+ let total = 0;
72
+ while (total <= maxBytes) {
73
+ const chunk = Buffer.allocUnsafe(Math.min(64 * 1024, maxBytes + 1 - total));
74
+ const { bytesRead } = await handle.read(chunk, 0, chunk.length, null);
75
+ if (bytesRead === 0)
76
+ break;
77
+ total += bytesRead;
78
+ if (total > maxBytes)
79
+ throw new Error('file grew past its bounded read limit');
80
+ chunks.push(chunk.subarray(0, bytesRead));
81
+ }
82
+ return Buffer.concat(chunks, total);
83
+ }
84
+ async function existingSkillNames(contextDir) {
85
+ const skillsDir = path.join(contextDir, 'skills');
86
+ const info = await fs.lstat(skillsDir).catch((error) => error.code === 'ENOENT' ? undefined : Promise.reject(error));
87
+ if (!info)
88
+ return [];
89
+ if (info.isSymbolicLink() || !info.isDirectory())
90
+ throw new Error('engine skills path must be a real directory');
91
+ const names = [];
92
+ for (const entry of await fs.readdir(skillsDir, { withFileTypes: true })) {
93
+ names.push(entry.name);
94
+ const entryPath = path.join(skillsDir, entry.name);
95
+ const entryInfo = await fs.lstat(entryPath);
96
+ if (entryInfo.isSymbolicLink())
97
+ throw new Error(`engine skill symlink is not allowed: ${entryPath}`);
98
+ if (!entryInfo.isDirectory())
99
+ continue;
100
+ const markdownPath = path.join(entryPath, 'SKILL.md');
101
+ const markdownInfo = await fs.lstat(markdownPath).catch((error) => error.code === 'ENOENT' ? undefined : Promise.reject(error));
102
+ if (!markdownInfo)
103
+ continue;
104
+ if (markdownInfo.isSymbolicLink() || !markdownInfo.isFile())
105
+ throw new Error(`engine SKILL.md must be a regular file: ${markdownPath}`);
106
+ if (markdownInfo.size > MAX_USER_SKILL_FILE_BYTES)
107
+ throw new Error(`engine SKILL.md exceeds metadata scan limit: ${markdownPath}`);
108
+ const handle = await fs.open(markdownPath, fsConstants.O_RDONLY | (fsConstants.O_NOFOLLOW ?? 0));
109
+ try {
110
+ const opened = await handle.stat();
111
+ if (!opened.isFile() || opened.size !== markdownInfo.size || opened.size > MAX_USER_SKILL_FILE_BYTES) {
112
+ throw new Error(`engine SKILL.md changed during metadata scan: ${markdownPath}`);
113
+ }
114
+ const content = await readHandleBounded(handle, MAX_USER_SKILL_FILE_BYTES);
115
+ if (content.length !== opened.size || (await handle.stat()).size !== opened.size)
116
+ throw new Error(`engine SKILL.md changed during metadata scan: ${markdownPath}`);
117
+ const declaredName = readSkillFrontmatter(content.toString('utf8')).name;
118
+ if (declaredName)
119
+ names.push(declaredName);
120
+ }
121
+ finally {
122
+ await handle.close();
123
+ }
124
+ }
125
+ return names;
126
+ }
127
+ /** Build a disposable copy of one engine context with pinned user skill packages merged under skills/. */
128
+ export async function createUserSkillContext(args) {
129
+ if (args.bundles.length === 0)
130
+ throw new Error('user skill context requires at least one bundle');
131
+ const cleanupRoot = await fs.mkdtemp(path.join(os.tmpdir(), 'agent-cli-user-skill-run-'));
132
+ const installRoot = path.join(cleanupRoot, 'installed');
133
+ const contextDir = path.join(cleanupRoot, 'context');
134
+ try {
135
+ let systemNames = [];
136
+ if (args.engineContextDir) {
137
+ systemNames = await existingSkillNames(args.engineContextDir);
138
+ }
139
+ const installed = await installUserSkillBundles({
140
+ installRoot,
141
+ scopeId: 'run',
142
+ projectDir: args.workspaceDir,
143
+ ...(args.engineContextDir ? { contextDir: args.engineContextDir } : {}),
144
+ systemSkillNames: systemNames,
145
+ bundles: args.bundles,
146
+ });
147
+ if (args.engineContextDir) {
148
+ await copyDirectory(args.engineContextDir, contextDir, { entries: 0, bytes: 0 });
149
+ }
150
+ else {
151
+ await fs.mkdir(contextDir, { recursive: true, mode: 0o700 });
152
+ }
153
+ const destinationSkills = path.join(contextDir, 'skills');
154
+ const skillDirInfo = await fs.lstat(destinationSkills).catch((error) => error.code === 'ENOENT' ? undefined : Promise.reject(error));
155
+ if (!skillDirInfo)
156
+ await fs.mkdir(destinationSkills, { recursive: true, mode: 0o755 });
157
+ else if (skillDirInfo.isSymbolicLink() || !skillDirInfo.isDirectory())
158
+ throw new Error('engine skills path must be a real directory');
159
+ const occupied = new Set((await fs.readdir(destinationSkills)).map(pathKey));
160
+ for (const item of installed.installed) {
161
+ if (occupied.has(pathKey(item.name)))
162
+ throw new Error(`user skill directory collides with engine context: ${item.name}`);
163
+ occupied.add(pathKey(item.name));
164
+ await copyDirectory(item.directory, path.join(destinationSkills, item.name), { entries: 0, bytes: 0 });
165
+ }
166
+ return { contextDir, cleanupRoot };
167
+ }
168
+ catch (error) {
169
+ if (!(error instanceof UserSkillInstallRecoveryError)) {
170
+ await fs.rm(cleanupRoot, { recursive: true, force: true }).catch(() => undefined);
171
+ }
172
+ throw error;
173
+ }
174
+ }
175
+ export async function cleanupUserSkillContext(cleanupRoot) {
176
+ await fs.rm(cleanupRoot, { recursive: true, force: true });
177
+ }
178
+ //# sourceMappingURL=user-skill-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-skill-context.js","sourceRoot":"","sources":["../../../src/context/user-skill-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AACjG,OAAO,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAGzF,MAAM,mBAAmB,GAAG,MAAM,CAAC;AACnC,MAAM,iBAAiB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAC7C,MAAM,sBAAsB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAOhD,SAAS,OAAO,CAAC,IAAY;IAC3B,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;AAC1D,CAAC;AAED,SAAS,cAAc,CAAC,IAAY;IAClC,IAAI,CAAC,IAAI,IAAI,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,IAAI,IAAI,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAChG,MAAM,IAAI,KAAK,CAAC,8BAA8B,IAAI,EAAE,CAAC,CAA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 bytes: Uint8Array;
6
+ }
7
+ export interface UserSkillInstallOptions {
8
+ /** Dedicated writable root, outside the project and engine context directories. */
9
+ installRoot: string;
10
+ /** Stable owner/session scope identifier; it becomes one directory name. */
11
+ scopeId: string;
12
+ projectDir: string;
13
+ contextDir?: string;
14
+ systemSkillNames?: readonly string[];
15
+ bundles: readonly UserSkillInstallInput[];
16
+ /** Internal fault-injection seam for filesystem failure tests. */
17
+ fileOps?: Partial<UserSkillFileOps>;
18
+ }
19
+ export interface UserSkillFileOps {
20
+ mkdir(path: string, options?: {
21
+ recursive?: boolean;
22
+ mode?: number;
23
+ }): Promise<unknown>;
24
+ realpath(path: string): Promise<string>;
25
+ stat(path: string): Promise<Awaited<ReturnType<typeof fs.stat>>>;
26
+ lstat(path: string): Promise<Awaited<ReturnType<typeof fs.lstat>>>;
27
+ rename(from: string, to: string): Promise<void>;
28
+ rm(path: string, options?: {
29
+ recursive?: boolean;
30
+ force?: boolean;
31
+ }): Promise<void>;
32
+ writeFile(path: string, data: Uint8Array, options?: {
33
+ flag?: string;
34
+ mode?: number;
35
+ }): Promise<void>;
36
+ }
37
+ export interface InstalledUserSkill {
38
+ skillId: number;
39
+ version: number;
40
+ name: string;
41
+ description: string;
42
+ directory: string;
43
+ }
44
+ export interface UserSkillInstallResult {
45
+ skillsRoot: string;
46
+ installed: InstalledUserSkill[];
47
+ }
48
+ export declare class UserSkillInstallRecoveryError extends Error {
49
+ readonly recoveryPath: string;
50
+ constructor(recoveryPath: string, cause: unknown);
51
+ }
52
+ /** Parse and atomically replace one dedicated per-scope user skill tree. */
53
+ export declare function installUserSkillBundles(options: UserSkillInstallOptions): Promise<UserSkillInstallResult>;
54
+ //# sourceMappingURL=user-skill-install.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-skill-install.d.ts","sourceRoot":"","sources":["../../../src/context/user-skill-install.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAKlC,MAAM,WAAW,qBA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