sparkecoder 0.1.21 → 0.1.23

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 (292) hide show
  1. package/dist/agent/index.d.ts +3 -3
  2. package/dist/agent/index.js +1361 -215
  3. package/dist/agent/index.js.map +1 -1
  4. package/dist/cli.js +2179 -349
  5. package/dist/cli.js.map +1 -1
  6. package/dist/db/index.d.ts +20 -2
  7. package/dist/db/index.js +97 -0
  8. package/dist/db/index.js.map +1 -1
  9. package/dist/{index-BzedNBK-.d.ts → index-BblbmG_0.d.ts} +42 -6
  10. package/dist/index.d.ts +6 -6
  11. package/dist/index.js +2165 -335
  12. package/dist/index.js.map +1 -1
  13. package/dist/{schema-CkrIadxa.d.ts → schema-D_8A4k01.d.ts} +270 -3
  14. package/dist/search-ybREg7F_.d.ts +254 -0
  15. package/dist/server/index.js +2163 -333
  16. package/dist/server/index.js.map +1 -1
  17. package/dist/tools/index.d.ts +7 -56
  18. package/dist/tools/index.js +894 -27
  19. package/dist/tools/index.js.map +1 -1
  20. package/package.json +5 -1
  21. package/web/.next/BUILD_ID +1 -1
  22. package/web/.next/standalone/web/.next/BUILD_ID +1 -1
  23. package/web/.next/standalone/web/.next/app-path-routes-manifest.json +4 -0
  24. package/web/.next/standalone/web/.next/build-manifest.json +7 -6
  25. package/web/.next/standalone/web/.next/prerender-manifest.json +99 -3
  26. package/web/.next/standalone/web/.next/required-server-files.json +28 -4
  27. package/web/.next/standalone/web/.next/routes-manifest.json +24 -0
  28. package/web/.next/standalone/web/.next/server/app/(main)/page/build-manifest.json +5 -4
  29. package/web/.next/standalone/web/.next/server/app/(main)/page.js +2 -2
  30. package/web/.next/standalone/web/.next/server/app/(main)/page.js.nft.json +1 -1
  31. package/web/.next/standalone/web/.next/server/app/(main)/page_client-reference-manifest.js +1 -1
  32. package/web/.next/standalone/web/.next/server/app/(main)/session/[id]/page/build-manifest.json +5 -4
  33. package/web/.next/standalone/web/.next/server/app/(main)/session/[id]/page.js +2 -2
  34. package/web/.next/standalone/web/.next/server/app/(main)/session/[id]/page.js.nft.json +1 -1
  35. package/web/.next/standalone/web/.next/server/app/(main)/session/[id]/page_client-reference-manifest.js +1 -1
  36. package/web/.next/standalone/web/.next/server/app/_global-error/page/build-manifest.json +5 -4
  37. package/web/.next/standalone/web/.next/server/app/_global-error/page.js +2 -2
  38. package/web/.next/standalone/web/.next/server/app/_global-error/page.js.nft.json +1 -1
  39. package/web/.next/standalone/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  40. package/web/.next/standalone/web/.next/server/app/_global-error.html +2 -2
  41. package/web/.next/standalone/web/.next/server/app/_global-error.rsc +1 -1
  42. package/web/.next/standalone/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  43. package/web/.next/standalone/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  44. package/web/.next/standalone/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  45. package/web/.next/standalone/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  46. package/web/.next/standalone/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  47. package/web/.next/standalone/web/.next/server/app/_not-found/page/build-manifest.json +5 -4
  48. package/web/.next/standalone/web/.next/server/app/_not-found/page.js +2 -2
  49. package/web/.next/standalone/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  50. package/web/.next/standalone/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  51. package/web/.next/standalone/web/.next/server/app/_not-found.html +1 -1
  52. package/web/.next/standalone/web/.next/server/app/_not-found.rsc +2 -2
  53. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  54. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  55. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  56. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  57. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  58. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  59. package/web/.next/standalone/web/.next/server/app/api/config/route.js.nft.json +1 -1
  60. package/web/.next/standalone/web/.next/server/app/api/health/route.js.nft.json +1 -1
  61. package/web/.next/standalone/web/.next/server/app/docs/installation/page/app-paths-manifest.json +3 -0
  62. package/web/.next/standalone/web/.next/server/app/docs/installation/page/build-manifest.json +18 -0
  63. package/web/.next/standalone/web/.next/server/app/docs/installation/page/next-font-manifest.json +11 -0
  64. package/web/.next/standalone/web/.next/server/app/docs/installation/page/react-loadable-manifest.json +1 -0
  65. package/web/.next/standalone/web/.next/server/app/docs/installation/page/server-reference-manifest.json +4 -0
  66. package/web/.next/standalone/web/.next/server/app/docs/installation/page.js +21 -0
  67. package/web/.next/standalone/web/.next/server/app/docs/installation/page.js.map +5 -0
  68. package/web/.next/standalone/web/.next/server/app/docs/installation/page.js.nft.json +1 -0
  69. package/web/.next/standalone/web/.next/server/app/docs/installation/page_client-reference-manifest.js +2 -0
  70. package/web/.next/standalone/web/.next/server/app/docs/installation.html +86 -0
  71. package/web/.next/standalone/web/.next/server/app/docs/installation.meta +16 -0
  72. package/web/.next/standalone/web/.next/server/app/docs/installation.rsc +36 -0
  73. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_full.segment.rsc +36 -0
  74. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_head.segment.rsc +6 -0
  75. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_index.segment.rsc +7 -0
  76. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_tree.segment.rsc +3 -0
  77. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/docs/installation/__PAGE__.segment.rsc +22 -0
  78. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/docs/installation.segment.rsc +4 -0
  79. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/docs.segment.rsc +5 -0
  80. package/web/.next/standalone/web/.next/server/app/docs/page/app-paths-manifest.json +3 -0
  81. package/web/.next/standalone/web/.next/server/app/docs/page/build-manifest.json +18 -0
  82. package/web/.next/standalone/web/.next/server/app/docs/page/next-font-manifest.json +11 -0
  83. package/web/.next/standalone/web/.next/server/app/docs/page/react-loadable-manifest.json +1 -0
  84. package/web/.next/standalone/web/.next/server/app/docs/page/server-reference-manifest.json +4 -0
  85. package/web/.next/standalone/web/.next/server/app/docs/page.js +21 -0
  86. package/web/.next/standalone/web/.next/server/app/docs/page.js.map +5 -0
  87. package/web/.next/standalone/web/.next/server/app/docs/page.js.nft.json +1 -0
  88. package/web/.next/standalone/web/.next/server/app/docs/page_client-reference-manifest.js +2 -0
  89. package/web/.next/standalone/web/.next/server/app/docs/skills/page/app-paths-manifest.json +3 -0
  90. package/web/.next/standalone/web/.next/server/app/docs/skills/page/build-manifest.json +18 -0
  91. package/web/.next/standalone/web/.next/server/app/docs/skills/page/next-font-manifest.json +11 -0
  92. package/web/.next/standalone/web/.next/server/app/docs/skills/page/react-loadable-manifest.json +1 -0
  93. package/web/.next/standalone/web/.next/server/app/docs/skills/page/server-reference-manifest.json +4 -0
  94. package/web/.next/standalone/web/.next/server/app/docs/skills/page.js +21 -0
  95. package/web/.next/standalone/web/.next/server/app/docs/skills/page.js.map +5 -0
  96. package/web/.next/standalone/web/.next/server/app/docs/skills/page.js.nft.json +1 -0
  97. package/web/.next/standalone/web/.next/server/app/docs/skills/page_client-reference-manifest.js +2 -0
  98. package/web/.next/standalone/web/.next/server/app/docs/skills.html +268 -0
  99. package/web/.next/standalone/web/.next/server/app/docs/skills.meta +16 -0
  100. package/web/.next/standalone/web/.next/server/app/docs/skills.rsc +82 -0
  101. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_full.segment.rsc +82 -0
  102. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_head.segment.rsc +6 -0
  103. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_index.segment.rsc +7 -0
  104. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_tree.segment.rsc +3 -0
  105. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/docs/skills/__PAGE__.segment.rsc +66 -0
  106. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/docs/skills.segment.rsc +4 -0
  107. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/docs.segment.rsc +5 -0
  108. package/web/.next/standalone/web/.next/server/app/docs/tools/page/app-paths-manifest.json +3 -0
  109. package/web/.next/standalone/web/.next/server/app/docs/tools/page/build-manifest.json +18 -0
  110. package/web/.next/standalone/web/.next/server/app/docs/tools/page/next-font-manifest.json +11 -0
  111. package/web/.next/standalone/web/.next/server/app/docs/tools/page/react-loadable-manifest.json +1 -0
  112. package/web/.next/standalone/web/.next/server/app/docs/tools/page/server-reference-manifest.json +4 -0
  113. package/web/.next/standalone/web/.next/server/app/docs/tools/page.js +21 -0
  114. package/web/.next/standalone/web/.next/server/app/docs/tools/page.js.map +5 -0
  115. package/web/.next/standalone/web/.next/server/app/docs/tools/page.js.nft.json +1 -0
  116. package/web/.next/standalone/web/.next/server/app/docs/tools/page_client-reference-manifest.js +2 -0
  117. package/web/.next/standalone/web/.next/server/app/docs/tools.html +242 -0
  118. package/web/.next/standalone/web/.next/server/app/docs/tools.meta +16 -0
  119. package/web/.next/standalone/web/.next/server/app/docs/tools.rsc +87 -0
  120. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_full.segment.rsc +87 -0
  121. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_head.segment.rsc +6 -0
  122. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_index.segment.rsc +7 -0
  123. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_tree.segment.rsc +3 -0
  124. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/docs/tools/__PAGE__.segment.rsc +72 -0
  125. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/docs/tools.segment.rsc +4 -0
  126. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/docs.segment.rsc +5 -0
  127. package/web/.next/standalone/web/.next/server/app/docs.html +74 -0
  128. package/web/.next/standalone/web/.next/server/app/docs.meta +15 -0
  129. package/web/.next/standalone/web/.next/server/app/docs.rsc +34 -0
  130. package/web/.next/standalone/web/.next/server/app/docs.segments/_full.segment.rsc +34 -0
  131. package/web/.next/standalone/web/.next/server/app/docs.segments/_head.segment.rsc +6 -0
  132. package/web/.next/standalone/web/.next/server/app/docs.segments/_index.segment.rsc +7 -0
  133. package/web/.next/standalone/web/.next/server/app/docs.segments/_tree.segment.rsc +3 -0
  134. package/web/.next/standalone/web/.next/server/app/docs.segments/docs/__PAGE__.segment.rsc +20 -0
  135. package/web/.next/standalone/web/.next/server/app/docs.segments/docs.segment.rsc +5 -0
  136. package/web/.next/standalone/web/.next/server/app/index.html +1 -1
  137. package/web/.next/standalone/web/.next/server/app/index.rsc +4 -4
  138. package/web/.next/standalone/web/.next/server/app/index.segments/!KG1haW4p/__PAGE__.segment.rsc +2 -2
  139. package/web/.next/standalone/web/.next/server/app/index.segments/!KG1haW4p.segment.rsc +2 -2
  140. package/web/.next/standalone/web/.next/server/app/index.segments/_full.segment.rsc +4 -4
  141. package/web/.next/standalone/web/.next/server/app/index.segments/_head.segment.rsc +1 -1
  142. package/web/.next/standalone/web/.next/server/app/index.segments/_index.segment.rsc +2 -2
  143. package/web/.next/standalone/web/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  144. package/web/.next/standalone/web/.next/server/app-paths-manifest.json +4 -0
  145. package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_378282b1._.js → 2374f_244589df._.js} +1 -1
  146. package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_5de336d2._.js → 2374f_41a27541._.js} +1 -1
  147. package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_30f9df13._.js → 2374f_47c9e2d5._.js} +1 -1
  148. package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_d94c2b70._.js → 2374f_4bf2df9d._.js} +1 -1
  149. package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_663d1038._.js +3 -0
  150. package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_954e49c0._.js +3 -0
  151. package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_1d78db71._.js → 2374f_c33b095a._.js} +1 -1
  152. package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_bbc99511._.js → 2374f_fa61fbb2._.js} +1 -1
  153. package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_8825dcc9._.js → 2374f_fb82ac0d._.js} +1 -1
  154. package/web/.next/standalone/web/.next/server/chunks/ssr/{web_96bca05b._.js → 2374f_next_dist_bbe64674._.js} +2 -2
  155. package/web/.next/standalone/web/.next/server/chunks/ssr/{[root-of-the-server]__7f04455b._.js → [root-of-the-server]__1e06ddf7._.js} +2 -2
  156. package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__2b151e1c._.js +3 -0
  157. package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__2dbf511a._.js +9 -0
  158. package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__397fadd4._.js +3 -0
  159. package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__44bd8bd1._.js +3 -0
  160. package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__70cecda8._.js +3 -0
  161. package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__9fdf9974._.js +3 -0
  162. package/web/.next/standalone/web/.next/server/chunks/ssr/{[root-of-the-server]__f18f92f4._.js → [root-of-the-server]__b050bb8f._.js} +2 -2
  163. package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__d3034cd2._.js +3 -0
  164. package/web/.next/standalone/web/.next/server/chunks/ssr/{[root-of-the-server]__c3a1e22c._.js → [root-of-the-server]__ef2713cf._.js} +2 -2
  165. package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__f764bebe._.js +3 -0
  166. package/web/.next/standalone/web/.next/server/chunks/ssr/web_046bf7db._.js +3 -0
  167. package/web/.next/standalone/web/.next/server/chunks/ssr/web_656c1e45._.js +7 -0
  168. package/web/.next/standalone/web/.next/server/chunks/ssr/web_76ccf09f._.js +8 -0
  169. package/web/.next/standalone/web/.next/server/chunks/ssr/web__next-internal_server_app_docs_installation_page_actions_52cc0648.js +3 -0
  170. package/web/.next/standalone/web/.next/server/chunks/ssr/web__next-internal_server_app_docs_page_actions_4fe77da8.js +3 -0
  171. package/web/.next/standalone/web/.next/server/chunks/ssr/web__next-internal_server_app_docs_skills_page_actions_251df2e1.js +3 -0
  172. package/web/.next/standalone/web/.next/server/chunks/ssr/web__next-internal_server_app_docs_tools_page_actions_3e6382b0.js +3 -0
  173. package/web/.next/standalone/web/.next/server/chunks/ssr/web_a565dc94._.js +4 -0
  174. package/web/.next/standalone/web/.next/server/chunks/ssr/web_b1cce0b7._.js +4 -0
  175. package/web/.next/standalone/web/.next/server/chunks/ssr/web_b42ed1be._.js +3 -0
  176. package/web/.next/standalone/web/.next/server/chunks/ssr/web_c0c2bee4._.js +4 -0
  177. package/web/.next/standalone/web/.next/server/chunks/ssr/web_eea9c122._.js +3 -0
  178. package/web/.next/standalone/web/.next/server/chunks/ssr/web_ff00a5c3._.js +4 -0
  179. package/web/.next/standalone/web/.next/server/chunks/ssr/web_src_app_(main)_layout_tsx_453f6492._.js +3 -0
  180. package/web/.next/standalone/web/.next/server/chunks/ssr/web_src_app_(main)_page_tsx_5ac4794b._.js +3 -0
  181. package/web/.next/standalone/web/.next/server/middleware-build-manifest.js +5 -4
  182. package/web/.next/standalone/web/.next/server/next-font-manifest.js +1 -1
  183. package/web/.next/standalone/web/.next/server/next-font-manifest.json +16 -0
  184. package/web/.next/standalone/web/.next/server/pages/404.html +1 -1
  185. package/web/.next/standalone/web/.next/server/pages/500.html +2 -2
  186. package/web/.next/standalone/web/.next/server/server-reference-manifest.js +1 -1
  187. package/web/.next/standalone/web/.next/server/server-reference-manifest.json +1 -1
  188. package/web/.next/standalone/web/.next/static/chunks/0cc382a66266188e.js +7 -0
  189. package/web/.next/standalone/web/.next/static/chunks/0fda34e553582102.js +1 -0
  190. package/web/.next/standalone/web/.next/static/{static/chunks/5ec82ce8f3aabaf0.js → chunks/6407c045dfc908fe.js} +3 -3
  191. package/web/.next/standalone/web/.next/static/chunks/651e187cc15d66de.js +1 -0
  192. package/web/.next/standalone/web/.next/static/chunks/862ced58ce21a270.js +4 -0
  193. package/web/.next/standalone/web/.next/static/chunks/89bc21c0443670f4.js +1 -0
  194. package/web/.next/standalone/web/.next/static/chunks/8f4edf22ededc29b.js +7 -0
  195. package/web/.next/standalone/web/.next/static/chunks/ad6b9dbb257d62cc.js +1 -0
  196. package/web/.next/standalone/web/.next/static/chunks/af22745850132107.css +1 -0
  197. package/web/.next/standalone/web/.next/static/chunks/b9ad1584d4e11d12.js +1 -0
  198. package/web/.next/standalone/web/.next/static/chunks/db9b22c844a35e20.js +5 -0
  199. package/web/.next/standalone/web/.next/static/chunks/turbopack-597558bb7b6982f6.js +4 -0
  200. package/web/.next/standalone/web/.next/static/static/chunks/0cc382a66266188e.js +7 -0
  201. package/web/.next/standalone/web/.next/static/static/chunks/0fda34e553582102.js +1 -0
  202. package/web/.next/{static/chunks/5ec82ce8f3aabaf0.js → standalone/web/.next/static/static/chunks/6407c045dfc908fe.js} +3 -3
  203. package/web/.next/standalone/web/.next/static/static/chunks/651e187cc15d66de.js +1 -0
  204. package/web/.next/standalone/web/.next/static/static/chunks/862ced58ce21a270.js +4 -0
  205. package/web/.next/standalone/web/.next/static/static/chunks/89bc21c0443670f4.js +1 -0
  206. package/web/.next/standalone/web/.next/static/static/chunks/8f4edf22ededc29b.js +7 -0
  207. package/web/.next/standalone/web/.next/static/static/chunks/ad6b9dbb257d62cc.js +1 -0
  208. package/web/.next/standalone/web/.next/static/static/chunks/af22745850132107.css +1 -0
  209. package/web/.next/standalone/web/.next/static/static/chunks/b9ad1584d4e11d12.js +1 -0
  210. package/web/.next/standalone/web/.next/static/static/chunks/db9b22c844a35e20.js +5 -0
  211. package/web/.next/standalone/web/.next/static/static/chunks/turbopack-597558bb7b6982f6.js +4 -0
  212. package/web/.next/standalone/web/mdx-components.tsx +119 -0
  213. package/web/.next/standalone/web/next.config.ts +15 -1
  214. package/web/.next/standalone/web/package-lock.json +559 -4
  215. package/web/.next/standalone/web/package.json +4 -0
  216. package/web/.next/standalone/web/runtime-config.json +1 -1
  217. package/web/.next/standalone/web/server.js +1 -1
  218. package/web/.next/standalone/web/src/app/(main)/page.tsx +127 -5
  219. package/web/.next/standalone/web/src/app/docs/installation/page.mdx +128 -0
  220. package/web/.next/standalone/web/src/app/docs/layout.tsx +74 -0
  221. package/web/.next/standalone/web/src/app/docs/page.mdx +90 -0
  222. package/web/.next/standalone/web/src/app/docs/skills/page.mdx +334 -0
  223. package/web/.next/standalone/web/src/app/docs/tools/page.mdx +300 -0
  224. package/web/.next/standalone/web/src/components/ai-elements/mention-input.tsx +809 -0
  225. package/web/.next/standalone/web/src/components/ai-elements/search-tool.tsx +400 -0
  226. package/web/.next/standalone/web/src/components/ai-elements/speech-input.tsx +89 -36
  227. package/web/.next/standalone/web/src/components/ai-elements/subagent-modal.tsx +275 -0
  228. package/web/.next/standalone/web/src/components/ai-elements/write-file-tool.tsx +19 -5
  229. package/web/.next/standalone/web/src/components/chat-interface.tsx +820 -50
  230. package/web/.next/standalone/web/src/hooks/use-workspace-files.ts +108 -0
  231. package/web/.next/standalone/web/src/lib/api.ts +223 -6
  232. package/web/.next/static/chunks/0cc382a66266188e.js +7 -0
  233. package/web/.next/static/chunks/0fda34e553582102.js +1 -0
  234. package/web/.next/{standalone/web/.next/static/chunks/5ec82ce8f3aabaf0.js → static/chunks/6407c045dfc908fe.js} +3 -3
  235. package/web/.next/static/chunks/651e187cc15d66de.js +1 -0
  236. package/web/.next/static/chunks/862ced58ce21a270.js +4 -0
  237. package/web/.next/static/chunks/89bc21c0443670f4.js +1 -0
  238. package/web/.next/static/chunks/8f4edf22ededc29b.js +7 -0
  239. package/web/.next/static/chunks/ad6b9dbb257d62cc.js +1 -0
  240. package/web/.next/static/chunks/af22745850132107.css +1 -0
  241. package/web/.next/static/chunks/b9ad1584d4e11d12.js +1 -0
  242. package/web/.next/static/chunks/db9b22c844a35e20.js +5 -0
  243. package/web/.next/static/chunks/turbopack-597558bb7b6982f6.js +4 -0
  244. package/web/package.json +4 -0
  245. package/dist/bash-CGAqW7HR.d.ts +0 -80
  246. package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_9bf3c7f3._.js +0 -3
  247. package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__0f6b5fa7._.js +0 -3
  248. package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__513c6b45._.js +0 -3
  249. package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__a984d933._.js +0 -9
  250. package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__de58a952._.js +0 -3
  251. package/web/.next/standalone/web/.next/server/chunks/ssr/web_19b6934c._.js +0 -8
  252. package/web/.next/standalone/web/.next/server/chunks/ssr/web_d7d3e40d._.js +0 -7
  253. package/web/.next/standalone/web/.next/server/chunks/ssr/web_e6034803._.js +0 -3
  254. package/web/.next/standalone/web/.next/static/chunks/03d4169891280e04.js +0 -7
  255. package/web/.next/standalone/web/.next/static/chunks/2d5da0cfc011b8d9.js +0 -1
  256. package/web/.next/standalone/web/.next/static/chunks/634fd97fab9ed4e4.js +0 -4
  257. package/web/.next/standalone/web/.next/static/chunks/77e4bf0421481629.js +0 -1
  258. package/web/.next/standalone/web/.next/static/chunks/a86053f0894587f2.js +0 -7
  259. package/web/.next/standalone/web/.next/static/chunks/beb9625c4a470042.js +0 -1
  260. package/web/.next/standalone/web/.next/static/chunks/c2244168e74b8c78.js +0 -1
  261. package/web/.next/standalone/web/.next/static/chunks/c81c1aec4369c77f.js +0 -5
  262. package/web/.next/standalone/web/.next/static/chunks/d0a69c59b1c0d99c.css +0 -1
  263. package/web/.next/standalone/web/.next/static/chunks/turbopack-54bc7d566cd2d105.js +0 -4
  264. package/web/.next/standalone/web/.next/static/static/chunks/03d4169891280e04.js +0 -7
  265. package/web/.next/standalone/web/.next/static/static/chunks/2d5da0cfc011b8d9.js +0 -1
  266. package/web/.next/standalone/web/.next/static/static/chunks/634fd97fab9ed4e4.js +0 -4
  267. package/web/.next/standalone/web/.next/static/static/chunks/77e4bf0421481629.js +0 -1
  268. package/web/.next/standalone/web/.next/static/static/chunks/a86053f0894587f2.js +0 -7
  269. package/web/.next/standalone/web/.next/static/static/chunks/beb9625c4a470042.js +0 -1
  270. package/web/.next/standalone/web/.next/static/static/chunks/c2244168e74b8c78.js +0 -1
  271. package/web/.next/standalone/web/.next/static/static/chunks/c81c1aec4369c77f.js +0 -5
  272. package/web/.next/standalone/web/.next/static/static/chunks/d0a69c59b1c0d99c.css +0 -1
  273. package/web/.next/standalone/web/.next/static/static/chunks/turbopack-54bc7d566cd2d105.js +0 -4
  274. package/web/.next/static/chunks/03d4169891280e04.js +0 -7
  275. package/web/.next/static/chunks/2d5da0cfc011b8d9.js +0 -1
  276. package/web/.next/static/chunks/634fd97fab9ed4e4.js +0 -4
  277. package/web/.next/static/chunks/77e4bf0421481629.js +0 -1
  278. package/web/.next/static/chunks/a86053f0894587f2.js +0 -7
  279. package/web/.next/static/chunks/beb9625c4a470042.js +0 -1
  280. package/web/.next/static/chunks/c2244168e74b8c78.js +0 -1
  281. package/web/.next/static/chunks/c81c1aec4369c77f.js +0 -5
  282. package/web/.next/static/chunks/d0a69c59b1c0d99c.css +0 -1
  283. package/web/.next/static/chunks/turbopack-54bc7d566cd2d105.js +0 -4
  284. /package/web/.next/standalone/web/.next/static/{kABnAk0Y1tlcrUKDlM8UT → static/uXbuwS0U7fRElucaXbKUe}/_buildManifest.js +0 -0
  285. /package/web/.next/standalone/web/.next/static/{kABnAk0Y1tlcrUKDlM8UT → static/uXbuwS0U7fRElucaXbKUe}/_clientMiddlewareManifest.json +0 -0
  286. /package/web/.next/standalone/web/.next/static/{kABnAk0Y1tlcrUKDlM8UT → static/uXbuwS0U7fRElucaXbKUe}/_ssgManifest.js +0 -0
  287. /package/web/.next/standalone/web/.next/static/{static/kABnAk0Y1tlcrUKDlM8UT → uXbuwS0U7fRElucaXbKUe}/_buildManifest.js +0 -0
  288. /package/web/.next/standalone/web/.next/static/{static/kABnAk0Y1tlcrUKDlM8UT → uXbuwS0U7fRElucaXbKUe}/_clientMiddlewareManifest.json +0 -0
  289. /package/web/.next/standalone/web/.next/static/{static/kABnAk0Y1tlcrUKDlM8UT → uXbuwS0U7fRElucaXbKUe}/_ssgManifest.js +0 -0
  290. /package/web/.next/static/{kABnAk0Y1tlcrUKDlM8UT → uXbuwS0U7fRElucaXbKUe}/_buildManifest.js +0 -0
  291. /package/web/.next/static/{kABnAk0Y1tlcrUKDlM8UT → uXbuwS0U7fRElucaXbKUe}/_clientMiddlewareManifest.json +0 -0
  292. /package/web/.next/static/{kABnAk0Y1tlcrUKDlM8UT → uXbuwS0U7fRElucaXbKUe}/_ssgManifest.js +0 -0
