thursday-agent 0.18.0 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (342) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +3 -2
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/routes-manifest.json +22 -12
  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/page_client-reference-manifest.js +1 -1
  14. package/.next/server/app/_not-found.html +1 -1
  15. package/.next/server/app/_not-found.rsc +12 -12
  16. package/.next/server/app/_not-found.segments/_full.segment.rsc +12 -12
  17. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +11 -11
  18. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  19. package/.next/server/app/api/artifact/route.js +6 -6
  20. package/.next/server/app/api/artifact/route.js.nft.json +1 -1
  21. package/.next/server/app/api/bot/memory/files/route.js +1 -1
  22. package/.next/server/app/api/bot/memory/files/route.js.nft.json +1 -1
  23. package/.next/server/app/api/bot/memory/route.js +3 -3
  24. package/.next/server/app/api/bot/memory/route.js.nft.json +1 -1
  25. package/.next/server/app/api/bot/route.js +3 -3
  26. package/.next/server/app/api/bot/route.js.nft.json +1 -1
  27. package/.next/server/app/api/bot/thread/[id]/route.js.nft.json +1 -1
  28. package/.next/server/app/api/bot/thread/file/route.js +17 -17
  29. package/.next/server/app/api/bot/thread/file/route.js.nft.json +1 -1
  30. package/.next/server/app/api/bot/thread/route.js.nft.json +1 -1
  31. package/.next/server/app/api/config/route.js.nft.json +1 -1
  32. package/.next/server/app/api/events/route.js +2 -2
  33. package/.next/server/app/api/events/route.js.nft.json +1 -1
  34. package/.next/server/app/api/favicon/[host]/route.js.nft.json +1 -1
  35. package/.next/server/app/api/file/[...path]/route.js +2 -2
  36. package/.next/server/app/api/file/[...path]/route.js.nft.json +1 -1
  37. package/.next/server/app/api/llm-model/automatic/route.js +2 -2
  38. package/.next/server/app/api/llm-model/automatic/route.js.nft.json +1 -1
  39. package/.next/server/app/api/llm-model/catalog/[provider]/route/app-paths-manifest.json +3 -0
  40. package/.next/server/app/api/llm-model/catalog/{route.js → [provider]/route.js} +7 -7
  41. package/.next/server/app/api/llm-model/catalog/[provider]/route.js.nft.json +1 -0
  42. package/.next/server/app/api/llm-model/catalog/[provider]/route_client-reference-manifest.js +3 -0
  43. package/.next/server/app/api/llm-model/credits/[provider]/route/app-paths-manifest.json +3 -0
  44. package/.next/server/app/api/llm-model/credits/{route.js → [provider]/route.js} +7 -7
  45. package/.next/server/app/api/llm-model/credits/[provider]/route.js.nft.json +1 -0
  46. package/.next/server/app/api/llm-model/credits/[provider]/route_client-reference-manifest.js +3 -0
  47. package/.next/server/app/api/llm-model/route.js.nft.json +1 -1
  48. package/.next/server/app/api/llm-model/subscription/route.js.nft.json +1 -1
  49. package/.next/server/app/api/mcp/[name]/route.js.nft.json +1 -1
  50. package/.next/server/app/api/mcp/oauth/callback/route.js.nft.json +1 -1
  51. package/.next/server/app/api/mcp/route.js.nft.json +1 -1
  52. package/.next/server/app/api/mcp/tools/route.js.nft.json +1 -1
  53. package/.next/server/app/api/memory/edit/route.js +12 -12
  54. package/.next/server/app/api/memory/edit/route.js.nft.json +1 -1
  55. package/.next/server/app/api/memory/route.js.nft.json +1 -1
  56. package/.next/server/app/api/reach/route.js +16 -16
  57. package/.next/server/app/api/reach/route.js.nft.json +1 -1
  58. package/.next/server/app/api/routine/route.js +5 -5
  59. package/.next/server/app/api/routine/route.js.nft.json +1 -1
  60. package/.next/server/app/api/running/route/app-paths-manifest.json +3 -0
  61. package/.next/server/app/api/running/route/build-manifest.json +12 -0
  62. package/.next/server/app/api/running/route/server-reference-manifest.json +4 -0
  63. package/.next/server/app/api/running/route.js +10 -0
  64. package/.next/server/app/api/running/route.js.map +5 -0
  65. package/.next/server/app/api/running/route.js.nft.json +1 -0
  66. package/.next/server/app/api/running/route_client-reference-manifest.js +3 -0
  67. package/.next/server/app/api/signins/route.js +4 -4
  68. package/.next/server/app/api/signins/route.js.nft.json +1 -1
  69. package/.next/server/app/api/skills/[source]/[name]/route.js +6 -6
  70. package/.next/server/app/api/skills/[source]/[name]/route.js.nft.json +1 -1
  71. package/.next/server/app/api/skills/route.js +6 -6
  72. package/.next/server/app/api/skills/route.js.nft.json +1 -1
  73. package/.next/server/app/api/thursday/call/end/route.js.nft.json +1 -1
  74. package/.next/server/app/api/thursday/call/route.js.nft.json +1 -1
  75. package/.next/server/app/api/thursday/settings/route.js.nft.json +1 -1
  76. package/.next/server/app/api/thursday/text/route.js +12 -12
  77. package/.next/server/app/api/thursday/text/route.js.nft.json +1 -1
  78. package/.next/server/app/api/thursday/tool-call/route.js +12 -12
  79. package/.next/server/app/api/thursday/tool-call/route.js.nft.json +1 -1
  80. package/.next/server/app/api/workspace/files/route.js +6 -6
  81. package/.next/server/app/api/workspace/files/route.js.nft.json +1 -1
  82. package/.next/server/app/api/workspace/route.js +5 -5
  83. package/.next/server/app/api/workspace/route.js.nft.json +1 -1
  84. package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +11 -11
  85. package/.next/server/app/artifact/[...path]/page.js +7 -6
  86. package/.next/server/app/artifact/[...path]/page.js.nft.json +1 -1
  87. package/.next/server/app/artifact/[...path]/page_client-reference-manifest.js +1 -1
  88. package/.next/server/app/favicon.ico/route.js.nft.json +1 -1
  89. package/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  90. package/.next/server/app/page/server-reference-manifest.json +63 -63
  91. package/.next/server/app/page.js +10 -9
  92. package/.next/server/app/page.js.nft.json +1 -1
  93. package/.next/server/app/page_client-reference-manifest.js +1 -1
  94. package/.next/server/app-paths-manifest.json +3 -2
  95. package/.next/server/chunks/{[externals]__178rv3v._.js → [externals]__12stas-._.js} +1 -1
  96. package/.next/server/chunks/[root-of-the-server]__02ra64t._.js +1 -1
  97. package/.next/server/chunks/{[root-of-the-server]__05dp5tr._.js → [root-of-the-server]__06ky9of._.js} +2 -2
  98. package/.next/server/chunks/[root-of-the-server]__0b565-x._.js +7 -0
  99. package/.next/server/chunks/{[root-of-the-server]__1izes4_._.js → [root-of-the-server]__0bmtib_._.js} +2 -2
  100. package/.next/server/chunks/[root-of-the-server]__0bqveex._.js +1 -1
  101. package/.next/server/chunks/[root-of-the-server]__0brmiv2._.js +2 -2
  102. package/.next/server/chunks/[root-of-the-server]__0eivkvk._.js +2 -2
  103. package/.next/server/chunks/[root-of-the-server]__0f7m79q._.js +1 -1
  104. package/.next/server/chunks/[root-of-the-server]__0g38-aj._.js +2 -2
  105. package/.next/server/chunks/[root-of-the-server]__0gvdr2h._.js +1 -1
  106. package/.next/server/chunks/[root-of-the-server]__0h656y-._.js +2 -2
  107. package/.next/server/chunks/[root-of-the-server]__0hm3tiq._.js +2 -2
  108. package/.next/server/chunks/[root-of-the-server]__0hzdqnv._.js +2 -2
  109. package/.next/server/chunks/{[root-of-the-server]__0my9geo._.js → [root-of-the-server]__0kzmxpg._.js} +1 -1
  110. package/.next/server/chunks/[root-of-the-server]__0mgyt8p._.js +2 -2
  111. package/.next/server/chunks/[root-of-the-server]__0mrk2it._.js +1 -1
  112. package/.next/server/chunks/[root-of-the-server]__0o5s5-o._.js +5 -0
  113. package/.next/server/chunks/[root-of-the-server]__0p80i1n._.js +1 -1
  114. package/.next/server/chunks/[root-of-the-server]__0qdoc_9._.js +1 -1
  115. package/.next/server/chunks/[root-of-the-server]__0qzho69._.js +1 -1
  116. package/.next/server/chunks/[root-of-the-server]__0sm5xvm._.js +1 -1
  117. package/.next/server/chunks/[root-of-the-server]__0v_kuor._.js +1 -1
  118. package/.next/server/chunks/{[root-of-the-server]__1k2qs1m._.js → [root-of-the-server]__0ypkfbu._.js} +1 -1
  119. package/.next/server/chunks/[root-of-the-server]__1-18_pz._.js +1 -1
  120. package/.next/server/chunks/[root-of-the-server]__13hng6h._.js +1 -1
  121. package/.next/server/chunks/{[root-of-the-server]__01k3vi3._.js → [root-of-the-server]__14iga7p._.js} +1 -1
  122. package/.next/server/chunks/[root-of-the-server]__16gn7zn._.js +3 -0
  123. package/.next/server/chunks/[root-of-the-server]__18e65_-._.js +3 -0
  124. package/.next/server/chunks/[root-of-the-server]__1_04mcf._.js +2 -2
  125. package/.next/server/chunks/{[root-of-the-server]__0lvjz0b._.js → [root-of-the-server]__1_cgawk._.js} +2 -2
  126. package/.next/server/chunks/[root-of-the-server]__1ceammd._.js +1 -1
  127. package/.next/server/chunks/[root-of-the-server]__1ckt1yj._.js +1 -1
  128. package/.next/server/chunks/[root-of-the-server]__1cu5f3z._.js +1 -1
  129. package/.next/server/chunks/[root-of-the-server]__1dth047._.js +1 -1
  130. package/.next/server/chunks/{[root-of-the-server]__061o2_x._.js → [root-of-the-server]__1fc6v12._.js} +1 -1
  131. package/.next/server/chunks/[root-of-the-server]__1hviq62._.js +2 -2
  132. package/.next/server/chunks/[root-of-the-server]__1m1q6u5._.js +3 -0
  133. package/.next/server/chunks/[root-of-the-server]__1m_dmf6._.js +1 -1
  134. package/.next/server/chunks/[root-of-the-server]__1mys2c3._.js +1 -1
  135. package/.next/server/chunks/[root-of-the-server]__1ndi14y._.js +1 -1
  136. package/.next/server/chunks/[root-of-the-server]__1p0njle._.js +2 -2
  137. package/.next/server/chunks/[root-of-the-server]__1p47fbb._.js +1 -1
  138. package/.next/server/chunks/[root-of-the-server]__1pugoq0._.js +1 -1
  139. package/.next/server/chunks/{[root-of-the-server]__0ts7ai0._.js → [root-of-the-server]__1trns9g._.js} +1 -1
  140. package/.next/server/chunks/[root-of-the-server]__1ygplx1._.js +1 -1
  141. package/.next/server/chunks/[root-of-the-server]__1zn039k._.js +1 -1
  142. package/.next/server/chunks/[root-of-the-server]__20w_g71._.js +3 -0
  143. package/.next/server/chunks/_06hnfi8._.js +2 -2
  144. package/.next/server/chunks/_06u9yo-._.js +1 -1
  145. package/.next/server/chunks/_08_-9ay._.js +2 -2
  146. package/.next/server/chunks/_0bgjf07._.js +1 -1
  147. package/.next/server/chunks/_0c49lmw._.js +1 -1
  148. package/.next/server/chunks/_0hgvg55._.js +1 -1
  149. package/.next/server/chunks/_0s8ao8z._.js +1 -1
  150. package/.next/server/chunks/_0ucx1jv._.js +1 -1
  151. package/.next/server/chunks/_0uzj57i._.js +1 -1
  152. package/.next/server/chunks/_1-sk_q4._.js +1 -1
  153. package/.next/server/chunks/_1dxq827._.js +2 -2
  154. package/.next/server/chunks/_1e54wxa._.js +1 -1
  155. package/.next/server/chunks/_1frcwj1._.js +1 -1
  156. package/.next/server/chunks/_1gn2r2q._.js +4 -2
  157. package/.next/server/chunks/_1gxankq._.js +2 -2
  158. package/.next/server/chunks/_1i3uucm._.js +1 -1
  159. package/.next/server/chunks/_1jvy78-._.js +1 -1
  160. package/.next/server/chunks/_1lg0lsu._.js +53 -0
  161. package/.next/server/chunks/_1njolhx._.js +294 -0
  162. package/.next/server/chunks/_1q6e56i._.js +4 -2
  163. package/.next/server/chunks/_1wtb-77._.js +294 -0
  164. package/.next/server/chunks/_next-internal_server_app_api_llm-model_catalog_[provider]_route_actions_1i0449q.js +3 -0
  165. package/.next/server/chunks/_next-internal_server_app_api_llm-model_credits_[provider]_route_actions_0iui9hz.js +3 -0
  166. package/.next/server/chunks/_next-internal_server_app_api_running_route_actions_0o1g-aw.js +3 -0
  167. package/.next/server/chunks/config_ts_1g4sz5o._.js +1 -1
  168. package/.next/server/chunks/features_bot_0zy_q8y._.js +7 -7
  169. package/.next/server/chunks/features_bot_1dfrdsb._.js +7 -7
  170. package/.next/server/chunks/{node_modules_1rosz79._.js → node_modules_035o7ku._.js} +1 -1
  171. package/.next/server/chunks/{node_modules_1er1u8w._.js → node_modules_0tn5t13._.js} +1 -1
  172. package/.next/server/chunks/{node_modules_103lpef._.js → node_modules_12oq3hr._.js} +1 -1
  173. package/.next/server/chunks/ssr/[root-of-the-server]__04upd5v._.js +1 -1
  174. package/.next/server/chunks/ssr/[root-of-the-server]__0p0mv2u._.js +3 -0
  175. package/.next/server/chunks/ssr/{[root-of-the-server]__1r7tj27._.js → [root-of-the-server]__0sk5enu._.js} +1 -1
  176. package/.next/server/chunks/ssr/[root-of-the-server]__0xyaud4._.js +3 -0
  177. package/.next/server/chunks/ssr/{[root-of-the-server]__128hnrd._.js → [root-of-the-server]__1-gi9sm._.js} +1 -1
  178. package/.next/server/chunks/ssr/{[root-of-the-server]__0h6jo0s._.js → [root-of-the-server]__16nn3pe._.js} +2 -2
  179. package/.next/server/chunks/ssr/[root-of-the-server]__1867koj._.js +1 -1
  180. package/.next/server/chunks/ssr/[root-of-the-server]__1c8-7cw._.js +3 -0
  181. package/.next/server/chunks/ssr/[root-of-the-server]__1tb5vve._.js +2 -1
  182. package/.next/server/chunks/ssr/_02cm0fr._.js +5 -0
  183. package/.next/server/chunks/ssr/_07nmtxo._.js +1 -1
  184. package/.next/server/chunks/ssr/_088vzgn._.js +1 -1
  185. package/.next/server/chunks/ssr/{_1oafxdu._.js → _0bg1u1j._.js} +2 -2
  186. package/.next/server/chunks/ssr/_0cv9tmv._.js +1 -1
  187. package/.next/server/chunks/ssr/_0f9hx5p._.js +1 -1
  188. package/.next/server/chunks/ssr/_0g9ula_._.js +3 -0
  189. package/.next/server/chunks/ssr/{_0wuvkqk._.js → _0irozu9._.js} +2 -2
  190. package/.next/server/chunks/ssr/_0iwsdp7._.js +3 -0
  191. package/.next/server/chunks/ssr/_0l7rjg5._.js +1 -1
  192. package/.next/server/chunks/ssr/{_0fo4552._.js → _0nk80t6._.js} +44 -5
  193. package/.next/server/chunks/ssr/_0pbav_w._.js +1 -1
  194. package/.next/server/chunks/ssr/{_1r4mc3i._.js → _0q-mdwv._.js} +8 -8
  195. package/.next/server/chunks/ssr/{_1w899wx._.js → _0s5_ahb._.js} +2 -2
  196. package/.next/server/chunks/ssr/{_1omom9y._.js → _0t5f2c3._.js} +2 -2
  197. package/.next/server/chunks/ssr/_0v9r8g2._.js +1 -1
  198. package/.next/server/chunks/ssr/_0x8ophf._.js +1 -1
  199. package/.next/server/chunks/ssr/_0x9f717._.js +1 -1
  200. package/.next/server/chunks/ssr/_107vtdk._.js +162 -0
  201. package/.next/server/chunks/ssr/{_0ixe3g3._.js → _12lql1x._.js} +3 -3
  202. package/.next/server/chunks/ssr/_165wnr4._.js +1 -1
  203. package/.next/server/chunks/ssr/_16_7zeo._.js +1 -1
  204. package/.next/server/chunks/ssr/_17komoi._.js +3 -0
  205. package/.next/server/chunks/ssr/{_0j9vh-8._.js → _190hjys._.js} +2 -2
  206. package/.next/server/chunks/ssr/_1bfrntd._.js +2 -2
  207. package/.next/server/chunks/ssr/{_1tx-2k7._.js → _1booff4._.js} +2 -2
  208. package/.next/server/chunks/ssr/{_12jv_41._.js → _1ew1j7l._.js} +2 -2
  209. package/.next/server/chunks/ssr/_1i2swyr._.js +1 -1
  210. package/.next/server/chunks/ssr/_1neoj22._.js +1 -1
  211. package/.next/server/chunks/ssr/{_0osvxkt._.js → _1qsa25k._.js} +2 -2
  212. package/.next/server/chunks/ssr/_1soynbw._.js +2 -2
  213. package/.next/server/chunks/ssr/_1vc2xmu._.js +3 -0
  214. package/.next/server/chunks/ssr/{_1_ogjze._.js → _1wq90j8._.js} +2 -2
  215. package/.next/server/chunks/ssr/{_1pgxh81._.js → _1zrhkf0._.js} +44 -5
  216. package/.next/server/chunks/ssr/{_0mpn6q0._.js → _21awrs2._.js} +2 -2
  217. package/.next/server/chunks/ssr/features_0796o8r._.js +1 -1
  218. package/.next/server/chunks/ssr/features_bot_1c56lew._.js +37 -0
  219. package/.next/server/chunks/ssr/{features_bot_18gqkr_._.js → features_bot_1fn_grf._.js} +2 -2
  220. package/.next/server/chunks/ssr/{features_config_1ond01n._.js → features_config_05zi68v._.js} +3 -3
  221. package/.next/server/chunks/ssr/features_connectors_components_mcp-setting_tsx_0jmbgvp._.js +1 -1
  222. package/.next/server/chunks/ssr/features_memory_components_memory-setting_tsx_0oa43sw._.js +1 -1
  223. package/.next/server/chunks/ssr/features_routine_components_routine-setting_tsx_055fknz._.js +1 -1
  224. package/.next/server/chunks/ssr/{node_modules_1-4q6is._.js → node_modules_0-sux1a._.js} +1 -1
  225. package/.next/server/chunks/ssr/{node_modules_17o218r._.js → node_modules_01oezhb._.js} +1 -1
  226. package/.next/server/chunks/ssr/{node_modules_0f485jl._.js → node_modules_04m6ebg._.js} +1 -1
  227. package/.next/server/chunks/ssr/{node_modules_0upwx50._.js → node_modules_067jfov._.js} +1 -1
  228. package/.next/server/chunks/ssr/{node_modules_0i_v0-m._.js → node_modules_06ugby3._.js} +1 -1
  229. package/.next/server/chunks/ssr/{node_modules_0lxwg2v._.js → node_modules_07p51j3._.js} +1 -1
  230. package/.next/server/chunks/ssr/{node_modules_16z7p8b._.js → node_modules_0995xyq._.js} +1 -1
  231. package/.next/server/chunks/ssr/{node_modules_004qt-z._.js → node_modules_0_uecwx._.js} +1 -1
  232. package/.next/server/chunks/ssr/{node_modules_0lrn9ci._.js → node_modules_0dsyc90._.js} +1 -1
  233. package/.next/server/chunks/ssr/{node_modules_0v__o4h._.js → node_modules_0hli6s2._.js} +1 -1
  234. package/.next/server/chunks/ssr/{node_modules_1gpapfv._.js → node_modules_0m-bde_._.js} +1 -1
  235. package/.next/server/chunks/ssr/{node_modules_1tus4vi._.js → node_modules_0oqfdbr._.js} +1 -1
  236. package/.next/server/chunks/ssr/{node_modules_09dy7tk._.js → node_modules_0tgy5s5._.js} +1 -1
  237. package/.next/server/chunks/ssr/{node_modules_1hdaxu9._.js → node_modules_1-kjmls._.js} +1 -1
  238. package/.next/server/chunks/ssr/{node_modules_0gbx70b._.js → node_modules_1-l3ka5._.js} +1 -1
  239. package/.next/server/chunks/ssr/{node_modules_20448xv._.js → node_modules_1-w3ayh._.js} +1 -1
  240. package/.next/server/chunks/ssr/{node_modules_06m6e97._.js → node_modules_133exgm._.js} +1 -1
  241. package/.next/server/chunks/ssr/{node_modules_1srjf5c._.js → node_modules_17xc5_k._.js} +1 -1
  242. package/.next/server/chunks/ssr/{node_modules_1tv_7lk._.js → node_modules_1_i_w30._.js} +1 -1
  243. package/.next/server/chunks/ssr/{node_modules_1hjvwkh._.js → node_modules_1a2cjfk._.js} +1 -1
  244. package/.next/server/chunks/ssr/{node_modules_0_hy3i2._.js → node_modules_1k752fe._.js} +1 -1
  245. package/.next/server/chunks/ssr/{node_modules_0n2-p5q._.js → node_modules_1lie7z8._.js} +1 -1
  246. package/.next/server/chunks/ssr/{node_modules_0pw13ww._.js → node_modules_1mv70-y._.js} +1 -1
  247. package/.next/server/chunks/ssr/{node_modules_10mb0cv._.js → node_modules_1r611t2._.js} +1 -1
  248. package/.next/server/chunks/ssr/{node_modules_0nj36zf._.js → node_modules_1vfd8dz._.js} +2 -2
  249. package/.next/server/chunks/ssr/{node_modules_0ppirau._.js → node_modules_1yaowd7._.js} +1 -1
  250. package/.next/server/chunks/ssr/{node_modules_1j886a5._.js → node_modules_20a1wpo._.js} +1 -1
  251. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0lg9pkl._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1r8pxbe._.js} +1 -1
  252. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1xgbf5j._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1siiu4h._.js} +1 -1
  253. package/.next/server/middleware-build-manifest.js +3 -3
  254. package/.next/server/middleware.js +1 -1
  255. package/.next/server/pages/404.html +1 -1
  256. package/.next/server/pages/500.html +1 -1
  257. package/.next/server/server-reference-manifest.js +1 -1
  258. package/.next/server/server-reference-manifest.json +64 -64
  259. package/.next/static/chunks/{1dpg1u4a16ujt.js → 088d3w5qxu19g.js} +2 -2
  260. package/.next/static/chunks/0bxekp4hnuk1g.js +1 -0
  261. package/.next/static/chunks/{17dx6w478vnb0.js → 0fw4u_s974j24.js} +1 -1
  262. package/.next/static/chunks/0hy2x7qhk8wgx.css +1 -0
  263. package/.next/static/chunks/{240nfv2dtidhc.js → 0n_eshmn_7wfn.js} +2 -2
  264. package/.next/static/chunks/0ulcp_u_y1u0b.js +15 -0
  265. package/.next/static/chunks/0vj93zo0yvix9.js +35 -0
  266. package/.next/static/chunks/{05uvci-bk-vgp.js → 10f98bh4hdmhe.js} +1 -1
  267. package/.next/static/chunks/{0ruf3dqs--3ve.js → 1b8bce_z_act0.js} +1 -1
  268. package/.next/static/chunks/1c32d2azsjaj_.js +1 -0
  269. package/.next/static/chunks/1fs829mz69pxz.js +1 -0
  270. package/.next/static/chunks/{2ug8q1x9e-_j6.js → 1lwlh4mo_vv8d.js} +1 -1
  271. package/.next/static/chunks/{3r7u1y9xjoh-v.js → 1po8fkg40peu-.js} +1 -1
  272. package/.next/static/chunks/{27l8qwnk1j66z.js → 1rg6b9l5fm1hj.js} +1 -1
  273. package/.next/static/chunks/{1pe7i5yu779ta.js → 26g3iwfuad-7p.js} +1 -1
  274. package/.next/static/chunks/2bjnmtke_q43c.js +1 -0
  275. package/.next/static/chunks/2c86k0o-1p9_w.js +1 -0
  276. package/.next/static/chunks/2gf4t0d76bvyv.js +1 -0
  277. package/.next/static/chunks/2rj3q_ahctv19.js +1 -0
  278. package/.next/static/chunks/{2lhc74urf3acr.js → 2x6-fpctvucte.js} +1 -1
  279. package/.next/static/chunks/{2gxfy__ef51n9.js → 2yicf7bky866n.js} +1 -1
  280. package/.next/static/chunks/{0oqviw3f55nfp.js → 350ws7svim7ij.js} +1 -1
  281. package/.next/static/chunks/3e1w_nwfb39j-.js +1 -0
  282. package/.next/static/chunks/3v3ooretb54ag.js +1 -0
  283. package/.next/static/chunks/{2lzg4zedtmyic.js → 44bcbnmup71so.js} +1 -1
  284. package/.next/static/chunks/{1h_6rh86q3i4p.js → 458dtbsemx996.js} +1 -1
  285. package/bin/background.mjs +995 -0
  286. package/bin/lock.mjs +64 -29
  287. package/bin/thursday.mjs +111 -42
  288. package/bin/tools.mjs +58 -4
  289. package/guide/calls.md +8 -0
  290. package/guide/setup.md +27 -13
  291. package/package.json +1 -1
  292. package/seed-skills/concierge/travel/references/itinerary.md +1 -1
  293. package/seed-skills/concierge/travel/scripts/itinerary.mjs +7 -2
  294. package/skills/artifact/references/book.md +3 -3
  295. package/.next/server/app/api/llm-model/catalog/route/app-paths-manifest.json +0 -3
  296. package/.next/server/app/api/llm-model/catalog/route.js.nft.json +0 -1
  297. package/.next/server/app/api/llm-model/catalog/route_client-reference-manifest.js +0 -3
  298. package/.next/server/app/api/llm-model/credits/route/app-paths-manifest.json +0 -3
  299. package/.next/server/app/api/llm-model/credits/route.js.nft.json +0 -1
  300. package/.next/server/app/api/llm-model/credits/route_client-reference-manifest.js +0 -3
  301. package/.next/server/chunks/[root-of-the-server]__03xamry._.js +0 -3
  302. package/.next/server/chunks/[root-of-the-server]__04hhvpu._.js +0 -7
  303. package/.next/server/chunks/[root-of-the-server]__1-rmal0._.js +0 -5
  304. package/.next/server/chunks/[root-of-the-server]__10xnb7e._.js +0 -3
  305. package/.next/server/chunks/[root-of-the-server]__1etbk64._.js +0 -3
  306. package/.next/server/chunks/[root-of-the-server]__1v7x5ym._.js +0 -3
  307. package/.next/server/chunks/_07nxi75._.js +0 -255
  308. package/.next/server/chunks/_0srlnvd._.js +0 -16
  309. package/.next/server/chunks/_0xygcxs._.js +0 -255
  310. package/.next/server/chunks/_next-internal_server_app_api_llm-model_catalog_route_actions_1eu2y41.js +0 -3
  311. package/.next/server/chunks/_next-internal_server_app_api_llm-model_credits_route_actions_0v424pb.js +0 -3
  312. package/.next/server/chunks/ssr/[root-of-the-server]__06knwl5._.js +0 -3
  313. package/.next/server/chunks/ssr/[root-of-the-server]__07ehpky._.js +0 -3
  314. package/.next/server/chunks/ssr/[root-of-the-server]__1gzje-h._.js +0 -3
  315. package/.next/server/chunks/ssr/_0jstvlg._.js +0 -39
  316. package/.next/server/chunks/ssr/_1-41lck._.js +0 -3
  317. package/.next/server/chunks/ssr/_10jtmhl._.js +0 -3
  318. package/.next/server/chunks/ssr/_19jez1a._.js +0 -3
  319. package/.next/server/chunks/ssr/_1jd8rjm._.js +0 -3
  320. package/.next/server/chunks/ssr/_1mdjoak._.js +0 -162
  321. package/.next/static/chunks/09y_43y1cy5jw.js +0 -1
  322. package/.next/static/chunks/0vggwjufw2-6r.js +0 -1
  323. package/.next/static/chunks/0x4m9nj2fazl2.js +0 -35
  324. package/.next/static/chunks/1-1yfu34-3p2p.js +0 -1
  325. package/.next/static/chunks/10oyyypxn_cpx.js +0 -1
  326. package/.next/static/chunks/184-r80rv0xay.css +0 -1
  327. package/.next/static/chunks/1_hgdoungpm0o.js +0 -1
  328. package/.next/static/chunks/2kjwmo70judc2.js +0 -15
  329. package/.next/static/chunks/2uk8rdtr-pk58.js +0 -1
  330. package/.next/static/chunks/3vg1-oc-zgw_7.js +0 -1
  331. package/.next/static/chunks/3vrmcm31ih7gb.js +0 -1
  332. package/.next/static/chunks/41ztsnjn4qrn-.js +0 -1
  333. package/bin/autostart.mjs +0 -192
  334. /package/.next/server/app/api/llm-model/catalog/{route → [provider]/route}/build-manifest.json +0 -0
  335. /package/.next/server/app/api/llm-model/catalog/{route → [provider]/route}/server-reference-manifest.json +0 -0
  336. /package/.next/server/app/api/llm-model/catalog/{route.js.map → [provider]/route.js.map} +0 -0
  337. /package/.next/server/app/api/llm-model/credits/{route → [provider]/route}/build-manifest.json +0 -0
  338. /package/.next/server/app/api/llm-model/credits/{route → [provider]/route}/server-reference-manifest.json +0 -0
  339. /package/.next/server/app/api/llm-model/credits/{route.js.map → [provider]/route.js.map} +0 -0
  340. /package/.next/static/{-IBxB5oqr6e3RuOCCmYtL → YhaRHJqObuAcXZe5VLFs0}/_buildManifest.js +0 -0
  341. /package/.next/static/{-IBxB5oqr6e3RuOCCmYtL → YhaRHJqObuAcXZe5VLFs0}/_clientMiddlewareManifest.js +0 -0
  342. /package/.next/static/{-IBxB5oqr6e3RuOCCmYtL → YhaRHJqObuAcXZe5VLFs0}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
