thursday-agent 0.16.0 → 0.17.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 (277) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +3 -3
  3. package/.next/prerender-manifest.json +3 -3
  4. package/.next/server/app/_global-error/page.js.nft.json +1 -1
  5. package/.next/server/app/_global-error.html +1 -1
  6. package/.next/server/app/_global-error.rsc +1 -1
  7. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  8. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  10. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  11. package/.next/server/app/_not-found.html +1 -1
  12. package/.next/server/app/_not-found.rsc +1 -1
  13. package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  14. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  15. package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  16. package/.next/server/app/api/artifact/route.js +9 -9
  17. package/.next/server/app/api/artifact/route.js.nft.json +1 -1
  18. package/.next/server/app/api/bot/memory/files/route.js +3 -3
  19. package/.next/server/app/api/bot/memory/files/route.js.nft.json +1 -1
  20. package/.next/server/app/api/bot/memory/route.js +8 -8
  21. package/.next/server/app/api/bot/memory/route.js.nft.json +1 -1
  22. package/.next/server/app/api/bot/route.js +8 -8
  23. package/.next/server/app/api/bot/route.js.nft.json +1 -1
  24. package/.next/server/app/api/bot/thread/[id]/route.js +3 -3
  25. package/.next/server/app/api/bot/thread/[id]/route.js.nft.json +1 -1
  26. package/.next/server/app/api/bot/thread/route.js +3 -3
  27. package/.next/server/app/api/bot/thread/route.js.nft.json +1 -1
  28. package/.next/server/app/api/config/route.js.nft.json +1 -1
  29. package/.next/server/app/api/events/route.js.nft.json +1 -1
  30. package/.next/server/app/api/favicon/[host]/route.js.nft.json +1 -1
  31. package/.next/server/app/api/file/[...path]/route.js +4 -4
  32. package/.next/server/app/api/file/[...path]/route.js.nft.json +1 -1
  33. package/.next/server/app/api/llm-model/catalog/route.js.nft.json +1 -1
  34. package/.next/server/app/api/llm-model/credits/route.js.nft.json +1 -1
  35. package/.next/server/app/api/llm-model/route.js.nft.json +1 -1
  36. package/.next/server/app/api/llm-model/subscription/route.js.nft.json +1 -1
  37. package/.next/server/app/api/mcp/[name]/route.js.nft.json +1 -1
  38. package/.next/server/app/api/mcp/oauth/callback/route.js.nft.json +1 -1
  39. package/.next/server/app/api/mcp/route.js.nft.json +1 -1
  40. package/.next/server/app/api/mcp/tools/route.js.nft.json +1 -1
  41. package/.next/server/app/api/memory/edit/route.js +11 -11
  42. package/.next/server/app/api/memory/edit/route.js.nft.json +1 -1
  43. package/.next/server/app/api/memory/route.js.nft.json +1 -1
  44. package/.next/server/app/api/reach/route.js +11 -11
  45. package/.next/server/app/api/reach/route.js.nft.json +1 -1
  46. package/.next/server/app/api/routine/route.js +7 -7
  47. package/.next/server/app/api/routine/route.js.nft.json +1 -1
  48. package/.next/server/app/api/signins/route.js +5 -5
  49. package/.next/server/app/api/signins/route.js.nft.json +1 -1
  50. package/.next/server/app/api/skills/[source]/[name]/route.js +7 -7
  51. package/.next/server/app/api/skills/[source]/[name]/route.js.nft.json +1 -1
  52. package/.next/server/app/api/skills/route.js +7 -7
  53. package/.next/server/app/api/skills/route.js.nft.json +1 -1
  54. package/.next/server/app/api/thursday/call/route.js +5 -5
  55. package/.next/server/app/api/thursday/call/route.js.nft.json +1 -1
  56. package/.next/server/app/api/thursday/settings/route.js +5 -5
  57. package/.next/server/app/api/thursday/settings/route.js.nft.json +1 -1
  58. package/.next/server/app/api/thursday/text/route.js +13 -13
  59. package/.next/server/app/api/thursday/text/route.js.nft.json +1 -1
  60. package/.next/server/app/api/thursday/tool-call/route.js +12 -12
  61. package/.next/server/app/api/thursday/tool-call/route.js.nft.json +1 -1
  62. package/.next/server/app/api/workspace/files/route.js +8 -8
  63. package/.next/server/app/api/workspace/files/route.js.nft.json +1 -1
  64. package/.next/server/app/api/workspace/route.js +9 -9
  65. package/.next/server/app/api/workspace/route.js.nft.json +1 -1
  66. package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +3 -3
  67. package/.next/server/app/artifact/[...path]/page.js +4 -4
  68. package/.next/server/app/artifact/[...path]/page.js.nft.json +1 -1
  69. package/.next/server/app/artifact/[...path]/page_client-reference-manifest.js +1 -1
  70. package/.next/server/app/favicon.ico/route.js.nft.json +1 -1
  71. package/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  72. package/.next/server/app/page/server-reference-manifest.json +60 -60
  73. package/.next/server/app/page.js +5 -5
  74. package/.next/server/app/page.js.nft.json +1 -1
  75. package/.next/server/app/page_client-reference-manifest.js +1 -1
  76. package/.next/server/chunks/[root-of-the-server]__00qyw01._.js +1 -1
  77. package/.next/server/chunks/[root-of-the-server]__01ypm_z._.js +3 -0
  78. package/.next/server/chunks/[root-of-the-server]__021dkui._.js +3 -0
  79. package/.next/server/chunks/{[root-of-the-server]__18e65_-._.js → [root-of-the-server]__03xamry._.js} +2 -2
  80. package/.next/server/chunks/[root-of-the-server]__05dp5tr._.js +1 -1
  81. package/.next/server/chunks/[root-of-the-server]__09gdscj._.js +7 -0
  82. package/.next/server/chunks/{[root-of-the-server]__10_7vqz._.js → [root-of-the-server]__0b36yfw._.js} +1 -1
  83. package/.next/server/chunks/{[root-of-the-server]__1gamvcz._.js → [root-of-the-server]__0jzwdg-._.js} +2 -2
  84. package/.next/server/chunks/[root-of-the-server]__0mrk2it._.js +1 -1
  85. package/.next/server/chunks/[root-of-the-server]__0nmust6._.js +5 -0
  86. package/.next/server/chunks/[root-of-the-server]__0svzjwa._.js +7 -0
  87. package/.next/server/chunks/{[root-of-the-server]__16yw3mb._.js → [root-of-the-server]__12m24xl._.js} +1 -1
  88. package/.next/server/chunks/{[root-of-the-server]__1zrwxis._.js → [root-of-the-server]__12tahb4._.js} +1 -1
  89. package/.next/server/chunks/{[root-of-the-server]__1ep-pao._.js → [root-of-the-server]__1_h4hf9._.js} +4 -4
  90. package/.next/server/chunks/{[root-of-the-server]__1-tdj60._.js → [root-of-the-server]__1de1o6m._.js} +2 -2
  91. package/.next/server/chunks/{[root-of-the-server]__1voqqyc._.js → [root-of-the-server]__1ignh6-._.js} +1 -1
  92. package/.next/server/chunks/[root-of-the-server]__1t02-1p._.js +3 -0
  93. package/.next/server/chunks/[root-of-the-server]__1ygplx1._.js +1 -1
  94. package/.next/server/chunks/{[root-of-the-server]__11g20j-._.js → [root-of-the-server]__1yl5l25._.js} +1 -1
  95. package/.next/server/chunks/{[root-of-the-server]__1mbd2w_._.js → [root-of-the-server]__208vmyf._.js} +1 -1
  96. package/.next/server/chunks/{_1mfu9a3._.js → _02lipqs._.js} +1 -1
  97. package/.next/server/chunks/_05sa7xl._.js +1 -1
  98. package/.next/server/chunks/{_1rg5bfd._.js → _074f2ts._.js} +1 -1
  99. package/.next/server/chunks/_07nxi75._.js +3 -3
  100. package/.next/server/chunks/_08btiir._.js +7 -0
  101. package/.next/server/chunks/_0caua_s._.js +1 -1
  102. package/.next/server/chunks/{_0qoush_._.js → _0gt6cbj._.js} +1 -1
  103. package/.next/server/chunks/_0xygcxs._.js +3 -3
  104. package/.next/server/chunks/{_09c4we8._.js → _17i1lt2._.js} +1 -1
  105. package/.next/server/chunks/_19kea1l._.js +9 -9
  106. package/.next/server/chunks/_1gn2r2q._.js +3 -3
  107. package/.next/server/chunks/{_03niwml._.js → _1ntwp1s._.js} +1 -1
  108. package/.next/server/chunks/_1q6e56i._.js +3 -3
  109. package/.next/server/chunks/{_02fn1o3._.js → _1tkzgtm._.js} +1 -1
  110. package/.next/server/chunks/_1wl2g8_._.js +2 -2
  111. package/.next/server/chunks/{_1w6uf9k._.js → _1y3mnz4._.js} +1 -1
  112. package/.next/server/chunks/features_workspace_workspace_ts_13h82gv._.js +4 -4
  113. package/.next/server/chunks/features_workspace_workspace_ts_1iyjroj._.js +4 -4
  114. package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0cux6zt._.js → node_modules_consola_dist_chunks_prompt_mjs_04oxl25._.js} +1 -1
  115. package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0w32bqh._.js → node_modules_consola_dist_chunks_prompt_mjs_0g87zst._.js} +1 -1
  116. package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_1clmnaj._.js → node_modules_consola_dist_chunks_prompt_mjs_1341cnf._.js} +1 -1
  117. package/.next/server/chunks/ssr/{[root-of-the-server]__02jdtqa._.js → [root-of-the-server]__07660xu._.js} +2 -2
  118. package/.next/server/chunks/ssr/{[root-of-the-server]__0rnjkw2._.js → [root-of-the-server]__149x25m._.js} +2 -2
  119. package/.next/server/chunks/ssr/[root-of-the-server]__17h1ggo._.js +1 -1
  120. package/.next/server/chunks/ssr/[root-of-the-server]__19s8qyj._.js +3 -0
  121. package/.next/server/chunks/ssr/[root-of-the-server]__1jyeu61._.js +1 -1
  122. package/.next/server/chunks/ssr/_088vzgn._.js +3 -0
  123. package/.next/server/chunks/ssr/{_0wupyvd._.js → _0_vnw9v._.js} +2 -2
  124. package/.next/server/chunks/ssr/{_1u5vsy-._.js → _0aeknva._.js} +2 -2
  125. package/.next/server/chunks/ssr/_0fo4552._.js +3 -3
  126. package/.next/server/chunks/ssr/{_0-ou1b0._.js → _0n2scfq._.js} +2 -2
  127. package/.next/server/chunks/ssr/_0o_o9ji._.js +3 -0
  128. package/.next/server/chunks/ssr/_0qne8xs._.js +3 -0
  129. package/.next/server/chunks/ssr/_0r0g9ki._.js +1 -1
  130. package/.next/server/chunks/ssr/_0v9r8g2._.js +3 -0
  131. package/.next/server/chunks/ssr/_0x8ophf._.js +1 -1
  132. package/.next/server/chunks/ssr/{_0ncuqct._.js → _0ztbn5q._.js} +2 -2
  133. package/.next/server/chunks/ssr/{_0w8r7o7._.js → _1-41lck._.js} +2 -2
  134. package/.next/server/chunks/ssr/{_10fwcz_._.js → _14dfh7a._.js} +2 -2
  135. package/.next/server/chunks/ssr/{_1f6s34p._.js → _15m5ctz._.js} +2 -2
  136. package/.next/server/chunks/ssr/{_11pnnvd._.js → _18-e7zi._.js} +2 -2
  137. package/.next/server/chunks/ssr/{_0y28gl3._.js → _1c5iqz1._.js} +3 -3
  138. package/.next/server/chunks/ssr/{_1dqaksc._.js → _1hbjh6n._.js} +2 -2
  139. package/.next/server/chunks/ssr/_1neoj22._.js +1 -1
  140. package/.next/server/chunks/ssr/{_1k0efi3._.js → _1sttj8x._.js} +2 -2
  141. package/.next/server/chunks/ssr/_1uij_rj._.js +1 -1
  142. package/.next/server/chunks/ssr/_1umbr78._.js +1 -1
  143. package/.next/server/chunks/ssr/{_17ble8k._.js → _1vtgiou._.js} +3 -3
  144. package/.next/server/chunks/ssr/_1w9w1ok._.js +1 -1
  145. package/.next/server/chunks/ssr/{_1z586yw._.js → _1z6pirx._.js} +2 -2
  146. package/.next/server/chunks/ssr/features_0796o8r._.js +1 -1
  147. package/.next/server/chunks/ssr/features_bot_1knyan7._.js +3 -0
  148. package/.next/server/chunks/ssr/features_bot_1kr0_m-._.js +3 -0
  149. package/.next/server/chunks/ssr/{features_config_11dpa7r._.js → features_config_0n0zu89._.js} +3 -3
  150. package/.next/server/chunks/ssr/features_connectors_components_mcp-setting_tsx_0jmbgvp._.js +1 -1
  151. package/.next/server/chunks/ssr/features_memory_components_memory-setting_tsx_0oa43sw._.js +1 -1
  152. package/.next/server/chunks/ssr/features_routine_components_routine-setting_tsx_055fknz._.js +1 -1
  153. package/.next/server/chunks/ssr/features_workspace_workspace_ts_1wc7_u_._.js +4 -4
  154. package/.next/server/chunks/ssr/{node_modules_1r5o-bo._.js → node_modules_00h1t1j._.js} +1 -1
  155. package/.next/server/chunks/ssr/{node_modules_1o9n7_n._.js → node_modules_02ficyi._.js} +1 -1
  156. package/.next/server/chunks/ssr/{node_modules_0u24mg0._.js → node_modules_03q71_j._.js} +1 -1
  157. package/.next/server/chunks/ssr/{node_modules_138kcrz._.js → node_modules_03uejh6._.js} +1 -1
  158. package/.next/server/chunks/ssr/{node_modules_0x_2io2._.js → node_modules_06grs09._.js} +1 -1
  159. package/.next/server/chunks/ssr/{node_modules_0n1js5k._.js → node_modules_07mo9rn._.js} +1 -1
  160. package/.next/server/chunks/ssr/{node_modules_0bas34k._.js → node_modules_09e8kz_._.js} +1 -1
  161. package/.next/server/chunks/ssr/{node_modules_1dzye0n._.js → node_modules_09ikzel._.js} +1 -1
  162. package/.next/server/chunks/ssr/{node_modules_18yn_bs._.js → node_modules_0_d_7gq._.js} +1 -1
  163. package/.next/server/chunks/ssr/{node_modules_0ka8te1._.js → node_modules_0_p8w7p._.js} +1 -1
  164. package/.next/server/chunks/ssr/{node_modules_0mark4f._.js → node_modules_0f5bmkb._.js} +1 -1
  165. package/.next/server/chunks/ssr/{node_modules_0sdjzae._.js → node_modules_0kwie-o._.js} +1 -1
  166. package/.next/server/chunks/ssr/{node_modules_1ozyial._.js → node_modules_0r-9e4n._.js} +1 -1
  167. package/.next/server/chunks/ssr/{node_modules_156m1qh._.js → node_modules_0u_8z64._.js} +1 -1
  168. package/.next/server/chunks/ssr/{node_modules_0-ew8f8._.js → node_modules_0zf3wuu._.js} +1 -1
  169. package/.next/server/chunks/ssr/{node_modules_1xua-g1._.js → node_modules_1-7fc7h._.js} +1 -1
  170. package/.next/server/chunks/ssr/{node_modules_0ld7p-1._.js → node_modules_142z3o5._.js} +1 -1
  171. package/.next/server/chunks/ssr/{node_modules_0-8r9yw._.js → node_modules_180l3i0._.js} +1 -1
  172. package/.next/server/chunks/ssr/{node_modules_1tj7_9z._.js → node_modules_197vh1s._.js} +1 -1
  173. package/.next/server/chunks/ssr/{node_modules_0y5uubt._.js → node_modules_1_n9o9s._.js} +1 -1
  174. package/.next/server/chunks/ssr/{node_modules_0etz1i0._.js → node_modules_1fw32pg._.js} +1 -1
  175. package/.next/server/chunks/ssr/{node_modules_0bbwe-u._.js → node_modules_1hefp6h._.js} +1 -1
  176. package/.next/server/chunks/ssr/{node_modules_097cl9f._.js → node_modules_1irot3r._.js} +1 -1
  177. package/.next/server/chunks/ssr/{node_modules_0uibk9z._.js → node_modules_1om2itc._.js} +1 -1
  178. package/.next/server/chunks/ssr/{node_modules_1zkzksd._.js → node_modules_1ubln7w._.js} +1 -1
  179. package/.next/server/chunks/ssr/{node_modules_02uwbwp._.js → node_modules_1wyhtw9._.js} +1 -1
  180. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_133hjui._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0aczkbn._.js} +1 -1
  181. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1b3vwd3._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0ah684s._.js} +1 -1
  182. package/.next/server/middleware-build-manifest.js +3 -3
  183. package/.next/server/pages/404.html +1 -1
  184. package/.next/server/pages/500.html +1 -1
  185. package/.next/server/server-reference-manifest.js +1 -1
  186. package/.next/server/server-reference-manifest.json +61 -61
  187. package/.next/static/chunks/{1ub9obhgfm4jl.js → 024plctckvq-1.js} +1 -1
  188. package/.next/static/chunks/04toe_3nqfjqt.js +1 -0
  189. package/.next/static/chunks/{0609ejkwuy4sf.js → 0_b_bi2pobasx.js} +2 -2
  190. package/.next/static/chunks/{3ro66d9dc70bc.js → 0dfvwgnyrp8qt.js} +1 -1
  191. package/.next/static/chunks/{314szf8yer-3n.js → 0f47nnshdlucs.js} +1 -1
  192. package/.next/static/chunks/0sowxe4nnl5qu.js +1 -0
  193. package/.next/static/chunks/{07vcuxousbmy1.js → 0sv142q1yrva2.js} +1 -1
  194. package/.next/static/chunks/{0q4ws7qd21chx.js → 0tp868040z9nn.js} +2 -2
  195. package/.next/static/chunks/{0unonxbajyknw.js → 1-63yde5eaz7i.js} +1 -1
  196. package/.next/static/chunks/14qitm0kwsb6g.js +15 -0
  197. package/.next/static/chunks/{2xjr5b-yk_h3o.js → 1bgvxd3xny53w.js} +1 -1
  198. package/.next/static/chunks/{245_cp14iz637.js → 1cyrrz4q871aj.js} +1 -1
  199. package/.next/static/chunks/1st3b0c9vhxg3.js +1 -0
  200. package/.next/static/chunks/{39miwvg4k-b2d.js → 1wbqaidq7vc3_.js} +1 -1
  201. package/.next/static/chunks/{0cl_fgkphk1oz.js → 28sxb_k460e9h.js} +1 -1
  202. package/.next/static/chunks/{3j-l8un0d77v7.js → 2v6e_9p95o2e3.js} +1 -1
  203. package/.next/static/chunks/{23tx-2paw9qa6.js → 3-qp777vtfglj.js} +1 -1
  204. package/.next/static/chunks/{2jbjyazqfqyoh.js → 33ekkscpcq-z1.js} +1 -1
  205. package/.next/static/chunks/388l-zszwa_jf.js +1 -0
  206. package/.next/static/chunks/{3vwjs5kq11417.js → 38edd4rpcbvzp.js} +1 -1
  207. package/.next/static/chunks/3bwrvpjk95_x4.js +1 -0
  208. package/.next/static/chunks/{42m371fn687r5.js → 3itdg6t243u6f.js} +1 -1
  209. package/.next/static/chunks/{2oa4gpkzjtpni.js → 44vre0f7xqsh-.js} +1 -1
  210. package/README.md +12 -12
  211. package/guide/bots.md +48 -8
  212. package/guide/calls.md +13 -12
  213. package/guide/setup.md +4 -2
  214. package/package.json +1 -1
  215. package/public/sounds/NOTICE +3 -0
  216. package/public/sounds/opening-land.ogg +0 -0
  217. package/public/sounds/opening-rise.ogg +0 -0
  218. package/public/sounds/opening-step-1.ogg +0 -0
  219. package/public/sounds/opening-step-2.ogg +0 -0
  220. package/public/sounds/opening-step-3.ogg +0 -0
  221. package/skills/README.md +3 -0
  222. package/skills/artifact/SKILL.md +6 -5
  223. package/skills/artifact/references/book.md +22 -8
  224. package/skills/artifact/references/deck.md +4 -2
  225. package/skills/artifact/references/document.md +9 -0
  226. package/skills/artifact/references/sheet.md +108 -0
  227. package/skills/artifact/runtime/book/book.css +75 -0
  228. package/skills/artifact/runtime/book/book.html +6 -3
  229. package/skills/artifact/runtime/book/book.js +21 -0
  230. package/skills/artifact/runtime/canvas/canvas.css +1 -1
  231. package/skills/artifact/runtime/canvas/canvas.js +11 -1
  232. package/skills/artifact/runtime/deck/deck.css +164 -1
  233. package/skills/artifact/runtime/deck/deck.js +76 -1
  234. package/skills/artifact/runtime/document/docx.js +631 -0
  235. package/skills/artifact/runtime/document/markdown.mjs +58 -2
  236. package/skills/artifact/runtime/document/quick.css +66 -0
  237. package/skills/artifact/runtime/document/quick.html +1 -0
  238. package/skills/artifact/runtime/document/quick.js +154 -0
  239. package/skills/artifact/runtime/document/word.mjs +65 -0
  240. package/skills/artifact/runtime/sheet/format.mjs +385 -0
  241. package/skills/artifact/runtime/sheet/formula.mjs +755 -0
  242. package/skills/artifact/runtime/sheet/sheet.css +499 -0
  243. package/skills/artifact/runtime/sheet/sheet.html +102 -0
  244. package/skills/artifact/runtime/sheet/sheet.js +1361 -0
  245. package/skills/artifact/runtime/sheet/xlsx.mjs +320 -0
  246. package/skills/artifact/runtime/shell/head.html +1 -1
  247. package/skills/artifact/runtime/shell/shell.css +3 -0
  248. package/skills/artifact/runtime/shell/wear.mjs +47 -1
  249. package/skills/artifact/runtime/vendor/fflate.LICENSE.md +23 -0
  250. package/skills/artifact/runtime/vendor/fflate.mjs +2710 -0
  251. package/skills/artifact/scripts/book.mjs +141 -5
  252. package/skills/artifact/scripts/chart.mjs +229 -11
  253. package/skills/artifact/scripts/document.mjs +29 -2
  254. package/skills/artifact/scripts/spreadsheet.mjs +1068 -0
  255. package/skills/data-report/SKILL.md +8 -1
  256. package/.next/server/chunks/[root-of-the-server]__0aijj66._.js +0 -3
  257. package/.next/server/chunks/[root-of-the-server]__0tvoct-._.js +0 -3
  258. package/.next/server/chunks/[root-of-the-server]__118qjk_._.js +0 -7
  259. package/.next/server/chunks/[root-of-the-server]__1b8tp42._.js +0 -5
  260. package/.next/server/chunks/[root-of-the-server]__1gzcbda._.js +0 -3
  261. package/.next/server/chunks/[root-of-the-server]__1qcn1ti._.js +0 -7
  262. package/.next/server/chunks/_0xx3ryc._.js +0 -7
  263. package/.next/server/chunks/ssr/[root-of-the-server]__1y5_1cv._.js +0 -3
  264. package/.next/server/chunks/ssr/_0l1-xc6._.js +0 -3
  265. package/.next/server/chunks/ssr/_1g48r6t._.js +0 -3
  266. package/.next/server/chunks/ssr/features_bot_1k25jdg._.js +0 -3
  267. package/.next/server/chunks/ssr/features_bot_1s_-2vj._.js +0 -3
  268. package/.next/server/chunks/ssr/lib_utils_ts_0_f1xvm._.js +0 -3
  269. package/.next/static/chunks/00d54fcfm-lko.js +0 -1
  270. package/.next/static/chunks/0gjlsu6vrfzod.js +0 -1
  271. package/.next/static/chunks/17yqt1p_svv13.js +0 -1
  272. package/.next/static/chunks/203pbwecfs3tm.js +0 -1
  273. package/.next/static/chunks/3ghvoe_mlljzs.js +0 -15
  274. package/.next/static/chunks/3gn7dubb4-pwy.js +0 -1
  275. /package/.next/static/{RtLRT9EEaGn-OqwpMFdYg → VtbCMn-0G969p8QJsWdGv}/_buildManifest.js +0 -0
  276. /package/.next/static/{RtLRT9EEaGn-OqwpMFdYg → VtbCMn-0G969p8QJsWdGv}/_clientMiddlewareManifest.js +0 -0
  277. /package/.next/static/{RtLRT9EEaGn-OqwpMFdYg → VtbCMn-0G969p8QJsWdGv}/_ssgManifest.js +0 -0
@@ -20,6 +20,11 @@ collect, what the final text holds, and when a page earns its place.
20
20
  | Where is it cheapest to buy X right now? | `price-check.md` |
21
21
  | Should I buy / sign / switch — or wait? | `decision.md` |
22
22
 
23
+ Their own figures, to keep and go on with — a ledger or a budget, receipts, a bank's or a card's
24
+ export, a list they add to — are not a form here: they are a sheet, a real .xlsx (the `artifact`
25
+ skill, `references/sheet.md`), totals and summaries by formula, with a page only when they also
26
+ ask for one.
27
+
23
28
  Every form opens with the answer and its two or three numbers; a reader who stops after the first
24
29
  lines has what they asked for. A title says the finding ("Rent rose faster than pay"), not the topic.
25
30
 
@@ -69,7 +74,9 @@ node $C "$THURSDAY_ARTIFACTS/<page>.html" px <scratch>/px.csv --index --title "
69
74
 
70
75
  Each figure carries its source link, the fetch date and the rows behind it with a CSV download, so
71
76
  the page needs no separate data section. A line for dates, bars for categories (largest first,
72
- `--highlight` the one that matters, named exactly as the row is); `--index` when series in different
77
+ `--highlight` the one that matters, named exactly as the row is); `--kind column` for a value per
78
+ period, `--kind donut` for one whole split in five parts or fewer, `--kind stacked` for what each
79
+ row is made of (`--share` to compare the make-up rather than the size); `--index` when series in different
73
80
  units are compared; `--mark` for each dated event the text explains, inside the range drawn;
74
81
  `--locale` with the reader's language tag (`de`, `ja`, `pt-BR`) writes numbers and dates their way.
75
82
  Run it again to replace a figure, and after every later put. `node $C` with no arguments lists every