@@ -1263,9 +1263,28 @@ interface SystemModelMessage {
1263
1263
  role: 'system';
1264
1264
  content: string;
1265
1265
  }
1266
+ interface UserTextPart {
1267
+ type: 'text';
1268
+ text: string;
1269
+ }
1270
+ interface UserImagePart {
1271
+ type: 'image';
1272
+ image: string;
1273
+ mediaType?: string;
1274
+ filename?: string;
1275
+ savedPath?: string;
1276
+ }
1277
+ interface UserFilePart {
1278
+ type: 'file';
1279
+ data: string;
1280
+ mediaType?: string;
1281
+ filename?: string;
1282
+ savedPath?: string;
1283
+ }
1284
+ type UserContentPart = UserTextPart | UserImagePart | UserFilePart;
1266
1285
  interface UserModelMessage {
1267
1286
  role: 'user';
1268
- content: string;
1287
+ content: string | UserContentPart[];
1269
1288
  }
1270
1289
  interface AssistantModelMessage {
1271
1290
  role: 'assistant';
@@ -1288,6 +1307,246 @@ interface ToolResultPart {
1288
1307
  toolName: string;
1289
1308
  output: unknown;
1290
1309
  }
1310
+ declare const subagentExecutions: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
1311
+ name: "subagent_executions";
1312
+ schema: undefined;
1313
+ columns: {
1314
+ id: drizzle_orm_sqlite_core.SQLiteColumn<{
1315
+ name: "id";
1316
+ tableName: "subagent_executions";
1317
+ dataType: "string";
1318
+ columnType: "SQLiteText";
1319
+ data: string;
1320
+ driverParam: string;
1321
+ notNull: true;
1322
+ hasDefault: false;
1323
+ isPrimaryKey: true;
1324
+ isAutoincrement: false;
1325
+ hasRuntimeDefault: false;
1326
+ enumValues: [string, ...string[]];
1327
+ baseColumn: never;
1328
+ identity: undefined;
1329
+ generated: undefined;
1330
+ }, {}, {
1331
+ length: number | undefined;
1332
+ }>;
1333
+ sessionId: drizzle_orm_sqlite_core.SQLiteColumn<{
1334
+ name: "session_id";
1335
+ tableName: "subagent_executions";
1336
+ dataType: "string";
1337
+ columnType: "SQLiteText";
1338
+ data: string;
1339
+ driverParam: string;
1340
+ notNull: true;
1341
+ hasDefault: false;
1342
+ isPrimaryKey: false;
1343
+ isAutoincrement: false;
1344
+ hasRuntimeDefault: false;
1345
+ enumValues: [string, ...string[]];
1346
+ baseColumn: never;
1347
+ identity: undefined;
1348
+ generated: undefined;
1349
+ }, {}, {
1350
+ length: number | undefined;
1351
+ }>;
1352
+ toolCallId: drizzle_orm_sqlite_core.SQLiteColumn<{
1353
+ name: "tool_call_id";
1354
+ tableName: "subagent_executions";
1355
+ dataType: "string";
1356
+ columnType: "SQLiteText";
1357
+ data: string;
1358
+ driverParam: string;
1359
+ notNull: true;
1360
+ hasDefault: false;
1361
+ isPrimaryKey: false;
1362
+ isAutoincrement: false;
1363
+ hasRuntimeDefault: false;
1364
+ enumValues: [string, ...string[]];
1365
+ baseColumn: never;
1366
+ identity: undefined;
1367
+ generated: undefined;
1368
+ }, {}, {
1369
+ length: number | undefined;
1370
+ }>;
1371
+ subagentType: drizzle_orm_sqlite_core.SQLiteColumn<{
1372
+ name: "subagent_type";
1373
+ tableName: "subagent_executions";
1374
+ dataType: "string";
1375
+ columnType: "SQLiteText";
1376
+ data: string;
1377
+ driverParam: string;
1378
+ notNull: true;
1379
+ hasDefault: false;
1380
+ isPrimaryKey: false;
1381
+ isAutoincrement: false;
1382
+ hasRuntimeDefault: false;
1383
+ enumValues: [string, ...string[]];
1384
+ baseColumn: never;
1385
+ identity: undefined;
1386
+ generated: undefined;
1387
+ }, {}, {
1388
+ length: number | undefined;
1389
+ }>;
1390
+ task: drizzle_orm_sqlite_core.SQLiteColumn<{
1391
+ name: "task";
1392
+ tableName: "subagent_executions";
1393
+ dataType: "string";
1394
+ columnType: "SQLiteText";
1395
+ data: string;
1396
+ driverParam: string;
1397
+ notNull: true;
1398
+ hasDefault: false;
1399
+ isPrimaryKey: false;
1400
+ isAutoincrement: false;
1401
+ hasRuntimeDefault: false;
1402
+ enumValues: [string, ...string[]];
1403
+ baseColumn: never;
1404
+ identity: undefined;
1405
+ generated: undefined;
1406
+ }, {}, {
1407
+ length: number | undefined;
1408
+ }>;
1409
+ model: drizzle_orm_sqlite_core.SQLiteColumn<{
1410
+ name: "model";
1411
+ tableName: "subagent_executions";
1412
+ dataType: "string";
1413
+ columnType: "SQLiteText";
1414
+ data: string;
1415
+ driverParam: string;
1416
+ notNull: true;
1417
+ hasDefault: false;
1418
+ isPrimaryKey: false;
1419
+ isAutoincrement: false;
1420
+ hasRuntimeDefault: false;
1421
+ enumValues: [string, ...string[]];
1422
+ baseColumn: never;
1423
+ identity: undefined;
1424
+ generated: undefined;
1425
+ }, {}, {
1426
+ length: number | undefined;
1427
+ }>;
1428
+ status: drizzle_orm_sqlite_core.SQLiteColumn<{
1429
+ name: "status";
1430
+ tableName: "subagent_executions";
1431
+ dataType: "string";
1432
+ columnType: "SQLiteText";
1433
+ data: "error" | "completed" | "cancelled" | "running";
1434
+ driverParam: string;
1435
+ notNull: true;
1436
+ hasDefault: true;
1437
+ isPrimaryKey: false;
1438
+ isAutoincrement: false;
1439
+ hasRuntimeDefault: false;
1440
+ enumValues: ["running", "completed", "error", "cancelled"];
1441
+ baseColumn: never;
1442
+ identity: undefined;
1443
+ generated: undefined;
1444
+ }, {}, {
1445
+ length: number | undefined;
1446
+ }>;
1447
+ steps: drizzle_orm_sqlite_core.SQLiteColumn<{
1448
+ name: "steps";
1449
+ tableName: "subagent_executions";
1450
+ dataType: "json";
1451
+ columnType: "SQLiteTextJson";
1452
+ data: SubagentStep[];
1453
+ driverParam: string;
1454
+ notNull: false;
1455
+ hasDefault: true;
1456
+ isPrimaryKey: false;
1457
+ isAutoincrement: false;
1458
+ hasRuntimeDefault: false;
1459
+ enumValues: undefined;
1460
+ baseColumn: never;
1461
+ identity: undefined;
1462
+ generated: undefined;
1463
+ }, {}, {
1464
+ $type: SubagentStep[];
1465
+ }>;
1466
+ result: drizzle_orm_sqlite_core.SQLiteColumn<{
1467
+ name: "result";
1468
+ tableName: "subagent_executions";
1469
+ dataType: "json";
1470
+ columnType: "SQLiteTextJson";
1471
+ data: unknown;
1472
+ driverParam: string;
1473
+ notNull: false;
1474
+ hasDefault: false;
1475
+ isPrimaryKey: false;
1476
+ isAutoincrement: false;
1477
+ hasRuntimeDefault: false;
1478
+ enumValues: undefined;
1479
+ baseColumn: never;
1480
+ identity: undefined;
1481
+ generated: undefined;
1482
+ }, {}, {}>;
1483
+ error: drizzle_orm_sqlite_core.SQLiteColumn<{
1484
+ name: "error";
1485
+ tableName: "subagent_executions";
1486
+ dataType: "string";
1487
+ columnType: "SQLiteText";
1488
+ data: string;
1489
+ driverParam: string;
1490
+ notNull: false;
1491
+ hasDefault: false;
1492
+ isPrimaryKey: false;
1493
+ isAutoincrement: false;
1494
+ hasRuntimeDefault: false;
1495
+ enumValues: [string, ...string[]];
1496
+ baseColumn: never;
1497
+ identity: undefined;
1498
+ generated: undefined;
1499
+ }, {}, {
1500
+ length: number | undefined;
1501
+ }>;
1502
+ startedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
1503
+ name: "started_at";
1504
+ tableName: "subagent_executions";
1505
+ dataType: "date";
1506
+ columnType: "SQLiteTimestamp";
1507
+ data: Date;
1508
+ driverParam: number;
1509
+ notNull: true;
1510
+ hasDefault: true;
1511
+ isPrimaryKey: false;
1512
+ isAutoincrement: false;
1513
+ hasRuntimeDefault: true;
1514
+ enumValues: undefined;
1515
+ baseColumn: never;
1516
+ identity: undefined;
1517
+ generated: undefined;
1518
+ }, {}, {}>;
1519
+ completedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
1520
+ name: "completed_at";
1521
+ tableName: "subagent_executions";
1522
+ dataType: "date";
1523
+ columnType: "SQLiteTimestamp";
1524
+ data: Date;
1525
+ driverParam: number;
1526
+ notNull: false;
1527
+ hasDefault: false;
1528
+ isPrimaryKey: false;
1529
+ isAutoincrement: false;
1530
+ hasRuntimeDefault: false;
1531
+ enumValues: undefined;
1532
+ baseColumn: never;
1533
+ identity: undefined;
1534
+ generated: undefined;
1535
+ }, {}, {}>;
1536
+ };
1537
+ dialect: "sqlite";
1538
+ }>;
1539
+ interface SubagentStep {
1540
+ id: string;
1541
+ type: 'thought' | 'tool_call' | 'tool_result' | 'text';
1542
+ content: string;
1543
+ toolName?: string;
1544
+ toolInput?: unknown;
1545
+ toolOutput?: unknown;
1546
+ timestamp: number;
1547
+ }
1548
+ type SubagentExecution = typeof subagentExecutions.$inferSelect;
1549
+ type NewSubagentExecution = typeof subagentExecutions.$inferInsert;
1291
1550
  type Session = typeof sessions.$inferSelect;
