thursday-agent 0.1.2 → 0.2.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 (358) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +1 -0
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/routes-manifest.json +6 -0
  6. package/.next/server/app/_global-error/page.js.nft.json +1 -1
  7. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  8. package/.next/server/app/_global-error.html +1 -1
  9. package/.next/server/app/_global-error.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  13. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  14. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  15. package/.next/server/app/_not-found.html +1 -1
  16. package/.next/server/app/_not-found.rsc +13 -13
  17. package/.next/server/app/_not-found.segments/_full.segment.rsc +13 -13
  18. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +12 -12
  19. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  20. package/.next/server/app/api/artifact/route.js +1 -1
  21. package/.next/server/app/api/artifact/route.js.nft.json +1 -1
  22. package/.next/server/app/api/bot/notes/route/app-paths-manifest.json +3 -0
  23. package/.next/server/app/api/bot/notes/route/build-manifest.json +12 -0
  24. package/.next/server/app/api/bot/notes/route/server-reference-manifest.json +4 -0
  25. package/.next/server/app/api/bot/notes/route.js +14 -0
  26. package/.next/server/app/api/bot/notes/route.js.map +5 -0
  27. package/.next/server/app/api/bot/notes/route.js.nft.json +1 -0
  28. package/.next/server/app/api/bot/notes/route_client-reference-manifest.js +3 -0
  29. package/.next/server/app/api/bot/route.js +4 -4
  30. package/.next/server/app/api/bot/route.js.nft.json +1 -1
  31. package/.next/server/app/api/bot/task/[id]/route.js +6 -6
  32. package/.next/server/app/api/bot/task/[id]/route.js.nft.json +1 -1
  33. package/.next/server/app/api/bot/task/route.js +6 -6
  34. package/.next/server/app/api/bot/task/route.js.nft.json +1 -1
  35. package/.next/server/app/api/config/route.js +3 -3
  36. package/.next/server/app/api/config/route.js.nft.json +1 -1
  37. package/.next/server/app/api/events/route.js +1 -1
  38. package/.next/server/app/api/events/route.js.nft.json +1 -1
  39. package/.next/server/app/api/file/[...path]/route.js +1 -1
  40. package/.next/server/app/api/file/[...path]/route.js.nft.json +1 -1
  41. package/.next/server/app/api/llm-model/catalog/route.js +6 -6
  42. package/.next/server/app/api/llm-model/catalog/route.js.nft.json +1 -1
  43. package/.next/server/app/api/llm-model/route.js +3 -3
  44. package/.next/server/app/api/llm-model/route.js.nft.json +1 -1
  45. package/.next/server/app/api/mcp/[name]/route.js +3 -3
  46. package/.next/server/app/api/mcp/[name]/route.js.nft.json +1 -1
  47. package/.next/server/app/api/mcp/oauth/callback/route.js +5 -5
  48. package/.next/server/app/api/mcp/oauth/callback/route.js.nft.json +1 -1
  49. package/.next/server/app/api/mcp/route.js +3 -3
  50. package/.next/server/app/api/mcp/route.js.nft.json +1 -1
  51. package/.next/server/app/api/mcp/tools/route.js +3 -3
  52. package/.next/server/app/api/mcp/tools/route.js.nft.json +1 -1
  53. package/.next/server/app/api/memory/route.js +7 -7
  54. package/.next/server/app/api/memory/route.js.nft.json +1 -1
  55. package/.next/server/app/api/memory/tidy/route.js +10 -11
  56. package/.next/server/app/api/memory/tidy/route.js.nft.json +1 -1
  57. package/.next/server/app/api/skills/[source]/[name]/route.js +1 -1
  58. package/.next/server/app/api/skills/[source]/[name]/route.js.nft.json +1 -1
  59. package/.next/server/app/api/skills/route.js +1 -1
  60. package/.next/server/app/api/skills/route.js.nft.json +1 -1
  61. package/.next/server/app/api/thursday/call/route.js +8 -8
  62. package/.next/server/app/api/thursday/call/route.js.nft.json +1 -1
  63. package/.next/server/app/api/thursday/skills/route.js +8 -8
  64. package/.next/server/app/api/thursday/skills/route.js.nft.json +1 -1
  65. package/.next/server/app/api/thursday/tool-call/route.js +11 -12
  66. package/.next/server/app/api/thursday/tool-call/route.js.nft.json +1 -1
  67. package/.next/server/app/api/workspace/route.js +1 -1
  68. package/.next/server/app/api/workspace/route.js.nft.json +1 -1
  69. package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +1 -1
  70. package/.next/server/app/artifact/[...path]/page.js +3 -3
  71. package/.next/server/app/artifact/[...path]/page.js.nft.json +1 -1
  72. package/.next/server/app/artifact/[...path]/page_client-reference-manifest.js +1 -1
  73. package/.next/server/app/favicon.ico/route.js.nft.json +1 -1
  74. package/.next/server/app/page/server-reference-manifest.json +63 -41
  75. package/.next/server/app/page.js +7 -7
  76. package/.next/server/app/page.js.nft.json +1 -1
  77. package/.next/server/app/page_client-reference-manifest.js +1 -1
  78. package/.next/server/app-paths-manifest.json +1 -0
  79. package/.next/server/chunks/0d-b_next_dist_server_app-render_after-task-async-storage_external_0-exn7p.js +3 -0
  80. package/.next/server/chunks/{[root-of-the-server]__0t_dqaj._.js → [root-of-the-server]__0-npkh_._.js} +1 -1
  81. package/.next/server/chunks/[root-of-the-server]__005var5._.js +3 -0
  82. package/.next/server/chunks/[root-of-the-server]__019dx9f._.js +2 -2
  83. package/.next/server/chunks/[root-of-the-server]__02va5wz._.js +3 -0
  84. package/.next/server/chunks/{[root-of-the-server]__1mzp_el._.js → [root-of-the-server]__04_8spk._.js} +2 -2
  85. package/.next/server/chunks/[root-of-the-server]__06t77t4._.js +1 -1
  86. package/.next/server/chunks/[root-of-the-server]__0bed6hu._.js +4 -4
  87. package/.next/server/chunks/[root-of-the-server]__0cro2dz._.js +5 -0
  88. package/.next/server/chunks/[root-of-the-server]__0emr6go._.js +3 -0
  89. package/.next/server/chunks/[root-of-the-server]__0le4d-p._.js +1 -1
  90. package/.next/server/chunks/[root-of-the-server]__0m8ywyo._.js +5 -5
  91. package/.next/server/chunks/{[root-of-the-server]__113fqg5._.js → [root-of-the-server]__0p32jfz._.js} +3 -3
  92. package/.next/server/chunks/[root-of-the-server]__0phdgco._.js +4 -4
  93. package/.next/server/chunks/[root-of-the-server]__0wvgrsl._.js +1 -1
  94. package/.next/server/chunks/[root-of-the-server]__11j52t0._.js +5 -0
  95. package/.next/server/chunks/{[root-of-the-server]__0j_n5l3._.js → [root-of-the-server]__1692zrv._.js} +2 -2
  96. package/.next/server/chunks/[root-of-the-server]__16thabu._.js +1 -1
  97. package/.next/server/chunks/[root-of-the-server]__173nhwf._.js +3 -3
  98. package/.next/server/chunks/[root-of-the-server]__1bn73ih._.js +10 -0
  99. package/.next/server/chunks/[root-of-the-server]__1bqhuh9._.js +4 -4
  100. package/.next/server/chunks/[root-of-the-server]__1ccon1w._.js +10 -0
  101. package/.next/server/chunks/[root-of-the-server]__1cqizfq._.js +1 -1
  102. package/.next/server/chunks/{[root-of-the-server]__1u_qvc7._.js → [root-of-the-server]__1fboj2j._.js} +2 -2
  103. package/.next/server/chunks/{[root-of-the-server]__1dow0bz._.js → [root-of-the-server]__1oli73c._.js} +2 -2
  104. package/.next/server/chunks/[root-of-the-server]__1txedx6._.js +4 -4
  105. package/.next/server/chunks/[root-of-the-server]__1untqv8._.js +5 -0
  106. package/.next/server/chunks/_0-73of8._.js +55 -0
  107. package/.next/server/chunks/{_2050gwn._.js → _00_584r._.js} +66 -28
  108. package/.next/server/chunks/{_0y8is-s._.js → _03a0897._.js} +1 -1
  109. package/.next/server/chunks/_05h2cii._.js +1 -1
  110. package/.next/server/chunks/_06mxlgn._.js +1 -1
  111. package/.next/server/chunks/_0a351g7._.js +1 -1
  112. package/.next/server/chunks/{_0hin38_._.js → _0khihjk._.js} +5 -5
  113. package/.next/server/chunks/_0kjjmag._.js +1 -1
  114. package/.next/server/chunks/{_1t8fv7b._.js → _0n74zsf._.js} +5 -5
  115. package/.next/server/chunks/_0nn99o2._.js +3 -0
  116. package/.next/server/chunks/_0pppbb5._.js +10 -6
  117. package/.next/server/chunks/{_1icgbi8._.js → _0rnf-6n._.js} +5 -5
  118. package/.next/server/chunks/_0u10wmw._.js +55 -0
  119. package/.next/server/chunks/{_0kl37zl._.js → _0vnutv9._.js} +1 -1
  120. package/.next/server/chunks/_0wp4le3._.js +1 -1
  121. package/.next/server/chunks/_0y5fg-x._.js +1 -1
  122. package/.next/server/chunks/_106co2o._.js +3 -0
  123. package/.next/server/chunks/_12bbv5i._.js +10 -6
  124. package/.next/server/chunks/_15hq89o._.js +1 -1
  125. package/.next/server/chunks/_15q1pig._.js +1 -1
  126. package/.next/server/chunks/_18-1wcc._.js +55 -0
  127. package/.next/server/chunks/_19wg5yn._.js +138 -0
  128. package/.next/server/chunks/_1_5mnq4._.js +18 -0
  129. package/.next/server/chunks/_1bt95p9._.js +55 -0
  130. package/.next/server/chunks/_1cbk7ms._.js +9 -9
  131. package/.next/server/chunks/_1drgfx4._.js +18 -0
  132. package/.next/server/chunks/_1drv2et._.js +10 -6
  133. package/.next/server/chunks/{_10qam6o._.js → _1e48czp._.js} +5 -5
  134. package/.next/server/chunks/{_1skgy7b._.js → _1kg70wc._.js} +5 -5
  135. package/.next/server/chunks/_1php4eq._.js +1 -1
  136. package/.next/server/chunks/_1rysr-r._.js +10 -0
  137. package/.next/server/chunks/_1u3rwbr._.js +3 -0
  138. package/.next/server/chunks/_1x7p319._.js +1 -1
  139. package/.next/server/chunks/_1yuv4vp._.js +1 -1
  140. package/.next/server/chunks/_next-internal_server_app_api_bot_notes_route_actions_0qcsyu7.js +3 -0
  141. package/.next/server/chunks/config_ts_1g4sz5o._.js +1 -1
  142. package/.next/server/chunks/features_bot_task_query_ts_11xuzl3._.js +1 -1
  143. package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0228f43._.js → node_modules_consola_dist_chunks_prompt_mjs_02s3hjt._.js} +1 -1
  144. package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0ir-vo2._.js → node_modules_consola_dist_chunks_prompt_mjs_06067w6._.js} +1 -1
  145. package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0otw8ef._.js → node_modules_consola_dist_chunks_prompt_mjs_096ais_._.js} +1 -1
  146. package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0tf290y._.js → node_modules_consola_dist_chunks_prompt_mjs_0a1rd09._.js} +1 -1
  147. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_0gzvgfv._.js +3 -0
  148. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_0j61-ma._.js +3 -0
  149. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_0tvkfgh._.js +3 -0
  150. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_11zjo-1._.js +3 -0
  151. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1pycqsq._.js +3 -0
  152. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1tpvamf._.js +3 -0
  153. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1y9-wcr._.js +3 -0
  154. package/.next/server/chunks/ssr/[externals]__0dizgek._.js +3 -0
  155. package/.next/server/chunks/ssr/[root-of-the-server]__0f6s48x._.js +1 -1
  156. package/.next/server/chunks/ssr/[root-of-the-server]__0m1b5ky._.js +3 -0
  157. package/.next/server/chunks/ssr/{[root-of-the-server]__0dfwvr4._.js → [root-of-the-server]__0un-erv._.js} +2 -2
  158. package/.next/server/chunks/ssr/[root-of-the-server]__1-mnhyd._.js +5 -3
  159. package/.next/server/chunks/ssr/[root-of-the-server]__1bww500._.js +3 -0
  160. package/.next/server/chunks/ssr/[root-of-the-server]__1mzi-ju._.js +1 -1
  161. package/.next/server/chunks/ssr/[root-of-the-server]__1qfqvmg._.js +3 -0
  162. package/.next/server/chunks/ssr/[root-of-the-server]__1vcdast._.js +3 -0
  163. package/.next/server/chunks/ssr/[root-of-the-server]__1xwnu-h._.js +3 -0
  164. package/.next/server/chunks/ssr/_03webdr._.js +3 -0
  165. package/.next/server/chunks/ssr/{_0gd4vaa._.js → _040sk32._.js} +71 -29
  166. package/.next/server/chunks/ssr/_077-g6s._.js +1 -1
  167. package/.next/server/chunks/ssr/{_0lc_7c8._.js → _09ja_w1._.js} +2 -2
  168. package/.next/server/chunks/ssr/{_1dcxzqe._.js → _0f_b_9s._.js} +2 -2
  169. package/.next/server/chunks/ssr/_0h7zdni._.js +1 -1
  170. package/.next/server/chunks/ssr/_0lu1n_x._.js +3 -0
  171. package/.next/server/chunks/ssr/_0sf1isi._.js +1 -1
  172. package/.next/server/chunks/ssr/_0su6_08._.js +3 -0
  173. package/.next/server/chunks/ssr/{_0nso8tp._.js → _0w5bgak._.js} +2 -2
  174. package/.next/server/chunks/ssr/{_19_o9d-._.js → _0x_nu5e._.js} +2 -2
  175. package/.next/server/chunks/ssr/_1-teee5._.js +3 -3
  176. package/.next/server/chunks/ssr/_13punpm._.js +1 -1
  177. package/.next/server/chunks/ssr/{_0ay6b01._.js → _1ciyoo3._.js} +2 -2
  178. package/.next/server/chunks/ssr/_1e-dgz0._.js +1 -1
  179. package/.next/server/chunks/ssr/_1fq7zgb._.js +1 -1
  180. package/.next/server/chunks/ssr/{_0cvjbuz._.js → _1g6l4uj._.js} +2 -2
  181. package/.next/server/chunks/ssr/{_0q_2f2x._.js → _1lip4th._.js} +2 -2
  182. package/.next/server/chunks/ssr/_1m3bsfr._.js +3 -0
  183. package/.next/server/chunks/ssr/_1mznrxk._.js +1 -1
  184. package/.next/server/chunks/ssr/_1ruzehw._.js +3 -0
  185. package/.next/server/chunks/ssr/_1vyd1ji._.js +3 -0
  186. package/.next/server/chunks/ssr/features_bot_components_bot-setting_tsx_01ajft6._.js +2 -2
  187. package/.next/server/chunks/ssr/features_config_components_14jqgy4._.js +1 -1
  188. package/.next/server/chunks/ssr/features_config_components_config-setting_tsx_0xfwqdg._.js +1 -1
  189. package/.next/server/chunks/ssr/features_connectors_components_mcp-setting_tsx_0jmbgvp._.js +1 -1
  190. package/.next/server/chunks/ssr/features_memory_components_memory-setting_tsx_0oa43sw._.js +1 -1
  191. package/.next/server/chunks/ssr/lib_realtime_12wg_dd._.js +27 -0
  192. package/.next/server/chunks/ssr/lib_realtime_15h_v1v._.js +27 -0
  193. package/.next/server/chunks/ssr/{node_modules_108wd2o._.js → node_modules_004qlr4._.js} +1 -1
  194. package/.next/server/chunks/ssr/{node_modules_1ub40gk._.js → node_modules_01qnv-a._.js} +1 -1
  195. package/.next/server/chunks/ssr/{node_modules_1y8_3vg._.js → node_modules_04n7mjs._.js} +1 -1
  196. package/.next/server/chunks/ssr/{node_modules_0_j7-g4._.js → node_modules_08d8bke._.js} +1 -1
  197. package/.next/server/chunks/ssr/{node_modules_0y2-av4._.js → node_modules_09xhur7._.js} +1 -1
  198. package/.next/server/chunks/ssr/{node_modules_043-236._.js → node_modules_0_n241r._.js} +1 -1
  199. package/.next/server/chunks/ssr/{node_modules_0ls96je._.js → node_modules_0iz1rzd._.js} +1 -1
  200. package/.next/server/chunks/ssr/{node_modules_0xwx4u-._.js → node_modules_0kl7-tn._.js} +1 -1
  201. package/.next/server/chunks/ssr/{node_modules_1jatz7w._.js → node_modules_0kxz4gt._.js} +1 -1
  202. package/.next/server/chunks/ssr/{node_modules_1t0y5jt._.js → node_modules_0lrjk5t._.js} +1 -1
  203. package/.next/server/chunks/ssr/{node_modules_13f2md6._.js → node_modules_0m93zeg._.js} +1 -1
  204. package/.next/server/chunks/ssr/{node_modules_1nhw9qg._.js → node_modules_0n1kj4p._.js} +1 -1
  205. package/.next/server/chunks/ssr/{node_modules_1k29j1j._.js → node_modules_0ndvxub._.js} +1 -1
  206. package/.next/server/chunks/ssr/{node_modules_16i4o_3._.js → node_modules_13r44jq._.js} +1 -1
  207. package/.next/server/chunks/ssr/{node_modules_0fbw5-u._.js → node_modules_17lrt3y._.js} +1 -1
  208. package/.next/server/chunks/ssr/{node_modules_1d-is1o._.js → node_modules_18_dk7_._.js} +1 -1
  209. package/.next/server/chunks/ssr/{node_modules_1hn_sd5._.js → node_modules_19dp7ko._.js} +1 -1
  210. package/.next/server/chunks/ssr/{node_modules_20ynonm._.js → node_modules_1dwguw_._.js} +1 -1
  211. package/.next/server/chunks/ssr/{node_modules_00d6675._.js → node_modules_1hd-5tv._.js} +1 -1
  212. package/.next/server/chunks/ssr/{node_modules_1ee8gav._.js → node_modules_1hn8z1f._.js} +1 -1
  213. package/.next/server/chunks/ssr/{node_modules_0bue6gy._.js → node_modules_1n5ygqe._.js} +1 -1
  214. package/.next/server/chunks/ssr/{node_modules_1_588_4._.js → node_modules_1q0p85z._.js} +1 -1
  215. package/.next/server/chunks/ssr/{node_modules_0ipn1ho._.js → node_modules_1toafc-._.js} +1 -1
  216. package/.next/server/chunks/ssr/{node_modules_0_fvxnt._.js → node_modules_1xyd7ov._.js} +1 -1
  217. package/.next/server/chunks/ssr/{node_modules_1v0077l._.js → node_modules_1zu988w._.js} +1 -1
  218. package/.next/server/chunks/ssr/{node_modules_06kvvuo._.js → node_modules_20yebtj._.js} +1 -1
  219. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_092s8nx._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0m9a4y0._.js} +1 -1
  220. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1nvexgu._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_13w_wy9._.js} +1 -1
  221. package/.next/server/chunks/ssr/node_modules_consola_dist_chunks_prompt_mjs_05cwqv2._.js +47 -0
  222. package/.next/server/middleware-build-manifest.js +3 -3
  223. package/.next/server/pages/404.html +1 -1
  224. package/.next/server/pages/500.html +1 -1
  225. package/.next/server/server-reference-manifest.js +1 -1
  226. package/.next/server/server-reference-manifest.json +64 -42
  227. package/.next/static/chunks/05b6nx_o3_f_n.js +1 -0
  228. package/.next/static/chunks/{3aquirz5h71da.js → 07kl352c-lvcz.js} +1 -1
  229. package/.next/static/chunks/0dmns-gi0raa4.js +1 -0
  230. package/.next/static/chunks/0oc4_xoia77dg.css +1 -0
  231. package/.next/static/chunks/0pheo8m3a-rzi.js +1 -0
  232. package/.next/static/chunks/{2ihkf6l2jowo9.js → 18vhba44l1fc9.js} +3 -3
  233. package/.next/static/chunks/19i8h2t-5evjx.js +1 -0
  234. package/.next/static/chunks/{1gy3bbv7usnjo.js → 1c5fcj473025q.js} +1 -1
  235. package/.next/static/chunks/1pi_hbmjw-f-z.js +1 -0
  236. package/.next/static/chunks/{0tydnn2kybibk.js → 1twt6k09vg4np.js} +1 -1
  237. package/.next/static/chunks/{21rk8w7bda-su.js → 28gotuisldmom.js} +1 -1
  238. package/.next/static/chunks/{3xxa2j56-f3nm.js → 2998p0y7k1c8z.js} +1 -1
  239. package/.next/static/chunks/2l233xfycjpd8.js +1 -0
  240. package/.next/static/chunks/2p5n7pa3c40t-.js +2 -0
  241. package/.next/static/chunks/2ru1q132af7h7.js +1 -0
  242. package/.next/static/chunks/{2fq_86jvq9ymq.js → 2t8wqycwg3y04.js} +2 -2
  243. package/.next/static/chunks/32z_ypgtchw48.js +1 -0
  244. package/.next/static/chunks/{247d-r95j8xs0.js → 33pyjb3xd1iez.js} +1 -1
  245. package/.next/static/chunks/3786h5vayt80-.js +28 -0
  246. package/.next/static/chunks/3_h9txt3tq8t8.js +28 -0
  247. package/.next/static/chunks/{1khakdu_iuedc.js → 3ard_noqapnw1.js} +1 -1
  248. package/.next/static/chunks/{1fr5m75pwtyic.js → 3omud5xunrk1f.js} +1 -1
  249. package/.next/static/chunks/42dnrkbph9e-1.js +1 -0
  250. package/app/api/events/app-event.client.ts +24 -0
  251. package/app/api/events/app-event.server.ts +45 -0
  252. package/app/api/events/app-event.ts +44 -0
  253. package/app/api/llm-model/catalog/route.ts +12 -0
  254. package/app/api/llm-model/route.ts +21 -0
  255. package/app/api/query-key.ts +144 -0
  256. package/app/api/thursday/tool-call/route.ts +67 -0
  257. package/components/ui/button-group.tsx +45 -0
  258. package/components/ui/custom-icon.tsx +259 -0
  259. package/components/ui/dropdown-menu.tsx +271 -0
  260. package/components/ui/folded-text.tsx +68 -0
  261. package/components/ui/input-group.tsx +157 -0
  262. package/components/ui/json-view.tsx +240 -0
  263. package/components/ui/shiny-text.tsx +141 -0
  264. package/components/ui/text-type.tsx +213 -0
  265. package/components/ui/theme-sync.tsx +9 -0
  266. package/database/migrations/{20260908030742_rainy_marvel_zombies → 20260909060813_optimal_sabretooth}/migration.sql +7 -0
  267. package/database/migrations/{20260908030742_rainy_marvel_zombies → 20260909060813_optimal_sabretooth}/snapshot.json +54 -1
  268. package/database/migrations/20260909063821_bitter_tenebrous/migration.sql +1 -0
  269. package/database/migrations/20260909063821_bitter_tenebrous/snapshot.json +1285 -0
  270. package/docs/how-it-works.md +59 -0
  271. package/docs/images/keeps-going.png +0 -0
  272. package/docs/images/task-thread.png +0 -0
  273. package/docs/images/two-minds.png +0 -0
  274. package/features/ai/load-tools.ts +55 -5
  275. package/features/ai/prompts/bot.prompt.ts +121 -26
  276. package/features/ai/prompts/memory-tidy.prompt.ts +7 -1
  277. package/features/ai/prompts/prompt-helper.ts +31 -5
  278. package/features/ai/prompts/thursday.prompt.ts +2 -0
  279. package/features/ai/tools/bot.tool.ts +37 -18
  280. package/features/ai/tools/mcp.tool.ts +5 -5
  281. package/features/ai/tools/memory.tool.ts +17 -10
  282. package/features/ai/tools/studio.tool.ts +5 -5
  283. package/features/ai/tools/tool-name.ts +2 -0
  284. package/features/ai/tools/workspace.tool.ts +33 -5
  285. package/features/bot/bot.action.ts +31 -4
  286. package/features/bot/bot.notes.ts +120 -0
  287. package/features/bot/bot.query.ts +56 -1
  288. package/features/bot/bot.run.ts +43 -3
  289. package/features/bot/bot.runner.ts +94 -20
  290. package/features/bot/bot.schema.ts +17 -0
  291. package/features/bot/components/bot-room.tsx +405 -306
  292. package/features/bot/components/bot-setting.tsx +123 -20
  293. package/features/bot/task.query.ts +18 -5
  294. package/features/memory/components/memory-setting.tsx +11 -2
  295. package/features/memory/memory.query.ts +9 -2
  296. package/features/memory/memory.schema.ts +30 -0
  297. package/features/skills/components/skills-setting.tsx +9 -1
  298. package/features/workspace/workspace.ts +136 -3
  299. package/hooks/use-draft.ts +37 -0
  300. package/hooks/use-hotkey.ts +105 -0
  301. package/hooks/use-object-state.ts +51 -0
  302. package/hooks/use-on-visible.ts +72 -0
  303. package/hooks/use-theme.ts +106 -0
  304. package/hooks/use-wake-word.ts +262 -0
  305. package/lib/realtime/realtime.driver.ts +34 -1
  306. package/lib/realtime/realtime.protocol.ts +6 -0
  307. package/lib/sandbox.ts +9 -1
  308. package/lib/tokens.ts +19 -0
  309. package/package.json +1 -1
  310. package/.next/server/chunks/[root-of-the-server]__02kt8yn._.js +0 -10
  311. package/.next/server/chunks/[root-of-the-server]__0h59di-._.js +0 -5
  312. package/.next/server/chunks/[root-of-the-server]__0qjqtwo._.js +0 -5
  313. package/.next/server/chunks/[root-of-the-server]__0yk6s3w._.js +0 -5
  314. package/.next/server/chunks/[root-of-the-server]__0z3gelv._.js +0 -3
  315. package/.next/server/chunks/[root-of-the-server]__11w_7_3._.js +0 -3
  316. package/.next/server/chunks/[root-of-the-server]__1_0q_9w._.js +0 -3
  317. package/.next/server/chunks/[root-of-the-server]__1gmn1cs._.js +0 -10
  318. package/.next/server/chunks/_0fzqt2y._.js +0 -100
  319. package/.next/server/chunks/_0jgm3b8._.js +0 -55
  320. package/.next/server/chunks/_0ks6_sg._.js +0 -55
  321. package/.next/server/chunks/_0tzfesa._.js +0 -3
  322. package/.next/server/chunks/_0zmestz._.js +0 -55
  323. package/.next/server/chunks/_12nr4xc._.js +0 -3
  324. package/.next/server/chunks/_1hzrsvg._.js +0 -55
  325. package/.next/server/chunks/_1uj4_io._.js +0 -10
  326. package/.next/server/chunks/_1yldgo4._.js +0 -55
  327. package/.next/server/chunks/features_0scmr4i._.js +0 -3
  328. package/.next/server/chunks/features_bot_bot_query_ts_12mgkl2._.js +0 -3
  329. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_0ykklj0._.js +0 -3
  330. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1ryg3wh._.js +0 -3
  331. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1vwbnq_._.js +0 -3
  332. package/.next/server/chunks/ssr/[root-of-the-server]__01id-v3._.js +0 -3
  333. package/.next/server/chunks/ssr/[root-of-the-server]__0b-0i32._.js +0 -3
  334. package/.next/server/chunks/ssr/[root-of-the-server]__185grso._.js +0 -3
  335. package/.next/server/chunks/ssr/[root-of-the-server]__1minz8_._.js +0 -3
  336. package/.next/server/chunks/ssr/_0j4v8of._.js +0 -3
  337. package/.next/server/chunks/ssr/_0l81bzy._.js +0 -3
  338. package/.next/server/chunks/ssr/_10uvw3l._.js +0 -3
  339. package/.next/server/chunks/ssr/_1jbv7m1._.js +0 -3
  340. package/.next/server/chunks/ssr/lib_realtime_0aetuyp._.js +0 -24
  341. package/.next/server/chunks/ssr/lib_realtime_18k_aj-._.js +0 -24
  342. package/.next/server/chunks/ssr/node_modules_zod_v4_classic_errors_05xv7vp.js +0 -3
  343. package/.next/static/chunks/0yysv1gzin17t.js +0 -1
  344. package/.next/static/chunks/1keib_gt066gc.js +0 -1
  345. package/.next/static/chunks/28g42tw8tsvhd.js +0 -1
  346. package/.next/static/chunks/2cwjgkt_hoyhj.js +0 -22
  347. package/.next/static/chunks/2rbf1fpd8n80-.js +0 -22
  348. package/.next/static/chunks/2ukj8k69y89um.js +0 -1
  349. package/.next/static/chunks/2wngeetfnzxkp.js +0 -2
  350. package/.next/static/chunks/388-t2v72jh39.css +0 -1
  351. package/.next/static/chunks/3fqvc0cg-atq_.js +0 -1
  352. package/.next/static/chunks/3p4egvfjxpatb.js +0 -1
  353. package/.next/static/chunks/3qe1w1ei-huhl.js +0 -1
  354. package/.next/static/chunks/3y40riycdip-i.js +0 -1
  355. package/.next/static/chunks/45a6zbtkelph9.js +0 -1
  356. /package/.next/static/{X34BUd9bfdH27ripuwwBm → YR4NWcDDuzwLbTTU7U7Vr}/_buildManifest.js +0 -0
  357. /package/.next/static/{X34BUd9bfdH27ripuwwBm → YR4NWcDDuzwLbTTU7U7Vr}/_clientMiddlewareManifest.js +0 -0
  358. /package/.next/static/{X34BUd9bfdH27ripuwwBm → YR4NWcDDuzwLbTTU7U7Vr}/_ssgManifest.js +0 -0
