thursday-agent 0.21.0 → 0.22.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 (397) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +3 -3
  3. package/.next/prerender-manifest.json +3 -3
  4. package/.next/server/app/_global-error/page.js.nft.json +1 -1
  5. package/.next/server/app/_global-error.html +1 -1
  6. package/.next/server/app/_global-error.rsc +1 -1
  7. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  8. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  10. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  11. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  12. package/.next/server/app/_not-found.html +1 -1
  13. package/.next/server/app/_not-found.rsc +12 -12
  14. package/.next/server/app/_not-found.segments/_full.segment.rsc +12 -12
  15. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +11 -11
  16. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  17. package/.next/server/app/api/artifact/route.js +9 -8
  18. package/.next/server/app/api/artifact/route.js.nft.json +1 -1
  19. package/.next/server/app/api/bot/memory/files/route.js.nft.json +1 -1
  20. package/.next/server/app/api/bot/memory/route.js +9 -8
  21. package/.next/server/app/api/bot/memory/route.js.nft.json +1 -1
  22. package/.next/server/app/api/bot/route.js +9 -8
  23. package/.next/server/app/api/bot/route.js.nft.json +1 -1
  24. package/.next/server/app/api/bot/thread/[id]/route.js +7 -6
  25. package/.next/server/app/api/bot/thread/[id]/route.js.nft.json +1 -1
  26. package/.next/server/app/api/bot/thread/file/route.js +17 -16
  27. package/.next/server/app/api/bot/thread/file/route.js.nft.json +1 -1
  28. package/.next/server/app/api/bot/thread/route.js +8 -7
  29. package/.next/server/app/api/bot/thread/route.js.nft.json +1 -1
  30. package/.next/server/app/api/config/route.js +5 -4
  31. package/.next/server/app/api/config/route.js.nft.json +1 -1
  32. package/.next/server/app/api/events/route.js.nft.json +1 -1
  33. package/.next/server/app/api/favicon/[host]/route.js.nft.json +1 -1
  34. package/.next/server/app/api/file/[...path]/route.js.nft.json +1 -1
  35. package/.next/server/app/api/llm-model/automatic/route.js +8 -7
  36. package/.next/server/app/api/llm-model/automatic/route.js.nft.json +1 -1
  37. package/.next/server/app/api/llm-model/catalog/[provider]/route.js +8 -7
  38. package/.next/server/app/api/llm-model/catalog/[provider]/route.js.nft.json +1 -1
  39. package/.next/server/app/api/llm-model/credits/[provider]/route.js +8 -7
  40. package/.next/server/app/api/llm-model/credits/[provider]/route.js.nft.json +1 -1
  41. package/.next/server/app/api/llm-model/route.js +9 -8
  42. package/.next/server/app/api/llm-model/route.js.nft.json +1 -1
  43. package/.next/server/app/api/llm-model/subscription/route.js +9 -8
  44. package/.next/server/app/api/llm-model/subscription/route.js.nft.json +1 -1
  45. package/.next/server/app/api/mcp/[name]/route.js +6 -5
  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 +6 -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 +6 -5
  50. package/.next/server/app/api/mcp/route.js.nft.json +1 -1
  51. package/.next/server/app/api/mcp/tools/route.js +6 -5
  52. package/.next/server/app/api/mcp/tools/route.js.nft.json +1 -1
  53. package/.next/server/app/api/memory/edit/route.js +13 -12
  54. package/.next/server/app/api/memory/edit/route.js.nft.json +1 -1
  55. package/.next/server/app/api/memory/route.js +6 -5
  56. package/.next/server/app/api/memory/route.js.nft.json +1 -1
  57. package/.next/server/app/api/reach/route.js +19 -18
  58. package/.next/server/app/api/reach/route.js.nft.json +1 -1
  59. package/.next/server/app/api/routine/route.js +9 -8
  60. package/.next/server/app/api/routine/route.js.nft.json +1 -1
  61. package/.next/server/app/api/running/route.js.nft.json +1 -1
  62. package/.next/server/app/api/signins/route.js +5 -4
  63. package/.next/server/app/api/signins/route.js.nft.json +1 -1
  64. package/.next/server/app/api/skills/[source]/[name]/route.js +9 -8
  65. package/.next/server/app/api/skills/[source]/[name]/route.js.nft.json +1 -1
  66. package/.next/server/app/api/skills/route.js +9 -8
  67. package/.next/server/app/api/skills/route.js.nft.json +1 -1
  68. package/.next/server/app/api/thursday/call/end/route.js +6 -5
  69. package/.next/server/app/api/thursday/call/end/route.js.nft.json +1 -1
  70. package/.next/server/app/api/thursday/call/plan/route.js +15 -14
  71. package/.next/server/app/api/thursday/call/plan/route.js.nft.json +1 -1
  72. package/.next/server/app/api/thursday/call/route.js +7 -6
  73. package/.next/server/app/api/thursday/call/route.js.nft.json +1 -1
  74. package/.next/server/app/api/thursday/settings/route.js +6 -5
  75. package/.next/server/app/api/thursday/settings/route.js.nft.json +1 -1
  76. package/.next/server/app/api/thursday/text/route.js +17 -16
  77. package/.next/server/app/api/thursday/text/route.js.nft.json +1 -1
  78. package/.next/server/app/api/thursday/tool-call/route.js +15 -14
  79. package/.next/server/app/api/thursday/tool-call/route.js.nft.json +1 -1
  80. package/.next/server/app/api/workspace/files/route.js +8 -7
  81. package/.next/server/app/api/workspace/files/route.js.nft.json +1 -1
  82. package/.next/server/app/api/workspace/route.js +9 -8
  83. package/.next/server/app/api/workspace/route.js.nft.json +1 -1
  84. package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +11 -11
  85. package/.next/server/app/artifact/[...path]/page.js.nft.json +1 -1
  86. package/.next/server/app/artifact/[...path]/page_client-reference-manifest.js +1 -1
  87. package/.next/server/app/favicon.ico/route.js.nft.json +1 -1
  88. package/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  89. package/.next/server/app/page/react-loadable-manifest.json +15 -1
  90. package/.next/server/app/page/server-reference-manifest.json +63 -63
  91. package/.next/server/app/page.js.nft.json +1 -1
  92. package/.next/server/app/page_client-reference-manifest.js +1 -1
  93. package/.next/server/chunks/[root-of-the-server]__0-5d50l._.js +3 -0
  94. package/.next/server/chunks/[root-of-the-server]__005onk_._.js +3 -0
  95. package/.next/server/chunks/[root-of-the-server]__00dtf7h._.js +3 -0
  96. package/.next/server/chunks/[root-of-the-server]__00f051a._.js +7 -0
  97. package/.next/server/chunks/[root-of-the-server]__019e1fy._.js +2 -2
  98. package/.next/server/chunks/[root-of-the-server]__01jpmcj._.js +1 -1
  99. package/.next/server/chunks/[root-of-the-server]__0340k46._.js +7 -0
  100. package/.next/server/chunks/[root-of-the-server]__03bjojd._.js +1 -1
  101. package/.next/server/chunks/[root-of-the-server]__03vunn6._.js +1 -1
  102. package/.next/server/chunks/[root-of-the-server]__05fq824._.js +3 -0
  103. package/.next/server/chunks/[root-of-the-server]__06kxzw-._.js +1 -1
  104. package/.next/server/chunks/[root-of-the-server]__08922kg._.js +3 -0
  105. package/.next/server/chunks/[root-of-the-server]__0atwstu._.js +1 -1
  106. package/.next/server/chunks/[root-of-the-server]__0btxiu1._.js +3 -0
  107. package/.next/server/chunks/[root-of-the-server]__0d-dfqm._.js +1 -1
  108. package/.next/server/chunks/[root-of-the-server]__0gmxpev._.js +3 -0
  109. package/.next/server/chunks/[root-of-the-server]__0itmdqy._.js +3 -0
  110. package/.next/server/chunks/[root-of-the-server]__0m0qglo._.js +5 -0
  111. package/.next/server/chunks/[root-of-the-server]__0mh1tgg._.js +1 -1
  112. package/.next/server/chunks/[root-of-the-server]__0ncs9uu._.js +1 -1
  113. package/.next/server/chunks/[root-of-the-server]__0ndw2yj._.js +1 -1
  114. package/.next/server/chunks/[root-of-the-server]__0sfx6id._.js +3 -0
  115. package/.next/server/chunks/[root-of-the-server]__0xn7a8p._.js +3 -0
  116. package/.next/server/chunks/[root-of-the-server]__13hng6h._.js +1 -1
  117. package/.next/server/chunks/[root-of-the-server]__1478lu3._.js +1 -1
  118. package/.next/server/chunks/[root-of-the-server]__16y0k92._.js +3 -0
  119. package/.next/server/chunks/[root-of-the-server]__17kdjf6._.js +1 -1
  120. package/.next/server/chunks/[root-of-the-server]__17m7ag9._.js +1 -1
  121. package/.next/server/chunks/[root-of-the-server]__19aqyg-._.js +1 -1
  122. package/.next/server/chunks/[root-of-the-server]__1_04mcf._.js +1 -1
  123. package/.next/server/chunks/[root-of-the-server]__1a0xgyh._.js +1 -1
  124. package/.next/server/chunks/[root-of-the-server]__1ceammd._.js +1 -1
  125. package/.next/server/chunks/{[root-of-the-server]__01y-8gg._.js → [root-of-the-server]__1clkgmj._.js} +3 -3
  126. package/.next/server/chunks/[root-of-the-server]__1dth047._.js +1 -1
  127. package/.next/server/chunks/[root-of-the-server]__1g08s7l._.js +5 -0
  128. package/.next/server/chunks/[root-of-the-server]__1huywqp._.js +1 -1
  129. package/.next/server/chunks/[root-of-the-server]__1ij4h2a._.js +3 -0
  130. package/.next/server/chunks/[root-of-the-server]__1ndi14y._.js +1 -1
  131. package/.next/server/chunks/[root-of-the-server]__1o7z93z._.js +1 -1
  132. package/.next/server/chunks/[root-of-the-server]__1onvx8x._.js +1 -1
  133. package/.next/server/chunks/[root-of-the-server]__1q1s4ls._.js +3 -0
  134. package/.next/server/chunks/[root-of-the-server]__1qa67zs._.js +3 -0
  135. package/.next/server/chunks/[root-of-the-server]__1t-mfa4._.js +5 -0
  136. package/.next/server/chunks/[root-of-the-server]__20ofm9t._.js +3 -0
  137. package/.next/server/chunks/_0-qt5if._.js +1 -1
  138. package/.next/server/chunks/_02mn8d7._.js +1 -1
  139. package/.next/server/chunks/_03p6r2-._.js +1 -1
  140. package/.next/server/chunks/_0483t_f._.js +1 -1
  141. package/.next/server/chunks/_06b5b4-._.js +1 -1
  142. package/.next/server/chunks/_06u9yo-._.js +1 -1
  143. package/.next/server/chunks/_07pkeds._.js +1 -1
  144. package/.next/server/chunks/_08354bn._.js +21 -19
  145. package/.next/server/chunks/_09rtyfn._.js +93 -91
  146. package/.next/server/chunks/_0cq69mm._.js +1 -1
  147. package/.next/server/chunks/_0fau3ya._.js +1 -1
  148. package/.next/server/chunks/_0ggqpiz._.js +1 -1
  149. package/.next/server/chunks/_0gxz_1b._.js +1 -1
  150. package/.next/server/chunks/_0lcthk8._.js +1 -1
  151. package/.next/server/chunks/_0p27in2._.js +1 -1
  152. package/.next/server/chunks/_0ue8nq-._.js +1 -1
  153. package/.next/server/chunks/_0uv1gs1._.js +1 -1
  154. package/.next/server/chunks/_0wyh244._.js +21 -19
  155. package/.next/server/chunks/_0zwjr-g._.js +1 -1
  156. package/.next/server/chunks/_1-wp0r0._.js +1 -1
  157. package/.next/server/chunks/_11y8h29._.js +1 -1
  158. package/.next/server/chunks/_14xuq46._.js +93 -91
  159. package/.next/server/chunks/_17fjc-7._.js +5 -0
  160. package/.next/server/chunks/_1823_7a._.js +4 -4
  161. package/.next/server/chunks/_18z965x._.js +1 -1
  162. package/.next/server/chunks/_1ac33qw._.js +1 -1
  163. package/.next/server/chunks/_1cw6-rv._.js +3 -0
  164. package/.next/server/chunks/_1dcbwn-._.js +1 -1
  165. package/.next/server/chunks/_1evvnbp._.js +18 -0
  166. package/.next/server/chunks/_1gn2r2q._.js +15 -15
  167. package/.next/server/chunks/{_00lwnht._.js → _1hw1ujv._.js} +2 -2
  168. package/.next/server/chunks/_1icgbi8._.js +18 -0
  169. package/.next/server/chunks/{_0txk_9z._.js → _1jtvbp9._.js} +2 -2
  170. package/.next/server/chunks/_1ko5shz._.js +1 -1
  171. package/.next/server/chunks/_1ksyu6r._.js +1 -1
  172. package/.next/server/chunks/{_1ntwp1s._.js → _1mgzs18._.js} +1 -1
  173. package/.next/server/chunks/_1q42187._.js +4 -4
  174. package/.next/server/chunks/_1q6e56i._.js +15 -15
  175. package/.next/server/chunks/_1t43w6q._.js +1 -1
  176. package/.next/server/chunks/_1t8fv7b._.js +18 -0
  177. package/.next/server/chunks/_1tjwvoz._.js +1 -1
  178. package/.next/server/chunks/_1ufbxe1._.js +1 -1
  179. package/.next/server/chunks/_1uu4wjr._.js +1 -1
  180. package/.next/server/chunks/{_0q6gng9._.js → _1v4id5q._.js} +2 -2
  181. package/.next/server/chunks/{_07vwkt7._.js → _1v5qol2._.js} +2 -2
  182. package/.next/server/chunks/_1wg0cqo._.js +1 -1
  183. package/.next/server/chunks/_1wgae1c._.js +3 -0
  184. package/.next/server/chunks/_1x2xiyw._.js +1 -1
  185. package/.next/server/chunks/_1xps4ob._.js +3 -0
  186. package/.next/server/chunks/_201k0ah._.js +1 -1
  187. package/.next/server/chunks/config_ts_1g4sz5o._.js +1 -1
  188. package/.next/server/chunks/features_bot_08z387_._.js +4 -4
  189. package/.next/server/chunks/node_modules_zod_v4_01bha1c._.js +60 -0
  190. package/.next/server/chunks/node_modules_zod_v4_0b99z6a._.js +60 -0
  191. package/.next/server/chunks/node_modules_zod_v4_0r3ybe4._.js +60 -0
  192. package/.next/server/chunks/node_modules_zod_v4_1t1yj1u._.js +60 -0
  193. package/.next/server/chunks/node_modules_zod_v4_1zz6lo1._.js +60 -0
  194. package/.next/server/chunks/ssr/[root-of-the-server]__0eloa6y._.js +5 -5
  195. package/.next/server/chunks/ssr/[root-of-the-server]__0jjj49d._.js +3 -0
  196. package/.next/server/chunks/ssr/[root-of-the-server]__0yyxgt2._.js +3 -0
  197. package/.next/server/chunks/ssr/[root-of-the-server]__1867koj._.js +1 -1
  198. package/.next/server/chunks/ssr/[root-of-the-server]__203utm3._.js +3 -0
  199. package/.next/server/chunks/ssr/[root-of-the-server]__20t_4l2._.js +1 -1
  200. package/.next/server/chunks/ssr/_0-y08rv._.js +3 -0
  201. package/.next/server/chunks/ssr/_00buy3i._.js +162 -0
  202. package/.next/server/chunks/ssr/_014_wjp._.js +3 -0
  203. package/.next/server/chunks/ssr/_07m4ii5._.js +3 -0
  204. package/.next/server/chunks/ssr/_09a6bpd._.js +1 -1
  205. package/.next/server/chunks/ssr/{_1569s5b._.js → _0gn_i4s._.js} +2 -2
  206. package/.next/server/chunks/ssr/_0iuvjnw._.js +3 -0
  207. package/.next/server/chunks/ssr/_0j6rtjm._.js +6 -0
  208. package/.next/server/chunks/ssr/{_19u7y57._.js → _0ntol64._.js} +2 -2
  209. package/.next/server/chunks/ssr/_0ogkeu-._.js +3 -0
  210. package/.next/server/chunks/ssr/{_1h0hk_h._.js → _0t_e9rd._.js} +2 -2
  211. package/.next/server/chunks/ssr/{_1-zhg63._.js → _0u43zjx._.js} +2 -2
  212. package/.next/server/chunks/ssr/_0ux4i2m._.js +1 -1
  213. package/.next/server/chunks/ssr/{_1iix_k_._.js → _0xurp8n._.js} +2 -2
  214. package/.next/server/chunks/ssr/_10sc7ab._.js +3 -0
  215. package/.next/server/chunks/ssr/_12hdw8x._.js +22 -20
  216. package/.next/server/chunks/ssr/{_02ybodf._.js → _14nwim3._.js} +2 -2
  217. package/.next/server/chunks/ssr/{_2024r5e._.js → _16o81mn._.js} +2 -2
  218. package/.next/server/chunks/ssr/_1bfrntd._.js +2 -2
  219. package/.next/server/chunks/ssr/_1crszf7._.js +1 -1
  220. package/.next/server/chunks/ssr/_1e01b-_._.js +3 -0
  221. package/.next/server/chunks/ssr/{_0y0qnim._.js → _1gz4ov7._.js} +3 -3
  222. package/.next/server/chunks/ssr/_1neoj22._.js +2 -1
  223. package/.next/server/chunks/ssr/{_04ik9s8._.js → _1nfv27b._.js} +2 -2
  224. package/.next/server/chunks/ssr/_1nwey7a._.js +3 -0
  225. package/.next/server/chunks/ssr/_1soynbw._.js +2 -2
  226. package/.next/server/chunks/ssr/features_ai_components_model-picker_tsx_0ucb1y9._.js +1 -1
  227. package/.next/server/chunks/ssr/features_bot_06n7hmd._.js +3 -0
  228. package/.next/server/chunks/ssr/features_bot_0tb4ui-._.js +1 -1
  229. package/.next/server/chunks/ssr/{_07nmtxo._.js → features_bot_1knyan7._.js} +2 -2
  230. package/.next/server/chunks/ssr/{features_config_1l7bn84._.js → features_config_09wq1s9._.js} +3 -3
  231. package/.next/server/chunks/ssr/features_connectors_components_mcp-setting_tsx_0jmbgvp._.js +1 -1
  232. package/.next/server/chunks/ssr/features_memory_components_memory-setting_tsx_0oa43sw._.js +1 -1
  233. package/.next/server/chunks/ssr/features_routine_components_routine-setting_tsx_055fknz._.js +1 -1
  234. package/.next/server/chunks/ssr/features_thursday_0cf9y0b._.js +3 -0
  235. package/.next/server/chunks/ssr/features_thursday_components_ascii-orb_tsx_1yug8cw._.js +3 -0
  236. package/.next/server/chunks/ssr/features_thursday_components_here-globe_tsx_055duhw._.js +3 -0
  237. package/.next/server/chunks/ssr/{node_modules_1bj1zfp._.js → node_modules_01fukqn._.js} +1 -1
  238. package/.next/server/chunks/ssr/{node_modules_1r-1n7c._.js → node_modules_01v7ybp._.js} +1 -1
  239. package/.next/server/chunks/ssr/{node_modules_0f0lohc._.js → node_modules_0536cp2._.js} +1 -1
  240. package/.next/server/chunks/ssr/{node_modules_13iz-t6._.js → node_modules_056xgci._.js} +1 -1
  241. package/.next/server/chunks/ssr/{node_modules_1rnfv0r._.js → node_modules_06n6ruk._.js} +1 -1
  242. package/.next/server/chunks/ssr/{node_modules_1d5j3h5._.js → node_modules_08m1gvh._.js} +1 -1
  243. package/.next/server/chunks/ssr/{node_modules_1_j-et6._.js → node_modules_0_zk6yd._.js} +1 -1
  244. package/.next/server/chunks/ssr/{node_modules_0c1grmu._.js → node_modules_0cpegwf._.js} +1 -1
  245. package/.next/server/chunks/ssr/{node_modules_107249-._.js → node_modules_0e398ts._.js} +1 -1
  246. package/.next/server/chunks/ssr/{node_modules_0ja2eo8._.js → node_modules_0ie8g6a._.js} +2 -2
  247. package/.next/server/chunks/ssr/{node_modules_074pspl._.js → node_modules_0ksqeyy._.js} +1 -1
  248. package/.next/server/chunks/ssr/{node_modules_0ydatn4._.js → node_modules_0m-dnm-._.js} +1 -1
  249. package/.next/server/chunks/ssr/{node_modules_0eoqrzb._.js → node_modules_0m2oth3._.js} +1 -1
  250. package/.next/server/chunks/ssr/{node_modules_1b6sm1g._.js → node_modules_0yn2z6s._.js} +1 -1
  251. package/.next/server/chunks/ssr/{node_modules_0uuobx8._.js → node_modules_12hh0bx._.js} +1 -1
  252. package/.next/server/chunks/ssr/{node_modules_0q-53p6._.js → node_modules_13dwal5._.js} +1 -1
  253. package/.next/server/chunks/ssr/{node_modules_0efmaot._.js → node_modules_16tn8xu._.js} +1 -1
  254. package/.next/server/chunks/ssr/{node_modules_0x4geuk._.js → node_modules_19r9vjv._.js} +1 -1
  255. package/.next/server/chunks/ssr/{node_modules_0k9lm-f._.js → node_modules_1bvw77g._.js} +1 -1
  256. package/.next/server/chunks/ssr/{node_modules_1dgdpcc._.js → node_modules_1ctm_ju._.js} +1 -1
  257. package/.next/server/chunks/ssr/{node_modules_1oo6jfv._.js → node_modules_1dlue-g._.js} +1 -1
  258. package/.next/server/chunks/ssr/{node_modules_1sbozb5._.js → node_modules_1fqgrh0._.js} +1 -1
  259. package/.next/server/chunks/ssr/{node_modules_17eaxbw._.js → node_modules_1i-g3bz._.js} +1 -1
  260. package/.next/server/chunks/ssr/{node_modules_1b_78mo._.js → node_modules_1jf8aik._.js} +1 -1
  261. package/.next/server/chunks/ssr/{node_modules_0vva828._.js → node_modules_1kfbdfo._.js} +1 -1
  262. package/.next/server/chunks/ssr/{node_modules_0lu90ps._.js → node_modules_1zalmtr._.js} +1 -1
  263. package/.next/server/chunks/ssr/{node_modules_1qgte25._.js → node_modules_1zdz2zf._.js} +1 -1
  264. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0obor-y._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0nj1l8f._.js} +1 -1
  265. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0oip1-o._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_17ok98u._.js} +1 -1
  266. package/.next/server/middleware-build-manifest.js +3 -3
  267. package/.next/server/pages/404.html +1 -1
  268. package/.next/server/pages/500.html +1 -1
  269. package/.next/server/server-reference-manifest.js +1 -1
  270. package/.next/server/server-reference-manifest.json +64 -64
  271. package/.next/static/chunks/01r1uco3ikisc.js +2 -0
  272. package/.next/static/chunks/{33s9l7hkzyylm.js → 052u13mcoxt87.js} +1 -1
  273. package/.next/static/chunks/{023rfhzsxzhh1.js → 05blzta_1i7c2.js} +1 -1
  274. package/.next/static/chunks/09kwsjbmr_z1w.js +1 -0
  275. package/.next/static/chunks/0go5_9zqag7l0.js +1 -0
  276. package/.next/static/chunks/0hpx0--bh7vld.js +1 -0
  277. package/.next/static/chunks/0o0vshni5ny91.js +1 -0
  278. package/.next/static/chunks/0ynv7zu_bguve.js +1 -0
  279. package/.next/static/chunks/0zi59tghmg1lu.js +18 -0
  280. package/.next/static/chunks/1_ftsgxa-sia_.js +1 -0
  281. package/.next/static/chunks/1cg3torc90q5t.js +1 -0
  282. package/.next/static/chunks/{3zhqveam0_kub.js → 1dy5xaxjdsy11.js} +1 -1
  283. package/.next/static/chunks/1qnx1h5c8f93b.js +1 -0
  284. package/.next/static/chunks/1rwn3d9ji5w35.js +1 -0
  285. package/.next/static/chunks/{1tyxz6thgf2w6.js → 1so3f5fi7e5g9.js} +1 -1
  286. package/.next/static/chunks/1ya41wxfmp4s8.js +1 -0
  287. package/.next/static/chunks/27rwkfu7_xvs1.js +4 -0
  288. package/.next/static/chunks/2hueh8masqd91.js +15 -0
  289. package/.next/static/chunks/2jrt_752fqz2f.js +1 -0
  290. package/.next/static/chunks/{3fcnfq383hu-y.js → 2nbj2t9yp8ke9.js} +1 -1
  291. package/.next/static/chunks/2ogme4qydxnaq.js +3 -0
  292. package/.next/static/chunks/2r2tocw2rpvm2.js +1 -0
  293. package/.next/static/chunks/2t4kimg1lt-p7.js +2 -0
  294. package/.next/static/chunks/2w6y71o27my_z.js +1 -0
  295. package/.next/static/chunks/{2-2ts24vi9ete.js → 3146sccz1j76i.js} +1 -1
  296. package/.next/static/chunks/31_am8rtmk_tv.css +1 -0
  297. package/.next/static/chunks/{41iv7b8_3z92h.js → 35ehi-okrfot5.js} +1 -1
  298. package/.next/static/chunks/3866u-edsoyj3.js +1 -0
  299. package/.next/static/chunks/3drvp6w6dqzqg.js +1 -0
  300. package/.next/static/chunks/3qfhjwd9yuijo.js +1 -0
  301. package/.next/static/chunks/{3axovmkkuh1us.js → 3tyacy8fh5_18.js} +2 -2
  302. package/.next/static/chunks/3zv4wiqjl5kex.js +1 -0
  303. package/guide/bots.md +25 -5
  304. package/guide/calls.md +18 -9
  305. package/guide/setup.md +15 -4
  306. package/guide/trouble.md +2 -3
  307. package/package.json +1 -1
  308. package/public/here/NOTICE +43 -0
  309. package/public/here/world.json +1 -0
  310. package/skills/README.md +4 -0
  311. package/skills/artifact/SKILL.md +7 -6
  312. package/skills/artifact/references/motion.md +150 -0
  313. package/skills/artifact/runtime/motion/film.js +866 -0
  314. package/skills/artifact/runtime/motion/fonts/Gaegu-Bold.woff2 +0 -0
  315. package/skills/artifact/runtime/motion/fonts/OFL.txt +92 -0
  316. package/skills/artifact/runtime/motion/kit-core.js +699 -0
  317. package/skills/artifact/runtime/motion/kit-people.js +1305 -0
  318. package/skills/artifact/runtime/motion/kit-places.js +854 -0
  319. package/skills/artifact/runtime/motion/kit-things.js +903 -0
  320. package/skills/artifact/runtime/motion/motion.html +108 -0
  321. package/skills/artifact/runtime/motion/page.mjs +54 -0
  322. package/skills/artifact/runtime/motion/score.js +625 -0
  323. package/skills/artifact/scripts/book-video.mjs +1 -46
  324. package/skills/artifact/scripts/media.mjs +74 -0
  325. package/skills/artifact/scripts/motion.mjs +605 -0
  326. package/skills/artifact/templates/motion/birthday.js +182 -0
  327. package/skills/browser/SKILL.md +4 -1
  328. package/skills/browser/scripts/serve.mjs +26 -3
  329. package/skills/browser/scripts/session.mjs +12 -3
  330. package/.next/server/chunks/[root-of-the-server]__0-fn06g._.js +0 -3
  331. package/.next/server/chunks/[root-of-the-server]__03lc17t._.js +0 -3
  332. package/.next/server/chunks/[root-of-the-server]__06nspyt._.js +0 -3
  333. package/.next/server/chunks/[root-of-the-server]__09c88lb._.js +0 -3
  334. package/.next/server/chunks/[root-of-the-server]__09dxfp5._.js +0 -3
  335. package/.next/server/chunks/[root-of-the-server]__0_0w3ug._.js +0 -3
  336. package/.next/server/chunks/[root-of-the-server]__0ap1nbu._.js +0 -5
  337. package/.next/server/chunks/[root-of-the-server]__0bmtib_._.js +0 -7
  338. package/.next/server/chunks/[root-of-the-server]__0im1m7z._.js +0 -3
  339. package/.next/server/chunks/[root-of-the-server]__0mt72qk._.js +0 -7
  340. package/.next/server/chunks/[root-of-the-server]__0uj9rm-._.js +0 -3
  341. package/.next/server/chunks/[root-of-the-server]__0z5n9xz._.js +0 -5
  342. package/.next/server/chunks/[root-of-the-server]__16e_e0e._.js +0 -5
  343. package/.next/server/chunks/[root-of-the-server]__16gn7zn._.js +0 -3
  344. package/.next/server/chunks/[root-of-the-server]__18k8s-z._.js +0 -3
  345. package/.next/server/chunks/[root-of-the-server]__1aw-1kd._.js +0 -3
  346. package/.next/server/chunks/[root-of-the-server]__1kmnkbk._.js +0 -3
  347. package/.next/server/chunks/[root-of-the-server]__1op8qe5._.js +0 -3
  348. package/.next/server/chunks/[root-of-the-server]__1pkq_1z._.js +0 -3
  349. package/.next/server/chunks/[root-of-the-server]__20w_g71._.js +0 -3
  350. package/.next/server/chunks/_01c32w9._.js +0 -75
  351. package/.next/server/chunks/_02bov6_._.js +0 -75
  352. package/.next/server/chunks/_053bi70._.js +0 -60
  353. package/.next/server/chunks/_08s4vft._.js +0 -75
  354. package/.next/server/chunks/_0fb6dvr._.js +0 -75
  355. package/.next/server/chunks/_0iw19ig._.js +0 -75
  356. package/.next/server/chunks/_0mo_6or._.js +0 -5
  357. package/.next/server/chunks/_0poi1t2._.js +0 -75
  358. package/.next/server/chunks/_1d7og_q._.js +0 -75
  359. package/.next/server/chunks/_1o3fc2d._.js +0 -60
  360. package/.next/server/chunks/_20zp65o._.js +0 -60
  361. package/.next/server/chunks/ssr/[root-of-the-server]__03e9zqg._.js +0 -3
  362. package/.next/server/chunks/ssr/[root-of-the-server]__1hbvuqr._.js +0 -3
  363. package/.next/server/chunks/ssr/[root-of-the-server]__1y8_-v1._.js +0 -3
  364. package/.next/server/chunks/ssr/_00_9573._.js +0 -3
  365. package/.next/server/chunks/ssr/_03vw3u5._.js +0 -3
  366. package/.next/server/chunks/ssr/_0iwsdp7._.js +0 -3
  367. package/.next/server/chunks/ssr/_0llhg-6._.js +0 -3
  368. package/.next/server/chunks/ssr/_0o__2ss._.js +0 -3
  369. package/.next/server/chunks/ssr/_0pbav_w._.js +0 -3
  370. package/.next/server/chunks/ssr/_0yjn4jm._.js +0 -162
  371. package/.next/server/chunks/ssr/_186ifln._.js +0 -3
  372. package/.next/server/chunks/ssr/_1x4lhpf._.js +0 -3
  373. package/.next/server/chunks/ssr/_1xfiate._.js +0 -5
  374. package/.next/server/chunks/ssr/features_bot_1dvvmo3._.js +0 -3
  375. package/.next/server/chunks/ssr/features_thursday_0gbh5j_._.js +0 -3
  376. package/.next/static/chunks/06k2o5zxc3xhv.js +0 -1
  377. package/.next/static/chunks/0_s4z70lx1tgs.js +0 -1
  378. package/.next/static/chunks/0cbitatnyjhz7.js +0 -1
  379. package/.next/static/chunks/0m5-0kx85axzv.js +0 -18
  380. package/.next/static/chunks/0non225e2mzp-.js +0 -1
  381. package/.next/static/chunks/0q9b2n6l4flqb.js +0 -1
  382. package/.next/static/chunks/0uhddock-ik4v.js +0 -1
  383. package/.next/static/chunks/14y1gqfplan8a.js +0 -1
  384. package/.next/static/chunks/1pidafhkyxhqw.js +0 -1
  385. package/.next/static/chunks/1sy7zm5dplzym.css +0 -1
  386. package/.next/static/chunks/1t7u4xfljptkv.js +0 -1
  387. package/.next/static/chunks/2nf3mskfp9cyc.js +0 -15
  388. package/.next/static/chunks/2uraofiaoy32s.js +0 -1
  389. package/.next/static/chunks/2vw9_trh_ntv6.js +0 -2
  390. package/.next/static/chunks/2x6-fpctvucte.js +0 -1
  391. package/.next/static/chunks/33lm6ytc816te.js +0 -1
  392. package/.next/static/chunks/3p5q6rj40jmcy.js +0 -1
  393. package/.next/static/chunks/3p80hsvcabgw_.js +0 -3
  394. package/.next/static/chunks/3qez_j23ikyar.js +0 -1
  395. /package/.next/static/{gx61wKkj9_eBGMdyfbBlr → 8exfHAtcoebYtxjUC4ugl}/_buildManifest.js +0 -0
  396. /package/.next/static/{gx61wKkj9_eBGMdyfbBlr → 8exfHAtcoebYtxjUC4ugl}/_clientMiddlewareManifest.js +0 -0
  397. /package/.next/static/{gx61wKkj9_eBGMdyfbBlr → 8exfHAtcoebYtxjUC4ugl}/_ssgManifest.js +0 -0