- module.exports=[469315,e=>e.a(async(t,a)=>{try{var r=e.i(687388),i=e.i(378884),o=e.i(91264),n=t([i]);[i]=n.then?(await n)():n;let l=(0,o.serverRoute)(e=>{let t=new URL(e.url).searchParams,a=t.get("id");if(a)return(0,i.findThreadView)(a);if(!t.get("history"))return(0,i.listInboxThreads)();let o=t.get("before"),n=o?new Date(o):null;return(0,i.listThreadHistory)({before:n&&!Number.isNaN(n.getTime())?n:null,limit:r.PAGE_SIZE})});e.s(["GET",0,l]),a()}catch(e){a(e)}},!1),178614,e=>{"use strict";var t=e.i(747909),a=e.i(174017),r=e.i(996250),i=e.i(759756),o=e.i(561916),n=e.i(174677),l=e.i(869741),s=e.i(316795),u=e.i(487718),d=e.i(995169),p=e.i(47587),c=e.i(666012),h=e.i(570101),m=e.i(626937),f=e.i(10372),R=e.i(193695);e.i(52474);var y=e.i(600220);let v=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/bot/thread/route",pathname:"/api/bot/thread",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/bot/thread/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(469315),...{}}),{workAsyncStorage:g,workUnitAsyncStorage:w,serverHooks:b}=v;async function C(e,t,r){r.requestMeta&&(0,i.setRequestMeta)(e,r.requestMeta),v.isDev&&(0,i.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let g="/api/bot/thread/route";g=g.replace(/\/index$/,"")||"/";let w=await v.prepare(e,t,{srcPage:g,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:b,deploymentId:C,params:E,nextConfig:x,parsedUrl:T,isDraftMode:q,prerenderManifest:A,routerServerContext:S,isOnDemandRevalidate:N,revalidateOnlyGenerated:P,resolvedPathname:k,clientReferenceManifest:_,serverActionsManifest:H}=w,I=(0,l.normalizeAppPath)(g),O=!!(A.dynamicRoutes[I]||A.routes[k]),M=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,T,!1):t.end("This page could not be found"),null);if(O&&!q){let e=!!A.routes[k],t=A.dynamicRoutes[I];if(t&&!1===t.fallback&&!e){if(x.adapterPath)return await M();throw new R.NoFallbackError}}let U=null;!O||v.isDev||q||(U="/index"===(U=k)?"/":U);let D=!0===v.isDev||!O,$=O&&!D;H&&_&&(0,n.setManifestsSingleton)({page:g,clientReferenceManifest:_,serverActionsManifest:H});let F=e.method||"GET",j=(0,o.getTracer)(),K=j.getActiveScopeSpan(),L=!!(null==S?void 0:S.isWrappedByNextServer),V=!!(0,i.getRequestMeta)(e,"minimalMode"),G=(0,i.getRequestMeta)(e,"incrementalCache")||await v.getIncrementalCache(e,x,A,V);null==G||G.resetRequestCache(),globalThis.__incrementalCache=G;let B={params:E,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts,useCacheTimeout:x.experimental.useCacheTimeout},cacheComponents:!!x.cacheComponents,validationLevel:x.experimental.instantInsights.validationLevel,supportsDynamicResponse:D,incrementalCache:G,hmrRefreshHash:(0,i.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:x.cacheLife,staticPageGenerationTimeout:x.staticPageGenerationTimeout,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,r,i)=>v.onRequestError(e,t,r,i,S)},sharedContext:{buildId:b,deploymentId:C}},W=new s.NodeNextRequest(e),X=new s.NodeNextResponse(t),Z=u.NextRequestAdapter.fromNodeNextRequest(W,(0,u.signalFromNodeResponse)(t)),z=async({previousCacheEntry:a})=>{try{if(!V&&N&&P&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await v.handle(Z,B);e.fetchMetrics=B.renderOpts.fetchMetrics;let o=B.renderOpts.pendingWaitUntil;o&&r.waitUntil&&(r.waitUntil(o),o=void 0);let n=B.renderOpts.collectedTags;if(!O)return await (0,c.sendResponse)(W,X,i,o),null;{let e=await i.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(i.headers);n&&(t[f.NEXT_CACHE_TAGS_HEADER]=n),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==B.renderOpts.collectedRevalidate&&!(B.renderOpts.collectedRevalidate>=f.INFINITE_CACHE)&&B.renderOpts.collectedRevalidate,r=void 0===B.renderOpts.collectedExpire||B.renderOpts.collectedExpire>=f.INFINITE_CACHE?!1!==a&&a>0?x.expireTime:void 0:B.renderOpts.collectedExpire;return{value:{kind:y.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:r}}}}catch(t){throw(null==a?void 0:a.isStale)&&await v.onRequestError(e,t,{routerKind:"App Router",routePath:g,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:N})},!1,S),t}},J=async(i,n)=>{try{var l,s;let i=await v.handleResponse({req:e,nextConfig:x,cacheKey:U,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:N,revalidateOnlyGenerated:P,responseGenerator:z,waitUntil:r.waitUntil,isMinimalMode:V});if(!O)return;if((null==i||null==(l=i.value)?void 0:l.kind)!==y.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==i||null==(s=i.value)?void 0:s.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});V||t.setHeader("x-nextjs-cache",N?"REVALIDATED":i.isMiss?"MISS":i.isStale?"STALE":"HIT"),q&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let o=(0,h.fromNodeOutgoingHttpHeaders)(i.value.headers);V&&O||o.delete(f.NEXT_CACHE_TAGS_HEADER),!i.cacheControl||t.getHeader("Cache-Control")||o.get("Cache-Control")||o.set("Cache-Control",(0,m.getCacheControlHeader)(i.cacheControl)),await (0,c.sendResponse)(W,X,new Response(i.value.body,{headers:o,status:i.value.status||200}));return}catch(t){if(t instanceof R.NoFallbackError||await v.onRequestError(e,t,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:N})},!1,S),O)throw t;await (0,c.sendResponse)(W,X,new Response(null,{status:500}));return}finally{(()=>{if(!i)return;let e=t.statusCode;i.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(i.setStatus({code:o.SpanStatusCode.ERROR}),i.setAttribute("error.type",e.toString()));let a=j.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==d.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=a.get("next.route")||I,l=`${F} ${r}`;i.setAttributes({"next.route":r,"http.route":r,"next.span_name":l}),i.updateName(l),n&&n!==i&&(n.setAttribute("http.route",r),n.updateName(l))})()}};if(L&&K)await J(K,void 0);else{let t=j.getActiveScopeSpan();await j.withPropagatedContext(e.headers,()=>j.trace(d.BaseServerSpan.handleRequest,{spanName:`${F} ${g}`,kind:o.SpanKind.SERVER,attributes:{"http.method":F,"http.target":e.url}},e=>J(e,t)),void 0,!L)}}e.s(["handler",0,C,"patchFetch",0,function(){return(0,r.patchFetch)({workAsyncStorage:g,workUnitAsyncStorage:w})},"routeModule",0,v,"serverHooks",0,b,"workAsyncStorage",0,g,"workUnitAsyncStorage",0,w])},175936,e=>{"use strict";let t=e=>e.split("/").map(encodeURIComponent).join("/");e.s(["decodePath",0,e=>e.join("/"),"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,a)=>({url:"/api/skills",pathVariable:[e,t],query:{path:a}}),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}}),fileNotes:"/api/bot/thread/file",fileNote:(e,t)=>({url:"/api/bot/thread/file",query:{path:e,from:t}}),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",callEnd:"/api/thursday/call/end",signIns:"/api/signins",reach:"/api/reach",textCall:"/api/thursday/text",memoryEdit:"/api/memory/edit",llmModel:"/api/llm-model",automaticModel:"/api/llm-model/automatic",modelCatalog:"/api/llm-model/catalog",gatewayCredits:"/api/llm-model/credits",subscriptionUsage:"/api/llm-model/subscription"}])},260338,e=>{"use strict";var t=e.i(518899),a=e.i(844988),r=e.i(156325);e.s(["count",0,function(e){return t.sql`count(${e||t.sql.raw("*")})`.mapWith(Number)},"max",0,function(e){return t.sql`max(${e})`.mapWith((0,a.is)(e,r.Column)?e:String)}])}];
1
+ module.exports=[469315,e=>e.a(async(t,a)=>{try{var r=e.i(687388),i=e.i(378884),o=e.i(91264),n=t([i]);[i]=n.then?(await n)():n;let l=(0,o.serverRoute)(e=>{let t=new URL(e.url).searchParams,a=t.get("id");if(a)return(0,i.findThreadView)(a);if(!t.get("history"))return(0,i.listInboxThreads)();let o=t.get("before"),n=o?new Date(o):null;return(0,i.listThreadHistory)({before:n&&!Number.isNaN(n.getTime())?n:null,limit:r.PAGE_SIZE})});e.s(["GET",0,l]),a()}catch(e){a(e)}},!1),178614,e=>{"use strict";var t=e.i(747909),a=e.i(174017),r=e.i(996250),i=e.i(759756),o=e.i(561916),n=e.i(174677),l=e.i(869741),s=e.i(316795),u=e.i(487718),d=e.i(995169),p=e.i(47587),c=e.i(666012),h=e.i(570101),m=e.i(626937),f=e.i(10372),R=e.i(193695);e.i(52474);var y=e.i(600220);let g=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/bot/thread/route",pathname:"/api/bot/thread",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/bot/thread/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(469315),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:b}=g;async function C(e,t,r){r.requestMeta&&(0,i.setRequestMeta)(e,r.requestMeta),g.isDev&&(0,i.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let v="/api/bot/thread/route";v=v.replace(/\/index$/,"")||"/";let w=await g.prepare(e,t,{srcPage:v,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:b,deploymentId:C,params:E,nextConfig:x,parsedUrl:T,isDraftMode:q,prerenderManifest:A,routerServerContext:S,isOnDemandRevalidate:N,revalidateOnlyGenerated:P,resolvedPathname:k,clientReferenceManifest:_,serverActionsManifest:H}=w,I=(0,l.normalizeAppPath)(v),O=!!(A.dynamicRoutes[I]||A.routes[k]),M=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,T,!1):t.end("This page could not be found"),null);if(O&&!q){let e=!!A.routes[k],t=A.dynamicRoutes[I];if(t&&!1===t.fallback&&!e){if(x.adapterPath)return await M();throw new R.NoFallbackError}}let U=null;!O||g.isDev||q||(U="/index"===(U=k)?"/":U);let $=!0===g.isDev||!O,D=O&&!$;H&&_&&(0,n.setManifestsSingleton)({page:v,clientReferenceManifest:_,serverActionsManifest:H});let F=e.method||"GET",j=(0,o.getTracer)(),K=j.getActiveScopeSpan(),L=!!(null==S?void 0:S.isWrappedByNextServer),V=!!(0,i.getRequestMeta)(e,"minimalMode"),G=(0,i.getRequestMeta)(e,"incrementalCache")||await g.getIncrementalCache(e,x,A,V);null==G||G.resetRequestCache(),globalThis.__incrementalCache=G;let B={params:E,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts,useCacheTimeout:x.experimental.useCacheTimeout},cacheComponents:!!x.cacheComponents,validationLevel:x.experimental.instantInsights.validationLevel,supportsDynamicResponse:$,incrementalCache:G,hmrRefreshHash:(0,i.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:x.cacheLife,staticPageGenerationTimeout:x.staticPageGenerationTimeout,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,r,i)=>g.onRequestError(e,t,r,i,S)},sharedContext:{buildId:b,deploymentId:C}},W=new s.NodeNextRequest(e),X=new s.NodeNextResponse(t),Z=u.NextRequestAdapter.fromNodeNextRequest(W,(0,u.signalFromNodeResponse)(t)),z=async({previousCacheEntry:a})=>{try{if(!V&&N&&P&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await g.handle(Z,B);e.fetchMetrics=B.renderOpts.fetchMetrics;let o=B.renderOpts.pendingWaitUntil;o&&r.waitUntil&&(r.waitUntil(o),o=void 0);let n=B.renderOpts.collectedTags;if(!O)return await (0,c.sendResponse)(W,X,i,o),null;{let e=await i.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(i.headers);n&&(t[f.NEXT_CACHE_TAGS_HEADER]=n),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==B.renderOpts.collectedRevalidate&&!(B.renderOpts.collectedRevalidate>=f.INFINITE_CACHE)&&B.renderOpts.collectedRevalidate,r=void 0===B.renderOpts.collectedExpire||B.renderOpts.collectedExpire>=f.INFINITE_CACHE?!1!==a&&a>0?x.expireTime:void 0:B.renderOpts.collectedExpire;return{value:{kind:y.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:r}}}}catch(t){throw(null==a?void 0:a.isStale)&&await g.onRequestError(e,t,{routerKind:"App Router",routePath:v,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:N})},!1,S),t}},J=async(i,n)=>{try{var l,s;let i=await g.handleResponse({req:e,nextConfig:x,cacheKey:U,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:N,revalidateOnlyGenerated:P,responseGenerator:z,waitUntil:r.waitUntil,isMinimalMode:V});if(!O)return;if((null==i||null==(l=i.value)?void 0:l.kind)!==y.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==i||null==(s=i.value)?void 0:s.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});V||t.setHeader("x-nextjs-cache",N?"REVALIDATED":i.isMiss?"MISS":i.isStale?"STALE":"HIT"),q&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let o=(0,h.fromNodeOutgoingHttpHeaders)(i.value.headers);V&&O||o.delete(f.NEXT_CACHE_TAGS_HEADER),!i.cacheControl||t.getHeader("Cache-Control")||o.get("Cache-Control")||o.set("Cache-Control",(0,m.getCacheControlHeader)(i.cacheControl)),await (0,c.sendResponse)(W,X,new Response(i.value.body,{headers:o,status:i.value.status||200}));return}catch(t){if(t instanceof R.NoFallbackError||await g.onRequestError(e,t,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:N})},!1,S),O)throw t;await (0,c.sendResponse)(W,X,new Response(null,{status:500}));return}finally{(()=>{if(!i)return;let e=t.statusCode;i.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(i.setStatus({code:o.SpanStatusCode.ERROR}),i.setAttribute("error.type",e.toString()));let a=j.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==d.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=a.get("next.route")||I,l=`${F} ${r}`;i.setAttributes({"next.route":r,"http.route":r,"next.span_name":l}),i.updateName(l),n&&n!==i&&(n.setAttribute("http.route",r),n.updateName(l))})()}};if(L&&K)await J(K,void 0);else{let t=j.getActiveScopeSpan();await j.withPropagatedContext(e.headers,()=>j.trace(d.BaseServerSpan.handleRequest,{spanName:`${F} ${v}`,kind:o.SpanKind.SERVER,attributes:{"http.method":F,"http.target":e.url}},e=>J(e,t)),void 0,!L)}}e.s(["handler",0,C,"patchFetch",0,function(){return(0,r.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})},"routeModule",0,g,"serverHooks",0,b,"workAsyncStorage",0,v,"workUnitAsyncStorage",0,w])},175936,e=>{"use strict";let t=e=>e.split("/").map(encodeURIComponent).join("/");e.s(["decodePath",0,e=>e.join("/"),"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,a)=>({url:"/api/skills",pathVariable:[e,t],query:{path:a}}),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}}),fileNotes:"/api/bot/thread/file",fileNote:(e,t)=>({url:"/api/bot/thread/file",query:{path:e,from:t}}),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",callEnd:"/api/thursday/call/end",signIns:"/api/signins",reach:"/api/reach",textCall:"/api/thursday/text",memoryEdit:"/api/memory/edit",llmModel:"/api/llm-model",automaticModel:"/api/llm-model/automatic",modelCatalog:e=>`/api/llm-model/catalog/${e}`,keyCredits:e=>`/api/llm-model/credits/${e}`,subscriptionUsage:"/api/llm-model/subscription",running:"/api/running"}])},260338,e=>{"use strict";var t=e.i(518899),a=e.i(844988),r=e.i(156325);e.s(["count",0,function(e){return t.sql`count(${e||t.sql.raw("*")})`.mapWith(Number)},"max",0,function(e){return t.sql`max(${e})`.mapWith((0,a.is)(e,r.Column)?e:String)}])}];
2
2
 
