@tianshu-ai/tianshu 0.3.0

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 (917) hide show
  1. package/LICENSE +200 -0
  2. package/README.md +284 -0
  3. package/README.zh-CN.md +136 -0
  4. package/bin/tianshu.mjs +32 -0
  5. package/package.json +60 -0
  6. package/packages/plugin-sdk/dist/agent-loop.d.ts +96 -0
  7. package/packages/plugin-sdk/dist/agent-loop.d.ts.map +1 -0
  8. package/packages/plugin-sdk/dist/agent-loop.js +11 -0
  9. package/packages/plugin-sdk/dist/agent-loop.js.map +1 -0
  10. package/packages/plugin-sdk/dist/capabilities.d.ts +48 -0
  11. package/packages/plugin-sdk/dist/capabilities.d.ts.map +1 -0
  12. package/packages/plugin-sdk/dist/capabilities.js +61 -0
  13. package/packages/plugin-sdk/dist/capabilities.js.map +1 -0
  14. package/packages/plugin-sdk/dist/catalog.d.ts +60 -0
  15. package/packages/plugin-sdk/dist/catalog.d.ts.map +1 -0
  16. package/packages/plugin-sdk/dist/catalog.js +11 -0
  17. package/packages/plugin-sdk/dist/catalog.js.map +1 -0
  18. package/packages/plugin-sdk/dist/client.d.ts +171 -0
  19. package/packages/plugin-sdk/dist/client.d.ts.map +1 -0
  20. package/packages/plugin-sdk/dist/client.js +96 -0
  21. package/packages/plugin-sdk/dist/client.js.map +1 -0
  22. package/packages/plugin-sdk/dist/index.d.ts +9 -0
  23. package/packages/plugin-sdk/dist/index.d.ts.map +1 -0
  24. package/packages/plugin-sdk/dist/index.js +19 -0
  25. package/packages/plugin-sdk/dist/index.js.map +1 -0
  26. package/packages/plugin-sdk/dist/lsp.d.ts +32 -0
  27. package/packages/plugin-sdk/dist/lsp.d.ts.map +1 -0
  28. package/packages/plugin-sdk/dist/lsp.js +19 -0
  29. package/packages/plugin-sdk/dist/lsp.js.map +1 -0
  30. package/packages/plugin-sdk/dist/manifest.d.ts +423 -0
  31. package/packages/plugin-sdk/dist/manifest.d.ts.map +1 -0
  32. package/packages/plugin-sdk/dist/manifest.js +7 -0
  33. package/packages/plugin-sdk/dist/manifest.js.map +1 -0
  34. package/packages/plugin-sdk/dist/mcp-client.d.ts +74 -0
  35. package/packages/plugin-sdk/dist/mcp-client.d.ts.map +1 -0
  36. package/packages/plugin-sdk/dist/mcp-client.js +226 -0
  37. package/packages/plugin-sdk/dist/mcp-client.js.map +1 -0
  38. package/packages/plugin-sdk/dist/mcp-fetch.d.ts +10 -0
  39. package/packages/plugin-sdk/dist/mcp-fetch.d.ts.map +1 -0
  40. package/packages/plugin-sdk/dist/mcp-fetch.js +130 -0
  41. package/packages/plugin-sdk/dist/mcp-fetch.js.map +1 -0
  42. package/packages/plugin-sdk/dist/mcp-toolset.d.ts +128 -0
  43. package/packages/plugin-sdk/dist/mcp-toolset.d.ts.map +1 -0
  44. package/packages/plugin-sdk/dist/mcp-toolset.js +246 -0
  45. package/packages/plugin-sdk/dist/mcp-toolset.js.map +1 -0
  46. package/packages/plugin-sdk/dist/server.d.ts +486 -0
  47. package/packages/plugin-sdk/dist/server.d.ts.map +1 -0
  48. package/packages/plugin-sdk/dist/server.js +10 -0
  49. package/packages/plugin-sdk/dist/server.js.map +1 -0
  50. package/packages/plugin-sdk/dist/session-inbox.d.ts +56 -0
  51. package/packages/plugin-sdk/dist/session-inbox.d.ts.map +1 -0
  52. package/packages/plugin-sdk/dist/session-inbox.js +12 -0
  53. package/packages/plugin-sdk/dist/session-inbox.js.map +1 -0
  54. package/packages/plugin-sdk/package.json +36 -0
  55. package/packages/server/builtinConfig/plugins/README.md +1 -0
  56. package/packages/server/builtinConfig/plugins/files/manifest.json +100 -0
  57. package/packages/server/builtinConfig/plugins/files/skills/files-workspace-layout.md +29 -0
  58. package/packages/server/builtinConfig/plugins/microsandbox/manifest.json +177 -0
  59. package/packages/server/builtinConfig/plugins/microsandbox/skills/microsandbox-browser-howto.md +155 -0
  60. package/packages/server/builtinConfig/plugins/microsandbox/skills/microsandbox-build-use.md +201 -0
  61. package/packages/server/builtinConfig/plugins/microsandbox/skills/microsandbox-config.md +38 -0
  62. package/packages/server/builtinConfig/plugins/microsandbox/skills/microsandbox-exec-howto.md +144 -0
  63. package/packages/server/builtinConfig/plugins/microsandbox/skills/microsandbox-libreoffice.md +159 -0
  64. package/packages/server/builtinConfig/plugins/microsandbox/skills/microsandbox-main-orchestration.md +75 -0
  65. package/packages/server/builtinConfig/plugins/microsandbox/templates/README.md +26 -0
  66. package/packages/server/builtinConfig/plugins/microsandbox/templates/browser.yaml +105 -0
  67. package/packages/server/builtinConfig/plugins/microsandbox/templates/task-runner-with-browser.yaml +80 -0
  68. package/packages/server/builtinConfig/plugins/microsandbox/templates/task-runner.yaml +80 -0
  69. package/packages/server/builtinConfig/plugins/web-search/manifest.json +65 -0
  70. package/packages/server/builtinConfig/plugins/web-search/skills/web-search-howto.md +69 -0
  71. package/packages/server/builtinConfig/plugins/workboard/agent-seeds/echo-demo/agent.json +7 -0
  72. package/packages/server/builtinConfig/plugins/workboard/agent-seeds/llm-default/SOUL.md +53 -0
  73. package/packages/server/builtinConfig/plugins/workboard/agent-seeds/llm-default/agent.json +7 -0
  74. package/packages/server/builtinConfig/plugins/workboard/manifest.json +180 -0
  75. package/packages/server/builtinConfig/plugins/workboard/skills/large-input-large-output.md +185 -0
  76. package/packages/server/builtinConfig/plugins/workboard/skills/workboard-howto.md +166 -0
  77. package/packages/server/builtinConfig/plugins/workboard/skills/worker-creator.md +267 -0
  78. package/packages/server/builtinConfig/plugins/workboard/skills/worker-fleet.md +431 -0
  79. package/packages/server/dist/catalog.d.ts +52 -0
  80. package/packages/server/dist/catalog.d.ts.map +1 -0
  81. package/packages/server/dist/catalog.js +189 -0
  82. package/packages/server/dist/catalog.js.map +1 -0
  83. package/packages/server/dist/chat/active-harnesses.d.ts +34 -0
  84. package/packages/server/dist/chat/active-harnesses.d.ts.map +1 -0
  85. package/packages/server/dist/chat/active-harnesses.js +118 -0
  86. package/packages/server/dist/chat/active-harnesses.js.map +1 -0
  87. package/packages/server/dist/chat/agent-loop.d.ts +64 -0
  88. package/packages/server/dist/chat/agent-loop.d.ts.map +1 -0
  89. package/packages/server/dist/chat/agent-loop.js +597 -0
  90. package/packages/server/dist/chat/agent-loop.js.map +1 -0
  91. package/packages/server/dist/chat/agent-tool-adapter.d.ts +33 -0
  92. package/packages/server/dist/chat/agent-tool-adapter.d.ts.map +1 -0
  93. package/packages/server/dist/chat/agent-tool-adapter.js +260 -0
  94. package/packages/server/dist/chat/agent-tool-adapter.js.map +1 -0
  95. package/packages/server/dist/chat/compact.d.ts +52 -0
  96. package/packages/server/dist/chat/compact.d.ts.map +1 -0
  97. package/packages/server/dist/chat/compact.js +248 -0
  98. package/packages/server/dist/chat/compact.js.map +1 -0
  99. package/packages/server/dist/chat/dump-system-prompt.d.ts +17 -0
  100. package/packages/server/dist/chat/dump-system-prompt.d.ts.map +1 -0
  101. package/packages/server/dist/chat/dump-system-prompt.js +58 -0
  102. package/packages/server/dist/chat/dump-system-prompt.js.map +1 -0
  103. package/packages/server/dist/chat/handler.d.ts +186 -0
  104. package/packages/server/dist/chat/handler.d.ts.map +1 -0
  105. package/packages/server/dist/chat/handler.js +1248 -0
  106. package/packages/server/dist/chat/handler.js.map +1 -0
  107. package/packages/server/dist/chat/image-fit.d.ts +34 -0
  108. package/packages/server/dist/chat/image-fit.d.ts.map +1 -0
  109. package/packages/server/dist/chat/image-fit.js +157 -0
  110. package/packages/server/dist/chat/image-fit.js.map +1 -0
  111. package/packages/server/dist/chat/messages.d.ts +118 -0
  112. package/packages/server/dist/chat/messages.d.ts.map +1 -0
  113. package/packages/server/dist/chat/messages.js +341 -0
  114. package/packages/server/dist/chat/messages.js.map +1 -0
  115. package/packages/server/dist/chat/session-inbox.d.ts +114 -0
  116. package/packages/server/dist/chat/session-inbox.d.ts.map +1 -0
  117. package/packages/server/dist/chat/session-inbox.js +418 -0
  118. package/packages/server/dist/chat/session-inbox.js.map +1 -0
  119. package/packages/server/dist/chat/sqlite-session-repo.d.ts +26 -0
  120. package/packages/server/dist/chat/sqlite-session-repo.d.ts.map +1 -0
  121. package/packages/server/dist/chat/sqlite-session-repo.js +132 -0
  122. package/packages/server/dist/chat/sqlite-session-repo.js.map +1 -0
  123. package/packages/server/dist/chat/sqlite-session-storage.d.ts +83 -0
  124. package/packages/server/dist/chat/sqlite-session-storage.d.ts.map +1 -0
  125. package/packages/server/dist/chat/sqlite-session-storage.js +418 -0
  126. package/packages/server/dist/chat/sqlite-session-storage.js.map +1 -0
  127. package/packages/server/dist/chat/stub-execution-env.d.ts +3 -0
  128. package/packages/server/dist/chat/stub-execution-env.d.ts.map +1 -0
  129. package/packages/server/dist/chat/stub-execution-env.js +87 -0
  130. package/packages/server/dist/chat/stub-execution-env.js.map +1 -0
  131. package/packages/server/dist/chat/token-estimate.d.ts +11 -0
  132. package/packages/server/dist/chat/token-estimate.d.ts.map +1 -0
  133. package/packages/server/dist/chat/token-estimate.js +67 -0
  134. package/packages/server/dist/chat/token-estimate.js.map +1 -0
  135. package/packages/server/dist/chat/ws-protocol.d.ts +244 -0
  136. package/packages/server/dist/chat/ws-protocol.d.ts.map +1 -0
  137. package/packages/server/dist/chat/ws-protocol.js +193 -0
  138. package/packages/server/dist/chat/ws-protocol.js.map +1 -0
  139. package/packages/server/dist/cli.d.ts +9 -0
  140. package/packages/server/dist/cli.d.ts.map +1 -0
  141. package/packages/server/dist/cli.js +329 -0
  142. package/packages/server/dist/cli.js.map +1 -0
  143. package/packages/server/dist/core/agent-seeds.d.ts +25 -0
  144. package/packages/server/dist/core/agent-seeds.d.ts.map +1 -0
  145. package/packages/server/dist/core/agent-seeds.js +69 -0
  146. package/packages/server/dist/core/agent-seeds.js.map +1 -0
  147. package/packages/server/dist/core/config.d.ts +172 -0
  148. package/packages/server/dist/core/config.d.ts.map +1 -0
  149. package/packages/server/dist/core/config.js +155 -0
  150. package/packages/server/dist/core/config.js.map +1 -0
  151. package/packages/server/dist/core/db-pool.d.ts +32 -0
  152. package/packages/server/dist/core/db-pool.d.ts.map +1 -0
  153. package/packages/server/dist/core/db-pool.js +108 -0
  154. package/packages/server/dist/core/db-pool.js.map +1 -0
  155. package/packages/server/dist/core/dev-mode.d.ts +13 -0
  156. package/packages/server/dist/core/dev-mode.d.ts.map +1 -0
  157. package/packages/server/dist/core/dev-mode.js +51 -0
  158. package/packages/server/dist/core/dev-mode.js.map +1 -0
  159. package/packages/server/dist/core/global-ops.d.ts +54 -0
  160. package/packages/server/dist/core/global-ops.d.ts.map +1 -0
  161. package/packages/server/dist/core/global-ops.js +143 -0
  162. package/packages/server/dist/core/global-ops.js.map +1 -0
  163. package/packages/server/dist/core/identity-resolvers.d.ts +102 -0
  164. package/packages/server/dist/core/identity-resolvers.d.ts.map +1 -0
  165. package/packages/server/dist/core/identity-resolvers.js +176 -0
  166. package/packages/server/dist/core/identity-resolvers.js.map +1 -0
  167. package/packages/server/dist/core/index.d.ts +13 -0
  168. package/packages/server/dist/core/index.d.ts.map +1 -0
  169. package/packages/server/dist/core/index.js +18 -0
  170. package/packages/server/dist/core/index.js.map +1 -0
  171. package/packages/server/dist/core/llm.d.ts +45 -0
  172. package/packages/server/dist/core/llm.d.ts.map +1 -0
  173. package/packages/server/dist/core/llm.js +140 -0
  174. package/packages/server/dist/core/llm.js.map +1 -0
  175. package/packages/server/dist/core/mcp-manager.d.ts +47 -0
  176. package/packages/server/dist/core/mcp-manager.d.ts.map +1 -0
  177. package/packages/server/dist/core/mcp-manager.js +129 -0
  178. package/packages/server/dist/core/mcp-manager.js.map +1 -0
  179. package/packages/server/dist/core/middleware.d.ts +31 -0
  180. package/packages/server/dist/core/middleware.d.ts.map +1 -0
  181. package/packages/server/dist/core/middleware.js +102 -0
  182. package/packages/server/dist/core/middleware.js.map +1 -0
  183. package/packages/server/dist/core/migrations/001-initial.d.ts +4 -0
  184. package/packages/server/dist/core/migrations/001-initial.d.ts.map +1 -0
  185. package/packages/server/dist/core/migrations/001-initial.js +66 -0
  186. package/packages/server/dist/core/migrations/001-initial.js.map +1 -0
  187. package/packages/server/dist/core/migrations/002-task-dependencies.d.ts +4 -0
  188. package/packages/server/dist/core/migrations/002-task-dependencies.d.ts.map +1 -0
  189. package/packages/server/dist/core/migrations/002-task-dependencies.js +20 -0
  190. package/packages/server/dist/core/migrations/002-task-dependencies.js.map +1 -0
  191. package/packages/server/dist/core/migrations/003-session-tree.d.ts +4 -0
  192. package/packages/server/dist/core/migrations/003-session-tree.d.ts.map +1 -0
  193. package/packages/server/dist/core/migrations/003-session-tree.js +96 -0
  194. package/packages/server/dist/core/migrations/003-session-tree.js.map +1 -0
  195. package/packages/server/dist/core/migrations/003-worker-agents.d.ts +4 -0
  196. package/packages/server/dist/core/migrations/003-worker-agents.d.ts.map +1 -0
  197. package/packages/server/dist/core/migrations/003-worker-agents.js +65 -0
  198. package/packages/server/dist/core/migrations/003-worker-agents.js.map +1 -0
  199. package/packages/server/dist/core/migrations/004-rebuild-message-chain.d.ts +4 -0
  200. package/packages/server/dist/core/migrations/004-rebuild-message-chain.d.ts.map +1 -0
  201. package/packages/server/dist/core/migrations/004-rebuild-message-chain.js +52 -0
  202. package/packages/server/dist/core/migrations/004-rebuild-message-chain.js.map +1 -0
  203. package/packages/server/dist/core/migrations/005-task-status-rename.d.ts +4 -0
  204. package/packages/server/dist/core/migrations/005-task-status-rename.d.ts.map +1 -0
  205. package/packages/server/dist/core/migrations/005-task-status-rename.js +64 -0
  206. package/packages/server/dist/core/migrations/005-task-status-rename.js.map +1 -0
  207. package/packages/server/dist/core/migrations/006-task-labels.d.ts +4 -0
  208. package/packages/server/dist/core/migrations/006-task-labels.d.ts.map +1 -0
  209. package/packages/server/dist/core/migrations/006-task-labels.js +43 -0
  210. package/packages/server/dist/core/migrations/006-task-labels.js.map +1 -0
  211. package/packages/server/dist/core/migrations/007-session-inbox.d.ts +4 -0
  212. package/packages/server/dist/core/migrations/007-session-inbox.d.ts.map +1 -0
  213. package/packages/server/dist/core/migrations/007-session-inbox.js +67 -0
  214. package/packages/server/dist/core/migrations/007-session-inbox.js.map +1 -0
  215. package/packages/server/dist/core/migrations/008-task-intervention.d.ts +4 -0
  216. package/packages/server/dist/core/migrations/008-task-intervention.d.ts.map +1 -0
  217. package/packages/server/dist/core/migrations/008-task-intervention.js +60 -0
  218. package/packages/server/dist/core/migrations/008-task-intervention.js.map +1 -0
  219. package/packages/server/dist/core/migrations/index.d.ts +12 -0
  220. package/packages/server/dist/core/migrations/index.d.ts.map +1 -0
  221. package/packages/server/dist/core/migrations/index.js +58 -0
  222. package/packages/server/dist/core/migrations/index.js.map +1 -0
  223. package/packages/server/dist/core/paths.d.ts +53 -0
  224. package/packages/server/dist/core/paths.d.ts.map +1 -0
  225. package/packages/server/dist/core/paths.js +125 -0
  226. package/packages/server/dist/core/paths.js.map +1 -0
  227. package/packages/server/dist/core/plugins/builtin-loader.d.ts +56 -0
  228. package/packages/server/dist/core/plugins/builtin-loader.d.ts.map +1 -0
  229. package/packages/server/dist/core/plugins/builtin-loader.js +153 -0
  230. package/packages/server/dist/core/plugins/builtin-loader.js.map +1 -0
  231. package/packages/server/dist/core/plugins/discovery.d.ts +28 -0
  232. package/packages/server/dist/core/plugins/discovery.d.ts.map +1 -0
  233. package/packages/server/dist/core/plugins/discovery.js +97 -0
  234. package/packages/server/dist/core/plugins/discovery.js.map +1 -0
  235. package/packages/server/dist/core/plugins/index.d.ts +6 -0
  236. package/packages/server/dist/core/plugins/index.d.ts.map +1 -0
  237. package/packages/server/dist/core/plugins/index.js +6 -0
  238. package/packages/server/dist/core/plugins/index.js.map +1 -0
  239. package/packages/server/dist/core/plugins/manifest.d.ts +9 -0
  240. package/packages/server/dist/core/plugins/manifest.d.ts.map +1 -0
  241. package/packages/server/dist/core/plugins/manifest.js +584 -0
  242. package/packages/server/dist/core/plugins/manifest.js.map +1 -0
  243. package/packages/server/dist/core/plugins/registry.d.ts +269 -0
  244. package/packages/server/dist/core/plugins/registry.d.ts.map +1 -0
  245. package/packages/server/dist/core/plugins/registry.js +1003 -0
  246. package/packages/server/dist/core/plugins/registry.js.map +1 -0
  247. package/packages/server/dist/core/plugins/secrets.d.ts +46 -0
  248. package/packages/server/dist/core/plugins/secrets.d.ts.map +1 -0
  249. package/packages/server/dist/core/plugins/secrets.js +174 -0
  250. package/packages/server/dist/core/plugins/secrets.js.map +1 -0
  251. package/packages/server/dist/core/plugins/skills.d.ts +131 -0
  252. package/packages/server/dist/core/plugins/skills.d.ts.map +1 -0
  253. package/packages/server/dist/core/plugins/skills.js +389 -0
  254. package/packages/server/dist/core/plugins/skills.js.map +1 -0
  255. package/packages/server/dist/core/templates.d.ts +28 -0
  256. package/packages/server/dist/core/templates.d.ts.map +1 -0
  257. package/packages/server/dist/core/templates.js +103 -0
  258. package/packages/server/dist/core/templates.js.map +1 -0
  259. package/packages/server/dist/core/tenant-context.d.ts +18 -0
  260. package/packages/server/dist/core/tenant-context.d.ts.map +1 -0
  261. package/packages/server/dist/core/tenant-context.js +42 -0
  262. package/packages/server/dist/core/tenant-context.js.map +1 -0
  263. package/packages/server/dist/core/tenant-id.d.ts +8 -0
  264. package/packages/server/dist/core/tenant-id.d.ts.map +1 -0
  265. package/packages/server/dist/core/tenant-id.js +53 -0
  266. package/packages/server/dist/core/tenant-id.js.map +1 -0
  267. package/packages/server/dist/core/tenant-skills.d.ts +29 -0
  268. package/packages/server/dist/core/tenant-skills.d.ts.map +1 -0
  269. package/packages/server/dist/core/tenant-skills.js +77 -0
  270. package/packages/server/dist/core/tenant-skills.js.map +1 -0
  271. package/packages/server/dist/core/worker-agents-fs.d.ts +44 -0
  272. package/packages/server/dist/core/worker-agents-fs.d.ts.map +1 -0
  273. package/packages/server/dist/core/worker-agents-fs.js +86 -0
  274. package/packages/server/dist/core/worker-agents-fs.js.map +1 -0
  275. package/packages/server/dist/core/worker-agents.d.ts +77 -0
  276. package/packages/server/dist/core/worker-agents.d.ts.map +1 -0
  277. package/packages/server/dist/core/worker-agents.js +191 -0
  278. package/packages/server/dist/core/worker-agents.js.map +1 -0
  279. package/packages/server/dist/index.d.ts +2 -0
  280. package/packages/server/dist/index.d.ts.map +1 -0
  281. package/packages/server/dist/index.js +623 -0
  282. package/packages/server/dist/index.js.map +1 -0
  283. package/packages/server/dist/lsp/client.d.ts +53 -0
  284. package/packages/server/dist/lsp/client.d.ts.map +1 -0
  285. package/packages/server/dist/lsp/client.js +258 -0
  286. package/packages/server/dist/lsp/client.js.map +1 -0
  287. package/packages/server/dist/lsp/format.d.ts +13 -0
  288. package/packages/server/dist/lsp/format.d.ts.map +1 -0
  289. package/packages/server/dist/lsp/format.js +55 -0
  290. package/packages/server/dist/lsp/format.js.map +1 -0
  291. package/packages/server/dist/lsp/index.d.ts +20 -0
  292. package/packages/server/dist/lsp/index.d.ts.map +1 -0
  293. package/packages/server/dist/lsp/index.js +32 -0
  294. package/packages/server/dist/lsp/index.js.map +1 -0
  295. package/packages/server/dist/lsp/language-registry.d.ts +29 -0
  296. package/packages/server/dist/lsp/language-registry.d.ts.map +1 -0
  297. package/packages/server/dist/lsp/language-registry.js +62 -0
  298. package/packages/server/dist/lsp/language-registry.js.map +1 -0
  299. package/packages/server/dist/lsp/manager.d.ts +77 -0
  300. package/packages/server/dist/lsp/manager.d.ts.map +1 -0
  301. package/packages/server/dist/lsp/manager.js +300 -0
  302. package/packages/server/dist/lsp/manager.js.map +1 -0
  303. package/packages/server/dist/plugins-routes.d.ts +96 -0
  304. package/packages/server/dist/plugins-routes.d.ts.map +1 -0
  305. package/packages/server/dist/plugins-routes.js +627 -0
  306. package/packages/server/dist/plugins-routes.js.map +1 -0
  307. package/packages/server/dist/setup/checks/config.d.ts +9 -0
  308. package/packages/server/dist/setup/checks/config.d.ts.map +1 -0
  309. package/packages/server/dist/setup/checks/config.js +66 -0
  310. package/packages/server/dist/setup/checks/config.js.map +1 -0
  311. package/packages/server/dist/setup/checks/db.d.ts +6 -0
  312. package/packages/server/dist/setup/checks/db.d.ts.map +1 -0
  313. package/packages/server/dist/setup/checks/db.js +79 -0
  314. package/packages/server/dist/setup/checks/db.js.map +1 -0
  315. package/packages/server/dist/setup/checks/known-models.d.ts +18 -0
  316. package/packages/server/dist/setup/checks/known-models.d.ts.map +1 -0
  317. package/packages/server/dist/setup/checks/known-models.js +119 -0
  318. package/packages/server/dist/setup/checks/known-models.js.map +1 -0
  319. package/packages/server/dist/setup/checks/network.d.ts +11 -0
  320. package/packages/server/dist/setup/checks/network.d.ts.map +1 -0
  321. package/packages/server/dist/setup/checks/network.js +176 -0
  322. package/packages/server/dist/setup/checks/network.js.map +1 -0
  323. package/packages/server/dist/setup/checks/plugins.d.ts +9 -0
  324. package/packages/server/dist/setup/checks/plugins.d.ts.map +1 -0
  325. package/packages/server/dist/setup/checks/plugins.js +194 -0
  326. package/packages/server/dist/setup/checks/plugins.js.map +1 -0
  327. package/packages/server/dist/setup/checks/providers.d.ts +12 -0
  328. package/packages/server/dist/setup/checks/providers.d.ts.map +1 -0
  329. package/packages/server/dist/setup/checks/providers.js +368 -0
  330. package/packages/server/dist/setup/checks/providers.js.map +1 -0
  331. package/packages/server/dist/setup/checks/runtime.d.ts +3 -0
  332. package/packages/server/dist/setup/checks/runtime.d.ts.map +1 -0
  333. package/packages/server/dist/setup/checks/runtime.js +44 -0
  334. package/packages/server/dist/setup/checks/runtime.js.map +1 -0
  335. package/packages/server/dist/setup/checks/sandbox.d.ts +9 -0
  336. package/packages/server/dist/setup/checks/sandbox.d.ts.map +1 -0
  337. package/packages/server/dist/setup/checks/sandbox.js +110 -0
  338. package/packages/server/dist/setup/checks/sandbox.js.map +1 -0
  339. package/packages/server/dist/setup/checks/tenants.d.ts +9 -0
  340. package/packages/server/dist/setup/checks/tenants.d.ts.map +1 -0
  341. package/packages/server/dist/setup/checks/tenants.js +509 -0
  342. package/packages/server/dist/setup/checks/tenants.js.map +1 -0
  343. package/packages/server/dist/setup/cli-agent.d.ts +39 -0
  344. package/packages/server/dist/setup/cli-agent.d.ts.map +1 -0
  345. package/packages/server/dist/setup/cli-agent.js +1353 -0
  346. package/packages/server/dist/setup/cli-agent.js.map +1 -0
  347. package/packages/server/dist/setup/doctor.d.ts +32 -0
  348. package/packages/server/dist/setup/doctor.d.ts.map +1 -0
  349. package/packages/server/dist/setup/doctor.js +80 -0
  350. package/packages/server/dist/setup/doctor.js.map +1 -0
  351. package/packages/server/dist/setup/launchd.d.ts +107 -0
  352. package/packages/server/dist/setup/launchd.d.ts.map +1 -0
  353. package/packages/server/dist/setup/launchd.js +309 -0
  354. package/packages/server/dist/setup/launchd.js.map +1 -0
  355. package/packages/server/dist/setup/load-env.d.ts +21 -0
  356. package/packages/server/dist/setup/load-env.d.ts.map +1 -0
  357. package/packages/server/dist/setup/load-env.js +88 -0
  358. package/packages/server/dist/setup/load-env.js.map +1 -0
  359. package/packages/server/dist/setup/probe-default-model.d.ts +28 -0
  360. package/packages/server/dist/setup/probe-default-model.d.ts.map +1 -0
  361. package/packages/server/dist/setup/probe-default-model.js +133 -0
  362. package/packages/server/dist/setup/probe-default-model.js.map +1 -0
  363. package/packages/server/dist/setup/render.d.ts +28 -0
  364. package/packages/server/dist/setup/render.d.ts.map +1 -0
  365. package/packages/server/dist/setup/render.js +60 -0
  366. package/packages/server/dist/setup/render.js.map +1 -0
  367. package/packages/server/dist/setup/repo-root.d.ts +3 -0
  368. package/packages/server/dist/setup/repo-root.d.ts.map +1 -0
  369. package/packages/server/dist/setup/repo-root.js +43 -0
  370. package/packages/server/dist/setup/repo-root.js.map +1 -0
  371. package/packages/server/dist/setup/service.d.ts +60 -0
  372. package/packages/server/dist/setup/service.d.ts.map +1 -0
  373. package/packages/server/dist/setup/service.js +345 -0
  374. package/packages/server/dist/setup/service.js.map +1 -0
  375. package/packages/server/dist/setup/start-server.d.ts +23 -0
  376. package/packages/server/dist/setup/start-server.d.ts.map +1 -0
  377. package/packages/server/dist/setup/start-server.js +465 -0
  378. package/packages/server/dist/setup/start-server.js.map +1 -0
  379. package/packages/server/dist/setup/wizard.d.ts +59 -0
  380. package/packages/server/dist/setup/wizard.d.ts.map +1 -0
  381. package/packages/server/dist/setup/wizard.js +556 -0
  382. package/packages/server/dist/setup/wizard.js.map +1 -0
  383. package/packages/server/dist/tools/edit-file.d.ts +13 -0
  384. package/packages/server/dist/tools/edit-file.d.ts.map +1 -0
  385. package/packages/server/dist/tools/edit-file.js +90 -0
  386. package/packages/server/dist/tools/edit-file.js.map +1 -0
  387. package/packages/server/dist/tools/glob.d.ts +12 -0
  388. package/packages/server/dist/tools/glob.d.ts.map +1 -0
  389. package/packages/server/dist/tools/glob.js +82 -0
  390. package/packages/server/dist/tools/glob.js.map +1 -0
  391. package/packages/server/dist/tools/index.d.ts +82 -0
  392. package/packages/server/dist/tools/index.d.ts.map +1 -0
  393. package/packages/server/dist/tools/index.js +72 -0
  394. package/packages/server/dist/tools/index.js.map +1 -0
  395. package/packages/server/dist/tools/list-dir.d.ts +24 -0
  396. package/packages/server/dist/tools/list-dir.d.ts.map +1 -0
  397. package/packages/server/dist/tools/list-dir.js +99 -0
  398. package/packages/server/dist/tools/list-dir.js.map +1 -0
  399. package/packages/server/dist/tools/path-helper.d.ts +15 -0
  400. package/packages/server/dist/tools/path-helper.d.ts.map +1 -0
  401. package/packages/server/dist/tools/path-helper.js +72 -0
  402. package/packages/server/dist/tools/path-helper.js.map +1 -0
  403. package/packages/server/dist/tools/read-file.d.ts +17 -0
  404. package/packages/server/dist/tools/read-file.d.ts.map +1 -0
  405. package/packages/server/dist/tools/read-file.js +94 -0
  406. package/packages/server/dist/tools/read-file.js.map +1 -0
  407. package/packages/server/dist/tools/sandbox.d.ts +57 -0
  408. package/packages/server/dist/tools/sandbox.d.ts.map +1 -0
  409. package/packages/server/dist/tools/sandbox.js +291 -0
  410. package/packages/server/dist/tools/sandbox.js.map +1 -0
  411. package/packages/server/dist/tools/write-file.d.ts +12 -0
  412. package/packages/server/dist/tools/write-file.d.ts.map +1 -0
  413. package/packages/server/dist/tools/write-file.js +67 -0
  414. package/packages/server/dist/tools/write-file.js.map +1 -0
  415. package/packages/server/dist/worker-agents-routes.d.ts +11 -0
  416. package/packages/server/dist/worker-agents-routes.d.ts.map +1 -0
  417. package/packages/server/dist/worker-agents-routes.js +253 -0
  418. package/packages/server/dist/worker-agents-routes.js.map +1 -0
  419. package/packages/server/package.json +41 -0
  420. package/packages/web/dist/assets/index-DH-gJ09_.js +60 -0
  421. package/packages/web/dist/assets/index-xU4lYYqY.css +2 -0
  422. package/packages/web/dist/index.html +14 -0
  423. package/packages/web/package.json +36 -0
  424. package/plugins/README.md +64 -0
  425. package/plugins/files/dist/client.d.ts +5 -0
  426. package/plugins/files/dist/client.d.ts.map +1 -0
  427. package/plugins/files/dist/client.js +354 -0
  428. package/plugins/files/dist/client.js.map +1 -0
  429. package/plugins/files/dist/server.d.ts +32 -0
  430. package/plugins/files/dist/server.d.ts.map +1 -0
  431. package/plugins/files/dist/server.js +514 -0
  432. package/plugins/files/dist/server.js.map +1 -0
  433. package/plugins/files/dist/tools/edit-file.d.ts +29 -0
  434. package/plugins/files/dist/tools/edit-file.d.ts.map +1 -0
  435. package/plugins/files/dist/tools/edit-file.js +230 -0
  436. package/plugins/files/dist/tools/edit-file.js.map +1 -0
  437. package/plugins/files/dist/tools/edit-file.prompt.md +36 -0
  438. package/plugins/files/dist/tools/glob.d.ts +12 -0
  439. package/plugins/files/dist/tools/glob.d.ts.map +1 -0
  440. package/plugins/files/dist/tools/glob.js +84 -0
  441. package/plugins/files/dist/tools/glob.js.map +1 -0
  442. package/plugins/files/dist/tools/index.d.ts +13 -0
  443. package/plugins/files/dist/tools/index.d.ts.map +1 -0
  444. package/plugins/files/dist/tools/index.js +158 -0
  445. package/plugins/files/dist/tools/index.js.map +1 -0
  446. package/plugins/files/dist/tools/list-dir.d.ts +24 -0
  447. package/plugins/files/dist/tools/list-dir.d.ts.map +1 -0
  448. package/plugins/files/dist/tools/list-dir.js +104 -0
  449. package/plugins/files/dist/tools/list-dir.js.map +1 -0
  450. package/plugins/files/dist/tools/load-prompt.d.ts +5 -0
  451. package/plugins/files/dist/tools/load-prompt.d.ts.map +1 -0
  452. package/plugins/files/dist/tools/load-prompt.js +39 -0
  453. package/plugins/files/dist/tools/load-prompt.js.map +1 -0
  454. package/plugins/files/dist/tools/path-helper.d.ts +32 -0
  455. package/plugins/files/dist/tools/path-helper.d.ts.map +1 -0
  456. package/plugins/files/dist/tools/path-helper.js +113 -0
  457. package/plugins/files/dist/tools/path-helper.js.map +1 -0
  458. package/plugins/files/dist/tools/read-file.d.ts +17 -0
  459. package/plugins/files/dist/tools/read-file.d.ts.map +1 -0
  460. package/plugins/files/dist/tools/read-file.js +109 -0
  461. package/plugins/files/dist/tools/read-file.js.map +1 -0
  462. package/plugins/files/dist/tools/read-tracker.d.ts +28 -0
  463. package/plugins/files/dist/tools/read-tracker.d.ts.map +1 -0
  464. package/plugins/files/dist/tools/read-tracker.js +135 -0
  465. package/plugins/files/dist/tools/read-tracker.js.map +1 -0
  466. package/plugins/files/dist/tools/replacers.d.ts +27 -0
  467. package/plugins/files/dist/tools/replacers.d.ts.map +1 -0
  468. package/plugins/files/dist/tools/replacers.js +221 -0
  469. package/plugins/files/dist/tools/replacers.js.map +1 -0
  470. package/plugins/files/dist/tools/tenant-config-delete.d.ts +12 -0
  471. package/plugins/files/dist/tools/tenant-config-delete.d.ts.map +1 -0
  472. package/plugins/files/dist/tools/tenant-config-delete.js +70 -0
  473. package/plugins/files/dist/tools/tenant-config-delete.js.map +1 -0
  474. package/plugins/files/dist/tools/tenant-config-edit.d.ts +25 -0
  475. package/plugins/files/dist/tools/tenant-config-edit.d.ts.map +1 -0
  476. package/plugins/files/dist/tools/tenant-config-edit.js +142 -0
  477. package/plugins/files/dist/tools/tenant-config-edit.js.map +1 -0
  478. package/plugins/files/dist/tools/tenant-config-glob.d.ts +12 -0
  479. package/plugins/files/dist/tools/tenant-config-glob.d.ts.map +1 -0
  480. package/plugins/files/dist/tools/tenant-config-glob.js +64 -0
  481. package/plugins/files/dist/tools/tenant-config-glob.js.map +1 -0
  482. package/plugins/files/dist/tools/tenant-config-helper.d.ts +64 -0
  483. package/plugins/files/dist/tools/tenant-config-helper.d.ts.map +1 -0
  484. package/plugins/files/dist/tools/tenant-config-helper.js +162 -0
  485. package/plugins/files/dist/tools/tenant-config-helper.js.map +1 -0
  486. package/plugins/files/dist/tools/tenant-config-list.d.ts +20 -0
  487. package/plugins/files/dist/tools/tenant-config-list.d.ts.map +1 -0
  488. package/plugins/files/dist/tools/tenant-config-list.js +95 -0
  489. package/plugins/files/dist/tools/tenant-config-list.js.map +1 -0
  490. package/plugins/files/dist/tools/tenant-config-read.d.ts +17 -0
  491. package/plugins/files/dist/tools/tenant-config-read.d.ts.map +1 -0
  492. package/plugins/files/dist/tools/tenant-config-read.js +87 -0
  493. package/plugins/files/dist/tools/tenant-config-read.js.map +1 -0
  494. package/plugins/files/dist/tools/tenant-config-write.d.ts +14 -0
  495. package/plugins/files/dist/tools/tenant-config-write.d.ts.map +1 -0
  496. package/plugins/files/dist/tools/tenant-config-write.js +78 -0
  497. package/plugins/files/dist/tools/tenant-config-write.js.map +1 -0
  498. package/plugins/files/dist/tools/text-shape.d.ts +20 -0
  499. package/plugins/files/dist/tools/text-shape.d.ts.map +1 -0
  500. package/plugins/files/dist/tools/text-shape.js +57 -0
  501. package/plugins/files/dist/tools/text-shape.js.map +1 -0
  502. package/plugins/files/dist/tools/write-file.d.ts +12 -0
  503. package/plugins/files/dist/tools/write-file.d.ts.map +1 -0
  504. package/plugins/files/dist/tools/write-file.js +89 -0
  505. package/plugins/files/dist/tools/write-file.js.map +1 -0
  506. package/plugins/files/dist/tools/write-file.prompt.md +14 -0
  507. package/plugins/files/manifest.json +100 -0
  508. package/plugins/files/package.json +39 -0
  509. package/plugins/files/skills/files-workspace-layout.md +29 -0
  510. package/plugins/microsandbox/dist/admin/browser-routes.d.ts +41 -0
  511. package/plugins/microsandbox/dist/admin/browser-routes.d.ts.map +1 -0
  512. package/plugins/microsandbox/dist/admin/browser-routes.js +208 -0
  513. package/plugins/microsandbox/dist/admin/browser-routes.js.map +1 -0
  514. package/plugins/microsandbox/dist/admin/preview-exec.d.ts +38 -0
  515. package/plugins/microsandbox/dist/admin/preview-exec.d.ts.map +1 -0
  516. package/plugins/microsandbox/dist/admin/preview-exec.js +185 -0
  517. package/plugins/microsandbox/dist/admin/preview-exec.js.map +1 -0
  518. package/plugins/microsandbox/dist/admin/routes.d.ts +35 -0
  519. package/plugins/microsandbox/dist/admin/routes.d.ts.map +1 -0
  520. package/plugins/microsandbox/dist/admin/routes.js +728 -0
  521. package/plugins/microsandbox/dist/admin/routes.js.map +1 -0
  522. package/plugins/microsandbox/dist/admin/sandboxfile-io.d.ts +11 -0
  523. package/plugins/microsandbox/dist/admin/sandboxfile-io.d.ts.map +1 -0
  524. package/plugins/microsandbox/dist/admin/sandboxfile-io.js +72 -0
  525. package/plugins/microsandbox/dist/admin/sandboxfile-io.js.map +1 -0
  526. package/plugins/microsandbox/dist/admin/templates.d.ts +16 -0
  527. package/plugins/microsandbox/dist/admin/templates.d.ts.map +1 -0
  528. package/plugins/microsandbox/dist/admin/templates.js +66 -0
  529. package/plugins/microsandbox/dist/admin/templates.js.map +1 -0
  530. package/plugins/microsandbox/dist/admin.d.ts +5 -0
  531. package/plugins/microsandbox/dist/admin.d.ts.map +1 -0
  532. package/plugins/microsandbox/dist/admin.js +256 -0
  533. package/plugins/microsandbox/dist/admin.js.map +1 -0
  534. package/plugins/microsandbox/dist/build/builder.d.ts +69 -0
  535. package/plugins/microsandbox/dist/build/builder.d.ts.map +1 -0
  536. package/plugins/microsandbox/dist/build/builder.js +257 -0
  537. package/plugins/microsandbox/dist/build/builder.js.map +1 -0
  538. package/plugins/microsandbox/dist/build/metadata.d.ts +27 -0
  539. package/plugins/microsandbox/dist/build/metadata.d.ts.map +1 -0
  540. package/plugins/microsandbox/dist/build/metadata.js +55 -0
  541. package/plugins/microsandbox/dist/build/metadata.js.map +1 -0
  542. package/plugins/microsandbox/dist/build/pointer.d.ts +51 -0
  543. package/plugins/microsandbox/dist/build/pointer.d.ts.map +1 -0
  544. package/plugins/microsandbox/dist/build/pointer.js +130 -0
  545. package/plugins/microsandbox/dist/build/pointer.js.map +1 -0
  546. package/plugins/microsandbox/dist/build/sandboxfile.d.ts +15 -0
  547. package/plugins/microsandbox/dist/build/sandboxfile.d.ts.map +1 -0
  548. package/plugins/microsandbox/dist/build/sandboxfile.js +176 -0
  549. package/plugins/microsandbox/dist/build/sandboxfile.js.map +1 -0
  550. package/plugins/microsandbox/dist/client.d.ts +5 -0
  551. package/plugins/microsandbox/dist/client.d.ts.map +1 -0
  552. package/plugins/microsandbox/dist/client.js +941 -0
  553. package/plugins/microsandbox/dist/client.js.map +1 -0
  554. package/plugins/microsandbox/dist/runner/browser.d.ts +50 -0
  555. package/plugins/microsandbox/dist/runner/browser.d.ts.map +1 -0
  556. package/plugins/microsandbox/dist/runner/browser.js +142 -0
  557. package/plugins/microsandbox/dist/runner/browser.js.map +1 -0
  558. package/plugins/microsandbox/dist/runner/free-port.d.ts +6 -0
  559. package/plugins/microsandbox/dist/runner/free-port.d.ts.map +1 -0
  560. package/plugins/microsandbox/dist/runner/free-port.js +53 -0
  561. package/plugins/microsandbox/dist/runner/free-port.js.map +1 -0
  562. package/plugins/microsandbox/dist/runner/index.d.ts +28 -0
  563. package/plugins/microsandbox/dist/runner/index.d.ts.map +1 -0
  564. package/plugins/microsandbox/dist/runner/index.js +72 -0
  565. package/plugins/microsandbox/dist/runner/index.js.map +1 -0
  566. package/plugins/microsandbox/dist/runner/microsandbox.d.ts +64 -0
  567. package/plugins/microsandbox/dist/runner/microsandbox.d.ts.map +1 -0
  568. package/plugins/microsandbox/dist/runner/microsandbox.js +668 -0
  569. package/plugins/microsandbox/dist/runner/microsandbox.js.map +1 -0
  570. package/plugins/microsandbox/dist/runner/nullable.d.ts +36 -0
  571. package/plugins/microsandbox/dist/runner/nullable.d.ts.map +1 -0
  572. package/plugins/microsandbox/dist/runner/nullable.js +82 -0
  573. package/plugins/microsandbox/dist/runner/nullable.js.map +1 -0
  574. package/plugins/microsandbox/dist/runner/pool.d.ts +97 -0
  575. package/plugins/microsandbox/dist/runner/pool.d.ts.map +1 -0
  576. package/plugins/microsandbox/dist/runner/pool.js +494 -0
  577. package/plugins/microsandbox/dist/runner/pool.js.map +1 -0
  578. package/plugins/microsandbox/dist/runner/types.d.ts +33 -0
  579. package/plugins/microsandbox/dist/runner/types.d.ts.map +1 -0
  580. package/plugins/microsandbox/dist/runner/types.js +79 -0
  581. package/plugins/microsandbox/dist/runner/types.js.map +1 -0
  582. package/plugins/microsandbox/dist/server.d.ts +7 -0
  583. package/plugins/microsandbox/dist/server.d.ts.map +1 -0
  584. package/plugins/microsandbox/dist/server.js +276 -0
  585. package/plugins/microsandbox/dist/server.js.map +1 -0
  586. package/plugins/microsandbox/dist/tools/browser.d.ts +25 -0
  587. package/plugins/microsandbox/dist/tools/browser.d.ts.map +1 -0
  588. package/plugins/microsandbox/dist/tools/browser.js +78 -0
  589. package/plugins/microsandbox/dist/tools/browser.js.map +1 -0
  590. package/plugins/microsandbox/dist/tools/build.d.ts +5 -0
  591. package/plugins/microsandbox/dist/tools/build.d.ts.map +1 -0
  592. package/plugins/microsandbox/dist/tools/build.js +243 -0
  593. package/plugins/microsandbox/dist/tools/build.js.map +1 -0
  594. package/plugins/microsandbox/dist/tools/index.d.ts +9 -0
  595. package/plugins/microsandbox/dist/tools/index.d.ts.map +1 -0
  596. package/plugins/microsandbox/dist/tools/index.js +430 -0
  597. package/plugins/microsandbox/dist/tools/index.js.map +1 -0
  598. package/plugins/microsandbox/dist/tools/mcp-client.d.ts +63 -0
  599. package/plugins/microsandbox/dist/tools/mcp-client.d.ts.map +1 -0
  600. package/plugins/microsandbox/dist/tools/mcp-client.js +226 -0
  601. package/plugins/microsandbox/dist/tools/mcp-client.js.map +1 -0
  602. package/plugins/microsandbox/manifest.json +177 -0
  603. package/plugins/microsandbox/package.json +38 -0
  604. package/plugins/microsandbox/skills/microsandbox-browser-howto.md +155 -0
  605. package/plugins/microsandbox/skills/microsandbox-build-use.md +201 -0
  606. package/plugins/microsandbox/skills/microsandbox-config.md +38 -0
  607. package/plugins/microsandbox/skills/microsandbox-exec-howto.md +144 -0
  608. package/plugins/microsandbox/skills/microsandbox-libreoffice.md +159 -0
  609. package/plugins/microsandbox/templates/README.md +26 -0
  610. package/plugins/web-search/dist/server.d.ts +4 -0
  611. package/plugins/web-search/dist/server.d.ts.map +1 -0
  612. package/plugins/web-search/dist/server.js +73 -0
  613. package/plugins/web-search/dist/server.js.map +1 -0
  614. package/plugins/web-search/dist/tools/health.d.ts +31 -0
  615. package/plugins/web-search/dist/tools/health.d.ts.map +1 -0
  616. package/plugins/web-search/dist/tools/health.js +59 -0
  617. package/plugins/web-search/dist/tools/health.js.map +1 -0
  618. package/plugins/web-search/dist/tools/index.d.ts +3 -0
  619. package/plugins/web-search/dist/tools/index.d.ts.map +1 -0
  620. package/plugins/web-search/dist/tools/index.js +2 -0
  621. package/plugins/web-search/dist/tools/index.js.map +1 -0
  622. package/plugins/web-search/dist/tools/providers.d.ts +43 -0
  623. package/plugins/web-search/dist/tools/providers.d.ts.map +1 -0
  624. package/plugins/web-search/dist/tools/providers.js +140 -0
  625. package/plugins/web-search/dist/tools/providers.js.map +1 -0
  626. package/plugins/web-search/dist/tools/web-search.d.ts +15 -0
  627. package/plugins/web-search/dist/tools/web-search.d.ts.map +1 -0
  628. package/plugins/web-search/dist/tools/web-search.js +244 -0
  629. package/plugins/web-search/dist/tools/web-search.js.map +1 -0
  630. package/plugins/web-search/manifest.json +65 -0
  631. package/plugins/web-search/node_modules/@esbuild/darwin-arm64/README.md +3 -0
  632. package/plugins/web-search/node_modules/@esbuild/darwin-arm64/package.json +20 -0
  633. package/plugins/web-search/node_modules/@vitest/expect/LICENSE +21 -0
  634. package/plugins/web-search/node_modules/@vitest/expect/README.md +21 -0
  635. package/plugins/web-search/node_modules/@vitest/expect/dist/index.d.ts +808 -0
  636. package/plugins/web-search/node_modules/@vitest/expect/dist/index.js +1799 -0
  637. package/plugins/web-search/node_modules/@vitest/expect/package.json +46 -0
  638. package/plugins/web-search/node_modules/@vitest/mocker/LICENSE +21 -0
  639. package/plugins/web-search/node_modules/@vitest/mocker/README.md +5 -0
  640. package/plugins/web-search/node_modules/@vitest/mocker/dist/auto-register.d.ts +2 -0
  641. package/plugins/web-search/node_modules/@vitest/mocker/dist/auto-register.js +9 -0
  642. package/plugins/web-search/node_modules/@vitest/mocker/dist/browser.d.ts +53 -0
  643. package/plugins/web-search/node_modules/@vitest/mocker/dist/browser.js +91 -0
  644. package/plugins/web-search/node_modules/@vitest/mocker/dist/chunk-interceptor-native.js +15 -0
  645. package/plugins/web-search/node_modules/@vitest/mocker/dist/chunk-mocker.js +1602 -0
  646. package/plugins/web-search/node_modules/@vitest/mocker/dist/chunk-pathe.M-eThtNZ.js +174 -0
  647. package/plugins/web-search/node_modules/@vitest/mocker/dist/chunk-registry.js +182 -0
  648. package/plugins/web-search/node_modules/@vitest/mocker/dist/chunk-utils.js +16 -0
  649. package/plugins/web-search/node_modules/@vitest/mocker/dist/index.d.ts +21 -0
  650. package/plugins/web-search/node_modules/@vitest/mocker/dist/index.js +174 -0
  651. package/plugins/web-search/node_modules/@vitest/mocker/dist/mocker.d-Ce9_ySj5.d.ts +83 -0
  652. package/plugins/web-search/node_modules/@vitest/mocker/dist/node.d.ts +821 -0
  653. package/plugins/web-search/node_modules/@vitest/mocker/dist/node.js +1306 -0
  654. package/plugins/web-search/node_modules/@vitest/mocker/dist/redirect.d.ts +3 -0
  655. package/plugins/web-search/node_modules/@vitest/mocker/dist/redirect.js +75 -0
  656. package/plugins/web-search/node_modules/@vitest/mocker/dist/register.d.ts +9 -0
  657. package/plugins/web-search/node_modules/@vitest/mocker/dist/register.js +41 -0
  658. package/plugins/web-search/node_modules/@vitest/mocker/dist/registry.d-D765pazg.d.ts +87 -0
  659. package/plugins/web-search/node_modules/@vitest/mocker/dist/types.d-D_aRZRdy.d.ts +8 -0
  660. package/plugins/web-search/node_modules/@vitest/mocker/package.json +82 -0
  661. package/plugins/web-search/node_modules/@vitest/pretty-format/LICENSE +21 -0
  662. package/plugins/web-search/node_modules/@vitest/pretty-format/dist/index.d.ts +119 -0
  663. package/plugins/web-search/node_modules/@vitest/pretty-format/dist/index.js +1387 -0
  664. package/plugins/web-search/node_modules/@vitest/pretty-format/package.json +44 -0
  665. package/plugins/web-search/node_modules/@vitest/runner/LICENSE +21 -0
  666. package/plugins/web-search/node_modules/@vitest/runner/README.md +5 -0
  667. package/plugins/web-search/node_modules/@vitest/runner/dist/chunk-hooks.js +2254 -0
  668. package/plugins/web-search/node_modules/@vitest/runner/dist/index.d.ts +261 -0
  669. package/plugins/web-search/node_modules/@vitest/runner/dist/index.js +6 -0
  670. package/plugins/web-search/node_modules/@vitest/runner/dist/tasks.d-CkscK4of.d.ts +558 -0
  671. package/plugins/web-search/node_modules/@vitest/runner/dist/types.d.ts +163 -0
  672. package/plugins/web-search/node_modules/@vitest/runner/dist/types.js +1 -0
  673. package/plugins/web-search/node_modules/@vitest/runner/dist/utils.d.ts +47 -0
  674. package/plugins/web-search/node_modules/@vitest/runner/dist/utils.js +6 -0
  675. package/plugins/web-search/node_modules/@vitest/runner/package.json +49 -0
  676. package/plugins/web-search/node_modules/@vitest/snapshot/LICENSE +21 -0
  677. package/plugins/web-search/node_modules/@vitest/snapshot/README.md +84 -0
  678. package/plugins/web-search/node_modules/@vitest/snapshot/dist/environment.d-DHdQ1Csl.d.ts +22 -0
  679. package/plugins/web-search/node_modules/@vitest/snapshot/dist/environment.d.ts +16 -0
  680. package/plugins/web-search/node_modules/@vitest/snapshot/dist/environment.js +40 -0
  681. package/plugins/web-search/node_modules/@vitest/snapshot/dist/index.d.ts +137 -0
  682. package/plugins/web-search/node_modules/@vitest/snapshot/dist/index.js +2305 -0
  683. package/plugins/web-search/node_modules/@vitest/snapshot/dist/manager.d.ts +18 -0
  684. package/plugins/web-search/node_modules/@vitest/snapshot/dist/manager.js +73 -0
  685. package/plugins/web-search/node_modules/@vitest/snapshot/dist/rawSnapshot.d-lFsMJFUd.d.ts +61 -0
  686. package/plugins/web-search/node_modules/@vitest/snapshot/package.json +54 -0
  687. package/plugins/web-search/node_modules/@vitest/spy/LICENSE +21 -0
  688. package/plugins/web-search/node_modules/@vitest/spy/README.md +3 -0
  689. package/plugins/web-search/node_modules/@vitest/spy/dist/index.d.ts +356 -0
  690. package/plugins/web-search/node_modules/@vitest/spy/dist/index.js +191 -0
  691. package/plugins/web-search/node_modules/@vitest/spy/package.json +38 -0
  692. package/plugins/web-search/node_modules/@vitest/utils/LICENSE +21 -0
  693. package/plugins/web-search/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js +158 -0
  694. package/plugins/web-search/node_modules/@vitest/utils/dist/diff.d.ts +104 -0
  695. package/plugins/web-search/node_modules/@vitest/utils/dist/diff.js +2185 -0
  696. package/plugins/web-search/node_modules/@vitest/utils/dist/error.d.ts +9 -0
  697. package/plugins/web-search/node_modules/@vitest/utils/dist/error.js +162 -0
  698. package/plugins/web-search/node_modules/@vitest/utils/dist/helpers.d.ts +56 -0
  699. package/plugins/web-search/node_modules/@vitest/utils/dist/helpers.js +251 -0
  700. package/plugins/web-search/node_modules/@vitest/utils/dist/index.d.ts +57 -0
  701. package/plugins/web-search/node_modules/@vitest/utils/dist/index.js +633 -0
  702. package/plugins/web-search/node_modules/@vitest/utils/dist/source-map.d.ts +139 -0
  703. package/plugins/web-search/node_modules/@vitest/utils/dist/source-map.js +996 -0
  704. package/plugins/web-search/node_modules/@vitest/utils/dist/types.d-BCElaP-c.d.ts +53 -0
  705. package/plugins/web-search/node_modules/@vitest/utils/dist/types.d.ts +53 -0
  706. package/plugins/web-search/node_modules/@vitest/utils/dist/types.js +1 -0
  707. package/plugins/web-search/node_modules/@vitest/utils/package.json +77 -0
  708. package/plugins/web-search/node_modules/chai/LICENSE +21 -0
  709. package/plugins/web-search/node_modules/chai/README.md +162 -0
  710. package/plugins/web-search/node_modules/chai/package.json +74 -0
  711. package/plugins/web-search/node_modules/esbuild/README.md +3 -0
  712. package/plugins/web-search/node_modules/esbuild/package.json +49 -0
  713. package/plugins/web-search/node_modules/std-env/README.md +118 -0
  714. package/plugins/web-search/node_modules/std-env/dist/index.cjs +1 -0
  715. package/plugins/web-search/node_modules/std-env/dist/index.d.cts +92 -0
  716. package/plugins/web-search/node_modules/std-env/dist/index.d.mts +92 -0
  717. package/plugins/web-search/node_modules/std-env/dist/index.d.ts +92 -0
  718. package/plugins/web-search/node_modules/std-env/dist/index.mjs +1 -0
  719. package/plugins/web-search/node_modules/std-env/package.json +46 -0
  720. package/plugins/web-search/node_modules/tinyexec/LICENSE +21 -0
  721. package/plugins/web-search/node_modules/tinyexec/README.md +256 -0
  722. package/plugins/web-search/node_modules/tinyexec/dist/main.cjs +575 -0
  723. package/plugins/web-search/node_modules/tinyexec/dist/main.d.cts +70 -0
  724. package/plugins/web-search/node_modules/tinyexec/dist/main.d.ts +70 -0
  725. package/plugins/web-search/node_modules/tinyexec/dist/main.js +578 -0
  726. package/plugins/web-search/node_modules/tinyexec/package.json +66 -0
  727. package/plugins/web-search/node_modules/tinyrainbow/README.md +28 -0
  728. package/plugins/web-search/node_modules/tinyrainbow/dist/browser.d.ts +8 -0
  729. package/plugins/web-search/node_modules/tinyrainbow/dist/browser.js +20 -0
  730. package/plugins/web-search/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.js +90 -0
  731. package/plugins/web-search/node_modules/tinyrainbow/dist/index-8b61d5bc.d.ts +59 -0
  732. package/plugins/web-search/node_modules/tinyrainbow/dist/node.d.ts +8 -0
  733. package/plugins/web-search/node_modules/tinyrainbow/dist/node.js +22 -0
  734. package/plugins/web-search/node_modules/tinyrainbow/package.json +37 -0
  735. package/plugins/web-search/node_modules/typescript/README.md +50 -0
  736. package/plugins/web-search/node_modules/typescript/package.json +120 -0
  737. package/plugins/web-search/node_modules/vite/README.md +20 -0
  738. package/plugins/web-search/node_modules/vite/dist/client/client.mjs +1106 -0
  739. package/plugins/web-search/node_modules/vite/dist/client/env.mjs +19 -0
  740. package/plugins/web-search/node_modules/vite/dist/node/chunks/build.js +4 -0
  741. package/plugins/web-search/node_modules/vite/dist/node/chunks/build2.js +5538 -0
  742. package/plugins/web-search/node_modules/vite/dist/node/chunks/chunk.js +48 -0
  743. package/plugins/web-search/node_modules/vite/dist/node/chunks/config.js +36065 -0
  744. package/plugins/web-search/node_modules/vite/dist/node/chunks/config2.js +4 -0
  745. package/plugins/web-search/node_modules/vite/dist/node/chunks/dist.js +6758 -0
  746. package/plugins/web-search/node_modules/vite/dist/node/chunks/lib.js +377 -0
  747. package/plugins/web-search/node_modules/vite/dist/node/chunks/logger.js +329 -0
  748. package/plugins/web-search/node_modules/vite/dist/node/chunks/moduleRunnerTransport.d.ts +96 -0
  749. package/plugins/web-search/node_modules/vite/dist/node/chunks/optimizer.js +4 -0
  750. package/plugins/web-search/node_modules/vite/dist/node/chunks/postcss-import.js +479 -0
  751. package/plugins/web-search/node_modules/vite/dist/node/chunks/preview.js +4 -0
  752. package/plugins/web-search/node_modules/vite/dist/node/chunks/server.js +4 -0
  753. package/plugins/web-search/node_modules/vite/dist/node/cli.js +698 -0
  754. package/plugins/web-search/node_modules/vite/dist/node/index.d.ts +3717 -0
  755. package/plugins/web-search/node_modules/vite/dist/node/index.js +30 -0
  756. package/plugins/web-search/node_modules/vite/dist/node/module-runner.d.ts +311 -0
  757. package/plugins/web-search/node_modules/vite/dist/node/module-runner.js +1160 -0
  758. package/plugins/web-search/node_modules/vite/package.json +199 -0
  759. package/plugins/web-search/node_modules/vite/types/package.json +4 -0
  760. package/plugins/web-search/node_modules/vitest/README.md +7 -0
  761. package/plugins/web-search/node_modules/vitest/dist/browser.d.ts +34 -0
  762. package/plugins/web-search/node_modules/vitest/dist/browser.js +8 -0
  763. package/plugins/web-search/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js +7 -0
  764. package/plugins/web-search/node_modules/vitest/dist/chunks/base.DfmxU-tU.js +38 -0
  765. package/plugins/web-search/node_modules/vitest/dist/chunks/benchmark.CYdenmiT.js +37 -0
  766. package/plugins/web-search/node_modules/vitest/dist/chunks/benchmark.d.BwvBVTda.d.ts +24 -0
  767. package/plugins/web-search/node_modules/vitest/dist/chunks/cac.0BJqEUeA.js +1469 -0
  768. package/plugins/web-search/node_modules/vitest/dist/chunks/cli-api.DWGBtMmz.js +10660 -0
  769. package/plugins/web-search/node_modules/vitest/dist/chunks/config.d.BKdhh7Zx.d.ts +224 -0
  770. package/plugins/web-search/node_modules/vitest/dist/chunks/console.CtFJOzRO.js +153 -0
  771. package/plugins/web-search/node_modules/vitest/dist/chunks/constants.DnKduX2e.js +44 -0
  772. package/plugins/web-search/node_modules/vitest/dist/chunks/coverage.DVF1vEu8.js +25 -0
  773. package/plugins/web-search/node_modules/vitest/dist/chunks/coverage.DfSpMS-b.js +4350 -0
  774. package/plugins/web-search/node_modules/vitest/dist/chunks/coverage.d.S9RMNXIe.d.ts +35 -0
  775. package/plugins/web-search/node_modules/vitest/dist/chunks/creator.GK6I-cL4.js +640 -0
  776. package/plugins/web-search/node_modules/vitest/dist/chunks/date.Bq6ZW5rf.js +73 -0
  777. package/plugins/web-search/node_modules/vitest/dist/chunks/defaults.B7q_naMc.js +115 -0
  778. package/plugins/web-search/node_modules/vitest/dist/chunks/env.D4Lgay0q.js +8 -0
  779. package/plugins/web-search/node_modules/vitest/dist/chunks/environment.d.cL3nLXbE.d.ts +119 -0
  780. package/plugins/web-search/node_modules/vitest/dist/chunks/execute.B7h3T_Hc.js +708 -0
  781. package/plugins/web-search/node_modules/vitest/dist/chunks/git.BVQ8w_Sw.js +72 -0
  782. package/plugins/web-search/node_modules/vitest/dist/chunks/global.d.MAmajcmJ.d.ts +136 -0
  783. package/plugins/web-search/node_modules/vitest/dist/chunks/globals.DEHgCU4V.js +26 -0
  784. package/plugins/web-search/node_modules/vitest/dist/chunks/index.B521nVV-.js +157 -0
  785. package/plugins/web-search/node_modules/vitest/dist/chunks/index.BCWujgDG.js +231 -0
  786. package/plugins/web-search/node_modules/vitest/dist/chunks/index.CdQS2e2Q.js +37 -0
  787. package/plugins/web-search/node_modules/vitest/dist/chunks/index.CmSc2RE5.js +587 -0
  788. package/plugins/web-search/node_modules/vitest/dist/chunks/index.CwejwG0H.js +105 -0
  789. package/plugins/web-search/node_modules/vitest/dist/chunks/index.D3XRDfWc.js +213 -0
  790. package/plugins/web-search/node_modules/vitest/dist/chunks/index.VByaPkjc.js +2183 -0
  791. package/plugins/web-search/node_modules/vitest/dist/chunks/index.X0nbfr6-.js +6584 -0
  792. package/plugins/web-search/node_modules/vitest/dist/chunks/inspector.C914Efll.js +57 -0
  793. package/plugins/web-search/node_modules/vitest/dist/chunks/mocker.d.BE_2ls6u.d.ts +17 -0
  794. package/plugins/web-search/node_modules/vitest/dist/chunks/node.fjCdwEIl.js +15 -0
  795. package/plugins/web-search/node_modules/vitest/dist/chunks/reporters.d.BuRON0I0.d.ts +3168 -0
  796. package/plugins/web-search/node_modules/vitest/dist/chunks/rpc.-pEldfrD.js +83 -0
  797. package/plugins/web-search/node_modules/vitest/dist/chunks/runBaseTests.9Ij9_de-.js +129 -0
  798. package/plugins/web-search/node_modules/vitest/dist/chunks/setup-common.Dd054P77.js +60 -0
  799. package/plugins/web-search/node_modules/vitest/dist/chunks/suite.d.FvehnV49.d.ts +10 -0
  800. package/plugins/web-search/node_modules/vitest/dist/chunks/typechecker.DRKU1-1g.js +874 -0
  801. package/plugins/web-search/node_modules/vitest/dist/chunks/utils.CAioKnHs.js +61 -0
  802. package/plugins/web-search/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js +65 -0
  803. package/plugins/web-search/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js +4015 -0
  804. package/plugins/web-search/node_modules/vitest/dist/chunks/vite.d.BnOPPc46.d.ts +25 -0
  805. package/plugins/web-search/node_modules/vitest/dist/chunks/vm.BThCzidc.js +756 -0
  806. package/plugins/web-search/node_modules/vitest/dist/chunks/worker.d.CUgIPz9V.d.ts +176 -0
  807. package/plugins/web-search/node_modules/vitest/dist/chunks/worker.d.uzWsCv9X.d.ts +8 -0
  808. package/plugins/web-search/node_modules/vitest/dist/cli.js +27 -0
  809. package/plugins/web-search/node_modules/vitest/dist/config.cjs +148 -0
  810. package/plugins/web-search/node_modules/vitest/dist/config.d.ts +100 -0
  811. package/plugins/web-search/node_modules/vitest/dist/config.js +21 -0
  812. package/plugins/web-search/node_modules/vitest/dist/coverage.d.ts +108 -0
  813. package/plugins/web-search/node_modules/vitest/dist/coverage.js +34 -0
  814. package/plugins/web-search/node_modules/vitest/dist/environments.d.ts +26 -0
  815. package/plugins/web-search/node_modules/vitest/dist/environments.js +2 -0
  816. package/plugins/web-search/node_modules/vitest/dist/execute.d.ts +150 -0
  817. package/plugins/web-search/node_modules/vitest/dist/execute.js +13 -0
  818. package/plugins/web-search/node_modules/vitest/dist/index.d.ts +651 -0
  819. package/plugins/web-search/node_modules/vitest/dist/index.js +18 -0
  820. package/plugins/web-search/node_modules/vitest/dist/mocker.d.ts +1 -0
  821. package/plugins/web-search/node_modules/vitest/dist/mocker.js +1 -0
  822. package/plugins/web-search/node_modules/vitest/dist/node.d.ts +158 -0
  823. package/plugins/web-search/node_modules/vitest/dist/node.js +105 -0
  824. package/plugins/web-search/node_modules/vitest/dist/path.js +7 -0
  825. package/plugins/web-search/node_modules/vitest/dist/reporters.d.ts +25 -0
  826. package/plugins/web-search/node_modules/vitest/dist/reporters.js +23 -0
  827. package/plugins/web-search/node_modules/vitest/dist/runners.d.ts +46 -0
  828. package/plugins/web-search/node_modules/vitest/dist/runners.js +235 -0
  829. package/plugins/web-search/node_modules/vitest/dist/snapshot.d.ts +9 -0
  830. package/plugins/web-search/node_modules/vitest/dist/snapshot.js +4 -0
  831. package/plugins/web-search/node_modules/vitest/dist/spy.js +1 -0
  832. package/plugins/web-search/node_modules/vitest/dist/suite.d.ts +5 -0
  833. package/plugins/web-search/node_modules/vitest/dist/suite.js +5 -0
  834. package/plugins/web-search/node_modules/vitest/dist/worker.js +124 -0
  835. package/plugins/web-search/node_modules/vitest/dist/workers/forks.js +43 -0
  836. package/plugins/web-search/node_modules/vitest/dist/workers/runVmTests.js +90 -0
  837. package/plugins/web-search/node_modules/vitest/dist/workers/threads.js +31 -0
  838. package/plugins/web-search/node_modules/vitest/dist/workers/vmForks.js +47 -0
  839. package/plugins/web-search/node_modules/vitest/dist/workers/vmThreads.js +37 -0
  840. package/plugins/web-search/node_modules/vitest/dist/workers.d.ts +40 -0
  841. package/plugins/web-search/node_modules/vitest/dist/workers.js +30 -0
  842. package/plugins/web-search/node_modules/vitest/package.json +207 -0
  843. package/plugins/web-search/package.json +30 -0
  844. package/plugins/web-search/skills/web-search-howto.md +69 -0
  845. package/plugins/workboard/agent-seeds/echo-demo/agent.json +7 -0
  846. package/plugins/workboard/agent-seeds/llm-default/SOUL.md +53 -0
  847. package/plugins/workboard/agent-seeds/llm-default/agent.json +7 -0
  848. package/plugins/workboard/dist/client.d.ts +5 -0
  849. package/plugins/workboard/dist/client.d.ts.map +1 -0
  850. package/plugins/workboard/dist/client.js +895 -0
  851. package/plugins/workboard/dist/client.js.map +1 -0
  852. package/plugins/workboard/dist/db/agents.d.ts +100 -0
  853. package/plugins/workboard/dist/db/agents.d.ts.map +1 -0
  854. package/plugins/workboard/dist/db/agents.js +280 -0
  855. package/plugins/workboard/dist/db/agents.js.map +1 -0
  856. package/plugins/workboard/dist/db/schema.d.ts +3 -0
  857. package/plugins/workboard/dist/db/schema.d.ts.map +1 -0
  858. package/plugins/workboard/dist/db/schema.js +31 -0
  859. package/plugins/workboard/dist/db/schema.js.map +1 -0
  860. package/plugins/workboard/dist/db/session-history.d.ts +28 -0
  861. package/plugins/workboard/dist/db/session-history.d.ts.map +1 -0
  862. package/plugins/workboard/dist/db/session-history.js +224 -0
  863. package/plugins/workboard/dist/db/session-history.js.map +1 -0
  864. package/plugins/workboard/dist/db/tasks.d.ts +260 -0
  865. package/plugins/workboard/dist/db/tasks.d.ts.map +1 -0
  866. package/plugins/workboard/dist/db/tasks.js +451 -0
  867. package/plugins/workboard/dist/db/tasks.js.map +1 -0
  868. package/plugins/workboard/dist/db/worker-agents.d.ts +16 -0
  869. package/plugins/workboard/dist/db/worker-agents.d.ts.map +1 -0
  870. package/plugins/workboard/dist/db/worker-agents.js +62 -0
  871. package/plugins/workboard/dist/db/worker-agents.js.map +1 -0
  872. package/plugins/workboard/dist/effective-skills.d.ts +13 -0
  873. package/plugins/workboard/dist/effective-skills.d.ts.map +1 -0
  874. package/plugins/workboard/dist/effective-skills.js +126 -0
  875. package/plugins/workboard/dist/effective-skills.js.map +1 -0
  876. package/plugins/workboard/dist/fs-worker-agents.d.ts +35 -0
  877. package/plugins/workboard/dist/fs-worker-agents.d.ts.map +1 -0
  878. package/plugins/workboard/dist/fs-worker-agents.js +199 -0
  879. package/plugins/workboard/dist/fs-worker-agents.js.map +1 -0
  880. package/plugins/workboard/dist/migrate-worker-agents.d.ts +11 -0
  881. package/plugins/workboard/dist/migrate-worker-agents.d.ts.map +1 -0
  882. package/plugins/workboard/dist/migrate-worker-agents.js +89 -0
  883. package/plugins/workboard/dist/migrate-worker-agents.js.map +1 -0
  884. package/plugins/workboard/dist/routes/handlers.d.ts +106 -0
  885. package/plugins/workboard/dist/routes/handlers.d.ts.map +1 -0
  886. package/plugins/workboard/dist/routes/handlers.js +668 -0
  887. package/plugins/workboard/dist/routes/handlers.js.map +1 -0
  888. package/plugins/workboard/dist/server.d.ts +6 -0
  889. package/plugins/workboard/dist/server.d.ts.map +1 -0
  890. package/plugins/workboard/dist/server.js +368 -0
  891. package/plugins/workboard/dist/server.js.map +1 -0
  892. package/plugins/workboard/dist/tools/index.d.ts +70 -0
  893. package/plugins/workboard/dist/tools/index.d.ts.map +1 -0
  894. package/plugins/workboard/dist/tools/index.js +963 -0
  895. package/plugins/workboard/dist/tools/index.js.map +1 -0
  896. package/plugins/workboard/dist/types.d.ts +27 -0
  897. package/plugins/workboard/dist/types.d.ts.map +1 -0
  898. package/plugins/workboard/dist/types.js +16 -0
  899. package/plugins/workboard/dist/types.js.map +1 -0
  900. package/plugins/workboard/dist/worker/pool.d.ts +220 -0
  901. package/plugins/workboard/dist/worker/pool.d.ts.map +1 -0
  902. package/plugins/workboard/dist/worker/pool.js +866 -0
  903. package/plugins/workboard/dist/worker/pool.js.map +1 -0
  904. package/plugins/workboard/dist/worker/tool-policy.d.ts +27 -0
  905. package/plugins/workboard/dist/worker/tool-policy.d.ts.map +1 -0
  906. package/plugins/workboard/dist/worker/tool-policy.js +76 -0
  907. package/plugins/workboard/dist/worker/tool-policy.js.map +1 -0
  908. package/plugins/workboard/dist/worker-agents-page.d.ts +4 -0
  909. package/plugins/workboard/dist/worker-agents-page.d.ts.map +1 -0
  910. package/plugins/workboard/dist/worker-agents-page.js +193 -0
  911. package/plugins/workboard/dist/worker-agents-page.js.map +1 -0
  912. package/plugins/workboard/manifest.json +180 -0
  913. package/plugins/workboard/package.json +37 -0
  914. package/plugins/workboard/skills/large-input-large-output.md +185 -0
  915. package/plugins/workboard/skills/workboard-howto.md +166 -0
  916. package/plugins/workboard/skills/worker-creator.md +267 -0
  917. package/plugins/workboard/skills/worker-fleet.md +431 -0