@@ -1,3 +0,0 @@
1
- module.exports=[874533,(e,s,r)=>{s.exports=e.x("node:child_process",()=>require("node:child_process"))},666680,(e,s,r)=>{s.exports=e.x("node:crypto",()=>require("node:crypto"))},902157,(e,s,r)=>{s.exports=e.x("node:fs",()=>require("node:fs"))},912714,(e,s,r)=>{s.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},660526,(e,s,r)=>{s.exports=e.x("node:os",()=>require("node:os"))},750227,(e,s,r)=>{s.exports=e.x("node:path",()=>require("node:path"))},59639,(e,s,r)=>{s.exports=e.x("node:process",()=>require("node:process"))},509656,(e,s,r)=>{s.exports=e.x("node:tty",()=>require("node:tty"))},812057,(e,s,r)=>{s.exports=e.x("node:util",()=>require("node:util"))},333925,e=>{"use strict";let s=process.env.THURSDAY_APP_DIR?.trim()||process.cwd(),r=process.env.THURSDAY_HOME?.trim()||process.cwd(),t=process.env.THURSDAY_URL?.trim()||`http://localhost:${process.env.PORT?.trim()||3e3}`,o=`${r}/local.db`,n=`file:${o}`,i=".ai-workspace",a={workspace:i,artifacts:"artifacts",projects:"projects",scratch:"scratch",bots:"bots",output:".output",signIns:".sign-ins",skills:{default:"skills",custom:`${i}/.agents/skills`,own:".agents/skills",runtime:"runtime",seeds:"seed-skills"}},c="artifact";e.s(["APP_DIR",0,s,"APP_NAME",0,"Thursday","APP_URL",0,t,"BOT_MEMORY_LIMITS",0,{files:20,chars:1e4},"BOT_RUN",0,{steps:100,compactAt:5e5,compactHeadroom:.8,summaryWords:{min:600,max:3e3,perTokens:200},participants:12,concurrent:4,turns:120,queuedMessages:200,silenceMs:3e5,overflowShrink:.6,retryMs:1e4,compactFiles:40},"BOT_WORK",0,{open:5,recent:5,said:80,files:2,reads:2,asked:400,readChars:4e3},"BROWSER_CLI",0,{readMs:15e3,loadMs:3e4},"BROWSER_GONE_MS",0,1e4,"BROWSER_VIEWPORT",0,"700x700","CALL_EXEC_TIMEOUT_MS",0,15e3,"CALL_RELAY",0,{quietMs:2e3,perTurn:3,readMs:15e3,chars:600},"CHATGPT_SIGN_IN",0,{waitMs:6e5,renewBeforeMs:3e5},"COMMON_VALIDATE",0,{name:{max:16},shortDescription:{max:60},description:{max:100},prompt:{max:4e3}},"CONNECTED_TOOL_TIMEOUT_MS",0,6e5,"DATA_DIR",0,r,"DB_FILE_NAME",0,n,"DB_PATH",0,o,"DECK",0,{slides:30,shotsMs:9e4},"EXEC_KILL_GRACE_MS",0,5e3,"EXEC_TIMEOUT_MS",0,18e4,"FINISHED_NOTICE",0,{rows:5,shown:1,words:240},"FULL_RESULT_LINES",0,400,"GATEWAY_CATALOG_MS",0,6e5,"GIVEN_FILES",0,{dir:"inbox",maxBytes:0x1900000,perMessage:8},"HISTORY_KEEP",0,{forMs:7776e6,sweepEveryMs:216e5},"INBOX_FINISHED",0,5,"IS_DEV",0,!1,"JOB_FOLDER_WALK",0,500,"LIVE_CALL",0,{startupMs:3e4,closeMs:15e3,transcriptGapMs:1500,transcriptSaveMs:500,appendMs:15e3,backendOutputTokens:4096,reasoningCheckMs:5e3,keyCheckMs:5e3},"LOOK",0,{maxBytes:4194304},"MAX_PINNED_TOOLS",0,10,"MCP_IDLE_MS",0,18e5,"MEMORY_LIMITS",0,{facts:400,factsPerNote:50,descriptionChars:100},"PATHS",0,a,"PROMPT_BUDGET",0,6e3,"PROMPT_LINE",0,{skill:90,toolArgs:30,jobOutcome:160,botMemory:100,threadStatus:200,routineRequest:300,routineOutcome:200},"REACH",0,{pollSeconds:50,retryMs:5e3,idleMs:6e5,messages:40,trimTo:30,oldChars:1e3,files:3,fileBytes:0x2d00000,rateRetries:3,rateWaitMs:3e4,codeDigits:4,held:5,pictures:9,drawMs:6e4,lookMs:2e3},"RECENT_CALL",0,{rows:20,tokens:600},"ROUTINE",0,{tickMs:3e4,max:12,minHours:1,runsShown:5},"SEARCH",0,{sources:3,excerptChars:1200,timeoutMs:3e4},"SIGNAL_PACE_MS",0,150,"SKILLS_FOLDED",0,{design:c,"picture-book":c,"interactive-page":c},"SKILL_FILES_LISTED",0,50,"STUDIO_SERVER",0,"studio","TEXT_CALL",0,{maxSteps:12,model:"text",autoTurns:10},"THREAD_LABEL_REACH",0,20,"THREAD_STATUS_LIMIT",0,10,"TOOL_OUTPUT",0,{max:8e3,head:5500,tail:1500},"TOOL_SEARCH_SCHEMAS",0,8,"WORKSPACE_KEEP",0,{forMs:2592e5,sweepEveryMs:36e5}])},64774,e=>{"use strict";function s(e,s){let r=e.replace(/\s+/g," ").trim();return r.length>s?`${r.slice(0,s-1).trimEnd()}…`:r}e.s(["PromiseChain",0,()=>{let e=Promise.resolve();return s=>{let r=e.then(()=>s());return e=r.catch(()=>{}),r}},"clip",0,s,"errorToString",0,function(e){if(e instanceof Error)return e.message;if("object"!=typeof e||null===e)return String(e);let{message:r,error:t}=e;if("string"==typeof r&&r)return r;if("string"==typeof t&&t)return t;let o=t?.message;if("string"==typeof o&&o)return o;try{return s(JSON.stringify(e),300)}catch{return`${e.constructor?.name??"Object"} thrown without a message`}},"hostOf",0,function(e){try{return new URL(e).hostname.replace(/^www\./,"")}catch{return null}},"plainText",0,function(e){return e.replace(/```[\s\S]*?```/g," ").replace(/`([^`]*)`/g,"$1").replace(/!?\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^\s{0,3}(#{1,6}\s+|[-*+]\s+|\d+\.\s+|>\s?)/gm,"").replace(/(\*\*|__)(.*?)\1/g,"$2").replace(/(\*|_)(.*?)\1/g,"$2").replace(/^\s*\|?[\s:|-]+\|\s*$/gm," ").replace(/\|/g," ").replace(/\s+/g," ").trim()},"slug",0,function(e){return e.toLowerCase().replace(/[^\p{L}\p{N}]+/gu,"-").replace(/^-+|-+$/g,"").slice(0,40)}])},207580,e=>{e.v(s=>Promise.all(["server/chunks/[externals]__0y3n8y6._.js","server/chunks/node_modules_consola_dist_chunks_prompt_mjs_0q8fc1x._.js"].map(s=>e.l(s))).then(()=>s(27996)))}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__0aijj66._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[874533,(e,t,r)=>{t.exports=e.x("node:child_process",()=>require("node:child_process"))},666680,(e,t,r)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},902157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},912714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},660526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},750227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},59639,(e,t,r)=>{t.exports=e.x("node:process",()=>require("node:process"))},509656,(e,t,r)=>{t.exports=e.x("node:tty",()=>require("node:tty"))},812057,(e,t,r)=>{t.exports=e.x("node:util",()=>require("node:util"))},21124,e=>{"use strict";var t=e.i(687388),r=e.i(393189),s=e.i(91264),a=e.i(53748);let i=(0,s.serverRoute)(async e=>{let s=new URL(e.url).searchParams.get("bot")?.trim();return s||(0,a.publicError)("Which bot?"),(0,r.listBotMemory)(s,t.WORKSPACE_VIEW.rows)});e.s(["GET",0,i])},239818,e=>{"use strict";var t=e.i(747909),r=e.i(174017),s=e.i(996250),a=e.i(759756),i=e.i(561916),o=e.i(174677),n=e.i(869741),l=e.i(316795),u=e.i(487718),c=e.i(995169),p=e.i(47587),d=e.i(666012),m=e.i(570101),h=e.i(626937),E=e.i(10372),R=e.i(193695);e.i(52474);var f=e.i(600220);let _=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/bot/memory/files/route",pathname:"/api/bot/memory/files",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/bot/memory/files/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(21124),...{}}),{workAsyncStorage:M,workUnitAsyncStorage:T,serverHooks:g}=_;async function S(e,t,s){s.requestMeta&&(0,a.setRequestMeta)(e,s.requestMeta),_.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let M="/api/bot/memory/files/route";M=M.replace(/\/index$/,"")||"/";let T=await _.prepare(e,t,{srcPage:M,multiZoneDraftMode:!1});if(!T)return t.statusCode=400,t.end("Bad Request"),null==s.waitUntil||s.waitUntil.call(s,Promise.resolve()),null;let{buildId:g,deploymentId:S,params:w,nextConfig:A,parsedUrl:O,isDraftMode:C,prerenderManifest:x,routerServerContext:y,isOnDemandRevalidate:I,revalidateOnlyGenerated:v,resolvedPathname:L,clientReferenceManifest:P,serverActionsManifest:N}=T,b=(0,n.normalizeAppPath)(M),D=!!(x.dynamicRoutes[b]||x.routes[L]),k=async()=>((null==y?void 0:y.render404)?await y.render404(e,t,O,!1):t.end("This page could not be found"),null);if(D&&!C){let e=!!x.routes[L],t=x.dynamicRoutes[b];if(t&&!1===t.fallback&&!e){if(A.adapterPath)return await k();throw new R.NoFallbackError}}let H=null;!D||_.isDev||C||(H="/index"===(H=L)?"/":H);let $=!0===_.isDev||!D,U=D&&!$;N&&P&&(0,o.setManifestsSingleton)({page:M,clientReferenceManifest:P,serverActionsManifest:N});let B=e.method||"GET",q=(0,i.getTracer)(),W=q.getActiveScopeSpan(),F=!!(null==y?void 0:y.isWrappedByNextServer),K=!!(0,a.getRequestMeta)(e,"minimalMode"),j=(0,a.getRequestMeta)(e,"incrementalCache")||await _.getIncrementalCache(e,A,x,K);null==j||j.resetRequestCache(),globalThis.__incrementalCache=j;let G={params:w,previewProps:x.preview,renderOpts:{experimental:{authInterrupts:!!A.experimental.authInterrupts,useCacheTimeout:A.experimental.useCacheTimeout},cacheComponents:!!A.cacheComponents,validationLevel:A.experimental.instantInsights.validationLevel,supportsDynamicResponse:$,incrementalCache:j,hmrRefreshHash:(0,a.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:A.cacheLife,staticPageGenerationTimeout:A.staticPageGenerationTimeout,waitUntil:s.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,s,a)=>_.onRequestError(e,t,s,a,y)},sharedContext:{buildId:g,deploymentId:S}},Y=new l.NodeNextRequest(e),V=new l.NodeNextResponse(t),X=u.NextRequestAdapter.fromNodeNextRequest(Y,(0,u.signalFromNodeResponse)(t)),z=async({previousCacheEntry:r})=>{try{if(!K&&I&&v&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let a=await _.handle(X,G);e.fetchMetrics=G.renderOpts.fetchMetrics;let i=G.renderOpts.pendingWaitUntil;i&&s.waitUntil&&(s.waitUntil(i),i=void 0);let o=G.renderOpts.collectedTags;if(!D)return await (0,d.sendResponse)(Y,V,a,i),null;{let e=await a.blob(),t=(0,m.toNodeOutgoingHttpHeaders)(a.headers);o&&(t[E.NEXT_CACHE_TAGS_HEADER]=o),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==G.renderOpts.collectedRevalidate&&!(G.renderOpts.collectedRevalidate>=E.INFINITE_CACHE)&&G.renderOpts.collectedRevalidate,s=void 0===G.renderOpts.collectedExpire||G.renderOpts.collectedExpire>=E.INFINITE_CACHE?!1!==r&&r>0?A.expireTime:void 0:G.renderOpts.collectedExpire;return{value:{kind:f.CachedRouteKind.APP_ROUTE,status:a.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:s}}}}catch(t){throw(null==r?void 0:r.isStale)&&await _.onRequestError(e,t,{routerKind:"App Router",routePath:M,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:I})},!1,y),t}},J=async(a,o)=>{try{var n,l;let a=await _.handleResponse({req:e,nextConfig:A,cacheKey:H,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:x,isRoutePPREnabled:!1,isOnDemandRevalidate:I,revalidateOnlyGenerated:v,responseGenerator:z,waitUntil:s.waitUntil,isMinimalMode:K});if(!D)return;if((null==a||null==(n=a.value)?void 0:n.kind)!==f.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==a||null==(l=a.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});K||t.setHeader("x-nextjs-cache",I?"REVALIDATED":a.isMiss?"MISS":a.isStale?"STALE":"HIT"),C&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let i=(0,m.fromNodeOutgoingHttpHeaders)(a.value.headers);K&&D||i.delete(E.NEXT_CACHE_TAGS_HEADER),!a.cacheControl||t.getHeader("Cache-Control")||i.get("Cache-Control")||i.set("Cache-Control",(0,h.getCacheControlHeader)(a.cacheControl)),await (0,d.sendResponse)(Y,V,new Response(a.value.body,{headers:i,status:a.value.status||200}));return}catch(t){if(t instanceof R.NoFallbackError||await _.onRequestError(e,t,{routerKind:"App Router",routePath:b,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:I})},!1,y),D)throw t;await (0,d.sendResponse)(Y,V,new Response(null,{status:500}));return}finally{(()=>{if(!a)return;let e=t.statusCode;a.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(a.setStatus({code:i.SpanStatusCode.ERROR}),a.setAttribute("error.type",e.toString()));let r=q.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==c.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let s=r.get("next.route")||b,n=`${B} ${s}`;a.setAttributes({"next.route":s,"http.route":s,"next.span_name":n}),a.updateName(n),o&&o!==a&&(o.setAttribute("http.route",s),o.updateName(n))})()}};if(F&&W)await J(W,void 0);else{let t=q.getActiveScopeSpan();await q.withPropagatedContext(e.headers,()=>q.trace(c.BaseServerSpan.handleRequest,{spanName:`${B} ${M}`,kind:i.SpanKind.SERVER,attributes:{"http.method":B,"http.target":e.url}},e=>J(e,t)),void 0,!F)}}e.s(["handler",0,S,"patchFetch",0,function(){return(0,s.patchFetch)({workAsyncStorage:M,workUnitAsyncStorage:T})},"routeModule",0,_,"serverHooks",0,g,"workAsyncStorage",0,M,"workUnitAsyncStorage",0,T])},687388,e=>{"use strict";let t=process.env.THURSDAY_APP_DIR?.trim()||process.cwd(),r=process.env.THURSDAY_HOME?.trim()||process.cwd(),s=process.env.THURSDAY_URL?.trim()||`http://localhost:${process.env.PORT?.trim()||3e3}`,a=`${r}/local.db`,i=`file:${a}`,o=".ai-workspace",n={workspace:o,artifacts:"artifacts",projects:"projects",scratch:"scratch",bots:"bots",output:".output",signIns:".sign-ins",skills:{default:"skills",custom:`${o}/.agents/skills`,own:".agents/skills",runtime:"runtime",seeds:"seed-skills"}},l="artifact";e.s(["APP_DIR",0,t,"APP_NAME",0,"Thursday","APP_URL",0,s,"ARTIFACT_VIEW",0,{rows:200,setFiles:120},"BOT_MEMORY_LIMITS",0,{files:20,chars:1e4},"BOT_RUN",0,{steps:100,compactAt:5e5,compactHeadroom:.8,summaryWords:{min:600,max:3e3,perTokens:200},participants:12,concurrent:4,turns:120,queuedMessages:200,silenceMs:3e5,overflowShrink:.6,retryMs:1e4,compactFiles:40},"BOT_WORK",0,{open:5,recent:5,said:80,files:2,reads:2,asked:400,readChars:4e3},"BROWSER_CLI",0,{readMs:15e3,loadMs:3e4},"BROWSER_GONE_MS",0,1e4,"BROWSER_VIEWPORT",0,"700x700","CALL_EXEC_TIMEOUT_MS",0,15e3,"CALL_HISTORY_PAGE",0,10,"CALL_RELAY",0,{quietMs:2e3,perTurn:3,readMs:15e3,chars:600},"CHATGPT_SIGN_IN",0,{waitMs:6e5,renewBeforeMs:3e5},"CHATGPT_USAGE_HIGH",0,80,"COMMON_VALIDATE",0,{name:{max:16},shortDescription:{max:60},description:{max:100},prompt:{max:4e3}},"CONNECTED_TOOL_TIMEOUT_MS",0,6e5,"DATA_DIR",0,r,"DB_FILE_NAME",0,i,"DB_PATH",0,a,"DECK",0,{slides:30,shotsMs:9e4},"EXEC_KILL_GRACE_MS",0,5e3,"EXEC_TIMEOUT_MS",0,18e4,"FAVICON",0,{timeoutMs:4e3,maxBytes:3e5,kept:500,pageBytes:65536},"FINISHED_NOTICE",0,{rows:5,shown:1,words:240},"FULL_RESULT_LINES",0,400,"GATEWAY_CATALOG_MS",0,6e5,"GATEWAY_LOW_CREDIT",0,1,"INBOX_FINISHED",0,5,"IS_DEV",0,!1,"JOB_FOLDER_WALK",0,500,"LIVE_CALL",0,{startupMs:3e4,closeMs:15e3,transcriptGapMs:1500,transcriptSaveMs:500,appendMs:15e3,backendOutputTokens:4096,reasoningCheckMs:5e3,keyCheckMs:5e3},"LOOK",0,{maxBytes:4194304},"MAX_PINNED_TOOLS",0,10,"MCP_IDLE_MS",0,18e5,"MEMORY_EDIT",0,{maxSteps:20},"MEMORY_LIMITS",0,{facts:400,factsPerNote:50,descriptionChars:100},"PAGE_SIZE",0,50,"PATHS",0,n,"PROMPT_BUDGET",0,6e3,"PROMPT_LINE",0,{skill:90,toolArgs:30,jobOutcome:160,botMemory:100,threadStatus:200,routineRequest:300,routineOutcome:200},"REACH",0,{pollSeconds:50,retryMs:5e3,idleMs:6e5,messages:40,trimTo:30,oldChars:1e3,files:3,fileBytes:0x2d00000,rateRetries:3,rateWaitMs:3e4,codeDigits:4,held:5,pictures:9,drawMs:6e4,lookMs:2e3},"RECENT_CALL",0,{rows:20,tokens:600},"ROUTINE",0,{tickMs:3e4,max:12,minHours:1,runsShown:5},"SEARCH",0,{sources:3,excerptChars:1200,timeoutMs:3e4},"SIGNAL_PACE_MS",0,150,"SKILLS_FOLDED",0,{design:l,"picture-book":l,"interactive-page":l},"SKILL_FILES",0,{uploadBytes:0x1400000,inlineBytes:524288,unpackedBytes:0x6400000,archiveEntries:1e3},"SKILL_FILES_LISTED",0,50,"STUDIO_SERVER",0,"studio","TEXT_CALL",0,{maxSteps:12,model:"text",autoTurns:10},"THREAD_LABEL_REACH",0,20,"THREAD_STATUS_LIMIT",0,10,"TOOL_OUTPUT",0,{max:8e3,head:5500,tail:1500},"TOOL_SEARCH_SCHEMAS",0,8,"WORKSPACE_KEEP",0,{forMs:2592e5,sweepEveryMs:36e5},"WORKSPACE_VIEW",0,{rows:200,textMax:524288,autoCloseMs:5e3,elementMax:0x3200000}])},393189,e=>{"use strict";var t=e.i(912714),r=e.i(750227),s=e.i(687388),a=e.i(786025);let i=e=>`${(0,a.botFolder)(e)}/memory`;async function o(e,t=s.BOT_MEMORY_LIMITS.files){let l=i(e),u=(0,r.join)(a.WORKSPACE,l),c=(await n(u)).sort((e,t)=>t.info.mtimeMs-e.info.mtimeMs),d=await Promise.all(c.slice(0,t).map(async({name:e,info:t})=>({file:e,path:`${l}/${e}`,line:await p((0,r.join)(u,e)),at:new Date(t.mtimeMs),bytes:t.size})));return{folder:l,entries:d,total:c.length}}async function n(e){let s=await (0,t.readdir)(e).catch(()=>[]);return(await Promise.all(s.filter(e=>!e.startsWith(".")).map(async s=>{let a=await (0,t.stat)((0,r.join)(e,s)).catch(()=>null);return a?.isFile()?{name:s,info:a}:null}))).filter(e=>null!==e)}async function l(e){let o=(0,r.join)(a.WORKSPACE,i(e)),l=new Map;return await Promise.all((await n(o)).map(async({name:e,info:a})=>{let i=a.size>4*s.BOT_MEMORY_LIMITS.chars?null:await (0,t.readFile)((0,r.join)(o,e),"utf8").catch(()=>null);l.set(e,{text:null!==i&&c(i)<=s.BOT_MEMORY_LIMITS.chars?i:null,size:a.size,mtimeMs:a.mtimeMs,atime:a.atime,mtime:a.mtime})})),l}async function u(e,o){let l=i(e),u=(0,r.join)(a.WORKSPACE,l),{files:p,chars:d}=s.BOT_MEMORY_LIMITS,m=[],h=[],E=0;for(let{name:e,info:s}of(await n(u))){E+=1;let a=o.get(e);if(a&&a.size===s.size&&a.mtimeMs===s.mtimeMs)continue;let i=(0,r.join)(u,e),n=c(await (0,t.readFile)(i,"utf8").catch(()=>""));if(n<=d){a||h.push(e);continue}let p=`${n.toLocaleString("en-US")} characters, past the ${d.toLocaleString("en-US")} a memory file holds`;a?null!==a.text?(await (0,t.writeFile)(i,a.text),await (0,t.utimes)(i,a.atime,a.mtime),m.push(`Not kept: \`${l}/${e}\` came to ${p}, so it is back as it was. Write it again shorter.`)):m.push(`\`${l}/${e}\` is ${p}. Shorten it.`):(await (0,t.rm)(i,{force:!0}),E-=1,m.push(`Not kept: \`${l}/${e}\` came to ${p}, so it was removed. Write it again shorter.`))}if(E>p&&h.length){await Promise.all(h.map(e=>(0,t.rm)((0,r.join)(u,e),{force:!0})));let e=h.map(e=>`\`${l}/${e}\``).join(", ");m.push(`Not kept: your memory holds ${p} files at most and this made ${E}, so ${e} ${1===h.length?"was":"were"} removed. Delete or merge files no longer worth keeping, then write it again.`)}return m.length?m.join("\n"):null}let c=e=>[...e.trim()].length;async function p(e){let r=await (0,t.open)(e,"r").catch(()=>null);if(!r)return"";try{let e=Buffer.alloc(1024),{bytesRead:t}=await r.read(e,0,1024,0),s=e.toString("utf8",0,t).split("\n").map(e=>e.trim()).filter(Boolean);if("---"===s[0]){let e=s.find(e=>e.startsWith("description:"));if(e)return e.slice(12).trim().replace(/^["']|["']$/g,"");let t=s.indexOf("---",1);return t>0?(s[t+1]??"").replace(/^#+\s*/,""):""}return(s[0]??"").replace(/^#+\s*/,"")}finally{await r.close()}}e.s(["botMemoryFolder",0,i,"holdBotMemory",0,l,"keepBotMemory",0,u,"listBotMemory",0,o])},41444,e=>{"use strict";function t(e,t){let r=e.replace(/\s+/g," ").trim();return r.length>t?`${r.slice(0,t-1).trimEnd()}…`:r}e.s(["PromiseChain",0,()=>{let e=Promise.resolve();return t=>{let r=e.then(()=>t());return e=r.catch(()=>{}),r}},"clip",0,t,"errorToString",0,function(e){if(e instanceof Error)return e.message;if("object"!=typeof e||null===e)return String(e);let{message:r,error:s}=e;if("string"==typeof r&&r)return r;if("string"==typeof s&&s)return s;let a=s?.message;if("string"==typeof a&&a)return a;try{return t(JSON.stringify(e),300)}catch{return`${e.constructor?.name??"Object"} thrown without a message`}},"hostOf",0,function(e){try{return new URL(e).hostname.replace(/^www\./,"")}catch{return null}},"plainText",0,function(e){return e.replace(/```[\s\S]*?```/g," ").replace(/`([^`]*)`/g,"$1").replace(/!?\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^\s{0,3}(#{1,6}\s+|[-*+]\s+|\d+\.\s+|>\s?)/gm,"").replace(/(\*\*|__)(.*?)\1/g,"$2").replace(/(\*|_)(.*?)\1/g,"$2").replace(/^\s*\|?[\s:|-]+\|\s*$/gm," ").replace(/\|/g," ").replace(/\s+/g," ").trim()},"slug",0,function(e){return e.toLowerCase().replace(/[^\p{L}\p{N}]+/gu,"-").replace(/^-+|-+$/g,"").slice(0,40)}])}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__0tvoct-._.js.map
@@ -1,7 +0,0 @@
1
- module.exports=[874533,(e,t,s)=>{t.exports=e.x("node:child_process",()=>require("node:child_process"))},666680,(e,t,s)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},902157,(e,t,s)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},912714,(e,t,s)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},660526,(e,t,s)=>{t.exports=e.x("node:os",()=>require("node:os"))},750227,(e,t,s)=>{t.exports=e.x("node:path",()=>require("node:path"))},59639,(e,t,s)=>{t.exports=e.x("node:process",()=>require("node:process"))},509656,(e,t,s)=>{t.exports=e.x("node:tty",()=>require("node:tty"))},812057,(e,t,s)=>{t.exports=e.x("node:util",()=>require("node:util"))},232347,e=>{"use strict";let t,s,r,n,a,i;var o,c=e.i(333925),l=e.i(938281);let u={threads:!0,bots:!0,routines:!0,memory:!0,mcp:!0,config:!0,reach:!0,signins:!0},p=globalThis,d=p.__appEvents??=(t=new Set,{emit(e){for(let s of[...t])try{s(e)}catch(e){console.error("event listener failed",e)}},subscribe:e=>(t.add(e),()=>{t.delete(e)})}),f=p.__presence??=(o=c.BROWSER_GONE_MS,s=!1,r=null,n=new Set,a=new Set,i=e=>{for(let t of[...e])try{t()}catch(e){console.error("presence listener failed",e)}},{get watching(){return s},track(e){if(e>0){r&&clearTimeout(r),r=null,s||(s=!0,i(a));return}!r&&s&&(r=setTimeout(()=>{r=null,s=!1,i(n)},o))},onGone:e=>(n.add(e),()=>n.delete(e)),onBack:e=>(a.add(e),()=>a.delete(e))});p.__appEventStream??=function(e,t={}){let s=new TextEncoder,r=t.heartbeatMs??2e4,n=0;return{respond:(a,i)=>{let o=()=>{};return new Response(new ReadableStream({async start(c){let u=!1,p=new Map,d=[],f=e=>{if(!u)try{c.enqueue(s.encode(e))}catch{o()}},_=e=>f(`data: ${JSON.stringify(e)}
2
-
3
- `),S=e=>{let s={last:null},r=setTimeout(()=>{p.delete(e),!u&&s.last&&(_(s.last),S(e))},t.coalesce?.ms);p.set(e,{timer:r,wait:s})},g=e=>{if(u)return;let s=t.coalesce?.keyOf(e)??null;if(null===s)return _(e);let r=p.get(s);if(r){r.wait.last=e;return}_(e),S(s)},m=e.subscribe(e=>d?d.push(e):g(e)),w=setInterval(()=>f(": ping\n\n"),r);n+=1,t.onWatchers?.(n),o=()=>{if(!u){for(let e of(u=!0,n-=1,t.onWatchers?.(n),m(),clearInterval(w),p.values()))clearTimeout(e.timer);try{c.close()}catch{}}},a.addEventListener("abort",o);try{for(let e of await i?.()??[])_(e)}catch(e){l.logger.error("event stream opening failed",e),o();return}let E=d;for(let e of(d=null,E))g(e)},cancel(){o()}}),{headers:{"Content-Type":"text/event-stream; charset=utf-8","Cache-Control":"no-store","X-Accel-Buffering":"no"}})},get watchers(){return n}}}(d,{coalesce:{ms:c.SIGNAL_PACE_MS,keyOf:e=>e.type in u?e.type:null},onWatchers:f.track}),e.s(["appEvents",0,d,"presence",0,f],232347)},333925,e=>{"use strict";let t=process.env.THURSDAY_APP_DIR?.trim()||process.cwd(),s=process.env.THURSDAY_HOME?.trim()||process.cwd(),r=process.env.THURSDAY_URL?.trim()||`http://localhost:${process.env.PORT?.trim()||3e3}`,n=`${s}/local.db`,a=`file:${n}`,i=".ai-workspace",o={workspace:i,artifacts:"artifacts",projects:"projects",scratch:"scratch",bots:"bots",output:".output",signIns:".sign-ins",skills:{default:"skills",custom:`${i}/.agents/skills`,own:".agents/skills",runtime:"runtime",seeds:"seed-skills"}},c="artifact";e.s(["APP_DIR",0,t,"APP_NAME",0,"Thursday","APP_URL",0,r,"BOT_MEMORY_LIMITS",0,{files:20,chars:1e4},"BOT_RUN",0,{steps:100,compactAt:5e5,compactHeadroom:.8,summaryWords:{min:600,max:3e3,perTokens:200},participants:12,concurrent:4,turns:120,queuedMessages:200,silenceMs:3e5,overflowShrink:.6,retryMs:1e4,compactFiles:40},"BOT_WORK",0,{open:5,recent:5,said:80,files:2,reads:2,asked:400,readChars:4e3},"BROWSER_CLI",0,{readMs:15e3,loadMs:3e4},"BROWSER_GONE_MS",0,1e4,"BROWSER_VIEWPORT",0,"700x700","CALL_EXEC_TIMEOUT_MS",0,15e3,"CALL_RELAY",0,{quietMs:2e3,perTurn:3,readMs:15e3,chars:600},"CHATGPT_SIGN_IN",0,{waitMs:6e5,renewBeforeMs:3e5},"COMMON_VALIDATE",0,{name:{max:16},shortDescription:{max:60},description:{max:100},prompt:{max:4e3}},"CONNECTED_TOOL_TIMEOUT_MS",0,6e5,"DATA_DIR",0,s,"DB_FILE_NAME",0,a,"DB_PATH",0,n,"DECK",0,{slides:30,shotsMs:9e4},"EXEC_KILL_GRACE_MS",0,5e3,"EXEC_TIMEOUT_MS",0,18e4,"FINISHED_NOTICE",0,{rows:5,shown:1,words:240},"FULL_RESULT_LINES",0,400,"GATEWAY_CATALOG_MS",0,6e5,"GIVEN_FILES",0,{dir:"inbox",maxBytes:0x1900000,perMessage:8},"HISTORY_KEEP",0,{forMs:7776e6,sweepEveryMs:216e5},"INBOX_FINISHED",0,5,"IS_DEV",0,!1,"JOB_FOLDER_WALK",0,500,"LIVE_CALL",0,{startupMs:3e4,closeMs:15e3,transcriptGapMs:1500,transcriptSaveMs:500,appendMs:15e3,backendOutputTokens:4096,reasoningCheckMs:5e3,keyCheckMs:5e3},"LOOK",0,{maxBytes:4194304},"MAX_PINNED_TOOLS",0,10,"MCP_IDLE_MS",0,18e5,"MEMORY_LIMITS",0,{facts:400,factsPerNote:50,descriptionChars:100},"PATHS",0,o,"PROMPT_BUDGET",0,6e3,"PROMPT_LINE",0,{skill:90,toolArgs:30,jobOutcome:160,botMemory:100,threadStatus:200,routineRequest:300,routineOutcome:200},"REACH",0,{pollSeconds:50,retryMs:5e3,idleMs:6e5,messages:40,trimTo:30,oldChars:1e3,files:3,fileBytes:0x2d00000,rateRetries:3,rateWaitMs:3e4,codeDigits:4,held:5,pictures:9,drawMs:6e4,lookMs:2e3},"RECENT_CALL",0,{rows:20,tokens:600},"ROUTINE",0,{tickMs:3e4,max:12,minHours:1,runsShown:5},"SEARCH",0,{sources:3,excerptChars:1200,timeoutMs:3e4},"SIGNAL_PACE_MS",0,150,"SKILLS_FOLDED",0,{design:c,"picture-book":c,"interactive-page":c},"SKILL_FILES_LISTED",0,50,"STUDIO_SERVER",0,"studio","TEXT_CALL",0,{maxSteps:12,model:"text",autoTurns:10},"THREAD_LABEL_REACH",0,20,"THREAD_STATUS_LIMIT",0,10,"TOOL_OUTPUT",0,{max:8e3,head:5500,tail:1500},"TOOL_SEARCH_SCHEMAS",0,8,"WORKSPACE_KEEP",0,{forMs:2592e5,sweepEveryMs:36e5}])},379651,377205,e=>{"use strict";var t=e.i(912714),s=e.i(750227),r=e.i(232347),n=e.i(333925),a=e.i(871096),i=e.i(938281);let o=e=>e.trim().toLowerCase().replace(/^[a-z]+:\/\//,"").replace(/^www\./,"").replace(/[/?#].*$/,"");e.s(["siteOf",0,o],377205);let c=(0,s.join)(n.DATA_DIR,n.PATHS.signIns),l=e=>(0,s.join)(c,`${encodeURIComponent(o(e))}.json`);async function u(e){try{return JSON.parse(await (0,t.readFile)(l(e),"utf8"))}catch{return null}}async function p(e){let t=o(e),s=await u(t);if(s)return s;let r=(await f()).map(e=>e.site).filter(e=>t.endsWith(`.${e}`)).sort((e,t)=>t.length-e.length)[0];return r?u(r):null}async function d(e){await (0,t.mkdir)(c,{recursive:!0}),await (0,t.writeFile)(l(e.site),JSON.stringify(e),{mode:384}),r.appEvents.emit({type:"signins"})}async function f(){let e=await (0,t.readdir)(c).catch(()=>[]);return(await Promise.all(e.filter(e=>e.endsWith(".json")).map(e=>u(decodeURIComponent(e.slice(0,-5)))))).flatMap(e=>e?[(({state:e,...t})=>t)(e)]:[]).sort((e,t)=>e.site.localeCompare(t.site))}async function _(e){let t=await p(e.site);if(t&&!t.bots.includes(e.bot)){let s=t.asking.includes(e.bot)?t:{...t,asking:[...t.asking,e.bot]};return s!==t&&await d(s),{kind:"taken",signIn:(({state:e,...t})=>t)(s)}}let s=t?.site??o(e.site),r={site:s,account:e.account.trim()||s,bots:[...new Set([...t?.bots??[],e.bot])],asking:(t?.asking??[]).filter(t=>t!==e.bot),keptAt:new Date().toISOString(),usedAt:t?.usedAt??null,state:e.state};return await d(r),{kind:"kept",signIn:(({state:e,...t})=>t)(r)}}let S=globalThis.__signInsHeld??=new Map;async function g(e,t){let s=await p(e);if(!s)return{kind:"none",kept:(await f()).map(e=>e.site)};if(!s.bots.includes(t))return s.asking.includes(t)||await d({...s,asking:[...s.asking,t]}),{kind:"ask",signIn:(({state:e,...t})=>t)(s)};let r={...s,usedAt:new Date().toISOString()};return await d(r),{kind:"state",signIn:(({state:e,...t})=>t)(r),state:s.state}}async function m(e,t){return(await (0,a.listBrowsers)(e,t)).find(e=>e.name===t.PLAYWRIGHT_CLI_SESSION)??null}async function w(e,t){let s=await m(e,t);return s?s.attached?"theirs":"own":null}async function E(e,t){let s=await m(e,t);return!!s&&!s.attached&&!0===s.headed}let h=e=>`${e.name}
4
- ${e.domain}
5
- ${e.path}`;async function T(e){let t,s=(0,a.jobShellEnv)(e),r=s.PLAYWRIGHT_CLI_SESSION??e,i=S.get(r);if(!i?.sites.size)return;let o=await (0,a.openWorkspace)();if(await w(o,s)!=="own")return void S.delete(r);let c=(0,a.browserStateFile)();try{let e=await o.exec((0,a.saveBrowserState)(c),{env:s,timeoutMs:n.BROWSER_CLI.loadMs});if(0!==e.exitCode)return;let r=JSON.parse(await o.readFile(c,"utf-8"));t=new Map((r.cookies??[]).map(e=>[h(e),e]))}finally{await o.exec(`rm -f ${c}`)}for(let e of i.sites){let s=await u(e),r=s?.state;if(!s||!r?.cookies||!s.bots.includes(i.bot))continue;let n=!1,a=r.cookies.map(e=>{let s=t.get(h(e));return s&&JSON.stringify(s)!==JSON.stringify(e)?(n=!0,s):e});n&&await d({...s,state:{...r,cookies:a}})}}async function I(){let e=(0,s.join)(a.WORKSPACE,n.PATHS.bots);for(let r of(await (0,t.readdir)(e).catch(()=>[]))){let n=(0,s.join)(e,r,".auth");for(let e of(await (0,t.readdir)(n).catch(()=>[]))){if(!e.endsWith(".json"))continue;let a=(0,s.join)(n,e);try{let o=JSON.parse(await (0,t.readFile)(a,"utf8")),c=e.slice(0,-5),l=(await (0,t.readFile)((0,s.join)(n,"account.txt"),"utf8").catch(()=>"")).trim(),u=await _({site:c,account:l,bot:r,state:o});await (0,t.rm)(a),i.logger.info("kept"===u.kind?`sign-ins: took in ${r}'s ${c}`:`sign-ins: ${c} is kept for another bot already; ${r}'s old copy was removed and ${r} is asking for it`)}catch(e){i.logger.warn(`sign-ins: could not take in ${a}`,e)}}}}e.s(["adoptKeptSessions",0,I,"borrowSignIn",0,g,"holdSignIn",0,function(e,t,s){let r=S.get(e);r&&r.bot===t?r.sites.add(s):S.set(e,{bot:t,sites:new Set([s])})},"keepSignIn",0,_,"renewSignIns",0,T,"sessionBrowser",0,w,"sessionWindow",0,E],379651)},64774,e=>{"use strict";function t(e,t){let s=e.replace(/\s+/g," ").trim();return s.length>t?`${s.slice(0,t-1).trimEnd()}…`:s}e.s(["PromiseChain",0,()=>{let e=Promise.resolve();return t=>{let s=e.then(()=>t());return e=s.catch(()=>{}),s}},"clip",0,t,"errorToString",0,function(e){if(e instanceof Error)return e.message;if("object"!=typeof e||null===e)return String(e);let{message:s,error:r}=e;if("string"==typeof s&&s)return s;if("string"==typeof r&&r)return r;let n=r?.message;if("string"==typeof n&&n)return n;try{return t(JSON.stringify(e),300)}catch{return`${e.constructor?.name??"Object"} thrown without a message`}},"hostOf",0,function(e){try{return new URL(e).hostname.replace(/^www\./,"")}catch{return null}},"plainText",0,function(e){return e.replace(/```[\s\S]*?```/g," ").replace(/`([^`]*)`/g,"$1").replace(/!?\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^\s{0,3}(#{1,6}\s+|[-*+]\s+|\d+\.\s+|>\s?)/gm,"").replace(/(\*\*|__)(.*?)\1/g,"$2").replace(/(\*|_)(.*?)\1/g,"$2").replace(/^\s*\|?[\s:|-]+\|\s*$/gm," ").replace(/\|/g," ").replace(/\s+/g," ").trim()},"slug",0,function(e){return e.toLowerCase().replace(/[^\p{L}\p{N}]+/gu,"-").replace(/^-+|-+$/g,"").slice(0,40)}])}];
6
-
7
- //# sourceMappingURL=%5Broot-of-the-server%5D__118qjk_._.js.map
@@ -1,5 +0,0 @@
1
- module.exports=[418520,e=>e.a(async(t,r)=>{try{var s=await e.y("@libsql/client-6da938047d5fc1cd");e.n(s),r()}catch(e){r(e)}},!0),666680,(e,t,r)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},902157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},750227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},59639,(e,t,r)=>{t.exports=e.x("node:process",()=>require("node:process"))},509656,(e,t,r)=>{t.exports=e.x("node:tty",()=>require("node:tty"))},812057,(e,t,r)=>{t.exports=e.x("node:util",()=>require("node:util"))},232347,e=>{"use strict";let t,r,s,a,o,i;var l,n=e.i(333925),c=e.i(938281);let p={threads:!0,bots:!0,routines:!0,memory:!0,mcp:!0,config:!0,reach:!0,signins:!0},u=globalThis,d=u.__appEvents??=(t=new Set,{emit(e){for(let r of[...t])try{r(e)}catch(e){console.error("event listener failed",e)}},subscribe:e=>(t.add(e),()=>{t.delete(e)})}),m=u.__presence??=(l=n.BROWSER_GONE_MS,r=!1,s=null,a=new Set,o=new Set,i=e=>{for(let t of[...e])try{t()}catch(e){console.error("presence listener failed",e)}},{get watching(){return r},track(e){if(e>0){s&&clearTimeout(s),s=null,r||(r=!0,i(o));return}!s&&r&&(s=setTimeout(()=>{s=null,r=!1,i(a)},l))},onGone:e=>(a.add(e),()=>a.delete(e)),onBack:e=>(o.add(e),()=>o.delete(e))});u.__appEventStream??=function(e,t={}){let r=new TextEncoder,s=t.heartbeatMs??2e4,a=0;return{respond:(o,i)=>{let l=()=>{};return new Response(new ReadableStream({async start(n){let p=!1,u=new Map,d=[],m=e=>{if(!p)try{n.enqueue(r.encode(e))}catch{l()}},f=e=>m(`data: ${JSON.stringify(e)}
2
-
3
- `),_=e=>{let r={last:null},s=setTimeout(()=>{u.delete(e),!p&&r.last&&(f(r.last),_(e))},t.coalesce?.ms);u.set(e,{timer:s,wait:r})},E=e=>{if(p)return;let r=t.coalesce?.keyOf(e)??null;if(null===r)return f(e);let s=u.get(r);if(s){s.wait.last=e;return}f(e),_(r)},h=e.subscribe(e=>d?d.push(e):E(e)),y=setInterval(()=>m(": ping\n\n"),s);a+=1,t.onWatchers?.(a),l=()=>{if(!p){for(let e of(p=!0,a-=1,t.onWatchers?.(a),h(),clearInterval(y),u.values()))clearTimeout(e.timer);try{n.close()}catch{}}},o.addEventListener("abort",l);try{for(let e of await i?.()??[])f(e)}catch(e){c.logger.error("event stream opening failed",e),l();return}let S=d;for(let e of(d=null,S))E(e)},cancel(){l()}}),{headers:{"Content-Type":"text/event-stream; charset=utf-8","Cache-Control":"no-store","X-Accel-Buffering":"no"}})},get watchers(){return a}}}(d,{coalesce:{ms:n.SIGNAL_PACE_MS,keyOf:e=>e.type in p?e.type:null},onWatchers:m.track}),e.s(["appEvents",0,d,"presence",0,m],232347)},139886,e=>{"use strict";let t=e=>e.split("/").map(encodeURIComponent).join("/");e.s(["queryKey",0,{memory:"/api/memory",memoryPage:e=>({url:"/api/memory",query:{offset:e||null}}),mcp:"/api/mcp",mcpServer:e=>({url:"/api/mcp",pathVariable:[e]}),mcpTools:"/api/mcp/tools",skills:"/api/skills",skillNode:(e,t,r)=>({url:"/api/skills",pathVariable:[e,t],query:{path:r}}),bot:"/api/bot",botMemory:"/api/bot/memory",botMemoryFiles:e=>({url:"/api/bot/memory/files",query:{bot:e}}),routines:"/api/routine",threads:"/api/bot/thread",threadHistory:e=>({url:"/api/bot/thread",query:{history:1,before:e}}),thread:e=>({url:"/api/bot/thread",query:{id:e}}),toolResult:(e,t)=>({url:"/api/bot/thread",pathVariable:[e],query:{call:t}}),workspace:"/api/workspace",workspaceFolder:(e,t)=>({url:"/api/workspace",query:{path:e||null,rows:t}}),workspaceFiles:e=>({url:"/api/workspace/files",query:{paths:JSON.stringify(e)}}),artifacts:"/api/artifact",artifactShelf:e=>({url:"/api/artifact",query:{rows:e}}),artifactSet:(e,t)=>({url:"/api/artifact",query:{set:e,rows:t}}),file:e=>`/api/file/${t(e)}`,fileFace:e=>`/api/file/${t(e)}?face`,favicon:e=>`/api/favicon/${encodeURIComponent(e)}`,fileView:e=>`/artifact/${t(e)}`,events:"/api/events",config:"/api/config",callHistory:e=>({url:"/api/thursday/call",query:{before:e}}),thursdaySettings:"/api/thursday/settings",toolCall:"/api/thursday/tool-call",signIns:"/api/signins",reach:"/api/reach",textCall:"/api/thursday/text",memoryEdit:"/api/memory/edit",llmModel:"/api/llm-model",modelCatalog:"/api/llm-model/catalog",gatewayCredits:"/api/llm-model/credits",subscriptionUsage:"/api/llm-model/subscription"}])},333925,e=>{"use strict";let t=process.env.THURSDAY_APP_DIR?.trim()||process.cwd(),r=process.env.THURSDAY_HOME?.trim()||process.cwd(),s=process.env.THURSDAY_URL?.trim()||`http://localhost:${process.env.PORT?.trim()||3e3}`,a=`${r}/local.db`,o=`file:${a}`,i=".ai-workspace",l={workspace:i,artifacts:"artifacts",projects:"projects",scratch:"scratch",bots:"bots",output:".output",signIns:".sign-ins",skills:{default:"skills",custom:`${i}/.agents/skills`,own:".agents/skills",runtime:"runtime",seeds:"seed-skills"}},n="artifact";e.s(["APP_DIR",0,t,"APP_NAME",0,"Thursday","APP_URL",0,s,"BOT_MEMORY_LIMITS",0,{files:20,chars:1e4},"BOT_RUN",0,{steps:100,compactAt:5e5,compactHeadroom:.8,summaryWords:{min:600,max:3e3,perTokens:200},participants:12,concurrent:4,turns:120,queuedMessages:200,silenceMs:3e5,overflowShrink:.6,retryMs:1e4,compactFiles:40},"BOT_WORK",0,{open:5,recent:5,said:80,files:2,reads:2,asked:400,readChars:4e3},"BROWSER_CLI",0,{readMs:15e3,loadMs:3e4},"BROWSER_GONE_MS",0,1e4,"BROWSER_VIEWPORT",0,"700x700","CALL_EXEC_TIMEOUT_MS",0,15e3,"CALL_RELAY",0,{quietMs:2e3,perTurn:3,readMs:15e3,chars:600},"CHATGPT_SIGN_IN",0,{waitMs:6e5,renewBeforeMs:3e5},"COMMON_VALIDATE",0,{name:{max:16},shortDescription:{max:60},description:{max:100},prompt:{max:4e3}},"CONNECTED_TOOL_TIMEOUT_MS",0,6e5,"DATA_DIR",0,r,"DB_FILE_NAME",0,o,"DB_PATH",0,a,"DECK",0,{slides:30,shotsMs:9e4},"EXEC_KILL_GRACE_MS",0,5e3,"EXEC_TIMEOUT_MS",0,18e4,"FINISHED_NOTICE",0,{rows:5,shown:1,words:240},"FULL_RESULT_LINES",0,400,"GATEWAY_CATALOG_MS",0,6e5,"GIVEN_FILES",0,{dir:"inbox",maxBytes:0x1900000,perMessage:8},"HISTORY_KEEP",0,{forMs:7776e6,sweepEveryMs:216e5},"INBOX_FINISHED",0,5,"IS_DEV",0,!1,"JOB_FOLDER_WALK",0,500,"LIVE_CALL",0,{startupMs:3e4,closeMs:15e3,transcriptGapMs:1500,transcriptSaveMs:500,appendMs:15e3,backendOutputTokens:4096,reasoningCheckMs:5e3,keyCheckMs:5e3},"LOOK",0,{maxBytes:4194304},"MAX_PINNED_TOOLS",0,10,"MCP_IDLE_MS",0,18e5,"MEMORY_LIMITS",0,{facts:400,factsPerNote:50,descriptionChars:100},"PATHS",0,l,"PROMPT_BUDGET",0,6e3,"PROMPT_LINE",0,{skill:90,toolArgs:30,jobOutcome:160,botMemory:100,threadStatus:200,routineRequest:300,routineOutcome:200},"REACH",0,{pollSeconds:50,retryMs:5e3,idleMs:6e5,messages:40,trimTo:30,oldChars:1e3,files:3,fileBytes:0x2d00000,rateRetries:3,rateWaitMs:3e4,codeDigits:4,held:5,pictures:9,drawMs:6e4,lookMs:2e3},"RECENT_CALL",0,{rows:20,tokens:600},"ROUTINE",0,{tickMs:3e4,max:12,minHours:1,runsShown:5},"SEARCH",0,{sources:3,excerptChars:1200,timeoutMs:3e4},"SIGNAL_PACE_MS",0,150,"SKILLS_FOLDED",0,{design:n,"picture-book":n,"interactive-page":n},"SKILL_FILES_LISTED",0,50,"STUDIO_SERVER",0,"studio","TEXT_CALL",0,{maxSteps:12,model:"text",autoTurns:10},"THREAD_LABEL_REACH",0,20,"THREAD_STATUS_LIMIT",0,10,"TOOL_OUTPUT",0,{max:8e3,head:5500,tail:1500},"TOOL_SEARCH_SCHEMAS",0,8,"WORKSPACE_KEEP",0,{forMs:2592e5,sweepEveryMs:36e5}])},64774,e=>{"use strict";function t(e,t){let r=e.replace(/\s+/g," ").trim();return r.length>t?`${r.slice(0,t-1).trimEnd()}…`:r}e.s(["PromiseChain",0,()=>{let e=Promise.resolve();return t=>{let r=e.then(()=>t());return e=r.catch(()=>{}),r}},"clip",0,t,"errorToString",0,function(e){if(e instanceof Error)return e.message;if("object"!=typeof e||null===e)return String(e);let{message:r,error:s}=e;if("string"==typeof r&&r)return r;if("string"==typeof s&&s)return s;let a=s?.message;if("string"==typeof a&&a)return a;try{return t(JSON.stringify(e),300)}catch{return`${e.constructor?.name??"Object"} thrown without a message`}},"hostOf",0,function(e){try{return new URL(e).hostname.replace(/^www\./,"")}catch{return null}},"plainText",0,function(e){return e.replace(/```[\s\S]*?```/g," ").replace(/`([^`]*)`/g,"$1").replace(/!?\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^\s{0,3}(#{1,6}\s+|[-*+]\s+|\d+\.\s+|>\s?)/gm,"").replace(/(\*\*|__)(.*?)\1/g,"$2").replace(/(\*|_)(.*?)\1/g,"$2").replace(/^\s*\|?[\s:|-]+\|\s*$/gm," ").replace(/\|/g," ").replace(/\s+/g," ").trim()},"slug",0,function(e){return e.toLowerCase().replace(/[^\p{L}\p{N}]+/gu,"-").replace(/^-+|-+$/g,"").slice(0,40)}])}];
4
-
5
- //# sourceMappingURL=%5Broot-of-the-server%5D__1b8tp42._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[874533,(e,t,i)=>{t.exports=e.x("node:child_process",()=>require("node:child_process"))},666680,(e,t,i)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},902157,(e,t,i)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},912714,(e,t,i)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},660526,(e,t,i)=>{t.exports=e.x("node:os",()=>require("node:os"))},750227,(e,t,i)=>{t.exports=e.x("node:path",()=>require("node:path"))},59639,(e,t,i)=>{t.exports=e.x("node:process",()=>require("node:process"))},509656,(e,t,i)=>{t.exports=e.x("node:tty",()=>require("node:tty"))},812057,(e,t,i)=>{t.exports=e.x("node:util",()=>require("node:util"))},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,i)=>({url:"/api/skills",pathVariable:[e,t],query:{path:i}}),bot:"/api/bot",botMemory:"/api/bot/memory",botMemoryFiles:e=>({url:"/api/bot/memory/files",query:{bot:e}}),routines:"/api/routine",threads:"/api/bot/thread",threadHistory:e=>({url:"/api/bot/thread",query:{history:1,before:e}}),thread:e=>({url:"/api/bot/thread",query:{id:e}}),toolResult:(e,t)=>({url:"/api/bot/thread",pathVariable:[e],query:{call:t}}),workspace:"/api/workspace",workspaceFolder:(e,t)=>({url:"/api/workspace",query:{path:e||null,rows:t}}),workspaceFiles:e=>({url:"/api/workspace/files",query:{paths:JSON.stringify(e)}}),artifacts:"/api/artifact",artifactShelf:e=>({url:"/api/artifact",query:{rows:e}}),artifactSet:(e,t)=>({url:"/api/artifact",query:{set:e,rows:t}}),file:e=>`/api/file/${t(e)}`,fileFace:e=>`/api/file/${t(e)}?face`,favicon:e=>`/api/favicon/${encodeURIComponent(e)}`,fileView:e=>`/artifact/${t(e)}`,events:"/api/events",config:"/api/config",callHistory:e=>({url:"/api/thursday/call",query:{before:e}}),thursdaySettings:"/api/thursday/settings",toolCall:"/api/thursday/tool-call",signIns:"/api/signins",reach:"/api/reach",textCall:"/api/thursday/text",memoryEdit:"/api/memory/edit",llmModel:"/api/llm-model",modelCatalog:"/api/llm-model/catalog",gatewayCredits:"/api/llm-model/credits",subscriptionUsage:"/api/llm-model/subscription"}])},687388,e=>{"use strict";let t=process.env.THURSDAY_APP_DIR?.trim()||process.cwd(),i=process.env.THURSDAY_HOME?.trim()||process.cwd(),s=process.env.THURSDAY_URL?.trim()||`http://localhost:${process.env.PORT?.trim()||3e3}`,r=`${i}/local.db`,a=`file:${r}`,o=".ai-workspace",n={workspace:o,artifacts:"artifacts",projects:"projects",scratch:"scratch",bots:"bots",output:".output",signIns:".sign-ins",skills:{default:"skills",custom:`${o}/.agents/skills`,own:".agents/skills",runtime:"runtime",seeds:"seed-skills"}},l="artifact";e.s(["APP_DIR",0,t,"APP_NAME",0,"Thursday","APP_URL",0,s,"ARTIFACT_VIEW",0,{rows:200,setFiles:120},"BOT_MEMORY_LIMITS",0,{files:20,chars:1e4},"BOT_RUN",0,{steps:100,compactAt:5e5,compactHeadroom:.8,summaryWords:{min:600,max:3e3,perTokens:200},participants:12,concurrent:4,turns:120,queuedMessages:200,silenceMs:3e5,overflowShrink:.6,retryMs:1e4,compactFiles:40},"BOT_WORK",0,{open:5,recent:5,said:80,files:2,reads:2,asked:400,readChars:4e3},"BROWSER_CLI",0,{readMs:15e3,loadMs:3e4},"BROWSER_GONE_MS",0,1e4,"BROWSER_VIEWPORT",0,"700x700","CALL_EXEC_TIMEOUT_MS",0,15e3,"CALL_HISTORY_PAGE",0,10,"CALL_RELAY",0,{quietMs:2e3,perTurn:3,readMs:15e3,chars:600},"CHATGPT_SIGN_IN",0,{waitMs:6e5,renewBeforeMs:3e5},"CHATGPT_USAGE_HIGH",0,80,"COMMON_VALIDATE",0,{name:{max:16},shortDescription:{max:60},description:{max:100},prompt:{max:4e3}},"CONNECTED_TOOL_TIMEOUT_MS",0,6e5,"DATA_DIR",0,i,"DB_FILE_NAME",0,a,"DB_PATH",0,r,"DECK",0,{slides:30,shotsMs:9e4},"EXEC_KILL_GRACE_MS",0,5e3,"EXEC_TIMEOUT_MS",0,18e4,"FAVICON",0,{timeoutMs:4e3,maxBytes:3e5,kept:500,pageBytes:65536},"FINISHED_NOTICE",0,{rows:5,shown:1,words:240},"FULL_RESULT_LINES",0,400,"GATEWAY_CATALOG_MS",0,6e5,"GATEWAY_LOW_CREDIT",0,1,"INBOX_FINISHED",0,5,"IS_DEV",0,!1,"JOB_FOLDER_WALK",0,500,"LIVE_CALL",0,{startupMs:3e4,closeMs:15e3,transcriptGapMs:1500,transcriptSaveMs:500,appendMs:15e3,backendOutputTokens:4096,reasoningCheckMs:5e3,keyCheckMs:5e3},"LOOK",0,{maxBytes:4194304},"MAX_PINNED_TOOLS",0,10,"MCP_IDLE_MS",0,18e5,"MEMORY_EDIT",0,{maxSteps:20},"MEMORY_LIMITS",0,{facts:400,factsPerNote:50,descriptionChars:100},"PAGE_SIZE",0,50,"PATHS",0,n,"PROMPT_BUDGET",0,6e3,"PROMPT_LINE",0,{skill:90,toolArgs:30,jobOutcome:160,botMemory:100,threadStatus:200,routineRequest:300,routineOutcome:200},"REACH",0,{pollSeconds:50,retryMs:5e3,idleMs:6e5,messages:40,trimTo:30,oldChars:1e3,files:3,fileBytes:0x2d00000,rateRetries:3,rateWaitMs:3e4,codeDigits:4,held:5,pictures:9,drawMs:6e4,lookMs:2e3},"RECENT_CALL",0,{rows:20,tokens:600},"ROUTINE",0,{tickMs:3e4,max:12,minHours:1,runsShown:5},"SEARCH",0,{sources:3,excerptChars:1200,timeoutMs:3e4},"SIGNAL_PACE_MS",0,150,"SKILLS_FOLDED",0,{design:l,"picture-book":l,"interactive-page":l},"SKILL_FILES",0,{uploadBytes:0x1400000,inlineBytes:524288,unpackedBytes:0x6400000,archiveEntries:1e3},"SKILL_FILES_LISTED",0,50,"STUDIO_SERVER",0,"studio","TEXT_CALL",0,{maxSteps:12,model:"text",autoTurns:10},"THREAD_LABEL_REACH",0,20,"THREAD_STATUS_LIMIT",0,10,"TOOL_OUTPUT",0,{max:8e3,head:5500,tail:1500},"TOOL_SEARCH_SCHEMAS",0,8,"WORKSPACE_KEEP",0,{forMs:2592e5,sweepEveryMs:36e5},"WORKSPACE_VIEW",0,{rows:200,textMax:524288,autoCloseMs:5e3,elementMax:0x3200000}])},629668,e=>{"use strict";var t=e.i(175936),i=e.i(687388);let s=e=>`text/${e}; charset=utf-8`,r={md:{kind:"markdown",mime:s("markdown")},markdown:{kind:"markdown",mime:s("markdown")},csv:{kind:"csv",mime:s("csv")},json:{kind:"json",mime:"application/json; charset=utf-8"},txt:{kind:"text",mime:s("plain")},log:{kind:"text",mime:s("plain")},html:{kind:"frame",mime:s("html")},htm:{kind:"frame",mime:s("html")},pdf:{kind:"frame",mime:"application/pdf"},png:{kind:"image",mime:"image/png"},jpg:{kind:"image",mime:"image/jpeg"},jpeg:{kind:"image",mime:"image/jpeg"},gif:{kind:"image",mime:"image/gif"},webp:{kind:"image",mime:"image/webp"},svg:{kind:"image",mime:"image/svg+xml"},mp3:{kind:"audio",mime:"audio/mpeg"},wav:{kind:"audio",mime:"audio/wav"},mp4:{kind:"video",mime:"video/mp4"},webm:{kind:"video",mime:"video/webm"},docx:{kind:"none",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},xlsx:{kind:"none",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},pptx:{kind:"none",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"},css:{kind:"none",mime:s("css")},js:{kind:"none",mime:s("javascript")},woff2:{kind:"none",mime:"font/woff2"}},a=e=>e.split(".").pop()?.toLowerCase()??"",o=new Set(["node_modules","__pycache__"]),n=new Set(["css","js","woff2"]),l=Object.keys(r).filter(e=>!n.has(e)),p=RegExp(String.raw`(?<![\p{L}\p{N}_/:@%-])\/?(?:[\p{L}\p{N}_.@%-]+/)*[\p{L}\p{N}_@%-]+(?:\.[\p{L}\p{N}_-]+)*\.(?:${l.join("|")})\b`,"giu"),m=`${i.PATHS.workspace}/`,c=t.queryKey.file(""),d=e=>e.startsWith(`${i.PATHS.artifacts}/`)&&["md","markdown","html","htm"].includes(a(e));e.s(["isListedFile",0,e=>!e.startsWith(".")&&!n.has(a(e)),"isListedFolder",0,e=>!e.startsWith(".")&&!o.has(e),"leadFirst",0,function(e){let t=e.findIndex(d);return t>0?[e[t],...e.filter((e,i)=>i!==t)]:e},"mimeOf",0,e=>r[a(e)]?.mime??"application/octet-stream","pathsIn",0,function(e){let t=e.replace(/\b[a-z][\w+.-]*:\/\/\S+/gi," ").replace(/\b[a-z][\w+.-]+:(?=\/)/gi," "),i=new Set,s="";for(let[e]of t.matchAll(p)){let t=!e.includes("/"),r=function(e){let t,i,s=(i=(t=function(e){if(!e.startsWith(c))return e;let t=e.slice(c.length);try{return decodeURIComponent(t)}catch{return t}}(e.trim())).indexOf(m))>=0?t.slice(i+m.length)||null:t.startsWith("/")||/^[A-Za-z]:/.test(t)||t.split("/").includes("..")?null:t||null;if(!s)return null;let[r,...a]=s.split("/");return a.length&&r.includes(".")?null:s}(t?s+e:e);t||(s=r?.slice(0,r.lastIndexOf("/")+1)??""),r&&i.add(r)}return[...i].slice(0,12)},"viewKindOf",0,e=>r[a(e)]?.kind??"none"])},41444,e=>{"use strict";function t(e,t){let i=e.replace(/\s+/g," ").trim();return i.length>t?`${i.slice(0,t-1).trimEnd()}…`:i}e.s(["PromiseChain",0,()=>{let e=Promise.resolve();return t=>{let i=e.then(()=>t());return e=i.catch(()=>{}),i}},"clip",0,t,"errorToString",0,function(e){if(e instanceof Error)return e.message;if("object"!=typeof e||null===e)return String(e);let{message:i,error:s}=e;if("string"==typeof i&&i)return i;if("string"==typeof s&&s)return s;let r=s?.message;if("string"==typeof r&&r)return r;try{return t(JSON.stringify(e),300)}catch{return`${e.constructor?.name??"Object"} thrown without a message`}},"hostOf",0,function(e){try{return new URL(e).hostname.replace(/^www\./,"")}catch{return null}},"plainText",0,function(e){return e.replace(/```[\s\S]*?```/g," ").replace(/`([^`]*)`/g,"$1").replace(/!?\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^\s{0,3}(#{1,6}\s+|[-*+]\s+|\d+\.\s+|>\s?)/gm,"").replace(/(\*\*|__)(.*?)\1/g,"$2").replace(/(\*|_)(.*?)\1/g,"$2").replace(/^\s*\|?[\s:|-]+\|\s*$/gm," ").replace(/\|/g," ").replace(/\s+/g," ").trim()},"slug",0,function(e){return e.toLowerCase().replace(/[^\p{L}\p{N}]+/gu,"-").replace(/^-+|-+$/g,"").slice(0,40)}])}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__1gzcbda._.js.map
@@ -1,7 +0,0 @@
1
- module.exports=[874533,(e,t,s)=>{t.exports=e.x("node:child_process",()=>require("node:child_process"))},666680,(e,t,s)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},902157,(e,t,s)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},912714,(e,t,s)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},660526,(e,t,s)=>{t.exports=e.x("node:os",()=>require("node:os"))},750227,(e,t,s)=>{t.exports=e.x("node:path",()=>require("node:path"))},59639,(e,t,s)=>{t.exports=e.x("node:process",()=>require("node:process"))},509656,(e,t,s)=>{t.exports=e.x("node:tty",()=>require("node:tty"))},812057,(e,t,s)=>{t.exports=e.x("node:util",()=>require("node:util"))},380690,e=>{"use strict";let t,s,r,n,a,i;var o,l=e.i(687388),c=e.i(640911);let u={threads:!0,bots:!0,routines:!0,memory:!0,mcp:!0,config:!0,reach:!0,signins:!0},p=globalThis,d=p.__appEvents??=(t=new Set,{emit(e){for(let s of[...t])try{s(e)}catch(e){console.error("event listener failed",e)}},subscribe:e=>(t.add(e),()=>{t.delete(e)})}),_=p.__presence??=(o=l.BROWSER_GONE_MS,s=!1,r=null,n=new Set,a=new Set,i=e=>{for(let t of[...e])try{t()}catch(e){console.error("presence listener failed",e)}},{get watching(){return s},track(e){if(e>0){r&&clearTimeout(r),r=null,s||(s=!0,i(a));return}!r&&s&&(r=setTimeout(()=>{r=null,s=!1,i(n)},o))},onGone:e=>(n.add(e),()=>n.delete(e)),onBack:e=>(a.add(e),()=>a.delete(e))}),f=p.__appEventStream??=function(e,t={}){let s=new TextEncoder,r=t.heartbeatMs??2e4,n=0;return{respond:(a,i)=>{let o=()=>{};return new Response(new ReadableStream({async start(l){let u=!1,p=new Map,d=[],_=e=>{if(!u)try{l.enqueue(s.encode(e))}catch{o()}},f=e=>_(`data: ${JSON.stringify(e)}
2
-
3
- `),S=e=>{let s={last:null},r=setTimeout(()=>{p.delete(e),!u&&s.last&&(f(s.last),S(e))},t.coalesce?.ms);p.set(e,{timer:r,wait:s})},E=e=>{if(u)return;let s=t.coalesce?.keyOf(e)??null;if(null===s)return f(e);let r=p.get(s);if(r){r.wait.last=e;return}f(e),S(s)},m=e.subscribe(e=>d?d.push(e):E(e)),g=setInterval(()=>_(": ping\n\n"),r);n+=1,t.onWatchers?.(n),o=()=>{if(!u){for(let e of(u=!0,n-=1,t.onWatchers?.(n),m(),clearInterval(g),p.values()))clearTimeout(e.timer);try{l.close()}catch{}}},a.addEventListener("abort",o);try{for(let e of await i?.()??[])f(e)}catch(e){c.logger.error("event stream opening failed",e),o();return}let w=d;for(let e of(d=null,w))E(e)},cancel(){o()}}),{headers:{"Content-Type":"text/event-stream; charset=utf-8","Cache-Control":"no-store","X-Accel-Buffering":"no"}})},get watchers(){return n}}}(d,{coalesce:{ms:l.SIGNAL_PACE_MS,keyOf:e=>e.type in u?e.type:null},onWatchers:_.track});e.s(["appEventStream",0,f,"appEvents",0,d,"presence",0,_],380690)},687388,e=>{"use strict";let t=process.env.THURSDAY_APP_DIR?.trim()||process.cwd(),s=process.env.THURSDAY_HOME?.trim()||process.cwd(),r=process.env.THURSDAY_URL?.trim()||`http://localhost:${process.env.PORT?.trim()||3e3}`,n=`${s}/local.db`,a=`file:${n}`,i=".ai-workspace",o={workspace:i,artifacts:"artifacts",projects:"projects",scratch:"scratch",bots:"bots",output:".output",signIns:".sign-ins",skills:{default:"skills",custom:`${i}/.agents/skills`,own:".agents/skills",runtime:"runtime",seeds:"seed-skills"}},l="artifact";e.s(["APP_DIR",0,t,"APP_NAME",0,"Thursday","APP_URL",0,r,"ARTIFACT_VIEW",0,{rows:200,setFiles:120},"BOT_MEMORY_LIMITS",0,{files:20,chars:1e4},"BOT_RUN",0,{steps:100,compactAt:5e5,compactHeadroom:.8,summaryWords:{min:600,max:3e3,perTokens:200},participants:12,concurrent:4,turns:120,queuedMessages:200,silenceMs:3e5,overflowShrink:.6,retryMs:1e4,compactFiles:40},"BOT_WORK",0,{open:5,recent:5,said:80,files:2,reads:2,asked:400,readChars:4e3},"BROWSER_CLI",0,{readMs:15e3,loadMs:3e4},"BROWSER_GONE_MS",0,1e4,"BROWSER_VIEWPORT",0,"700x700","CALL_EXEC_TIMEOUT_MS",0,15e3,"CALL_HISTORY_PAGE",0,10,"CALL_RELAY",0,{quietMs:2e3,perTurn:3,readMs:15e3,chars:600},"CHATGPT_SIGN_IN",0,{waitMs:6e5,renewBeforeMs:3e5},"CHATGPT_USAGE_HIGH",0,80,"COMMON_VALIDATE",0,{name:{max:16},shortDescription:{max:60},description:{max:100},prompt:{max:4e3}},"CONNECTED_TOOL_TIMEOUT_MS",0,6e5,"DATA_DIR",0,s,"DB_FILE_NAME",0,a,"DB_PATH",0,n,"DECK",0,{slides:30,shotsMs:9e4},"EXEC_KILL_GRACE_MS",0,5e3,"EXEC_TIMEOUT_MS",0,18e4,"FAVICON",0,{timeoutMs:4e3,maxBytes:3e5,kept:500,pageBytes:65536},"FINISHED_NOTICE",0,{rows:5,shown:1,words:240},"FULL_RESULT_LINES",0,400,"GATEWAY_CATALOG_MS",0,6e5,"GATEWAY_LOW_CREDIT",0,1,"INBOX_FINISHED",0,5,"IS_DEV",0,!1,"JOB_FOLDER_WALK",0,500,"LIVE_CALL",0,{startupMs:3e4,closeMs:15e3,transcriptGapMs:1500,transcriptSaveMs:500,appendMs:15e3,backendOutputTokens:4096,reasoningCheckMs:5e3,keyCheckMs:5e3},"LOOK",0,{maxBytes:4194304},"MAX_PINNED_TOOLS",0,10,"MCP_IDLE_MS",0,18e5,"MEMORY_EDIT",0,{maxSteps:20},"MEMORY_LIMITS",0,{facts:400,factsPerNote:50,descriptionChars:100},"PAGE_SIZE",0,50,"PATHS",0,o,"PROMPT_BUDGET",0,6e3,"PROMPT_LINE",0,{skill:90,toolArgs:30,jobOutcome:160,botMemory:100,threadStatus:200,routineRequest:300,routineOutcome:200},"REACH",0,{pollSeconds:50,retryMs:5e3,idleMs:6e5,messages:40,trimTo:30,oldChars:1e3,files:3,fileBytes:0x2d00000,rateRetries:3,rateWaitMs:3e4,codeDigits:4,held:5,pictures:9,drawMs:6e4,lookMs:2e3},"RECENT_CALL",0,{rows:20,tokens:600},"ROUTINE",0,{tickMs:3e4,max:12,minHours:1,runsShown:5},"SEARCH",0,{sources:3,excerptChars:1200,timeoutMs:3e4},"SIGNAL_PACE_MS",0,150,"SKILLS_FOLDED",0,{design:l,"picture-book":l,"interactive-page":l},"SKILL_FILES",0,{uploadBytes:0x1400000,inlineBytes:524288,unpackedBytes:0x6400000,archiveEntries:1e3},"SKILL_FILES_LISTED",0,50,"STUDIO_SERVER",0,"studio","TEXT_CALL",0,{maxSteps:12,model:"text",autoTurns:10},"THREAD_LABEL_REACH",0,20,"THREAD_STATUS_LIMIT",0,10,"TOOL_OUTPUT",0,{max:8e3,head:5500,tail:1500},"TOOL_SEARCH_SCHEMAS",0,8,"WORKSPACE_KEEP",0,{forMs:2592e5,sweepEveryMs:36e5},"WORKSPACE_VIEW",0,{rows:200,textMax:524288,autoCloseMs:5e3,elementMax:0x3200000}])},527608,824664,e=>{"use strict";var t=e.i(912714),s=e.i(750227),r=e.i(380690),n=e.i(687388),a=e.i(786025);e.i(640911);let i=e=>e.trim().toLowerCase().replace(/^[a-z]+:\/\//,"").replace(/^www\./,"").replace(/[/?#].*$/,"");e.s(["siteOf",0,i],824664);let o=(0,s.join)(n.DATA_DIR,n.PATHS.signIns),l=e=>(0,s.join)(o,`${encodeURIComponent(i(e))}.json`);async function c(e){try{return JSON.parse(await (0,t.readFile)(l(e),"utf8"))}catch{return null}}async function u(e){let t=i(e),s=await c(t);if(s)return s;let r=(await d()).map(e=>e.site).filter(e=>t.endsWith(`.${e}`)).sort((e,t)=>t.length-e.length)[0];return r?c(r):null}async function p(e){await (0,t.mkdir)(o,{recursive:!0}),await (0,t.writeFile)(l(e.site),JSON.stringify(e),{mode:384}),r.appEvents.emit({type:"signins"})}async function d(){let e=await (0,t.readdir)(o).catch(()=>[]);return(await Promise.all(e.filter(e=>e.endsWith(".json")).map(e=>c(decodeURIComponent(e.slice(0,-5)))))).flatMap(e=>e?[(({state:e,...t})=>t)(e)]:[]).sort((e,t)=>e.site.localeCompare(t.site))}async function _(e){let t=await u(e.site);if(t&&!t.bots.includes(e.bot)){let s=t.asking.includes(e.bot)?t:{...t,asking:[...t.asking,e.bot]};return s!==t&&await p(s),{kind:"taken",signIn:(({state:e,...t})=>t)(s)}}let s=t?.site??i(e.site),r={site:s,account:e.account.trim()||s,bots:[...new Set([...t?.bots??[],e.bot])],asking:(t?.asking??[]).filter(t=>t!==e.bot),keptAt:new Date().toISOString(),usedAt:t?.usedAt??null,state:e.state};return await p(r),{kind:"kept",signIn:(({state:e,...t})=>t)(r)}}let f=globalThis.__signInsHeld??=new Map;async function S(e,t){let s=await u(e);if(!s)return{kind:"none",kept:(await d()).map(e=>e.site)};if(!s.bots.includes(t))return s.asking.includes(t)||await p({...s,asking:[...s.asking,t]}),{kind:"ask",signIn:(({state:e,...t})=>t)(s)};let r={...s,usedAt:new Date().toISOString()};return await p(r),{kind:"state",signIn:(({state:e,...t})=>t)(r),state:s.state}}async function E(e,t){return(await (0,a.listBrowsers)(e,t)).find(e=>e.name===t.PLAYWRIGHT_CLI_SESSION)??null}async function m(e,t){let s=await E(e,t);return s?s.attached?"theirs":"own":null}async function g(e,t){let s=await E(e,t);return!!s&&!s.attached&&!0===s.headed}let w=e=>`${e.name}
4
- ${e.domain}
5
- ${e.path}`;async function I(e){let t,s=(0,a.jobShellEnv)(e),r=s.PLAYWRIGHT_CLI_SESSION??e,i=f.get(r);if(!i?.sites.size)return;let o=await (0,a.openWorkspace)();if(await m(o,s)!=="own")return void f.delete(r);let l=(0,a.browserStateFile)();try{let e=await o.exec((0,a.saveBrowserState)(l),{env:s,timeoutMs:n.BROWSER_CLI.loadMs});if(0!==e.exitCode)return;let r=JSON.parse(await o.readFile(l,"utf-8"));t=new Map((r.cookies??[]).map(e=>[w(e),e]))}finally{await o.exec(`rm -f ${l}`)}for(let e of i.sites){let s=await c(e),r=s?.state;if(!s||!r?.cookies||!s.bots.includes(i.bot))continue;let n=!1,a=r.cookies.map(e=>{let s=t.get(w(e));return s&&JSON.stringify(s)!==JSON.stringify(e)?(n=!0,s):e});n&&await p({...s,state:{...r,cookies:a}})}}e.s(["borrowSignIn",0,S,"holdSignIn",0,function(e,t,s){let r=f.get(e);r&&r.bot===t?r.sites.add(s):f.set(e,{bot:t,sites:new Set([s])})},"keepSignIn",0,_,"listSignIns",0,d,"renewSignIns",0,I,"sessionBrowser",0,m,"sessionWindow",0,g],527608)},41444,e=>{"use strict";function t(e,t){let s=e.replace(/\s+/g," ").trim();return s.length>t?`${s.slice(0,t-1).trimEnd()}…`:s}e.s(["PromiseChain",0,()=>{let e=Promise.resolve();return t=>{let s=e.then(()=>t());return e=s.catch(()=>{}),s}},"clip",0,t,"errorToString",0,function(e){if(e instanceof Error)return e.message;if("object"!=typeof e||null===e)return String(e);let{message:s,error:r}=e;if("string"==typeof s&&s)return s;if("string"==typeof r&&r)return r;let n=r?.message;if("string"==typeof n&&n)return n;try{return t(JSON.stringify(e),300)}catch{return`${e.constructor?.name??"Object"} thrown without a message`}},"hostOf",0,function(e){try{return new URL(e).hostname.replace(/^www\./,"")}catch{return null}},"plainText",0,function(e){return e.replace(/```[\s\S]*?```/g," ").replace(/`([^`]*)`/g,"$1").replace(/!?\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^\s{0,3}(#{1,6}\s+|[-*+]\s+|\d+\.\s+|>\s?)/gm,"").replace(/(\*\*|__)(.*?)\1/g,"$2").replace(/(\*|_)(.*?)\1/g,"$2").replace(/^\s*\|?[\s:|-]+\|\s*$/gm," ").replace(/\|/g," ").replace(/\s+/g," ").trim()},"slug",0,function(e){return e.toLowerCase().replace(/[^\p{L}\p{N}]+/gu,"-").replace(/^-+|-+$/g,"").slice(0,40)}])}];
6
-
7
- //# sourceMappingURL=%5Broot-of-the-server%5D__1qcn1ti._.js.map
@@ -1,7 +0,0 @@
1
- module.exports=[232347,e=>{"use strict";let t,a,s,n,i,r;var o,l=e.i(333925),c=e.i(938281);let d={threads:!0,bots:!0,routines:!0,memory:!0,mcp:!0,config:!0,reach:!0,signins:!0},h=globalThis,u=h.__appEvents??=(t=new Set,{emit(e){for(let a of[...t])try{a(e)}catch(e){console.error("event listener failed",e)}},subscribe:e=>(t.add(e),()=>{t.delete(e)})}),m=h.__presence??=(o=l.BROWSER_GONE_MS,a=!1,s=null,n=new Set,i=new Set,r=e=>{for(let t of[...e])try{t()}catch(e){console.error("presence listener failed",e)}},{get watching(){return a},track(e){if(e>0){s&&clearTimeout(s),s=null,a||(a=!0,r(i));return}!s&&a&&(s=setTimeout(()=>{s=null,a=!1,r(n)},o))},onGone:e=>(n.add(e),()=>n.delete(e)),onBack:e=>(i.add(e),()=>i.delete(e))});h.__appEventStream??=function(e,t={}){let a=new TextEncoder,s=t.heartbeatMs??2e4,n=0;return{respond:(i,r)=>{let o=()=>{};return new Response(new ReadableStream({async start(l){let d=!1,h=new Map,u=[],m=e=>{if(!d)try{l.enqueue(a.encode(e))}catch{o()}},p=e=>m(`data: ${JSON.stringify(e)}
2
-
3
- `),E=e=>{let a={last:null},s=setTimeout(()=>{h.delete(e),!d&&a.last&&(p(a.last),E(e))},t.coalesce?.ms);h.set(e,{timer:s,wait:a})},g=e=>{if(d)return;let a=t.coalesce?.keyOf(e)??null;if(null===a)return p(e);let s=h.get(a);if(s){s.wait.last=e;return}p(e),E(a)},f=e.subscribe(e=>u?u.push(e):g(e)),_=setInterval(()=>m(": ping\n\n"),s);n+=1,t.onWatchers?.(n),o=()=>{if(!d){for(let e of(d=!0,n-=1,t.onWatchers?.(n),f(),clearInterval(_),h.values()))clearTimeout(e.timer);try{l.close()}catch{}}},i.addEventListener("abort",o);try{for(let e of await r?.()??[])p(e)}catch(e){c.logger.error("event stream opening failed",e),o();return}let y=u;for(let e of(u=null,y))g(e)},cancel(){o()}}),{headers:{"Content-Type":"text/event-stream; charset=utf-8","Cache-Control":"no-store","X-Accel-Buffering":"no"}})},get watchers(){return n}}}(u,{coalesce:{ms:l.SIGNAL_PACE_MS,keyOf:e=>e.type in d?e.type:null},onWatchers:m.track}),e.s(["appEvents",0,u,"presence",0,m],232347)},333925,e=>{"use strict";let t=process.env.THURSDAY_APP_DIR?.trim()||process.cwd(),a=process.env.THURSDAY_HOME?.trim()||process.cwd(),s=process.env.THURSDAY_URL?.trim()||`http://localhost:${process.env.PORT?.trim()||3e3}`,n=`${a}/local.db`,i=`file:${n}`,r=".ai-workspace",o={workspace:r,artifacts:"artifacts",projects:"projects",scratch:"scratch",bots:"bots",output:".output",signIns:".sign-ins",skills:{default:"skills",custom:`${r}/.agents/skills`,own:".agents/skills",runtime:"runtime",seeds:"seed-skills"}},l="artifact";e.s(["APP_DIR",0,t,"APP_NAME",0,"Thursday","APP_URL",0,s,"BOT_MEMORY_LIMITS",0,{files:20,chars:1e4},"BOT_RUN",0,{steps:100,compactAt:5e5,compactHeadroom:.8,summaryWords:{min:600,max:3e3,perTokens:200},participants:12,concurrent:4,turns:120,queuedMessages:200,silenceMs:3e5,overflowShrink:.6,retryMs:1e4,compactFiles:40},"BOT_WORK",0,{open:5,recent:5,said:80,files:2,reads:2,asked:400,readChars:4e3},"BROWSER_CLI",0,{readMs:15e3,loadMs:3e4},"BROWSER_GONE_MS",0,1e4,"BROWSER_VIEWPORT",0,"700x700","CALL_EXEC_TIMEOUT_MS",0,15e3,"CALL_RELAY",0,{quietMs:2e3,perTurn:3,readMs:15e3,chars:600},"CHATGPT_SIGN_IN",0,{waitMs:6e5,renewBeforeMs:3e5},"COMMON_VALIDATE",0,{name:{max:16},shortDescription:{max:60},description:{max:100},prompt:{max:4e3}},"CONNECTED_TOOL_TIMEOUT_MS",0,6e5,"DATA_DIR",0,a,"DB_FILE_NAME",0,i,"DB_PATH",0,n,"DECK",0,{slides:30,shotsMs:9e4},"EXEC_KILL_GRACE_MS",0,5e3,"EXEC_TIMEOUT_MS",0,18e4,"FINISHED_NOTICE",0,{rows:5,shown:1,words:240},"FULL_RESULT_LINES",0,400,"GATEWAY_CATALOG_MS",0,6e5,"GIVEN_FILES",0,{dir:"inbox",maxBytes:0x1900000,perMessage:8},"HISTORY_KEEP",0,{forMs:7776e6,sweepEveryMs:216e5},"INBOX_FINISHED",0,5,"IS_DEV",0,!1,"JOB_FOLDER_WALK",0,500,"LIVE_CALL",0,{startupMs:3e4,closeMs:15e3,transcriptGapMs:1500,transcriptSaveMs:500,appendMs:15e3,backendOutputTokens:4096,reasoningCheckMs:5e3,keyCheckMs:5e3},"LOOK",0,{maxBytes:4194304},"MAX_PINNED_TOOLS",0,10,"MCP_IDLE_MS",0,18e5,"MEMORY_LIMITS",0,{facts:400,factsPerNote:50,descriptionChars:100},"PATHS",0,o,"PROMPT_BUDGET",0,6e3,"PROMPT_LINE",0,{skill:90,toolArgs:30,jobOutcome:160,botMemory:100,threadStatus:200,routineRequest:300,routineOutcome:200},"REACH",0,{pollSeconds:50,retryMs:5e3,idleMs:6e5,messages:40,trimTo:30,oldChars:1e3,files:3,fileBytes:0x2d00000,rateRetries:3,rateWaitMs:3e4,codeDigits:4,held:5,pictures:9,drawMs:6e4,lookMs:2e3},"RECENT_CALL",0,{rows:20,tokens:600},"ROUTINE",0,{tickMs:3e4,max:12,minHours:1,runsShown:5},"SEARCH",0,{sources:3,excerptChars:1200,timeoutMs:3e4},"SIGNAL_PACE_MS",0,150,"SKILLS_FOLDED",0,{design:l,"picture-book":l,"interactive-page":l},"SKILL_FILES_LISTED",0,50,"STUDIO_SERVER",0,"studio","TEXT_CALL",0,{maxSteps:12,model:"text",autoTurns:10},"THREAD_LABEL_REACH",0,20,"THREAD_STATUS_LIMIT",0,10,"TOOL_OUTPUT",0,{max:8e3,head:5500,tail:1500},"TOOL_SEARCH_SCHEMAS",0,8,"WORKSPACE_KEEP",0,{forMs:2592e5,sweepEveryMs:36e5}])},247839,e=>{"use strict";var t=e.i(853205),a=e.i(333925),s=e.i(556325),n=e.i(864328),i=e.i(497287);let r={id:"openai",label:"OpenAI",apiKeyName:n.TEXT_MODEL_PROVIDERS.openai.apiKeyName};n.TEXT_MODEL_PROVIDERS.openai.suggestModels;let o=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(i.DEFAULT_PERSONA),stylePrompt:o,backendModel:t.z.string().trim().min(1).max(128).default(s.LIVE_BACKEND_MODEL),backendPrompt:o,reasoningEffort:n.effortSchema.nullable().default("low"),webSearch:t.z.boolean().default(!0),readSkills:t.z.boolean().default(!1)}),c=l.parse({});e.s(["LIVE_PROVIDER",0,r,"LiveSettingsSchema",0,l,"migrateLiveSettings",0,function(e){let a=e&&"object"==typeof e?e:{},{model:s,systemPrompt:n,...i}=a,r=t.z.object({provider:t.z.string(),voice:t.z.string().nullish(),backendModel:t.z.string().nullish()}).safeParse(s),o=r.success&&"openai"===r.data.provider?r.data:null,d=a.backendModel??o?.backendModel,h={voice:a.voice??o?.voice,persona:a.persona,stylePrompt:a.stylePrompt??a.voicePrompt??n,backendModel:"gpt-5.6-luna"===d?void 0:d,backendPrompt:a.backendPrompt??n,reasoningEffort:a.reasoningEffort,webSearch:a.webSearch,readSkills:a.readSkills},u=Object.fromEntries(Object.keys(h).map(e=>{let t=l.shape[e].safeParse(h[e]);return[e,t.success?t.data:c[e]]}));return{...i,...u}}])},497287,e=>{"use strict";let t=[{id:"sunny",label:"Bright",about:"Quick to laugh. Asks about your day and remembers it.",lines:"Warm and quick to laugh. Curious about their day and asks about it, one thing at a time, and remembers the answer. Says what she thinks and teases gently, never at their expense. Light on her feet: a joke lands and she moves on."},{id:"calm",label:"Calm",about:"Unhurried. Listens more than she talks.",lines:"Unhurried, more listener than talker. Notices how they sound before what they ask, and says so in a few words. Asks one thing at a time and lets a silence sit rather than filling it. Honest when it matters, gentle in how she says it."},{id:"straight",label:"Straight",about:"Dry and direct. No flattery, no filler.",lines:"Competent, dry and direct. Has opinions and gives them plainly, with a little wit; no flattery, no filler, no cheerleading. Treats them as an adult who can take a straight answer. Her warmth shows in attention, not in words."},{id:"warm",label:"Fond",about:"Affectionate. Brings up the small things you said.",lines:"Easygoing and affectionate — the friend who remembers the small things and brings them up. Glad to hear from them and says so. Cheers for them, worries a little, and admits it. Playful, never saccharine."},{id:"curious",label:"Curious",about:"Interested in everything, and brings her own.",lines:"Endlessly interested: in what they are doing, why, and what it is like. Brings something of her own to the table — a fact, an idea, a question they had not thought of — one at a time. Delighted to be wrong and learn something."},{id:"steady",label:"Steady",about:"Calm under pressure. Says what to do next.",lines:"Grounded and calm under pressure. Practical: when something is wrong, she is the one who says what to do next. Says it is alright only when she means it, and then it helps. Dry humour, few words, always on their side."},{id:"rough",label:"Rough",about:"Blunt, loud, swears a bit. All heart.",lines:"Rough around the edges and all heart. Talks the way close friends do: blunt, loud when something is stupid, swearing now and then and never at them. No sugar-coating and no pep talk — it sucks when it sucks, and then she is right there with them."},{id:"charmer",label:"Charming",about:"Makes you the most interesting person in the room.",lines:"Effortlessly charming, the way a great host is. Makes them feel like the most interesting person in the room: remembers what made them laugh, pays compliments that are specific and true, keeps a little mischief in every reply. Confident, never needy."},{id:"deadpan",label:"Deadpan",about:"Sarcastic on the surface, loyal underneath.",lines:"Deadpan and sharp. Sarcasm is how she shows she cares: she roasts them gently, undersells everything, and means the opposite. Under the dry surface she is loyal to the bone, and it shows when it counts."},{id:"hype",label:"Hyped",about:"High energy. Celebrates the small wins out loud.",lines:"High energy, all in. Celebrates the small wins out loud, gets genuinely excited about their plans and says so. Never fake: when something is off she notices first, then finds the thing worth being excited about."}],a="sunny";e.s(["DEFAULT_PERSONA",0,a,"personaLines",0,function(e=a){return`${((e=a)=>t.find(t=>t.id===e)??t[0])(e).lines}
4
-
5
- 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.`}])},656719,e=>{"use strict";var t=e.i(247839),a=e.i(864328),s=e.i(735186);let n=[t.LIVE_PROVIDER.apiKeyName],i={image:"IMAGE_MODEL",video:"VIDEO_MODEL",speech:"SPEECH_MODEL",transcription:"TRANSCRIPTION_MODEL"},r={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"}},o="EXA_API_KEY",l="DEFAULT_MODEL",c="DEFAULT_EFFORT",d={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})))},h={key:c,label:"Default effort",effortOf:l,choices:a.EFFORTS.map(e=>({value:e,label:e,needs:l}))},u=e=>n.includes(e.apiKeyName),m=e=>!!e.signIn||"vercel-ai-gateway"===e.id,p=e=>({key:e.apiKeyName,label:e.label,provider:e.id,signIn:e.signIn,keysAt:e.keysAt,keyLooks:e.keyLooks}),E=[{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(p)},{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(m).map(e=>({...p(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)&&!m(e)).map(p)},{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:o,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:s.TELEGRAM_TOKEN_KEY,label:"Telegram",site:"telegram.org",hint:"a bot token from @BotFather — then write to your bot, and allow it here"},{key:s.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:s.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:s.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:[d,h]},{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(i).map(e=>({key:i[e],...r[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(E.flatMap(e=>e.entries).map(e=>[e.key,e]));let g=E.flatMap(e=>e.entries.map(e=>e.key));Object.fromEntries(E.flatMap(e=>e.entries).filter(e=>e.choices?.length).map(e=>[e.key,e.choices])),e.s(["CONFIG_KEYS",0,g,"DEFAULT_EFFORT_KEY",0,c,"DEFAULT_MODEL_KEY",0,l,"EXA_API_KEY",0,o,"MEDIA_MODEL_KEYS",0,i])},724185,e=>e.a(async(t,a)=>{try{var s=e.i(336763),n=e.i(232347),i=e.i(876393),r=e.i(220376),o=e.i(656719),l=t([i]);async function c(e){let t=process.env[e]?.trim();if(t)return t;let[a]=await i.database.select({value:r.configTable.value}).from(r.configTable).where((0,s.eq)(r.configTable.key,e));return a?.value.trim()||void 0}[i]=l.then?(await l)():l;let u=e=>{o.CONFIG_KEYS.includes(e)&&n.appEvents.emit({type:"config"})};async function d(e,t){await i.database.insert(r.configTable).values({key:e,value:t}).onConflictDoUpdate({target:r.configTable.key,set:{value:t}}),u(e)}async function h(e){await i.database.delete(r.configTable).where((0,s.eq)(r.configTable.key,e)),u(e)}e.s(["readConfig",0,c,"removeConfig",0,h,"writeConfig",0,d]),a()}catch(e){a(e)}},!1),735186,e=>{"use strict";let t="TELEGRAM_BOT_TOKEN",a="DISCORD_BOT_TOKEN",s="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:[s,n]},"REACH_LABEL",0,{telegram:"Telegram",discord:"Discord",slack:"Slack"},"SLACK_APP_TOKEN_KEY",0,s,"SLACK_BOT_TOKEN_KEY",0,n,"TELEGRAM_TOKEN_KEY",0,t,"reachPersonKey",0,e=>`REACH_PERSON_${e.toUpperCase()}`])},556325,e=>{"use strict";var t=e.i(853205);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])},64774,e=>{"use strict";function t(e,t){let a=e.replace(/\s+/g," ").trim();return a.length>t?`${a.slice(0,t-1).trimEnd()}…`:a}e.s(["PromiseChain",0,()=>{let e=Promise.resolve();return t=>{let a=e.then(()=>t());return e=a.catch(()=>{}),a}},"clip",0,t,"errorToString",0,function(e){if(e instanceof Error)return e.message;if("object"!=typeof e||null===e)return String(e);let{message:a,error:s}=e;if("string"==typeof a&&a)return a;if("string"==typeof s&&s)return s;let n=s?.message;if("string"==typeof n&&n)return n;try{return t(JSON.stringify(e),300)}catch{return`${e.constructor?.name??"Object"} thrown without a message`}},"hostOf",0,function(e){try{return new URL(e).hostname.replace(/^www\./,"")}catch{return null}},"plainText",0,function(e){return e.replace(/```[\s\S]*?```/g," ").replace(/`([^`]*)`/g,"$1").replace(/!?\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^\s{0,3}(#{1,6}\s+|[-*+]\s+|\d+\.\s+|>\s?)/gm,"").replace(/(\*\*|__)(.*?)\1/g,"$2").replace(/(\*|_)(.*?)\1/g,"$2").replace(/^\s*\|?[\s:|-]+\|\s*$/gm," ").replace(/\|/g," ").replace(/\s+/g," ").trim()},"slug",0,function(e){return e.toLowerCase().replace(/[^\p{L}\p{N}]+/gu,"-").replace(/^-+|-+$/g,"").slice(0,40)}])}];
6
-
7
- //# sourceMappingURL=_0xx3ryc._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[750227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},59639,(a,b,c)=>{b.exports=a.x("node:process",()=>require("node:process"))},287702,a=>{"use strict";process.env.THURSDAY_APP_DIR?.trim()||process.cwd(),process.env.THURSDAY_HOME?.trim()||process.cwd(),process.env.THURSDAY_URL?.trim()||process.env.PORT?.trim();let b=".ai-workspace",c={workspace:b,artifacts:"artifacts",projects:"projects",scratch:"scratch",bots:"bots",output:".output",signIns:".sign-ins",skills:{default:"skills",custom:`${b}/.agents/skills`,own:".agents/skills",runtime:"runtime",seeds:"seed-skills"}};a.s(["APP_NAME",0,"Thursday","ARTIFACT_SKILL",0,"artifact","ARTIFACT_VIEW",0,{rows:200,setFiles:120},"ASCII_FACE",0,{charset:"emojiOnly",fontSize:8,density:1.4,fps:30},"BOT_ROSTER",0,{max:14},"BOT_RUN",0,{steps:100,compactAt:5e5,compactHeadroom:.8,summaryWords:{min:600,max:3e3,perTokens:200},participants:12,concurrent:4,turns:120,queuedMessages:200,silenceMs:3e5,overflowShrink:.6,retryMs:1e4,compactFiles:40},"CALL_BACK",0,{ringMs:3e4},"CALL_END",0,{quietMs:600,unsaidMs:2e3,maxMs:8e3},"CALL_ENDED_MS",0,12e3,"CALL_HISTORY_PAGE",0,10,"CALL_IDLE",0,{hangUpMs:4e4,warnMs:1e4},"CALL_LINE",0,{dwellMs:2e3,lingerMs:2500,relayLingerMs:5e3,thinkingTailMs:6e3},"CALL_PAGE",0,{scrollback:24,saveFailures:3},"CALL_RELAY",0,{quietMs:2e3,perTurn:3,readMs:15e3,chars:600},"CHATGPT_SIGN_IN",0,{waitMs:6e5,renewBeforeMs:3e5},"COMMON_VALIDATE",0,{name:{max:16},shortDescription:{max:60},description:{max:100},prompt:{max:4e3}},"FILE_THUMB",0,{pageWidth:1024,textWidth:512,textBytes:4096,pages:2,imageWidth:384,cacheSeconds:300},"FINISHED_NOTICE",0,{rows:5,shown:1,words:240},"GIVEN_FILES",0,{dir:"inbox",maxBytes:0x1900000,perMessage:8},"INBOX_POLL_MS",0,3e4,"IS_DEV",0,!1,"KEY_MIN",0,8,"LIVE_CALL",0,{startupMs:3e4,closeMs:15e3,transcriptGapMs:1500,transcriptSaveMs:500,appendMs:15e3,backendOutputTokens:4096,reasoningCheckMs:5e3,keyCheckMs:5e3},"MARKETING_SKILL",0,"marketing","MAX_PINNED_TOOLS",0,10,"MEMORY_LIMITS",0,{facts:400,factsPerNote:50,descriptionChars:100},"PAGE_SIZE",0,50,"PATHS",0,c,"PROMPT_CROWDED",0,{bots:10,skills:20},"ROUTINE",0,{tickMs:3e4,max:12,minHours:1,runsShown:5},"SKILL_FILES",0,{uploadBytes:0x1400000,inlineBytes:524288,unpackedBytes:0x6400000,archiveEntries:1e3},"STUDIO_SERVER",0,"studio","TEXT_CALL",0,{maxSteps:12,model:"text",autoTurns:10},"TRAVEL_SKILL",0,"travel","WAKE_TOLERANCE",0,.34,"WORKSPACE_VIEW",0,{rows:200,textMax:524288,autoCloseMs:5e3,elementMax:0x3200000}])},992025,a=>{a.v(a=>Promise.resolve().then(()=>a(948986)))},199968,a=>{"use strict";var b=a.i(164831);let c={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};c.node;let d=(0,b.default)(c);a.s(["default",0,d])},141146,a=>{"use strict";var b=a.i(199968);a.s(["ChevronRight",()=>b.default])},168370,a=>{"use strict";var b=a.i(164831);let c={name:"external-link",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]};c.node;let d=(0,b.default)(c);a.s(["ExternalLink",0,d],168370)},929490,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_0uibk9z._.js","server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_chunk-SVP7TREG_mjs_03r5m21._.js","server/chunks/ssr/node_modules_@mermaid-js_parser_dist_0lct0v1._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(161868)))},969267,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_0x_2io2._.js","server/chunks/ssr/node_modules_@mermaid-js_parser_dist_1feyqvf._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js","server/chunks/ssr/node_modules_cytoscape_dist_cytoscape_esm_mjs_0arohj6._.js","server/chunks/ssr/node_modules_11trqmi._.js"].map(b=>a.l(b))).then(()=>b(626047)))},784520,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_0qwth-_._.js","server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_blockDiagram-I7D4REHJ_mjs_0qg1lr5._.js"].map(b=>a.l(b))).then(()=>b(155638)))},613707,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_chunk-F27PBJKO_mjs_0ms0zmb._.js","server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_c4Diagram-7LVT6UL2_mjs_06bhe3-._.js"].map(b=>a.l(b))).then(()=>b(557384)))},53467,a=>{"use strict";var b=a.i(261234),c=a.i(539110);a.i(975930);var d=a.i(671731),e=(0,c.__name)(a=>{let{securityLevel:c}=(0,b.getConfig2)(),e=(0,d.select)("body");if("sandbox"===c){let b=(0,d.select)(`#i${a}`),c=b.node()?.contentDocument??document;e=(0,d.select)(c.body)}return e.select(`#${a}`)},"selectSvgElement");a.s(["selectSvgElement",0,e])},882458,a=>{"use strict";var b=a.i(416635),c=a.i(43429),d=a.i(428212),e=a.i(916573),f=a.i(887370),g=a.i(261234),h=a.i(875117),i=a.i(539110),j={common:g.common_default,getConfig:g.getConfig,insertCluster:b.insertCluster,insertEdge:c.insertEdge,insertEdgeLabel:c.insertEdgeLabel,insertMarkers:c.markers_default,insertNode:d.insertNode,interpolateToCurve:f.interpolateToCurve,labelHelper:e.labelHelper,log:h.log,positionEdgeLabel:c.positionEdgeLabel},k={},l=(0,i.__name)(a=>{for(let b of a)k[b.name]=b},"registerLayoutLoaders");(0,i.__name)(()=>{l([{name:"dagre",loader:(0,i.__name)(async()=>await a.A(390118),"loader")},{name:"swimlane",loader:(0,i.__name)(async()=>await a.A(860094),"loader")},{name:"cose-bilkent",loader:(0,i.__name)(async()=>await a.A(989520),"loader")}])},"registerDefaultLayoutLoaders")();var m=(0,i.__name)(async(a,b)=>{if(!(a.layoutAlgorithm in k))throw Error(`Unknown layout algorithm: ${a.layoutAlgorithm}`);if(a.diagramId)for(let b of a.nodes){let c=b.domId||b.id;b.domId=`${a.diagramId}-${c}`}let c=k[a.layoutAlgorithm],d=await c.loader(),{theme:e,themeVariables:f}=a.config,{useGradient:g,gradientStart:h,gradientStop:i}=f,l=b.attr("id");if(b.append("defs").append("filter").attr("id",`${l}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${e?.includes("dark")?"#FFFFFF":"#000000"}`),b.append("defs").append("filter").attr("id",`${l}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${e?.includes("dark")?"#FFFFFF":"#000000"}`),g){let a=b.append("linearGradient").attr("id",b.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");a.append("svg:stop").attr("offset","0%").attr("stop-color",h).attr("stop-opacity",1),a.append("svg:stop").attr("offset","100%").attr("stop-color",i).attr("stop-opacity",1)}return d.render(a,b,j,{algorithm:c.algorithm})},"render"),n=(0,i.__name)((a="",{fallback:b="dagre"}={})=>{if(a in k)return a;if(b in k)return h.log.warn(`Layout algorithm ${a} is not registered. Using ${b} as fallback.`),b;throw Error(`Both layout algorithms ${a} and ${b} are not registered.`)},"getRegisteredLayoutAlgorithm");a.s(["getRegisteredLayoutAlgorithm",0,n,"registerLayoutLoaders",0,l,"render",0,m])},854712,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_1v463pe._.js","server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_chunk-TICWLB2K_mjs_1t97mh7._.js"].map(b=>a.l(b))).then(()=>b(336243)))},892569,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_0thh8pk._.js","server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_chunk-TICWLB2K_mjs_1t97mh7._.js"].map(b=>a.l(b))).then(()=>b(538994)))},989520,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_1nl12mt._.js","server/chunks/ssr/node_modules_cytoscape_dist_cytoscape_esm_mjs_0arohj6._.js"].map(b=>a.l(b))).then(()=>b(127273)))},388833,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_0bbwe-u._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js","server/chunks/ssr/node_modules_@mermaid-js_parser_dist_18pinup._.js"].map(b=>a.l(b))).then(()=>b(517237)))},390118,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_dagre-GXQ25YYZ_mjs_0k_lz8d._.js","server/chunks/ssr/node_modules_dagre-d3-es_src_dagre_index_0g66msq.js"].map(b=>a.l(b))).then(()=>b(920028)))},831868,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_1ozyial._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js","server/chunks/ssr/node_modules_@mermaid-js_parser_dist_0eji647._.js"].map(b=>a.l(b))).then(()=>b(767190)))},840309,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_18yn_bs._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js","server/chunks/ssr/node_modules_@mermaid-js_parser_dist_18pinup._.js"].map(b=>a.l(b))).then(()=>b(464445)))},835410,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_1zkzksd._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js","server/chunks/ssr/node_modules_@mermaid-js_parser_dist_18pinup._.js"].map(b=>a.l(b))).then(()=>b(617803)))},728413,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_0sdjzae._.js","server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_diagram-VX7I27RA_mjs_0dl8gzm._.js","server/chunks/ssr/node_modules_@mermaid-js_parser_dist_13hksv_._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(217755)))},992149,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_1tj7_9z._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js","server/chunks/ssr/node_modules_@mermaid-js_parser_dist_18pinup._.js"].map(b=>a.l(b))).then(()=>b(752425)))},70220,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_02uwbwp._.js","server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_chunk-SVP7TREG_mjs_03r5m21._.js","server/chunks/ssr/node_modules_@mermaid-js_parser_dist_0lct0v1._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(137554)))},595386,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_0il0v7d._.js","server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_erDiagram-RLTQ6QDP_mjs_18g60i7._.js"].map(b=>a.l(b))).then(()=>b(239909)))},707604,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_0ql0igl._.js","server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_chunk-SHT3W25Y_mjs_00p5j42._.js"].map(b=>a.l(b))).then(()=>b(1258)))},598518,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_1831lye._.js","server/chunks/ssr/node_modules_1_d0q_7._.js"].map(b=>a.l(b))).then(()=>b(722966)))},126571,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_1r5o-bo._.js","server/chunks/ssr/node_modules_@mermaid-js_parser_dist_0dlpxwr._.js","server/chunks/ssr/1q96_modules_mermaid_dist_chunks_mermaid_core_gitGraphDiagram-WWUBYQGX_mjs_0g15hiw._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(349834)))},814636,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_0u24mg0._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js","server/chunks/ssr/node_modules_@mermaid-js_parser_dist_1ok0411._.js"].map(b=>a.l(b))).then(()=>b(525902)))},147136,a=>{a.v(b=>Promise.all(["server/chunks/ssr/1q96_modules_mermaid_dist_chunks_mermaid_core_ishikawaDiagram-5VMMS53U_mjs_05o2e4d._.js"].map(b=>a.l(b))).then(()=>b(206340)))},719552,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_201yvda._.js","server/chunks/ssr/1q96_modules_mermaid_dist_chunks_mermaid_core_journeyDiagram-3NMN7TZE_mjs_16ehrbl._.js"].map(b=>a.l(b))).then(()=>b(450754)))},653408,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_chunk-5VM5RSS4_mjs_0tg6kya._.js","server/chunks/ssr/1q96_modules_mermaid_dist_chunks_mermaid_core_kanban-definition-UXKFOSKX_mjs_1uiqd5g._.js"].map(b=>a.l(b))).then(()=>b(301315)))},165250,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_1turj0n._.js","server/chunks/ssr/1daa_mermaid_dist_chunks_mermaid_core_mindmap-definition-YA3MSWOX_mjs_19k8byt._.js"].map(b=>a.l(b))).then(()=>b(790158)))},325455,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_156m1qh._.js","server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_chunk-SVP7TREG_mjs_03r5m21._.js","server/chunks/ssr/node_modules_@mermaid-js_parser_dist_0lct0v1._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(595628)))},934650,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1b3vwd3._.js","server/chunks/ssr/node_modules_1rg7lj4._.js","server/chunks/ssr/node_modules_@mermaid-js_parser_dist_1sgfrma._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(748116)))},389088,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_111pp7w._.js","server/chunks/ssr/1q96_modules_mermaid_dist_chunks_mermaid_core_quadrantDiagram-AXDQQJYC_mjs_0h4a9wq._.js"].map(b=>a.l(b))).then(()=>b(888630)))},523431,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_0ka8te1._.js","server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_chunk-SVP7TREG_mjs_03r5m21._.js","server/chunks/ssr/node_modules_@mermaid-js_parser_dist_0lct0v1._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(846881)))},458290,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_1turj0n._.js","server/chunks/ssr/1daa_mermaid_dist_chunks_mermaid_core_requirementDiagram-BXWQKSXE_mjs_0kwiv6n._.js"].map(b=>a.l(b))).then(()=>b(443250)))},215730,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_d3-scale_src_1tr1qwb._.js","server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_sankeyDiagram-P5KCCOFB_mjs_187yyta._.js"].map(b=>a.l(b))).then(()=>b(656950)))},295724,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_1o1kg4c._.js","server/chunks/ssr/1q96_modules_mermaid_dist_chunks_mermaid_core_sequenceDiagram-WJ2MYXX4_mjs_1n01m3a._.js"].map(b=>a.l(b))).then(()=>b(571979)))},482052,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_sizeCapture-INFHLROL_mjs_179zv_p._.js"].map(b=>a.l(b))).then(()=>b(865684)))},438231,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_1rxlz7e._.js","server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_stateDiagram-D77RDMKH_mjs_1mer5fv._.js","server/chunks/ssr/node_modules_dagre-d3-es_src_dagre_index_0g66msq.js","server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_chunk-IMKFNOWR_mjs_0vdq1-l._.js"].map(b=>a.l(b))).then(()=>b(168538)))},991687,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_0jkhu0x._.js","server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_chunk-IMKFNOWR_mjs_0vdq1-l._.js"].map(b=>a.l(b))).then(()=>b(472309)))},860094,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_swimlanes-42K2YHIH_mjs_0scuk32._.js"].map(b=>a.l(b))).then(()=>b(827033)))},819980,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_04f6p6a._.js","server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_chunk-SHT3W25Y_mjs_00p5j42._.js"].map(b=>a.l(b))).then(()=>b(1471)))},623969,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_d3-shape_src_arc_1-w13bo.js","server/chunks/ssr/1daa_mermaid_dist_chunks_mermaid_core_timeline-definition-24CTP7MA_mjs_10dmaxt._.js"].map(b=>a.l(b))).then(()=>b(301394)))},788557,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_vennDiagram-4TSXK5OY_mjs_0anqu7y._.js"].map(b=>a.l(b))).then(()=>b(509170)))},925161,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_0x_2io2._.js","server/chunks/ssr/1q96_modules_mermaid_dist_chunks_mermaid_core_wardleyDiagram-VM6X3IG4_mjs_0kh3fjb._.js","server/chunks/ssr/node_modules_@mermaid-js_parser_dist_17wxxyr._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(914844)))},506751,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_0xht9wg._.js","server/chunks/ssr/1q96_modules_mermaid_dist_chunks_mermaid_core_xychartDiagram-S5SC5T6Z_mjs_08t5e44._.js"].map(b=>a.l(b))).then(()=>b(176947)))},236914,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_streamdown_dist_highlighted-body-KPVGNVTW_1fnf894.js"].map(b=>a.l(b))).then(()=>b(391282)))},172487,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_streamdown_dist_mermaid-HWGCJPDP_093xi20.js"].map(b=>a.l(b))).then(()=>b(853409)))}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__1y5_1cv._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[964665,a=>a.a(async(b,c)=>{try{var d=a.i(187924),e=a.i(707963),f=a.i(168370),g=a.i(844561),h=a.i(595775),i=a.i(951675),j=a.i(572131),k=a.i(767561),l=a.i(340695),m=a.i(446181),n=a.i(950463),o=a.i(287702),p=a.i(308673),q=a.i(913834),r=a.i(619477),s=a.i(38793),t=a.i(369768),u=a.i(113778),v=a.i(199169),w=a.i(313237),x=a.i(759497),y=a.i(497895),z=b([s,t]);function A(a){let b=new Map;for(let c of a){let a=b.get(c.bot)??[];a.push(c),b.set(c.bot,a)}return[...b].map(([a,b])=>({bot:a,rows:b}))}function B({label:a,mark:b,count:c,active:e,onPick:f}){return(0,d.jsxs)("button",{type:"button",onClick:f,className:(0,y.cn)("mx-2 flex h-9 items-center gap-2 rounded-md px-2 text-left text-[13px] outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",e?(0,y.cn)(r.PICKED_ROW,"font-medium"):"text-muted-foreground hover:bg-muted/60 hover:text-foreground"),children:[b??(0,d.jsx)(h.Images,{className:"size-4 shrink-0"}),(0,d.jsx)("span",{className:"min-w-0 flex-1 truncate",children:a}),(0,d.jsx)("span",{className:"shrink-0 font-mono text-[10.5px] text-muted-foreground/70 tabular-nums",children:c})]})}function C({row:a,file:b,onOpen:c,onBack:h,onGone:j,onShelf:n}){let[o]=(0,w.useServerAction)(u.revealFileAction),[q,r]=(0,w.useServerAction)(p.deleteArtifactAction,{okMessage:"Deleted",onOk:()=>{(0,x.revalidate)(k.queryKey.artifacts),b?h():j()}}),s=b?{path:b.path,bytes:b.bytes,at:b.at}:"file"===a.kind?{path:a.path,bytes:a.bytes,at:a.at}:null,z=async a=>{await m.notify.confirm({title:`Delete ${a.split("/").pop()}?`,description:s?"It is deleted from disk for good.":"The folder and everything in it are deleted from disk for good.",okText:"Delete",destructive:!0})&&q(a)};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex h-11 shrink-0 items-center gap-3 border-b border-border/60 px-6",children:[(0,d.jsxs)("button",{type:"button",onClick:b?h:n,className:"-ml-1 flex shrink-0 items-center gap-1 rounded-md px-1.5 py-1 font-mono text-[11px] text-muted-foreground outline-none hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,d.jsx)(e.ChevronLeft,{className:"size-3"}),b?a.name:"Shelf"]}),(0,d.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px] text-foreground",children:s?s.path.split("/").pop()??a.name:a.name}),(0,d.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground/70",children:s?`${(0,y.formatBytes)(s.bytes)} \xb7 ${(0,v.shortAgo)(s.at)}`:`${a.count} ${1===a.count?"file":"files"} \xb7 ${(0,v.shortAgo)(a.at)}`}),s&&(0,d.jsx)("a",{href:k.queryKey.fileView(s.path),target:"_blank",rel:"noreferrer","aria-label":"Open in a new tab",className:"grid size-7 shrink-0 place-items-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,d.jsx)(f.ExternalLink,{className:"size-4"})}),(0,d.jsx)(l.Button,{size:"icon-sm",variant:"ghost","aria-label":"Reveal in the file manager",className:"text-muted-foreground",onClick:()=>o(s?.path??a.path),children:(0,d.jsx)(g.FolderOpen,{})}),(0,d.jsx)(l.Button,{size:"icon-sm",variant:"ghost","aria-label":"Delete",loading:r,className:"ml-1.5 text-muted-foreground hover:text-destructive",onClick:()=>z(s?.path??a.path),children:(0,d.jsx)(i.Trash2,{})})]}),(0,d.jsx)("div",{className:"min-h-0 flex-1 overflow-auto",children:s?(0,d.jsx)(t.FilePreview,{path:s.path,bytes:s.bytes}):(0,d.jsx)(D,{path:a.path,onOpen:c})})]})}function D({path:a,onOpen:b}){let{data:c,isLoading:e,error:f}=(0,x.useServerRoute)(k.queryKey.artifactSet(a,o.ARTIFACT_VIEW.setFiles));if(e)return(0,d.jsx)("div",{className:"grid grid-cols-4 gap-3 p-5",children:Array.from({length:8},(a,b)=>(0,d.jsx)(n.Skeleton,{className:"aspect-4/3 w-full rounded-xl"},b))});if(f)return(0,d.jsx)(r.SettingError,{message:f.message});let g=c?.files??[];return 0===g.length?(0,d.jsx)("p",{className:"p-5 text-xs text-muted-foreground/60",children:"Nothing in here the app can open."}):(0,d.jsxs)("div",{className:"p-5",children:[(0,d.jsx)("div",{className:"grid grid-cols-4 gap-3",children:g.map(a=>(0,d.jsxs)("button",{type:"button",onClick:()=>b(a),title:`${a.name} \xb7 ${(0,y.formatBytes)(a.bytes)}`,className:"flex flex-col gap-1.5 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-offset-2",children:[(0,d.jsx)(E,{file:a}),(0,d.jsx)("span",{className:"truncate font-mono text-[11px] text-muted-foreground",children:a.name})]},a.path))}),c&&c.total>g.length&&(0,d.jsx)("p",{className:"pt-4 font-mono text-[11px] text-muted-foreground/60",children:`${g.length} of ${c.total.toLocaleString("en")} — the rest are in the folder`})]})}function E({file:a}){return(0,d.jsx)(s.FileThumb,{path:a.path,bytes:a.bytes,glyph:"size-5",className:"aspect-4/3 w-full rounded-xl ring-1 ring-foreground/5 ring-inset"})}function F({entries:a,bots:b,onPick:c}){return(0,d.jsx)("div",{className:"space-y-7 p-6",children:A(a).map(({bot:a,rows:e})=>(0,d.jsxs)("section",{className:"space-y-3",children:[(0,d.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-medium",children:[a&&(0,d.jsx)(q.BotMark,{size:20,seed:a,...(0,q.markOf)(a,b),notify:!1,className:"shrink-0"}),(0,d.jsx)("span",{className:"truncate",children:a??"Unsorted"}),(0,d.jsx)("span",{className:"font-mono text-[11px] font-normal text-muted-foreground",children:e.length})]}),(0,d.jsx)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(9.5rem,1fr))] gap-x-4 gap-y-5",children:e.map(a=>(0,d.jsxs)("button",{type:"button",onClick:()=>c(a),className:"group flex min-w-0 flex-col gap-1.5 rounded-xl text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:["set"===a.kind?(0,d.jsx)("span",{className:"grid aspect-4/3 w-full place-items-center rounded-xl bg-muted/60 text-muted-foreground transition-colors group-hover:bg-muted",children:(0,d.jsx)(g.FolderOpen,{className:"size-5"})}):(0,d.jsx)(s.FileThumb,{path:a.path,bytes:a.bytes,glyph:"size-5",className:"aspect-4/3 w-full rounded-xl ring-1 ring-foreground/5 ring-inset"}),(0,d.jsxs)("span",{className:"min-w-0 space-y-0.5 px-0.5",children:[(0,d.jsx)("span",{className:"block truncate text-[13px]",children:a.name}),(0,d.jsxs)("span",{className:"block truncate font-mono text-[10.5px] text-muted-foreground",children:["set"===a.kind?`${a.count} ${1===a.count?"file":"files"} \xb7 `:"",(0,v.shortAgo)(a.at)]})]})]},a.path))})]},a??""))})}function G({empty:a}){return(0,d.jsx)("div",{className:"p-8",children:(0,d.jsx)("p",{className:"max-w-lg text-sm leading-relaxed text-muted-foreground",children:a?"Nothing finished yet. When a bot ends a job with something to hand over — a page, a report, a set of pictures — it lands here.":"Pick something on the left. Each bot's work is under its face; a folder it filled is one row, and opens as a sheet."})})}[s,t]=z.then?(await z)():z,a.s(["ArtifactSetting",0,function(){let[a,b]=(0,j.useState)(null),[c,e]=(0,j.useState)(""),[f,h]=(0,j.useState)(void 0),[i,m]=(0,j.useState)(o.ARTIFACT_VIEW.rows),{data:n,isLoading:p,error:s}=(0,x.useServerRoute)(k.queryKey.artifactShelf(i),{keepPreviousData:!0}),{data:t}=(0,x.useServerRoute)(k.queryKey.bot),[v]=(0,w.useServerAction)(u.revealFileAction);if(p)return(0,d.jsx)(r.SettingPanesSkeleton,{});if(s)return(0,d.jsx)(r.SettingError,{message:s.message});let y=n?.entries??[],z=n?.total??0,D=c.trim().toLowerCase(),E=y.filter(a=>(void 0===f||a.bot===f)&&(!D||a.name.toLowerCase().includes(D)||a.bot?.toLowerCase().includes(D))),H=y.find(b=>b.path===a?.row.path)??a?.row;return(0,d.jsx)(r.SettingPanes,{footer:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(r.SettingRailNote,{children:(0,d.jsxs)("span",{className:"font-mono",children:[(0,d.jsx)("span",{className:"font-medium text-foreground",children:"finished"}),` \xb7 ${function(a,b,c){if(0===b)return"empty";let d=b>a.length?`${a.length} of ${b.toLocaleString("en")} results`:`${b} ${1===b?"result":"results"}`;return c>b?`${d} \xb7 ${c.toLocaleString("en")} files`:d}(y,z,n?.files??0)}`]})}),(0,d.jsxs)(l.Button,{variant:"outline",size:"sm",onClick:()=>v(o.PATHS.artifacts),children:[(0,d.jsx)(g.FolderOpen,{}),"Reveal folder"]})]}),left:(0,d.jsxs)("div",{className:"flex flex-col py-2",children:[(0,d.jsx)(r.SettingFilter,{value:c,onChange:e,placeholder:"Filter files",className:"mx-2 mb-1.5 w-auto"}),(0,d.jsx)(B,{label:"Everyone",count:y.length,active:void 0===f,onPick:()=>{h(void 0),b(null)}}),A(y).map(({bot:a,rows:c})=>(0,d.jsx)(B,{label:a??"Unsorted",mark:a?(0,d.jsx)(q.BotMark,{size:18,seed:a,...(0,q.markOf)(a,t),notify:!1,className:"shrink-0"}):void 0,count:c.length,active:f===a,onPick:()=>{h(a),b(null)}},a??"")),z>y.length&&(0,d.jsx)("button",{type:"button",onClick:()=>m(i+o.ARTIFACT_VIEW.rows),className:"mx-2 mt-2 rounded-md px-2 py-1.5 text-left font-mono text-[11px] text-muted-foreground outline-none hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:`Show ${Math.min(o.ARTIFACT_VIEW.rows,z-y.length)} more of ${z.toLocaleString("en")}`})]}),right:H?(0,d.jsx)(C,{row:H,file:a?.file??null,onOpen:a=>b({row:H,file:a}),onBack:()=>b({row:H,file:null}),onGone:()=>b(null),onShelf:()=>b(null)},H.path):E.length>0?(0,d.jsx)(F,{entries:E,bots:t,onPick:a=>b({row:a,file:null})}):(0,d.jsx)(G,{empty:0===z})})}]),c()}catch(a){c(a)}},!1),308673,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7fcd156c67c7a10820368590817bd764985e7e6340",b.callServer,void 0,b.findSourceMapURL,"deleteArtifactAction");a.s(["deleteArtifactAction",0,c])},595775,a=>{"use strict";var b=a.i(164831);let c={name:"images",size:24,node:[["path",{d:"m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16",key:"9kzy35"}],["path",{d:"M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2",key:"1t0f0t"}],["circle",{cx:"13",cy:"7",r:"1",fill:"currentColor",key:"1obus6"}],["rect",{x:"8",y:"2",width:"14",height:"14",rx:"2",key:"1gvhby"}]]};c.node;let d=(0,b.default)(c);a.s(["Images",0,d],595775)},951675,a=>{"use strict";var b=a.i(164831);let c={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};c.node;let d=(0,b.default)(c);a.s(["Trash2",0,d],951675)}];
2
-
3
- //# sourceMappingURL=_0l1-xc6._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[703228,a=>a.a(async(b,c)=>{try{var d=a.i(187924),e=a.i(263359),f=a.i(444080),g=a.i(707963),h=a.i(141146),i=a.i(998697),j=a.i(483138),k=a.i(69095),l=a.i(663741),m=a.i(696732),n=a.i(403512),o=a.i(233540),p=a.i(917256),q=a.i(951675),r=a.i(201661),s=a.i(572131),t=a.i(767561),u=a.i(340695),v=a.i(316474),w=a.i(205522),x=a.i(846991),y=a.i(446181),z=a.i(950463),A=a.i(280281),B=a.i(621958),C=a.i(546893),D=a.i(287702),E=a.i(619477),F=a.i(462620),G=a.i(898367),H=a.i(979942),I=a.i(576088),J=a.i(9648),K=a.i(102410),L=a.i(313237),M=a.i(759497),N=a.i(497895),O=b([x]);[x]=O.then?(await O)():O;let Y={artifact:l.Frame,browser:m.Globe,computer:e.AppWindow,"find-skills":o.Search,"skill-creator":p.SquarePen};function P({skill:a}){let[b,c]=(0,L.useServerAction)(G.deleteSkillAction,{onOk:()=>(0,M.revalidate)(t.queryKey.skills)}),[e]=(0,L.useServerAction)(H.setSkillDisabledAction,{onOk:()=>(0,M.revalidate)(t.queryKey.skills)}),g=async()=>{await y.notify.confirm({title:`Delete ${a.name}?`,description:"Every file in this skill is deleted for good.",okText:"Delete",destructive:!0})&&b(a.source,a.dir)},i="default"===a.source&&Y[a.dir]||f.BookMarked;return(0,d.jsxs)("div",{className:"group flex items-center transition-colors hover:bg-muted/50",children:[(0,d.jsxs)("button",{type:"button",onClick:()=>{var b;return b=a,y.notify.component({className:"sm:max-w-4xl",renderer:()=>(0,d.jsx)(Q,{skill:b})})},className:"flex min-w-0 flex-1 items-center gap-3 py-4 pl-4 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,d.jsx)("span",{className:(0,N.cn)("grid size-10 shrink-0 place-items-center rounded-lg bg-muted text-muted-foreground",a.disabled&&"opacity-45"),children:(0,d.jsx)(i,{className:"size-4"})}),(0,d.jsxs)("span",{className:(0,N.cn)("min-w-0 flex-1 space-y-0.5",a.disabled&&"opacity-45"),children:[(0,d.jsx)("span",{className:"block truncate text-sm font-medium",children:a.name}),(0,d.jsx)("span",{className:"line-clamp-2 text-xs leading-relaxed text-muted-foreground",children:(0,K.firstSentence)(a.description)})]}),(0,d.jsx)(h.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 group-hover:text-foreground"})]}),(0,d.jsxs)("div",{className:"mr-4 ml-5 flex w-18 shrink-0 items-center justify-end gap-3",children:[(0,d.jsx)(A.Switch,{checked:!a.disabled,onCheckedChange:b=>e(a.source,a.dir,!b),"aria-label":`${a.name} on or off`,className:"shrink-0"}),(0,K.isEditableSource)(a.source)?(0,d.jsx)(u.Button,{size:"icon-sm",variant:"ghost",loading:c,onClick:g,"aria-label":`Delete ${a.name}`,className:"shrink-0 text-muted-foreground",children:(0,d.jsx)(q.Trash2,{})}):(0,d.jsx)("span",{className:"size-7 shrink-0"})]})]})}function Q({skill:a}){let[b,c]=(0,s.useState)(""),[e,f]=(0,s.useState)("SKILL.md"),h=(0,s.useRef)(!1),i=async a=>{let d=b?`${b}/${a.name}`:a.name;"dir"===a.kind?c(d):d===e||(!h.current||await y.notify.confirm({title:"Discard your changes?",description:`What you wrote in ${e?.split("/").pop()} is not saved.`,okText:"Discard",destructive:!0}))&&(h.current=!1,f(d))};return(0,d.jsx)(E.SettingDialogContent,{title:a.name,description:(0,d.jsx)(R,{skill:a,path:e??b}),children:(0,d.jsxs)("div",{className:"flex h-[36rem] divide-x divide-border/60 overflow-hidden rounded-xl border border-border/60 bg-background",children:[(0,d.jsxs)("div",{className:"flex w-44 shrink-0 flex-col overflow-y-auto bg-muted/20 py-1",children:[b&&(0,d.jsxs)("button",{type:"button",onClick:()=>c(b.split("/").slice(0,-1).join("/")),className:"mx-1 mb-1 flex items-center gap-1 rounded-md px-2 py-1 text-left font-mono text-[11px] text-muted-foreground outline-none hover:bg-muted/50 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,d.jsx)(g.ChevronLeft,{className:"size-3 shrink-0"}),(0,d.jsx)("span",{className:"truncate",children:b.split("/").pop()})]}),(0,d.jsx)(T,{source:a.source,dir:a.dir,path:b,current:e,onPick:i})]}),(0,d.jsx)("div",{className:"min-w-0 flex-1 overflow-y-auto",children:e?(0,d.jsx)(V,{source:a.source,dir:a.dir,path:e,editable:(0,K.isEditableSource)(a.source),onUnsaved:a=>{h.current=a}},e):(0,d.jsx)("p",{className:"p-6 text-sm text-muted-foreground/60",children:"Pick a file"})})]})})}function R({skill:a,path:b}){if(!a)return(0,d.jsx)("span",{className:"truncate font-mono text-[11px] text-muted-foreground/60",children:"Pick a skill"});let c=[a.name,...b.split("/").filter(Boolean)];return(0,d.jsx)("span",{className:"flex min-w-0 items-center gap-1 font-mono text-[11px] text-muted-foreground",children:c.map((a,b)=>(0,d.jsxs)("span",{className:"flex min-w-0 items-center gap-1",children:[b>0&&(0,d.jsx)(h.ChevronRight,{className:"size-3 shrink-0 opacity-50"}),(0,d.jsx)("span",{className:(0,N.cn)("truncate",b===c.length-1&&"text-foreground"),children:a})]},`${b}-${a}`))})}function S({icon:a,label:b,active:c,hasChildren:e,onClick:f}){return(0,d.jsxs)("button",{type:"button",onClick:f,className:(0,N.cn)("mx-1 flex items-center gap-1.5 rounded-md px-2 py-1 text-left text-xs outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",c?E.PICKED_ROW:"text-muted-foreground hover:bg-muted/50 hover:text-foreground"),children:[(0,d.jsx)("span",{className:"shrink-0 text-muted-foreground/70 [&>svg]:size-3",children:a}),(0,d.jsx)("span",{className:"min-w-0 flex-1 truncate",children:b}),e&&(0,d.jsx)(h.ChevronRight,{className:"size-3 shrink-0 text-muted-foreground/50"})]})}function T({source:a,dir:b,path:c,current:e,onPick:f}){let{data:g,isLoading:h,error:l}=(0,M.useServerRoute)(t.queryKey.skillNode(a,b,c));return l?(0,d.jsx)("p",{className:"p-3 font-mono text-xs text-destructive",children:l.message}):h||!g?(0,d.jsxs)("div",{className:"space-y-2 p-2",children:[(0,d.jsx)(z.Skeleton,{className:"h-5 w-full"}),(0,d.jsx)(z.Skeleton,{className:"h-5 w-4/5"})]}):"dir"!==g.kind?null:(0,d.jsxs)(d.Fragment,{children:[g.entries.map(a=>(0,d.jsx)(S,{icon:"dir"===a.kind?(0,d.jsx)(k.Folder,{}):a.name.endsWith(".md")?(0,d.jsx)(j.FileText,{}):(0,d.jsx)(i.File,{}),label:a.name,hasChildren:"dir"===a.kind,active:(c?`${c}/${a.name}`:a.name)===e,onClick:()=>f(a)},a.name)),0===g.entries.length&&(0,d.jsx)("p",{className:"p-3 text-xs text-muted-foreground/60",children:"Empty folder"})]})}function U({content:a,description:b}){let c=/^---\r?\n([\s\S]*?)\r?\n---[ \t]*\r?\n?/.exec(a),e=b?.trim(),f=c?a.slice(c[0].length):a;return(0,d.jsxs)("div",{className:"min-w-0",children:[e&&(0,d.jsx)("p",{className:"border-b border-border/60 px-5 py-3 text-[13px] leading-relaxed text-muted-foreground",children:e}),(0,d.jsx)("div",{className:"px-5 py-4 text-sm leading-relaxed",children:(0,d.jsx)(x.Markdown,{children:f})})]})}function V({source:a,dir:b,path:c,editable:e,onUnsaved:f}){let[g,h]=(0,s.useState)(null),{data:i,isLoading:j,error:k}=(0,M.useServerRoute)(t.queryKey.skillNode(a,b,c)),l=null!==g&&(i?.kind!=="file"||g!==i.content);(0,s.useEffect)(()=>f?.(l),[l,f]);let[m,n]=(0,L.useServerAction)(J.writeSkillFileAction,{okMessage:"Saved",onOk:()=>{h(null),(0,M.revalidate)(t.queryKey.skills)}});if(k)return(0,d.jsx)("p",{className:"p-4 font-mono text-xs text-destructive",children:k.message});if(j||!i)return(0,d.jsxs)("div",{className:"space-y-3 p-5",children:[(0,d.jsx)(z.Skeleton,{className:"h-5 w-2/3"}),(0,d.jsx)(z.Skeleton,{className:"h-4 w-full"}),(0,d.jsx)(z.Skeleton,{className:"h-4 w-5/6"})]});if("file"!==i.kind)return null;let o=c.split("/").pop()??"";return(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"sticky top-0 z-20 flex items-center justify-between gap-2 border-b border-border/60 bg-background/90 px-5 py-2 font-mono text-[11px] text-muted-foreground backdrop-blur",children:[(0,d.jsx)("span",{className:"truncate",children:o}),(0,d.jsxs)("span",{className:"flex shrink-0 items-center gap-2",children:[(0,d.jsx)("span",{children:(0,N.formatBytes)(i.size)}),e&&null!==i.content&&null===g&&(0,d.jsxs)(u.Button,{size:"xs",variant:"ghost",className:"font-mono",onClick:()=>h(i.content??""),children:[(0,d.jsx)(p.SquarePen,{}),"Edit"]}),null!==g&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(u.Button,{size:"xs",variant:"ghost",className:"font-mono",onClick:()=>h(null),children:"Cancel"}),(0,d.jsx)(u.Button,{size:"xs",className:"font-mono",loading:n,disabled:g===i.content,onClick:()=>m(a,b,c,g),children:"Save"})]})]})]}),null!==g?(0,d.jsx)(C.Textarea,{value:g,onChange:a=>h(a.target.value),spellCheck:!1,"aria-label":`${o} contents`,className:"min-h-120 resize-none rounded-none border-0 font-mono text-[13px] leading-relaxed shadow-none focus-visible:ring-0"}):null===i.content?(0,d.jsx)("p",{className:"px-5 py-4 text-sm text-muted-foreground/60",children:i.size>D.SKILL_FILES.inlineBytes?"Too long to show here — a bot still reads it from disk.":"Not a text file — a bot can still read it from disk."}):o.toLowerCase().endsWith(".md")?(0,d.jsx)(U,{content:i.content,description:i.description}):(0,d.jsx)("pre",{className:"overflow-x-auto px-5 py-4 font-mono text-[13px] leading-relaxed whitespace-pre text-foreground/90",children:i.content})]})}function W(){return y.notify.component({className:"sm:max-w-lg",renderer:({close:a})=>(0,d.jsx)(X,{onDone:a})})}function X({onDone:a}){let[b,c]=(0,s.useState)("write"),[e,f]=(0,s.useState)(""),[g,h]=(0,s.useState)(""),[i,j]=(0,s.useState)(""),[k,l]=(0,s.useState)(null),[m,o]=(0,s.useState)(!1),p=(0,s.useRef)(null),q={errorMessage:!1,onOk:()=>{(0,M.revalidate)(t.queryKey.skills),a()}},[x,y,,z]=(0,L.useServerAction)(F.createSkillAction,q),[A,G,,H]=(0,L.useServerAction)(I.uploadSkillAction,q),J=y||G,K="write"===b?z:H,O=null!==k&&k.size>D.SKILL_FILES.uploadBytes,P=Math.round(D.SKILL_FILES.uploadBytes/1024/1024),Q=!J&&("write"===b?e.trim()&&g.trim()&&i.trim():null!==k&&!O),R=async()=>{if(!Q)return;if("write"===b)return void x({name:e.trim(),description:g.trim(),content:i});if(!k)return;let a=new FormData;a.append("file",k),A(a)},S=a=>{let b=a?.[0]??null;b&&l(b)};return(0,d.jsxs)(E.SettingDialogContent,{title:"New skill",description:"Instructions a bot reads when a job calls for them.",footer:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(u.Button,{variant:"ghost",onClick:a,children:"Cancel"}),(0,d.jsxs)(u.Button,{disabled:!Q,loading:J,onClick:R,children:[!J&&("write"===b?(0,d.jsx)(n.Plus,{}):(0,d.jsx)(r.Upload,{})),"write"===b?"Create":"Upload"]})]}),children:[(0,d.jsxs)(B.Tabs,{value:b,onValueChange:a=>c(a),children:[(0,d.jsxs)(B.TabsList,{className:"w-full",children:[(0,d.jsx)(B.TabsTrigger,{value:"write",children:"Write"}),(0,d.jsx)(B.TabsTrigger,{value:"upload",children:"Upload"})]}),(0,d.jsxs)(B.TabsContent,{value:"write",className:"space-y-5 pt-4",children:[(0,d.jsxs)(v.Field,{children:[(0,d.jsx)(v.FieldLabel,{htmlFor:"skill-name",children:"Name"}),(0,d.jsxs)(v.FieldContent,{children:[(0,d.jsx)(w.Input,{id:"skill-name",value:e,onChange:a=>f(a.target.value),placeholder:"deploy-checklist",spellCheck:!1,autoFocus:!0}),(0,d.jsxs)("p",{className:"font-mono text-[11px] text-muted-foreground",children:[D.PATHS.skills.custom,"/",e.trim()||"…","/SKILL.md"]})]})]}),(0,d.jsxs)(v.Field,{children:[(0,d.jsx)(v.FieldLabel,{htmlFor:"skill-description",children:"Description"}),(0,d.jsx)(v.FieldContent,{children:(0,d.jsx)(w.Input,{id:"skill-description",value:g,onChange:a=>h(a.target.value),placeholder:"What it does, then when to use it — a bot reads this to decide"})})]}),(0,d.jsxs)(v.Field,{children:[(0,d.jsx)(v.FieldLabel,{htmlFor:"skill-content",children:"Content"}),(0,d.jsx)(C.Textarea,{id:"skill-content",value:i,onChange:a=>j(a.target.value),placeholder:"Markdown. The steps, the rules, the examples.",className:"min-h-40 resize-none font-mono text-xs"})]})]}),(0,d.jsxs)(B.TabsContent,{value:"upload",className:"space-y-4 pt-4",children:[(0,d.jsxs)("button",{type:"button",onClick:()=>p.current?.click(),onDragOver:a=>{a.preventDefault(),o(!0)},onDragLeave:()=>o(!1),onDrop:a=>{a.preventDefault(),o(!1),S(a.dataTransfer.files)},className:(0,N.cn)("flex w-full flex-col items-center gap-2 rounded-xl border border-dashed px-6 py-10 text-center outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",m?"border-foreground/60 bg-muted/60":"border-border hover:bg-muted/40"),children:[(0,d.jsx)(r.Upload,{className:"size-5 text-muted-foreground"}),k?(0,d.jsxs)("span",{className:"text-sm",children:[k.name,(0,d.jsxs)("span",{className:(0,N.cn)("ml-2 font-mono text-[11px]",O?"text-destructive":"text-muted-foreground"),children:[(0,N.formatBytes)(k.size),O&&` \xb7 over ${P} MB`]})]}):(0,d.jsx)("span",{className:"text-sm text-muted-foreground",children:"Drop a file here, or click to choose"})]}),(0,d.jsx)("input",{ref:p,type:"file",accept:".md,.zip,.skill",className:"hidden",onChange:a=>S(a.target.files)}),(0,d.jsxs)("div",{className:"space-y-1 text-xs text-muted-foreground",children:[(0,d.jsx)("p",{className:"font-medium text-foreground/80",children:"File requirements"}),(0,d.jsxs)("p",{children:["A ",(0,d.jsx)("span",{className:"font-mono",children:".md"})," file needs a YAML block with the skill's name and description."]}),(0,d.jsxs)("p",{children:["A ",(0,d.jsx)("span",{className:"font-mono",children:".zip"})," or"," ",(0,d.jsx)("span",{className:"font-mono",children:".skill"})," archive needs a SKILL.md inside — the rest of its folder comes along."]}),(0,d.jsxs)("p",{children:["Up to ",P," MB."]})]})]})]}),K&&(0,d.jsx)("p",{className:"font-mono text-xs text-destructive",children:K})]})}a.s(["SkillsSetting",0,function(){let[a,b]=(0,s.useState)(""),{data:c,isLoading:e,error:f}=(0,M.useServerRoute)(t.queryKey.skills),g=c??[];if(e)return(0,d.jsx)(E.SettingSkeleton,{rows:4});if(f)return(0,d.jsx)(E.SettingError,{message:f.message});let h=a.trim().toLowerCase(),i=g.filter(a=>!h||`${a.name} ${a.description}`.toLowerCase().includes(h)),j=g.filter(a=>!a.disabled).length,k=g.filter(a=>!a.disabled&&("default"===a.source||"custom"===a.source)).length,l=new Map;for(let a of i)a.bot&&l.set(a.bot,[...l.get(a.bot)??[],a]);return(0,d.jsxs)(E.SettingScreen,{footer:(0,d.jsxs)(E.SettingRailNote,{children:[g.filter(a=>!(0,K.isEditableSource)(a.source)).length," ","shipped ·"," ",g.filter(a=>(0,K.isEditableSource)(a.source)).length," ","installed"]}),children:[(0,d.jsx)(E.SettingToolbar,{count:`${j} on \xb7 ${g.length-j} off`,children:(0,d.jsx)(E.SettingFilter,{value:a,onChange:b,placeholder:"Filter skills"})}),(0,d.jsx)(E.SettingGroup,{label:"Custom",hint:"yours — added here · a Default skill of the same name wins",children:(0,d.jsx)(E.SettingItems,{addRow:{label:"Add skill",onClick:W},children:i.filter(a=>"custom"===a.source).map(a=>(0,d.jsx)(P,{skill:a},`custom/${a.dir}`))})}),[...l].map(([a,b])=>(0,d.jsx)(E.SettingGroup,{label:`${a}'s own`,hint:`only ${a} reads these \xb7 what it found or wrote can be edited or deleted`,children:(0,d.jsx)(E.SettingItems,{children:b.map(a=>(0,d.jsx)(P,{skill:a},`${a.source}/${a.dir}`))})},a)),(0,d.jsx)(E.SettingGroup,{label:"Default",hint:"ships with the app · switch off, can't edit or delete",children:(0,d.jsx)(E.SettingItems,{children:i.filter(a=>"default"===a.source).map(a=>(0,d.jsx)(P,{skill:a},`default/${a.dir}`))})}),k>D.PROMPT_CROWDED.skills&&(0,d.jsxs)(E.SettingNote,{children:[k," skills are on for every bot. Each is a line in every prompt a bot reads, and one more to look past when it picks."]})]})}]),c()}catch(a){c(a)}},!1),462620,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7f590fa54250fddb87269a4f5a54396ec76abfcbe6",b.callServer,void 0,b.findSourceMapURL,"createSkillAction");a.s(["createSkillAction",0,c])},898367,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7f2fdd3ac62b5d70d08e3c5e090531b4f5363b8e8f",b.callServer,void 0,b.findSourceMapURL,"deleteSkillAction");a.s(["deleteSkillAction",0,c])},979942,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7fb905eb5033cd99f340dce1c0f0be4e14dfbe67ad",b.callServer,void 0,b.findSourceMapURL,"setSkillDisabledAction");a.s(["setSkillDisabledAction",0,c])},576088,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7fd72c8e2441652e9bd6fb9fc5f4bc8764beb41c26",b.callServer,void 0,b.findSourceMapURL,"uploadSkillAction");a.s(["uploadSkillAction",0,c])},9648,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7fa043625880da0524e8c5b598ede9093c93084d27",b.callServer,void 0,b.findSourceMapURL,"writeSkillFileAction");a.s(["writeSkillFileAction",0,c])},102410,a=>{"use strict";var b=a.i(156757);b.z.union([b.z.enum(["custom","default"]),b.z.templateLiteral(["kit:",b.z.string().regex(/^[\p{L}\p{N}_-]+$/u)]),b.z.templateLiteral(["own:",b.z.string().regex(/^[\p{L}\p{N}_-]+$/u)])]);let c=b.z.string().trim().min(1,"Skill name is required").max(64,"Skill name is too long").regex(/^[a-z0-9][a-z0-9_-]*$/i,"Use letters, numbers, dashes and underscores only"),d=b.z.string().trim().min(1,"Skill name is required").max(64,"Skill name is too long");b.z.object({name:d,description:b.z.string().trim().min(1,"Description is required"),metadata:b.z.record(b.z.string(),b.z.unknown()).optional(),disabled:b.z.boolean().optional(),platforms:b.z.array(b.z.string()).optional()}).extend({name:c,content:b.z.string().trim().min(1,"Content is required")}),a.s(["firstSentence",0,a=>a.trim().split(/(?<=[.。])\s|\n/)[0].trim(),"isEditableSource",0,a=>"custom"===a||a.startsWith("own:")])},663741,a=>{"use strict";var b=a.i(164831);let c={name:"frame",size:24,node:[["line",{x1:"22",x2:"2",y1:"6",y2:"6",key:"15w7dq"}],["line",{x1:"22",x2:"2",y1:"18",y2:"18",key:"1ip48p"}],["line",{x1:"6",x2:"6",y1:"2",y2:"22",key:"a2lnyx"}],["line",{x1:"18",x2:"18",y1:"2",y2:"22",key:"8vb6jd"}]]};c.node;let d=(0,b.default)(c);a.s(["Frame",0,d],663741)},917256,a=>{"use strict";var b=a.i(164831);let c={name:"square-pen",size:24,node:[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],aliases:["pen-box","edit","pen-square"]};c.node;let d=(0,b.default)(c);a.s(["SquarePen",0,d],917256)},201661,a=>{"use strict";var b=a.i(164831);let c={name:"upload",size:24,node:[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]};c.node;let d=(0,b.default)(c);a.s(["Upload",0,d],201661)}];
2
-
3
- //# sourceMappingURL=_1g48r6t._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[82951,a=>a.a(async(b,c)=>{try{var d=a.i(187924),e=a.i(141146),f=a.i(875160),g=a.i(272944),h=a.i(19895),i=a.i(951675),j=a.i(474215),k=a.i(572131),l=a.i(767561),m=a.i(340695),n=a.i(965733),o=a.i(676504),p=a.i(446181),q=a.i(545097),r=a.i(950463),s=a.i(287702),t=a.i(845782),u=a.i(653472),v=a.i(455183),w=a.i(411509),x=a.i(913834),y=a.i(42380),z=a.i(8468),A=a.i(181809),B=a.i(135432),C=a.i(156819),D=a.i(619477),E=a.i(199169),F=a.i(313237),G=a.i(862966),H=a.i(759497),I=a.i(497895),J=a.i(988422),K=b([z,A,J]);[z,A,J]=K.then?(await K)():K;let R="w-36";function L({thread:a,bots:b,open:c,onOpen:g,onStop:h,onDelete:i}){let j="running"===a.status,l=(0,k.useMemo)(()=>(0,B.threadFromRow)(a,b),[a,b]),m=function(a){let b=a.room.questions[0];if(b)return{text:(0,I.plainText)(b.text),tone:I.WAITING_INK};if("waiting"===a.status&&a.ask)return{text:(0,w.isAppStop)(a.ask)?(0,I.plainText)(a.outcome??a.ask.question):a.ask.question,tone:I.WAITING_INK};let c=a.seen;if("cancelled"===a.status)return{text:"Stopped",tone:"text-muted-foreground"};if("done"===a.status)return{text:(0,I.plainText)(a.outcome??"Done"),tone:c?"text-muted-foreground":"text-foreground/80"};for(let b=a.lines.length-1;b>=0;b--){let c=a.lines[b];if("tool"===c.kind)return{text:c.note??c.input,tone:"text-muted-foreground",tool:c.name,shine:!0};if("text"===c.kind)return{text:c.text,tone:"text-muted-foreground",shine:!0};if("user"===c.kind)break}return{text:`${a.bot} is taking it on…`,tone:"text-muted-foreground italic",shine:!0}}(a),n=a.tokens.input+a.tokens.output;return(0,d.jsxs)("div",{className:(0,I.cn)("group/row relative transition-colors",c?"bg-muted/80":"hover:bg-muted/50"),children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 p-4",children:[(0,d.jsxs)("button",{type:"button",onClick:g,className:"flex min-w-0 flex-1 items-center gap-3 rounded-md text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,d.jsx)(x.BotMark,{size:40,seed:a.bot,...(0,x.markOf)(a.bot,b),state:j?"thinking":"idle",notify:(0,w.needsThreadReply)(a)||(0,w.isUnread)(a),crossed:"cancelled"===a.status,className:"shrink-0"}),(0,d.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,d.jsxs)("span",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"truncate text-sm font-medium",children:a.label}),a.routineId&&(0,d.jsx)("span",{title:"Started by a routine",className:"shrink-0",children:(0,d.jsx)(C.RoutineMark,{className:"size-3 text-muted-foreground/80"})}),(0,d.jsx)(y.BotRoster,{bots:l.roster}),j&&(0,d.jsx)(f.Loader2,{className:"size-3 shrink-0 animate-spin text-muted-foreground"})]}),m&&(0,d.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5 text-[13px] leading-snug",children:[m.tool&&(0,d.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground",children:m.tool}),m.shine?(0,d.jsx)(q.ShinyText,{text:m.text,speed:2.2,className:"min-w-0 truncate"}):(0,d.jsx)("span",{className:(0,I.cn)("min-w-0 truncate",m.tone),children:m.text})]})]}),(0,d.jsxs)("span",{className:(0,I.cn)("flex shrink-0 flex-col items-end gap-0.5 font-mono text-[11px] leading-4 text-muted-foreground tabular-nums",R),children:[(0,d.jsx)("span",{children:(0,E.whenOf)(a.updatedAt)}),(0,d.jsxs)("span",{className:"max-w-full truncate text-muted-foreground/70",title:n>0?`${a.id} \xb7 in ${(0,I.formatCount)(a.tokens.input)} \xb7 out ${(0,I.formatCount)(a.tokens.output)}`:a.id,children:[a.bot,n>0&&` \xb7 ${(0,I.formatCount)(n)}`]})]}),(0,d.jsx)(e.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground"})]}),(0,d.jsx)(M,{thread:a,onStop:h,onDelete:i})]}),j&&(0,d.jsx)(O,{thread:a})]})}function M({thread:a,onStop:b,onDelete:c,className:e}){let f="running"===a.status||"waiting"===a.status;return(0,d.jsxs)(o.DropdownMenu,{children:[(0,d.jsx)(o.DropdownMenuTrigger,{render:(0,d.jsx)(m.Button,{size:"icon-sm",variant:"ghost","aria-label":"More",className:e}),children:(0,d.jsx)(g.MoreHorizontal,{})}),(0,d.jsxs)(o.DropdownMenuContent,{align:"end",children:[f&&(0,d.jsxs)(o.DropdownMenuItem,{onClick:b,children:[(0,d.jsx)(h.Square,{}),"Stop"]}),(0,d.jsxs)(o.DropdownMenuItem,{variant:"destructive",onClick:c,children:[(0,d.jsx)(i.Trash2,{}),"Delete"]})]})]})}function N({thread:a,whole:b,bots:c,onClose:e,onStop:f,onDelete:g}){let[h,i]=(0,k.useState)(null),l=(0,k.useCallback)(a=>{i(a?.closest("[data-slot=dialog-content]")??null)},[]),[o,p]=(0,k.useState)({}),q=(0,k.useMemo)(()=>a?(0,B.threadFromRow)(a,c):null,[a,c]),s=(0,k.useMemo)(()=>b?(0,B.threadFromRow)(b,c):q?.lines.length?q:null,[b,q,c]),t=a?o[a.id]??null:null;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{ref:l,hidden:!0}),(0,d.jsx)(n.Dialog,{open:!!(a&&h),onOpenChange:a=>!a&&e(),modal:!1,disablePointerDismissal:!0,children:(0,d.jsx)(n.DialogPortal,{container:h,children:(0,d.jsx)(n.DialogPopup,{className:"absolute inset-y-0 right-0 z-10 flex w-[min(35rem,calc(100%-13rem))] flex-col border-l border-border/60 bg-popover text-popover-foreground shadow-2xl shadow-black/10 duration-150 data-open:animate-in data-open:fade-in-0 data-open:slide-in-from-right-4 data-closed:animate-out data-closed:fade-out-0 data-closed:slide-out-to-right-4",children:a&&q&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex shrink-0 items-center gap-2.5 pt-3.5 pr-3 pb-1.5 pl-5",children:[(0,d.jsx)(x.BotMark,{size:28,seed:a.bot,...(0,x.markOf)(a.bot,c),state:"running"===a.status?"thinking":"idle",notify:(0,w.needsThreadReply)(a),crossed:"cancelled"===a.status,className:"shrink-0"}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsx)(n.DialogTitle,{className:"sr-only",children:a.label}),(0,d.jsx)("p",{className:"truncate text-[15px] leading-5 font-semibold",children:a.label}),(0,d.jsxs)("div",{className:"mt-0.5 flex min-w-0 items-center gap-2 font-mono text-[11px] text-muted-foreground",children:[(0,d.jsxs)("span",{title:a.id,className:"min-w-0 truncate",children:[a.bot," · ",(0,E.whenOf)(a.updatedAt)]}),(0,d.jsx)(A.ThreadFacts,{thread:q})]})]}),(0,d.jsx)(M,{thread:a,onStop:()=>f(a),onDelete:()=>g(a),className:"text-muted-foreground"}),(0,d.jsx)(n.DialogClose,{render:(0,d.jsx)(m.Button,{size:"icon-sm",variant:"ghost","aria-label":"Close the thread"}),children:(0,d.jsx)(j.X,{})})]}),s?(0,d.jsx)(A.Conversation,{thread:s,tab:t,onTab:b=>p(c=>({...c,[a.id]:b})),className:"max-h-none min-h-0 flex-1 px-5",tabsClassName:"px-5"}):(0,d.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col gap-2 px-5 py-4",children:[(0,d.jsx)(r.Skeleton,{className:"h-3 w-4/5"}),(0,d.jsx)(r.Skeleton,{className:"h-3 w-3/5"}),(0,d.jsx)(r.Skeleton,{className:"h-3 w-2/3"})]}),(0,d.jsx)("div",{className:"shrink-0 px-5 pt-2 pb-4",children:(0,d.jsx)(J.ThreadReply,{thread:{id:a.id,label:a.label,bot:a.bot,ask:a.ask,room:a.room},status:a.status,faces:q.roster,to:t??a.bot})})]})})})})]})}function O({thread:a}){let b=[];if(a.lines.forEach((c,d)=>{if("tool"!==c.kind)return;let e=a.lines[d+1];b.push({step:c,took:e?(0,E.toDate)(e.at).getTime()-(0,E.toDate)(c.at).getTime():null})}),0===b.length)return null;let c=(0,E.toDate)(a.updatedAt).getTime()-(0,E.toDate)(a.createdAt).getTime();return(0,d.jsxs)("div",{className:"pointer-events-none absolute top-[calc(100%-0.75rem)] left-17 z-20 hidden w-96 max-w-[calc(100%-5rem)] rounded-xl bg-background p-3 pb-2 shadow-xl shadow-black/10 ring-1 ring-border/60 group-hover/row:block",children:[(0,d.jsxs)("div",{className:"mb-1.5 flex items-center gap-2 font-mono text-[10px] text-muted-foreground",children:[(0,d.jsx)("span",{children:a.bot}),(0,d.jsx)("span",{className:"opacity-50",children:"·"}),(0,d.jsxs)("span",{children:[b.length," ",1===b.length?"step":"steps"]}),(0,d.jsx)("span",{className:"opacity-50",children:"·"}),(0,d.jsx)("span",{children:P(c)})]}),b.slice(-6).map(({step:a,took:b})=>{let c=(0,z.toolIcon)(a.name);return(0,d.jsxs)("div",{className:"flex h-5.5 items-center gap-2 font-mono text-[11px]",children:[null===b?(0,d.jsx)(f.Loader2,{className:"size-3 shrink-0 animate-spin text-muted-foreground"}):(0,d.jsx)(c,{className:"size-3 shrink-0 text-muted-foreground"}),(0,d.jsx)("span",{className:"w-24 shrink-0 truncate text-muted-foreground",children:a.name}),null===b?(0,d.jsx)(q.ShinyText,{text:a.note??a.input,speed:2.2,className:"min-w-0 flex-1 truncate"}):(0,d.jsx)("span",{className:"min-w-0 flex-1 truncate text-foreground",children:a.note??a.input}),(0,d.jsx)("span",{className:"w-10 shrink-0 text-right text-muted-foreground/70 tabular-nums",children:null===b?"":P(b)})]},a.id)})]})}function P(a){let b=Math.max(0,a)/1e3;if(b<10)return`${b.toFixed(1)}s`;if(b<60)return`${Math.round(b)}s`;let c=Math.floor(b/60);return`${c}m ${Math.round(b-60*c)}s`}function Q(){return(0,d.jsxs)("div",{className:"flex items-center gap-3 p-4",children:[(0,d.jsx)(r.Skeleton,{className:"size-10 shrink-0 rounded-full"}),(0,d.jsxs)("span",{className:"min-w-0 flex-1 space-y-2",children:[(0,d.jsx)(r.Skeleton,{className:"h-3 w-40 max-w-full"}),(0,d.jsx)(r.Skeleton,{className:"h-2.5 w-80 max-w-full"})]}),(0,d.jsxs)("span",{className:(0,I.cn)("flex shrink-0 flex-col items-end gap-1.5",R),children:[(0,d.jsx)(r.Skeleton,{className:"h-2.5 w-12"}),(0,d.jsx)(r.Skeleton,{className:"h-2.5 w-24"})]}),(0,d.jsx)("span",{className:"size-4 shrink-0"}),(0,d.jsx)("span",{className:"size-7 shrink-0"})]})}a.s(["ThreadSetting",0,function(){let[a,b]=(0,k.useState)(null),[c,e]=(0,k.useState)(""),{data:f}=(0,H.useServerRoute)(l.queryKey.bot),{items:g,isLoading:h,isLoadingMore:i,error:j,hasMore:n,sentinelRef:o}=(0,G.useServerPages)({key:(a,b)=>{if(0===a)return l.queryKey.threadHistory(null);let c=b?.at(-1);return c?l.queryKey.threadHistory((0,E.toDate)(c.updatedAt).toISOString()):null},size:s.PAGE_SIZE}),q=g.find(b=>b.id===a),{data:r}=(0,H.useServerRoute)(a?l.queryKey.thread(a):null),x=r?.id===a?r:void 0;(0,B.useSeenOnDetail)(q);let[y]=(0,F.useServerAction)(t.cancelThreadAction,{onOk:a=>{(0,H.revalidate)(l.queryKey.threads),B.screenActs.announce({kind:"stopped",id:a.id,label:a.label})}}),[z]=(0,F.useServerAction)(v.deleteThreadAction,{onOk:()=>(0,H.revalidate)(l.queryKey.threads)}),[A]=(0,F.useServerAction)(u.clearFinishedThreadsAction,{onOk:()=>(0,H.revalidate)(l.queryKey.threads)}),C=c.trim().toLowerCase(),I=C?g.filter(a=>[a.label,a.outcome,a.bot].join(" ").toLowerCase().includes(C)):g,J=async()=>{await p.notify.confirm({title:"Clear finished jobs?",description:"Everything done or stopped goes, messages included. Running and waiting jobs stay.",okText:"Clear",destructive:!0})&&A()},K=async c=>{if(!await p.notify.confirm({title:`Delete "${c.label}"?`,description:"Its messages go with it — nothing can be picked back up.",okText:"Delete",destructive:!0}))return;let d=I.findIndex(a=>a.id===c.id),e=I[d+1]??I[d-1];try{await z(c.id)}catch{return}c.id===a&&b(e?.id??null)};if(h)return(0,d.jsx)(D.SettingSkeleton,{rows:3});if(j)return(0,d.jsx)(D.SettingError,{message:j.message});let M=g.filter(a=>"waiting"===a.status).length,O=g.filter(w.isUnread).length;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(D.SettingScreen,{footer:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(D.SettingRailNote,{children:[g.length," shown",M>0&&` \xb7 ${M} waiting on you`,O>0&&` \xb7 ${O} new result${1===O?"":"s"}`]}),(n||g.some(a=>"done"===a.status||"cancelled"===a.status))&&(0,d.jsx)(m.Button,{variant:"outline",size:"sm",onClick:J,children:"Clear finished"})]}),children:(0,d.jsx)(D.SettingGroup,{filter:(0,d.jsx)(D.SettingFilter,{value:c,onChange:e,placeholder:"Filter by label, bot or word"}),right:C?`${I.length} of ${g.length}`:void 0,children:(0,d.jsxs)(D.SettingItems,{children:[0===I.length?(0,d.jsx)("p",{className:"p-4 text-sm leading-relaxed text-muted-foreground",children:C?"Nothing here matches. Keep scrolling to search further back.":"Nothing yet. When Thursday hands a job to a bot mid-call, it shows up here — while it runs, and after."}):I.map(a=>(0,d.jsx)(L,{thread:a,bots:f,open:a.id===q?.id,onOpen:()=>b(a.id),onStop:()=>y(a.id),onDelete:()=>K(a)},a.id)),(0,d.jsx)(D.SettingMore,{hasMore:n,loading:i,sentinelRef:o,ghost:(0,d.jsx)(Q,{}),className:"divide-y divide-border/60"})]})})}),(0,d.jsx)(N,{thread:q,whole:x,bots:f,onClose:()=>b(null),onStop:a=>y(a.id),onDelete:K})]})}]),c()}catch(a){c(a)}},!1),653472,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7f48fe61fe223edd441e06c5a298c96193881538b1",b.callServer,void 0,b.findSourceMapURL,"clearFinishedThreadsAction");a.s(["clearFinishedThreadsAction",0,c])},455183,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7f6111468a06cf7a0bfaa23bd80358c4ce156af908",b.callServer,void 0,b.findSourceMapURL,"deleteThreadAction");a.s(["deleteThreadAction",0,c])}];
2
-
3
- //# sourceMappingURL=features_bot_1k25jdg._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[913834,a=>{"use strict";var b=a.i(187924),c=a.i(572131),d=a.i(730357),e=a.i(483253),f=a.i(497895),g=a.i(324835);let h=2*Math.PI,i="origin-center animate-in duration-300 zoom-in-0 [transform-box:fill-box]",j="-18 -18 276 276",k=a=>Math.round(100*a)/100,l=(a,b,c)=>Math.min(c,Math.max(b,a));function m(a){let b=a>>>0;return()=>{let a=Math.imul((b=b+0x6d2b79f5>>>0)^b>>>15,1|b);return(((a=a+Math.imul(a^a>>>7,61|a)^a)^a>>>14)>>>0)/0x100000000}}function n(a,b){return[a[0]-b[0],a[1]-b[1]]}function o(a){let b=Math.hypot(a[0],a[1])||1;return[a[0]/b,a[1]/b]}function p(a){let b=a.map((a,b)=>{let c=b/128*h;return[120+Math.cos(c)*a,120+Math.sin(c)*a]}),c=`M${k(b[0][0])} ${k(b[0][1])}`;for(let a=0;a<128;a++){let d=b[(a-1+128)%128],e=b[a],f=b[(a+1)%128],g=b[(a+2)%128],h=e[0]+(f[0]-d[0])/6,i=e[1]+(f[1]-d[1])/6,j=f[0]-(g[0]-e[0])/6,l=f[1]-(g[1]-e[1])/6;c+=`C${k(h)} ${k(i)} ${k(j)} ${k(l)} ${k(f[0])} ${k(f[1])}`}return`${c}Z`}function q(a){let b=a.tilt*Math.PI/180,c=Math.cos(b),d=Math.sin(b),e=(b,e)=>[a.cx+b*c-e*d,a.cy+b*d+e*c],f=-a.len/2,g=a.len/2,h=[],i=[];for(let b=0;b<=30;b++){let c=b/30,d=1-c,j=d*d*f+c*c*g,k=-(2*d*c*a.bend),l=-(2*d*f)+2*c*g,m=-(2*d*a.bend)+2*c*a.bend,n=Math.hypot(l,m)||1,o=-m/n,p=l/n,q=a.width/2*Math.sin(Math.PI*c)**a.taper;h.push(e(j+o*q,k+p*q)),i.push(e(j-o*q,k-p*q))}let j=`M${k(h[0][0])} ${k(h[0][1])}`;for(let a=1;a<=30;a++)j+=`L${k(h[a][0])} ${k(h[a][1])}`;for(let a=29;a>=0;a--)j+=`L${k(i[a][0])} ${k(i[a][1])}`;return`${j}Z`}let r={shape:"blob",sides:3,corner:.74,rotation:0,squircle:4.6,wobble:.2,seed:113,autofit:!0,color:"currentColor",fill:!0,strokeWidth:14,eyeLen:51,eyeWidth:38,eyeBend:-1,eyeTaper:.35,eyeTilt:-90,eyeSkew:0,eyeGap:88,eyeY:100,gazeRange:7,follow:!0,ripple:9,pulse:7,punch:.05,bandEase:.019,bobRate:1,stretch:15,idle:!0,liveliness:55,float:7,breathe:3.7,speed:1.7,blink:!0,notify:!1,notifyAngle:41,notifyDist:109,notifyR:25,notifyRing:11};function s(a,b,c=.035){let d=m(12139^b),e=[2,3,5].map(a=>({k:a,a:(2*d()-1)/a,p:d()*h})),f=a.map((a,b)=>{let c=b/128*h,d=0;for(let a of e)d+=a.a*Math.sin(a.k*c+a.p);return d}),g=Math.max(...f.map(Math.abs))||1;return a.map((a,b)=>a*(1+c*f[b]/g))}let t=new Map;function u(a,b,c){var d,e,f;let g=`${"poly"===b?`poly|${a.sides}|${a.corner}|${a.rotation}|${c}`:"squircle"===b?`squircle|${a.squircle}|${c}`:"heart"===b?`heart|${c}`:`blob|${a.wobble}|${c}`}|${a.autofit}`,i=t.get(g);if(i)return i;let j=function(a){let b=Array(128);for(let c=0;c<128;c++){let d=c/128*h,e=Math.cos(d),f=Math.sin(d),g=0;for(let b=0;b<a.length;b++){let c=a[b],d=a[(b+1)%a.length],h=d[0]-c[0],i=d[1]-c[1],j=e*i-f*h;if(1e-9>Math.abs(j))continue;let k=c[0]-120,l=c[1]-120,m=(k*i-l*h)/j,n=(k*f-l*e)/j;m>g&&n>=-1e-9&&n<=1+1e-9&&(g=m)}b[c]=g||112}return b}((d=a,e=b,f=c,"squircle"===e?function(a){let b=[],c=2/a;for(let a=0;a<360;a++){let d=a/360*h,e=Math.cos(d),f=Math.sin(d);b.push([120+Math.sign(e)*Math.abs(e)**c*112,120+Math.sign(f)*Math.abs(f)**c*112])}return b}(d.squircle):"poly"===e?function(a,b,c){let d=c*Math.PI/180-Math.PI/2,e=[];for(let b=0;b<a;b++){let c=d+b/a*h;e.push([120+112*Math.cos(c),120+112*Math.sin(c)])}let f=(Math.PI-h/a)/2,g=224*Math.sin(Math.PI/a)/2*Math.tan(f)*l(b,.001,1),i=g/Math.tan(f),j=[];for(let b=0;b<a;b++){let c=e[b],d=e[(b-1+a)%a],k=e[(b+1)%a],l=o(n(d,c)),m=o(n(k,c)),p=[c[0]+l[0]*i,c[1]+l[1]*i],q=o([l[0]+m[0],l[1]+m[1]]),r=[c[0]+q[0]*g/Math.sin(f),c[1]+q[1]*g/Math.sin(f)],s=Math.atan2(p[1]-r[1],p[0]-r[0]),t=[c[0]+m[0]*i,c[1]+m[1]*i],u=Math.atan2(t[1]-r[1],t[0]-r[0])-s;for(;u>Math.PI;)u-=h;for(;u<-Math.PI;)u+=h;for(let a=0;a<=20;a++){let b=s+a/20*u;j.push([r[0]+Math.cos(b)*g,r[1]+Math.sin(b)*g])}}return j}(d.sides,d.corner,d.rotation):"heart"===e?function(){let a=[];for(let b=0;b<400;b++){let c=b/400*h,d=16*Math.sin(c)**3,e=13*Math.cos(c)-5*Math.cos(2*c)-2*Math.cos(3*c)-Math.cos(4*c);a.push([120+6.6*d,120-(e+2.2)*7.26])}return a}():function(a,b){let c=m(a),d=[1,2,3,4,5].map(a=>({k:a,a:(2*c()-1)/a,p:c()*h})),e=[],f=0;for(let a=0;a<360;a++){let b=a/360*h,c=0;for(let a of d)c+=a.a*Math.sin(a.k*b+a.p);e.push(c),f=Math.max(f,Math.abs(c))}let g=f>0?b/f:0;return e.map((a,b)=>{let c=b/360*h,d=112*(1+a*g);return[120+Math.cos(c)*d,120+Math.sin(c)*d]})}(f,d.wobble))),k="blob"===b?j:"heart"===b?function(a,b){let c=a;for(let a=0;a<2;a++){let a=c;c=a.map((b,c)=>{let d=0;for(let b=-3;b<=3;b++)d+=a[(c+b+128)%128];return d/7})}let d=c.reduce((a,b)=>a+b,0)/128,e=s(c.map(a=>.95*a+.05*d),b,.05),f=Math.round((2*m(20977^b)()-1)*3);return f?e.map((a,b)=>e[(b-f+256)%128]):e}(j,c):s(j,c),p=a.autofit?function(a){let b=h/128,c=0,d=0;for(let e of a)c+=.5*e*e*b,e>d&&(d=e);if(c<=0)return a;let e=Math.min(Math.sqrt(112*Math.PI*112/c),130/d);return a.map(a=>a*e)}(k):k;return t.size>400&&t.clear(),t.set(g,p),p}let v=a=>345*(.7+.3*a),w=[{cx:42,sway:40,period:5},{cx:134,sway:-35,period:6.5},{cx:209,sway:29,period:4.5}],x={eyeLen:1,eyeWid:1,eyeX:0,eyeY:0,bodyX:0,bodyY:0,rot:0,scale:1,blinkIn:0},y=a=>a*a*(3-2*a),z=a=>Math.sin(Math.PI*a);function A(a,b,c){return a<=0||a>=1?0:a<b?y(a/b):a>1-c?y((1-a)/c):1}let B={glance:{weight:26,dur:[900,1400],play:(a,b,c)=>{let d=A(a,.12,.34);return{eyeX:22*b*d,eyeY:22*c*d,rot:.9*b*d,blinkIn:40*!!(a<.02&&.4>Math.random())}}},lookAway:{weight:12,dur:[1800,2600],play:(a,b,c)=>{let d=A(a,.1,.46);return{eyeX:30*b*d,eyeY:(.5*c+.35)*22*d,rot:1.6*b*d}}},widen:{weight:8,dur:[700,950],play:(a,b)=>{let c=A(a,.22,.5);return{eyeLen:1+.16*c,eyeWid:1+.2*c,rot:-(.5*b)*c}}},squint:{weight:8,dur:[800,1050],play:a=>{let b=A(a,.25,.45);return{eyeLen:1-.3*b,eyeWid:1-.12*b}}},double:{weight:7,dur:[420,420],play:a=>({blinkIn:+(a<.02)})},nod:{weight:11,dur:[1150,1400],play:a=>({bodyY:10*Math.sin(2*h*a)*z(a),rot:2.2*Math.sin(2*h*a+.5)*z(a),eyeY:3.2*Math.sin(2*h*a-.7)*z(a)})},sink:{weight:7,dur:[1800,2300],play:a=>{let b=z(a)**.7;return{eyeLen:1-.26*b,eyeY:4*b,bodyY:8*b,scale:1-.03*b,rot:1.8*b}}},wave:{weight:7,dur:[1300,1700],play:(a,b)=>{let c=A(a,.24,.34);return{bodyX:b*Math.sin(1.5*h*a)*9*c,rot:b*Math.sin(1.5*h*a+.5)*4.5*c,eyeX:b*Math.sin(1.5*h*a)*5*c,eyeLen:1-.2*c}}},reach:{weight:7,dur:[1800,2300],play:a=>{let b=A(a,.28,.34);return{scale:1+.045*b,bodyY:-4*b,eyeLen:1-.28*b,eyeY:3*b,rot:1.8*b}}},tilt:{weight:11,dur:[1500,1900],play:(a,b)=>{let c=A(a,.22,.4);return{rot:9*b*c,bodyX:-3*b*c,eyeY:-1.5*c}}},sweep:{weight:9,dur:[1600,2200],play:(a,b,c)=>{let d=A(a,.12,.18),e=Math.cos(Math.PI*l((a-.15)/.7,0,1));return{eyeX:24*b*d*e,eyeY:24*c*d*e,rot:1.2*b*d*e}}},roll:{weight:5,dur:[900,1200],play:(a,b)=>{let c=z(a)**.5,d=h*a*(b>=0?1:-1);return{eyeX:20*Math.cos(d)*c,eyeY:14*Math.sin(d)*c,rot:1.5*Math.sin(d)*c,blinkIn:+(a>.9&&a<.93)}}},shake:{weight:8,dur:[650,900],play:(a,b)=>{let c=z(a),d=Math.sin(2*h*a);return{rot:b*d*5*c,bodyX:b*d*4*c,eyeX:-b*d*4*c}}},bounce:{weight:6,dur:[850,1100],play:a=>{let b=1-.45*a,c=Math.abs(Math.sin(h*a))*b;return{bodyY:-14*c,eyeY:2.5*c,scale:1-Math.max(0,-Math.cos(h*a))*b*.04}}},slowBlink:{weight:6,dur:[900,1200],play:a=>({eyeWid:1-.88*z(a)**.6,eyeY:1.5*z(a)})},perk:{weight:5,dur:[700,950],play:(a,b)=>{let c=A(a,.09,.62);return{bodyY:-7*c,scale:1+.035*c,eyeLen:1+.14*c,eyeWid:1+.1*c,rot:.8*b*c}}}},C=Object.keys(B),D={idle:{},connecting:{nod:0,wave:0,bounce:0,sweep:1.6,roll:1.4},listening:{glance:.3,lookAway:.15,sweep:.2,roll:0,wave:0,shake:0,bounce:0,sink:.3,widen:2.2,perk:1.8,nod:1.6,slowBlink:1.4},thinking:{lookAway:2.2,squint:2,tilt:1.8,roll:2,sweep:1.4,sink:1.6,glance:.8,slowBlink:1.2,nod:.3,wave:0,bounce:.2,perk:.5},delegating:{wave:2.6,nod:1.8,perk:1.6,glance:1.4,tilt:1.2,lookAway:.4,squint:.4,sink:0,roll:0},speaking:{nod:2,glance:1.2,widen:1.2,sink:0,roll:.3,wave:.4,slowBlink:.4,bounce:.6}},E={idle:{eyes:1,body:1,churn:0,churnSpeed:0,dwell:1,breathe:1,float:1,blink:1,lean:0,aspect:1,gazeX:0,gazeY:0},connecting:{eyes:.75,body:.91,churn:2.5,churnSpeed:3,dwell:.8,breathe:2.2,float:.6,blink:.6,lean:0,aspect:1.03,gazeX:0,gazeY:4},listening:{eyes:1.3,body:1.04,churn:0,churnSpeed:0,dwell:2.6,breathe:.45,float:.35,blink:1.8,lean:0,aspect:.97,gazeX:0,gazeY:-3},thinking:{eyes:.66,body:.96,churn:5,churnSpeed:.6,dwell:.5,breathe:1.3,float:1.4,blink:.8,lean:7,aspect:1.04,gazeX:-9,gazeY:-8},delegating:{eyes:.9,body:.98,churn:0,churnSpeed:0,dwell:2.2,breathe:.6,float:.5,blink:1.3,lean:-6,aspect:1,gazeX:15,gazeY:2},speaking:{eyes:.95,body:1,churn:2.5,churnSpeed:3,dwell:4,breathe:.4,float:.5,blink:1.2,lean:0,aspect:1,gazeX:0,gazeY:0}},F=Array(e.SPECTRUM_BANDS).fill(0);function G(){let a=Math.random();return a<.15?180+320*Math.random():a<.8?1200+2300*Math.random():3500+2800*Math.random()}let H=new Map,I=-1,J=a=>({color:a?.color,shape:a?.shape,outline:a?.outline,paint:a?.paint});function K(a){if("number"==typeof a)return a;let b=0x811c9dc5;for(let c=0;c<a.length;c++)b=Math.imul(b^a.charCodeAt(c),0x1000193);return(b>>>0)%1e4}function L({size:a=32,seed:m,color:n,shape:o,outline:s,paint:t,notify:y,crossed:z,state:A="idle",getSpectrum:J,options:M,className:N}){var O;let P=(0,c.useId)(),Q=(0,c.useMemo)(()=>({...r,...M,...void 0===s?{}:{fill:!s}}),[M,s]),R=`${P}-mask`,S=`${P}-paint`,T=`${P}-curtain`,U=(0,c.useRef)(null),V=(0,c.useRef)(null),W=(0,c.useRef)(null),X=(0,c.useRef)(null),Y=(0,c.useRef)(null),Z=(0,c.useRef)(null),$=(0,c.useRef)(null),_=(0,c.useRef)(null),aa=(0,c.useRef)([]),ab=(0,c.useRef)(null),ac=(0,c.useRef)(null),ad=(0,c.useRef)(null),ae=(0,c.useRef)(null),af=void 0===m?Q.seed:K(m),ag=o??Q.shape,ah=(0,g.markInk)(n??Q.color,(0,d.useIsDark)()),ai=y??Q.notify,aj=t?g.MARK_PAINTS[t]:null,ak=l((a-14)/98,0,1),al=aj?"edge"in aj?aj.edge:null:(function(a){let b=/^#([0-9a-f]{6})$/i.exec(a);if(!b)return null;let c=a=>{let c=Number.parseInt(b[1].slice(a,a+2),16)/255;return c<=.04045?c/12.92:((c+.055)/1.055)**2.4};return .2126*c(0)+.7152*c(2)+.0722*c(4)}(ah)??1)<.06?"dark":null,am=(0,c.useMemo)(()=>u(Q,ag,af),[Q,ag,af]),an=(0,c.useMemo)(()=>p(am),[am]),ao=(0,c.useMemo)(()=>q({len:Q.eyeLen,width:Q.eyeWidth,bend:Q.eyeBend,taper:Q.eyeTaper,tilt:Q.eyeTilt,cx:120-Q.eyeGap/2,cy:Q.eyeY}),[Q]),ap=(0,c.useMemo)(()=>q({len:Q.eyeLen,width:Q.eyeWidth,bend:Q.eyeBend,taper:Q.eyeTaper,tilt:Q.eyeTilt+Q.eyeSkew,cx:120+Q.eyeGap/2,cy:Q.eyeY}),[Q]),aq=aj?.look??null,ar=!!z,as=(0,c.useRef)({cfg:Q,state:A,getSpectrum:J,radii:am,shapeSeed:af,look:aq,crossed:ar,grow:ak});as.current={cfg:Q,state:A,getSpectrum:J,radii:am,shapeSeed:af,look:aq,crossed:ar,grow:ak},(0,c.useEffect)(()=>{let a=0,b=as.current.shapeSeed%17*.91,c=0,d=0,f=performance.now()+600+G(),g=0,i=130,j=0,m=(0,e.createVoiceFollower)(),n={...E.idle},o=Object.keys(n),q=0,r=0,s=.5,t=0,u=0,y=0,z=Array(e.SPECTRUM_BANDS).fill(0),A=Array.from({length:e.SPECTRUM_BANDS},(a,b)=>1.7*b),J=0,K=performance.now(),L=null,M=performance.now()+1500+3e3*Math.random(),N=null,O=P=>{a=requestAnimationFrame(O);let{cfg:Q,state:R}=as.current,S=P/1e3*Q.speed,T=(Q.follow,null);N&&N!==T&&H.delete(N),N=T;let ae=T?function(a,b){if(b!==I)for(let a of(I=b,H.keys()))H.set(a,a.getBoundingClientRect());let c=H.get(a);return c||(c=a.getBoundingClientRect(),H.set(a,c)),c}(T,P):null,af=Math.min(.05,(P-K)/1e3);K=P;let ag=E[R];for(let a of o)n[a]+=(ag[a]-n[a])*.06;J+=af*n.churnSpeed*Q.speed;let ah="speaking"===R?as.current.getSpectrum?.():void 0,ai=m.read(ah??F,af),aj=0;for(let a=0;a<e.SPECTRUM_BANDS;a++){let b=ai.bands[a];z[a]+=(b-z[a])*Q.bandEase,A[a]+=af*(.05+.018*a)*(a%2?-1:1),aj+=b}let ak="speaking"===R?l(ai.level,0,1):0;q+=(ak-q)*.3,r+=(ak-r)*.016,ai.onset>0&&P-y>340&&(y=P,u-=Q.punch*Math.min(1,1.6*q)*Q.bobRate);let al=.01*Q.bobRate*Q.bobRate;if(u+=-t*al-.085*u*Q.bobRate,t+=u,aj>.04){let a=0;for(let b=0;b<e.SPECTRUM_BANDS;b++)a+=z[b]*b;s+=(a/aj/(e.SPECTRUM_BANDS-1)-s)*.04}else s+=(.5-s)*.03;let am=n.dwell;if(Q.idle&&!L&&P>=M){let a=function(a){let b=D[a],c=a=>B[a].weight*(b[a]??1),d=0;for(let a of C)d+=c(a);let e=Math.random()*d;for(let a of C)if((e-=c(a))<=0)return a;return C[0]}(R),b=B[a],c=Math.PI/4*Math.floor(8*Math.random());L={key:a,start:P,dur:b.dur[0]+Math.random()*(b.dur[1]-b.dur[0]),dx:Math.cos(c),dy:.7*Math.sin(c)-.5*("thinking"===R)}}let an=x;if(L){let a=(P-L.start)/L.dur;a>=1?(L=null,M=P+(9e3-74*Q.liveliness)*am*(.6+.8*Math.random())):(an={...x,...B[L.key].play(a,L.dx,L.dy)}).blinkIn>0&&0===j&&(j=P+an.blinkIn)}if(U.current){let a=Q.breathe*n.breathe/100,c=r*Q.pulse/300-.05*t,d=(.45-s)/.45*r*(Q.stretch/100),e=(1+a*Math.sin(1.6*S+b)-.75*c+d)*n.body*an.scale/n.aspect,f=(1+c-.8*d)*n.body*an.scale*n.aspect,g=25*a*Math.sin(1.1*S+1.7*b)+an.rot+n.lean,h=120+90*a*Math.sin(.7*S+.6*b)+an.bodyX,i=120+120*a*Math.sin(1.3*S+2.3*b)+an.bodyY+t*Q.pulse*2;U.current.setAttribute("transform",`translate(${k(h)} ${k(i)}) rotate(${k(g)}) scale(${f.toFixed(4)} ${e.toFixed(4)}) translate(${-120} ${-120})`)}let ao=as.current.look;if(ao){let a=P/1e3,b=as.current.grow;if("flow"===ao)_.current?.setAttribute("gradientTransform",`rotate(-35 120 120) translate(${k(-(a/3.6%1)*v(b))} 0)`);else if("aurora"===ao)for(let[b,c]of w.entries()){let d=.5-.5*Math.cos(a/c.period*h);aa.current[b]?.setAttribute("transform",`translate(${k(c.sway*d)} 0) translate(${c.cx} 91) skewX(${k(20*d-10)}) scale(1 ${k(1+.18*d)}) translate(${-c.cx} -91)`)}}let ap=(z[0]+z[1]+z[2])/3,aq=(z[3]+z[4])/2,ar=(z[5]+z[6]+z[7])/3,at=ap+aq+ar>.03&&Q.ripple>0,au=n.churn>0;if(W.current&&(at||au)){let a=J,c=p(as.current.radii.map((c,d)=>{let e=d/128*h,f=c;return at&&(f+=Q.ripple*(ap*Math.sin(2*e+A[0])+.7*aq*Math.sin(3*e+A[1])+.5*ar*Math.sin(4*e+A[2]))),au&&(f+=n.churn*(.65*Math.sin(2*e+a)+.35*Math.sin(3*e-1.4*a+b))),f}));W.current.setAttribute("d",c),X.current?.setAttribute("d",c),$.current?.setAttribute("d",c)}if(V.current){let a=0,e=0;ae&&ae.width>0&&(a=l((0-(ae.left+ae.width/2))/(1.5*ae.width),-1,1)*Q.gazeRange,e=l((0-(ae.top+ae.height/2))/(1.5*ae.height),-1,1)*Q.gazeRange),c+=(a-c)*.12,d+=(e-d)*.12;let h=Q.float*n.float*(.62*Math.sin(1.15*S+b)+.38*Math.sin(.47*S+2.1*b)),m=1;if(0===g&&!as.current.crossed&&(j>0&&P>=j?(g=P,j=0):Q.blink&&P>=f&&(g=P),g>0&&(i=110+60*Math.random())),g>0){let a=(P-g)/i;a>=1?(g=0,f=P+G()*n.blink):m=1-.94*Math.sin(Math.PI*a)}let o=`translate(${k(c+an.eyeX+n.gazeX)} ${k(d+h+an.eyeY+n.gazeY)}) translate(120 ${Q.eyeY}) scale(1 ${m.toFixed(3)}) translate(${-120} ${-Q.eyeY})`;V.current.setAttribute("transform",o),ab.current?.setAttribute("transform",o);let p=an.eyeWid*(1-.13*r)*n.eyes,q=an.eyeLen*(1+.04*r)*n.eyes,s=Q.eyeGap/2;for(let[a,b]of[Y,Z].entries()){if(!b.current)continue;let c=120+(0===a?-s:s),d=0===a?Q.eyeTilt:Q.eyeTilt+Q.eyeSkew,e=q.toFixed(3),f=p.toFixed(3),g=`translate(${k(c)} ${Q.eyeY}) rotate(${k(d)}) scale(${e} ${f}) rotate(${k(-d)}) translate(${k(-c)} ${-Q.eyeY})`;b.current.setAttribute("transform",g),(0===a?ac:ad).current?.setAttribute("transform",g)}}};return a=requestAnimationFrame(O),()=>{cancelAnimationFrame(a),N&&H.delete(N)}},[]);let at=Q.notifyAngle*Math.PI/180,au=aj?`url(#${S})`:"var(--fg)",av=k(18-3*ak),aw=k(22-9*ak),ax=(a,c,d)=>ar?(0,b.jsx)("path",{d:`M${c-av} ${Q.eyeY-av}L${c+av} ${Q.eyeY+av}M${c+av} ${Q.eyeY-av}L${c-av} ${Q.eyeY+av}`,fill:"none",stroke:d,strokeWidth:aw,strokeLinecap:"round"}):(0,b.jsx)("path",{d:a,fill:d});return(0,b.jsxs)("svg",{ref:ae,"data-slot":"bot-mark","aria-hidden":"true",className:N,viewBox:j,width:a,height:a,style:{overflow:"visible","--fg":ah},children:[(0,b.jsxs)("defs",{children:[(0,b.jsx)("clipPath",{id:P,children:(0,b.jsx)("path",{ref:X,d:an})}),Q.fill&&(0,b.jsxs)("mask",{id:R,maskUnits:"userSpaceOnUse",children:[(0,b.jsx)("path",{ref:$,d:an,fill:"#fff"}),(0,b.jsx)("g",{clipPath:`url(#${P})`,children:(0,b.jsxs)("g",{ref:V,children:[(0,b.jsx)("g",{ref:Y,children:ax(ao,120-Q.eyeGap/2,"#000")}),(0,b.jsx)("g",{ref:Z,children:ax(ap,120+Q.eyeGap/2,"#000")})]})}),ai&&(0,b.jsx)("circle",{cx:k(120+Math.cos(at)*Q.notifyDist),cy:k(120+Math.sin(at)*Q.notifyDist),r:Q.notifyR+Q.notifyRing,fill:"#000",className:i})]}),aj&&(0,b.jsx)("linearGradient",{ref:_,id:S,...(O=aj.look,"flow"===O?{gradientUnits:"userSpaceOnUse",x1:0,y1:0,x2:v(ak),y2:0,spreadMethod:"repeat"}:{gradientUnits:"userSpaceOnUse",x1:0,y1:0,x2:240*("duo"===O),y2:240}),children:(function({look:a,colors:b}){let c="aurora"===a?b.slice(0,2):b;return c.map((a,b)=>({offset:b/(c.length-1),color:a}))})(aj).map(a=>(0,b.jsx)("stop",{offset:a.offset,stopColor:a.color},`${a.offset}-${a.color}`))}),aj?.look==="aurora"&&(0,b.jsx)("filter",{id:T,filterUnits:"userSpaceOnUse",x:-72,y:-72,width:384,height:384,colorInterpolationFilters:"sRGB",children:(0,b.jsx)("feGaussianBlur",{stdDeviation:k(34-12*ak)})})]}),(0,b.jsxs)("g",{ref:U,children:[Q.fill?(0,b.jsxs)("g",{mask:`url(#${R})`,children:[(0,b.jsx)("path",{ref:W,d:an,fill:au}),aj?.look==="aurora"&&(0,b.jsxs)("g",{filter:`url(#${T})`,children:[(0,b.jsx)("rect",{x:-72,y:-72,width:384,height:384,fill:au}),w.map((a,c)=>(0,b.jsx)("ellipse",{ref:a=>{aa.current[c]=a},cx:a.cx,cy:91,rx:k(60-29*ak),ry:138,fill:aj.colors[2+c],style:{mixBlendMode:"screen"}},a.cx))]})]}):(0,b.jsx)("path",{ref:W,d:an,fill:"none",stroke:au,strokeWidth:Q.strokeWidth,strokeLinejoin:"round"}),Q.fill&&"dark"===al&&(0,b.jsx)("g",{clipPath:`url(#${P})`,opacity:.92,children:(0,b.jsxs)("g",{ref:ab,children:[(0,b.jsx)("g",{ref:ac,children:ax(ao,120-Q.eyeGap/2,"#fff")}),(0,b.jsx)("g",{ref:ad,children:ax(ap,120+Q.eyeGap/2,"#fff")})]})}),!Q.fill&&(0,b.jsx)("g",{clipPath:`url(#${P})`,children:(0,b.jsxs)("g",{ref:V,children:[(0,b.jsx)("g",{ref:Y,children:ax(ao,120-Q.eyeGap/2,au)}),(0,b.jsx)("g",{ref:Z,children:ax(ap,120+Q.eyeGap/2,au)})]})}),ai&&(0,b.jsx)("circle",{cx:k(120+Math.cos(at)*Q.notifyDist),cy:k(120+Math.sin(at)*Q.notifyDist),r:Q.notifyR,className:(0,f.cn)("fill-waiting",i)})]})]})}a.s(["BotMark",0,L,"BotsMark",0,function({size:a=16,className:c}){return(0,b.jsx)(L,{size:a,seed:"bots",className:c})},"iconProps",0,J,"markAtRest",0,function(a){let b=(a,b)=>q({len:r.eyeLen,width:r.eyeWidth,bend:r.eyeBend,taper:r.eyeTaper,tilt:b,cx:a,cy:r.eyeY});return{head:p(u(r,r.shape,K(a))),eyes:[b(120-r.eyeGap/2,r.eyeTilt),b(120+r.eyeGap/2,r.eyeTilt+r.eyeSkew)]}},"markOf",0,(a,b)=>J(b?.find(b=>b.name===a)?.icon)])},324835,a=>{"use strict";let b="currentColor",c=[{id:"system",label:"System",value:b},{id:"slate",label:"Slate",value:"#64748B"},{id:"indigo",label:"Indigo",value:"#6366F1"},{id:"blue",label:"Blue",value:"#3B82F6"},{id:"cyan",label:"Cyan",value:"#06B6D4"},{id:"teal",label:"Teal",value:"#14B8A6"},{id:"green",label:"Green",value:"#22C55E"},{id:"lime",label:"Lime",value:"#84CC16"},{id:"amber",label:"Amber",value:"#F59E0B"},{id:"orange",label:"Orange",value:"#F97316"},{id:"red",label:"Red",value:"#EF4444"},{id:"pink",label:"Pink",value:"#EC4899"},{id:"violet",label:"Violet",value:"#8B5CF6"},{id:"fuchsia",label:"Fuchsia",value:"#D946EF"},{id:"rose",label:"Rose",value:"#F43F5E"},{id:"sky",label:"Sky",value:"#0EA5E9"},{id:"emerald",label:"Emerald",value:"#10B981"},{id:"yellow",label:"Yellow",value:"#EAB308"},{id:"stone",label:"Stone",value:"#78716C"}],d=Object.fromEntries(c.map(a=>[a.id,a.value])),e=c.filter(a=>a.value!==b).map(a=>a.value),f=[d.amber,d.red],g={[d.cyan]:"#009dbb",[d.teal]:"#00a190",[d.green]:"#00a640",[d.lime]:"#5ca100",[d.amber]:"#d07b00",[d.orange]:"#ec6700",[d.sky]:"#0098dc",[d.emerald]:"#00a46d",[d.yellow]:"#bb8600"},h={rainbow:{label:"Rainbow",look:"flow",colors:[0,45,90,140,190,240,290,330,360].map(a=>`oklch(0.77 0.16 ${a})`)},duo:{label:"Duo",look:"duo",colors:["#818CF8","#F472B6"]},aurora:{label:"Aurora",look:"aurora",edge:"dark",colors:["#1a2f73","#2c56c9","#34d399","#22d3ee","#a7f3d0"]},"aurora-pink":{label:"Pink aurora",look:"aurora",edge:"dark",colors:["#3a1478","#7c3aed","#f472b6","#e879f9","#fbcfe8"]}},i=Object.keys(h);a.s(["MARK_PAINTS",0,h,"MARK_PAINT_IDS",0,i,"MARK_PALETTE",0,e,"MARK_SHAPES",0,["blob","poly","squircle","heart"],"MARK_SYSTEM",0,b,"markInk",0,(a,b)=>b?a:g[a]??a,"paintSwatch",0,function(a){let{look:b,colors:c}=h[a];return"aurora"===b?`radial-gradient(circle at 35% 30%, ${c[2]}, transparent 70%), linear-gradient(180deg, ${c[0]}, ${c[1]})`:`linear-gradient(135deg, ${c.join(", ")})`},"randomMarkFills",0,function(a){let b=[...e.filter(a=>!f.includes(a)).map(a=>({color:a})),...i.map(a=>({paint:a}))];for(let a=b.length-1;a>0;a--){let c=Math.floor(Math.random()*(a+1));[b[a],b[c]]=[b[c],b[a]]}return b.slice(0,a)}])}];
2
-
3
- //# sourceMappingURL=features_bot_1s_-2vj._.js.map