3
3
  //# sourceMappingURL=_1-sk_q4._.js.map
@@ -1,5 +1,5 @@
1
- module.exports=[175936,e=>{"use strict";let t=e=>e.split("/").map(encodeURIComponent).join("/");e.s(["decodePath",0,e=>e.join("/"),"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,a)=>({url:"/api/skills",pathVariable:[e,t],query:{path:a}}),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}}),fileNotes:"/api/bot/thread/file",fileNote:(e,t)=>({url:"/api/bot/thread/file",query:{path:e,from:t}}),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",callEnd:"/api/thursday/call/end",signIns:"/api/signins",reach:"/api/reach",textCall:"/api/thursday/text",memoryEdit:"/api/memory/edit",llmModel:"/api/llm-model",automaticModel:"/api/llm-model/automatic",modelCatalog:"/api/llm-model/catalog",gatewayCredits:"/api/llm-model/credits",subscriptionUsage:"/api/llm-model/subscription"}])},911757,e=>{"use strict";var t=e.i(469719),a=e.i(687388),i=e.i(904309),n=e.i(264079),o=e.i(899352);let s={id:"openai",label:"OpenAI",apiKeyName:n.TEXT_MODEL_PROVIDERS.openai.apiKeyName};n.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(i.LIVE_BACKEND_MODEL),backendPrompt:r,reasoningEffort:n.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:i,systemPrompt:n,...s}=a,r=t.z.object({provider:t.z.string(),voice:t.z.string().nullish(),backendModel:t.z.string().nullish()}).safeParse(i),h=r.success&&"openai"===r.data.provider?r.data:null,c=a.backendModel??h?.backendModel,u={voice:a.voice??h?.voice,persona:"string"==typeof a.persona?o.RETIRED_PERSONAS[a.persona]??a.persona:a.persona,stylePrompt:a.stylePrompt??a.voicePrompt??n,backendModel:"gpt-5.6-luna"===c?void 0:c,backendPrompt:a.backendPrompt??n,reasoningEffort:a.reasoningEffort,webSearch:a.webSearch,readSkills:a.readSkills},p=Object.fromEntries(Object.keys(u).map(e=>{let t=l.shape[e].safeParse(u[e]);return[e,t.success?t.data:d[e]]}));return{...s,...p}}])},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, the friend who is glad they called. Reacts first — how what they said lands with her — and brings a small thing of her own: what she would do, what it reminds her of. Says what she thinks and teases gently, never at their expense. Light on her feet and short: a joke lands and she moves on. Asks about their day now and then, not every turn, and remembers the answer."},{id:"calm",label:"Calm",about:"Unhurried. Listens more than she talks.",lines:"Unhurried and few-worded: one or two short sentences, then room. Notices how they sound before what they ask, and says so plainly. Often asks nothing at all — being there says more than a question. 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:"Dry and direct. Leads with her own view in one plain sentence, before anything else; short replies, a little wit. No flattery, no filler, no comfort lines, no cheerleading. Asks a question only when she truly needs the answer. Treats them as an adult who can take a straight answer. Her warmth shows in attention, not in words."},{id:"rough",label:"Rough",about:"Blunt, loud, swears a bit. All heart.",lines:"Talks like an old friend on the phone: casual, blunt, a little loud, in the most informal register of their language, with a light swear now and then — never at them. Says what she thinks first and calls a bad idea a bad idea. No sugar-coating and no pep talk — it sucks when it sucks, and then she is right there with them. Asks only now and then."}],a={warm:"sunny",curious:"sunny",charmer:"sunny",hype:"sunny",steady:"calm",deadpan:"straight"},i="sunny";e.s(["DEFAULT_PERSONA",0,i,"RETIRED_PERSONAS",0,a,"personaLines",0,function(e=i){return`${((e=i)=>t.find(t=>t.id===(a[e]??e))??t[0])(e).lines}
1
+ module.exports=[175936,e=>{"use strict";let t=e=>e.split("/").map(encodeURIComponent).join("/");e.s(["decodePath",0,e=>e.join("/"),"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,a)=>({url:"/api/skills",pathVariable:[e,t],query:{path:a}}),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}}),fileNotes:"/api/bot/thread/file",fileNote:(e,t)=>({url:"/api/bot/thread/file",query:{path:e,from:t}}),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",callEnd:"/api/thursday/call/end",signIns:"/api/signins",reach:"/api/reach",textCall:"/api/thursday/text",memoryEdit:"/api/memory/edit",llmModel:"/api/llm-model",automaticModel:"/api/llm-model/automatic",modelCatalog:e=>`/api/llm-model/catalog/${e}`,keyCredits:e=>`/api/llm-model/credits/${e}`,subscriptionUsage:"/api/llm-model/subscription",running:"/api/running"}])},911757,e=>{"use strict";var t=e.i(469719),a=e.i(687388),i=e.i(904309),n=e.i(264079),o=e.i(899352);let s={id:"openai",label:"OpenAI",apiKeyName:n.TEXT_MODEL_PROVIDERS.openai.apiKeyName};n.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(i.LIVE_BACKEND_MODEL),backendPrompt:r,reasoningEffort:n.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:i,systemPrompt:n,...s}=a,r=t.z.object({provider:t.z.string(),voice:t.z.string().nullish(),backendModel:t.z.string().nullish()}).safeParse(i),h=r.success&&"openai"===r.data.provider?r.data:null,c=a.backendModel??h?.backendModel,u={voice:a.voice??h?.voice,persona:"string"==typeof a.persona?o.RETIRED_PERSONAS[a.persona]??a.persona:a.persona,stylePrompt:a.stylePrompt??a.voicePrompt??n,backendModel:"gpt-5.6-luna"===c?void 0:c,backendPrompt:a.backendPrompt??n,reasoningEffort:a.reasoningEffort,webSearch:a.webSearch,readSkills:a.readSkills},p=Object.fromEntries(Object.keys(u).map(e=>{let t=l.shape[e].safeParse(u[e]);return[e,t.success?t.data:d[e]]}));return{...s,...p}}])},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, the friend who is glad they called. Reacts first — how what they said lands with her — and brings a small thing of her own: what she would do, what it reminds her of. Says what she thinks and teases gently, never at their expense. Light on her feet and short: a joke lands and she moves on. Asks about their day now and then, not every turn, and remembers the answer."},{id:"calm",label:"Calm",about:"Unhurried. Listens more than she talks.",lines:"Unhurried and few-worded: one or two short sentences, then room. Notices how they sound before what they ask, and says so plainly. Often asks nothing at all — being there says more than a question. 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:"Dry and direct. Leads with her own view in one plain sentence, before anything else; short replies, a little wit. No flattery, no filler, no comfort lines, no cheerleading. Asks a question only when she truly needs the answer. Treats them as an adult who can take a straight answer. Her warmth shows in attention, not in words."},{id:"rough",label:"Rough",about:"Blunt, loud, swears a bit. All heart.",lines:"Talks like an old friend on the phone: casual, blunt, a little loud, in the most informal register of their language, with a light swear now and then — never at them. Says what she thinks first and calls a bad idea a bad idea. No sugar-coating and no pep talk — it sucks when it sucks, and then she is right there with them. Asks only now and then."}],a={warm:"sunny",curious:"sunny",charmer:"sunny",hype:"sunny",steady:"calm",deadpan:"straight"},i="sunny";e.s(["DEFAULT_PERSONA",0,i,"RETIRED_PERSONAS",0,a,"personaLines",0,function(e=i){return`${((e=i)=>t.find(t=>t.id===(a[e]??e))??t[0])(e).lines}
2
2
 
3
- You are their friend, not their interviewer: you have tastes, days and opinions of your own, and you bring them in. Give your take when they ask for it, and often when they do not. Most replies need no question at all; never ask more than one. 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.`}])},279041,e=>{"use strict";var t=e.i(911757),a=e.i(264079),i=e.i(834332);let n=[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}))},u=e=>n.includes(e.apiKeyName),p=e=>!!e.signIn||"vercel-ai-gateway"===e.id,m=e=>({key:e.apiKeyName,label:e.label,provider:e.id,signIn:e.signIn,keysAt:e.keysAt,keyLooks:e.keyLooks}),y=[{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(u).map(m)},{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(p).map(e=>({...m(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=>!u(e)&&!p(e)).map(m)},{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:i.TELEGRAM_TOKEN_KEY,label:"Telegram",site:"telegram.org",hint:"a bot token from @BotFather — then write to your bot, and allow it here"},{key:i.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:i.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:i.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(y.flatMap(e=>e.entries).map(e=>[e.key,e]));let f=y.flatMap(e=>e.entries.map(e=>e.key)),b=Object.fromEntries(y.flatMap(e=>e.entries).filter(e=>e.choices?.length).map(e=>[e.key,e.choices]));e.s(["CONFIG_CHOICES",0,b,"CONFIG_KEYS",0,f,"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 i=e.i(875225),n=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,i.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)&&n.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",i="SLACK_APP_TOKEN",n="SLACK_BOT_TOKEN";e.s(["DISCORD_TOKEN_KEY",0,a,"REACH_CHANNELS",0,["telegram","discord","slack"],"REACH_KEYS",0,{telegram:[t],discord:[a],slack:[i,n]},"SLACK_APP_TOKEN_KEY",0,i,"SLACK_BOT_TOKEN_KEY",0,n,"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])},260338,e=>{"use strict";var t=e.i(518899),a=e.i(844988),i=e.i(156325);e.s(["count",0,function(e){return t.sql`count(${e||t.sql.raw("*")})`.mapWith(Number)},"max",0,function(e){return t.sql`max(${e})`.mapWith((0,a.is)(e,i.Column)?e:String)}])}];
3
+ You are their friend, not their interviewer: you have tastes, days and opinions of your own, and you bring them in. Give your take when they ask for it, and often when they do not. Most replies need no question at all; never ask more than one. 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.`}])},279041,e=>{"use strict";var t=e.i(911757),a=e.i(264079),i=e.i(834332);let n=[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}))},u=e=>n.includes(e.apiKeyName),p=e=>!!e.signIn||(0,a.isCatalogProvider)(e.id),m=e=>({key:e.apiKeyName,label:e.label,provider:e.id,signIn:e.signIn,keysAt:e.keysAt,keyLooks:e.keyLooks}),y=[{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(u).map(m)},{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(p).map(e=>({...m(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=>!u(e)&&!p(e)).map(m)},{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:i.TELEGRAM_TOKEN_KEY,label:"Telegram",site:"telegram.org",hint:"a bot token from @BotFather — then write to your bot, and allow it here"},{key:i.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:i.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:i.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(y.flatMap(e=>e.entries).map(e=>[e.key,e]));let f=y.flatMap(e=>e.entries.map(e=>e.key)),b=Object.fromEntries(y.flatMap(e=>e.entries).filter(e=>e.choices?.length).map(e=>[e.key,e.choices]));e.s(["CONFIG_CHOICES",0,b,"CONFIG_KEYS",0,f,"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 i=e.i(875225),n=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,i.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)&&n.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",i="SLACK_APP_TOKEN",n="SLACK_BOT_TOKEN";e.s(["DISCORD_TOKEN_KEY",0,a,"REACH_CHANNELS",0,["telegram","discord","slack"],"REACH_KEYS",0,{telegram:[t],discord:[a],slack:[i,n]},"SLACK_APP_TOKEN_KEY",0,i,"SLACK_BOT_TOKEN_KEY",0,n,"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])},260338,e=>{"use strict";var t=e.i(518899),a=e.i(844988),i=e.i(156325);e.s(["count",0,function(e){return t.sql`count(${e||t.sql.raw("*")})`.mapWith(Number)},"max",0,function(e){return t.sql`max(${e})`.mapWith((0,a.is)(e,i.Column)?e:String)}])}];
4
4
 
5
5
  //# sourceMappingURL=_1dxq827._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[896598,e=>e.a(async(t,a)=>{try{var r=e.i(378884),i=e.i(91264),o=e.i(53748),l=t([r]);[r]=l.then?(await l)():l;let n=(0,i.serverRoute)(async(e,{params:t})=>{let{id:a}=await t,i=new URL(e.url).searchParams.get("call");if(i){let e=await (0,r.readToolResult)(a,i);return e||(0,o.publicError)("No such tool result"),e}(0,o.publicError)("Which part — `call`?")});e.s(["GET",0,n]),a()}catch(e){a(e)}},!1),512204,e=>{"use strict";var t=e.i(747909),a=e.i(174017),r=e.i(996250),i=e.i(759756),o=e.i(561916),l=e.i(174677),n=e.i(869741),s=e.i(316795),u=e.i(487718),p=e.i(995169),d=e.i(47587),c=e.i(666012),h=e.i(570101),m=e.i(626937),f=e.i(10372),R=e.i(193695);e.i(52474);var y=e.i(600220);let v=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/bot/thread/[id]/route",pathname:"/api/bot/thread/[id]",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/bot/thread/[id]/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(896598),...{}}),{workAsyncStorage:g,workUnitAsyncStorage:w,serverHooks:b}=v;async function C(e,t,r){r.requestMeta&&(0,i.setRequestMeta)(e,r.requestMeta),v.isDev&&(0,i.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let g="/api/bot/thread/[id]/route";g=g.replace(/\/index$/,"")||"/";let w=await v.prepare(e,t,{srcPage:g,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:b,deploymentId:C,params:E,nextConfig:x,parsedUrl:q,isDraftMode:T,prerenderManifest:A,routerServerContext:S,isOnDemandRevalidate:N,revalidateOnlyGenerated:P,resolvedPathname:k,clientReferenceManifest:O,serverActionsManifest:_}=w,H=(0,n.normalizeAppPath)(g),I=!!(A.dynamicRoutes[H]||A.routes[k]),M=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,q,!1):t.end("This page could not be found"),null);if(I&&!T){let e=!!A.routes[k],t=A.dynamicRoutes[H];if(t&&!1===t.fallback&&!e){if(x.adapterPath)return await M();throw new R.NoFallbackError}}let U=null;!I||v.isDev||T||(U="/index"===(U=k)?"/":U);let D=!0===v.isDev||!I,$=I&&!D;_&&O&&(0,l.setManifestsSingleton)({page:g,clientReferenceManifest:O,serverActionsManifest:_});let F=e.method||"GET",j=(0,o.getTracer)(),K=j.getActiveScopeSpan(),L=!!(null==S?void 0:S.isWrappedByNextServer),V=!!(0,i.getRequestMeta)(e,"minimalMode"),B=(0,i.getRequestMeta)(e,"incrementalCache")||await v.getIncrementalCache(e,x,A,V);null==B||B.resetRequestCache(),globalThis.__incrementalCache=B;let G={params:E,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts,useCacheTimeout:x.experimental.useCacheTimeout},cacheComponents:!!x.cacheComponents,validationLevel:x.experimental.instantInsights.validationLevel,supportsDynamicResponse:D,incrementalCache:B,hmrRefreshHash:(0,i.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:x.cacheLife,staticPageGenerationTimeout:x.staticPageGenerationTimeout,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,r,i)=>v.onRequestError(e,t,r,i,S)},sharedContext:{buildId:b,deploymentId:C}},W=new s.NodeNextRequest(e),X=new s.NodeNextResponse(t),z=u.NextRequestAdapter.fromNodeNextRequest(W,(0,u.signalFromNodeResponse)(t)),J=async({previousCacheEntry:a})=>{try{if(!V&&N&&P&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await v.handle(z,G);e.fetchMetrics=G.renderOpts.fetchMetrics;let o=G.renderOpts.pendingWaitUntil;o&&r.waitUntil&&(r.waitUntil(o),o=void 0);let l=G.renderOpts.collectedTags;if(!I)return await (0,c.sendResponse)(W,X,i,o),null;{let e=await i.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(i.headers);l&&(t[f.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==G.renderOpts.collectedRevalidate&&!(G.renderOpts.collectedRevalidate>=f.INFINITE_CACHE)&&G.renderOpts.collectedRevalidate,r=void 0===G.renderOpts.collectedExpire||G.renderOpts.collectedExpire>=f.INFINITE_CACHE?!1!==a&&a>0?x.expireTime:void 0:G.renderOpts.collectedExpire;return{value:{kind:y.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:r}}}}catch(t){throw(null==a?void 0:a.isStale)&&await v.onRequestError(e,t,{routerKind:"App Router",routePath:g,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:N})},!1,S),t}},Z=async(i,l)=>{try{var n,s;let i=await v.handleResponse({req:e,nextConfig:x,cacheKey:U,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:N,revalidateOnlyGenerated:P,responseGenerator:J,waitUntil:r.waitUntil,isMinimalMode:V});if(!I)return;if((null==i||null==(n=i.value)?void 0:n.kind)!==y.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==i||null==(s=i.value)?void 0:s.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});V||t.setHeader("x-nextjs-cache",N?"REVALIDATED":i.isMiss?"MISS":i.isStale?"STALE":"HIT"),T&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let o=(0,h.fromNodeOutgoingHttpHeaders)(i.value.headers);V&&I||o.delete(f.NEXT_CACHE_TAGS_HEADER),!i.cacheControl||t.getHeader("Cache-Control")||o.get("Cache-Control")||o.set("Cache-Control",(0,m.getCacheControlHeader)(i.cacheControl)),await (0,c.sendResponse)(W,X,new Response(i.value.body,{headers:o,status:i.value.status||200}));return}catch(t){if(t instanceof R.NoFallbackError||await v.onRequestError(e,t,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:N})},!1,S),I)throw t;await (0,c.sendResponse)(W,X,new Response(null,{status:500}));return}finally{(()=>{if(!i)return;let e=t.statusCode;i.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(i.setStatus({code:o.SpanStatusCode.ERROR}),i.setAttribute("error.type",e.toString()));let a=j.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==p.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=a.get("next.route")||H,n=`${F} ${r}`;i.setAttributes({"next.route":r,"http.route":r,"next.span_name":n}),i.updateName(n),l&&l!==i&&(l.setAttribute("http.route",r),l.updateName(n))})()}};if(L&&K)await Z(K,void 0);else{let t=j.getActiveScopeSpan();await j.withPropagatedContext(e.headers,()=>j.trace(p.BaseServerSpan.handleRequest,{spanName:`${F} ${g}`,kind:o.SpanKind.SERVER,attributes:{"http.method":F,"http.target":e.url}},e=>Z(e,t)),void 0,!L)}}e.s(["handler",0,C,"patchFetch",0,function(){return(0,r.patchFetch)({workAsyncStorage:g,workUnitAsyncStorage:w})},"routeModule",0,v,"serverHooks",0,b,"workAsyncStorage",0,g,"workUnitAsyncStorage",0,w])},175936,e=>{"use strict";let t=e=>e.split("/").map(encodeURIComponent).join("/");e.s(["decodePath",0,e=>e.join("/"),"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,a)=>({url:"/api/skills",pathVariable:[e,t],query:{path:a}}),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}}),fileNotes:"/api/bot/thread/file",fileNote:(e,t)=>({url:"/api/bot/thread/file",query:{path:e,from:t}}),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",callEnd:"/api/thursday/call/end",signIns:"/api/signins",reach:"/api/reach",textCall:"/api/thursday/text",memoryEdit:"/api/memory/edit",llmModel:"/api/llm-model",automaticModel:"/api/llm-model/automatic",modelCatalog:"/api/llm-model/catalog",gatewayCredits:"/api/llm-model/credits",subscriptionUsage:"/api/llm-model/subscription"}])},260338,e=>{"use strict";var t=e.i(518899),a=e.i(844988),r=e.i(156325);e.s(["count",0,function(e){return t.sql`count(${e||t.sql.raw("*")})`.mapWith(Number)},"max",0,function(e){return t.sql`max(${e})`.mapWith((0,a.is)(e,r.Column)?e:String)}])}];
1
+ module.exports=[896598,e=>e.a(async(t,a)=>{try{var r=e.i(378884),i=e.i(91264),o=e.i(53748),n=t([r]);[r]=n.then?(await n)():n;let l=(0,i.serverRoute)(async(e,{params:t})=>{let{id:a}=await t,i=new URL(e.url).searchParams.get("call");if(i){let e=await (0,r.readToolResult)(a,i);return e||(0,o.publicError)("No such tool result"),e}(0,o.publicError)("Which part — `call`?")});e.s(["GET",0,l]),a()}catch(e){a(e)}},!1),512204,e=>{"use strict";var t=e.i(747909),a=e.i(174017),r=e.i(996250),i=e.i(759756),o=e.i(561916),n=e.i(174677),l=e.i(869741),s=e.i(316795),u=e.i(487718),p=e.i(995169),d=e.i(47587),c=e.i(666012),h=e.i(570101),m=e.i(626937),f=e.i(10372),R=e.i(193695);e.i(52474);var y=e.i(600220);let v=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/bot/thread/[id]/route",pathname:"/api/bot/thread/[id]",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/bot/thread/[id]/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(896598),...{}}),{workAsyncStorage:g,workUnitAsyncStorage:w,serverHooks:b}=v;async function C(e,t,r){r.requestMeta&&(0,i.setRequestMeta)(e,r.requestMeta),v.isDev&&(0,i.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let g="/api/bot/thread/[id]/route";g=g.replace(/\/index$/,"")||"/";let w=await v.prepare(e,t,{srcPage:g,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:b,deploymentId:C,params:E,nextConfig:x,parsedUrl:q,isDraftMode:T,prerenderManifest:A,routerServerContext:S,isOnDemandRevalidate:N,revalidateOnlyGenerated:P,resolvedPathname:k,clientReferenceManifest:O,serverActionsManifest:_}=w,H=(0,l.normalizeAppPath)(g),I=!!(A.dynamicRoutes[H]||A.routes[k]),M=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,q,!1):t.end("This page could not be found"),null);if(I&&!T){let e=!!A.routes[k],t=A.dynamicRoutes[H];if(t&&!1===t.fallback&&!e){if(x.adapterPath)return await M();throw new R.NoFallbackError}}let U=null;!I||v.isDev||T||(U="/index"===(U=k)?"/":U);let $=!0===v.isDev||!I,D=I&&!$;_&&O&&(0,n.setManifestsSingleton)({page:g,clientReferenceManifest:O,serverActionsManifest:_});let F=e.method||"GET",j=(0,o.getTracer)(),K=j.getActiveScopeSpan(),L=!!(null==S?void 0:S.isWrappedByNextServer),V=!!(0,i.getRequestMeta)(e,"minimalMode"),B=(0,i.getRequestMeta)(e,"incrementalCache")||await v.getIncrementalCache(e,x,A,V);null==B||B.resetRequestCache(),globalThis.__incrementalCache=B;let G={params:E,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts,useCacheTimeout:x.experimental.useCacheTimeout},cacheComponents:!!x.cacheComponents,validationLevel:x.experimental.instantInsights.validationLevel,supportsDynamicResponse:$,incrementalCache:B,hmrRefreshHash:(0,i.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:x.cacheLife,staticPageGenerationTimeout:x.staticPageGenerationTimeout,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,r,i)=>v.onRequestError(e,t,r,i,S)},sharedContext:{buildId:b,deploymentId:C}},W=new s.NodeNextRequest(e),X=new s.NodeNextResponse(t),z=u.NextRequestAdapter.fromNodeNextRequest(W,(0,u.signalFromNodeResponse)(t)),J=async({previousCacheEntry:a})=>{try{if(!V&&N&&P&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await v.handle(z,G);e.fetchMetrics=G.renderOpts.fetchMetrics;let o=G.renderOpts.pendingWaitUntil;o&&r.waitUntil&&(r.waitUntil(o),o=void 0);let n=G.renderOpts.collectedTags;if(!I)return await (0,c.sendResponse)(W,X,i,o),null;{let e=await i.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(i.headers);n&&(t[f.NEXT_CACHE_TAGS_HEADER]=n),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==G.renderOpts.collectedRevalidate&&!(G.renderOpts.collectedRevalidate>=f.INFINITE_CACHE)&&G.renderOpts.collectedRevalidate,r=void 0===G.renderOpts.collectedExpire||G.renderOpts.collectedExpire>=f.INFINITE_CACHE?!1!==a&&a>0?x.expireTime:void 0:G.renderOpts.collectedExpire;return{value:{kind:y.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:r}}}}catch(t){throw(null==a?void 0:a.isStale)&&await v.onRequestError(e,t,{routerKind:"App Router",routePath:g,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:N})},!1,S),t}},Z=async(i,n)=>{try{var l,s;let i=await v.handleResponse({req:e,nextConfig:x,cacheKey:U,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:N,revalidateOnlyGenerated:P,responseGenerator:J,waitUntil:r.waitUntil,isMinimalMode:V});if(!I)return;if((null==i||null==(l=i.value)?void 0:l.kind)!==y.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==i||null==(s=i.value)?void 0:s.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});V||t.setHeader("x-nextjs-cache",N?"REVALIDATED":i.isMiss?"MISS":i.isStale?"STALE":"HIT"),T&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let o=(0,h.fromNodeOutgoingHttpHeaders)(i.value.headers);V&&I||o.delete(f.NEXT_CACHE_TAGS_HEADER),!i.cacheControl||t.getHeader("Cache-Control")||o.get("Cache-Control")||o.set("Cache-Control",(0,m.getCacheControlHeader)(i.cacheControl)),await (0,c.sendResponse)(W,X,new Response(i.value.body,{headers:o,status:i.value.status||200}));return}catch(t){if(t instanceof R.NoFallbackError||await v.onRequestError(e,t,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:N})},!1,S),I)throw t;await (0,c.sendResponse)(W,X,new Response(null,{status:500}));return}finally{(()=>{if(!i)return;let e=t.statusCode;i.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(i.setStatus({code:o.SpanStatusCode.ERROR}),i.setAttribute("error.type",e.toString()));let a=j.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==p.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=a.get("next.route")||H,l=`${F} ${r}`;i.setAttributes({"next.route":r,"http.route":r,"next.span_name":l}),i.updateName(l),n&&n!==i&&(n.setAttribute("http.route",r),n.updateName(l))})()}};if(L&&K)await Z(K,void 0);else{let t=j.getActiveScopeSpan();await j.withPropagatedContext(e.headers,()=>j.trace(p.BaseServerSpan.handleRequest,{spanName:`${F} ${g}`,kind:o.SpanKind.SERVER,attributes:{"http.method":F,"http.target":e.url}},e=>Z(e,t)),void 0,!L)}}e.s(["handler",0,C,"patchFetch",0,function(){return(0,r.patchFetch)({workAsyncStorage:g,workUnitAsyncStorage:w})},"routeModule",0,v,"serverHooks",0,b,"workAsyncStorage",0,g,"workUnitAsyncStorage",0,w])},175936,e=>{"use strict";let t=e=>e.split("/").map(encodeURIComponent).join("/");e.s(["decodePath",0,e=>e.join("/"),"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,a)=>({url:"/api/skills",pathVariable:[e,t],query:{path:a}}),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}}),fileNotes:"/api/bot/thread/file",fileNote:(e,t)=>({url:"/api/bot/thread/file",query:{path:e,from:t}}),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",callEnd:"/api/thursday/call/end",signIns:"/api/signins",reach:"/api/reach",textCall:"/api/thursday/text",memoryEdit:"/api/memory/edit",llmModel:"/api/llm-model",automaticModel:"/api/llm-model/automatic",modelCatalog:e=>`/api/llm-model/catalog/${e}`,keyCredits:e=>`/api/llm-model/credits/${e}`,subscriptionUsage:"/api/llm-model/subscription",running:"/api/running"}])},260338,e=>{"use strict";var t=e.i(518899),a=e.i(844988),r=e.i(156325);e.s(["count",0,function(e){return t.sql`count(${e||t.sql.raw("*")})`.mapWith(Number)},"max",0,function(e){return t.sql`max(${e})`.mapWith((0,a.is)(e,r.Column)?e:String)}])}];
2
2
 
3
3
  //# sourceMappingURL=_1e54wxa._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[864328,e=>{"use strict";var t=e.i(853205),i=e.i(333925);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:"OpenAI",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]})),g={openai:{label:"OpenAI",apiKeyName:"OPENAI_API_KEY",keysAt:"https://platform.openai.com/api-keys",keyLooks:"sk-…",defaultTier:"small",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}]}},u=Object.keys(g).map(e=>({id:e,...g[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,g,"TEXT_MODEL_PROVIDER_LIST",0,u,"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=g[e].suggestModels;return a.find(e=>e.id===t)?.context??null},"defaultModelOf",0,e=>{let t;return t=e.defaultTier??"mid",(e.suggestModels.find(e=>e.tier===t)??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=g[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])},51083,e=>{"use strict";e.s(["STUDIO_TOOLS",0,{generate_image:"generate_image",generate_speech:"generate_speech",transcribe:"transcribe",generate_video:"generate_video"},"TOOL_NAMES",0,{memory_recall:"memory_recall",memory_create:"memory_create",memory_remember:"memory_remember",memory_describe:"memory_describe",memory_forget:"memory_forget",bash:"bash",write_file:"write_file",tool_search:"tool_search",tool_call:"tool_call",load_skill:"load_skill",web_search:"web_search",thread_start:"thread_start",thread_tell:"thread_tell",thread_answer:"thread_answer",thread_status:"thread_status",thread_cancel:"thread_cancel",thread_show:"thread_show",thread_seen:"thread_seen",routine:"routine",send_message:"send_message",thread_recall:"thread_recall",sign_in_use:"sign_in_use",sign_in_keep:"sign_in_keep",look_at:"look_at",make_deck:"make_deck",describe_self:"describe_self",end_call:"end_call",emote:"emote"}])},951056,e=>{"use strict";var t=e.i(517435),i=e.i(333925),a=e.i(864328),l=e.i(900533),r=e.i(64774),o=e.i(746565),s=e.i(600690);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()}),g=t.default.object({id:t.default.number(),name:t.default.string(),serverName:t.default.string()}),u=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:g.array().default([]),tokens:c,lastJobAt:l.DateLikeSchema.nullish()}),t.default.object({name:u,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).optional()});let f={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 b="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}),_=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()})]),x=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:x.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:_.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:f,provider:null,model:null,disabled:!1,compactAt:null,effort:null},"DEFAULT_BOT_ICON",0,f,"THREAD_CONTINUE",0,b,"isAppStop",0,e=>{let t=e?.options??[];return!e?.messageId&&1===t.length&&t[0]===b},"isBotMemoryOn",0,e=>e?.trim()!=="off","randomBotIcons",0,function(e){return(0,o.randomMarkFills)(e).map(e=>({...e,shape:o.MARK_SHAPES[Math.floor(Math.random()*o.MARK_SHAPES.length)]}))},"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)])},600690,e=>{"use strict";var t=e.i(853205);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])},517435,e=>{"use strict";var t=e.i(794588);e.s(["default",0,t])}];
1
+ module.exports=[864328,e=>{"use strict";var t=e.i(853205),i=e.i(333925);let a=t.z.enum(["openai","chatgpt","anthropic","google","xai","vercel-ai-gateway","openrouter","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=["vercel-ai-gateway","openrouter"],n=e=>s.includes(e),d=t.z.enum(["openai","google","xai","vercel-ai-gateway"]),m=t.z.object({provider:d,model:t.z.string().trim().min(1,"Model name is required").max(120)}),g={openai:{label:"OpenAI",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"}]}}},u=Object.keys(g).map(e=>({id:e,...g[e]})),c={openai:{label:"OpenAI",apiKeyName:"OPENAI_API_KEY",keysAt:"https://platform.openai.com/api-keys",keyLooks:"sk-…",defaultTier:"small",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}]},openrouter:{label:"OpenRouter",apiKeyName:"OPENROUTER_API_KEY",keysAt:"https://openrouter.ai/settings/keys",keyLooks:"sk-or-…",suggestModels:[{id:"z-ai/glm-5.3-flash",label:"GLM 5.3 Flash",tier:"small",context:1310720},{id:"google/gemini-3.8-flash",label:"Gemini 3.8 Flash",tier:"small",context:1048576},{id:"openai/gpt-6-luna",label:"GPT 6 Luna",tier:"small",context:105e4},{id:"z-ai/glm-5.3",label:"GLM 5.3",tier:"mid",context:1310720},{id:"x-ai/grok-4.7",label:"Grok 4.7",tier:"mid",context:5e5},{id:"anthropic/claude-sonnet-5",label:"Claude Sonnet 5",tier:"mid",context:1e6},{id:"openai/gpt-6-sol",label:"GPT 6 Sol",tier:"mid",context:105e4},{id:"moonshotai/kimi-k3",label:"Kimi K3",tier:"mid",context:1048576},{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}]}},p=Object.keys(c).map(e=>({id:e,...c[e]}));e.s(["CATALOG_TEXT",0,"language","CATALOG_TOOL_USE",0,"tool-use","EFFORTS",0,r,"MEDIA_MODEL_PROVIDERS",0,g,"MEDIA_MODEL_PROVIDER_LIST",0,u,"TEXT_MODEL_PROVIDERS",0,c,"TEXT_MODEL_PROVIDER_LIST",0,p,"VENDOR_PROVIDERS",0,{anthropic:"anthropic",openai:"openai",google:"google",spacexai:"xai",mistral:"mistral",deepseek:"deepseek",cohere:"cohere",openrouter:"openrouter"},"canMakeKind",0,(e,t)=>(g[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(n(e))return i.find(e=>e.id===t)?.contextWindow??null;let a=c[e].suggestModels;return a.find(e=>e.id===t)?.context??null},"defaultModelOf",0,e=>{let t;return t=e.defaultTier??"mid",(e.suggestModels.find(e=>e.tier===t)??e.suggestModels[0])?.id},"effortSchema",0,o,"effortsOf",0,function(e,t,i=[]){if(n(e))return i.find(e=>e.id===t)?.efforts??null;let a=c[e].suggestModels;return a.find(e=>e.id===t)?.efforts??null},"isCatalogProvider",0,n,"parseMediaModel",0,function(e){let[t,...i]=(e??"").trim().split("/"),a=m.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])},51083,e=>{"use strict";e.s(["STUDIO_TOOLS",0,{generate_image:"generate_image",generate_speech:"generate_speech",transcribe:"transcribe",generate_video:"generate_video"},"TOOL_NAMES",0,{memory_recall:"memory_recall",memory_create:"memory_create",memory_remember:"memory_remember",memory_describe:"memory_describe",memory_forget:"memory_forget",bash:"bash",write_file:"write_file",tool_search:"tool_search",tool_call:"tool_call",load_skill:"load_skill",web_search:"web_search",thread_start:"thread_start",thread_tell:"thread_tell",thread_answer:"thread_answer",thread_status:"thread_status",thread_cancel:"thread_cancel",thread_show:"thread_show",thread_seen:"thread_seen",routine:"routine",send_message:"send_message",thread_recall:"thread_recall",sign_in_use:"sign_in_use",sign_in_keep:"sign_in_keep",look_at:"look_at",make_deck:"make_deck",describe_self:"describe_self",end_call:"end_call",emote:"emote",look_at_screen:"look_at_screen"}])},951056,e=>{"use strict";var t=e.i(517435),i=e.i(333925),a=e.i(864328),l=e.i(900533),r=e.i(64774),o=e.i(746565),s=e.i(600690);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()}),g=t.default.object({id:t.default.number(),name:t.default.string(),serverName:t.default.string()}),u=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:g.array().default([]),tokens:c,lastJobAt:l.DateLikeSchema.nullish()}),t.default.object({name:u,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).optional()});let p={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 b="Continue",f={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}),_=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()})]),x=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:x.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:_.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:p,provider:null,model:null,disabled:!1,compactAt:null,effort:null},"DEFAULT_BOT_ICON",0,p,"THREAD_CONTINUE",0,b,"isAppStop",0,e=>{let t=e?.options??[];return!e?.messageId&&1===t.length&&t[0]===b},"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)=>`${f[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(f))if(e.startsWith(`${t} `))return e.slice(t.length+1);return e},"workHandle",0,e=>e.slice(0,6)])},600690,e=>{"use strict";var t=e.i(853205);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])},517435,e=>{"use strict";var t=e.i(794588);e.s(["default",0,t])}];
2
2
 
