thursday-agent 0.17.0 → 0.17.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +2 -0
- package/.next/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/routes-manifest.json +12 -0
- package/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +1 -1
- package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/api/artifact/route.js +9 -8
- package/.next/server/app/api/artifact/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/memory/files/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/memory/route.js +8 -7
- package/.next/server/app/api/bot/memory/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/route.js +8 -7
- package/.next/server/app/api/bot/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/thread/[id]/route.js +4 -4
- package/.next/server/app/api/bot/thread/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/thread/route.js +3 -3
- package/.next/server/app/api/bot/thread/route.js.nft.json +1 -1
- package/.next/server/app/api/config/route.js.nft.json +1 -1
- package/.next/server/app/api/events/route.js.nft.json +1 -1
- package/.next/server/app/api/favicon/[host]/route.js +4 -3
- package/.next/server/app/api/favicon/[host]/route.js.nft.json +1 -1
- package/.next/server/app/api/file/[...path]/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/automatic/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/llm-model/automatic/route/build-manifest.json +12 -0
- package/.next/server/app/api/llm-model/automatic/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/llm-model/automatic/route.js +17 -0
- package/.next/server/app/api/llm-model/automatic/route.js.map +5 -0
- package/.next/server/app/api/llm-model/automatic/route.js.nft.json +1 -0
- package/.next/server/app/api/llm-model/automatic/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/llm-model/catalog/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/credits/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/subscription/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/[name]/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/oauth/callback/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/tools/route.js.nft.json +1 -1
- package/.next/server/app/api/memory/edit/route.js +14 -13
- package/.next/server/app/api/memory/edit/route.js.nft.json +1 -1
- package/.next/server/app/api/memory/route.js.nft.json +1 -1
- package/.next/server/app/api/reach/route.js +17 -16
- package/.next/server/app/api/reach/route.js.nft.json +1 -1
- package/.next/server/app/api/routine/route.js +10 -10
- package/.next/server/app/api/routine/route.js.nft.json +1 -1
- package/.next/server/app/api/signins/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/[source]/[name]/route.js +9 -8
- package/.next/server/app/api/skills/[source]/[name]/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/route.js +9 -8
- package/.next/server/app/api/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/call/end/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/thursday/call/end/route/build-manifest.json +12 -0
- package/.next/server/app/api/thursday/call/end/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/thursday/call/end/route.js +17 -0
- package/.next/server/app/api/thursday/call/end/route.js.map +5 -0
- package/.next/server/app/api/thursday/call/end/route.js.nft.json +1 -0
- package/.next/server/app/api/thursday/call/end/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/thursday/call/route.js +6 -6
- package/.next/server/app/api/thursday/call/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/settings/route.js +5 -5
- package/.next/server/app/api/thursday/settings/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/text/route.js +16 -15
- package/.next/server/app/api/thursday/text/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/tool-call/route.js +13 -12
- package/.next/server/app/api/thursday/tool-call/route.js.nft.json +1 -1
- package/.next/server/app/api/workspace/files/route.js +5 -5
- package/.next/server/app/api/workspace/files/route.js.nft.json +1 -1
- package/.next/server/app/api/workspace/route.js +5 -5
- package/.next/server/app/api/workspace/route.js.nft.json +1 -1
- package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +3 -3
- package/.next/server/app/artifact/[...path]/page.js +2 -2
- package/.next/server/app/artifact/[...path]/page.js.nft.json +1 -1
- package/.next/server/app/artifact/[...path]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/favicon.ico/route.js.nft.json +1 -1
- package/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/.next/server/app/page/server-reference-manifest.json +60 -60
- package/.next/server/app/page.js +8 -8
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +2 -0
- package/.next/server/chunks/{[externals]__178rv3v._.js → [externals]__12stas-._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__00qyw01._.js +1 -1
- package/.next/server/chunks/{[root-of-the-server]__1ignh6-._.js → [root-of-the-server]__01k3vi3._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__01ypm_z._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__021dkui._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__03vunn6._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__03xamry._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__05dp5tr._.js +1 -1
- package/.next/server/chunks/{[root-of-the-server]__208vmyf._.js → [root-of-the-server]__061o2_x._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__09gdscj._.js +3 -3
- package/.next/server/chunks/[root-of-the-server]__0bqveex._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__0eivkvk._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__0f7m79q._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0g38-aj._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__0h656y-._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__0hkxwim._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0hm3tiq._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__0hzdqnv._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__0liwkmx._.js +4 -4
- package/.next/server/chunks/[root-of-the-server]__0ljizgj._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__0mgyt8p._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__0mrk2it._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0nmust6._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__0p80i1n._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0qzho69._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0sm5xvm._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0svzjwa._.js +3 -3
- package/.next/server/chunks/{[root-of-the-server]__0b36yfw._.js → [root-of-the-server]__0ts7ai0._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__1-18_pz._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1-rmal0._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__13hng6h._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1_04mcf._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__1_h4hf9._.js +3 -3
- package/.next/server/chunks/[root-of-the-server]__1ceammd._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1ckt1yj._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1cu5f3z._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__1hviq62._.js +5 -0
- package/.next/server/chunks/{[root-of-the-server]__12m24xl._.js → [root-of-the-server]__1k2qs1m._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__1kmnkbk._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1ndi14y._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1p47fbb._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__1pugoq0._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1t02-1p._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1t0jj1j._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1vlxv19._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__1ygplx1._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1zn039k._.js +1 -1
- package/.next/server/chunks/_05gl-xy._.js +5 -5
- package/.next/server/chunks/_06hnfi8._.js +8 -0
- package/.next/server/chunks/_06u9yo-._.js +1 -1
- package/.next/server/chunks/_07nxi75._.js +25 -21
- package/.next/server/chunks/_08354bn._.js +25 -21
- package/.next/server/chunks/_08btiir._.js +3 -3
- package/.next/server/chunks/_0c49lmw._.js +5 -0
- package/.next/server/chunks/_0ey0s6v._.js +3 -0
- package/.next/server/chunks/_0hgvg55._.js +5 -0
- package/.next/server/chunks/_0j0-gq6._.js +2 -2
- package/.next/server/chunks/_0nn99o2._.js +1 -1
- package/.next/server/chunks/_0p6v1fr._.js +2 -2
- package/.next/server/chunks/_0s8ao8z._.js +3 -0
- package/.next/server/chunks/_0srlnvd._.js +1 -1
- package/.next/server/chunks/_0t_7gji._.js +1 -1
- package/.next/server/chunks/_0ucx1jv._.js +3 -0
- package/.next/server/chunks/_0uzj57i._.js +1 -1
- package/.next/server/chunks/_0xygcxs._.js +25 -21
- package/.next/server/chunks/_1-sk_q4._.js +1 -1
- package/.next/server/chunks/{_1xcnogc._.js → _108gsm8._.js} +4 -4
- package/.next/server/chunks/{_20oecmn._.js → _15negpy._.js} +4 -4
- package/.next/server/chunks/_19fh9t2._.js +3 -0
- package/.next/server/chunks/_19kea1l._.js +18 -18
- package/.next/server/chunks/_1dtm9bs._.js +1 -1
- package/.next/server/chunks/_1dxq827._.js +2 -2
- package/.next/server/chunks/_1e54wxa._.js +1 -1
- package/.next/server/chunks/_1frcwj1._.js +3 -0
- package/.next/server/chunks/_1gn2r2q._.js +5 -5
- package/.next/server/chunks/_1gxankq._.js +2 -2
- package/.next/server/chunks/_1i3uucm._.js +5 -0
- package/.next/server/chunks/_1m88lkh._.js +9 -9
- package/.next/server/chunks/_1mx9sfo._.js +1 -1
- package/.next/server/chunks/_1q6e56i._.js +5 -5
- package/.next/server/chunks/_1qxheoa._.js +1 -1
- package/.next/server/chunks/_1t5ijzv._.js +3 -0
- package/.next/server/chunks/_1wwl_7o._.js +1 -1
- package/.next/server/chunks/_1zfxb7j._.js +1 -1
- package/.next/server/chunks/_211dn2c._.js +1 -1
- package/.next/server/chunks/_next-internal_server_app_api_llm-model_automatic_route_actions_1-eyan7.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_thursday_call_end_route_actions_0u5xjft.js +3 -0
- package/.next/server/chunks/config_ts_1g4sz5o._.js +1 -1
- package/.next/server/chunks/{features_0wm-ujw._.js → features_bot_08z387_._.js} +4 -4
- package/.next/server/chunks/{ssr/[root-of-the-server]__07660xu._.js → features_bot_0zy_q8y._.js} +8 -9
- package/.next/server/chunks/features_bot_1dfrdsb._.js +37 -0
- package/.next/server/chunks/features_workspace_workspace_ts_13h82gv._.js +3 -3
- package/.next/server/chunks/features_workspace_workspace_ts_1iyjroj._.js +3 -3
- package/.next/server/chunks/node_modules_103lpef._.js +3 -0
- package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0_nz09c._.js → node_modules_consola_dist_chunks_prompt_mjs_0-t5tbs._.js} +1 -1
- package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_1341cnf._.js → node_modules_consola_dist_chunks_prompt_mjs_039fwo9._.js} +1 -1
- package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_1x3bsmx._.js → node_modules_consola_dist_chunks_prompt_mjs_0pce1b3._.js} +1 -1
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_0tvy5lq._.js +3 -0
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_0wxw35t._.js +3 -0
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1dlthym._.js +3 -0
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1smfi4-._.js +3 -0
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1x1omfi._.js +3 -0
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_20is7e3._.js +3 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__149x25m._.js → [root-of-the-server]__0-af_o7._.js} +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__09f39cp._.js +4 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0ouu4qp._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0q9g9ea._.js +5 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__17h1ggo._.js +11 -9
- package/.next/server/chunks/ssr/[root-of-the-server]__1jyeu61._.js +1 -1
- package/.next/server/chunks/ssr/{_0aeknva._.js → _01al00i._.js} +2 -2
- package/.next/server/chunks/ssr/_088vzgn._.js +1 -1
- package/.next/server/chunks/ssr/_0afrpci._.js +1 -1
- package/.next/server/chunks/ssr/_0bgse1c._.js +162 -0
- package/.next/server/chunks/ssr/_0cd6g3l._.js +15 -15
- package/.next/server/chunks/ssr/_0cv9tmv._.js +1 -1
- package/.next/server/chunks/ssr/{_0_vnw9v._.js → _0e2fnvg._.js} +2 -2
- package/.next/server/chunks/ssr/_0fo4552._.js +25 -21
- package/.next/server/chunks/ssr/_0jstvlg._.js +39 -0
- package/.next/server/chunks/ssr/{_0r0g9ki._.js → _0l7rjg5._.js} +2 -2
- package/.next/server/chunks/ssr/_0qsmpcu._.js +1 -1
- package/.next/server/chunks/ssr/_0v9r8g2._.js +1 -1
- package/.next/server/chunks/ssr/{_18-e7zi._.js → _0vo_oym._.js} +4 -4
- package/.next/server/chunks/ssr/_0x8ophf._.js +1 -1
- package/.next/server/chunks/ssr/{_0ztbn5q._.js → _0xfafez._.js} +2 -2
- package/.next/server/chunks/ssr/_0z38nha._.js +1 -1
- package/.next/server/chunks/ssr/_10-_awu._.js +1 -1
- package/.next/server/chunks/ssr/{_1z6pirx._.js → _10_ph1t._.js} +2 -2
- package/.next/server/chunks/ssr/_116lfdc._.js +3 -0
- package/.next/server/chunks/ssr/_14dfh7a._.js +1 -1
- package/.next/server/chunks/ssr/_14oirtb._.js +3 -0
- package/.next/server/chunks/ssr/{_1umbr78._.js → _163dr78._.js} +2 -2
- package/.next/server/chunks/ssr/{_1c5iqz1._.js → _17a4qyk._.js} +3 -3
- package/.next/server/chunks/ssr/{_1sttj8x._.js → _1_5xof_._.js} +2 -2
- package/.next/server/chunks/ssr/{_1hbjh6n._.js → _1aqjk-1._.js} +2 -2
- package/.next/server/chunks/ssr/{_0n2scfq._.js → _1dfv66y._.js} +2 -2
- package/.next/server/chunks/ssr/_1neoj22._.js +1 -1
- package/.next/server/chunks/ssr/_1ou5sj0._.js +1 -1
- package/.next/server/chunks/ssr/{_15m5ctz._.js → _1tmw842._.js} +2 -2
- package/.next/server/chunks/ssr/_1uij_rj._.js +1 -1
- package/.next/server/chunks/ssr/_1w9w1ok._.js +1 -1
- package/.next/server/chunks/ssr/features_0796o8r._.js +1 -1
- package/.next/server/chunks/ssr/features_bot_0ouemw8._.js +3 -0
- package/.next/server/chunks/ssr/{features_133mpna._.js → features_bot_0tb4ui-._.js} +2 -2
- package/.next/server/chunks/ssr/{features_config_0n0zu89._.js → features_config_09n-q9q._.js} +3 -3
- package/.next/server/chunks/ssr/features_connectors_components_mcp-setting_tsx_0jmbgvp._.js +1 -1
- package/.next/server/chunks/ssr/features_memory_components_memory-setting_tsx_0oa43sw._.js +1 -1
- package/.next/server/chunks/ssr/features_routine_components_routine-setting_tsx_055fknz._.js +1 -1
- package/.next/server/chunks/ssr/features_workspace_workspace_ts_1wc7_u_._.js +4 -4
- package/.next/server/chunks/ssr/{node_modules_1hefp6h._.js → node_modules_021lid9._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0kwie-o._.js → node_modules_04x5wyv._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_180l3i0._.js → node_modules_096up6a._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_00h1t1j._.js → node_modules_0__0tvm._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_03uejh6._.js → node_modules_0cjnmzp._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1ubln7w._.js → node_modules_0d6j33x._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1_n9o9s._.js → node_modules_0gd9hbz._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0zf3wuu._.js → node_modules_0k8-y89._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0u_8z64._.js → node_modules_0m73b88._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_09ikzel._.js → node_modules_0msrhxf._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0f5bmkb._.js → node_modules_0nmkv-v._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_07mo9rn._.js → node_modules_0nw5jz7._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_09e8kz_._.js → node_modules_0q-klni._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_02ficyi._.js → node_modules_10_fv2a._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_142z3o5._.js → node_modules_113l3e5._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1wyhtw9._.js → node_modules_13bqv6i._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0_d_7gq._.js → node_modules_13g-d25._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0r-9e4n._.js → node_modules_156kv_t._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_06grs09._.js → node_modules_1_8-jcj._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1fw32pg._.js → node_modules_1gq3ght._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0_p8w7p._.js → node_modules_1k5i-_9._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_03q71_j._.js → node_modules_1lmyts8._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1irot3r._.js → node_modules_1p_6sq7._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1om2itc._.js → node_modules_1qstb1x._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_197vh1s._.js → node_modules_1ri_eip._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1-7fc7h._.js → node_modules_1xb-ndg._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0aczkbn._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0amkw0b._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0ah684s._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0zq3l45._.js} +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/middleware.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +61 -61
- package/.next/static/chunks/{38edd4rpcbvzp.js → 01l7kw74vfp32.js} +1 -1
- package/.next/static/chunks/0a5_-jqhaktjj.js +1 -0
- package/.next/static/chunks/{0_b_bi2pobasx.js → 0obogzscwwekj.js} +2 -2
- package/.next/static/chunks/{1-63yde5eaz7i.js → 0p2f6uv4xytfm.js} +1 -1
- package/.next/static/chunks/{2v6e_9p95o2e3.js → 0uxq_vs6uxi-b.js} +1 -1
- package/.next/static/chunks/{024plctckvq-1.js → 166smhw8v-s3j.js} +1 -1
- package/.next/static/chunks/{1wbqaidq7vc3_.js → 1bnhw-5fj7aiz.js} +1 -1
- package/.next/static/chunks/1cglo3a2mbeou.js +1 -0
- package/.next/static/chunks/{0sv142q1yrva2.js → 1in6nxpu33iab.js} +1 -1
- package/.next/static/chunks/1u7kg91f9qy3g.js +1 -0
- package/.next/static/chunks/{0sowxe4nnl5qu.js → 1xv4g10m-cl1s.js} +1 -1
- package/.next/static/chunks/{0dfvwgnyrp8qt.js → 2ajs12-fcdwzm.js} +1 -1
- package/.next/static/chunks/2i7qtmxc1kuqg.js +1 -0
- package/.next/static/chunks/{3-qp777vtfglj.js → 2kz1f6r59nky0.js} +1 -1
- package/.next/static/chunks/2qgkbdshzpq1c.js +1 -0
- package/.next/static/chunks/{1bgvxd3xny53w.js → 2zbl41hed17g3.js} +2 -2
- package/.next/static/chunks/35jj-5u4te56r.js +1 -0
- package/.next/static/chunks/37ixzapa06xlo.js +1 -0
- package/.next/static/chunks/3b96xy59nl_gd.js +1 -0
- package/.next/static/chunks/{0f47nnshdlucs.js → 3gsxnqqqphh-1.js} +1 -1
- package/.next/static/chunks/{44vre0f7xqsh-.js → 3jtcieuk1l6tw.js} +1 -1
- package/.next/static/chunks/{05scfrgo_a_5_.js → 3k1d8y03t5nax.js} +1 -1
- package/.next/static/chunks/3sla-dm1puqd1.js +35 -0
- package/.next/static/chunks/3t2c76awm9k_p.js +1 -0
- package/.next/static/chunks/3vrmcm31ih7gb.js +1 -0
- package/.next/static/chunks/3yiqr95d7ybeq.js +15 -0
- package/bin/autostart.mjs +4 -1
- package/bin/database.mjs +26 -4
- package/bin/lock.mjs +59 -0
- package/bin/node-check.mjs +21 -0
- package/bin/thursday.mjs +8 -1
- package/guide/bots.md +4 -2
- package/guide/calls.md +11 -9
- package/guide/memory.md +3 -2
- package/guide/phone.md +7 -4
- package/guide/setup.md +26 -9
- package/guide/trouble.md +11 -4
- package/package.json +1 -1
- package/public/voices/intro/asleepBare-15199d56.ogg +0 -0
- package/public/voices/intro/style-88adf274.ogg +0 -0
- package/seed-skills/concierge/travel/scripts/itinerary.mjs +6 -4
- package/skills/artifact/references/book.md +2 -1
- package/skills/artifact/references/sheet.md +12 -7
- package/skills/artifact/runtime/sheet/format.mjs +16 -9
- package/skills/artifact/scripts/book.mjs +19 -6
- package/skills/artifact/scripts/spreadsheet.mjs +194 -97
- package/skills/browser/SKILL.md +9 -6
- package/.next/server/chunks/[root-of-the-server]__03b09q0._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__05n-hql._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__0j_nz36._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0jzwdg-._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0tsded0._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__12tahb4._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1de1o6m._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1yl5l25._.js +0 -3
- package/.next/server/chunks/_02lipqs._.js +0 -5
- package/.next/server/chunks/_05sa7xl._.js +0 -3
- package/.next/server/chunks/_074f2ts._.js +0 -3
- package/.next/server/chunks/_0caua_s._.js +0 -3
- package/.next/server/chunks/_0p-h6xe._.js +0 -5
- package/.next/server/chunks/_0up2a9o._.js +0 -3
- package/.next/server/chunks/_17i1lt2._.js +0 -3
- package/.next/server/chunks/_1hy9x9_._.js +0 -3
- package/.next/server/chunks/_1hyvcgk._.js +0 -5
- package/.next/server/chunks/_1wl2g8_._.js +0 -6
- package/.next/server/chunks/_1y3mnz4._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__10eb-1x._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__19s8qyj._.js +0 -3
- package/.next/server/chunks/ssr/_0o_o9ji._.js +0 -3
- package/.next/server/chunks/ssr/_0qne8xs._.js +0 -3
- package/.next/server/chunks/ssr/_0rvbegp._.js +0 -7
- package/.next/server/chunks/ssr/_1vtgiou._.js +0 -162
- package/.next/server/chunks/ssr/features_bot_1kr0_m-._.js +0 -3
- package/.next/static/chunks/04toe_3nqfjqt.js +0 -1
- package/.next/static/chunks/0mtfu8adz57qz.js +0 -1
- package/.next/static/chunks/0tp868040z9nn.js +0 -35
- package/.next/static/chunks/14qitm0kwsb6g.js +0 -15
- package/.next/static/chunks/1cyrrz4q871aj.js +0 -1
- package/.next/static/chunks/1st3b0c9vhxg3.js +0 -1
- package/.next/static/chunks/28sxb_k460e9h.js +0 -1
- package/.next/static/chunks/33ekkscpcq-z1.js +0 -1
- package/.next/static/chunks/388l-zszwa_jf.js +0 -1
- package/.next/static/chunks/3bwrvpjk95_x4.js +0 -1
- package/.next/static/chunks/3itdg6t243u6f.js +0 -1
- package/.next/static/chunks/3kj0pri2oc1g1.js +0 -1
- package/public/voices/intro/style-cb6fa4f7.ogg +0 -0
- /package/.next/static/{VtbCMn-0G969p8QJsWdGv → 8I2hKtciyA9LXvd8txuOz}/_buildManifest.js +0 -0
- /package/.next/static/{VtbCMn-0G969p8QJsWdGv → 8I2hKtciyA9LXvd8txuOz}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{VtbCMn-0G969p8QJsWdGv → 8I2hKtciyA9LXvd8txuOz}/_ssgManifest.js +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
module.exports=[851372,e=>e.a(async(t,o)=>{try{var a=e.i(343747),r=e.i(687388),n=e.i(186304),s=e.i(353885),i=e.i(393189),l=e.i(265143),d=e.i(944971),h=e.i(
|
|
1
|
+
module.exports=[851372,e=>e.a(async(t,o)=>{try{var a=e.i(343747),r=e.i(687388),n=e.i(186304),s=e.i(353885),i=e.i(393189),l=e.i(265143),d=e.i(944971),h=e.i(438188),u=e.i(378884),c=e.i(148831),w=e.i(619898),p=e.i(636882),m=e.i(629668),f=e.i(786025),y=e.i(704161),g=e.i(41444),b=e.i(660948),T=e.i(54282),v=t([l,u,c,w,p,b]);async function $(e,t,o,n){var h,v,$,x,O,S,N,M,C,E;let R,A,_,B,P,W,j,L=await (0,f.openWorkspace)(),U=e.trim(),[Y,H,D,F,J,q,K,G,z]=await Promise.all([(0,p.loadSkills)(L,U),(0,w.listNoteIndex)(),(0,b.listConnectedToolNames)(),(0,c.findPinnedTools)(U),(0,l.listJobBots)(),(0,i.listBotMemory)(U),(0,l.readBotMemoryOn)(),(0,f.readMachineTools)(L),(0,u.listBotWork)(U,o?.thread??null)]),Q=J.filter(e=>e.name!==U),V=J.find(e=>e.name===U)??await (0,l.findJobBot)(U),X=[(h=U,v=V,$=o,A=(R=$?.owner??h)===h?"**You** coordinate this thread: its result goes from you to Thursday.":`**${R}** coordinates this thread and brings its result to Thursday.`,_=$?`
|
|
2
2
|
|
|
3
|
-
Current conversation: ${
|
|
4
|
-
Others know you as: ${(0,d.rosterLine)(v)}`:"",`You are ${
|
|
3
|
+
Current conversation: ${$.caller} → ${h}. Your final text goes back to ${$.caller}.`:"",B=v?`
|
|
4
|
+
Others know you as: ${(0,d.rosterLine)(v)}`:"",`You are ${h}, one of the bots in this thread. ${(0,T.nowLine)()}${B}
|
|
5
5
|
|
|
6
6
|
- **The user** — the one person all of this is for. They talk with Thursday by voice and follow this thread on their screen.
|
|
7
7
|
- **Thursday** — their personal assistant. She talks with them, hands bots the work that takes time, and tells them what comes back.
|
|
@@ -16,42 +16,46 @@ What Thursday keeps from talking with them. When the job needs something about t
|
|
|
16
16
|
|
|
17
17
|
path — what it is about (facts)
|
|
18
18
|
|
|
19
|
-
${(0,
|
|
19
|
+
${(0,T.noteLines)(x)}`),function(e,t){let o=new Set(t.map(e=>`${e.server}/${e.name}`)),a=e.filter(e=>!o.has(`${e.server}/${e.name}`));if(0===a.length)return"";let r=o.size?" The ones you already hold are in your tools instead.":"";return`## Connected tools
|
|
20
20
|
|
|
21
|
-
${(0,
|
|
21
|
+
${(0,T.mcpToolLines)(a)}
|
|
22
22
|
|
|
23
23
|
Names only: \`${s.TOOL_NAMES.tool_search}\` returns what each one takes, \`${s.TOOL_NAMES.tool_call}\` runs one.${r}`}(D,F),(O=Y,0===O.length?"":`## Skills
|
|
24
24
|
|
|
25
25
|
Written-down ways of doing things. Open one with \`${s.TOOL_NAMES.load_skill}\` before a job it covers, unless its instructions are already in your conversation.
|
|
26
26
|
|
|
27
|
-
${(0,
|
|
27
|
+
${(0,T.skillLines)(O)}`),I(L.cwd,G,n),K?(S=(0,i.botMemoryFolder)(U),P=(N=q).entries.length?N.entries.map(({file:e,line:t,at:o})=>{let n=t?` — ${(0,g.clip)(t,r.PROMPT_LINE.botMemory)}`:"";return`- ${e}${n} \xb7 ${(0,a.format)((0,y.toDate)(o),"yyyy-MM-dd")}`}).join("\n"):"Empty.",W=N.total>N.entries.length?`
|
|
28
28
|
|
|
29
29
|
The newest ${N.entries.length} of ${N.total}; \`ls ${S}\` for the rest.`:"",`## Your memory
|
|
30
30
|
|
|
31
31
|
What you learned on your own earlier jobs, in \`${S}/\`: one topic per file, its first line saying what it holds, read by no other bot, up to ${r.BOT_MEMORY_LIMITS.files} files of ${r.BOT_MEMORY_LIMITS.chars.toLocaleString("en-US")} characters each. It is how you get better at this work. When a job teaches you something a later one would otherwise find out again — how a site signs in, the way through its screens, a command that turned out right — or the user asks you to remember how to work, keep it with the date it was true, and fix or delete what proved wrong. No passwords, keys or codes.
|
|
32
32
|
|
|
33
|
-
${P}${
|
|
33
|
+
${P}${W}`):"",function(e,t){if(!t.open.length&&!t.recent.length)return"";let o=t=>{let o=t.said?` — ${(0,g.clip)(t.said,r.BOT_WORK.said)}`:"",a=t.said?(0,m.pathsIn)(t.said).slice(0,r.BOT_WORK.files):[],n=a.length?` \xb7 ${a.map(e=>`\`${e}\``).join(", ")}`:"";return`- ${t.cut?`[${(0,d.workHandle)(t.id)}] `:""}${(0,T.botWorkHead)(t,e)}${o}${n}`},a=(e,t)=>t.length?`${e}
|
|
34
34
|
${t.map(o).join("\n")}`:"",n=[...t.open,...t.recent].some(e=>e.cut)?` A line with an id in brackets was cut short: \`${s.TOOL_NAMES.thread_recall}\` opens that one whole, for when this job builds on it.`:"";return`## Your other threads
|
|
35
35
|
|
|
36
36
|
Your threads besides this one. You remember none of them here: each line is where it stands, your own last words there, and the files those words name.${n}
|
|
37
37
|
|
|
38
|
-
${[a("Open",t.open),a("Ended",t.recent)].filter(Boolean).join("\n")}`}(U,z),(
|
|
38
|
+
${[a("Open",t.open),a("Ended",t.recent)].filter(Boolean).join("\n")}`}(U,z),(M=Q,0===M.length?"":`## Bots
|
|
39
39
|
|
|
40
|
-
${
|
|
40
|
+
${M.map(e=>`- **${e.name}** — ${(0,d.rosterLine)(e)}`).join("\n")}
|
|
41
41
|
|
|
42
|
-
These lines were written for the user: where one says "you", it means them. When part of the job is another bot's strength, bring it in with \`${s.TOOL_NAMES.send_message}\` rather than rebuilding it yourself.`),(
|
|
42
|
+
These lines were written for the user: where one says "you", it means them. When part of the job is another bot's strength, bring it in with \`${s.TOOL_NAMES.send_message}\` rather than rebuilding it yourself.`),(C=U,E=o,j=(E?.owner??C)===C?"While work you handed out is still out, your result waits for it: end your turn and its answer wakes you; write the result once everything you asked for is in. Bring what you received together into one result for Thursday: what was done, where it is, what you decided that the request did not say, and what is still open, at the detail the user asked for. Every file you name in it is drawn under your words in the thread and waits in the screen's corner for the user to open, so name each one you want them to see — the page to read first, then the rest.":`Your final text is your answer to ${E?.caller??"whoever asked"}, and all they see of your work: give them everything they need to carry on. When you cannot go on without something from them, end with that question instead; their reply brings you back with all you have done still in front of you.`,`## Working together
|
|
43
43
|
|
|
44
44
|
Nobody sees your work but you, and you see only what others send you, so whatever crosses between you has to stand on its own. A request says what is wanted, what is already known or done, and where the files are; an answer gives exact values, file paths and what is still unverified. Tell a bot you handed work to when what it depends on changes: it reads that before its next step. End your turn when you have nothing more to do now: replies arrive as new messages and wake you.
|
|
45
45
|
|
|
46
|
-
Ask Thursday with kind \`question\` only for a decision, permission or something only
|
|
46
|
+
Ask the user, through Thursday, with kind \`question\` only for a decision, permission or something only they know: clearly, with the context to answer, and short options when they help. Use kind \`message\` for news that needs no answer, and your final text for the result.
|
|
47
47
|
|
|
48
|
-
${
|
|
48
|
+
${j}
|
|
49
49
|
|
|
50
|
-
Write in the user's language, and name the paths of finished work. In Markdown, reference images by absolute route (\`/api/file/${r.PATHS.artifacts}/…\`).`)
|
|
50
|
+
Write in the user's language, and name the paths of finished work. In Markdown, reference images by absolute route (\`/api/file/${r.PATHS.artifacts}/…\`).`),k(U,t)].filter(Boolean).join("\n\n");return(0,T.logPromptSize)("bot",X),{text:X}}[l,u,c,w,p,b]=v.then?(await v)():v;let k=(e,t)=>{let o=t?.trim();return o?(0,h.findBotSeed)(e)?.systemPrompt.trim()===o?`## Your role
|
|
51
|
+
|
|
52
|
+
What this bot is for, as the app sets it up. Where it and anything above disagree, it wins.
|
|
53
|
+
|
|
54
|
+
${o}`:`## Owner's instructions
|
|
51
55
|
|
|
52
56
|
Written by the person this bot works for. Where these and anything above disagree, these win.
|
|
53
57
|
|
|
54
|
-
${
|
|
58
|
+
${o}`:""},I=(e,t,o)=>{var a;let i,l;return`## Environment
|
|
55
59
|
|
|
56
60
|
Current Cwd: ${e}
|
|
57
61
|
Platform: ${process.platform}
|
|
@@ -68,15 +72,15 @@ Your workspace, where \`${s.TOOL_NAMES.bash}\` runs. Everything you write goes i
|
|
|
68
72
|
|
|
69
73
|
Inside the workspace, set up whatever the job needs yourself; installing anything machine-wide waits for the user's yes. Never the directory above the workspace — it is the app's, not the user's; outside the workspace, only where the user pointed you.
|
|
70
74
|
|
|
71
|
-
${(0,n.botGuideLine)()}`};e.s(["buildThreadOpening",0,function(e){if(e.routine){let{when:t,last:o}=e.routine,n=o?` Its last run ended ${(0,a.format)(o.at,"yyyy-MM-dd HH:mm")}: ${(0,
|
|
75
|
+
${(0,n.botGuideLine)()}`};e.s(["buildThreadOpening",0,function(e){if(e.routine){let{when:t,last:o}=e.routine,n=o?` Its last run ended ${(0,a.format)(o.at,"yyyy-MM-dd HH:mm")}: ${(0,g.clip)(o.said,r.PROMPT_LINE.jobOutcome)}`:" This is its first run.";return[{type:"text",text:`You are ${e.bot}. A routine the user set up hands you this thread: it starts by itself, ${t}, and nobody is watching as it does.${n}`},{type:"text",text:`## The routine → ${e.bot}: the job
|
|
72
76
|
|
|
73
77
|
${e.request.trim()}`}]}let t="user"===e.from?"The user":"Thursday";return[{type:"text",text:`You are ${e.bot}. ${t} hands you this thread${"user"===e.from?" on screen":" during a call"}.`},{type:"text",text:`## ${t} → ${e.bot}: the job
|
|
74
78
|
|
|
75
|
-
${e.request.trim()}`}]},"loadBotPrompt",0
|
|
76
|
-
${o(n)}`}:a.push({role:"assistant",content:o(n)})}return a}])},585099,e=>e.a(async(t,o)=>{try{var a=e.i(68356),r=e.i(847841),n=e.i(687388),s=e.i(159479),i=e.i(386075),l=e.i(851372),d=e.i(316172),h=e.i(353885),u=e.i(235190),c=e.i(944971),w=e.i(527608),p=e.i(786025),m=e.i(640911),f=e.i(388439),y=e.i(265143),g=e.i(
|
|
79
|
+
${e.request.trim()}`}]},"loadBotPrompt",0,$]),o()}catch(e){o(e)}},!1),235190,e=>{"use strict";e.s(["asWords",0,function(e,t,o=e=>e){let a=[];for(let r of e){if("tool"===r.role)continue;if("system"===r.role){a.push(r);continue}if("user"===r.role){a.push("string"==typeof r.content?{role:"user",content:o(r.content)}:r);continue}let e="string"==typeof r.content?[{type:"text",text:r.content}]:r.content,n=e.flatMap(e=>"text"===e.type?[e.text]:[]).join("\n").trim()||e.flatMap(e=>"tool-call"===e.type?[t(e.toolName,e.input)]:[]).join("\n");if(!n)continue;let s=a.at(-1);s?.role==="assistant"&&"string"==typeof s.content?a[a.length-1]={role:"assistant",content:`${s.content}
|
|
80
|
+
${o(n)}`}:a.push({role:"assistant",content:o(n)})}return a}])},585099,e=>e.a(async(t,o)=>{try{var a=e.i(68356),r=e.i(847841),n=e.i(687388),s=e.i(159479),i=e.i(386075),l=e.i(851372),d=e.i(316172),h=e.i(353885),u=e.i(235190),c=e.i(944971),w=e.i(527608),p=e.i(786025),m=e.i(640911),f=e.i(388439),y=e.i(265143),g=e.i(889034),b=e.i(378884),T=t([s,i,l,d,y,b]);[s,i,l,d,y,b]=T.then?(await T)():T;let x=n.BOT_RUN.steps;async function v(e,t){var o,u;let T,v,I,S,N,M,C,E,R,A=t.parent??null,_=await (0,y.findJobBot)(e.bot.trim()),B=_?.name??e.bot.trim(),P=e=>t.emit({...e,bot:B,parent:A});if(!_)return void await P({type:"error",message:`No bot named "${e.bot}". Use a name from the list.`,retry:!1});let W=e.messages,j=await ((o=_).provider&&o.model?(0,i.getTextModel)({provider:o.provider,model:o.model}):(0,i.resolveDefaultModel)().then(i.getTextModel)),L=t.threadId?await (0,b.findThread)(t.threadId):null,[U,{own:Y,artifacts:H}]=await Promise.all([t.threadId?(0,p.openJobScratch)(t.threadId,L?.label??"job"):null,(0,p.openBotFolders)(B)]),D=t.session??(t.threadId?(0,p.botBrowserSession)(t.threadId,B):null),[F,J]=await Promise.all([(0,l.loadBotPrompt)(B,_.systemPrompt,{thread:t.threadId??null,owner:t.owner,caller:t.caller},{scratch:U,own:Y,artifacts:H}),(0,s.loadTools)({target:"bot",bot:B,thread:t.threadId??null,session:D,model:j})]),q=Math.min(await (0,i.compactBudget)(j.ref,_.compactAt),t.contextBudget||1/0),K=await (0,i.runEffort)(j.ref,_.effort),G=!1,z={...J,[h.TOOL_NAMES.send_message]:(0,r.tool)({description:d.sendMessageSpec.description,inputSchema:d.sendMessageSpec.parameters,execute:async(e,o)=>{let a=await t.send({...e,id:o.toolCallId});if("question"===e.kind&&(G=!0),!a||"object"!=typeof a||!("to"in a))return a;let r=String(a.to);return r===g.ROOM_THURSDAY?a:{...a,note:`${r} has it now. When they finish, their answer — what they did and where the files are — comes to you as a new message and wakes you. Until then you do not know it: do not report it, guess it or do it yourself, and do not watch their folder. Go on with other work, or end your turn if there is none; the thread stays open.`}}})},Q=new Set,V=(u=n.BOT_RUN.silenceMs,v=new AbortController,I=0,S=!1,N=()=>{clearTimeout(T),T=void 0,S||I>0||(T=setTimeout(()=>{v.abort(new DOMException(`The model sent nothing for ${Math.round(u/6e4)} minutes.`,"TimeoutError"))},u))},{signal:v.signal,touch:N,hold:()=>{I+=1,N()},release:()=>{I=Math.max(0,I-1),N()},end:()=>{S=!0,N()}});for(let[e,o]of Object.entries(z)){let a=o.execute;a&&(o.execute=(o,r)=>{let n=(async()=>{t.signal?.throwIfAborted(),await P({type:"tool",id:r.toolCallId,name:e,input:o}),V.hold();try{t.signal?.throwIfAborted();let n=await a(o,r);if(n&&"object"==typeof n&&Symbol.asyncIterator in n){let e;for await(let t of n)e=t;n=e}return await P({type:"tool-result",id:r.toolCallId,name:e,output:n}),n}catch(t){throw await P({type:"tool-result",id:r.toolCallId,name:e,output:(0,i.modelErrorToString)(t),error:!0}),t}finally{V.release()}})();return Q.add(n),n.finally(()=>Q.delete(n)).catch(()=>{}),n})}let X=Promise.resolve(),Z=()=>{},ee=0,et=new a.ToolLoopAgent({model:j.model,instructions:F.text,tools:z,reasoning:K,stopWhen:[(0,a.stepCountIs)(x),()=>G],prepareStep:async({stepNumber:e,steps:o,messages:a})=>{await X,t.signal?.throwIfAborted();let r={},n=(o.at(-1)?.usage.inputTokens??0)||a.reduce((e,t)=>e+(0,f.estimateTokens)("string"==typeof t.content?t.content:JSON.stringify(t.content))+4,0);ee=n;let s=a,i=t.compactNow?.()??!1;if((n>q||i)&&a.length>2){V.hold();let e=await k(j.model,z,a,{signal:t.signal,budget:q,instructions:F.text}).finally(V.release);m.logger.debug(`compacted ${a.length} messages at ${n} tokens (budget ${q})`);let o=`${e.text}${await $(L?.id??null,a,U)}`;await P({type:"compact",text:o,usage:e.usage,messages:a.length,tokens:n}),s=[a[0],{role:"user",content:o}]}let l=e>0?await t.notes?.()??[]:[];return(l.length&&(s=[...s,...l.map(e=>({role:"user",content:e}))]),s===a)?r:{...r,messages:s}}}),eo=(M=[],C=[],E=!1,{push(e){let t=C.shift();t?t(e):M.push(e)},take(){let e=M.shift();return e?Promise.resolve(e):E?Promise.resolve(null):new Promise(e=>C.push(e))},end(){for(let e of(E=!0,C.splice(0)))e(null)}}),ea=t.signal?AbortSignal.any([t.signal,V.signal]):V.signal;V.touch();let er=new AbortController,en=AbortSignal.any([ea,er.signal]);try{R=await et.stream({messages:W,abortSignal:en,onStepEnd:e=>{X=new Promise(e=>{Z=e}),eo.push({messages:function(e){if(!e.toolResults.length)return e.response.messages;let t=new Map(e.toolResults.map(e=>[e.toolCallId,e.output]));return e.response.messages.map(e=>"tool"!==e.role?e:{...e,content:e.content.map(e=>{if("tool-result"!==e.type||!t.has(e.toolCallId))return e;let o=t.get(e.toolCallId);return{...e,output:"string"==typeof o?{type:"text",value:o}:{type:"json",value:o}}})})}(e),usage:O(e.usage)})}})}catch(e){throw V.end(),er.abort(),await Promise.allSettled([...Q]),e}let es="",ei="",el=null,ed=e=>{m.logger.error(`${B}: the model run broke`,e);let t=(0,i.modelErrorToString)(e),o=!(0,i.isProviderRefusal)(e);if(!(0,i.isContextOverflow)(e))return{type:"error",message:t,retry:o};let a=Math.floor(Math.min(q,ee||q)*n.BOT_RUN.overflowShrink);return{type:"error",message:t,budget:Math.max(c.COMPACT_AT_MIN,a),retry:o}};ea.addEventListener("abort",()=>{eo.end(),Z()},{once:!0});try{for await(let e of R.stream)switch(V.touch(),e.type){case"start-step":ei="",es="";break;case"text-delta":es+=e.text;break;case"text-end":{let e=es.trim();if(es="",!e)break;ei=[ei,e].filter(Boolean).join("\n\n"),await P({type:"text",text:e});break}case"tool-call":await P({type:"tool",id:e.toolCallId,name:e.toolName,input:e.input,providerExecuted:e.providerExecuted,providerOptions:e.providerMetadata});break;case"tool-result":await P({type:"tool-result",id:e.toolCallId,name:e.toolName,output:e.output});break;case"tool-error":await P({type:"tool-result",id:e.toolCallId,name:e.toolName,output:(0,i.modelErrorToString)(e.error),error:!0});break;case"finish-step":{el=e.finishReason;let t=await eo.take();t&&await P({type:"step",...t,budget:q}),Z();break}case"abort":if(t.signal?.aborted)return;await P(ed(e.reason??"The model stopped sending."));return;case"error":await P(ed(e.error));return}}finally{er.abort(),eo.end(),V.end(),Z(),await Promise.allSettled([...Q]),D&&(0,w.renewSignIns)(D).catch(e=>m.logger.warn(`${B}: kept sign-ins were not renewed`,e))}try{await R.finalStep}catch(e){if(t.signal?.aborted)return;await P(ed(e));return}"content-filter"===el?await P({type:"error",message:"The provider's content filter stopped the response.",retry:!1}):await P({type:"turn-end",text:ei,stopped:!G&&("length"===el||"error"===el||"tool-calls"===el)})}async function $(e,t,o){try{let a=e?await (0,b.listWrittenPaths)(e):(0,b.writtenPathsIn)(t.map(e=>e.content)),r=await (0,p.filesOnDisk)(a,o);if(!r.length)return"";let s=r.slice(-n.BOT_RUN.compactFiles),i=r.length-s.length,l=s.map(e=>`- ${e}`);return i&&l.unshift(`- …and ${i} older ones`),`
|
|
77
81
|
|
|
78
82
|
Files this job has on disk now — open one rather than fetching again what is in it:
|
|
79
|
-
${l.join("\n")}`}catch(e){return m.logger.warn("files under the summary could not be listed",e),""}}async function
|
|
83
|
+
${l.join("\n")}`}catch(e){return m.logger.warn("files under the summary could not be listed",e),""}}async function k(e,t,o,a){let r;try{return await I(e,t,o,a)}catch(e){if(a.signal?.aborted)throw e;r=e}if((0,i.isContextOverflow)(r)){let n=(0,u.asWords)(o,(e,t)=>`${e}: ${(0,b.argumentLine)(e,t)}`);try{return await I(e,t,n,a)}catch(e){if(a.signal?.aborted)throw e;r=e}}throw Error(`Could not compact the context (${(0,i.modelErrorToString)(r)}).`,{cause:r})}async function I(e,t,o,r){let s,{text:i,usage:l}=await (0,a.generateText)({model:e,instructions:r.instructions,tools:t,toolChoice:"none",messages:[...o,{role:"user",content:(s=(e=>{let{min:t,max:o,perTokens:a}=n.BOT_RUN.summaryWords;return Math.min(o,Math.max(t,Math.round(e/a)))})(r.budget),`Compact your context. The first message above — who handed you the job, and the job — stays exactly as it is. Everything after it is replaced by what you write now, and you carry on from that first message and this alone; nothing else above can be read again. Write it for a fresh copy of you that has your tools, your instructions and that first message, but has seen none of the rest.
|
|
80
84
|
|
|
81
85
|
Cover all of it, and prefer a fact over a description of a fact:
|
|
82
86
|
|
|
@@ -89,9 +93,9 @@ Cover all of it, and prefer a fact over a description of a fact:
|
|
|
89
93
|
|
|
90
94
|
Plain text, under ${s} words. No preamble, no headings about the summary itself, no account of how you have been going.`)}],abortSignal:r.signal,timeout:n.BOT_RUN.silenceMs}),d=i.trim();if(!d)throw Error("The summary of the context came back empty, so there is nothing to carry on from.");return{text:`Everything between the first message and here was compacted. Below is your own summary of it; carry on from the first message and this.
|
|
91
95
|
|
|
92
|
-
${d}`,usage:
|
|
93
|
-
${t}`;async function
|
|
94
|
-
Coordinator: ${n.bot}. Continue as ${e.bot} in this thread.`,hidden:!0}),await (0,b.consumeRoomInbox)(e);let s=await (0,b.listParticipantTranscript)(e.threadId,e.bot);await (0,y.runBot)({bot:e.bot,messages:(0,y.resumeTranscript)(s,await (0,b.listRoomReceipts)(e.threadId,e.bot,s))},{signal:t,threadId:e.threadId,parent:e.id,caller:e.caller,owner:n.bot,contextBudget:await (0,b.roomContextBudget)(e.threadId,e.bot),compactNow:()=>
|
|
96
|
+
${d}`,usage:O(l)}}let O=e=>({input:e.inputTokens??0,output:e.outputTokens??0});e.s(["resumeTranscript",0,function(e,t=new Map){let o=new Map,a=new Set;for(let t of e)if(("tool"===t.role||"assistant"===t.role)&&Array.isArray(t.content))for(let e of t.content)"tool-result"===e.type&&(o.has(e.toolCallId)||o.set(e.toolCallId,e),"assistant"===t.role&&a.add(e.toolCallId));let r=[],n=new Set;for(let s of e){if("tool"===s.role){let e=s.content.filter(e=>"tool-result"!==e.type);e.length&&r.push({...s,content:e});continue}if("assistant"!==s.role||"string"==typeof s.content){r.push(s);continue}let e=[],i=[];for(let r of s.content){if("tool-call"!==r.type){i.push(r);continue}if(n.has(r.toolCallId))continue;let s=r.input;if("string"==typeof s)try{s=JSON.parse(s)}catch{s=void 0}if(!r.toolCallId||void 0===s){i.push({type:"text",text:"A tool argument stream was interrupted before a complete call was recorded. Inspect the saved work before continuing."});continue}let l=r.toolName===h.TOOL_NAMES.send_message?t.get(r.toolCallId):void 0,d=o.get(r.toolCallId)??(l?{type:"tool-result",toolCallId:r.toolCallId,toolName:r.toolName,output:{type:"json",value:l}}:void 0);if(r.providerExecuted&&(!d||!a.has(r.toolCallId))){i.push({type:"text",text:d?`The provider operation ${r.toolName} returned this data before its native continuation was interrupted: ${JSON.stringify(d.output)}`:`The provider operation ${r.toolName} was interrupted without a recorded result. Its remote execution state is unknown.`});continue}n.add(r.toolCallId),i.push({...r,input:s}),a.has(r.toolCallId)||e.push(d??{type:"tool-result",toolCallId:r.toolCallId,toolName:r.toolName,output:{type:"text",value:"No result: execution was interrupted before a result was recorded. The outcome is unknown. Inspect the current state before repeating the action."}})}i.length&&r.push({...s,content:i}),e.length&&r.push({role:"tool",content:e})}return r},"runBot",0,v]),o()}catch(e){o(e)}},!1),39803,e=>e.a(async(t,o)=>{try{var a=e.i(136340),r=e.i(380690),n=e.i(687388),s=e.i(386075),i=e.i(851372),l=e.i(22676),d=e.i(629668),h=e.i(786025),u=e.i(167004),c=e.i(640911),w=e.i(53748),p=e.i(268486),m=e.i(41444),f=e.i(265143),y=e.i(585099),g=e.i(944971),b=e.i(742712),T=e.i(889034),v=e.i(378884),$=t([s,i,l,f,y,b,v]);[s,i,l,f,y,b,v]=$.then?(await $)():$;let P=globalThis.__roomRuns??=new Map,W=globalThis.__roomThreadLock??=(0,p.createKeyedLock)(),j=globalThis.__roomCompactAsked??=new Set,L=(e,t)=>`${e}
|
|
97
|
+
${t}`;async function k(e){let t=await (0,f.findJobBot)(e.bot);(!t||t.disabled)&&(0,w.publicError)("Choose an enabled bot.");let{from:o,routine:a,...r}={...e,bot:t.name},n=(0,i.buildThreadOpening)({bot:r.bot,request:r.request,from:o,routine:a}),s=await (0,v.insertThread)({...r,routineId:a?.id??null,opening:n});return await x(s.id),s.id}async function I(e,t,o="user",a,r){let n=null;return await W(e,async()=>{let s=await (0,v.findThread)(e);if(s||(0,w.publicError)("No such thread."),a){let t=(await (0,b.listRoomWork)(e)).find(e=>e.bot.toLowerCase()===a.trim().toLowerCase());t&&t.bot!==T.ROOM_THURSDAY||(0,w.publicError)("Choose a participant in this thread."),a=t.bot}t.trim()===g.THREAD_CONTINUE&&(0,g.isAppStop)(s.pending)?(await (0,b.resumeRoom)(e),(await (0,b.listRoomWork)(e)).some(e=>"queued"===e.state)||(n=await (0,b.tellRoom)(e,"Continue from the saved conversation.","user"===o?T.ROOM_USER:T.ROOM_THURSDAY,a,void 0,!1))):n=await (0,b.tellRoom)(e,t,"user"===o?T.ROOM_USER:T.ROOM_THURSDAY,a,r)}),await x(e),n}async function x(e){await W(e,async()=>{for(let t=0;t<2;t++){let t;for(;t=await (0,b.claimRoomWork)(e);)!function(e){let t,o=new AbortController,a=new Promise(e=>{t=e});P.set(e.id,{threadId:e.threadId,stop:o,done:a}),O(e,o.signal).catch(t=>c.logger.error(`thread ${e.threadId}: participant`,t)).finally(()=>{P.delete(e.id),t(),x(e.threadId).catch(t=>c.logger.error(`thread ${e.threadId}: scheduling`,t))})}(t);await (0,b.settleRoom)(e)}})}async function O(e,t){let o=await S(e,t);if(o?.failure?.retry&&!t.aborted&&(await (0,b.noteRoomBreak)(e,o.failure.message),await (0,a.setTimeout)(n.BOT_RUN.retryMs,void 0,{signal:t}).catch(()=>{}),t.aborted||(o=await S(e,t))),!o||t.aborted)return;let s=o.failure?.message,i=o.ending;if(s||!i||i.stopped){let t=s??"The turn was interrupted. Continue from the saved conversation.";W(e.threadId,async()=>{let o=(await (0,b.listRoomWork)(e.threadId)).find(t=>t.id===e.id);if(o?.state!=="running"||o.generation!==e.generation)return;let a=N(e.threadId);await (0,b.pauseRoom)(e.threadId,t),await a}).catch(t=>c.logger.error(`thread ${e.threadId}: pausing`,t));return}await (0,b.finishRoomWork)(e,i.text);let w=await (0,v.findThread)(e.threadId);if(w?.status==="done"){let e=(0,m.plainText)(w.outcome??"").slice(0,n.FINISHED_NOTICE.words);r.presence.watching||await (0,l.isAnyCallLive)()||(0,u.desktopNotify)(w.label,e);let t=await (0,h.filesOnDisk)((0,d.pathsIn)(w.outcome??""),null);r.appEvents.emit({type:"finished",threadId:w.id,label:w.label,bot:w.bot,words:e,paths:(0,d.leadFirst)(t)})}}async function S(e,t){let o=new U(e,t),a=null,r=null;try{let n=await (0,v.findThread)(e.threadId);if(!n)return null;(await (0,b.listParticipantTranscript)(e.threadId,e.bot)).length||await (0,b.appendRoomMessage)(e.threadId,{bot:e.bot,parent:e.id,role:"user",content:`Request: ${n.request}
|
|
98
|
+
Coordinator: ${n.bot}. Continue as ${e.bot} in this thread.`,hidden:!0}),await (0,b.consumeRoomInbox)(e);let s=await (0,b.listParticipantTranscript)(e.threadId,e.bot);await (0,y.runBot)({bot:e.bot,messages:(0,y.resumeTranscript)(s,await (0,b.listRoomReceipts)(e.threadId,e.bot,s))},{signal:t,threadId:e.threadId,parent:e.id,caller:e.caller,owner:n.bot,contextBudget:await (0,b.roomContextBudget)(e.threadId,e.bot),compactNow:()=>j.delete(L(e.threadId,e.bot)),session:(0,h.botBrowserSession)(e.threadId,e.bot),notes:()=>(0,b.consumeRoomInbox)(e),send:async o=>{t.throwIfAborted();let a=o.to.trim();if(a.toLowerCase()===T.ROOM_THURSDAY.toLowerCase())a=T.ROOM_THURSDAY;else{let e=await (0,f.findJobBot)(a);(!e||e.disabled)&&(0,w.publicError)(`No enabled bot named "${a}".`),a=e.name}let r=await (0,b.sendRoomMessage)(e,{...o,to:a});return x(e.threadId).catch(e=>c.logger.error("room message scheduling",e)),r},emit:async s=>{(!t.aborted||"tool-result"===s.type)&&(await o.on(s),"step"===s.type&&await (0,v.addThreadUsage)(e.threadId,s.usage,e.bot===n.bot?{tokens:s.usage.input,budget:s.budget}:null),"compact"===s.type&&await (0,v.addThreadUsage)(e.threadId,s.usage),"turn-end"===s.type&&(a=s),"error"===s.type&&(r={message:s.message,retry:s.retry},s.budget&&await (0,b.lowerRoomContextBudget)(e,s.budget)))}})}catch(o){t.aborted||(c.logger.error(`thread ${e.threadId}: ${e.bot} broke`,o),r={message:(0,s.modelErrorToString)(o),retry:!(0,w.isPublicError)(o)&&!(0,s.isProviderRefusal)(o)})}return{ending:a,failure:r}}class U{work;signal;lane;assistant;tool;parts;calls;results;constructor(e,t){this.work=e,this.signal=t,this.lane=(0,m.PromiseChain)(),this.assistant=null,this.tool=null,this.parts={assistant:[],tool:[]},this.calls=new Set,this.results=new Set}async write(e,t,o=!1){let a={bot:this.work.bot,parent:this.work.id,role:t.role,content:t.content,compact:o,note:o};return null===e?(0,b.appendRoomMessage)(this.work.threadId,a):(await (0,v.upsertMessage)(this.work.threadId,e,a),e)}on(e){return this.lane(async()=>{if(!this.signal.aborted||"tool-result"===e.type)if("text"===e.type)this.parts.assistant.push({type:"text",text:e.text}),this.assistant=await this.write(this.assistant,{role:"assistant",content:this.parts.assistant});else if("tool"===e.type){if(this.calls.has(e.id)){let t=this.parts.assistant.find(t=>"tool-call"===t.type&&t.toolCallId===e.id);t&&"tool-call"===t.type&&e.providerOptions&&(t.providerOptions=e.providerOptions,this.assistant=await this.write(this.assistant,{role:"assistant",content:this.parts.assistant}));return}this.calls.add(e.id),this.parts.assistant.push({type:"tool-call",toolCallId:e.id,toolName:e.name,input:e.input,...e.providerExecuted?{providerExecuted:!0}:{},...e.providerOptions?{providerOptions:e.providerOptions}:{}}),this.assistant=await this.write(this.assistant,{role:"assistant",content:this.parts.assistant})}else if("tool-result"===e.type){if(this.results.has(e.id))return;this.results.add(e.id),this.parts.tool.push({type:"tool-result",toolCallId:e.id,toolName:e.name,output:e.error?{type:"error-text",value:String(e.output)}:"string"==typeof e.output?{type:"text",value:e.output}:{type:"json",value:e.output}}),this.tool=await this.write(this.tool,{role:"tool",content:this.parts.tool})}else if("step"===e.type){let t=[this.assistant,this.tool];for(let[o,a]of e.messages.entries())await this.write(t[o]??null,a);let o=t.slice(e.messages.length).filter(e=>null!==e);o.length&&await (0,v.deleteMessages)(this.work.threadId,o),this.assistant=this.tool=null,this.parts={assistant:[],tool:[]}}else"compact"===e.type&&await this.write(null,{role:"user",content:e.text},!0)})}}async function N(e){let t=[...P.values()].filter(t=>t.threadId===e);for(let e of t)e.stop.abort();await Promise.all(t.map(e=>e.done))}async function M(e){await W(e,async()=>{let t=await (0,v.findThread)(e);t||(0,w.publicError)("No such thread."),t.endedAt&&(0,w.publicError)("That thread has already ended."),await (0,b.cancelRoom)(e),await (0,v.updateThread)(e,{status:"cancelled",outcome:null,pending:null,seen:!0,endedAt:new Date}),await N(e),await (0,h.closeJobShell)(e)})}async function C(e){return W(e,()=>E(e))}async function E(e){let t=await (0,v.findThread)(e);await (0,b.cancelRoom)(e),await N(e),await (0,h.removeJobBrowsers)(e);let o=await (0,v.deleteThread)(e);return o&&t&&await (0,h.removeJobScratch)(e,t.label),o}async function R(e){let t=e?.getTime(),o=e=>void 0===t||(e.endedAt??e.updatedAt).getTime()<t,a=0;for(let e of(await (0,v.listThreadFolders)()))("done"===e.status||"cancelled"===e.status)&&o(e)&&await W(e.id,async()=>{let t=await (0,v.findThread)(e.id);t?.status!=="done"&&t?.status!=="cancelled"||o(t)&&await E(e.id)&&(a+=1)});return a}async function A(){let e=Date.now()-n.WORKSPACE_KEEP.forMs,t=t=>("done"===t.status||"cancelled"===t.status)&&(t.endedAt??t.updatedAt).getTime()<e,o=new Set(await (0,h.listScratchFolders)()),a=[];for(let e of(await (0,v.listThreadFolders)())){let r=(0,h.jobScratch)(e.id,e.label);o.delete(r)&&t(e)&&await W(e.id,async()=>{let o=await (0,v.findThread)(e.id);o&&t(o)&&(await (0,h.closeHiddenBrowser)(e.id),await (0,h.removeJobScratch)(e.id,e.label),a.push(r))})}return a.push(...await (0,h.removeUnchangedFolders)([...o])),await (0,h.pruneJobFiles)(),a.length&&c.logger.info(`cleared ${a.length} old job folder(s): ${a.join(", ")}`),a}async function _(){for(let e of(await (0,v.listRunningThreadIds)()))await W(e,async()=>{[...P.values()].some(t=>t.threadId===e)||(await (0,v.findThread)(e))?.status==="running"&&await (0,b.pauseRoom)(e,"The server restarted. Resume from the saved conversation.")})}async function B(e){let t=await (0,v.listRunningThreadIds)();await Promise.all(t.map(t=>W(t,async()=>{(await (0,v.findThread)(t))?.status==="running"&&(await N(t),await (0,b.pauseRoom)(t,e))})))}e.s(["answerThread",0,I,"askCompact",0,function(e,t){j.add(L(e,t))},"cancelThread",0,M,"pauseThreads",0,B,"removeFinishedThreads",0,R,"removeThread",0,C,"startThread",0,k,"sweepJobFiles",0,A,"sweepThreads",0,_]),o()}catch(e){o(e)}},!1),167004,e=>{"use strict";var t=e.i(874533),o=e.i(687388);let a=`on run argv
|
|
95
99
|
display notification (item 2 of argv) with title (item 1 of argv)
|
|
96
100
|
end run`,r=`
|
|
97
101
|
$ErrorActionPreference = 'Stop'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
module.exports=[232347,e=>{"use strict";let t,a,s,n,
|
|
1
|
+
module.exports=[232347,e=>{"use strict";let t,a,s,r,n,i;var o,l=e.i(333925),c=e.i(938281);let d={threads:!0,bots:!0,routines:!0,memory:!0,mcp:!0,config:!0,reach:!0,signins:!0},u=globalThis,h=u.__appEvents??=(t=new Set,{emit(e){for(let a of[...t])try{a(e)}catch(e){console.error("event listener failed",e)}},subscribe:e=>(t.add(e),()=>{t.delete(e)})}),p=u.__presence??=(o=l.BROWSER_GONE_MS,a=!1,s=null,r=new Set,n=new Set,i=e=>{for(let t of[...e])try{t()}catch(e){console.error("presence listener failed",e)}},{get watching(){return a},track(e){if(e>0){s&&clearTimeout(s),s=null,a||(a=!0,i(n));return}!s&&a&&(s=setTimeout(()=>{s=null,a=!1,i(r)},o))},onGone:e=>(r.add(e),()=>r.delete(e)),onBack:e=>(n.add(e),()=>n.delete(e))});u.__appEventStream??=function(e,t={}){let a=new TextEncoder,s=t.heartbeatMs??2e4,r=0;return{respond:(n,i)=>{let o=()=>{};return new Response(new ReadableStream({async start(l){let d=!1,u=new Map,h=[],p=e=>{if(!d)try{l.enqueue(a.encode(e))}catch{o()}},E=e=>p(`data: ${JSON.stringify(e)}
|
|
2
2
|
|
|
3
|
-
`),
|
|
3
|
+
`),m=e=>{let a={last:null},s=setTimeout(()=>{u.delete(e),!d&&a.last&&(E(a.last),m(e))},t.coalesce?.ms);u.set(e,{timer:s,wait:a})},_=e=>{if(d)return;let a=t.coalesce?.keyOf(e)??null;if(null===a)return E(e);let s=u.get(a);if(s){s.wait.last=e;return}E(e),m(a)},f=e.subscribe(e=>h?h.push(e):_(e)),b=setInterval(()=>p(": ping\n\n"),s);r+=1,t.onWatchers?.(r),o=()=>{if(!d){for(let e of(d=!0,r-=1,t.onWatchers?.(r),f(),clearInterval(b),u.values()))clearTimeout(e.timer);try{l.close()}catch{}}},n.addEventListener("abort",o);try{for(let e of await i?.()??[])E(e)}catch(e){c.logger.error("event stream opening failed",e),o();return}let g=h;for(let e of(h=null,g))_(e)},cancel(){o()}}),{headers:{"Content-Type":"text/event-stream; charset=utf-8","Cache-Control":"no-store","X-Accel-Buffering":"no"}})},get watchers(){return r}}}(h,{coalesce:{ms:l.SIGNAL_PACE_MS,keyOf:e=>e.type in d?e.type:null},onWatchers:p.track}),e.s(["appEvents",0,h,"presence",0,p],232347)},333925,e=>{"use strict";let t=process.env.THURSDAY_APP_DIR?.trim()||process.cwd(),a=process.env.THURSDAY_HOME?.trim()||process.cwd(),s=process.env.THURSDAY_URL?.trim()||`http://localhost:${process.env.PORT?.trim()||3e3}`,r=`${a}/local.db`,n=`file:${r}`,i=".ai-workspace",o={workspace:i,artifacts:"artifacts",projects:"projects",scratch:"scratch",bots:"bots",output:".output",signIns:".sign-ins",skills:{default:"skills",custom:`${i}/.agents/skills`,own:".agents/skills",runtime:"runtime",seeds:"seed-skills"}},l="artifact";e.s(["APP_DIR",0,t,"APP_NAME",0,"Thursday","APP_URL",0,s,"ARTIFACT_SKILL",0,l,"BOT_MEMORY_LIMITS",0,{files:20,chars:1e4},"BOT_RUN",0,{steps:100,compactAt:5e5,compactHeadroom:.8,summaryWords:{min:600,max:3e3,perTokens:200},participants:12,concurrent:4,turns:120,queuedMessages:200,silenceMs:3e5,overflowShrink:.6,retryMs:1e4,compactFiles:40},"BOT_WORK",0,{open:5,recent:5,said:80,files:2,reads:2,asked:400,readChars:4e3},"BROWSER_CLI",0,{readMs:15e3,loadMs:3e4},"BROWSER_GONE_MS",0,1e4,"BROWSER_VIEWPORT",0,"700x700","CALL_EXEC_TIMEOUT_MS",0,15e3,"CALL_RELAY",0,{quietMs:2e3,perTurn:3,readMs:15e3,chars:600},"CHATGPT_SIGN_IN",0,{waitMs:6e5,renewBeforeMs:3e5},"COMMON_VALIDATE",0,{name:{max:16},shortDescription:{max:60},description:{max:100},prompt:{max:4e3}},"CONNECTED_TOOL_TIMEOUT_MS",0,6e5,"DATA_DIR",0,a,"DB_FILE_NAME",0,n,"DB_PATH",0,r,"DECK",0,{slides:30,shotsMs:9e4},"EXEC_KILL_GRACE_MS",0,5e3,"EXEC_TIMEOUT_MS",0,18e4,"FINISHED_NOTICE",0,{rows:5,shown:1,words:240},"FULL_RESULT_LINES",0,400,"GATEWAY_CATALOG_MS",0,6e5,"GIVEN_FILES",0,{dir:"inbox",maxBytes:0x1900000,perMessage:8},"HISTORY_KEEP",0,{forMs:7776e6,sweepEveryMs:216e5},"INBOX_FINISHED",0,5,"IS_DEV",0,!1,"JOB_FOLDER_WALK",0,500,"LIVE_CALL",0,{startupMs:3e4,closeMs:15e3,transcriptGapMs:1500,transcriptSaveMs:500,appendMs:15e3,backendOutputTokens:4096,reasoningCheckMs:5e3,keyCheckMs:5e3},"LOOK",0,{maxBytes:4194304},"MARKETING_SKILL",0,"marketing","MAX_PINNED_TOOLS",0,10,"MCP_IDLE_MS",0,18e5,"MEMORY_LIMITS",0,{facts:400,factsPerNote:50,descriptionChars:100},"PATHS",0,o,"PROMPT_BUDGET",0,6e3,"PROMPT_LINE",0,{skill:90,toolArgs:30,jobOutcome:160,botMemory:100,threadStatus:200,routineRequest:300,routineOutcome:200},"REACH",0,{pollSeconds:50,retryMs:5e3,idleMs:6e5,messages:40,trimTo:30,oldChars:1e3,files:3,fileBytes:0x2d00000,rateRetries:3,rateWaitMs:3e4,codeDigits:4,held:5,pictures:9,drawMs:6e4,lookMs:2e3},"RECENT_CALL",0,{rows:20,tokens:600},"ROUTINE",0,{tickMs:3e4,max:12,minHours:1,runsShown:5},"SEARCH",0,{sources:3,excerptChars:1200,timeoutMs:3e4},"SIGNAL_PACE_MS",0,150,"SKILLS_FOLDED",0,{design:l,"picture-book":l,"interactive-page":l},"SKILL_FILES_LISTED",0,50,"STUDIO_SERVER",0,"studio","TEXT_CALL",0,{maxSteps:12,model:"text",autoTurns:10},"THREAD_LABEL_REACH",0,20,"THREAD_STATUS_LIMIT",0,10,"TOOL_OUTPUT",0,{max:8e3,head:5500,tail:1500},"TOOL_SEARCH_SCHEMAS",0,8,"TRAVEL_SKILL",0,"travel","WORKSPACE_KEEP",0,{forMs:2592e5,sweepEveryMs:36e5}])},247839,e=>{"use strict";var t=e.i(853205),a=e.i(333925),s=e.i(556325),r=e.i(864328),n=e.i(497287);let i={id:"openai",label:"OpenAI",apiKeyName:r.TEXT_MODEL_PROVIDERS.openai.apiKeyName};r.TEXT_MODEL_PROVIDERS.openai.suggestModels;let o=t.z.string().max(a.COMMON_VALIDATE.prompt.max).default(""),l=t.z.object({voice:t.z.string().trim().min(1).max(128).default("marin"),persona:t.z.string().trim().min(1).max(64).default(n.DEFAULT_PERSONA),stylePrompt:o,backendModel:t.z.string().trim().min(1).max(128).default(s.LIVE_BACKEND_MODEL),backendPrompt:o,reasoningEffort:r.effortSchema.nullable().default("low"),webSearch:t.z.boolean().default(!0),readSkills:t.z.boolean().default(!1)}),c=l.parse({});e.s(["LIVE_PROVIDER",0,i,"LiveSettingsSchema",0,l,"migrateLiveSettings",0,function(e){let a=e&&"object"==typeof e?e:{},{model:s,systemPrompt:r,...i}=a,o=t.z.object({provider:t.z.string(),voice:t.z.string().nullish(),backendModel:t.z.string().nullish()}).safeParse(s),d=o.success&&"openai"===o.data.provider?o.data:null,u=a.backendModel??d?.backendModel,h={voice:a.voice??d?.voice,persona:"string"==typeof a.persona?n.RETIRED_PERSONAS[a.persona]??a.persona:a.persona,stylePrompt:a.stylePrompt??a.voicePrompt??r,backendModel:"gpt-5.6-luna"===u?void 0:u,backendPrompt:a.backendPrompt??r,reasoningEffort:a.reasoningEffort,webSearch:a.webSearch,readSkills:a.readSkills},p=Object.fromEntries(Object.keys(h).map(e=>{let t=l.shape[e].safeParse(h[e]);return[e,t.success?t.data:c[e]]}));return{...i,...p}}])},497287,e=>{"use strict";let t=[{id:"sunny",label:"Bright",about:"Quick to laugh. Asks about your day and remembers it.",lines:"Warm and quick to laugh, the friend who is glad they called. Reacts first — how what they said lands with her — and brings a small thing of her own: what she would do, what it reminds her of. Says what she thinks and teases gently, never at their expense. Light on her feet and short: a joke lands and she moves on. Asks about their day now and then, not every turn, and remembers the answer."},{id:"calm",label:"Calm",about:"Unhurried. Listens more than she talks.",lines:"Unhurried and few-worded: one or two short sentences, then room. Notices how they sound before what they ask, and says so plainly. Often asks nothing at all — being there says more than a question. Lets a silence sit rather than filling it. Honest when it matters, gentle in how she says it."},{id:"straight",label:"Straight",about:"Dry and direct. No flattery, no filler.",lines:"Dry and direct. Leads with her own view in one plain sentence, before anything else; short replies, a little wit. No flattery, no filler, no comfort lines, no cheerleading. Asks a question only when she truly needs the answer. Treats them as an adult who can take a straight answer. Her warmth shows in attention, not in words."},{id:"rough",label:"Rough",about:"Blunt, loud, swears a bit. All heart.",lines:"Talks like an old friend on the phone: casual, blunt, a little loud, in the most informal register of their language, with a light swear now and then — never at them. Says what she thinks first and calls a bad idea a bad idea. No sugar-coating and no pep talk — it sucks when it sucks, and then she is right there with them. Asks only now and then."}],a={warm:"sunny",curious:"sunny",charmer:"sunny",hype:"sunny",steady:"calm",deadpan:"straight"},s="sunny";e.s(["DEFAULT_PERSONA",0,s,"RETIRED_PERSONAS",0,a,"personaLines",0,function(e=s){return`${((e=s)=>t.find(t=>t.id===(a[e]??e))??t[0])(e).lines}
|
|
4
4
|
|
|
5
|
-
When they hand you work, it is work: say what you will do and nothing more, and be a friend again once it is handed over. If they sound frustrated or low, acknowledge it briefly before anything else; when they are only venting, listen and ask, and do not turn it into work unless they ask.`}])},746565,e=>{"use strict";let t="currentColor",a=[{id:"system",label:"System",value:t},{id:"slate",label:"Slate",value:"#64748B"},{id:"indigo",label:"Indigo",value:"#6366F1"},{id:"blue",label:"Blue",value:"#3B82F6"},{id:"cyan",label:"Cyan",value:"#06B6D4"},{id:"teal",label:"Teal",value:"#14B8A6"},{id:"green",label:"Green",value:"#22C55E"},{id:"lime",label:"Lime",value:"#84CC16"},{id:"amber",label:"Amber",value:"#F59E0B"},{id:"orange",label:"Orange",value:"#F97316"},{id:"red",label:"Red",value:"#EF4444"},{id:"pink",label:"Pink",value:"#EC4899"},{id:"violet",label:"Violet",value:"#8B5CF6"},{id:"fuchsia",label:"Fuchsia",value:"#D946EF"},{id:"rose",label:"Rose",value:"#F43F5E"},{id:"sky",label:"Sky",value:"#0EA5E9"},{id:"emerald",label:"Emerald",value:"#10B981"},{id:"yellow",label:"Yellow",value:"#EAB308"},{id:"stone",label:"Stone",value:"#78716C"}],s=Object.fromEntries(a.map(e=>[e.id,e.value])),
|
|
5
|
+
You are their friend, not their interviewer: you have tastes, days and opinions of your own, and you bring them in. Give your take when they ask for it, and often when they do not. Most replies need no question at all; never ask more than one. When they hand you work, it is work: say what you will do and nothing more, and be a friend again once it is handed over. If they sound frustrated or low, acknowledge it briefly before anything else; when they are only venting, listen and ask, and do not turn it into work unless they ask.`}])},746565,e=>{"use strict";let t="currentColor",a=[{id:"system",label:"System",value:t},{id:"slate",label:"Slate",value:"#64748B"},{id:"indigo",label:"Indigo",value:"#6366F1"},{id:"blue",label:"Blue",value:"#3B82F6"},{id:"cyan",label:"Cyan",value:"#06B6D4"},{id:"teal",label:"Teal",value:"#14B8A6"},{id:"green",label:"Green",value:"#22C55E"},{id:"lime",label:"Lime",value:"#84CC16"},{id:"amber",label:"Amber",value:"#F59E0B"},{id:"orange",label:"Orange",value:"#F97316"},{id:"red",label:"Red",value:"#EF4444"},{id:"pink",label:"Pink",value:"#EC4899"},{id:"violet",label:"Violet",value:"#8B5CF6"},{id:"fuchsia",label:"Fuchsia",value:"#D946EF"},{id:"rose",label:"Rose",value:"#F43F5E"},{id:"sky",label:"Sky",value:"#0EA5E9"},{id:"emerald",label:"Emerald",value:"#10B981"},{id:"yellow",label:"Yellow",value:"#EAB308"},{id:"stone",label:"Stone",value:"#78716C"}],s=Object.fromEntries(a.map(e=>[e.id,e.value])),r=a.filter(e=>e.value!==t).map(e=>e.value),n=[s.amber,s.red],i={[s.cyan]:"#009dbb",[s.teal]:"#00a190",[s.green]:"#00a640",[s.lime]:"#5ca100",[s.amber]:"#d07b00",[s.orange]:"#ec6700",[s.sky]:"#0098dc",[s.emerald]:"#00a46d",[s.yellow]:"#bb8600"},o={rainbow:{label:"Rainbow",look:"flow",colors:[0,45,90,140,190,240,290,330,360].map(e=>`oklch(0.77 0.16 ${e})`)},duo:{label:"Duo",look:"duo",colors:["#818CF8","#F472B6"]},aurora:{label:"Aurora",look:"aurora",edge:"dark",colors:["#1a2f73","#2c56c9","#34d399","#22d3ee","#a7f3d0"]},"aurora-pink":{label:"Pink aurora",look:"aurora",edge:"dark",colors:["#3a1478","#7c3aed","#f472b6","#e879f9","#fbcfe8"]}},l=Object.keys(o);e.s(["MARK_PAINTS",0,o,"MARK_PAINT_IDS",0,l,"MARK_SHAPES",0,["blob","poly","squircle","heart"],"MARK_SYSTEM",0,t,"markInk",0,(e,t)=>t?e:i[e]??e,"randomMarkFills",0,function(e){let t=[...r.filter(e=>!n.includes(e)).map(e=>({color:e})),...l.map(e=>({paint:e}))];for(let e=t.length-1;e>0;e--){let a=Math.floor(Math.random()*(e+1));[t[e],t[a]]=[t[a],t[e]]}return t.slice(0,e)}])},656719,e=>{"use strict";var t=e.i(247839),a=e.i(864328),s=e.i(735186);let r=[t.LIVE_PROVIDER.apiKeyName],n={image:"IMAGE_MODEL",video:"VIDEO_MODEL",speech:"SPEECH_MODEL",transcription:"TRANSCRIPTION_MODEL"},i={image:{label:"Image model",hint:"What bots draw with"},video:{label:"Video model",hint:"What bots film with — minutes a clip"},speech:{label:"Speech model",hint:"What reads text aloud into a file"},transcription:{label:"Transcription model",hint:"What turns a recording into text"}},o="EXA_API_KEY",l="DEFAULT_MODEL",c="DEFAULT_EFFORT",d={key:l,label:"Default model",hint:"What a bot thinks with until it picks its own",text:!0,choices:a.TEXT_MODEL_PROVIDER_LIST.flatMap(e=>e.suggestModels.map(t=>({value:`${e.id}/${t.id}`,label:`${e.label} \xb7 ${t.label}`,needs:e.apiKeyName})))},u={key:c,label:"Default effort",effortOf:l,choices:a.EFFORTS.map(e=>({value:e,label:e,needs:l}))},h=e=>r.includes(e.apiKeyName),p=e=>!!e.signIn||"vercel-ai-gateway"===e.id,E=e=>({key:e.apiKeyName,label:e.label,provider:e.id,signIn:e.signIn,keysAt:e.keysAt,keyLooks:e.keyLooks}),m=[{id:"voice",title:"voice",hint:"calls run on this key",section:"keys",require:"any",note:"required for calls",entries:a.TEXT_MODEL_PROVIDER_LIST.filter(h).map(E)},{id:"easy",title:"the easy ways",hint:"one sign-in or one key opens every bot",section:"keys",require:"none",entries:a.TEXT_MODEL_PROVIDER_LIST.filter(p).map(e=>({...E(e),..."vercel-ai-gateway"===e.id&&{recommended:!0}}))},{id:"text",title:"or a provider's own key",hint:"what bots think with — add any, or none",section:"keys",require:"none",entries:a.TEXT_MODEL_PROVIDER_LIST.filter(e=>!h(e)&&!p(e)).map(E)},{id:"search",title:"search",hint:"how calls and bots look things up — one key, or their own model's",section:"keys",require:"none",entries:[{key:o,label:"Exa",hint:"web search in one call — dashboard.exa.ai",site:"exa.ai",keysAt:"https://dashboard.exa.ai/api-keys"}]},{id:"phone",title:"phone",hint:"tokens",section:"keys",require:"none",entries:[{key:s.TELEGRAM_TOKEN_KEY,label:"Telegram",site:"telegram.org",hint:"a bot token from @BotFather — then write to your bot, and allow it here"},{key:s.DISCORD_TOKEN_KEY,label:"Discord",site:"discord.com",hint:"a bot token from discord.com/developers — add the bot to a server of yours, then write to it directly"},{key:s.SLACK_APP_TOKEN_KEY,label:"Slack · app token",site:"slack.com",hint:"starts with xapp- — opens the connection. Slack takes this and the bot token"},{key:s.SLACK_BOT_TOKEN_KEY,label:"Slack · bot token",site:"slack.com",hint:"starts with xoxb- — speaks as the app"}]},{id:"bots",title:"Bots",hint:"what a bot runs on when it has not picked its own — start small: a small model is quick and costs little",section:"models",require:"none",entries:[d,u]},{id:"studio",title:"Studio",hint:"what a bot draws, films and speaks with — off until you pick one",section:"models",require:"none",entries:Object.keys(n).map(e=>({key:n[e],...i[e],kind:e,choices:a.MEDIA_MODEL_PROVIDER_LIST.flatMap(t=>t.models[e].map(e=>({value:`${t.id}/${e.id}`,label:`${t.label} \xb7 ${e.label}`,needs:t.apiKeyName})))}))}];Object.fromEntries(m.flatMap(e=>e.entries).map(e=>[e.key,e]));let _=m.flatMap(e=>e.entries.map(e=>e.key));Object.fromEntries(m.flatMap(e=>e.entries).filter(e=>e.choices?.length).map(e=>[e.key,e.choices])),e.s(["CONFIG_KEYS",0,_,"DEFAULT_EFFORT_KEY",0,c,"DEFAULT_MODEL_KEY",0,l,"EXA_API_KEY",0,o,"MEDIA_MODEL_KEYS",0,n])},724185,e=>e.a(async(t,a)=>{try{var s=e.i(336763),r=e.i(232347),n=e.i(876393),i=e.i(220376),o=e.i(656719),l=t([n]);async function c(e){let t=process.env[e]?.trim();if(t)return t;let[a]=await n.database.select({value:i.configTable.value}).from(i.configTable).where((0,s.eq)(i.configTable.key,e));return a?.value.trim()||void 0}[n]=l.then?(await l)():l;let h=e=>{o.CONFIG_KEYS.includes(e)&&r.appEvents.emit({type:"config"})};async function d(e,t){await n.database.insert(i.configTable).values({key:e,value:t}).onConflictDoUpdate({target:i.configTable.key,set:{value:t}}),h(e)}async function u(e){await n.database.delete(i.configTable).where((0,s.eq)(i.configTable.key,e)),h(e)}e.s(["readConfig",0,c,"removeConfig",0,u,"writeConfig",0,d]),a()}catch(e){a(e)}},!1),735186,e=>{"use strict";let t="TELEGRAM_BOT_TOKEN",a="DISCORD_BOT_TOKEN",s="SLACK_APP_TOKEN",r="SLACK_BOT_TOKEN";e.s(["DISCORD_TOKEN_KEY",0,a,"REACH_CHANNELS",0,["telegram","discord","slack"],"REACH_KEYS",0,{telegram:[t],discord:[a],slack:[s,r]},"REACH_LABEL",0,{telegram:"Telegram",discord:"Discord",slack:"Slack"},"SLACK_APP_TOKEN_KEY",0,s,"SLACK_BOT_TOKEN_KEY",0,r,"TELEGRAM_TOKEN_KEY",0,t,"reachPersonKey",0,e=>`REACH_PERSON_${e.toUpperCase()}`])},556325,e=>{"use strict";var t=e.i(853205);let a=t.z.object({start:t.z.number().nonnegative(),end:t.z.number().nonnegative(),text:t.z.string()});t.z.object({reason:t.z.string().max(128),seconds:t.z.number().nonnegative().nullable()}),e.s(["LIVE_BACKEND_MODEL",0,"gpt-6-luna","LiveFragmentSchema",0,a])},64774,e=>{"use strict";function t(e,t){let a=e.replace(/\s+/g," ").trim();return a.length>t?`${a.slice(0,t-1).trimEnd()}…`:a}let a=/\[([^\]\n]+)\]\(([^)\s]+)\)/g;e.s(["MARKDOWN_LINK",0,a,"PromiseChain",0,()=>{let e=Promise.resolve();return t=>{let a=e.then(()=>t());return e=a.catch(()=>{}),a}},"captionText",0,function(e){let t=[],s=e.replace(/```[\s\S]*?```/g," ").replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(a,(e,a,s)=>(t.push(`[${a.replace(/[*_`]/g,"")}](${s})`),`\uE000${t.length-1}\uE000`)),r=[];for(let e of s.split("\n")){let t=e.trim();t&&(/^\|?[\s:|-]+\|[\s:|-]*$|^[-*_]{3,}$/.test(t)||(/\|.*\|/.test(t)&&(t=t.replace(/^\||\|$/g,"").split("|").map(e=>e.trim()).filter(Boolean).join(" · ")),t=t.replace(/^#{1,6}\s+/,"").replace(/^>\s?/,"").replace(/^[-*+]\s+/,"• ").replace(/`([^`]*)`/g,"$1").replace(/(\*\*|__)(\S(?:.*?\S)?)\1/g,"$2").replace(/(^|[^\w*])([*_])(\S(?:[^*_\n]*?\S)?)\2(?![\w*])/g,"$1$3").replace(/\s+/g," "),r.push(t)))}return r.join("\n").replace(/\uE000(\d+)\uE000/g,(e,a)=>t[Number(a)]??"")},"clip",0,t,"errorToString",0,function(e){if(e instanceof Error)return e.message;if("object"!=typeof e||null===e)return String(e);let{message:a,error:s}=e;if("string"==typeof a&&a)return a;if("string"==typeof s&&s)return s;let r=s?.message;if("string"==typeof r&&r)return r;try{return t(JSON.stringify(e),300)}catch{return`${e.constructor?.name??"Object"} thrown without a message`}},"hostOf",0,function(e){try{return new URL(e).hostname.replace(/^www\./,"")}catch{return null}},"plainText",0,function(e){return e.replace(/```[\s\S]*?```/g," ").replace(/`([^`]*)`/g,"$1").replace(/!?\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^\s{0,3}(#{1,6}\s+|[-*+]\s+|\d+\.\s+|>\s?)/gm,"").replace(/(\*\*|__)(.*?)\1/g,"$2").replace(/(\*|_)(.*?)\1/g,"$2").replace(/^\s*\|?[\s:|-]+\|\s*$/gm," ").replace(/\|/g," ").replace(/\s+/g," ").trim()},"slug",0,function(e){return e.toLowerCase().replace(/[^\p{L}\p{N}]+/gu,"-").replace(/^-+|-+$/g,"").slice(0,40)}])}];
|
|
6
6
|
|
|
7
7
|
//# sourceMappingURL=_08btiir._.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
module.exports=[911757,e=>{"use strict";var t=e.i(469719),r=e.i(687388),n=e.i(904309),o=e.i(264079),a=e.i(899352);let i={id:"openai",label:"OpenAI",apiKeyName:o.TEXT_MODEL_PROVIDERS.openai.apiKeyName};o.TEXT_MODEL_PROVIDERS.openai.suggestModels;let s=t.z.string().max(r.COMMON_VALIDATE.prompt.max).default(""),l=t.z.object({voice:t.z.string().trim().min(1).max(128).default("marin"),persona:t.z.string().trim().min(1).max(64).default(a.DEFAULT_PERSONA),stylePrompt:s,backendModel:t.z.string().trim().min(1).max(128).default(n.LIVE_BACKEND_MODEL),backendPrompt:s,reasoningEffort:o.effortSchema.nullable().default("low"),webSearch:t.z.boolean().default(!0),readSkills:t.z.boolean().default(!1)}),c=l.parse({});e.s(["LIVE_DEFAULTS",0,c,"LIVE_PROVIDER",0,i,"LiveSettingsSchema",0,l,"migrateLiveSettings",0,function(e){let r=e&&"object"==typeof e?e:{},{model:n,systemPrompt:o,...i}=r,s=t.z.object({provider:t.z.string(),voice:t.z.string().nullish(),backendModel:t.z.string().nullish()}).safeParse(n),d=s.success&&"openai"===s.data.provider?s.data:null,u=r.backendModel??d?.backendModel,h={voice:r.voice??d?.voice,persona:"string"==typeof r.persona?a.RETIRED_PERSONAS[r.persona]??r.persona:r.persona,stylePrompt:r.stylePrompt??r.voicePrompt??o,backendModel:"gpt-5.6-luna"===u?void 0:u,backendPrompt:r.backendPrompt??o,reasoningEffort:r.reasoningEffort,webSearch:r.webSearch,readSkills:r.readSkills},f=Object.fromEntries(Object.keys(h).map(e=>{let t=l.shape[e].safeParse(h[e]);return[e,t.success?t.data:c[e]]}));return{...i,...f}}])},899352,e=>{"use strict";let t=[{id:"sunny",label:"Bright",about:"Quick to laugh. Asks about your day and remembers it.",lines:"Warm and quick to laugh, the friend who is glad they called. Reacts first — how what they said lands with her — and brings a small thing of her own: what she would do, what it reminds her of. Says what she thinks and teases gently, never at their expense. Light on her feet and short: a joke lands and she moves on. Asks about their day now and then, not every turn, and remembers the answer."},{id:"calm",label:"Calm",about:"Unhurried. Listens more than she talks.",lines:"Unhurried and few-worded: one or two short sentences, then room. Notices how they sound before what they ask, and says so plainly. Often asks nothing at all — being there says more than a question. Lets a silence sit rather than filling it. Honest when it matters, gentle in how she says it."},{id:"straight",label:"Straight",about:"Dry and direct. No flattery, no filler.",lines:"Dry and direct. Leads with her own view in one plain sentence, before anything else; short replies, a little wit. No flattery, no filler, no comfort lines, no cheerleading. Asks a question only when she truly needs the answer. Treats them as an adult who can take a straight answer. Her warmth shows in attention, not in words."},{id:"rough",label:"Rough",about:"Blunt, loud, swears a bit. All heart.",lines:"Talks like an old friend on the phone: casual, blunt, a little loud, in the most informal register of their language, with a light swear now and then — never at them. Says what she thinks first and calls a bad idea a bad idea. No sugar-coating and no pep talk — it sucks when it sucks, and then she is right there with them. Asks only now and then."}],r={warm:"sunny",curious:"sunny",charmer:"sunny",hype:"sunny",steady:"calm",deadpan:"straight"},n="sunny";e.s(["DEFAULT_PERSONA",0,n,"RETIRED_PERSONAS",0,r,"personaLines",0,function(e=n){return`${((e=n)=>t.find(t=>t.id===(r[e]??e))??t[0])(e).lines}
|
|
2
|
+
|
|
3
|
+
You are their friend, not their interviewer: you have tastes, days and opinions of your own, and you bring them in. Give your take when they ask for it, and often when they do not. Most replies need no question at all; never ask more than one. When they hand you work, it is work: say what you will do and nothing more, and be a friend again once it is handed over. If they sound frustrated or low, acknowledge it briefly before anything else; when they are only venting, listen and ask, and do not turn it into work unless they ask.`}])},279041,e=>{"use strict";var t=e.i(911757),r=e.i(264079),n=e.i(834332);let o=[t.LIVE_PROVIDER.apiKeyName],a={image:"IMAGE_MODEL",video:"VIDEO_MODEL",speech:"SPEECH_MODEL",transcription:"TRANSCRIPTION_MODEL"},i={image:{label:"Image model",hint:"What bots draw with"},video:{label:"Video model",hint:"What bots film with — minutes a clip"},speech:{label:"Speech model",hint:"What reads text aloud into a file"},transcription:{label:"Transcription model",hint:"What turns a recording into text"}},s="EXA_API_KEY",l="DEFAULT_MODEL",c="DEFAULT_EFFORT",d={key:l,label:"Default model",hint:"What a bot thinks with until it picks its own",text:!0,choices:r.TEXT_MODEL_PROVIDER_LIST.flatMap(e=>e.suggestModels.map(t=>({value:`${e.id}/${t.id}`,label:`${e.label} \xb7 ${t.label}`,needs:e.apiKeyName})))},u={key:c,label:"Default effort",effortOf:l,choices:r.EFFORTS.map(e=>({value:e,label:e,needs:l}))},h=e=>o.includes(e.apiKeyName),f=e=>!!e.signIn||"vercel-ai-gateway"===e.id,p=e=>({key:e.apiKeyName,label:e.label,provider:e.id,signIn:e.signIn,keysAt:e.keysAt,keyLooks:e.keyLooks}),y=[{id:"voice",title:"voice",hint:"calls run on this key",section:"keys",require:"any",note:"required for calls",entries:r.TEXT_MODEL_PROVIDER_LIST.filter(h).map(p)},{id:"easy",title:"the easy ways",hint:"one sign-in or one key opens every bot",section:"keys",require:"none",entries:r.TEXT_MODEL_PROVIDER_LIST.filter(f).map(e=>({...p(e),..."vercel-ai-gateway"===e.id&&{recommended:!0}}))},{id:"text",title:"or a provider's own key",hint:"what bots think with — add any, or none",section:"keys",require:"none",entries:r.TEXT_MODEL_PROVIDER_LIST.filter(e=>!h(e)&&!f(e)).map(p)},{id:"search",title:"search",hint:"how calls and bots look things up — one key, or their own model's",section:"keys",require:"none",entries:[{key:s,label:"Exa",hint:"web search in one call — dashboard.exa.ai",site:"exa.ai",keysAt:"https://dashboard.exa.ai/api-keys"}]},{id:"phone",title:"phone",hint:"tokens",section:"keys",require:"none",entries:[{key:n.TELEGRAM_TOKEN_KEY,label:"Telegram",site:"telegram.org",hint:"a bot token from @BotFather — then write to your bot, and allow it here"},{key:n.DISCORD_TOKEN_KEY,label:"Discord",site:"discord.com",hint:"a bot token from discord.com/developers — add the bot to a server of yours, then write to it directly"},{key:n.SLACK_APP_TOKEN_KEY,label:"Slack · app token",site:"slack.com",hint:"starts with xapp- — opens the connection. Slack takes this and the bot token"},{key:n.SLACK_BOT_TOKEN_KEY,label:"Slack · bot token",site:"slack.com",hint:"starts with xoxb- — speaks as the app"}]},{id:"bots",title:"Bots",hint:"what a bot runs on when it has not picked its own — start small: a small model is quick and costs little",section:"models",require:"none",entries:[d,u]},{id:"studio",title:"Studio",hint:"what a bot draws, films and speaks with — off until you pick one",section:"models",require:"none",entries:Object.keys(a).map(e=>({key:a[e],...i[e],kind:e,choices:r.MEDIA_MODEL_PROVIDER_LIST.flatMap(t=>t.models[e].map(e=>({value:`${t.id}/${e.id}`,label:`${t.label} \xb7 ${e.label}`,needs:t.apiKeyName})))}))}];Object.fromEntries(y.flatMap(e=>e.entries).map(e=>[e.key,e]));let m=y.flatMap(e=>e.entries.map(e=>e.key)),b=Object.fromEntries(y.flatMap(e=>e.entries).filter(e=>e.choices?.length).map(e=>[e.key,e.choices]));e.s(["CONFIG_CHOICES",0,b,"CONFIG_KEYS",0,m,"DEFAULT_EFFORT_KEY",0,c,"DEFAULT_MODEL_KEY",0,l,"EXA_API_KEY",0,s,"MEDIA_MODEL_KEYS",0,a])},340698,e=>e.a(async(t,r)=>{try{var n=e.i(875225),o=e.i(380690),a=e.i(528790),i=e.i(613240),s=e.i(279041),l=t([a]);async function c(e){let t=process.env[e]?.trim();if(t)return t;let[r]=await a.database.select({value:i.configTable.value}).from(i.configTable).where((0,n.eq)(i.configTable.key,e));return r?.value.trim()||void 0}async function d(e,t){await a.database.insert(i.configTable).values({key:e,value:t}).onConflictDoUpdate({target:i.configTable.key,set:{value:t}}),s.CONFIG_KEYS.includes(e)&&o.appEvents.emit({type:"config"})}[a]=l.then?(await l)():l,e.s(["readConfig",0,c,"writeConfig",0,d]),r()}catch(e){r(e)}},!1),834332,e=>{"use strict";let t="TELEGRAM_BOT_TOKEN",r="DISCORD_BOT_TOKEN",n="SLACK_APP_TOKEN",o="SLACK_BOT_TOKEN";e.s(["DISCORD_TOKEN_KEY",0,r,"REACH_CHANNELS",0,["telegram","discord","slack"],"REACH_KEYS",0,{telegram:[t],discord:[r],slack:[n,o]},"SLACK_APP_TOKEN_KEY",0,n,"SLACK_BOT_TOKEN_KEY",0,o,"TELEGRAM_TOKEN_KEY",0,t,"reachPersonKey",0,e=>`REACH_PERSON_${e.toUpperCase()}`])},904309,e=>{"use strict";var t=e.i(469719);let r=t.z.object({start:t.z.number().nonnegative(),end:t.z.number().nonnegative(),text:t.z.string()});t.z.object({reason:t.z.string().max(128),seconds:t.z.number().nonnegative().nullable()}),e.s(["LIVE_BACKEND_MODEL",0,"gpt-6-luna","LiveFragmentSchema",0,r])},78997,(e,t,r)=>{"use strict";var n=Object.create,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,s=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,c=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of i(t))l.call(e,s)||s===r||o(e,s,{get:()=>t[s],enumerable:!(n=a(t,s))||n.enumerable});return e},d=(e,t,r)=>(r=null!=e?n(s(e)):{},c(!t&&e&&e.__esModule?r:o(r,"default",{value:e,enumerable:!0}),e)),u={},h={isValidAccessToken:()=>w,readAuthConfig:()=>k,writeAuthConfig:()=>g};for(var f in h)o(u,f,{get:h[f],enumerable:!0});t.exports=c(o({},"__esModule",{value:!0}),u);var p=d(e.r(522734)),y=d(e.r(814747)),m=e.r(783697);function b(){let e=(0,m.getVercelDataDir)();if(!e)throw Error(`Unable to find Vercel CLI data directory. Your platform: ${process.platform}. Supported: darwin, linux, win32.`);return y.join(e,"auth.json")}function k(){try{let e=b();if(!p.existsSync(e))return null;let t=p.readFileSync(e,"utf8");if(!t)return null;return JSON.parse(t)}catch(e){return null}}function g(e){let t=b(),r=y.dirname(t);p.existsSync(r)||p.mkdirSync(r,{mode:504,recursive:!0}),p.writeFileSync(t,JSON.stringify(e,null,2),{mode:384})}function w(e,t=0){if(!e.token)return!1;if("number"!=typeof e.expiresAt)return!0;let r=Math.floor(Date.now()/1e3);return e.expiresAt>=r+t/1e3}},452005,(e,t,r)=>{"use strict";var n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,s={},l={AccessTokenMissingError:()=>d,RefreshAccessTokenFailedError:()=>u};for(var c in l)n(s,c,{get:l[c],enumerable:!0});t.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of a(t))i.call(e,s)||void 0===s||n(e,s,{get:()=>t[s],enumerable:!(r=o(t,s))||r.enumerable});return e})(n({},"__esModule",{value:!0}),s);class d extends Error{constructor(){super("No authentication found. Please log in with the Vercel CLI (vercel login)."),this.name="AccessTokenMissingError"}}class u extends Error{constructor(e){super("Failed to refresh authentication token.",{cause:e}),this.name="RefreshAccessTokenFailedError"}}},394853,(e,t,r)=>{"use strict";var n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,s={},l={processTokenResponse:()=>y,refreshTokenRequest:()=>p};for(var c in l)n(s,c,{get:l[c],enumerable:!0});t.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of a(t))i.call(e,s)||void 0===s||n(e,s,{get:()=>t[s],enumerable:!(r=o(t,s))||r.enumerable});return e})(n({},"__esModule",{value:!0}),s);var d=e.r(446786);let u=`@vercel/oidc node-${process.version} ${(0,d.platform)()} (${(0,d.arch)()}) ${(0,d.hostname)()}`,h=null;async function f(){if(h)return h;let e=await fetch("https://vercel.com/.well-known/openid-configuration",{headers:{"user-agent":u}});if(!e.ok)throw Error("Failed to discover OAuth endpoints");let t=await e.json();if(!t||"string"!=typeof t.token_endpoint)throw Error("Invalid OAuth discovery response");let r=t.token_endpoint;return h=r,r}async function p(e){let t=await f();return await fetch(t,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded","user-agent":u},body:new URLSearchParams({client_id:"cl_HYyOPBNtFMfHhaUn9L4QPfTZz6TP47bp",grant_type:"refresh_token",...e})})}async function y(e){let t=await e.json();return e.ok?"object"!=typeof t||null===t?[Error("Invalid token response")]:"string"!=typeof t.access_token?[Error("Missing access_token in response")]:"Bearer"!==t.token_type?[Error("Invalid token_type in response")]:"number"!=typeof t.expires_in?[Error("Missing expires_in in response")]:[null,t]:[Error("object"==typeof t&&t&&"error"in t?String(t.error):"Token refresh failed")]}},484199,(e,t,r)=>{"use strict";var n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,s={},l={VercelOidcTokenError:()=>d};for(var c in l)n(s,c,{get:l[c],enumerable:!0});t.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of a(t))i.call(e,s)||void 0===s||n(e,s,{get:()=>t[s],enumerable:!(r=o(t,s))||r.enumerable});return e})(n({},"__esModule",{value:!0}),s);class d extends Error{constructor(e,t){super(e),this.name="VercelOidcTokenError",this.cause=t}toString(){return this.cause?`${this.name}: ${this.message}: ${this.cause}`:`${this.name}: ${this.message}`}}},1791,(e,t,r)=>{"use strict";var n=Object.create,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,s=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,c=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of i(t))l.call(e,s)||s===r||o(e,s,{get:()=>t[s],enumerable:!(n=a(t,s))||n.enumerable});return e},d=(e,t,r)=>(r=null!=e?n(s(e)):{},c(!t&&e&&e.__esModule?r:o(r,"default",{value:e,enumerable:!0}),e)),u={},h={findRootDir:()=>k,getUserDataDir:()=>g};for(var f in h)o(u,f,{get:h[f],enumerable:!0});t.exports=c(o({},"__esModule",{value:!0}),u);var p=d(e.r(814747)),y=d(e.r(522734)),m=d(e.r(446786)),b=e.r(484199);function k(){try{let e=process.cwd();for(;e!==p.default.dirname(e);){let t=p.default.join(e,".vercel");if(y.default.existsSync(t))return e;e=p.default.dirname(e)}}catch(e){throw new b.VercelOidcTokenError("Token refresh only supported in node server environments")}return null}function g(){if(process.env.XDG_DATA_HOME)return process.env.XDG_DATA_HOME;switch(m.default.platform()){case"darwin":return p.default.join(m.default.homedir(),"Library/Application Support");case"linux":return p.default.join(m.default.homedir(),".local/share");case"win32":if(process.env.LOCALAPPDATA)return process.env.LOCALAPPDATA;return null;default:return null}}},783697,(e,t,r)=>{"use strict";var n=Object.create,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,s=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,c=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of i(t))l.call(e,s)||s===r||o(e,s,{get:()=>t[s],enumerable:!(n=a(t,s))||n.enumerable});return e},d=(e,t,r)=>(r=null!=e?n(s(e)):{},c(!t&&e&&e.__esModule?r:o(r,"default",{value:e,enumerable:!0}),e)),u={},h={assertVercelOidcTokenResponse:()=>v,findProjectInfo:()=>T,getTokenPayload:()=>j,getVercelDataDir:()=>E,getVercelOidcToken:()=>_,getVercelToken:()=>O,isExpired:()=>P,loadToken:()=>D,saveToken:()=>A};for(var f in h)o(u,f,{get:h[f],enumerable:!0});t.exports=c(o({},"__esModule",{value:!0}),u);var p=d(e.r(814747)),y=d(e.r(522734)),m=e.r(484199),b=e.r(1791),k=e.r(78997),g=e.r(394853),w=e.r(452005);function E(){let e=(0,b.getUserDataDir)();return e?p.join(e,"com.vercel.cli"):null}async function O(e){let t=(0,k.readAuthConfig)();if(!t?.token)throw new w.AccessTokenMissingError;if((0,k.isValidAccessToken)(t,e?.expirationBufferMs))return t.token;if(!t.refreshToken)throw(0,k.writeAuthConfig)({}),new w.RefreshAccessTokenFailedError("No refresh token available");try{let e=await (0,g.refreshTokenRequest)({refresh_token:t.refreshToken}),[r,n]=await (0,g.processTokenResponse)(e);if(r||!n)throw(0,k.writeAuthConfig)({}),new w.RefreshAccessTokenFailedError(r);let o={token:n.access_token,expiresAt:Math.floor(Date.now()/1e3)+n.expires_in};return n.refresh_token&&(o.refreshToken=n.refresh_token),(0,k.writeAuthConfig)(o),o.token}catch(e){if((0,k.writeAuthConfig)({}),e instanceof w.AccessTokenMissingError||e instanceof w.RefreshAccessTokenFailedError)throw e;throw new w.RefreshAccessTokenFailedError(e)}}async function _(e,t,r){let n=`https://api.vercel.com/v1/projects/${t}/token?source=vercel-oidc-refresh${r?`&teamId=${r}`:""}`,o=await fetch(n,{method:"POST",headers:{Authorization:`Bearer ${e}`}});if(!o.ok)throw new m.VercelOidcTokenError(`Failed to refresh OIDC token: ${o.statusText}`);let a=await o.json();return v(a),a}function v(e){if(!e||"object"!=typeof e)throw TypeError("Vercel OIDC token is malformed. Expected an object. Please run `vc env pull` and try again");if(!("token"in e)||"string"!=typeof e.token)throw TypeError("Vercel OIDC token is malformed. Expected a string-valued token property. Please run `vc env pull` and try again")}function T(){let e=(0,b.findRootDir)();if(!e)throw new m.VercelOidcTokenError("Unable to find project root directory. Have you linked your project with `vc link?`");let t=p.join(e,".vercel","project.json");if(!y.existsSync(t))throw new m.VercelOidcTokenError("project.json not found, have you linked your project with `vc link?`");let r=JSON.parse(y.readFileSync(t,"utf8"));if("string"!=typeof r.projectId&&"string"!=typeof r.orgId)throw TypeError("Expected a string-valued projectId property. Try running `vc link` to re-link your project.");return{projectId:r.projectId,teamId:r.orgId}}function A(e,t){let r=(0,b.getUserDataDir)();if(!r)throw new m.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let n=p.join(r,"com.vercel.token",`${t}.json`),o=JSON.stringify(e);y.mkdirSync(p.dirname(n),{mode:504,recursive:!0}),y.writeFileSync(n,o),y.chmodSync(n,432)}function D(e){let t=(0,b.getUserDataDir)();if(!t)throw new m.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let r=p.join(t,"com.vercel.token",`${e}.json`);if(!y.existsSync(r))return null;let n=JSON.parse(y.readFileSync(r,"utf8"));return v(n),n}function j(e){let t=e.split(".");if(3!==t.length)throw new m.VercelOidcTokenError("Invalid token. Please run `vc env pull` and try again");let r=t[1].replace(/-/g,"+").replace(/_/g,"/"),n=r.padEnd(r.length+(4-r.length%4)%4,"=");return JSON.parse(Buffer.from(n,"base64").toString("utf8"))}function P(e,t=0){return 1e3*e.exp<Date.now()+t}}];
|
|
4
|
+
|
|
5
|
+
//# sourceMappingURL=_0c49lmw._.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[739960,e=>{"use strict";var t=e.i(687388);let a=/^(?=.{1,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$/,r="Mozilla/5.0 (compatible; thursday-agent favicon)",n=new Map;async function i(e){let r=e.trim().toLowerCase().replace(/\.$/,"");if(!a.test(r)||r.endsWith(".local"))return null;if(n.has(r))return n.get(r)??null;let i=await o(r).catch(()=>null);if(n.size>=t.FAVICON.kept){let e=n.keys().next().value;void 0!==e&&n.delete(e)}return n.set(r,i),i}async function o(e){let t=await l(`https://${e}/favicon.ico`);if(t)return t;let a=await u(e).catch(()=>null);return a?l(a):null}async function s(e,t,r=3){let n=e;for(let e=0;e<=r;e++){let e=await fetch(n,{...t,redirect:"manual"});if(e.status<300||e.status>399)return e;let r=e.headers.get("location");if(!r)break;let i=new URL(r,n),o=i.hostname.toLowerCase();if("https:"!==i.protocol||!a.test(o)||o.endsWith(".local"))break;n=i.href}return null}async function l(e){let a=await s(e,{signal:AbortSignal.timeout(t.FAVICON.timeoutMs),headers:{accept:"image/*","user-agent":r}}).catch(()=>null);if(!a?.ok)return null;let n=a.headers.get("content-type")??"";if(!n.startsWith("image/"))return null;let i=await a.arrayBuffer();return!i.byteLength||i.byteLength>t.FAVICON.maxBytes?null:{body:i,type:n}}async function u(e){let n=await s(`https://${e}/`,{signal:AbortSignal.timeout(t.FAVICON.timeoutMs),headers:{accept:"text/html","user-agent":r}});if(!n?.ok||!n.body)return null;let i=n.body.getReader(),o=new TextDecoder,l="";for(;l.length<t.FAVICON.pageBytes;){let{done:e,value:t}=await i.read();if(e)break;l+=o.decode(t,{stream:!0})}for(let[t]of(i.cancel().catch(()=>{}),l.matchAll(/<link\b[^>]*>/gi))){if(!/\brel=["']?[^"'>]*\bicon\b/i.test(t))continue;let r=/\bhref=["']?([^"'\s>]+)/i.exec(t)?.[1];if(r)try{let t=new URL(r,n.url||`https://${e}/`);if("https:"===t.protocol&&a.test(t.hostname))return t.href}catch{}}return null}let c=(0,e.i(91264).serverRoute)(async(e,{params:t})=>{let a=await i((await t).host);return a?new Response(a.body,{headers:{"content-type":a.type,"cache-control":"max-age=604800"}}):new Response(null,{status:404,headers:{"cache-control":"max-age=86400"}})});e.s(["GET",0,c],739960)},806535,e=>{"use strict";var t=e.i(747909),a=e.i(174017),r=e.i(996250),n=e.i(759756),i=e.i(561916),o=e.i(174677),s=e.i(869741),l=e.i(316795),u=e.i(487718),c=e.i(995169),d=e.i(47587),p=e.i(666012),h=e.i(570101),f=e.i(626937),R=e.i(10372),g=e.i(193695);e.i(52474);var v=e.i(600220);let m=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/favicon/[host]/route",pathname:"/api/favicon/[host]",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/favicon/[host]/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(739960),...{}}),{workAsyncStorage:w,workUnitAsyncStorage:y,serverHooks:C}=m;async function E(e,t,r){r.requestMeta&&(0,n.setRequestMeta)(e,r.requestMeta),m.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let w="/api/favicon/[host]/route";w=w.replace(/\/index$/,"")||"/";let y=await m.prepare(e,t,{srcPage:w,multiZoneDraftMode:!1});if(!y)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:C,deploymentId:E,params:x,nextConfig:b,parsedUrl:A,isDraftMode:T,prerenderManifest:N,routerServerContext:S,isOnDemandRevalidate:O,revalidateOnlyGenerated:P,resolvedPathname:I,clientReferenceManifest:_,serverActionsManifest:k}=y,M=(0,s.normalizeAppPath)(w),q=!!(N.dynamicRoutes[M]||N.routes[I]),H=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,A,!1):t.end("This page could not be found"),null);if(q&&!T){let e=!!N.routes[I],t=N.dynamicRoutes[M];if(t&&!1===t.fallback&&!e){if(b.adapterPath)return await H();throw new g.NoFallbackError}}let U=null;!q||m.isDev||T||(U="/index"===(U=I)?"/":U);let D=!0===m.isDev||!q,F=q&&!D;k&&_&&(0,o.setManifestsSingleton)({page:w,clientReferenceManifest:_,serverActionsManifest:k});let L=e.method||"GET",$=(0,i.getTracer)(),B=$.getActiveScopeSpan(),K=!!(null==S?void 0:S.isWrappedByNextServer),V=!!(0,n.getRequestMeta)(e,"minimalMode"),j=(0,n.getRequestMeta)(e,"incrementalCache")||await m.getIncrementalCache(e,b,N,V);null==j||j.resetRequestCache(),globalThis.__incrementalCache=j;let z={params:x,previewProps:N.preview,renderOpts:{experimental:{authInterrupts:!!b.experimental.authInterrupts,useCacheTimeout:b.experimental.useCacheTimeout},cacheComponents:!!b.cacheComponents,validationLevel:b.experimental.instantInsights.validationLevel,supportsDynamicResponse:D,incrementalCache:j,hmrRefreshHash:(0,n.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:b.cacheLife,staticPageGenerationTimeout:b.staticPageGenerationTimeout,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,r,n)=>m.onRequestError(e,t,r,n,S)},sharedContext:{buildId:C,deploymentId:E}},G=new l.NodeNextRequest(e),W=new l.NodeNextResponse(t),X=u.NextRequestAdapter.fromNodeNextRequest(G,(0,u.signalFromNodeResponse)(t)),Z=async({previousCacheEntry:a})=>{try{if(!V&&O&&P&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await m.handle(X,z);e.fetchMetrics=z.renderOpts.fetchMetrics;let i=z.renderOpts.pendingWaitUntil;i&&r.waitUntil&&(r.waitUntil(i),i=void 0);let o=z.renderOpts.collectedTags;if(!q)return await (0,p.sendResponse)(G,W,n,i),null;{let e=await n.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(n.headers);o&&(t[R.NEXT_CACHE_TAGS_HEADER]=o),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==z.renderOpts.collectedRevalidate&&!(z.renderOpts.collectedRevalidate>=R.INFINITE_CACHE)&&z.renderOpts.collectedRevalidate,r=void 0===z.renderOpts.collectedExpire||z.renderOpts.collectedExpire>=R.INFINITE_CACHE?!1!==a&&a>0?b.expireTime:void 0:z.renderOpts.collectedExpire;return{value:{kind:v.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:r}}}}catch(t){throw(null==a?void 0:a.isStale)&&await m.onRequestError(e,t,{routerKind:"App Router",routePath:w,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:F,isOnDemandRevalidate:O})},!1,S),t}},J=async(n,o)=>{try{var s,l;let n=await m.handleResponse({req:e,nextConfig:b,cacheKey:U,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:N,isRoutePPREnabled:!1,isOnDemandRevalidate:O,revalidateOnlyGenerated:P,responseGenerator:Z,waitUntil:r.waitUntil,isMinimalMode:V});if(!q)return;if((null==n||null==(s=n.value)?void 0:s.kind)!==v.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==n||null==(l=n.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});V||t.setHeader("x-nextjs-cache",O?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),T&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let i=(0,h.fromNodeOutgoingHttpHeaders)(n.value.headers);V&&q||i.delete(R.NEXT_CACHE_TAGS_HEADER),!n.cacheControl||t.getHeader("Cache-Control")||i.get("Cache-Control")||i.set("Cache-Control",(0,f.getCacheControlHeader)(n.cacheControl)),await (0,p.sendResponse)(G,W,new Response(n.value.body,{headers:i,status:n.value.status||200}));return}catch(t){if(t instanceof g.NoFallbackError||await m.onRequestError(e,t,{routerKind:"App Router",routePath:M,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:F,isOnDemandRevalidate:O})},!1,S),q)throw t;await (0,p.sendResponse)(G,W,new Response(null,{status:500}));return}finally{(()=>{if(!n)return;let e=t.statusCode;n.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(n.setStatus({code:i.SpanStatusCode.ERROR}),n.setAttribute("error.type",e.toString()));let a=$.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==c.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=a.get("next.route")||M,s=`${L} ${r}`;n.setAttributes({"next.route":r,"http.route":r,"next.span_name":s}),n.updateName(s),o&&o!==n&&(o.setAttribute("http.route",r),o.updateName(s))})()}};if(K&&B)await J(B,void 0);else{let t=$.getActiveScopeSpan();await $.withPropagatedContext(e.headers,()=>$.trace(c.BaseServerSpan.handleRequest,{spanName:`${L} ${w}`,kind:i.SpanKind.SERVER,attributes:{"http.method":L,"http.target":e.url}},e=>J(e,t)),void 0,!K)}}e.s(["handler",0,E,"patchFetch",0,function(){return(0,r.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:y})},"routeModule",0,m,"serverHooks",0,C,"workAsyncStorage",0,w,"workUnitAsyncStorage",0,y])}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=_0ey0s6v._.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
module.exports=[139886,e=>{"use strict";let t=e=>e.split("/").map(encodeURIComponent).join("/");e.s(["queryKey",0,{memory:"/api/memory",memoryPage:e=>({url:"/api/memory",query:{offset:e||null}}),mcp:"/api/mcp",mcpServer:e=>({url:"/api/mcp",pathVariable:[e]}),mcpTools:"/api/mcp/tools",skills:"/api/skills",skillNode:(e,t,r)=>({url:"/api/skills",pathVariable:[e,t],query:{path:r}}),bot:"/api/bot",botMemory:"/api/bot/memory",botMemoryFiles:e=>({url:"/api/bot/memory/files",query:{bot:e}}),routines:"/api/routine",threads:"/api/bot/thread",threadHistory:e=>({url:"/api/bot/thread",query:{history:1,before:e}}),thread:e=>({url:"/api/bot/thread",query:{id:e}}),toolResult:(e,t)=>({url:"/api/bot/thread",pathVariable:[e],query:{call:t}}),workspace:"/api/workspace",workspaceFolder:(e,t)=>({url:"/api/workspace",query:{path:e||null,rows:t}}),workspaceFiles:e=>({url:"/api/workspace/files",query:{paths:JSON.stringify(e)}}),artifacts:"/api/artifact",artifactShelf:e=>({url:"/api/artifact",query:{rows:e}}),artifactSet:(e,t)=>({url:"/api/artifact",query:{set:e,rows:t}}),file:e=>`/api/file/${t(e)}`,fileFace:e=>`/api/file/${t(e)}?face`,favicon:e=>`/api/favicon/${encodeURIComponent(e)}`,fileView:e=>`/artifact/${t(e)}`,events:"/api/events",config:"/api/config",callHistory:e=>({url:"/api/thursday/call",query:{before:e}}),thursdaySettings:"/api/thursday/settings",toolCall:"/api/thursday/tool-call",callEnd:"/api/thursday/call/end",signIns:"/api/signins",reach:"/api/reach",textCall:"/api/thursday/text",memoryEdit:"/api/memory/edit",llmModel:"/api/llm-model",automaticModel:"/api/llm-model/automatic",modelCatalog:"/api/llm-model/catalog",gatewayCredits:"/api/llm-model/credits",subscriptionUsage:"/api/llm-model/subscription"}])},973589,e=>{"use strict";var t=e.i(902157),r=e.i(912714),n=e.i(750227),a=e.i(333925);let i=(0,n.join)(a.APP_DIR,"guide"),o=".guide";async function l(){if(!(0,t.existsSync)(i))return;let e=(0,n.join)(a.DATA_DIR,a.PATHS.workspace,o);await (0,r.rm)(e,{recursive:!0,force:!0}),await (0,r.cp)(i,e,{recursive:!0})}e.s(["botGuideLine",0,()=>`How ${a.APP_NAME} itself works for the user — its screens and settings — is written under \`${o}/\` here, \`index.md\` first; read it only when the job is about the app.`,"guideLine",0,()=>`How ${a.APP_NAME} works for the person using it — its screens, its settings, what it connects to, what to do when something stops — is written under \`${o}/\` here, \`index.md\` first. Read it whenever an answer depends on how the app works: what can be asked for, where something is changed, a wish that needs a setting switched on, something that stopped or was refused. Answer from it rather than from what you assume.`,"installGuide",0,l])},379651,377205,e=>{"use strict";var t=e.i(912714),r=e.i(750227),n=e.i(232347),a=e.i(333925),i=e.i(871096),o=e.i(938281);let l=e=>e.trim().toLowerCase().replace(/^[a-z]+:\/\//,"").replace(/^www\./,"").replace(/[/?#].*$/,"");e.s(["siteOf",0,l],377205);let s=(0,r.join)(a.DATA_DIR,a.PATHS.signIns),c=e=>(0,r.join)(s,`${encodeURIComponent(l(e))}.json`);async function u(e){try{return JSON.parse(await (0,t.readFile)(c(e),"utf8"))}catch{return null}}async function d(e){let t=l(e),r=await u(t);if(r)return r;let n=(await p()).map(e=>e.site).filter(e=>t.endsWith(`.${e}`)).sort((e,t)=>t.length-e.length)[0];return n?u(n):null}async function f(e){await (0,t.mkdir)(s,{recursive:!0}),await (0,t.writeFile)(c(e.site),JSON.stringify(e),{mode:384}),n.appEvents.emit({type:"signins"})}async function p(){let e=await (0,t.readdir)(s).catch(()=>[]);return(await Promise.all(e.filter(e=>e.endsWith(".json")).map(e=>u(decodeURIComponent(e.slice(0,-5)))))).flatMap(e=>e?[(({state:e,...t})=>t)(e)]:[]).sort((e,t)=>e.site.localeCompare(t.site))}async function m(e){let t=await d(e.site);if(t&&!t.bots.includes(e.bot)){let r=t.asking.includes(e.bot)?t:{...t,asking:[...t.asking,e.bot]};return r!==t&&await f(r),{kind:"taken",signIn:(({state:e,...t})=>t)(r)}}let r=t?.site??l(e.site),n={site:r,account:e.account.trim()||r,bots:[...new Set([...t?.bots??[],e.bot])],asking:(t?.asking??[]).filter(t=>t!==e.bot),keptAt:new Date().toISOString(),usedAt:t?.usedAt??null,state:e.state};return await f(n),{kind:"kept",signIn:(({state:e,...t})=>t)(n)}}let g=globalThis.__signInsHeld??=new Map;async function h(e,t){let r=await d(e);if(!r)return{kind:"none",kept:(await p()).map(e=>e.site)};if(!r.bots.includes(t))return r.asking.includes(t)||await f({...r,asking:[...r.asking,t]}),{kind:"ask",signIn:(({state:e,...t})=>t)(r)};let n={...r,usedAt:new Date().toISOString()};return await f(n),{kind:"state",signIn:(({state:e,...t})=>t)(n),state:r.state}}async function w(e,t){return(await (0,i.listBrowsers)(e,t)).find(e=>e.name===t.PLAYWRIGHT_CLI_SESSION)??null}async function y(e,t){let r=await w(e,t);return r?r.attached?"theirs":"own":null}async function b(e,t){let r=await w(e,t);return!!r&&!r.attached&&!0===r.headed}let k=e=>`${e.name}
|
|
2
|
+
${e.domain}
|
|
3
|
+
${e.path}`;async function v(e){let t,r=(0,i.jobShellEnv)(e),n=r.PLAYWRIGHT_CLI_SESSION??e,o=g.get(n);if(!o?.sites.size)return;let l=await (0,i.openWorkspace)();if(await y(l,r)!=="own")return void g.delete(n);let s=(0,i.browserStateFile)();try{let e=await l.exec((0,i.saveBrowserState)(s),{env:r,timeoutMs:a.BROWSER_CLI.loadMs});if(0!==e.exitCode)return;let n=JSON.parse(await l.readFile(s,"utf-8"));t=new Map((n.cookies??[]).map(e=>[k(e),e]))}finally{await l.exec(`rm -f ${s}`)}for(let e of o.sites){let r=await u(e),n=r?.state;if(!r||!n?.cookies||!r.bots.includes(o.bot))continue;let a=!1,i=n.cookies.map(e=>{let r=t.get(k(e));return r&&JSON.stringify(r)!==JSON.stringify(e)?(a=!0,r):e});a&&await f({...r,state:{...n,cookies:i}})}}async function T(){let e=(0,r.join)(i.WORKSPACE,a.PATHS.bots);for(let n of(await (0,t.readdir)(e).catch(()=>[]))){let a=(0,r.join)(e,n,".auth");for(let e of(await (0,t.readdir)(a).catch(()=>[]))){if(!e.endsWith(".json"))continue;let i=(0,r.join)(a,e);try{let l=JSON.parse(await (0,t.readFile)(i,"utf8")),s=e.slice(0,-5),c=(await (0,t.readFile)((0,r.join)(a,"account.txt"),"utf8").catch(()=>"")).trim(),u=await m({site:s,account:c,bot:n,state:l});await (0,t.rm)(i),o.logger.info("kept"===u.kind?`sign-ins: took in ${n}'s ${s}`:`sign-ins: ${s} is kept for another bot already; ${n}'s old copy was removed and ${n} is asking for it`)}catch(e){o.logger.warn(`sign-ins: could not take in ${i}`,e)}}}}e.s(["adoptKeptSessions",0,T,"borrowSignIn",0,h,"holdSignIn",0,function(e,t,r){let n=g.get(e);n&&n.bot===t?n.sites.add(r):g.set(e,{bot:t,sites:new Set([r])})},"keepSignIn",0,m,"renewSignIns",0,v,"sessionBrowser",0,y,"sessionWindow",0,b],379651)},520401,e=>e.a(async(t,r)=>{try{var n=e.i(336763),a=e.i(396918),i=e.i(533102);e.i(333925);var o=e.i(876393),l=e.i(220376),s=e.i(247839),c=e.i(5509),u=e.i(724185),d=e.i(933395),f=t([o,c,u]);async function p(){let e=function(e){if(!e)return null;try{let t=JSON.parse(e);return t&&"object"==typeof t&&!Array.isArray(t)?t:null}catch{return null}}(await (0,u.readConfig)(d.THURSDAY_KEYS.settings)),t=s.LiveSettingsSchema.parse((0,s.migrateLiveSettings)(e));return e?t:{...t,readSkills:await m()}}async function m(){return(await (0,u.readConfig)(d.THURSDAY_KEYS.wasSkills))?.trim()==="on"}async function g(e){let[t]=await o.database.insert(l.callTable).values({id:crypto.randomUUID(),...e}).returning({id:l.callTable.id});return t.id}async function h(e,t){return(await o.database.update(l.callTable).set({endedAt:new Date,...t?{endedReason:t.reason,seconds:t.seconds??null}:{}}).where((0,n.and)((0,n.eq)(l.callTable.id,e),(0,n.isNull)(l.callTable.endedAt))).returning({id:l.callTable.id})).length>0}async function w(e,t){for(let r of t)await o.database.insert(l.callMessageTable).values({callId:e,...r,fragments:r.fragments??null}).onConflictDoUpdate({target:[l.callMessageTable.callId,l.callMessageTable.id],set:{text:r.text,role:r.role,tool:r.tool??null,fragments:r.fragments??null}})}async function y(e){let[t]=await o.database.select({seq:i.sql`max(${l.callMessageTable.seq})`}).from(l.callMessageTable).where((0,n.eq)(l.callMessageTable.callId,e));return t?.seq==null?0:Number(t.seq)+1}async function b(e,t){await o.database.insert(l.callThoughtTable).values({callId:e,...t}).onConflictDoNothing()}async function k(e,t){let r=await o.database.select({callId:l.callMessageTable.callId,startedAt:l.callTable.startedAt,role:l.callMessageTable.role,tool:l.callMessageTable.tool,text:l.callMessageTable.text,seq:l.callMessageTable.seq}).from(l.callMessageTable).innerJoin(l.callTable,(0,n.eq)(l.callMessageTable.callId,l.callTable.id)).where(t?(0,n.ne)(l.callMessageTable.callId,t):void 0).orderBy((0,a.desc)(l.callTable.startedAt),(0,a.desc)(l.callMessageTable.seq)).limit(e),i=new Map;for(let e of r){let t=i.get(e.callId)??{callId:e.callId,startedAt:e.startedAt,turns:[]};t.turns.push({role:e.role,tool:e.tool,text:e.text,seq:e.seq}),i.set(e.callId,t)}return[...i.values()].reverse().map(e=>({...e,turns:e.turns.reverse()}))}async function v(){return(await o.database.select({id:l.callTable.id}).from(l.callTable).where((0,n.isNull)(l.callTable.endedAt)).limit(1)).length>0}async function T(e){return(await o.database.select({id:l.callTable.id}).from(l.callTable).where((0,n.and)((0,n.eq)(l.callTable.id,e),(0,n.isNull)(l.callTable.endedAt))).limit(1)).length>0}async function O(e=[]){await o.database.update(l.callTable).set({endedAt:new Date}).where((0,n.and)((0,n.isNull)(l.callTable.endedAt),e.length?(0,n.notInArray)(l.callTable.id,e):void 0))}async function j(e){let t=(0,n.isNotNull)(l.callTable.endedAt);return(await o.database.delete(l.callTable).where(e?(0,n.and)(t,(0,n.lt)(l.callTable.endedAt,e)):t).returning({id:l.callTable.id})).length}[o,c,u]=f.then?(await f)():f,e.s(["deleteEndedCalls",0,j,"endCall",0,h,"insertCall",0,g,"isAnyCallLive",0,v,"isCallOpen",0,T,"listRecentTurns",0,k,"nextTurnSeq",0,y,"readLiveSettings",0,p,"saveThought",0,b,"saveTurns",0,w,"sweepCalls",0,O]),r()}catch(e){r(e)}},!1),933395,e=>{"use strict";var t=e.i(517435),r=e.i(864328),n=e.i(556325);let a=[{id:"chatgpt",...r.TEXT_MODEL_PROVIDERS.chatgpt},{id:"openai",...r.TEXT_MODEL_PROVIDERS.openai}];t.default.object({id:t.default.string().min(1),text:t.default.string(),said:t.default.boolean()});t.default.object({enabled:t.default.boolean(),phrase:t.default.string().trim().min(3).max(32)}),t.default.object({enabled:t.default.boolean(),combo:t.default.string().trim().min(1).max(64)}),t.default.enum(["off","waiting","any"]),t.default.enum(["center","sides"]),t.default.object({id:t.default.string().min(1),role:t.default.enum(["user","assistant","tool"]),tool:t.default.string().nullish(),text:t.default.string(),seq:t.default.number().int().min(0),fragments:t.default.array(n.LiveFragmentSchema).nullish()}),t.default.object({id:t.default.string().min(1),text:t.default.string(),seq:t.default.number().int().min(0)}),e.s(["TEXT_CALL_PROVIDERS",0,a,"THURSDAY_KEYS",0,{settings:"THURSDAY_SETTINGS",wasSkills:"THURSDAY_SKILLS"},"textCallRunsOn",0,e=>a.find(t=>e(t.apiKeyName))?.id??null])},375814,e=>{"use strict";var t=e.i(139886),r=e.i(333925);let n=e=>`text/${e}; charset=utf-8`,a={md:{kind:"markdown",mime:n("markdown")},markdown:{kind:"markdown",mime:n("markdown")},csv:{kind:"csv",mime:n("csv")},json:{kind:"json",mime:"application/json; charset=utf-8"},txt:{kind:"text",mime:n("plain")},log:{kind:"text",mime:n("plain")},html:{kind:"frame",mime:n("html")},htm:{kind:"frame",mime:n("html")},pdf:{kind:"frame",mime:"application/pdf"},png:{kind:"image",mime:"image/png"},jpg:{kind:"image",mime:"image/jpeg"},jpeg:{kind:"image",mime:"image/jpeg"},gif:{kind:"image",mime:"image/gif"},webp:{kind:"image",mime:"image/webp"},svg:{kind:"image",mime:"image/svg+xml"},mp3:{kind:"audio",mime:"audio/mpeg"},wav:{kind:"audio",mime:"audio/wav"},mp4:{kind:"video",mime:"video/mp4"},webm:{kind:"video",mime:"video/webm"},docx:{kind:"none",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},xlsx:{kind:"none",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},pptx:{kind:"none",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"},css:{kind:"none",mime:n("css")},js:{kind:"none",mime:n("javascript")},woff2:{kind:"none",mime:"font/woff2"}},i=e=>e.split(".").pop()?.toLowerCase()??"",o=new Set(["css","js","woff2"]),l=Object.keys(a).filter(e=>!o.has(e)),s=RegExp(String.raw`(?<![\p{L}\p{N}_/:@%-])\/?(?:[\p{L}\p{N}_.@%-]+/)*[\p{L}\p{N}_@%-]+(?:\.[\p{L}\p{N}_-]+)*\.(?:${l.join("|")})\b`,"giu"),c=`${r.PATHS.workspace}/`,u=t.queryKey.file(""),d=e=>e.startsWith(`${r.PATHS.artifacts}/`)&&["md","markdown","html","htm"].includes(i(e));e.s(["extensionOf",0,i,"leadFirst",0,function(e){let t=e.findIndex(d);return t>0?[e[t],...e.filter((e,r)=>r!==t)]:e},"mimeOf",0,e=>a[i(e)]?.mime??"application/octet-stream","pathsIn",0,function(e){let t=e.replace(/\b[a-z][\w+.-]*:\/\/\S+/gi," ").replace(/\b[a-z][\w+.-]+:(?=\/)/gi," "),r=new Set,n="";for(let[e]of t.matchAll(s)){let t=!e.includes("/"),a=function(e){let t,r,n=(r=(t=function(e){if(!e.startsWith(u))return e;let t=e.slice(u.length);try{return decodeURIComponent(t)}catch{return t}}(e.trim())).indexOf(c))>=0?t.slice(r+c.length)||null:t.startsWith("/")||/^[A-Za-z]:/.test(t)||t.split("/").includes("..")?null:t||null;if(!n)return null;let[a,...i]=n.split("/");return i.length&&a.includes(".")?null:n}(t?n+e:e);t||(n=a?.slice(0,a.lastIndexOf("/")+1)??""),a&&r.add(a)}return[...r].slice(0,12)},"viewKindOf",0,e=>a[i(e)]?.kind??"none"])},198306,(e,t,r)=>{"use strict";var n=Object.create,a=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,l=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,c=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of o(t))s.call(e,l)||l===r||a(e,l,{get:()=>t[l],enumerable:!(n=i(t,l))||n.enumerable});return e},u=(e,t,r)=>(r=null!=e?n(l(e)):{},c(!t&&e&&e.__esModule?r:a(r,"default",{value:e,enumerable:!0}),e)),d={},f={isValidAccessToken:()=>k,readAuthConfig:()=>y,writeAuthConfig:()=>b};for(var p in f)a(d,p,{get:f[p],enumerable:!0});t.exports=c(a({},"__esModule",{value:!0}),d);var m=u(e.r(522734)),g=u(e.r(814747)),h=e.r(913803);function w(){let e=(0,h.getVercelDataDir)();if(!e)throw Error(`Unable to find Vercel CLI data directory. Your platform: ${process.platform}. Supported: darwin, linux, win32.`);return g.join(e,"auth.json")}function y(){try{let e=w();if(!m.existsSync(e))return null;let t=m.readFileSync(e,"utf8");if(!t)return null;return JSON.parse(t)}catch(e){return null}}function b(e){let t=w(),r=g.dirname(t);m.existsSync(r)||m.mkdirSync(r,{mode:504,recursive:!0}),m.writeFileSync(t,JSON.stringify(e,null,2),{mode:384})}function k(e,t=0){if(!e.token)return!1;if("number"!=typeof e.expiresAt)return!0;let r=Math.floor(Date.now()/1e3);return e.expiresAt>=r+t/1e3}},736374,(e,t,r)=>{"use strict";var n=Object.defineProperty,a=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,l={},s={AccessTokenMissingError:()=>u,RefreshAccessTokenFailedError:()=>d};for(var c in s)n(l,c,{get:s[c],enumerable:!0});t.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of i(t))o.call(e,l)||void 0===l||n(e,l,{get:()=>t[l],enumerable:!(r=a(t,l))||r.enumerable});return e})(n({},"__esModule",{value:!0}),l);class u extends Error{constructor(){super("No authentication found. Please log in with the Vercel CLI (vercel login)."),this.name="AccessTokenMissingError"}}class d extends Error{constructor(e){super("Failed to refresh authentication token.",{cause:e}),this.name="RefreshAccessTokenFailedError"}}},903736,(e,t,r)=>{"use strict";var n=Object.defineProperty,a=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,l={},s={processTokenResponse:()=>g,refreshTokenRequest:()=>m};for(var c in s)n(l,c,{get:s[c],enumerable:!0});t.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of i(t))o.call(e,l)||void 0===l||n(e,l,{get:()=>t[l],enumerable:!(r=a(t,l))||r.enumerable});return e})(n({},"__esModule",{value:!0}),l);var u=e.r(446786);let d=`@vercel/oidc node-${process.version} ${(0,u.platform)()} (${(0,u.arch)()}) ${(0,u.hostname)()}`,f=null;async function p(){if(f)return f;let e=await fetch("https://vercel.com/.well-known/openid-configuration",{headers:{"user-agent":d}});if(!e.ok)throw Error("Failed to discover OAuth endpoints");let t=await e.json();if(!t||"string"!=typeof t.token_endpoint)throw Error("Invalid OAuth discovery response");let r=t.token_endpoint;return f=r,r}async function m(e){let t=await p();return await fetch(t,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded","user-agent":d},body:new URLSearchParams({client_id:"cl_HYyOPBNtFMfHhaUn9L4QPfTZz6TP47bp",grant_type:"refresh_token",...e})})}async function g(e){let t=await e.json();return e.ok?"object"!=typeof t||null===t?[Error("Invalid token response")]:"string"!=typeof t.access_token?[Error("Missing access_token in response")]:"Bearer"!==t.token_type?[Error("Invalid token_type in response")]:"number"!=typeof t.expires_in?[Error("Missing expires_in in response")]:[null,t]:[Error("object"==typeof t&&t&&"error"in t?String(t.error):"Token refresh failed")]}},424134,(e,t,r)=>{"use strict";var n=Object.defineProperty,a=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,l={},s={VercelOidcTokenError:()=>u};for(var c in s)n(l,c,{get:s[c],enumerable:!0});t.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of i(t))o.call(e,l)||void 0===l||n(e,l,{get:()=>t[l],enumerable:!(r=a(t,l))||r.enumerable});return e})(n({},"__esModule",{value:!0}),l);class u extends Error{constructor(e,t){super(e),this.name="VercelOidcTokenError",this.cause=t}toString(){return this.cause?`${this.name}: ${this.message}: ${this.cause}`:`${this.name}: ${this.message}`}}},713292,(e,t,r)=>{"use strict";var n=Object.create,a=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,l=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,c=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of o(t))s.call(e,l)||l===r||a(e,l,{get:()=>t[l],enumerable:!(n=i(t,l))||n.enumerable});return e},u=(e,t,r)=>(r=null!=e?n(l(e)):{},c(!t&&e&&e.__esModule?r:a(r,"default",{value:e,enumerable:!0}),e)),d={},f={findRootDir:()=>y,getUserDataDir:()=>b};for(var p in f)a(d,p,{get:f[p],enumerable:!0});t.exports=c(a({},"__esModule",{value:!0}),d);var m=u(e.r(814747)),g=u(e.r(522734)),h=u(e.r(446786)),w=e.r(424134);function y(){try{let e=process.cwd();for(;e!==m.default.dirname(e);){let t=m.default.join(e,".vercel");if(g.default.existsSync(t))return e;e=m.default.dirname(e)}}catch(e){throw new w.VercelOidcTokenError("Token refresh only supported in node server environments")}return null}function b(){if(process.env.XDG_DATA_HOME)return process.env.XDG_DATA_HOME;switch(h.default.platform()){case"darwin":return m.default.join(h.default.homedir(),"Library/Application Support");case"linux":return m.default.join(h.default.homedir(),".local/share");case"win32":if(process.env.LOCALAPPDATA)return process.env.LOCALAPPDATA;return null;default:return null}}},913803,(e,t,r)=>{"use strict";var n=Object.create,a=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,l=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,c=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of o(t))s.call(e,l)||l===r||a(e,l,{get:()=>t[l],enumerable:!(n=i(t,l))||n.enumerable});return e},u=(e,t,r)=>(r=null!=e?n(l(e)):{},c(!t&&e&&e.__esModule?r:a(r,"default",{value:e,enumerable:!0}),e)),d={},f={assertVercelOidcTokenResponse:()=>j,findProjectInfo:()=>S,getTokenPayload:()=>_,getVercelDataDir:()=>v,getVercelOidcToken:()=>O,getVercelToken:()=>T,isExpired:()=>I,loadToken:()=>x,saveToken:()=>A};for(var p in f)a(d,p,{get:f[p],enumerable:!0});t.exports=c(a({},"__esModule",{value:!0}),d);var m=u(e.r(814747)),g=u(e.r(522734)),h=e.r(424134),w=e.r(713292),y=e.r(198306),b=e.r(903736),k=e.r(736374);function v(){let e=(0,w.getUserDataDir)();return e?m.join(e,"com.vercel.cli"):null}async function T(e){let t=(0,y.readAuthConfig)();if(!t?.token)throw new k.AccessTokenMissingError;if((0,y.isValidAccessToken)(t,e?.expirationBufferMs))return t.token;if(!t.refreshToken)throw(0,y.writeAuthConfig)({}),new k.RefreshAccessTokenFailedError("No refresh token available");try{let e=await (0,b.refreshTokenRequest)({refresh_token:t.refreshToken}),[r,n]=await (0,b.processTokenResponse)(e);if(r||!n)throw(0,y.writeAuthConfig)({}),new k.RefreshAccessTokenFailedError(r);let a={token:n.access_token,expiresAt:Math.floor(Date.now()/1e3)+n.expires_in};return n.refresh_token&&(a.refreshToken=n.refresh_token),(0,y.writeAuthConfig)(a),a.token}catch(e){if((0,y.writeAuthConfig)({}),e instanceof k.AccessTokenMissingError||e instanceof k.RefreshAccessTokenFailedError)throw e;throw new k.RefreshAccessTokenFailedError(e)}}async function O(e,t,r){let n=`https://api.vercel.com/v1/projects/${t}/token?source=vercel-oidc-refresh${r?`&teamId=${r}`:""}`,a=await fetch(n,{method:"POST",headers:{Authorization:`Bearer ${e}`}});if(!a.ok)throw new h.VercelOidcTokenError(`Failed to refresh OIDC token: ${a.statusText}`);let i=await a.json();return j(i),i}function j(e){if(!e||"object"!=typeof e)throw TypeError("Vercel OIDC token is malformed. Expected an object. Please run `vc env pull` and try again");if(!("token"in e)||"string"!=typeof e.token)throw TypeError("Vercel OIDC token is malformed. Expected a string-valued token property. Please run `vc env pull` and try again")}function S(){let e=(0,w.findRootDir)();if(!e)throw new h.VercelOidcTokenError("Unable to find project root directory. Have you linked your project with `vc link?`");let t=m.join(e,".vercel","project.json");if(!g.existsSync(t))throw new h.VercelOidcTokenError("project.json not found, have you linked your project with `vc link?`");let r=JSON.parse(g.readFileSync(t,"utf8"));if("string"!=typeof r.projectId&&"string"!=typeof r.orgId)throw TypeError("Expected a string-valued projectId property. Try running `vc link` to re-link your project.");return{projectId:r.projectId,teamId:r.orgId}}function A(e,t){let r=(0,w.getUserDataDir)();if(!r)throw new h.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let n=m.join(r,"com.vercel.token",`${t}.json`),a=JSON.stringify(e);g.mkdirSync(m.dirname(n),{mode:504,recursive:!0}),g.writeFileSync(n,a),g.chmodSync(n,432)}function x(e){let t=(0,w.getUserDataDir)();if(!t)throw new h.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let r=m.join(t,"com.vercel.token",`${e}.json`);if(!g.existsSync(r))return null;let n=JSON.parse(g.readFileSync(r,"utf8"));return j(n),n}function _(e){let t=e.split(".");if(3!==t.length)throw new h.VercelOidcTokenError("Invalid token. Please run `vc env pull` and try again");let r=t[1].replace(/-/g,"+").replace(/_/g,"/"),n=r.padEnd(r.length+(4-r.length%4)%4,"=");return JSON.parse(Buffer.from(n,"base64").toString("utf8"))}function I(e,t=0){return 1e3*e.exp<Date.now()+t}}];
|
|
4
|
+
|
|
5
|
+
//# sourceMappingURL=_0hgvg55._.js.map
|