1292
1551
  type NewSession = typeof sessions.$inferInsert;
1293
1552
  type Message = typeof messages.$inferSelect;
@@ -1319,29 +1578,37 @@ type schema_NewCheckpoint = NewCheckpoint;
1319
1578
  type schema_NewFileBackup = NewFileBackup;
1320
1579
  type schema_NewMessage = NewMessage;
1321
1580
  type schema_NewSession = NewSession;
1581
+ type schema_NewSubagentExecution = NewSubagentExecution;
1322
1582
  type schema_NewTerminal = NewTerminal;
1323
1583
  type schema_NewTodoItem = NewTodoItem;
1324
1584
  type schema_NewToolExecution = NewToolExecution;
1325
1585
  type schema_Session = Session;
1326
1586
  type schema_SessionConfig = SessionConfig;
1587
+ type schema_SubagentExecution = SubagentExecution;
1588
+ type schema_SubagentStep = SubagentStep;
1327
1589
  type schema_SystemModelMessage = SystemModelMessage;
1328
1590
  type schema_Terminal = Terminal;
1329
1591
  type schema_TodoItem = TodoItem;
1330
1592
  type schema_ToolExecution = ToolExecution;
1331
1593
  type schema_ToolModelMessage = ToolModelMessage;
1332
1594
  type schema_ToolResultPart = ToolResultPart;