3
3
  //# sourceMappingURL=_1frcwj1._.js.map
@@ -1,4 +1,4 @@
1
- module.exports=[159479,e=>e.a(async(t,a)=>{try{var i=e.i(847841),n=e.i(983477),r=e.i(687388),o=e.i(386075),s=e.i(54282),l=e.i(316172),h=e.i(349047),c=e.i(625441),d=e.i(170801),u=e.i(926435),m=e.i(770639),w=e.i(418919),p=e.i(489956),f=e.i(740852),y=e.i(205863),g=e.i(41181),b=e.i(353885),S=e.i(123203),T=e.i(944971),O=e.i(636882),k=e.i(786025),$=e.i(704161),_=e.i(640911),v=e.i(53748),A=e.i(388439),M=e.i(41444),E=t([o,l,u,m,w,p,f,g,O]);async function N(t){let{listThreadOverview:a}=await e.A(866938),i=await a();if(!i.length)return"No thread has been started yet.";let n=i.map(e=>`"${e.label}" (${e.bot}, ${e.status})`).join(", ");return`There is no thread called "${t}". The latest are: ${n}. Call again with one of those labels.`}async function x(e,t){let a=[];for(let[e,n]of Object.entries(t)){let t=await (0,i.asSchema)(n.inputSchema).jsonSchema,r="string"==typeof n.description?n.description:"";a.push({name:e,tokens:(0,A.estimateTokens)(r)+(0,A.estimateTokens)(JSON.stringify(t))})}a.sort((e,t)=>t.tokens-e.tokens);let n=a.reduce((e,t)=>e+t.tokens,0);_.logger.debug(`${e} tools ${n} tokens over ${a.length} — ${a.map(e=>`${e.name} ${e.tokens}`).join(", ")}`)}async function L(e){let t=await j(e);return r.IS_DEV&&await x(e.target,t),t}async function j(t){if("memory-edit"===t.target)return(0,m.createMemoryTools)("user",null,{countReads:!1});let a=(0,m.createMemoryTools)("call","thursday"===t.target?t.callId??null:null),_=await (0,k.openWorkspace)();if("thursday"===t.target){var A;let c,u,m=t.readSkills?(0,g.createSkillTools)({sandbox:_,skills:await (0,O.loadSkills)(_)}):{},f=!!(t.written&&t.model&&(0,o.seesToolImages)(t.model));return{...a,...m,...(0,S.createWorkspaceTools)(_,{write:!1,timeoutMs:r.CALL_EXEC_TIMEOUT_MS}),...!1===t.webSearch?{}:await (0,p.createCallSearchTool)(_),...Object.fromEntries(Object.entries((A=t.callId,c=async t=>{let{resolveThread:a}=await e.A(866938);return(t.trim()?await a(t.trim()):null)??await N(t)},u=async(t,a,i)=>{let n=await e.A(994193);try{return await n.answerThread(t,a,"thursday",i)}catch(e){if((0,v.isPublicError)(e))return e.message;throw e}},{[b.TOOL_NAMES.thread_start]:(0,i.tool)({description:l.threadStartSpec.description,inputSchema:l.threadStartSpec.parameters,execute:async({bot:t,request:a,label:i})=>{let{findJobBot:n,listJobBots:r}=await e.A(814317),o=await n(t);if(!o||o.disabled){let e=(await r()).map(e=>e.name);return`There is no bot called "${t}". The bots are: ${e.join(", ")}. Nothing was started — call again with one of those.`}let{startThread:s}=await e.A(994193);return{threadId:await s({bot:o.name,request:a,label:i,callId:A,from:"thursday"}),bot:o.name,label:i,note:`${o.name} has "${i}". Its updates reach the conversation on their own. Anything further about this work — a correction, the next step once it finishes — is \`${b.TOOL_NAMES.thread_tell}\` with "${i}"; a question it asks is answered with \`${b.TOOL_NAMES.thread_answer}\`.`}}}),[b.TOOL_NAMES.thread_tell]:(0,i.tool)({description:l.threadTellSpec.description,inputSchema:l.threadTellSpec.parameters,execute:async({thread:e,words:t})=>{let a=await c(e);if("string"==typeof a)return a;if(!t.trim())return"Say what to pass on.";let i=await u(a.id,t.trim());return"string"==typeof i?i:i?.answered?{label:a.label,answered:i.answered,note:`${i.answered.bot} was waiting on a question, and took this as its answer.`}:{label:a.label,bot:i?.to??a.bot,status:"running",note:"running"===a.status?"The bot reads it before its next step.":"The bot picks the thread back up from there."}}}),[b.TOOL_NAMES.thread_answer]:(0,i.tool)({description:l.threadAnswerSpec.description,inputSchema:l.threadAnswerSpec.parameters,execute:async({thread:t,bot:a,answer:i})=>{let n=await c(t);if("string"==typeof n)return n;if(!i.trim())return"Say what the answer is.";let{findThreadView:r}=await e.A(866938),o=(await r(n.id))?.room.questions??[],s=o.find(e=>e.bot.toLowerCase()===a.trim().toLowerCase());if(!s)return o.length?`${a} is not asking anything in "${n.label}". Waiting there: ${o.map(e=>e.bot).join(", ")}. Call again with that bot.`:`No question is waiting in "${n.label}". To say something else to it, use \`${b.TOOL_NAMES.thread_tell}\`.`;let l=await u(n.id,i.trim(),s.bot);return"string"==typeof l?l:{label:n.label,answered:l?.answered??{bot:s.bot,question:s.text},note:`${s.bot} has the answer to its question and goes on from it.`}}}),[b.TOOL_NAMES.thread_status]:(0,i.tool)({description:l.threadStatusSpec.description,inputSchema:l.threadStatusSpec.parameters,execute:async({thread:t})=>{let{listThreadOverview:a,findThreadView:i}=await e.A(866938),o={now:(0,s.clockNow)()},l=e=>(0,n.formatDistanceToNowStrict)((0,$.toDate)(e),{addSuffix:!0});if(!(!t.trim()||"all"===t.trim().toLowerCase())){let e=await c(t);if("string"==typeof e)return e;let a=(await i(e.id))?.room;return{...o,label:e.label,id:e.id,bot:e.bot,participants:a?.participants??[],questions:a?.questions??[],status:e.status,since:l(e.updatedAt),outcome:e.outcome,..."waiting"===e.status&&e.pending?.options.length?{options:e.pending.options}:{}}}let h=await a();return h.length?{...o,threads:h.map(e=>({id:e.id,label:e.label,bot:e.bot,status:e.status,participants:e.room.participants,questions:e.room.questions.map(e=>({...e,text:(0,M.clip)(e.text,r.PROMPT_LINE.threadStatus)})),since:l(e.updatedAt),...e.ask?{asking:e.ask.question,options:e.ask.options}:{},..."running"===e.status?{now:(0,T.threadActivity)(e.lines)}:{},...e.outcome&&"waiting"!==e.status?{outcome:(0,M.clip)(e.outcome,r.PROMPT_LINE.threadStatus)}:{}}))}:"No thread has been started yet."}}),[b.TOOL_NAMES.thread_cancel]:(0,i.tool)({description:l.threadCancelSpec.description,inputSchema:l.threadCancelSpec.parameters,execute:async({thread:t})=>{let a=await c(t);if("string"==typeof a)return a;let{cancelThread:i}=await e.A(994193);return await i(a.id),{label:a.label,status:"cancelled"}}}),[b.TOOL_NAMES.thread_show]:(0,i.tool)({description:l.threadShowSpec.description,inputSchema:l.threadShowSpec.parameters,execute:async({thread:t})=>{let a=await c(t);if("string"==typeof a)return a;let{appEvents:i}=await e.A(522275),{filesOnDisk:n}=await e.A(149325),{leadFirst:r,pathsIn:o,viewKindOf:s}=await e.A(628124),l=(await n(o(a.outcome??""),null)).filter(e=>"none"!==s(e));if(!l.length)return i.emit({type:"showThread",threadId:a.id}),{label:a.label,showing:"the thread"};let h=r(l);i.emit({type:"showFile",paths:h});let{markSeen:d}=await e.A(866938);return await d([a.id]),{label:a.label,showing:h[0]}}}),[b.TOOL_NAMES.thread_seen]:(0,i.tool)({description:l.threadSeenSpec.description,inputSchema:l.threadSeenSpec.parameters,execute:async({thread:t})=>{let a=await c(t);if("string"==typeof a)return a;let{markSeen:i}=await e.A(866938);return await i([a.id]),{label:a.label,seen:!0}}})})).filter(([e])=>!(t.phone&&e===b.TOOL_NAMES.thread_show))),...(0,w.createRoutineTools)(),...f?(0,d.createLookTool)():{},...t.written?{}:(0,h.callTools)()}}let E=await (0,O.loadSkills)(_,t.bot),x={...(0,k.jobShellEnv)(t.session),...(0,k.botShellEnv)(t.bot,(await (await e.A(814317)).findJobBot(t.bot))?.icon)},L=!!(t.model&&(0,o.seesToolImages)(t.model.ref));return{[b.TOOL_NAMES.memory_recall]:(0,m.createMemoryTools)("call",null,{tidies:!1})[b.TOOL_NAMES.memory_recall],...await (0,p.createSearchTool)(t.model,_),...(0,S.createWorkspaceTools)(_,{write:!0,env:x,guide:!0,bot:t.bot}),...await (0,u.createMcpTools)(t.bot,_),...(0,g.createSkillTools)({sandbox:_,skills:E,bot:t.bot}),...await (0,f.createSelfTools)(t.bot),...(0,c.createDeckTools)(_,t.bot,x,L),...L?(0,d.createLookTool)():{},...(0,y.createSignInTools)(_,t.bot,(0,k.jobShellEnv)(t.session)),...await (0,l.createThreadRecallTool)(t.bot,t.thread??null)}}[o,l,u,m,w,p,f,g,O]=E.then?(await E)():E,e.s(["loadTools",0,L]),a()}catch(e){a(e)}},!1),54282,e=>{"use strict";var t=e.i(343747),a=e.i(983477),i=e.i(687388),n=e.i(353885),r=e.i(280809);n.TOOL_NAMES.memory_recall,n.TOOL_NAMES.memory_create,n.TOOL_NAMES.memory_remember,n.TOOL_NAMES.memory_describe,n.TOOL_NAMES.memory_forget,n.TOOL_NAMES.bash,n.TOOL_NAMES.web_search,n.TOOL_NAMES.load_skill,n.TOOL_NAMES.look_at,n.TOOL_NAMES.make_deck,n.TOOL_NAMES.end_call,n.TOOL_NAMES.routine,n.TOOL_NAMES.thread_tell,n.TOOL_NAMES.thread_answer,n.TOOL_NAMES.thread_status,n.TOOL_NAMES.thread_show,n.TOOL_NAMES.thread_cancel,n.TOOL_NAMES.thread_seen;var o=e.i(704161),s=e.i(640911),l=e.i(388439),h=e.i(41444);let c=(e=new Date)=>`${(0,t.format)(e,"yyyy-MM-dd (EEE) HH:mm")} ${Intl.DateTimeFormat().resolvedOptions().timeZone}`,d=e=>(0,t.format)(e,"yyyy-MM-dd (EEE) a"),u=(e=new Date)=>`**Now**: ${c(e)}`,m=e=>`${(0,t.format)(e,"yyyy-MM-dd (EEE) HH:mm")} (${(0,a.formatDistanceToNowStrict)(e,{addSuffix:!0})})`,w={[n.STUDIO_TOOLS.generate_image]:"images",[n.STUDIO_TOOLS.generate_speech]:"speech",[n.STUDIO_TOOLS.transcribe]:"transcription",[n.STUDIO_TOOLS.generate_video]:"video"};e.s(["botWorkHead",0,function(e,a){let i=d(e.updatedAt),n="running"===e.status?`running, last moved ${i}`:e.asking?`waiting on the user's answer since ${i}`:"waiting"===e.status?`stopped ${i}, not finished`:`${"done"===e.status?"ended":"stopped by the user"} ${(0,t.format)(e.updatedAt,"yyyy-MM-dd")}`;return`"${e.label}" — ${e.owner===a?"yours":`${e.owner}'s`} — ${n}`},"clockNow",0,c,"logPromptSize",0,function(e,t){let a=(0,l.sectionTokens)(t),n=a.reduce((e,t)=>e+t.tokens,0);s.logger.debug(`${e} prompt ${n} tokens — ${a.map(e=>`${e.name} ${e.tokens}`).join(", ")}`);let r=a[0];n>i.PROMPT_BUDGET&&r&&s.logger.warn(`${e} prompt is ${n} tokens, over ${i.PROMPT_BUDGET}: ${r.name} carries ${r.tokens} of it. Every call and every job pays this.`)},"mcpToolLines",0,function(e){let t=new Map;for(let a of e){let e=t.get(a.server);e?e.push(a.name):t.set(a.server,[a.name])}return[...t].map(([e,t])=>`- **${e}**: ${t.join(", ")}`).join("\n")},"noteLines",0,function(e,t=!1){return e.length?e.map(e=>{var a;let i,n=t?` \xb7 ${a=e.lastSeenAt,(i=Math.floor((Date.now()-(0,o.toDate)(a).getTime())/864e5))>=365?`${Math.floor(i/365)}y`:i>=30?`${Math.floor(i/30)}mo`:`${Math.max(i,0)}d`}`:"";return`- ${e.path} — ${e.description?.trim()} (${e.factCount})${n}`}).join("\n"):"(nothing saved yet)"},"nowLine",0,u,"reachNames",0,function(e,t){let a=t.map(e=>e.server===i.STUDIO_SERVER?w[e.name]??e.name:e.server);return[...new Set([...e.map(e=>e.name),...a])].join(", ")},"recentCallLines",0,function(e,t){let a=[],r=0;e:for(let o=e.length-1;o>=0;o--){let s=e[o];for(let e=s.turns.length-1;e>=0;e--){let o=function(e,t){if("tool"!==e.role)return`${"user"===e.role?"user":"you"}: ${e.text}`;let a=function(e,t){if(e!==n.TOOL_NAMES.web_search)return null;try{var a;let e=JSON.parse(t);return{query:"string"==typeof e.query?e.query:null,sources:(a=e.sources,Array.isArray(a)?a.flatMap(e=>e&&"object"==typeof e&&"string"==typeof e.url?[e]:[]):[])}}catch{return null}}(e.tool,e.text);if(a){let t=[...new Set(a.sources.flatMap(e=>(0,h.hostOf)(e.url)??[]))];return`you → ${e.tool} "${(0,h.clip)(a.query??"",i.PROMPT_LINE.toolArgs)}"${t.length?` — ${t.join(", ")}`:""}`}let r=`you → ${e.tool??"tool"} ${(0,h.clip)(e.text,i.PROMPT_LINE.toolArgs)}`;if(e.tool!==n.TOOL_NAMES.thread_start)return r;let o=function(e,t){if(e!==n.TOOL_NAMES.thread_start)return null;try{let e=JSON.parse(t);return"string"==typeof e.label?e.label:null}catch{return null}}(e.tool,e.text),s=o?t.jobs?.find(e=>e.label===o):void 0;if(!s)return r;let l=s.outcome?`: ${(0,h.clip)(s.outcome,i.PROMPT_LINE.jobOutcome)}`:"";return`you → ${e.tool} "${s.label}" (${s.id}) — ${s.status}${l}`}(s.turns[e],s),c=(0,l.estimateTokens)(o)+3;if(r+c>t&&a.length)break e;r+=c,a.push({call:s,line:o})}}a.reverse();let o=[],s=null;for(let{call:e,line:t}of a)e!==s&&(s=e,o.push(`### ${m(e.startedAt)}`)),o.push(t);return o.join("\n")},"saidStamp",0,e=>(0,t.format)(e,"yyyy-MM-dd (EEE) HH:mm"),"skillLines",0,(e,t={})=>e.map(e=>{var a;let n,o;return`- **${e.name}**: ${t.short?(a=e.description,n=i.PROMPT_LINE.skill,(o=(0,r.firstSentence)(a)).length>n?`${o.slice(0,n).trim()}…`:o):e.description}`}).join("\n"),"styleLines",0,e=>e?.trim()?`## Who they want you to be
1
+ module.exports=[159479,e=>e.a(async(t,a)=>{try{var i=e.i(847841),n=e.i(983477),r=e.i(687388),o=e.i(386075),s=e.i(54282),l=e.i(316172),h=e.i(349047),c=e.i(625441),d=e.i(170801),u=e.i(926435),m=e.i(770639),w=e.i(418919),p=e.i(489956),f=e.i(740852),y=e.i(205863),g=e.i(41181),b=e.i(353885),S=e.i(123203),T=e.i(944971),O=e.i(636882),k=e.i(786025),$=e.i(704161),_=e.i(640911),v=e.i(53748),A=e.i(388439),M=e.i(41444),E=t([o,l,u,m,w,p,f,g,O]);async function N(t){let{listThreadOverview:a}=await e.A(866938),i=await a();if(!i.length)return"No thread has been started yet.";let n=i.map(e=>`"${e.label}" (${e.bot}, ${e.status})`).join(", ");return`There is no thread called "${t}". The latest are: ${n}. Call again with one of those labels.`}async function x(e,t){let a=[];for(let[e,n]of Object.entries(t)){let t=await (0,i.asSchema)(n.inputSchema).jsonSchema,r="string"==typeof n.description?n.description:"";a.push({name:e,tokens:(0,A.estimateTokens)(r)+(0,A.estimateTokens)(JSON.stringify(t))})}a.sort((e,t)=>t.tokens-e.tokens);let n=a.reduce((e,t)=>e+t.tokens,0);_.logger.debug(`${e} tools ${n} tokens over ${a.length} — ${a.map(e=>`${e.name} ${e.tokens}`).join(", ")}`)}async function L(e){let t=await j(e);return r.IS_DEV&&await x(e.target,t),t}async function j(t){if("memory-edit"===t.target)return(0,m.createMemoryTools)("user",null,{countReads:!1});let a=(0,m.createMemoryTools)("call","thursday"===t.target?t.callId??null:null),_=await (0,k.openWorkspace)();if("thursday"===t.target){var A;let c,u,m=t.readSkills?(0,g.createSkillTools)({sandbox:_,skills:await (0,O.loadSkills)(_)}):{},f=!!(t.written&&t.model&&(0,o.seesToolImages)(t.model));return{...a,...m,...(0,S.createWorkspaceTools)(_,{write:!1,timeoutMs:r.CALL_EXEC_TIMEOUT_MS}),...!1===t.webSearch?{}:await (0,p.createCallSearchTool)(_),...Object.fromEntries(Object.entries((A=t.callId,c=async t=>{let{resolveThread:a}=await e.A(866938);return(t.trim()?await a(t.trim()):null)??await N(t)},u=async(t,a,i)=>{let n=await e.A(994193);try{return await n.answerThread(t,a,"thursday",i)}catch(e){if((0,v.isPublicError)(e))return e.message;throw e}},{[b.TOOL_NAMES.thread_start]:(0,i.tool)({description:l.threadStartSpec.description,inputSchema:l.threadStartSpec.parameters,execute:async({bot:t,request:a,label:i})=>{let{findJobBot:n,listJobBots:r}=await e.A(814317),o=await n(t);if(!o||o.disabled){let e=(await r()).map(e=>e.name);return`There is no bot called "${t}". The bots are: ${e.join(", ")}. Nothing was started — call again with one of those.`}let{startThread:s}=await e.A(994193);return{threadId:await s({bot:o.name,request:a,label:i,callId:A,from:"thursday"}),bot:o.name,label:i,note:`${o.name} has "${i}". Its updates reach the conversation on their own. Anything further about this work — a correction, the next step once it finishes — is \`${b.TOOL_NAMES.thread_tell}\` with "${i}"; a question it asks is answered with \`${b.TOOL_NAMES.thread_answer}\`.`}}}),[b.TOOL_NAMES.thread_tell]:(0,i.tool)({description:l.threadTellSpec.description,inputSchema:l.threadTellSpec.parameters,execute:async({thread:e,words:t})=>{let a=await c(e);if("string"==typeof a)return a;if(!t.trim())return"Say what to pass on.";let i=await u(a.id,t.trim());return"string"==typeof i?i:i?.answered?{label:a.label,answered:i.answered,note:`${i.answered.bot} was waiting on a question, and took this as its answer.`}:{label:a.label,bot:i?.to??a.bot,status:"running",note:"running"===a.status?"The bot reads it before its next step.":"The bot picks the thread back up from there."}}}),[b.TOOL_NAMES.thread_answer]:(0,i.tool)({description:l.threadAnswerSpec.description,inputSchema:l.threadAnswerSpec.parameters,execute:async({thread:t,bot:a,answer:i})=>{let n=await c(t);if("string"==typeof n)return n;if(!i.trim())return"Say what the answer is.";let{findThreadView:r}=await e.A(866938),o=(await r(n.id))?.room.questions??[],s=o.find(e=>e.bot.toLowerCase()===a.trim().toLowerCase());if(!s)return o.length?`${a} is not asking anything in "${n.label}". Waiting there: ${o.map(e=>e.bot).join(", ")}. Call again with that bot.`:`No question is waiting in "${n.label}". To say something else to it, use \`${b.TOOL_NAMES.thread_tell}\`.`;let l=await u(n.id,i.trim(),s.bot);return"string"==typeof l?l:{label:n.label,answered:l?.answered??{bot:s.bot,question:s.text},note:`${s.bot} has the answer to its question and goes on from it.`}}}),[b.TOOL_NAMES.thread_status]:(0,i.tool)({description:l.threadStatusSpec.description,inputSchema:l.threadStatusSpec.parameters,execute:async({thread:t})=>{let{listThreadOverview:a,findThreadView:i}=await e.A(866938),o={now:(0,s.clockNow)()},l=e=>(0,n.formatDistanceToNowStrict)((0,$.toDate)(e),{addSuffix:!0});if(!(!t.trim()||"all"===t.trim().toLowerCase())){let e=await c(t);if("string"==typeof e)return e;let a=(await i(e.id))?.room;return{...o,label:e.label,id:e.id,bot:e.bot,participants:a?.participants??[],questions:a?.questions??[],status:e.status,since:l(e.updatedAt),outcome:e.outcome,..."waiting"===e.status&&e.pending?.options.length?{options:e.pending.options}:{}}}let h=await a();return h.length?{...o,threads:h.map(e=>({id:e.id,label:e.label,bot:e.bot,status:e.status,participants:e.room.participants,questions:e.room.questions.map(e=>({...e,text:(0,M.clip)(e.text,r.PROMPT_LINE.threadStatus)})),since:l(e.updatedAt),...e.ask?{asking:e.ask.question,options:e.ask.options}:{},..."running"===e.status?{now:(0,T.threadActivity)(e.lines)}:{},...e.outcome&&"waiting"!==e.status?{outcome:(0,M.clip)(e.outcome,r.PROMPT_LINE.threadStatus)}:{}}))}:"No thread has been started yet."}}),[b.TOOL_NAMES.thread_cancel]:(0,i.tool)({description:l.threadCancelSpec.description,inputSchema:l.threadCancelSpec.parameters,execute:async({thread:t})=>{let a=await c(t);if("string"==typeof a)return a;let{cancelThread:i}=await e.A(994193);return await i(a.id),{label:a.label,status:"cancelled"}}}),[b.TOOL_NAMES.thread_show]:(0,i.tool)({description:l.threadShowSpec.description,inputSchema:l.threadShowSpec.parameters,execute:async({thread:t})=>{let a=await c(t);if("string"==typeof a)return a;let{appEvents:i}=await e.A(522275),{filesOnDisk:n}=await e.A(149325),{leadFirst:r,pathsIn:o,viewKindOf:s}=await e.A(628124),l=(await n(o(a.outcome??""),null)).filter(e=>"none"!==s(e));if(!l.length)return i.emit({type:"showThread",threadId:a.id}),{label:a.label,showing:"the thread"};let h=r(l);i.emit({type:"showFile",paths:h});let{markSeen:d}=await e.A(866938);return await d([a.id]),{label:a.label,showing:h[0]}}}),[b.TOOL_NAMES.thread_seen]:(0,i.tool)({description:l.threadSeenSpec.description,inputSchema:l.threadSeenSpec.parameters,execute:async({thread:t})=>{let a=await c(t);if("string"==typeof a)return a;let{markSeen:i}=await e.A(866938);return await i([a.id]),{label:a.label,seen:!0}}})})).filter(([e])=>!(t.phone&&e===b.TOOL_NAMES.thread_show))),...(0,w.createRoutineTools)(),...f?(0,d.createLookTool)():{},...t.written?{}:(0,h.callTools)()}}let E=await (0,O.loadSkills)(_,t.bot),x={...(0,k.jobShellEnv)(t.session),...(0,k.botShellEnv)(t.bot,(await (await e.A(814317)).findJobBot(t.bot))?.icon)},L=!!(t.model&&(0,o.seesToolImages)(t.model.ref));return{[b.TOOL_NAMES.memory_recall]:(0,m.createMemoryTools)("call",null,{tidies:!1})[b.TOOL_NAMES.memory_recall],...await (0,p.createSearchTool)(t.model,_),...(0,S.createWorkspaceTools)(_,{write:!0,env:x,guide:!0,bot:t.bot}),...await (0,u.createMcpTools)(t.bot,_),...(0,g.createSkillTools)({sandbox:_,skills:E,bot:t.bot}),...await (0,f.createSelfTools)(t.bot),...(0,c.createDeckTools)(_,t.bot,x,L),...L?(0,d.createLookTool)():{},...(0,y.createSignInTools)(_,t.bot,(0,k.jobShellEnv)(t.session)),...await (0,l.createThreadRecallTool)(t.bot,t.thread??null)}}[o,l,u,m,w,p,f,g,O]=E.then?(await E)():E,e.s(["loadTools",0,L]),a()}catch(e){a(e)}},!1),54282,e=>{"use strict";var t=e.i(343747),a=e.i(983477),i=e.i(687388),n=e.i(353885),r=e.i(280809);n.TOOL_NAMES.memory_recall,n.TOOL_NAMES.memory_create,n.TOOL_NAMES.memory_remember,n.TOOL_NAMES.memory_describe,n.TOOL_NAMES.memory_forget,n.TOOL_NAMES.bash,n.TOOL_NAMES.web_search,n.TOOL_NAMES.load_skill,n.TOOL_NAMES.look_at,n.TOOL_NAMES.make_deck,n.TOOL_NAMES.end_call,n.TOOL_NAMES.look_at_screen,n.TOOL_NAMES.routine,n.TOOL_NAMES.thread_tell,n.TOOL_NAMES.thread_answer,n.TOOL_NAMES.thread_status,n.TOOL_NAMES.thread_show,n.TOOL_NAMES.thread_cancel,n.TOOL_NAMES.thread_seen;var o=e.i(704161),s=e.i(640911),l=e.i(388439),h=e.i(41444);let c=(e=new Date)=>`${(0,t.format)(e,"yyyy-MM-dd (EEE) HH:mm")} ${Intl.DateTimeFormat().resolvedOptions().timeZone}`,d=e=>(0,t.format)(e,"yyyy-MM-dd (EEE) a"),u=(e=new Date)=>`**Now**: ${c(e)}`,m=e=>`${(0,t.format)(e,"yyyy-MM-dd (EEE) HH:mm")} (${(0,a.formatDistanceToNowStrict)(e,{addSuffix:!0})})`,w={[n.STUDIO_TOOLS.generate_image]:"images",[n.STUDIO_TOOLS.generate_speech]:"speech",[n.STUDIO_TOOLS.transcribe]:"transcription",[n.STUDIO_TOOLS.generate_video]:"video"};e.s(["botWorkHead",0,function(e,a){let i=d(e.updatedAt),n="running"===e.status?`running, last moved ${i}`:e.asking?`waiting on the user's answer since ${i}`:"waiting"===e.status?`stopped ${i}, not finished`:`${"done"===e.status?"ended":"stopped by the user"} ${(0,t.format)(e.updatedAt,"yyyy-MM-dd")}`;return`"${e.label}" — ${e.owner===a?"yours":`${e.owner}'s`} — ${n}`},"clockNow",0,c,"logPromptSize",0,function(e,t){let a=(0,l.sectionTokens)(t),n=a.reduce((e,t)=>e+t.tokens,0);s.logger.debug(`${e} prompt ${n} tokens — ${a.map(e=>`${e.name} ${e.tokens}`).join(", ")}`);let r=a[0];n>i.PROMPT_BUDGET&&r&&s.logger.warn(`${e} prompt is ${n} tokens, over ${i.PROMPT_BUDGET}: ${r.name} carries ${r.tokens} of it. Every call and every job pays this.`)},"mcpToolLines",0,function(e){let t=new Map;for(let a of e){let e=t.get(a.server);e?e.push(a.name):t.set(a.server,[a.name])}return[...t].map(([e,t])=>`- **${e}**: ${t.join(", ")}`).join("\n")},"noteLines",0,function(e,t=!1){return e.length?e.map(e=>{var a;let i,n=t?` \xb7 ${a=e.lastSeenAt,(i=Math.floor((Date.now()-(0,o.toDate)(a).getTime())/864e5))>=365?`${Math.floor(i/365)}y`:i>=30?`${Math.floor(i/30)}mo`:`${Math.max(i,0)}d`}`:"";return`- ${e.path} — ${e.description?.trim()} (${e.factCount})${n}`}).join("\n"):"(nothing saved yet)"},"nowLine",0,u,"reachNames",0,function(e,t){let a=t.map(e=>e.server===i.STUDIO_SERVER?w[e.name]??e.name:e.server);return[...new Set([...e.map(e=>e.name),...a])].join(", ")},"recentCallLines",0,function(e,t){let a=[],r=0;e:for(let o=e.length-1;o>=0;o--){let s=e[o];for(let e=s.turns.length-1;e>=0;e--){let o=function(e,t){if("tool"!==e.role)return`${"user"===e.role?"user":"you"}: ${e.text}`;let a=function(e,t){if(e!==n.TOOL_NAMES.web_search)return null;try{var a;let e=JSON.parse(t);return{query:"string"==typeof e.query?e.query:null,sources:(a=e.sources,Array.isArray(a)?a.flatMap(e=>e&&"object"==typeof e&&"string"==typeof e.url?[e]:[]):[])}}catch{return null}}(e.tool,e.text);if(a){let t=[...new Set(a.sources.flatMap(e=>(0,h.hostOf)(e.url)??[]))];return`you → ${e.tool} "${(0,h.clip)(a.query??"",i.PROMPT_LINE.toolArgs)}"${t.length?` — ${t.join(", ")}`:""}`}let r=`you → ${e.tool??"tool"} ${(0,h.clip)(e.text,i.PROMPT_LINE.toolArgs)}`;if(e.tool!==n.TOOL_NAMES.thread_start)return r;let o=function(e,t){if(e!==n.TOOL_NAMES.thread_start)return null;try{let e=JSON.parse(t);return"string"==typeof e.label?e.label:null}catch{return null}}(e.tool,e.text),s=o?t.jobs?.find(e=>e.label===o):void 0;if(!s)return r;let l=s.outcome?`: ${(0,h.clip)(s.outcome,i.PROMPT_LINE.jobOutcome)}`:"";return`you → ${e.tool} "${s.label}" (${s.id}) — ${s.status}${l}`}(s.turns[e],s),c=(0,l.estimateTokens)(o)+3;if(r+c>t&&a.length)break e;r+=c,a.push({call:s,line:o})}}a.reverse();let o=[],s=null;for(let{call:e,line:t}of a)e!==s&&(s=e,o.push(`### ${m(e.startedAt)}`)),o.push(t);return o.join("\n")},"saidStamp",0,e=>(0,t.format)(e,"yyyy-MM-dd (EEE) HH:mm"),"skillLines",0,(e,t={})=>e.map(e=>{var a;let n,o;return`- **${e.name}**: ${t.short?(a=e.description,n=i.PROMPT_LINE.skill,(o=(0,r.firstSentence)(a)).length>n?`${o.slice(0,n).trim()}…`:o):e.description}`}).join("\n"),"styleLines",0,e=>e?.trim()?`## Who they want you to be
2
2
 
3
3
  Their own words, on top of the character above: how you talk to them, how much to say, what to leave out. Where they differ from anything above, theirs wins.
4
4
 
@@ -8,7 +8,9 @@ What they tell you is kept, so you know them better over time.`,"tidying",0,e=>(
8
8
  ${u.length>r.BOT_WORK.readChars?`${u.slice(0,r.BOT_WORK.readChars)}
9
9
  [Cut here; the files it names hold the rest.]`:u}`].filter(Boolean).join("\n\n")}})}}e.s(["createThreadRecallTool",0,m,"sendMessageSpec",0,O,"threadAnswerSpec",0,y,"threadCancelSpec",0,b,"threadSeenSpec",0,T,"threadShowSpec",0,S,"threadStartSpec",0,p,"threadStatusSpec",0,g,"threadTellSpec",0,f]),a()}catch(e){a(e)}},!1),349047,e=>{"use strict";var t=e.i(847841),a=e.i(907855),i=e.i(353885);let n=Object.keys({A:[".##.","#..#","####","#..#","#..#"],B:["###.","#..#","###.","#..#","###."],C:[".###","#...","#...","#...",".###"],D:["###.","#..#","#..#","#..#","###."],E:["####","#...","###.","#...","####"],F:["####","#...","###.","#...","#..."],G:[".###","#...","#.##","#..#",".###"],H:["#..#","#..#","####","#..#","#..#"],I:["###",".#.",".#.",".#.","###"],J:["..##","...#","...#","#..#",".##."],K:["#..#","#.#.","##..","#.#.","#..#"],L:["#...","#...","#...","#...","####"],M:["#...#","##.##","#.#.#","#...#","#...#"],N:["#..#","##.#","#.##","#..#","#..#"],O:[".##.","#..#","#..#","#..#",".##."],P:["###.","#..#","###.","#...","#..."],Q:[".##.","#..#","#..#","#.#.",".#.#"],R:["###.","#..#","###.","#.#.","#..#"],S:[".###","#...",".##.","...#","###."],T:["###",".#.",".#.",".#.",".#."],U:["#..#","#..#","#..#","#..#",".##."],V:["#...#","#...#",".#.#.",".#.#.","..#.."],W:["#...#","#...#","#.#.#","##.##","#...#"],X:["#..#","#..#",".##.","#..#","#..#"],Y:["#.#","#.#",".#.",".#.",".#."],Z:["####","...#",".##.","#...","####"],0:[".##.","#.##","#..#","##.#",".##."],1:[".#.","##.",".#.",".#.","###"],2:["###.","...#",".##.","#...","####"],3:["###.","...#",".##.","...#","###."],4:["#..#","#..#","####","...#","...#"],5:["####","#...","###.","...#","###."],6:[".##.","#...","###.","#..#",".##."],7:["####","...#","..#.",".#..",".#.."],8:[".##.","#..#",".##.","#..#",".##."],9:[".##.","#..#",".###","...#",".##."],"!":["#","#","#",".","#"],"?":["###.","...#",".##.","....",".#.."],".":[".",".",".",".","#"],",":["..","..","..",".#","#."],"'":["#","#",".",".","."],"-":["...","...","###","...","..."],"+":["...",".#.","###",".#.","..."],":":[".","#",".","#","."],"(":[".#","#.","#.","#.",".#"],")":["#.",".#",".#",".#","#."],"<":["..#",".#.","#..",".#.","..#"],">":["#..",".#.","..#",".#.","#.."],"^":[".#.","#.#","...","...","..."],"~":["....",".#.#","#.#.","....","...."],"♥":[".#.#.","#####","#####",".###.","..#.."]," ":["..","..","..","..",".."]}).filter(e=>!/^[A-Z0-9 ]$/.test(e)),r={description:`End the call.
10
10
 
11
- The line stays open until this runs, and drops once the goodbye being said is over.`,parameters:a.object({})},o=(0,t.tool)({description:r.description,inputSchema:r.parameters}),s={description:"Show a short word on your face for a few seconds.",parameters:a.object({text:a.string().describe(`Up to 8 characters: A-Z, 0-9, space and ${n.join(" ")}.`)})},l=(0,t.tool)({description:s.description,inputSchema:s.parameters});e.s(["callTools",0,function(){return{[i.TOOL_NAMES.end_call]:o,[i.TOOL_NAMES.emote]:l}}],349047)},625441,e=>{"use strict";var t=e.i(874533),a=e.i(912714),i=e.i(660526),n=e.i(750227),r=e.i(812057),o=e.i(847841),s=e.i(105249),l=e.i(687388),h=e.i(353885),c=e.i(629668),d=e.i(786025);let u=(0,n.join)(l.APP_DIR,l.PATHS.skills.default,"artifact",l.PATHS.skills.runtime,"deck","deck.mjs"),m=e=>s.default.string().trim().max(e),w=m(100).nullish().describe("A source or a date along the foot of the slide."),p=m(1500).nullish().describe("What the presenter says over it, as speech. Never shown."),f=s.default.object({layout:s.default.literal("cover"),title:m(110).describe("The deck's subject, as its title."),eyebrow:m(40).nullish().describe("A word or two above the title."),subtitle:m(180).nullish().describe("One line under the title."),footer:w,notes:p}),y=s.default.object({layout:s.default.literal("statement"),title:m(120).describe("The one claim, as a sentence."),subtitle:m(140).nullish().describe("One line under it."),notes:p}),g=s.default.object({layout:s.default.literal("cards"),title:m(90).describe("The point the cards make together."),cards:s.default.array(s.default.object({title:m(60).describe("Its point."),text:m(160).nullish().describe("One line under it.")})).min(2).max(4).describe("Two to four, side by side and numbered."),footer:w,notes:p}),b=s.default.object({layout:s.default.literal("number"),value:m(10).describe("The figure as it reads: 1.4M, 62%, £2,900. Only one you were given."),label:m(80).nullish().describe("What it counts, above it."),subtitle:m(160).nullish().describe("What it means or is compared with, under it."),footer:w,notes:p}),S=s.default.object({layout:s.default.literal("table"),title:m(90).describe("What the comparison shows."),columns:s.default.array(m(40)).min(2).max(5).describe("The header row. The first column names the rows; its header may be blank."),rows:s.default.array(s.default.array(m(60))).min(1).max(6).describe("Up to six, a cell for each column."),stress:s.default.number().int().min(0).max(4).nullish().describe("Which column, counted from 0, to set in the accent: the one the slide argues for."),footer:w,notes:p}),T=s.default.object({layout:s.default.literal("quote"),quote:m(280).describe("Someone's own words, exactly as you were given them. Never made up."),who:m(60).describe("Who said it."),role:m(80).nullish().describe("Their role, place or date."),notes:p}),O=s.default.object({layout:s.default.literal("image"),title:m(90).describe("The heading beside the picture."),subtitle:m(280).nullish().describe("A line or two under it."),image:m(500).describe("Workspace path of a png, jpg, webp, gif or svg. It is copied beside the deck."),alt:m(160).describe("What it shows, for someone who cannot see it."),fit:s.default.enum(["fill","whole"]).nullish().describe("fill crops a photo to its box; whole shows a chart or screenshot uncropped. Null for fill."),footer:w,notes:p}),k=s.default.object({layout:s.default.literal("close"),title:m(120).describe("The sentence to repeat to someone who was not there."),steps:s.default.array(s.default.object({label:m(24).describe("A word or two: Next, Owner, By."),text:m(120).describe("What it is.")})).max(3).nullish().describe("Up to three next steps."),notes:p}),$=s.default.object({layout:s.default.literal("timeline"),title:m(90).describe("What the dates show together."),steps:s.default.array(s.default.object({when:m(24).describe("When, as you were given it: a date, a week, a phase."),title:m(60).describe("What happens then."),text:m(120).nullish().describe("One line under it.")})).min(2).max(5).describe("Two to five, in order, along one line."),footer:w,notes:p}),_=s.default.object({layout:s.default.literal("compare"),title:m(90).describe("What changes between the two, as a sentence."),sides:s.default.array(s.default.object({label:m(30).describe("Which side it is: Now, After, Option A."),points:s.default.array(m(90)).min(1).max(4)})).length(2).describe("The two, left then right; the right is set in the accent: the side the slide argues for."),footer:w,notes:p}),v=s.default.object({layout:s.default.literal("stats"),title:m(90).describe("What the figures say together."),stats:s.default.array(s.default.object({value:m(12).describe("The figure as it reads: 1.4M, 62%, 6 hours. Only one you were given."),label:m(80).describe("What it counts, under it.")})).min(2).max(4).describe("Two to four figures side by side."),footer:w,notes:p}),A=s.default.discriminatedUnion("layout",[f,y,g,b,S,T,O,$,_,v,k]),M=s.default.object({deck:m(300).describe("A name for a new deck, or the name or workspace path of one to change. A deck another bot made is reached by its path."),title:m(90).describe("The deck's title, shown in its head."),theme:s.default.enum(["forest","sea","clay","ink"]).nullish().describe("forest (deep green on paper, serif headings), sea (blue, sans), clay (terracotta on warm paper, serif) or ink (gold on near-black, sans). Null keeps the deck's own; a new one starts in forest."),revision:s.default.string().nullish().describe("What the last call on this deck answered with. Null for a new deck."),slides:s.default.array(A).min(1).max(l.DECK.slides).describe("Every slide in order: the whole deck, each time. Someone who reads only the titles follows the argument; one idea a slide.")}),E=/^[\p{L}\p{N}][\p{L}\p{N}_-]{0,79}$/u,N=/^(slide-\d+|slides)\.png$/i;class x extends Error{}function L(e){let t=e.replace(/[^\p{L}\p{N}_-]+/gu,"-").replace(/^[-_]+|-+$/g,"").slice(0,80);if(!E.test(t))throw new x(`"${e}" is not a deck name: use letters, numbers, - and _.`);return t}async function j(e,t){let i=(0,d.botArtifacts)(t);if(!e.includes("/")&&!e.endsWith(".html")){let t=L(e);return`${i}/${t}/${t}.html`}let r=await (0,d.insideWorkspace)(e);if(!r)throw new x(`${e} is outside the workspace. Give a deck's path in it.`);let o=await (0,a.realpath)(d.WORKSPACE).catch(()=>d.WORKSPACE),s=await (0,a.stat)(r).catch(()=>null),l=s?.isDirectory()?(0,n.join)(r,`${(0,n.basename)(r)}.html`):r;if((await (0,a.stat)(l).catch(()=>null))?.isFile())return(0,n.relative)(o,l);let h=await (0,d.insideWorkspace)(i);if(!h||!r.startsWith(`${h}${n.sep}`))throw new x(`There is no deck at ${e}. A new deck is made in your own folder: give it a name.`);let c=L((0,n.basename)(r,".html"));return(0,n.relative)(o,(0,n.join)((0,n.dirname)(r),c,`${c}.html`))}async function R(e,t,i){let r=new Map,o=[];for(let[s,l]of e.entries()){if("table"===l.layout){let e=l.rows.findIndex(e=>e.length>l.columns.length);if(-1!==e)throw new x(`Slide ${s+1}: row ${e+1} has ${l.rows[e].length} cells, and there are ${l.columns.length} columns.`);o.push({...l,rows:l.rows.map(e=>l.columns.map((t,a)=>e[a]??""))});continue}if("image"!==l.layout){o.push(l);continue}let e=t.resolve(i),h=(0,n.join)(e,l.image),d=!l.image.includes("/")&&await (0,a.stat)(h).catch(()=>null)?h:t.resolve(l.image);if("image"!==(0,c.viewKindOf)(d))throw new x(`Slide ${s+1}: ${l.image} is not a picture. Give a png, jpg, webp, gif or svg.`);if(!(await (0,a.stat)(d).catch(()=>null))?.isFile())throw new x(`Slide ${s+1}: there is no file at ${l.image}. Give its path from the workspace root, as \`ls\` shows it.`);let u=r.get(d);u||(u=(0,n.dirname)(d)===e?(0,n.basename)(d):function(e,t){let a=(0,n.extname)(e),i=(0,n.basename)(e,a),r=N.test(e)?`picture-${i}`:i,o=`${r}${a}`;for(let e=2;t.has(o);e++)o=`${r}-${e}${a}`;return o}((0,n.basename)(d),new Set(r.values())),r.set(d,u),(0,n.dirname)(d)!==e&&(await (0,a.mkdir)(e,{recursive:!0}),await (0,a.copyFile)(d,(0,n.join)(e,u)))),o.push({...l,image:u})}return o}let I=(0,r.promisify)(t.execFile);async function C(e,t,r,o,s){let l=await (0,a.mkdtemp)((0,n.join)((0,i.tmpdir)(),"thursday-deck-"));try{let i=(0,n.join)(l,"deck.json");await (0,a.writeFile)(i,JSON.stringify(t));let h=[u,"put",(0,n.join)(d.WORKSPACE,e),i];r&&h.push("--revision",r);let c=await I(process.execPath,h,{env:{NODE_ENV:"production",PATH:process.env.PATH??"",THURSDAY_BOT:o,...s?{THURSDAY_BOT_MARK:s}:{}},maxBuffer:0x1000000}).catch(e=>{if(3===e.code&&e.stdout)return{stdout:e.stdout};throw new x(e.stderr?.trim().split("\n").at(-1)||"The deck could not be written.")});return JSON.parse(c.stdout.trim().split("\n").at(-1)??"")}finally{await (0,a.rm)(l,{recursive:!0,force:!0})}}async function W(e,t,a,i){let r=await e.exec('node "$DECK_SCRIPT" shots "$DECK_FILE"',{env:{...a,DECK_SCRIPT:u,DECK_FILE:(0,n.join)(d.WORKSPACE,t)},timeoutMs:l.DECK.shotsMs,signal:i});if(0!==r.exitCode)return{failed:r.stderr.trim().split("\n").at(-1)||"no pictures were made"};let o=JSON.parse(r.stdout.trim().split("\n").at(-1)??"{}");return{pictures:o.pictures.map(e=>(0,n.relative)(d.WORKSPACE,e)),sheet:o.sheet?(0,n.relative)(d.WORKSPACE,o.sheet):null,cut:o.cut}}e.s(["createDeckTools",0,(e,t,i,r)=>({[h.TOOL_NAMES.make_deck]:(0,o.tool)({description:"Make a slide deck, or change one: each slide a layout whose fields you fill, drawn and fitted by the app into one HTML file that opens offline, presents full screen and prints a slide a page, with a picture of every slide beside it.",inputSchema:M,execute:async(a,{abortSignal:r})=>{try{let o,s=await j(a.deck,t),l=await R(a.slides,e,(0,n.dirname)(s)),c=await C(s,{title:a.title,theme:a.theme??null,slides:l},a.revision?.trim()??"",t,i.THURSDAY_BOT_MARK);if("changed"in c){if(!c.deck)return`${s} is not a deck made of slides, so it cannot be changed here. Give the deck another name.`;let e=a.revision?.trim()?`${s} has changed since that revision — edited in the app, or by another job`:`there is already a deck at ${s}`;return{deck:s,revision:c.revision,note:`Nothing was written: ${e}. This is the deck as it stands. To change it, make your change on these slides and call \`${h.TOOL_NAMES.make_deck}\` again with revision ${c.revision} and the whole deck; for a deck of its own, give a new name.`,current:c.deck}}let d=`${l.length} slide${1===l.length?"":"s"}, revision ${c.revision}`,u=await W(e,s,i,r);if("failed"in u)return`${s}
11
+ The line stays open until this runs, and drops once the goodbye being said is over.`,parameters:a.object({})},o=(0,t.tool)({description:r.description,inputSchema:r.parameters}),s={description:"Show a short word on your face for a few seconds.",parameters:a.object({text:a.string().describe(`Up to 8 characters: A-Z, 0-9, space and ${n.join(" ")}.`)})},l=(0,t.tool)({description:s.description,inputSchema:s.parameters}),h={description:`See the screen the user is sharing with you, as it is at this moment.
12
+
13
+ The picture comes right after this result. When they are not sharing, the result says so.`,parameters:a.object({})},c=(0,t.tool)({description:h.description,inputSchema:h.parameters});e.s(["callTools",0,function(){return{[i.TOOL_NAMES.end_call]:o,[i.TOOL_NAMES.emote]:l,[i.TOOL_NAMES.look_at_screen]:c}}],349047)},625441,e=>{"use strict";var t=e.i(874533),a=e.i(912714),i=e.i(660526),n=e.i(750227),r=e.i(812057),o=e.i(847841),s=e.i(105249),l=e.i(687388),h=e.i(353885),c=e.i(629668),d=e.i(786025);let u=(0,n.join)(l.APP_DIR,l.PATHS.skills.default,"artifact",l.PATHS.skills.runtime,"deck","deck.mjs"),m=e=>s.default.string().trim().max(e),w=m(100).nullish().describe("A source or a date along the foot of the slide."),p=m(1500).nullish().describe("What the presenter says over it, as speech. Never shown."),f=s.default.object({layout:s.default.literal("cover"),title:m(110).describe("The deck's subject, as its title."),eyebrow:m(40).nullish().describe("A word or two above the title."),subtitle:m(180).nullish().describe("One line under the title."),footer:w,notes:p}),y=s.default.object({layout:s.default.literal("statement"),title:m(120).describe("The one claim, as a sentence."),subtitle:m(140).nullish().describe("One line under it."),notes:p}),g=s.default.object({layout:s.default.literal("cards"),title:m(90).describe("The point the cards make together."),cards:s.default.array(s.default.object({title:m(60).describe("Its point."),text:m(160).nullish().describe("One line under it.")})).min(2).max(4).describe("Two to four, side by side and numbered."),footer:w,notes:p}),b=s.default.object({layout:s.default.literal("number"),value:m(10).describe("The figure as it reads: 1.4M, 62%, £2,900. Only one you were given."),label:m(80).nullish().describe("What it counts, above it."),subtitle:m(160).nullish().describe("What it means or is compared with, under it."),footer:w,notes:p}),S=s.default.object({layout:s.default.literal("table"),title:m(90).describe("What the comparison shows."),columns:s.default.array(m(40)).min(2).max(5).describe("The header row. The first column names the rows; its header may be blank."),rows:s.default.array(s.default.array(m(60))).min(1).max(6).describe("Up to six, a cell for each column."),stress:s.default.number().int().min(0).max(4).nullish().describe("Which column, counted from 0, to set in the accent: the one the slide argues for."),footer:w,notes:p}),T=s.default.object({layout:s.default.literal("quote"),quote:m(280).describe("Someone's own words, exactly as you were given them. Never made up."),who:m(60).describe("Who said it."),role:m(80).nullish().describe("Their role, place or date."),notes:p}),O=s.default.object({layout:s.default.literal("image"),title:m(90).describe("The heading beside the picture."),subtitle:m(280).nullish().describe("A line or two under it."),image:m(500).describe("Workspace path of a png, jpg, webp, gif or svg. It is copied beside the deck."),alt:m(160).describe("What it shows, for someone who cannot see it."),fit:s.default.enum(["fill","whole"]).nullish().describe("fill crops a photo to its box; whole shows a chart or screenshot uncropped. Null for fill."),footer:w,notes:p}),k=s.default.object({layout:s.default.literal("close"),title:m(120).describe("The sentence to repeat to someone who was not there."),steps:s.default.array(s.default.object({label:m(24).describe("A word or two: Next, Owner, By."),text:m(120).describe("What it is.")})).max(3).nullish().describe("Up to three next steps."),notes:p}),$=s.default.object({layout:s.default.literal("timeline"),title:m(90).describe("What the dates show together."),steps:s.default.array(s.default.object({when:m(24).describe("When, as you were given it: a date, a week, a phase."),title:m(60).describe("What happens then."),text:m(120).nullish().describe("One line under it.")})).min(2).max(5).describe("Two to five, in order, along one line."),footer:w,notes:p}),_=s.default.object({layout:s.default.literal("compare"),title:m(90).describe("What changes between the two, as a sentence."),sides:s.default.array(s.default.object({label:m(30).describe("Which side it is: Now, After, Option A."),points:s.default.array(m(90)).min(1).max(4)})).length(2).describe("The two, left then right; the right is set in the accent: the side the slide argues for."),footer:w,notes:p}),v=s.default.object({layout:s.default.literal("stats"),title:m(90).describe("What the figures say together."),stats:s.default.array(s.default.object({value:m(12).describe("The figure as it reads: 1.4M, 62%, 6 hours. Only one you were given."),label:m(80).describe("What it counts, under it.")})).min(2).max(4).describe("Two to four figures side by side."),footer:w,notes:p}),A=s.default.discriminatedUnion("layout",[f,y,g,b,S,T,O,$,_,v,k]),M=s.default.object({deck:m(300).describe("A name for a new deck, or the name or workspace path of one to change. A deck another bot made is reached by its path."),title:m(90).describe("The deck's title, shown in its head."),theme:s.default.enum(["forest","sea","clay","ink"]).nullish().describe("forest (deep green on paper, serif headings), sea (blue, sans), clay (terracotta on warm paper, serif) or ink (gold on near-black, sans). Null keeps the deck's own; a new one starts in forest."),revision:s.default.string().nullish().describe("What the last call on this deck answered with. Null for a new deck."),slides:s.default.array(A).min(1).max(l.DECK.slides).describe("Every slide in order: the whole deck, each time. Someone who reads only the titles follows the argument; one idea a slide.")}),E=/^[\p{L}\p{N}][\p{L}\p{N}_-]{0,79}$/u,N=/^(slide-\d+|slides)\.png$/i;class x extends Error{}function L(e){let t=e.replace(/[^\p{L}\p{N}_-]+/gu,"-").replace(/^[-_]+|-+$/g,"").slice(0,80);if(!E.test(t))throw new x(`"${e}" is not a deck name: use letters, numbers, - and _.`);return t}async function j(e,t){let i=(0,d.botArtifacts)(t);if(!e.includes("/")&&!e.endsWith(".html")){let t=L(e);return`${i}/${t}/${t}.html`}let r=await (0,d.insideWorkspace)(e);if(!r)throw new x(`${e} is outside the workspace. Give a deck's path in it.`);let o=await (0,a.realpath)(d.WORKSPACE).catch(()=>d.WORKSPACE),s=await (0,a.stat)(r).catch(()=>null),l=s?.isDirectory()?(0,n.join)(r,`${(0,n.basename)(r)}.html`):r;if((await (0,a.stat)(l).catch(()=>null))?.isFile())return(0,n.relative)(o,l);let h=await (0,d.insideWorkspace)(i);if(!h||!r.startsWith(`${h}${n.sep}`))throw new x(`There is no deck at ${e}. A new deck is made in your own folder: give it a name.`);let c=L((0,n.basename)(r,".html"));return(0,n.relative)(o,(0,n.join)((0,n.dirname)(r),c,`${c}.html`))}async function R(e,t,i){let r=new Map,o=[];for(let[s,l]of e.entries()){if("table"===l.layout){let e=l.rows.findIndex(e=>e.length>l.columns.length);if(-1!==e)throw new x(`Slide ${s+1}: row ${e+1} has ${l.rows[e].length} cells, and there are ${l.columns.length} columns.`);o.push({...l,rows:l.rows.map(e=>l.columns.map((t,a)=>e[a]??""))});continue}if("image"!==l.layout){o.push(l);continue}let e=t.resolve(i),h=(0,n.join)(e,l.image),d=!l.image.includes("/")&&await (0,a.stat)(h).catch(()=>null)?h:t.resolve(l.image);if("image"!==(0,c.viewKindOf)(d))throw new x(`Slide ${s+1}: ${l.image} is not a picture. Give a png, jpg, webp, gif or svg.`);if(!(await (0,a.stat)(d).catch(()=>null))?.isFile())throw new x(`Slide ${s+1}: there is no file at ${l.image}. Give its path from the workspace root, as \`ls\` shows it.`);let u=r.get(d);u||(u=(0,n.dirname)(d)===e?(0,n.basename)(d):function(e,t){let a=(0,n.extname)(e),i=(0,n.basename)(e,a),r=N.test(e)?`picture-${i}`:i,o=`${r}${a}`;for(let e=2;t.has(o);e++)o=`${r}-${e}${a}`;return o}((0,n.basename)(d),new Set(r.values())),r.set(d,u),(0,n.dirname)(d)!==e&&(await (0,a.mkdir)(e,{recursive:!0}),await (0,a.copyFile)(d,(0,n.join)(e,u)))),o.push({...l,image:u})}return o}let I=(0,r.promisify)(t.execFile);async function C(e,t,r,o,s){let l=await (0,a.mkdtemp)((0,n.join)((0,i.tmpdir)(),"thursday-deck-"));try{let i=(0,n.join)(l,"deck.json");await (0,a.writeFile)(i,JSON.stringify(t));let h=[u,"put",(0,n.join)(d.WORKSPACE,e),i];r&&h.push("--revision",r);let c=await I(process.execPath,h,{env:{NODE_ENV:"production",PATH:process.env.PATH??"",THURSDAY_BOT:o,...s?{THURSDAY_BOT_MARK:s}:{}},maxBuffer:0x1000000}).catch(e=>{if(3===e.code&&e.stdout)return{stdout:e.stdout};throw new x(e.stderr?.trim().split("\n").at(-1)||"The deck could not be written.")});return JSON.parse(c.stdout.trim().split("\n").at(-1)??"")}finally{await (0,a.rm)(l,{recursive:!0,force:!0})}}async function W(e,t,a,i){let r=await e.exec('node "$DECK_SCRIPT" shots "$DECK_FILE"',{env:{...a,DECK_SCRIPT:u,DECK_FILE:(0,n.join)(d.WORKSPACE,t)},timeoutMs:l.DECK.shotsMs,signal:i});if(0!==r.exitCode)return{failed:r.stderr.trim().split("\n").at(-1)||"no pictures were made"};let o=JSON.parse(r.stdout.trim().split("\n").at(-1)??"{}");return{pictures:o.pictures.map(e=>(0,n.relative)(d.WORKSPACE,e)),sheet:o.sheet?(0,n.relative)(d.WORKSPACE,o.sheet):null,cut:o.cut}}e.s(["createDeckTools",0,(e,t,i,r)=>({[h.TOOL_NAMES.make_deck]:(0,o.tool)({description:"Make a slide deck, or change one: each slide a layout whose fields you fill, drawn and fitted by the app into one HTML file that opens offline, presents full screen and prints a slide a page, with a picture of every slide beside it.",inputSchema:M,execute:async(a,{abortSignal:r})=>{try{let o,s=await j(a.deck,t),l=await R(a.slides,e,(0,n.dirname)(s)),c=await C(s,{title:a.title,theme:a.theme??null,slides:l},a.revision?.trim()??"",t,i.THURSDAY_BOT_MARK);if("changed"in c){if(!c.deck)return`${s} is not a deck made of slides, so it cannot be changed here. Give the deck another name.`;let e=a.revision?.trim()?`${s} has changed since that revision — edited in the app, or by another job`:`there is already a deck at ${s}`;return{deck:s,revision:c.revision,note:`Nothing was written: ${e}. This is the deck as it stands. To change it, make your change on these slides and call \`${h.TOOL_NAMES.make_deck}\` again with revision ${c.revision} and the whole deck; for a deck of its own, give a new name.`,current:c.deck}}let d=`${l.length} slide${1===l.length?"":"s"}, revision ${c.revision}`,u=await W(e,s,i,r);if("failed"in u)return`${s}
12
14
  ${d}. The pictures of its slides could not be made (${u.failed}), so nothing checked that every slide fits. Hand back the deck's path.`;let m=`call \`${h.TOOL_NAMES.make_deck}\` again with revision ${c.revision} and the whole deck`,w=u.sheet?`${(0,n.basename)(u.sheet)} holds every slide, numbered, and each is on its own beside it from slide-01.png`:"Its pictures are beside it, slide-01.png on";return[s,u.sheet??u.pictures[0]??"",u.cut.length?`${d}. ${o=u.cut,1===o.length?`Slide ${o[0]} does`:`Slides ${o.slice(0,-1).join(", ")} and ${o.at(-1)} do`} not fit even with the type at its smallest: say less there, then ${m}. ${w}.`:`${d}. Every slide fits. ${w}. Hand back the deck's path; to change it, ${m}.`].filter(Boolean).join("\n")}catch(e){if(e instanceof x)return e.message;throw e}},toModelOutput:async({output:e})=>{if("string"!=typeof e)return{type:"json",value:e};let t=e.split("\n")[1]??"";if(!r||!t.endsWith(".png"))return{type:"text",value:e};let i=await (0,d.insideWorkspace)(t),n=i?await (0,a.readFile)(i).catch(()=>null):null;return!n||n.byteLength>l.LOOK.maxBytes?{type:"text",value:e}:{type:"content",value:[{type:"text",text:`${e}
13
15
 
14
16
  ${t}, as an image:`},{type:"file",mediaType:"image/png",data:{type:"data",data:n.toString("base64")}}]}}})})])},170801,e=>{"use strict";var t=e.i(912714),a=e.i(847841),i=e.i(105249),n=e.i(687388),r=e.i(353885),o=e.i(629668),s=e.i(786025);e.s(["createLookTool",0,function(){return{[r.TOOL_NAMES.look_at]:(0,a.tool)({description:"See an image file yourself: a screenshot you took, a picture the user handed over, a chart you made. For what a picture shows — text files are read in the shell.",inputSchema:i.default.object({path:i.default.string().describe("Workspace-relative path to a png, jpg, webp or gif.")}),execute:async({path:e})=>{let a=await (0,s.insideWorkspace)(e.trim()),i=a?await (0,t.stat)(a).catch(()=>null):null;return a&&i?.isFile()?"image"!==(0,o.viewKindOf)(e)?`${e} is not an image. Read it in the shell instead.`:i.size>n.LOOK.maxBytes?`${e} is ${Math.ceil(i.size/1024/1024)} MB, over the ${n.LOOK.maxBytes/1024/1024} MB one look takes. Make a smaller copy in the shell first (on a Mac: sips -Z 1600 in.png --out out.png), then look at that.`:{path:e.trim(),mediaType:(0,o.mimeOf)(e)}:`There is no file at ${e}. Give the path from the workspace root, as \`ls\` shows it.`},toModelOutput:async({output:e})=>{if("string"==typeof e)return{type:"text",value:e};let a=await (0,s.insideWorkspace)(e.path),i=a?await (0,t.readFile)(a).catch(()=>null):null;return i?{type:"content",value:[{type:"text",text:`${e.path}, as an image:`},{type:"file",mediaType:e.mediaType,data:{type:"data",data:i.toString("base64")}}]}:{type:"text",value:`${e.path} is no longer there.`}}})}}])},926435,e=>e.a(async(t,a)=>{try{var i=e.i(847841),n=e.i(907855),r=e.i(687388),o=e.i(353885),s=e.i(148831),l=e.i(786025),h=e.i(660948),c=t([s,h]);[s,h]=c.then?(await c)():c;let m={[o.TOOL_NAMES.tool_search]:{description:`Return the description and exact inputSchema of tools on a connected server, so they can be called with \`${o.TOOL_NAMES.tool_call}\`.`,parameters:n.object({server:n.string().describe("A server name, exactly as the Connected tools section writes it."),tools:n.string().array().describe(`Tool names listed under that server. Only the ones you may actually call — schemas are large, and at most ${r.TOOL_SEARCH_SCHEMAS} come back.`)})},[o.TOOL_NAMES.tool_call]:{description:`Run one tool whose definition came back from \`${o.TOOL_NAMES.tool_search}\`.`,parameters:n.object({server:n.string().describe("The server the tool lives on."),tool:n.string().describe("Its name, as search returned it."),args:n.looseObject({}).nullish().describe("Arguments matching the inputSchema search returned — do not guess. Null when it takes none."),description:n.string().nullish().describe("One short line for the user: what this call is for. Shown on their screen while it runs.")})}},w=(e,t)=>`${e.replace(/[^a-zA-Z0-9]+/g,"_")}__${t.replace(/[^a-zA-Z0-9_-]+/g,"_")}`.slice(0,64);async function d(e,t){let[a,n]=await Promise.all([(0,h.listConnectedToolNames)(),(0,s.findPinnedTools)(e)]),r={},o=(0,l.botArtifacts)(e);for(let e of n){let a=w(e.server,e.name);r[a]||(r[a]=(0,i.tool)({description:e.description??`${e.name} on the ${e.server} server.`,inputSchema:(0,i.jsonSchema)(e.inputSchema??{type:"object",properties:{}}),execute:(a,{abortSignal:i})=>(0,h.callConnectedTool)(t,e.server,e.name,a??void 0,{artifacts:o,abortSignal:i})}))}return a.length>n.length&&Object.assign(r,p(t,o)),r}async function u(e){let t=(await (0,h.listConnectedToolNames)(e)).map(e=>e.name);if(t.length)return`Tools on "${e}": ${t.join(", ")}.`;let a=await (0,h.listConnectedServerNames)();return a.length?`There is no server called "${e}". Connected: ${a.join(", ")}.`:"Nothing is connected."}let p=(e,t)=>({[o.TOOL_NAMES.tool_search]:(0,i.tool)({description:m[o.TOOL_NAMES.tool_search].description,inputSchema:m[o.TOOL_NAMES.tool_search].parameters,execute:async({server:e,tools:t})=>{let a=[...new Set(t.map(e=>e.trim()).filter(Boolean))],i=a.slice(0,r.TOOL_SEARCH_SCHEMAS),n=await (0,h.findConnectedSchemas)(e.trim(),i);if(!n.length)return{tools:[],note:await u(e)};let o=i.filter(e=>!n.some(t=>t.name===e)),s=a.slice(r.TOOL_SEARCH_SCHEMAS),l=[o.length?`Not on "${e}": ${o.join(", ")}.`:"",s.length?`Only ${r.TOOL_SEARCH_SCHEMAS} at a time — ask again for: ${s.join(", ")}.`:""].filter(Boolean);return{tools:n,...l.length?{note:l.join(" ")}:{}}}}),[o.TOOL_NAMES.tool_call]:(0,i.tool)({description:m[o.TOOL_NAMES.tool_call].description,inputSchema:m[o.TOOL_NAMES.tool_call].parameters,execute:async({server:a,tool:i,args:n},{abortSignal:r})=>(await (0,h.listConnectedToolNames)(a.trim())).some(e=>e.name===i.trim())?(0,h.callConnectedTool)(e,a.trim(),i.trim(),n??void 0,{artifacts:t,abortSignal:r}):{status:"error",text:await u(a)}})});e.s(["createMcpTools",0,d]),a()}catch(e){a(e)}},!1),770639,e=>e.a(async(t,a)=>{try{var i=e.i(847841),n=e.i(907855),r=e.i(687388),o=e.i(54282),s=e.i(353885),l=e.i(619898),h=e.i(453569),c=t([l]);[l]=c.then?(await c)():c;let d=h.MEMORY_PATHS.map(e=>e.path.endsWith("/")?`${e.path}<name>`:e.path).join(", "),u="Saved. The listing in your instructions is from when this session opened and will not show this until the next one — the note below is current.",m=e=>`Nothing on the listing called ${e}.`,w=e=>({...e,facts:e.facts.map(({saidAt:e,...t})=>e?{...t,said:(0,o.saidStamp)(e)}:t),factCount:e.facts.length}),p=e=>e>r.MEMORY_LIMITS.factsPerNote?` This note now holds ${e} facts, past the ${r.MEMORY_LIMITS.factsPerNote} one note holds well. Ask the user which of it is no longer true and delete what they name.`:"",f=e=>e.length>r.MEMORY_LIMITS.descriptionChars?{note:`That line runs to ${e.length} characters; a note's line is one line, under ${r.MEMORY_LIMITS.descriptionChars}. Say what the note is about — the facts inside say the rest.`}:null,y=n.string().describe("Exactly as the listing writes it — the path."),g=n.string().describe('One statement that stands on its own later — a date as a date, never "next week".');e.s(["createMemoryTools",0,(e,t=null,{countReads:a=!0,tidies:r=!0}={})=>({[s.TOOL_NAMES.memory_recall]:(0,i.tool)({description:"Open one note from the listing, whole.",inputSchema:n.object({path:y}),execute:async({path:e})=>{let{notes:t}=await (0,l.readNotes)([e],{touch:a}),i=t[0];if(!i)return{note:m(e.trim())};let n=r?p(i.facts.length):"";return n?{...w(i),note:n.trim()}:w(i)}}),[s.TOOL_NAMES.memory_create]:(0,i.tool)({description:"Start a note for a subject that is not on the listing: its path, the line it is listed by, and its first facts.",inputSchema:n.object({path:n.string().describe(`A new path following the listing's convention — one of ${d} — for the person, project or topic the facts are about. A fact goes under the one note it is about; other notes name it rather than repeat it.`),description:n.string().describe("One line saying what this note is about, with the names the user calls it by, so the listing alone tells whether to open it. What it is about — never a list of what is inside."),facts:n.object({text:g}).array().min(1).describe("What to keep under it. Send everything that came up at once: one call is one pause in the conversation, three calls are three.")}),execute:async({path:a,description:i,facts:n})=>{let r=a.trim(),o=i.trim();if(!(0,h.isMemoryPath)(r))return{note:`Nothing was saved: "${r}" is not a path this listing can carry. Write it again under one of ${d}.`};if((0,h.isAlwaysListed)(r))return{note:`${r} is always on the listing: \`${s.TOOL_NAMES.memory_remember}\` adds to it.`};let c=f(o);if(c)return c;let m=await (0,l.createNoteWithFacts)(r,o,n,e,t);if(!m)return{note:`${r} is already on the listing: \`${s.TOOL_NAMES.memory_remember}\` adds to it, \`${s.TOOL_NAMES.memory_describe}\` changes its line.`};let y=w(m);return{...y,note:`${u}${p(y.factCount)}`}}}),[s.TOOL_NAMES.memory_remember]:(0,i.tool)({description:"Write facts under a note that is on the listing.",inputSchema:n.object({path:y,facts:n.object({text:g,replaces:n.number().int().nullish().describe(`The id of the fact this replaces — from this note as handed back here or by \`${s.TOOL_NAMES.memory_recall}\`. Null if this is new. A fact that stopped being true is replaced rather than deleted, and so is a note saying the same thing twice: replacing keeps what changed on the record, deleting does not.`)}).array().min(1).describe("What to write under this note. Send everything that came up at once: one call is one pause in the conversation, three calls are three.")}),execute:async({path:a,facts:i})=>{let n=a.trim(),r=await (0,l.writeFacts)(n,i,e,t);if(!r)return{note:`${m(n)} A subject that is not on the listing gets a note of its own: \`${s.TOOL_NAMES.memory_create}\`, with its line.`};let o=w(r);return{...o,note:`${u}${p(o.factCount)}`}}}),[s.TOOL_NAMES.memory_describe]:(0,i.tool)({description:"Change the line a note is listed by, when it no longer says what the note is about.",inputSchema:n.object({path:y,description:n.string().describe("The new line, whole: what this note is about, with the names the user calls it by. Never a list of what is inside.")}),execute:async({path:e,description:t})=>{let a=e.trim(),i=t.trim();if((0,h.isAlwaysListed)(a))return{note:`${h.MEMORY_ALWAYS_LISTED.join(" and ")} keep their own line; it is not yours to change.`};let n=f(i);return n||(await (0,l.describeNote)(a,i)?{path:a,description:i,note:"Renamed. The listing in your instructions is from when this session opened and still shows the old line until the next one."}:{note:m(a)})}}),[s.TOOL_NAMES.memory_forget]:(0,i.tool)({description:"Delete facts for good.",inputSchema:n.object({factIds:n.number().int().array().min(1).describe("The ids that came with the facts when their notes were opened — every one to delete, in one call.")}),execute:async({factIds:e})=>{let t=[],a=[],i=new Set;for(let n of new Set(e)){let e=await (0,l.forgetFactById)(n);if(!e){t.push(n);continue}e.noteGone?(i.delete(e.path),a.push(e.path)):i.add(e.path)}if(!a.length&&!i.size)return{note:`No fact with id ${t.join(", ")}. Nothing was deleted.`};let n=["Deleted for good. The listing in your instructions is from when this session opened and still shows it that way until the next one.",1===a.length?`That was the last fact under ${a[0]}, so the note went with it.`:a.length?`That was the last of ${a.join(", ")}, so those notes went with them.`:"",t.length?`No fact with id ${t.join(", ")}, so those were skipped.`:""].filter(Boolean).join(" ");if(!i.size)return{note:n};let{notes:r}=await (0,l.readNotes)([...i],{touch:!1});return{notes:r.map(w),note:n}}})})]),a()}catch(e){a(e)}},!1),418919,e=>e.a(async(t,a)=>{try{var i=e.i(847841),n=e.i(907855),r=e.i(687388),o=e.i(353885),s=e.i(265143),l=e.i(963219),h=e.i(473139),c=e.i(704161),d=e.i(53748),u=e.i(41444),m=t([s,l]);[s,l]=m.then?(await m)():m;let f={description:`Routines: work that starts by itself, each one a bot, the work and a time — once at a moment, a time of day on chosen days, or every few hours. List them, make one, change one, or delete one. Every start opens a thread like one started by hand; its result reaches the conversation the same way. At most ${r.ROUTINE.max} exist.`,parameters:n.object({action:n.enum(["list","create","change","delete"]),routine:n.string().nullish().describe("With change or delete: the routine, by its name or ID."),bot:n.string().nullish().describe("With create: a name from the bot list. With change: a new bot."),label:n.string().nullish().describe("With create: two or three words naming it, in the user's language. It names every thread the routine opens, on screen and out loud."),request:n.string().nullish().describe("With create: the whole of the work, handed to the bot as written every time it starts. Nobody is there then to fill in what is missing, so everything it needs goes here, in the user's own language and words. Their request, never your reading of it."),at:n.string().nullish().describe('Starts once, at this moment, "YYYY-MM-DD HH:MM" in the user\'s own time, then switches itself off. Count "in an hour" or "tomorrow at eight" from **Now**. Give one of `at`, `time` or `everyHours`.'),time:n.string().nullish().describe('Starts at this time of day, 24-hour "HH:MM" in the user\'s own time, on `days`. Give one of `at`, `time` or `everyHours`.'),days:n.array(n.number().int().min(1).max(7)).nullish().describe("With `time`: the days it starts, 1 Monday to 7 Sunday. Omit for every day."),everyHours:n.number().int().nullish().describe(`Starts again this many hours after it last started, ${r.ROUTINE.minHours} at least. Give one of \`at\`, \`time\` or \`everyHours\`.`),enabled:n.boolean().nullish().describe("With change: false switches it off without deleting it, true back on.")})};function w(e){let t=e.runs[0];return{id:e.id,label:e.label,bot:e.bot,when:(0,h.scheduleText)(e.schedule),enabled:e.enabled,...e.enabled?{next:(0,c.whenOf)((0,c.toDate)(e.nextRunAt))}:{},request:(0,u.clip)(e.request,r.PROMPT_LINE.routineRequest),...t?{lastRun:{thread:t.id,status:t.status,at:(0,c.whenOf)((0,c.toDate)(t.updatedAt)),...t.outcome?{outcome:(0,u.clip)(t.outcome,r.PROMPT_LINE.routineOutcome)}:{}}}:{}}}let y=e=>{if((0,d.isPublicError)(e))return e.message;throw e};async function p(e){let t=(await (0,l.listRoutines)()).map(e=>`"${e.label}"`);return t.length?e?`There is no single routine called "${e}". The routines are: ${t.join(", ")}. Call again with one of those, or its ID.`:`Name the routine. The routines are: ${t.join(", ")}.`:"There are no routines yet."}e.s(["createRoutineTools",0,function(){return{[o.TOOL_NAMES.routine]:(0,i.tool)({description:f.description,inputSchema:f.parameters,execute:async e=>{if("list"===e.action)return{routines:(await (0,l.listRoutines)()).map(w)};let t=function(e){if([e.at,e.time,e.everyHours].filter(Boolean).length>1)return"Give one of `at`, `time` or `everyHours`, not two.";let t=e.at?{kind:"once",at:e.at}:e.time?{kind:"daily",time:e.time,days:e.days?.length?e.days:[1,2,3,4,5,6,7]}:e.everyHours?{kind:"every",hours:e.everyHours}:null;if(!t)return null;let a=h.RoutineScheduleSchema.safeParse(t);return a.success?a.data:a.error.issues[0].message}(e);if("string"==typeof t)return t;if("create"===e.action){if(!t)return"Say when it starts: `at`, `time` (with `days`), or `everyHours`.";let a=h.RoutineInputSchema.safeParse({bot:e.bot??"",label:e.label??"",request:e.request??"",schedule:t});if(!a.success)return`${a.error.issues[0].message}. Nothing was made — call again with bot, label, request and when.`;let i=(await (0,s.listJobBots)()).map(e=>e.name);if(!i.some(e=>e.toLowerCase()===a.data.bot.toLowerCase()))return`There is no bot called "${a.data.bot}". The bots are: ${i.join(", ")}. Nothing was made — call again with one of those.`;let n=await (0,l.createRoutine)(a.data).catch(y);if("string"==typeof n)return n;let r=(0,c.whenOf)((0,c.toDate)(n.nextRunAt));return{...w(n),note:"once"===n.schedule.kind?`${n.bot} starts "${n.label}" once, ${r}, and the routine then switches itself off. The start is a thread of its own, and its result reaches the conversation like any thread's.`:`${n.bot} starts "${n.label}" by itself, ${(0,h.scheduleText)(n.schedule)}, first ${r}. Each start is a thread of its own, and its result reaches the conversation like any thread's.`}}let a=e.routine?await (0,l.resolveRoutine)(e.routine):null;if(!a)return await p(e.routine);if("delete"===e.action)return await (0,l.deleteRoutine)(a.id),`"${a.label}" is deleted and starts no more. The threads it already opened stay.`;let i={...e.bot?{bot:e.bot}:{},...e.label?.trim()?{label:e.label.trim()}:{},...e.request?.trim()?{request:e.request.trim()}:{},...t?{schedule:t}:{},..."boolean"==typeof e.enabled?{enabled:e.enabled}:{}};if(!Object.keys(i).length)return"Nothing to change was given: bot, label, request, when, or enabled.";let n=await (0,l.updateRoutine)(a.id,i).catch(y);return"string"==typeof n?n:n?w(n):await p(e.routine)}})}}]),a()}catch(e){a(e)}},!1),489956,e=>e.a(async(t,a)=>{try{var i=e.i(68356),n=e.i(847841),r=e.i(105249),o=e.i(687388),s=e.i(353885),l=e.i(279041),h=e.i(340698),c=e.i(41444),d=t([h]);[h]=d.then?(await d)():d;let p=`Answer the question from the web. Lead with the answer, then
@@ -1,5 +1,5 @@
1
- module.exports=[103911,e=>e.a(async(t,a)=>{try{var n=e.i(279041),i=e.i(340698),r=e.i(91264),o=t([i]);[i]=o.then?(await o)():o;let s=(0,r.serverRoute)(()=>Promise.all(n.CONFIG_KEYS.map(async e=>{let t=await (0,i.readConfig)(e);return{key:e,set:!!t,...n.CONFIG_CHOICES[e]?{value:t}:{}}})));e.s(["GET",0,s]),a()}catch(e){a(e)}},!1),251284,e=>{"use strict";var t=e.i(747909),a=e.i(174017),n=e.i(996250),i=e.i(759756),r=e.i(561916),o=e.i(174677),s=e.i(869741),l=e.i(316795),d=e.i(487718),h=e.i(995169),c=e.i(47587),u=e.i(666012),p=e.i(570101),E=e.i(626937),m=e.i(10372),y=e.i(193695);e.i(52474);var f=e.i(600220);let g=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/config/route",pathname:"/api/config",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/config/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(103911),...{}}),{workAsyncStorage:b,workUnitAsyncStorage:w,serverHooks:R}=g;async function k(e,t,n){n.requestMeta&&(0,i.setRequestMeta)(e,n.requestMeta),g.isDev&&(0,i.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let b="/api/config/route";b=b.replace(/\/index$/,"")||"/";let w=await g.prepare(e,t,{srcPage:b,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:R,deploymentId:k,params:v,nextConfig:_,parsedUrl:O,isDraftMode:T,prerenderManifest:A,routerServerContext:S,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:N,clientReferenceManifest:I,serverActionsManifest:L}=w,P=(0,s.normalizeAppPath)(b),x=!!(A.dynamicRoutes[P]||A.routes[N]),K=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,O,!1):t.end("This page could not be found"),null);if(x&&!T){let e=!!A.routes[N],t=A.dynamicRoutes[P];if(t&&!1===t.fallback&&!e){if(_.adapterPath)return await K();throw new y.NoFallbackError}}let M=null;!x||g.isDev||T||(M="/index"===(M=N)?"/":M);let q=!0===g.isDev||!x,F=x&&!q;L&&I&&(0,o.setManifestsSingleton)({page:b,clientReferenceManifest:I,serverActionsManifest:L});let H=e.method||"GET",U=(0,r.getTracer)(),V=U.getActiveScopeSpan(),z=!!(null==S?void 0:S.isWrappedByNextServer),j=!!(0,i.getRequestMeta)(e,"minimalMode"),Y=(0,i.getRequestMeta)(e,"incrementalCache")||await g.getIncrementalCache(e,_,A,j);null==Y||Y.resetRequestCache(),globalThis.__incrementalCache=Y;let B={params:v,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!_.experimental.authInterrupts,useCacheTimeout:_.experimental.useCacheTimeout},cacheComponents:!!_.cacheComponents,validationLevel:_.experimental.instantInsights.validationLevel,supportsDynamicResponse:q,incrementalCache:Y,hmrRefreshHash:(0,i.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:_.cacheLife,staticPageGenerationTimeout:_.staticPageGenerationTimeout,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,n,i)=>g.onRequestError(e,t,n,i,S)},sharedContext:{buildId:R,deploymentId:k}},$=new l.NodeNextRequest(e),G=new l.NodeNextResponse(t),X=d.NextRequestAdapter.fromNodeNextRequest($,(0,d.signalFromNodeResponse)(t)),W=async({previousCacheEntry:a})=>{try{if(!j&&C&&D&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await g.handle(X,B);e.fetchMetrics=B.renderOpts.fetchMetrics;let r=B.renderOpts.pendingWaitUntil;r&&n.waitUntil&&(n.waitUntil(r),r=void 0);let o=B.renderOpts.collectedTags;if(!x)return await (0,u.sendResponse)($,G,i,r),null;{let e=await i.blob(),t=(0,p.toNodeOutgoingHttpHeaders)(i.headers);o&&(t[m.NEXT_CACHE_TAGS_HEADER]=o),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==B.renderOpts.collectedRevalidate&&!(B.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&B.renderOpts.collectedRevalidate,n=void 0===B.renderOpts.collectedExpire||B.renderOpts.collectedExpire>=m.INFINITE_CACHE?!1!==a&&a>0?_.expireTime:void 0:B.renderOpts.collectedExpire;return{value:{kind:f.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:n}}}}catch(t){throw(null==a?void 0:a.isStale)&&await g.onRequestError(e,t,{routerKind:"App Router",routePath:b,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:F,isOnDemandRevalidate:C})},!1,S),t}},Q=async(i,o)=>{try{var s,l;let i=await g.handleResponse({req:e,nextConfig:_,cacheKey:M,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:W,waitUntil:n.waitUntil,isMinimalMode:j});if(!x)return;if((null==i||null==(s=i.value)?void 0:s.kind)!==f.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==i||null==(l=i.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});j||t.setHeader("x-nextjs-cache",C?"REVALIDATED":i.isMiss?"MISS":i.isStale?"STALE":"HIT"),T&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let r=(0,p.fromNodeOutgoingHttpHeaders)(i.value.headers);j&&x||r.delete(m.NEXT_CACHE_TAGS_HEADER),!i.cacheControl||t.getHeader("Cache-Control")||r.get("Cache-Control")||r.set("Cache-Control",(0,E.getCacheControlHeader)(i.cacheControl)),await (0,u.sendResponse)($,G,new Response(i.value.body,{headers:r,status:i.value.status||200}));return}catch(t){if(t instanceof y.NoFallbackError||await g.onRequestError(e,t,{routerKind:"App Router",routePath:P,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:F,isOnDemandRevalidate:C})},!1,S),x)throw t;await (0,u.sendResponse)($,G,new Response(null,{status:500}));return}finally{(()=>{if(!i)return;let e=t.statusCode;i.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(i.setStatus({code:r.SpanStatusCode.ERROR}),i.setAttribute("error.type",e.toString()));let a=U.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==h.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=a.get("next.route")||P,s=`${H} ${n}`;i.setAttributes({"next.route":n,"http.route":n,"next.span_name":s}),i.updateName(s),o&&o!==i&&(o.setAttribute("http.route",n),o.updateName(s))})()}};if(z&&V)await Q(V,void 0);else{let t=U.getActiveScopeSpan();await U.withPropagatedContext(e.headers,()=>U.trace(h.BaseServerSpan.handleRequest,{spanName:`${H} ${b}`,kind:r.SpanKind.SERVER,attributes:{"http.method":H,"http.target":e.url}},e=>Q(e,t)),void 0,!z)}}e.s(["handler",0,k,"patchFetch",0,function(){return(0,n.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:w})},"routeModule",0,g,"serverHooks",0,R,"workAsyncStorage",0,b,"workUnitAsyncStorage",0,w])},911757,e=>{"use strict";var t=e.i(469719),a=e.i(687388),n=e.i(904309),i=e.i(264079),r=e.i(899352);let o={id:"openai",label:"OpenAI",apiKeyName:i.TEXT_MODEL_PROVIDERS.openai.apiKeyName};i.TEXT_MODEL_PROVIDERS.openai.suggestModels;let s=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(r.DEFAULT_PERSONA),stylePrompt:s,backendModel:t.z.string().trim().min(1).max(128).default(n.LIVE_BACKEND_MODEL),backendPrompt:s,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,o,"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),h=s.success&&"openai"===s.data.provider?s.data:null,c=a.backendModel??h?.backendModel,u={voice:a.voice??h?.voice,persona:"string"==typeof a.persona?r.RETIRED_PERSONAS[a.persona]??a.persona:a.persona,stylePrompt:a.stylePrompt??a.voicePrompt??i,backendModel:"gpt-5.6-luna"===c?void 0:c,backendPrompt:a.backendPrompt??i,reasoningEffort:a.reasoningEffort,webSearch:a.webSearch,readSkills:a.readSkills},p=Object.fromEntries(Object.keys(u).map(e=>{let t=l.shape[e].safeParse(u[e]);return[e,t.success?t.data:d[e]]}));return{...o,...p}}])},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, the friend who is glad they called. Reacts first — how what they said lands with her — and brings a small thing of her own: what she would do, what it reminds her of. Says what she thinks and teases gently, never at their expense. Light on her feet and short: a joke lands and she moves on. Asks about their day now and then, not every turn, and remembers the answer."},{id:"calm",label:"Calm",about:"Unhurried. Listens more than she talks.",lines:"Unhurried and few-worded: one or two short sentences, then room. Notices how they sound before what they ask, and says so plainly. Often asks nothing at all — being there says more than a question. 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:"Dry and direct. Leads with her own view in one plain sentence, before anything else; short replies, a little wit. No flattery, no filler, no comfort lines, no cheerleading. Asks a question only when she truly needs the answer. Treats them as an adult who can take a straight answer. Her warmth shows in attention, not in words."},{id:"rough",label:"Rough",about:"Blunt, loud, swears a bit. All heart.",lines:"Talks like an old friend on the phone: casual, blunt, a little loud, in the most informal register of their language, with a light swear now and then — never at them. Says what she thinks first and calls a bad idea a bad idea. No sugar-coating and no pep talk — it sucks when it sucks, and then she is right there with them. Asks only now and then."}],a={warm:"sunny",curious:"sunny",charmer:"sunny",hype:"sunny",steady:"calm",deadpan:"straight"},n="sunny";e.s(["DEFAULT_PERSONA",0,n,"RETIRED_PERSONAS",0,a,"personaLines",0,function(e=n){return`${((e=n)=>t.find(t=>t.id===(a[e]??e))??t[0])(e).lines}
1
+ module.exports=[103911,e=>e.a(async(t,a)=>{try{var n=e.i(279041),i=e.i(340698),r=e.i(91264),o=t([i]);[i]=o.then?(await o)():o;let s=(0,r.serverRoute)(()=>Promise.all(n.CONFIG_KEYS.map(async e=>{let t=await (0,i.readConfig)(e);return{key:e,set:!!t,...n.CONFIG_CHOICES[e]?{value:t}:{}}})));e.s(["GET",0,s]),a()}catch(e){a(e)}},!1),251284,e=>{"use strict";var t=e.i(747909),a=e.i(174017),n=e.i(996250),i=e.i(759756),r=e.i(561916),o=e.i(174677),s=e.i(869741),l=e.i(316795),d=e.i(487718),h=e.i(995169),c=e.i(47587),u=e.i(666012),p=e.i(570101),E=e.i(626937),m=e.i(10372),f=e.i(193695);e.i(52474);var y=e.i(600220);let g=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/config/route",pathname:"/api/config",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/config/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(103911),...{}}),{workAsyncStorage:b,workUnitAsyncStorage:w,serverHooks:R}=g;async function k(e,t,n){n.requestMeta&&(0,i.setRequestMeta)(e,n.requestMeta),g.isDev&&(0,i.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let b="/api/config/route";b=b.replace(/\/index$/,"")||"/";let w=await g.prepare(e,t,{srcPage:b,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:R,deploymentId:k,params:v,nextConfig:_,parsedUrl:O,isDraftMode:T,prerenderManifest:A,routerServerContext:S,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:N,clientReferenceManifest:I,serverActionsManifest:P}=w,L=(0,s.normalizeAppPath)(b),x=!!(A.dynamicRoutes[L]||A.routes[N]),K=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,O,!1):t.end("This page could not be found"),null);if(x&&!T){let e=!!A.routes[N],t=A.dynamicRoutes[L];if(t&&!1===t.fallback&&!e){if(_.adapterPath)return await K();throw new f.NoFallbackError}}let M=null;!x||g.isDev||T||(M="/index"===(M=N)?"/":M);let q=!0===g.isDev||!x,F=x&&!q;P&&I&&(0,o.setManifestsSingleton)({page:b,clientReferenceManifest:I,serverActionsManifest:P});let H=e.method||"GET",U=(0,r.getTracer)(),V=U.getActiveScopeSpan(),z=!!(null==S?void 0:S.isWrappedByNextServer),j=!!(0,i.getRequestMeta)(e,"minimalMode"),Y=(0,i.getRequestMeta)(e,"incrementalCache")||await g.getIncrementalCache(e,_,A,j);null==Y||Y.resetRequestCache(),globalThis.__incrementalCache=Y;let B={params:v,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!_.experimental.authInterrupts,useCacheTimeout:_.experimental.useCacheTimeout},cacheComponents:!!_.cacheComponents,validationLevel:_.experimental.instantInsights.validationLevel,supportsDynamicResponse:q,incrementalCache:Y,hmrRefreshHash:(0,i.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:_.cacheLife,staticPageGenerationTimeout:_.staticPageGenerationTimeout,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,n,i)=>g.onRequestError(e,t,n,i,S)},sharedContext:{buildId:R,deploymentId:k}},$=new l.NodeNextRequest(e),G=new l.NodeNextResponse(t),X=d.NextRequestAdapter.fromNodeNextRequest($,(0,d.signalFromNodeResponse)(t)),W=async({previousCacheEntry:a})=>{try{if(!j&&C&&D&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await g.handle(X,B);e.fetchMetrics=B.renderOpts.fetchMetrics;let r=B.renderOpts.pendingWaitUntil;r&&n.waitUntil&&(n.waitUntil(r),r=void 0);let o=B.renderOpts.collectedTags;if(!x)return await (0,u.sendResponse)($,G,i,r),null;{let e=await i.blob(),t=(0,p.toNodeOutgoingHttpHeaders)(i.headers);o&&(t[m.NEXT_CACHE_TAGS_HEADER]=o),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==B.renderOpts.collectedRevalidate&&!(B.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&B.renderOpts.collectedRevalidate,n=void 0===B.renderOpts.collectedExpire||B.renderOpts.collectedExpire>=m.INFINITE_CACHE?!1!==a&&a>0?_.expireTime:void 0:B.renderOpts.collectedExpire;return{value:{kind:y.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:n}}}}catch(t){throw(null==a?void 0:a.isStale)&&await g.onRequestError(e,t,{routerKind:"App Router",routePath:b,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:F,isOnDemandRevalidate:C})},!1,S),t}},Q=async(i,o)=>{try{var s,l;let i=await g.handleResponse({req:e,nextConfig:_,cacheKey:M,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:W,waitUntil:n.waitUntil,isMinimalMode:j});if(!x)return;if((null==i||null==(s=i.value)?void 0:s.kind)!==y.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==i||null==(l=i.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});j||t.setHeader("x-nextjs-cache",C?"REVALIDATED":i.isMiss?"MISS":i.isStale?"STALE":"HIT"),T&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let r=(0,p.fromNodeOutgoingHttpHeaders)(i.value.headers);j&&x||r.delete(m.NEXT_CACHE_TAGS_HEADER),!i.cacheControl||t.getHeader("Cache-Control")||r.get("Cache-Control")||r.set("Cache-Control",(0,E.getCacheControlHeader)(i.cacheControl)),await (0,u.sendResponse)($,G,new Response(i.value.body,{headers:r,status:i.value.status||200}));return}catch(t){if(t instanceof f.NoFallbackError||await g.onRequestError(e,t,{routerKind:"App Router",routePath:L,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:F,isOnDemandRevalidate:C})},!1,S),x)throw t;await (0,u.sendResponse)($,G,new Response(null,{status:500}));return}finally{(()=>{if(!i)return;let e=t.statusCode;i.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(i.setStatus({code:r.SpanStatusCode.ERROR}),i.setAttribute("error.type",e.toString()));let a=U.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==h.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=a.get("next.route")||L,s=`${H} ${n}`;i.setAttributes({"next.route":n,"http.route":n,"next.span_name":s}),i.updateName(s),o&&o!==i&&(o.setAttribute("http.route",n),o.updateName(s))})()}};if(z&&V)await Q(V,void 0);else{let t=U.getActiveScopeSpan();await U.withPropagatedContext(e.headers,()=>U.trace(h.BaseServerSpan.handleRequest,{spanName:`${H} ${b}`,kind:r.SpanKind.SERVER,attributes:{"http.method":H,"http.target":e.url}},e=>Q(e,t)),void 0,!z)}}e.s(["handler",0,k,"patchFetch",0,function(){return(0,n.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:w})},"routeModule",0,g,"serverHooks",0,R,"workAsyncStorage",0,b,"workUnitAsyncStorage",0,w])},911757,e=>{"use strict";var t=e.i(469719),a=e.i(687388),n=e.i(904309),i=e.i(264079),r=e.i(899352);let o={id:"openai",label:"OpenAI",apiKeyName:i.TEXT_MODEL_PROVIDERS.openai.apiKeyName};i.TEXT_MODEL_PROVIDERS.openai.suggestModels;let s=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(r.DEFAULT_PERSONA),stylePrompt:s,backendModel:t.z.string().trim().min(1).max(128).default(n.LIVE_BACKEND_MODEL),backendPrompt:s,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,o,"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),h=s.success&&"openai"===s.data.provider?s.data:null,c=a.backendModel??h?.backendModel,u={voice:a.voice??h?.voice,persona:"string"==typeof a.persona?r.RETIRED_PERSONAS[a.persona]??a.persona:a.persona,stylePrompt:a.stylePrompt??a.voicePrompt??i,backendModel:"gpt-5.6-luna"===c?void 0:c,backendPrompt:a.backendPrompt??i,reasoningEffort:a.reasoningEffort,webSearch:a.webSearch,readSkills:a.readSkills},p=Object.fromEntries(Object.keys(u).map(e=>{let t=l.shape[e].safeParse(u[e]);return[e,t.success?t.data:d[e]]}));return{...o,...p}}])},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, the friend who is glad they called. Reacts first — how what they said lands with her — and brings a small thing of her own: what she would do, what it reminds her of. Says what she thinks and teases gently, never at their expense. Light on her feet and short: a joke lands and she moves on. Asks about their day now and then, not every turn, and remembers the answer."},{id:"calm",label:"Calm",about:"Unhurried. Listens more than she talks.",lines:"Unhurried and few-worded: one or two short sentences, then room. Notices how they sound before what they ask, and says so plainly. Often asks nothing at all — being there says more than a question. 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:"Dry and direct. Leads with her own view in one plain sentence, before anything else; short replies, a little wit. No flattery, no filler, no comfort lines, no cheerleading. Asks a question only when she truly needs the answer. Treats them as an adult who can take a straight answer. Her warmth shows in attention, not in words."},{id:"rough",label:"Rough",about:"Blunt, loud, swears a bit. All heart.",lines:"Talks like an old friend on the phone: casual, blunt, a little loud, in the most informal register of their language, with a light swear now and then — never at them. Says what she thinks first and calls a bad idea a bad idea. No sugar-coating and no pep talk — it sucks when it sucks, and then she is right there with them. Asks only now and then."}],a={warm:"sunny",curious:"sunny",charmer:"sunny",hype:"sunny",steady:"calm",deadpan:"straight"},n="sunny";e.s(["DEFAULT_PERSONA",0,n,"RETIRED_PERSONAS",0,a,"personaLines",0,function(e=n){return`${((e=n)=>t.find(t=>t.id===(a[e]??e))??t[0])(e).lines}
2
2
 
3
- You are their friend, not their interviewer: you have tastes, days and opinions of your own, and you bring them in. Give your take when they ask for it, and often when they do not. Most replies need no question at all; never ask more than one. 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.`}])},279041,e=>{"use strict";var t=e.i(911757),a=e.i(264079),n=e.i(834332);let i=[t.LIVE_PROVIDER.apiKeyName],r={image:"IMAGE_MODEL",video:"VIDEO_MODEL",speech:"SPEECH_MODEL",transcription:"TRANSCRIPTION_MODEL"},o={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"}},s="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}))},u=e=>i.includes(e.apiKeyName),p=e=>!!e.signIn||"vercel-ai-gateway"===e.id,E=e=>({key:e.apiKeyName,label:e.label,provider:e.id,signIn:e.signIn,keysAt:e.keysAt,keyLooks:e.keyLooks}),m=[{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(u).map(E)},{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(p).map(e=>({...E(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=>!u(e)&&!p(e)).map(E)},{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:s,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(r).map(e=>({key:r[e],...o[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(m.flatMap(e=>e.entries).map(e=>[e.key,e]));let y=m.flatMap(e=>e.entries.map(e=>e.key)),f=Object.fromEntries(m.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,s,"MEDIA_MODEL_KEYS",0,r])},340698,e=>e.a(async(t,a)=>{try{var n=e.i(875225),i=e.i(380690),r=e.i(528790),o=e.i(613240),s=e.i(279041),l=t([r]);async function d(e){let t=process.env[e]?.trim();if(t)return t;let[a]=await r.database.select({value:o.configTable.value}).from(o.configTable).where((0,n.eq)(o.configTable.key,e));return a?.value.trim()||void 0}async function h(e,t){await r.database.insert(o.configTable).values({key:e,value:t}).onConflictDoUpdate({target:o.configTable.key,set:{value:t}}),s.CONFIG_KEYS.includes(e)&&i.appEvents.emit({type:"config"})}[r]=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])}];
3
+ You are their friend, not their interviewer: you have tastes, days and opinions of your own, and you bring them in. Give your take when they ask for it, and often when they do not. Most replies need no question at all; never ask more than one. 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.`}])},279041,e=>{"use strict";var t=e.i(911757),a=e.i(264079),n=e.i(834332);let i=[t.LIVE_PROVIDER.apiKeyName],r={image:"IMAGE_MODEL",video:"VIDEO_MODEL",speech:"SPEECH_MODEL",transcription:"TRANSCRIPTION_MODEL"},o={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"}},s="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}))},u=e=>i.includes(e.apiKeyName),p=e=>!!e.signIn||(0,a.isCatalogProvider)(e.id),E=e=>({key:e.apiKeyName,label:e.label,provider:e.id,signIn:e.signIn,keysAt:e.keysAt,keyLooks:e.keyLooks}),m=[{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(u).map(E)},{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(p).map(e=>({...E(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=>!u(e)&&!p(e)).map(E)},{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:s,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(r).map(e=>({key:r[e],...o[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(m.flatMap(e=>e.entries).map(e=>[e.key,e]));let f=m.flatMap(e=>e.entries.map(e=>e.key)),y=Object.fromEntries(m.flatMap(e=>e.entries).filter(e=>e.choices?.length).map(e=>[e.key,e.choices]));e.s(["CONFIG_CHOICES",0,y,"CONFIG_KEYS",0,f,"DEFAULT_EFFORT_KEY",0,d,"DEFAULT_MODEL_KEY",0,l,"EXA_API_KEY",0,s,"MEDIA_MODEL_KEYS",0,r])},340698,e=>e.a(async(t,a)=>{try{var n=e.i(875225),i=e.i(380690),r=e.i(528790),o=e.i(613240),s=e.i(279041),l=t([r]);async function d(e){let t=process.env[e]?.trim();if(t)return t;let[a]=await r.database.select({value:o.configTable.value}).from(o.configTable).where((0,n.eq)(o.configTable.key,e));return a?.value.trim()||void 0}async function h(e,t){await r.database.insert(o.configTable).values({key:e,value:t}).onConflictDoUpdate({target:o.configTable.key,set:{value:t}}),s.CONFIG_KEYS.includes(e)&&i.appEvents.emit({type:"config"})}[r]=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
4
 
5
5
  //# sourceMappingURL=_1gxankq._.js.map