@craft_eco/craft-mcp 0.0.0-stage → 0.1.14

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 (1039) 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 +91 -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 +146 -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 +40 -0
  32. package/dist-server/mcp/publication-tools.mjs +19 -0
  33. package/dist-server/mcp/server.mjs +297 -0
  34. package/dist-server/mcp/start.mjs +20 -0
  35. package/dist-server/preview/local-static-preview.mjs +71 -0
  36. package/dist-server/preview/preview-control.mjs +35 -0
  37. package/dist-server/preview/preview-launcher.mjs +26 -0
  38. package/dist-server/preview/preview-snapshot.mjs +35 -0
  39. package/dist-server/preview/preview-start.mjs +12 -0
  40. package/dist-server/preview/preview-worker.mjs +68 -0
  41. package/dist-server/upstream/craft-aigc.mjs +197 -0
  42. package/dist-server/upstream/library-url.mjs +14 -0
  43. package/dist-server/upstream/publication-transport.mjs +80 -0
  44. package/package.json +33 -4
  45. package/resources/craft-game-maker/SKILL.md +67 -0
  46. package/resources/craft-game-maker/js.md +9 -0
  47. package/resources/craft-game-maker/js3d.md +12 -0
  48. package/resources/game_visual_qa.mjs +1143 -0
  49. package/resources/js/context/CLAUDE.md +54 -0
  50. package/resources/js/context/agents/aigc-manager.md +91 -0
  51. package/resources/js/context/hooks/hooks.json +20 -0
  52. package/resources/js/context/knowledge/AigcEnabled.md +41 -0
  53. package/resources/js/context/knowledge/AigcWiring.md +200 -0
  54. package/resources/js/context/knowledge/AssetUrl.md +24 -0
  55. package/resources/js/context/knowledge/FrontendComponents.md +23 -0
  56. package/resources/js/context/knowledge/GameProbe.md +74 -0
  57. package/resources/js/context/knowledge/Lifecycle.md +27 -0
  58. package/resources/js/context/knowledge/Multiplayer/GameplaySystemKnowledge.md +114 -0
  59. package/resources/js/context/knowledge/Multiplayer/OverviewKnowledge.md +115 -0
  60. package/resources/js/context/knowledge/Multiplayer/StateSyncKnowledge.md +392 -0
  61. package/resources/js/context/knowledge/PlatformServices.md +184 -0
  62. package/resources/js/context/knowledge/Subsystems/Optional/MultiplayerManagerKnowledge.md +242 -0
  63. package/resources/js/context/knowledge/Ui.md +11 -0
  64. package/resources/js/context/knowledge/UiEditorCompat.md +21 -0
  65. package/resources/js/context/rules/MultiplayerCapability.md +23 -0
  66. package/resources/js/context/rules/MultiplayerRoomEntryUX.md +63 -0
  67. package/resources/js/context/rules/PlatformBoundaryModules.md +43 -0
  68. package/resources/js/context/skills/aigc-generate/SKILL.md +301 -0
  69. package/resources/js/context/skills/aigc-generate/knowledge/audio.md +39 -0
  70. package/resources/js/context/skills/aigc-generate/knowledge/batch-replace.md +14 -0
  71. package/resources/js/context/skills/aigc-generate/knowledge/character2d.md +129 -0
  72. package/resources/js/context/skills/aigc-generate/knowledge/non-stepwise-aigc.md +54 -0
  73. package/resources/js/context/skills/aigc-generate/knowledge/texture-prop.md +50 -0
  74. package/resources/js/context/skills/aigc-generate/knowledge/texture-scene.md +201 -0
  75. package/resources/js/context/skills/aigc-generate/knowledge/texture-ui.md +53 -0
  76. package/resources/js/context/skills/aigc-generate/scripts/apply-results.mjs +83 -0
  77. package/resources/js/context/skills/aigc-generate/scripts/config.json +29 -0
  78. package/resources/js/context/skills/aigc-generate/scripts/generate.mjs +1016 -0
  79. package/resources/js/context/skills/aigc-generate/scripts/lib/client.mjs +228 -0
  80. package/resources/js/context/skills/aigc-generate/scripts/lib/ledger.mjs +119 -0
  81. package/resources/js/context/skills/aigc-generate/scripts/lib/nstep-handoff.mjs +100 -0
  82. package/resources/js/context/skills/aigc-generate/scripts/lib/pipelines.mjs +441 -0
  83. package/resources/js/context/skills/aigc-generate/scripts/lib/queue.mjs +283 -0
  84. package/resources/js/context/skills/aigc-generate/scripts/lib/submit.mjs +122 -0
  85. package/resources/js/context/skills/aigc-generate/scripts/worker.mjs +171 -0
  86. package/resources/js/context/skills/asset-search/SKILL.md +73 -0
  87. package/resources/js/context/skills/asset-search/scripts/asset_display.mjs +62 -0
  88. package/resources/js/context/skills/asset-search/scripts/config.json +5 -0
  89. package/resources/js/context/skills/asset-search/scripts/provided_assets.mjs +125 -0
  90. package/resources/js/context/skills/asset-search/scripts/recalled_sprite_paths.mjs +47 -0
  91. package/resources/js/context/skills/asset-search/scripts/search.mjs +749 -0
  92. package/resources/js/context/skills/asset-search/scripts/sprite_source_materializer.mjs +723 -0
  93. package/resources/js/context/skills/asset-search/strategies/audio.md +34 -0
  94. package/resources/js/context/skills/asset-search/strategies/character2d.md +33 -0
  95. package/resources/js/context/skills/asset-search/strategies/effect2d.md +31 -0
  96. package/resources/js/context/skills/asset-search/strategies/texture-prop.md +22 -0
  97. package/resources/js/context/skills/asset-search/strategies/texture-ui.md +35 -0
  98. package/resources/js/context/skills/asset-search/strategies/ui-common.md +40 -0
  99. package/resources/js/context/skills/asset-search/strategies/ui-style.md +28 -0
  100. package/resources/js/context/skills/display-info-setup/SKILL.md +32 -0
  101. package/resources/js/context/skills/display-info-setup/scripts/init_project.mjs +38 -0
  102. package/resources/js/context/skills/export-config/SKILL.md +20 -0
  103. package/resources/js/context/skills/export-config/scripts/assert-asset-wiring.mjs +72 -0
  104. package/resources/js/context/skills/export-config/scripts/export-config.mjs +43 -0
  105. package/resources/js/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  106. package/resources/js/context/skills/export-config/scripts/sync-asset-controls.mjs +351 -0
  107. package/resources/js/context/skills/export-config/scripts/translate-asset-titles.mjs +163 -0
  108. package/resources/js/context/skills/lightgame-runtime-adapt/SKILL.md +92 -0
  109. package/resources/js/context/skills/lightgame-runtime-adapt/project/game-runtime.json +7 -0
  110. package/resources/js/context/skills/lightgame-runtime-adapt/project/package.json +22 -0
  111. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/config.d.mts +19 -0
  112. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/config.mjs +1 -0
  113. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/leaderboard.d.mts +39 -0
  114. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/leaderboard.mjs +1 -0
  115. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/platform-capture-video.mjs +227 -0
  116. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/platform-service.d.mts +25 -0
  117. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/platform-service.mjs +1 -0
  118. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/platform.d.mts +79 -0
  119. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/platform.mjs +29 -0
  120. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/save.d.mts +49 -0
  121. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/platform/save.mjs +1 -0
  122. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/release.json +37 -0
  123. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tooling/cli.mjs +2 -0
  124. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tooling/project.d.mts +8 -0
  125. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tooling/project.mjs +2 -0
  126. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tooling/vite.d.mts +3 -0
  127. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tooling/vite.mjs +8 -0
  128. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/assets.d.mts +24 -0
  129. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/assets.mjs +2 -0
  130. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/astc.d.mts +10 -0
  131. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/astc.mjs +1 -0
  132. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/audio.d.mts +20 -0
  133. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/audio.mjs +1 -0
  134. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/canvas.d.mts +21 -0
  135. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/canvas.mjs +1 -0
  136. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/input.d.mts +17 -0
  137. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/input.mjs +1 -0
  138. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/three.d.mts +40 -0
  139. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/three.mjs +1 -0
  140. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/ui.d.mts +10 -0
  141. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/ui.mjs +1 -0
  142. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/video.d.mts +8 -0
  143. package/resources/js/context/skills/lightgame-runtime-adapt/project/runtime/lightgame/1.0.0/tools/video.mjs +1 -0
  144. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/config-export.mjs +32 -0
  145. package/resources/js/context/skills/lightgame-runtime-adapt/project/scripts/refresh-runtime.mjs +50 -0
  146. package/resources/js/context/skills/lightgame-runtime-adapt/project/src/display/ui-stage.ts +121 -0
  147. package/resources/js/context/skills/lightgame-runtime-adapt/project/src/display/viewport.ts +254 -0
  148. package/resources/js/context/skills/lightgame-runtime-adapt/project/src/main.ts +99 -0
  149. package/resources/js/context/skills/lightgame-runtime-adapt/project/src/platform.ts +14 -0
  150. package/resources/js/context/skills/lightgame-runtime-adapt/project/src/screenUi.ts +172 -0
  151. package/resources/js/context/skills/lightgame-runtime-adapt/project/src/style.css +165 -0
  152. package/resources/js/context/skills/lightgame-runtime-adapt/project/tsconfig.json +20 -0
  153. package/resources/js/context/skills/lightgame-runtime-adapt/project/vite.config.ts +4 -0
  154. package/resources/js/context/skills/lightgame-runtime-adapt/scripts/install-template.mjs +109 -0
  155. package/resources/js/context/skills/mobile-adaptation/SKILL.md +260 -0
  156. package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-config.json +50 -0
  157. package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-layer.ts +881 -0
  158. package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/input-platform.ts +92 -0
  159. package/resources/js/context/skills/mobile-adaptation/assets/example/src/input/look-pad.ts +245 -0
  160. package/resources/js/context/skills/mobile-adaptation/assets/example/src/ui/touch-controls.css +134 -0
  161. package/resources/js/context/skills/mobile-adaptation/references/input-config.md +311 -0
  162. package/resources/js/context/skills/mobile-adaptation/references/verification.md +106 -0
  163. package/resources/js/context/skills/optimization-suggestions/SKILL.md +89 -0
  164. package/resources/js/context/skills/platform-services/SKILL.md +94 -0
  165. package/resources/js/context/skills/platform-services/assets/modules/MultiplayerManager.ts +783 -0
  166. package/resources/js/context/skills/platform-services/assets/modules/eventBus.ts +57 -0
  167. package/resources/js/context/skills/platform-services/assets/modules/leaderboard.d.mts +39 -0
  168. package/resources/js/context/skills/platform-services/assets/modules/leaderboard.mjs +1 -0
  169. package/resources/js/context/skills/platform-services/assets/modules/log.ts +35 -0
  170. package/resources/js/context/skills/platform-services/assets/modules/platform-service.d.mts +25 -0
  171. package/resources/js/context/skills/platform-services/assets/modules/platform-service.mjs +1 -0
  172. package/resources/js/context/skills/platform-services/assets/modules/save.d.mts +49 -0
  173. package/resources/js/context/skills/platform-services/assets/modules/save.mjs +1 -0
  174. package/resources/js/context/skills/platform-services/assets/release.json +44 -0
  175. package/resources/js/context/skills/platform-services/assets/scaffold/ds/main.mjs +7 -0
  176. package/resources/js/context/skills/platform-services/assets/scaffold/ds/rooms/SyncRoom.mjs +264 -0
  177. package/resources/js/context/skills/platform-services/assets/scaffold/ds/rooms/syncSchema.mjs +39 -0
  178. package/resources/js/context/skills/platform-services/references/SERVER_GUIDE.md +139 -0
  179. package/resources/js/context/skills/platform-services/references/api_reference.md +18 -0
  180. package/resources/js/context/skills/platform-services/scripts/install.mjs +134 -0
  181. package/resources/js/context/skills/resolution-adaptation/SKILL.md +202 -0
  182. package/resources/js/context/skills/resolution-adaptation/assets/display/ui-stage.ts +121 -0
  183. package/resources/js/context/skills/resolution-adaptation/assets/display/viewport.ts +254 -0
  184. package/resources/js/context/skills/resolution-adaptation/assets/example/main.ts +98 -0
  185. package/resources/js/context/skills/resolution-adaptation/assets/example/ui-tokens.css +200 -0
  186. package/resources/js/context/skills/resolution-adaptation/references/layout-rules.md +134 -0
  187. package/resources/js/context/skills/resolution-adaptation/references/viewport-api.md +119 -0
  188. package/resources/js/context/skills/resolution-adaptation/scripts/aspect_audit.mjs +338 -0
  189. package/resources/js/context/skills/scene-editor-compat/SKILL.md +94 -0
  190. package/resources/js/context/skills/scene-editor-compat/assets/example/localcraft.assets.json +13 -0
  191. package/resources/js/context/skills/scene-editor-compat/assets/example/localcraft.scene-editor.json +6 -0
  192. package/resources/js/context/skills/scene-editor-compat/assets/example/src/game/sceneAdapter.ts +25 -0
  193. package/resources/js/context/skills/scene-editor-compat/assets/example/src/scenes/main.scene.json +18 -0
  194. package/resources/js/context/skills/scene-editor-compat/assets/runtime/release.json +7 -0
  195. package/resources/js/context/skills/scene-editor-compat/assets/runtime/scene.d.mts +42 -0
  196. package/resources/js/context/skills/scene-editor-compat/assets/runtime/scene.mjs +144 -0
  197. package/resources/js/context/skills/scene-editor-compat/docs/contract.md +330 -0
  198. package/resources/js/context/skills/scene-editor-compat/docs/resource-sync.md +64 -0
  199. package/resources/js/context/skills/scene-editor-compat/docs/runtime-state.md +28 -0
  200. package/resources/js/context/skills/scene-editor-compat/docs/terrain-contract.md +47 -0
  201. package/resources/js/context/skills/scene-editor-compat/docs/visual-contract.md +64 -0
  202. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/localcraft.assets.json +38 -0
  203. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/localcraft.scene-editor.json +9 -0
  204. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/game/sceneAdapter.ts +59 -0
  205. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/game/sceneBlockers.ts +30 -0
  206. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/game/sceneFileAssets.ts +66 -0
  207. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/scenes/Main.Scene.ts +20 -0
  208. package/resources/js/context/skills/scene-editor-compat/examples/platformer-ts/src/scenes/SceneTypes.ts +26 -0
  209. package/resources/js/context/skills/scene-editor-compat/references/contract.md +73 -0
  210. package/resources/js/context/skills/scene-editor-compat/scripts/apply_scene_marker.py +162 -0
  211. package/resources/js/context/skills/scene-editor-compat/scripts/check_scene_contract.py +853 -0
  212. package/resources/js/context/skills/scene-editor-compat/scripts/check_scene_resource_urls.py +173 -0
  213. package/resources/js/context/skills/scene-editor-compat/scripts/scene-editor.mjs +427 -0
  214. package/resources/js/context/skills/scene-editor-compat/version.json +1 -0
  215. package/resources/js/context/skills/ui-editor-compat/SKILL.md +48 -0
  216. package/resources/js/context/skills/ui-editor-compat/assets/example/hud/WidgetLayout_Hud.ts +35 -0
  217. package/resources/js/context/skills/ui-editor-compat/assets/example/hud/WidgetLogic_Hud.ts +74 -0
  218. package/resources/js/context/skills/ui-editor-compat/assets/example/hud/hud.css +60 -0
  219. package/resources/js/context/skills/ui-editor-compat/assets/runtime/dom-ui.d.mts +45 -0
  220. package/resources/js/context/skills/ui-editor-compat/assets/runtime/dom-ui.mjs +265 -0
  221. package/resources/js/context/skills/ui-editor-compat/assets/runtime/release.json +7 -0
  222. package/resources/js/context/skills/ui-editor-compat/references/contract.md +132 -0
  223. package/resources/js/context/skills/ui-editor-compat/scripts/editor-contract.mjs +327 -0
  224. package/resources/js/context/skills/ui-editor-compat/scripts/project-files.mjs +80 -0
  225. package/resources/js/context/skills/ui-editor-compat/scripts/ui-editor.mjs +84 -0
  226. package/resources/js/context/skills/version-update/SKILL.md +192 -0
  227. package/resources/js/context/skills/version-update/scripts/check_runtime_refs.mjs +129 -0
  228. package/resources/js/context/skills/version-update/scripts/feature_snapshot.mjs +159 -0
  229. package/resources/js/context/skills/version-update/scripts/update_feature_version.mjs +157 -0
  230. package/resources/js/context/skills/version-update/upgrade_diffs/.gitkeep +0 -0
  231. package/resources/js/context/skills/visual-qa/SKILL.md +36 -0
  232. package/resources/js/context/version/version.json +1 -0
  233. package/resources/js/project/.gitattributes +2 -0
  234. package/resources/js/project/README.md +99 -0
  235. package/resources/js/project/SPEC/assist/.gitkeep +0 -0
  236. package/resources/js/project/SPEC/guide/.gitkeep +0 -0
  237. package/resources/js/project/SPEC/plan/.gitkeep +0 -0
  238. package/resources/js/project/SPEC/readme.md +6 -0
  239. package/resources/js/project/SPEC/res/.gitkeep +0 -0
  240. package/resources/js/project/SPEC/task-item/.gitkeep +0 -0
  241. package/resources/js/project/configs/assets.json +1 -0
  242. package/resources/js/project/configs/game.controls.json +3 -0
  243. package/resources/js/project/configs/game.json +3 -0
  244. package/resources/js/project/game-runtime.json +7 -0
  245. package/resources/js/project/gameplay-probe.json +37 -0
  246. package/resources/js/project/index.html +20 -0
  247. package/resources/js/project/package-lock.json +1155 -0
  248. package/resources/js/project/package.json +23 -0
  249. package/resources/js/project/projectDisplayInfo.json +7 -0
  250. package/resources/js/project/runtime/lightgame/1.0.0/platform/config.d.mts +19 -0
  251. package/resources/js/project/runtime/lightgame/1.0.0/platform/config.mjs +1 -0
  252. package/resources/js/project/runtime/lightgame/1.0.0/platform/leaderboard.d.mts +39 -0
  253. package/resources/js/project/runtime/lightgame/1.0.0/platform/leaderboard.mjs +1 -0
  254. package/resources/js/project/runtime/lightgame/1.0.0/platform/platform-capture-video.mjs +227 -0
  255. package/resources/js/project/runtime/lightgame/1.0.0/platform/platform-service.d.mts +25 -0
  256. package/resources/js/project/runtime/lightgame/1.0.0/platform/platform-service.mjs +1 -0
  257. package/resources/js/project/runtime/lightgame/1.0.0/platform/platform.d.mts +79 -0
  258. package/resources/js/project/runtime/lightgame/1.0.0/platform/platform.mjs +29 -0
  259. package/resources/js/project/runtime/lightgame/1.0.0/platform/save.d.mts +49 -0
  260. package/resources/js/project/runtime/lightgame/1.0.0/platform/save.mjs +1 -0
  261. package/resources/js/project/runtime/lightgame/1.0.0/release.json +37 -0
  262. package/resources/js/project/runtime/lightgame/1.0.0/tooling/cli.mjs +2 -0
  263. package/resources/js/project/runtime/lightgame/1.0.0/tooling/project.d.mts +8 -0
  264. package/resources/js/project/runtime/lightgame/1.0.0/tooling/project.mjs +2 -0
  265. package/resources/js/project/runtime/lightgame/1.0.0/tooling/vite.d.mts +3 -0
  266. package/resources/js/project/runtime/lightgame/1.0.0/tooling/vite.mjs +8 -0
  267. package/resources/js/project/runtime/lightgame/1.0.0/tools/assets.d.mts +24 -0
  268. package/resources/js/project/runtime/lightgame/1.0.0/tools/assets.mjs +2 -0
  269. package/resources/js/project/runtime/lightgame/1.0.0/tools/astc.d.mts +10 -0
  270. package/resources/js/project/runtime/lightgame/1.0.0/tools/astc.mjs +1 -0
  271. package/resources/js/project/runtime/lightgame/1.0.0/tools/audio.d.mts +20 -0
  272. package/resources/js/project/runtime/lightgame/1.0.0/tools/audio.mjs +1 -0
  273. package/resources/js/project/runtime/lightgame/1.0.0/tools/canvas.d.mts +21 -0
  274. package/resources/js/project/runtime/lightgame/1.0.0/tools/canvas.mjs +1 -0
  275. package/resources/js/project/runtime/lightgame/1.0.0/tools/input.d.mts +17 -0
  276. package/resources/js/project/runtime/lightgame/1.0.0/tools/input.mjs +1 -0
  277. package/resources/js/project/runtime/lightgame/1.0.0/tools/three.d.mts +40 -0
  278. package/resources/js/project/runtime/lightgame/1.0.0/tools/three.mjs +1 -0
  279. package/resources/js/project/runtime/lightgame/1.0.0/tools/ui.d.mts +10 -0
  280. package/resources/js/project/runtime/lightgame/1.0.0/tools/ui.mjs +1 -0
  281. package/resources/js/project/runtime/lightgame/1.0.0/tools/video.d.mts +8 -0
  282. package/resources/js/project/runtime/lightgame/1.0.0/tools/video.mjs +1 -0
  283. package/resources/js/project/scripts/config-export.mjs +32 -0
  284. package/resources/js/project/scripts/refresh-runtime.mjs +50 -0
  285. package/resources/js/project/src/display/ui-stage.ts +121 -0
  286. package/resources/js/project/src/display/viewport.ts +254 -0
  287. package/resources/js/project/src/main.ts +99 -0
  288. package/resources/js/project/src/platform.ts +14 -0
  289. package/resources/js/project/src/scenes/LoadScene.ts +89 -0
  290. package/resources/js/project/src/scenes/PlayScene.ts +17 -0
  291. package/resources/js/project/src/screenUi.ts +172 -0
  292. package/resources/js/project/src/style.css +165 -0
  293. package/resources/js/project/tsconfig.json +20 -0
  294. package/resources/js/project/unified_data_control_config.json +20 -0
  295. package/resources/js/project/vendor/core-manager-js/package.json +33 -0
  296. package/resources/js/project/vendor/core-manager-js/src/.versions.json +42 -0
  297. package/resources/js/project/vendor/core-manager-js/src/CoreManagerPlugin.ts +41 -0
  298. package/resources/js/project/vendor/core-manager-js/src/assetManager/AssetRef.ts +90 -0
  299. package/resources/js/project/vendor/core-manager-js/src/assetManager/AstcFirstImageFile.ts +203 -0
  300. package/resources/js/project/vendor/core-manager-js/src/assetManager/AstcTextureLoader.ts +106 -0
  301. package/resources/js/project/vendor/core-manager-js/src/assetManager/resolveAssetUrl.test.ts +25 -0
  302. package/resources/js/project/vendor/core-manager-js/src/assetManager/resolveAssetUrl.ts +21 -0
  303. package/resources/js/project/vendor/core-manager-js/src/audioManager/AudioManager.test.ts +65 -0
  304. package/resources/js/project/vendor/core-manager-js/src/audioManager/AudioManager.ts +340 -0
  305. package/resources/js/project/vendor/core-manager-js/src/configManager/FeatureConfig.ts +87 -0
  306. package/resources/js/project/vendor/core-manager-js/src/configManager/tuneRuntime.d.mts +92 -0
  307. package/resources/js/project/vendor/core-manager-js/src/configManager/tuneRuntime.mjs +271 -0
  308. package/resources/js/project/vendor/core-manager-js/src/index.ts +31 -0
  309. package/resources/js/project/vendor/core-manager-js/src/inputManager/InputConfig.ts +81 -0
  310. package/resources/js/project/vendor/core-manager-js/src/inputManager/InputManager.test.ts +43 -0
  311. package/resources/js/project/vendor/core-manager-js/src/inputManager/InputManager.ts +32 -0
  312. package/resources/js/project/vendor/core-manager-js/src/inputManager/InputRuntime.test.ts +141 -0
  313. package/resources/js/project/vendor/core-manager-js/src/inputManager/InputRuntime.ts +20 -0
  314. package/resources/js/project/vendor/core-manager-js/src/inputManager/KeyboardProvider.ts +183 -0
  315. package/resources/js/project/vendor/core-manager-js/src/inputManager/TouchProvider.ts +304 -0
  316. package/resources/js/project/vendor/core-manager-js/src/inputManager/VirtualJoystick.ts +351 -0
  317. package/resources/js/project/vendor/core-manager-js/src/inputManager/_internal/InputManagerImpl.ts +180 -0
  318. package/resources/js/project/vendor/core-manager-js/src/inputManager/icons.b64 +13 -0
  319. package/resources/js/project/vendor/core-manager-js/src/inputManager/icons.b64.d.ts +14 -0
  320. package/resources/js/project/vendor/core-manager-js/src/inputManager/input_config.example.json +68 -0
  321. package/resources/js/project/vendor/core-manager-js/src/logManager/DebugConsole.ts +433 -0
  322. package/resources/js/project/vendor/core-manager-js/src/logManager/LogCapture.ts +118 -0
  323. package/resources/js/project/vendor/core-manager-js/src/logManager/LogManager.ts +444 -0
  324. package/resources/js/project/vendor/core-manager-js/src/logManager/ScreenCapture.ts +485 -0
  325. package/resources/js/project/vendor/core-manager-js/src/logManager/ScreenCaptureVideo.test.ts +66 -0
  326. package/resources/js/project/vendor/core-manager-js/src/logManager/ScreenCaptureVideo.ts +149 -0
  327. package/resources/js/project/vendor/core-manager-js/src/logManager/icons.b64 +9 -0
  328. package/resources/js/project/vendor/core-manager-js/src/resourceManager/AssetUrlResolver.ts +29 -0
  329. package/resources/js/project/vendor/core-manager-js/src/resourceManager/ResourceManager.test.ts +88 -0
  330. package/resources/js/project/vendor/core-manager-js/src/resourceManager/ResourceManager.ts +122 -0
  331. package/resources/js/project/vendor/core-manager-js/src/runtime.ts +24 -0
  332. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/CharacterEntity.ts +318 -0
  333. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/CharacterPhysicsBinding.test.ts +151 -0
  334. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/CharacterPhysicsBinding.ts +235 -0
  335. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/EffectComposite.test.ts +98 -0
  336. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/EffectComposite.ts +94 -0
  337. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/EffectEntity.ts +209 -0
  338. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxManager.test.ts +106 -0
  339. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxManager.ts +341 -0
  340. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxRecipe.test.ts +68 -0
  341. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/FxRecipe.ts +236 -0
  342. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/SpriteAnimManager.test.ts +22 -0
  343. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/SpriteAnimManager.ts +29 -0
  344. package/resources/js/project/vendor/core-manager-js/src/spriteAnimManager/SpriteEntity.test.ts +197 -0
  345. package/resources/js/project/vendor/core-manager-js/src/uiManager/DomUiContracts.ts +9 -0
  346. package/resources/js/project/vendor/core-manager-js/src/uiManager/DomUiKit.ts +555 -0
  347. package/resources/js/project/vendor/core-manager-js/src/uiManager/UIFacadePlugin.test.ts +112 -0
  348. package/resources/js/project/vendor/core-manager-js/src/uiManager/UIFacadePlugin.ts +178 -0
  349. package/resources/js/project/vendor/core-manager-js/src/uiManager/ui-base.css +246 -0
  350. package/resources/js/project/vendor/core-manager-js/src/videoManager/VideoManager.ts +139 -0
  351. package/resources/js/project/vendor/core-manager-js/tsconfig.json +15 -0
  352. package/resources/js/project/vendor/run.sh +107 -0
  353. package/resources/js/project/version/craft_feature_version.json +42 -0
  354. package/resources/js/project/version/project_feature_version.json +11 -0
  355. package/resources/js/project/vite.config.ts +4 -0
  356. package/resources/js3d/context/CLAUDE.md +50 -0
  357. package/resources/js3d/context/hooks/hooks.json +20 -0
  358. package/resources/js3d/context/knowledge/3D/PoseInterpolationKnowledge.md +87 -0
  359. package/resources/js3d/context/knowledge/CodingGuide/Pitfalls.md +69 -0
  360. package/resources/js3d/context/knowledge/CodingGuide/SceneEditableGuide.md +42 -0
  361. package/resources/js3d/context/knowledge/FrontendComponents.md +23 -0
  362. package/resources/js3d/context/knowledge/Multiplayer/GameplaySystemKnowledge.md +114 -0
  363. package/resources/js3d/context/knowledge/Multiplayer/OverviewKnowledge.md +117 -0
  364. package/resources/js3d/context/knowledge/Multiplayer/StateSyncKnowledge.md +430 -0
  365. package/resources/js3d/context/knowledge/PlatformServices.md +162 -0
  366. package/resources/js3d/context/knowledge/Runtime.md +30 -0
  367. package/resources/js3d/context/knowledge/SceneEditorCompat.md +34 -0
  368. package/resources/js3d/context/knowledge/StepByStep.md +21 -0
  369. package/resources/js3d/context/knowledge/Subsystems/Optional/MultiplayerManagerKnowledge.md +242 -0
  370. package/resources/js3d/context/knowledge/UiEditorCompat.md +21 -0
  371. package/resources/js3d/context/rules/MultiplayerCapability.md +27 -0
  372. package/resources/js3d/context/rules/MultiplayerRoomEntryUX.md +63 -0
  373. package/resources/js3d/context/rules/PlatformBoundaryModules.md +43 -0
  374. package/resources/js3d/context/skills/aigc-integration/SKILL.md +176 -0
  375. package/resources/js3d/context/skills/aigc-integration/callback.md +56 -0
  376. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/README.md +22 -0
  377. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/audio-aigc-knowledge.md +38 -0
  378. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/staticmesh-aigc-knowledge.md +33 -0
  379. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/texture-prop-aigc-knowledge.md +36 -0
  380. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/texture-scene-aigc-knowledge.md +37 -0
  381. package/resources/js3d/context/skills/aigc-integration/knowledge/aigc/texture-ui-aigc-knowledge.md +35 -0
  382. package/resources/js3d/context/skills/aigc-integration/scripts/config.json +3 -0
  383. package/resources/js3d/context/skills/aigc-integration/scripts/lib/submit.mjs +344 -0
  384. package/resources/js3d/context/skills/aigc-integration/scripts/query-music.mjs +53 -0
  385. package/resources/js3d/context/skills/aigc-integration/scripts/query-results.mjs +53 -0
  386. package/resources/js3d/context/skills/aigc-integration/scripts/submit-cover.mjs +44 -0
  387. package/resources/js3d/context/skills/aigc-integration/scripts/submit-image.mjs +48 -0
  388. package/resources/js3d/context/skills/aigc-integration/scripts/submit-music.mjs +34 -0
  389. package/resources/js3d/context/skills/aigc-integration/scripts/submit-staticmesh.mjs +39 -0
  390. package/resources/js3d/context/skills/asset-search/SKILL.md +159 -0
  391. package/resources/js3d/context/skills/asset-search/references/resource-config.md +56 -0
  392. package/resources/js3d/context/skills/asset-search/scripts/asset_display.mjs +62 -0
  393. package/resources/js3d/context/skills/asset-search/scripts/config.json +213 -0
  394. package/resources/js3d/context/skills/asset-search/scripts/manifest_pipeline.mjs +885 -0
  395. package/resources/js3d/context/skills/asset-search/scripts/preflight.mjs +79 -0
  396. package/resources/js3d/context/skills/asset-search/scripts/provided_assets.mjs +74 -0
  397. package/resources/js3d/context/skills/asset-search/scripts/search.mjs +597 -0
  398. package/resources/js3d/context/skills/export-config/scripts/assert-asset-wiring.mjs +83 -0
  399. package/resources/js3d/context/skills/export-config/scripts/export-config.mjs +53 -0
  400. package/resources/js3d/context/skills/export-config/scripts/panel-resource-path.mjs +106 -0
  401. package/resources/js3d/context/skills/export-config/scripts/sync-asset-controls.mjs +325 -0
  402. package/resources/js3d/context/skills/export-config/scripts/sync-scene-assets.mjs +181 -0
  403. package/resources/js3d/context/skills/export-config/scripts/translate-asset-titles.mjs +163 -0
  404. package/resources/js3d/context/skills/game-art-style/SKILL.md +60 -0
  405. package/resources/js3d/context/skills/game-art-style/assets/previews/cartoon.png +0 -0
  406. package/resources/js3d/context/skills/game-art-style/assets/previews/comic.png +0 -0
  407. package/resources/js3d/context/skills/game-art-style/assets/previews/cozy.png +0 -0
  408. package/resources/js3d/context/skills/game-art-style/assets/previews/cyber.png +0 -0
  409. package/resources/js3d/context/skills/game-art-style/assets/previews/horror.png +0 -0
  410. package/resources/js3d/context/skills/game-art-style/assets/previews/lowpoly.png +0 -0
  411. package/resources/js3d/context/skills/game-art-style/assets/previews/paper.png +0 -0
  412. package/resources/js3d/context/skills/game-art-style/assets/previews/voxel.png +0 -0
  413. package/resources/js3d/context/skills/game-art-style/references/art-parameters-lite.md +38 -0
  414. package/resources/js3d/context/skills/game-art-style/references/construction.md +111 -0
  415. package/resources/js3d/context/skills/game-art-style/references/materials-textures.md +105 -0
  416. package/resources/js3d/context/skills/game-art-style/references/sources.md +25 -0
  417. package/resources/js3d/context/skills/game-art-style/references/styles/cartoon.md +175 -0
  418. package/resources/js3d/context/skills/game-art-style/references/styles/comic.md +168 -0
  419. package/resources/js3d/context/skills/game-art-style/references/styles/cozy.md +191 -0
  420. package/resources/js3d/context/skills/game-art-style/references/styles/cyber.md +165 -0
  421. package/resources/js3d/context/skills/game-art-style/references/styles/horror.md +173 -0
  422. package/resources/js3d/context/skills/game-art-style/references/styles/lowpoly.md +185 -0
  423. package/resources/js3d/context/skills/game-art-style/references/styles/paper.md +181 -0
  424. package/resources/js3d/context/skills/game-art-style/references/styles/voxel.md +189 -0
  425. package/resources/js3d/context/skills/game-art-style/references/user-style-document.md +88 -0
  426. package/resources/js3d/context/skills/mobile-adaptation/SKILL.md +284 -0
  427. package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-config.json +104 -0
  428. package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-layer.ts +952 -0
  429. package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/input-platform.ts +92 -0
  430. package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/input/look-pad.ts +245 -0
  431. package/resources/js3d/context/skills/mobile-adaptation/assets/example/src/ui/touch-controls.css +256 -0
  432. package/resources/js3d/context/skills/mobile-adaptation/references/input-config.md +311 -0
  433. package/resources/js3d/context/skills/mobile-adaptation/references/verification.md +106 -0
  434. package/resources/js3d/context/skills/optimization-suggestions/SKILL.md +74 -0
  435. package/resources/js3d/context/skills/platform-services/SKILL.md +94 -0
  436. package/resources/js3d/context/skills/platform-services/assets/modules/MultiplayerManager.ts +783 -0
  437. package/resources/js3d/context/skills/platform-services/assets/modules/eventBus.ts +57 -0
  438. package/resources/js3d/context/skills/platform-services/assets/modules/leaderboard.d.mts +39 -0
  439. package/resources/js3d/context/skills/platform-services/assets/modules/leaderboard.mjs +1 -0
  440. package/resources/js3d/context/skills/platform-services/assets/modules/log.ts +35 -0
  441. package/resources/js3d/context/skills/platform-services/assets/modules/platform-service.d.mts +25 -0
  442. package/resources/js3d/context/skills/platform-services/assets/modules/platform-service.mjs +1 -0
  443. package/resources/js3d/context/skills/platform-services/assets/modules/save.d.mts +49 -0
  444. package/resources/js3d/context/skills/platform-services/assets/modules/save.mjs +1 -0
  445. package/resources/js3d/context/skills/platform-services/assets/release.json +44 -0
  446. package/resources/js3d/context/skills/platform-services/assets/scaffold/ds/main.mjs +7 -0
  447. package/resources/js3d/context/skills/platform-services/assets/scaffold/ds/rooms/SyncRoom.mjs +264 -0
  448. package/resources/js3d/context/skills/platform-services/assets/scaffold/ds/rooms/syncSchema.mjs +39 -0
  449. package/resources/js3d/context/skills/platform-services/references/SERVER_GUIDE.md +139 -0
  450. package/resources/js3d/context/skills/platform-services/references/api_reference.md +18 -0
  451. package/resources/js3d/context/skills/platform-services/scripts/install.mjs +134 -0
  452. package/resources/js3d/context/skills/resolution-adaptation/SKILL.md +170 -0
  453. package/resources/js3d/context/skills/resolution-adaptation/assets/display/ui-stage.ts +121 -0
  454. package/resources/js3d/context/skills/resolution-adaptation/assets/display/viewport.ts +244 -0
  455. package/resources/js3d/context/skills/resolution-adaptation/assets/example/main.ts +127 -0
  456. package/resources/js3d/context/skills/resolution-adaptation/assets/example/ui-tokens.css +188 -0
  457. package/resources/js3d/context/skills/resolution-adaptation/references/layout-rules.md +124 -0
  458. package/resources/js3d/context/skills/resolution-adaptation/references/viewport-api.md +117 -0
  459. package/resources/js3d/context/skills/resolution-adaptation/scripts/aspect_audit.mjs +338 -0
  460. package/resources/js3d/context/skills/scene-editor-compat/SKILL.md +599 -0
  461. package/resources/js3d/context/skills/scene-editor-compat/references/bundle-contract.md +141 -0
  462. package/resources/js3d/context/skills/scene-editor-compat/references/editor-integration.md +92 -0
  463. package/resources/js3d/context/skills/scene-editor-compat/references/scene-data-format.md +125 -0
  464. package/resources/js3d/context/skills/scene-editor-compat/references/slots-rules.md +113 -0
  465. package/resources/js3d/context/skills/scene-editor-compat/scripts/scene-editor.mjs +1187 -0
  466. package/resources/js3d/context/skills/threejs-game-quality/SKILL.md +52 -0
  467. package/resources/js3d/context/skills/threejs-game-quality/agents/openai.yaml +4 -0
  468. package/resources/js3d/context/skills/threejs-game-quality/references/01-build.md +94 -0
  469. package/resources/js3d/context/skills/threejs-game-quality/references/02-avoid.md +50 -0
  470. package/resources/js3d/context/skills/threejs-game-quality/references/03-detect.md +105 -0
  471. package/resources/js3d/context/skills/threejs-game-quality/references/camera-by-genre.md +147 -0
  472. package/resources/js3d/context/skills/threejs-game-quality/references/camera-distance.md +79 -0
  473. package/resources/js3d/context/skills/threejs-game-quality/references/camera-sources.md +56 -0
  474. package/resources/js3d/context/skills/threejs-game-quality/references/character-motion-face.md +51 -0
  475. package/resources/js3d/context/skills/threejs-game-quality/references/parameter-contract.md +55 -0
  476. package/resources/js3d/context/skills/threejs-game-quality/references/refine-existing.md +78 -0
  477. package/resources/js3d/context/skills/threejs-game-quality/references/rendering-stability.md +84 -0
  478. package/resources/js3d/context/skills/threejs-game-quality/references/runtime-tools.md +120 -0
  479. package/resources/js3d/context/skills/threejs-game-quality/scripts/package.json +4 -0
  480. package/resources/js3d/context/skills/threejs-game-quality/scripts/runtime-audit.js +238 -0
  481. package/resources/js3d/context/skills/ui-editor-compat/SKILL.md +59 -0
  482. package/resources/js3d/context/skills/ui-editor-compat/assets/example/hud/WidgetLayout_Hud.ts +35 -0
  483. package/resources/js3d/context/skills/ui-editor-compat/assets/example/hud/WidgetLogic_Hud.ts +61 -0
  484. package/resources/js3d/context/skills/ui-editor-compat/assets/example/hud/hud.css +60 -0
  485. package/resources/js3d/context/skills/ui-editor-compat/assets/runtime/dom-ui.d.mts +45 -0
  486. package/resources/js3d/context/skills/ui-editor-compat/assets/runtime/dom-ui.mjs +265 -0
  487. package/resources/js3d/context/skills/ui-editor-compat/assets/runtime/release.json +7 -0
  488. package/resources/js3d/context/skills/ui-editor-compat/references/contract.md +110 -0
  489. package/resources/js3d/context/skills/ui-editor-compat/scripts/editor-contract.mjs +327 -0
  490. package/resources/js3d/context/skills/ui-editor-compat/scripts/project-files.mjs +80 -0
  491. package/resources/js3d/context/skills/ui-editor-compat/scripts/ui-editor.mjs +84 -0
  492. package/resources/js3d/context/skills/version-update/SKILL.md +191 -0
  493. package/resources/js3d/context/skills/version-update/scripts/check_runtime_refs.mjs +129 -0
  494. package/resources/js3d/context/skills/version-update/scripts/feature_snapshot.mjs +159 -0
  495. package/resources/js3d/context/skills/version-update/scripts/update_feature_version.mjs +157 -0
  496. package/resources/js3d/context/skills/version-update/upgrade_diffs/.gitkeep +0 -0
  497. package/resources/js3d/context/version/version.json +1 -0
  498. package/resources/js3d/project/.gitattributes +2 -0
  499. package/resources/js3d/project/README.md +100 -0
  500. package/resources/js3d/project/configs/game.controls.json +3 -0
  501. package/resources/js3d/project/configs/game.json +3 -0
  502. package/resources/js3d/project/game-runtime.json +7 -0
  503. package/resources/js3d/project/gameplay-probe.json +38 -0
  504. package/resources/js3d/project/index.html +12 -0
  505. package/resources/js3d/project/package-lock.json +1204 -0
  506. package/resources/js3d/project/package.json +24 -0
  507. package/resources/js3d/project/projectDisplayInfo.json +7 -0
  508. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/config.d.mts +19 -0
  509. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/config.mjs +1 -0
  510. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/leaderboard.d.mts +39 -0
  511. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/leaderboard.mjs +1 -0
  512. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform-capture-video.mjs +227 -0
  513. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform-service.d.mts +25 -0
  514. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform-service.mjs +1 -0
  515. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform.d.mts +79 -0
  516. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/platform.mjs +30 -0
  517. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/save.d.mts +49 -0
  518. package/resources/js3d/project/runtime/lightgame/1.0.0/platform/save.mjs +1 -0
  519. package/resources/js3d/project/runtime/lightgame/1.0.0/release.json +39 -0
  520. package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/cli.mjs +2 -0
  521. package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/project.d.mts +8 -0
  522. package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/project.mjs +2 -0
  523. package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/vite.d.mts +3 -0
  524. package/resources/js3d/project/runtime/lightgame/1.0.0/tooling/vite.mjs +7 -0
  525. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/assets.d.mts +24 -0
  526. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/assets.mjs +2 -0
  527. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/astc.d.mts +10 -0
  528. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/astc.mjs +1 -0
  529. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/audio.d.mts +20 -0
  530. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/audio.mjs +1 -0
  531. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/canvas.d.mts +21 -0
  532. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/canvas.mjs +1 -0
  533. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/glb.d.mts +36 -0
  534. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/glb.mjs +359 -0
  535. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/glb.test.mjs +25 -0
  536. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/input.d.mts +17 -0
  537. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/input.mjs +1 -0
  538. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/three.d.mts +40 -0
  539. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/three.mjs +1 -0
  540. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/ui.d.mts +10 -0
  541. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/ui.mjs +1 -0
  542. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/video.d.mts +8 -0
  543. package/resources/js3d/project/runtime/lightgame/1.0.0/tools/video.mjs +1 -0
  544. package/resources/js3d/project/scripts/config-export.mjs +32 -0
  545. package/resources/js3d/project/scripts/refresh-runtime.mjs +50 -0
  546. package/resources/js3d/project/src/display/ui-stage.ts +121 -0
  547. package/resources/js3d/project/src/display/viewport.ts +244 -0
  548. package/resources/js3d/project/src/main.ts +83 -0
  549. package/resources/js3d/project/src/platform.ts +14 -0
  550. package/resources/js3d/project/src/style.css +17 -0
  551. package/resources/js3d/project/tsconfig.json +20 -0
  552. package/resources/js3d/project/unified_data_control_config.json +20 -0
  553. package/resources/js3d/project/vendor/core-manager-three/package.json +12 -0
  554. package/resources/js3d/project/vendor/core-manager-three/src/index.ts +2 -0
  555. package/resources/js3d/project/vendor/run.sh +4 -0
  556. package/resources/js3d/project/version/craft_feature_version.json +42 -0
  557. package/resources/js3d/project/version/project_feature_version.json +11 -0
  558. package/resources/js3d/project/vite.config.ts +4 -0
  559. package/vendor/agent-cli/dist/runtime-tools/registry.json +6 -0
  560. package/vendor/agent-cli/dist/runtime-tools/tool-bundle-types.d.cts +15 -0
  561. package/vendor/agent-cli/dist/runtime-tools/tool-bundle.cjs +129 -0
  562. package/vendor/agent-cli/dist/runtime-tools/ue/blender-cook-assets.cjs +296 -0
  563. package/vendor/agent-cli/dist/runtime-tools/ue/context-adapter.cjs +48 -0
  564. package/vendor/agent-cli/dist/runtime-tools/ue/scene-process-lock.cjs +110 -0
  565. package/vendor/agent-cli/dist/runtime-tools/ue/tool-manifest.json +22 -0
  566. package/vendor/agent-cli/dist/runtime-tools/ue/ue-asset-references.cjs +305 -0
  567. package/vendor/agent-cli/dist/src/artifacts/context-finalize.d.ts +3 -0
  568. package/vendor/agent-cli/dist/src/artifacts/context-finalize.d.ts.map +1 -0
  569. package/vendor/agent-cli/dist/src/artifacts/context-finalize.js +45 -0
  570. package/vendor/agent-cli/dist/src/artifacts/context-finalize.js.map +1 -0
  571. package/vendor/agent-cli/dist/src/artifacts/prepare.d.ts +57 -0
  572. package/vendor/agent-cli/dist/src/artifacts/prepare.d.ts.map +1 -0
  573. package/vendor/agent-cli/dist/src/artifacts/prepare.js +198 -0
  574. package/vendor/agent-cli/dist/src/artifacts/prepare.js.map +1 -0
  575. package/vendor/agent-cli/dist/src/artifacts/process-artifacts.d.ts +32 -0
  576. package/vendor/agent-cli/dist/src/artifacts/process-artifacts.d.ts.map +1 -0
  577. package/vendor/agent-cli/dist/src/artifacts/process-artifacts.js +146 -0
  578. package/vendor/agent-cli/dist/src/artifacts/process-artifacts.js.map +1 -0
  579. package/vendor/agent-cli/dist/src/artifacts/restore.d.ts +28 -0
  580. package/vendor/agent-cli/dist/src/artifacts/restore.d.ts.map +1 -0
  581. package/vendor/agent-cli/dist/src/artifacts/restore.js +384 -0
  582. package/vendor/agent-cli/dist/src/artifacts/restore.js.map +1 -0
  583. package/vendor/agent-cli/dist/src/artifacts/static.d.ts +15 -0
  584. package/vendor/agent-cli/dist/src/artifacts/static.d.ts.map +1 -0
  585. package/vendor/agent-cli/dist/src/artifacts/static.js +152 -0
  586. package/vendor/agent-cli/dist/src/artifacts/static.js.map +1 -0
  587. package/vendor/agent-cli/dist/src/cli/commands/process.d.ts +4 -0
  588. package/vendor/agent-cli/dist/src/cli/commands/process.d.ts.map +1 -0
  589. package/vendor/agent-cli/dist/src/cli/commands/process.js +24 -0
  590. package/vendor/agent-cli/dist/src/cli/commands/process.js.map +1 -0
  591. package/vendor/agent-cli/dist/src/cli/commands/run-controls.d.ts +23 -0
  592. package/vendor/agent-cli/dist/src/cli/commands/run-controls.d.ts.map +1 -0
  593. package/vendor/agent-cli/dist/src/cli/commands/run-controls.js +62 -0
  594. package/vendor/agent-cli/dist/src/cli/commands/run-controls.js.map +1 -0
  595. package/vendor/agent-cli/dist/src/cli/commands/run-mock.d.ts +9 -0
  596. package/vendor/agent-cli/dist/src/cli/commands/run-mock.d.ts.map +1 -0
  597. package/vendor/agent-cli/dist/src/cli/commands/run-mock.js +15 -0
  598. package/vendor/agent-cli/dist/src/cli/commands/run-mock.js.map +1 -0
  599. package/vendor/agent-cli/dist/src/cli/commands/run.d.ts +3 -0
  600. package/vendor/agent-cli/dist/src/cli/commands/run.d.ts.map +1 -0
  601. package/vendor/agent-cli/dist/src/cli/commands/run.js +284 -0
  602. package/vendor/agent-cli/dist/src/cli/commands/run.js.map +1 -0
  603. package/vendor/agent-cli/dist/src/cli/commands/setup.d.ts +11 -0
  604. package/vendor/agent-cli/dist/src/cli/commands/setup.d.ts.map +1 -0
  605. package/vendor/agent-cli/dist/src/cli/commands/setup.js +161 -0
  606. package/vendor/agent-cli/dist/src/cli/commands/setup.js.map +1 -0
  607. package/vendor/agent-cli/dist/src/cli/options.d.ts +83 -0
  608. package/vendor/agent-cli/dist/src/cli/options.d.ts.map +1 -0
  609. package/vendor/agent-cli/dist/src/cli/options.js +213 -0
  610. package/vendor/agent-cli/dist/src/cli/options.js.map +1 -0
  611. package/vendor/agent-cli/dist/src/cli/process-protocol.d.ts +5 -0
  612. package/vendor/agent-cli/dist/src/cli/process-protocol.d.ts.map +1 -0
  613. package/vendor/agent-cli/dist/src/cli/process-protocol.js +276 -0
  614. package/vendor/agent-cli/dist/src/cli/process-protocol.js.map +1 -0
  615. package/vendor/agent-cli/dist/src/cli/registry.d.ts +55 -0
  616. package/vendor/agent-cli/dist/src/cli/registry.d.ts.map +1 -0
  617. package/vendor/agent-cli/dist/src/cli/registry.js +99 -0
  618. package/vendor/agent-cli/dist/src/cli/registry.js.map +1 -0
  619. package/vendor/agent-cli/dist/src/cli/render/jsonl-sink.d.ts +44 -0
  620. package/vendor/agent-cli/dist/src/cli/render/jsonl-sink.d.ts.map +1 -0
  621. package/vendor/agent-cli/dist/src/cli/render/jsonl-sink.js +83 -0
  622. package/vendor/agent-cli/dist/src/cli/render/jsonl-sink.js.map +1 -0
  623. package/vendor/agent-cli/dist/src/cli/render/text-sink.d.ts +28 -0
  624. package/vendor/agent-cli/dist/src/cli/render/text-sink.d.ts.map +1 -0
  625. package/vendor/agent-cli/dist/src/cli/render/text-sink.js +52 -0
  626. package/vendor/agent-cli/dist/src/cli/render/text-sink.js.map +1 -0
  627. package/vendor/agent-cli/dist/src/cli.d.ts +9 -0
  628. package/vendor/agent-cli/dist/src/cli.d.ts.map +1 -0
  629. package/vendor/agent-cli/dist/src/cli.js +54 -0
  630. package/vendor/agent-cli/dist/src/cli.js.map +1 -0
  631. package/vendor/agent-cli/dist/src/component/execution.d.ts +24 -0
  632. package/vendor/agent-cli/dist/src/component/execution.d.ts.map +1 -0
  633. package/vendor/agent-cli/dist/src/component/execution.js +131 -0
  634. package/vendor/agent-cli/dist/src/component/execution.js.map +1 -0
  635. package/vendor/agent-cli/dist/src/component/platform-access/server.d.ts +24 -0
  636. package/vendor/agent-cli/dist/src/component/platform-access/server.d.ts.map +1 -0
  637. package/vendor/agent-cli/dist/src/component/platform-access/server.js +200 -0
  638. package/vendor/agent-cli/dist/src/component/platform-access/server.js.map +1 -0
  639. package/vendor/agent-cli/dist/src/component/preparation-diagnostics.d.ts +31 -0
  640. package/vendor/agent-cli/dist/src/component/preparation-diagnostics.d.ts.map +1 -0
  641. package/vendor/agent-cli/dist/src/component/preparation-diagnostics.js +57 -0
  642. package/vendor/agent-cli/dist/src/component/preparation-diagnostics.js.map +1 -0
  643. package/vendor/agent-cli/dist/src/component/preparation.d.ts +10 -0
  644. package/vendor/agent-cli/dist/src/component/preparation.d.ts.map +1 -0
  645. package/vendor/agent-cli/dist/src/component/preparation.js +35 -0
  646. package/vendor/agent-cli/dist/src/component/preparation.js.map +1 -0
  647. package/vendor/agent-cli/dist/src/component/runtime-tools.d.ts +15 -0
  648. package/vendor/agent-cli/dist/src/component/runtime-tools.d.ts.map +1 -0
  649. package/vendor/agent-cli/dist/src/component/runtime-tools.js +37 -0
  650. package/vendor/agent-cli/dist/src/component/runtime-tools.js.map +1 -0
  651. package/vendor/agent-cli/dist/src/component/runtime.d.ts +8 -0
  652. package/vendor/agent-cli/dist/src/component/runtime.d.ts.map +1 -0
  653. package/vendor/agent-cli/dist/src/component/runtime.js +95 -0
  654. package/vendor/agent-cli/dist/src/component/runtime.js.map +1 -0
  655. package/vendor/agent-cli/dist/src/config/config-store.d.ts +50 -0
  656. package/vendor/agent-cli/dist/src/config/config-store.d.ts.map +1 -0
  657. package/vendor/agent-cli/dist/src/config/config-store.js +117 -0
  658. package/vendor/agent-cli/dist/src/config/config-store.js.map +1 -0
  659. package/vendor/agent-cli/dist/src/context/cache-lease.d.ts +17 -0
  660. package/vendor/agent-cli/dist/src/context/cache-lease.d.ts.map +1 -0
  661. package/vendor/agent-cli/dist/src/context/cache-lease.js +133 -0
  662. package/vendor/agent-cli/dist/src/context/cache-lease.js.map +1 -0
  663. package/vendor/agent-cli/dist/src/context/cache-prune-diagnostics.d.ts +9 -0
  664. package/vendor/agent-cli/dist/src/context/cache-prune-diagnostics.d.ts.map +1 -0
  665. package/vendor/agent-cli/dist/src/context/cache-prune-diagnostics.js +51 -0
  666. package/vendor/agent-cli/dist/src/context/cache-prune-diagnostics.js.map +1 -0
  667. package/vendor/agent-cli/dist/src/context/cache-publication.d.ts +4 -0
  668. package/vendor/agent-cli/dist/src/context/cache-publication.d.ts.map +1 -0
  669. package/vendor/agent-cli/dist/src/context/cache-publication.js +54 -0
  670. package/vendor/agent-cli/dist/src/context/cache-publication.js.map +1 -0
  671. package/vendor/agent-cli/dist/src/context/client-context-view.d.ts +12 -0
  672. package/vendor/agent-cli/dist/src/context/client-context-view.d.ts.map +1 -0
  673. package/vendor/agent-cli/dist/src/context/client-context-view.js +100 -0
  674. package/vendor/agent-cli/dist/src/context/client-context-view.js.map +1 -0
  675. package/vendor/agent-cli/dist/src/context/context-budget.d.ts +3 -0
  676. package/vendor/agent-cli/dist/src/context/context-budget.d.ts.map +1 -0
  677. package/vendor/agent-cli/dist/src/context/context-budget.js +10 -0
  678. package/vendor/agent-cli/dist/src/context/context-budget.js.map +1 -0
  679. package/vendor/agent-cli/dist/src/context/context-cache.d.ts +108 -0
  680. package/vendor/agent-cli/dist/src/context/context-cache.d.ts.map +1 -0
  681. package/vendor/agent-cli/dist/src/context/context-cache.js +357 -0
  682. package/vendor/agent-cli/dist/src/context/context-cache.js.map +1 -0
  683. package/vendor/agent-cli/dist/src/context/context-project.d.ts +26 -0
  684. package/vendor/agent-cli/dist/src/context/context-project.d.ts.map +1 -0
  685. package/vendor/agent-cli/dist/src/context/context-project.js +113 -0
  686. package/vendor/agent-cli/dist/src/context/context-project.js.map +1 -0
  687. package/vendor/agent-cli/dist/src/context/context-resource.d.ts +4 -0
  688. package/vendor/agent-cli/dist/src/context/context-resource.d.ts.map +1 -0
  689. package/vendor/agent-cli/dist/src/context/context-resource.js +11 -0
  690. package/vendor/agent-cli/dist/src/context/context-resource.js.map +1 -0
  691. package/vendor/agent-cli/dist/src/context/context-snapshot-cache.d.ts +9 -0
  692. package/vendor/agent-cli/dist/src/context/context-snapshot-cache.d.ts.map +1 -0
  693. package/vendor/agent-cli/dist/src/context/context-snapshot-cache.js +134 -0
  694. package/vendor/agent-cli/dist/src/context/context-snapshot-cache.js.map +1 -0
  695. package/vendor/agent-cli/dist/src/context/local-skills.d.ts +4 -0
  696. package/vendor/agent-cli/dist/src/context/local-skills.d.ts.map +1 -0
  697. package/vendor/agent-cli/dist/src/context/local-skills.js +157 -0
  698. package/vendor/agent-cli/dist/src/context/local-skills.js.map +1 -0
  699. package/vendor/agent-cli/dist/src/context/member-context.d.ts +19 -0
  700. package/vendor/agent-cli/dist/src/context/member-context.d.ts.map +1 -0
  701. package/vendor/agent-cli/dist/src/context/member-context.js +105 -0
  702. package/vendor/agent-cli/dist/src/context/member-context.js.map +1 -0
  703. package/vendor/agent-cli/dist/src/context/member-documents.d.ts +3 -0
  704. package/vendor/agent-cli/dist/src/context/member-documents.d.ts.map +1 -0
  705. package/vendor/agent-cli/dist/src/context/member-documents.js +38 -0
  706. package/vendor/agent-cli/dist/src/context/member-documents.js.map +1 -0
  707. package/vendor/agent-cli/dist/src/context/member-profile-header.d.ts +3 -0
  708. package/vendor/agent-cli/dist/src/context/member-profile-header.d.ts.map +1 -0
  709. package/vendor/agent-cli/dist/src/context/member-profile-header.js +62 -0
  710. package/vendor/agent-cli/dist/src/context/member-profile-header.js.map +1 -0
  711. package/vendor/agent-cli/dist/src/context/member-profile.d.ts +43 -0
  712. package/vendor/agent-cli/dist/src/context/member-profile.d.ts.map +1 -0
  713. package/vendor/agent-cli/dist/src/context/member-profile.js +91 -0
  714. package/vendor/agent-cli/dist/src/context/member-profile.js.map +1 -0
  715. package/vendor/agent-cli/dist/src/context/member-selection.d.ts +7 -0
  716. package/vendor/agent-cli/dist/src/context/member-selection.d.ts.map +1 -0
  717. package/vendor/agent-cli/dist/src/context/member-selection.js +58 -0
  718. package/vendor/agent-cli/dist/src/context/member-selection.js.map +1 -0
  719. package/vendor/agent-cli/dist/src/context/script-dependencies.d.ts +6 -0
  720. package/vendor/agent-cli/dist/src/context/script-dependencies.d.ts.map +1 -0
  721. package/vendor/agent-cli/dist/src/context/script-dependencies.js +24 -0
  722. package/vendor/agent-cli/dist/src/context/script-dependencies.js.map +1 -0
  723. package/vendor/agent-cli/dist/src/context/shared-cache-build.d.ts +3 -0
  724. package/vendor/agent-cli/dist/src/context/shared-cache-build.d.ts.map +1 -0
  725. package/vendor/agent-cli/dist/src/context/shared-cache-build.js +55 -0
  726. package/vendor/agent-cli/dist/src/context/shared-cache-build.js.map +1 -0
  727. package/vendor/agent-cli/dist/src/context/team-definition.d.ts +39 -0
  728. package/vendor/agent-cli/dist/src/context/team-definition.d.ts.map +1 -0
  729. package/vendor/agent-cli/dist/src/context/team-definition.js +78 -0
  730. package/vendor/agent-cli/dist/src/context/team-definition.js.map +1 -0
  731. package/vendor/agent-cli/dist/src/context/team-knowledge.d.ts +7 -0
  732. package/vendor/agent-cli/dist/src/context/team-knowledge.d.ts.map +1 -0
  733. package/vendor/agent-cli/dist/src/context/team-knowledge.js +37 -0
  734. package/vendor/agent-cli/dist/src/context/team-knowledge.js.map +1 -0
  735. package/vendor/agent-cli/dist/src/context/template-cache.d.ts +27 -0
  736. package/vendor/agent-cli/dist/src/context/template-cache.d.ts.map +1 -0
  737. package/vendor/agent-cli/dist/src/context/template-cache.js +100 -0
  738. package/vendor/agent-cli/dist/src/context/template-cache.js.map +1 -0
  739. package/vendor/agent-cli/dist/src/context/template-seed.d.ts +32 -0
  740. package/vendor/agent-cli/dist/src/context/template-seed.d.ts.map +1 -0
  741. package/vendor/agent-cli/dist/src/context/template-seed.js +117 -0
  742. package/vendor/agent-cli/dist/src/context/template-seed.js.map +1 -0
  743. package/vendor/agent-cli/dist/src/context/user-skill-bundle.d.ts +19 -0
  744. package/vendor/agent-cli/dist/src/context/user-skill-bundle.d.ts.map +1 -0
  745. package/vendor/agent-cli/dist/src/context/user-skill-bundle.js +292 -0
  746. package/vendor/agent-cli/dist/src/context/user-skill-bundle.js.map +1 -0
  747. package/vendor/agent-cli/dist/src/context/user-skill-context.d.ts +13 -0
  748. package/vendor/agent-cli/dist/src/context/user-skill-context.d.ts.map +1 -0
  749. package/vendor/agent-cli/dist/src/context/user-skill-context.js +178 -0
  750. package/vendor/agent-cli/dist/src/context/user-skill-context.js.map +1 -0
  751. package/vendor/agent-cli/dist/src/context/user-skill-install.d.ts +54 -0
  752. package/vendor/agent-cli/dist/src/context/user-skill-install.d.ts.map +1 -0
  753. package/vendor/agent-cli/dist/src/context/user-skill-install.js +184 -0
  754. package/vendor/agent-cli/dist/src/context/user-skill-install.js.map +1 -0
  755. package/vendor/agent-cli/dist/src/context/zip-extract.d.ts +14 -0
  756. package/vendor/agent-cli/dist/src/context/zip-extract.d.ts.map +1 -0
  757. package/vendor/agent-cli/dist/src/context/zip-extract.js +130 -0
  758. package/vendor/agent-cli/dist/src/context/zip-extract.js.map +1 -0
  759. package/vendor/agent-cli/dist/src/index.d.ts +56 -0
  760. package/vendor/agent-cli/dist/src/index.d.ts.map +1 -0
  761. package/vendor/agent-cli/dist/src/index.js +82 -0
  762. package/vendor/agent-cli/dist/src/index.js.map +1 -0
  763. package/vendor/agent-cli/dist/src/lifecycle/engine-hooks.d.ts +68 -0
  764. package/vendor/agent-cli/dist/src/lifecycle/engine-hooks.d.ts.map +1 -0
  765. package/vendor/agent-cli/dist/src/lifecycle/engine-hooks.js +242 -0
  766. package/vendor/agent-cli/dist/src/lifecycle/engine-hooks.js.map +1 -0
  767. package/vendor/agent-cli/dist/src/lifecycle/hook-command.d.ts +40 -0
  768. package/vendor/agent-cli/dist/src/lifecycle/hook-command.d.ts.map +1 -0
  769. package/vendor/agent-cli/dist/src/lifecycle/hook-command.js +87 -0
  770. package/vendor/agent-cli/dist/src/lifecycle/hook-command.js.map +1 -0
  771. package/vendor/agent-cli/dist/src/lifecycle/registry.d.ts +134 -0
  772. package/vendor/agent-cli/dist/src/lifecycle/registry.d.ts.map +1 -0
  773. package/vendor/agent-cli/dist/src/lifecycle/registry.js +152 -0
  774. package/vendor/agent-cli/dist/src/lifecycle/registry.js.map +1 -0
  775. package/vendor/agent-cli/dist/src/lifecycle/workspace-change.d.ts +40 -0
  776. package/vendor/agent-cli/dist/src/lifecycle/workspace-change.d.ts.map +1 -0
  777. package/vendor/agent-cli/dist/src/lifecycle/workspace-change.js +149 -0
  778. package/vendor/agent-cli/dist/src/lifecycle/workspace-change.js.map +1 -0
  779. package/vendor/agent-cli/dist/src/mcp/client.d.ts +12 -0
  780. package/vendor/agent-cli/dist/src/mcp/client.d.ts.map +1 -0
  781. package/vendor/agent-cli/dist/src/mcp/client.js +95 -0
  782. package/vendor/agent-cli/dist/src/mcp/client.js.map +1 -0
  783. package/vendor/agent-cli/dist/src/mcp/connection.d.ts +14 -0
  784. package/vendor/agent-cli/dist/src/mcp/connection.d.ts.map +1 -0
  785. package/vendor/agent-cli/dist/src/mcp/connection.js +115 -0
  786. package/vendor/agent-cli/dist/src/mcp/connection.js.map +1 -0
  787. package/vendor/agent-cli/dist/src/mcp/execute.d.ts +5 -0
  788. package/vendor/agent-cli/dist/src/mcp/execute.d.ts.map +1 -0
  789. package/vendor/agent-cli/dist/src/mcp/execute.js +26 -0
  790. package/vendor/agent-cli/dist/src/mcp/execute.js.map +1 -0
  791. package/vendor/agent-cli/dist/src/mcp/instance-lock.d.ts +11 -0
  792. package/vendor/agent-cli/dist/src/mcp/instance-lock.d.ts.map +1 -0
  793. package/vendor/agent-cli/dist/src/mcp/instance-lock.js +51 -0
  794. package/vendor/agent-cli/dist/src/mcp/instance-lock.js.map +1 -0
  795. package/vendor/agent-cli/dist/src/mcp/types.d.ts +27 -0
  796. package/vendor/agent-cli/dist/src/mcp/types.d.ts.map +1 -0
  797. package/vendor/agent-cli/dist/src/mcp/types.js +2 -0
  798. package/vendor/agent-cli/dist/src/mcp/types.js.map +1 -0
  799. package/vendor/agent-cli/dist/src/protocol/input.d.ts +21 -0
  800. package/vendor/agent-cli/dist/src/protocol/input.d.ts.map +1 -0
  801. package/vendor/agent-cli/dist/src/protocol/input.js +95 -0
  802. package/vendor/agent-cli/dist/src/protocol/input.js.map +1 -0
  803. package/vendor/agent-cli/dist/src/protocol/link/channel.d.ts +58 -0
  804. package/vendor/agent-cli/dist/src/protocol/link/channel.d.ts.map +1 -0
  805. package/vendor/agent-cli/dist/src/protocol/link/channel.js +337 -0
  806. package/vendor/agent-cli/dist/src/protocol/link/channel.js.map +1 -0
  807. package/vendor/agent-cli/dist/src/protocol/link/codec-json.d.ts +13 -0
  808. package/vendor/agent-cli/dist/src/protocol/link/codec-json.d.ts.map +1 -0
  809. package/vendor/agent-cli/dist/src/protocol/link/codec-json.js +27 -0
  810. package/vendor/agent-cli/dist/src/protocol/link/codec-json.js.map +1 -0
  811. package/vendor/agent-cli/dist/src/protocol/link/envelope.d.ts +57 -0
  812. package/vendor/agent-cli/dist/src/protocol/link/envelope.d.ts.map +1 -0
  813. package/vendor/agent-cli/dist/src/protocol/link/envelope.js +93 -0
  814. package/vendor/agent-cli/dist/src/protocol/link/envelope.js.map +1 -0
  815. package/vendor/agent-cli/dist/src/protocol/link/liveness.d.ts +28 -0
  816. package/vendor/agent-cli/dist/src/protocol/link/liveness.d.ts.map +1 -0
  817. package/vendor/agent-cli/dist/src/protocol/link/liveness.js +86 -0
  818. package/vendor/agent-cli/dist/src/protocol/link/liveness.js.map +1 -0
  819. package/vendor/agent-cli/dist/src/protocol/link/middleware.d.ts +14 -0
  820. package/vendor/agent-cli/dist/src/protocol/link/middleware.d.ts.map +1 -0
  821. package/vendor/agent-cli/dist/src/protocol/link/middleware.js +40 -0
  822. package/vendor/agent-cli/dist/src/protocol/link/middleware.js.map +1 -0
  823. package/vendor/agent-cli/dist/src/protocol/link/rpc.d.ts +31 -0
  824. package/vendor/agent-cli/dist/src/protocol/link/rpc.d.ts.map +1 -0
  825. package/vendor/agent-cli/dist/src/protocol/link/rpc.js +90 -0
  826. package/vendor/agent-cli/dist/src/protocol/link/rpc.js.map +1 -0
  827. package/vendor/agent-cli/dist/src/protocol/link/transport-ws.d.ts +32 -0
  828. package/vendor/agent-cli/dist/src/protocol/link/transport-ws.d.ts.map +1 -0
  829. package/vendor/agent-cli/dist/src/protocol/link/transport-ws.js +106 -0
  830. package/vendor/agent-cli/dist/src/protocol/link/transport-ws.js.map +1 -0
  831. package/vendor/agent-cli/dist/src/protocol/messages/errors.gen.d.ts +509 -0
  832. package/vendor/agent-cli/dist/src/protocol/messages/errors.gen.d.ts.map +1 -0
  833. package/vendor/agent-cli/dist/src/protocol/messages/errors.gen.js +131 -0
  834. package/vendor/agent-cli/dist/src/protocol/messages/errors.gen.js.map +1 -0
  835. package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.d.ts +351 -0
  836. package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.d.ts.map +1 -0
  837. package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.js +103 -0
  838. package/vendor/agent-cli/dist/src/protocol/messages/messages.gen.js.map +1 -0
  839. package/vendor/agent-cli/dist/src/security/binary-read-receipts.d.ts +9 -0
  840. package/vendor/agent-cli/dist/src/security/binary-read-receipts.d.ts.map +1 -0
  841. package/vendor/agent-cli/dist/src/security/binary-read-receipts.js +58 -0
  842. package/vendor/agent-cli/dist/src/security/binary-read-receipts.js.map +1 -0
  843. package/vendor/agent-cli/dist/src/security/command-parse.d.ts +21 -0
  844. package/vendor/agent-cli/dist/src/security/command-parse.d.ts.map +1 -0
  845. package/vendor/agent-cli/dist/src/security/command-parse.js +395 -0
  846. package/vendor/agent-cli/dist/src/security/command-parse.js.map +1 -0
  847. package/vendor/agent-cli/dist/src/security/command-translate.d.ts +30 -0
  848. package/vendor/agent-cli/dist/src/security/command-translate.d.ts.map +1 -0
  849. package/vendor/agent-cli/dist/src/security/command-translate.js +161 -0
  850. package/vendor/agent-cli/dist/src/security/command-translate.js.map +1 -0
  851. package/vendor/agent-cli/dist/src/security/context-write-policy.d.ts +18 -0
  852. package/vendor/agent-cli/dist/src/security/context-write-policy.d.ts.map +1 -0
  853. package/vendor/agent-cli/dist/src/security/context-write-policy.js +121 -0
  854. package/vendor/agent-cli/dist/src/security/context-write-policy.js.map +1 -0
  855. package/vendor/agent-cli/dist/src/security/guard.d.ts +41 -0
  856. package/vendor/agent-cli/dist/src/security/guard.d.ts.map +1 -0
  857. package/vendor/agent-cli/dist/src/security/guard.js +154 -0
  858. package/vendor/agent-cli/dist/src/security/guard.js.map +1 -0
  859. package/vendor/agent-cli/dist/src/security/mount-table.d.ts +47 -0
  860. package/vendor/agent-cli/dist/src/security/mount-table.d.ts.map +1 -0
  861. package/vendor/agent-cli/dist/src/security/mount-table.js +164 -0
  862. package/vendor/agent-cli/dist/src/security/mount-table.js.map +1 -0
  863. package/vendor/agent-cli/dist/src/security/sandbox-path.d.ts +23 -0
  864. package/vendor/agent-cli/dist/src/security/sandbox-path.d.ts.map +1 -0
  865. package/vendor/agent-cli/dist/src/security/sandbox-path.js +110 -0
  866. package/vendor/agent-cli/dist/src/security/sandbox-path.js.map +1 -0
  867. package/vendor/agent-cli/dist/src/security/tool-run-owner.d.ts +5 -0
  868. package/vendor/agent-cli/dist/src/security/tool-run-owner.d.ts.map +1 -0
  869. package/vendor/agent-cli/dist/src/security/tool-run-owner.js +16 -0
  870. package/vendor/agent-cli/dist/src/security/tool-run-owner.js.map +1 -0
  871. package/vendor/agent-cli/dist/src/security/tool-scope.d.ts +16 -0
  872. package/vendor/agent-cli/dist/src/security/tool-scope.d.ts.map +1 -0
  873. package/vendor/agent-cli/dist/src/security/tool-scope.js +88 -0
  874. package/vendor/agent-cli/dist/src/security/tool-scope.js.map +1 -0
  875. package/vendor/agent-cli/dist/src/session/client.d.ts +116 -0
  876. package/vendor/agent-cli/dist/src/session/client.d.ts.map +1 -0
  877. package/vendor/agent-cli/dist/src/session/client.js +376 -0
  878. package/vendor/agent-cli/dist/src/session/client.js.map +1 -0
  879. package/vendor/agent-cli/dist/src/session/custom-context.d.ts +6 -0
  880. package/vendor/agent-cli/dist/src/session/custom-context.d.ts.map +1 -0
  881. package/vendor/agent-cli/dist/src/session/custom-context.js +100 -0
  882. package/vendor/agent-cli/dist/src/session/custom-context.js.map +1 -0
  883. package/vendor/agent-cli/dist/src/session/engine-decide.d.ts +38 -0
  884. package/vendor/agent-cli/dist/src/session/engine-decide.d.ts.map +1 -0
  885. package/vendor/agent-cli/dist/src/session/engine-decide.js +87 -0
  886. package/vendor/agent-cli/dist/src/session/engine-decide.js.map +1 -0
  887. package/vendor/agent-cli/dist/src/session/execution-settlement.d.ts +4 -0
  888. package/vendor/agent-cli/dist/src/session/execution-settlement.d.ts.map +1 -0
  889. package/vendor/agent-cli/dist/src/session/execution-settlement.js +15 -0
  890. package/vendor/agent-cli/dist/src/session/execution-settlement.js.map +1 -0
  891. package/vendor/agent-cli/dist/src/session/link-config.d.ts +13 -0
  892. package/vendor/agent-cli/dist/src/session/link-config.d.ts.map +1 -0
  893. package/vendor/agent-cli/dist/src/session/link-config.js +29 -0
  894. package/vendor/agent-cli/dist/src/session/link-config.js.map +1 -0
  895. package/vendor/agent-cli/dist/src/session/link-outcome.d.ts +30 -0
  896. package/vendor/agent-cli/dist/src/session/link-outcome.d.ts.map +1 -0
  897. package/vendor/agent-cli/dist/src/session/link-outcome.js +67 -0
  898. package/vendor/agent-cli/dist/src/session/link-outcome.js.map +1 -0
  899. package/vendor/agent-cli/dist/src/session/link-session.d.ts +76 -0
  900. package/vendor/agent-cli/dist/src/session/link-session.d.ts.map +1 -0
  901. package/vendor/agent-cli/dist/src/session/link-session.js +412 -0
  902. package/vendor/agent-cli/dist/src/session/link-session.js.map +1 -0
  903. package/vendor/agent-cli/dist/src/session/local-execution.d.ts +28 -0
  904. package/vendor/agent-cli/dist/src/session/local-execution.d.ts.map +1 -0
  905. package/vendor/agent-cli/dist/src/session/local-execution.js +119 -0
  906. package/vendor/agent-cli/dist/src/session/local-execution.js.map +1 -0
  907. package/vendor/agent-cli/dist/src/session/member-tools.d.ts +22 -0
  908. package/vendor/agent-cli/dist/src/session/member-tools.d.ts.map +1 -0
  909. package/vendor/agent-cli/dist/src/session/member-tools.js +72 -0
  910. package/vendor/agent-cli/dist/src/session/member-tools.js.map +1 -0
  911. package/vendor/agent-cli/dist/src/session/process-artifact-publisher.d.ts +7 -0
  912. package/vendor/agent-cli/dist/src/session/process-artifact-publisher.d.ts.map +1 -0
  913. package/vendor/agent-cli/dist/src/session/process-artifact-publisher.js +30 -0
  914. package/vendor/agent-cli/dist/src/session/process-artifact-publisher.js.map +1 -0
  915. package/vendor/agent-cli/dist/src/session/process-environment.d.ts +3 -0
  916. package/vendor/agent-cli/dist/src/session/process-environment.d.ts.map +1 -0
  917. package/vendor/agent-cli/dist/src/session/process-environment.js +22 -0
  918. package/vendor/agent-cli/dist/src/session/process-environment.js.map +1 -0
  919. package/vendor/agent-cli/dist/src/session/process-request.d.ts +36 -0
  920. package/vendor/agent-cli/dist/src/session/process-request.d.ts.map +1 -0
  921. package/vendor/agent-cli/dist/src/session/process-request.js +494 -0
  922. package/vendor/agent-cli/dist/src/session/process-request.js.map +1 -0
  923. package/vendor/agent-cli/dist/src/session/reference-tools.d.ts +8 -0
  924. package/vendor/agent-cli/dist/src/session/reference-tools.d.ts.map +1 -0
  925. package/vendor/agent-cli/dist/src/session/reference-tools.js +34 -0
  926. package/vendor/agent-cli/dist/src/session/reference-tools.js.map +1 -0
  927. package/vendor/agent-cli/dist/src/session/run-events.d.ts +81 -0
  928. package/vendor/agent-cli/dist/src/session/run-events.d.ts.map +1 -0
  929. package/vendor/agent-cli/dist/src/session/run-events.js +160 -0
  930. package/vendor/agent-cli/dist/src/session/run-events.js.map +1 -0
  931. package/vendor/agent-cli/dist/src/session/run-setup.d.ts +76 -0
  932. package/vendor/agent-cli/dist/src/session/run-setup.d.ts.map +1 -0
  933. package/vendor/agent-cli/dist/src/session/run-setup.js +273 -0
  934. package/vendor/agent-cli/dist/src/session/run-setup.js.map +1 -0
  935. package/vendor/agent-cli/dist/src/session/run-start-body.d.ts +41 -0
  936. package/vendor/agent-cli/dist/src/session/run-start-body.d.ts.map +1 -0
  937. package/vendor/agent-cli/dist/src/session/run-start-body.js +64 -0
  938. package/vendor/agent-cli/dist/src/session/run-start-body.js.map +1 -0
  939. package/vendor/agent-cli/dist/src/session/team-persistence.d.ts +17 -0
  940. package/vendor/agent-cli/dist/src/session/team-persistence.d.ts.map +1 -0
  941. package/vendor/agent-cli/dist/src/session/team-persistence.js +75 -0
  942. package/vendor/agent-cli/dist/src/session/team-persistence.js.map +1 -0
  943. package/vendor/agent-cli/dist/src/session/tool-scheduler.d.ts +37 -0
  944. package/vendor/agent-cli/dist/src/session/tool-scheduler.d.ts.map +1 -0
  945. package/vendor/agent-cli/dist/src/session/tool-scheduler.js +232 -0
  946. package/vendor/agent-cli/dist/src/session/tool-scheduler.js.map +1 -0
  947. package/vendor/agent-cli/dist/src/session/user-choice.d.ts +5 -0
  948. package/vendor/agent-cli/dist/src/session/user-choice.d.ts.map +1 -0
  949. package/vendor/agent-cli/dist/src/session/user-choice.js +80 -0
  950. package/vendor/agent-cli/dist/src/session/user-choice.js.map +1 -0
  951. package/vendor/agent-cli/dist/src/session/user-skill-loaded.d.ts +31 -0
  952. package/vendor/agent-cli/dist/src/session/user-skill-loaded.d.ts.map +1 -0
  953. package/vendor/agent-cli/dist/src/session/user-skill-loaded.js +104 -0
  954. package/vendor/agent-cli/dist/src/session/user-skill-loaded.js.map +1 -0
  955. package/vendor/agent-cli/dist/src/shared/app-id.d.ts +13 -0
  956. package/vendor/agent-cli/dist/src/shared/app-id.d.ts.map +1 -0
  957. package/vendor/agent-cli/dist/src/shared/app-id.js +25 -0
  958. package/vendor/agent-cli/dist/src/shared/app-id.js.map +1 -0
  959. package/vendor/agent-cli/dist/src/shared/auth-headers.d.ts +13 -0
  960. package/vendor/agent-cli/dist/src/shared/auth-headers.d.ts.map +1 -0
  961. package/vendor/agent-cli/dist/src/shared/auth-headers.js +16 -0
  962. package/vendor/agent-cli/dist/src/shared/auth-headers.js.map +1 -0
  963. package/vendor/agent-cli/dist/src/shared/cli-version.d.ts +3 -0
  964. package/vendor/agent-cli/dist/src/shared/cli-version.d.ts.map +1 -0
  965. package/vendor/agent-cli/dist/src/shared/cli-version.js +22 -0
  966. package/vendor/agent-cli/dist/src/shared/cli-version.js.map +1 -0
  967. package/vendor/agent-cli/dist/src/shared/error-detail.d.ts +14 -0
  968. package/vendor/agent-cli/dist/src/shared/error-detail.d.ts.map +1 -0
  969. package/vendor/agent-cli/dist/src/shared/error-detail.js +29 -0
  970. package/vendor/agent-cli/dist/src/shared/error-detail.js.map +1 -0
  971. package/vendor/agent-cli/dist/src/shared/output-guard.d.ts +36 -0
  972. package/vendor/agent-cli/dist/src/shared/output-guard.d.ts.map +1 -0
  973. package/vendor/agent-cli/dist/src/shared/output-guard.js +94 -0
  974. package/vendor/agent-cli/dist/src/shared/output-guard.js.map +1 -0
  975. package/vendor/agent-cli/dist/src/shared/process-cwd.d.ts +3 -0
  976. package/vendor/agent-cli/dist/src/shared/process-cwd.d.ts.map +1 -0
  977. package/vendor/agent-cli/dist/src/shared/process-cwd.js +11 -0
  978. package/vendor/agent-cli/dist/src/shared/process-cwd.js.map +1 -0
  979. package/vendor/agent-cli/dist/src/shared/process-types.d.ts +60 -0
  980. package/vendor/agent-cli/dist/src/shared/process-types.d.ts.map +1 -0
  981. package/vendor/agent-cli/dist/src/shared/process-types.js +10 -0
  982. package/vendor/agent-cli/dist/src/shared/process-types.js.map +1 -0
  983. package/vendor/agent-cli/dist/src/shared/server-headers.d.ts +7 -0
  984. package/vendor/agent-cli/dist/src/shared/server-headers.d.ts.map +1 -0
  985. package/vendor/agent-cli/dist/src/shared/server-headers.js +113 -0
  986. package/vendor/agent-cli/dist/src/shared/server-headers.js.map +1 -0
  987. package/vendor/agent-cli/dist/src/shared/shell-runtime.d.ts +47 -0
  988. package/vendor/agent-cli/dist/src/shared/shell-runtime.d.ts.map +1 -0
  989. package/vendor/agent-cli/dist/src/shared/shell-runtime.js +210 -0
  990. package/vendor/agent-cli/dist/src/shared/shell-runtime.js.map +1 -0
  991. package/vendor/agent-cli/dist/src/shared/types.d.ts +458 -0
  992. package/vendor/agent-cli/dist/src/shared/types.d.ts.map +1 -0
  993. package/vendor/agent-cli/dist/src/shared/types.js +2 -0
  994. package/vendor/agent-cli/dist/src/shared/types.js.map +1 -0
  995. package/vendor/agent-cli/dist/src/shared/user-choice.d.ts +22 -0
  996. package/vendor/agent-cli/dist/src/shared/user-choice.d.ts.map +1 -0
  997. package/vendor/agent-cli/dist/src/shared/user-choice.js +2 -0
  998. package/vendor/agent-cli/dist/src/shared/user-choice.js.map +1 -0
  999. package/vendor/agent-cli/dist/src/tools/artifact-publisher.d.ts +9 -0
  1000. package/vendor/agent-cli/dist/src/tools/artifact-publisher.d.ts.map +1 -0
  1001. package/vendor/agent-cli/dist/src/tools/artifact-publisher.js +85 -0
  1002. package/vendor/agent-cli/dist/src/tools/artifact-publisher.js.map +1 -0
  1003. package/vendor/agent-cli/dist/src/tools/command-executor.d.ts +30 -0
  1004. package/vendor/agent-cli/dist/src/tools/command-executor.d.ts.map +1 -0
  1005. package/vendor/agent-cli/dist/src/tools/command-executor.js +96 -0
  1006. package/vendor/agent-cli/dist/src/tools/command-executor.js.map +1 -0
  1007. package/vendor/agent-cli/dist/src/tools/context-program-publish.d.ts +16 -0
  1008. package/vendor/agent-cli/dist/src/tools/context-program-publish.d.ts.map +1 -0
  1009. package/vendor/agent-cli/dist/src/tools/context-program-publish.js +104 -0
  1010. package/vendor/agent-cli/dist/src/tools/context-program-publish.js.map +1 -0
  1011. package/vendor/agent-cli/dist/src/tools/context-program.d.ts +21 -0
  1012. package/vendor/agent-cli/dist/src/tools/context-program.d.ts.map +1 -0
  1013. package/vendor/agent-cli/dist/src/tools/context-program.js +207 -0
  1014. package/vendor/agent-cli/dist/src/tools/context-program.js.map +1 -0
  1015. package/vendor/agent-cli/dist/src/tools/file-ops.d.ts +61 -0
  1016. package/vendor/agent-cli/dist/src/tools/file-ops.d.ts.map +1 -0
  1017. package/vendor/agent-cli/dist/src/tools/file-ops.js +477 -0
  1018. package/vendor/agent-cli/dist/src/tools/file-ops.js.map +1 -0
  1019. package/vendor/agent-cli/dist/src/tools/local-hands.d.ts +58 -0
  1020. package/vendor/agent-cli/dist/src/tools/local-hands.d.ts.map +1 -0
  1021. package/vendor/agent-cli/dist/src/tools/local-hands.js +322 -0
  1022. package/vendor/agent-cli/dist/src/tools/local-hands.js.map +1 -0
  1023. package/vendor/agent-cli/dist/src/tools/ripgrep-search.d.ts +24 -0
  1024. package/vendor/agent-cli/dist/src/tools/ripgrep-search.d.ts.map +1 -0
  1025. package/vendor/agent-cli/dist/src/tools/ripgrep-search.js +160 -0
  1026. package/vendor/agent-cli/dist/src/tools/ripgrep-search.js.map +1 -0
  1027. package/vendor/agent-cli/dist/src/tools/tool-contract.gen.d.ts +66 -0
  1028. package/vendor/agent-cli/dist/src/tools/tool-contract.gen.d.ts.map +1 -0
  1029. package/vendor/agent-cli/dist/src/tools/tool-contract.gen.js +65 -0
  1030. package/vendor/agent-cli/dist/src/tools/tool-contract.gen.js.map +1 -0
  1031. package/vendor/agent-cli/dist/src/tools/tool-timeout.d.ts +29 -0
  1032. package/vendor/agent-cli/dist/src/tools/tool-timeout.d.ts.map +1 -0
  1033. package/vendor/agent-cli/dist/src/tools/tool-timeout.js +88 -0
  1034. package/vendor/agent-cli/dist/src/tools/tool-timeout.js.map +1 -0
  1035. package/vendor/agent-cli/dist/src/tools/write-guard.d.ts +42 -0
  1036. package/vendor/agent-cli/dist/src/tools/write-guard.d.ts.map +1 -0
  1037. package/vendor/agent-cli/dist/src/tools/write-guard.js +34 -0
  1038. package/vendor/agent-cli/dist/src/tools/write-guard.js.map +1 -0
  1039. package/vendor/agent-cli/package.json +29 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context-project.js","sourceRoot":"","sources":["../../../src/context/context-project.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AAkB,EAAE,SAAiB,EAAE,EAAE;QAC9D,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;QACtD,OAAO,QAAQ,KAAK,IAAI,IAAI,QAAQ,CAAC,UAAU,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IAChG,CAAC,CAAC;IACF,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,KAAK,CAAC;QAAE,MAAM,KAAK,CAAC,mDAAmD,CAAC,CAAC;IAClG,MAAM,CAAC,cAAc,EAAE,CAAC;IACxB,MAAM,KAAK,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACxC,MAAM,WAAW,GAAG,MAAM,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC1C,IAAI,CAAC,aAAa,CAAC,MAAM,QAAQ,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC;QAAE,MAAM,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACxH,MAAM,MAAM,GAAG,MAAM,0BAA0B,CAAC,WAAW,EAAE,GAAG,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC;IACzF,MAAM,CAAC,cAAc,EAAE,CAAC;IACxB,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC;AACxF,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare function validateTeamResource(resource: string): void;
