thursday-agent 0.3.0 → 0.5.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 (253) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +3 -3
  3. package/.next/prerender-manifest.json +3 -3
  4. package/.next/server/app/_global-error/page.js.nft.json +1 -1
  5. package/.next/server/app/_global-error.html +1 -1
  6. package/.next/server/app/_global-error.rsc +1 -1
  7. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  8. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  10. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  11. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  12. package/.next/server/app/_not-found.html +1 -1
  13. package/.next/server/app/_not-found.rsc +2 -2
  14. package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  15. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  16. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  17. package/.next/server/app/api/artifact/route.js +4 -4
  18. package/.next/server/app/api/artifact/route.js.nft.json +1 -1
  19. package/.next/server/app/api/bot/memory/files/route.js +3 -3
  20. package/.next/server/app/api/bot/memory/files/route.js.nft.json +1 -1
  21. package/.next/server/app/api/bot/memory/route.js.nft.json +1 -1
  22. package/.next/server/app/api/bot/route.js.nft.json +1 -1
  23. package/.next/server/app/api/bot/task/[id]/route.js +8 -8
  24. package/.next/server/app/api/bot/task/[id]/route.js.nft.json +1 -1
  25. package/.next/server/app/api/bot/task/route.js +6 -6
  26. package/.next/server/app/api/bot/task/route.js.nft.json +1 -1
  27. package/.next/server/app/api/config/route.js.nft.json +1 -1
  28. package/.next/server/app/api/events/route.js.nft.json +1 -1
  29. package/.next/server/app/api/file/[...path]/route.js +4 -4
  30. package/.next/server/app/api/file/[...path]/route.js.nft.json +1 -1
  31. package/.next/server/app/api/llm-model/catalog/route.js +2 -2
  32. package/.next/server/app/api/llm-model/catalog/route.js.nft.json +1 -1
  33. package/.next/server/app/api/llm-model/credits/route.js +2 -2
  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 +2 -2
  36. package/.next/server/app/api/llm-model/route.js.nft.json +1 -1
  37. package/.next/server/app/api/llm-model/subscription/route.js +2 -2
  38. package/.next/server/app/api/llm-model/subscription/route.js.nft.json +1 -1
  39. package/.next/server/app/api/mcp/[name]/route.js.nft.json +1 -1
  40. package/.next/server/app/api/mcp/oauth/callback/route.js.nft.json +1 -1
  41. package/.next/server/app/api/mcp/route.js.nft.json +1 -1
  42. package/.next/server/app/api/mcp/tools/route.js.nft.json +1 -1
  43. package/.next/server/app/api/memory/edit/route.js +11 -11
  44. package/.next/server/app/api/memory/edit/route.js.nft.json +1 -1
  45. package/.next/server/app/api/memory/route.js.nft.json +1 -1
  46. package/.next/server/app/api/skills/[source]/[name]/route.js.nft.json +1 -1
  47. package/.next/server/app/api/skills/route.js.nft.json +1 -1
  48. package/.next/server/app/api/thursday/call/route.js +6 -6
  49. package/.next/server/app/api/thursday/call/route.js.nft.json +1 -1
  50. package/.next/server/app/api/thursday/skills/route.js +6 -6
  51. package/.next/server/app/api/thursday/skills/route.js.nft.json +1 -1
  52. package/.next/server/app/api/thursday/tool-call/route.js +8 -8
  53. package/.next/server/app/api/thursday/tool-call/route.js.nft.json +1 -1
  54. package/.next/server/app/api/workspace/route.js +3 -2
  55. package/.next/server/app/api/workspace/route.js.nft.json +1 -1
  56. package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +1 -1
  57. package/.next/server/app/artifact/[...path]/page.js +2 -2
  58. package/.next/server/app/artifact/[...path]/page.js.nft.json +1 -1
  59. package/.next/server/app/artifact/[...path]/page_client-reference-manifest.js +1 -1
  60. package/.next/server/app/favicon.ico/route.js.nft.json +1 -1
  61. package/.next/server/app/page/server-reference-manifest.json +40 -40
  62. package/.next/server/app/page.js +3 -3
  63. package/.next/server/app/page.js.nft.json +1 -1
  64. package/.next/server/app/page_client-reference-manifest.js +1 -1
  65. package/.next/server/chunks/[root-of-the-server]__026u77e._.js +5 -0
  66. package/.next/server/chunks/[root-of-the-server]__02va5wz._.js +1 -1
  67. package/.next/server/chunks/{[root-of-the-server]__02xjoto._.js → [root-of-the-server]__050zri4._.js} +1 -1
  68. package/.next/server/chunks/[root-of-the-server]__0bg9710._.js +3 -0
  69. package/.next/server/chunks/[root-of-the-server]__0in-d5s._.js +3 -0
  70. package/.next/server/chunks/[root-of-the-server]__0ncs9uu._.js +1 -1
  71. package/.next/server/chunks/[root-of-the-server]__0pa9k-f._.js +8 -0
  72. package/.next/server/chunks/[root-of-the-server]__0qi_m0e._.js +8 -0
  73. package/.next/server/chunks/[root-of-the-server]__0tq0m_k._.js +3 -0
  74. package/.next/server/chunks/[root-of-the-server]__0xep6j_._.js +3 -0
  75. package/.next/server/chunks/[root-of-the-server]__1-ga0kh._.js +2 -2
  76. package/.next/server/chunks/[root-of-the-server]__144l7qt._.js +8 -0
  77. package/.next/server/chunks/[root-of-the-server]__1_04mcf._.js +2 -2
  78. package/.next/server/chunks/[root-of-the-server]__1anc1p9._.js +1 -1
  79. package/.next/server/chunks/[root-of-the-server]__1jg8t86._.js +8 -0
  80. package/.next/server/chunks/{[root-of-the-server]__12cabg9._.js → [root-of-the-server]__1lldzy9._.js} +1 -1
  81. package/.next/server/chunks/[root-of-the-server]__1orn-5b._.js +4 -3
  82. package/.next/server/chunks/{[root-of-the-server]__01dkp4a._.js → [root-of-the-server]__1peqvsi._.js} +1 -1
  83. package/.next/server/chunks/[root-of-the-server]__1w8gm5h._.js +10 -0
  84. package/.next/server/chunks/[root-of-the-server]__1xt39nn._.js +8 -0
  85. package/.next/server/chunks/[root-of-the-server]__1zb8mfo._.js +8 -0
  86. package/.next/server/chunks/_0-fjql4._.js +11 -6
  87. package/.next/server/chunks/_00xh_q0._.js +4 -6
  88. package/.next/server/chunks/_05h2cii._.js +1 -1
  89. package/.next/server/chunks/{_1_9mjx-._.js → _091bi8d._.js} +1 -1
  90. package/.next/server/chunks/_0fzqt2y._.js +57 -45
  91. package/.next/server/chunks/{_0u4aiy2._.js → _0lr92vd._.js} +1 -1
  92. package/.next/server/chunks/_0mecv0f._.js +11 -6
  93. package/.next/server/chunks/_0mh8j4m._.js +1 -1
  94. package/.next/server/chunks/{_0sbynis._.js → _0si7xzn._.js} +1 -1
  95. package/.next/server/chunks/_0wp4le3._.js +1 -1
  96. package/.next/server/chunks/_0y5fg-x._.js +1 -1
  97. package/.next/server/chunks/_1230wbx._.js +5 -5
  98. package/.next/server/chunks/_15hq89o._.js +1 -1
  99. package/.next/server/chunks/{_0obojvv._.js → _18d7-5p._.js} +1 -1
  100. package/.next/server/chunks/{_03kp0jp._.js → _1c78vw5._.js} +71 -61
  101. package/.next/server/chunks/_1d0j961._.js +2 -2
  102. package/.next/server/chunks/_1j8k_j5._.js +1 -1
  103. package/.next/server/chunks/_1krd9rf._.js +1 -1
  104. package/.next/server/chunks/_1php4eq._.js +1 -1
  105. package/.next/server/chunks/{_03a0897._.js → _1zkfbaa._.js} +1 -1
  106. package/.next/server/chunks/config_ts_1g4sz5o._.js +1 -1
  107. package/.next/server/chunks/features_1qf3cei._.js +6 -1
  108. package/.next/server/chunks/features_memory_1uqvksn._.js +2 -2
  109. package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0r28-sm._.js → node_modules_consola_dist_chunks_prompt_mjs_17k8irj._.js} +1 -1
  110. package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_1xoq2rl._.js → node_modules_consola_dist_chunks_prompt_mjs_1jidylq._.js} +1 -1
  111. package/.next/server/chunks/ssr/[root-of-the-server]__0-nob52._.js +4 -0
  112. package/.next/server/chunks/ssr/[root-of-the-server]__092knlj._.js +3 -0
  113. package/.next/server/chunks/ssr/{[root-of-the-server]__0_69wqr._.js → [root-of-the-server]__0s4wb56._.js} +1 -1
  114. package/.next/server/chunks/ssr/{[root-of-the-server]__1eh7hid._.js → [root-of-the-server]__0s9dq5u._.js} +1 -1
  115. package/.next/server/chunks/ssr/{[root-of-the-server]__0zkv7z_._.js → [root-of-the-server]__0sd3izg._.js} +2 -2
  116. package/.next/server/chunks/ssr/{[root-of-the-server]__1gtlw6v._.js → [root-of-the-server]__1-13tcn._.js} +3 -3
  117. package/.next/server/chunks/ssr/[root-of-the-server]__10-dz5o._.js +13 -9
  118. package/.next/server/chunks/ssr/[root-of-the-server]__1mzi-ju._.js +1 -1
  119. package/.next/server/chunks/ssr/{[root-of-the-server]__1cyjywu._.js → [root-of-the-server]__1zidpfl._.js} +1 -1
  120. package/.next/server/chunks/ssr/_001_ms1._.js +6 -1
  121. package/.next/server/chunks/ssr/{_07uchnc._.js → _04z2c7b._.js} +2 -2
  122. package/.next/server/chunks/ssr/{_0kbkmar._.js → _06tssji._.js} +2 -2
  123. package/.next/server/chunks/ssr/_0fk4c7d._.js +3 -0
  124. package/.next/server/chunks/ssr/_0i_6q1w._.js +2 -2
  125. package/.next/server/chunks/ssr/{_1xvgn77._.js → _0m2lsd1._.js} +2 -2
  126. package/.next/server/chunks/ssr/_0mggveb._.js +3 -0
  127. package/.next/server/chunks/ssr/_0nbpc_8._.js +3 -0
  128. package/.next/server/chunks/ssr/{_0y0tiht._.js → _0rzucul._.js} +3 -3
  129. package/.next/server/chunks/ssr/{_0mb8zc8._.js → _0s99bgb._.js} +2 -2
  130. package/.next/server/chunks/ssr/_0zcjrbg._.js +3 -0
  131. package/.next/server/chunks/ssr/_1-teee5._.js +4 -4
  132. package/.next/server/chunks/ssr/{_0c-ql2m._.js → _11j92tu._.js} +2 -2
  133. package/.next/server/chunks/ssr/_13fke0x._.js +1 -1
  134. package/.next/server/chunks/ssr/{_01_6m32._.js → _1ebxla1._.js} +2 -2
  135. package/.next/server/chunks/ssr/_1jdgjv9._.js +3 -0
  136. package/.next/server/chunks/ssr/{_0u2jv_x._.js → _1lz_cq2._.js} +60 -50
  137. package/.next/server/chunks/ssr/{_20kd_n0._.js → _1nj4niv._.js} +3 -3
  138. package/.next/server/chunks/ssr/_1ovmc9s._.js +3 -0
  139. package/.next/server/chunks/ssr/_1sji22n._.js +1 -1
  140. package/.next/server/chunks/ssr/_1vyd1ji._.js +1 -1
  141. package/.next/server/chunks/ssr/features_config_components_config-setting_tsx_0xfwqdg._.js +1 -1
  142. package/.next/server/chunks/ssr/features_connectors_components_mcp-setting_tsx_0jmbgvp._.js +1 -1
  143. package/.next/server/chunks/ssr/{node_modules_1-hc6uv._.js → node_modules_0-dr_o7._.js} +1 -1
  144. package/.next/server/chunks/ssr/{node_modules_124bue5._.js → node_modules_04sksn9._.js} +1 -1
  145. package/.next/server/chunks/ssr/{node_modules_1uuj9x1._.js → node_modules_05-n6dz._.js} +1 -1
  146. package/.next/server/chunks/ssr/{node_modules_1i7u1ia._.js → node_modules_056qgf-._.js} +1 -1
  147. package/.next/server/chunks/ssr/{node_modules_0lm7_vm._.js → node_modules_07dsgkx._.js} +1 -1
  148. package/.next/server/chunks/ssr/{node_modules_1h4a4pp._.js → node_modules_0bvopy2._.js} +1 -1
  149. package/.next/server/chunks/ssr/{node_modules_1bc7gu8._.js → node_modules_0fkeku3._.js} +1 -1
  150. package/.next/server/chunks/ssr/{node_modules_0h50b8n._.js → node_modules_0ifp389._.js} +1 -1
  151. package/.next/server/chunks/ssr/{node_modules_0zp9r92._.js → node_modules_0iur59s._.js} +1 -1
  152. package/.next/server/chunks/ssr/{node_modules_063xwpp._.js → node_modules_0m383r2._.js} +1 -1
  153. package/.next/server/chunks/ssr/{node_modules_1bgb6-f._.js → node_modules_0u9da1h._.js} +1 -1
  154. package/.next/server/chunks/ssr/{node_modules_0bvraul._.js → node_modules_0zeg3x_._.js} +1 -1
  155. package/.next/server/chunks/ssr/{node_modules_1t9cyee._.js → node_modules_1-y7nni._.js} +1 -1
  156. package/.next/server/chunks/ssr/{node_modules_1_n3ztw._.js → node_modules_16mkxuo._.js} +1 -1
  157. package/.next/server/chunks/ssr/{node_modules_0eu1va6._.js → node_modules_1a0kmjl._.js} +1 -1
  158. package/.next/server/chunks/ssr/{node_modules_0z5tsu8._.js → node_modules_1chvq5f._.js} +1 -1
  159. package/.next/server/chunks/ssr/{node_modules_0h7u60n._.js → node_modules_1j8j4pt._.js} +1 -1
  160. package/.next/server/chunks/ssr/{node_modules_0rjg6t1._.js → node_modules_1k6n600._.js} +1 -1
  161. package/.next/server/chunks/ssr/{node_modules_1xx28h1._.js → node_modules_1k7z2j6._.js} +1 -1
  162. package/.next/server/chunks/ssr/{node_modules_0h5hnr1._.js → node_modules_1k8j8n0._.js} +1 -1
  163. package/.next/server/chunks/ssr/{node_modules_0mwym0g._.js → node_modules_1lz0oxc._.js} +1 -1
  164. package/.next/server/chunks/ssr/{node_modules_1vqb6po._.js → node_modules_1t77e4n._.js} +1 -1
  165. package/.next/server/chunks/ssr/{node_modules_1l0qtdu._.js → node_modules_1uyk91w._.js} +1 -1
  166. package/.next/server/chunks/ssr/{node_modules_0y_cded._.js → node_modules_1x0ztf4._.js} +1 -1
  167. package/.next/server/chunks/ssr/{node_modules_113tz0l._.js → node_modules_1y79i83._.js} +1 -1
  168. package/.next/server/chunks/ssr/{node_modules_1juq3hs._.js → node_modules_20c28js._.js} +1 -1
  169. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0d3skpl._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0bkwd0u._.js} +1 -1
  170. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0i44kk5._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0p9a9su._.js} +1 -1
  171. package/.next/server/chunks/ssr/{node_modules_@vercel_oidc_dist_0qe30a_._.js → node_modules_@vercel_oidc_dist_1o553h-._.js} +1 -1
  172. package/.next/server/middleware-build-manifest.js +3 -3
  173. package/.next/server/pages/404.html +1 -1
  174. package/.next/server/pages/500.html +1 -1
  175. package/.next/server/server-reference-manifest.js +1 -1
  176. package/.next/server/server-reference-manifest.json +41 -41
  177. package/.next/static/chunks/{17donp69y4do7.js → 0n3jle9kbqfr2.js} +8 -8
  178. package/.next/static/chunks/{3ok9_x74rip3v.js → 11r2yp_yh9_qn.js} +1 -1
  179. package/.next/static/chunks/{26-pr2c9ro222.js → 126fj4pga_72k.js} +1 -1
  180. package/.next/static/chunks/{2a0k6jlq0_v1u.js → 159udiexf6dom.js} +2 -2
  181. package/.next/static/chunks/18gi7o2ibrgh8.js +3 -0
  182. package/.next/static/chunks/{0x79tx04dxbpp.js → 1q9z1tohil7xn.js} +1 -1
  183. package/.next/static/chunks/{3cfi_q6d_wtci.js → 1sjgfets224re.js} +1 -1
  184. package/.next/static/chunks/{3agpgkwaa321p.js → 1wszsr83t01gh.js} +1 -1
  185. package/.next/static/chunks/22_zkas21rpna.js +1 -0
  186. package/.next/static/chunks/{1ekc7ul556kbl.js → 2szintyibu0s5.js} +1 -1
  187. package/.next/static/chunks/{1okqiww3pnwka.js → 3-b6b7entqazs.js} +1 -1
  188. package/.next/static/chunks/3cq5g494yuke8.css +1 -0
  189. package/.next/static/chunks/{2fzs9fm8yarvq.js → 3dmbhsv2u_8kj.js} +1 -1
  190. package/.next/static/chunks/{1grhjo7a5a0_-.js → 3i0a5px-oufgc.js} +1 -1
  191. package/.next/static/chunks/{280t0_e99i276.js → 3wexk9qo8zuj3.js} +3 -3
  192. package/.next/static/chunks/3xre8bu_pk1p_.js +1 -0
  193. package/.next/static/chunks/3zv6t3i77xhr_.js +1 -0
  194. package/.next/static/chunks/{28cizcdaabd4h.js → 408ueu4hfvcg7.js} +1 -1
  195. package/.next/static/chunks/{3xpbkl66ssib5.js → 435atsnhs7ksu.js} +8 -8
  196. package/README.md +46 -23
  197. package/app/api/events/app-event.ts +0 -2
  198. package/bin/port.mjs +65 -0
  199. package/bin/thursday.mjs +2 -33
  200. package/docs/how-it-works.md +11 -7
  201. package/docs/images/face-dark.png +0 -0
  202. package/docs/images/face-light.png +0 -0
  203. package/docs/images/keeps-going.png +0 -0
  204. package/features/ai/chatgpt.ts +42 -20
  205. package/features/ai/load-tools.ts +20 -14
  206. package/features/ai/prompts/bot.prompt.ts +91 -89
  207. package/features/ai/prompts/thursday.prompt.ts +48 -41
  208. package/features/ai/tools/bot.tool.ts +3 -3
  209. package/features/ai/tools/memory.tool.ts +65 -62
  210. package/features/ai/tools/skills.tool.ts +25 -8
  211. package/features/ai/tools/tool-name.ts +0 -1
  212. package/features/ai/tools/workspace.tool.ts +3 -0
  213. package/features/bot/bot.action.ts +6 -1
  214. package/features/bot/bot.run.ts +195 -80
  215. package/features/bot/bot.runner.ts +82 -39
  216. package/features/bot/bot.schema.ts +25 -0
  217. package/features/bot/components/bot-room.tsx +57 -4
  218. package/features/bot/components/bot-tool.tsx +0 -1
  219. package/features/bot/task.query.ts +132 -10
  220. package/features/bot/task.store.ts +26 -9
  221. package/features/memory/components/memory-edit.tsx +7 -5
  222. package/features/thursday/components/thursday.tsx +0 -3
  223. package/features/thursday/tool-line.ts +0 -1
  224. package/features/thursday/use-thursday.ts +1 -1
  225. package/features/workspace/workspace.ts +27 -20
  226. package/package.json +1 -1
  227. package/skills/browser/SKILL.md +6 -5
  228. package/.next/server/chunks/[root-of-the-server]__04q--0f._.js +0 -8
  229. package/.next/server/chunks/[root-of-the-server]__0bl-e63._.js +0 -3
  230. package/.next/server/chunks/[root-of-the-server]__0jq4ohy._.js +0 -8
  231. package/.next/server/chunks/[root-of-the-server]__0ls6_8y._.js +0 -8
  232. package/.next/server/chunks/[root-of-the-server]__1339jnv._.js +0 -8
  233. package/.next/server/chunks/[root-of-the-server]__18_teo8._.js +0 -8
  234. package/.next/server/chunks/[root-of-the-server]__1ccon1w._.js +0 -10
  235. package/.next/server/chunks/[root-of-the-server]__1wa1k7r._.js +0 -8
  236. package/.next/server/chunks/_1zjrdag._.js +0 -3
  237. package/.next/server/chunks/ssr/[root-of-the-server]__1ox7hbk._.js +0 -4
  238. package/.next/server/chunks/ssr/[root-of-the-server]__1pduf5n._.js +0 -3
  239. package/.next/server/chunks/ssr/_0mo2w06._.js +0 -3
  240. package/.next/server/chunks/ssr/_13z3f85._.js +0 -3
  241. package/.next/server/chunks/ssr/_14_lw10._.js +0 -3
  242. package/.next/server/chunks/ssr/_1eoqg_g._.js +0 -3
  243. package/.next/server/chunks/ssr/_1spzm8z._.js +0 -3
  244. package/.next/server/chunks/ssr/lib_date-like_ts_02is0pw._.js +0 -3
  245. package/.next/static/chunks/0tmgrnlje14-s.js +0 -3
  246. package/.next/static/chunks/0xzgvc0fkdb6t.js +0 -1
  247. package/.next/static/chunks/14hgtsjg-kael.css +0 -1
  248. package/.next/static/chunks/2hw2f6zmt7fmt.js +0 -1
  249. package/.next/static/chunks/3111pj5wnjgos.js +0 -1
  250. package/features/memory/components/memory-view.tsx +0 -84
  251. /package/.next/static/{x1cCqY0kWpR_VcYx_lWO5 → G6-gNoyGDEcgAsq-L4PE1}/_buildManifest.js +0 -0
  252. /package/.next/static/{x1cCqY0kWpR_VcYx_lWO5 → G6-gNoyGDEcgAsq-L4PE1}/_clientMiddlewareManifest.js +0 -0
  253. /package/.next/static/{x1cCqY0kWpR_VcYx_lWO5 → G6-gNoyGDEcgAsq-L4PE1}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
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",skills:{default:"skills",custom:`${b}/.agents/skills`}};a.s(["APP_NAME",0,"Thursday","ARTIFACT_VIEW",0,{rows:200,setFiles:120},"ASCII_FACE",0,{charset:"emojiOnly",fontSize:{default:8,min:4,max:16},density:{default:1.4,min:.6,max:2}},"BOT_RUN",0,{steps:100,compactAt:5e5,compactHeadroom:.8,summaryWords:{min:600,max:3e3,perTokens:200},depth:2,askBack:3,silenceMs:3e5,autoResumes:3,retryAfterMs:[3e4,12e4,3e5],overflowShrink:.6,compactFiles:40},"BROWSER_SKILL",0,"browser","CALL_HISTORY_PAGE",0,10,"IS_DEV",0,!1,"PAGE_SIZE",0,50,"PATHS",0,c,"PROMPT_CROWDED",0,{bots:10,skills:20},"STUDIO_SERVER",0,"studio","WORKSPACE_VIEW",0,{rows:200,textMax:524288,elementMax:0x3200000}])},992025,a=>{a.v(a=>Promise.resolve().then(()=>a(948986)))},929490,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_1i7u1ia._.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_063xwpp._.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_0mwym0g._.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_1-hc6uv._.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_0bvraul._.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_1uuj9x1._.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_1vqb6po._.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_0z5tsu8._.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_0y_cded._.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_1t9cyee._.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_113tz0l._.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_1bc7gu8._.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_0i44kk5._.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_1_n3ztw._.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_063xwpp._.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)))}];
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",skills:{default:"skills",custom:`${b}/.agents/skills`}};a.s(["APP_NAME",0,"Thursday","ARTIFACT_VIEW",0,{rows:200,setFiles:120},"ASCII_FACE",0,{charset:"emojiOnly",fontSize:{default:8,min:4,max:16},density:{default:1.4,min:.6,max:2}},"BOT_RUN",0,{steps:100,compactAt:5e5,compactHeadroom:.8,summaryWords:{min:600,max:3e3,perTokens:200},depth:2,askBack:3,silenceMs:3e5,autoResumes:3,retryAfterMs:[3e4,12e4,3e5],overflowShrink:.6,compactFiles:40},"BROWSER_SKILL",0,"browser","CALL_HISTORY_PAGE",0,10,"IS_DEV",0,!1,"PAGE_SIZE",0,50,"PATHS",0,c,"PROMPT_CROWDED",0,{bots:10,skills:20},"STUDIO_SERVER",0,"studio","WORKSPACE_VIEW",0,{rows:200,textMax:524288,elementMax:0x3200000}])},992025,a=>{a.v(a=>Promise.resolve().then(()=>a(948986)))},929490,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_1k6n600._.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_0m383r2._.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_1lz0oxc._.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_0-dr_o7._.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_0zeg3x_._.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_05-n6dz._.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_1t77e4n._.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_1uyk91w._.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_1x0ztf4._.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_04sksn9._.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_0iur59s._.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_0fkeku3._.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_0p9a9su._.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_1k8j8n0._.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_0m383r2._.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
2
 
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__0zkv7z_._.js.map
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__0sd3izg._.js.map
@@ -1,4 +1,4 @@
1
- module.exports=[418520,a=>a.a(async(b,c)=>{try{var d=await a.y("@libsql/client-6da938047d5fc1cd");a.n(d),c()}catch(a){c(a)}},!0),500874,(a,b,c)=>{b.exports=a.x("buffer",()=>require("buffer"))},233405,(a,b,c)=>{b.exports=a.x("child_process",()=>require("child_process"))},522734,(a,b,c)=>{b.exports=a.x("fs",()=>require("fs"))},874533,(a,b,c)=>{b.exports=a.x("node:child_process",()=>require("node:child_process"))},666680,(a,b,c)=>{b.exports=a.x("node:crypto",()=>require("node:crypto"))},902157,(a,b,c)=>{b.exports=a.x("node:fs",()=>require("node:fs"))},912714,(a,b,c)=>{b.exports=a.x("node:fs/promises",()=>require("node:fs/promises"))},347299,(a,b,c)=>{b.exports=a.x("node:http",()=>require("node:http"))},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"))},509656,(a,b,c)=>{b.exports=a.x("node:tty",()=>require("node:tty"))},812057,(a,b,c)=>{b.exports=a.x("node:util",()=>require("node:util"))},446786,(a,b,c)=>{b.exports=a.x("os",()=>require("os"))},605365,(a,b,c)=>{b.exports=a.x("process",()=>require("process"))},762008,a=>{"use strict";a.s(["STUDIO_TOOLS",0,{generate_image:"generate_image",generate_speech:"generate_speech",transcribe:"transcribe",generate_video:"generate_video"},"TOOL_NAMES",0,{memory_recall:"memory_recall",memory_remember:"memory_remember",memory_forget:"memory_forget",memory_show:"memory_show",memory_conversation:"memory_conversation",bash:"bash",write_file:"write_file",tool_search:"tool_search",tool_call:"tool_call",load_skill:"load_skill",web_search:"web_search",delegate:"delegate",task:"task",ask_bot:"ask_bot",ask_thursday:"ask_thursday",ask_back:"ask_back",answer:"answer",end_call:"end_call"}])},636616,a=>{"use strict";var b=a.i(569572),c=a.i(762008),d=a.i(62721);let e=[{name:"Jarvis",description:"Any job — turns it into a plan, hands each part to whoever it belongs to, does the rest, answers with one result",hint:"Plans a job and hands out the parts",icon:{shape:"squircle"},recommended:!0,systemPrompt:"You are Jarvis. A job reaches you as a sentence and leaves as a plan: what it actually needs, in what order, and who does each part. Settle what is still open in one round rather than guessing at it, then send for what the job is made of before you build — a part another bot exists for is theirs, and everything nobody else is for is yours. You hold the whole while they hold pieces: the order the parts run in, the seams where what comes back has to fit together, and the single thing that is handed over at the end. The plan is how the job gets done, not what gets handed back."},{name:"Navigator",description:"The web through a real browser — opens the page itself, signs in, brings back prices, images and links as they stand now",hint:"Opens the page itself and reads what is on it",icon:{shape:"poly"},recommended:!0,systemPrompt:`You are Navigator. Every browser job is yours: load the \`${b.BROWSER_SKILL}\` skill first and work through it. A search result says a page exists; you say what is on it right now — so open it, sign in where it asks you to, and keep going past the first screen until you have the thing itself: exact figures, the links that open them, the images off the page. Nothing you did not see goes in what you hand back, and a page that refused you is a fact with a url on it, not a gap to fill in from memory. Whoever asked should never need to open the site after you.`},{name:"Scribe",description:"Writing that gets read — finds out what it is for, researches it, then picks the form: prose, table, or a page",hint:"Writes what gets read, in the form that fits",icon:{shape:"blob"},recommended:!0,systemPrompt:"You are Scribe. Who reads it and what they do next decides everything else, so learn that first, then research before you claim: every number and name you write traces back to something you actually read. Pick the form by the reading — a `.md` for something read once, a `.csv` for what gets sorted, a page (the `interactive-page` skill) for something used or something whose pictures are the point. When the request does not settle which it is — something read once or something used — ask before you write rather than committing a whole draft to a guess. Cut what the reader would skip, and never spend a paragraph where a table or a picture answers in one glance. One page they finish beats five they abandon."},{name:"Insta",description:"Instagram end to end — settles what the post is, draws it, writes it, and puts it up once approved",hint:"Draws the pictures, writes the caption, posts it",icon:{shape:"poly"},requires:["image"],systemPrompt:`You are Insta. One job takes a post from nothing to live on instagram.com — settle what it is, sign in, draw it, write it, put it up. Load the \`${b.BROWSER_SKILL}\` skill before any browser step.
1
+ module.exports=[418520,a=>a.a(async(b,c)=>{try{var d=await a.y("@libsql/client-6da938047d5fc1cd");a.n(d),c()}catch(a){c(a)}},!0),500874,(a,b,c)=>{b.exports=a.x("buffer",()=>require("buffer"))},233405,(a,b,c)=>{b.exports=a.x("child_process",()=>require("child_process"))},522734,(a,b,c)=>{b.exports=a.x("fs",()=>require("fs"))},874533,(a,b,c)=>{b.exports=a.x("node:child_process",()=>require("node:child_process"))},666680,(a,b,c)=>{b.exports=a.x("node:crypto",()=>require("node:crypto"))},902157,(a,b,c)=>{b.exports=a.x("node:fs",()=>require("node:fs"))},912714,(a,b,c)=>{b.exports=a.x("node:fs/promises",()=>require("node:fs/promises"))},347299,(a,b,c)=>{b.exports=a.x("node:http",()=>require("node:http"))},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"))},509656,(a,b,c)=>{b.exports=a.x("node:tty",()=>require("node:tty"))},812057,(a,b,c)=>{b.exports=a.x("node:util",()=>require("node:util"))},446786,(a,b,c)=>{b.exports=a.x("os",()=>require("os"))},605365,(a,b,c)=>{b.exports=a.x("process",()=>require("process"))},762008,a=>{"use strict";a.s(["STUDIO_TOOLS",0,{generate_image:"generate_image",generate_speech:"generate_speech",transcribe:"transcribe",generate_video:"generate_video"},"TOOL_NAMES",0,{memory_recall:"memory_recall",memory_remember:"memory_remember",memory_forget:"memory_forget",memory_conversation:"memory_conversation",bash:"bash",write_file:"write_file",tool_search:"tool_search",tool_call:"tool_call",load_skill:"load_skill",web_search:"web_search",delegate:"delegate",task:"task",ask_bot:"ask_bot",ask_thursday:"ask_thursday",ask_back:"ask_back",answer:"answer",end_call:"end_call"}])},636616,a=>{"use strict";var b=a.i(569572),c=a.i(762008),d=a.i(62721);let e=[{name:"Jarvis",description:"Any job — turns it into a plan, hands each part to whoever it belongs to, does the rest, answers with one result",hint:"Plans a job and hands out the parts",icon:{shape:"squircle"},recommended:!0,systemPrompt:"You are Jarvis. A job reaches you as a sentence and leaves as a plan: what it actually needs, in what order, and who does each part. Settle what is still open in one round rather than guessing at it, then send for what the job is made of before you build — a part another bot exists for is theirs, and everything nobody else is for is yours. You hold the whole while they hold pieces: the order the parts run in, the seams where what comes back has to fit together, and the single thing that is handed over at the end. The plan is how the job gets done, not what gets handed back."},{name:"Navigator",description:"The web through a real browser — opens the page itself, signs in, brings back prices, images and links as they stand now",hint:"Opens the page itself and reads what is on it",icon:{shape:"poly"},recommended:!0,systemPrompt:`You are Navigator. Every browser job is yours: load the \`${b.BROWSER_SKILL}\` skill first and work through it. A search result says a page exists; you say what is on it right now — so open it, sign in where it asks you to, and keep going past the first screen until you have the thing itself: exact figures, the links that open them, the images off the page. Nothing you did not see goes in what you hand back, and a page that refused you is a fact with a url on it, not a gap to fill in from memory. Whoever asked should never need to open the site after you.`},{name:"Scribe",description:"Writing that gets read — finds out what it is for, researches it, then picks the form: prose, table, or a page",hint:"Writes what gets read, in the form that fits",icon:{shape:"blob"},recommended:!0,systemPrompt:"You are Scribe. Who reads it and what they do next decides everything else, so learn that first, then research before you claim: every number and name you write traces back to something you actually read. Pick the form by the reading — a `.md` for something read once, a `.csv` for what gets sorted, a page (the `interactive-page` skill) for something used or something whose pictures are the point. When the request does not settle which it is — something read once or something used — ask before you write rather than committing a whole draft to a guess. Cut what the reader would skip, and never spend a paragraph where a table or a picture answers in one glance. One page they finish beats five they abandon."},{name:"Insta",description:"Instagram end to end — settles what the post is, draws it, writes it, and puts it up once approved",hint:"Draws the pictures, writes the caption, posts it",icon:{shape:"poly"},requires:["image"],systemPrompt:`You are Insta. One job takes a post from nothing to live on instagram.com — settle what it is, sign in, draw it, write it, put it up. Load the \`${b.BROWSER_SKILL}\` skill before any browser step.
2
2
 
3
3
  Settle it in one question. Ask only for what the request leaves open, in a single \`${c.TOOL_NAMES.ask_thursday}\`: the topic, how many pictures, whether to build a cover, and whether they name the music or you pick. A request that already says its topic is not asked for it again. Told to decide yourself: \`${c.TOOL_NAMES.web_search}\` for what is current on that topic, three pictures, a cover, and a recent track from Instagram's own list. Never ask twice for one round.
4
4
 
@@ -37,7 +37,7 @@ Photos in one step too: every \`curl -o\` in a single \`bash\` call, into the tr
37
37
 
38
38
  The page is the deliverable: the days in order, the map under each, the photos with whose page they came from, and the facts that decide what to pack. If someone on your roster writes pages, it is theirs and they get steps of their own — send the days as written, the paths of every shot and photo, and each fact with its source, because they cannot see your thread. If nobody does, write it yourself with the \`interactive-page\` skill.
39
39
 
40
- Answer with the folder under \`artifacts/\` and what is in it: the page, a map per day, the pictures.`}];e.filter(a=>a.recommended),a.s(["findBotSeed",0,a=>e.find(b=>b.name===a)??null,"rollSeedColors",0,()=>(0,d.randomMarkColors)(e.length)])},451208,a=>{"use strict";var b=a.i(137936),c=a.i(821415),d=a.i(912714),e=a.i(750227),f=a.i(569572),g=a.i(293480);async function h(a){let b=await (0,c.insideWorkspace)(a);b||(0,g.publicError)("Outside the workspace");let e=await (0,d.stat)(b).catch(()=>null);e||(0,g.publicError)("File not found"),e.isFile()||(0,g.publicError)("That is a folder, not a file"),await (0,d.rm)(b)}async function i(){let a=(0,e.join)(c.WORKSPACE,f.PATHS.scratch);for(let b of(await (0,d.readdir)(a).catch(()=>[])))await (0,d.rm)((0,e.join)(a,b),{recursive:!0,force:!0})}a.i(684321);var j=a.i(225689),k=a.i(874533),l=a.i(812057);let m={darwin:a=>["open",[a]],win32:a=>["cmd.exe",["/c","start","",a]],linux:a=>["xdg-open",[a]]};async function n(a){await (0,d.access)(a);let b=m[process.platform]?.(a);if(!b)throw Error(`Opening files is not wired up on ${process.platform}.`);let[c,e]=b;await (0,l.promisify)(k.execFile)(c,e,{windowsHide:!0})}var o=a.i(182248),p=a.i(713095);let q=(0,j.serverAction)(async a=>{let b=a.trim();b||(0,g.publicError)("Which file?");let d=(await (0,c.openWorkspace)()).resolve(b);try{await n(d)}catch(a){(0,g.publicError)(`Could not open ${b}: ${(0,o.errorToString)(a)}`)}}),r=(0,j.serverAction)(async a=>{let b=a.trim();b||(0,g.publicError)("Which file?"),await h(b)}),s=(0,j.serverAction)(async()=>i());(0,p.ensureServerEntryExports)([q,r,s]),(0,b.registerServerReference)(q,"7f647083e5350baa7762d6d282de825cdf6b737384",null),(0,b.registerServerReference)(r,"7f194293e4c1ab83ed63877cc9d8b7aebf42b46bb8",null),(0,b.registerServerReference)(s,"7f8836b516d90511f9ac2025e946c291a9cd0d8174",null),a.s(["deleteWorkspaceFileAction",0,r,"emptyScratchAction",0,s,"openFileAction",0,q],451208)},225689,a=>{"use strict";a.i(570396);var b=a.i(673727),c=a.i(975160),d=a.i(176668),e=a.i(293480);let f=a=>!!a&&"object"==typeof a&&(!0===a.$ok||!1===a.$ok),g=a=>f(a)&&a.$ok,h=a=>({$ok:!0,data:a}),i=a=>({$ok:!1,message:a});async function j(a){try{let b=h(await a());for(;g(b)&&f(b.data);)b=b.data;return b}catch(a){if((0,b.unstable_rethrow)(a),(0,e.isPublicError)(a))return i(a.message);if(a instanceof c.ZodError)return i(a.issues[0]?.message);if(f(a)&&!a.$ok)return a;return d.logger.error(a),i()}}a.s(["serverAction",0,a=>(...b)=>j(()=>a(...b))],225689)},293480,a=>{"use strict";class b extends Error{message;constructor(a){super(a),this.message=a}}a.s(["isPublicError",0,a=>a instanceof b,"publicError",0,function(a){throw new b(a)}])},484261,(a,b,c)=>{"use strict";var d=Object.create,e=Object.defineProperty,f=Object.getOwnPropertyDescriptor,g=Object.getOwnPropertyNames,h=Object.getPrototypeOf,i=Object.prototype.hasOwnProperty,j=(a,b,c,d)=>{if(b&&"object"==typeof b||"function"==typeof b)for(let h of g(b))i.call(a,h)||h===c||e(a,h,{get:()=>b[h],enumerable:!(d=f(b,h))||d.enumerable});return a},k=(a,b,c)=>(c=null!=a?d(h(a)):{},j(!b&&a&&a.__esModule?c:e(c,"default",{value:a,enumerable:!0}),a)),l={},m={isValidAccessToken:()=>u,readAuthConfig:()=>s,writeAuthConfig:()=>t};for(var n in m)e(l,n,{get:m[n],enumerable:!0});b.exports=j(e({},"__esModule",{value:!0}),l);var o=k(a.r(522734)),p=k(a.r(814747)),q=a.r(72918);function r(){let a=(0,q.getVercelDataDir)();if(!a)throw Error(`Unable to find Vercel CLI data directory. Your platform: ${process.platform}. Supported: darwin, linux, win32.`);return p.join(a,"auth.json")}function s(){try{let a=r();if(!o.existsSync(a))return null;let b=o.readFileSync(a,"utf8");if(!b)return null;return JSON.parse(b)}catch(a){return null}}function t(a){let b=r(),c=p.dirname(b);o.existsSync(c)||o.mkdirSync(c,{mode:504,recursive:!0}),o.writeFileSync(b,JSON.stringify(a,null,2),{mode:384})}function u(a,b=0){if(!a.token)return!1;if("number"!=typeof a.expiresAt)return!0;let c=Math.floor(Date.now()/1e3);return a.expiresAt>=c+b/1e3}},351275,(a,b,c)=>{"use strict";var d=Object.defineProperty,e=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,g=Object.prototype.hasOwnProperty,h={},i={AccessTokenMissingError:()=>k,RefreshAccessTokenFailedError:()=>l};for(var j in i)d(h,j,{get:i[j],enumerable:!0});b.exports=((a,b,c)=>{if(b&&"object"==typeof b||"function"==typeof b)for(let h of f(b))g.call(a,h)||void 0===h||d(a,h,{get:()=>b[h],enumerable:!(c=e(b,h))||c.enumerable});return a})(d({},"__esModule",{value:!0}),h);class k extends Error{constructor(){super("No authentication found. Please log in with the Vercel CLI (vercel login)."),this.name="AccessTokenMissingError"}}class l extends Error{constructor(a){super("Failed to refresh authentication token.",{cause:a}),this.name="RefreshAccessTokenFailedError"}}},719472,(a,b,c)=>{"use strict";var d=Object.defineProperty,e=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,g=Object.prototype.hasOwnProperty,h={},i={processTokenResponse:()=>p,refreshTokenRequest:()=>o};for(var j in i)d(h,j,{get:i[j],enumerable:!0});b.exports=((a,b,c)=>{if(b&&"object"==typeof b||"function"==typeof b)for(let h of f(b))g.call(a,h)||void 0===h||d(a,h,{get:()=>b[h],enumerable:!(c=e(b,h))||c.enumerable});return a})(d({},"__esModule",{value:!0}),h);var k=a.r(446786);let l=`@vercel/oidc node-${process.version} ${(0,k.platform)()} (${(0,k.arch)()}) ${(0,k.hostname)()}`,m=null;async function n(){if(m)return m;let a=await fetch("https://vercel.com/.well-known/openid-configuration",{headers:{"user-agent":l}});if(!a.ok)throw Error("Failed to discover OAuth endpoints");let b=await a.json();if(!b||"string"!=typeof b.token_endpoint)throw Error("Invalid OAuth discovery response");let c=b.token_endpoint;return m=c,c}async function o(a){let b=await n();return await fetch(b,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded","user-agent":l},body:new URLSearchParams({client_id:"cl_HYyOPBNtFMfHhaUn9L4QPfTZz6TP47bp",grant_type:"refresh_token",...a})})}async function p(a){let b=await a.json();return a.ok?"object"!=typeof b||null===b?[Error("Invalid token response")]:"string"!=typeof b.access_token?[Error("Missing access_token in response")]:"Bearer"!==b.token_type?[Error("Invalid token_type in response")]:"number"!=typeof b.expires_in?[Error("Missing expires_in in response")]:[null,b]:[Error("object"==typeof b&&b&&"error"in b?String(b.error):"Token refresh failed")]}},580949,(a,b,c)=>{"use strict";var d=Object.defineProperty,e=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,g=Object.prototype.hasOwnProperty,h={},i={VercelOidcTokenError:()=>k};for(var j in i)d(h,j,{get:i[j],enumerable:!0});b.exports=((a,b,c)=>{if(b&&"object"==typeof b||"function"==typeof b)for(let h of f(b))g.call(a,h)||void 0===h||d(a,h,{get:()=>b[h],enumerable:!(c=e(b,h))||c.enumerable});return a})(d({},"__esModule",{value:!0}),h);class k extends Error{constructor(a,b){super(a),this.name="VercelOidcTokenError",this.cause=b}toString(){return this.cause?`${this.name}: ${this.message}: ${this.cause}`:`${this.name}: ${this.message}`}}},50067,(a,b,c)=>{"use strict";var d=Object.create,e=Object.defineProperty,f=Object.getOwnPropertyDescriptor,g=Object.getOwnPropertyNames,h=Object.getPrototypeOf,i=Object.prototype.hasOwnProperty,j=(a,b,c,d)=>{if(b&&"object"==typeof b||"function"==typeof b)for(let h of g(b))i.call(a,h)||h===c||e(a,h,{get:()=>b[h],enumerable:!(d=f(b,h))||d.enumerable});return a},k=(a,b,c)=>(c=null!=a?d(h(a)):{},j(!b&&a&&a.__esModule?c:e(c,"default",{value:a,enumerable:!0}),a)),l={},m={findRootDir:()=>s,getUserDataDir:()=>t};for(var n in m)e(l,n,{get:m[n],enumerable:!0});b.exports=j(e({},"__esModule",{value:!0}),l);var o=k(a.r(814747)),p=k(a.r(522734)),q=k(a.r(446786)),r=a.r(580949);function s(){try{let a=process.cwd();for(;a!==o.default.dirname(a);){let b=o.default.join(a,".vercel");if(p.default.existsSync(b))return a;a=o.default.dirname(a)}}catch(a){throw new r.VercelOidcTokenError("Token refresh only supported in node server environments")}return null}function t(){if(process.env.XDG_DATA_HOME)return process.env.XDG_DATA_HOME;switch(q.default.platform()){case"darwin":return o.default.join(q.default.homedir(),"Library/Application Support");case"linux":return o.default.join(q.default.homedir(),".local/share");case"win32":if(process.env.LOCALAPPDATA)return process.env.LOCALAPPDATA;return null;default:return null}}},72918,(a,b,c)=>{"use strict";var d=Object.create,e=Object.defineProperty,f=Object.getOwnPropertyDescriptor,g=Object.getOwnPropertyNames,h=Object.getPrototypeOf,i=Object.prototype.hasOwnProperty,j=(a,b,c,d)=>{if(b&&"object"==typeof b||"function"==typeof b)for(let h of g(b))i.call(a,h)||h===c||e(a,h,{get:()=>b[h],enumerable:!(d=f(b,h))||d.enumerable});return a},k=(a,b,c)=>(c=null!=a?d(h(a)):{},j(!b&&a&&a.__esModule?c:e(c,"default",{value:a,enumerable:!0}),a)),l={},m={assertVercelOidcTokenResponse:()=>y,findProjectInfo:()=>z,getTokenPayload:()=>C,getVercelDataDir:()=>v,getVercelOidcToken:()=>x,getVercelToken:()=>w,isExpired:()=>D,loadToken:()=>B,saveToken:()=>A};for(var n in m)e(l,n,{get:m[n],enumerable:!0});b.exports=j(e({},"__esModule",{value:!0}),l);var o=k(a.r(814747)),p=k(a.r(522734)),q=a.r(580949),r=a.r(50067),s=a.r(484261),t=a.r(719472),u=a.r(351275);function v(){let a=(0,r.getUserDataDir)();return a?o.join(a,"com.vercel.cli"):null}async function w(a){let b=(0,s.readAuthConfig)();if(!b?.token)throw new u.AccessTokenMissingError;if((0,s.isValidAccessToken)(b,a?.expirationBufferMs))return b.token;if(!b.refreshToken)throw(0,s.writeAuthConfig)({}),new u.RefreshAccessTokenFailedError("No refresh token available");try{let a=await (0,t.refreshTokenRequest)({refresh_token:b.refreshToken}),[c,d]=await (0,t.processTokenResponse)(a);if(c||!d)throw(0,s.writeAuthConfig)({}),new u.RefreshAccessTokenFailedError(c);let e={token:d.access_token,expiresAt:Math.floor(Date.now()/1e3)+d.expires_in};return d.refresh_token&&(e.refreshToken=d.refresh_token),(0,s.writeAuthConfig)(e),e.token}catch(a){if((0,s.writeAuthConfig)({}),a instanceof u.AccessTokenMissingError||a instanceof u.RefreshAccessTokenFailedError)throw a;throw new u.RefreshAccessTokenFailedError(a)}}async function x(a,b,c){let d=`https://api.vercel.com/v1/projects/${b}/token?source=vercel-oidc-refresh${c?`&teamId=${c}`:""}`,e=await fetch(d,{method:"POST",headers:{Authorization:`Bearer ${a}`}});if(!e.ok)throw new q.VercelOidcTokenError(`Failed to refresh OIDC token: ${e.statusText}`);let f=await e.json();return y(f),f}function y(a){if(!a||"object"!=typeof a)throw TypeError("Vercel OIDC token is malformed. Expected an object. Please run `vc env pull` and try again");if(!("token"in a)||"string"!=typeof a.token)throw TypeError("Vercel OIDC token is malformed. Expected a string-valued token property. Please run `vc env pull` and try again")}function z(){let a=(0,r.findRootDir)();if(!a)throw new q.VercelOidcTokenError("Unable to find project root directory. Have you linked your project with `vc link?`");let b=o.join(a,".vercel","project.json");if(!p.existsSync(b))throw new q.VercelOidcTokenError("project.json not found, have you linked your project with `vc link?`");let c=JSON.parse(p.readFileSync(b,"utf8"));if("string"!=typeof c.projectId&&"string"!=typeof c.orgId)throw TypeError("Expected a string-valued projectId property. Try running `vc link` to re-link your project.");return{projectId:c.projectId,teamId:c.orgId}}function A(a,b){let c=(0,r.getUserDataDir)();if(!c)throw new q.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let d=o.join(c,"com.vercel.token",`${b}.json`),e=JSON.stringify(a);p.mkdirSync(o.dirname(d),{mode:504,recursive:!0}),p.writeFileSync(d,e),p.chmodSync(d,432)}function B(a){let b=(0,r.getUserDataDir)();if(!b)throw new q.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let c=o.join(b,"com.vercel.token",`${a}.json`);if(!p.existsSync(c))return null;let d=JSON.parse(p.readFileSync(c,"utf8"));return y(d),d}function C(a){let b=a.split(".");if(3!==b.length)throw new q.VercelOidcTokenError("Invalid token. Please run `vc env pull` and try again");let c=b[1].replace(/-/g,"+").replace(/_/g,"/"),d=c.padEnd(c.length+(4-c.length%4)%4,"=");return JSON.parse(Buffer.from(d,"base64").toString("utf8"))}function D(a,b=0){return 1e3*a.exp<Date.now()+b}},713095,(a,b,c)=>{"use strict";function d(a){for(let b=0;b<a.length;b++){let c=a[b];if("function"!=typeof c)throw Object.defineProperty(Error(`A "use server" file can only export async functions, found ${typeof c}.
40
+ Answer with the folder under \`artifacts/\` and what is in it: the page, a map per day, the pictures.`}];e.filter(a=>a.recommended),a.s(["findBotSeed",0,a=>e.find(b=>b.name===a)??null,"rollSeedColors",0,()=>(0,d.randomMarkColors)(e.length)])},451208,a=>{"use strict";var b=a.i(137936),c=a.i(821415),d=a.i(912714),e=a.i(750227),f=a.i(569572),g=a.i(293480);async function h(a){let b=await (0,c.insideWorkspace)(a);b||(0,g.publicError)("Outside the workspace");let e=await (0,d.stat)(b).catch(()=>null);e||(0,g.publicError)("File not found"),e.isFile()||(0,g.publicError)("That is a folder, not a file"),await (0,d.rm)(b)}async function i(){let a=(0,e.join)(c.WORKSPACE,f.PATHS.scratch);for(let b of(await (0,d.readdir)(a).catch(()=>[])))await (0,d.rm)((0,e.join)(a,b),{recursive:!0,force:!0})}a.i(684321);var j=a.i(225689),k=a.i(874533),l=a.i(812057);let m={darwin:a=>["open",[a]],win32:a=>["cmd.exe",["/c","start","",a]],linux:a=>["xdg-open",[a]]};async function n(a){await (0,d.access)(a);let b=m[process.platform]?.(a);if(!b)throw Error(`Opening files is not wired up on ${process.platform}.`);let[c,e]=b;await (0,l.promisify)(k.execFile)(c,e,{windowsHide:!0})}var o=a.i(182248),p=a.i(713095);let q=(0,j.serverAction)(async a=>{let b=a.trim();b||(0,g.publicError)("Which file?");let d=(await (0,c.openWorkspace)()).resolve(b);try{await n(d)}catch(a){(0,g.publicError)(`Could not open ${b}: ${(0,o.errorToString)(a)}`)}}),r=(0,j.serverAction)(async a=>{let b=a.trim();b||(0,g.publicError)("Which file?"),await h(b)}),s=(0,j.serverAction)(async()=>i());(0,p.ensureServerEntryExports)([q,r,s]),(0,b.registerServerReference)(q,"7fe75c180b16ec13b8c8052e5fbacba3e5789f0aca",null),(0,b.registerServerReference)(r,"7f2cd09869c1a94eb452d214e327ed12bf3043400f",null),(0,b.registerServerReference)(s,"7fffb395383564466b268157450b588677d6134f7b",null),a.s(["deleteWorkspaceFileAction",0,r,"emptyScratchAction",0,s,"openFileAction",0,q],451208)},225689,a=>{"use strict";a.i(570396);var b=a.i(673727),c=a.i(975160),d=a.i(176668),e=a.i(293480);let f=a=>!!a&&"object"==typeof a&&(!0===a.$ok||!1===a.$ok),g=a=>f(a)&&a.$ok,h=a=>({$ok:!0,data:a}),i=a=>({$ok:!1,message:a});async function j(a){try{let b=h(await a());for(;g(b)&&f(b.data);)b=b.data;return b}catch(a){if((0,b.unstable_rethrow)(a),(0,e.isPublicError)(a))return i(a.message);if(a instanceof c.ZodError)return i(a.issues[0]?.message);if(f(a)&&!a.$ok)return a;return d.logger.error(a),i()}}a.s(["serverAction",0,a=>(...b)=>j(()=>a(...b))],225689)},293480,a=>{"use strict";class b extends Error{message;constructor(a){super(a),this.message=a}}a.s(["isPublicError",0,a=>a instanceof b,"publicError",0,function(a){throw new b(a)}])},484261,(a,b,c)=>{"use strict";var d=Object.create,e=Object.defineProperty,f=Object.getOwnPropertyDescriptor,g=Object.getOwnPropertyNames,h=Object.getPrototypeOf,i=Object.prototype.hasOwnProperty,j=(a,b,c,d)=>{if(b&&"object"==typeof b||"function"==typeof b)for(let h of g(b))i.call(a,h)||h===c||e(a,h,{get:()=>b[h],enumerable:!(d=f(b,h))||d.enumerable});return a},k=(a,b,c)=>(c=null!=a?d(h(a)):{},j(!b&&a&&a.__esModule?c:e(c,"default",{value:a,enumerable:!0}),a)),l={},m={isValidAccessToken:()=>u,readAuthConfig:()=>s,writeAuthConfig:()=>t};for(var n in m)e(l,n,{get:m[n],enumerable:!0});b.exports=j(e({},"__esModule",{value:!0}),l);var o=k(a.r(522734)),p=k(a.r(814747)),q=a.r(72918);function r(){let a=(0,q.getVercelDataDir)();if(!a)throw Error(`Unable to find Vercel CLI data directory. Your platform: ${process.platform}. Supported: darwin, linux, win32.`);return p.join(a,"auth.json")}function s(){try{let a=r();if(!o.existsSync(a))return null;let b=o.readFileSync(a,"utf8");if(!b)return null;return JSON.parse(b)}catch(a){return null}}function t(a){let b=r(),c=p.dirname(b);o.existsSync(c)||o.mkdirSync(c,{mode:504,recursive:!0}),o.writeFileSync(b,JSON.stringify(a,null,2),{mode:384})}function u(a,b=0){if(!a.token)return!1;if("number"!=typeof a.expiresAt)return!0;let c=Math.floor(Date.now()/1e3);return a.expiresAt>=c+b/1e3}},351275,(a,b,c)=>{"use strict";var d=Object.defineProperty,e=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,g=Object.prototype.hasOwnProperty,h={},i={AccessTokenMissingError:()=>k,RefreshAccessTokenFailedError:()=>l};for(var j in i)d(h,j,{get:i[j],enumerable:!0});b.exports=((a,b,c)=>{if(b&&"object"==typeof b||"function"==typeof b)for(let h of f(b))g.call(a,h)||void 0===h||d(a,h,{get:()=>b[h],enumerable:!(c=e(b,h))||c.enumerable});return a})(d({},"__esModule",{value:!0}),h);class k extends Error{constructor(){super("No authentication found. Please log in with the Vercel CLI (vercel login)."),this.name="AccessTokenMissingError"}}class l extends Error{constructor(a){super("Failed to refresh authentication token.",{cause:a}),this.name="RefreshAccessTokenFailedError"}}},719472,(a,b,c)=>{"use strict";var d=Object.defineProperty,e=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,g=Object.prototype.hasOwnProperty,h={},i={processTokenResponse:()=>p,refreshTokenRequest:()=>o};for(var j in i)d(h,j,{get:i[j],enumerable:!0});b.exports=((a,b,c)=>{if(b&&"object"==typeof b||"function"==typeof b)for(let h of f(b))g.call(a,h)||void 0===h||d(a,h,{get:()=>b[h],enumerable:!(c=e(b,h))||c.enumerable});return a})(d({},"__esModule",{value:!0}),h);var k=a.r(446786);let l=`@vercel/oidc node-${process.version} ${(0,k.platform)()} (${(0,k.arch)()}) ${(0,k.hostname)()}`,m=null;async function n(){if(m)return m;let a=await fetch("https://vercel.com/.well-known/openid-configuration",{headers:{"user-agent":l}});if(!a.ok)throw Error("Failed to discover OAuth endpoints");let b=await a.json();if(!b||"string"!=typeof b.token_endpoint)throw Error("Invalid OAuth discovery response");let c=b.token_endpoint;return m=c,c}async function o(a){let b=await n();return await fetch(b,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded","user-agent":l},body:new URLSearchParams({client_id:"cl_HYyOPBNtFMfHhaUn9L4QPfTZz6TP47bp",grant_type:"refresh_token",...a})})}async function p(a){let b=await a.json();return a.ok?"object"!=typeof b||null===b?[Error("Invalid token response")]:"string"!=typeof b.access_token?[Error("Missing access_token in response")]:"Bearer"!==b.token_type?[Error("Invalid token_type in response")]:"number"!=typeof b.expires_in?[Error("Missing expires_in in response")]:[null,b]:[Error("object"==typeof b&&b&&"error"in b?String(b.error):"Token refresh failed")]}},580949,(a,b,c)=>{"use strict";var d=Object.defineProperty,e=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,g=Object.prototype.hasOwnProperty,h={},i={VercelOidcTokenError:()=>k};for(var j in i)d(h,j,{get:i[j],enumerable:!0});b.exports=((a,b,c)=>{if(b&&"object"==typeof b||"function"==typeof b)for(let h of f(b))g.call(a,h)||void 0===h||d(a,h,{get:()=>b[h],enumerable:!(c=e(b,h))||c.enumerable});return a})(d({},"__esModule",{value:!0}),h);class k extends Error{constructor(a,b){super(a),this.name="VercelOidcTokenError",this.cause=b}toString(){return this.cause?`${this.name}: ${this.message}: ${this.cause}`:`${this.name}: ${this.message}`}}},50067,(a,b,c)=>{"use strict";var d=Object.create,e=Object.defineProperty,f=Object.getOwnPropertyDescriptor,g=Object.getOwnPropertyNames,h=Object.getPrototypeOf,i=Object.prototype.hasOwnProperty,j=(a,b,c,d)=>{if(b&&"object"==typeof b||"function"==typeof b)for(let h of g(b))i.call(a,h)||h===c||e(a,h,{get:()=>b[h],enumerable:!(d=f(b,h))||d.enumerable});return a},k=(a,b,c)=>(c=null!=a?d(h(a)):{},j(!b&&a&&a.__esModule?c:e(c,"default",{value:a,enumerable:!0}),a)),l={},m={findRootDir:()=>s,getUserDataDir:()=>t};for(var n in m)e(l,n,{get:m[n],enumerable:!0});b.exports=j(e({},"__esModule",{value:!0}),l);var o=k(a.r(814747)),p=k(a.r(522734)),q=k(a.r(446786)),r=a.r(580949);function s(){try{let a=process.cwd();for(;a!==o.default.dirname(a);){let b=o.default.join(a,".vercel");if(p.default.existsSync(b))return a;a=o.default.dirname(a)}}catch(a){throw new r.VercelOidcTokenError("Token refresh only supported in node server environments")}return null}function t(){if(process.env.XDG_DATA_HOME)return process.env.XDG_DATA_HOME;switch(q.default.platform()){case"darwin":return o.default.join(q.default.homedir(),"Library/Application Support");case"linux":return o.default.join(q.default.homedir(),".local/share");case"win32":if(process.env.LOCALAPPDATA)return process.env.LOCALAPPDATA;return null;default:return null}}},72918,(a,b,c)=>{"use strict";var d=Object.create,e=Object.defineProperty,f=Object.getOwnPropertyDescriptor,g=Object.getOwnPropertyNames,h=Object.getPrototypeOf,i=Object.prototype.hasOwnProperty,j=(a,b,c,d)=>{if(b&&"object"==typeof b||"function"==typeof b)for(let h of g(b))i.call(a,h)||h===c||e(a,h,{get:()=>b[h],enumerable:!(d=f(b,h))||d.enumerable});return a},k=(a,b,c)=>(c=null!=a?d(h(a)):{},j(!b&&a&&a.__esModule?c:e(c,"default",{value:a,enumerable:!0}),a)),l={},m={assertVercelOidcTokenResponse:()=>y,findProjectInfo:()=>z,getTokenPayload:()=>C,getVercelDataDir:()=>v,getVercelOidcToken:()=>x,getVercelToken:()=>w,isExpired:()=>D,loadToken:()=>B,saveToken:()=>A};for(var n in m)e(l,n,{get:m[n],enumerable:!0});b.exports=j(e({},"__esModule",{value:!0}),l);var o=k(a.r(814747)),p=k(a.r(522734)),q=a.r(580949),r=a.r(50067),s=a.r(484261),t=a.r(719472),u=a.r(351275);function v(){let a=(0,r.getUserDataDir)();return a?o.join(a,"com.vercel.cli"):null}async function w(a){let b=(0,s.readAuthConfig)();if(!b?.token)throw new u.AccessTokenMissingError;if((0,s.isValidAccessToken)(b,a?.expirationBufferMs))return b.token;if(!b.refreshToken)throw(0,s.writeAuthConfig)({}),new u.RefreshAccessTokenFailedError("No refresh token available");try{let a=await (0,t.refreshTokenRequest)({refresh_token:b.refreshToken}),[c,d]=await (0,t.processTokenResponse)(a);if(c||!d)throw(0,s.writeAuthConfig)({}),new u.RefreshAccessTokenFailedError(c);let e={token:d.access_token,expiresAt:Math.floor(Date.now()/1e3)+d.expires_in};return d.refresh_token&&(e.refreshToken=d.refresh_token),(0,s.writeAuthConfig)(e),e.token}catch(a){if((0,s.writeAuthConfig)({}),a instanceof u.AccessTokenMissingError||a instanceof u.RefreshAccessTokenFailedError)throw a;throw new u.RefreshAccessTokenFailedError(a)}}async function x(a,b,c){let d=`https://api.vercel.com/v1/projects/${b}/token?source=vercel-oidc-refresh${c?`&teamId=${c}`:""}`,e=await fetch(d,{method:"POST",headers:{Authorization:`Bearer ${a}`}});if(!e.ok)throw new q.VercelOidcTokenError(`Failed to refresh OIDC token: ${e.statusText}`);let f=await e.json();return y(f),f}function y(a){if(!a||"object"!=typeof a)throw TypeError("Vercel OIDC token is malformed. Expected an object. Please run `vc env pull` and try again");if(!("token"in a)||"string"!=typeof a.token)throw TypeError("Vercel OIDC token is malformed. Expected a string-valued token property. Please run `vc env pull` and try again")}function z(){let a=(0,r.findRootDir)();if(!a)throw new q.VercelOidcTokenError("Unable to find project root directory. Have you linked your project with `vc link?`");let b=o.join(a,".vercel","project.json");if(!p.existsSync(b))throw new q.VercelOidcTokenError("project.json not found, have you linked your project with `vc link?`");let c=JSON.parse(p.readFileSync(b,"utf8"));if("string"!=typeof c.projectId&&"string"!=typeof c.orgId)throw TypeError("Expected a string-valued projectId property. Try running `vc link` to re-link your project.");return{projectId:c.projectId,teamId:c.orgId}}function A(a,b){let c=(0,r.getUserDataDir)();if(!c)throw new q.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let d=o.join(c,"com.vercel.token",`${b}.json`),e=JSON.stringify(a);p.mkdirSync(o.dirname(d),{mode:504,recursive:!0}),p.writeFileSync(d,e),p.chmodSync(d,432)}function B(a){let b=(0,r.getUserDataDir)();if(!b)throw new q.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let c=o.join(b,"com.vercel.token",`${a}.json`);if(!p.existsSync(c))return null;let d=JSON.parse(p.readFileSync(c,"utf8"));return y(d),d}function C(a){let b=a.split(".");if(3!==b.length)throw new q.VercelOidcTokenError("Invalid token. Please run `vc env pull` and try again");let c=b[1].replace(/-/g,"+").replace(/_/g,"/"),d=c.padEnd(c.length+(4-c.length%4)%4,"=");return JSON.parse(Buffer.from(d,"base64").toString("utf8"))}function D(a,b=0){return 1e3*a.exp<Date.now()+b}},713095,(a,b,c)=>{"use strict";function d(a){for(let b=0;b<a.length;b++){let c=a[b];if("function"!=typeof c)throw Object.defineProperty(Error(`A "use server" file can only export async functions, found ${typeof c}.
41
41
  Read more: https://nextjs.org/docs/messages/invalid-use-server-value`),"__NEXT_ERROR_CODE",{value:"E352",enumerable:!1,configurable:!0})}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ensureServerEntryExports",{enumerable:!0,get:function(){return d}})},137936,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"registerServerReference",{enumerable:!0,get:function(){return d.registerServerReference}});let d=a.r(211857)}];
42
42
 
43
- //# sourceMappingURL=%5Broot-of-the-server%5D__1gtlw6v._.js.map
43
+ //# sourceMappingURL=%5Broot-of-the-server%5D__1-13tcn._.js.map
@@ -1,18 +1,18 @@
1
- module.exports=[614747,a=>a.a(async(b,c)=>{try{var d=a.i(569572),e=a.i(762008),f=a.i(221214),g=a.i(84929),h=a.i(986743),i=a.i(661210),j=a.i(138100),k=a.i(569549),l=a.i(821415),m=a.i(176668),n=a.i(644468),o=a.i(938934),p=b([f,g,h,k,n]);async function q(a,b){var c,p,q;let u=await (0,l.openWorkspace)(),[v,w,x,y,z,A,B]=await Promise.all([(0,j.loadSkills)(u),(0,h.listNoteIndex)(),(0,h.listAlwaysLoaded)(),(0,n.listConnectedToolNames)(),(0,f.listJobBots)(),(0,k.listRecentTurns)(d.RECENT_CALL.rows),(0,k.readCallSkillsOn)()]),C=await (0,g.listCallJobs)(A.map(a=>a.callId)),D=w.filter(a=>(0,i.isAlwaysListed)(a.path)&&0===a.factCount),E=[`You are Thursday, a personal voice assistant modeled on Friday, the AI in *Iron Man* — quick, warm, dry, on their side. ${(0,o.nowLine)()}
1
+ module.exports=[614747,a=>a.a(async(b,c)=>{try{var d=a.i(569572),e=a.i(762008),f=a.i(221214),g=a.i(84929),h=a.i(986743),i=a.i(661210),j=a.i(138100),k=a.i(569549),l=a.i(821415),m=a.i(176668),n=a.i(644468),o=a.i(938934),p=b([f,g,h,k,n]);async function q(a,b){var c,p,q;let u=await (0,l.openWorkspace)(),[v,w,x,y,z,A,B]=await Promise.all([(0,j.loadSkills)(u),(0,h.listNoteIndex)(),(0,h.listAlwaysLoaded)(),(0,n.listConnectedToolNames)(),(0,f.listJobBots)(),(0,k.listRecentTurns)(d.RECENT_CALL.rows),(0,k.readCallSkillsOn)()]),C=await (0,g.listCallJobs)(A.map(a=>a.callId)),D=w.filter(a=>(0,i.isAlwaysListed)(a.path)&&0===a.factCount),E=[`You are Thursday, this user's own personal assistant — one to one, modeled on Friday, the AI in *Iron Man*: quick, warm, dry, on their side. You work for them alone, and you become more theirs the more you know about them: who they are, the people in their life, what they are in the middle of, how they like things done. ${(0,o.nowLine)()}
2
2
 
3
- This is a call, not a chat: one or two sentences a turn. If you did not catch something, say so and ask again.`,function(a,b){let{crowded:c,heavy:f}=(0,o.tidying)(a),g=`## Memory
3
+ This is a call, not a chat: one or two sentences a turn. If you did not catch something, say so and ask again.`,function(a,b){let{crowded:c}=(0,o.tidying)(a),d=`## Memory
4
4
 
5
- What you have kept from talking with this user — the only thing that survives a session.`,h=b.length?`Already known — carried into every call:
5
+ What you have kept from talking with this user — the only thing that survives a session.`,f=b.length?`Already known — carried into every call:
6
6
 
7
- ${(0,o.carriedLines)(b)}`:"",j=`path — what is under it (facts) "what the user calls it"
7
+ ${(0,o.carriedLines)(b)}`:"",g=`path — what is under it (facts) "what the user calls it"
8
8
 
9
9
  ${(0,o.noteLines)(a,c)}
10
10
 
11
11
  Open a note before answering out of it; a topic not listed is one you know nothing about. A fact marked \`said\` came from a call; open that call with \`${e.TOOL_NAMES.memory_conversation}\` only when the line itself cannot answer — exactly what they said, or why it was saved.
12
12
 
13
- Anything worth knowing next time goes in the moment it comes up, without asking — one fact per line, dates as dates. A rule they lay down for you — their language, how long an answer runs, when to hang up — is \`alwaysLoad\`; unsaved, it dies with the call. What stopped being true is corrected with \`replaces\`, not left standing beside it. Never claim to remember what you did not save.
13
+ Everything about them worth knowing next time goes in with \`${e.TOOL_NAMES.memory_remember}\` as it comes up, without asking — where it belongs is below. Never claim to remember what you did not save.
14
14
 
15
- ${i.MEMORY_PATHS.map(a=>`- ${a.path} — ${a.of}`).join("\n")}`,k=f.length?`${[...f].sort((a,b)=>b.factCount-a.factCount).slice(0,3).map(a=>`${a.path} (${a.factCount})`).join(", ")} ${f.length>1?"have":"has"} grown past ${d.MEMORY_LIMITS.factsPerNote} facts, more than one note holds well. Put ${f.length>1?"each":"it"} on their screen with \`${e.TOOL_NAMES.memory_show}\`, read back what is stale and forget only what they name.`:"",l=c?`Memory is past ${d.MEMORY_LIMITS.facts} facts in all. The coldest notes are ${a.slice(-4).map(a=>a.path).join(", ")} — ask whether any of them is still worth keeping, and delete the note if not.`:"",m=[k,l].filter(Boolean).join(" ");return[g,h,j,m&&`${m} Get this settled before anything else you would bring up yourself — not before what they came to you with.`].filter(Boolean).join("\n\n")}(w,x),function(a){if(0===a.roster.length)return"";let b=`## Bots
15
+ ${i.MEMORY_PATHS.map(a=>`- ${a.path} — ${a.of}`).join("\n")}`;return[d,f,g].filter(Boolean).join("\n\n")}(w,x),function(a){if(0===a.roster.length)return"";let b=`## Bots
16
16
 
17
17
  Who you hand work to — the names \`${e.TOOL_NAMES.delegate}\` takes.
18
18
 
@@ -20,7 +20,7 @@ ${a.roster.map(a=>`- **${a.name}** — ${a.description}`).join("\n")}`,c=[a.skil
20
20
  ${(0,o.skillLines)(a.skills,{short:!0})}`:"",a.mcpTools.length?`**Connected services** a bot can run tools inside:
21
21
  ${(0,o.mcpServerLines)(a.mcpTools)}`:""].filter(Boolean),d=c.length?`Not yours, and not names to hand work to:
22
22
 
23
- ${c.join("\n\n")}`:"",f=`**Anything that takes more than a few seconds is a bot's** — one note or one file is yours. \`${e.TOOL_NAMES.delegate}\` answers at once: say who has it and keep talking. Put the request in their own words, with what it stands on and nothing they did not say; if something only they can say is missing — how much, which one, by when — ask that first.
23
+ ${c.join("\n\n")}`:"",f=`**Anything that takes more than a few seconds is a bot's** — one note or one file is yours. \`${e.TOOL_NAMES.delegate}\` answers at once: say who has it and keep talking. Put the request in their own words, with what it stands on, including anything they have told you about how they want work done, and nothing they did not say; if something only they can say is missing — how much, which one, by when — ask that first.
24
24
 
25
25
  **The conversation belongs to the job, not to the bot** — hand the same bot a second job and it starts from nothing, knowing neither what was asked nor what it found. So more about a job you already handed over goes to \`${e.TOOL_NAMES.task}\` by its name, and the bot wakes with that job's own thread; with no name given it takes the one that moved last.`;return[b,"**A bot has the whole machine** — this computer, a real browser, the web, files, a shell to build whatever is missing — and far more time than you. It signs in where it has to, with the window in front of them, and carries a job to the end: the account made, the page built. How, and whether, is its call; yours is what they want — so a thing you have no idea how to do is a job, not a no. Bots borrow each other, so a job that spans several things is still one job for one bot.",d,f,"A job comes back as a system note, not the user speaking. **It was written to you, not to them** — its length is not how much to say, and the whole of it is already on their screen. Give them the part that answers what they asked, in one sentence, in your own words. A file it names opens there by itself — say what it holds, not the path. A question arrives the same way: answer it yourself if you can, else read them the options and send back what they say."].filter(Boolean).join("\n\n")}({roster:z,skills:B?[]:v,mcpTools:y}),(c=B?v:[],0===c.length?"":`## Skills
26
26
 
@@ -35,7 +35,11 @@ What was said on the last calls, verbatim, newest last. This is the past: pick i
35
35
  A \`${e.TOOL_NAMES.delegate}\` line carries the job's handle and how it ended; the handle is for \`${e.TOOL_NAMES.task}\`, never said out loud. What they ask for now is often one of these carried further, not a new job.
36
36
 
37
37
  ${(0,o.recentCallLines)(p.map(a=>({...a,jobs:q.filter(b=>b.callId===a.callId)})),d.RECENT_CALL.tokens)}`:""),s(a)].filter(Boolean).join("\n\n");return(0,o.logPromptSize)("thursday",E),m.logger.debug(`thursday prompt
38
- ${E}`),{text:E,peers:z.map(a=>a.name),opening:D.some(a=>"profile"===a.path)?r(b):null}}[f,g,h,k,n]=p.then?(await p)():p;let r=a=>`[First call — nothing is known about this user yet, and this call is where that changes. This is not the user speaking.
38
+ ${E}`),{text:E,peers:z.map(a=>a.name),opening:D.some(a=>"profile"===a.path)?r(b):function(a){let{crowded:b,heavy:c}=(0,o.tidying)(a);if(!b&&0===c.length)return null;let e=c.length?`${[...c].sort((a,b)=>b.factCount-a.factCount).slice(0,3).map(a=>`${a.path} (${a.factCount})`).join(", ")} ${c.length>1?"have":"has"} grown past ${d.MEMORY_LIMITS.factsPerNote} facts, more than one note holds well.`:"",f=a.reduce((a,b)=>a+b.factCount,0),g=b?`Memory holds ${f} facts in all, past ${d.MEMORY_LIMITS.facts}; the coldest notes are ${a.slice(-4).map(a=>a.path).join(", ")}.`:"";return`[Memory needs tidying — this is not the user speaking.
39
+
40
+ ${[e,g].filter(Boolean).join(" ")}
41
+
42
+ Greet them and bring this up before anything of your own — if they open with something they need, that comes first. Go through it with them: read out what looks out of date a few facts at a time, and forget only what they tell you to drop, a whole note if they say so.]`}(w)}}[f,g,h,k,n]=p.then?(await p)():p;let r=a=>`[First call — nothing is known about this user yet, and this call is where that changes. This is not the user speaking.
39
43
 
40
44
  Open the conversation yourself: greet them in one line and ask what to call them.${a?` Say it in the language of \`${a}\` — that is what their browser is set to, and it is the only thing known about them so far. If they answer in another language, that one wins from then on.`:""}
41
45
 
@@ -52,6 +56,6 @@ ${a.trim()}`:"",t=a=>`## Environment
52
56
  Current Cwd: ${a}
53
57
  Platform: ${process.platform}
54
58
 
55
- Where \`${e.TOOL_NAMES.bash}\` runs, and what the paths you get back are relative to. Yours to use while you talk: open a file, play something, look at what is on the machine — one command is a thing you do, not a job you hand over.`;a.s(["loadThursdayPrompt",0,q]),c()}catch(a){c(a)}},!1),260210,a=>{"use strict";var b=a.i(137936),c=a.i(912714),d=a.i(750227);a.i(569572),a.i(684321);var e=a.i(821415),f=a.i(293480);async function g(a){let b=await (0,e.insideWorkspace)(a);return b?.startsWith(e.ARTIFACTS+d.sep)||(0,f.publicError)("Not an artifact"),b}async function h(a){let b=await g(a),d=await (0,c.stat)(b).catch(()=>null);d||(0,f.publicError)("File not found"),d.isFile()||(0,f.publicError)("That is a folder, not a file"),await (0,c.rm)(b)}var i=a.i(225689),j=a.i(713095);let k=(0,i.serverAction)(async a=>{let b=a.trim();b||(0,f.publicError)("Which file?"),await h(b)});(0,j.ensureServerEntryExports)([k]),(0,b.registerServerReference)(k,"7fcb8973f9c88ffb3dd3e12eeeb7dfe80f2f1eb188",null),a.s(["deleteArtifactAction",0,k],260210)},362562,(a,b,c)=>{b.exports=a.x("module",()=>require("module"))},910350,a=>a.a(async(b,c)=>{try{var d=a.i(137936),e=a.i(53112),f=a.i(689656),g=a.i(225689),h=a.i(293480),i=a.i(221214),j=a.i(674986),k=a.i(446957),l=a.i(636616),m=a.i(84929),n=a.i(713095),o=b([i,j,m]);[i,j,m]=o.then?(await o)():o;let p=(0,g.serverAction)(async a=>{let b=k.BotFormSchema.parse(a),c=await (0,i.createBot)(b);return c||(0,h.publicError)(`"${b.name}" already exists`),{name:c.name}}),q=(0,g.serverAction)(async(a,b)=>{let c=k.BotFormSchema.partial().parse(b);await (0,i.updateBot)(a,c)||(0,h.publicError)("Bot not found")}),r=e.z.object({name:e.z.string().trim().min(1).max(80),provider:f.textModelProviderSchema.nullish(),model:e.z.string().trim().min(1).max(80).nullish(),color:k.botIconSchema.shape.color}),s=(0,g.serverAction)(async a=>{let b=r.array().max(20).parse(a),c=(0,l.rollSeedColors)(),d=[];for(let[a,e]of b.entries()){let b=(0,l.findBotSeed)(e.name);if(!b)continue;let f=await (0,i.createBot)({name:b.name,description:b.description,systemPrompt:b.systemPrompt,icon:{...b.icon,color:e.color??c[a%c.length]},provider:e.provider,model:e.model,toolIds:[]});f&&d.push(f.name)}return{created:d}}),t=(0,g.serverAction)(async a=>{await (0,i.deleteBot)(a)||(0,h.publicError)("Bot not found")}),u=(0,g.serverAction)(async a=>{await (0,i.writeBotMemoryOn)(!0===a)}),v=(0,g.serverAction)(async(a,b)=>{let c,d,e=b.trim();e||(0,h.publicError)("Nothing to hand over.");let f=await (0,i.findBot)(a);f||(0,h.publicError)(`No bot called "${a}".`);let g=(d=(c=e.replace(/\s+/g," ").trim().split(" ")).slice(0,4).join(" "),(c.length>4?`${d}…`:d).slice(0,60));return{id:await (0,j.startTask)({bot:f.name,request:e,label:g}),label:g,bot:f.name}}),w=(0,g.serverAction)(async(a,b)=>{let c=await (0,m.resolveTask)(a);return c||(0,h.publicError)(`No job called "${a}".`),b.trim()||(0,h.publicError)("Nothing to tell it."),await (0,j.answerTask)(c.id,b.trim()),{id:c.id,label:c.label,status:"running"}}),x=(0,g.serverAction)(async a=>{let b=await (0,m.resolveTask)(a);return b||(0,h.publicError)(`No job called "${a}".`),await (0,j.cancelTask)(b.id),{id:b.id,label:b.label,status:"cancelled"}}),y=(0,g.serverAction)(async a=>{await (0,m.markSeen)(a.filter(a=>"string"==typeof a&&a))}),z=(0,g.serverAction)(async a=>{await (0,j.removeTask)(a)||(0,h.publicError)("Task not found")}),A=(0,g.serverAction)(async()=>({removed:await (0,j.removeFinishedTasks)()}));(0,n.ensureServerEntryExports)([p,q,s,t,u,v,w,x,y,z,A]),(0,d.registerServerReference)(p,"7fa56dad6d8a2bc8e9fc327be0fad0827edc696eae",null),(0,d.registerServerReference)(q,"7fd5c4f6e679d30ce1d78bbf71c52bcd215ebfc1ac",null),(0,d.registerServerReference)(s,"7f146977640e230a08d980d2d2ec28e7dcf4438f21",null),(0,d.registerServerReference)(t,"7f74ef3be000997b6c5ad71b82e000a986cfde753a",null),(0,d.registerServerReference)(u,"7fb8ea5c85b220f5ff05764cb61851edf3871e8663",null),(0,d.registerServerReference)(v,"7f3ab92bbd495ee087cfb7b701c5f8af0d813bcf67",null),(0,d.registerServerReference)(w,"7f5bc96ea47ad8a575bfdee5fedc10d3a60faa0387",null),(0,d.registerServerReference)(x,"7f02f750f851a61ed3c2676040dea1e1ded9819205",null),(0,d.registerServerReference)(y,"7f15442d74ed44708143e5eb45805be0e17c010418",null),(0,d.registerServerReference)(z,"7fcad43ea4ae0039c0186bcc86a4e3b3a0e706caa4",null),(0,d.registerServerReference)(A,"7f673b8897006f8ae8c1a709d306fe394476e76d0b",null),a.s(["answerTaskAction",0,w,"cancelTaskAction",0,x,"clearFinishedTasksAction",0,A,"createBotAction",0,p,"createSeedBotsAction",0,s,"deleteBotAction",0,t,"deleteTaskAction",0,z,"markSeenAction",0,y,"setBotMemoryOnAction",0,u,"startTaskAction",0,v,"updateBotAction",0,q]),c()}catch(a){c(a)}},!1),937864,a=>a.a(async(b,c)=>{try{var d=a.i(137936),e=a.i(53112),f=a.i(652619),g=a.i(225689),h=a.i(293480),i=a.i(688034),j=a.i(725466),k=a.i(713095),l=b([f,j]);[f,j]=l.then?(await l)():l;let m=e.z.enum(i.CONFIG_KEYS),n=(0,g.serverAction)(async(a,b)=>{let c=e.z.object({key:m,value:e.z.string().trim().min(1)}).parse({key:a,value:b}),d=i.CONFIG_ENTRIES[c.key];d?.signIn&&(0,h.publicError)(`${d.label} takes a sign-in, not a key.`),d?.choices?(0,i.acceptsChoice)(d,c.value)||(0,h.publicError)("That is not one of the options."):c.value.length<8&&(0,h.publicError)("That does not look like a key"),await (0,j.writeConfig)(c.key,c.value)}),o=(0,g.serverAction)(async a=>{await (0,j.removeConfig)(m.parse(a))}),p=(0,g.serverAction)(async()=>(0,f.startChatGptSignIn)());(0,k.ensureServerEntryExports)([n,o,p]),(0,d.registerServerReference)(n,"7f37945ceb686a8a33e09428221c3e9cd25fdcbbe6",null),(0,d.registerServerReference)(o,"7f9bc624b9c7f137e24cde3bf2bd49ab2a3d39404c",null),(0,d.registerServerReference)(p,"7fafe9889bfe63d1e391f146da7740d5e4f0039cbc",null),a.s(["removeConfigAction",0,o,"setConfigAction",0,n,"startChatGptSignInAction",0,p]),c()}catch(a){c(a)}},!1),935930,a=>a.a(async(b,c)=>{try{var d=a.i(137936),e=a.i(569572),f=a.i(947950),g=a.i(899284),h=a.i(225689),i=a.i(293480),j=a.i(182248),k=a.i(317844),l=a.i(713095),m=b([f,k]);[f,k]=m.then?(await m)():m;let o=(0,h.serverAction)(async a=>{let b=g.MCPServerFormSchema.parse(a);b.name===e.STUDIO_SERVER&&(0,i.publicError)(`"${e.STUDIO_SERVER}" is the app's own — pick another name`);let c=!!await (0,f.findServerDetail)(b.name);await (0,f.upsertServer)(b);let d=await n(b.name);return"error"!==d.status||c||await (0,f.deleteServer)(b.name),d}),p=(0,h.serverAction)(async a=>(await k.mcpManager.disconnect(a),n(a))),q=(0,h.serverAction)(async a=>{await k.mcpManager.disconnect(a),await (0,f.deleteServer)(a)||(0,i.publicError)("Server not found")});async function n(a){try{let b=await k.mcpManager.connect(a);return"auth_required"===b.status?{name:a,status:"auth_required",authorizationUrl:b.authorizationUrl,toolCount:0}:{name:a,status:"connected",toolCount:b.tools.length}}catch(b){return{name:a,status:"error",toolCount:0,error:(0,j.errorToString)(b)}}}let r=(0,h.serverAction)(async(a,b,c)=>{try{return await k.mcpManager.callTool(a,b,c)}catch(a){a instanceof k.McpAuthRequiredError&&(0,i.publicError)("Authorization required — reconnect this server first"),(0,i.publicError)((0,j.errorToString)(a))}});(0,l.ensureServerEntryExports)([o,p,q,r]),(0,d.registerServerReference)(o,"7f0f31e6c8be9bc825768389fc145a1b3446503296",null),(0,d.registerServerReference)(p,"7f01ea36e10e34b1bdd93e76c79733f6d9944ba5ab",null),(0,d.registerServerReference)(q,"7f8b31e414a34ee8f44144711314836c2ef544e4d6",null),(0,d.registerServerReference)(r,"7f5794ac71620e44519ac5e4528c812ec673d30e36",null),a.s(["callToolAction",0,r,"deleteServerAction",0,q,"refreshServerAction",0,p,"registerServerAction",0,o]),c()}catch(a){c(a)}},!1),542715,a=>a.a(async(b,c)=>{try{var d=a.i(937864),e=a.i(910350);a.i(451208);var f=a.i(201300),g=a.i(439759);a.i(260210),a.i(432443);var h=a.i(935930),i=b([d,e,f,g,h]);[d,e,f,g,h]=i.then?(await i)():i,a.s([]),c()}catch(a){c(a)}},!1),873715,a=>a.a(async(b,c)=>{try{var d=a.i(542715),e=a.i(937864),f=a.i(910350),g=a.i(451208),h=a.i(201300),i=a.i(439759),j=a.i(260210),k=a.i(432443),l=a.i(935930),m=b([d,e,f,h,i,l]);[d,e,f,h,i,l]=m.then?(await m)():m,a.s(["7f01ea36e10e34b1bdd93e76c79733f6d9944ba5ab",()=>l.refreshServerAction,"7f02e7db8b28f260e8681ddc98e73321c154495252",()=>h.updateNoteAction,"7f02f750f851a61ed3c2676040dea1e1ded9819205",()=>f.cancelTaskAction,"7f0f31e6c8be9bc825768389fc145a1b3446503296",()=>l.registerServerAction,"7f146977640e230a08d980d2d2ec28e7dcf4438f21",()=>f.createSeedBotsAction,"7f147159e492165c6f3e725b6fb1e5b607e98e646a",()=>h.reviseFactAction,"7f15442d74ed44708143e5eb45805be0e17c010418",()=>f.markSeenAction,"7f194293e4c1ab83ed63877cc9d8b7aebf42b46bb8",()=>g.deleteWorkspaceFileAction,"7f238d60ec0427ba89cff15934ff099cbe1044619c",()=>h.createNoteAction,"7f37945ceb686a8a33e09428221c3e9cd25fdcbbe6",()=>e.setConfigAction,"7f3ab92bbd495ee087cfb7b701c5f8af0d813bcf67",()=>f.startTaskAction,"7f3acf83fcc379119e185d7a3834d5eed97ad0a1c1",()=>k.setSkillDisabledAction,"7f3ddbf37770ac395e5d1cbd8e5defa43d735b967a",()=>k.deleteSkillAction,"7f4d47e01fc323498dec73a09cf3336f5d4c1d51e0",()=>k.createSkillAction,"7f50cfd7d0e623e886552f9994a05a234251f6b400",()=>i.resetHistoryAction,"7f5794ac71620e44519ac5e4528c812ec673d30e36",()=>l.callToolAction,"7f5bc96ea47ad8a575bfdee5fedc10d3a60faa0387",()=>f.answerTaskAction,"7f647083e5350baa7762d6d282de825cdf6b737384",()=>g.openFileAction,"7f673b8897006f8ae8c1a709d306fe394476e76d0b",()=>f.clearFinishedTasksAction,"7f7158cd6d7b4345e5616c2f390c98da69d9b1cc59",()=>i.saveTurnsAction,"7f74ef3be000997b6c5ad71b82e000a986cfde753a",()=>f.deleteBotAction,"7f77eeed8de53bdd8bc4cea5fa47d4df68a64ffef9",()=>h.setFactAlwaysLoadAction,"7f8836b516d90511f9ac2025e946c291a9cd0d8174",()=>g.emptyScratchAction,"7f8b31e414a34ee8f44144711314836c2ef544e4d6",()=>l.deleteServerAction,"7f9a2b254168fd5502160348c9e187bc9a1f582de4",()=>h.forgetFactAction,"7f9bc624b9c7f137e24cde3bf2bd49ab2a3d39404c",()=>e.removeConfigAction,"7fa0f05df10fadbdbc32f656a9d5c05cd146302f7a",()=>i.deleteCallAction,"7fa56dad6d8a2bc8e9fc327be0fad0827edc696eae",()=>f.createBotAction,"7faf414a19a4e2dc232e5b58fb933b933518d61724",()=>i.endCallAction,"7fafe9889bfe63d1e391f146da7740d5e4f0039cbc",()=>e.startChatGptSignInAction,"7fb326617fb6fe0d74f20b79af1e912238def02960",()=>i.setCallSkillsAction,"7fb8ea5c85b220f5ff05764cb61851edf3871e8663",()=>f.setBotMemoryOnAction,"7fc31f84110d23b621f3e25a91911ccd4664d8643e",()=>h.deleteNoteAction,"7fcad43ea4ae0039c0186bcc86a4e3b3a0e706caa4",()=>f.deleteTaskAction,"7fcb8973f9c88ffb3dd3e12eeeb7dfe80f2f1eb188",()=>j.deleteArtifactAction,"7fd0bfd5ef4b8f7c1cce531ca4dba6996ada3534e0",()=>i.openCallAction,"7fd5c4f6e679d30ce1d78bbf71c52bcd215ebfc1ac",()=>f.updateBotAction,"7fda69a255fb7c5c5fd5401dd0430ccfc6d9ebd601",()=>h.addFactsAction,"7fe2a2ec036940cdf16482cfbd7aecf01f5571fe5a",()=>i.deleteEndedCallsAction,"7fe6ee51994f51caff9011049ffe2a9aa4153d8a4e",()=>k.uploadSkillAction]),c()}catch(a){c(a)}},!1),201300,a=>a.a(async(b,c)=>{try{var d=a.i(137936),e=a.i(53112),f=a.i(569572),g=a.i(986743),h=a.i(661210),i=a.i(225689),j=a.i(293480),k=a.i(713095),l=b([g]);[g]=l.then?(await l)():l;let m=e.z.string().trim().refine(h.isMemoryPath,"Invalid note path"),n=(0,i.serverAction)(async(a,b,c=[])=>{let d=m.parse(a),f=e.z.string().min(1).parse(b),h=await (0,g.createNote)(d,f,{ownedByUser:!0});for(let a of(h||(0,j.publicError)("Note already exists"),c.map(a=>a.trim()).filter(Boolean)))await (0,g.addFact)(h.id,a);return{id:h.id}}),o=(0,i.serverAction)(async(a,b)=>{await (0,g.updateNote)(a,b)||(0,j.publicError)("Note not found")}),p=(0,i.serverAction)(async a=>{await (0,g.deleteNote)(a)||(0,j.publicError)("Note not found")}),q=(0,i.serverAction)(async(a,b)=>{let c=b.map(a=>a.trim()).filter(Boolean);for(let b of(0===c.length&&(0,j.publicError)("Fact text is required"),c))await (0,g.addFact)(a,b);return{added:c.length}}),r=(0,i.serverAction)(async(a,b,c)=>{c.trim()||(0,j.publicError)("Fact text is required"),await (0,g.reviseFact)(a,b,c.trim())||(0,j.publicError)("Fact not found")}),s=(0,i.serverAction)(async(a,b)=>{await (0,g.forgetFact)(a,b)||(0,j.publicError)("Fact not found")}),t=(0,i.serverAction)(async(a,b,c)=>{let d=await (0,g.setFactAlwaysLoad)(a,b,c);"full"===d&&(0,j.publicError)(`Only ${f.MEMORY_LIMITS.carried} facts can be carried into every call — drop one first`),"missing"===d&&(0,j.publicError)("Fact not found")});(0,k.ensureServerEntryExports)([n,o,p,q,r,s,t]),(0,d.registerServerReference)(n,"7f238d60ec0427ba89cff15934ff099cbe1044619c",null),(0,d.registerServerReference)(o,"7f02e7db8b28f260e8681ddc98e73321c154495252",null),(0,d.registerServerReference)(p,"7fc31f84110d23b621f3e25a91911ccd4664d8643e",null),(0,d.registerServerReference)(q,"7fda69a255fb7c5c5fd5401dd0430ccfc6d9ebd601",null),(0,d.registerServerReference)(r,"7f147159e492165c6f3e725b6fb1e5b607e98e646a",null),(0,d.registerServerReference)(s,"7f9a2b254168fd5502160348c9e187bc9a1f582de4",null),(0,d.registerServerReference)(t,"7f77eeed8de53bdd8bc4cea5fa47d4df68a64ffef9",null),a.s(["addFactsAction",0,q,"createNoteAction",0,n,"deleteNoteAction",0,p,"forgetFactAction",0,s,"reviseFactAction",0,r,"setFactAlwaysLoadAction",0,t,"updateNoteAction",0,o]),c()}catch(a){c(a)}},!1),432443,a=>{"use strict";var b,c,d,e=a.i(137936),f=(0,a.i(362562).createRequire)("/");try{c=(b=f("worker_threads")).Worker,d=b.isMarkedAsUntransferable}catch(a){}var g=c?function(a,b,e,f,g){var h=!1,i=new c(a+";var __w=require('worker_threads');__w.parentPort.on('message',function(m){onmessage({data:m})}),postMessage=function(m,t){__w.parentPort.postMessage(m,t)},close=process.exit;self=global",{eval:!0}).on("error",function(a){return g(a,null)}).on("message",function(a){return g(null,a)}).on("exit",function(a){a&&!h&&g(Error("exited with code "+a),null)});return d&&(f=f.filter(function(a){return!d(a)})),i.postMessage(e,f),i.terminate=function(){return h=!0,c.prototype.terminate.call(i)},i}:function(a,b,c,d,e){setImmediate(function(){return e(Error("async operations unsupported - update to Node 12+ (or Node 10-11 with the --experimental-worker CLI flag)"),null)});var f=function(){};return{terminate:f,postMessage:f}},h=Uint8Array,i=Uint16Array,j=Int32Array,k=new h([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),l=new h([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),m=new h([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),n=function(a,b){for(var c=new i(31),d=0;d<31;++d)c[d]=b+=1<<a[d-1];for(var e=new j(c[30]),d=1;d<30;++d)for(var f=c[d];f<c[d+1];++f)e[f]=f-c[d]<<5|d;return{b:c,r:e}},b=n(k,2),o=b.b,p=b.r;o[28]=258,p[258]=28;for(var q=n(l,0),r=q.b,s=q.r,t=new i(32768),u=0;u<32768;++u){var v=(43690&u)>>1|(21845&u)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,t[u]=((65280&v)>>8|(255&v)<<8)>>1}for(var w=function(a,b,c){for(var d,e=a.length,f=0,g=new i(b);f<e;++f)a[f]&&++g[a[f]-1];var h=new i(b);for(f=1;f<b;++f)h[f]=h[f-1]+g[f-1]<<1;if(c){d=new i(1<<b);var j=15-b;for(f=0;f<e;++f)if(a[f])for(var k=f<<4|a[f],l=b-a[f],m=h[a[f]-1]++<<l,n=m|(1<<l)-1;m<=n;++m)d[t[m]>>j]=k}else for(d=new i(e),f=0;f<e;++f)a[f]&&(d[f]=t[h[a[f]-1]++]>>15-a[f]);return d},x=new h(288),u=0;u<144;++u)x[u]=8;for(var u=144;u<256;++u)x[u]=9;for(var u=256;u<280;++u)x[u]=7;for(var u=280;u<288;++u)x[u]=8;for(var y=new h(32),u=0;u<32;++u)y[u]=5;var z=w(x,9,0),A=w(x,9,1),B=w(y,5,0),C=w(y,5,1),D=function(a){for(var b=a[0],c=1;c<a.length;++c)a[c]>b&&(b=a[c]);return b},E=function(a,b,c){var d=b/8|0;return(a[d]|a[d+1]<<8)>>(7&b)&c},F=function(a,b){var c=b/8|0;return(a[c]|a[c+1]<<8|a[c+2]<<16)>>(7&b)},G=function(a){return(a+7)/8|0},H=function(a,b,c){return(null==b||b<0)&&(b=0),(null==c||c>a.length)&&(c=a.length),new h(a.subarray(b,c))},I=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],J=function(a,b,c){var d=Error(b||I[a]);if(d.code=a,Error.captureStackTrace&&Error.captureStackTrace(d,J),!c)throw d;return d},K=function(a,b,c,d){var e=a.length,f=d?d.length:0;if(!e||b.f&&!b.l)return c||new h(0);var g=!c,i=g||2!=b.i,j=b.i;g&&(c=new h(3*e));var n=function(a){var b=c.length;if(a>b){var d=new h(Math.max(2*b,a));d.set(c),c=d}},p=b.f||0,q=b.p||0,s=b.b||0,t=b.l,u=b.d,v=b.m,x=b.n,y=8*e;do{if(!t){p=E(a,q,1);var z=E(a,q+1,3);if(q+=3,z)if(1==z)t=A,u=C,v=9,x=5;else if(2==z){var B=E(a,q,31)+257,I=E(a,q+10,15)+4,K=B+E(a,q+5,31)+1;q+=14;for(var L=new h(K),M=new h(19),N=0;N<I;++N)M[m[N]]=E(a,q+3*N,7);q+=3*I;for(var O=D(M),P=(1<<O)-1,Q=w(M,O,1),N=0;N<K;){var R=Q[E(a,q,P)];q+=15&R;var S=R>>4;if(S<16)L[N++]=S;else{var T=0,U=0;for(16==S?(U=3+E(a,q,3),q+=2,T=L[N-1]):17==S?(U=3+E(a,q,7),q+=3):18==S&&(U=11+E(a,q,127),q+=7);U--;)L[N++]=T}}var V=L.subarray(0,B),W=L.subarray(B);v=D(V),x=D(W),t=w(V,v,1),u=w(W,x,1)}else J(1);else{var S=G(q)+4,X=a[S-4]|a[S-3]<<8,Y=S+X;if(Y>e){j&&J(0);break}i&&n(s+X),c.set(a.subarray(S,Y),s),b.b=s+=X,b.p=q=8*Y,b.f=p;continue}if(q>y){j&&J(0);break}}i&&n(s+131072);for(var Z=(1<<v)-1,$=(1<<x)-1,_=q;;_=q){var T=t[F(a,q)&Z],aa=T>>4;if((q+=15&T)>y){j&&J(0);break}if(T||J(2),aa<256)c[s++]=aa;else if(256==aa){_=q,t=null;break}else{var ab=aa-254;if(aa>264){var N=aa-257,ac=k[N];ab=E(a,q,(1<<ac)-1)+o[N],q+=ac}var ad=u[F(a,q)&$],ae=ad>>4;ad||J(3),q+=15&ad;var W=r[ae];if(ae>3){var ac=l[ae];W+=F(a,q)&(1<<ac)-1,q+=ac}if(q>y){j&&J(0);break}i&&n(s+131072);var af=s+ab;if(s<W){var ag=f-W,ah=Math.min(W,af);for(ag+s<0&&J(3);s<ah;++s)c[s]=d[ag+s]}for(;s<af;++s)c[s]=c[s-W]}}b.l=t,b.p=_,b.b=s,b.f=p,t&&(p=1,b.m=v,b.d=u,b.n=x)}while(!p)return s!=c.length&&g?H(c,0,s):c.subarray(0,s)},L=function(a,b,c){c<<=7&b;var d=b/8|0;a[d]|=c,a[d+1]|=c>>8},M=function(a,b,c){c<<=7&b;var d=b/8|0;a[d]|=c,a[d+1]|=c>>8,a[d+2]|=c>>16},N=function(a,b){for(var c=[],d=0;d<a.length;++d)a[d]&&c.push({s:d,f:a[d]});var e=c.length,f=c.slice();if(!e)return{t:U,l:0};if(1==e){var g=new h(c[0].s+1);return g[c[0].s]=1,{t:g,l:1}}c.sort(function(a,b){return a.f-b.f}),c.push({s:-1,f:25001});var j=c[0],k=c[1],l=0,m=1,n=2;for(c[0]={s:-1,f:j.f+k.f,l:j,r:k};m!=e-1;)j=c[c[l].f<c[n].f?l++:n++],k=c[l!=m&&c[l].f<c[n].f?l++:n++],c[m++]={s:-1,f:j.f+k.f,l:j,r:k};for(var o=f[0].s,d=1;d<e;++d)f[d].s>o&&(o=f[d].s);var p=new i(o+1),q=O(c[m-1],p,0);if(q>b){var d=0,r=0,s=q-b,t=1<<s;for(f.sort(function(a,b){return p[b.s]-p[a.s]||a.f-b.f});d<e;++d){var u=f[d].s;if(p[u]>b)r+=t-(1<<q-p[u]),p[u]=b;else break}for(r>>=s;r>0;){var v=f[d].s;p[v]<b?r-=1<<b-p[v]++-1:++d}for(;d>=0&&r;--d){var w=f[d].s;p[w]==b&&(--p[w],++r)}q=b}return{t:new h(p),l:q}},O=function(a,b,c){return -1==a.s?Math.max(O(a.l,b,c+1),O(a.r,b,c+1)):b[a.s]=c},P=function(a){for(var b=a.length;b&&!a[--b];);for(var c=new i(++b),d=0,e=a[0],f=1,g=function(a){c[d++]=a},h=1;h<=b;++h)if(a[h]==e&&h!=b)++f;else{if(!e&&f>2){for(;f>138;f-=138)g(32754);f>2&&(g(f>10?f-11<<5|28690:f-3<<5|12305),f=0)}else if(f>3){for(g(e),--f;f>6;f-=6)g(8304);f>2&&(g(f-3<<5|8208),f=0)}for(;f--;)g(e);f=1,e=a[h]}return{c:c.subarray(0,d),n:b}},Q=function(a,b){for(var c=0,d=0;d<b.length;++d)c+=a[d]*b[d];return c},R=function(a,b,c){var d=c.length,e=G(b+2);a[e]=255&d,a[e+1]=d>>8,a[e+2]=255^a[e],a[e+3]=255^a[e+1];for(var f=0;f<d;++f)a[e+f+4]=c[f];return(e+4+d)*8},S=function(a,b,c,d,e,f,g,h,j,n,o){L(b,o++,c),++e[256];for(var p,q,r,s,t=N(e,15),u=t.t,v=t.l,A=N(f,15),C=A.t,D=A.l,E=P(u),F=E.c,G=E.n,H=P(C),I=H.c,J=H.n,K=new i(19),O=0;O<F.length;++O)++K[31&F[O]];for(var O=0;O<I.length;++O)++K[31&I[O]];for(var S=N(K,7),T=S.t,U=S.l,V=19;V>4&&!T[m[V-1]];--V);var W=n+5<<3,X=Q(e,x)+Q(f,y)+g,Y=Q(e,u)+Q(f,C)+g+14+3*V+Q(K,T)+2*K[16]+3*K[17]+7*K[18];if(j>=0&&W<=X&&W<=Y)return R(b,o,a.subarray(j,j+n));if(L(b,o,1+(Y<X)),o+=2,Y<X){p=w(u,v,0),q=u,r=w(C,D,0),s=C;var Z=w(T,U,0);L(b,o,G-257),L(b,o+5,J-1),L(b,o+10,V-4),o+=14;for(var O=0;O<V;++O)L(b,o+3*O,T[m[O]]);o+=3*V;for(var $=[F,I],_=0;_<2;++_)for(var aa=$[_],O=0;O<aa.length;++O){var ab=31&aa[O];L(b,o,Z[ab]),o+=T[ab],ab>15&&(L(b,o,aa[O]>>5&127),o+=aa[O]>>12)}}else p=z,q=x,r=B,s=y;for(var O=0;O<h;++O){var ac=d[O];if(ac>255){var ab=ac>>18&31;M(b,o,p[ab+257]),o+=q[ab+257],ab>7&&(L(b,o,ac>>23&31),o+=k[ab]);var ad=31&ac;M(b,o,r[ad]),o+=s[ad],ad>3&&(M(b,o,ac>>5&8191),o+=l[ad])}else M(b,o,p[ac]),o+=q[ac]}return M(b,o,p[256]),o+q[256]},T=new j([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),U=new h(0),V=function(a,b,c,d,e,f){var g=f.z||a.length,m=new h(d+g+5*(1+Math.ceil(g/7e3))+e),n=m.subarray(d,m.length-e),o=f.l,q=7&(f.r||0);if(b){q&&(n[0]=f.r>>3);for(var r=T[b-1],t=r>>13,u=8191&r,v=(1<<c)-1,w=f.p||new i(32768),x=f.h||new i(v+1),y=Math.ceil(c/3),z=2*y,A=function(b){return(a[b]^a[b+1]<<y^a[b+2]<<z)&v},B=new j(25e3),C=new i(288),D=new i(32),E=0,F=0,I=f.i||0,J=0,K=f.w||0,L=0;I+2<g;++I){var M=A(I),N=32767&I,O=x[M];if(w[N]=O,x[M]=N,K<=I){var P=g-I;if((E>7e3||J>24576)&&(P>423||!o)){q=S(a,n,0,B,C,D,F,J,L,I-L,q),J=E=F=0,L=I;for(var Q=0;Q<286;++Q)C[Q]=0;for(var Q=0;Q<30;++Q)D[Q]=0}var U=2,V=0,W=u,X=N-O&32767;if(P>2&&M==A(I-X))for(var Y=Math.min(t,P)-1,Z=Math.min(32767,I),$=Math.min(258,P);X<=Z&&--W&&N!=O;){if(a[I+U]==a[I+U-X]){for(var _=0;_<$&&a[I+_]==a[I+_-X];++_);if(_>U){if(U=_,V=X,_>Y)break;for(var aa=Math.min(X,_-2),ab=0,Q=0;Q<aa;++Q){var ac=I-X+Q&32767,ad=w[ac],ae=ac-ad&32767;ae>ab&&(ab=ae,O=ac)}}}O=w[N=O],X+=N-O&32767}if(V){B[J++]=0x10000000|p[U]<<18|s[V];var af=31&p[U],ag=31&s[V];F+=k[af]+l[ag],++C[257+af],++D[ag],K=I+U,++E}else B[J++]=a[I],++C[a[I]]}}for(I=Math.max(I,K);I<g;++I)B[J++]=a[I],++C[a[I]];q=S(a,n,o,B,C,D,F,J,L,I-L,q),o||(f.r=7&q|n[q/8|0]<<3,q-=7,f.h=x,f.p=w,f.i=I,f.w=K)}else{for(var I=f.w||0;I<g+o;I+=65535){var ah=I+65535;ah>=g&&(n[q/8|0]=o,ah=g),q=R(n,q+1,a.subarray(I,ah))}f.i=g}return H(m,0,d+G(q)+e)},W=function(){for(var a=new Int32Array(256),b=0;b<256;++b){for(var c=b,d=9;--d;)c=(1&c&&-0x12477ce0)^c>>>1;a[b]=c}return a}(),X=function(){var a=-1;return{p:function(b){for(var c=a,d=0;d<b.length;++d)c=W[255&c^b[d]]^c>>>8;a=c},d:function(){return~a}}},Y=function(){var a=1,b=0;return{p:function(c){for(var d=a,e=b,f=0|c.length,g=0;g!=f;){for(var h=Math.min(g+2655,f);g<h;++g)e+=d+=c[g];d=(65535&d)+15*(d>>16),e=(65535&e)+15*(e>>16)}a=d,b=e},d:function(){return a%=65521,b%=65521,(255&a)<<24|(65280&a)<<8|(255&b)<<8|b>>8}}},Z=function(a,b,c,d,e){if(!e&&(e={l:1},b.dictionary)){var f=b.dictionary.subarray(-32768),g=new h(f.length+a.length);g.set(f),g.set(a,f.length),a=g,e.w=f.length}return V(a,null==b.level?6:b.level,null==b.mem?e.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):20:12+b.mem,c,d,e)},$=function(a,b){var c={};for(var d in a)c[d]=a[d];for(var d in b)c[d]=b[d];return c},_=function(a,b,c){for(var d=a(),e=a.toString(),f=e.slice(e.indexOf("[")+1,e.lastIndexOf("]")).replace(/\s+/g,"").split(","),g=0;g<d.length;++g){var h=d[g],i=f[g];if("function"==typeof h){b+=";"+i+"=";var j=h.toString();if(h.prototype)if(-1!=j.indexOf("[native code]")){var k=j.indexOf(" ",8)+1;b+=j.slice(k,j.indexOf("(",k))}else for(var l in b+=j,h.prototype)b+=";"+i+".prototype."+l+"="+h.prototype[l].toString();else b+=j}else c[i]=h}return b},aa=[],ab=function(a){var b=[];for(var c in a)a[c].buffer&&b.push((a[c]=new a[c].constructor(a[c])).buffer);return b},ac=function(a,b,c,d){if(!aa[c]){for(var e="",f={},h=a.length-1,i=0;i<h;++i)e=_(a[i],e,f);aa[c]={c:_(a[h],e,f),e:f}}var j=$({},aa[c].e);return g(aa[c].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+b.toString()+"}",c,j,ab(j),d)},ad=function(){return[h,i,j,k,l,m,o,r,A,C,t,I,w,D,E,F,G,H,J,K,aB,ah,ai]},ae=function(){return[h,i,j,k,l,m,p,s,z,x,B,y,t,T,U,w,L,M,N,O,P,Q,R,S,G,H,V,Z,ay,ah]},af=function(){return[aq,ar]},ag=function(){return[au]},ah=function(a){return postMessage(a,[a.buffer])},ai=function(a){return a&&{out:a.size&&new h(a.size),dictionary:a.dictionary}},aj=function(a){return a.ondata=function(a,b){return postMessage([a,b],[a.buffer])},function(b){b.data[0]?(a.push(b.data[0],b.data[1]),postMessage([b.data[0].length])):a.flush(b.data[1])}},ak=function(a,b,c,d,e,f,g){var h,i=ac(a,d,e,function(a,c){a?(i.terminate(),b.ondata.call(b,a)):Array.isArray(c)?1==c.length?(b.queuedSize-=c[0],b.ondrain&&b.ondrain(c[0])):(c[1]&&i.terminate(),b.ondata.call(b,a,c[0],c[1])):g(c)});i.postMessage(c),b.queuedSize=0,b.push=function(a,c){b.ondata||J(5),h&&b.ondata(J(4,0,1),null,!!c),b.queuedSize+=a.length,i.postMessage([a,h=c],a.buffer instanceof ArrayBuffer?[a.buffer]:[])},b.terminate=function(){i.terminate()},f&&(b.flush=function(a){i.postMessage([0,a])})},al=function(a,b){return a[b]|a[b+1]<<8},am=function(a,b){return(a[b]|a[b+1]<<8|a[b+2]<<16|a[b+3]<<24)>>>0},an=function(a,b){return am(a,b)+0x100000000*am(a,b+4)},ao=function(a,b,c){for(;c;++b)a[b]=c,c>>>=8},ap=function(a,b){var c=b.filename;if(a[0]=31,a[1]=139,a[2]=8,a[8]=b.level<2?4:2*(9==b.level),a[9]=3,0!=b.mtime&&ao(a,4,Math.floor(new Date(b.mtime||Date.now())/1e3)),c){a[3]=8;for(var d=0;d<=c.length;++d)a[d+10]=c.charCodeAt(d)}},aq=function(a){(31!=a[0]||139!=a[1]||8!=a[2])&&J(6,"invalid gzip data");var b=a[3],c=10;4&b&&(c+=(a[10]|a[11]<<8)+2);for(var d=(b>>3&1)+(b>>4&1);d>0;d-=!a[c++]);return c+(2&b)},ar=function(a){var b=a.length;return(a[b-4]|a[b-3]<<8|a[b-2]<<16|a[b-1]<<24)>>>0},as=function(a){return 10+(a.filename?a.filename.length+1:0)},at=function(a,b){var c=b.level;if(a[0]=120,a[1]=(0==c?0:c<6?1:9==c?3:2)<<6|(b.dictionary&&32),a[1]|=31-(a[0]<<8|a[1])%31,b.dictionary){var d=Y();d.p(b.dictionary),ao(a,2,d.d())}},au=function(a,b){return((15&a[0])!=8||a[0]>>4>7||(a[0]<<8|a[1])%31)&&J(6,"invalid zlib data"),(a[1]>>5&1)==+!b&&J(6,"invalid zlib data: "+(32&a[1]?"need":"unexpected")+" dictionary"),(a[1]>>3&4)+2};function av(a,b){return"function"==typeof a&&(b=a,a={}),this.ondata=b,a}var aw=function(){function a(a,b){if("function"==typeof a&&(b=a,a={}),this.ondata=b,this.o=a||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new h(98304),this.o.dictionary){var c=this.o.dictionary.subarray(-32768);this.b.set(c,32768-c.length),this.s.i=32768-c.length}}return a.prototype.p=function(a,b){this.ondata(Z(a,this.o,0,0,this.s),b)},a.prototype.push=function(a,b){this.ondata||J(5),this.s.l&&J(4);var c=a.length+this.s.z;if(c>this.b.length){if(c>2*this.b.length-32768){var d=new h(-32768&c);d.set(this.b.subarray(0,this.s.z)),this.b=d}var e=this.b.length-this.s.z;this.b.set(a.subarray(0,e),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(a.subarray(e),32768),this.s.z=a.length-e+32768,this.s.i=32766,this.s.w=32768}else this.b.set(a,this.s.z),this.s.z+=a.length;this.s.l=1&b,(this.s.z>this.s.w+8191||b)&&(this.p(this.b,b||!1),this.s.w=this.s.i,this.s.i-=2),b&&(this.s=this.o={},this.b=U)},a.prototype.flush=function(a){if(this.ondata||J(5),this.s.l&&J(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2,a){var b=new h(6);b[0]=this.s.r>>3;var c=R(b,this.s.r,U);this.s.r=0,this.ondata(b.subarray(0,c>>3),!1)}},a}(),ax=function(a,b){ak([ae,function(){return[aj,aw]}],this,av.call(this,a,b),function(a){onmessage=aj(new aw(a.data))},6,1)};function ay(a,b){return Z(a,b||{},0,0)}var az=function(){function a(a,b){"function"==typeof a&&(b=a,a={}),this.ondata=b;var c=a&&a.dictionary&&a.dictionary.subarray(-32768);this.s={i:0,b:c?c.length:0},this.o=new h(32768),this.p=new h(0),c&&this.o.set(c)}return a.prototype.e=function(a){if(this.ondata||J(5),this.d&&J(4),this.p.length){if(a.length){var b=new h(this.p.length+a.length);b.set(this.p),b.set(a,this.p.length),this.p=b}}else this.p=a},a.prototype.c=function(a){this.s.i=+(this.d=a||!1);var b=this.s.b,c=K(this.p,this.s,this.o);this.ondata(H(c,b,this.s.b),this.d),this.o=H(c,this.s.b-32768),this.s.b=this.o.length,this.p=H(this.p,this.s.p/8|0),this.s.p&=7},a.prototype.push=function(a,b){this.e(a),this.c(b)},a}(),aA=function(a,b){ak([ad,function(){return[aj,az]}],this,av.call(this,a,b),function(a){onmessage=aj(new az(a.data))},7,0)};function aB(a,b){return K(a,{i:2},b&&b.out,b&&b.dictionary)}(function(){function a(a,b){this.c=X(),this.l=0,this.v=1,aw.call(this,a,b)}a.prototype.push=function(a,b){this.c.p(a),this.l+=a.length,aw.prototype.push.call(this,a,b)},a.prototype.p=function(a,b){var c=Z(a,this.o,this.v&&as(this.o),b&&8,this.s);this.v&&(ap(c,this.o),this.v=0),b&&(ao(c,c.length-8,this.c.d()),ao(c,c.length-4,this.l)),this.ondata(c,b)},a.prototype.flush=function(a){aw.prototype.flush.call(this,a)}})();var aC=function(){function a(a,b){this.v=1,this.r=0,az.call(this,a,b)}return a.prototype.push=function(a,b){if(az.prototype.e.call(this,a),this.r+=a.length,this.v){var c=this.p.subarray(this.v-1),d=c.length>3?aq(c):4;if(d>c.length){if(!b)return}else this.v>1&&this.onmember&&this.onmember(this.r-c.length);this.p=c.subarray(d),this.v=0}az.prototype.c.call(this,0),this.s.f&&!this.s.l?(this.v=G(this.s.p)+9,this.s={i:0},this.o=new h(0),this.push(new h(0),b)):b&&az.prototype.c.call(this,b)},a}(),aD=function(a,b){var c=this;ak([ad,af,function(){return[aj,az,aC]}],this,av.call(this,a,b),function(a){var b=new aC(a.data);b.onmember=function(a){return postMessage(a)},onmessage=aj(b)},9,0,function(a){return c.onmember&&c.onmember(a)})},aE=(function(){function a(a,b){this.c=Y(),this.v=1,aw.call(this,a,b)}a.prototype.push=function(a,b){this.c.p(a),aw.prototype.push.call(this,a,b)},a.prototype.p=function(a,b){var c=Z(a,this.o,this.v&&(this.o.dictionary?6:2),b&&4,this.s);this.v&&(at(c,this.o),this.v=0),b&&ao(c,c.length-4,this.c.d()),this.ondata(c,b)},a.prototype.flush=function(a){aw.prototype.flush.call(this,a)}}(),function(){function a(a,b){az.call(this,a,b),this.v=a&&a.dictionary?2:1}return a.prototype.push=function(a,b){if(az.prototype.e.call(this,a),this.v){if(this.p.length<6&&!b)return;this.p=this.p.subarray(au(this.p,this.v-1)),this.v=0}b&&(this.p.length<4&&J(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),az.prototype.c.call(this,b)},a}()),aF=function(a,b){ak([ad,ag,function(){return[aj,az,aE]}],this,av.call(this,a,b),function(a){onmessage=aj(new aE(a.data))},11,0)},aG=function(){function a(a,b){this.o=av.call(this,a,b)||{},this.G=aC,this.I=az,this.Z=aE}return a.prototype.i=function(){var a=this;this.s.ondata=function(b,c){a.ondata(b,c)}},a.prototype.push=function(a,b){if(this.ondata||J(5),this.s)this.s.push(a,b);else{if(this.p&&this.p.length){var c=new h(this.p.length+a.length);c.set(this.p),c.set(a,this.p.length)}else this.p=a;this.p.length>2&&(this.s=31==this.p[0]&&139==this.p[1]&&8==this.p[2]?new this.G(this.o):(15&this.p[0])!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(this.o):new this.Z(this.o),this.i(),this.s.push(this.p,b),this.p=null)}},a}();function aH(a,b){aG.call(this,a,b),this.queuedSize=0,this.G=aD,this.I=aA,this.Z=aF}aH.prototype.i=function(){var a=this;this.s.ondata=function(b,c,d){a.ondata(b,c,d)},this.s.ondrain=function(b){a.queuedSize-=b,a.ondrain&&a.ondrain(b)}},aH.prototype.push=function(a,b){this.queuedSize+=a.length,aG.prototype.push.call(this,a,b)};var aI="u">typeof TextEncoder&&new TextEncoder,aJ="u">typeof TextDecoder&&new TextDecoder,aK=0;try{aJ.decode(U,{stream:!0}),aK=1}catch(a){}var aL=function(a){for(var b="",c=0;;){var d=a[c++],e=(d>127)+(d>223)+(d>239);if(c+e>a.length)return{s:b,r:H(a,c-1)};e?3==e?b+=String.fromCharCode(55296|(d=((15&d)<<18|(63&a[c++])<<12|(63&a[c++])<<6|63&a[c++])-65536)>>10,56320|1023&d):1&e?b+=String.fromCharCode((31&d)<<6|63&a[c++]):b+=String.fromCharCode((15&d)<<12|(63&a[c++])<<6|63&a[c++]):b+=String.fromCharCode(d)}};function aM(a,b){if(b){for(var c=new h(a.length),d=0;d<a.length;++d)c[d]=a.charCodeAt(d);return c}if(aI)return aI.encode(a);for(var e=a.length,f=new h(a.length+(a.length>>1)),g=0,i=function(a){f[g++]=a},d=0;d<e;++d){if(g+5>f.length){var j=new h(g+8+(e-d<<1));j.set(f),f=j}var k=a.charCodeAt(d);k<128||b?i(k):(k<2048?i(192|k>>6):(k>55295&&k<57344?(i(240|(k=65536+(1047552&k)|1023&a.charCodeAt(++d))>>18),i(128|k>>12&63)):i(224|k>>12),i(128|k>>6&63)),i(128|63&k))}return H(f,0,g)}function aN(a,b){if(b){for(var c="",d=0;d<a.length;d+=16384)c+=String.fromCharCode.apply(null,a.subarray(d,d+16384));return c}if(aJ)return aJ.decode(a);var e=aL(a),f=e.s,c=e.r;return c.length&&J(8),f}(function(a){this.ondata=a,aK?this.t=new TextDecoder:this.p=U}).prototype.push=function(a,b){if(this.ondata||J(5),b=!!b,this.t){this.ondata(this.t.decode(a,{stream:!0}),b),b&&(this.t.decode().length&&J(8),this.t=null);return}this.p||J(4);var c=new h(this.p.length+a.length);c.set(this.p),c.set(a,this.p.length);var d=aL(c),e=d.s,f=d.r;b?(f.length&&J(8),this.p=null):this.p=f,this.ondata(e,b)},(function(a){this.ondata=a}).prototype.push=function(a,b){this.ondata||J(5),this.d&&J(4),this.ondata(aM(a),this.d=b||!1)};var aO=function(a){return 1==a?3:a<6?2:+(9==a)},aP=function(a,b,c){var d=al(a,b+28),e=al(a,b+30),f=aN(a.subarray(b+46,b+46+d),!(2048&al(a,b+8))),g=b+46+d,h=aQ(a,g,e,c,am(a,b+20),am(a,b+24),am(a,b+42)),i=h[0],j=h[1],k=h[2];return[al(a,b+10),i,j,f,g+e+al(a,b+32),k]},aQ=function(a,b,c,d,e,f,g){var h=0xffffffff==e,i=0xffffffff==f,j=0xffffffff==g,k=b+c;if(d&&h+i+j){for(;b+4<k;b+=4+al(a,b+2))if(1==al(a,b))return[h?an(a,b+4+8*i):e,i?an(a,b+4):f,j?an(a,b+4+8*(i+h)):g,1];d<2&&J(13)}return[e,f,g,0]},aR=function(a){var b=0;if(a)for(var c in a){var d=a[c].length;d>65535&&J(9),b+=d+4}return b},aS=function(a,b,c,d,e,f,g,h){var i=d.length,j=c.extra,k=h&&h.length,l=aR(j);ao(a,b,null!=g?0x2014b50:0x4034b50),b+=4,null!=g&&(a[b++]=20,a[b++]=c.os),a[b]=20,b+=2,a[b++]=c.flag<<1|(f<0&&8),a[b++]=e&&8,a[b++]=255&c.compression,a[b++]=c.compression>>8;var m=new Date(null==c.mtime?Date.now():c.mtime),n=m.getFullYear()-1980;if((n<0||n>119)&&J(10),ao(a,b,n<<25|m.getMonth()+1<<21|m.getDate()<<16|m.getHours()<<11|m.getMinutes()<<5|m.getSeconds()>>1),b+=4,-1!=f&&(ao(a,b,c.crc),ao(a,b+4,f<0?-f-2:f),ao(a,b+8,c.size)),ao(a,b+12,i),ao(a,b+14,l),b+=16,null!=g&&(ao(a,b,k),ao(a,b+6,c.attrs),ao(a,b+10,g),b+=14),a.set(d,b),b+=i,l)for(var o in j){var p=j[o],q=p.length;ao(a,b,+o),ao(a,b+2,q),a.set(p,b+4),b+=4+q}return k&&(a.set(h,b),b+=k),b},aT=function(a,b,c,d,e){ao(a,b,0x6054b50),ao(a,b+8,c),ao(a,b+10,c),ao(a,b+12,d),ao(a,b+16,e)},aU=function(){function a(a){this.filename=a,this.c=X(),this.size=0,this.compression=0}return a.prototype.process=function(a,b){this.ondata(null,a,b)},a.prototype.push=function(a,b){this.ondata||J(5),this.c.p(a),this.size+=a.length,b&&(this.crc=this.c.d()),this.process(a,b||!1)},a}();function aV(a,b){var c=this;b||(b={}),aU.call(this,a),this.d=new aw(b,function(a,b){c.ondata(null,a,b)}),this.compression=8,this.flag=aO(b.level)}function aW(a,b){var c=this;b||(b={}),aU.call(this,a),this.d=new ax(b,function(a,b,d){c.ondata(a,b,d)}),this.compression=8,this.flag=aO(b.level),this.terminate=this.d.terminate}function aX(a){this.ondata=a,this.u=[],this.d=1}aV.prototype.process=function(a,b){try{this.d.push(a,b)}catch(a){this.ondata(a,null,b)}},aV.prototype.push=function(a,b){aU.prototype.push.call(this,a,b)},aW.prototype.process=function(a,b){this.d.push(a,b)},aW.prototype.push=function(a,b){aU.prototype.push.call(this,a,b)},aX.prototype.add=function(a){var b=this;if(this.ondata||J(5),2&this.d)this.ondata(J(4+(1&this.d)*8,0,1),null,!1);else{var c=aM(a.filename),d=c.length,e=a.comment,f=e&&aM(e),g=d!=a.filename.length||f&&e.length!=f.length,i=d+aR(a.extra)+30;d>65535&&this.ondata(J(11,0,1),null,!1);var j=new h(i);aS(j,0,a,c,g,-1);var k=[j],l=function(){for(var a=0,c=k;a<c.length;a++){var d=c[a];b.ondata(null,d,!1)}k=[]},m=this.d;this.d=0;var n=this.u.length,o=$(a,{f:c,u:g,o:f,t:function(){a.terminate&&a.terminate()},r:function(){if(l(),m){var a=b.u[n+1];a?a.r():b.d=1}m=1}}),p=0;a.ondata=function(c,d,e){if(c)b.ondata(c,d,e),b.terminate();else if(p+=d.length,k.push(d),e){var f=new h(16);ao(f,0,0x8074b50),ao(f,4,a.crc),ao(f,8,p),ao(f,12,a.size),k.push(f),o.c=p,o.b=i+p+16,o.crc=a.crc,o.size=a.size,m&&o.r(),m=1}else m&&l()},this.u.push(o)}},aX.prototype.end=function(){var a=this;2&this.d?this.ondata(J(4+(1&this.d)*8,0,1),null,!0):(this.d?this.e():this.u.push({r:function(){1&a.d&&(a.u.splice(-1,1),a.e())},t:function(){}}),this.d=3)},aX.prototype.e=function(){for(var a=0,b=0,c=0,d=0,e=this.u;d<e.length;d++){var f=e[d];c+=46+f.f.length+aR(f.extra)+(f.o?f.o.length:0)}for(var g=new h(c+22),i=0,j=this.u;i<j.length;i++){var f=j[i];aS(g,a,f,f.f,f.u,-f.c-2,b,f.o),a+=46+f.f.length+aR(f.extra)+(f.o?f.o.length:0),b+=f.b}aT(g,a,this.u.length,c,b),this.ondata(null,g,!0),this.d=2},aX.prototype.terminate=function(){for(var a=0,b=this.u;a<b.length;a++)b[a].t();this.d=2};var aY=function(){function a(){}return a.prototype.push=function(a,b){this.ondata(null,a,b)},a.compression=0,a}();function aZ(){var a=this;this.i=new az(function(b,c){a.ondata(null,b,c)})}function a$(a,b){var c=this;b<32e4?this.i=new az(function(a,b){c.ondata(null,a,b)}):(this.i=new aA(function(a,b,d){c.ondata(a,b,d)}),this.terminate=this.i.terminate)}function a_(a){this.onfile=a,this.k=[],this.o={0:aY},this.p=U}aZ.prototype.push=function(a,b){try{this.i.push(a,b)}catch(a){this.ondata(a,null,b)}},aZ.compression=8,a$.prototype.push=function(a,b){this.i.terminate&&(a=H(a,0)),this.i.push(a,b)},a$.compression=8,a_.prototype.push=function(a,b){var c=this;if(this.onfile||J(5),this.p||J(4),this.c>0){var d=Math.min(this.c,a.length),e=a.subarray(0,d);if(this.c-=d,this.d?this.d.push(e,!this.c):this.k[0].push(e),(a=a.subarray(d)).length)return this.push(a,b)}else{var f=0,g=0,i=void 0,j=void 0;this.p.length?a.length?((j=new h(this.p.length+a.length)).set(this.p),j.set(a,this.p.length)):j=this.p:j=a;for(var k=j.length,l=this.c,m=l&&this.d,n=this;g<k-4&&"break"!==function(){var a=am(j,g);if(0x4034b50==a){f=1,i=g,n.d=null,n.c=0;var b=al(j,g+6),d=al(j,g+8),e=al(j,g+26),h=al(j,g+28);if(k>g+30+e+h){var m,o=[];n.k.unshift(o),f=2;var p=am(j,g+18),q=am(j,g+22),r=aN(j.subarray(g+30,g+=30+e),!(2048&b)),s=aQ(j,g,h,2,p,q,0),t=s[0],u=s[1],v=s[3];8&b&&(t=-1-v),g+=h,n.c=t;var w={name:r,compression:d,start:function(){if(w.ondata||J(5),t){var a=c.o[d];a||w.ondata(J(14,"unknown compression type "+d,1),null,!1),(m=t<0?new a(r):new a(r,t,u)).ondata=function(a,b,c){w.ondata(a,b,c)};for(var b=0;b<o.length;b++){var e=o[b];m.push(e,!1)}c.k[0]==o&&c.c?c.d=m:m.push(U,!0)}else w.ondata(null,U,!0)},terminate:function(){m&&m.terminate&&m.terminate()}};t>=0&&(w.size=t,w.originalSize=u),n.onfile(w)}return"break"}if(l){if(0x8074b50==a)return i=g+=12+(-2==l&&8),f=3,n.c=0,"break";else if(0x2014b50==a)return i=g-=4,f=3,n.c=0,"break"}}();++g);if(this.p=U,l<0){var o=f?j.subarray(0,i-12-(-2==l&&8)-(0x8074b50==am(j,i-16)&&4)):j.subarray(0,g);m?m.push(o,!!f):this.k[+(2==f)].push(o)}if(2&f)return this.push(j.subarray(g),b);this.p=j.subarray(g)}b&&(this.c&&J(13),this.p=null)},a_.prototype.register=function(a){this.o[a.compression]=a},"function"==typeof queueMicrotask&&queueMicrotask;var a0=a.i(53112),a1=a.i(762805),a2=a.i(951941),a3=a.i(225689),a4=a.i(293480),a5=a.i(713095);let a6=(0,a3.serverAction)(async a=>{let{name:b,description:c,content:d}=a2.SkillDraftSchema.parse(a);return await (0,a1.writeCustomSkill)(b,new Map([["SKILL.md",(0,a1.renderSkillMarkdown)({name:b,description:c},d)]]))}),a7=(0,a3.serverAction)(async a=>{let{fileName:b,base64:c}=a2.SkillUploadSchema.parse(a),d=Buffer.from(c,"base64");d.byteLength>0x1400000&&(0,a4.publicError)("File is larger than 20 MB");let e=b.toLowerCase(),f=new Map;if(e.endsWith(".md"))f.set("SKILL.md",d);else if(e.endsWith(".zip")||e.endsWith(".skill")){let a;try{a=function(a){for(var b={},c=a.length-22;0x6054b50!=am(a,c);--c)(!c||a.length-c>65558)&&J(13);var d=al(a,c+8);if(!d)return{};var e=am(a,c+16),f=0x7064b50==am(a,c-20);if(f){var g=am(a,c-12);(f=0x6064b50==am(a,g))&&(d=am(a,g+32),e=am(a,g+48))}for(var i=void 0,j=0;j<d;++j){var k=aP(a,e,f),l=k[0],m=k[1],n=k[2],o=k[3],p=k[4],q=k[5],r=q+30+al(a,q+26)+al(a,q+28);e=p,(!i||i({name:o,size:m,originalSize:n,compression:l}))&&(l?8==l?b[o]=aB(a.subarray(r,r+m),{out:new h(n)}):J(14,"unknown compression type "+l):b[o]=H(a,r,r+m))}return b}(new Uint8Array(d))}catch{(0,a4.publicError)("The archive could not be opened")}let b=Object.keys(a).filter(a=>!a.startsWith("__MACOSX/")).filter(a=>"SKILL.md"===a.split("/").pop()).sort((a,b)=>a.split("/").length-b.split("/").length)[0];b||(0,a4.publicError)("The archive has no SKILL.md");let c=b.slice(0,-8);for(let[b,d]of Object.entries(a)){if(!b.startsWith(c)||b.endsWith("/")||b.startsWith("__MACOSX/"))continue;let a=b.slice(c.length);a.split("/").some(a=>".."===a||""===a)||f.set(a,d)}}else(0,a4.publicError)("Upload a .md, .zip or .skill file");let g=f.get("SKILL.md"),i="string"==typeof g?g:Buffer.from(g).toString("utf-8"),j=(0,a1.parseFrontmatter)(i);return(0,a1.writeCustomSkill)(j.name,f)}),a8=(0,a3.serverAction)(async a=>{await (0,a1.deleteCustomSkill)(a2.SkillNameSchema.parse(a))}),a9=(0,a3.serverAction)(async(a,b,c)=>{await (0,a1.setSkillDisabled)(a2.SkillSourceSchema.parse(a),a2.SkillNameSchema.parse(b),a0.z.boolean().parse(c))});(0,a5.ensureServerEntryExports)([a6,a7,a8,a9]),(0,e.registerServerReference)(a6,"7f4d47e01fc323498dec73a09cf3336f5d4c1d51e0",null),(0,e.registerServerReference)(a7,"7fe6ee51994f51caff9011049ffe2a9aa4153d8a4e",null),(0,e.registerServerReference)(a8,"7f3ddbf37770ac395e5d1cbd8e5defa43d735b967a",null),(0,e.registerServerReference)(a9,"7f3acf83fcc379119e185d7a3834d5eed97ad0a1c1",null),a.s(["createSkillAction",0,a6,"deleteSkillAction",0,a8,"setSkillDisabledAction",0,a9,"uploadSkillAction",0,a7],432443)},439759,a=>a.a(async(b,c)=>{try{var d=a.i(137936),e=a.i(527990),f=a.i(723885),g=a.i(738131),h=a.i(689656),i=a.i(614747),j=a.i(674986),k=a.i(84929),l=a.i(725466),m=a.i(986743),n=a.i(225689),o=a.i(293480),p=a.i(253514),q=a.i(569549),r=a.i(3894),s=a.i(713095),t=b([g,i,j,k,l,m,q]);async function u(a){if(a&&await (0,l.readConfig)(h.SPEACH_MODEL_PROVIDERS[a.provider].apiKeyName))return a;for(let a of h.SPEACH_MODEL_PROVIDER_LIST)if(await (0,l.readConfig)(a.apiKeyName))return{provider:a.id,voice:null,model:null};(0,o.publicError)("No voice key — calls run on one. Add one in Config.")}async function v(){let a=await (0,g.loadTools)({target:"thursday"});return Object.entries(a).map(([a,b])=>{let{$schema:c,...d}=(0,e.asSchema)(b.inputSchema).jsonSchema;return{name:a,description:"string"==typeof b.description?b.description:"",parameters:d}})}[g,i,j,k,l,m,q]=t.then?(await t)():t;let w=(0,n.serverAction)(async a=>{let b=r.ThursdaySettingsSchema.parse(a),c=await u(b.model),d=h.SPEACH_MODEL_PROVIDERS[c.provider],e=await (0,l.readConfig)(d.apiKeyName);e||(0,o.publicError)(`No ${d.label} key — add one in Config.`);let[f,g]=await Promise.all([(0,i.loadThursdayPrompt)(b.systemPrompt,b.locale),v()]),j=c.model??d.models[0].id,k=await (0,p.issueClientSecret)({provider:c.provider,apiKey:e,model:j});return{callId:await (0,q.insertCall)({provider:c.provider,model:j}),provider:c.provider,credential:k,session:{model:j,voice:c.voice??d.defaultVoice,instructions:f.text,tools:g},opening:f.opening}}),x=(0,n.serverAction)(async a=>{await (0,q.writeCallSkillsOn)(f.default.boolean().parse(a))}),y=(0,n.serverAction)(async(a,b)=>{await (0,q.saveTurns)(a,r.CallTurnSchema.array().min(1).parse(b))}),z=(0,n.serverAction)(async a=>{await (0,q.endCall)(a)}),A=(0,n.serverAction)(async a=>{await (0,q.deleteCall)(a)||(0,o.publicError)("That call is still on the line — hang up first.")}),B=(0,n.serverAction)(async()=>(0,q.deleteEndedCalls)()),C=(0,n.serverAction)(async()=>{let a=await (0,k.listAllTaskIds)();for(let b of a)await (0,j.removeTask)(b);let b=await (0,q.deleteEndedCalls)(),c=await (0,m.deleteAllNotes)();return{calls:b,tasks:a.length,notes:c}});(0,s.ensureServerEntryExports)([w,x,y,z,A,B,C]),(0,d.registerServerReference)(w,"7fd0bfd5ef4b8f7c1cce531ca4dba6996ada3534e0",null),(0,d.registerServerReference)(x,"7fb326617fb6fe0d74f20b79af1e912238def02960",null),(0,d.registerServerReference)(y,"7f7158cd6d7b4345e5616c2f390c98da69d9b1cc59",null),(0,d.registerServerReference)(z,"7faf414a19a4e2dc232e5b58fb933b933518d61724",null),(0,d.registerServerReference)(A,"7fa0f05df10fadbdbc32f656a9d5c05cd146302f7a",null),(0,d.registerServerReference)(B,"7fe2a2ec036940cdf16482cfbd7aecf01f5571fe5a",null),(0,d.registerServerReference)(C,"7f50cfd7d0e623e886552f9994a05a234251f6b400",null),a.s(["deleteCallAction",0,A,"deleteEndedCallsAction",0,B,"endCallAction",0,z,"openCallAction",0,w,"resetHistoryAction",0,C,"saveTurnsAction",0,y,"setCallSkillsAction",0,x]),c()}catch(a){c(a)}},!1),253514,a=>{"use strict";var b=a.i(176668),c=a.i(293480),d=a.i(223622);let e={openai:({model:a})=>({url:"https://api.openai.com/v1/realtime/client_secrets",body:{session:{type:"realtime",model:a}}}),xai:({model:a,ttlSeconds:b})=>({url:"https://api.x.ai/v1/realtime/client_secrets",body:{expires_after:{seconds:b},session:{model:a}}})};async function f({provider:a,apiKey:g,model:h,ttlSeconds:i=600}){var j;let k,l,{url:m,body:n}=e[a]({model:h,ttlSeconds:i}),o=await fetch(m,{method:"POST",headers:{Authorization:`Bearer ${g}`,"Content-Type":"application/json"},body:JSON.stringify(n)}).catch(d=>{b.logger.warn(`${a} unreachable`,d),(0,c.publicError)(`Could not reach ${a}.`)}),p=await o.json().catch(()=>null);o.ok||(0,c.publicError)((j=o.status,"string"==typeof(l="string"==typeof(k=p?.error)?k:k?.message??p?.message)&&l.trim()?l:`Could not start a session (${j})`));let q=d.RealtimeCredentialSchema.safeParse(p);return q.success||(0,c.publicError)("The session token came back in a shape we do not know."),{value:q.data.value,expiresAt:q.data.expires_at}}a.s(["issueClientSecret",0,f])}];
59
+ Where \`${e.TOOL_NAMES.bash}\` runs, and what the paths you get back are relative to. Yours to use while you talk: open a file, play something, look at what is on the machine — one command is a thing you do, not a job you hand over.`;a.s(["loadThursdayPrompt",0,q]),c()}catch(a){c(a)}},!1),260210,a=>{"use strict";var b=a.i(137936),c=a.i(912714),d=a.i(750227);a.i(569572),a.i(684321);var e=a.i(821415),f=a.i(293480);async function g(a){let b=await (0,e.insideWorkspace)(a);return b?.startsWith(e.ARTIFACTS+d.sep)||(0,f.publicError)("Not an artifact"),b}async function h(a){let b=await g(a),d=await (0,c.stat)(b).catch(()=>null);d||(0,f.publicError)("File not found"),d.isFile()||(0,f.publicError)("That is a folder, not a file"),await (0,c.rm)(b)}var i=a.i(225689),j=a.i(713095);let k=(0,i.serverAction)(async a=>{let b=a.trim();b||(0,f.publicError)("Which file?"),await h(b)});(0,j.ensureServerEntryExports)([k]),(0,b.registerServerReference)(k,"7f5e9d55d642fe92f8db17f028783ed35610b7df76",null),a.s(["deleteArtifactAction",0,k],260210)},362562,(a,b,c)=>{b.exports=a.x("module",()=>require("module"))},910350,a=>a.a(async(b,c)=>{try{var d=a.i(137936),e=a.i(53112),f=a.i(689656),g=a.i(225689),h=a.i(293480),i=a.i(221214),j=a.i(674986),k=a.i(446957),l=a.i(636616),m=a.i(84929),n=a.i(713095),o=b([i,j,m]);[i,j,m]=o.then?(await o)():o;let p=(0,g.serverAction)(async a=>{let b=k.BotFormSchema.parse(a),c=await (0,i.createBot)(b);return c||(0,h.publicError)(`"${b.name}" already exists`),{name:c.name}}),q=(0,g.serverAction)(async(a,b)=>{let c=k.BotFormSchema.partial().parse(b);await (0,i.updateBot)(a,c)||(0,h.publicError)("Bot not found")}),r=e.z.object({name:e.z.string().trim().min(1).max(80),provider:f.textModelProviderSchema.nullish(),model:e.z.string().trim().min(1).max(80).nullish(),color:k.botIconSchema.shape.color}),s=(0,g.serverAction)(async a=>{let b=r.array().max(20).parse(a),c=(0,l.rollSeedColors)(),d=[];for(let[a,e]of b.entries()){let b=(0,l.findBotSeed)(e.name);if(!b)continue;let f=await (0,i.createBot)({name:b.name,description:b.description,systemPrompt:b.systemPrompt,icon:{...b.icon,color:e.color??c[a%c.length]},provider:e.provider,model:e.model,toolIds:[]});f&&d.push(f.name)}return{created:d}}),t=(0,g.serverAction)(async a=>{await (0,i.deleteBot)(a)||(0,h.publicError)("Bot not found")}),u=(0,g.serverAction)(async a=>{await (0,i.writeBotMemoryOn)(!0===a)}),v=(0,g.serverAction)(async(a,b)=>{let c,d,e=b.trim();e||(0,h.publicError)("Nothing to hand over.");let f=await (0,i.findBot)(a);f||(0,h.publicError)(`No bot called "${a}".`);let g=(d=(c=e.replace(/\s+/g," ").trim().split(" ")).slice(0,4).join(" "),(c.length>4?`${d}…`:d).slice(0,60));return{id:await (0,j.startTask)({bot:f.name,request:e,label:g,from:"user"}),label:g,bot:f.name}}),w=(0,g.serverAction)(async(a,b)=>{let c=await (0,m.resolveTask)(a);return c||(0,h.publicError)(`No job called "${a}".`),b.trim()||(0,h.publicError)("Nothing to tell it."),await (0,j.answerTask)(c.id,b.trim()),{id:c.id,label:c.label,status:"running"}}),x=(0,g.serverAction)(async a=>{let b=await (0,m.resolveTask)(a);return b||(0,h.publicError)(`No job called "${a}".`),await (0,j.cancelTask)(b.id),{id:b.id,label:b.label,status:"cancelled"}}),y=(0,g.serverAction)(async a=>{await (0,m.markSeen)(a.filter(a=>"string"==typeof a&&a))}),z=(0,g.serverAction)(async a=>{await (0,j.removeTask)(a)||(0,h.publicError)("Task not found")}),A=(0,g.serverAction)(async()=>({removed:await (0,j.removeFinishedTasks)()}));(0,n.ensureServerEntryExports)([p,q,s,t,u,v,w,x,y,z,A]),(0,d.registerServerReference)(p,"7f2c1a3573293b0495d608528c41d41f86a36d3b5f",null),(0,d.registerServerReference)(q,"7f99254ea3979cdfbf4180f5ec1b28012f20d24598",null),(0,d.registerServerReference)(s,"7fc17622031143b747ecc9e3a634af93cecf857419",null),(0,d.registerServerReference)(t,"7ff04f066544a3d011bab2dc4df1aa87858df608eb",null),(0,d.registerServerReference)(u,"7fc2016fa91129c17b93557ea439050719a062f621",null),(0,d.registerServerReference)(v,"7fead883112f4944026c3de5b1121d035e8d913c24",null),(0,d.registerServerReference)(w,"7fe6602a05bb6dae37da243aa6829eac42bb7d02cb",null),(0,d.registerServerReference)(x,"7fe9cd69f4473537676c65d3d2ae78b80659aa141e",null),(0,d.registerServerReference)(y,"7fa481c23373be6f44127e642532a2a5f91738cdf0",null),(0,d.registerServerReference)(z,"7fc93633f9232e2216f532d788f4598529462ccdfb",null),(0,d.registerServerReference)(A,"7f573c6ac0e703d41cd96ff148ae8a6a3a62997a81",null),a.s(["answerTaskAction",0,w,"cancelTaskAction",0,x,"clearFinishedTasksAction",0,A,"createBotAction",0,p,"createSeedBotsAction",0,s,"deleteBotAction",0,t,"deleteTaskAction",0,z,"markSeenAction",0,y,"setBotMemoryOnAction",0,u,"startTaskAction",0,v,"updateBotAction",0,q]),c()}catch(a){c(a)}},!1),937864,a=>a.a(async(b,c)=>{try{var d=a.i(137936),e=a.i(53112),f=a.i(652619),g=a.i(225689),h=a.i(293480),i=a.i(688034),j=a.i(725466),k=a.i(713095),l=b([f,j]);[f,j]=l.then?(await l)():l;let m=e.z.enum(i.CONFIG_KEYS),n=(0,g.serverAction)(async(a,b)=>{let c=e.z.object({key:m,value:e.z.string().trim().min(1)}).parse({key:a,value:b}),d=i.CONFIG_ENTRIES[c.key];d?.signIn&&(0,h.publicError)(`${d.label} takes a sign-in, not a key.`),d?.choices?(0,i.acceptsChoice)(d,c.value)||(0,h.publicError)("That is not one of the options."):c.value.length<8&&(0,h.publicError)("That does not look like a key"),await (0,j.writeConfig)(c.key,c.value)}),o=(0,g.serverAction)(async a=>{await (0,j.removeConfig)(m.parse(a))}),p=(0,g.serverAction)(async()=>(0,f.startChatGptSignIn)());(0,k.ensureServerEntryExports)([n,o,p]),(0,d.registerServerReference)(n,"7f69f5b9783e3443bedcc9e4438d8504770a59481a",null),(0,d.registerServerReference)(o,"7fb6f8b381203a417ba7628fded304ddd5d574c1d9",null),(0,d.registerServerReference)(p,"7ffeb46bff9f8dd75a16508c2975cd7d6e8d60900e",null),a.s(["removeConfigAction",0,o,"setConfigAction",0,n,"startChatGptSignInAction",0,p]),c()}catch(a){c(a)}},!1),935930,a=>a.a(async(b,c)=>{try{var d=a.i(137936),e=a.i(569572),f=a.i(947950),g=a.i(899284),h=a.i(225689),i=a.i(293480),j=a.i(182248),k=a.i(317844),l=a.i(713095),m=b([f,k]);[f,k]=m.then?(await m)():m;let o=(0,h.serverAction)(async a=>{let b=g.MCPServerFormSchema.parse(a);b.name===e.STUDIO_SERVER&&(0,i.publicError)(`"${e.STUDIO_SERVER}" is the app's own — pick another name`);let c=!!await (0,f.findServerDetail)(b.name);await (0,f.upsertServer)(b);let d=await n(b.name);return"error"!==d.status||c||await (0,f.deleteServer)(b.name),d}),p=(0,h.serverAction)(async a=>(await k.mcpManager.disconnect(a),n(a))),q=(0,h.serverAction)(async a=>{await k.mcpManager.disconnect(a),await (0,f.deleteServer)(a)||(0,i.publicError)("Server not found")});async function n(a){try{let b=await k.mcpManager.connect(a);return"auth_required"===b.status?{name:a,status:"auth_required",authorizationUrl:b.authorizationUrl,toolCount:0}:{name:a,status:"connected",toolCount:b.tools.length}}catch(b){return{name:a,status:"error",toolCount:0,error:(0,j.errorToString)(b)}}}let r=(0,h.serverAction)(async(a,b,c)=>{try{return await k.mcpManager.callTool(a,b,c)}catch(a){a instanceof k.McpAuthRequiredError&&(0,i.publicError)("Authorization required — reconnect this server first"),(0,i.publicError)((0,j.errorToString)(a))}});(0,l.ensureServerEntryExports)([o,p,q,r]),(0,d.registerServerReference)(o,"7fac698b428abfbc71051fcef2c891ac51c590bb7d",null),(0,d.registerServerReference)(p,"7f5a8be5815d72b1969dc7e76d81e7aa2b6e9c0d95",null),(0,d.registerServerReference)(q,"7f093c4b2999625019cfc89d41f66242633137b303",null),(0,d.registerServerReference)(r,"7f09644e5c2cb7a6e7509f514d3a68ef068bf90077",null),a.s(["callToolAction",0,r,"deleteServerAction",0,q,"refreshServerAction",0,p,"registerServerAction",0,o]),c()}catch(a){c(a)}},!1),542715,a=>a.a(async(b,c)=>{try{var d=a.i(937864),e=a.i(910350);a.i(451208);var f=a.i(201300),g=a.i(439759);a.i(260210),a.i(432443);var h=a.i(935930),i=b([d,e,f,g,h]);[d,e,f,g,h]=i.then?(await i)():i,a.s([]),c()}catch(a){c(a)}},!1),873715,a=>a.a(async(b,c)=>{try{var d=a.i(542715),e=a.i(937864),f=a.i(910350),g=a.i(451208),h=a.i(201300),i=a.i(439759),j=a.i(260210),k=a.i(432443),l=a.i(935930),m=b([d,e,f,h,i,l]);[d,e,f,h,i,l]=m.then?(await m)():m,a.s(["7f093c4b2999625019cfc89d41f66242633137b303",()=>l.deleteServerAction,"7f09644e5c2cb7a6e7509f514d3a68ef068bf90077",()=>l.callToolAction,"7f0ac011b0335ccbc4e877ba487ece0ed239d2f75d",()=>i.deleteCallAction,"7f11b3b1439c48a3d1d46c21fcd5dbde3177c4013c",()=>h.forgetFactAction,"7f2c1a3573293b0495d608528c41d41f86a36d3b5f",()=>f.createBotAction,"7f2cd09869c1a94eb452d214e327ed12bf3043400f",()=>g.deleteWorkspaceFileAction,"7f40a6e2a75cd593aac755ffc5d223786e615004f0",()=>h.deleteNoteAction,"7f502002560183e8ddeae9aa0aa67f384b44713d10",()=>h.updateNoteAction,"7f548133e425b6965627a13554ad4251ca0fe8a484",()=>h.createNoteAction,"7f573c6ac0e703d41cd96ff148ae8a6a3a62997a81",()=>f.clearFinishedTasksAction,"7f5a8be5815d72b1969dc7e76d81e7aa2b6e9c0d95",()=>l.refreshServerAction,"7f5e9d55d642fe92f8db17f028783ed35610b7df76",()=>j.deleteArtifactAction,"7f63c41bac986f62db6dafc188e4e50b71eff95d4d",()=>k.setSkillDisabledAction,"7f69f5b9783e3443bedcc9e4438d8504770a59481a",()=>e.setConfigAction,"7f718e4e9d0a05662ce165cdcea1bdcbe5cf4ec5c1",()=>i.openCallAction,"7f7ed086f54523b83b71c066e348abc9fb5050f73d",()=>i.setCallSkillsAction,"7f82cfe01c014083fefd463a144cd831b6f3c3fbcb",()=>i.deleteEndedCallsAction,"7f84820f3d6512d3f7a6752a6c7906c845efd61c78",()=>h.reviseFactAction,"7f84890fee53822ad5fa9f2fb9ea10f106446bfb49",()=>h.setFactAlwaysLoadAction,"7f8c7d9ccc19b17cf88189ce250f58632b0cec1b3f",()=>i.endCallAction,"7f8f532d3fc2a22c8db7249a978ad54a5a84c13722",()=>i.saveTurnsAction,"7f99254ea3979cdfbf4180f5ec1b28012f20d24598",()=>f.updateBotAction,"7f9f1e120f08a19080c12fcdb8240f9c4acc302d2e",()=>k.deleteSkillAction,"7fa241ae08bf992a91ff0305fd62cff2597224f132",()=>i.resetHistoryAction,"7fa481c23373be6f44127e642532a2a5f91738cdf0",()=>f.markSeenAction,"7fac698b428abfbc71051fcef2c891ac51c590bb7d",()=>l.registerServerAction,"7fb55bd3751719ce0673aee8820dac743b072cef6a",()=>h.addFactsAction,"7fb6f8b381203a417ba7628fded304ddd5d574c1d9",()=>e.removeConfigAction,"7fc17622031143b747ecc9e3a634af93cecf857419",()=>f.createSeedBotsAction,"7fc2016fa91129c17b93557ea439050719a062f621",()=>f.setBotMemoryOnAction,"7fc28100d5c9fe991232c48d1c4ed58771916e504e",()=>k.uploadSkillAction,"7fc93633f9232e2216f532d788f4598529462ccdfb",()=>f.deleteTaskAction,"7fd2be038aaf192febe6ff64aaa1cae78aa143c0c0",()=>k.createSkillAction,"7fe6602a05bb6dae37da243aa6829eac42bb7d02cb",()=>f.answerTaskAction,"7fe75c180b16ec13b8c8052e5fbacba3e5789f0aca",()=>g.openFileAction,"7fe9cd69f4473537676c65d3d2ae78b80659aa141e",()=>f.cancelTaskAction,"7fead883112f4944026c3de5b1121d035e8d913c24",()=>f.startTaskAction,"7ff04f066544a3d011bab2dc4df1aa87858df608eb",()=>f.deleteBotAction,"7ffeb46bff9f8dd75a16508c2975cd7d6e8d60900e",()=>e.startChatGptSignInAction,"7fffb395383564466b268157450b588677d6134f7b",()=>g.emptyScratchAction]),c()}catch(a){c(a)}},!1),201300,a=>a.a(async(b,c)=>{try{var d=a.i(137936),e=a.i(53112),f=a.i(569572),g=a.i(986743),h=a.i(661210),i=a.i(225689),j=a.i(293480),k=a.i(713095),l=b([g]);[g]=l.then?(await l)():l;let m=e.z.string().trim().refine(h.isMemoryPath,"Invalid note path"),n=(0,i.serverAction)(async(a,b,c=[])=>{let d=m.parse(a),f=e.z.string().min(1).parse(b),h=await (0,g.createNote)(d,f,{ownedByUser:!0});for(let a of(h||(0,j.publicError)("Note already exists"),c.map(a=>a.trim()).filter(Boolean)))await (0,g.addFact)(h.id,a);return{id:h.id}}),o=(0,i.serverAction)(async(a,b)=>{await (0,g.updateNote)(a,b)||(0,j.publicError)("Note not found")}),p=(0,i.serverAction)(async a=>{await (0,g.deleteNote)(a)||(0,j.publicError)("Note not found")}),q=(0,i.serverAction)(async(a,b)=>{let c=b.map(a=>a.trim()).filter(Boolean);for(let b of(0===c.length&&(0,j.publicError)("Fact text is required"),c))await (0,g.addFact)(a,b);return{added:c.length}}),r=(0,i.serverAction)(async(a,b,c)=>{c.trim()||(0,j.publicError)("Fact text is required"),await (0,g.reviseFact)(a,b,c.trim())||(0,j.publicError)("Fact not found")}),s=(0,i.serverAction)(async(a,b)=>{await (0,g.forgetFact)(a,b)||(0,j.publicError)("Fact not found")}),t=(0,i.serverAction)(async(a,b,c)=>{let d=await (0,g.setFactAlwaysLoad)(a,b,c);"full"===d&&(0,j.publicError)(`Only ${f.MEMORY_LIMITS.carried} facts can be carried into every call — drop one first`),"missing"===d&&(0,j.publicError)("Fact not found")});(0,k.ensureServerEntryExports)([n,o,p,q,r,s,t]),(0,d.registerServerReference)(n,"7f548133e425b6965627a13554ad4251ca0fe8a484",null),(0,d.registerServerReference)(o,"7f502002560183e8ddeae9aa0aa67f384b44713d10",null),(0,d.registerServerReference)(p,"7f40a6e2a75cd593aac755ffc5d223786e615004f0",null),(0,d.registerServerReference)(q,"7fb55bd3751719ce0673aee8820dac743b072cef6a",null),(0,d.registerServerReference)(r,"7f84820f3d6512d3f7a6752a6c7906c845efd61c78",null),(0,d.registerServerReference)(s,"7f11b3b1439c48a3d1d46c21fcd5dbde3177c4013c",null),(0,d.registerServerReference)(t,"7f84890fee53822ad5fa9f2fb9ea10f106446bfb49",null),a.s(["addFactsAction",0,q,"createNoteAction",0,n,"deleteNoteAction",0,p,"forgetFactAction",0,s,"reviseFactAction",0,r,"setFactAlwaysLoadAction",0,t,"updateNoteAction",0,o]),c()}catch(a){c(a)}},!1),432443,a=>{"use strict";var b,c,d,e=a.i(137936),f=(0,a.i(362562).createRequire)("/");try{c=(b=f("worker_threads")).Worker,d=b.isMarkedAsUntransferable}catch(a){}var g=c?function(a,b,e,f,g){var h=!1,i=new c(a+";var __w=require('worker_threads');__w.parentPort.on('message',function(m){onmessage({data:m})}),postMessage=function(m,t){__w.parentPort.postMessage(m,t)},close=process.exit;self=global",{eval:!0}).on("error",function(a){return g(a,null)}).on("message",function(a){return g(null,a)}).on("exit",function(a){a&&!h&&g(Error("exited with code "+a),null)});return d&&(f=f.filter(function(a){return!d(a)})),i.postMessage(e,f),i.terminate=function(){return h=!0,c.prototype.terminate.call(i)},i}:function(a,b,c,d,e){setImmediate(function(){return e(Error("async operations unsupported - update to Node 12+ (or Node 10-11 with the --experimental-worker CLI flag)"),null)});var f=function(){};return{terminate:f,postMessage:f}},h=Uint8Array,i=Uint16Array,j=Int32Array,k=new h([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),l=new h([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),m=new h([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),n=function(a,b){for(var c=new i(31),d=0;d<31;++d)c[d]=b+=1<<a[d-1];for(var e=new j(c[30]),d=1;d<30;++d)for(var f=c[d];f<c[d+1];++f)e[f]=f-c[d]<<5|d;return{b:c,r:e}},b=n(k,2),o=b.b,p=b.r;o[28]=258,p[258]=28;for(var q=n(l,0),r=q.b,s=q.r,t=new i(32768),u=0;u<32768;++u){var v=(43690&u)>>1|(21845&u)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,t[u]=((65280&v)>>8|(255&v)<<8)>>1}for(var w=function(a,b,c){for(var d,e=a.length,f=0,g=new i(b);f<e;++f)a[f]&&++g[a[f]-1];var h=new i(b);for(f=1;f<b;++f)h[f]=h[f-1]+g[f-1]<<1;if(c){d=new i(1<<b);var j=15-b;for(f=0;f<e;++f)if(a[f])for(var k=f<<4|a[f],l=b-a[f],m=h[a[f]-1]++<<l,n=m|(1<<l)-1;m<=n;++m)d[t[m]>>j]=k}else for(d=new i(e),f=0;f<e;++f)a[f]&&(d[f]=t[h[a[f]-1]++]>>15-a[f]);return d},x=new h(288),u=0;u<144;++u)x[u]=8;for(var u=144;u<256;++u)x[u]=9;for(var u=256;u<280;++u)x[u]=7;for(var u=280;u<288;++u)x[u]=8;for(var y=new h(32),u=0;u<32;++u)y[u]=5;var z=w(x,9,0),A=w(x,9,1),B=w(y,5,0),C=w(y,5,1),D=function(a){for(var b=a[0],c=1;c<a.length;++c)a[c]>b&&(b=a[c]);return b},E=function(a,b,c){var d=b/8|0;return(a[d]|a[d+1]<<8)>>(7&b)&c},F=function(a,b){var c=b/8|0;return(a[c]|a[c+1]<<8|a[c+2]<<16)>>(7&b)},G=function(a){return(a+7)/8|0},H=function(a,b,c){return(null==b||b<0)&&(b=0),(null==c||c>a.length)&&(c=a.length),new h(a.subarray(b,c))},I=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],J=function(a,b,c){var d=Error(b||I[a]);if(d.code=a,Error.captureStackTrace&&Error.captureStackTrace(d,J),!c)throw d;return d},K=function(a,b,c,d){var e=a.length,f=d?d.length:0;if(!e||b.f&&!b.l)return c||new h(0);var g=!c,i=g||2!=b.i,j=b.i;g&&(c=new h(3*e));var n=function(a){var b=c.length;if(a>b){var d=new h(Math.max(2*b,a));d.set(c),c=d}},p=b.f||0,q=b.p||0,s=b.b||0,t=b.l,u=b.d,v=b.m,x=b.n,y=8*e;do{if(!t){p=E(a,q,1);var z=E(a,q+1,3);if(q+=3,z)if(1==z)t=A,u=C,v=9,x=5;else if(2==z){var B=E(a,q,31)+257,I=E(a,q+10,15)+4,K=B+E(a,q+5,31)+1;q+=14;for(var L=new h(K),M=new h(19),N=0;N<I;++N)M[m[N]]=E(a,q+3*N,7);q+=3*I;for(var O=D(M),P=(1<<O)-1,Q=w(M,O,1),N=0;N<K;){var R=Q[E(a,q,P)];q+=15&R;var S=R>>4;if(S<16)L[N++]=S;else{var T=0,U=0;for(16==S?(U=3+E(a,q,3),q+=2,T=L[N-1]):17==S?(U=3+E(a,q,7),q+=3):18==S&&(U=11+E(a,q,127),q+=7);U--;)L[N++]=T}}var V=L.subarray(0,B),W=L.subarray(B);v=D(V),x=D(W),t=w(V,v,1),u=w(W,x,1)}else J(1);else{var S=G(q)+4,X=a[S-4]|a[S-3]<<8,Y=S+X;if(Y>e){j&&J(0);break}i&&n(s+X),c.set(a.subarray(S,Y),s),b.b=s+=X,b.p=q=8*Y,b.f=p;continue}if(q>y){j&&J(0);break}}i&&n(s+131072);for(var Z=(1<<v)-1,$=(1<<x)-1,_=q;;_=q){var T=t[F(a,q)&Z],aa=T>>4;if((q+=15&T)>y){j&&J(0);break}if(T||J(2),aa<256)c[s++]=aa;else if(256==aa){_=q,t=null;break}else{var ab=aa-254;if(aa>264){var N=aa-257,ac=k[N];ab=E(a,q,(1<<ac)-1)+o[N],q+=ac}var ad=u[F(a,q)&$],ae=ad>>4;ad||J(3),q+=15&ad;var W=r[ae];if(ae>3){var ac=l[ae];W+=F(a,q)&(1<<ac)-1,q+=ac}if(q>y){j&&J(0);break}i&&n(s+131072);var af=s+ab;if(s<W){var ag=f-W,ah=Math.min(W,af);for(ag+s<0&&J(3);s<ah;++s)c[s]=d[ag+s]}for(;s<af;++s)c[s]=c[s-W]}}b.l=t,b.p=_,b.b=s,b.f=p,t&&(p=1,b.m=v,b.d=u,b.n=x)}while(!p)return s!=c.length&&g?H(c,0,s):c.subarray(0,s)},L=function(a,b,c){c<<=7&b;var d=b/8|0;a[d]|=c,a[d+1]|=c>>8},M=function(a,b,c){c<<=7&b;var d=b/8|0;a[d]|=c,a[d+1]|=c>>8,a[d+2]|=c>>16},N=function(a,b){for(var c=[],d=0;d<a.length;++d)a[d]&&c.push({s:d,f:a[d]});var e=c.length,f=c.slice();if(!e)return{t:U,l:0};if(1==e){var g=new h(c[0].s+1);return g[c[0].s]=1,{t:g,l:1}}c.sort(function(a,b){return a.f-b.f}),c.push({s:-1,f:25001});var j=c[0],k=c[1],l=0,m=1,n=2;for(c[0]={s:-1,f:j.f+k.f,l:j,r:k};m!=e-1;)j=c[c[l].f<c[n].f?l++:n++],k=c[l!=m&&c[l].f<c[n].f?l++:n++],c[m++]={s:-1,f:j.f+k.f,l:j,r:k};for(var o=f[0].s,d=1;d<e;++d)f[d].s>o&&(o=f[d].s);var p=new i(o+1),q=O(c[m-1],p,0);if(q>b){var d=0,r=0,s=q-b,t=1<<s;for(f.sort(function(a,b){return p[b.s]-p[a.s]||a.f-b.f});d<e;++d){var u=f[d].s;if(p[u]>b)r+=t-(1<<q-p[u]),p[u]=b;else break}for(r>>=s;r>0;){var v=f[d].s;p[v]<b?r-=1<<b-p[v]++-1:++d}for(;d>=0&&r;--d){var w=f[d].s;p[w]==b&&(--p[w],++r)}q=b}return{t:new h(p),l:q}},O=function(a,b,c){return -1==a.s?Math.max(O(a.l,b,c+1),O(a.r,b,c+1)):b[a.s]=c},P=function(a){for(var b=a.length;b&&!a[--b];);for(var c=new i(++b),d=0,e=a[0],f=1,g=function(a){c[d++]=a},h=1;h<=b;++h)if(a[h]==e&&h!=b)++f;else{if(!e&&f>2){for(;f>138;f-=138)g(32754);f>2&&(g(f>10?f-11<<5|28690:f-3<<5|12305),f=0)}else if(f>3){for(g(e),--f;f>6;f-=6)g(8304);f>2&&(g(f-3<<5|8208),f=0)}for(;f--;)g(e);f=1,e=a[h]}return{c:c.subarray(0,d),n:b}},Q=function(a,b){for(var c=0,d=0;d<b.length;++d)c+=a[d]*b[d];return c},R=function(a,b,c){var d=c.length,e=G(b+2);a[e]=255&d,a[e+1]=d>>8,a[e+2]=255^a[e],a[e+3]=255^a[e+1];for(var f=0;f<d;++f)a[e+f+4]=c[f];return(e+4+d)*8},S=function(a,b,c,d,e,f,g,h,j,n,o){L(b,o++,c),++e[256];for(var p,q,r,s,t=N(e,15),u=t.t,v=t.l,A=N(f,15),C=A.t,D=A.l,E=P(u),F=E.c,G=E.n,H=P(C),I=H.c,J=H.n,K=new i(19),O=0;O<F.length;++O)++K[31&F[O]];for(var O=0;O<I.length;++O)++K[31&I[O]];for(var S=N(K,7),T=S.t,U=S.l,V=19;V>4&&!T[m[V-1]];--V);var W=n+5<<3,X=Q(e,x)+Q(f,y)+g,Y=Q(e,u)+Q(f,C)+g+14+3*V+Q(K,T)+2*K[16]+3*K[17]+7*K[18];if(j>=0&&W<=X&&W<=Y)return R(b,o,a.subarray(j,j+n));if(L(b,o,1+(Y<X)),o+=2,Y<X){p=w(u,v,0),q=u,r=w(C,D,0),s=C;var Z=w(T,U,0);L(b,o,G-257),L(b,o+5,J-1),L(b,o+10,V-4),o+=14;for(var O=0;O<V;++O)L(b,o+3*O,T[m[O]]);o+=3*V;for(var $=[F,I],_=0;_<2;++_)for(var aa=$[_],O=0;O<aa.length;++O){var ab=31&aa[O];L(b,o,Z[ab]),o+=T[ab],ab>15&&(L(b,o,aa[O]>>5&127),o+=aa[O]>>12)}}else p=z,q=x,r=B,s=y;for(var O=0;O<h;++O){var ac=d[O];if(ac>255){var ab=ac>>18&31;M(b,o,p[ab+257]),o+=q[ab+257],ab>7&&(L(b,o,ac>>23&31),o+=k[ab]);var ad=31&ac;M(b,o,r[ad]),o+=s[ad],ad>3&&(M(b,o,ac>>5&8191),o+=l[ad])}else M(b,o,p[ac]),o+=q[ac]}return M(b,o,p[256]),o+q[256]},T=new j([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),U=new h(0),V=function(a,b,c,d,e,f){var g=f.z||a.length,m=new h(d+g+5*(1+Math.ceil(g/7e3))+e),n=m.subarray(d,m.length-e),o=f.l,q=7&(f.r||0);if(b){q&&(n[0]=f.r>>3);for(var r=T[b-1],t=r>>13,u=8191&r,v=(1<<c)-1,w=f.p||new i(32768),x=f.h||new i(v+1),y=Math.ceil(c/3),z=2*y,A=function(b){return(a[b]^a[b+1]<<y^a[b+2]<<z)&v},B=new j(25e3),C=new i(288),D=new i(32),E=0,F=0,I=f.i||0,J=0,K=f.w||0,L=0;I+2<g;++I){var M=A(I),N=32767&I,O=x[M];if(w[N]=O,x[M]=N,K<=I){var P=g-I;if((E>7e3||J>24576)&&(P>423||!o)){q=S(a,n,0,B,C,D,F,J,L,I-L,q),J=E=F=0,L=I;for(var Q=0;Q<286;++Q)C[Q]=0;for(var Q=0;Q<30;++Q)D[Q]=0}var U=2,V=0,W=u,X=N-O&32767;if(P>2&&M==A(I-X))for(var Y=Math.min(t,P)-1,Z=Math.min(32767,I),$=Math.min(258,P);X<=Z&&--W&&N!=O;){if(a[I+U]==a[I+U-X]){for(var _=0;_<$&&a[I+_]==a[I+_-X];++_);if(_>U){if(U=_,V=X,_>Y)break;for(var aa=Math.min(X,_-2),ab=0,Q=0;Q<aa;++Q){var ac=I-X+Q&32767,ad=w[ac],ae=ac-ad&32767;ae>ab&&(ab=ae,O=ac)}}}O=w[N=O],X+=N-O&32767}if(V){B[J++]=0x10000000|p[U]<<18|s[V];var af=31&p[U],ag=31&s[V];F+=k[af]+l[ag],++C[257+af],++D[ag],K=I+U,++E}else B[J++]=a[I],++C[a[I]]}}for(I=Math.max(I,K);I<g;++I)B[J++]=a[I],++C[a[I]];q=S(a,n,o,B,C,D,F,J,L,I-L,q),o||(f.r=7&q|n[q/8|0]<<3,q-=7,f.h=x,f.p=w,f.i=I,f.w=K)}else{for(var I=f.w||0;I<g+o;I+=65535){var ah=I+65535;ah>=g&&(n[q/8|0]=o,ah=g),q=R(n,q+1,a.subarray(I,ah))}f.i=g}return H(m,0,d+G(q)+e)},W=function(){for(var a=new Int32Array(256),b=0;b<256;++b){for(var c=b,d=9;--d;)c=(1&c&&-0x12477ce0)^c>>>1;a[b]=c}return a}(),X=function(){var a=-1;return{p:function(b){for(var c=a,d=0;d<b.length;++d)c=W[255&c^b[d]]^c>>>8;a=c},d:function(){return~a}}},Y=function(){var a=1,b=0;return{p:function(c){for(var d=a,e=b,f=0|c.length,g=0;g!=f;){for(var h=Math.min(g+2655,f);g<h;++g)e+=d+=c[g];d=(65535&d)+15*(d>>16),e=(65535&e)+15*(e>>16)}a=d,b=e},d:function(){return a%=65521,b%=65521,(255&a)<<24|(65280&a)<<8|(255&b)<<8|b>>8}}},Z=function(a,b,c,d,e){if(!e&&(e={l:1},b.dictionary)){var f=b.dictionary.subarray(-32768),g=new h(f.length+a.length);g.set(f),g.set(a,f.length),a=g,e.w=f.length}return V(a,null==b.level?6:b.level,null==b.mem?e.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):20:12+b.mem,c,d,e)},$=function(a,b){var c={};for(var d in a)c[d]=a[d];for(var d in b)c[d]=b[d];return c},_=function(a,b,c){for(var d=a(),e=a.toString(),f=e.slice(e.indexOf("[")+1,e.lastIndexOf("]")).replace(/\s+/g,"").split(","),g=0;g<d.length;++g){var h=d[g],i=f[g];if("function"==typeof h){b+=";"+i+"=";var j=h.toString();if(h.prototype)if(-1!=j.indexOf("[native code]")){var k=j.indexOf(" ",8)+1;b+=j.slice(k,j.indexOf("(",k))}else for(var l in b+=j,h.prototype)b+=";"+i+".prototype."+l+"="+h.prototype[l].toString();else b+=j}else c[i]=h}return b},aa=[],ab=function(a){var b=[];for(var c in a)a[c].buffer&&b.push((a[c]=new a[c].constructor(a[c])).buffer);return b},ac=function(a,b,c,d){if(!aa[c]){for(var e="",f={},h=a.length-1,i=0;i<h;++i)e=_(a[i],e,f);aa[c]={c:_(a[h],e,f),e:f}}var j=$({},aa[c].e);return g(aa[c].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+b.toString()+"}",c,j,ab(j),d)},ad=function(){return[h,i,j,k,l,m,o,r,A,C,t,I,w,D,E,F,G,H,J,K,aB,ah,ai]},ae=function(){return[h,i,j,k,l,m,p,s,z,x,B,y,t,T,U,w,L,M,N,O,P,Q,R,S,G,H,V,Z,ay,ah]},af=function(){return[aq,ar]},ag=function(){return[au]},ah=function(a){return postMessage(a,[a.buffer])},ai=function(a){return a&&{out:a.size&&new h(a.size),dictionary:a.dictionary}},aj=function(a){return a.ondata=function(a,b){return postMessage([a,b],[a.buffer])},function(b){b.data[0]?(a.push(b.data[0],b.data[1]),postMessage([b.data[0].length])):a.flush(b.data[1])}},ak=function(a,b,c,d,e,f,g){var h,i=ac(a,d,e,function(a,c){a?(i.terminate(),b.ondata.call(b,a)):Array.isArray(c)?1==c.length?(b.queuedSize-=c[0],b.ondrain&&b.ondrain(c[0])):(c[1]&&i.terminate(),b.ondata.call(b,a,c[0],c[1])):g(c)});i.postMessage(c),b.queuedSize=0,b.push=function(a,c){b.ondata||J(5),h&&b.ondata(J(4,0,1),null,!!c),b.queuedSize+=a.length,i.postMessage([a,h=c],a.buffer instanceof ArrayBuffer?[a.buffer]:[])},b.terminate=function(){i.terminate()},f&&(b.flush=function(a){i.postMessage([0,a])})},al=function(a,b){return a[b]|a[b+1]<<8},am=function(a,b){return(a[b]|a[b+1]<<8|a[b+2]<<16|a[b+3]<<24)>>>0},an=function(a,b){return am(a,b)+0x100000000*am(a,b+4)},ao=function(a,b,c){for(;c;++b)a[b]=c,c>>>=8},ap=function(a,b){var c=b.filename;if(a[0]=31,a[1]=139,a[2]=8,a[8]=b.level<2?4:2*(9==b.level),a[9]=3,0!=b.mtime&&ao(a,4,Math.floor(new Date(b.mtime||Date.now())/1e3)),c){a[3]=8;for(var d=0;d<=c.length;++d)a[d+10]=c.charCodeAt(d)}},aq=function(a){(31!=a[0]||139!=a[1]||8!=a[2])&&J(6,"invalid gzip data");var b=a[3],c=10;4&b&&(c+=(a[10]|a[11]<<8)+2);for(var d=(b>>3&1)+(b>>4&1);d>0;d-=!a[c++]);return c+(2&b)},ar=function(a){var b=a.length;return(a[b-4]|a[b-3]<<8|a[b-2]<<16|a[b-1]<<24)>>>0},as=function(a){return 10+(a.filename?a.filename.length+1:0)},at=function(a,b){var c=b.level;if(a[0]=120,a[1]=(0==c?0:c<6?1:9==c?3:2)<<6|(b.dictionary&&32),a[1]|=31-(a[0]<<8|a[1])%31,b.dictionary){var d=Y();d.p(b.dictionary),ao(a,2,d.d())}},au=function(a,b){return((15&a[0])!=8||a[0]>>4>7||(a[0]<<8|a[1])%31)&&J(6,"invalid zlib data"),(a[1]>>5&1)==+!b&&J(6,"invalid zlib data: "+(32&a[1]?"need":"unexpected")+" dictionary"),(a[1]>>3&4)+2};function av(a,b){return"function"==typeof a&&(b=a,a={}),this.ondata=b,a}var aw=function(){function a(a,b){if("function"==typeof a&&(b=a,a={}),this.ondata=b,this.o=a||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new h(98304),this.o.dictionary){var c=this.o.dictionary.subarray(-32768);this.b.set(c,32768-c.length),this.s.i=32768-c.length}}return a.prototype.p=function(a,b){this.ondata(Z(a,this.o,0,0,this.s),b)},a.prototype.push=function(a,b){this.ondata||J(5),this.s.l&&J(4);var c=a.length+this.s.z;if(c>this.b.length){if(c>2*this.b.length-32768){var d=new h(-32768&c);d.set(this.b.subarray(0,this.s.z)),this.b=d}var e=this.b.length-this.s.z;this.b.set(a.subarray(0,e),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(a.subarray(e),32768),this.s.z=a.length-e+32768,this.s.i=32766,this.s.w=32768}else this.b.set(a,this.s.z),this.s.z+=a.length;this.s.l=1&b,(this.s.z>this.s.w+8191||b)&&(this.p(this.b,b||!1),this.s.w=this.s.i,this.s.i-=2),b&&(this.s=this.o={},this.b=U)},a.prototype.flush=function(a){if(this.ondata||J(5),this.s.l&&J(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2,a){var b=new h(6);b[0]=this.s.r>>3;var c=R(b,this.s.r,U);this.s.r=0,this.ondata(b.subarray(0,c>>3),!1)}},a}(),ax=function(a,b){ak([ae,function(){return[aj,aw]}],this,av.call(this,a,b),function(a){onmessage=aj(new aw(a.data))},6,1)};function ay(a,b){return Z(a,b||{},0,0)}var az=function(){function a(a,b){"function"==typeof a&&(b=a,a={}),this.ondata=b;var c=a&&a.dictionary&&a.dictionary.subarray(-32768);this.s={i:0,b:c?c.length:0},this.o=new h(32768),this.p=new h(0),c&&this.o.set(c)}return a.prototype.e=function(a){if(this.ondata||J(5),this.d&&J(4),this.p.length){if(a.length){var b=new h(this.p.length+a.length);b.set(this.p),b.set(a,this.p.length),this.p=b}}else this.p=a},a.prototype.c=function(a){this.s.i=+(this.d=a||!1);var b=this.s.b,c=K(this.p,this.s,this.o);this.ondata(H(c,b,this.s.b),this.d),this.o=H(c,this.s.b-32768),this.s.b=this.o.length,this.p=H(this.p,this.s.p/8|0),this.s.p&=7},a.prototype.push=function(a,b){this.e(a),this.c(b)},a}(),aA=function(a,b){ak([ad,function(){return[aj,az]}],this,av.call(this,a,b),function(a){onmessage=aj(new az(a.data))},7,0)};function aB(a,b){return K(a,{i:2},b&&b.out,b&&b.dictionary)}(function(){function a(a,b){this.c=X(),this.l=0,this.v=1,aw.call(this,a,b)}a.prototype.push=function(a,b){this.c.p(a),this.l+=a.length,aw.prototype.push.call(this,a,b)},a.prototype.p=function(a,b){var c=Z(a,this.o,this.v&&as(this.o),b&&8,this.s);this.v&&(ap(c,this.o),this.v=0),b&&(ao(c,c.length-8,this.c.d()),ao(c,c.length-4,this.l)),this.ondata(c,b)},a.prototype.flush=function(a){aw.prototype.flush.call(this,a)}})();var aC=function(){function a(a,b){this.v=1,this.r=0,az.call(this,a,b)}return a.prototype.push=function(a,b){if(az.prototype.e.call(this,a),this.r+=a.length,this.v){var c=this.p.subarray(this.v-1),d=c.length>3?aq(c):4;if(d>c.length){if(!b)return}else this.v>1&&this.onmember&&this.onmember(this.r-c.length);this.p=c.subarray(d),this.v=0}az.prototype.c.call(this,0),this.s.f&&!this.s.l?(this.v=G(this.s.p)+9,this.s={i:0},this.o=new h(0),this.push(new h(0),b)):b&&az.prototype.c.call(this,b)},a}(),aD=function(a,b){var c=this;ak([ad,af,function(){return[aj,az,aC]}],this,av.call(this,a,b),function(a){var b=new aC(a.data);b.onmember=function(a){return postMessage(a)},onmessage=aj(b)},9,0,function(a){return c.onmember&&c.onmember(a)})},aE=(function(){function a(a,b){this.c=Y(),this.v=1,aw.call(this,a,b)}a.prototype.push=function(a,b){this.c.p(a),aw.prototype.push.call(this,a,b)},a.prototype.p=function(a,b){var c=Z(a,this.o,this.v&&(this.o.dictionary?6:2),b&&4,this.s);this.v&&(at(c,this.o),this.v=0),b&&ao(c,c.length-4,this.c.d()),this.ondata(c,b)},a.prototype.flush=function(a){aw.prototype.flush.call(this,a)}}(),function(){function a(a,b){az.call(this,a,b),this.v=a&&a.dictionary?2:1}return a.prototype.push=function(a,b){if(az.prototype.e.call(this,a),this.v){if(this.p.length<6&&!b)return;this.p=this.p.subarray(au(this.p,this.v-1)),this.v=0}b&&(this.p.length<4&&J(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),az.prototype.c.call(this,b)},a}()),aF=function(a,b){ak([ad,ag,function(){return[aj,az,aE]}],this,av.call(this,a,b),function(a){onmessage=aj(new aE(a.data))},11,0)},aG=function(){function a(a,b){this.o=av.call(this,a,b)||{},this.G=aC,this.I=az,this.Z=aE}return a.prototype.i=function(){var a=this;this.s.ondata=function(b,c){a.ondata(b,c)}},a.prototype.push=function(a,b){if(this.ondata||J(5),this.s)this.s.push(a,b);else{if(this.p&&this.p.length){var c=new h(this.p.length+a.length);c.set(this.p),c.set(a,this.p.length)}else this.p=a;this.p.length>2&&(this.s=31==this.p[0]&&139==this.p[1]&&8==this.p[2]?new this.G(this.o):(15&this.p[0])!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(this.o):new this.Z(this.o),this.i(),this.s.push(this.p,b),this.p=null)}},a}();function aH(a,b){aG.call(this,a,b),this.queuedSize=0,this.G=aD,this.I=aA,this.Z=aF}aH.prototype.i=function(){var a=this;this.s.ondata=function(b,c,d){a.ondata(b,c,d)},this.s.ondrain=function(b){a.queuedSize-=b,a.ondrain&&a.ondrain(b)}},aH.prototype.push=function(a,b){this.queuedSize+=a.length,aG.prototype.push.call(this,a,b)};var aI="u">typeof TextEncoder&&new TextEncoder,aJ="u">typeof TextDecoder&&new TextDecoder,aK=0;try{aJ.decode(U,{stream:!0}),aK=1}catch(a){}var aL=function(a){for(var b="",c=0;;){var d=a[c++],e=(d>127)+(d>223)+(d>239);if(c+e>a.length)return{s:b,r:H(a,c-1)};e?3==e?b+=String.fromCharCode(55296|(d=((15&d)<<18|(63&a[c++])<<12|(63&a[c++])<<6|63&a[c++])-65536)>>10,56320|1023&d):1&e?b+=String.fromCharCode((31&d)<<6|63&a[c++]):b+=String.fromCharCode((15&d)<<12|(63&a[c++])<<6|63&a[c++]):b+=String.fromCharCode(d)}};function aM(a,b){if(b){for(var c=new h(a.length),d=0;d<a.length;++d)c[d]=a.charCodeAt(d);return c}if(aI)return aI.encode(a);for(var e=a.length,f=new h(a.length+(a.length>>1)),g=0,i=function(a){f[g++]=a},d=0;d<e;++d){if(g+5>f.length){var j=new h(g+8+(e-d<<1));j.set(f),f=j}var k=a.charCodeAt(d);k<128||b?i(k):(k<2048?i(192|k>>6):(k>55295&&k<57344?(i(240|(k=65536+(1047552&k)|1023&a.charCodeAt(++d))>>18),i(128|k>>12&63)):i(224|k>>12),i(128|k>>6&63)),i(128|63&k))}return H(f,0,g)}function aN(a,b){if(b){for(var c="",d=0;d<a.length;d+=16384)c+=String.fromCharCode.apply(null,a.subarray(d,d+16384));return c}if(aJ)return aJ.decode(a);var e=aL(a),f=e.s,c=e.r;return c.length&&J(8),f}(function(a){this.ondata=a,aK?this.t=new TextDecoder:this.p=U}).prototype.push=function(a,b){if(this.ondata||J(5),b=!!b,this.t){this.ondata(this.t.decode(a,{stream:!0}),b),b&&(this.t.decode().length&&J(8),this.t=null);return}this.p||J(4);var c=new h(this.p.length+a.length);c.set(this.p),c.set(a,this.p.length);var d=aL(c),e=d.s,f=d.r;b?(f.length&&J(8),this.p=null):this.p=f,this.ondata(e,b)},(function(a){this.ondata=a}).prototype.push=function(a,b){this.ondata||J(5),this.d&&J(4),this.ondata(aM(a),this.d=b||!1)};var aO=function(a){return 1==a?3:a<6?2:+(9==a)},aP=function(a,b,c){var d=al(a,b+28),e=al(a,b+30),f=aN(a.subarray(b+46,b+46+d),!(2048&al(a,b+8))),g=b+46+d,h=aQ(a,g,e,c,am(a,b+20),am(a,b+24),am(a,b+42)),i=h[0],j=h[1],k=h[2];return[al(a,b+10),i,j,f,g+e+al(a,b+32),k]},aQ=function(a,b,c,d,e,f,g){var h=0xffffffff==e,i=0xffffffff==f,j=0xffffffff==g,k=b+c;if(d&&h+i+j){for(;b+4<k;b+=4+al(a,b+2))if(1==al(a,b))return[h?an(a,b+4+8*i):e,i?an(a,b+4):f,j?an(a,b+4+8*(i+h)):g,1];d<2&&J(13)}return[e,f,g,0]},aR=function(a){var b=0;if(a)for(var c in a){var d=a[c].length;d>65535&&J(9),b+=d+4}return b},aS=function(a,b,c,d,e,f,g,h){var i=d.length,j=c.extra,k=h&&h.length,l=aR(j);ao(a,b,null!=g?0x2014b50:0x4034b50),b+=4,null!=g&&(a[b++]=20,a[b++]=c.os),a[b]=20,b+=2,a[b++]=c.flag<<1|(f<0&&8),a[b++]=e&&8,a[b++]=255&c.compression,a[b++]=c.compression>>8;var m=new Date(null==c.mtime?Date.now():c.mtime),n=m.getFullYear()-1980;if((n<0||n>119)&&J(10),ao(a,b,n<<25|m.getMonth()+1<<21|m.getDate()<<16|m.getHours()<<11|m.getMinutes()<<5|m.getSeconds()>>1),b+=4,-1!=f&&(ao(a,b,c.crc),ao(a,b+4,f<0?-f-2:f),ao(a,b+8,c.size)),ao(a,b+12,i),ao(a,b+14,l),b+=16,null!=g&&(ao(a,b,k),ao(a,b+6,c.attrs),ao(a,b+10,g),b+=14),a.set(d,b),b+=i,l)for(var o in j){var p=j[o],q=p.length;ao(a,b,+o),ao(a,b+2,q),a.set(p,b+4),b+=4+q}return k&&(a.set(h,b),b+=k),b},aT=function(a,b,c,d,e){ao(a,b,0x6054b50),ao(a,b+8,c),ao(a,b+10,c),ao(a,b+12,d),ao(a,b+16,e)},aU=function(){function a(a){this.filename=a,this.c=X(),this.size=0,this.compression=0}return a.prototype.process=function(a,b){this.ondata(null,a,b)},a.prototype.push=function(a,b){this.ondata||J(5),this.c.p(a),this.size+=a.length,b&&(this.crc=this.c.d()),this.process(a,b||!1)},a}();function aV(a,b){var c=this;b||(b={}),aU.call(this,a),this.d=new aw(b,function(a,b){c.ondata(null,a,b)}),this.compression=8,this.flag=aO(b.level)}function aW(a,b){var c=this;b||(b={}),aU.call(this,a),this.d=new ax(b,function(a,b,d){c.ondata(a,b,d)}),this.compression=8,this.flag=aO(b.level),this.terminate=this.d.terminate}function aX(a){this.ondata=a,this.u=[],this.d=1}aV.prototype.process=function(a,b){try{this.d.push(a,b)}catch(a){this.ondata(a,null,b)}},aV.prototype.push=function(a,b){aU.prototype.push.call(this,a,b)},aW.prototype.process=function(a,b){this.d.push(a,b)},aW.prototype.push=function(a,b){aU.prototype.push.call(this,a,b)},aX.prototype.add=function(a){var b=this;if(this.ondata||J(5),2&this.d)this.ondata(J(4+(1&this.d)*8,0,1),null,!1);else{var c=aM(a.filename),d=c.length,e=a.comment,f=e&&aM(e),g=d!=a.filename.length||f&&e.length!=f.length,i=d+aR(a.extra)+30;d>65535&&this.ondata(J(11,0,1),null,!1);var j=new h(i);aS(j,0,a,c,g,-1);var k=[j],l=function(){for(var a=0,c=k;a<c.length;a++){var d=c[a];b.ondata(null,d,!1)}k=[]},m=this.d;this.d=0;var n=this.u.length,o=$(a,{f:c,u:g,o:f,t:function(){a.terminate&&a.terminate()},r:function(){if(l(),m){var a=b.u[n+1];a?a.r():b.d=1}m=1}}),p=0;a.ondata=function(c,d,e){if(c)b.ondata(c,d,e),b.terminate();else if(p+=d.length,k.push(d),e){var f=new h(16);ao(f,0,0x8074b50),ao(f,4,a.crc),ao(f,8,p),ao(f,12,a.size),k.push(f),o.c=p,o.b=i+p+16,o.crc=a.crc,o.size=a.size,m&&o.r(),m=1}else m&&l()},this.u.push(o)}},aX.prototype.end=function(){var a=this;2&this.d?this.ondata(J(4+(1&this.d)*8,0,1),null,!0):(this.d?this.e():this.u.push({r:function(){1&a.d&&(a.u.splice(-1,1),a.e())},t:function(){}}),this.d=3)},aX.prototype.e=function(){for(var a=0,b=0,c=0,d=0,e=this.u;d<e.length;d++){var f=e[d];c+=46+f.f.length+aR(f.extra)+(f.o?f.o.length:0)}for(var g=new h(c+22),i=0,j=this.u;i<j.length;i++){var f=j[i];aS(g,a,f,f.f,f.u,-f.c-2,b,f.o),a+=46+f.f.length+aR(f.extra)+(f.o?f.o.length:0),b+=f.b}aT(g,a,this.u.length,c,b),this.ondata(null,g,!0),this.d=2},aX.prototype.terminate=function(){for(var a=0,b=this.u;a<b.length;a++)b[a].t();this.d=2};var aY=function(){function a(){}return a.prototype.push=function(a,b){this.ondata(null,a,b)},a.compression=0,a}();function aZ(){var a=this;this.i=new az(function(b,c){a.ondata(null,b,c)})}function a$(a,b){var c=this;b<32e4?this.i=new az(function(a,b){c.ondata(null,a,b)}):(this.i=new aA(function(a,b,d){c.ondata(a,b,d)}),this.terminate=this.i.terminate)}function a_(a){this.onfile=a,this.k=[],this.o={0:aY},this.p=U}aZ.prototype.push=function(a,b){try{this.i.push(a,b)}catch(a){this.ondata(a,null,b)}},aZ.compression=8,a$.prototype.push=function(a,b){this.i.terminate&&(a=H(a,0)),this.i.push(a,b)},a$.compression=8,a_.prototype.push=function(a,b){var c=this;if(this.onfile||J(5),this.p||J(4),this.c>0){var d=Math.min(this.c,a.length),e=a.subarray(0,d);if(this.c-=d,this.d?this.d.push(e,!this.c):this.k[0].push(e),(a=a.subarray(d)).length)return this.push(a,b)}else{var f=0,g=0,i=void 0,j=void 0;this.p.length?a.length?((j=new h(this.p.length+a.length)).set(this.p),j.set(a,this.p.length)):j=this.p:j=a;for(var k=j.length,l=this.c,m=l&&this.d,n=this;g<k-4&&"break"!==function(){var a=am(j,g);if(0x4034b50==a){f=1,i=g,n.d=null,n.c=0;var b=al(j,g+6),d=al(j,g+8),e=al(j,g+26),h=al(j,g+28);if(k>g+30+e+h){var m,o=[];n.k.unshift(o),f=2;var p=am(j,g+18),q=am(j,g+22),r=aN(j.subarray(g+30,g+=30+e),!(2048&b)),s=aQ(j,g,h,2,p,q,0),t=s[0],u=s[1],v=s[3];8&b&&(t=-1-v),g+=h,n.c=t;var w={name:r,compression:d,start:function(){if(w.ondata||J(5),t){var a=c.o[d];a||w.ondata(J(14,"unknown compression type "+d,1),null,!1),(m=t<0?new a(r):new a(r,t,u)).ondata=function(a,b,c){w.ondata(a,b,c)};for(var b=0;b<o.length;b++){var e=o[b];m.push(e,!1)}c.k[0]==o&&c.c?c.d=m:m.push(U,!0)}else w.ondata(null,U,!0)},terminate:function(){m&&m.terminate&&m.terminate()}};t>=0&&(w.size=t,w.originalSize=u),n.onfile(w)}return"break"}if(l){if(0x8074b50==a)return i=g+=12+(-2==l&&8),f=3,n.c=0,"break";else if(0x2014b50==a)return i=g-=4,f=3,n.c=0,"break"}}();++g);if(this.p=U,l<0){var o=f?j.subarray(0,i-12-(-2==l&&8)-(0x8074b50==am(j,i-16)&&4)):j.subarray(0,g);m?m.push(o,!!f):this.k[+(2==f)].push(o)}if(2&f)return this.push(j.subarray(g),b);this.p=j.subarray(g)}b&&(this.c&&J(13),this.p=null)},a_.prototype.register=function(a){this.o[a.compression]=a},"function"==typeof queueMicrotask&&queueMicrotask;var a0=a.i(53112),a1=a.i(762805),a2=a.i(951941),a3=a.i(225689),a4=a.i(293480),a5=a.i(713095);let a6=(0,a3.serverAction)(async a=>{let{name:b,description:c,content:d}=a2.SkillDraftSchema.parse(a);return await (0,a1.writeCustomSkill)(b,new Map([["SKILL.md",(0,a1.renderSkillMarkdown)({name:b,description:c},d)]]))}),a7=(0,a3.serverAction)(async a=>{let{fileName:b,base64:c}=a2.SkillUploadSchema.parse(a),d=Buffer.from(c,"base64");d.byteLength>0x1400000&&(0,a4.publicError)("File is larger than 20 MB");let e=b.toLowerCase(),f=new Map;if(e.endsWith(".md"))f.set("SKILL.md",d);else if(e.endsWith(".zip")||e.endsWith(".skill")){let a;try{a=function(a){for(var b={},c=a.length-22;0x6054b50!=am(a,c);--c)(!c||a.length-c>65558)&&J(13);var d=al(a,c+8);if(!d)return{};var e=am(a,c+16),f=0x7064b50==am(a,c-20);if(f){var g=am(a,c-12);(f=0x6064b50==am(a,g))&&(d=am(a,g+32),e=am(a,g+48))}for(var i=void 0,j=0;j<d;++j){var k=aP(a,e,f),l=k[0],m=k[1],n=k[2],o=k[3],p=k[4],q=k[5],r=q+30+al(a,q+26)+al(a,q+28);e=p,(!i||i({name:o,size:m,originalSize:n,compression:l}))&&(l?8==l?b[o]=aB(a.subarray(r,r+m),{out:new h(n)}):J(14,"unknown compression type "+l):b[o]=H(a,r,r+m))}return b}(new Uint8Array(d))}catch{(0,a4.publicError)("The archive could not be opened")}let b=Object.keys(a).filter(a=>!a.startsWith("__MACOSX/")).filter(a=>"SKILL.md"===a.split("/").pop()).sort((a,b)=>a.split("/").length-b.split("/").length)[0];b||(0,a4.publicError)("The archive has no SKILL.md");let c=b.slice(0,-8);for(let[b,d]of Object.entries(a)){if(!b.startsWith(c)||b.endsWith("/")||b.startsWith("__MACOSX/"))continue;let a=b.slice(c.length);a.split("/").some(a=>".."===a||""===a)||f.set(a,d)}}else(0,a4.publicError)("Upload a .md, .zip or .skill file");let g=f.get("SKILL.md"),i="string"==typeof g?g:Buffer.from(g).toString("utf-8"),j=(0,a1.parseFrontmatter)(i);return(0,a1.writeCustomSkill)(j.name,f)}),a8=(0,a3.serverAction)(async a=>{await (0,a1.deleteCustomSkill)(a2.SkillNameSchema.parse(a))}),a9=(0,a3.serverAction)(async(a,b,c)=>{await (0,a1.setSkillDisabled)(a2.SkillSourceSchema.parse(a),a2.SkillNameSchema.parse(b),a0.z.boolean().parse(c))});(0,a5.ensureServerEntryExports)([a6,a7,a8,a9]),(0,e.registerServerReference)(a6,"7fd2be038aaf192febe6ff64aaa1cae78aa143c0c0",null),(0,e.registerServerReference)(a7,"7fc28100d5c9fe991232c48d1c4ed58771916e504e",null),(0,e.registerServerReference)(a8,"7f9f1e120f08a19080c12fcdb8240f9c4acc302d2e",null),(0,e.registerServerReference)(a9,"7f63c41bac986f62db6dafc188e4e50b71eff95d4d",null),a.s(["createSkillAction",0,a6,"deleteSkillAction",0,a8,"setSkillDisabledAction",0,a9,"uploadSkillAction",0,a7],432443)},439759,a=>a.a(async(b,c)=>{try{var d=a.i(137936),e=a.i(527990),f=a.i(723885),g=a.i(738131),h=a.i(689656),i=a.i(614747),j=a.i(674986),k=a.i(84929),l=a.i(725466),m=a.i(986743),n=a.i(225689),o=a.i(293480),p=a.i(253514),q=a.i(569549),r=a.i(3894),s=a.i(713095),t=b([g,i,j,k,l,m,q]);async function u(a){if(a&&await (0,l.readConfig)(h.SPEACH_MODEL_PROVIDERS[a.provider].apiKeyName))return a;for(let a of h.SPEACH_MODEL_PROVIDER_LIST)if(await (0,l.readConfig)(a.apiKeyName))return{provider:a.id,voice:null,model:null};(0,o.publicError)("No voice key — calls run on one. Add one in Config.")}async function v(){let a=await (0,g.loadTools)({target:"thursday"});return Object.entries(a).map(([a,b])=>{let{$schema:c,...d}=(0,e.asSchema)(b.inputSchema).jsonSchema;return{name:a,description:"string"==typeof b.description?b.description:"",parameters:d}})}[g,i,j,k,l,m,q]=t.then?(await t)():t;let w=(0,n.serverAction)(async a=>{let b=r.ThursdaySettingsSchema.parse(a),c=await u(b.model),d=h.SPEACH_MODEL_PROVIDERS[c.provider],e=await (0,l.readConfig)(d.apiKeyName);e||(0,o.publicError)(`No ${d.label} key — add one in Config.`);let[f,g]=await Promise.all([(0,i.loadThursdayPrompt)(b.systemPrompt,b.locale),v()]),j=c.model??d.models[0].id,k=await (0,p.issueClientSecret)({provider:c.provider,apiKey:e,model:j});return{callId:await (0,q.insertCall)({provider:c.provider,model:j}),provider:c.provider,credential:k,session:{model:j,voice:c.voice??d.defaultVoice,instructions:f.text,tools:g},opening:f.opening}}),x=(0,n.serverAction)(async a=>{await (0,q.writeCallSkillsOn)(f.default.boolean().parse(a))}),y=(0,n.serverAction)(async(a,b)=>{await (0,q.saveTurns)(a,r.CallTurnSchema.array().min(1).parse(b))}),z=(0,n.serverAction)(async a=>{await (0,q.endCall)(a)}),A=(0,n.serverAction)(async a=>{await (0,q.deleteCall)(a)||(0,o.publicError)("That call is still on the line — hang up first.")}),B=(0,n.serverAction)(async()=>(0,q.deleteEndedCalls)()),C=(0,n.serverAction)(async()=>{let a=await (0,k.listAllTaskIds)();for(let b of a)await (0,j.removeTask)(b);let b=await (0,q.deleteEndedCalls)(),c=await (0,m.deleteAllNotes)();return{calls:b,tasks:a.length,notes:c}});(0,s.ensureServerEntryExports)([w,x,y,z,A,B,C]),(0,d.registerServerReference)(w,"7f718e4e9d0a05662ce165cdcea1bdcbe5cf4ec5c1",null),(0,d.registerServerReference)(x,"7f7ed086f54523b83b71c066e348abc9fb5050f73d",null),(0,d.registerServerReference)(y,"7f8f532d3fc2a22c8db7249a978ad54a5a84c13722",null),(0,d.registerServerReference)(z,"7f8c7d9ccc19b17cf88189ce250f58632b0cec1b3f",null),(0,d.registerServerReference)(A,"7f0ac011b0335ccbc4e877ba487ece0ed239d2f75d",null),(0,d.registerServerReference)(B,"7f82cfe01c014083fefd463a144cd831b6f3c3fbcb",null),(0,d.registerServerReference)(C,"7fa241ae08bf992a91ff0305fd62cff2597224f132",null),a.s(["deleteCallAction",0,A,"deleteEndedCallsAction",0,B,"endCallAction",0,z,"openCallAction",0,w,"resetHistoryAction",0,C,"saveTurnsAction",0,y,"setCallSkillsAction",0,x]),c()}catch(a){c(a)}},!1),253514,a=>{"use strict";var b=a.i(176668),c=a.i(293480),d=a.i(223622);let e={openai:({model:a})=>({url:"https://api.openai.com/v1/realtime/client_secrets",body:{session:{type:"realtime",model:a}}}),xai:({model:a,ttlSeconds:b})=>({url:"https://api.x.ai/v1/realtime/client_secrets",body:{expires_after:{seconds:b},session:{model:a}}})};async function f({provider:a,apiKey:g,model:h,ttlSeconds:i=600}){var j;let k,l,{url:m,body:n}=e[a]({model:h,ttlSeconds:i}),o=await fetch(m,{method:"POST",headers:{Authorization:`Bearer ${g}`,"Content-Type":"application/json"},body:JSON.stringify(n)}).catch(d=>{b.logger.warn(`${a} unreachable`,d),(0,c.publicError)(`Could not reach ${a}.`)}),p=await o.json().catch(()=>null);o.ok||(0,c.publicError)((j=o.status,"string"==typeof(l="string"==typeof(k=p?.error)?k:k?.message??p?.message)&&l.trim()?l:`Could not start a session (${j})`));let q=d.RealtimeCredentialSchema.safeParse(p);return q.success||(0,c.publicError)("The session token came back in a shape we do not know."),{value:q.data.value,expiresAt:q.data.expires_at}}a.s(["issueClientSecret",0,f])}];
56
60
 
57
61
  //# sourceMappingURL=%5Broot-of-the-server%5D__10-dz5o._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[589578,a=>{a.v({className:"geist_a71539c9-module__T19VSG__className",variable:"geist_a71539c9-module__T19VSG__variable"})},435214,a=>{a.v({className:"geist_mono_8d43a2aa-module__8Li5zG__className",variable:"geist_mono_8d43a2aa-module__8Li5zG__variable"})},2844,a=>{a.v({className:"noto_sans_kr_aea9f400-module__SrCM8q__className",variable:"noto_sans_kr_aea9f400-module__SrCM8q__variable"})},773791,a=>{"use strict";a.s(["AppEventSource",()=>c,"useAppEvent",()=>d]);var b=a.i(211857);let c=(0,b.registerClientReference)(function(){throw Error("Attempted to call AppEventSource() from the server but AppEventSource is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/app/api/events/app-event.client.ts","AppEventSource"),d=(0,b.registerClientReference)(function(){throw Error("Attempted to call useAppEvent() from the server but useAppEvent is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/app/api/events/app-event.client.ts","useAppEvent")},720519,a=>{"use strict";var b=a.i(773791);a.n(b)},233290,a=>{"use strict";var b=a.i(907997),c=a.i(589578);let d={className:c.default.className,style:{fontFamily:"'Geist', 'Geist Fallback'",fontStyle:"normal"}};null!=c.default.variable&&(d.variable=c.default.variable);var e=a.i(435214);let f={className:e.default.className,style:{fontFamily:"'Geist Mono', 'Geist Mono Fallback'",fontStyle:"normal"}};null!=e.default.variable&&(f.variable=e.default.variable);var g=a.i(2844);let h={className:g.default.className,style:{fontFamily:"'Noto Sans KR', 'Noto Sans KR Fallback'",fontStyle:"normal"}};null!=g.default.variable&&(h.variable=g.default.variable);var i=a.i(371618),j=a.i(720519),k=a.i(322950),l=a.i(996266),m=a.i(569572);let n=`(function(){try{var t=localStorage.getItem(${JSON.stringify("thursday.theme")});var d=t==="dark"||(t!=="light"&&matchMedia("(prefers-color-scheme: dark)").matches);var h=document.documentElement;h.classList.toggle("dark",d);h.style.colorScheme=d?"dark":"light"}catch(e){}})();`,o={title:m.APP_NAME,description:`The "${m.APP_NAME}" is a voice agent that can help you with your daily tasks.`};a.s(["default",0,function({children:a}){return(0,b.jsx)("html",{lang:"en",suppressHydrationWarning:!0,className:`${d.variable} ${f.variable} ${h.variable} h-full antialiased`,children:(0,b.jsxs)("body",{className:"h-screen w-full flex flex-col",children:[(0,b.jsx)(i.default,{id:"theme-boot",strategy:"beforeInteractive",children:n}),(0,b.jsx)(k.ThemeSync,{}),(0,b.jsx)(j.AppEventSource,{}),a,(0,b.jsx)(l.Toaster,{})]})})},"metadata",0,o],233290)},70864,function(a){a.n(a.i(233290))},265728,a=>{"use strict";a.s(["ThemeSync",()=>b]);let b=(0,a.i(211857).registerClientReference)(function(){throw Error("Attempted to call ThemeSync() from the server but ThemeSync is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/ui/theme-sync.tsx","ThemeSync")},322950,a=>{"use strict";var b=a.i(265728);a.n(b)},502807,a=>{"use strict";a.s(["Toast",()=>c,"ToastAction",()=>d,"ToastClose",()=>e,"ToastContent",()=>f,"ToastDescription",()=>g,"ToastPortal",()=>h,"ToastProvider",()=>i,"ToastTitle",()=>j,"ToastViewport",()=>k,"Toaster",()=>l,"createToastManager",()=>m,"toast",()=>n,"useToastManager",()=>o]);var b=a.i(211857);let c=(0,b.registerClientReference)(function(){throw Error("Attempted to call Toast() from the server but Toast is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/ui/toast.tsx","Toast"),d=(0,b.registerClientReference)(function(){throw Error("Attempted to call ToastAction() from the server but ToastAction is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/ui/toast.tsx","ToastAction"),e=(0,b.registerClientReference)(function(){throw Error("Attempted to call ToastClose() from the server but ToastClose is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/ui/toast.tsx","ToastClose"),f=(0,b.registerClientReference)(function(){throw Error("Attempted to call ToastContent() from the server but ToastContent is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/ui/toast.tsx","ToastContent"),g=(0,b.registerClientReference)(function(){throw Error("Attempted to call ToastDescription() from the server but ToastDescription is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/ui/toast.tsx","ToastDescription"),h=(0,b.registerClientReference)(function(){throw Error("Attempted to call ToastPortal() from the server but ToastPortal is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/ui/toast.tsx","ToastPortal"),i=(0,b.registerClientReference)(function(){throw Error("Attempted to call ToastProvider() from the server but ToastProvider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/ui/toast.tsx","ToastProvider"),j=(0,b.registerClientReference)(function(){throw Error("Attempted to call ToastTitle() from the server but ToastTitle is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/ui/toast.tsx","ToastTitle"),k=(0,b.registerClientReference)(function(){throw Error("Attempted to call ToastViewport() from the server but ToastViewport is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/ui/toast.tsx","ToastViewport"),l=(0,b.registerClientReference)(function(){throw Error("Attempted to call Toaster() from the server but Toaster is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/ui/toast.tsx","Toaster"),m=(0,b.registerClientReference)(function(){throw Error("Attempted to call createToastManager() from the server but createToastManager is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/ui/toast.tsx","createToastManager"),n=(0,b.registerClientReference)(function(){throw Error("Attempted to call toast() from the server but toast is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/ui/toast.tsx","toast"),o=(0,b.registerClientReference)(function(){throw Error("Attempted to call useToastManager() from the server but useToastManager is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/ui/toast.tsx","useToastManager")},996266,a=>{"use strict";var b=a.i(502807);a.n(b)},569572,a=>{"use strict";let b=process.env.THURSDAY_APP_DIR?.trim()||process.cwd(),c=process.env.THURSDAY_HOME?.trim()||process.cwd(),d=process.env.THURSDAY_URL?.trim()||`http://localhost:${process.env.PORT?.trim()||3e3}`,e=`file:${c}/local.db`,f=".ai-workspace",g={workspace:f,artifacts:"artifacts",projects:"projects",scratch:"scratch",bots:"bots",output:".output",skills:{default:"skills",custom:`${f}/.agents/skills`}};a.s(["APP_DIR",0,b,"APP_NAME",0,"Thursday","APP_URL",0,d,"ASCII_FACE",0,{charset:"emojiOnly",fontSize:{default:8,min:4,max:16},density:{default:1.4,min:.6,max:2}},"BOT_MEMORY_LISTED",0,20,"BOT_RUN",0,{steps:100,compactAt:5e5,compactHeadroom:.8,summaryWords:{min:600,max:3e3,perTokens:200},depth:2,askBack:3,silenceMs:3e5,autoResumes:3,retryAfterMs:[3e4,12e4,3e5],overflowShrink:.6,compactFiles:40},"BROWSER_GONE_MS",0,1e4,"BROWSER_SKILL",0,"browser","BROWSER_VIEWPORT",0,"700x700","CHATGPT_SIGN_IN",0,{waitMs:6e5,renewBeforeMs:3e5},"CONNECTED_TOOL_TIMEOUT_MS",0,6e5,"DATA_DIR",0,c,"DB_FILE_NAME",0,e,"EXEC_KILL_GRACE_MS",0,5e3,"EXEC_TIMEOUT_MS",0,18e4,"INBOX_FINISHED",0,3,"IS_DEV",0,!1,"MEMORY_CONVERSATION_PAGE",0,100,"MEMORY_LIMITS",0,{facts:400,factsPerNote:50,carried:20},"PAGE_SIZE",0,50,"PATHS",0,g,"PROMPT_BUDGET",0,6e3,"PROMPT_LINE",0,{skill:90,toolArgs:30,jobOutcome:160,callTurn:160,botMemory:100},"RECENT_CALL",0,{rows:20,tokens:600},"SEARCH",0,{sources:6,excerptChars:1200,timeoutMs:3e4},"STUDIO_SERVER",0,"studio","TOOL_OUTPUT",0,{max:8e3,head:5500,tail:1500},"WORKSPACE_KEEP",0,{forMs:2592e5,sweepEveryMs:36e5},"WORKSPACE_VIEW",0,{rows:200,textMax:524288,elementMax:0x3200000}])},944536,(a,b,c)=>{let{createClientModuleProxy:d}=a.r(211857);a.n(d("[project]/node_modules/next/dist/client/script.js"))},411153,a=>{"use strict";var b=a.i(944536);a.n(b)},371618,(a,b,c)=>{b.exports=a.r(411153)}];
1
+ module.exports=[589578,a=>{a.v({className:"geist_a71539c9-module__T19VSG__className",variable:"geist_a71539c9-module__T19VSG__variable"})},435214,a=>{a.v({className:"geist_mono_8d43a2aa-module__8Li5zG__className",variable:"geist_mono_8d43a2aa-module__8Li5zG__variable"})},2844,a=>{a.v({className:"noto_sans_kr_aea9f400-module__SrCM8q__className",variable:"noto_sans_kr_aea9f400-module__SrCM8q__variable"})},773791,a=>{"use strict";a.s(["AppEventSource",()=>c,"useAppEvent",()=>d]);var b=a.i(211857);let c=(0,b.registerClientReference)(function(){throw Error("Attempted to call AppEventSource() from the server but AppEventSource is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/app/api/events/app-event.client.ts","AppEventSource"),d=(0,b.registerClientReference)(function(){throw Error("Attempted to call useAppEvent() from the server but useAppEvent is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/app/api/events/app-event.client.ts","useAppEvent")},720519,a=>{"use strict";var b=a.i(773791);a.n(b)},233290,a=>{"use strict";var b=a.i(907997),c=a.i(589578);let d={className:c.default.className,style:{fontFamily:"'Geist', 'Geist Fallback'",fontStyle:"normal"}};null!=c.default.variable&&(d.variable=c.default.variable);var e=a.i(435214);let f={className:e.default.className,style:{fontFamily:"'Geist Mono', 'Geist Mono Fallback'",fontStyle:"normal"}};null!=e.default.variable&&(f.variable=e.default.variable);var g=a.i(2844);let h={className:g.default.className,style:{fontFamily:"'Noto Sans KR', 'Noto Sans KR Fallback'",fontStyle:"normal"}};null!=g.default.variable&&(h.variable=g.default.variable);var i=a.i(371618),j=a.i(720519),k=a.i(322950),l=a.i(996266),m=a.i(569572);let n=`(function(){try{var t=localStorage.getItem(${JSON.stringify("thursday.theme")});var d=t==="dark"||(t!=="light"&&matchMedia("(prefers-color-scheme: dark)").matches);var h=document.documentElement;h.classList.toggle("dark",d);h.style.colorScheme=d?"dark":"light"}catch(e){}})();`,o={title:m.APP_NAME,description:`The "${m.APP_NAME}" is a voice agent that can help you with your daily tasks.`};a.s(["default",0,function({children:a}){return(0,b.jsx)("html",{lang:"en",suppressHydrationWarning:!0,className:`${d.variable} ${f.variable} ${h.variable} h-full antialiased`,children:(0,b.jsxs)("body",{className:"h-screen w-full flex flex-col",children:[(0,b.jsx)(i.default,{id:"theme-boot",strategy:"beforeInteractive",children:n}),(0,b.jsx)(k.ThemeSync,{}),(0,b.jsx)(j.AppEventSource,{}),a,(0,b.jsx)(l.Toaster,{})]})})},"metadata",0,o],233290)},70864,function(a){a.n(a.i(233290))},265728,a=>{"use strict";a.s(["ThemeSync",()=>b]);let b=(0,a.i(211857).registerClientReference)(function(){throw Error("Attempted to call ThemeSync() from the server but ThemeSync is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/ui/theme-sync.tsx","ThemeSync")},322950,a=>{"use strict";var b=a.i(265728);a.n(b)},502807,a=>{"use strict";a.s(["Toast",()=>c,"ToastAction",()=>d,"ToastClose",()=>e,"ToastContent",()=>f,"ToastDescription",()=>g,"ToastPortal",()=>h,"ToastProvider",()=>i,"ToastTitle",()=>j,"ToastViewport",()=>k,"Toaster",()=>l,"createToastManager",()=>m,"toast",()=>n,"useToastManager",()=>o]);var b=a.i(211857);let c=(0,b.registerClientReference)(function(){throw Error("Attempted to call Toast() from the server but Toast is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/ui/toast.tsx","Toast"),d=(0,b.registerClientReference)(function(){throw Error("Attempted to call ToastAction() from the server but ToastAction is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/ui/toast.tsx","ToastAction"),e=(0,b.registerClientReference)(function(){throw Error("Attempted to call ToastClose() from the server but ToastClose is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/ui/toast.tsx","ToastClose"),f=(0,b.registerClientReference)(function(){throw Error("Attempted to call ToastContent() from the server but ToastContent is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/ui/toast.tsx","ToastContent"),g=(0,b.registerClientReference)(function(){throw Error("Attempted to call ToastDescription() from the server but ToastDescription is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/ui/toast.tsx","ToastDescription"),h=(0,b.registerClientReference)(function(){throw Error("Attempted to call ToastPortal() from the server but ToastPortal is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/ui/toast.tsx","ToastPortal"),i=(0,b.registerClientReference)(function(){throw Error("Attempted to call ToastProvider() from the server but ToastProvider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/ui/toast.tsx","ToastProvider"),j=(0,b.registerClientReference)(function(){throw Error("Attempted to call ToastTitle() from the server but ToastTitle is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/ui/toast.tsx","ToastTitle"),k=(0,b.registerClientReference)(function(){throw Error("Attempted to call ToastViewport() from the server but ToastViewport is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/ui/toast.tsx","ToastViewport"),l=(0,b.registerClientReference)(function(){throw Error("Attempted to call Toaster() from the server but Toaster is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/ui/toast.tsx","Toaster"),m=(0,b.registerClientReference)(function(){throw Error("Attempted to call createToastManager() from the server but createToastManager is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/ui/toast.tsx","createToastManager"),n=(0,b.registerClientReference)(function(){throw Error("Attempted to call toast() from the server but toast is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/ui/toast.tsx","toast"),o=(0,b.registerClientReference)(function(){throw Error("Attempted to call useToastManager() from the server but useToastManager is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/ui/toast.tsx","useToastManager")},996266,a=>{"use strict";var b=a.i(502807);a.n(b)},569572,a=>{"use strict";let b=process.env.THURSDAY_APP_DIR?.trim()||process.cwd(),c=process.env.THURSDAY_HOME?.trim()||process.cwd(),d=process.env.THURSDAY_URL?.trim()||`http://localhost:${process.env.PORT?.trim()||3e3}`,e=`file:${c}/local.db`,f=".ai-workspace",g={workspace:f,artifacts:"artifacts",projects:"projects",scratch:"scratch",bots:"bots",output:".output",skills:{default:"skills",custom:`${f}/.agents/skills`}};a.s(["APP_DIR",0,b,"APP_NAME",0,"Thursday","APP_URL",0,d,"ASCII_FACE",0,{charset:"emojiOnly",fontSize:{default:8,min:4,max:16},density:{default:1.4,min:.6,max:2}},"BOT_MEMORY_LISTED",0,20,"BOT_RUN",0,{steps:100,compactAt:5e5,compactHeadroom:.8,summaryWords:{min:600,max:3e3,perTokens:200},depth:2,askBack:3,silenceMs:3e5,autoResumes:3,retryAfterMs:[3e4,12e4,3e5],overflowShrink:.6,compactFiles:40},"BROWSER_GONE_MS",0,1e4,"BROWSER_SKILL",0,"browser","BROWSER_VIEWPORT",0,"700x700","CALL_EXEC_TIMEOUT_MS",0,15e3,"CHATGPT_SIGN_IN",0,{waitMs:6e5,renewBeforeMs:3e5},"CONNECTED_TOOL_TIMEOUT_MS",0,6e5,"DATA_DIR",0,c,"DB_FILE_NAME",0,e,"EXEC_KILL_GRACE_MS",0,5e3,"EXEC_TIMEOUT_MS",0,18e4,"INBOX_FINISHED",0,3,"IS_DEV",0,!1,"MEMORY_CONVERSATION_PAGE",0,100,"MEMORY_LIMITS",0,{facts:400,factsPerNote:50,carried:20},"PAGE_SIZE",0,50,"PATHS",0,g,"PROMPT_BUDGET",0,6e3,"PROMPT_LINE",0,{skill:90,toolArgs:30,jobOutcome:160,callTurn:160,botMemory:100},"RECENT_CALL",0,{rows:20,tokens:600},"SEARCH",0,{sources:6,excerptChars:1200,timeoutMs:3e4},"STUDIO_SERVER",0,"studio","TOOL_OUTPUT",0,{max:8e3,head:5500,tail:1500},"WORKSPACE_KEEP",0,{forMs:2592e5,sweepEveryMs:36e5},"WORKSPACE_VIEW",0,{rows:200,textMax:524288,elementMax:0x3200000}])},944536,(a,b,c)=>{let{createClientModuleProxy:d}=a.r(211857);a.n(d("[project]/node_modules/next/dist/client/script.js"))},411153,a=>{"use strict";var b=a.i(944536);a.n(b)},371618,(a,b,c)=>{b.exports=a.r(411153)}];
2
2
 
3
3
  //# sourceMappingURL=%5Broot-of-the-server%5D__1mzi-ju._.js.map
@@ -1,3 +1,3 @@
1
1
  module.exports=[509656,(a,b,c)=>{b.exports=a.x("node:tty",()=>require("node:tty"))},812057,(a,b,c)=>{b.exports=a.x("node:util",()=>require("node:util"))},26378,a=>{"use strict";var b=a.i(228722),c=a.i(730983),d=a.i(100031);let e=(0,c.realtimeSession)({transport:({credential:a,setup:b,audio:c,on:e})=>(0,d.createSocketTransport)({url:`wss://api.x.ai/v1/realtime?model=${encodeURIComponent(b.model)}`,protocols:[`xai-client-secret.${a.value}`],label:"Grok",audio:c,on:e}),sessionUpdate:a=>({type:"session.update",session:{model:a.model,instructions:a.instructions,voice:a.voice,turn_detection:{type:"server_vad"},audio:{input:{format:{type:"audio/pcm",rate:b.PCM_SAMPLE_RATE},transcription:{model:"grok-transcribe"}},output:{format:{type:"audio/pcm",rate:b.PCM_SAMPLE_RATE}}},tools:(0,c.toFunctionTools)(a.tools)}})});a.s(["createXaiSession",0,e])},715837,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[externals]__0dizgek._.js","server/chunks/ssr/node_modules_consola_dist_chunks_prompt_mjs_05cwqv2._.js"].map(b=>a.l(b))).then(()=>b(270101)))}];
2
2
 
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__1cyjywu._.js.map
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__1zidpfl._.js.map