1595
+ type schema_UserContentPart = UserContentPart;
1596
+ type schema_UserFilePart = UserFilePart;
1597
+ type schema_UserImagePart = UserImagePart;
1333
1598
  type schema_UserModelMessage = UserModelMessage;
1599
+ type schema_UserTextPart = UserTextPart;
1334
1600
  declare const schema_activeStreams: typeof activeStreams;
1335
1601
  declare const schema_checkpoints: typeof checkpoints;
1336
1602
  declare const schema_fileBackups: typeof fileBackups;
1337
1603
  declare const schema_loadedSkills: typeof loadedSkills;
1338
1604
  declare const schema_messages: typeof messages;
1339
1605
  declare const schema_sessions: typeof sessions;
1606
+ declare const schema_subagentExecutions: typeof subagentExecutions;
1340
1607
  declare const schema_terminals: typeof terminals;
1341
1608
  declare const schema_todoItems: typeof todoItems;
1342
1609
  declare const schema_toolExecutions: typeof toolExecutions;
1343
1610
  declare namespace schema {
1344
- export { type schema_ActiveStream as ActiveStream, type schema_AssistantContentPart as AssistantContentPart, type schema_AssistantModelMessage as AssistantModelMessage, type schema_Checkpoint as Checkpoint, type schema_FileBackup as FileBackup, type schema_LoadedSkill as LoadedSkill, type schema_Message as Message, type schema_ModelMessage as ModelMessage, type schema_NewActiveStream as NewActiveStream, type schema_NewCheckpoint as NewCheckpoint, type schema_NewFileBackup as NewFileBackup, type schema_NewMessage as NewMessage, type schema_NewSession as NewSession, type schema_NewTerminal as NewTerminal, type schema_NewTodoItem as NewTodoItem, type schema_NewToolExecution as NewToolExecution, type schema_Session as Session, type schema_SessionConfig as SessionConfig, type schema_SystemModelMessage as SystemModelMessage, type schema_Terminal as Terminal, type schema_TodoItem as TodoItem, type schema_ToolExecution as ToolExecution, type schema_ToolModelMessage as ToolModelMessage, type schema_ToolResultPart as ToolResultPart, type schema_UserModelMessage as UserModelMessage, schema_activeStreams as activeStreams, schema_checkpoints as checkpoints, schema_fileBackups as fileBackups, schema_loadedSkills as loadedSkills, schema_messages as messages, schema_sessions as sessions, schema_terminals as terminals, schema_todoItems as todoItems, schema_toolExecutions as toolExecutions };
1611
+ export { type schema_ActiveStream as ActiveStream, type schema_AssistantContentPart as AssistantContentPart, type schema_AssistantModelMessage as AssistantModelMessage, type schema_Checkpoint as Checkpoint, type schema_FileBackup as FileBackup, type schema_LoadedSkill as LoadedSkill, type schema_Message as Message, type schema_ModelMessage as ModelMessage, type schema_NewActiveStream as NewActiveStream, type schema_NewCheckpoint as NewCheckpoint, type schema_NewFileBackup as NewFileBackup, type schema_NewMessage as NewMessage, type schema_NewSession as NewSession, type schema_NewSubagentExecution as NewSubagentExecution, type schema_NewTerminal as NewTerminal, type schema_NewTodoItem as NewTodoItem, type schema_NewToolExecution as NewToolExecution, type schema_Session as Session, type schema_SessionConfig as SessionConfig, type schema_SubagentExecution as SubagentExecution, type schema_SubagentStep as SubagentStep, type schema_SystemModelMessage as SystemModelMessage, type schema_Terminal as Terminal, type schema_TodoItem as TodoItem, type schema_ToolExecution as ToolExecution, type schema_ToolModelMessage as ToolModelMessage, type schema_ToolResultPart as ToolResultPart, type schema_UserContentPart as UserContentPart, type schema_UserFilePart as UserFilePart, type schema_UserImagePart as UserImagePart, type schema_UserModelMessage as UserModelMessage, type schema_UserTextPart as UserTextPart, schema_activeStreams as activeStreams, schema_checkpoints as checkpoints, schema_fileBackups as fileBackups, schema_loadedSkills as loadedSkills, schema_messages as messages, schema_sessions as sessions, schema_subagentExecutions as subagentExecutions, schema_terminals as terminals, schema_todoItems as todoItems, schema_toolExecutions as toolExecutions };
1345
1612
  }
