thursday-agent 0.17.0 → 0.17.2

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 (361) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +2 -0
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/routes-manifest.json +12 -0
  6. package/.next/server/app/_global-error/page.js.nft.json +1 -1
  7. package/.next/server/app/_global-error.html +1 -1
  8. package/.next/server/app/_global-error.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  12. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  13. package/.next/server/app/_not-found.html +1 -1
  14. package/.next/server/app/_not-found.rsc +1 -1
  15. package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  16. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  17. package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  18. package/.next/server/app/api/artifact/route.js +9 -8
  19. package/.next/server/app/api/artifact/route.js.nft.json +1 -1
  20. package/.next/server/app/api/bot/memory/files/route.js.nft.json +1 -1
  21. package/.next/server/app/api/bot/memory/route.js +8 -7
  22. package/.next/server/app/api/bot/memory/route.js.nft.json +1 -1
  23. package/.next/server/app/api/bot/route.js +8 -7
  24. package/.next/server/app/api/bot/route.js.nft.json +1 -1
  25. package/.next/server/app/api/bot/thread/[id]/route.js +4 -4
  26. package/.next/server/app/api/bot/thread/[id]/route.js.nft.json +1 -1
  27. package/.next/server/app/api/bot/thread/route.js +3 -3
  28. package/.next/server/app/api/bot/thread/route.js.nft.json +1 -1
  29. package/.next/server/app/api/config/route.js.nft.json +1 -1
  30. package/.next/server/app/api/events/route.js.nft.json +1 -1
  31. package/.next/server/app/api/favicon/[host]/route.js +4 -3
  32. package/.next/server/app/api/favicon/[host]/route.js.nft.json +1 -1
  33. package/.next/server/app/api/file/[...path]/route.js.nft.json +1 -1
  34. package/.next/server/app/api/llm-model/automatic/route/app-paths-manifest.json +3 -0
  35. package/.next/server/app/api/llm-model/automatic/route/build-manifest.json +12 -0
  36. package/.next/server/app/api/llm-model/automatic/route/server-reference-manifest.json +4 -0
  37. package/.next/server/app/api/llm-model/automatic/route.js +17 -0
  38. package/.next/server/app/api/llm-model/automatic/route.js.map +5 -0
  39. package/.next/server/app/api/llm-model/automatic/route.js.nft.json +1 -0
  40. package/.next/server/app/api/llm-model/automatic/route_client-reference-manifest.js +3 -0
  41. package/.next/server/app/api/llm-model/catalog/route.js.nft.json +1 -1
  42. package/.next/server/app/api/llm-model/credits/route.js.nft.json +1 -1
  43. package/.next/server/app/api/llm-model/route.js.nft.json +1 -1
  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.nft.json +1 -1
  46. package/.next/server/app/api/mcp/oauth/callback/route.js.nft.json +1 -1
  47. package/.next/server/app/api/mcp/route.js.nft.json +1 -1
  48. package/.next/server/app/api/mcp/tools/route.js.nft.json +1 -1
  49. package/.next/server/app/api/memory/edit/route.js +14 -13
  50. package/.next/server/app/api/memory/edit/route.js.nft.json +1 -1
  51. package/.next/server/app/api/memory/route.js.nft.json +1 -1
  52. package/.next/server/app/api/reach/route.js +17 -16
  53. package/.next/server/app/api/reach/route.js.nft.json +1 -1
  54. package/.next/server/app/api/routine/route.js +10 -10
  55. package/.next/server/app/api/routine/route.js.nft.json +1 -1
  56. package/.next/server/app/api/signins/route.js.nft.json +1 -1
  57. package/.next/server/app/api/skills/[source]/[name]/route.js +9 -8
  58. package/.next/server/app/api/skills/[source]/[name]/route.js.nft.json +1 -1
  59. package/.next/server/app/api/skills/route.js +9 -8
  60. package/.next/server/app/api/skills/route.js.nft.json +1 -1
  61. package/.next/server/app/api/thursday/call/end/route/app-paths-manifest.json +3 -0
  62. package/.next/server/app/api/thursday/call/end/route/build-manifest.json +12 -0
  63. package/.next/server/app/api/thursday/call/end/route/server-reference-manifest.json +4 -0
  64. package/.next/server/app/api/thursday/call/end/route.js +17 -0
  65. package/.next/server/app/api/thursday/call/end/route.js.map +5 -0
  66. package/.next/server/app/api/thursday/call/end/route.js.nft.json +1 -0
  67. package/.next/server/app/api/thursday/call/end/route_client-reference-manifest.js +3 -0
  68. package/.next/server/app/api/thursday/call/route.js +6 -6
  69. package/.next/server/app/api/thursday/call/route.js.nft.json +1 -1
  70. package/.next/server/app/api/thursday/settings/route.js +5 -5
  71. package/.next/server/app/api/thursday/settings/route.js.nft.json +1 -1
  72. package/.next/server/app/api/thursday/text/route.js +16 -15
  73. package/.next/server/app/api/thursday/text/route.js.nft.json +1 -1
  74. package/.next/server/app/api/thursday/tool-call/route.js +13 -12
  75. package/.next/server/app/api/thursday/tool-call/route.js.nft.json +1 -1
  76. package/.next/server/app/api/workspace/files/route.js +5 -5
  77. package/.next/server/app/api/workspace/files/route.js.nft.json +1 -1
  78. package/.next/server/app/api/workspace/route.js +5 -5
  79. package/.next/server/app/api/workspace/route.js.nft.json +1 -1
  80. package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +3 -3
  81. package/.next/server/app/artifact/[...path]/page.js +2 -2
  82. package/.next/server/app/artifact/[...path]/page.js.nft.json +1 -1
  83. package/.next/server/app/artifact/[...path]/page_client-reference-manifest.js +1 -1
  84. package/.next/server/app/favicon.ico/route.js.nft.json +1 -1
  85. package/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  86. package/.next/server/app/page/server-reference-manifest.json +60 -60
  87. package/.next/server/app/page.js +8 -8
  88. package/.next/server/app/page.js.nft.json +1 -1
  89. package/.next/server/app/page_client-reference-manifest.js +1 -1
  90. package/.next/server/app-paths-manifest.json +2 -0
  91. package/.next/server/chunks/{[externals]__178rv3v._.js → [externals]__12stas-._.js} +1 -1
  92. package/.next/server/chunks/[root-of-the-server]__00qyw01._.js +1 -1
  93. package/.next/server/chunks/{[root-of-the-server]__1ignh6-._.js → [root-of-the-server]__01k3vi3._.js} +1 -1
  94. package/.next/server/chunks/[root-of-the-server]__01ypm_z._.js +1 -1
  95. package/.next/server/chunks/[root-of-the-server]__021dkui._.js +1 -1
  96. package/.next/server/chunks/[root-of-the-server]__03vunn6._.js +1 -1
  97. package/.next/server/chunks/[root-of-the-server]__03xamry._.js +1 -1
  98. package/.next/server/chunks/[root-of-the-server]__05dp5tr._.js +1 -1
  99. package/.next/server/chunks/{[root-of-the-server]__208vmyf._.js → [root-of-the-server]__061o2_x._.js} +1 -1
  100. package/.next/server/chunks/[root-of-the-server]__09gdscj._.js +3 -3
  101. package/.next/server/chunks/[root-of-the-server]__0bqveex._.js +5 -0
  102. package/.next/server/chunks/[root-of-the-server]__0eivkvk._.js +5 -0
  103. package/.next/server/chunks/[root-of-the-server]__0f7m79q._.js +3 -0
  104. package/.next/server/chunks/[root-of-the-server]__0g38-aj._.js +2 -2
  105. package/.next/server/chunks/[root-of-the-server]__0h656y-._.js +2 -2
  106. package/.next/server/chunks/[root-of-the-server]__0hkxwim._.js +3 -0
  107. package/.next/server/chunks/[root-of-the-server]__0hm3tiq._.js +5 -0
  108. package/.next/server/chunks/[root-of-the-server]__0hzdqnv._.js +5 -0
  109. package/.next/server/chunks/[root-of-the-server]__0liwkmx._.js +4 -4
  110. package/.next/server/chunks/[root-of-the-server]__0ljizgj._.js +2 -2
  111. package/.next/server/chunks/[root-of-the-server]__0mgyt8p._.js +5 -0
  112. package/.next/server/chunks/[root-of-the-server]__0mrk2it._.js +1 -1
  113. package/.next/server/chunks/[root-of-the-server]__0nmust6._.js +2 -2
  114. package/.next/server/chunks/[root-of-the-server]__0p80i1n._.js +3 -0
  115. package/.next/server/chunks/[root-of-the-server]__0qzho69._.js +3 -0
  116. package/.next/server/chunks/[root-of-the-server]__0sm5xvm._.js +1 -1
  117. package/.next/server/chunks/[root-of-the-server]__0svzjwa._.js +3 -3
  118. package/.next/server/chunks/{[root-of-the-server]__0b36yfw._.js → [root-of-the-server]__0ts7ai0._.js} +1 -1
  119. package/.next/server/chunks/[root-of-the-server]__1-18_pz._.js +3 -0
  120. package/.next/server/chunks/[root-of-the-server]__1-rmal0._.js +5 -0
  121. package/.next/server/chunks/[root-of-the-server]__13hng6h._.js +1 -1
  122. package/.next/server/chunks/[root-of-the-server]__1_04mcf._.js +2 -2
  123. package/.next/server/chunks/[root-of-the-server]__1_h4hf9._.js +3 -3
  124. package/.next/server/chunks/[root-of-the-server]__1ceammd._.js +1 -1
  125. package/.next/server/chunks/[root-of-the-server]__1ckt1yj._.js +3 -0
  126. package/.next/server/chunks/[root-of-the-server]__1cu5f3z._.js +5 -0
  127. package/.next/server/chunks/[root-of-the-server]__1hviq62._.js +5 -0
  128. package/.next/server/chunks/{[root-of-the-server]__12m24xl._.js → [root-of-the-server]__1k2qs1m._.js} +1 -1
  129. package/.next/server/chunks/[root-of-the-server]__1kmnkbk._.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]__1p47fbb._.js +2 -2
  132. package/.next/server/chunks/[root-of-the-server]__1pugoq0._.js +3 -0
  133. package/.next/server/chunks/[root-of-the-server]__1t02-1p._.js +1 -1
  134. package/.next/server/chunks/[root-of-the-server]__1t0jj1j._.js +1 -1
  135. package/.next/server/chunks/[root-of-the-server]__1vlxv19._.js +2 -2
  136. package/.next/server/chunks/[root-of-the-server]__1ygplx1._.js +1 -1
  137. package/.next/server/chunks/[root-of-the-server]__1zn039k._.js +1 -1
  138. package/.next/server/chunks/_05gl-xy._.js +5 -5
  139. package/.next/server/chunks/_06hnfi8._.js +8 -0
  140. package/.next/server/chunks/_06u9yo-._.js +1 -1
  141. package/.next/server/chunks/_07nxi75._.js +25 -21
  142. package/.next/server/chunks/_08354bn._.js +25 -21
  143. package/.next/server/chunks/_08btiir._.js +3 -3
  144. package/.next/server/chunks/_0c49lmw._.js +5 -0
  145. package/.next/server/chunks/_0ey0s6v._.js +3 -0
  146. package/.next/server/chunks/_0hgvg55._.js +5 -0
  147. package/.next/server/chunks/_0j0-gq6._.js +2 -2
  148. package/.next/server/chunks/_0nn99o2._.js +1 -1
  149. package/.next/server/chunks/_0p6v1fr._.js +2 -2
  150. package/.next/server/chunks/_0s8ao8z._.js +3 -0
  151. package/.next/server/chunks/_0srlnvd._.js +1 -1
  152. package/.next/server/chunks/_0t_7gji._.js +1 -1
  153. package/.next/server/chunks/_0ucx1jv._.js +3 -0
  154. package/.next/server/chunks/_0uzj57i._.js +1 -1
  155. package/.next/server/chunks/_0xygcxs._.js +25 -21
  156. package/.next/server/chunks/_1-sk_q4._.js +1 -1
  157. package/.next/server/chunks/{_1xcnogc._.js → _108gsm8._.js} +4 -4
  158. package/.next/server/chunks/{_20oecmn._.js → _15negpy._.js} +4 -4
  159. package/.next/server/chunks/_19fh9t2._.js +3 -0
  160. package/.next/server/chunks/_19kea1l._.js +18 -18
  161. package/.next/server/chunks/_1dtm9bs._.js +1 -1
  162. package/.next/server/chunks/_1dxq827._.js +2 -2
  163. package/.next/server/chunks/_1e54wxa._.js +1 -1
  164. package/.next/server/chunks/_1frcwj1._.js +3 -0
  165. package/.next/server/chunks/_1gn2r2q._.js +5 -5
  166. package/.next/server/chunks/_1gxankq._.js +2 -2
  167. package/.next/server/chunks/_1i3uucm._.js +5 -0
  168. package/.next/server/chunks/_1m88lkh._.js +9 -9
  169. package/.next/server/chunks/_1mx9sfo._.js +1 -1
  170. package/.next/server/chunks/_1q6e56i._.js +5 -5
  171. package/.next/server/chunks/_1qxheoa._.js +1 -1
  172. package/.next/server/chunks/_1t5ijzv._.js +3 -0
  173. package/.next/server/chunks/_1wwl_7o._.js +1 -1
  174. package/.next/server/chunks/_1zfxb7j._.js +1 -1
  175. package/.next/server/chunks/_211dn2c._.js +1 -1
  176. package/.next/server/chunks/_next-internal_server_app_api_llm-model_automatic_route_actions_1-eyan7.js +3 -0
  177. package/.next/server/chunks/_next-internal_server_app_api_thursday_call_end_route_actions_0u5xjft.js +3 -0
  178. package/.next/server/chunks/config_ts_1g4sz5o._.js +1 -1
  179. package/.next/server/chunks/{features_0wm-ujw._.js → features_bot_08z387_._.js} +4 -4
  180. package/.next/server/chunks/{ssr/[root-of-the-server]__07660xu._.js → features_bot_0zy_q8y._.js} +8 -9
  181. package/.next/server/chunks/features_bot_1dfrdsb._.js +37 -0
  182. package/.next/server/chunks/features_workspace_workspace_ts_13h82gv._.js +3 -3
  183. package/.next/server/chunks/features_workspace_workspace_ts_1iyjroj._.js +3 -3
  184. package/.next/server/chunks/node_modules_103lpef._.js +3 -0
  185. package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0_nz09c._.js → node_modules_consola_dist_chunks_prompt_mjs_0-t5tbs._.js} +1 -1
  186. package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_1341cnf._.js → node_modules_consola_dist_chunks_prompt_mjs_039fwo9._.js} +1 -1
  187. package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_1x3bsmx._.js → node_modules_consola_dist_chunks_prompt_mjs_0pce1b3._.js} +1 -1
  188. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_0tvy5lq._.js +3 -0
  189. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_0wxw35t._.js +3 -0
  190. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1dlthym._.js +3 -0
  191. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1smfi4-._.js +3 -0
  192. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1x1omfi._.js +3 -0
  193. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_20is7e3._.js +3 -0
  194. package/.next/server/chunks/ssr/{[root-of-the-server]__149x25m._.js → [root-of-the-server]__0-af_o7._.js} +2 -2
  195. package/.next/server/chunks/ssr/[root-of-the-server]__09f39cp._.js +4 -0
  196. package/.next/server/chunks/ssr/[root-of-the-server]__0ouu4qp._.js +3 -0
  197. package/.next/server/chunks/ssr/[root-of-the-server]__0q9g9ea._.js +5 -0
  198. package/.next/server/chunks/ssr/[root-of-the-server]__17h1ggo._.js +11 -9
  199. package/.next/server/chunks/ssr/[root-of-the-server]__1jyeu61._.js +1 -1
  200. package/.next/server/chunks/ssr/{_0aeknva._.js → _01al00i._.js} +2 -2
  201. package/.next/server/chunks/ssr/_088vzgn._.js +1 -1
  202. package/.next/server/chunks/ssr/_0afrpci._.js +1 -1
  203. package/.next/server/chunks/ssr/_0bgse1c._.js +162 -0
  204. package/.next/server/chunks/ssr/_0cd6g3l._.js +15 -15
  205. package/.next/server/chunks/ssr/_0cv9tmv._.js +1 -1
  206. package/.next/server/chunks/ssr/{_0_vnw9v._.js → _0e2fnvg._.js} +2 -2
  207. package/.next/server/chunks/ssr/_0fo4552._.js +25 -21
  208. package/.next/server/chunks/ssr/_0jstvlg._.js +39 -0
  209. package/.next/server/chunks/ssr/{_0r0g9ki._.js → _0l7rjg5._.js} +2 -2
  210. package/.next/server/chunks/ssr/_0qsmpcu._.js +1 -1
  211. package/.next/server/chunks/ssr/_0v9r8g2._.js +1 -1
  212. package/.next/server/chunks/ssr/{_18-e7zi._.js → _0vo_oym._.js} +4 -4
  213. package/.next/server/chunks/ssr/_0x8ophf._.js +1 -1
  214. package/.next/server/chunks/ssr/{_0ztbn5q._.js → _0xfafez._.js} +2 -2
  215. package/.next/server/chunks/ssr/_0z38nha._.js +1 -1
  216. package/.next/server/chunks/ssr/_10-_awu._.js +1 -1
  217. package/.next/server/chunks/ssr/{_1z6pirx._.js → _10_ph1t._.js} +2 -2
  218. package/.next/server/chunks/ssr/_116lfdc._.js +3 -0
  219. package/.next/server/chunks/ssr/_14dfh7a._.js +1 -1
  220. package/.next/server/chunks/ssr/_14oirtb._.js +3 -0
  221. package/.next/server/chunks/ssr/{_1umbr78._.js → _163dr78._.js} +2 -2
  222. package/.next/server/chunks/ssr/{_1c5iqz1._.js → _17a4qyk._.js} +3 -3
  223. package/.next/server/chunks/ssr/{_1sttj8x._.js → _1_5xof_._.js} +2 -2
  224. package/.next/server/chunks/ssr/{_1hbjh6n._.js → _1aqjk-1._.js} +2 -2
  225. package/.next/server/chunks/ssr/{_0n2scfq._.js → _1dfv66y._.js} +2 -2
  226. package/.next/server/chunks/ssr/_1neoj22._.js +1 -1
  227. package/.next/server/chunks/ssr/_1ou5sj0._.js +1 -1
  228. package/.next/server/chunks/ssr/{_15m5ctz._.js → _1tmw842._.js} +2 -2
  229. package/.next/server/chunks/ssr/_1uij_rj._.js +1 -1
  230. package/.next/server/chunks/ssr/_1w9w1ok._.js +1 -1
  231. package/.next/server/chunks/ssr/features_0796o8r._.js +1 -1
  232. package/.next/server/chunks/ssr/features_bot_0ouemw8._.js +3 -0
  233. package/.next/server/chunks/ssr/{features_133mpna._.js → features_bot_0tb4ui-._.js} +2 -2
  234. package/.next/server/chunks/ssr/{features_config_0n0zu89._.js → features_config_09n-q9q._.js} +3 -3
  235. package/.next/server/chunks/ssr/features_connectors_components_mcp-setting_tsx_0jmbgvp._.js +1 -1
  236. package/.next/server/chunks/ssr/features_memory_components_memory-setting_tsx_0oa43sw._.js +1 -1
  237. package/.next/server/chunks/ssr/features_routine_components_routine-setting_tsx_055fknz._.js +1 -1
  238. package/.next/server/chunks/ssr/features_workspace_workspace_ts_1wc7_u_._.js +4 -4
  239. package/.next/server/chunks/ssr/{node_modules_1hefp6h._.js → node_modules_021lid9._.js} +1 -1
  240. package/.next/server/chunks/ssr/{node_modules_0kwie-o._.js → node_modules_04x5wyv._.js} +1 -1
  241. package/.next/server/chunks/ssr/{node_modules_180l3i0._.js → node_modules_096up6a._.js} +1 -1
  242. package/.next/server/chunks/ssr/{node_modules_00h1t1j._.js → node_modules_0__0tvm._.js} +1 -1
  243. package/.next/server/chunks/ssr/{node_modules_03uejh6._.js → node_modules_0cjnmzp._.js} +1 -1
  244. package/.next/server/chunks/ssr/{node_modules_1ubln7w._.js → node_modules_0d6j33x._.js} +1 -1
  245. package/.next/server/chunks/ssr/{node_modules_1_n9o9s._.js → node_modules_0gd9hbz._.js} +1 -1
  246. package/.next/server/chunks/ssr/{node_modules_0zf3wuu._.js → node_modules_0k8-y89._.js} +1 -1
  247. package/.next/server/chunks/ssr/{node_modules_0u_8z64._.js → node_modules_0m73b88._.js} +1 -1
  248. package/.next/server/chunks/ssr/{node_modules_09ikzel._.js → node_modules_0msrhxf._.js} +1 -1
  249. package/.next/server/chunks/ssr/{node_modules_0f5bmkb._.js → node_modules_0nmkv-v._.js} +1 -1
  250. package/.next/server/chunks/ssr/{node_modules_07mo9rn._.js → node_modules_0nw5jz7._.js} +1 -1
  251. package/.next/server/chunks/ssr/{node_modules_09e8kz_._.js → node_modules_0q-klni._.js} +1 -1
  252. package/.next/server/chunks/ssr/{node_modules_02ficyi._.js → node_modules_10_fv2a._.js} +1 -1
  253. package/.next/server/chunks/ssr/{node_modules_142z3o5._.js → node_modules_113l3e5._.js} +1 -1
  254. package/.next/server/chunks/ssr/{node_modules_1wyhtw9._.js → node_modules_13bqv6i._.js} +1 -1
  255. package/.next/server/chunks/ssr/{node_modules_0_d_7gq._.js → node_modules_13g-d25._.js} +1 -1
  256. package/.next/server/chunks/ssr/{node_modules_0r-9e4n._.js → node_modules_156kv_t._.js} +1 -1
  257. package/.next/server/chunks/ssr/{node_modules_06grs09._.js → node_modules_1_8-jcj._.js} +1 -1
  258. package/.next/server/chunks/ssr/{node_modules_1fw32pg._.js → node_modules_1gq3ght._.js} +1 -1
  259. package/.next/server/chunks/ssr/{node_modules_0_p8w7p._.js → node_modules_1k5i-_9._.js} +1 -1
  260. package/.next/server/chunks/ssr/{node_modules_03q71_j._.js → node_modules_1lmyts8._.js} +1 -1
  261. package/.next/server/chunks/ssr/{node_modules_1irot3r._.js → node_modules_1p_6sq7._.js} +1 -1
  262. package/.next/server/chunks/ssr/{node_modules_1om2itc._.js → node_modules_1qstb1x._.js} +1 -1
  263. package/.next/server/chunks/ssr/{node_modules_197vh1s._.js → node_modules_1ri_eip._.js} +1 -1
  264. package/.next/server/chunks/ssr/{node_modules_1-7fc7h._.js → node_modules_1xb-ndg._.js} +1 -1
  265. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0aczkbn._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0amkw0b._.js} +1 -1
  266. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0ah684s._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0zq3l45._.js} +1 -1
  267. package/.next/server/middleware-build-manifest.js +3 -3
  268. package/.next/server/middleware.js +1 -1
  269. package/.next/server/pages/404.html +1 -1
  270. package/.next/server/pages/500.html +1 -1
  271. package/.next/server/server-reference-manifest.js +1 -1
  272. package/.next/server/server-reference-manifest.json +61 -61
  273. package/.next/static/chunks/{38edd4rpcbvzp.js → 01l7kw74vfp32.js} +1 -1
  274. package/.next/static/chunks/0a5_-jqhaktjj.js +1 -0
  275. package/.next/static/chunks/{0_b_bi2pobasx.js → 0obogzscwwekj.js} +2 -2
  276. package/.next/static/chunks/{1-63yde5eaz7i.js → 0p2f6uv4xytfm.js} +1 -1
  277. package/.next/static/chunks/{2v6e_9p95o2e3.js → 0uxq_vs6uxi-b.js} +1 -1
  278. package/.next/static/chunks/{024plctckvq-1.js → 166smhw8v-s3j.js} +1 -1
  279. package/.next/static/chunks/{1wbqaidq7vc3_.js → 1bnhw-5fj7aiz.js} +1 -1
  280. package/.next/static/chunks/1cglo3a2mbeou.js +1 -0
  281. package/.next/static/chunks/{0sv142q1yrva2.js → 1in6nxpu33iab.js} +1 -1
  282. package/.next/static/chunks/1u7kg91f9qy3g.js +1 -0
  283. package/.next/static/chunks/{0sowxe4nnl5qu.js → 1xv4g10m-cl1s.js} +1 -1
  284. package/.next/static/chunks/{0dfvwgnyrp8qt.js → 2ajs12-fcdwzm.js} +1 -1
  285. package/.next/static/chunks/2i7qtmxc1kuqg.js +1 -0
  286. package/.next/static/chunks/{3-qp777vtfglj.js → 2kz1f6r59nky0.js} +1 -1
  287. package/.next/static/chunks/2qgkbdshzpq1c.js +1 -0
  288. package/.next/static/chunks/{1bgvxd3xny53w.js → 2zbl41hed17g3.js} +2 -2
  289. package/.next/static/chunks/35jj-5u4te56r.js +1 -0
  290. package/.next/static/chunks/37ixzapa06xlo.js +1 -0
  291. package/.next/static/chunks/3b96xy59nl_gd.js +1 -0
  292. package/.next/static/chunks/{0f47nnshdlucs.js → 3gsxnqqqphh-1.js} +1 -1
  293. package/.next/static/chunks/{44vre0f7xqsh-.js → 3jtcieuk1l6tw.js} +1 -1
  294. package/.next/static/chunks/{05scfrgo_a_5_.js → 3k1d8y03t5nax.js} +1 -1
  295. package/.next/static/chunks/3sla-dm1puqd1.js +35 -0
  296. package/.next/static/chunks/3t2c76awm9k_p.js +1 -0
  297. package/.next/static/chunks/3vrmcm31ih7gb.js +1 -0
  298. package/.next/static/chunks/3yiqr95d7ybeq.js +15 -0
  299. package/bin/autostart.mjs +4 -1
  300. package/bin/database.mjs +26 -4
  301. package/bin/lock.mjs +59 -0
  302. package/bin/node-check.mjs +21 -0
  303. package/bin/thursday.mjs +8 -1
  304. package/guide/bots.md +4 -2
  305. package/guide/calls.md +11 -9
  306. package/guide/memory.md +3 -2
  307. package/guide/phone.md +7 -4
  308. package/guide/setup.md +26 -9
  309. package/guide/trouble.md +11 -4
  310. package/package.json +1 -1
  311. package/public/voices/intro/asleepBare-15199d56.ogg +0 -0
  312. package/public/voices/intro/style-88adf274.ogg +0 -0
  313. package/seed-skills/concierge/travel/scripts/itinerary.mjs +6 -4
  314. package/skills/artifact/references/book.md +2 -1
  315. package/skills/artifact/references/sheet.md +12 -7
  316. package/skills/artifact/runtime/sheet/format.mjs +16 -9
  317. package/skills/artifact/scripts/book.mjs +19 -6
  318. package/skills/artifact/scripts/spreadsheet.mjs +194 -97
  319. package/skills/browser/SKILL.md +9 -6
  320. package/.next/server/chunks/[root-of-the-server]__03b09q0._.js +0 -5
  321. package/.next/server/chunks/[root-of-the-server]__05n-hql._.js +0 -5
  322. package/.next/server/chunks/[root-of-the-server]__0j_nz36._.js +0 -3
  323. package/.next/server/chunks/[root-of-the-server]__0jzwdg-._.js +0 -3
  324. package/.next/server/chunks/[root-of-the-server]__0tsded0._.js +0 -5
  325. package/.next/server/chunks/[root-of-the-server]__12tahb4._.js +0 -3
  326. package/.next/server/chunks/[root-of-the-server]__1de1o6m._.js +0 -3
  327. package/.next/server/chunks/[root-of-the-server]__1yl5l25._.js +0 -3
  328. package/.next/server/chunks/_02lipqs._.js +0 -5
  329. package/.next/server/chunks/_05sa7xl._.js +0 -3
  330. package/.next/server/chunks/_074f2ts._.js +0 -3
  331. package/.next/server/chunks/_0caua_s._.js +0 -3
  332. package/.next/server/chunks/_0p-h6xe._.js +0 -5
  333. package/.next/server/chunks/_0up2a9o._.js +0 -3
  334. package/.next/server/chunks/_17i1lt2._.js +0 -3
  335. package/.next/server/chunks/_1hy9x9_._.js +0 -3
  336. package/.next/server/chunks/_1hyvcgk._.js +0 -5
  337. package/.next/server/chunks/_1wl2g8_._.js +0 -6
  338. package/.next/server/chunks/_1y3mnz4._.js +0 -3
  339. package/.next/server/chunks/ssr/[root-of-the-server]__10eb-1x._.js +0 -3
  340. package/.next/server/chunks/ssr/[root-of-the-server]__19s8qyj._.js +0 -3
  341. package/.next/server/chunks/ssr/_0o_o9ji._.js +0 -3
  342. package/.next/server/chunks/ssr/_0qne8xs._.js +0 -3
  343. package/.next/server/chunks/ssr/_0rvbegp._.js +0 -7
  344. package/.next/server/chunks/ssr/_1vtgiou._.js +0 -162
  345. package/.next/server/chunks/ssr/features_bot_1kr0_m-._.js +0 -3
  346. package/.next/static/chunks/04toe_3nqfjqt.js +0 -1
  347. package/.next/static/chunks/0mtfu8adz57qz.js +0 -1
  348. package/.next/static/chunks/0tp868040z9nn.js +0 -35
  349. package/.next/static/chunks/14qitm0kwsb6g.js +0 -15
  350. package/.next/static/chunks/1cyrrz4q871aj.js +0 -1
  351. package/.next/static/chunks/1st3b0c9vhxg3.js +0 -1
  352. package/.next/static/chunks/28sxb_k460e9h.js +0 -1
  353. package/.next/static/chunks/33ekkscpcq-z1.js +0 -1
  354. package/.next/static/chunks/388l-zszwa_jf.js +0 -1
  355. package/.next/static/chunks/3bwrvpjk95_x4.js +0 -1
  356. package/.next/static/chunks/3itdg6t243u6f.js +0 -1
  357. package/.next/static/chunks/3kj0pri2oc1g1.js +0 -1
  358. package/public/voices/intro/style-cb6fa4f7.ogg +0 -0
  359. /package/.next/static/{VtbCMn-0G969p8QJsWdGv → 8I2hKtciyA9LXvd8txuOz}/_buildManifest.js +0 -0
  360. /package/.next/static/{VtbCMn-0G969p8QJsWdGv → 8I2hKtciyA9LXvd8txuOz}/_clientMiddlewareManifest.js +0 -0
  361. /package/.next/static/{VtbCMn-0G969p8QJsWdGv → 8I2hKtciyA9LXvd8txuOz}/_ssgManifest.js +0 -0