@@ -13,7 +13,10 @@ import {
13
13
  listCallTurns,
14
14
  } from "@/features/thursday/thursday.query";
15
15
  import { pathsIn } from "@/features/workspace/file-kind";
16
- import { closeJobShell } from "@/features/workspace/workspace";
16
+ import {
17
+ closeJobShell,
18
+ removeJobScratch,
19
+ } from "@/features/workspace/workspace";
17
20
  import { desktopNotify } from "@/lib/desktop-notify";
18
21
  import { logger } from "@/lib/logger";
19
22
  import { publicError } from "@/lib/public-error";
@@ -22,6 +25,7 @@ import { condenseThread, runBot, type TaskEvent } from "./bot.run";
22
25
  import { TASK_CONTINUE, type TaskStatus } from "./bot.schema";
23
26
  import {
24
27
  addTaskUsage,
28
+ deleteFinishedTasks,
25
29
  deleteMessages,
26
30
  deleteTask,
27
31
  findTask,
@@ -189,32 +193,60 @@ export async function cancelTask(id: string) {
189
193
  /** Deletes the job, stopping it first if it is still running. */
190
194
  export async function removeTask(id: string) {
191
195
  return taskLock(id, async () => {
196
+ const task = await findTask(id);
192
197
  running.get(id)?.stop.abort();
193
198
  running.delete(id);
194
199
  void closeJobShell(id);
195
- return deleteTask(id);
200
+ const gone = await deleteTask(id);
201
+ // The working folder's lifetime is the row's: with the job gone, what it was
202
+ // working with is nobody's (workspace.ts jobScratch).
203
+ if (gone && task) await removeJobScratch(id, task.label);
204
+ return gone;
196
205
  });
197
206
  }
198
207
 
208
+ /**
209
+ * Clearing finished jobs from the screen, and their working folders with them.
210
+ * Lives here rather than in the query because a row and a folder go together
211
+ * and only one of the two is the database's.
212
+ */
213
+ export async function removeFinishedTasks(): Promise<number> {
214
+ const removed = await deleteFinishedTasks();
215
+ for (const task of removed) await removeJobScratch(task.id, task.label);
216
+ return removed.length;
217
+ }
218
+
199
219
  /**
200
220
  * At boot (instrumentation): rows the last process left as running become
201
221
  * `waiting` with the one continue option, not failed. The answer resumes the
202
- * stored thread (answerTask).
222
+ * stored thread (answerTask). Nothing else needs to reconcile — a run that ends
223
+ * badly records it itself (drive), and the write that does so is durable
224
+ * (database/db.ts oneAtATime).
203
225
  */
204
226
  export async function sweepTasks() {
205
227
  for (const id of await listRunningTaskIds()) {
206
- if (running.has(id)) continue;
207
- await updateTask(id, {
208
- status: "waiting",
209
- outcome:
210
- "The server restarted while this was running. Everything it had done is still here. Pick it back up?",
211
- pending: { toolCallId: null, options: [TASK_CONTINUE] },
212
- reported: false,
213
- endedAt: null,
214
- });
228
+ if (!running.has(id)) {
229
+ await abandon(id, "The server restarted while this was running");
230
+ }
215
231
  }
216
232
  }
217
233
 
234
+ /**
235
+ * Puts a run that is no longer running back where the user can pick it up: the
236
+ * same shape a step limit leaves (`waiting` with the one continue option), so
237
+ * the screen and Thursday need no third state for it. The thread stays whole,
238
+ * and answering resumes from it.
239
+ */
240
+ async function abandon(id: string, why: string) {
241
+ await updateTask(id, {
242
+ status: "waiting",
243
+ outcome: `${why}. Everything it had done is still here. Pick it back up?`,
244
+ pending: { toolCallId: null, options: [TASK_CONTINUE] },
245
+ reported: false,
246
+ endedAt: null,
247
+ });
248
+ }
249
+
218
250
  /**
219
251
  * The browser closed (app-event.server presence): every run stops where it is
220
252
  * and waits with the one continue option, the way a restart leaves it
@@ -289,6 +321,21 @@ class ThreadWriter {
289
321
  this.seq = seq;
290
322
  }
291
323
 
324
+ /**
325
+ * A line from the app rather than from anyone in the room. A user row so a
326
+ * resumed run reads it as something it was told, and `note` so the screen
327
+ * draws it as a note and `rosterOf` does not take it for a person speaking.
328
+ */
329
+ async note(text: string) {
330
+ await upsertMessage(this.taskId, ++this.seq, {
331
+ bot: null,
332
+ parent: null,
333
+ role: "user",
334
+ content: text,
335
+ note: true,
336
+ });
337
+ }
338
+
292
339
  private step(event: TaskEvent) {
293
340
  const key = `${event.bot} ${event.parent ?? ""}`;
294
341
  let step = this.steps.get(key);
@@ -307,7 +354,7 @@ class ThreadWriter {
307
354
  seq: number,
308
355
  event: TaskEvent,
309
356
  message: ModelMessage,
310
- extra: { compact?: boolean } = {},
357
+ extra: { compact?: boolean; note?: boolean } = {},
311
358
  ) {
312
359
  const input: TaskMessageInput = {
313
360
  bot: event.bot,
@@ -315,6 +362,7 @@ class ThreadWriter {
315
362
  role: message.role,
316
363
  content: message.content,
317
364
  compact: extra.compact ?? false,
365
+ note: extra.note ?? false,
318
366
  };
319
367
  return upsertMessage(this.taskId, seq, input);
320
368
  }
@@ -387,7 +435,7 @@ class ThreadWriter {
387
435
  ++this.seq,
388
436
  event,
389
437
  { role: "user", content: event.text },
390
- { compact: true },
438
+ { compact: true, note: true },
391
439
  );
392
440
 
393
441
  case "interjection":
@@ -422,6 +470,8 @@ async function drive(
422
470
  outcome: string;
423
471
  pending: { toolCallId: string | null; options: string[] } | null;
424
472
  } | null = null;
473
+ /** What broke, as the provider said it; the thread carries it too (below). */
474
+ let broken: string | null = null;
425
475
 
426
476
  try {
427
477
  await runBot(input, {
@@ -465,6 +515,7 @@ async function drive(
465
515
  : { toolCallId: null, options: [TASK_CONTINUE] },
466
516
  };
467
517
  } else if (event.type === "error") {
518
+ broken = event.message;
468
519
  ending = {
469
520
  status: "failed",
470
521
  outcome: broke(event.message),
@@ -474,9 +525,10 @@ async function drive(
474
525
  },
475
526
  });
476
527
  } catch (cause) {
528
+ broken = modelErrorToString(cause);
477
529
  ending = {
478
530
  status: "failed",
479
- outcome: broke(modelErrorToString(cause)),
531
+ outcome: broke(broken),
480
532
  pending: null,
481
533
  };
482
534
  } finally {
@@ -491,11 +543,33 @@ async function drive(
491
543
  outcome: "Stopped without handing anything back.",
492
544
  pending: null,
493
545
  };
494
- await updateTask(id, {
495
- ...final,
496
- reported: false,
497
- endedAt: final.status === "waiting" ? null : new Date(),
498
- });
546
+ // A thread that simply stops cannot be read: the room shows a tool call with
547
+ // no answer, and a resumed run has no idea why. The task row says it too, but
548
+ // the row is a status and this is the story. Never at the cost of the status
549
+ // write, which is what tells anyone the job ended at all.
550
+ if (final.status === "failed") {
551
+ await thread
552
+ .note(`The run stopped here: ${broken ?? final.outcome}`)
553
+ .catch((cause) => logger.warn(`task ${id}: break not written`, cause));
554
+ }
555
+
556
+ // The one write that must land: everything else in this run has already
557
+ // happened, and this is what tells the screen and Thursday it ended at all.
558
+ // Writes are serialised, so contention no longer throws here (database/db.ts);
559
+ // what is left is a database that cannot be written to, which a retry would
560
+ // not help either. Said plainly rather than thrown into `after`, where it
561
+ // would read as an unexplained request failure — and the row stays `running`,
562
+ // which the next boot reconciles (sweepTasks).
563
+ try {
564
+ await updateTask(id, {
565
+ ...final,
566
+ reported: false,
567
+ endedAt: final.status === "waiting" ? null : new Date(),
568
+ });
569
+ } catch (cause) {
570
+ logger.error(`task ${id}: could not record how it ended`, cause);
571
+ return;
572
+ }
499
573
 
500
574
  // Close the job's browser session (workspace.ts jobShellEnv) unless waiting:
501
575
  // a bot stopped at a login wall needs the page the user is typing into.
@@ -78,6 +78,9 @@ export const BotSchema = z.object({
78
78
  tokens: TokenUsageSchema,
79
79
  /** When this bot's latest job last moved; null if it never ran. Carried here so the roster need not page through history. */
80
80
  lastJobAt: DateLikeSchema.nullish(),
81
+ /** The bot's own notes, written by itself at report time. Shown, never edited; the user's only move is to clear them. */
82
+ note: z.string().nullish(),
83
+ noteAt: DateLikeSchema.nullish(),
81
84
  });
82
85
 
83
86
  export const BotFormSchema = z.object({
@@ -140,6 +143,20 @@ export const DEFAULT_BOT: JobBot = {
140
143
  model: null,
141
144
  };
142
145
 
146
+ // A bot's own instructions (database bot_note, features/bot/bot.notes): the setting
147
+ // behind them. The lines themselves are per bot; whether any bot keeps them is not.
148
+
149
+ /** Config key (features/config config.query) the switch lives under. */
150
+ export const BOT_NOTES_KEY = "BOT_NOTES";
151
+
152
+ /**
153
+ * On unless it was switched off, the other way round from the memory read-back:
154
+ * a pass runs only when a job actually turned something up, and costs one small
155
+ * call when it does — so a bot that never learns anything never spends.
156
+ */
157
+ export const isBotNotesOn = (value: string | undefined) =>
158
+ value?.trim() !== "off";
159
+
143
160
  /**
144
161
  * `waiting`: the bot stopped on a question only the user can answer; the answer
145
162
  * resumes the same thread. `done` and `failed` can be resumed as well.