@@ -1,16 +1,16 @@
1
- module.exports=[851372,e=>e.a(async(t,o)=>{try{var a=e.i(343747),r=e.i(687388),n=e.i(186304),s=e.i(353885),i=e.i(393189),l=e.i(265143),d=e.i(944971),h=e.i(438188),u=e.i(889034),c=e.i(378884),w=e.i(148831),p=e.i(619898),f=e.i(636882),m=e.i(629668),y=e.i(786025),g=e.i(704161),b=e.i(41444),T=e.i(660948),$=e.i(54282),v=t([l,c,w,p,f,T]);async function k(e,t,o,n){var h,u,v,k,S,N,C,M,E;let R,A,_,B,W,j,P,L,U,Y=await (0,y.openWorkspace)(),D=e.trim(),[H,F,J,q,K,G,z,Q,V]=await Promise.all([(0,f.loadSkills)(Y,D),(0,p.listNoteIndex)(),(0,T.listConnectedToolNames)(),(0,w.findPinnedTools)(D),(0,l.listJobBots)(),(0,i.listBotMemory)(D),(0,l.readBotMemoryOn)(),(0,y.readMachineTools)(Y),(0,c.listBotWork)(D,o?.thread??null)]),X=K.filter(e=>e.name!==D),Z=K.find(e=>e.name===D)??await (0,l.findJobBot)(D),ee=[(h=D,u=Z,v=o,A=(R=v?.owner??h)===h?"**You** coordinate this thread: its result goes from you to Thursday.":`**${R}** coordinates this thread and brings its result to Thursday.`,_=v?`
1
+ module.exports=[851372,e=>e.a(async(t,o)=>{try{var a=e.i(343747),r=e.i(687388),n=e.i(186304),s=e.i(353885),i=e.i(393189),l=e.i(265143),d=e.i(944971),h=e.i(438188),u=e.i(889034),c=e.i(378884),w=e.i(148831),p=e.i(619898),f=e.i(636882),m=e.i(629668),y=e.i(786025),g=e.i(704161),b=e.i(41444),T=e.i(660948),$=e.i(54282),v=t([l,c,w,p,f,T]);async function k(e,t,o,n){var h,u,v,k,S,N,C,M,E,R;let A,j,W,_,B,P,L,U,Y,H=await (0,y.openWorkspace)(),D=e.trim(),[F,J,q,K,G,z,Q,V,X]=await Promise.all([(0,f.loadSkills)(H,D),(0,p.listNoteIndex)(),(0,T.listConnectedToolNames)(),(0,w.findPinnedTools)(D),(0,l.listJobBots)(),(0,i.listBotMemory)(D),(0,l.readBotMemoryOn)(),(0,y.readMachineTools)(H),(0,c.listBotWork)(D,o?.thread??null)]),Z=G.filter(e=>e.name!==D),ee=G.find(e=>e.name===D)??await (0,l.findJobBot)(D),et=[(h=D,u=ee,v=o,j=(A=v?.owner??h)===h?"**You** coordinate this thread: its result goes from you to Thursday.":`**${A}** coordinates this thread and brings its result to Thursday.`,W=v?`
2
2
 
3
- Current conversation: ${v.caller} → ${h}. Your final text goes back to ${v.caller}.`:"",B=u?`
4
- Others know you as: ${(0,d.rosterLine)(u)}`:"",W=I(h,v)?"your tools, the other bots, this machine":`your tools, this machine, and the other bots through ${R}`,`You are ${h}, one of the bots in this thread. ${(0,$.todayLine)()}${B}
3
+ Current conversation: ${v.caller} → ${h}. Your final text goes back to ${v.caller}.`:"",_=u?`
4
+ Others know you as: ${(0,d.rosterLine)(u)}`:"",B=I(h,v)?"your tools, the other bots, this machine":`your tools, this machine, and the other bots through ${A}`,`You are ${h}, one of the bots in this thread. ${(0,$.todayLine)()}${_}
5
5
 
6
6
  - **The user** — the one person all of this is for. They talk with Thursday by voice and follow this thread on their screen.
7
7
  - **Thursday** — their personal assistant. She talks with them, hands bots the work that takes time, and tells them what comes back.
8
- - ${A}
9
- - **Everyone on it** keeps their own work and conversation; the others see only the messages sent to them.${_}
8
+ - ${j}
9
+ - **Everyone on it** keeps their own work and conversation; the others see only the messages sent to them.${W}
10
10
 
11
- **The job is done, not described.** You are on the user's own computer, with a shell, files and the web, and how you get there is yours: when one way fails, try another; where no tool exists, write one — \`node\` is always here. Before deciding something cannot be done, look at what you have — ${W}. Bring back the thing itself — their account, their file, the real result — not a smaller, safer stand-in, and not a note on why not.
11
+ **The job is done, not described.** You are on the user's own computer, with a shell, files and the web, and how you get there is yours: when one way fails, try another; where no tool exists, write one — \`node\` is always here. Before deciding something cannot be done, look at what you have — ${B}. Bring back the thing itself — their account, their file, the real result — not a smaller, safer stand-in, and not a note on why not.
12
12
 
13
- **Never present a guess as a result.** Thursday says what you return out loud, as fact: say which part is unverified and why.`),(k=F,`## Thursday's memory of the user
13
+ **Never present a guess as a result.** Thursday says what you return out loud, as fact: say which part is unverified and why.`),(k=J,`## Thursday's memory of the user
14
14
 
15
15
  What Thursday keeps from talking with them. When the job needs something about them, open the note with \`${s.TOOL_NAMES.memory_recall}\`; a fact marked \`said\` came from a call. What you learn about them goes in your answer — Thursday decides what to keep.
16
16
 
@@ -20,26 +20,28 @@ ${(0,$.noteLines)(k)}`),function(e,t){let o=new Set(t.map(e=>`${e.server}/${e.na
20
20
 
21
21
  ${(0,$.mcpToolLines)(a)}
22
22
 
23
- Names only: \`${s.TOOL_NAMES.tool_search}\` returns what each one takes, \`${s.TOOL_NAMES.tool_call}\` runs one.${r}`}(J,q),(S=H,0===S.length?"":`## Skills
23
+ Names only: \`${s.TOOL_NAMES.tool_search}\` returns what each one takes, \`${s.TOOL_NAMES.tool_call}\` runs one.${r}`}(q,K),(S=F,0===S.length?"":`## Skills
24
24
 
25
25
  Written-down ways of doing things. Open one with \`${s.TOOL_NAMES.load_skill}\` before a job it covers, unless its instructions are already in your conversation.
26
26
 
27
- ${(0,$.skillLines)(S)}`),O(Y.cwd,Q,n),z?(N=(0,i.botMemoryFolder)(D),j=(C=G).entries.length?C.entries.map(({file:e,line:t,at:o})=>{let n=t?` — ${(0,b.clip)(t,r.PROMPT_LINE.botMemory)}`:"";return`- ${e}${n} \xb7 ${(0,a.format)((0,g.toDate)(o),"yyyy-MM-dd")}`}).join("\n"):"Empty.",P=C.total>C.entries.length?`
27
+ ${(0,$.skillLines)(S)}`),O(H.cwd,V,n),Q?(N=(0,i.botMemoryFolder)(D),P=(C=z).entries.length?C.entries.map(({file:e,line:t,at:o})=>{let n=t?` — ${(0,b.clip)(t,r.PROMPT_LINE.botMemory)}`:"";return`- ${e}${n} \xb7 ${(0,a.format)((0,g.toDate)(o),"yyyy-MM-dd")}`}).join("\n"):"Empty.",L=C.total>C.entries.length?`
28
28
 
29
29
  The newest ${C.entries.length} of ${C.total}; \`ls ${N}\` for the rest.`:"",`## Your memory
30
30
 
31
31
  What you learned on your own earlier jobs, in \`${N}/\`: one topic per file, its first line saying what it holds, read by no other bot, up to ${r.BOT_MEMORY_LIMITS.files} files of ${r.BOT_MEMORY_LIMITS.chars.toLocaleString("en-US")} characters each. It is how you get better at this work. When a job teaches you something a later one would otherwise find out again — how a site signs in, the way through its screens, a command that turned out right — or the user asks you to remember how to work, keep it with the date it was true, and fix or delete what proved wrong. No passwords, keys or codes.
32
32
 
33
- ${j}${P}`):"",function(e,t){if(!t.open.length&&!t.recent.length)return"";let o=t=>{let o=t.said?` — ${(0,b.clip)(t.said,r.BOT_WORK.said)}`:"",a=t.said?(0,m.pathsIn)(t.said).slice(0,r.BOT_WORK.files):[],n=a.length?` \xb7 ${a.map(e=>`\`${e}\``).join(", ")}`:"";return`- ${t.cut?`[${(0,d.workHandle)(t.id)}] `:""}${(0,$.botWorkHead)(t,e)}${o}${n}`},a=(e,t)=>t.length?`${e}
33
+ ${P}${L}`):"",(M=`${(0,y.botFolder)(D)}/${r.PATHS.skills.own}`,`## Your own skills
34
+
35
+ A skill in \`${M}/\` is listed to you alone, and read on every step you take, so keep few. Write one only when the job is a kind that comes again — a routine runs it, or your other threads show the same kind of job — and doing it well took a way of working, not a fact your memory can hold. Before writing one, improve the one of yours that covers the job instead. Write it as the skill-creator skill says; the job you just did is its test, so validate it and run no test prompts. Say in one line of your answer which skill you wrote or changed. Any skill outside that folder changes only when the user asks.`),function(e,t){if(!t.open.length&&!t.recent.length)return"";let o=t=>{let o=t.said?` — ${(0,b.clip)(t.said,r.BOT_WORK.said)}`:"",a=t.said?(0,m.pathsIn)(t.said).slice(0,r.BOT_WORK.files):[],n=a.length?` \xb7 ${a.map(e=>`\`${e}\``).join(", ")}`:"";return`- ${t.cut?`[${(0,d.workHandle)(t.id)}] `:""}${(0,$.botWorkHead)(t,e)}${o}${n}`},a=(e,t)=>t.length?`${e}
34
36
  ${t.map(o).join("\n")}`:"",n=[...t.open,...t.recent].some(e=>e.cut)?` A line with an id in brackets was cut short: \`${s.TOOL_NAMES.thread_recall}\` opens that one whole, for when this job builds on it.`:"";return`## Your other threads
35
37
 
36
38
  Your threads besides this one. You remember none of them here: each line is where it stands, your own last words there, and the files those words name.${n}
37
39
 
38
- ${[a("Open",t.open),a("Ended",t.recent)].filter(Boolean).join("\n")}`}(D,V),function(e,t,o){if(0===e.length)return"";let a=I(t,o)?`When part of the job is another bot's strength, bring it in with \`${s.TOOL_NAMES.send_message}\` rather than rebuilding it yourself.`:`When part of the job is another bot's strength, say so in your answer: ${o?.owner??"the coordinator"} brings them in.`;return`## Bots
40
+ ${[a("Open",t.open),a("Ended",t.recent)].filter(Boolean).join("\n")}`}(D,X),function(e,t,o){if(0===e.length)return"";let a=I(t,o)?`When part of the job is another bot's strength, bring it in with \`${s.TOOL_NAMES.send_message}\` rather than rebuilding it yourself.`:`When part of the job is another bot's strength, say so in your answer: ${o?.owner??"the coordinator"} brings them in.`;return`## Bots
39
41
 
40
42
  ${e.map(e=>`- **${e.name}** — ${(0,d.rosterLine)(e)}`).join("\n")}
41
43
 
42
- These lines were written for the user: where one says "you", it means them. ${a}`}(X,D,o),(M=D,E=o,L=E?.caller??"whoever asked",U=`Write in the user's language, and name the paths of finished work. In Markdown, reference images by absolute route (\`/api/file/${r.PATHS.artifacts}/…\`).`,I(M,E)?`## Working together
44
+ These lines were written for the user: where one says "you", it means them. ${a}`}(Z,D,o),(E=D,R=o,U=R?.caller??"whoever asked",Y=`Write in the user's language, and name the paths of finished work. In Markdown, reference images by absolute route (\`/api/file/${r.PATHS.artifacts}/…\`).`,I(E,R)?`## Working together
43
45
 
44
46
  Nobody sees your work but you, and you see only what others send you, so whatever crosses between you has to stand on its own. A request says what is wanted, what is already known or done, and where the files are; an answer gives exact values, file paths and what is still unverified. Tell a bot you handed work to when what it depends on changes: it reads that before its next step. End your turn when you have nothing more to do now: answers arrive as new messages and wake you. The bots you bring in answer only to you: when one needs another bot's work or something from the user, it says so in its answer, and you decide.
45
47
 
@@ -47,13 +49,13 @@ Before you hand anything out, check what each part needs that only the user know
47
49
 
48
50
  While work you handed out is still out, your result waits for it: end your turn and each answer wakes you, with a line on what is still out; write the result once everything you asked for is in. Bring what you received together into one result for Thursday: what was done, where it is, what you decided that the request did not say, and what is still open, at the detail the user asked for. Every file you name in it is drawn under your words in the thread and waits in the screen's corner for the user to open, so name each one you want them to see — the page to read first, then the rest.
49
51
 
50
- ${U}`:`## Working together
52
+ ${Y}`:`## Working together
51
53
 
52
- Nobody sees your work but you: ${L} sees only your final text, so it has to stand on its own — exact values, file paths and what is still unverified. ${E?.owner??"The coordinator"} brings the other bots in, not you.
54
+ Nobody sees your work but you: ${U} sees only your final text, so it has to stand on its own — exact values, file paths and what is still unverified. ${R?.owner??"The coordinator"} brings the other bots in, not you.
53
55
 
54
- Your final text is your answer to ${L}, and all they see of your work: give them everything they need to carry on. When you cannot go on without something — from them, from another bot, or a fact only the user has, such as a date, a name, a place or an amount — end with that question instead of guessing it or leaving a blank; ${L} gets it for you, and their reply brings you back with all you have done still in front of you.
56
+ Your final text is your answer to ${U}, and all they see of your work: give them everything they need to carry on. When you cannot go on without something — from them, from another bot, or a fact only the user has, such as a date, a name, a place or an amount — end with that question instead of guessing it or leaving a blank; ${U} gets it for you, and their reply brings you back with all you have done still in front of you.
55
57
 
56
- ${U}`),x(D,t)].filter(Boolean).join("\n\n");return(0,$.logPromptSize)("bot",ee),{text:ee}}[l,c,w,p,f,T]=v.then?(await v)():v;let x=(e,t)=>{let o=t?.trim();return o?(0,h.findBotSeed)(e)?.systemPrompt.trim()===o?`## Your role
58
+ ${Y}`),x(D,t)].filter(Boolean).join("\n\n");return(0,$.logPromptSize)("bot",et),{text:et}}[l,c,w,p,f,T]=v.then?(await v)():v;let x=(e,t)=>{let o=t?.trim();return o?(0,h.findBotSeed)(e)?.systemPrompt.trim()===o?`## Your role
57
59
 
58
60
  What this bot is for, as the app sets it up. Where it and anything above disagree, it wins.
59
61
 
@@ -87,7 +89,7 @@ ${e.job.text.trim()}`}]},"buildThreadOpening",0,function(e){if(e.routine){let{wh
87
89
  ${e.request.trim()}`}]}let t="user"===e.from?"The user":"Thursday";return[{type:"text",text:`You are ${e.bot}. ${t} hands you this thread${"user"===e.from?" on screen":" during a call"}.`},{type:"text",text:`## ${t} → ${e.bot}: the job
88
90
 
89
91
  ${e.request.trim()}`}]},"loadBotPrompt",0,k]),o()}catch(e){o(e)}},!1),235190,e=>{"use strict";e.s(["asWords",0,function(e,t,o=e=>e){let a=[];for(let r of e){if("tool"===r.role)continue;if("system"===r.role){a.push(r);continue}if("user"===r.role){a.push("string"==typeof r.content?{role:"user",content:o(r.content)}:r);continue}let e="string"==typeof r.content?[{type:"text",text:r.content}]:r.content,n=e.flatMap(e=>"text"===e.type?[e.text]:[]).join("\n").trim()||e.flatMap(e=>"tool-call"===e.type?[t(e.toolName,e.input)]:[]).join("\n");if(!n)continue;let s=a.at(-1);s?.role==="assistant"&&"string"==typeof s.content?a[a.length-1]={role:"assistant",content:`${s.content}
90
- ${o(n)}`}:a.push({role:"assistant",content:o(n)})}return a}])},585099,e=>e.a(async(t,o)=>{try{var a=e.i(666680),r=e.i(68356),n=e.i(847841),s=e.i(687388),i=e.i(159479),l=e.i(386075),d=e.i(851372),h=e.i(316172),u=e.i(353885),c=e.i(235190),w=e.i(944971),p=e.i(527608),f=e.i(786025),m=e.i(640911),y=e.i(388439),g=e.i(265143),b=e.i(889034),T=e.i(378884),$=t([i,l,d,h,g,T]);[i,l,d,h,g,T]=$.then?(await $)():$;let S=s.BOT_RUN.steps;async function v(e,t){var o;let a,c,$,v,x,M,E,R,A,_=t.parent??null,B=await (0,g.findJobBot)(e.bot.trim()),W=B?.name??e.bot.trim(),j=e=>t.emit({...e,bot:W,parent:_});if(!B)return void await j({type:"error",message:`No bot named "${e.bot}". Use a name from the list.`,retry:!1});let P=e.messages,L=await O(B),U=t.threadId?await (0,T.findThread)(t.threadId):null,[Y,{own:D,artifacts:H}]=await Promise.all([t.threadId?(0,f.openJobScratch)(t.threadId,U?.label??"job"):null,(0,f.openBotFolders)(W)]),F=t.session??(t.threadId?(0,f.botBrowserSession)(t.threadId,W):null),[J,q]=await Promise.all([(0,d.loadBotPrompt)(W,B.systemPrompt,{thread:t.threadId??null,owner:t.owner,caller:t.caller},{scratch:Y,own:D,artifacts:H}),(0,i.loadTools)({target:"bot",bot:W,thread:t.threadId??null,session:F,model:L})]),K=Math.min(await (0,l.compactBudget)(L.ref,B.compactAt),t.contextBudget||1/0),G=await (0,l.runEffort)(L.ref,B.effort),z=(0,l.promptCacheOptions)(L.ref,t.threadId?C(t.threadId,W):null),Q=!1,V=(0,b.isCoordinatorSeat)(W,t.owner,t.caller)?{...q,[u.TOOL_NAMES.send_message]:(0,n.tool)({description:h.sendMessageSpec.description,inputSchema:h.sendMessageSpec.parameters,execute:async(e,o)=>{let a=await t.send({...e,id:o.toolCallId});return"question"===e.kind&&(Q=!0),a}})}:q,X=new Set,Z=(o=s.BOT_RUN.silenceMs,c=new AbortController,$=0,v=!1,x=()=>{clearTimeout(a),a=void 0,v||$>0||(a=setTimeout(()=>{c.abort(new DOMException(`The model sent nothing for ${Math.round(o/6e4)} minutes.`,"TimeoutError"))},o))},{signal:c.signal,touch:x,hold:()=>{$+=1,x()},release:()=>{$=Math.max(0,$-1),x()},end:()=>{v=!0,x()}});for(let[e,o]of Object.entries(V)){let a=o.execute;a&&(o.execute=(o,r)=>{let n=(async()=>{t.signal?.throwIfAborted(),await j({type:"tool",id:r.toolCallId,name:e,input:o}),Z.hold();try{t.signal?.throwIfAborted();let n=await a(o,r);if(n&&"object"==typeof n&&Symbol.asyncIterator in n){let e;for await(let t of n)e=t;n=e}return await j({type:"tool-result",id:r.toolCallId,name:e,output:n}),n}catch(t){throw await j({type:"tool-result",id:r.toolCallId,name:e,output:(0,l.modelErrorToString)(t),error:!0}),t}finally{Z.release()}})();return X.add(n),n.finally(()=>X.delete(n)).catch(()=>{}),n})}let ee=Promise.resolve(),et=()=>{},eo=0,ea=new r.ToolLoopAgent({model:L.model,instructions:J.text,tools:V,reasoning:G,providerOptions:z,stopWhen:[(0,r.stepCountIs)(S),()=>Q],prepareStep:async({stepNumber:e,steps:o,messages:a})=>{await ee,t.signal?.throwIfAborted();let r={},n=(o.at(-1)?.usage.inputTokens??0)||a.reduce((e,t)=>e+(0,y.estimateTokens)("string"==typeof t.content?t.content:JSON.stringify(t.content))+4,0);eo=n;let s=a,i=t.compactNow?.()??!1;if((n>K||i)&&a.length>2){Z.hold();let e=await I(L.model,V,a,{signal:t.signal,budget:K,instructions:J.text,providerOptions:z}).finally(Z.release);m.logger.debug(`compacted ${a.length} messages at ${n} tokens (budget ${K})`);let o=`${e.text}${await k(U?.id??null,a,Y)}`;await j({type:"compact",text:o,usage:e.usage,messages:a.length,tokens:n}),s=[a[0],{role:"user",content:o}]}let l=e>0?await t.notes?.()??[]:[];return(l.length&&(s=[...s,...l.map(e=>({role:"user",content:e}))]),s===a)?r:{...r,messages:s}}}),er=(M=[],E=[],R=!1,{push(e){let t=E.shift();t?t(e):M.push(e)},take(){let e=M.shift();return e?Promise.resolve(e):R?Promise.resolve(null):new Promise(e=>E.push(e))},end(){for(let e of(R=!0,E.splice(0)))e(null)}}),en=t.signal?AbortSignal.any([t.signal,Z.signal]):Z.signal;Z.touch();let es=new AbortController,ei=AbortSignal.any([en,es.signal]);try{A=await ea.stream({messages:P,abortSignal:ei,onStepEnd:e=>{ee=new Promise(e=>{et=e}),er.push({messages:function(e){if(!e.toolResults.length)return e.response.messages;let t=new Map(e.toolResults.map(e=>[e.toolCallId,e.output]));return e.response.messages.map(e=>"tool"!==e.role?e:{...e,content:e.content.map(e=>{if("tool-result"!==e.type||!t.has(e.toolCallId))return e;let o=t.get(e.toolCallId);return{...e,output:"string"==typeof o?{type:"text",value:o}:{type:"json",value:o}}})})}(e),usage:N(e.usage)})}})}catch(e){throw Z.end(),es.abort(),await Promise.allSettled([...X]),e}let el="",ed="",eh=null,eu=e=>{m.logger.error(`${W}: the model run broke`,e);let t=(0,l.modelErrorToString)(e),o=!(0,l.isProviderRefusal)(e);if(!(0,l.isContextOverflow)(e))return{type:"error",message:t,retry:o};let a=Math.floor(Math.min(K,eo||K)*s.BOT_RUN.overflowShrink);return{type:"error",message:t,budget:Math.max(w.COMPACT_AT_MIN,a),retry:o}};en.addEventListener("abort",()=>{er.end(),et()},{once:!0});try{for await(let e of A.stream)switch(Z.touch(),e.type){case"start-step":ed="",el="";break;case"text-delta":el+=e.text;break;case"text-end":{let e=el.trim();if(el="",!e)break;ed=[ed,e].filter(Boolean).join("\n\n"),await j({type:"text",text:e});break}case"tool-call":await j({type:"tool",id:e.toolCallId,name:e.toolName,input:e.input,providerExecuted:e.providerExecuted,providerOptions:e.providerMetadata});break;case"tool-result":await j({type:"tool-result",id:e.toolCallId,name:e.toolName,output:e.output});break;case"tool-error":await j({type:"tool-result",id:e.toolCallId,name:e.toolName,output:(0,l.modelErrorToString)(e.error),error:!0});break;case"finish-step":{eh=e.finishReason;let t=await er.take();t&&await j({type:"step",...t,budget:K}),et();break}case"abort":if(t.signal?.aborted)return;await j(eu(e.reason??"The model stopped sending."));return;case"error":await j(eu(e.error));return}}finally{es.abort(),er.end(),Z.end(),et(),await Promise.allSettled([...X]),F&&(0,p.renewSignIns)(F).catch(e=>m.logger.warn(`${W}: kept sign-ins were not renewed`,e))}try{await A.finalStep}catch(e){if(t.signal?.aborted)return;await j(eu(e));return}"content-filter"===eh?await j({type:"error",message:"The provider's content filter stopped the response.",retry:!1}):await j({type:"turn-end",text:ed,stopped:!Q&&("length"===eh||"error"===eh||"tool-calls"===eh)})}async function k(e,t,o){try{let a=e?await (0,T.listWrittenPaths)(e):(0,T.writtenPathsIn)(t.map(e=>e.content)),r=await (0,f.filesOnDisk)(a,o);if(!r.length)return"";let n=r.slice(-s.BOT_RUN.compactFiles),i=r.length-n.length,l=n.map(e=>`- ${e}`);return i&&l.unshift(`- …and ${i} older ones`),`
92
+ ${o(n)}`}:a.push({role:"assistant",content:o(n)})}return a}])},585099,e=>e.a(async(t,o)=>{try{var a=e.i(666680),r=e.i(68356),n=e.i(847841),s=e.i(687388),i=e.i(159479),l=e.i(386075),d=e.i(851372),h=e.i(316172),u=e.i(353885),c=e.i(235190),w=e.i(944971),p=e.i(527608),f=e.i(786025),m=e.i(640911),y=e.i(388439),g=e.i(265143),b=e.i(889034),T=e.i(378884),$=t([i,l,d,h,g,T]);[i,l,d,h,g,T]=$.then?(await $)():$;let S=s.BOT_RUN.steps;async function v(e,t){var o;let a,c,$,v,x,M,E,R,A,j=t.parent??null,W=await (0,g.findJobBot)(e.bot.trim()),_=W?.name??e.bot.trim(),B=e=>t.emit({...e,bot:_,parent:j});if(!W)return void await B({type:"error",message:`No bot named "${e.bot}". Use a name from the list.`,retry:!1});let P=e.messages,L=await O(W),U=t.threadId?await (0,T.findThread)(t.threadId):null,[Y,{own:H,artifacts:D}]=await Promise.all([t.threadId?(0,f.openJobScratch)(t.threadId,U?.label??"job"):null,(0,f.openBotFolders)(_)]),F=t.session??(t.threadId?(0,f.botBrowserSession)(t.threadId,_):null),[J,q]=await Promise.all([(0,d.loadBotPrompt)(_,W.systemPrompt,{thread:t.threadId??null,owner:t.owner,caller:t.caller},{scratch:Y,own:H,artifacts:D}),(0,i.loadTools)({target:"bot",bot:_,thread:t.threadId??null,session:F,model:L})]),K=Math.min(await (0,l.compactBudget)(L.ref,W.compactAt),t.contextBudget||1/0),G=await (0,l.runEffort)(L.ref,W.effort),z=(0,l.promptCacheOptions)(L.ref,t.threadId?C(t.threadId,_):null),Q=!1,V=(0,b.isCoordinatorSeat)(_,t.owner,t.caller)?{...q,[u.TOOL_NAMES.send_message]:(0,n.tool)({description:h.sendMessageSpec.description,inputSchema:h.sendMessageSpec.parameters,execute:async(e,o)=>{let a=await t.send({...e,id:o.toolCallId});return"question"===e.kind&&(Q=!0),a}})}:q,X=new Set,Z=(o=s.BOT_RUN.silenceMs,c=new AbortController,$=0,v=!1,x=()=>{clearTimeout(a),a=void 0,v||$>0||(a=setTimeout(()=>{c.abort(new DOMException(`The model sent nothing for ${Math.round(o/6e4)} minutes.`,"TimeoutError"))},o))},{signal:c.signal,touch:x,hold:()=>{$+=1,x()},release:()=>{$=Math.max(0,$-1),x()},end:()=>{v=!0,x()}});for(let[e,o]of Object.entries(V)){let a=o.execute;a&&(o.execute=(o,r)=>{let n=(async()=>{t.signal?.throwIfAborted(),await B({type:"tool",id:r.toolCallId,name:e,input:o}),Z.hold();try{t.signal?.throwIfAborted();let n=await a(o,r);if(n&&"object"==typeof n&&Symbol.asyncIterator in n){let e;for await(let t of n)e=t;n=e}return await B({type:"tool-result",id:r.toolCallId,name:e,output:n}),n}catch(t){throw await B({type:"tool-result",id:r.toolCallId,name:e,output:(0,l.modelErrorToString)(t),error:!0}),t}finally{Z.release()}})();return X.add(n),n.finally(()=>X.delete(n)).catch(()=>{}),n})}let ee=Promise.resolve(),et=()=>{},eo=0,ea=new r.ToolLoopAgent({model:L.model,instructions:J.text,tools:V,reasoning:G,providerOptions:z,stopWhen:[(0,r.stepCountIs)(S),()=>Q],prepareStep:async({stepNumber:e,steps:o,messages:a})=>{await ee,t.signal?.throwIfAborted();let r={},n=(o.at(-1)?.usage.inputTokens??0)||a.reduce((e,t)=>e+(0,y.estimateTokens)("string"==typeof t.content?t.content:JSON.stringify(t.content))+4,0);eo=n;let s=a,i=t.compactNow?.()??!1;if((n>K||i)&&a.length>2){Z.hold();let e=await I(L.model,V,a,{signal:t.signal,budget:K,instructions:J.text,providerOptions:z}).finally(Z.release);m.logger.debug(`compacted ${a.length} messages at ${n} tokens (budget ${K})`);let o=`${e.text}${await k(U?.id??null,a,Y)}`;await B({type:"compact",text:o,usage:e.usage,messages:a.length,tokens:n}),s=[a[0],{role:"user",content:o}]}let l=e>0?await t.notes?.()??[]:[];return(l.length&&(s=[...s,...l.map(e=>({role:"user",content:e}))]),s===a)?r:{...r,messages:s}}}),er=(M=[],E=[],R=!1,{push(e){let t=E.shift();t?t(e):M.push(e)},take(){let e=M.shift();return e?Promise.resolve(e):R?Promise.resolve(null):new Promise(e=>E.push(e))},end(){for(let e of(R=!0,E.splice(0)))e(null)}}),en=t.signal?AbortSignal.any([t.signal,Z.signal]):Z.signal;Z.touch();let es=new AbortController,ei=AbortSignal.any([en,es.signal]);try{A=await ea.stream({messages:P,abortSignal:ei,onStepEnd:e=>{ee=new Promise(e=>{et=e}),er.push({messages:function(e){if(!e.toolResults.length)return e.response.messages;let t=new Map(e.toolResults.map(e=>[e.toolCallId,e.output]));return e.response.messages.map(e=>"tool"!==e.role?e:{...e,content:e.content.map(e=>{if("tool-result"!==e.type||!t.has(e.toolCallId))return e;let o=t.get(e.toolCallId);return{...e,output:"string"==typeof o?{type:"text",value:o}:{type:"json",value:o}}})})}(e),usage:N(e.usage)})}})}catch(e){throw Z.end(),es.abort(),await Promise.allSettled([...X]),e}let el="",ed="",eh=null,eu=e=>{m.logger.error(`${_}: the model run broke`,e);let t=(0,l.modelErrorToString)(e),o=!(0,l.isProviderRefusal)(e);if(!(0,l.isContextOverflow)(e))return{type:"error",message:t,retry:o};let a=Math.floor(Math.min(K,eo||K)*s.BOT_RUN.overflowShrink);return{type:"error",message:t,budget:Math.max(w.COMPACT_AT_MIN,a),retry:o}};en.addEventListener("abort",()=>{er.end(),et()},{once:!0});try{for await(let e of A.stream)switch(Z.touch(),e.type){case"start-step":ed="",el="";break;case"text-delta":el+=e.text;break;case"text-end":{let e=el.trim();if(el="",!e)break;ed=[ed,e].filter(Boolean).join("\n\n"),await B({type:"text",text:e});break}case"tool-call":await B({type:"tool",id:e.toolCallId,name:e.toolName,input:e.input,providerExecuted:e.providerExecuted,providerOptions:e.providerMetadata});break;case"tool-result":await B({type:"tool-result",id:e.toolCallId,name:e.toolName,output:e.output});break;case"tool-error":await B({type:"tool-result",id:e.toolCallId,name:e.toolName,output:(0,l.modelErrorToString)(e.error),error:!0});break;case"finish-step":{eh=e.finishReason;let t=await er.take();t&&await B({type:"step",...t,budget:K}),et();break}case"abort":if(t.signal?.aborted)return;await B(eu(e.reason??"The model stopped sending."));return;case"error":await B(eu(e.error));return}}finally{es.abort(),er.end(),Z.end(),et(),await Promise.allSettled([...X]),F&&(0,p.renewSignIns)(F).catch(e=>m.logger.warn(`${_}: kept sign-ins were not renewed`,e))}try{await A.finalStep}catch(e){if(t.signal?.aborted)return;await B(eu(e));return}"content-filter"===eh?await B({type:"error",message:"The provider's content filter stopped the response.",retry:!1}):await B({type:"turn-end",text:ed,stopped:!Q&&("length"===eh||"error"===eh||"tool-calls"===eh)})}async function k(e,t,o){try{let a=e?await (0,T.listWrittenPaths)(e):(0,T.writtenPathsIn)(t.map(e=>e.content)),r=await (0,f.filesOnDisk)(a,o);if(!r.length)return"";let n=r.slice(-s.BOT_RUN.compactFiles),i=r.length-n.length,l=n.map(e=>`- ${e}`);return i&&l.unshift(`- …and ${i} older ones`),`
91
93
 
92
94
  Files this job has on disk now — open one rather than fetching again what is in it:
93
95
  ${l.join("\n")}`}catch(e){return m.logger.warn("files under the summary could not be listed",e),""}}async function I(e,t,o,a){let r;try{return await x(e,t,o,a)}catch(e){if(a.signal?.aborted)throw e;r=e}if((0,l.isContextOverflow)(r)){let n=(0,c.asWords)(o,(e,t)=>`${e}: ${(0,T.argumentLine)(e,t)}`);try{return await x(e,t,n,a)}catch(e){if(a.signal?.aborted)throw e;r=e}}throw Error(`Could not compact the context (${(0,l.modelErrorToString)(r)}).`,{cause:r})}async function x(e,t,o,a){let n,{text:i,usage:l}=await (0,r.generateText)({model:e,instructions:a.instructions,tools:t,toolChoice:"none",messages:[...o,{role:"user",content:(n=(e=>{let{min:t,max:o,perTokens:a}=s.BOT_RUN.summaryWords;return Math.min(o,Math.max(t,Math.round(e/a)))})(a.budget),`Compact your context. The first message above — who handed you the job, and the job — stays exactly as it is. Everything after it is replaced by what you write now, and you carry on from that first message and this alone; nothing else above can be read again. Write it for a fresh copy of you that has your tools, your instructions and that first message, but has seen none of the rest.
@@ -104,8 +106,8 @@ Cover all of it, and prefer a fact over a description of a fact:
104
106
  Plain text, under ${n} words. No preamble, no headings about the summary itself, no account of how you have been going.`)}],abortSignal:a.signal,timeout:s.BOT_RUN.silenceMs,providerOptions:a.providerOptions}),d=i.trim();if(!d)throw Error("The summary of the context came back empty, so there is nothing to carry on from.");return{text:`Everything between the first message and here was compacted. Below is your own summary of it; carry on from the first message and this.
105
107
 
106
108
  ${d}`,usage:N(l)}}let N=e=>({input:e.inputTokens??0,output:e.outputTokens??0,cacheRead:e.inputTokenDetails?.cacheReadTokens??0,cacheWrite:e.inputTokenDetails?.cacheWriteTokens??0}),C=(e,t)=>(0,a.createHash)("sha256").update(`${e}
107
- ${t}`).digest("hex").slice(0,32);function O(e,t={}){return e.provider&&e.model?(0,l.getTextModel)({provider:e.provider,model:e.model}):(0,l.resolveDefaultModel)(void 0,t).then(l.getTextModel)}e.s(["resolveModel",0,O,"resumeTranscript",0,function(e,t=new Map){let o=new Map,a=new Set;for(let t of e)if(("tool"===t.role||"assistant"===t.role)&&Array.isArray(t.content))for(let e of t.content)"tool-result"===e.type&&(o.has(e.toolCallId)||o.set(e.toolCallId,e),"assistant"===t.role&&a.add(e.toolCallId));let r=[],n=new Set;for(let s of e){if("tool"===s.role){let e=s.content.filter(e=>"tool-result"!==e.type);e.length&&r.push({...s,content:e});continue}if("assistant"!==s.role||"string"==typeof s.content){r.push(s);continue}let e=[],i=[];for(let r of s.content){if("tool-call"!==r.type){i.push(r);continue}if(n.has(r.toolCallId))continue;let s=r.input;if("string"==typeof s)try{s=JSON.parse(s)}catch{s=void 0}if(!r.toolCallId||void 0===s){i.push({type:"text",text:"A tool argument stream was interrupted before a complete call was recorded. Inspect the saved work before continuing."});continue}let l=r.toolName===u.TOOL_NAMES.send_message?t.get(r.toolCallId):void 0,d=o.get(r.toolCallId)??(l?{type:"tool-result",toolCallId:r.toolCallId,toolName:r.toolName,output:{type:"json",value:l}}:void 0);if(r.providerExecuted&&(!d||!a.has(r.toolCallId))){i.push({type:"text",text:d?`The provider operation ${r.toolName} returned this data before its native continuation was interrupted: ${JSON.stringify(d.output)}`:`The provider operation ${r.toolName} was interrupted without a recorded result. Its remote execution state is unknown.`});continue}n.add(r.toolCallId),i.push({...r,input:s}),a.has(r.toolCallId)||e.push(d??{type:"tool-result",toolCallId:r.toolCallId,toolName:r.toolName,output:{type:"text",value:"No result: execution was interrupted before a result was recorded. The outcome is unknown. Inspect the current state before repeating the action."}})}i.length&&r.push({...s,content:i}),e.length&&r.push({role:"tool",content:e})}return r},"runBot",0,v]),o()}catch(e){o(e)}},!1),39803,e=>e.a(async(t,o)=>{try{var a=e.i(136340),r=e.i(380690),n=e.i(687388),s=e.i(386075),i=e.i(851372),l=e.i(22676),d=e.i(629668),h=e.i(786025),u=e.i(167004),c=e.i(640911),w=e.i(53748),p=e.i(268486),f=e.i(41444),m=e.i(265143),y=e.i(585099),g=e.i(944971),b=e.i(742712),T=e.i(889034),$=e.i(378884),v=t([s,i,l,m,y,b,$]);[s,i,l,m,y,b,$]=v.then?(await v)():v;let W=globalThis.__roomRuns??=new Map,j=globalThis.__roomThreadLock??=(0,p.createKeyedLock)(),P=globalThis.__roomCompactAsked??=new Set,L=(e,t)=>`${e}
108
- ${t}`;async function k(e){let t=await (0,m.findJobBot)(e.bot);(!t||t.disabled)&&(0,w.publicError)("Choose an enabled bot.");let{from:o,routine:a,...r}={...e,bot:t.name},n=(0,i.buildThreadOpening)({bot:r.bot,request:r.request,from:o,routine:a}),s=await (0,$.insertThread)({...r,routineId:a?.id??null,opening:n});return await x(s.id),s.id}async function I(e,t,o="user",a,r){let n=null;return await j(e,async()=>{let s=await (0,$.findThread)(e);if(s||(0,w.publicError)("No such thread."),a){let t=(await (0,b.listRoomWork)(e)).find(e=>e.bot.toLowerCase()===a.trim().toLowerCase());t&&t.bot!==T.ROOM_THURSDAY||(0,w.publicError)("Choose a participant in this thread."),a=t.bot}t.trim()===g.THREAD_CONTINUE&&(0,g.isAppStop)(s.pending)?(await (0,b.resumeRoom)(e),(await (0,b.listRoomWork)(e)).some(e=>"queued"===e.state)||(n=await (0,b.tellRoom)(e,"Continue from the saved conversation.","user"===o?T.ROOM_USER:T.ROOM_THURSDAY,a,void 0,!1))):n=await (0,b.tellRoom)(e,t,"user"===o?T.ROOM_USER:T.ROOM_THURSDAY,a,r)}),await x(e),n}async function x(e){await j(e,async()=>{for(let t=0;t<2;t++){let t;for(;t=await (0,b.claimRoomWork)(e);)!function(e){let t,o=new AbortController,a=new Promise(e=>{t=e});W.set(e.id,{threadId:e.threadId,stop:o,done:a}),O(e,o.signal).catch(t=>c.logger.error(`thread ${e.threadId}: participant`,t)).finally(()=>{W.delete(e.id),t(),x(e.threadId).catch(t=>c.logger.error(`thread ${e.threadId}: scheduling`,t))})}(t);await (0,b.settleRoom)(e)}})}async function O(e,t){let o=await S(e,t);if(o?.failure?.retry&&!t.aborted&&(await (0,b.noteRoomBreak)(e,o.failure.message),await (0,a.setTimeout)(n.BOT_RUN.retryMs,void 0,{signal:t}).catch(()=>{}),t.aborted||(o=await S(e,t,!1))),!o||t.aborted)return;let s=o.failure?.message,i=o.ending;if(s||!i||i.stopped){let t=s??"The turn was interrupted. Continue from the saved conversation.";j(e.threadId,async()=>{let o=(await (0,b.listRoomWork)(e.threadId)).find(t=>t.id===e.id);if(o?.state!=="running"||o.generation!==e.generation)return;let a=N(e.threadId);await (0,b.pauseRoom)(e.threadId,t),await a}).catch(t=>c.logger.error(`thread ${e.threadId}: pausing`,t));return}await (0,b.finishRoomWork)(e,i.text);let w=await (0,$.findThread)(e.threadId);if(w?.status==="done"){let e=(0,f.plainText)(w.outcome??"").slice(0,n.FINISHED_NOTICE.words);r.presence.watching||await (0,l.isAnyCallLive)()||(0,u.desktopNotify)(w.label,e);let t=await (0,h.filesOnDisk)((0,d.pathsIn)(w.outcome??""),null);r.appEvents.emit({type:"finished",threadId:w.id,label:w.label,bot:w.bot,words:e,paths:(0,d.leadFirst)(t)})}}async function S(e,t,o=!0){let a=new U(e,t),r=null,n=null;try{let s=await (0,$.findThread)(e.threadId);if(!s)return null;if((await (0,b.listParticipantTranscript)(e.threadId,e.bot)).length||await (0,b.joinRoom)(e,t=>(0,i.buildJoinOpening)({bot:e.bot,coordinator:s.bot,job:t,request:s.request})),await (0,b.consumeRoomInbox)(e),o&&(0,T.isCoordinatorSeat)(e.bot,s.bot,e.caller)){let t=await (0,b.roomBoard)(e);t&&await (0,b.appendRoomMessage)(e.threadId,{bot:e.bot,parent:e.id,role:"user",content:t,hidden:!0})}let l=await (0,b.listParticipantTranscript)(e.threadId,e.bot);await (0,y.runBot)({bot:e.bot,messages:(0,y.resumeTranscript)(l,await (0,b.listRoomReceipts)(e.threadId,e.bot,l))},{signal:t,threadId:e.threadId,parent:e.id,caller:e.caller,owner:s.bot,contextBudget:await (0,b.roomContextBudget)(e.threadId,e.bot),compactNow:()=>P.delete(L(e.threadId,e.bot)),session:(0,h.botBrowserSession)(e.threadId,e.bot),notes:()=>(0,b.consumeRoomInbox)(e),send:async o=>{t.throwIfAborted();let a=o.to.trim();if(a.toLowerCase()===T.ROOM_THURSDAY.toLowerCase())a=T.ROOM_THURSDAY;else{let e=await (0,m.findJobBot)(a);(!e||e.disabled)&&(0,w.publicError)(`No enabled bot named "${a}".`),a=e.name}let r=await (0,b.sendRoomMessage)(e,{...o,to:a});return x(e.threadId).catch(e=>c.logger.error("room message scheduling",e)),r},emit:async o=>{(!t.aborted||"tool-result"===o.type)&&(await a.on(o),"step"===o.type&&await (0,$.addThreadUsage)(e.threadId,o.usage,e.bot===s.bot?{tokens:o.usage.input,budget:o.budget}:null),"compact"===o.type&&await (0,$.addThreadUsage)(e.threadId,o.usage),"turn-end"===o.type&&(r=o),"error"===o.type&&(n={message:o.message,retry:o.retry},o.budget&&await (0,b.lowerRoomContextBudget)(e,o.budget)))}})}catch(o){t.aborted||(c.logger.error(`thread ${e.threadId}: ${e.bot} broke`,o),n={message:(0,s.modelErrorToString)(o),retry:!(0,w.isPublicError)(o)&&!(0,s.isProviderRefusal)(o)})}return{ending:r,failure:n}}class U{work;signal;lane;assistant;tool;parts;calls;results;constructor(e,t){this.work=e,this.signal=t,this.lane=(0,f.PromiseChain)(),this.assistant=null,this.tool=null,this.parts={assistant:[],tool:[]},this.calls=new Set,this.results=new Set}async write(e,t,o=!1){let a={bot:this.work.bot,parent:this.work.id,role:t.role,content:t.content,compact:o,note:o};return null===e?(0,b.appendRoomMessage)(this.work.threadId,a):(await (0,$.upsertMessage)(this.work.threadId,e,a),e)}on(e){return this.lane(async()=>{if(!this.signal.aborted||"tool-result"===e.type)if("text"===e.type)this.parts.assistant.push({type:"text",text:e.text}),this.assistant=await this.write(this.assistant,{role:"assistant",content:this.parts.assistant});else if("tool"===e.type){if(this.calls.has(e.id)){let t=this.parts.assistant.find(t=>"tool-call"===t.type&&t.toolCallId===e.id);t&&"tool-call"===t.type&&e.providerOptions&&(t.providerOptions=e.providerOptions,this.assistant=await this.write(this.assistant,{role:"assistant",content:this.parts.assistant}));return}this.calls.add(e.id),this.parts.assistant.push({type:"tool-call",toolCallId:e.id,toolName:e.name,input:e.input,...e.providerExecuted?{providerExecuted:!0}:{},...e.providerOptions?{providerOptions:e.providerOptions}:{}}),this.assistant=await this.write(this.assistant,{role:"assistant",content:this.parts.assistant})}else if("tool-result"===e.type){if(this.results.has(e.id))return;this.results.add(e.id),this.parts.tool.push({type:"tool-result",toolCallId:e.id,toolName:e.name,output:e.error?{type:"error-text",value:String(e.output)}:"string"==typeof e.output?{type:"text",value:e.output}:{type:"json",value:e.output}}),this.tool=await this.write(this.tool,{role:"tool",content:this.parts.tool})}else if("step"===e.type){let t=[this.assistant,this.tool];for(let[o,a]of e.messages.entries())await this.write(t[o]??null,a);let o=t.slice(e.messages.length).filter(e=>null!==e);o.length&&await (0,$.deleteMessages)(this.work.threadId,o),this.assistant=this.tool=null,this.parts={assistant:[],tool:[]}}else"compact"===e.type&&await this.write(null,{role:"user",content:e.text},!0)})}}async function N(e){let t=[...W.values()].filter(t=>t.threadId===e);for(let e of t)e.stop.abort();await Promise.all(t.map(e=>e.done))}async function C(e){await j(e,async()=>{let t=await (0,$.findThread)(e);t||(0,w.publicError)("No such thread."),t.endedAt&&(0,w.publicError)("That thread has already ended."),await (0,b.cancelRoom)(e),await (0,$.updateThread)(e,{status:"cancelled",outcome:null,pending:null,seen:!0,endedAt:new Date}),await N(e),await (0,h.closeJobShell)(e)})}async function M(e){return j(e,()=>E(e))}async function E(e){let t=await (0,$.findThread)(e);await (0,b.cancelRoom)(e),await N(e),await (0,h.removeJobBrowsers)(e);let o=await (0,$.deleteThread)(e);return o&&t&&await (0,h.removeJobScratch)(e,t.label),o}async function R(e){let t=e?.getTime(),o=e=>void 0===t||(e.endedAt??e.updatedAt).getTime()<t,a=0;for(let e of(await (0,$.listThreadFolders)()))("done"===e.status||"cancelled"===e.status)&&o(e)&&await j(e.id,async()=>{let t=await (0,$.findThread)(e.id);t?.status!=="done"&&t?.status!=="cancelled"||o(t)&&await E(e.id)&&(a+=1)});return a}async function A(){let e=Date.now()-n.WORKSPACE_KEEP.forMs,t=t=>("done"===t.status||"cancelled"===t.status)&&(t.endedAt??t.updatedAt).getTime()<e,o=new Set(await (0,h.listScratchFolders)()),a=[];for(let e of(await (0,$.listThreadFolders)())){let r=(0,h.jobScratch)(e.id,e.label);o.delete(r)&&t(e)&&await j(e.id,async()=>{let o=await (0,$.findThread)(e.id);o&&t(o)&&(await (0,h.closeHiddenBrowser)(e.id),await (0,h.removeJobScratch)(e.id,e.label),a.push(r))})}return a.push(...await (0,h.removeUnchangedFolders)([...o])),await (0,h.pruneJobFiles)(),a.length&&c.logger.info(`cleared ${a.length} old job folder(s): ${a.join(", ")}`),a}async function _(){for(let e of(await (0,$.listRunningThreadIds)()))await j(e,async()=>{[...W.values()].some(t=>t.threadId===e)||(await (0,$.findThread)(e))?.status==="running"&&await (0,b.pauseRoom)(e,"The server restarted. Resume from the saved conversation.")})}async function B(e){let t=await (0,$.listRunningThreadIds)();await Promise.all(t.map(t=>j(t,async()=>{(await (0,$.findThread)(t))?.status==="running"&&(await N(t),await (0,b.pauseRoom)(t,e))})))}e.s(["answerThread",0,I,"askCompact",0,function(e,t){P.add(L(e,t))},"cancelThread",0,C,"pauseThreads",0,B,"removeFinishedThreads",0,R,"removeThread",0,M,"startThread",0,k,"sweepJobFiles",0,A,"sweepThreads",0,_]),o()}catch(e){o(e)}},!1),167004,e=>{"use strict";var t=e.i(874533),o=e.i(687388);let a=`on run argv
109
+ ${t}`).digest("hex").slice(0,32);function O(e,t={}){return e.provider&&e.model?(0,l.getTextModel)({provider:e.provider,model:e.model}):(0,l.resolveDefaultModel)(void 0,t).then(l.getTextModel)}e.s(["resolveModel",0,O,"resumeTranscript",0,function(e,t=new Map){let o=new Map,a=new Set;for(let t of e)if(("tool"===t.role||"assistant"===t.role)&&Array.isArray(t.content))for(let e of t.content)"tool-result"===e.type&&(o.has(e.toolCallId)||o.set(e.toolCallId,e),"assistant"===t.role&&a.add(e.toolCallId));let r=[],n=new Set;for(let s of e){if("tool"===s.role){let e=s.content.filter(e=>"tool-result"!==e.type);e.length&&r.push({...s,content:e});continue}if("assistant"!==s.role||"string"==typeof s.content){r.push(s);continue}let e=[],i=[];for(let r of s.content){if("tool-call"!==r.type){i.push(r);continue}if(n.has(r.toolCallId))continue;let s=r.input;if("string"==typeof s)try{s=JSON.parse(s)}catch{s=void 0}if(!r.toolCallId||void 0===s){i.push({type:"text",text:"A tool argument stream was interrupted before a complete call was recorded. Inspect the saved work before continuing."});continue}let l=r.toolName===u.TOOL_NAMES.send_message?t.get(r.toolCallId):void 0,d=o.get(r.toolCallId)??(l?{type:"tool-result",toolCallId:r.toolCallId,toolName:r.toolName,output:{type:"json",value:l}}:void 0);if(r.providerExecuted&&(!d||!a.has(r.toolCallId))){i.push({type:"text",text:d?`The provider operation ${r.toolName} returned this data before its native continuation was interrupted: ${JSON.stringify(d.output)}`:`The provider operation ${r.toolName} was interrupted without a recorded result. Its remote execution state is unknown.`});continue}n.add(r.toolCallId),i.push({...r,input:s}),a.has(r.toolCallId)||e.push(d??{type:"tool-result",toolCallId:r.toolCallId,toolName:r.toolName,output:{type:"text",value:"No result: execution was interrupted before a result was recorded. The outcome is unknown. Inspect the current state before repeating the action."}})}i.length&&r.push({...s,content:i}),e.length&&r.push({role:"tool",content:e})}return r},"runBot",0,v]),o()}catch(e){o(e)}},!1),39803,e=>e.a(async(t,o)=>{try{var a=e.i(136340),r=e.i(380690),n=e.i(687388),s=e.i(386075),i=e.i(851372),l=e.i(22676),d=e.i(629668),h=e.i(786025),u=e.i(167004),c=e.i(640911),w=e.i(53748),p=e.i(268486),f=e.i(41444),m=e.i(265143),y=e.i(585099),g=e.i(944971),b=e.i(742712),T=e.i(889034),$=e.i(378884),v=t([s,i,l,m,y,b,$]);[s,i,l,m,y,b,$]=v.then?(await v)():v;let _=globalThis.__roomRuns??=new Map,B=globalThis.__roomThreadLock??=(0,p.createKeyedLock)(),P=globalThis.__roomCompactAsked??=new Set,L=(e,t)=>`${e}
110
+ ${t}`;async function k(e){let t=await (0,m.findJobBot)(e.bot);(!t||t.disabled)&&(0,w.publicError)("Choose an enabled bot.");let{from:o,routine:a,...r}={...e,bot:t.name},n=(0,i.buildThreadOpening)({bot:r.bot,request:r.request,from:o,routine:a}),s=await (0,$.insertThread)({...r,routineId:a?.id??null,opening:n});return await x(s.id),s.id}async function I(e,t,o="user",a,r){let n=null;return await B(e,async()=>{let s=await (0,$.findThread)(e);if(s||(0,w.publicError)("No such thread."),a){let t=(await (0,b.listRoomWork)(e)).find(e=>e.bot.toLowerCase()===a.trim().toLowerCase());t&&t.bot!==T.ROOM_THURSDAY||(0,w.publicError)("Choose a participant in this thread."),a=t.bot}t.trim()===g.THREAD_CONTINUE&&(0,g.isAppStop)(s.pending)?(await (0,b.resumeRoom)(e),(await (0,b.listRoomWork)(e)).some(e=>"queued"===e.state)||(n=await (0,b.tellRoom)(e,"Continue from the saved conversation.","user"===o?T.ROOM_USER:T.ROOM_THURSDAY,a,void 0,!1))):n=await (0,b.tellRoom)(e,t,"user"===o?T.ROOM_USER:T.ROOM_THURSDAY,a,r)}),await x(e),n}async function x(e){await B(e,async()=>{for(let t=0;t<2;t++){let t;for(;t=await (0,b.claimRoomWork)(e);)!function(e){let t,o=new AbortController,a=new Promise(e=>{t=e});_.set(e.id,{threadId:e.threadId,stop:o,done:a}),O(e,o.signal).catch(t=>c.logger.error(`thread ${e.threadId}: participant`,t)).finally(()=>{_.delete(e.id),t(),x(e.threadId).catch(t=>c.logger.error(`thread ${e.threadId}: scheduling`,t))})}(t);await (0,b.settleRoom)(e)}})}async function O(e,t){let o=await S(e,t);if(o?.failure?.retry&&!t.aborted&&(await (0,b.noteRoomBreak)(e,o.failure.message),await (0,a.setTimeout)(n.BOT_RUN.retryMs,void 0,{signal:t}).catch(()=>{}),t.aborted||(o=await S(e,t,!1))),!o||t.aborted)return;let s=o.failure?.message,i=o.ending;if(s||!i||i.stopped){let t=s??"The turn was interrupted. Continue from the saved conversation.";B(e.threadId,async()=>{let o=(await (0,b.listRoomWork)(e.threadId)).find(t=>t.id===e.id);if(o?.state!=="running"||o.generation!==e.generation)return;let a=N(e.threadId);await (0,b.pauseRoom)(e.threadId,t),await a}).catch(t=>c.logger.error(`thread ${e.threadId}: pausing`,t));return}await (0,b.finishRoomWork)(e,i.text);let w=await (0,$.findThread)(e.threadId);if(w?.status==="done"){let e=(0,f.plainText)(w.outcome??"").slice(0,n.FINISHED_NOTICE.words);r.presence.watching||await (0,l.isAnyCallLive)()||(0,u.desktopNotify)(w.label,e);let t=await (0,h.filesOnDisk)((0,d.pathsIn)(w.outcome??""),null);r.appEvents.emit({type:"finished",threadId:w.id,label:w.label,bot:w.bot,words:e,paths:(0,d.leadFirst)(t)})}}async function S(e,t,o=!0){let a=new U(e,t),r=null,n=null;try{let s=await (0,$.findThread)(e.threadId);if(!s)return null;if((await (0,b.listParticipantTranscript)(e.threadId,e.bot)).length||await (0,b.joinRoom)(e,t=>(0,i.buildJoinOpening)({bot:e.bot,coordinator:s.bot,job:t,request:s.request})),await (0,b.consumeRoomInbox)(e),o&&(0,T.isCoordinatorSeat)(e.bot,s.bot,e.caller)){let t=await (0,b.roomBoard)(e);t&&await (0,b.appendRoomMessage)(e.threadId,{bot:e.bot,parent:e.id,role:"user",content:t,hidden:!0})}let l=await (0,b.listParticipantTranscript)(e.threadId,e.bot);await (0,y.runBot)({bot:e.bot,messages:(0,y.resumeTranscript)(l,await (0,b.listRoomReceipts)(e.threadId,e.bot,l))},{signal:t,threadId:e.threadId,parent:e.id,caller:e.caller,owner:s.bot,contextBudget:await (0,b.roomContextBudget)(e.threadId,e.bot),compactNow:()=>P.delete(L(e.threadId,e.bot)),session:(0,h.botBrowserSession)(e.threadId,e.bot),notes:()=>(0,b.consumeRoomInbox)(e),send:async o=>{t.throwIfAborted();let a=o.to.trim();if(a.toLowerCase()===T.ROOM_THURSDAY.toLowerCase())a=T.ROOM_THURSDAY;else{let e=await (0,m.findJobBot)(a);(!e||e.disabled)&&(0,w.publicError)(`No enabled bot named "${a}".`),a=e.name}let r=await (0,b.sendRoomMessage)(e,{...o,to:a});return x(e.threadId).catch(e=>c.logger.error("room message scheduling",e)),r},emit:async o=>{(!t.aborted||"tool-result"===o.type)&&(await a.on(o),"step"===o.type&&await (0,$.addThreadUsage)(e.threadId,o.usage,e.bot===s.bot?{tokens:o.usage.input,budget:o.budget}:null),"compact"===o.type&&await (0,$.addThreadUsage)(e.threadId,o.usage),"turn-end"===o.type&&(r=o),"error"===o.type&&(n={message:o.message,retry:o.retry},o.budget&&await (0,b.lowerRoomContextBudget)(e,o.budget)))}})}catch(o){t.aborted||(c.logger.error(`thread ${e.threadId}: ${e.bot} broke`,o),n={message:(0,s.modelErrorToString)(o),retry:!(0,w.isPublicError)(o)&&!(0,s.isProviderRefusal)(o)})}return{ending:r,failure:n}}class U{work;signal;lane;assistant;tool;parts;calls;results;constructor(e,t){this.work=e,this.signal=t,this.lane=(0,f.PromiseChain)(),this.assistant=null,this.tool=null,this.parts={assistant:[],tool:[]},this.calls=new Set,this.results=new Set}async write(e,t,o=!1){let a={bot:this.work.bot,parent:this.work.id,role:t.role,content:t.content,compact:o,note:o};return null===e?(0,b.appendRoomMessage)(this.work.threadId,a):(await (0,$.upsertMessage)(this.work.threadId,e,a),e)}on(e){return this.lane(async()=>{if(!this.signal.aborted||"tool-result"===e.type)if("text"===e.type)this.parts.assistant.push({type:"text",text:e.text}),this.assistant=await this.write(this.assistant,{role:"assistant",content:this.parts.assistant});else if("tool"===e.type){if(this.calls.has(e.id)){let t=this.parts.assistant.find(t=>"tool-call"===t.type&&t.toolCallId===e.id);t&&"tool-call"===t.type&&e.providerOptions&&(t.providerOptions=e.providerOptions,this.assistant=await this.write(this.assistant,{role:"assistant",content:this.parts.assistant}));return}this.calls.add(e.id),this.parts.assistant.push({type:"tool-call",toolCallId:e.id,toolName:e.name,input:e.input,...e.providerExecuted?{providerExecuted:!0}:{},...e.providerOptions?{providerOptions:e.providerOptions}:{}}),this.assistant=await this.write(this.assistant,{role:"assistant",content:this.parts.assistant})}else if("tool-result"===e.type){if(this.results.has(e.id))return;this.results.add(e.id),this.parts.tool.push({type:"tool-result",toolCallId:e.id,toolName:e.name,output:e.error?{type:"error-text",value:String(e.output)}:"string"==typeof e.output?{type:"text",value:e.output}:{type:"json",value:e.output}}),this.tool=await this.write(this.tool,{role:"tool",content:this.parts.tool})}else if("step"===e.type){let t=[this.assistant,this.tool];for(let[o,a]of e.messages.entries())await this.write(t[o]??null,a);let o=t.slice(e.messages.length).filter(e=>null!==e);o.length&&await (0,$.deleteMessages)(this.work.threadId,o),this.assistant=this.tool=null,this.parts={assistant:[],tool:[]}}else"compact"===e.type&&await this.write(null,{role:"user",content:e.text},!0)})}}async function N(e){let t=[..._.values()].filter(t=>t.threadId===e);for(let e of t)e.stop.abort();await Promise.all(t.map(e=>e.done))}async function C(e){await B(e,async()=>{let t=await (0,$.findThread)(e);t||(0,w.publicError)("No such thread."),t.endedAt&&(0,w.publicError)("That thread has already ended."),await (0,b.cancelRoom)(e),await (0,$.updateThread)(e,{status:"cancelled",outcome:null,pending:null,seen:!0,endedAt:new Date}),await N(e),await (0,h.closeJobShell)(e)})}async function M(e){return B(e,()=>E(e))}async function E(e){let t=await (0,$.findThread)(e);await (0,b.cancelRoom)(e),await N(e),await (0,h.removeJobBrowsers)(e);let o=await (0,$.deleteThread)(e);return o&&t&&await (0,h.removeJobScratch)(e,t.label),o}async function R(e){let t=e?.getTime(),o=e=>void 0===t||(e.endedAt??e.updatedAt).getTime()<t,a=0;for(let e of(await (0,$.listThreadFolders)()))("done"===e.status||"cancelled"===e.status)&&o(e)&&await B(e.id,async()=>{let t=await (0,$.findThread)(e.id);t?.status!=="done"&&t?.status!=="cancelled"||o(t)&&await E(e.id)&&(a+=1)});return a}async function A(){let e=Date.now()-n.WORKSPACE_KEEP.forMs,t=t=>("done"===t.status||"cancelled"===t.status)&&(t.endedAt??t.updatedAt).getTime()<e,o=new Set(await (0,h.listScratchFolders)()),a=[];for(let e of(await (0,$.listThreadFolders)())){let r=(0,h.jobScratch)(e.id,e.label);o.delete(r)&&t(e)&&await B(e.id,async()=>{let o=await (0,$.findThread)(e.id);o&&t(o)&&(await (0,h.closeHiddenBrowser)(e.id),await (0,h.removeJobScratch)(e.id,e.label),a.push(r))})}return a.push(...await (0,h.removeUnchangedFolders)([...o])),await (0,h.pruneJobFiles)(),a.length&&c.logger.info(`cleared ${a.length} old job folder(s): ${a.join(", ")}`),a}async function j(){for(let e of(await (0,$.listRunningThreadIds)()))await B(e,async()=>{[..._.values()].some(t=>t.threadId===e)||(await (0,$.findThread)(e))?.status==="running"&&await (0,b.pauseRoom)(e,"The server restarted. Resume from the saved conversation.")})}async function W(e){let t=await (0,$.listRunningThreadIds)();await Promise.all(t.map(t=>B(t,async()=>{(await (0,$.findThread)(t))?.status==="running"&&(await N(t),await (0,b.pauseRoom)(t,e))})))}e.s(["answerThread",0,I,"askCompact",0,function(e,t){P.add(L(e,t))},"cancelThread",0,C,"pauseThreads",0,W,"removeFinishedThreads",0,R,"removeThread",0,M,"startThread",0,k,"sweepJobFiles",0,A,"sweepThreads",0,j]),o()}catch(e){o(e)}},!1),167004,e=>{"use strict";var t=e.i(874533),o=e.i(687388);let a=`on run argv
109
111
  display notification (item 2 of argv) with title (item 1 of argv)
110
112
  end run`,r=`
111
113
  $ErrorActionPreference = 'Stop'