1346
1613
 
1347
- export { type ActiveStream as A, type Checkpoint as C, type FileBackup as F, type LoadedSkill as L, type ModelMessage as M, type NewSession as N, type Session as S, type TodoItem as T, type Message as a, type SessionConfig as b, type NewTodoItem as c, type NewToolExecution as d, type ToolExecution as e, type NewTerminal as f, type Terminal as g, schema as s };
1614
+ export { type ActiveStream as A, type Checkpoint as C, type FileBackup as F, type LoadedSkill as L, type ModelMessage as M, type NewSession as N, type Session as S, type TodoItem as T, type UserContentPart as U, type Message as a, type SessionConfig as b, type NewTodoItem as c, type NewToolExecution as d, type ToolExecution as e, type SubagentExecution as f, type SubagentStep as g, type NewTerminal as h, type Terminal as i, type UserFilePart as j, type UserImagePart as k, type UserModelMessage as l, type UserTextPart as m, schema as s };
@@ -0,0 +1,254 @@
1
+ import * as ai from 'ai';
2
+
3
+ interface BashToolProgress {
4
+ terminalId: string;
5
+ status: 'started' | 'running' | 'completed';
6
+ command?: string;
7
+ }
8
+ interface BashToolOptions {
9
+ workingDirectory: string;
10
+ sessionId: string;
11
+ onOutput?: (output: string) => void;
12
+ onProgress?: (progress: BashToolProgress) => void;
13
+ }
14
+ declare function createBashTool(options: BashToolOptions): ai.Tool<{
15
+ background: boolean;
16
+ id?: string | undefined;
17
+ input?: string | undefined;
18
+ command?: string | undefined;
19
+ kill?: boolean | undefined;
20
+ tail?: number | undefined;
21
+ key?: "y" | "Enter" | "Escape" | "Up" | "Down" | "Left" | "Right" | "Tab" | "C-c" | "C-d" | "n" | undefined;
22
+ }, {
23
+ success: boolean;
24
+ id: string;
25
+ status: string;
26
+ message: string;
27
+ error?: undefined;
28
+ output?: undefined;
29
+ exitCode?: undefined;
30
+ } | {
31
+ success: boolean;
32
+ id: string;
33
+ error: string;
34
+ status?: undefined;
35
+ message?: undefined;
36
+ output?: undefined;
37
+ exitCode?: undefined;
38
+ } | {
39
+ success: boolean;
40
+ id: string;
41
+ output: string;
42
+ status: "running" | "stopped" | "unknown";
43
+ message: string;
44
+ error?: undefined;
45
+ exitCode?: undefined;
46
+ } | {
47
+ success: boolean;
48
+ id: string;
49
+ output: string;
50
+ status: "running" | "stopped" | "unknown";
51
+ message?: undefined;
52
+ error?: undefined;
53
+ exitCode?: undefined;
54
+ } | {
55
+ success: boolean;
56
+ error: string;
57
+ id?: undefined;
58
+ status?: undefined;
59
+ message?: undefined;
60
+ output?: undefined;
61
+ exitCode?: undefined;
62
+ } | {
63
+ success: boolean;
64
+ id: string;
65
+ output: string;
66
+ exitCode: number;
67
+ status: "error" | "completed" | "running" | "stopped";
68
+ message?: undefined;
69
+ error?: undefined;
70
+ } | {
71
+ success: boolean;
72
+ error: any;
73
+ output: string;
74
+ exitCode: number;
75
+ id?: undefined;
76
+ status?: undefined;
77
+ message?: undefined;
78
+ }>;
79
+
80
+ interface WriteFileProgress {
81
+ /** The file path being written */
82
+ path: string;
83
+ /** Relative path from working directory */
84
+ relativePath: string;
85
+ /** Write mode */
86
+ mode: 'full' | 'str_replace';
87
+ /** Status of the write operation */
88
+ status: 'started' | 'content' | 'completed';
89
+ /** For 'content' status: the content being written (may be chunked for streaming) */
90
+ content?: string;
91
+ /** When content is chunked, the chunk index (0-based) */
92
+ chunkIndex?: number;
93
+ /** When content is chunked, the total number of chunks */
94
+ chunkCount?: number;
95
+ /** When content is chunked, the start offset for this chunk */
96
+ chunkStart?: number;
97
+ /** Whether this content update is chunked */
98
+ isChunked?: boolean;
99
+ /** For str_replace: the old string being replaced */
100
+ oldString?: string;
101
+ /** For str_replace: the new string */
102
+ newString?: string;
103
+ /** Total content length (for progress tracking) */
104
+ totalLength?: number;
105
+ /** Action being performed */
106
+ action?: 'created' | 'replaced' | 'edited';
107
+ }
108
+ interface WriteFileToolOptions {
109
+ workingDirectory: string;
110
+ sessionId: string;
111
+ /** Enable LSP diagnostics after file edits (default: true) */
112
+ enableLSP?: boolean;
113
+ /** Called when write_file has progress to report (for streaming content) */
114
+ onProgress?: (progress: WriteFileProgress) => void;
115
+ }
116
+ declare function createWriteFileTool(options: WriteFileToolOptions): ai.Tool<{
117
+ mode: "full" | "str_replace";
118
+ path: string;
119
+ content?: string | undefined;
120
+ old_string?: string | undefined;
121
+ new_string?: string | undefined;
122
+ }, {
123
+ diagnostics?: string | undefined;
124
+ success: boolean;
125
+ path: string;
126
+ relativePath: string;
127
+ mode: string;
128
+ action: string;
129
+ bytesWritten: number;
130
+ lineCount: number;
131
+ error?: undefined;
132
+ hint?: undefined;
133
+ filePreview?: undefined;
134
+ } | {
135
+ success: boolean;
136
+ error: string;
137
+ hint: string;
138
+ filePreview: string;
139
+ } | {
140
+ success: boolean;
141
+ error: string;
142
+ hint: string;
143
+ filePreview?: undefined;
144
+ } | {
145
+ diagnostics?: string | undefined;
146
+ success: boolean;
147
+ path: string;
148
+ relativePath: string;
149
+ mode: string;
150
+ linesRemoved: number;
151
+ linesAdded: number;
152
+ lineDelta: number;
153
+ error?: undefined;
154
+ hint?: undefined;
155
+ filePreview?: undefined;
156
+ } | {
157
+ success: boolean;
158
+ error: any;
159
+ hint?: undefined;
160
+ filePreview?: undefined;
161
+ }>;
162
+
163
+ /**
164
+ * Search result from the SearchSubagent
165
+ */
166
+ interface SearchResult {
167
+ query: string;
168
+ summary: string;
169
+ findings: SearchFinding[];
170
+ filesSearched: number;
171
+ matchCount: number;
172
+ }
173
+ interface SearchFinding {
174
+ type: 'file' | 'match' | 'pattern';
175
+ path: string;
176
+ content?: string;
177
+ lineNumber?: number;
178
+ relevance: 'high' | 'medium' | 'low';
179
+ context?: string;
180
+ }
181
+
182
+ /**
183
+ * Progress event for the search tool (emitted via onProgress callback)
184
+ */
185
+ interface SearchToolProgress {
186
+ status: 'started' | 'step' | 'complete' | 'error';
187
+ subagentId?: string;
188
+ stepType?: 'thought' | 'tool_call' | 'tool_result' | 'text';
189
+ stepContent?: string;
190
+ toolName?: string;
191
+ toolInput?: unknown;
192
+ toolOutput?: unknown;
193
+ result?: SearchResult;
194
+ error?: string;
195
+ }
196
+ interface SearchToolOptions {
197
+ sessionId: string;
198
+ workingDirectory: string;
199
+ /** Callback for progress updates (for streaming to UI) */
200
+ onProgress?: (progress: SearchToolProgress) => void | Promise<void>;
201
+ }
202
+ /**
203
+ * Create the search tool that spawns a SearchSubagent
204
+ *
205
+ * This tool allows the main agent to delegate search tasks to a specialized
206
+ * mini-agent that uses a smaller, faster model (Gemini 2.0 Flash).
207
+ *
208
+ * The subagent has access to:
209
+ * - grep: Search for patterns in files
210
+ * - glob: Find files by pattern
211
+ * - read_file: Read file contents
212
+ * - list_dir: List directory contents
213
+ *
214
+ * Progress is streamed back to the UI so users can see the search happening.
215
+ */
216
+ declare function createSearchTool(options: SearchToolOptions): ai.Tool<{
217
+ query: string;
218
+ context?: string | undefined;
219
+ }, {
220
+ success: boolean;
221
+ error: string;
222
+ executionId: string;
223
+ query?: undefined;
224
+ summary?: undefined;
225
+ findings?: undefined;
226
+ matchCount?: undefined;
227
+ filesSearched?: undefined;
228
+ formattedResult?: undefined;
229
+ stepsCount?: undefined;
230
+ } | {
231
+ success: boolean;
232
+ query: string;
233
+ summary: string;
234
+ findings: SearchFinding[];
235
+ matchCount: number;
236
+ filesSearched: number;
237
+ formattedResult: string;
238
+ executionId: string;
239
+ stepsCount: number;
240
+ error?: undefined;
241
+ } | {
242
+ success: boolean;
243
+ error: any;
244
+ executionId?: undefined;
245
+ query?: undefined;
246
+ summary?: undefined;
247
+ findings?: undefined;
248
+ matchCount?: undefined;
249
+ filesSearched?: undefined;
250
+ formattedResult?: undefined;
251
+ stepsCount?: undefined;
252
+ }>;
253
+
254
+ export { type BashToolProgress as B, type SearchToolProgress as S, type WriteFileProgress as W, createWriteFileTool as a, type BashToolOptions as b, createBashTool as c, type SearchToolOptions as d, type WriteFileToolOptions as e, createSearchTool as f };