@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,963 @@
1
+ // Agent tools the workboard plugin contributes.
2
+ //
3
+ // Five tools cover the kanban surface from the agent's side:
4
+ //
5
+ // - task_list — read the board (status-grouped, optional project filter)
6
+ // - task_create — drop one or more new ready tasks on the board (batch)
7
+ // - task_update — patch title / description / priority / project
8
+ // - task_move — move a task between status columns
9
+ // - task_delete — remove one or more tasks (batch)
10
+ //
11
+ // Worker-side helpers (claim / complete) intentionally do NOT live
12
+ // here — workers don't run inside the agent loop, they live inside
13
+ // the host process. The only "worker" the agent talks to is via the
14
+ // task itself: drop a task on the board, watch the kanban panel, see
15
+ // it flip to done.
16
+ //
17
+ // All tools require a database handle which the activator passes in
18
+ // once and closes over via these factories. We don't capture the
19
+ // AgentToolContext.userId from the call — we read it from the ctx
20
+ // each invocation so that cross-user tool routing in v1 can change
21
+ // the scope without rewriting the tools.
22
+ import { randomUUID } from "node:crypto";
23
+ import { Type } from "typebox";
24
+ import { createTask, deleteTask, getTask, isEligible, listTasks, updateTask, isTaskStatus, INTERVENTION_LABEL, DEFAULT_TASK_TIMEOUT_MS, VISIBLE_STATUSES, } from "../db/tasks.js";
25
+ import { appendContinuationHint, stripContinuationHint, } from "../worker/pool.js";
26
+ import { loadWorkerAgents } from "../fs-worker-agents.js";
27
+ /** PR-C2 replaces the listWorkerAgents() DB call with a fs scan.
28
+ * Helper kept local so the existing call sites change as little
29
+ * as possible. The tool surface still passes through `deps.db`
30
+ * (some tools genuinely need it), so we don't bother routing
31
+ * tenantHomeDir through ToolDeps; we just rebuild the path from
32
+ * the tenant id we already have. */
33
+ function listAgents(tenantId, tenantHomeDir) {
34
+ return loadWorkerAgents({ tenantId, tenantHomeDir }).agents;
35
+ }
36
+ import { readSessionHistory } from "../db/session-history.js";
37
+ const STATUS_DESCRIPTION = 'One of "ready", "in_progress", "done". ' +
38
+ '"ready" tasks are picked up by the worker pool. ' +
39
+ 'Tasks tagged with the "stalled" or "draft" label stay in "ready" ' +
40
+ 'but are skipped by the pool until the label is removed.';
41
+ function summarise(t, blocked) {
42
+ return {
43
+ id: t.id,
44
+ title: t.title,
45
+ status: t.status,
46
+ project: t.projectSlug,
47
+ priority: t.priority,
48
+ workerRole: t.workerRole,
49
+ description: t.description,
50
+ resultSummary: t.resultSummary,
51
+ dependsOn: t.dependsOn,
52
+ labels: t.labels,
53
+ failureReason: t.failureReason,
54
+ attempts: t.attempts,
55
+ blocked,
56
+ createdAt: t.createdAt,
57
+ startedAt: t.startedAt,
58
+ endedAt: t.endedAt,
59
+ };
60
+ }
61
+ /** Filter caller-supplied depends_on against owner-scoped tasks.
62
+ * Drops any id that doesn't belong to this user (silently — it's
63
+ * the same forgiving behaviour the routes layer uses). */
64
+ function sanitiseDepsForOwner(db, ownerUserId, raw, excludeId) {
65
+ if (!raw || raw.length === 0)
66
+ return [];
67
+ const cleaned = raw
68
+ .filter((x) => typeof x === "string" && x.trim().length > 0)
69
+ .map((x) => x.trim())
70
+ .filter((id) => id !== excludeId);
71
+ if (cleaned.length === 0)
72
+ return [];
73
+ const placeholders = cleaned.map(() => "?").join(",");
74
+ const rows = db
75
+ .prepare(`SELECT id FROM tasks WHERE owner_user_id = ? AND id IN (${placeholders})`)
76
+ .all(ownerUserId, ...cleaned);
77
+ return rows.map((r) => r.id);
78
+ }
79
+ function formatBoard(tasks, blockedSet) {
80
+ if (tasks.length === 0)
81
+ return "(no tasks)";
82
+ const groups = new Map();
83
+ for (const s of VISIBLE_STATUSES)
84
+ groups.set(s, []);
85
+ for (const t of tasks) {
86
+ let arr = groups.get(t.status);
87
+ if (!arr) {
88
+ arr = [];
89
+ groups.set(t.status, arr);
90
+ }
91
+ arr.push(t);
92
+ }
93
+ const lines = [];
94
+ for (const [status, list] of groups) {
95
+ if (list.length === 0)
96
+ continue;
97
+ lines.push(`${status} (${list.length}):`);
98
+ for (const t of list) {
99
+ const tag = t.priority > 0 ? ` [p${t.priority}]` : "";
100
+ const role = t.workerRole ? ` <${t.workerRole}>` : "";
101
+ const project = t.projectSlug && t.projectSlug !== "inbox" ? ` #${t.projectSlug}` : "";
102
+ const deps = t.dependsOn.length > 0
103
+ ? ` deps:${blockedSet.has(t.id) ? "🔒" : "✓"}${t.dependsOn.length}`
104
+ : "";
105
+ lines.push(` ${t.id} — ${t.title}${tag}${role}${project}${deps}`);
106
+ }
107
+ }
108
+ return lines.join("\n");
109
+ }
110
+ export function buildTaskListTool(deps) {
111
+ return {
112
+ schema: {
113
+ name: "task_list",
114
+ description: "List tasks on the workboard. Defaults to the four visible columns " +
115
+ "(ready / in_progress / done). Pass a project filter to scope " +
116
+ "to one slug, or status to override the default columns. Use this before " +
117
+ "task_create to avoid duplicates.",
118
+ parameters: Type.Object({
119
+ project: Type.Optional(Type.String({
120
+ description: 'Project slug to filter on. Tasks without an explicit slug are filed under "inbox".',
121
+ })),
122
+ status: Type.Optional(Type.String({
123
+ description: "Comma-separated statuses, e.g. \"todo,in_progress\". Overrides the default visible columns.",
124
+ })),
125
+ limit: Type.Optional(Type.Number({
126
+ description: "Max rows. Default 200, hard cap 2000.",
127
+ })),
128
+ }),
129
+ },
130
+ execute: (raw, ctx) => {
131
+ const args = raw;
132
+ const statuses = [];
133
+ if (args.status) {
134
+ for (const piece of args.status.split(",")) {
135
+ const trimmed = piece.trim();
136
+ if (!trimmed)
137
+ continue;
138
+ if (!isTaskStatus(trimmed)) {
139
+ return { ok: false, text: `unknown status: ${trimmed}` };
140
+ }
141
+ statuses.push(trimmed);
142
+ }
143
+ }
144
+ const tasks = listTasks(deps.db, {
145
+ ownerUserId: ctx.userId,
146
+ projectSlug: args.project ?? null,
147
+ statuses: statuses.length ? statuses : undefined,
148
+ limit: args.limit ?? 200,
149
+ });
150
+ const blocked = new Set();
151
+ for (const t of tasks) {
152
+ if (t.status === "ready" && !isEligible(deps.db, t)) {
153
+ blocked.add(t.id);
154
+ }
155
+ }
156
+ return {
157
+ ok: true,
158
+ text: formatBoard(tasks, blocked),
159
+ data: {
160
+ tasks: tasks.map((t) => summarise(t, blocked.has(t.id))),
161
+ },
162
+ };
163
+ },
164
+ };
165
+ }
166
+ /**
167
+ * Schema for one task inside a `task_create` batch. Kept as a
168
+ * named TypeBox object so the description renders cleanly inside
169
+ * the array's items schema.
170
+ */
171
+ const TaskCreateItem = Type.Object({
172
+ title: Type.String({ description: "Short human-readable title." }),
173
+ description: Type.Optional(Type.String({ description: "Long-form notes / context for the worker." })),
174
+ project: Type.Optional(Type.String({ description: "Project slug. Default \"inbox\"." })),
175
+ priority: Type.Optional(Type.Number({
176
+ description: "Higher = picked up first. Range -10..10; default 0.",
177
+ })),
178
+ worker_agent_id: Type.Optional(Type.String({
179
+ description: "Slug of the worker that should pick this task up (e.g. \"coder\", \"llm-default\"). Use `tenant_config_list({path:\"workers\"})` to see what's registered. Omitting this leaves the task unpinned — any enabled worker can grab it, but you lose control over which one. Pinning by slug is the recommended path; kind-based dispatch is no longer exposed.",
180
+ })),
181
+ depends_on: Type.Optional(Type.Array(Type.String(), {
182
+ description: "Task ids that must reach status='done' before this task is eligible for a worker. Use this to express 'B starts after A'. Ids that don't belong to you are silently ignored.",
183
+ })),
184
+ labels: Type.Optional(Type.Array(Type.String(), {
185
+ description: "Free-form labels. Reserved values: 'stalled' (after MAX_ATTEMPTS pool failures, set automatically) and 'draft' (user opt-in: keeps the task in ready column but the pool skips it until cleared).",
186
+ })),
187
+ });
188
+ export function buildTaskCreateTool(deps) {
189
+ return {
190
+ schema: {
191
+ name: "task_create",
192
+ description: "Drop one or more new tasks on the workboard. Always pass a `tasks` array — " +
193
+ "single-task callers should send a 1-element array. Defaults are " +
194
+ "status=ready, project=inbox; workers in the pool will pick up ready " +
195
+ "tasks automatically. Per-row failures (e.g. an unknown worker_agent_id) do " +
196
+ "NOT abort the rest of the batch — each row reports independently in " +
197
+ "the response's `results` array.",
198
+ parameters: Type.Object({
199
+ tasks: Type.Array(TaskCreateItem, {
200
+ minItems: 1,
201
+ maxItems: 100,
202
+ description: "Tasks to create, in the order they should appear in `results`.",
203
+ }),
204
+ }),
205
+ },
206
+ execute: (raw, ctx) => {
207
+ const args = raw;
208
+ const items = Array.isArray(args.tasks) ? args.tasks : [];
209
+ if (items.length === 0) {
210
+ return { ok: false, text: "tasks array must not be empty" };
211
+ }
212
+ // Cache the worker-agent list once for the whole batch —
213
+ // creating 50 tasks against the same role shouldn't hit the
214
+ // DB 50 times for the same lookup.
215
+ const agents = listAgents(ctx.tenantId, ctx.tenantHomeDir);
216
+ const results = items.map((item, index) => {
217
+ const title = item?.title?.trim();
218
+ if (!title) {
219
+ return { ok: false, index, text: "title is required" };
220
+ }
221
+ if (title.length > 200) {
222
+ return {
223
+ ok: false,
224
+ index,
225
+ text: "title too long (max 200 chars)",
226
+ };
227
+ }
228
+ const id = randomUUID();
229
+ const dependsOn = sanitiseDepsForOwner(deps.db, ctx.userId, item.depends_on, id);
230
+ const explicitAgentId = item.worker_agent_id?.trim() || null;
231
+ if (explicitAgentId) {
232
+ const target = agents.find((a) => a.id === explicitAgentId);
233
+ if (!target) {
234
+ return {
235
+ ok: false,
236
+ index,
237
+ text: `Worker agent "${explicitAgentId}" doesn't exist in this tenant. Use \`tenant_config_list({ path: "workers" })\` to see available slugs.`,
238
+ };
239
+ }
240
+ if (!target.enabled) {
241
+ return {
242
+ ok: false,
243
+ index,
244
+ text: `Worker agent "${target.name}" (${explicitAgentId}) is disabled. Enable it (set agent.json enabled: true) or pick another worker.`,
245
+ };
246
+ }
247
+ }
248
+ const task = createTask(deps.db, id, {
249
+ ownerUserId: ctx.userId,
250
+ title,
251
+ description: item.description,
252
+ projectSlug: item.project,
253
+ priority: item.priority,
254
+ // workerRole no longer set from the tool surface —
255
+ // dispatch is by worker_agent_id (slug) only. The DB
256
+ // column stays for backwards compat with existing rows.
257
+ workerRole: null,
258
+ workerAgentId: explicitAgentId,
259
+ dependsOn,
260
+ labels: item.labels,
261
+ // Stamp the asking session so the pool knows who to
262
+ // notify when this task finishes. Tools called outside
263
+ // an LLM context (none of these today, but possible
264
+ // for an internal job) just leave it null.
265
+ parentSessionId: ctx.sessionId ?? null,
266
+ });
267
+ const blocked = !isEligible(deps.db, task);
268
+ return {
269
+ ok: true,
270
+ index,
271
+ task: summarise(task, blocked),
272
+ };
273
+ });
274
+ const okCount = results.filter((r) => r.ok).length;
275
+ if (okCount > 0)
276
+ deps.onTaskWrite();
277
+ const failCount = results.length - okCount;
278
+ const summary = failCount === 0
279
+ ? `Created ${okCount} task${okCount === 1 ? "" : "s"}.`
280
+ : `Created ${okCount}/${results.length} task${results.length === 1 ? "" : "s"}; ${failCount} failed.`;
281
+ return {
282
+ ok: okCount > 0,
283
+ text: summary,
284
+ data: { results },
285
+ };
286
+ },
287
+ };
288
+ }
289
+ export function buildTaskUpdateTool(deps) {
290
+ return {
291
+ schema: {
292
+ name: "task_update",
293
+ description: "Patch a task. Pass id + any subset of (title, description, project, " +
294
+ "priority, worker_agent_id, depends_on, labels). For status changes use task_move.",
295
+ parameters: Type.Object({
296
+ id: Type.String(),
297
+ title: Type.Optional(Type.String()),
298
+ description: Type.Optional(Type.String()),
299
+ project: Type.Optional(Type.String()),
300
+ priority: Type.Optional(Type.Number()),
301
+ worker_agent_id: Type.Optional(Type.Union([Type.String(), Type.Null()], {
302
+ description: "Repin to a different worker by slug, or pass null to clear the pin (any enabled worker can grab it). Use `tenant_config_list({path:\"workers\"})` to see slugs.",
303
+ })),
304
+ depends_on: Type.Optional(Type.Array(Type.String(), {
305
+ description: "Replace the dependency list. Pass [] to clear. Ids must belong to you; bogus ids are silently dropped.",
306
+ })),
307
+ labels: Type.Optional(Type.Array(Type.String(), {
308
+ description: "Replace the labels list. Pass [] to clear. Reserved: 'stalled' (set automatically by the pool after MAX_ATTEMPTS failures), 'draft' (pool skip).",
309
+ })),
310
+ }),
311
+ },
312
+ execute: (raw, ctx) => {
313
+ const args = raw;
314
+ if (!args.id)
315
+ return { ok: false, text: "id is required" };
316
+ const before = getTask(deps.db, args.id);
317
+ if (!before)
318
+ return { ok: false, text: `task not found: ${args.id}` };
319
+ if (before.ownerUserId !== ctx.userId) {
320
+ // v0 keeps the board single-user. Future: add an explicit
321
+ // share mechanism + relax this check.
322
+ return { ok: false, text: `task ${args.id} is not yours` };
323
+ }
324
+ // If the patch changes the pin, validate the slug exists
325
+ // and is enabled (same rule as on create). `undefined` =
326
+ // don't touch; explicit `null` = clear the pin.
327
+ if (args.worker_agent_id !== undefined && args.worker_agent_id !== null) {
328
+ const slug = args.worker_agent_id.trim();
329
+ if (!slug) {
330
+ return {
331
+ ok: false,
332
+ text: "worker_agent_id is empty; pass null to clear the pin or a slug to pin.",
333
+ };
334
+ }
335
+ const target = listAgents(ctx.tenantId, ctx.tenantHomeDir).find((a) => a.id === slug);
336
+ if (!target) {
337
+ return {
338
+ ok: false,
339
+ text: `Worker agent "${slug}" doesn't exist. Use \`tenant_config_list({path:"workers"})\` for available slugs.`,
340
+ };
341
+ }
342
+ if (!target.enabled) {
343
+ return {
344
+ ok: false,
345
+ text: `Worker agent "${target.name}" (${slug}) is disabled. Enable it or pick another.`,
346
+ };
347
+ }
348
+ }
349
+ const patch = {
350
+ title: args.title,
351
+ description: args.description,
352
+ projectSlug: args.project,
353
+ priority: args.priority,
354
+ workerAgentId: args.worker_agent_id,
355
+ };
356
+ if (args.depends_on !== undefined) {
357
+ patch.dependsOn = sanitiseDepsForOwner(deps.db, ctx.userId, args.depends_on, args.id);
358
+ }
359
+ if (args.labels !== undefined) {
360
+ patch.labels = args.labels;
361
+ }
362
+ const patched = updateTask(deps.db, args.id, patch);
363
+ // If the patch dropped the `stalled` / `draft` label the
364
+ // task may now be claimable; nudge so the pool re-considers.
365
+ if (patched &&
366
+ args.labels !== undefined &&
367
+ before.labels.some((l) => ["stalled", "draft"].includes(l)) &&
368
+ !patched.labels.some((l) => ["stalled", "draft"].includes(l)) &&
369
+ patched.status === "ready") {
370
+ deps.onTaskWrite();
371
+ }
372
+ const blocked = patched
373
+ ? patched.status === "ready" && !isEligible(deps.db, patched)
374
+ : false;
375
+ return {
376
+ ok: true,
377
+ text: `Updated task ${args.id}.`,
378
+ data: { task: patched ? summarise(patched, blocked) : null },
379
+ };
380
+ },
381
+ };
382
+ }
383
+ export function buildTaskMoveTool(deps) {
384
+ return {
385
+ schema: {
386
+ name: "task_move",
387
+ description: "Change a task's status column. Valid targets: ready, in_progress, done. " +
388
+ "Moving back to 'ready' re-queues the task for the worker pool.",
389
+ parameters: Type.Object({
390
+ id: Type.String(),
391
+ status: Type.String({ description: STATUS_DESCRIPTION }),
392
+ result_summary: Type.Optional(Type.String({
393
+ description: "Optional one-line summary for the result column (typically used when moving to done).",
394
+ })),
395
+ }),
396
+ },
397
+ execute: (raw, ctx) => {
398
+ const args = raw;
399
+ if (!args.id)
400
+ return { ok: false, text: "id is required" };
401
+ if (!args.status || !isTaskStatus(args.status)) {
402
+ return { ok: false, text: `unknown status: ${args.status}` };
403
+ }
404
+ const before = getTask(deps.db, args.id);
405
+ if (!before)
406
+ return { ok: false, text: `task not found: ${args.id}` };
407
+ if (before.ownerUserId !== ctx.userId) {
408
+ return { ok: false, text: `task ${args.id} is not yours` };
409
+ }
410
+ const status = args.status;
411
+ const now = Date.now();
412
+ const patch = { status };
413
+ if (args.result_summary !== undefined) {
414
+ patch.resultSummary = args.result_summary;
415
+ }
416
+ // Handy timestamp accounting so the UI doesn't have to guess.
417
+ if (status === "in_progress" && !before.startedAt)
418
+ patch.startedAt = now;
419
+ if (status === "done") {
420
+ patch.endedAt = now;
421
+ }
422
+ if (status === "ready") {
423
+ patch.startedAt = null;
424
+ patch.endedAt = null;
425
+ patch.resultSummary = null;
426
+ // Manual re-queue clears the failure trail too — the user
427
+ // is saying "this is fixed, try again".
428
+ patch.failureReason = null;
429
+ patch.attempts = 0;
430
+ // Drop the post-008 intervention labels so the pool's
431
+ // claim filter (POOL_SKIP_LABELS) lets the task through.
432
+ // Without this, task_move-back-to-ready leaves the row
433
+ // in a zombie state: status=ready (visible in the queue
434
+ // column) but skipped by every drain pass.
435
+ patch.labels = before.labels.filter((l) => l !== INTERVENTION_LABEL && l !== "stalled");
436
+ patch.interventionReason = null;
437
+ patch.interventionAt = null;
438
+ }
439
+ const after = updateTask(deps.db, args.id, patch);
440
+ // Re-queueing → kick the pool so the worker drains immediately.
441
+ // Nudge the pool when the move could create new claimable
442
+ // work: putting THIS task back to ready, OR marking it done
443
+ // and thereby unblocking any task that depended on it.
444
+ if (status === "ready" || status === "done")
445
+ deps.onTaskWrite();
446
+ const blocked = after
447
+ ? after.status === "ready" && !isEligible(deps.db, after)
448
+ : false;
449
+ return {
450
+ ok: true,
451
+ text: `Moved task ${args.id}: ${before.status} → ${status}`,
452
+ data: { task: after ? summarise(after, blocked) : null },
453
+ };
454
+ },
455
+ };
456
+ }
457
+ export function buildTaskDeleteTool(deps) {
458
+ return {
459
+ schema: {
460
+ name: "task_delete",
461
+ description: "Remove one or more tasks from the board. Always pass an `ids` array — " +
462
+ "single-task callers should send a 1-element array. Per-row failures " +
463
+ "(unknown id, not yours) do NOT abort the rest of the batch — each " +
464
+ "id reports independently in `results`. The deletion is permanent; " +
465
+ "add the 'stalled' label via task_update if you want to keep an audit " +
466
+ "trail instead.",
467
+ parameters: Type.Object({
468
+ ids: Type.Array(Type.String(), {
469
+ minItems: 1,
470
+ maxItems: 100,
471
+ description: "Task ids to delete, order matches the `results`.",
472
+ }),
473
+ }),
474
+ },
475
+ execute: (raw, ctx) => {
476
+ const args = raw;
477
+ const ids = Array.isArray(args.ids) ? args.ids : [];
478
+ if (ids.length === 0) {
479
+ return { ok: false, text: "ids array must not be empty" };
480
+ }
481
+ const results = ids.map((id) => {
482
+ if (typeof id !== "string" || !id) {
483
+ return {
484
+ ok: false,
485
+ id: String(id ?? ""),
486
+ text: "id is required",
487
+ };
488
+ }
489
+ const before = getTask(deps.db, id);
490
+ if (!before)
491
+ return { ok: false, id, text: `task not found: ${id}` };
492
+ if (before.ownerUserId !== ctx.userId) {
493
+ return { ok: false, id, text: `task ${id} is not yours` };
494
+ }
495
+ deleteTask(deps.db, id);
496
+ // Best-effort sandbox teardown. Errors are logged inside
497
+ // the pool implementation; we don't want a stop / remove
498
+ // glitch to surface as a deleted-task failure.
499
+ try {
500
+ deps.onTaskDelete?.(id);
501
+ }
502
+ catch (err) {
503
+ deps.log.warn("workboard: task sandbox cleanup failed", {
504
+ taskId: id,
505
+ err: err instanceof Error ? err.message : String(err),
506
+ });
507
+ }
508
+ return { ok: true, id };
509
+ });
510
+ const okCount = results.filter((r) => r.ok).length;
511
+ if (okCount > 0)
512
+ deps.onTaskWrite();
513
+ const failCount = results.length - okCount;
514
+ const summary = failCount === 0
515
+ ? `Deleted ${okCount} task${okCount === 1 ? "" : "s"}.`
516
+ : `Deleted ${okCount}/${results.length} task${results.length === 1 ? "" : "s"}; ${failCount} failed.`;
517
+ return {
518
+ ok: okCount > 0,
519
+ text: summary,
520
+ data: { results },
521
+ };
522
+ },
523
+ };
524
+ }
525
+ /**
526
+ * Read a task's worker execution transcript.
527
+ *
528
+ * The chat-side orchestrator calls this when the user asks "why
529
+ * did T4 fail?" — the orchestrator gets the full assistant /
530
+ * tool-call / tool-result trail of the worker's most recent run
531
+ * and can reason about it directly. The same data backs the
532
+ * kanban Execution tab; both views go through this code path so
533
+ * the agent can never see anything the user can't.
534
+ *
535
+ * Empty `entries` is the normal response for a task that has
536
+ * never been claimed (`tasks.session_id IS NULL`).
537
+ */
538
+ export function buildTaskGetHistoryTool(deps) {
539
+ return {
540
+ schema: {
541
+ name: "task_get_history",
542
+ description: "Fetch the worker's execution transcript for a task you own. " +
543
+ "Returns the chronological list of assistant / tool-call / " +
544
+ "tool-result rows from the worker's most recent run, plus " +
545
+ "attempts and failure_reason. Use this when the user wants " +
546
+ "to know why a task stalled or what the worker actually did.",
547
+ parameters: Type.Object({
548
+ id: Type.String({ description: "Task id." }),
549
+ }),
550
+ },
551
+ execute: (raw, ctx) => {
552
+ const args = raw;
553
+ if (!args.id)
554
+ return { ok: false, text: "id is required" };
555
+ const task = getTask(deps.db, args.id);
556
+ if (!task)
557
+ return { ok: false, text: `task not found: ${args.id}` };
558
+ if (task.ownerUserId !== ctx.userId) {
559
+ return { ok: false, text: `task ${args.id} is not yours` };
560
+ }
561
+ const sessionId = task.sessionId;
562
+ if (!sessionId) {
563
+ return {
564
+ ok: true,
565
+ text: `Task ${args.id} has no execution history yet (never claimed by a worker).`,
566
+ data: {
567
+ taskId: task.id,
568
+ sessionId: null,
569
+ attempts: task.attempts,
570
+ failureReason: task.failureReason,
571
+ entries: [],
572
+ },
573
+ };
574
+ }
575
+ const entries = readSessionHistory(deps.db, sessionId);
576
+ return {
577
+ ok: true,
578
+ text: `Found ${entries.length} entries from the worker session for task ${args.id}.`,
579
+ data: {
580
+ taskId: task.id,
581
+ sessionId,
582
+ attempts: task.attempts,
583
+ failureReason: task.failureReason,
584
+ entries,
585
+ },
586
+ };
587
+ },
588
+ };
589
+ }
590
+ // ─── Intervention tools (008+) ─────────────────────────────────────
591
+ //
592
+ // Failed worker runs no longer auto-retry; they park the row in
593
+ // awaiting-intervention and notify the parent (main) agent. The
594
+ // main agent then picks one of these four to resolve:
595
+ //
596
+ // - task_continue resume the same session, optionally with
597
+ // a hint about what changed.
598
+ // - task_retry_fresh discard the prior session and start over,
599
+ // optionally with a revised description.
600
+ // - task_extend_timeout add wall-clock budget. If the worker is
601
+ // still running, the watchdog picks the
602
+ // new value up on its next tick. If the
603
+ // row is parked in intervention because of
604
+ // a timeout, this also revives it.
605
+ // - task_abort give up: mark the task done with a
606
+ // failure summary so downstream deps stop
607
+ // waiting.
608
+ /**
609
+ * Validate task ownership + presence; return `{ task, error }`
610
+ * union so callers can write a flat error path.
611
+ */
612
+ function loadOwnedTask(deps, ctx, id) {
613
+ if (!id) {
614
+ return { error: { ok: false, text: "task_id is required" } };
615
+ }
616
+ const task = getTask(deps.db, id);
617
+ if (!task) {
618
+ return { error: { ok: false, text: `task not found: ${id}` } };
619
+ }
620
+ if (task.ownerUserId !== ctx.userId) {
621
+ return { error: { ok: false, text: `task ${id} is not yours` } };
622
+ }
623
+ return { task };
624
+ }
625
+ export function buildTaskContinueTool(deps) {
626
+ return {
627
+ schema: {
628
+ name: "task_continue",
629
+ description: "Revive an awaiting-intervention task by resuming its prior " +
630
+ "worker session. The worker reuses its existing context (no " +
631
+ "re-paste of the brief), with an optional `hint` from you " +
632
+ "the orchestrator about what changed or what to try next " +
633
+ "(e.g. 'use the skeleton-then-fill pattern; previous attempt " +
634
+ "hit an output cap'). Use this when the prior transcript is " +
635
+ "useful and the task description is still right. For a hard " +
636
+ "reset use `task_retry_fresh`.",
637
+ parameters: Type.Object({
638
+ task_id: Type.String(),
639
+ hint: Type.Optional(Type.String({
640
+ description: "One- or two-paragraph nudge surfaced to the worker on resume. " +
641
+ "Optional but strongly recommended — a bare retry usually " +
642
+ "reproduces the same failure.",
643
+ })),
644
+ }),
645
+ },
646
+ execute: (raw, ctx) => {
647
+ const args = raw;
648
+ const found = loadOwnedTask(deps, ctx, args.task_id);
649
+ if (found.error)
650
+ return found.error;
651
+ const task = found.task;
652
+ if (!task.sessionId) {
653
+ return {
654
+ ok: false,
655
+ text: `Task ${task.id} has no prior session to resume. ` +
656
+ `Use task_retry_fresh instead.`,
657
+ };
658
+ }
659
+ const hint = typeof args.hint === "string" ? args.hint.trim() : "";
660
+ const nextDescription = hint
661
+ ? appendContinuationHint(task.description, hint)
662
+ : stripContinuationHint(task.description ?? "");
663
+ const cleanedLabels = task.labels.filter((l) => l !== INTERVENTION_LABEL && l !== "stalled");
664
+ updateTask(deps.db, task.id, {
665
+ labels: cleanedLabels,
666
+ description: nextDescription || null,
667
+ // Don't clear sessionId — LLMWorker.run keys off it +
668
+ // attempts>0 to pick up the prior transcript.
669
+ startedAt: null,
670
+ endedAt: null,
671
+ interventionReason: null,
672
+ interventionAt: null,
673
+ });
674
+ deps.onTaskWrite();
675
+ return {
676
+ ok: true,
677
+ text: `Resuming task ${task.id} on session ${task.sessionId}` +
678
+ (hint ? ` with hint: ${hint.slice(0, 120)}` : "") +
679
+ ".",
680
+ };
681
+ },
682
+ };
683
+ }
684
+ export function buildTaskRetryFreshTool(deps) {
685
+ return {
686
+ schema: {
687
+ name: "task_retry_fresh",
688
+ description: "Revive an awaiting-intervention task by starting a brand new " +
689
+ "worker session (the prior transcript is left in place but " +
690
+ "unused). Pass an optional `description` to rewrite the brief " +
691
+ "— useful when the original prompt itself was the problem. " +
692
+ "For resume-with-context use `task_continue` instead.",
693
+ parameters: Type.Object({
694
+ task_id: Type.String(),
695
+ description: Type.Optional(Type.String({
696
+ description: "Replace the task description. Omit to keep the existing one. " +
697
+ "Continuation hints from prior attempts are stripped — a " +
698
+ "fresh retry shouldn't carry resume notes.",
699
+ })),
700
+ }),
701
+ },
702
+ execute: (raw, ctx) => {
703
+ const args = raw;
704
+ const found = loadOwnedTask(deps, ctx, args.task_id);
705
+ if (found.error)
706
+ return found.error;
707
+ const task = found.task;
708
+ const cleanedLabels = task.labels.filter((l) => l !== INTERVENTION_LABEL && l !== "stalled");
709
+ // Detach the prior session so LLMWorker.run takes the
710
+ // fresh-start branch (`shouldResume` false).
711
+ const patch = {
712
+ labels: cleanedLabels,
713
+ sessionId: null,
714
+ attempts: 0,
715
+ failureReason: null,
716
+ startedAt: null,
717
+ endedAt: null,
718
+ interventionReason: null,
719
+ interventionAt: null,
720
+ };
721
+ if (typeof args.description === "string") {
722
+ patch.description = args.description.trim() || null;
723
+ }
724
+ else {
725
+ // Even when not rewriting, drop any continuation-hint
726
+ // block left over from previous task_continue calls.
727
+ patch.description = stripContinuationHint(task.description ?? "") || null;
728
+ }
729
+ updateTask(deps.db, task.id, patch);
730
+ deps.onTaskWrite();
731
+ return {
732
+ ok: true,
733
+ text: `Reset task ${task.id} for a fresh worker session` +
734
+ (typeof args.description === "string" ? " with revised description" : "") +
735
+ ".",
736
+ };
737
+ },
738
+ };
739
+ }
740
+ export function buildTaskExtendTimeoutTool(deps) {
741
+ return {
742
+ schema: {
743
+ name: "task_extend_timeout",
744
+ description: "Grow a task's wall-clock budget. Pass `additional_ms` to add to " +
745
+ "the existing timeout, or `set_ms` to override absolutely. If " +
746
+ "the task is currently in_progress the watchdog picks the new " +
747
+ "value up on its next tick (no restart needed). If it's parked " +
748
+ "in awaiting-intervention specifically because of a watchdog " +
749
+ "timeout, this tool ALSO revives the row — you don't have to " +
750
+ "chain a separate task_continue.",
751
+ parameters: Type.Object({
752
+ task_id: Type.String(),
753
+ additional_ms: Type.Optional(Type.Number({
754
+ description: "Milliseconds to add to the current timeout_ms. Either this " +
755
+ "or `set_ms` must be present.",
756
+ })),
757
+ set_ms: Type.Optional(Type.Number({
758
+ description: "Absolute new timeout_ms. Overrides additional_ms when both " +
759
+ "are passed.",
760
+ })),
761
+ }),
762
+ },
763
+ execute: (raw, ctx) => {
764
+ const args = raw;
765
+ const found = loadOwnedTask(deps, ctx, args.task_id);
766
+ if (found.error)
767
+ return found.error;
768
+ const task = found.task;
769
+ let nextTimeout;
770
+ if (typeof args.set_ms === "number" && Number.isFinite(args.set_ms)) {
771
+ nextTimeout = Math.max(1000, Math.floor(args.set_ms));
772
+ }
773
+ else if (typeof args.additional_ms === "number" &&
774
+ Number.isFinite(args.additional_ms)) {
775
+ nextTimeout = Math.max(1000, Math.floor((task.timeoutMs ?? DEFAULT_TASK_TIMEOUT_MS) + args.additional_ms));
776
+ }
777
+ else {
778
+ return {
779
+ ok: false,
780
+ text: "pass either `additional_ms` or `set_ms`",
781
+ };
782
+ }
783
+ const patch = {
784
+ timeoutMs: nextTimeout,
785
+ };
786
+ // If the row is currently parked because of a timeout,
787
+ // revive it the same way task_continue would. We detect a
788
+ // timeout-parked row by the canonical reason prefix the
789
+ // watchdog writes.
790
+ const wasTimeoutParked = task.labels.includes(INTERVENTION_LABEL) &&
791
+ (task.interventionReason ?? "").startsWith("watchdog timeout");
792
+ if (wasTimeoutParked) {
793
+ patch.labels = task.labels.filter((l) => l !== INTERVENTION_LABEL && l !== "stalled");
794
+ patch.startedAt = null;
795
+ patch.endedAt = null;
796
+ patch.interventionReason = null;
797
+ patch.interventionAt = null;
798
+ }
799
+ updateTask(deps.db, task.id, patch);
800
+ if (wasTimeoutParked)
801
+ deps.onTaskWrite();
802
+ const summary = wasTimeoutParked
803
+ ? `Extended task ${task.id} timeout to ${nextTimeout}ms and resumed it.`
804
+ : `Extended task ${task.id} timeout to ${nextTimeout}ms.`;
805
+ return { ok: true, text: summary };
806
+ },
807
+ };
808
+ }
809
+ export function buildTaskAbortTool(deps) {
810
+ return {
811
+ schema: {
812
+ name: "task_abort",
813
+ description: "Give up on a task. Marks it `done` with a failure summary so " +
814
+ "any downstream dependents stop waiting, and cancels the " +
815
+ "in-flight worker run if one is still going. Use when retry / " +
816
+ "continue won't help (bad spec, blocked by missing data, " +
817
+ "infrastructure broken).",
818
+ parameters: Type.Object({
819
+ task_id: Type.String(),
820
+ reason: Type.String({
821
+ description: "One- or two-sentence explanation. Stored as the task's " +
822
+ "result_summary so the user / downstream tasks see why.",
823
+ }),
824
+ }),
825
+ },
826
+ execute: (raw, ctx) => {
827
+ const args = raw;
828
+ const found = loadOwnedTask(deps, ctx, args.task_id);
829
+ if (found.error)
830
+ return found.error;
831
+ const task = found.task;
832
+ const reason = (args.reason ?? "").trim();
833
+ if (!reason) {
834
+ return { ok: false, text: "reason is required" };
835
+ }
836
+ // Cancel any live runner first so it doesn't keep eating
837
+ // tokens past abort.
838
+ const cancelled = deps.onTaskCancel?.(task.id) ?? false;
839
+ const cleanedLabels = task.labels.filter((l) => l !== INTERVENTION_LABEL && l !== "stalled");
840
+ updateTask(deps.db, task.id, {
841
+ status: "done",
842
+ labels: cleanedLabels,
843
+ resultSummary: `[aborted] ${reason}`.slice(0, 800),
844
+ endedAt: Date.now(),
845
+ interventionReason: null,
846
+ interventionAt: null,
847
+ });
848
+ // Done unblocks dependents — nudge.
849
+ deps.onTaskWrite();
850
+ return {
851
+ ok: true,
852
+ text: `Aborted task ${task.id}: ${reason}` +
853
+ (cancelled ? " (cancelled in-flight worker)" : "") +
854
+ ".",
855
+ };
856
+ },
857
+ };
858
+ }
859
+ /**
860
+ * Special agent tool the LLM worker calls to wrap up the task it
861
+ * was assigned. The agent-loop's wrapper picks the structured
862
+ * `summary` / `files` fields off the return value and resolves the
863
+ * loop with `status=done`. Calling this tool is the *only* way for
864
+ * an LLM worker to mark its task complete — walking off without it
865
+ * leaves the loop stalled.
866
+ *
867
+ * The tool intentionally has no side-effect on the workboard's
868
+ * tasks table itself — the LLMWorker class writes the row using
869
+ * the captured summary/files, keeping the agent ignorant of the
870
+ * caller's task id. (An LLM that didn't know the task id couldn't
871
+ * forge a completion for someone else's task.)
872
+ */
873
+ /**
874
+ * Read the host's LLM model catalog. Designed for the main
875
+ * (orchestrator) agent so it can pick a `modelId` for new
876
+ * worker bundles instead of guessing or asking the user. Workers
877
+ * can't see this tool (deny-listed in tool-policy.ts).
878
+ */
879
+ export function buildModelListTool() {
880
+ return {
881
+ schema: {
882
+ name: "model_list",
883
+ description: "List the LLM models the host can use for worker bundles. " +
884
+ "Returns id (e.g. `anthropic/claude-sonnet-4-6`), provider, " +
885
+ "context window, reasoning flag, plus the host's default model. " +
886
+ "Use this when authoring `agent.json` so `modelId` points at a " +
887
+ "real entry rather than a guess.",
888
+ parameters: Type.Object({}),
889
+ },
890
+ available: (ctx) => ctx.capabilities.has("host.modelCatalog") && ctx.agentScope?.kind === "main",
891
+ execute: (_raw, ctx) => {
892
+ const cap = ctx.capabilities.get("host.modelCatalog");
893
+ if (!cap) {
894
+ return {
895
+ ok: false,
896
+ text: "host.modelCatalog capability not available on this host",
897
+ };
898
+ }
899
+ const { models, defaultModelId } = cap.list();
900
+ if (models.length === 0) {
901
+ return {
902
+ ok: true,
903
+ text: "No models registered. Host config has no `models.providers` " +
904
+ "entries; ask the user to add a provider before pinning a worker.",
905
+ data: { models: [], defaultModelId: null },
906
+ };
907
+ }
908
+ // One-line summary plus a structured payload so the agent
909
+ // can pick a model without re-parsing the text.
910
+ const lines = models.map((m) => {
911
+ const tag = m.id === defaultModelId ? " (default)" : "";
912
+ const reason = m.reasoning ? " reasoning" : "";
913
+ return `- ${m.id}${tag} — ${m.name} [${m.provider}, ctx=${m.contextWindow}${reason}]`;
914
+ });
915
+ return {
916
+ ok: true,
917
+ text: `Host offers ${models.length} model${models.length === 1 ? "" : "s"}` +
918
+ (defaultModelId ? ` (default: ${defaultModelId})` : "") +
919
+ `:\n${lines.join("\n")}`,
920
+ data: { models, defaultModelId },
921
+ };
922
+ },
923
+ };
924
+ }
925
+ export function buildTaskCompleteTool() {
926
+ return {
927
+ schema: {
928
+ name: "task_complete",
929
+ description: "Call this when you have finished the task you were assigned. " +
930
+ "Pass a one-line `summary` of what you produced and an optional " +
931
+ "list of `files` you wrote (paths under your home dir). After this " +
932
+ "call, the worker terminates and the orchestrator reads your summary.",
933
+ parameters: Type.Object({
934
+ summary: Type.String({
935
+ description: "One-line summary of the result. Required.",
936
+ }),
937
+ files: Type.Optional(Type.Array(Type.String(), {
938
+ description: "Optional list of output file paths the worker produced.",
939
+ })),
940
+ }),
941
+ },
942
+ execute: (raw) => {
943
+ const args = raw;
944
+ const summary = typeof args.summary === "string" ? args.summary.trim() : "";
945
+ if (!summary) {
946
+ return { ok: false, text: "summary is required" };
947
+ }
948
+ const files = Array.isArray(args.files)
949
+ ? args.files.filter((f) => typeof f === "string")
950
+ : [];
951
+ // The agent-loop wrapper picks up the canonical summary/files
952
+ // off the *arguments* the agent passed (see
953
+ // `wrappedExecutors[task_complete]` in chat/agent-loop.ts), so
954
+ // we don't need to thread them through the return shape.
955
+ return {
956
+ ok: true,
957
+ text: "Task marked complete. The worker will exit.",
958
+ data: { summary, files },
959
+ };
960
+ },
961
+ };
962
+ }
963
+ //# sourceMappingURL=index.js.map