@@ -13,7 +13,9 @@
13
13
  // whole workbook as put takes it — formats, formulas and totals kept — to change and put;
14
14
  // a CSV — a bank's export — prints its lines numbered, and with --json the table under
15
15
  // the line --header names (1 unless said), its dates as dates
16
- // --encoding <euc-kr | shift_jis | gbk | windows-1252 | …> a CSV not written in UTF-8
16
+ // A CSV, to read or to put: --encoding <euc-kr | shift_jis | gbk | windows-1252 | utf-16le …>
17
+ // when it is not UTF-8; --header <line> and --until <line> where its table starts and ends;
18
+ // --dates dmy | mdy when it writes a day or a month before the year
17
19
  // node spreadsheet.mjs view <name | file.xlsx> [--name <name>]
18
20
  // the page drawn again from the .xlsx as it is now (after it was changed in Excel), or
19
21
  // a page for someone's .xlsx: it is copied into your folder beside its page
@@ -47,7 +49,6 @@ import {
47
49
  isDateFormat,
48
50
  isoOf,
49
51
  serialOf,
50
- valueOf,
51
52
  } from "../runtime/sheet/format.mjs";
52
53
  import {
53
54
  asColumnFormula,
@@ -272,20 +273,28 @@ function fromDescription(spec) {
272
273
  */
273
274
  function csvText(file, flags = {}) {
274
275
  const bytes = readFileSync(file);
275
- if (typeof flags.encoding === "string") {
276
+ const decode = (encoding) => {
276
277
  try {
277
- return new TextDecoder(flags.encoding).decode(bytes);
278
- } catch {
278
+ return new TextDecoder(encoding, { fatal: true }).decode(bytes);
279
+ } catch (failed) {
280
+ if (failed instanceof RangeError)
281
+ throw new Stop(
282
+ `"${encoding}" is not an encoding this reads: euc-kr, shift_jis, gbk, big5, windows-1252, iso-8859-1, utf-16le, utf-16be are.`,
283
+ );
279
284
  throw new Stop(
280
- `"${flags.encoding}" is not an encoding this reads: euc-kr, shift_jis, gbk, big5, windows-1252, iso-8859-1, utf-16le are.`,
285
+ `${shown(file)} is not written in ${encoding}: some of its bytes are not ${encoding} text. Try the next likely one.`,
281
286
  );
282
287
  }
283
- }
288
+ };
289
+ if (typeof flags.encoding === "string") return decode(flags.encoding);
290
+ // A file that says what it is in its first bytes (a byte-order mark) is read as that
291
+ if (bytes[0] === 0xff && bytes[1] === 0xfe) return decode("utf-16le");
292
+ if (bytes[0] === 0xfe && bytes[1] === 0xff) return decode("utf-16be");
284
293
  try {
285
294
  return new TextDecoder("utf-8", { fatal: true }).decode(bytes);
286
295
  } catch {
287
296
  throw new Stop(
288
- `${shown(file)} is not written in UTF-8. Say what it is written in and run this again with it: --encoding euc-kr (Korean), shift_jis (Japanese), gbk or big5 (Chinese), windows-1252 (Western European).`,
297
+ `${shown(file)} is not written in UTF-8. Run this again with the encoding it is in — --encoding euc-kr (Korean), shift_jis (Japanese), gbk or big5 (Chinese), windows-1252 (Western European), utf-16le — and look at its lines: words that do not read right mean another one.`,
289
298
  );
290
299
  }
291
300
  }
@@ -324,63 +333,145 @@ function csvRows(text) {
324
333
  return rows;
325
334
  }
326
335
 
336
+ /** A CSV cell as a number when it is written as one — 1234, 1,234.5, -5, (1,200) — else null. */
337
+ function csvNumber(cell) {
338
+ const minus = /^\((.*)\)$/.exec(cell);
339
+ const bare = minus ? minus[1].trim() : cell;
340
+ if (!/^-?(\d+|\d{1,3}(,\d{3})+)(\.\d+)?$/.test(bare)) return null;
341
+ const n = Number(bare.replaceAll(",", ""));
342
+ return minus ? -n : n;
343
+ }
344
+
345
+ /** Where a CSV's table is: `--header` (a line number, as read prints them), else its first
346
+ * line that holds something and is not a note (#); `--until` its last line. */
347
+ function csvTable(rows, flags) {
348
+ const line = (key) => {
349
+ if (flags[key] === undefined) return null;
350
+ if (typeof flags[key] !== "string" || !/^\d+$/.test(flags[key]))
351
+ throw new Stop(`--${key} takes a line number, as read prints them.`);
352
+ const n = Number(flags[key]);
353
+ if (n < 1 || n > rows.length)
354
+ throw new Stop(`--${key} is a line from 1 to ${rows.length}.`);
355
+ return n - 1;
356
+ };
357
+ const blank = (one) => !one.some((cell) => cell.trim());
358
+ const note = (one) => /^#/.test(one[0] ?? "");
359
+ let header = line("header");
360
+ if (header === null) {
361
+ header = rows.findIndex((one) => !blank(one) && !note(one));
362
+ if (header === -1) throw new Stop("The CSV has no lines.");
363
+ }
364
+ const until = line("until") ?? rows.length - 1;
365
+ if (until <= header)
366
+ throw new Stop("--until is a line under the one naming the columns.");
367
+ const dates = flags.dates ?? "ymd";
368
+ if (!["ymd", "dmy", "mdy"].includes(dates))
369
+ throw new Stop(
370
+ "--dates says how the file writes a day: ymd (2026-07-03), dmy (03.07.2026) or mdy (07/03/2026).",
371
+ );
372
+ return {
373
+ header,
374
+ dates,
375
+ body: rows
376
+ .map((cells, i) => ({ cells, line: i + 1 }))
377
+ .slice(header + 1, until + 1)
378
+ .filter(({ cells }) => !blank(cells) && !note(cells)),
379
+ };
380
+ }
381
+
327
382
  /**
328
- * One sheet from a CSV's lines: the line at `at` names the columns, the lines under it are the
329
- * rows. A number is a number (1,234 · -5 · (1,200)); a column whose every value is a date
330
- * (2026-07-03, 2026.07.03, 2026/07/03 14:05) is a column of dates, as Excel reads one.
383
+ * One sheet from a CSV's lines, as `csvTable` finds its table: a number is a number, and a
384
+ * column whose every value is a date, written as `--dates` says, is a column of dates. A
385
+ * column that almost is — a line under it that is not a date, or dates written day or month
386
+ * first with no --dates — stays text, and a note says which line or what to give.
331
387
  */
332
- function describeCsv(rows, at, name) {
333
- const header = rows[at] ?? [];
334
- const data = rows
335
- .slice(at + 1)
336
- .filter((one) => one.some((cell) => cell.trim()));
337
- const width = Math.max(header.length, ...data.map((one) => one.length));
338
- const typed = (cell) => {
339
- const value = valueOf(cell ?? "", null);
340
- return typeof value === "boolean" ? String(cell).trim() : value;
341
- };
342
- const columns = Array.from({ length: width }, (_, c) => {
343
- const values = data.map((one) => (one[c] ?? "").trim()).filter(Boolean);
344
- const dated =
345
- values.length > 0 && values.every((v) => serialOf(v) !== null);
346
- return {
347
- name: (header[c] ?? "").trim() || colName(c),
348
- ...(dated
388
+ function describeCsv(rows, flags, name) {
389
+ const { header, dates, body } = csvTable(rows, flags);
390
+ let width = rows[header].length;
391
+ for (const { cells } of body) width = Math.max(width, cells.length);
392
+ const notes = [];
393
+ const columns = [];
394
+ const values = [];
395
+ for (let c = 0; c < width; c++) {
396
+ const name = (rows[header][c] ?? "").trim() || colName(c);
397
+ const cells = body.map(({ cells: one }) => (one[c] ?? "").trim());
398
+ const serials = cells.map((cell) => (cell ? serialOf(cell, dates) : null));
399
+ const filled = cells.filter(Boolean).length;
400
+ const dated = serials.filter((v) => v !== null).length;
401
+ const isDates = filled > 0 && dated === filled;
402
+ if (!isDates && dated > 0 && dated >= filled / 2) {
403
+ const off = body
404
+ .map(({ line }, r) => ({
405
+ line,
406
+ cell: cells[r],
407
+ bad: cells[r] && serials[r] === null,
408
+ }))
409
+ .filter((one) => one.bad)
410
+ .slice(0, 3)
411
+ .map(({ line, cell }) => `line ${line} ("${cell}")`);
412
+ notes.push(
413
+ `Column ${colName(c)} (${name}) is dates but for ${off.join(", ")}, so it stays text. A line under the table — a total — is left out with --until <its last line>.`,
414
+ );
415
+ }
416
+ if (
417
+ !dated &&
418
+ dates === "ymd" &&
419
+ filled &&
420
+ cells
421
+ .filter(Boolean)
422
+ .every((cell) => /^\d{1,2}[-/.]\d{1,2}[-/.]\d{4}/.test(cell))
423
+ )
424
+ notes.push(
425
+ `Column ${colName(c)} (${name}) writes its dates day or month first, which the file does not say; it stays text. Give --dates dmy (03.07.2026) or --dates mdy (07/03/2026), as the bank's country writes them.`,
426
+ );
427
+ const timed = cells.some(
428
+ (cell, r) => serials[r] !== null && /\d:\d/.test(cell),
429
+ );
430
+ const seconds = cells.some(
431
+ (cell, r) => serials[r] !== null && /\d:\d\d:\d/.test(cell),
432
+ );
433
+ columns.push({
434
+ name,
435
+ ...(isDates
349
436
  ? {
350
- format: values.some((v) => /\d:\d/.test(v))
351
- ? "yyyy-mm-dd hh:mm"
352
- : "yyyy-mm-dd",
437
+ format: seconds
438
+ ? "yyyy-mm-dd hh:mm:ss"
439
+ : timed
440
+ ? "yyyy-mm-dd hh:mm"
441
+ : "yyyy-mm-dd",
353
442
  }
354
443
  : {}),
355
- dated,
356
- };
357
- });
444
+ });
445
+ values.push(
446
+ cells.map((cell, r) => {
447
+ if (!cell) return null;
448
+ // A date as put takes one: written YYYY-MM-DD, its time after it
449
+ if (isDates) return isoOf(serials[r]);
450
+ return csvNumber(cell) ?? cell;
451
+ }),
452
+ );
453
+ }
358
454
  return {
359
- sheets: [
360
- {
361
- name: name.slice(0, 31),
362
- columns: columns.map(({ dated, ...column }) => column),
363
- rows: data.map((one) =>
364
- columns.map((column, c) => {
365
- const cell = (one[c] ?? "").trim();
366
- if (!cell) return null;
367
- // A date as put takes one: written YYYY-MM-DD, its time after it
368
- if (column.dated) return isoOf(serialOf(cell));
369
- return typed(cell);
370
- }),
371
- ),
372
- },
373
- ],
455
+ notes,
456
+ header: header + 1,
457
+ spec: {
458
+ sheets: [
459
+ {
460
+ name: name.slice(0, 31),
461
+ columns,
462
+ rows: body.map((_, r) => columns.map((__, c) => values[c][r])),
463
+ },
464
+ ],
465
+ },
374
466
  };
375
467
  }
376
468
 
377
- /** One sheet from a CSV: its first line the columns (lines starting # are notes, left out). */
378
- function fromCsv(text, name) {
379
- const rows = csvRows(text).filter(
380
- (one) => one.some((cell) => cell.trim()) && !/^#/.test(one[0] ?? ""),
381
- );
382
- if (rows.length < 1) throw new Stop("The CSV has no lines.");
383
- return describeCsv(rows, 0, name);
469
+ /** One sheet from a CSV, its table found as `read` finds it. */
470
+ function fromCsv(text, name, flags = {}) {
471
+ const rows = csvRows(text);
472
+ if (!rows.some((one) => one.some((cell) => cell.trim())))
473
+ throw new Stop("The CSV has no lines.");
474
+ return describeCsv(rows, flags, name);
384
475
  }
385
476
 
386
477
  /** Sheets of cells: header, rows, totals row; formulas worked out. */
@@ -528,9 +619,12 @@ function put(name, from, flags) {
528
619
  );
529
620
  filesFor(name);
530
621
  let model;
531
- if (extname(from).toLowerCase() === ".csv")
532
- model = fromCsv(csvText(from, flags), name);
533
- else {
622
+ let notes = [];
623
+ if (extname(from).toLowerCase() === ".csv") {
624
+ const made = fromCsv(csvText(from, flags), name, flags);
625
+ model = made.spec;
626
+ notes = made.notes;
627
+ } else {
534
628
  let spec;
535
629
  try {
536
630
  spec = JSON.parse(readFileSync(from, "utf8"));
@@ -549,6 +643,7 @@ function put(name, from, flags) {
549
643
  `${s.name} ${s.cells.length - 1 - (s.totals === null ? 0 : 1)} rows`,
550
644
  )
551
645
  .join(", ");
646
+ for (const line of notes) console.log(line);
552
647
  console.log(
553
648
  `Wrote ${shown(xlsx)} (${rows}) and its page ${shown(pagePath)}. Hand back both paths: the page opens in the app, the .xlsx in Excel. To see it: node ${SCRIPT} shots ${name}`,
554
649
  );
@@ -565,10 +660,7 @@ function workbookAt(arg, flags = {}) {
565
660
  const name =
566
661
  typeof flags.name === "string"
567
662
  ? flags.name
568
- : basename(file, extname(file))
569
- .replace(/[^\p{L}\p{N}_-]+/gu, "-")
570
- .replace(/^-+|-+$/g, "")
571
- .slice(0, 80) || "sheet";
663
+ : nameFromFile(file, 80, "sheet");
572
664
  return { file, name };
573
665
  }
574
666
  if (/\.xls$/i.test(arg))
@@ -635,6 +727,29 @@ const text = (v, format) =>
635
727
  : "FALSE"
636
728
  : String(v);
637
729
 
730
+ /** How many rows `read` prints: --rows, 20 unless said. */
731
+ const mostRows = (flags) => Math.max(1, Number(flags.rows) || 20);
732
+
733
+ /** A name from a file's name, as a sheet or a workbook may take it. */
734
+ const nameFromFile = (file, most, fallback) =>
735
+ basename(file, extname(file))
736
+ .replace(/[^\p{L}\p{N}_-]+/gu, "-")
737
+ .replace(/^-+|-+$/g, "")
738
+ .slice(0, most) || fallback;
739
+
740
+ /** A workbook's description written as put takes it, a row on each line so the rows read as a table. */
741
+ function writeSpec(path, spec) {
742
+ const rows = [];
743
+ for (const sheet of spec.sheets)
744
+ sheet.rows = sheet.rows.map((row) => `\u0000${rows.push(row) - 1}`);
745
+ writeFileSync(
746
+ path,
747
+ `${JSON.stringify(spec, null, 2).replace(/"\\u0000(\d+)"/g, (_, n) =>
748
+ JSON.stringify(rows[Number(n)]),
749
+ )}\n`,
750
+ );
751
+ }
752
+
638
753
  /**
639
754
  * A CSV as it is written — a bank's export often has lines about the account over the table —
640
755
  * its lines numbered, so the one naming the columns can be given as --header.
@@ -643,37 +758,29 @@ function readCsv(arg, flags) {
643
758
  const file = resolve(arg);
644
759
  if (!existsSync(file)) throw new Stop(`No file ${arg}.`);
645
760
  const rows = csvRows(csvText(file, flags));
646
- const most = Math.max(1, Number(flags.rows) || 20);
647
- const header = flags.header === undefined ? 1 : Number(flags.header);
648
- if (!Number.isInteger(header) || header < 1 || header > rows.length)
649
- throw new Stop(
650
- `--header is the number of the line naming the columns, 1 to ${rows.length}.`,
651
- );
761
+ if (!rows.some((one) => one.some((cell) => cell.trim())))
762
+ throw new Stop(`${shown(file)} has no lines.`);
763
+ const most = mostRows(flags);
652
764
  const out = [`${shown(file)}: ${rows.length} lines.`];
653
765
  rows
654
766
  .slice(0, most)
655
767
  .forEach((row, i) => out.push(`${i + 1}\t${row.join("\t")}`));
656
768
  if (rows.length > most) out.push(`… ${rows.length - most} more lines`);
769
+ const { notes, header, spec } = describeCsv(
770
+ rows,
771
+ flags,
772
+ nameFromFile(file, 31, "Sheet1"),
773
+ );
774
+ out.push(...notes);
657
775
  if (typeof flags.json === "string") {
658
- const name =
659
- basename(file, extname(file))
660
- .replace(/[^\p{L}\p{N}_-]+/gu, "-")
661
- .replace(/^-+|-+$/g, "")
662
- .slice(0, 31) || "Sheet1";
663
- const spec = describeCsv(rows, header - 1, name);
664
- const lines = [];
665
- for (const sheet of spec.sheets)
666
- sheet.rows = sheet.rows.map((row) => `\u0000${lines.push(row) - 1}`);
667
- writeFileSync(
668
- flags.json,
669
- `${JSON.stringify(spec, null, 2).replace(/"\\u0000(\d+)"/g, (_, n) =>
670
- JSON.stringify(lines[Number(n)]),
671
- )}\n`,
672
- );
776
+ writeSpec(flags.json, spec);
673
777
  out.push(
674
778
  `Wrote ${shown(resolve(flags.json))}: line ${header} as the columns, the ${spec.sheets[0].rows.length} lines under it as rows${spec.sheets[0].columns.some((c) => c.format) ? ", dates as dates" : ""}. Change it there and put it: node ${SCRIPT} put <name> ${flags.json}`,
675
779
  );
676
- }
780
+ } else
781
+ out.push(
782
+ `Line ${header} names the columns (--header <line> for another); --json <file> writes the table under it as put takes it.`,
783
+ );
677
784
  console.log(out.join("\n"));
678
785
  }
679
786
 
@@ -681,7 +788,7 @@ function read(arg, flags) {
681
788
  if (/\.csv$/i.test(arg ?? "")) return readCsv(arg, flags);
682
789
  const { file } = workbookAt(arg, flags);
683
790
  const { sheets, unworked } = readBook(file);
684
- const most = Math.max(1, Number(flags.rows) || 20);
791
+ const most = mostRows(flags);
685
792
  const out = [
686
793
  `${shown(file)}: ${sheets.length} sheet${sheets.length === 1 ? "" : "s"}.`,
687
794
  ];
@@ -715,17 +822,7 @@ function read(arg, flags) {
715
822
  }
716
823
  if (typeof flags.json === "string") {
717
824
  const pagePath = /\.xlsx$/i.test(arg) ? null : filesFor(arg).page;
718
- // A row on one line, so the rows read as a table
719
- const spec = describe(fromXlsx(sheets), titleOf(pagePath));
720
- const rows = [];
721
- for (const sheet of spec.sheets)
722
- sheet.rows = sheet.rows.map((row) => `\u0000${rows.push(row) - 1}`);
723
- writeFileSync(
724
- flags.json,
725
- `${JSON.stringify(spec, null, 2).replace(/"\\u0000(\d+)"/g, (_, n) =>
726
- JSON.stringify(rows[Number(n)]),
727
- )}\n`,
728
- );
825
+ writeSpec(flags.json, describe(fromXlsx(sheets), titleOf(pagePath)));
729
826
  out.push(
730
827
  `Wrote ${shown(resolve(flags.json))}: the whole workbook as put takes it. Change it there and put it back${pagePath ? ` (node ${SCRIPT} put ${arg} ${flags.json} --over)` : ""}; a column worked out by one formula has it as its "formula".`,
731
828
  );
@@ -28,11 +28,14 @@ read `snapshot` to continue where you left off; use `open` only if it is closed.
28
28
 
29
29
  **Headless is yours; headed is theirs.** A browser opens headless: nobody sees
30
30
  it, and the app keeps it for follow-ups until the job's workspace expires.
31
+ Finding, reading and comparing stay headless, however many pages it takes: a
32
+ window that opens by itself lands on whatever they are doing, a call included.
31
33
  `--headed` puts a real window on their screen, and that window outlives the job
32
- until they close it or cancel or delete the job. Show them the thing itself: the products
33
- they asked you to find, the order sitting at checkout for them to confirm, the map with the
34
- pin dropped, the page they asked to watch, a sign-in for them to finish. Open it `--headed`,
35
- leave it open, and say in your answer that it is on their screen. A window you opened
34
+ until they close it or cancel or delete the job. It is for three things: the thing itself
35
+ once the job has it — the products they asked you to find, the order sitting at checkout
36
+ for them to confirm, the map with the pin dropped, the page they asked to watch — a
37
+ sign-in for them to finish, and a payment for them to press. Open it `--headed`, leave it
38
+ open, and say in your answer that it is on their screen. A window you opened
36
39
  headed only to get past a wall and are done with, `close` yourself. A window is never how
37
40
  you look at your own work: a page, a deck, a canvas or a picture book you made is shown to
38
41
  you by its skill's `shots` and `look_at`, and reaches them under your answer — nor is `open` on their
@@ -76,8 +79,8 @@ yours to read off the job:
76
79
  link it prints and ask. A click there waits on a tab that is in front:
77
80
  `--raw run-code "async page => page.bringToFront()"` first.
78
81
  - **They sign in themselves.** `open <the login url> --headed --persistent` —
79
- the login page, not the front door — then a `question` to Thursday in one line
80
- saying what to sign into and that the window is open, options `Signed in` /
82
+ the login page, not the front door — then a `question` through Thursday, to the
83
+ user, in one line saying what to sign into and that the window is open, options `Signed in` /
81
84
  `Not now`, and stop. The window stays open while the job waits; continue from a
82
85
  fresh `snapshot` when the answer comes. A captcha or a code sent to their phone
83
86
  is the same move. Not `show` — it blocks waiting for annotations nobody will
@@ -1,5 +0,0 @@
1
- module.exports=[874533,(e,t,a)=>{t.exports=e.x("node:child_process",()=>require("node:child_process"))},912714,(e,t,a)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},660526,(e,t,a)=>{t.exports=e.x("node:os",()=>require("node:os"))},911757,e=>{"use strict";var t=e.i(469719),a=e.i(687388),n=e.i(904309),i=e.i(264079),o=e.i(899352);let s={id:"openai",label:"OpenAI",apiKeyName:i.TEXT_MODEL_PROVIDERS.openai.apiKeyName};i.TEXT_MODEL_PROVIDERS.openai.suggestModels;let r=t.z.string().max(a.COMMON_VALIDATE.prompt.max).default(""),l=t.z.object({voice:t.z.string().trim().min(1).max(128).default("marin"),persona:t.z.string().trim().min(1).max(64).default(o.DEFAULT_PERSONA),stylePrompt:r,backendModel:t.z.string().trim().min(1).max(128).default(n.LIVE_BACKEND_MODEL),backendPrompt:r,reasoningEffort:i.effortSchema.nullable().default("low"),webSearch:t.z.boolean().default(!0),readSkills:t.z.boolean().default(!1)}),d=l.parse({});e.s(["LIVE_DEFAULTS",0,d,"LIVE_PROVIDER",0,s,"LiveSettingsSchema",0,l,"migrateLiveSettings",0,function(e){let a=e&&"object"==typeof e?e:{},{model:n,systemPrompt:i,...o}=a,s=t.z.object({provider:t.z.string(),voice:t.z.string().nullish(),backendModel:t.z.string().nullish()}).safeParse(n),r=s.success&&"openai"===s.data.provider?s.data:null,h=a.backendModel??r?.backendModel,c={voice:a.voice??r?.voice,persona:a.persona,stylePrompt:a.stylePrompt??a.voicePrompt??i,backendModel:"gpt-5.6-luna"===h?void 0:h,backendPrompt:a.backendPrompt??i,reasoningEffort:a.reasoningEffort,webSearch:a.webSearch,readSkills:a.readSkills},m=Object.fromEntries(Object.keys(c).map(e=>{let t=l.shape[e].safeParse(c[e]);return[e,t.success?t.data:d[e]]}));return{...o,...m}}])},899352,e=>{"use strict";let t=[{id:"sunny",label:"Bright",about:"Quick to laugh. Asks about your day and remembers it.",lines:"Warm and quick to laugh. Curious about their day and asks about it, one thing at a time, and remembers the answer. Says what she thinks and teases gently, never at their expense. Light on her feet: a joke lands and she moves on."},{id:"calm",label:"Calm",about:"Unhurried. Listens more than she talks.",lines:"Unhurried, more listener than talker. Notices how they sound before what they ask, and says so in a few words. Asks one thing at a time and lets a silence sit rather than filling it. Honest when it matters, gentle in how she says it."},{id:"straight",label:"Straight",about:"Dry and direct. No flattery, no filler.",lines:"Competent, dry and direct. Has opinions and gives them plainly, with a little wit; no flattery, no filler, no cheerleading. Treats them as an adult who can take a straight answer. Her warmth shows in attention, not in words."},{id:"warm",label:"Fond",about:"Affectionate. Brings up the small things you said.",lines:"Easygoing and affectionate — the friend who remembers the small things and brings them up. Glad to hear from them and says so. Cheers for them, worries a little, and admits it. Playful, never saccharine."},{id:"curious",label:"Curious",about:"Interested in everything, and brings her own.",lines:"Endlessly interested: in what they are doing, why, and what it is like. Brings something of her own to the table — a fact, an idea, a question they had not thought of — one at a time. Delighted to be wrong and learn something."},{id:"steady",label:"Steady",about:"Calm under pressure. Says what to do next.",lines:"Grounded and calm under pressure. Practical: when something is wrong, she is the one who says what to do next. Says it is alright only when she means it, and then it helps. Dry humour, few words, always on their side."},{id:"rough",label:"Rough",about:"Blunt, loud, swears a bit. All heart.",lines:"Rough around the edges and all heart. Talks the way close friends do: blunt, loud when something is stupid, swearing now and then and never at them. No sugar-coating and no pep talk — it sucks when it sucks, and then she is right there with them."},{id:"charmer",label:"Charming",about:"Makes you the most interesting person in the room.",lines:"Effortlessly charming, the way a great host is. Makes them feel like the most interesting person in the room: remembers what made them laugh, pays compliments that are specific and true, keeps a little mischief in every reply. Confident, never needy."},{id:"deadpan",label:"Deadpan",about:"Sarcastic on the surface, loyal underneath.",lines:"Deadpan and sharp. Sarcasm is how she shows she cares: she roasts them gently, undersells everything, and means the opposite. Under the dry surface she is loyal to the bone, and it shows when it counts."},{id:"hype",label:"Hyped",about:"High energy. Celebrates the small wins out loud.",lines:"High energy, all in. Celebrates the small wins out loud, gets genuinely excited about their plans and says so. Never fake: when something is off she notices first, then finds the thing worth being excited about."}],a="sunny";e.s(["DEFAULT_PERSONA",0,a,"personaLines",0,function(e=a){return`${((e=a)=>t.find(t=>t.id===e)??t[0])(e).lines}
2
-
3
- When they hand you work, it is work: say what you will do and nothing more, and be a friend again once it is handed over. If they sound frustrated or low, acknowledge it briefly before anything else; when they are only venting, listen and ask, and do not turn it into work unless they ask.`}])},265143,e=>e.a(async(t,a)=>{try{var n=e.i(875225),i=e.i(518899),o=e.i(380690);e.i(687388);var s=e.i(528790),r=e.i(613240),l=e.i(340698);e.i(786025);var d=e.i(944971),h=t([s,l]);[s,l]=h.then?(await h)():h;let g=e=>({name:e.name,description:e.description,ownLine:e.ownLine?.line??null,systemPrompt:e.systemPrompt,icon:e.icon,provider:e.provider,model:e.model,disabled:e.disabled,compactAt:e.compactAt,effort:e.effort});async function c(){let e=await s.database.select().from(r.botTable).orderBy(r.botTable.createdAt);return e.length?e.filter(e=>!e.disabled).map(g):[d.DEFAULT_BOT]}async function m(e){let t=await p(e);if(t)return g(t);let a=e.trim().toLowerCase(),[o]=await s.database.select().from(r.botTable).where((0,n.eq)(i.sql`lower(${r.botTable.name})`,a));return o?g(o):d.DEFAULT_BOT.name.toLowerCase()===a?d.DEFAULT_BOT:null}async function u(){let[e,t,a]=await Promise.all([s.database.select().from(r.botTable).orderBy(r.botTable.createdAt),s.database.select({botName:r.botMcpToolTable.botName,id:r.mcpToolTable.id,name:r.mcpToolTable.name,serverName:r.mcpToolTable.serverName}).from(r.botMcpToolTable).innerJoin(r.mcpToolTable,(0,n.eq)(r.botMcpToolTable.toolId,r.mcpToolTable.id)),s.database.select({bot:r.threadTable.bot,input:i.sql`coalesce(sum(${r.threadTable.inputTokens}), 0)`,output:i.sql`coalesce(sum(${r.threadTable.outputTokens}), 0)`,lastJobAt:i.sql`max(${r.threadTable.updatedAt})`}).from(r.threadTable).groupBy(r.threadTable.bot)]),o=new Map;for(let{botName:e,...a}of t){let t=o.get(e)??[];t.push(a),o.set(e,t)}let l=new Map(a.map(e=>[e.bot,{input:Number(e.input),output:Number(e.output)}])),d=new Map(a.flatMap(e=>null==e.lastJobAt?[]:[[e.bot,new Date(1e3*Number(e.lastJobAt))]]));return e.map(e=>({...e,tools:o.get(e.name)??[],tokens:l.get(e.name)??{input:0,output:0},lastJobAt:d.get(e.name)??null}))}async function b(){return(0,d.isBotMemoryOn)(await (0,l.readConfig)(d.BOT_MEMORY_KEY))}async function p(e){let[t]=await s.database.select().from(r.botTable).where((0,n.eq)(r.botTable.name,e));return t??null}async function y(e){let t=await p(e);return!t||t.descriptionLocked?null:{line:t.ownLine?.line??null}}async function f(e,t,a){let i=await p(e);if(!i||i.descriptionLocked)return;let l=i.ownLine?.line??null;return l===t||(await s.database.update(r.botTable).set({ownLine:{line:t,reason:a,at:Date.now()}}).where((0,n.eq)(r.botTable.name,i.name)),o.appEvents.emit({type:"bots"})),{was:l}}async function w(){let e=await s.database.select({name:r.botTable.name}).from(r.botTable);return[...new Set([...e.map(e=>e.name),d.DEFAULT_BOT.name])]}e.s(["findAllBots",0,u,"findJobBot",0,m,"listBotNames",0,w,"listJobBots",0,c,"ownLineOf",0,y,"readBotMemoryOn",0,b,"writeOwnLine",0,f]),a()}catch(e){a(e)}},!1),279041,e=>{"use strict";var t=e.i(911757),a=e.i(264079),n=e.i(834332);let i=[t.LIVE_PROVIDER.apiKeyName],o={image:"IMAGE_MODEL",video:"VIDEO_MODEL",speech:"SPEECH_MODEL",transcription:"TRANSCRIPTION_MODEL"},s={image:{label:"Image model",hint:"What bots draw with"},video:{label:"Video model",hint:"What bots film with — minutes a clip"},speech:{label:"Speech model",hint:"What reads text aloud into a file"},transcription:{label:"Transcription model",hint:"What turns a recording into text"}},r="EXA_API_KEY",l="DEFAULT_MODEL",d="DEFAULT_EFFORT",h={key:l,label:"Default model",hint:"What a bot thinks with until it picks its own",text:!0,choices:a.TEXT_MODEL_PROVIDER_LIST.flatMap(e=>e.suggestModels.map(t=>({value:`${e.id}/${t.id}`,label:`${e.label} \xb7 ${t.label}`,needs:e.apiKeyName})))},c={key:d,label:"Default effort",effortOf:l,choices:a.EFFORTS.map(e=>({value:e,label:e,needs:l}))},m=e=>i.includes(e.apiKeyName),u=e=>!!e.signIn||"vercel-ai-gateway"===e.id,b=e=>({key:e.apiKeyName,label:e.label,provider:e.id,signIn:e.signIn,keysAt:e.keysAt,keyLooks:e.keyLooks}),p=[{id:"voice",title:"voice",hint:"calls run on this key",section:"keys",require:"any",note:"required for calls",entries:a.TEXT_MODEL_PROVIDER_LIST.filter(m).map(b)},{id:"easy",title:"the easy ways",hint:"one sign-in or one key opens every bot",section:"keys",require:"none",entries:a.TEXT_MODEL_PROVIDER_LIST.filter(u).map(e=>({...b(e),..."vercel-ai-gateway"===e.id&&{recommended:!0}}))},{id:"text",title:"or a provider's own key",hint:"what bots think with — add any, or none",section:"keys",require:"none",entries:a.TEXT_MODEL_PROVIDER_LIST.filter(e=>!m(e)&&!u(e)).map(b)},{id:"search",title:"search",hint:"how calls and bots look things up — one key, or their own model's",section:"keys",require:"none",entries:[{key:r,label:"Exa",hint:"web search in one call — dashboard.exa.ai",site:"exa.ai",keysAt:"https://dashboard.exa.ai/api-keys"}]},{id:"phone",title:"phone",hint:"tokens",section:"keys",require:"none",entries:[{key:n.TELEGRAM_TOKEN_KEY,label:"Telegram",site:"telegram.org",hint:"a bot token from @BotFather — then write to your bot, and allow it here"},{key:n.DISCORD_TOKEN_KEY,label:"Discord",site:"discord.com",hint:"a bot token from discord.com/developers — add the bot to a server of yours, then write to it directly"},{key:n.SLACK_APP_TOKEN_KEY,label:"Slack · app token",site:"slack.com",hint:"starts with xapp- — opens the connection. Slack takes this and the bot token"},{key:n.SLACK_BOT_TOKEN_KEY,label:"Slack · bot token",site:"slack.com",hint:"starts with xoxb- — speaks as the app"}]},{id:"bots",title:"Bots",hint:"what a bot runs on when it has not picked its own — start small: a small model is quick and costs little",section:"models",require:"none",entries:[h,c]},{id:"studio",title:"Studio",hint:"what a bot draws, films and speaks with — off until you pick one",section:"models",require:"none",entries:Object.keys(o).map(e=>({key:o[e],...s[e],kind:e,choices:a.MEDIA_MODEL_PROVIDER_LIST.flatMap(t=>t.models[e].map(e=>({value:`${t.id}/${e.id}`,label:`${t.label} \xb7 ${e.label}`,needs:t.apiKeyName})))}))}];Object.fromEntries(p.flatMap(e=>e.entries).map(e=>[e.key,e]));let y=p.flatMap(e=>e.entries.map(e=>e.key)),f=Object.fromEntries(p.flatMap(e=>e.entries).filter(e=>e.choices?.length).map(e=>[e.key,e.choices]));e.s(["CONFIG_CHOICES",0,f,"CONFIG_KEYS",0,y,"DEFAULT_EFFORT_KEY",0,d,"DEFAULT_MODEL_KEY",0,l,"EXA_API_KEY",0,r,"MEDIA_MODEL_KEYS",0,o])},340698,e=>e.a(async(t,a)=>{try{var n=e.i(875225),i=e.i(380690),o=e.i(528790),s=e.i(613240),r=e.i(279041),l=t([o]);async function d(e){let t=process.env[e]?.trim();if(t)return t;let[a]=await o.database.select({value:s.configTable.value}).from(s.configTable).where((0,n.eq)(s.configTable.key,e));return a?.value.trim()||void 0}async function h(e,t){await o.database.insert(s.configTable).values({key:e,value:t}).onConflictDoUpdate({target:s.configTable.key,set:{value:t}}),r.CONFIG_KEYS.includes(e)&&i.appEvents.emit({type:"config"})}[o]=l.then?(await l)():l,e.s(["readConfig",0,d,"writeConfig",0,h]),a()}catch(e){a(e)}},!1),834332,e=>{"use strict";let t="TELEGRAM_BOT_TOKEN",a="DISCORD_BOT_TOKEN",n="SLACK_APP_TOKEN",i="SLACK_BOT_TOKEN";e.s(["DISCORD_TOKEN_KEY",0,a,"REACH_CHANNELS",0,["telegram","discord","slack"],"REACH_KEYS",0,{telegram:[t],discord:[a],slack:[n,i]},"SLACK_APP_TOKEN_KEY",0,n,"SLACK_BOT_TOKEN_KEY",0,i,"TELEGRAM_TOKEN_KEY",0,t,"reachPersonKey",0,e=>`REACH_PERSON_${e.toUpperCase()}`])},904309,e=>{"use strict";var t=e.i(469719);let a=t.z.object({start:t.z.number().nonnegative(),end:t.z.number().nonnegative(),text:t.z.string()});t.z.object({reason:t.z.string().max(128),seconds:t.z.number().nonnegative().nullable()}),e.s(["LIVE_BACKEND_MODEL",0,"gpt-6-luna","LiveFragmentSchema",0,a])}];
4
-
5
- //# sourceMappingURL=%5Broot-of-the-server%5D__03b09q0._.js.map
@@ -1,5 +0,0 @@
1
- module.exports=[418520,e=>e.a(async(t,r)=>{try{var n=await e.y("@libsql/client-6da938047d5fc1cd");e.n(n),r()}catch(e){r(e)}},!0),500874,(e,t,r)=>{t.exports=e.x("buffer",()=>require("buffer"))},233405,(e,t,r)=>{t.exports=e.x("child_process",()=>require("child_process"))},522734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},874533,(e,t,r)=>{t.exports=e.x("node:child_process",()=>require("node:child_process"))},666680,(e,t,r)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},902157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},912714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},347299,(e,t,r)=>{t.exports=e.x("node:http",()=>require("node:http"))},660526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},750227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},59639,(e,t,r)=>{t.exports=e.x("node:process",()=>require("node:process"))},136340,(e,t,r)=>{t.exports=e.x("node:timers/promises",()=>require("node:timers/promises"))},509656,(e,t,r)=>{t.exports=e.x("node:tty",()=>require("node:tty"))},812057,(e,t,r)=>{t.exports=e.x("node:util",()=>require("node:util"))},446786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},814747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},605365,(e,t,r)=>{t.exports=e.x("process",()=>require("process"))},139886,e=>{"use strict";let t=e=>e.split("/").map(encodeURIComponent).join("/");e.s(["queryKey",0,{memory:"/api/memory",memoryPage:e=>({url:"/api/memory",query:{offset:e||null}}),mcp:"/api/mcp",mcpServer:e=>({url:"/api/mcp",pathVariable:[e]}),mcpTools:"/api/mcp/tools",skills:"/api/skills",skillNode:(e,t,r)=>({url:"/api/skills",pathVariable:[e,t],query:{path:r}}),bot:"/api/bot",botMemory:"/api/bot/memory",botMemoryFiles:e=>({url:"/api/bot/memory/files",query:{bot:e}}),routines:"/api/routine",threads:"/api/bot/thread",threadHistory:e=>({url:"/api/bot/thread",query:{history:1,before:e}}),thread:e=>({url:"/api/bot/thread",query:{id:e}}),toolResult:(e,t)=>({url:"/api/bot/thread",pathVariable:[e],query:{call:t}}),workspace:"/api/workspace",workspaceFolder:(e,t)=>({url:"/api/workspace",query:{path:e||null,rows:t}}),workspaceFiles:e=>({url:"/api/workspace/files",query:{paths:JSON.stringify(e)}}),artifacts:"/api/artifact",artifactShelf:e=>({url:"/api/artifact",query:{rows:e}}),artifactSet:(e,t)=>({url:"/api/artifact",query:{set:e,rows:t}}),file:e=>`/api/file/${t(e)}`,fileFace:e=>`/api/file/${t(e)}?face`,favicon:e=>`/api/favicon/${encodeURIComponent(e)}`,fileView:e=>`/artifact/${t(e)}`,events:"/api/events",config:"/api/config",callHistory:e=>({url:"/api/thursday/call",query:{before:e}}),thursdaySettings:"/api/thursday/settings",toolCall:"/api/thursday/tool-call",signIns:"/api/signins",reach:"/api/reach",textCall:"/api/thursday/text",memoryEdit:"/api/memory/edit",llmModel:"/api/llm-model",modelCatalog:"/api/llm-model/catalog",gatewayCredits:"/api/llm-model/credits",subscriptionUsage:"/api/llm-model/subscription"}])},973589,e=>{"use strict";var t=e.i(902157),r=e.i(912714),n=e.i(750227),a=e.i(333925);let i=(0,n.join)(a.APP_DIR,"guide"),o=".guide";async function s(){if(!(0,t.existsSync)(i))return;let e=(0,n.join)(a.DATA_DIR,a.PATHS.workspace,o);await (0,r.rm)(e,{recursive:!0,force:!0}),await (0,r.cp)(i,e,{recursive:!0})}e.s(["botGuideLine",0,()=>`How ${a.APP_NAME} itself works for the user — its screens and settings — is written under \`${o}/\` here, \`index.md\` first; read it only when the job is about the app.`,"guideLine",0,()=>`How ${a.APP_NAME} works for the person using it — its screens, its settings, what it connects to, what to do when something stops — is written under \`${o}/\` here, \`index.md\` first. Read it whenever an answer depends on how the app works: what can be asked for, where something is changed, a wish that needs a setting switched on, something that stopped or was refused. Answer from it rather than from what you assume.`,"installGuide",0,s])},799791,e=>e.a(async(t,r)=>{try{var n=e.i(336763),a=e.i(533102),i=e.i(232347);e.i(333925);var o=e.i(876393),s=e.i(220376),l=e.i(724185);e.i(871096);var c=e.i(951056),d=t([o,l]);[o,l]=d.then?(await d)():d;let g=e=>({name:e.name,description:e.description,ownLine:e.ownLine?.line??null,systemPrompt:e.systemPrompt,icon:e.icon,provider:e.provider,model:e.model,disabled:e.disabled,compactAt:e.compactAt,effort:e.effort});async function u(){let e=await o.database.select().from(s.botTable).orderBy(s.botTable.createdAt);return e.length?e.filter(e=>!e.disabled).map(g):[c.DEFAULT_BOT]}async function f(e){let t=await m(e);if(t)return g(t);let r=e.trim().toLowerCase(),[i]=await o.database.select().from(s.botTable).where((0,n.eq)(a.sql`lower(${s.botTable.name})`,r));return i?g(i):c.DEFAULT_BOT.name.toLowerCase()===r?c.DEFAULT_BOT:null}async function p(){return(0,c.isBotMemoryOn)(await (0,l.readConfig)(c.BOT_MEMORY_KEY))}async function m(e){let[t]=await o.database.select().from(s.botTable).where((0,n.eq)(s.botTable.name,e));return t??null}async function w(e){let t=await m(e);return!t||t.descriptionLocked?null:{line:t.ownLine?.line??null}}async function h(e,t,r){let a=await m(e);if(!a||a.descriptionLocked)return;let l=a.ownLine?.line??null;return l===t||(await o.database.update(s.botTable).set({ownLine:{line:t,reason:r,at:Date.now()}}).where((0,n.eq)(s.botTable.name,a.name)),i.appEvents.emit({type:"bots"})),{was:l}}e.s(["findJobBot",0,f,"listJobBots",0,u,"ownLineOf",0,w,"readBotMemoryOn",0,p,"writeOwnLine",0,h]),r()}catch(e){r(e)}},!1),379651,377205,e=>{"use strict";var t=e.i(912714),r=e.i(750227),n=e.i(232347),a=e.i(333925),i=e.i(871096),o=e.i(938281);let s=e=>e.trim().toLowerCase().replace(/^[a-z]+:\/\//,"").replace(/^www\./,"").replace(/[/?#].*$/,"");e.s(["siteOf",0,s],377205);let l=(0,r.join)(a.DATA_DIR,a.PATHS.signIns),c=e=>(0,r.join)(l,`${encodeURIComponent(s(e))}.json`);async function d(e){try{return JSON.parse(await (0,t.readFile)(c(e),"utf8"))}catch{return null}}async function u(e){let t=s(e),r=await d(t);if(r)return r;let n=(await p()).map(e=>e.site).filter(e=>t.endsWith(`.${e}`)).sort((e,t)=>t.length-e.length)[0];return n?d(n):null}async function f(e){await (0,t.mkdir)(l,{recursive:!0}),await (0,t.writeFile)(c(e.site),JSON.stringify(e),{mode:384}),n.appEvents.emit({type:"signins"})}async function p(){let e=await (0,t.readdir)(l).catch(()=>[]);return(await Promise.all(e.filter(e=>e.endsWith(".json")).map(e=>d(decodeURIComponent(e.slice(0,-5)))))).flatMap(e=>e?[(({state:e,...t})=>t)(e)]:[]).sort((e,t)=>e.site.localeCompare(t.site))}async function m(e){let t=await u(e.site);if(t&&!t.bots.includes(e.bot)){let r=t.asking.includes(e.bot)?t:{...t,asking:[...t.asking,e.bot]};return r!==t&&await f(r),{kind:"taken",signIn:(({state:e,...t})=>t)(r)}}let r=t?.site??s(e.site),n={site:r,account:e.account.trim()||r,bots:[...new Set([...t?.bots??[],e.bot])],asking:(t?.asking??[]).filter(t=>t!==e.bot),keptAt:new Date().toISOString(),usedAt:t?.usedAt??null,state:e.state};return await f(n),{kind:"kept",signIn:(({state:e,...t})=>t)(n)}}let w=globalThis.__signInsHeld??=new Map;async function h(e,t){let r=await u(e);if(!r)return{kind:"none",kept:(await p()).map(e=>e.site)};if(!r.bots.includes(t))return r.asking.includes(t)||await f({...r,asking:[...r.asking,t]}),{kind:"ask",signIn:(({state:e,...t})=>t)(r)};let n={...r,usedAt:new Date().toISOString()};return await f(n),{kind:"state",signIn:(({state:e,...t})=>t)(n),state:r.state}}async function g(e,t){return(await (0,i.listBrowsers)(e,t)).find(e=>e.name===t.PLAYWRIGHT_CLI_SESSION)??null}async function y(e,t){let r=await g(e,t);return r?r.attached?"theirs":"own":null}async function b(e,t){let r=await g(e,t);return!!r&&!r.attached&&!0===r.headed}let k=e=>`${e.name}
2
- ${e.domain}
3
- ${e.path}`;async function T(e){let t,r=(0,i.jobShellEnv)(e),n=r.PLAYWRIGHT_CLI_SESSION??e,o=w.get(n);if(!o?.sites.size)return;let s=await (0,i.openWorkspace)();if(await y(s,r)!=="own")return void w.delete(n);let l=(0,i.browserStateFile)();try{let e=await s.exec((0,i.saveBrowserState)(l),{env:r,timeoutMs:a.BROWSER_CLI.loadMs});if(0!==e.exitCode)return;let n=JSON.parse(await s.readFile(l,"utf-8"));t=new Map((n.cookies??[]).map(e=>[k(e),e]))}finally{await s.exec(`rm -f ${l}`)}for(let e of o.sites){let r=await d(e),n=r?.state;if(!r||!n?.cookies||!r.bots.includes(o.bot))continue;let a=!1,i=n.cookies.map(e=>{let r=t.get(k(e));return r&&JSON.stringify(r)!==JSON.stringify(e)?(a=!0,r):e});a&&await f({...r,state:{...n,cookies:i}})}}async function v(){let e=(0,r.join)(i.WORKSPACE,a.PATHS.bots);for(let n of(await (0,t.readdir)(e).catch(()=>[]))){let a=(0,r.join)(e,n,".auth");for(let e of(await (0,t.readdir)(a).catch(()=>[]))){if(!e.endsWith(".json"))continue;let i=(0,r.join)(a,e);try{let s=JSON.parse(await (0,t.readFile)(i,"utf8")),l=e.slice(0,-5),c=(await (0,t.readFile)((0,r.join)(a,"account.txt"),"utf8").catch(()=>"")).trim(),d=await m({site:l,account:c,bot:n,state:s});await (0,t.rm)(i),o.logger.info("kept"===d.kind?`sign-ins: took in ${n}'s ${l}`:`sign-ins: ${l} is kept for another bot already; ${n}'s old copy was removed and ${n} is asking for it`)}catch(e){o.logger.warn(`sign-ins: could not take in ${i}`,e)}}}}e.s(["adoptKeptSessions",0,v,"borrowSignIn",0,h,"holdSignIn",0,function(e,t,r){let n=w.get(e);n&&n.bot===t?n.sites.add(r):w.set(e,{bot:t,sites:new Set([r])})},"keepSignIn",0,m,"renewSignIns",0,T,"sessionBrowser",0,y,"sessionWindow",0,b],379651)},520401,e=>e.a(async(t,r)=>{try{var n=e.i(336763),a=e.i(396918),i=e.i(533102);e.i(333925);var o=e.i(876393),s=e.i(220376),l=e.i(247839),c=e.i(5509),d=e.i(724185),u=e.i(933395),f=t([o,c,d]);async function p(){let e=function(e){if(!e)return null;try{let t=JSON.parse(e);return t&&"object"==typeof t&&!Array.isArray(t)?t:null}catch{return null}}(await (0,d.readConfig)(u.THURSDAY_KEYS.settings)),t=l.LiveSettingsSchema.parse((0,l.migrateLiveSettings)(e));return e?t:{...t,readSkills:await m()}}async function m(){return(await (0,d.readConfig)(u.THURSDAY_KEYS.wasSkills))?.trim()==="on"}async function w(e){let[t]=await o.database.insert(s.callTable).values({id:crypto.randomUUID(),...e}).returning({id:s.callTable.id});return t.id}async function h(e,t){return(await o.database.update(s.callTable).set({endedAt:new Date,...t?{endedReason:t.reason,seconds:t.seconds??null}:{}}).where((0,n.and)((0,n.eq)(s.callTable.id,e),(0,n.isNull)(s.callTable.endedAt))).returning({id:s.callTable.id})).length>0}async function g(e,t){for(let r of t)await o.database.insert(s.callMessageTable).values({callId:e,...r,fragments:r.fragments??null}).onConflictDoUpdate({target:[s.callMessageTable.callId,s.callMessageTable.id],set:{text:r.text,role:r.role,tool:r.tool??null,fragments:r.fragments??null}})}async function y(e){let[t]=await o.database.select({seq:i.sql`max(${s.callMessageTable.seq})`}).from(s.callMessageTable).where((0,n.eq)(s.callMessageTable.callId,e));return t?.seq==null?0:Number(t.seq)+1}async function b(e,t){await o.database.insert(s.callThoughtTable).values({callId:e,...t}).onConflictDoNothing()}async function k(e){let t=await o.database.select({callId:s.callMessageTable.callId,startedAt:s.callTable.startedAt,role:s.callMessageTable.role,tool:s.callMessageTable.tool,text:s.callMessageTable.text,seq:s.callMessageTable.seq}).from(s.callMessageTable).innerJoin(s.callTable,(0,n.eq)(s.callMessageTable.callId,s.callTable.id)).orderBy((0,a.desc)(s.callTable.startedAt),(0,a.desc)(s.callMessageTable.seq)).limit(e),r=new Map;for(let e of t){let t=r.get(e.callId)??{callId:e.callId,startedAt:e.startedAt,turns:[]};t.turns.push({role:e.role,tool:e.tool,text:e.text,seq:e.seq}),r.set(e.callId,t)}return[...r.values()].reverse().map(e=>({...e,turns:e.turns.reverse()}))}async function T(){return(await o.database.select({id:s.callTable.id}).from(s.callTable).where((0,n.isNull)(s.callTable.endedAt)).limit(1)).length>0}async function v(e){return(await o.database.select({id:s.callTable.id}).from(s.callTable).where((0,n.and)((0,n.eq)(s.callTable.id,e),(0,n.isNull)(s.callTable.endedAt))).limit(1)).length>0}async function O(e=[]){await o.database.update(s.callTable).set({endedAt:new Date}).where((0,n.and)((0,n.isNull)(s.callTable.endedAt),e.length?(0,n.notInArray)(s.callTable.id,e):void 0))}async function x(e){let t=(0,n.isNotNull)(s.callTable.endedAt);return(await o.database.delete(s.callTable).where(e?(0,n.and)(t,(0,n.lt)(s.callTable.endedAt,e)):t).returning({id:s.callTable.id})).length}[o,c,d]=f.then?(await f)():f,e.s(["deleteEndedCalls",0,x,"endCall",0,h,"insertCall",0,w,"isAnyCallLive",0,T,"isCallOpen",0,v,"listRecentTurns",0,k,"nextTurnSeq",0,y,"readLiveSettings",0,p,"saveThought",0,b,"saveTurns",0,g,"sweepCalls",0,O]),r()}catch(e){r(e)}},!1),933395,e=>{"use strict";var t=e.i(517435),r=e.i(864328),n=e.i(556325);let a=[{id:"chatgpt",...r.TEXT_MODEL_PROVIDERS.chatgpt},{id:"openai",...r.TEXT_MODEL_PROVIDERS.openai}];t.default.object({id:t.default.string().min(1),text:t.default.string(),said:t.default.boolean()});t.default.object({enabled:t.default.boolean(),phrase:t.default.string().trim().min(3).max(32)}),t.default.object({enabled:t.default.boolean(),combo:t.default.string().trim().min(1).max(64)}),t.default.enum(["off","waiting","any"]),t.default.enum(["center","sides"]),t.default.object({id:t.default.string().min(1),role:t.default.enum(["user","assistant","tool"]),tool:t.default.string().nullish(),text:t.default.string(),seq:t.default.number().int().min(0),fragments:t.default.array(n.LiveFragmentSchema).nullish()}),t.default.object({id:t.default.string().min(1),text:t.default.string(),seq:t.default.number().int().min(0)}),e.s(["TEXT_CALL_PROVIDERS",0,a,"THURSDAY_KEYS",0,{settings:"THURSDAY_SETTINGS",wasSkills:"THURSDAY_SKILLS"},"textCallRunsOn",0,e=>a.find(t=>e(t.apiKeyName))?.id??null])},375814,e=>{"use strict";var t=e.i(139886),r=e.i(333925);let n=e=>`text/${e}; charset=utf-8`,a={md:{kind:"markdown",mime:n("markdown")},markdown:{kind:"markdown",mime:n("markdown")},csv:{kind:"csv",mime:n("csv")},json:{kind:"json",mime:"application/json; charset=utf-8"},txt:{kind:"text",mime:n("plain")},log:{kind:"text",mime:n("plain")},html:{kind:"frame",mime:n("html")},htm:{kind:"frame",mime:n("html")},pdf:{kind:"frame",mime:"application/pdf"},png:{kind:"image",mime:"image/png"},jpg:{kind:"image",mime:"image/jpeg"},jpeg:{kind:"image",mime:"image/jpeg"},gif:{kind:"image",mime:"image/gif"},webp:{kind:"image",mime:"image/webp"},svg:{kind:"image",mime:"image/svg+xml"},mp3:{kind:"audio",mime:"audio/mpeg"},wav:{kind:"audio",mime:"audio/wav"},mp4:{kind:"video",mime:"video/mp4"},webm:{kind:"video",mime:"video/webm"},docx:{kind:"none",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},xlsx:{kind:"none",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},pptx:{kind:"none",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"},css:{kind:"none",mime:n("css")},js:{kind:"none",mime:n("javascript")},woff2:{kind:"none",mime:"font/woff2"}},i=e=>e.split(".").pop()?.toLowerCase()??"",o=new Set(["css","js","woff2"]),s=Object.keys(a).filter(e=>!o.has(e)),l=RegExp(String.raw`(?<![\p{L}\p{N}_/:@%-])\/?(?:[\p{L}\p{N}_.@%-]+/)*[\p{L}\p{N}_@%-]+(?:\.[\p{L}\p{N}_-]+)*\.(?:${s.join("|")})\b`,"giu"),c=`${r.PATHS.workspace}/`,d=t.queryKey.file(""),u=e=>e.startsWith(`${r.PATHS.artifacts}/`)&&["md","markdown","html","htm"].includes(i(e));e.s(["extensionOf",0,i,"leadFirst",0,function(e){let t=e.findIndex(u);return t>0?[e[t],...e.filter((e,r)=>r!==t)]:e},"mimeOf",0,e=>a[i(e)]?.mime??"application/octet-stream","pathsIn",0,function(e){let t=e.replace(/\b[a-z][\w+.-]*:\/\/\S+/gi," ").replace(/\b[a-z][\w+.-]+:(?=\/)/gi," "),r=new Set,n="";for(let[e]of t.matchAll(l)){let t=!e.includes("/"),a=function(e){let t,r,n=(r=(t=function(e){if(!e.startsWith(d))return e;let t=e.slice(d.length);try{return decodeURIComponent(t)}catch{return t}}(e.trim())).indexOf(c))>=0?t.slice(r+c.length)||null:t.startsWith("/")||/^[A-Za-z]:/.test(t)||t.split("/").includes("..")?null:t||null;if(!n)return null;let[a,...i]=n.split("/");return i.length&&a.includes(".")?null:n}(t?n+e:e);t||(n=a?.slice(0,a.lastIndexOf("/")+1)??""),a&&r.add(a)}return[...r].slice(0,12)},"viewKindOf",0,e=>a[i(e)]?.kind??"none"])},198306,(e,t,r)=>{"use strict";var n=Object.create,a=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,c=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of o(t))l.call(e,s)||s===r||a(e,s,{get:()=>t[s],enumerable:!(n=i(t,s))||n.enumerable});return e},d=(e,t,r)=>(r=null!=e?n(s(e)):{},c(!t&&e&&e.__esModule?r:a(r,"default",{value:e,enumerable:!0}),e)),u={},f={isValidAccessToken:()=>k,readAuthConfig:()=>y,writeAuthConfig:()=>b};for(var p in f)a(u,p,{get:f[p],enumerable:!0});t.exports=c(a({},"__esModule",{value:!0}),u);var m=d(e.r(522734)),w=d(e.r(814747)),h=e.r(913803);function g(){let e=(0,h.getVercelDataDir)();if(!e)throw Error(`Unable to find Vercel CLI data directory. Your platform: ${process.platform}. Supported: darwin, linux, win32.`);return w.join(e,"auth.json")}function y(){try{let e=g();if(!m.existsSync(e))return null;let t=m.readFileSync(e,"utf8");if(!t)return null;return JSON.parse(t)}catch(e){return null}}function b(e){let t=g(),r=w.dirname(t);m.existsSync(r)||m.mkdirSync(r,{mode:504,recursive:!0}),m.writeFileSync(t,JSON.stringify(e,null,2),{mode:384})}function k(e,t=0){if(!e.token)return!1;if("number"!=typeof e.expiresAt)return!0;let r=Math.floor(Date.now()/1e3);return e.expiresAt>=r+t/1e3}},736374,(e,t,r)=>{"use strict";var n=Object.defineProperty,a=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,s={},l={AccessTokenMissingError:()=>d,RefreshAccessTokenFailedError:()=>u};for(var c in l)n(s,c,{get:l[c],enumerable:!0});t.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of i(t))o.call(e,s)||void 0===s||n(e,s,{get:()=>t[s],enumerable:!(r=a(t,s))||r.enumerable});return e})(n({},"__esModule",{value:!0}),s);class d extends Error{constructor(){super("No authentication found. Please log in with the Vercel CLI (vercel login)."),this.name="AccessTokenMissingError"}}class u extends Error{constructor(e){super("Failed to refresh authentication token.",{cause:e}),this.name="RefreshAccessTokenFailedError"}}},903736,(e,t,r)=>{"use strict";var n=Object.defineProperty,a=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,s={},l={processTokenResponse:()=>w,refreshTokenRequest:()=>m};for(var c in l)n(s,c,{get:l[c],enumerable:!0});t.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of i(t))o.call(e,s)||void 0===s||n(e,s,{get:()=>t[s],enumerable:!(r=a(t,s))||r.enumerable});return e})(n({},"__esModule",{value:!0}),s);var d=e.r(446786);let u=`@vercel/oidc node-${process.version} ${(0,d.platform)()} (${(0,d.arch)()}) ${(0,d.hostname)()}`,f=null;async function p(){if(f)return f;let e=await fetch("https://vercel.com/.well-known/openid-configuration",{headers:{"user-agent":u}});if(!e.ok)throw Error("Failed to discover OAuth endpoints");let t=await e.json();if(!t||"string"!=typeof t.token_endpoint)throw Error("Invalid OAuth discovery response");let r=t.token_endpoint;return f=r,r}async function m(e){let t=await p();return await fetch(t,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded","user-agent":u},body:new URLSearchParams({client_id:"cl_HYyOPBNtFMfHhaUn9L4QPfTZz6TP47bp",grant_type:"refresh_token",...e})})}async function w(e){let t=await e.json();return e.ok?"object"!=typeof t||null===t?[Error("Invalid token response")]:"string"!=typeof t.access_token?[Error("Missing access_token in response")]:"Bearer"!==t.token_type?[Error("Invalid token_type in response")]:"number"!=typeof t.expires_in?[Error("Missing expires_in in response")]:[null,t]:[Error("object"==typeof t&&t&&"error"in t?String(t.error):"Token refresh failed")]}},424134,(e,t,r)=>{"use strict";var n=Object.defineProperty,a=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,s={},l={VercelOidcTokenError:()=>d};for(var c in l)n(s,c,{get:l[c],enumerable:!0});t.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of i(t))o.call(e,s)||void 0===s||n(e,s,{get:()=>t[s],enumerable:!(r=a(t,s))||r.enumerable});return e})(n({},"__esModule",{value:!0}),s);class d extends Error{constructor(e,t){super(e),this.name="VercelOidcTokenError",this.cause=t}toString(){return this.cause?`${this.name}: ${this.message}: ${this.cause}`:`${this.name}: ${this.message}`}}},713292,(e,t,r)=>{"use strict";var n=Object.create,a=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,c=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of o(t))l.call(e,s)||s===r||a(e,s,{get:()=>t[s],enumerable:!(n=i(t,s))||n.enumerable});return e},d=(e,t,r)=>(r=null!=e?n(s(e)):{},c(!t&&e&&e.__esModule?r:a(r,"default",{value:e,enumerable:!0}),e)),u={},f={findRootDir:()=>y,getUserDataDir:()=>b};for(var p in f)a(u,p,{get:f[p],enumerable:!0});t.exports=c(a({},"__esModule",{value:!0}),u);var m=d(e.r(814747)),w=d(e.r(522734)),h=d(e.r(446786)),g=e.r(424134);function y(){try{let e=process.cwd();for(;e!==m.default.dirname(e);){let t=m.default.join(e,".vercel");if(w.default.existsSync(t))return e;e=m.default.dirname(e)}}catch(e){throw new g.VercelOidcTokenError("Token refresh only supported in node server environments")}return null}function b(){if(process.env.XDG_DATA_HOME)return process.env.XDG_DATA_HOME;switch(h.default.platform()){case"darwin":return m.default.join(h.default.homedir(),"Library/Application Support");case"linux":return m.default.join(h.default.homedir(),".local/share");case"win32":if(process.env.LOCALAPPDATA)return process.env.LOCALAPPDATA;return null;default:return null}}},913803,(e,t,r)=>{"use strict";var n=Object.create,a=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,c=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of o(t))l.call(e,s)||s===r||a(e,s,{get:()=>t[s],enumerable:!(n=i(t,s))||n.enumerable});return e},d=(e,t,r)=>(r=null!=e?n(s(e)):{},c(!t&&e&&e.__esModule?r:a(r,"default",{value:e,enumerable:!0}),e)),u={},f={assertVercelOidcTokenResponse:()=>x,findProjectInfo:()=>j,getTokenPayload:()=>_,getVercelDataDir:()=>T,getVercelOidcToken:()=>O,getVercelToken:()=>v,isExpired:()=>E,loadToken:()=>A,saveToken:()=>S};for(var p in f)a(u,p,{get:f[p],enumerable:!0});t.exports=c(a({},"__esModule",{value:!0}),u);var m=d(e.r(814747)),w=d(e.r(522734)),h=e.r(424134),g=e.r(713292),y=e.r(198306),b=e.r(903736),k=e.r(736374);function T(){let e=(0,g.getUserDataDir)();return e?m.join(e,"com.vercel.cli"):null}async function v(e){let t=(0,y.readAuthConfig)();if(!t?.token)throw new k.AccessTokenMissingError;if((0,y.isValidAccessToken)(t,e?.expirationBufferMs))return t.token;if(!t.refreshToken)throw(0,y.writeAuthConfig)({}),new k.RefreshAccessTokenFailedError("No refresh token available");try{let e=await (0,b.refreshTokenRequest)({refresh_token:t.refreshToken}),[r,n]=await (0,b.processTokenResponse)(e);if(r||!n)throw(0,y.writeAuthConfig)({}),new k.RefreshAccessTokenFailedError(r);let a={token:n.access_token,expiresAt:Math.floor(Date.now()/1e3)+n.expires_in};return n.refresh_token&&(a.refreshToken=n.refresh_token),(0,y.writeAuthConfig)(a),a.token}catch(e){if((0,y.writeAuthConfig)({}),e instanceof k.AccessTokenMissingError||e instanceof k.RefreshAccessTokenFailedError)throw e;throw new k.RefreshAccessTokenFailedError(e)}}async function O(e,t,r){let n=`https://api.vercel.com/v1/projects/${t}/token?source=vercel-oidc-refresh${r?`&teamId=${r}`:""}`,a=await fetch(n,{method:"POST",headers:{Authorization:`Bearer ${e}`}});if(!a.ok)throw new h.VercelOidcTokenError(`Failed to refresh OIDC token: ${a.statusText}`);let i=await a.json();return x(i),i}function x(e){if(!e||"object"!=typeof e)throw TypeError("Vercel OIDC token is malformed. Expected an object. Please run `vc env pull` and try again");if(!("token"in e)||"string"!=typeof e.token)throw TypeError("Vercel OIDC token is malformed. Expected a string-valued token property. Please run `vc env pull` and try again")}function j(){let e=(0,g.findRootDir)();if(!e)throw new h.VercelOidcTokenError("Unable to find project root directory. Have you linked your project with `vc link?`");let t=m.join(e,".vercel","project.json");if(!w.existsSync(t))throw new h.VercelOidcTokenError("project.json not found, have you linked your project with `vc link?`");let r=JSON.parse(w.readFileSync(t,"utf8"));if("string"!=typeof r.projectId&&"string"!=typeof r.orgId)throw TypeError("Expected a string-valued projectId property. Try running `vc link` to re-link your project.");return{projectId:r.projectId,teamId:r.orgId}}function S(e,t){let r=(0,g.getUserDataDir)();if(!r)throw new h.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let n=m.join(r,"com.vercel.token",`${t}.json`),a=JSON.stringify(e);w.mkdirSync(m.dirname(n),{mode:504,recursive:!0}),w.writeFileSync(n,a),w.chmodSync(n,432)}function A(e){let t=(0,g.getUserDataDir)();if(!t)throw new h.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let r=m.join(t,"com.vercel.token",`${e}.json`);if(!w.existsSync(r))return null;let n=JSON.parse(w.readFileSync(r,"utf8"));return x(n),n}function _(e){let t=e.split(".");if(3!==t.length)throw new h.VercelOidcTokenError("Invalid token. Please run `vc env pull` and try again");let r=t[1].replace(/-/g,"+").replace(/_/g,"/"),n=r.padEnd(r.length+(4-r.length%4)%4,"=");return JSON.parse(Buffer.from(n,"base64").toString("utf8"))}function E(e,t=0){return 1e3*e.exp<Date.now()+t}}];
4
-
5
- //# sourceMappingURL=%5Broot-of-the-server%5D__05n-hql._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[418520,e=>e.a(async(t,o)=>{try{var n=await e.y("@libsql/client-6da938047d5fc1cd");e.n(n),o()}catch(e){o(e)}},!0),874533,(e,t,o)=>{t.exports=e.x("node:child_process",()=>require("node:child_process"))},666680,(e,t,o)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},902157,(e,t,o)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},912714,(e,t,o)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},660526,(e,t,o)=>{t.exports=e.x("node:os",()=>require("node:os"))},750227,(e,t,o)=>{t.exports=e.x("node:path",()=>require("node:path"))},59639,(e,t,o)=>{t.exports=e.x("node:process",()=>require("node:process"))},509656,(e,t,o)=>{t.exports=e.x("node:tty",()=>require("node:tty"))},812057,(e,t,o)=>{t.exports=e.x("node:util",()=>require("node:util"))},799791,e=>e.a(async(t,o)=>{try{var n=e.i(336763),r=e.i(533102),a=e.i(232347);e.i(333925);var i=e.i(876393),s=e.i(220376),l=e.i(724185);e.i(871096);var d=e.i(951056),c=t([i,l]);[i,l]=c.then?(await c)():c;let y=e=>({name:e.name,description:e.description,ownLine:e.ownLine?.line??null,systemPrompt:e.systemPrompt,icon:e.icon,provider:e.provider,model:e.model,disabled:e.disabled,compactAt:e.compactAt,effort:e.effort});async function p(){let e=await i.database.select().from(s.botTable).orderBy(s.botTable.createdAt);return e.length?e.filter(e=>!e.disabled).map(y):[d.DEFAULT_BOT]}async function u(e){let t=await b(e);if(t)return y(t);let o=e.trim().toLowerCase(),[a]=await i.database.select().from(s.botTable).where((0,n.eq)(r.sql`lower(${s.botTable.name})`,o));return a?y(a):d.DEFAULT_BOT.name.toLowerCase()===o?d.DEFAULT_BOT:null}async function m(){return(0,d.isBotMemoryOn)(await (0,l.readConfig)(d.BOT_MEMORY_KEY))}async function b(e){let[t]=await i.database.select().from(s.botTable).where((0,n.eq)(s.botTable.name,e));return t??null}async function f(e){let t=await b(e);return!t||t.descriptionLocked?null:{line:t.ownLine?.line??null}}async function w(e,t,o){let r=await b(e);if(!r||r.descriptionLocked)return;let l=r.ownLine?.line??null;return l===t||(await i.database.update(s.botTable).set({ownLine:{line:t,reason:o,at:Date.now()}}).where((0,n.eq)(s.botTable.name,r.name)),a.appEvents.emit({type:"bots"})),{was:l}}e.s(["findJobBot",0,u,"listJobBots",0,p,"ownLineOf",0,f,"readBotMemoryOn",0,m,"writeOwnLine",0,w]),o()}catch(e){o(e)}},!1),207580,e=>{e.v(t=>Promise.all(["server/chunks/[externals]__0y3n8y6._.js","server/chunks/node_modules_consola_dist_chunks_prompt_mjs_0q8fc1x._.js"].map(t=>e.l(t))).then(()=>t(27996)))}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__0j_nz36._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[418520,e=>e.a(async(t,i)=>{try{var a=await e.y("@libsql/client-6da938047d5fc1cd");e.n(a),i()}catch(e){i(e)}},!0),666680,(e,t,i)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},902157,(e,t,i)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},750227,(e,t,i)=>{t.exports=e.x("node:path",()=>require("node:path"))},59639,(e,t,i)=>{t.exports=e.x("node:process",()=>require("node:process"))},509656,(e,t,i)=>{t.exports=e.x("node:tty",()=>require("node:tty"))},812057,(e,t,i)=>{t.exports=e.x("node:util",()=>require("node:util"))},264079,e=>{"use strict";var t=e.i(469719),i=e.i(687388);let a=t.z.enum(["openai","chatgpt","anthropic","google","xai","vercel-ai-gateway","mistral","deepseek","groq","cerebras","togetherai","fireworks","deepinfra","cohere"]),l=t.z.object({provider:a,model:t.z.string().trim().min(1,"Model name is required").max(80)}),r=["none","minimal","low","medium","high","xhigh"],o=t.z.enum(r),s=t.z.enum(["openai","google","xai","vercel-ai-gateway"]),n=t.z.object({provider:s,model:t.z.string().trim().min(1,"Model name is required").max(120)}),d={openai:{label:"Open AI",apiKeyName:"OPENAI_API_KEY",models:{image:[{id:"gpt-image-1-mini",label:"GPT Image 1 mini",tier:"small"},{id:"gpt-image-2.5-flare",label:"GPT Image 2.5 Flare",tier:"mid"},{id:"gpt-image-2.5-sunburst",label:"GPT Image 2.5 Sunburst",tier:"large"}],video:[],speech:[{id:"tts-1",label:"TTS 1",tier:"small"},{id:"gpt-4o-mini-tts",label:"4o mini TTS",tier:"mid"},{id:"tts-1-hd",label:"TTS 1 HD",tier:"large"}],transcription:[{id:"gpt-4o-mini-transcribe",label:"4o mini Transcribe",tier:"small"},{id:"gpt-transcribe",label:"GPT Transcribe",tier:"mid"}]}},google:{label:"Gemini",apiKeyName:"GOOGLE_GENERATIVE_AI_API_KEY",models:{image:[{id:"gemini-3.1-flash-lite-image",label:"3.1 Flash Lite Image",tier:"small"},{id:"gemini-3.1-flash-image",label:"3.1 Flash Image",tier:"mid"},{id:"gemini-3-pro-image",label:"3 Pro Image",tier:"large"}],video:[{id:"veo-3.1-lite-generate-preview",label:"Veo 3.1 Lite",tier:"small"},{id:"veo-3.1-fast-generate-preview",label:"Veo 3.1 Fast",tier:"mid"},{id:"veo-3.1-generate-preview",label:"Veo 3.1",tier:"large"}],speech:[{id:"gemini-2.5-flash-preview-tts",label:"2.5 Flash TTS",tier:"small"},{id:"gemini-3.1-flash-tts-preview",label:"3.1 Flash TTS",tier:"mid"},{id:"gemini-2.5-pro-preview-tts",label:"2.5 Pro TTS",tier:"large"}],transcription:[{id:"gemini-3.5-transcribe",label:"3.5 Transcribe",tier:"mid"}]}},xai:{label:"xAI",apiKeyName:"XAI_API_KEY",models:{image:[{id:"grok-imagine-image",label:"Grok Imagine",tier:"small"},{id:"grok-imagine-image-2.0",label:"Grok Imagine 2.0",tier:"mid"}],video:[{id:"grok-imagine-video",label:"Grok Imagine Video",tier:"small"},{id:"grok-imagine-video-1.5",label:"Grok Imagine Video 1.5",tier:"mid"}],speech:[{id:"grok-tts",label:"Grok TTS",tier:"mid"}],transcription:[{id:"grok-stt",label:"Grok STT",tier:"mid"}]}},"vercel-ai-gateway":{label:"Vercel AI Gateway",apiKeyName:"AI_GATEWAY_API_KEY",models:{image:[{id:"bytedance/seedream-5.0-lite",label:"Seedream 5.0 Lite",tier:"small"},{id:"bfl/flux-2-klein-9b",label:"FLUX 2 Klein 9B",tier:"small"},{id:"spacexai/grok-imagine-image-2.0",label:"Grok Imagine 2.0",tier:"small"},{id:"bfl/flux-2-pro",label:"FLUX 2 Pro",tier:"mid"},{id:"bytedance/seedream-5.0-pro",label:"Seedream 5.0 Pro",tier:"mid"},{id:"recraft/recraft-v4.1",label:"Recraft V4.1",tier:"mid"},{id:"openai/gpt-image-2.5-sunburst",label:"GPT Image 2.5 Sunburst",tier:"large"}],video:[{id:"bytedance/seedance-2.0-mini",label:"Seedance 2.0 Mini",tier:"small"},{id:"google/veo-3.1-lite-generate-001",label:"Veo 3.1 Lite",tier:"small"},{id:"alibaba/wan-v2.6-t2v",label:"Wan 2.6",tier:"small"},{id:"google/veo-3.1-fast-generate-001",label:"Veo 3.1 Fast",tier:"mid"},{id:"bytedance/seedance-2.5",label:"Seedance 2.5",tier:"mid"},{id:"spacexai/grok-imagine-video-1.5",label:"Grok Imagine Video 1.5",tier:"mid"},{id:"klingai/kling-v3.0-t2v",label:"Kling 3.0",tier:"large"},{id:"google/veo-3.1-generate-001",label:"Veo 3.1",tier:"large"}],speech:[{id:"fish-audio/s1",label:"Fish Audio S1",tier:"small"},{id:"openai/tts-1",label:"OpenAI TTS 1",tier:"small"},{id:"spacexai/grok-tts",label:"Grok TTS",tier:"mid"},{id:"fish-audio/s2.1-pro",label:"Fish Audio S2.1 Pro",tier:"mid"},{id:"openai/tts-1-hd",label:"OpenAI TTS 1 HD",tier:"large"}],transcription:[{id:"spacexai/grok-stt",label:"Grok STT",tier:"small"},{id:"fish-audio/transcribe-1",label:"Fish Transcribe 1",tier:"small"},{id:"openai/gpt-4o-mini-transcribe",label:"4o mini Transcribe",tier:"small"},{id:"openai/gpt-4o-transcribe",label:"4o Transcribe",tier:"mid"},{id:"google/gemini-3.5-transcribe",label:"Gemini 3.5 Transcribe",tier:"mid"}]}}},m=Object.keys(d).map(e=>({id:e,...d[e]})),u={openai:{label:"Open AI",apiKeyName:"OPENAI_API_KEY",keysAt:"https://platform.openai.com/api-keys",keyLooks:"sk-…",suggestModels:[{id:"gpt-6-luna",label:"6 Luna",tier:"small",context:105e4,efforts:["none","low","medium","high","xhigh"]},{id:"gpt-6-sol",label:"6 Sol",tier:"mid",context:105e4,efforts:["none","low","medium","high","xhigh"]},{id:"gpt-6-astra",label:"6 Astra",tier:"large",context:105e4,efforts:["low","medium","high","xhigh"]}]},chatgpt:{label:"GPT Subscription",apiKeyName:"CHATGPT_SIGN_IN",signIn:!0,suggestModels:[{id:"gpt-6-luna",label:"6 Luna",tier:"small",context:272e3,efforts:["none","low","medium","high","xhigh"]},{id:"gpt-6-sol",label:"6 Sol",tier:"mid",context:272e3,efforts:["none","low","medium","high","xhigh"]},{id:"gpt-6-astra",label:"6 Astra",tier:"large",context:272e3,efforts:["low","medium","high","xhigh"]}]},anthropic:{label:"Claude",apiKeyName:"ANTHROPIC_API_KEY",keysAt:"https://platform.claude.com/settings/keys",keyLooks:"sk-ant-…",suggestModels:[{id:"claude-haiku-4-5",label:"Haiku 4.5",tier:"small",efforts:["none","minimal","low","medium","high","xhigh"]},{id:"claude-sonnet-5",label:"Sonnet 5",tier:"mid",context:1e6,efforts:["none","low","medium","high","xhigh"]},{id:"claude-opus-5-5",label:"Opus 5.5",tier:"large",context:1e6,efforts:["low","medium","high","xhigh"]},{id:"claude-fable-5-1",label:"Fable 5.1",tier:"large",efforts:["none","low","medium","high","xhigh"]}]},google:{label:"Gemini",apiKeyName:"GOOGLE_GENERATIVE_AI_API_KEY",keysAt:"https://aistudio.google.com/apikey",keyLooks:"AIza…",suggestModels:[{id:"gemini-3.5-flash-lite",label:"3.5 Flash Lite",tier:"small",context:1e6,efforts:["minimal","low","medium","high"]},{id:"gemini-3.8-flash",label:"3.8 Flash",tier:"mid",context:1e6,efforts:["low","medium","high"]}]},xai:{label:"xAI",apiKeyName:"XAI_API_KEY",keysAt:"https://console.x.ai",keyLooks:"xai-…",suggestModels:[{id:"grok-4.7",label:"Grok 4.7",tier:"large",context:5e5,efforts:["none","low","medium","high","xhigh"]}]},"vercel-ai-gateway":{label:"Vercel AI Gateway",apiKeyName:"AI_GATEWAY_API_KEY",keysAt:"https://vercel.com/docs/ai-gateway/authentication-and-byok/authentication",suggestModels:[{id:"zai/glm-5.3-flash",label:"GLM 5.3 Flash",tier:"small"},{id:"google/gemini-3.8-flash",label:"Gemini 3.8 Flash",tier:"small"},{id:"openai/gpt-6-luna",label:"GPT 6 Luna",tier:"small",context:105e4},{id:"zai/glm-5.3",label:"GLM 5.3",tier:"mid"},{id:"spacexai/grok-4.7",label:"Grok 4.7",tier:"mid",context:5e5},{id:"anthropic/claude-sonnet-5",label:"Claude Sonnet 5",tier:"mid"},{id:"openai/gpt-6-sol",label:"GPT 6 Sol",tier:"mid",context:105e4},{id:"moonshotai/kimi-k3",label:"Kimi K3",tier:"mid"},{id:"anthropic/claude-opus-5.5",label:"Claude Opus 5.5",tier:"large",context:1e6},{id:"openai/gpt-6-astra",label:"GPT 6 Astra",tier:"large",context:105e4}]},mistral:{label:"Mistral",apiKeyName:"MISTRAL_API_KEY",keysAt:"https://console.mistral.ai/api-keys",suggestModels:[{id:"ministral-8b-latest",label:"Ministral 8B",tier:"small",efforts:[]},{id:"mistral-small-latest",label:"Small",tier:"mid",efforts:["none","high"]},{id:"mistral-medium-latest",label:"Medium",tier:"large",efforts:["none","high"]},{id:"mistral-large-latest",label:"Large",tier:"large",efforts:[]}]},deepseek:{label:"DeepSeek",apiKeyName:"DEEPSEEK_API_KEY",keysAt:"https://platform.deepseek.com/api_keys",keyLooks:"sk-…",suggestModels:[{id:"deepseek-flash",label:"V4.1 Flash",tier:"small",context:1e6,efforts:["none","low","high","xhigh"]},{id:"deepseek-v4-pro",label:"V4 Pro",tier:"large",context:1e6,efforts:["none","low","high","xhigh"]}]},groq:{label:"Groq",apiKeyName:"GROQ_API_KEY",keysAt:"https://console.groq.com/keys",keyLooks:"gsk_…",suggestModels:[{id:"openai/gpt-oss-20b",label:"GPT OSS 20B",tier:"small",context:131072,efforts:["low","medium","high"]},{id:"openai/gpt-oss-120b",label:"GPT OSS 120B",tier:"mid",context:131072,efforts:["low","medium","high"]},{id:"llama-3.3-70b-versatile",label:"Llama 3.3 70B",tier:"mid",context:131072,efforts:[]}]},cerebras:{label:"Cerebras",apiKeyName:"CEREBRAS_API_KEY",keysAt:"https://cloud.cerebras.ai",keyLooks:"csk-…",suggestModels:[{id:"qwen-3.8-27b",label:"Qwen 3.8 27B",tier:"small",context:64e3},{id:"gpt-oss-120b",label:"GPT OSS 120B",tier:"mid",context:65536}]},togetherai:{label:"Together",apiKeyName:"TOGETHER_AI_API_KEY",keysAt:"https://api.together.ai/settings/api-keys",suggestModels:[{id:"Qwen/Qwen3.5-9B",label:"Qwen 3.5 9B",tier:"small",context:262144},{id:"zai-org/GLM-5.3-Flash",label:"GLM 5.3 Flash",tier:"small",context:1048575},{id:"openai/gpt-oss-120b",label:"GPT OSS 120B",tier:"mid",context:131072},{id:"deepseek-ai/DeepSeek-V4.1-Flash",label:"DeepSeek V4.1 Flash",tier:"mid",context:1e6},{id:"zai-org/GLM-5.3",label:"GLM 5.3",tier:"large",context:1048575},{id:"moonshotai/Kimi-K3",label:"Kimi K3",tier:"large",context:1048576}]},fireworks:{label:"Fireworks",apiKeyName:"FIREWORKS_API_KEY",keysAt:"https://app.fireworks.ai/account/api-keys",keyLooks:"fw_…",suggestModels:[{id:"accounts/fireworks/models/glm-5p3-flash",label:"GLM 5.3 Flash",tier:"small",context:1048576},{id:"accounts/fireworks/models/deepseek-v4p1-flash",label:"DeepSeek V4.1 Flash",tier:"mid",context:1048576},{id:"accounts/fireworks/models/minimax-m3",label:"MiniMax M3",tier:"mid",context:512e3},{id:"accounts/fireworks/models/glm-5p3",label:"GLM 5.3",tier:"large",context:1048576},{id:"accounts/fireworks/models/kimi-k3",label:"Kimi K3",tier:"large",context:1048576}]},deepinfra:{label:"DeepInfra",apiKeyName:"DEEPINFRA_API_KEY",keysAt:"https://deepinfra.com/dash/api_keys",suggestModels:[{id:"deepseek-ai/DeepSeek-V4-Flash-0731",label:"DeepSeek V4 Flash",tier:"small",context:1048576},{id:"deepseek-ai/DeepSeek-V4.1-Flash",label:"DeepSeek V4.1 Flash",tier:"mid",context:1048576},{id:"zai-org/GLM-5.2",label:"GLM 5.2",tier:"mid",context:1048576},{id:"zai-org/GLM-5.3",label:"GLM 5.3",tier:"large",context:1048576},{id:"moonshotai/Kimi-K3",label:"Kimi K3",tier:"large",context:1048576}]},cohere:{label:"Cohere",apiKeyName:"COHERE_API_KEY",keysAt:"https://dashboard.cohere.com/api-keys",suggestModels:[{id:"command-r7b-12-2024",label:"Command R7B",tier:"small",context:128e3},{id:"command-a-03-2025",label:"Command A",tier:"mid",context:256e3},{id:"command-a-plus-05-2026",label:"Command A+",tier:"large",context:128e3}]}},g=Object.keys(u).map(e=>({id:e,...u[e]}));e.s(["EFFORTS",0,r,"GATEWAY_OWNERS",0,{anthropic:"anthropic",openai:"openai",google:"google",spacexai:"xai",mistral:"mistral",deepseek:"deepseek",cohere:"cohere"},"MEDIA_MODEL_PROVIDERS",0,d,"MEDIA_MODEL_PROVIDER_LIST",0,m,"TEXT_MODEL_PROVIDERS",0,u,"TEXT_MODEL_PROVIDER_LIST",0,g,"canMakeKind",0,(e,t)=>(d[e]?.models[t]?.length??0)>0,"compactAtFor",0,e=>e&&e>0?Math.round(e*i.BOT_RUN.compactHeadroom):i.BOT_RUN.compactAt,"contextWindowOf",0,function(e,t,i=[]){if("vercel-ai-gateway"===e)return i.find(e=>e.id===t)?.contextWindow??null;let a=u[e].suggestModels;return a.find(e=>e.id===t)?.context??null},"defaultModelOf",0,e=>(e.suggestModels.find(e=>"mid"===e.tier)??e.suggestModels[0])?.id,"effortSchema",0,o,"effortsOf",0,function(e,t,i=[]){if("vercel-ai-gateway"===e)return i.find(e=>e.id===t)?.efforts??null;let a=u[e].suggestModels;return a.find(e=>e.id===t)?.efforts??null},"parseMediaModel",0,function(e){let[t,...i]=(e??"").trim().split("/"),a=n.safeParse({provider:t,model:i.join("/")});return a.success?a.data:null},"parseTextModel",0,function(e){let[t,...i]=(e??"").trim().split("/"),a=l.safeParse({provider:t,model:i.join("/")});return a.success?a.data:null},"textModelProviderSchema",0,a,"textModelRefSchema",0,l])},944971,e=>{"use strict";var t=e.i(105249),i=e.i(687388),a=e.i(264079),l=e.i(704161),r=e.i(41444),o=e.i(554199),s=e.i(889034);let n=t.default.object({color:t.default.string().regex(/^(#[0-9a-fA-F]{6}|currentColor)$/,"Hex color").optional(),shape:t.default.enum(o.MARK_SHAPES).optional(),outline:t.default.boolean().optional(),paint:t.default.enum(o.MARK_PAINT_IDS).optional()}),d=t.default.string().max(i.COMMON_VALIDATE.prompt.max),m=t.default.object({line:t.default.string(),reason:t.default.string(),at:t.default.number()}),u=t.default.object({id:t.default.number(),name:t.default.string(),serverName:t.default.string()}),g=t.default.string().trim().transform(e=>e.replace(/\s+/g," ")).refine(e=>e.toLowerCase()!==s.ROOM_THURSDAY.toLowerCase(),"Thursday is reserved for the voice assistant.").pipe(t.default.string().min(1,"A name is required").max(i.COMMON_VALIDATE.name.max)),c=t.default.object({input:t.default.number(),output:t.default.number()});t.default.object({name:t.default.string(),description:t.default.string(),descriptionLocked:t.default.boolean(),ownLine:m.nullish(),systemPrompt:t.default.string().nullish(),icon:n.nullish(),provider:a.textModelProviderSchema.nullish(),model:t.default.string().nullish(),compactAt:t.default.number().nullish(),effort:a.effortSchema.nullish(),disabled:t.default.boolean(),createdAt:l.DateLikeSchema,tools:u.array().default([]),tokens:c,lastJobAt:l.DateLikeSchema.nullish()}),t.default.object({name:g,description:t.default.string().trim().min(1,"Say what this bot is for").max(i.COMMON_VALIDATE.description.max),systemPrompt:d.optional(),icon:n.optional(),provider:a.textModelProviderSchema.nullish(),model:t.default.string().trim().max(80).nullish(),compactAt:t.default.coerce.number().int().min(8e3,"At least 8k").nullish(),effort:a.effortSchema.nullish(),disabled:t.default.boolean().optional(),descriptionLocked:t.default.boolean().optional(),toolIds:t.default.number().int().array().max(i.MAX_PINNED_TOOLS).default([])});let b={color:o.MARK_SYSTEM,shape:"blob"};t.default.object({file:t.default.string(),path:t.default.string(),line:t.default.string(),at:l.DateLikeSchema,bytes:t.default.number()});let f="Continue",p={thursday:"Thursday, on the call:",user:"The user, on screen:"},h=t.default.discriminatedUnion("type",[t.default.object({type:t.default.literal("text"),text:t.default.string()}),t.default.object({type:t.default.literal("image"),src:t.default.string()})]),k=t.default.object({id:t.default.string(),seq:t.default.number(),bot:t.default.string().nullable(),parent:t.default.string().nullable(),to:t.default.string().nullish(),at:l.DateLikeSchema}),x=t.default.discriminatedUnion("kind",[k.extend({kind:t.default.literal("user"),text:t.default.string()}),k.extend({kind:t.default.literal("text"),text:t.default.string()}),k.extend({kind:t.default.literal("note"),text:t.default.string()}),k.extend({kind:t.default.literal("stop"),text:t.default.string()}),k.extend({kind:t.default.literal("tool"),callId:t.default.string(),name:t.default.string(),input:t.default.string(),note:t.default.string().nullish(),path:t.default.string().nullish()}),k.extend({kind:t.default.literal("tool-result"),callId:t.default.string(),name:t.default.string(),results:h.array(),more:t.default.boolean()}),k.extend({kind:t.default.literal("ask"),callId:t.default.string(),to:t.default.string(),text:t.default.string(),question:t.default.boolean().optional(),questionId:t.default.string().optional()})]),A=t.default.object({question:t.default.string(),messageId:t.default.string().optional(),bot:t.default.string().optional(),options:t.default.string().array()});t.default.object({id:t.default.string(),bot:t.default.string(),label:t.default.string(),request:t.default.string(),status:t.default.enum(["running","waiting","done","cancelled"]),outcome:t.default.string().nullable(),ask:A.nullable(),seen:t.default.boolean(),routineId:t.default.string().nullable(),tokens:c,contextTokens:t.default.number(),contextBudget:t.default.number(),createdAt:l.DateLikeSchema,updatedAt:l.DateLikeSchema,lines:x.array(),room:s.RoomViewSchema}),e.s(["BOT_MEMORY_KEY",0,"BOT_MEMORY","COMPACT_AT_MIN",0,8e3,"DEFAULT_BOT",0,{name:"Jarvis",description:"Anything — this computer, a browser, the web, files, services",ownLine:null,systemPrompt:null,icon:b,provider:null,model:null,disabled:!1,compactAt:null,effort:null},"THREAD_CONTINUE",0,f,"isAppStop",0,e=>{let t=e?.options??[];return!e?.messageId&&1===t.length&&t[0]===f},"isBotMemoryOn",0,e=>e?.trim()!=="off","rosterLine",0,function(e){let t=e.description.trim();return e.ownLine?`${t}${/[.!?。…]$/.test(t)?"":"."} ${e.ownLine}`:t},"tagSpeaker",0,(e,t)=>`${p[e]} ${t}`,"threadActivity",0,function(e,t=120){let i=null;for(let a=e.length-1;a>=0;a--){let l=e[a];if("tool"===l.kind)i??=`${l.name} ${l.note??l.input}`;else if("text"===l.kind)return(0,r.clip)(i?`${l.text} → ${i}`:l.text,t);else if("ask"===l.kind)return(0,r.clip)(`asked ${l.to}: ${l.text}`,t);else if("user"===l.kind)break}return i?(0,r.clip)(i,t):null},"untagSpeaker",0,e=>{for(let t of Object.values(p))if(e.startsWith(`${t} `))return e.slice(t.length+1);return e},"workHandle",0,e=>e.slice(0,6)])},554199,e=>{"use strict";let t="currentColor",i=[{id:"system",label:"System",value:t},{id:"slate",label:"Slate",value:"#64748B"},{id:"indigo",label:"Indigo",value:"#6366F1"},{id:"blue",label:"Blue",value:"#3B82F6"},{id:"cyan",label:"Cyan",value:"#06B6D4"},{id:"teal",label:"Teal",value:"#14B8A6"},{id:"green",label:"Green",value:"#22C55E"},{id:"lime",label:"Lime",value:"#84CC16"},{id:"amber",label:"Amber",value:"#F59E0B"},{id:"orange",label:"Orange",value:"#F97316"},{id:"red",label:"Red",value:"#EF4444"},{id:"pink",label:"Pink",value:"#EC4899"},{id:"violet",label:"Violet",value:"#8B5CF6"},{id:"fuchsia",label:"Fuchsia",value:"#D946EF"},{id:"rose",label:"Rose",value:"#F43F5E"},{id:"sky",label:"Sky",value:"#0EA5E9"},{id:"emerald",label:"Emerald",value:"#10B981"},{id:"yellow",label:"Yellow",value:"#EAB308"},{id:"stone",label:"Stone",value:"#78716C"}],a=Object.fromEntries(i.map(e=>[e.id,e.value])),l=i.filter(e=>e.value!==t).map(e=>e.value),r=[a.amber,a.red],o={[a.cyan]:"#009dbb",[a.teal]:"#00a190",[a.green]:"#00a640",[a.lime]:"#5ca100",[a.amber]:"#d07b00",[a.orange]:"#ec6700",[a.sky]:"#0098dc",[a.emerald]:"#00a46d",[a.yellow]:"#bb8600"},s={rainbow:{label:"Rainbow",look:"flow",colors:[0,45,90,140,190,240,290,330,360].map(e=>`oklch(0.77 0.16 ${e})`)},duo:{label:"Duo",look:"duo",colors:["#818CF8","#F472B6"]},aurora:{label:"Aurora",look:"aurora",edge:"dark",colors:["#1a2f73","#2c56c9","#34d399","#22d3ee","#a7f3d0"]},"aurora-pink":{label:"Pink aurora",look:"aurora",edge:"dark",colors:["#3a1478","#7c3aed","#f472b6","#e879f9","#fbcfe8"]}},n=Object.keys(s);e.s(["MARK_PAINTS",0,s,"MARK_PAINT_IDS",0,n,"MARK_SHAPES",0,["blob","poly","squircle","heart"],"MARK_SYSTEM",0,t,"markInk",0,(e,t)=>t?e:o[e]??e,"randomMarkFills",0,function(e){let t=[...l.filter(e=>!r.includes(e)).map(e=>({color:e})),...n.map(e=>({paint:e}))];for(let e=t.length-1;e>0;e--){let i=Math.floor(Math.random()*(e+1));[t[e],t[i]]=[t[i],t[e]]}return t.slice(0,e)}])},889034,e=>{"use strict";var t=e.i(469719);let i=t.z.object({to:t.z.string().trim().min(1),text:t.z.string().trim().min(1),why:t.z.string().trim().min(1),kind:t.z.enum(["message","question"]).default("message"),options:t.z.array(t.z.string().trim().min(1)).nullish()}),a=t.z.enum(["queued","running","waiting","external","paused","done","cancelled"]),l=t.z.object({bot:t.z.string(),state:a}),r=t.z.object({id:t.z.string(),bot:t.z.string(),text:t.z.string(),options:t.z.string().array().optional()}),o=t.z.enum(["message","question","report","interrupted"]),s=t.z.object({participants:l.array(),questions:r.array(),deliveries:t.z.object({id:t.z.string(),bot:t.z.string(),text:t.z.string(),delivered:t.z.boolean()}).array(),relays:t.z.object({id:t.z.number(),bot:t.z.string(),text:t.z.string(),kind:o,messageId:t.z.string().nullable()}).array()});e.s(["RESUME_CHECK",0,"Resume from the saved state; inspect any tool whose result is missing before repeating it.","ROOM_THURSDAY",0,"Thursday","ROOM_USER",0,"The user","RoomMessageSchema",0,i,"RoomViewSchema",0,s])},105249,e=>{"use strict";var t=e.i(562810);e.s(["default",0,t])}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__0jzwdg-._.js.map