2
+ /** Node execution protocols are private even when no Team claims the package. */
3
+ export declare function isNodeContextResource(resource: string): boolean;
4
+ //# sourceMappingURL=context-resource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context-resource.d.ts","sourceRoot":"","sources":["../../../src/context/context-resource.ts"],"names":[],"mappings":"AAAA,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAK3D;AAED,iFAAiF;AACjF,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAE/D"}
@@ -0,0 +1,11 @@
1
+ export function validateTeamResource(resource) {
2
+ if (typeof resource !== 'string' || !resource || resource.split('/').some(part => !part || part === '.' || part === '..'
3
+ || /[\\:\x00-\x1f\x7f<>"|?*]/.test(part) || /[ .]$/.test(part)) || /^teams(?:\/|$)/i.test(resource)) {
4
+ throw Error('Invalid Team resource selection');
5
+ }
6
+ }
7
+ /** Node execution protocols are private even when no Team claims the package. */
8
+ export function isNodeContextResource(resource) {
9
+ return /^(?:nodes|knowledge\/nodes)(?:\/|$)/i.test(resource);
10
+ }
11
+ //# sourceMappingURL=context-resource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context-resource.js","sourceRoot":"","sources":["../../../src/context/context-resource.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,oBAAoB,CAAC,QAAgB;IACnD,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,IAAI;WACnH,0BAA0B,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;QACtG,MAAM,KAAK,CAAC,iCAAiC,CAAC,CAAC;IACjD,CAAC;AACH,CAAC;AAED,iFAAiF;AACjF,MAAM,UAAU,qBAAqB,CAAC,QAAgB;IACpD,OAAO,sCAAsC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAC/D,CAAC"}
@@ -0,0 +1,9 @@
1
+ interface SnapshotFile {
2
+ path: string;
3
+ bytes: Buffer;
4
+ sha: string;
5
+ }
6
+ /** Source bytes are hashed before an immutable snapshot is shared. */
7
+ export declare function materializeContextSnapshot(cacheRoot: string, sha: string, files: readonly SnapshotFile[], signal: AbortSignal): Promise<string>;
8
+ export {};
9
+ //# sourceMappingURL=context-snapshot-cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context-snapshot-cache.d.ts","sourceRoot":"","sources":["../../../src/context/context-snapshot-cache.ts"],"names":[],"mappings":"AAKA,UAAU,YAAY;IAAG,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE;AAOnE,sEAAsE;AACtE,wBAAsB,0BAA0B,CAC9C,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,YAAY,EAAE,EAAE,MAAM,EAAE,WAAW,GAClF,OAAO,CAAC,MAAM,CAAC,CAIjB"}
@@ -0,0 +1,134 @@
1
+ import { createHash, randomUUID } from 'node:crypto';
2
+ import fs from 'node:fs/promises';
3
+ import path from 'node:path';
4
+ import { shareCacheBuild } from './shared-cache-build.js';
5
+ const existsCodes = new Set(['EEXIST', 'ENOTEMPTY', 'EPERM']);
6
+ const missingCodes = new Set(['ENOENT', 'ENOTDIR']);
7
+ const errorCode = (error) => error.code ?? '';
8
+ /** Source bytes are hashed before an immutable snapshot is shared. */
9
+ export async function materializeContextSnapshot(cacheRoot, sha, files, signal) {
10
+ const cache = path.join(cacheRoot, 'snapshots-v1');
11
+ const target = path.join(cache, sha);
12
+ return shareCacheBuild(target, signal, shared => publishSnapshot(cache, target, sha, files, shared));
13
+ }
14
+ async function completeSnapshot(target, sha, files, signal) {
15
+ signal.throwIfAborted();
16
+ try {
17
+ const root = await fs.lstat(target);
18
+ if (!root.isDirectory() || root.isSymbolicLink())
19
+ return false;
20
+ const metadata = path.join(target, 'snapshot.json');
21
+ const stat = await fs.lstat(metadata);
22
+ const manifestLimit = 1024 + files.reduce((size, file) => size + Buffer.byteLength(JSON.stringify(file.path)) + 256, 0);
23
+ if (!stat.isFile() || stat.isSymbolicLink() || stat.size > manifestLimit)
24
+ return false;
25
+ const manifest = JSON.parse(await fs.readFile(metadata, { encoding: 'utf8', signal }));
26
+ if (!manifest || manifest.version !== 1 || manifest.sha !== sha || !Array.isArray(manifest.files) || manifest.files.length !== files.length)
27
+ return false;
28
+ const expected = new Map(files.map((file, index) => [file.path, { file, recorded: manifest.files[index] }]));
29
+ const directories = new Set(files.flatMap(file => {
30
+ const parts = file.path.split('/');
31
+ return parts.slice(0, -1).map((_part, index) => parts.slice(0, index + 1).join('/'));
32
+ }));
33
+ let visited = 0;
34
+ async function visit(dir, prefix) {
35
+ signal.throwIfAborted();
36
+ const directory = await fs.lstat(dir);
37
+ if (!directory.isDirectory() || directory.isSymbolicLink())
38
+ return false;
39
+ for (const entry of await fs.readdir(dir, { withFileTypes: true })) {
40
+ signal.throwIfAborted();
41
+ const relative = prefix + entry.name;
42
+ if (entry.isSymbolicLink())
43
+ return false;
44
+ if (entry.isDirectory()) {
45
+ if (!directories.has(relative))
46
+ return false;
47
+ if (!await visit(path.join(dir, entry.name), relative + '/'))
48
+ return false;
49
+ continue;
50
+ }
51
+ const item = expected.get(relative);
52
+ if (!entry.isFile() || !item)
53
+ return false;
54
+ const { file, recorded } = item;
55
+ if (!recorded || recorded.path !== relative || recorded.sha !== file.sha || recorded.size !== file.bytes.length ||
56
+ !Number.isFinite(recorded.mtimeMs) || !Number.isFinite(recorded.ctimeMs))
57
+ return false;
58
+ const current = await fs.lstat(path.join(dir, entry.name));
59
+ if (!current.isFile() || current.isSymbolicLink() || current.size !== recorded.size)
60
+ return false;
61
+ // Stable immutable entries need no repeated byte reads. Changed files must still
62
+ // match the content address; same-size corruption is detected via change times.
63
+ if (current.mtimeMs !== recorded.mtimeMs || current.ctimeMs !== recorded.ctimeMs) {
64
+ const bytes = await fs.readFile(path.join(dir, entry.name), { signal });
65
+ if (createHash('sha256').update(bytes).digest('hex') !== file.sha)
66
+ return false;
67
+ }
68
+ visited++;
69
+ }
70
+ return true;
71
+ }
72
+ return await visit(path.join(target, 'context'), '') && visited === files.length;
73
+ }
74
+ catch (error) {
75
+ signal.throwIfAborted();
76
+ if (missingCodes.has(errorCode(error)) || error instanceof SyntaxError)
77
+ return false;
78
+ throw error;
79
+ }
80
+ }
81
+ async function publishSnapshot(cache, target, sha, files, signal) {
82
+ signal.throwIfAborted();
83
+ await fs.mkdir(cache, { recursive: true });
84
+ const root = await fs.lstat(cache);
85
+ if (!root.isDirectory() || root.isSymbolicLink())
86
+ throw Error('Context snapshot cache cannot be a symbolic link');
87
+ if (await completeSnapshot(target, sha, files, signal))
88
+ return path.join(target, 'context');
89
+ const temporary = path.join(cache, `${sha}-${randomUUID()}.tmp`);
90
+ try {
91
+ await fs.mkdir(path.join(temporary, 'context'), { recursive: true });
92
+ const manifest = { version: 1, sha, files: [] };
93
+ for (const file of files) {
94
+ signal.throwIfAborted();
95
+ const destination = path.join(temporary, 'context', file.path);
96
+ await fs.mkdir(path.dirname(destination), { recursive: true });
97
+ await fs.writeFile(destination, file.bytes, { signal });
98
+ const stat = await fs.lstat(destination);
99
+ manifest.files.push({ path: file.path, sha: file.sha, size: stat.size, mtimeMs: stat.mtimeMs, ctimeMs: stat.ctimeMs });
100
+ }
101
+ signal.throwIfAborted();
102
+ await fs.writeFile(path.join(temporary, 'snapshot.json'), JSON.stringify(manifest), { signal });
103
+ for (let attempt = 0; attempt < 4; attempt++) {
104
+ signal.throwIfAborted();
105
+ try {
106
+ await fs.rename(temporary, target);
107
+ return path.join(target, 'context');
108
+ }
109
+ catch (error) {
110
+ if (!existsCodes.has(errorCode(error)))
111
+ throw error;
112
+ // Another process may publish the same hash. An existing directory alone is
113
+ // insufficient: accept its completed manifest and full tree, or replace it.
114
+ if (await completeSnapshot(target, sha, files, signal))
115
+ return path.join(target, 'context');
116
+ const stale = path.join(cache, `${sha}-${randomUUID()}.stale`);
117
+ try {
118
+ await fs.rename(target, stale);
119
+ }
120
+ catch (moveError) {
121
+ if (missingCodes.has(errorCode(moveError)))
122
+ continue;
123
+ throw moveError;
124
+ }
125
+ await fs.rm(stale, { recursive: true, force: true });
126
+ }
127
+ }
128
+ throw Error('Context snapshot publication conflicted repeatedly');
129
+ }
130
+ finally {
131
+ await fs.rm(temporary, { recursive: true, force: true });
132
+ }
133
+ }
134
+ //# sourceMappingURL=context-snapshot-cache.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context-snapshot-cache.js","sourceRoot":"","sources":["../../../src/context/context-snapshot-cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAK1D,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC;AAC9D,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;AACpD,MAAM,SAAS,GAAG,CAAC,KAAc,EAAE,EAAE,CAAE,KAA+B,CAAC,IAAI,IAAI,EAAE,CAAC;AAElF,sEAAsE;AACtE,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAC9C,SAAiB,EAAE,GAAW,EAAE,KAA8B,EAAE,MAAmB;IAEnF,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;IACnD,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACrC,OAAO,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,KAA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AAK,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;YACvD,CAAC;QACH,CAAC;QACD,MAAM,KAAK,CAAC,oDAAoD,CAAC,CAAC;IACpE,CAAC;YAAS,CAAC;QACT,MAAM,EAAE,CAAC,EAAE,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3D,CAAC;AACH,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { type PreparationOptions } from '../component/preparation.js';
2
+ /** Snapshot local packages over the engine context without mutating either source. */
3
+ export declare function composeLocalSkills(contextDir: string | undefined, skillsDir: string, options?: PreparationOptions): Promise<string>;
4
+ //# sourceMappingURL=local-skills.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-skills.d.ts","sourceRoot":"","sources":["../../../src/context/local-skills.ts"],"names":[],"mappings":"AASA,OAAO,EAAmB,KAAK,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEvF,sFAAsF;AACtF,wBAAsB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,GAAE,kBAAuB,GAAG,OAAO,CAAC,MAAM,CAAC,CAwB7I"}
@@ -0,0 +1,157 @@
1
+ /**
2
+ * Compose an immutable engine context with a flat local skill directory.
3
+ * The physical tree keeps skill script imports relative to the engine's shared lib.
4
+ */
5
+ import { createHash, randomUUID } from 'node:crypto';
6
+ import { chmod, copyFile, lstat, mkdir, readdir, readFile, rename, rm } from 'node:fs/promises';
7
+ import path from 'node:path';
8
+ import { getContextCacheRoot } from './context-cache.js';
9
+ import { withPreparation } from '../component/preparation.js';
10
+ /** Snapshot local packages over the engine context without mutating either source. */
11
+ export async function composeLocalSkills(contextDir, skillsDir, options = {}) {
12
+ return withPreparation(options, async (signal) => {
13
+ const skills = path.resolve(skillsDir);
14
+ const names = (await readdir(skills)).sort();
15
+ for (const name of names) {
16
+ signal.throwIfAborted();
17
+ if (!name || name === '.' || name === '..' || /[\\/\s]/u.test(name) || Buffer.byteLength(name) > 128) {
18
+ throw new Error('Invalid local skill directory name: ' + name);
19
+ }
20
+ if (!(await lstat(path.join(skills, name))).isDirectory()) {
21
+ throw new Error('Local skills must contain package directories: ' + name);
22
+ }
23
+ await readFile(path.join(skills, name, 'SKILL.md'), { signal });
24
+ }
25
+ const hash = createHash('sha256');
26
+ if (contextDir) {
27
+ hash.update('engine\0');
28
+ await hashTree(path.resolve(contextDir), hash, signal);
29
+ }
30
+ hash.update('skills\0');
31
+ await hashTree(skills, hash, signal);
32
+ const dest = path.join(getContextCacheRoot(), 'local', hash.digest('hex'));
33
+ return materialize(contextDir, skills, names, dest, signal);
34
+ });
35
+ }
36
+ /** Hash file contents and paths; reject links so the read-only mount cannot escape its tree. */
37
+ async function hashTree(root, hash, signal, relative = '') {
38
+ signal.throwIfAborted();
39
+ const absolute = path.join(root, relative);
40
+ const stat = await lstat(absolute);
41
+ if (stat.isSymbolicLink())
42
+ throw new Error('Local context cannot contain symbolic links: ' + absolute);
43
+ hash.update(JSON.stringify([relative, stat.isDirectory() ? 'dir' : 'file', stat.isFile() ? stat.size : 0, stat.mode & 0o777]));
44
+ if (stat.isDirectory()) {
45
+ for (const name of (await readdir(absolute)).sort())
46
+ await hashTree(root, hash, signal, path.join(relative, name));
47
+ }
48
+ else if (stat.isFile()) {
49
+ hash.update(await readFile(absolute, { signal }));
50
+ }
51
+ else {
52
+ throw new Error('Local context contains unsupported entry: ' + absolute);
53
+ }
54
+ }
55
+ /** Build once, publish atomically, and reuse the complete content-addressed view. */
56
+ async function materialize(contextDir, skillsDir, names, dest, signal) {
57
+ try {
58
+ if ((await lstat(dest)).isDirectory())
59
+ return dest;
60
+ }
61
+ catch (err) {
62
+ if (err.code !== 'ENOENT')
63
+ throw err;
64
+ }
65
+ await mkdir(path.dirname(dest), { recursive: true });
66
+ const temp = dest + '.tmp-' + randomUUID();
67
+ await mkdir(temp, { mode: 0o700 });
68
+ try {
69
+ if (contextDir)
70
+ await copyTree(contextDir, temp, signal);
71
+ const scopes = await contextScopes(temp);
72
+ for (const scope of scopes) {
73
+ if (scope !== temp) {
74
+ try {
75
+ await lstat(path.join(scope, 'lib'));
76
+ }
77
+ catch (err) {
78
+ if (err.code !== 'ENOENT')
79
+ throw err;
80
+ try {
81
+ await copyTree(path.join(temp, 'lib'), path.join(scope, 'lib'), signal);
82
+ }
83
+ catch (copyError) {
84
+ if (copyError.code !== 'ENOENT')
85
+ throw copyError;
86
+ }
87
+ }
88
+ }
89
+ const target = path.join(scope, 'skills');
90
+ await mkdir(target, { recursive: true });
91
+ for (const name of names) {
92
+ signal.throwIfAborted();
93
+ await rm(path.join(target, name), { force: true, recursive: true });
94
+ await copyTree(path.join(skillsDir, name), path.join(target, name), signal);
95
+ }
96
+ }
97
+ try {
98
+ signal.throwIfAborted();
99
+ await rename(temp, dest);
100
+ }
101
+ catch (err) {
102
+ // Another process may have completed exactly the same immutable view.
103
+ // Windows returns EPERM when renaming a directory onto an existing one.
104
+ const code = err.code;
105
+ if (!['EEXIST', 'ENOTEMPTY', 'EPERM'].includes(code || ''))
106
+ throw err;
107
+ try {
108
+ if (!(await lstat(dest)).isDirectory())
109
+ throw err;
110
+ }
111
+ catch (destinationError) {
112
+ if (destinationError.code === 'ENOENT')
113
+ throw err;
114
+ throw destinationError;
115
+ }
116
+ }
117
+ return dest;
118
+ }
119
+ finally {
120
+ await rm(temp, { recursive: true, force: true });
121
+ }
122
+ }
123
+ /** Root and team contexts share the same explicitly selected local packages. */
124
+ async function contextScopes(root) {
125
+ const scopes = [root];
126
+ const teams = path.join(root, 'teams');
127
+ try {
128
+ for (const entry of await readdir(teams, { withFileTypes: true })) {
129
+ if (entry.isDirectory())
130
+ scopes.push(path.join(teams, entry.name));
131
+ }
132
+ }
133
+ catch (err) {
134
+ if (err.code !== 'ENOENT')
135
+ throw err;
136
+ }
137
+ return scopes;
138
+ }
139
+ /** 文件之间检查取消;只发布完整快照,并保留脚本权限。 */
140
+ async function copyTree(source, dest, signal) {
141
+ signal.throwIfAborted();
142
+ const stat = await lstat(source);
143
+ if (stat.isSymbolicLink() || (!stat.isDirectory() && !stat.isFile())) {
144
+ throw new Error('Local context contains unsupported entry: ' + source);
145
+ }
146
+ if (stat.isDirectory()) {
147
+ await mkdir(dest, { recursive: true });
148
+ for (const name of await readdir(source))
149
+ await copyTree(path.join(source, name), path.join(dest, name), signal);
150
+ await chmod(dest, stat.mode & 0o777);
151
+ }
152
+ else {
153
+ await copyFile(source, dest);
154
+ }
155
+ signal.throwIfAborted();
156
+ }
157
+ //# sourceMappingURL=local-skills.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-skills.js","sourceRoot":"","sources":["../../../src/context/local-skills.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAChG,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,EAAE,eAAe,EAA2B,MAAM,6BAA6B,CAAC;AAEvF,sFAAsF;AACtF,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,UAA8B,EAAE,SAAiB,EAAE,UAA8B,EAAE;IAC1H,OAAO,eAAe,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;QAC/C,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QACvC,MAAM,KAAK,GAAG,CAAC,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QAC7C,KAAK,MAAM,IAAI,IAA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ACrE,MAAM,IAAI,KAAK,CAAC,4CAA4C,GAAG,MAAM,CAAC,CAAC;IACzE,CAAC;IACD,IAAI,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;QACvB,MAAM,KAAK,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QACvC,KAAK,MAAM,IAAI,IAAI,MAAM,OAAO,CAAC,MAAM,CAAC;YAAE,MAAM,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;QACjH,MAAM,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC;IACvC,CAAC;SAAM,CAAC;QACN,MAAM,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAC/B,CAAC;IACD,MAAM,CAAC,cAAc,EAAE,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { type MemberContextProfile, type MemberContextReference } from './member-profile.js';
2
+ /** A bound role slot keeps prompt bytes and mounted resources together across follow-ups. */
3
+ export declare function prepareMemberContext(input: {
4
+ source: string;
5
+ role: string;
6
+ profile: MemberContextProfile;
7
+ shared: string;
8
+ instructions: string;
9
+ sharedPaths?: readonly string[];
10
+ owner?: string;
11
+ team?: string;
12
+ signal: AbortSignal;
13
+ runtimeFiles?: Record<string, Buffer>;
14
+ }): Promise<{
15
+ reference: MemberContextReference;
16
+ instructions: string;
17
+ }>;
18
+ export declare function restoreMemberContext(reference: MemberContextReference, signal: AbortSignal): Promise<string>;
19
+ //# sourceMappingURL=member-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"member-context.d.ts","sourceRoot":"","sources":["../../../src/context/member-context.ts"],"names":[],"mappings":"AAMA,OAAO,EAAkD,KAAK,oBAAoB,EAAE,KAAK,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAK7I,6FAA6F;AAC7F,wBAAsB,oBAAoB,CAAC,KAAK,EAAE;IAChD,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,oBAAoB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAClG,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,WAAW,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC3F,GAAG,OAAO,CAAC;IAAE,SAAS,EAAE,sBAAsB,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAAC,CAuDvE;AAOD,wBAAsB,oBAAoB,CAAC,SAAS,EAAE,sBAAsB,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAYlH"}
@@ -0,0 +1,105 @@
1
+ import { createHash, randomUUID } from 'node:crypto';
2
+ import { lstat, mkdir, readFile, writeFile, link, unlink } from 'node:fs/promises';
3
+ import path from 'node:path';
4
+ import { getContextCacheRoot } from './context-cache.js';
5
+ import { snapshotContextProject, verifyContextProject } from './context-project.js';
6
+ import { validateTeamResource } from './context-resource.js';
7
+ import { validateMemberProfile, validateMemberReference } from './member-profile.js';
8
+ const cache = () => path.join(getContextCacheRoot(), 'member-views');
9
+ const under = (root, file) => file === root || file.startsWith(root + '/');
10
+ /** A bound role slot keeps prompt bytes and mounted resources together across follow-ups. */
11
+ export async function prepareMemberContext(input) {
12
+ const binding = input.owner && input.profile.updatePolicy !== 'require-new-v1'
13
+ ? path.join(cache(), 'bindings', createHash('sha256').update(input.owner + '\0' + input.role).digest('hex') + '.json') : undefined;
14
+ if (binding) {
15
+ let bound;
16
+ try {
17
+ bound = JSON.parse(await readFile(binding, 'utf8'));
18
+ }
19
+ catch (error) {
20
+ if (error.code !== 'ENOENT')
21
+ throw error;
22
+ }
23
+ if (bound)
24
+ return restorePrepared(bound, input.signal);
25
+ }
26
+ validateMemberProfile(input.profile);
27
+ const sharedPaths = [...new Set(input.sharedPaths ?? [])];
28
+ sharedPaths.forEach(validateTeamResource);
29
+ const shared = new Set(sharedPaths);
30
+ const required = [...new Set([...input.profile.instructions, ...input.profile.knowledge.required])];
31
+ const sections = await Promise.all(required.filter(file => !shared.has(file))
32
+ .map(file => readFile(path.join(input.source, file), { encoding: 'utf8', signal: input.signal })));
33
+ for (const name of input.profile.skills.available)
34
+ await readFile(path.join(input.source, 'skills', name, 'SKILL.md'), { signal: input.signal });
35
+ const instructions = [input.shared, ...sections, input.instructions].filter(Boolean).join('\n\n');
36
+ const allowed = [...sharedPaths, ...required, ...input.profile.knowledge.available, ...input.profile.resources,
37
+ ...input.profile.skills.available.map(name => 'skills/' + name)];
38
+ const snapshot = await snapshotContextProject(input.source, input.signal, { cacheRoot: cache(),
39
+ client: { ...(input.team ? { team: input.team } : {}), member: true },
40
+ runtimeFiles: { ...input.runtimeFiles, 'CLAUDE.md': Buffer.from(instructions), '.member-context.json': Buffer.from(JSON.stringify({ ...input.profile.skills,
41
+ ...(input.profile.updatePolicy ? { update_policy: input.profile.updatePolicy } : {}),
42
+ ...(input.profile.documentReuse ? { document_reuse: input.profile.documentReuse } : {}),
43
+ ...(input.profile.history ? { history: input.profile.history } : {}), ...(input.profile.residentLimit ? { resident_limit: input.profile.residentLimit } : {}) })) },
44
+ // Engine tool policy is a mandatory security boundary, independent of role knowledge selection.
45
+ selectFiles: file => file === 'CLAUDE.md' || file === '.member-context.json' || file === 'context-programs.json' || file === 'hooks/tool-policy.json' || allowed.some(root => under(root, file)),
46
+ scriptDependencies: true,
47
+ documentDependencies: input.profile.documentDependencies,
48
+ });
49
+ // Required documents must survive Team ownership filtering as well as exist in the mother.
50
+ for (const file of [...sharedPaths, ...required, ...input.profile.skills.available.map(name => `skills/${name}/SKILL.md`)]) {
51
+ await readFile(path.join(snapshot.contextDir, file), { signal: input.signal });
52
+ }
53
+ for (const resource of [...input.profile.knowledge.available, ...input.profile.resources]) {
54
+ const selected = path.join(snapshot.contextDir, resource);
55
+ try {
56
+ await lstat(selected);
57
+ }
58
+ catch (error) {
59
+ throw new Error(`Member context resource is not mounted: ${resource}`, { cause: error });
60
+ }
61
+ }
62
+ const reference = { version: 1, sha: snapshot.contextSha,
63
+ ...(input.profile.updatePolicy ? { update_policy: input.profile.updatePolicy } : {}),
64
+ ...(input.profile.documentReuse ? { document_reuse: input.profile.documentReuse } : {}),
65
+ skills: [...input.profile.skills.available], preload: [...input.profile.skills.preload],
66
+ ...(input.profile.history ? { history: input.profile.history } : {}), ...(input.profile.residentLimit ? { resident_limit: input.profile.residentLimit } : {}) };
67
+ if (binding) {
68
+ await mkdir(path.dirname(binding), { recursive: true });
69
+ const temporary = binding + '.' + randomUUID() + '.tmp';
70
+ await writeFile(temporary, JSON.stringify(reference), { flag: 'wx' });
71
+ try {
72
+ await link(temporary, binding);
73
+ }
74
+ catch (error) {
75
+ if (error.code !== 'EEXIST')
76
+ throw error;
77
+ }
78
+ finally {
79
+ await unlink(temporary);
80
+ }
81
+ return restorePrepared(JSON.parse(await readFile(binding, 'utf8')), input.signal);
82
+ }
83
+ return { reference, instructions };
84
+ }
85
+ async function restorePrepared(reference, signal) {
86
+ const contextDir = await restoreMemberContext(reference, signal);
87
+ return { reference, instructions: await readFile(path.join(contextDir, 'CLAUDE.md'), 'utf8') };
88
+ }
89
+ export async function restoreMemberContext(reference, signal) {
90
+ validateMemberReference(reference);
91
+ const source = path.join(cache(), 'snapshots-v1', reference.sha, 'context');
92
+ if (!(await lstat(source)).isDirectory())
93
+ throw Error('Missing member context snapshot');
94
+ if (!await verifyContextProject(source, reference.sha, signal)) {
95
+ throw Error(`Member context snapshot contents changed (sha=${reference.sha}); restore the pinned snapshot or create a new member. Skill availability cannot be determined.`);
96
+ }
97
+ const skills = JSON.parse(await readFile(path.join(source, '.member-context.json'), 'utf8'));
98
+ if (JSON.stringify(skills.available) !== JSON.stringify(reference.skills) || JSON.stringify(skills.preload) !== JSON.stringify(reference.preload))
99
+ throw Error('Member snapshot skills do not match binding');
100
+ if (skills.history !== reference.history || skills.resident_limit !== reference.resident_limit || skills.document_reuse !== reference.document_reuse
101
+ || skills.update_policy !== reference.update_policy)
102
+ throw Error('Member snapshot policy does not match binding');
103
+ return source;
104
+ }
105
+ //# sourceMappingURL=member-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"member-context.js","sourceRoot":"","sources":["../../../src/context/member-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACnF,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAA0D,MAAM,qBAAqB,CAAC;AAE7I,MAAM,KAAK,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,cAAc,CAAC,CAAC;AACrE,MAAM,KAAK,GAAG,CAAC,IAAY,EAAE,IAAY,EAAE,EAAE,CAAC,IAAI,KAAK,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,GAAG,GAAG,CAAC,CAAC;AAE3F,6FAA6F;AAC7F,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,KAI1C;IACC,MAAM,OAAO,GAAG,KAAK,CAAC,KAAK,I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,MAAM,KAAK,CAAC,6CAA6C,CAAC,CAAC;IAC9M,IAAI,MAAM,CAAC,OAAO,KAAK,SAAS,CAAC,OAAO,IAAI,MAAM,CAAC,cAAc,KAAK,SAAS,CAAC,cAAc,IAAI,MAAM,CAAC,cAAc,KAAK,SAAS,CAAC,cAAc;WAC/I,MAAM,CAAC,aAAa,KAAK,SAAS,CAAC,aAAa;QAAE,MAAM,KAAK,CAAC,+CAA+C,CAAC,CAAC;IACpH,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** Literal supporting documents stay readable without becoming startup instructions. */
2
+ export declare function memberDocumentResources(source: string, entries: string[], signal: AbortSignal, roleDocument?: string): Promise<string[]>;
3
+ //# sourceMappingURL=member-documents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"member-documents.d.ts","sourceRoot":"","sources":["../../../src/context/member-documents.ts"],"names":[],"mappings":"AAIA,wFAAwF;AACxF,wBAAsB,uBAAuB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,SAAK,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CA2B1I"}
@@ -0,0 +1,38 @@
1
+ import { readFile } from 'node:fs/promises';
2
+ import path from 'node:path';
3
+ import { isNodeContextResource, validateTeamResource } from './context-resource.js';
4
+ /** Literal supporting documents stay readable without becoming startup instructions. */
5
+ export async function memberDocumentResources(source, entries, signal, roleDocument = '') {
6
+ const visited = new Set();
7
+ const resources = new Set();
8
+ const pending = [...entries];
9
+ let bytes = 0;
10
+ const references = (text) => {
11
+ for (const match of text.matchAll(/\$\{CLAUDE_DIR\}\/((?:rules|knowledge|nodes)\/[A-Za-z0-9_./-]+\.md)/g)) {
12
+ const relative = match[1];
13
+ validateTeamResource(relative);
14
+ if (isNodeContextResource(relative))
15
+ throw Error('Member documents cannot import private node protocols');
16
+ resources.add(relative);
17
+ if (!visited.has(relative))
18
+ pending.push(relative);
19
+ }
20
+ };
21
+ references(roleDocument);
22
+ while (pending.length) {
23
+ signal.throwIfAborted();
24
+ const relative = pending.shift();
25
+ if (visited.has(relative))
26
+ continue;
27
+ visited.add(relative);
28
+ if (visited.size > 128)
29
+ throw Error('Member document references exceed limits');
30
+ const content = await readFile(path.join(source, relative), { signal });
31
+ bytes += content.length;
32
+ if (bytes > 1024 * 1024)
33
+ throw Error('Member document references exceed limits');
34
+ references(content.toString('utf8'));
35
+ }
36
+ return [...resources].sort();
37
+ }
38
+ //# sourceMappingURL=member-documents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"member-documents.js","sourceRoot":"","sources":["../../../src/context/member-documents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAEpF,wFAAwF;AACxF,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,MAAc,EAAE,OAAiB,EAAE,MAAmB,EAAE,YAAY,GAAG,EAAE;IACrH,MAAM,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;IAClC,MAAM,SAAS,GAAG,IAAI,GAAG,EAAU,CAAC;IACpC,MAAM,OAAO,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC;IAC7B,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,MAAM,UAAU,GAAG,CAAC,IAAY,EAAE,EAAE;QAClC,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,sEAAsE,CAAC,EAAE,CAAC;YAC1G,MAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;YAC1B,oBAAoB,CAAC,QAAQ,CAAC,CAAC;YAC/B,IAAI,qBAAqB,CAAC,QAAQ,CAAC;gBAAE,MAAM,KAAK,CAAC,uDAAuD,CAAC,CAAC;YAC1G,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YACxB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC;gBAAE,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACrD,CAAC;IACH,CAAC,CAAC;IACF,UAAU,CAAC,YAAY,CAAC,CAAC;IACzB,OAAO,OAAO,CAAC,MAAM,EAAE,CAAC;QACtB,MAAM,CAAC,cAAc,EAAE,CAAC;QACxB,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,EAAG,CAAC;QAClC,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC;YAAE,SAAS;QACpC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACtB,IAAI,OAAO,CAAC,IAAI,GAAG,GAAG;YAAE,MAAM,KAAK,CAAC,0CAA0C,CAAC,CAAC;QAChF,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;QACxE,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC;QACxB,IAAI,KAAK,GAAG,IAAI,GAAG,IAAI;YAAE,MAAM,KAAK,CAAC,0CAA0C,CAAC,CAAC;QACjF,UAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;IACvC,CAAC;IACD,OAAO,CAAC,GAAG,SAAS,CAAC,CAAC,IAAI,EAAE,CAAC;AAC/B,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** The editable profile supports three lists, without enabling arbitrary YAML tags or objects. */
2
+ export declare function memberProfileHeader(content: string): unknown;
3
+ //# sourceMappingURL=member-profile-header.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"member-profile-header.d.ts","sourceRoot":"","sources":["../../../src/context/member-profile-header.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CA4B5D"}