@@ -0,0 +1,1160 @@
1
+ let SOURCEMAPPING_URL = "sourceMa";
2
+ SOURCEMAPPING_URL += "ppingURL";
3
+ const isWindows = typeof process < "u" && process.platform === "win32";
4
+ function unwrapId(id) {
5
+ return id.startsWith("/@id/") ? id.slice(5).replace("__x00__", "\0") : id;
6
+ }
7
+ const windowsSlashRE = /\\/g;
8
+ function slash(p) {
9
+ return p.replace(windowsSlashRE, "/");
10
+ }
11
+ const postfixRE = /[?#].*$/;
12
+ function cleanUrl(url) {
13
+ return url.replace(postfixRE, "");
14
+ }
15
+ function isPrimitive(value) {
16
+ return !value || typeof value != "object" && typeof value != "function";
17
+ }
18
+ const AsyncFunction = async function() {}.constructor;
19
+ let asyncFunctionDeclarationPaddingLineCount;
20
+ function getAsyncFunctionDeclarationPaddingLineCount() {
21
+ if (asyncFunctionDeclarationPaddingLineCount === void 0) {
22
+ let body = "/*code*/", source = new AsyncFunction("a", "b", body).toString();
23
+ asyncFunctionDeclarationPaddingLineCount = source.slice(0, source.indexOf(body)).split("\n").length - 1;
24
+ }
25
+ return asyncFunctionDeclarationPaddingLineCount;
26
+ }
27
+ function promiseWithResolvers() {
28
+ let resolve$1, reject;
29
+ return {
30
+ promise: new Promise((_resolve, _reject) => {
31
+ resolve$1 = _resolve, reject = _reject;
32
+ }),
33
+ resolve: resolve$1,
34
+ reject
35
+ };
36
+ }
37
+ const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
38
+ function normalizeWindowsPath(input = "") {
39
+ return input && input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
40
+ }
41
+ const _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/, _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
42
+ function cwd() {
43
+ return typeof process < "u" && typeof process.cwd == "function" ? process.cwd().replace(/\\/g, "/") : "/";
44
+ }
45
+ const resolve = function(...arguments_) {
46
+ arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
47
+ let resolvedPath = "", resolvedAbsolute = !1;
48
+ for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
49
+ let path = index >= 0 ? arguments_[index] : cwd();
50
+ !path || path.length === 0 || (resolvedPath = `${path}/${resolvedPath}`, resolvedAbsolute = isAbsolute(path));
51
+ }
52
+ return resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute), resolvedAbsolute && !isAbsolute(resolvedPath) ? `/${resolvedPath}` : resolvedPath.length > 0 ? resolvedPath : ".";
53
+ };
54
+ function normalizeString(path, allowAboveRoot) {
55
+ let res = "", lastSegmentLength = 0, lastSlash = -1, dots = 0, char = null;
56
+ for (let index = 0; index <= path.length; ++index) {
57
+ if (index < path.length) char = path[index];
58
+ else if (char === "/") break;
59
+ else char = "/";
60
+ if (char === "/") {
61
+ if (!(lastSlash === index - 1 || dots === 1)) if (dots === 2) {
62
+ if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
63
+ if (res.length > 2) {
64
+ let lastSlashIndex = res.lastIndexOf("/");
65
+ lastSlashIndex === -1 ? (res = "", lastSegmentLength = 0) : (res = res.slice(0, lastSlashIndex), lastSegmentLength = res.length - 1 - res.lastIndexOf("/")), lastSlash = index, dots = 0;
66
+ continue;
67
+ } else if (res.length > 0) {
68
+ res = "", lastSegmentLength = 0, lastSlash = index, dots = 0;
69
+ continue;
70
+ }
71
+ }
72
+ allowAboveRoot && (res += res.length > 0 ? "/.." : "..", lastSegmentLength = 2);
73
+ } else res.length > 0 ? res += `/${path.slice(lastSlash + 1, index)}` : res = path.slice(lastSlash + 1, index), lastSegmentLength = index - lastSlash - 1;
74
+ lastSlash = index, dots = 0;
75
+ } else char === "." && dots !== -1 ? ++dots : dots = -1;
76
+ }
77
+ return res;
78
+ }
79
+ const isAbsolute = function(p) {
80
+ return _IS_ABSOLUTE_RE.test(p);
81
+ }, dirname = function(p) {
82
+ let segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
83
+ return segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0]) && (segments[0] += "/"), segments.join("/") || (isAbsolute(p) ? "/" : ".");
84
+ }, decodeBase64 = typeof atob < "u" ? atob : (str) => Buffer.from(str, "base64").toString("utf-8"), percentRegEx = /%/g, backslashRegEx = /\\/g, newlineRegEx = /\n/g, carriageReturnRegEx = /\r/g, tabRegEx = /\t/g, questionRegex = /\?/g, hashRegex = /#/g;
85
+ function encodePathChars(filepath) {
86
+ return filepath.indexOf("%") !== -1 && (filepath = filepath.replace(percentRegEx, "%25")), !isWindows && filepath.indexOf("\\") !== -1 && (filepath = filepath.replace(backslashRegEx, "%5C")), filepath.indexOf("\n") !== -1 && (filepath = filepath.replace(newlineRegEx, "%0A")), filepath.indexOf("\r") !== -1 && (filepath = filepath.replace(carriageReturnRegEx, "%0D")), filepath.indexOf(" ") !== -1 && (filepath = filepath.replace(tabRegEx, "%09")), filepath;
87
+ }
88
+ const posixDirname = dirname, posixResolve = resolve;
89
+ function posixPathToFileHref(posixPath) {
90
+ let resolved = posixResolve(posixPath), filePathLast = posixPath.charCodeAt(posixPath.length - 1);
91
+ return (filePathLast === 47 || isWindows && filePathLast === 92) && resolved[resolved.length - 1] !== "/" && (resolved += "/"), resolved = encodePathChars(resolved), resolved.indexOf("?") !== -1 && (resolved = resolved.replace(questionRegex, "%3F")), resolved.indexOf("#") !== -1 && (resolved = resolved.replace(hashRegex, "%23")), new URL(`file://${resolved}`).href;
92
+ }
93
+ function toWindowsPath(path) {
94
+ return path.replace(/\//g, "\\");
95
+ }
96
+ var comma = 44, chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", intToChar = new Uint8Array(64), charToInt = new Uint8Array(128);
97
+ for (let i = 0; i < chars.length; i++) {
98
+ let c = chars.charCodeAt(i);
99
+ intToChar[i] = c, charToInt[c] = i;
100
+ }
101
+ function decodeInteger(reader, relative) {
102
+ let value = 0, shift = 0, integer = 0;
103
+ do
104
+ integer = charToInt[reader.next()], value |= (integer & 31) << shift, shift += 5;
105
+ while (integer & 32);
106
+ let shouldNegate = value & 1;
107
+ return value >>>= 1, shouldNegate && (value = -2147483648 | -value), relative + value;
108
+ }
109
+ function hasMoreVlq(reader, max) {
110
+ return reader.pos >= max ? !1 : reader.peek() !== comma;
111
+ }
112
+ var StringReader = class {
113
+ constructor(buffer) {
114
+ this.pos = 0, this.buffer = buffer;
115
+ }
116
+ next() {
117
+ return this.buffer.charCodeAt(this.pos++);
118
+ }
119
+ peek() {
120
+ return this.buffer.charCodeAt(this.pos);
121
+ }
122
+ indexOf(char) {
123
+ let { buffer, pos } = this, idx = buffer.indexOf(char, pos);
124
+ return idx === -1 ? buffer.length : idx;
125
+ }
126
+ };
127
+ function decode(mappings) {
128
+ let { length } = mappings, reader = new StringReader(mappings), decoded = [], genColumn = 0, sourcesIndex = 0, sourceLine = 0, sourceColumn = 0, namesIndex = 0;
129
+ do {
130
+ let semi = reader.indexOf(";"), line = [], sorted = !0, lastCol = 0;
131
+ for (genColumn = 0; reader.pos < semi;) {
132
+ let seg;
133
+ genColumn = decodeInteger(reader, genColumn), genColumn < lastCol && (sorted = !1), lastCol = genColumn, hasMoreVlq(reader, semi) ? (sourcesIndex = decodeInteger(reader, sourcesIndex), sourceLine = decodeInteger(reader, sourceLine), sourceColumn = decodeInteger(reader, sourceColumn), hasMoreVlq(reader, semi) ? (namesIndex = decodeInteger(reader, namesIndex), seg = [
134
+ genColumn,
135
+ sourcesIndex,
136
+ sourceLine,
137
+ sourceColumn,
138
+ namesIndex
139
+ ]) : seg = [
140
+ genColumn,
141
+ sourcesIndex,
142
+ sourceLine,
143
+ sourceColumn
144
+ ]) : seg = [genColumn], line.push(seg), reader.pos++;
145
+ }
146
+ sorted || sort(line), decoded.push(line), reader.pos = semi + 1;
147
+ } while (reader.pos <= length);
148
+ return decoded;
149
+ }
150
+ function sort(line) {
151
+ line.sort(sortComparator);
152
+ }
153
+ function sortComparator(a, b) {
154
+ return a[0] - b[0];
155
+ }
156
+ var COLUMN = 0, SOURCES_INDEX = 1, SOURCE_LINE = 2, SOURCE_COLUMN = 3, NAMES_INDEX = 4, found = !1;
157
+ function binarySearch(haystack, needle, low, high) {
158
+ for (; low <= high;) {
159
+ let mid = low + (high - low >> 1), cmp = haystack[mid][COLUMN] - needle;
160
+ if (cmp === 0) return found = !0, mid;
161
+ cmp < 0 ? low = mid + 1 : high = mid - 1;
162
+ }
163
+ return found = !1, low - 1;
164
+ }
165
+ function upperBound(haystack, needle, index) {
166
+ for (let i = index + 1; i < haystack.length && haystack[i][COLUMN] === needle; index = i++);
167
+ return index;
168
+ }
169
+ function lowerBound(haystack, needle, index) {
170
+ for (let i = index - 1; i >= 0 && haystack[i][COLUMN] === needle; index = i--);
171
+ return index;
172
+ }
173
+ function memoizedBinarySearch(haystack, needle, state, key) {
174
+ let { lastKey, lastNeedle, lastIndex } = state, low = 0, high = haystack.length - 1;
175
+ if (key === lastKey) {
176
+ if (needle === lastNeedle) return found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle, lastIndex;
177
+ needle >= lastNeedle ? low = lastIndex === -1 ? 0 : lastIndex : high = lastIndex;
178
+ }
179
+ return state.lastKey = key, state.lastNeedle = needle, state.lastIndex = binarySearch(haystack, needle, low, high);
180
+ }
181
+ var LINE_GTR_ZERO = "`line` must be greater than 0 (lines start at line 1)", COL_GTR_EQ_ZERO = "`column` must be greater than or equal to 0 (columns start at column 0)", LEAST_UPPER_BOUND = -1, GREATEST_LOWER_BOUND = 1;
182
+ function cast(map) {
183
+ return map;
184
+ }
185
+ function decodedMappings(map) {
186
+ var _a;
187
+ return (_a = cast(map))._decoded || (_a._decoded = decode(cast(map)._encoded));
188
+ }
189
+ function originalPositionFor(map, needle) {
190
+ let { line, column, bias } = needle;
191
+ if (line--, line < 0) throw Error(LINE_GTR_ZERO);
192
+ if (column < 0) throw Error(COL_GTR_EQ_ZERO);
193
+ let decoded = decodedMappings(map);
194
+ if (line >= decoded.length) return OMapping(null, null, null, null);
195
+ let segments = decoded[line], index = traceSegmentInternal(segments, cast(map)._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND);
196
+ if (index === -1) return OMapping(null, null, null, null);
197
+ let segment = segments[index];
198
+ if (segment.length === 1) return OMapping(null, null, null, null);
199
+ let { names, resolvedSources } = map;
200
+ return OMapping(resolvedSources[segment[SOURCES_INDEX]], segment[SOURCE_LINE] + 1, segment[SOURCE_COLUMN], segment.length === 5 ? names[segment[NAMES_INDEX]] : null);
201
+ }
202
+ function OMapping(source, line, column, name) {
203
+ return {
204
+ source,
205
+ line,
206
+ column,
207
+ name
208
+ };
209
+ }
210
+ function traceSegmentInternal(segments, memo, line, column, bias) {
211
+ let index = memoizedBinarySearch(segments, column, memo, line);
212
+ return found ? index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index) : bias === LEAST_UPPER_BOUND && index++, index === -1 || index === segments.length ? -1 : index;
213
+ }
214
+ var DecodedMap = class {
215
+ _encoded;
216
+ _decoded;
217
+ _decodedMemo;
218
+ url;
219
+ file;
220
+ version;
221
+ names = [];
222
+ resolvedSources;
223
+ constructor(map, from) {
224
+ this.map = map;
225
+ let { mappings, names, sources } = map;
226
+ this.version = map.version, this.names = names || [], this._encoded = mappings || "", this._decodedMemo = memoizedState(), this.url = from, this.file = from;
227
+ let originDir = posixDirname(from);
228
+ this.resolvedSources = (sources || []).map((s) => posixResolve(originDir, s || ""));
229
+ }
230
+ };
231
+ function memoizedState() {
232
+ return {
233
+ lastKey: -1,
234
+ lastNeedle: -1,
235
+ lastIndex: -1
236
+ };
237
+ }
238
+ function getOriginalPosition(map, needle) {
239
+ let result = originalPositionFor(map, needle);
240
+ return result.column == null ? null : result;
241
+ }
242
+ const MODULE_RUNNER_SOURCEMAPPING_REGEXP = /* @__PURE__ */ RegExp(`//# ${SOURCEMAPPING_URL}=data:application/json;base64,(.+)`);
243
+ var EvaluatedModuleNode = class {
244
+ importers = /* @__PURE__ */ new Set();
245
+ imports = /* @__PURE__ */ new Set();
246
+ evaluated = !1;
247
+ meta;
248
+ promise;
249
+ exports;
250
+ file;
251
+ map;
252
+ constructor(id, url) {
253
+ this.id = id, this.url = url, this.file = cleanUrl(id);
254
+ }
255
+ }, EvaluatedModules = class {
256
+ idToModuleMap = /* @__PURE__ */ new Map();
257
+ fileToModulesMap = /* @__PURE__ */ new Map();
258
+ urlToIdModuleMap = /* @__PURE__ */ new Map();
259
+ getModuleById(id) {
260
+ return this.idToModuleMap.get(id);
261
+ }
262
+ getModulesByFile(file) {
263
+ return this.fileToModulesMap.get(file);
264
+ }
265
+ getModuleByUrl(url) {
266
+ return this.urlToIdModuleMap.get(unwrapId(url));
267
+ }
268
+ ensureModule(id, url) {
269
+ if (id = normalizeModuleId(id), this.idToModuleMap.has(id)) {
270
+ let moduleNode$1 = this.idToModuleMap.get(id);
271
+ return this.urlToIdModuleMap.set(url, moduleNode$1), moduleNode$1;
272
+ }
273
+ let moduleNode = new EvaluatedModuleNode(id, url);
274
+ this.idToModuleMap.set(id, moduleNode), this.urlToIdModuleMap.set(url, moduleNode);
275
+ let fileModules = this.fileToModulesMap.get(moduleNode.file) || /* @__PURE__ */ new Set();
276
+ return fileModules.add(moduleNode), this.fileToModulesMap.set(moduleNode.file, fileModules), moduleNode;
277
+ }
278
+ invalidateModule(node) {
279
+ node.evaluated = !1, node.meta = void 0, node.map = void 0, node.promise = void 0, node.exports = void 0, node.imports.clear();
280
+ }
281
+ getModuleSourceMapById(id) {
282
+ let mod = this.getModuleById(id);
283
+ if (!mod) return null;
284
+ if (mod.map) return mod.map;
285
+ if (!mod.meta || !("code" in mod.meta)) return null;
286
+ let pattern = `//# ${SOURCEMAPPING_URL}=data:application/json;base64,`, lastIndex = mod.meta.code.lastIndexOf(pattern);
287
+ if (lastIndex === -1) return null;
288
+ let mapString = MODULE_RUNNER_SOURCEMAPPING_REGEXP.exec(mod.meta.code.slice(lastIndex))?.[1];
289
+ return mapString ? (mod.map = new DecodedMap(JSON.parse(decodeBase64(mapString)), mod.file), mod.map) : null;
290
+ }
291
+ clear() {
292
+ this.idToModuleMap.clear(), this.fileToModulesMap.clear(), this.urlToIdModuleMap.clear();
293
+ }
294
+ };
295
+ const prefixedBuiltins = new Set([
296
+ "node:sea",
297
+ "node:sqlite",
298
+ "node:test",
299
+ "node:test/reporters"
300
+ ]);
301
+ function normalizeModuleId(file) {
302
+ return prefixedBuiltins.has(file) ? file : slash(file).replace(/^\/@fs\//, isWindows ? "" : "/").replace(/^node:/, "").replace(/^\/+/, "/").replace(/^file:\/+/, isWindows ? "" : "/");
303
+ }
304
+ var HMRContext = class {
305
+ newListeners;
306
+ constructor(hmrClient, ownerPath) {
307
+ this.hmrClient = hmrClient, this.ownerPath = ownerPath, hmrClient.dataMap.has(ownerPath) || hmrClient.dataMap.set(ownerPath, {});
308
+ let mod = hmrClient.hotModulesMap.get(ownerPath);
309
+ mod && (mod.callbacks = []);
310
+ let staleListeners = hmrClient.ctxToListenersMap.get(ownerPath);
311
+ if (staleListeners) for (let [event, staleFns] of staleListeners) {
312
+ let listeners = hmrClient.customListenersMap.get(event);
313
+ listeners && hmrClient.customListenersMap.set(event, listeners.filter((l) => !staleFns.includes(l)));
314
+ }
315
+ this.newListeners = /* @__PURE__ */ new Map(), hmrClient.ctxToListenersMap.set(ownerPath, this.newListeners);
316
+ }
317
+ get data() {
318
+ return this.hmrClient.dataMap.get(this.ownerPath);
319
+ }
320
+ accept(deps, callback) {
321
+ if (typeof deps == "function" || !deps) this.acceptDeps([this.ownerPath], ([mod]) => deps?.(mod));
322
+ else if (typeof deps == "string") this.acceptDeps([deps], ([mod]) => callback?.(mod));
323
+ else if (Array.isArray(deps)) this.acceptDeps(deps, callback);
324
+ else throw Error("invalid hot.accept() usage.");
325
+ }
326
+ acceptExports(_, callback) {
327
+ this.acceptDeps([this.ownerPath], ([mod]) => callback?.(mod));
328
+ }
329
+ dispose(cb) {
330
+ this.hmrClient.disposeMap.set(this.ownerPath, cb);
331
+ }
332
+ prune(cb) {
333
+ this.hmrClient.pruneMap.set(this.ownerPath, cb);
334
+ }
335
+ decline() {}
336
+ invalidate(message) {
337
+ let firstInvalidatedBy = this.hmrClient.currentFirstInvalidatedBy ?? this.ownerPath;
338
+ this.hmrClient.notifyListeners("vite:invalidate", {
339
+ path: this.ownerPath,
340
+ message,
341
+ firstInvalidatedBy
342
+ }), this.send("vite:invalidate", {
343
+ path: this.ownerPath,
344
+ message,
345
+ firstInvalidatedBy
346
+ }), this.hmrClient.logger.debug(`invalidate ${this.ownerPath}${message ? `: ${message}` : ""}`);
347
+ }
348
+ on(event, cb) {
349
+ let addToMap = (map) => {
350
+ let existing = map.get(event) || [];
351
+ existing.push(cb), map.set(event, existing);
352
+ };
353
+ addToMap(this.hmrClient.customListenersMap), addToMap(this.newListeners);
354
+ }
355
+ off(event, cb) {
356
+ let removeFromMap = (map) => {
357
+ let existing = map.get(event);
358
+ if (existing === void 0) return;
359
+ let pruned = existing.filter((l) => l !== cb);
360
+ if (pruned.length === 0) {
361
+ map.delete(event);
362
+ return;
363
+ }
364
+ map.set(event, pruned);
365
+ };
366
+ removeFromMap(this.hmrClient.customListenersMap), removeFromMap(this.newListeners);
367
+ }
368
+ send(event, data) {
369
+ this.hmrClient.send({
370
+ type: "custom",
371
+ event,
372
+ data
373
+ });
374
+ }
375
+ acceptDeps(deps, callback = () => {}) {
376
+ let mod = this.hmrClient.hotModulesMap.get(this.ownerPath) || {
377
+ id: this.ownerPath,
378
+ callbacks: []
379
+ };
380
+ mod.callbacks.push({
381
+ deps,
382
+ fn: callback
383
+ }), this.hmrClient.hotModulesMap.set(this.ownerPath, mod);
384
+ }
385
+ }, HMRClient = class {
386
+ hotModulesMap = /* @__PURE__ */ new Map();
387
+ disposeMap = /* @__PURE__ */ new Map();
388
+ pruneMap = /* @__PURE__ */ new Map();
389
+ dataMap = /* @__PURE__ */ new Map();
390
+ customListenersMap = /* @__PURE__ */ new Map();
391
+ ctxToListenersMap = /* @__PURE__ */ new Map();
392
+ currentFirstInvalidatedBy;
393
+ constructor(logger, transport, importUpdatedModule) {
394
+ this.logger = logger, this.transport = transport, this.importUpdatedModule = importUpdatedModule;
395
+ }
396
+ async notifyListeners(event, data) {
397
+ let cbs = this.customListenersMap.get(event);
398
+ cbs && await Promise.allSettled(cbs.map((cb) => cb(data)));
399
+ }
400
+ send(payload) {
401
+ this.transport.send(payload).catch((err) => {
402
+ this.logger.error(err);
403
+ });
404
+ }
405
+ clear() {
406
+ this.hotModulesMap.clear(), this.disposeMap.clear(), this.pruneMap.clear(), this.dataMap.clear(), this.customListenersMap.clear(), this.ctxToListenersMap.clear();
407
+ }
408
+ async prunePaths(paths) {
409
+ await Promise.all(paths.map((path) => {
410
+ let disposer = this.disposeMap.get(path);
411
+ if (disposer) return disposer(this.dataMap.get(path));
412
+ })), await Promise.all(paths.map((path) => {
413
+ let fn = this.pruneMap.get(path);
414
+ if (fn) return fn(this.dataMap.get(path));
415
+ }));
416
+ }
417
+ warnFailedUpdate(err, path) {
418
+ (!(err instanceof Error) || !err.message.includes("fetch")) && this.logger.error(err), this.logger.error(`Failed to reload ${path}. This could be due to syntax errors or importing non-existent modules. (see errors above)`);
419
+ }
420
+ updateQueue = [];
421
+ pendingUpdateQueue = !1;
422
+ async queueUpdate(payload) {
423
+ if (this.updateQueue.push(this.fetchUpdate(payload)), !this.pendingUpdateQueue) {
424
+ this.pendingUpdateQueue = !0, await Promise.resolve(), this.pendingUpdateQueue = !1;
425
+ let loading = [...this.updateQueue];
426
+ this.updateQueue = [], (await Promise.all(loading)).forEach((fn) => fn && fn());
427
+ }
428
+ }
429
+ async fetchUpdate(update) {
430
+ let { path, acceptedPath, firstInvalidatedBy } = update, mod = this.hotModulesMap.get(path);
431
+ if (!mod) return;
432
+ let fetchedModule, isSelfUpdate = path === acceptedPath, qualifiedCallbacks = mod.callbacks.filter(({ deps }) => deps.includes(acceptedPath));
433
+ if (isSelfUpdate || qualifiedCallbacks.length > 0) {
434
+ let disposer = this.disposeMap.get(acceptedPath);
435
+ disposer && await disposer(this.dataMap.get(acceptedPath));
436
+ try {
437
+ fetchedModule = await this.importUpdatedModule(update);
438
+ } catch (e) {
439
+ this.warnFailedUpdate(e, acceptedPath);
440
+ }
441
+ }
442
+ return () => {
443
+ try {
444
+ this.currentFirstInvalidatedBy = firstInvalidatedBy;
445
+ for (let { deps, fn } of qualifiedCallbacks) fn(deps.map((dep) => dep === acceptedPath ? fetchedModule : void 0));
446
+ let loggedPath = isSelfUpdate ? path : `${acceptedPath} via ${path}`;
447
+ this.logger.debug(`hot updated: ${loggedPath}`);
448
+ } finally {
449
+ this.currentFirstInvalidatedBy = void 0;
450
+ }
451
+ };
452
+ }
453
+ };
454
+ function analyzeImportedModDifference(mod, rawId, moduleType, metadata) {
455
+ if (!metadata?.isDynamicImport && metadata?.importedNames?.length) {
456
+ let missingBindings = metadata.importedNames.filter((s) => !(s in mod));
457
+ if (missingBindings.length) {
458
+ let lastBinding = missingBindings[missingBindings.length - 1];
459
+ throw moduleType === "module" ? SyntaxError(`[vite] The requested module '${rawId}' does not provide an export named '${lastBinding}'`) : SyntaxError(`\
460
+ [vite] Named export '${lastBinding}' not found. The requested module '${rawId}' is a CommonJS module, which may not support all module.exports as named exports.
461
+ CommonJS modules can always be imported via the default export, for example using:
462
+
463
+ import pkg from '${rawId}';
464
+ const {${missingBindings.join(", ")}} = pkg;
465
+ `);
466
+ }
467
+ }
468
+ }
469
+ let nanoid = (size = 21) => {
470
+ let id = "", i = size | 0;
471
+ for (; i--;) id += "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[Math.random() * 64 | 0];
472
+ return id;
473
+ };
474
+ function reviveInvokeError(e) {
475
+ let error = Error(e.message || "Unknown invoke error");
476
+ return Object.assign(error, e, { runnerError: /* @__PURE__ */ Error("RunnerError") }), error;
477
+ }
478
+ const createInvokeableTransport = (transport) => {
479
+ if (transport.invoke) return {
480
+ ...transport,
481
+ async invoke(name, data) {
482
+ let result = await transport.invoke({
483
+ type: "custom",
484
+ event: "vite:invoke",
485
+ data: {
486
+ id: "send",
487
+ name,
488
+ data
489
+ }
490
+ });
491
+ if ("error" in result) throw reviveInvokeError(result.error);
492
+ return result.result;
493
+ }
494
+ };
495
+ if (!transport.send || !transport.connect) throw Error("transport must implement send and connect when invoke is not implemented");
496
+ let rpcPromises = /* @__PURE__ */ new Map();
497
+ return {
498
+ ...transport,
499
+ connect({ onMessage, onDisconnection }) {
500
+ return transport.connect({
501
+ onMessage(payload) {
502
+ if (payload.type === "custom" && payload.event === "vite:invoke") {
503
+ let data = payload.data;
504
+ if (data.id.startsWith("response:")) {
505
+ let invokeId = data.id.slice(9), promise = rpcPromises.get(invokeId);
506
+ if (!promise) return;
507
+ promise.timeoutId && clearTimeout(promise.timeoutId), rpcPromises.delete(invokeId);
508
+ let { error, result } = data.data;
509
+ error ? promise.reject(error) : promise.resolve(result);
510
+ return;
511
+ }
512
+ }
513
+ onMessage(payload);
514
+ },
515
+ onDisconnection
516
+ });
517
+ },
518
+ disconnect() {
519
+ return rpcPromises.forEach((promise) => {
520
+ promise.reject(/* @__PURE__ */ Error(`transport was disconnected, cannot call ${JSON.stringify(promise.name)}`));
521
+ }), rpcPromises.clear(), transport.disconnect?.();
522
+ },
523
+ send(data) {
524
+ return transport.send(data);
525
+ },
526
+ async invoke(name, data) {
527
+ let promiseId = nanoid(), wrappedData = {
528
+ type: "custom",
529
+ event: "vite:invoke",
530
+ data: {
531
+ name,
532
+ id: `send:${promiseId}`,
533
+ data
534
+ }
535
+ }, sendPromise = transport.send(wrappedData), { promise, resolve: resolve$1, reject } = promiseWithResolvers(), timeout = transport.timeout ?? 6e4, timeoutId;
536
+ timeout > 0 && (timeoutId = setTimeout(() => {
537
+ rpcPromises.delete(promiseId), reject(/* @__PURE__ */ Error(`transport invoke timed out after ${timeout}ms (data: ${JSON.stringify(wrappedData)})`));
538
+ }, timeout), timeoutId?.unref?.()), rpcPromises.set(promiseId, {
539
+ resolve: resolve$1,
540
+ reject,
541
+ name,
542
+ timeoutId
543
+ }), sendPromise && sendPromise.catch((err) => {
544
+ clearTimeout(timeoutId), rpcPromises.delete(promiseId), reject(err);
545
+ });
546
+ try {
547
+ return await promise;
548
+ } catch (err) {
549
+ throw reviveInvokeError(err);
550
+ }
551
+ }
552
+ };
553
+ }, normalizeModuleRunnerTransport = (transport) => {
554
+ let invokeableTransport = createInvokeableTransport(transport), isConnected = !invokeableTransport.connect, connectingPromise;
555
+ return {
556
+ ...transport,
557
+ ...invokeableTransport.connect ? { async connect(onMessage) {
558
+ if (isConnected) return;
559
+ if (connectingPromise) {
560
+ await connectingPromise;
561
+ return;
562
+ }
563
+ let maybePromise = invokeableTransport.connect({
564
+ onMessage: onMessage ?? (() => {}),
565
+ onDisconnection() {
566
+ isConnected = !1;
567
+ }
568
+ });
569
+ maybePromise && (connectingPromise = maybePromise, await connectingPromise, connectingPromise = void 0), isConnected = !0;
570
+ } } : {},
571
+ ...invokeableTransport.disconnect ? { async disconnect() {
572
+ isConnected && (connectingPromise && await connectingPromise, isConnected = !1, await invokeableTransport.disconnect());
573
+ } } : {},
574
+ async send(data) {
575
+ if (invokeableTransport.send) {
576
+ if (!isConnected) if (connectingPromise) await connectingPromise;
577
+ else throw Error("send was called before connect");
578
+ await invokeableTransport.send(data);
579
+ }
580
+ },
581
+ async invoke(name, data) {
582
+ if (!isConnected) if (connectingPromise) await connectingPromise;
583
+ else throw Error("invoke was called before connect");
584
+ return invokeableTransport.invoke(name, data);
585
+ }
586
+ };
587
+ }, createWebSocketModuleRunnerTransport = (options) => {
588
+ let pingInterval = options.pingInterval ?? 3e4, ws, pingIntervalId;
589
+ return {
590
+ async connect({ onMessage, onDisconnection }) {
591
+ let socket = options.createConnection();
592
+ socket.addEventListener("message", async ({ data }) => {
593
+ onMessage(JSON.parse(data));
594
+ });
595
+ let isOpened = socket.readyState === socket.OPEN;
596
+ isOpened || await new Promise((resolve$1, reject) => {
597
+ socket.addEventListener("open", () => {
598
+ isOpened = !0, resolve$1();
599
+ }, { once: !0 }), socket.addEventListener("close", async () => {
600
+ if (!isOpened) {
601
+ reject(/* @__PURE__ */ Error("WebSocket closed without opened."));
602
+ return;
603
+ }
604
+ onMessage({
605
+ type: "custom",
606
+ event: "vite:ws:disconnect",
607
+ data: { webSocket: socket }
608
+ }), onDisconnection();
609
+ });
610
+ }), onMessage({
611
+ type: "custom",
612
+ event: "vite:ws:connect",
613
+ data: { webSocket: socket }
614
+ }), ws = socket, pingIntervalId = setInterval(() => {
615
+ socket.readyState === socket.OPEN && socket.send(JSON.stringify({ type: "ping" }));
616
+ }, pingInterval);
617
+ },
618
+ disconnect() {
619
+ clearInterval(pingIntervalId), ws?.close();
620
+ },
621
+ send(data) {
622
+ ws.send(JSON.stringify(data));
623
+ }
624
+ };
625
+ };
626
+ function createIsBuiltin(builtins) {
627
+ let plainBuiltinsSet = new Set(builtins.filter((builtin) => typeof builtin == "string")), regexBuiltins = builtins.filter((builtin) => typeof builtin != "string");
628
+ return (id) => plainBuiltinsSet.has(id) || regexBuiltins.some((regexp) => regexp.test(id));
629
+ }
630
+ const ssrModuleExportsKey = "__vite_ssr_exports__", ssrImportKey = "__vite_ssr_import__", ssrDynamicImportKey = "__vite_ssr_dynamic_import__", ssrExportAllKey = "__vite_ssr_exportAll__", ssrExportNameKey = "__vite_ssr_exportName__", ssrImportMetaKey = "__vite_ssr_import_meta__", noop = () => {}, silentConsole = {
631
+ debug: noop,
632
+ error: noop
633
+ }, hmrLogger = {
634
+ debug: (...msg) => console.log("[vite]", ...msg),
635
+ error: (error) => console.log("[vite]", error)
636
+ };
637
+ function createHMRHandler(handler) {
638
+ let queue = new Queue();
639
+ return (payload) => queue.enqueue(() => handler(payload));
640
+ }
641
+ var Queue = class {
642
+ queue = [];
643
+ pending = !1;
644
+ enqueue(promise) {
645
+ return new Promise((resolve$1, reject) => {
646
+ this.queue.push({
647
+ promise,
648
+ resolve: resolve$1,
649
+ reject
650
+ }), this.dequeue();
651
+ });
652
+ }
653
+ dequeue() {
654
+ if (this.pending) return !1;
655
+ let item = this.queue.shift();
656
+ return item ? (this.pending = !0, item.promise().then(item.resolve).catch(item.reject).finally(() => {
657
+ this.pending = !1, this.dequeue();
658
+ }), !0) : !1;
659
+ }
660
+ };
661
+ function createHMRHandlerForRunner(runner) {
662
+ return createHMRHandler(async (payload) => {
663
+ let hmrClient = runner.hmrClient;
664
+ if (!(!hmrClient || runner.isClosed())) switch (payload.type) {
665
+ case "connected":
666
+ hmrClient.logger.debug("connected.");
667
+ break;
668
+ case "update":
669
+ await hmrClient.notifyListeners("vite:beforeUpdate", payload), await Promise.all(payload.updates.map(async (update) => {
670
+ if (update.type === "js-update") return update.acceptedPath = unwrapId(update.acceptedPath), update.path = unwrapId(update.path), hmrClient.queueUpdate(update);
671
+ hmrClient.logger.error("css hmr is not supported in runner mode.");
672
+ })), await hmrClient.notifyListeners("vite:afterUpdate", payload);
673
+ break;
674
+ case "custom":
675
+ await hmrClient.notifyListeners(payload.event, payload.data);
676
+ break;
677
+ case "full-reload": {
678
+ let { triggeredBy } = payload, clearEntrypointUrls = triggeredBy ? getModulesEntrypoints(runner, getModulesByFile(runner, slash(triggeredBy))) : findAllEntrypoints(runner);
679
+ if (!clearEntrypointUrls.size) break;
680
+ hmrClient.logger.debug("program reload"), await hmrClient.notifyListeners("vite:beforeFullReload", payload), runner.evaluatedModules.clear();
681
+ for (let url of clearEntrypointUrls) try {
682
+ await runner.import(url);
683
+ } catch (err) {
684
+ err.code !== "ERR_OUTDATED_OPTIMIZED_DEP" && hmrClient.logger.error(`An error happened during full reload\n${err.message}\n${err.stack}`);
685
+ }
686
+ break;
687
+ }
688
+ case "prune":
689
+ await hmrClient.notifyListeners("vite:beforePrune", payload), await hmrClient.prunePaths(payload.paths);
690
+ break;
691
+ case "error": {
692
+ await hmrClient.notifyListeners("vite:error", payload);
693
+ let err = payload.err;
694
+ hmrClient.logger.error(`Internal Server Error\n${err.message}\n${err.stack}`);
695
+ break;
696
+ }
697
+ case "ping": break;
698
+ default: return payload;
699
+ }
700
+ });
701
+ }
702
+ function getModulesByFile(runner, file) {
703
+ let nodes = runner.evaluatedModules.getModulesByFile(file);
704
+ return nodes ? [...nodes].map((node) => node.id) : [];
705
+ }
706
+ function getModulesEntrypoints(runner, modules, visited = /* @__PURE__ */ new Set(), entrypoints = /* @__PURE__ */ new Set()) {
707
+ for (let moduleId of modules) {
708
+ if (visited.has(moduleId)) continue;
709
+ visited.add(moduleId);
710
+ let module = runner.evaluatedModules.getModuleById(moduleId);
711
+ if (module) {
712
+ if (!module.importers.size) {
713
+ entrypoints.add(module.url);
714
+ continue;
715
+ }
716
+ for (let importer of module.importers) getModulesEntrypoints(runner, [importer], visited, entrypoints);
717
+ }
718
+ }
719
+ return entrypoints;
720
+ }
721
+ function findAllEntrypoints(runner, entrypoints = /* @__PURE__ */ new Set()) {
722
+ for (let mod of runner.evaluatedModules.idToModuleMap.values()) mod.importers.size || entrypoints.add(mod.url);
723
+ return entrypoints;
724
+ }
725
+ const sourceMapCache = {}, fileContentsCache = {}, evaluatedModulesCache = /* @__PURE__ */ new Set(), retrieveFileHandlers = /* @__PURE__ */ new Set(), retrieveSourceMapHandlers = /* @__PURE__ */ new Set(), createExecHandlers = (handlers) => ((...args) => {
726
+ for (let handler of handlers) {
727
+ let result = handler(...args);
728
+ if (result) return result;
729
+ }
730
+ return null;
731
+ }), retrieveFileFromHandlers = createExecHandlers(retrieveFileHandlers), retrieveSourceMapFromHandlers = createExecHandlers(retrieveSourceMapHandlers);
732
+ let overridden = !1;
733
+ const originalPrepare = Error.prepareStackTrace;
734
+ function resetInterceptor(runner, options) {
735
+ evaluatedModulesCache.delete(runner.evaluatedModules), options.retrieveFile && retrieveFileHandlers.delete(options.retrieveFile), options.retrieveSourceMap && retrieveSourceMapHandlers.delete(options.retrieveSourceMap), evaluatedModulesCache.size === 0 && (Error.prepareStackTrace = originalPrepare, overridden = !1);
736
+ }
737
+ function interceptStackTrace(runner, options = {}) {
738
+ return overridden ||= (Error.prepareStackTrace = prepareStackTrace, !0), evaluatedModulesCache.add(runner.evaluatedModules), options.retrieveFile && retrieveFileHandlers.add(options.retrieveFile), options.retrieveSourceMap && retrieveSourceMapHandlers.add(options.retrieveSourceMap), () => resetInterceptor(runner, options);
739
+ }
740
+ function supportRelativeURL(file, url) {
741
+ if (!file) return url;
742
+ let dir = posixDirname(slash(file)), match = /^\w+:\/\/[^/]*/.exec(dir), protocol = match ? match[0] : "", startPath = dir.slice(protocol.length);
743
+ return protocol && /^\/\w:/.test(startPath) ? (protocol += "/", protocol + slash(posixResolve(startPath, url))) : protocol + posixResolve(startPath, url);
744
+ }
745
+ function getRunnerSourceMap(position) {
746
+ for (let moduleGraph of evaluatedModulesCache) {
747
+ let sourceMap = moduleGraph.getModuleSourceMapById(position.source);
748
+ if (sourceMap) return {
749
+ url: position.source,
750
+ map: sourceMap,
751
+ vite: !0
752
+ };
753
+ }
754
+ return null;
755
+ }
756
+ function retrieveFile(path) {
757
+ if (path in fileContentsCache) return fileContentsCache[path];
758
+ let content = retrieveFileFromHandlers(path);
759
+ return typeof content == "string" ? (fileContentsCache[path] = content, content) : null;
760
+ }
761
+ function retrieveSourceMapURL(source) {
762
+ let fileData = retrieveFile(source);
763
+ if (!fileData) return null;
764
+ let re = /\/\/[@#]\s*sourceMappingURL=([^\s'"]+)\s*$|\/\*[@#]\s*sourceMappingURL=[^\s*'"]+\s*\*\/\s*$/gm, lastMatch, match;
765
+ for (; match = re.exec(fileData);) lastMatch = match;
766
+ return lastMatch ? lastMatch[1] : null;
767
+ }
768
+ const reSourceMap = /^data:application\/json[^,]+base64,/;
769
+ function retrieveSourceMap(source) {
770
+ let urlAndMap = retrieveSourceMapFromHandlers(source);
771
+ if (urlAndMap) return urlAndMap;
772
+ let sourceMappingURL = retrieveSourceMapURL(source);
773
+ if (!sourceMappingURL) return null;
774
+ let sourceMapData;
775
+ if (reSourceMap.test(sourceMappingURL)) {
776
+ let rawData = sourceMappingURL.slice(sourceMappingURL.indexOf(",") + 1);
777
+ sourceMapData = Buffer.from(rawData, "base64").toString(), sourceMappingURL = source;
778
+ } else sourceMappingURL = supportRelativeURL(source, sourceMappingURL), sourceMapData = retrieveFile(sourceMappingURL);
779
+ return sourceMapData ? {
780
+ url: sourceMappingURL,
781
+ map: sourceMapData
782
+ } : null;
783
+ }
784
+ function mapSourcePosition(position) {
785
+ if (!position.source) return position;
786
+ let sourceMap = getRunnerSourceMap(position);
787
+ if (sourceMap ||= sourceMapCache[position.source], !sourceMap) {
788
+ let urlAndMap = retrieveSourceMap(position.source);
789
+ if (urlAndMap && urlAndMap.map) {
790
+ let url = urlAndMap.url;
791
+ sourceMap = sourceMapCache[position.source] = {
792
+ url,
793
+ map: new DecodedMap(typeof urlAndMap.map == "string" ? JSON.parse(urlAndMap.map) : urlAndMap.map, url)
794
+ };
795
+ let contents = sourceMap.map?.map.sourcesContent;
796
+ sourceMap.map && contents && sourceMap.map.resolvedSources.forEach((source, i) => {
797
+ let content = contents[i];
798
+ if (content && source && url) {
799
+ let contentUrl = supportRelativeURL(url, source);
800
+ fileContentsCache[contentUrl] = content;
801
+ }
802
+ });
803
+ } else sourceMap = sourceMapCache[position.source] = {
804
+ url: null,
805
+ map: null
806
+ };
807
+ }
808
+ if (sourceMap.map && sourceMap.url) {
809
+ let originalPosition = getOriginalPosition(sourceMap.map, position);
810
+ if (originalPosition && originalPosition.source != null) return originalPosition.source = supportRelativeURL(sourceMap.url, originalPosition.source), sourceMap.vite && (originalPosition._vite = !0), originalPosition;
811
+ }
812
+ return position;
813
+ }
814
+ function mapEvalOrigin(origin) {
815
+ let match = /^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(origin);
816
+ if (match) {
817
+ let position = mapSourcePosition({
818
+ name: null,
819
+ source: match[2],
820
+ line: +match[3],
821
+ column: match[4] - 1
822
+ });
823
+ return `eval at ${match[1]} (${position.source}:${position.line}:${position.column + 1})`;
824
+ }
825
+ return match = /^eval at ([^(]+) \((.+)\)$/.exec(origin), match ? `eval at ${match[1]} (${mapEvalOrigin(match[2])})` : origin;
826
+ }
827
+ function CallSiteToString() {
828
+ let fileName, fileLocation = "";
829
+ if (this.isNative()) fileLocation = "native";
830
+ else {
831
+ fileName = this.getScriptNameOrSourceURL(), !fileName && this.isEval() && (fileLocation = this.getEvalOrigin(), fileLocation += ", "), fileName ? fileLocation += fileName : fileLocation += "<anonymous>";
832
+ let lineNumber = this.getLineNumber();
833
+ if (lineNumber != null) {
834
+ fileLocation += `:${lineNumber}`;
835
+ let columnNumber = this.getColumnNumber();
836
+ columnNumber && (fileLocation += `:${columnNumber}`);
837
+ }
838
+ }
839
+ let line = "", functionName = this.getFunctionName(), addSuffix = !0, isConstructor = this.isConstructor();
840
+ if (this.isToplevel() || isConstructor) isConstructor ? line += `new ${functionName || "<anonymous>"}` : functionName ? line += functionName : (line += fileLocation, addSuffix = !1);
841
+ else {
842
+ let typeName = this.getTypeName();
843
+ typeName === "[object Object]" && (typeName = "null");
844
+ let methodName = this.getMethodName();
845
+ functionName ? (typeName && functionName.indexOf(typeName) !== 0 && (line += `${typeName}.`), line += functionName, methodName && functionName.indexOf(`.${methodName}`) !== functionName.length - methodName.length - 1 && (line += ` [as ${methodName}]`)) : line += `${typeName}.${methodName || "<anonymous>"}`;
846
+ }
847
+ return addSuffix && (line += ` (${fileLocation})`), line;
848
+ }
849
+ function cloneCallSite(frame) {
850
+ let object = {};
851
+ return Object.getOwnPropertyNames(Object.getPrototypeOf(frame)).forEach((name) => {
852
+ let key = name;
853
+ object[key] = /^(?:is|get)/.test(name) ? function() {
854
+ return frame[key].call(frame);
855
+ } : frame[key];
856
+ }), object.toString = CallSiteToString, object;
857
+ }
858
+ function wrapCallSite(frame, state) {
859
+ if (state === void 0 && (state = {
860
+ nextPosition: null,
861
+ curPosition: null
862
+ }), frame.isNative()) return state.curPosition = null, frame;
863
+ let source = frame.getFileName() || frame.getScriptNameOrSourceURL();
864
+ if (source) {
865
+ let line = frame.getLineNumber(), column = frame.getColumnNumber() - 1;
866
+ line === 1 && column > 62 && !frame.isEval() && (column -= 62);
867
+ let position = mapSourcePosition({
868
+ name: null,
869
+ source,
870
+ line,
871
+ column
872
+ });
873
+ state.curPosition = position, frame = cloneCallSite(frame);
874
+ let originalFunctionName = frame.getFunctionName;
875
+ return frame.getFunctionName = function() {
876
+ let name = (() => state.nextPosition == null ? originalFunctionName() : state.nextPosition.name || originalFunctionName())();
877
+ return name === "eval" && "_vite" in position ? null : name;
878
+ }, frame.getFileName = function() {
879
+ return position.source ?? null;
880
+ }, frame.getLineNumber = function() {
881
+ return position.line;
882
+ }, frame.getColumnNumber = function() {
883
+ return position.column + 1;
884
+ }, frame.getScriptNameOrSourceURL = function() {
885
+ return position.source;
886
+ }, frame;
887
+ }
888
+ let origin = frame.isEval() && frame.getEvalOrigin();
889
+ return origin ? (origin = mapEvalOrigin(origin), frame = cloneCallSite(frame), frame.getEvalOrigin = function() {
890
+ return origin || void 0;
891
+ }, frame) : frame;
892
+ }
893
+ function prepareStackTrace(error, stack) {
894
+ let errorString = `${error.name || "Error"}: ${error.message || ""}`, state = {
895
+ nextPosition: null,
896
+ curPosition: null
897
+ }, processedStack = [];
898
+ for (let i = stack.length - 1; i >= 0; i--) processedStack.push(`\n at ${wrapCallSite(stack[i], state)}`), state.nextPosition = state.curPosition;
899
+ return state.curPosition = state.nextPosition = null, errorString + processedStack.reverse().join("");
900
+ }
901
+ function enableSourceMapSupport(runner) {
902
+ if (runner.options.sourcemapInterceptor === "node") {
903
+ if (typeof process > "u") throw TypeError("Cannot use \"sourcemapInterceptor: 'node'\" because global \"process\" variable is not available.");
904
+ if (typeof process.setSourceMapsEnabled != "function") throw TypeError("Cannot use \"sourcemapInterceptor: 'node'\" because \"process.setSourceMapsEnabled\" function is not available. Please use Node >= 16.6.0.");
905
+ let isEnabledAlready = process.sourceMapsEnabled ?? !1;
906
+ return process.setSourceMapsEnabled(!0), () => !isEnabledAlready && process.setSourceMapsEnabled(!1);
907
+ }
908
+ return interceptStackTrace(runner, typeof runner.options.sourcemapInterceptor == "object" ? runner.options.sourcemapInterceptor : void 0);
909
+ }
910
+ var ESModulesEvaluator = class {
911
+ startOffset = getAsyncFunctionDeclarationPaddingLineCount();
912
+ async runInlinedModule(context, code) {
913
+ await new AsyncFunction(ssrModuleExportsKey, ssrImportMetaKey, ssrImportKey, ssrDynamicImportKey, ssrExportAllKey, ssrExportNameKey, "\"use strict\";" + code)(context[ssrModuleExportsKey], context[ssrImportMetaKey], context[ssrImportKey], context[ssrDynamicImportKey], context[ssrExportAllKey], context[ssrExportNameKey]), Object.seal(context[ssrModuleExportsKey]);
914
+ }
915
+ runExternalModule(filepath) {
916
+ return import(filepath);
917
+ }
918
+ };
919
+ const customizationHookNamespace = "vite-module-runner:import-meta-resolve/v1/", customizationHooksModule = `
920
+
921
+ export async function resolve(specifier, context, nextResolve) {
922
+ if (specifier.startsWith(${JSON.stringify(customizationHookNamespace)})) {
923
+ const data = specifier.slice(${JSON.stringify(customizationHookNamespace)}.length)
924
+ const [parsedSpecifier, parsedImporter] = JSON.parse(data)
925
+ specifier = parsedSpecifier
926
+ context.parentURL = parsedImporter
927
+ }
928
+ return nextResolve(specifier, context)
929
+ }
930
+
931
+ `;
932
+ function customizationHookResolve(specifier, context, nextResolve) {
933
+ if (specifier.startsWith(customizationHookNamespace)) {
934
+ let data = specifier.slice(42), [parsedSpecifier, parsedImporter] = JSON.parse(data);
935
+ specifier = parsedSpecifier, context.parentURL = parsedImporter;
936
+ }
937
+ return nextResolve(specifier, context);
938
+ }
939
+ async function createImportMetaResolver() {
940
+ let module;
941
+ try {
942
+ module = (await import("node:module")).Module;
943
+ } catch {
944
+ return;
945
+ }
946
+ if (module) {
947
+ if (module.registerHooks) return module.registerHooks({ resolve: customizationHookResolve }), importMetaResolveWithCustomHook;
948
+ if (module.register) {
949
+ try {
950
+ let hookModuleContent = `data:text/javascript,${encodeURI(customizationHooksModule)}`;
951
+ module.register(hookModuleContent);
952
+ } catch (e) {
953
+ if ("code" in e && e.code === "ERR_NETWORK_IMPORT_DISALLOWED") return;
954
+ throw e;
955
+ }
956
+ return importMetaResolveWithCustomHook;
957
+ }
958
+ }
959
+ }
960
+ function importMetaResolveWithCustomHook(specifier, importer) {
961
+ return import.meta.resolve(`${customizationHookNamespace}${JSON.stringify([specifier, importer])}`);
962
+ }
963
+ `${customizationHookNamespace}`;
964
+ const envProxy = new Proxy({}, { get(_, p) {
965
+ throw Error(`[module runner] Dynamic access of "import.meta.env" is not supported. Please, use "import.meta.env.${String(p)}" instead.`);
966
+ } });
967
+ function createDefaultImportMeta(modulePath) {
968
+ let href = posixPathToFileHref(modulePath), filename = modulePath, dirname$1 = posixDirname(modulePath);
969
+ return {
970
+ filename: isWindows ? toWindowsPath(filename) : filename,
971
+ dirname: isWindows ? toWindowsPath(dirname$1) : dirname$1,
972
+ url: href,
973
+ env: envProxy,
974
+ resolve(_id, _parent) {
975
+ throw Error("[module runner] \"import.meta.resolve\" is not supported.");
976
+ },
977
+ glob() {
978
+ throw Error("[module runner] \"import.meta.glob\" is statically replaced during file transformation. Make sure to reference it by the full name.");
979
+ }
980
+ };
981
+ }
982
+ let importMetaResolverCache;
983
+ async function createNodeImportMeta(modulePath) {
984
+ let defaultMeta = createDefaultImportMeta(modulePath), href = defaultMeta.url;
985
+ importMetaResolverCache ??= createImportMetaResolver();
986
+ let importMetaResolver = await importMetaResolverCache;
987
+ return {
988
+ ...defaultMeta,
989
+ main: !1,
990
+ resolve(id, parent) {
991
+ return (importMetaResolver ?? defaultMeta.resolve)(id, parent ?? href);
992
+ }
993
+ };
994
+ }
995
+ var ModuleRunner = class {
996
+ evaluatedModules;
997
+ hmrClient;
998
+ transport;
999
+ resetSourceMapSupport;
1000
+ concurrentModuleNodePromises = /* @__PURE__ */ new Map();
1001
+ isBuiltin;
1002
+ builtinsPromise;
1003
+ closed = !1;
1004
+ constructor(options, evaluator = new ESModulesEvaluator(), debug) {
1005
+ if (this.options = options, this.evaluator = evaluator, this.debug = debug, this.evaluatedModules = options.evaluatedModules ?? new EvaluatedModules(), this.transport = normalizeModuleRunnerTransport(options.transport), options.hmr !== !1) {
1006
+ let optionsHmr = options.hmr ?? !0;
1007
+ if (this.hmrClient = new HMRClient(optionsHmr === !0 || optionsHmr.logger === void 0 ? hmrLogger : optionsHmr.logger === !1 ? silentConsole : optionsHmr.logger, this.transport, ({ acceptedPath }) => this.import(acceptedPath)), !this.transport.connect) throw Error("HMR is not supported by this runner transport, but `hmr` option was set to true");
1008
+ this.transport.connect(createHMRHandlerForRunner(this));
1009
+ } else this.transport.connect?.();
1010
+ options.sourcemapInterceptor !== !1 && (this.resetSourceMapSupport = enableSourceMapSupport(this));
1011
+ }
1012
+ async import(url) {
1013
+ let fetchedModule = await this.cachedModule(url);
1014
+ return await this.cachedRequest(url, fetchedModule);
1015
+ }
1016
+ clearCache() {
1017
+ this.evaluatedModules.clear(), this.hmrClient?.clear();
1018
+ }
1019
+ async close() {
1020
+ this.resetSourceMapSupport?.(), this.clearCache(), this.hmrClient = void 0, this.closed = !0, await this.transport.disconnect?.();
1021
+ }
1022
+ isClosed() {
1023
+ return this.closed;
1024
+ }
1025
+ processImport(exports, fetchResult, metadata) {
1026
+ if (!("externalize" in fetchResult)) return exports;
1027
+ let { url, type } = fetchResult;
1028
+ return type !== "module" && type !== "commonjs" || analyzeImportedModDifference(exports, url, type, metadata), exports;
1029
+ }
1030
+ isCircularModule(mod) {
1031
+ for (let importedFile of mod.imports) if (mod.importers.has(importedFile)) return !0;
1032
+ return !1;
1033
+ }
1034
+ isCircularImport(importers, moduleUrl, visited = /* @__PURE__ */ new Set()) {
1035
+ for (let importer of importers) {
1036
+ if (visited.has(importer)) continue;
1037
+ if (visited.add(importer), importer === moduleUrl) return !0;
1038
+ let mod = this.evaluatedModules.getModuleById(importer);
1039
+ if (mod && mod.importers.size && this.isCircularImport(mod.importers, moduleUrl, visited)) return !0;
1040
+ }
1041
+ return !1;
1042
+ }
1043
+ async cachedRequest(url, mod, callstack = [], metadata) {
1044
+ let meta = mod.meta, moduleId = meta.id, { importers } = mod, importee = callstack[callstack.length - 1];
1045
+ if (importee && importers.add(importee), (callstack.includes(moduleId) || this.isCircularModule(mod) || this.isCircularImport(importers, moduleId)) && mod.exports) return this.processImport(mod.exports, meta, metadata);
1046
+ let debugTimer;
1047
+ this.debug && (debugTimer = setTimeout(() => {
1048
+ this.debug(`[module runner] module ${moduleId} takes over 2s to load.\n${(() => `stack:\n${[...callstack, moduleId].reverse().map((p) => ` - ${p}`).join("\n")}`)()}`);
1049
+ }, 2e3));
1050
+ try {
1051
+ if (mod.promise) return this.processImport(await mod.promise, meta, metadata);
1052
+ let promise = this.directRequest(url, mod, callstack);
1053
+ return mod.promise = promise, mod.evaluated = !1, this.processImport(await promise, meta, metadata);
1054
+ } finally {
1055
+ mod.evaluated = !0, debugTimer && clearTimeout(debugTimer);
1056
+ }
1057
+ }
1058
+ async cachedModule(url, importer) {
1059
+ let cached = this.concurrentModuleNodePromises.get(url);
1060
+ if (cached) this.debug?.("[module runner] using cached module info for", url);
1061
+ else {
1062
+ let cachedModule = this.evaluatedModules.getModuleByUrl(url);
1063
+ cached = this.getModuleInformation(url, importer, cachedModule).finally(() => {
1064
+ this.concurrentModuleNodePromises.delete(url);
1065
+ }), this.concurrentModuleNodePromises.set(url, cached);
1066
+ }
1067
+ return cached;
1068
+ }
1069
+ ensureBuiltins() {
1070
+ if (!this.isBuiltin) return this.builtinsPromise ??= (async () => {
1071
+ try {
1072
+ this.debug?.("[module runner] fetching builtins from server");
1073
+ let builtins = (await this.transport.invoke("getBuiltins", [])).map((builtin) => typeof builtin == "object" && builtin && "type" in builtin ? builtin.type === "string" ? builtin.value : new RegExp(builtin.source, builtin.flags) : builtin);
1074
+ this.isBuiltin = createIsBuiltin(builtins), this.debug?.("[module runner] builtins loaded:", builtins);
1075
+ } finally {
1076
+ this.builtinsPromise = void 0;
1077
+ }
1078
+ })(), this.builtinsPromise;
1079
+ }
1080
+ async getModuleInformation(url, importer, cachedModule) {
1081
+ if (this.closed) throw Error("Vite module runner has been closed.");
1082
+ await this.ensureBuiltins(), this.debug?.("[module runner] fetching", url);
1083
+ let isCached = !!(typeof cachedModule == "object" && cachedModule.meta), fetchedModule = url.startsWith("data:") || this.isBuiltin?.(url) ? {
1084
+ externalize: url,
1085
+ type: "builtin"
1086
+ } : await this.transport.invoke("fetchModule", [
1087
+ url,
1088
+ importer,
1089
+ {
1090
+ cached: isCached,
1091
+ startOffset: this.evaluator.startOffset
1092
+ }
1093
+ ]);
1094
+ if ("cache" in fetchedModule) {
1095
+ if (!cachedModule || !cachedModule.meta) throw Error(`Module "${url}" was mistakenly invalidated during fetch phase.`);
1096
+ return cachedModule;
1097
+ }
1098
+ let moduleId = "externalize" in fetchedModule ? fetchedModule.externalize : fetchedModule.id, moduleUrl = "url" in fetchedModule ? fetchedModule.url : url, module = this.evaluatedModules.ensureModule(moduleId, moduleUrl);
1099
+ return "invalidate" in fetchedModule && fetchedModule.invalidate && this.evaluatedModules.invalidateModule(module), fetchedModule.url = moduleUrl, fetchedModule.id = moduleId, module.meta = fetchedModule, module;
1100
+ }
1101
+ async directRequest(url, mod, _callstack) {
1102
+ let fetchResult = mod.meta, moduleId = fetchResult.id, callstack = [..._callstack, moduleId], request = async (dep, metadata) => {
1103
+ let importer = "file" in fetchResult && fetchResult.file || moduleId, depMod = await this.cachedModule(dep, importer);
1104
+ return depMod.importers.add(moduleId), mod.imports.add(depMod.id), this.cachedRequest(dep, depMod, callstack, metadata);
1105
+ }, dynamicRequest = async (dep) => (dep = String(dep), dep[0] === "." && (dep = posixResolve(posixDirname(url), dep)), request(dep, { isDynamicImport: !0 }));
1106
+ if ("externalize" in fetchResult) {
1107
+ let { externalize } = fetchResult;
1108
+ this.debug?.("[module runner] externalizing", externalize);
1109
+ let exports$1 = await this.evaluator.runExternalModule(externalize);
1110
+ return mod.exports = exports$1, exports$1;
1111
+ }
1112
+ let { code, file } = fetchResult;
1113
+ if (code == null) {
1114
+ let importer = callstack[callstack.length - 2];
1115
+ throw Error(`[module runner] Failed to load "${url}"${importer ? ` imported from ${importer}` : ""}`);
1116
+ }
1117
+ let createImportMeta = this.options.createImportMeta ?? createDefaultImportMeta, modulePath = cleanUrl(file || moduleId), href = posixPathToFileHref(modulePath), meta = await createImportMeta(modulePath), exports = Object.create(null);
1118
+ Object.defineProperty(exports, Symbol.toStringTag, {
1119
+ value: "Module",
1120
+ enumerable: !1,
1121
+ configurable: !1
1122
+ }), mod.exports = exports;
1123
+ let hotContext;
1124
+ this.hmrClient && Object.defineProperty(meta, "hot", {
1125
+ enumerable: !0,
1126
+ get: () => {
1127
+ if (!this.hmrClient) throw Error("[module runner] HMR client was closed.");
1128
+ return this.debug?.("[module runner] creating hmr context for", mod.url), hotContext ||= new HMRContext(this.hmrClient, mod.url), hotContext;
1129
+ },
1130
+ set: (value) => {
1131
+ hotContext = value;
1132
+ }
1133
+ });
1134
+ let context = {
1135
+ [ssrImportKey]: request,
1136
+ [ssrDynamicImportKey]: dynamicRequest,
1137
+ [ssrModuleExportsKey]: exports,
1138
+ [ssrExportAllKey]: (obj) => exportAll(exports, obj),
1139
+ [ssrExportNameKey]: (name, getter) => Object.defineProperty(exports, name, {
1140
+ enumerable: !0,
1141
+ configurable: !0,
1142
+ get: getter
1143
+ }),
1144
+ [ssrImportMetaKey]: meta
1145
+ };
1146
+ return this.debug?.("[module runner] executing", href), await this.evaluator.runInlinedModule(context, code, mod), exports;
1147
+ }
1148
+ };
1149
+ function exportAll(exports, sourceModule) {
1150
+ if (exports !== sourceModule && !(isPrimitive(sourceModule) || Array.isArray(sourceModule) || sourceModule instanceof Promise)) {
1151
+ for (let key in sourceModule) if (key !== "default" && key !== "__esModule" && !(key in exports)) try {
1152
+ Object.defineProperty(exports, key, {
1153
+ enumerable: !0,
1154
+ configurable: !0,
1155
+ get: () => sourceModule[key]
1156
+ });
1157
+ } catch {}
1158
+ }
1159
+ }
1160
+ export { ESModulesEvaluator, EvaluatedModules, ModuleRunner, createDefaultImportMeta, createNodeImportMeta, createWebSocketModuleRunnerTransport, normalizeModuleId, ssrDynamicImportKey, ssrExportAllKey, ssrExportNameKey, ssrImportKey, ssrImportMetaKey, ssrModuleExportsKey };