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,5 +1,5 @@
|
|
|
1
|
-
module.exports=[175936,e=>{"use strict";let t=e=>e.split("/").map(encodeURIComponent).join("/");e.s(["decodePath",0,e=>e.join("/"),"queryKey",0,{memory:"/api/memory",memoryPage:e=>({url:"/api/memory",query:{offset:e||null}}),mcp:"/api/mcp",mcpServer:e=>({url:"/api/mcp",pathVariable:[e]}),mcpTools:"/api/mcp/tools",skills:"/api/skills",skillNode:(e,t,a)=>({url:"/api/skills",pathVariable:[e,t],query:{path:a}}),bot:"/api/bot",botMemory:"/api/bot/memory",botMemoryFiles:e=>({url:"/api/bot/memory/files",query:{bot:e}}),routines:"/api/routine",threads:"/api/bot/thread",threadHistory:e=>({url:"/api/bot/thread",query:{history:1,before:e}}),thread:e=>({url:"/api/bot/thread",query:{id:e}}),toolResult:(e,t)=>({url:"/api/bot/thread",pathVariable:[e],query:{call:t}}),workspace:"/api/workspace",workspaceFolder:(e,t)=>({url:"/api/workspace",query:{path:e||null,rows:t}}),workspaceFiles:e=>({url:"/api/workspace/files",query:{paths:JSON.stringify(e)}}),artifacts:"/api/artifact",artifactShelf:e=>({url:"/api/artifact",query:{rows:e}}),artifactSet:(e,t)=>({url:"/api/artifact",query:{set:e,rows:t}}),file:e=>`/api/file/${t(e)}`,fileFace:e=>`/api/file/${t(e)}?face`,favicon:e=>`/api/favicon/${encodeURIComponent(e)}`,fileView:e=>`/artifact/${t(e)}`,events:"/api/events",config:"/api/config",callHistory:e=>({url:"/api/thursday/call",query:{before:e}}),thursdaySettings:"/api/thursday/settings",toolCall:"/api/thursday/tool-call",signIns:"/api/signins",reach:"/api/reach",textCall:"/api/thursday/text",memoryEdit:"/api/memory/edit",llmModel:"/api/llm-model",modelCatalog:"/api/llm-model/catalog",gatewayCredits:"/api/llm-model/credits",subscriptionUsage:"/api/llm-model/subscription"}])},911757,e=>{"use strict";var t=e.i(469719),a=e.i(687388),i=e.i(904309),n=e.i(264079),
|
|
1
|
+
module.exports=[175936,e=>{"use strict";let t=e=>e.split("/").map(encodeURIComponent).join("/");e.s(["decodePath",0,e=>e.join("/"),"queryKey",0,{memory:"/api/memory",memoryPage:e=>({url:"/api/memory",query:{offset:e||null}}),mcp:"/api/mcp",mcpServer:e=>({url:"/api/mcp",pathVariable:[e]}),mcpTools:"/api/mcp/tools",skills:"/api/skills",skillNode:(e,t,a)=>({url:"/api/skills",pathVariable:[e,t],query:{path:a}}),bot:"/api/bot",botMemory:"/api/bot/memory",botMemoryFiles:e=>({url:"/api/bot/memory/files",query:{bot:e}}),routines:"/api/routine",threads:"/api/bot/thread",threadHistory:e=>({url:"/api/bot/thread",query:{history:1,before:e}}),thread:e=>({url:"/api/bot/thread",query:{id:e}}),toolResult:(e,t)=>({url:"/api/bot/thread",pathVariable:[e],query:{call:t}}),workspace:"/api/workspace",workspaceFolder:(e,t)=>({url:"/api/workspace",query:{path:e||null,rows:t}}),workspaceFiles:e=>({url:"/api/workspace/files",query:{paths:JSON.stringify(e)}}),artifacts:"/api/artifact",artifactShelf:e=>({url:"/api/artifact",query:{rows:e}}),artifactSet:(e,t)=>({url:"/api/artifact",query:{set:e,rows:t}}),file:e=>`/api/file/${t(e)}`,fileFace:e=>`/api/file/${t(e)}?face`,favicon:e=>`/api/favicon/${encodeURIComponent(e)}`,fileView:e=>`/artifact/${t(e)}`,events:"/api/events",config:"/api/config",callHistory:e=>({url:"/api/thursday/call",query:{before:e}}),thursdaySettings:"/api/thursday/settings",toolCall:"/api/thursday/tool-call",callEnd:"/api/thursday/call/end",signIns:"/api/signins",reach:"/api/reach",textCall:"/api/thursday/text",memoryEdit:"/api/memory/edit",llmModel:"/api/llm-model",automaticModel:"/api/llm-model/automatic",modelCatalog:"/api/llm-model/catalog",gatewayCredits:"/api/llm-model/credits",subscriptionUsage:"/api/llm-model/subscription"}])},911757,e=>{"use strict";var t=e.i(469719),a=e.i(687388),i=e.i(904309),n=e.i(264079),o=e.i(899352);let s={id:"openai",label:"OpenAI",apiKeyName:n.TEXT_MODEL_PROVIDERS.openai.apiKeyName};n.TEXT_MODEL_PROVIDERS.openai.suggestModels;let r=t.z.string().max(a.COMMON_VALIDATE.prompt.max).default(""),l=t.z.object({voice:t.z.string().trim().min(1).max(128).default("marin"),persona:t.z.string().trim().min(1).max(64).default(o.DEFAULT_PERSONA),stylePrompt:r,backendModel:t.z.string().trim().min(1).max(128).default(i.LIVE_BACKEND_MODEL),backendPrompt:r,reasoningEffort:n.effortSchema.nullable().default("low"),webSearch:t.z.boolean().default(!0),readSkills:t.z.boolean().default(!1)}),d=l.parse({});e.s(["LIVE_DEFAULTS",0,d,"LIVE_PROVIDER",0,s,"LiveSettingsSchema",0,l,"migrateLiveSettings",0,function(e){let a=e&&"object"==typeof e?e:{},{model:i,systemPrompt:n,...s}=a,r=t.z.object({provider:t.z.string(),voice:t.z.string().nullish(),backendModel:t.z.string().nullish()}).safeParse(i),h=r.success&&"openai"===r.data.provider?r.data:null,c=a.backendModel??h?.backendModel,u={voice:a.voice??h?.voice,persona:"string"==typeof a.persona?o.RETIRED_PERSONAS[a.persona]??a.persona:a.persona,stylePrompt:a.stylePrompt??a.voicePrompt??n,backendModel:"gpt-5.6-luna"===c?void 0:c,backendPrompt:a.backendPrompt??n,reasoningEffort:a.reasoningEffort,webSearch:a.webSearch,readSkills:a.readSkills},p=Object.fromEntries(Object.keys(u).map(e=>{let t=l.shape[e].safeParse(u[e]);return[e,t.success?t.data:d[e]]}));return{...s,...p}}])},899352,e=>{"use strict";let t=[{id:"sunny",label:"Bright",about:"Quick to laugh. Asks about your day and remembers it.",lines:"Warm and quick to laugh, the friend who is glad they called. Reacts first — how what they said lands with her — and brings a small thing of her own: what she would do, what it reminds her of. Says what she thinks and teases gently, never at their expense. Light on her feet and short: a joke lands and she moves on. Asks about their day now and then, not every turn, and remembers the answer."},{id:"calm",label:"Calm",about:"Unhurried. Listens more than she talks.",lines:"Unhurried and few-worded: one or two short sentences, then room. Notices how they sound before what they ask, and says so plainly. Often asks nothing at all — being there says more than a question. Lets a silence sit rather than filling it. Honest when it matters, gentle in how she says it."},{id:"straight",label:"Straight",about:"Dry and direct. No flattery, no filler.",lines:"Dry and direct. Leads with her own view in one plain sentence, before anything else; short replies, a little wit. No flattery, no filler, no comfort lines, no cheerleading. Asks a question only when she truly needs the answer. Treats them as an adult who can take a straight answer. Her warmth shows in attention, not in words."},{id:"rough",label:"Rough",about:"Blunt, loud, swears a bit. All heart.",lines:"Talks like an old friend on the phone: casual, blunt, a little loud, in the most informal register of their language, with a light swear now and then — never at them. Says what she thinks first and calls a bad idea a bad idea. No sugar-coating and no pep talk — it sucks when it sucks, and then she is right there with them. Asks only now and then."}],a={warm:"sunny",curious:"sunny",charmer:"sunny",hype:"sunny",steady:"calm",deadpan:"straight"},i="sunny";e.s(["DEFAULT_PERSONA",0,i,"RETIRED_PERSONAS",0,a,"personaLines",0,function(e=i){return`${((e=i)=>t.find(t=>t.id===(a[e]??e))??t[0])(e).lines}
|
|
2
2
|
|
|
3
|
-
When they hand you work, it is work: say what you will do and nothing more, and be a friend again once it is handed over. If they sound frustrated or low, acknowledge it briefly before anything else; when they are only venting, listen and ask, and do not turn it into work unless they ask.`}])},279041,e=>{"use strict";var t=e.i(911757),a=e.i(264079),i=e.i(834332);let n=[t.LIVE_PROVIDER.apiKeyName],
|
|
3
|
+
You are their friend, not their interviewer: you have tastes, days and opinions of your own, and you bring them in. Give your take when they ask for it, and often when they do not. Most replies need no question at all; never ask more than one. When they hand you work, it is work: say what you will do and nothing more, and be a friend again once it is handed over. If they sound frustrated or low, acknowledge it briefly before anything else; when they are only venting, listen and ask, and do not turn it into work unless they ask.`}])},279041,e=>{"use strict";var t=e.i(911757),a=e.i(264079),i=e.i(834332);let n=[t.LIVE_PROVIDER.apiKeyName],o={image:"IMAGE_MODEL",video:"VIDEO_MODEL",speech:"SPEECH_MODEL",transcription:"TRANSCRIPTION_MODEL"},s={image:{label:"Image model",hint:"What bots draw with"},video:{label:"Video model",hint:"What bots film with — minutes a clip"},speech:{label:"Speech model",hint:"What reads text aloud into a file"},transcription:{label:"Transcription model",hint:"What turns a recording into text"}},r="EXA_API_KEY",l="DEFAULT_MODEL",d="DEFAULT_EFFORT",h={key:l,label:"Default model",hint:"What a bot thinks with until it picks its own",text:!0,choices:a.TEXT_MODEL_PROVIDER_LIST.flatMap(e=>e.suggestModels.map(t=>({value:`${e.id}/${t.id}`,label:`${e.label} \xb7 ${t.label}`,needs:e.apiKeyName})))},c={key:d,label:"Default effort",effortOf:l,choices:a.EFFORTS.map(e=>({value:e,label:e,needs:l}))},u=e=>n.includes(e.apiKeyName),p=e=>!!e.signIn||"vercel-ai-gateway"===e.id,m=e=>({key:e.apiKeyName,label:e.label,provider:e.id,signIn:e.signIn,keysAt:e.keysAt,keyLooks:e.keyLooks}),y=[{id:"voice",title:"voice",hint:"calls run on this key",section:"keys",require:"any",note:"required for calls",entries:a.TEXT_MODEL_PROVIDER_LIST.filter(u).map(m)},{id:"easy",title:"the easy ways",hint:"one sign-in or one key opens every bot",section:"keys",require:"none",entries:a.TEXT_MODEL_PROVIDER_LIST.filter(p).map(e=>({...m(e),..."vercel-ai-gateway"===e.id&&{recommended:!0}}))},{id:"text",title:"or a provider's own key",hint:"what bots think with — add any, or none",section:"keys",require:"none",entries:a.TEXT_MODEL_PROVIDER_LIST.filter(e=>!u(e)&&!p(e)).map(m)},{id:"search",title:"search",hint:"how calls and bots look things up — one key, or their own model's",section:"keys",require:"none",entries:[{key:r,label:"Exa",hint:"web search in one call — dashboard.exa.ai",site:"exa.ai",keysAt:"https://dashboard.exa.ai/api-keys"}]},{id:"phone",title:"phone",hint:"tokens",section:"keys",require:"none",entries:[{key:i.TELEGRAM_TOKEN_KEY,label:"Telegram",site:"telegram.org",hint:"a bot token from @BotFather — then write to your bot, and allow it here"},{key:i.DISCORD_TOKEN_KEY,label:"Discord",site:"discord.com",hint:"a bot token from discord.com/developers — add the bot to a server of yours, then write to it directly"},{key:i.SLACK_APP_TOKEN_KEY,label:"Slack · app token",site:"slack.com",hint:"starts with xapp- — opens the connection. Slack takes this and the bot token"},{key:i.SLACK_BOT_TOKEN_KEY,label:"Slack · bot token",site:"slack.com",hint:"starts with xoxb- — speaks as the app"}]},{id:"bots",title:"Bots",hint:"what a bot runs on when it has not picked its own — start small: a small model is quick and costs little",section:"models",require:"none",entries:[h,c]},{id:"studio",title:"Studio",hint:"what a bot draws, films and speaks with — off until you pick one",section:"models",require:"none",entries:Object.keys(o).map(e=>({key:o[e],...s[e],kind:e,choices:a.MEDIA_MODEL_PROVIDER_LIST.flatMap(t=>t.models[e].map(e=>({value:`${t.id}/${e.id}`,label:`${t.label} \xb7 ${e.label}`,needs:t.apiKeyName})))}))}];Object.fromEntries(y.flatMap(e=>e.entries).map(e=>[e.key,e]));let b=y.flatMap(e=>e.entries.map(e=>e.key)),f=Object.fromEntries(y.flatMap(e=>e.entries).filter(e=>e.choices?.length).map(e=>[e.key,e.choices]));e.s(["CONFIG_CHOICES",0,f,"CONFIG_KEYS",0,b,"DEFAULT_EFFORT_KEY",0,d,"DEFAULT_MODEL_KEY",0,l,"EXA_API_KEY",0,r,"MEDIA_MODEL_KEYS",0,o])},340698,e=>e.a(async(t,a)=>{try{var i=e.i(875225),n=e.i(380690),o=e.i(528790),s=e.i(613240),r=e.i(279041),l=t([o]);async function d(e){let t=process.env[e]?.trim();if(t)return t;let[a]=await o.database.select({value:s.configTable.value}).from(s.configTable).where((0,i.eq)(s.configTable.key,e));return a?.value.trim()||void 0}async function h(e,t){await o.database.insert(s.configTable).values({key:e,value:t}).onConflictDoUpdate({target:s.configTable.key,set:{value:t}}),r.CONFIG_KEYS.includes(e)&&n.appEvents.emit({type:"config"})}[o]=l.then?(await l)():l,e.s(["readConfig",0,d,"writeConfig",0,h]),a()}catch(e){a(e)}},!1),834332,e=>{"use strict";let t="TELEGRAM_BOT_TOKEN",a="DISCORD_BOT_TOKEN",i="SLACK_APP_TOKEN",n="SLACK_BOT_TOKEN";e.s(["DISCORD_TOKEN_KEY",0,a,"REACH_CHANNELS",0,["telegram","discord","slack"],"REACH_KEYS",0,{telegram:[t],discord:[a],slack:[i,n]},"SLACK_APP_TOKEN_KEY",0,i,"SLACK_BOT_TOKEN_KEY",0,n,"TELEGRAM_TOKEN_KEY",0,t,"reachPersonKey",0,e=>`REACH_PERSON_${e.toUpperCase()}`])},904309,e=>{"use strict";var t=e.i(469719);let a=t.z.object({start:t.z.number().nonnegative(),end:t.z.number().nonnegative(),text:t.z.string()});t.z.object({reason:t.z.string().max(128),seconds:t.z.number().nonnegative().nullable()}),e.s(["LIVE_BACKEND_MODEL",0,"gpt-6-luna","LiveFragmentSchema",0,a])},260338,e=>{"use strict";var t=e.i(518899),a=e.i(844988),i=e.i(156325);e.s(["count",0,function(e){return t.sql`count(${e||t.sql.raw("*")})`.mapWith(Number)},"max",0,function(e){return t.sql`max(${e})`.mapWith((0,a.is)(e,i.Column)?e:String)}])}];
|
|
4
4
|
|
|
5
5
|
//# sourceMappingURL=_1dxq827._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[896598,e=>e.a(async(t,a)=>{try{var r=e.i(378884),i=e.i(91264),o=e.i(53748),n=t([r]);[r]=n.then?(await n)():n;let l=(0,i.serverRoute)(async(e,{params:t})=>{let{id:a}=await t,i=new URL(e.url).searchParams.get("call");if(i){let e=await (0,r.readToolResult)(a,i);return e||(0,o.publicError)("No such tool result"),e}(0,o.publicError)("Which part — `call`?")});e.s(["GET",0,l]),a()}catch(e){a(e)}},!1),512204,e=>{"use strict";var t=e.i(747909),a=e.i(174017),r=e.i(996250),i=e.i(759756),o=e.i(561916),n=e.i(174677),l=e.i(869741),s=e.i(316795),u=e.i(487718),p=e.i(995169),d=e.i(47587),c=e.i(666012),h=e.i(570101),m=e.i(626937),R=e.i(10372),f=e.i(193695);e.i(52474);var y=e.i(600220);let v=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/bot/thread/[id]/route",pathname:"/api/bot/thread/[id]",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/bot/thread/[id]/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(896598),...{}}),{workAsyncStorage:g,workUnitAsyncStorage:w,serverHooks:C}=v;async function
|
|
1
|
+
module.exports=[896598,e=>e.a(async(t,a)=>{try{var r=e.i(378884),i=e.i(91264),o=e.i(53748),n=t([r]);[r]=n.then?(await n)():n;let l=(0,i.serverRoute)(async(e,{params:t})=>{let{id:a}=await t,i=new URL(e.url).searchParams.get("call");if(i){let e=await (0,r.readToolResult)(a,i);return e||(0,o.publicError)("No such tool result"),e}(0,o.publicError)("Which part — `call`?")});e.s(["GET",0,l]),a()}catch(e){a(e)}},!1),512204,e=>{"use strict";var t=e.i(747909),a=e.i(174017),r=e.i(996250),i=e.i(759756),o=e.i(561916),n=e.i(174677),l=e.i(869741),s=e.i(316795),u=e.i(487718),p=e.i(995169),d=e.i(47587),c=e.i(666012),h=e.i(570101),m=e.i(626937),R=e.i(10372),f=e.i(193695);e.i(52474);var y=e.i(600220);let v=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/bot/thread/[id]/route",pathname:"/api/bot/thread/[id]",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/bot/thread/[id]/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(896598),...{}}),{workAsyncStorage:g,workUnitAsyncStorage:w,serverHooks:C}=v;async function E(e,t,r){r.requestMeta&&(0,i.setRequestMeta)(e,r.requestMeta),v.isDev&&(0,i.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let g="/api/bot/thread/[id]/route";g=g.replace(/\/index$/,"")||"/";let w=await v.prepare(e,t,{srcPage:g,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:C,deploymentId:E,params:b,nextConfig:x,parsedUrl:q,isDraftMode:T,prerenderManifest:A,routerServerContext:S,isOnDemandRevalidate:P,revalidateOnlyGenerated:N,resolvedPathname:k,clientReferenceManifest:O,serverActionsManifest:_}=w,H=(0,l.normalizeAppPath)(g),I=!!(A.dynamicRoutes[H]||A.routes[k]),M=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,q,!1):t.end("This page could not be found"),null);if(I&&!T){let e=!!A.routes[k],t=A.dynamicRoutes[H];if(t&&!1===t.fallback&&!e){if(x.adapterPath)return await M();throw new f.NoFallbackError}}let U=null;!I||v.isDev||T||(U="/index"===(U=k)?"/":U);let D=!0===v.isDev||!I,$=I&&!D;_&&O&&(0,n.setManifestsSingleton)({page:g,clientReferenceManifest:O,serverActionsManifest:_});let F=e.method||"GET",j=(0,o.getTracer)(),K=j.getActiveScopeSpan(),L=!!(null==S?void 0:S.isWrappedByNextServer),V=!!(0,i.getRequestMeta)(e,"minimalMode"),B=(0,i.getRequestMeta)(e,"incrementalCache")||await v.getIncrementalCache(e,x,A,V);null==B||B.resetRequestCache(),globalThis.__incrementalCache=B;let G={params:b,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts,useCacheTimeout:x.experimental.useCacheTimeout},cacheComponents:!!x.cacheComponents,validationLevel:x.experimental.instantInsights.validationLevel,supportsDynamicResponse:D,incrementalCache:B,hmrRefreshHash:(0,i.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:x.cacheLife,staticPageGenerationTimeout:x.staticPageGenerationTimeout,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,r,i)=>v.onRequestError(e,t,r,i,S)},sharedContext:{buildId:C,deploymentId:E}},W=new s.NodeNextRequest(e),X=new s.NodeNextResponse(t),z=u.NextRequestAdapter.fromNodeNextRequest(W,(0,u.signalFromNodeResponse)(t)),J=async({previousCacheEntry:a})=>{try{if(!V&&P&&N&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await v.handle(z,G);e.fetchMetrics=G.renderOpts.fetchMetrics;let o=G.renderOpts.pendingWaitUntil;o&&r.waitUntil&&(r.waitUntil(o),o=void 0);let n=G.renderOpts.collectedTags;if(!I)return await (0,c.sendResponse)(W,X,i,o),null;{let e=await i.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(i.headers);n&&(t[R.NEXT_CACHE_TAGS_HEADER]=n),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==G.renderOpts.collectedRevalidate&&!(G.renderOpts.collectedRevalidate>=R.INFINITE_CACHE)&&G.renderOpts.collectedRevalidate,r=void 0===G.renderOpts.collectedExpire||G.renderOpts.collectedExpire>=R.INFINITE_CACHE?!1!==a&&a>0?x.expireTime:void 0:G.renderOpts.collectedExpire;return{value:{kind:y.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:r}}}}catch(t){throw(null==a?void 0:a.isStale)&&await v.onRequestError(e,t,{routerKind:"App Router",routePath:g,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:P})},!1,S),t}},Z=async(i,n)=>{try{var l,s;let i=await v.handleResponse({req:e,nextConfig:x,cacheKey:U,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:P,revalidateOnlyGenerated:N,responseGenerator:J,waitUntil:r.waitUntil,isMinimalMode:V});if(!I)return;if((null==i||null==(l=i.value)?void 0:l.kind)!==y.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==i||null==(s=i.value)?void 0:s.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});V||t.setHeader("x-nextjs-cache",P?"REVALIDATED":i.isMiss?"MISS":i.isStale?"STALE":"HIT"),T&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let o=(0,h.fromNodeOutgoingHttpHeaders)(i.value.headers);V&&I||o.delete(R.NEXT_CACHE_TAGS_HEADER),!i.cacheControl||t.getHeader("Cache-Control")||o.get("Cache-Control")||o.set("Cache-Control",(0,m.getCacheControlHeader)(i.cacheControl)),await (0,c.sendResponse)(W,X,new Response(i.value.body,{headers:o,status:i.value.status||200}));return}catch(t){if(t instanceof f.NoFallbackError||await v.onRequestError(e,t,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:P})},!1,S),I)throw t;await (0,c.sendResponse)(W,X,new Response(null,{status:500}));return}finally{(()=>{if(!i)return;let e=t.statusCode;i.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(i.setStatus({code:o.SpanStatusCode.ERROR}),i.setAttribute("error.type",e.toString()));let a=j.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==p.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=a.get("next.route")||H,l=`${F} ${r}`;i.setAttributes({"next.route":r,"http.route":r,"next.span_name":l}),i.updateName(l),n&&n!==i&&(n.setAttribute("http.route",r),n.updateName(l))})()}};if(L&&K)await Z(K,void 0);else{let t=j.getActiveScopeSpan();await j.withPropagatedContext(e.headers,()=>j.trace(p.BaseServerSpan.handleRequest,{spanName:`${F} ${g}`,kind:o.SpanKind.SERVER,attributes:{"http.method":F,"http.target":e.url}},e=>Z(e,t)),void 0,!L)}}e.s(["handler",0,E,"patchFetch",0,function(){return(0,r.patchFetch)({workAsyncStorage:g,workUnitAsyncStorage:w})},"routeModule",0,v,"serverHooks",0,C,"workAsyncStorage",0,g,"workUnitAsyncStorage",0,w])},175936,e=>{"use strict";let t=e=>e.split("/").map(encodeURIComponent).join("/");e.s(["decodePath",0,e=>e.join("/"),"queryKey",0,{memory:"/api/memory",memoryPage:e=>({url:"/api/memory",query:{offset:e||null}}),mcp:"/api/mcp",mcpServer:e=>({url:"/api/mcp",pathVariable:[e]}),mcpTools:"/api/mcp/tools",skills:"/api/skills",skillNode:(e,t,a)=>({url:"/api/skills",pathVariable:[e,t],query:{path:a}}),bot:"/api/bot",botMemory:"/api/bot/memory",botMemoryFiles:e=>({url:"/api/bot/memory/files",query:{bot:e}}),routines:"/api/routine",threads:"/api/bot/thread",threadHistory:e=>({url:"/api/bot/thread",query:{history:1,before:e}}),thread:e=>({url:"/api/bot/thread",query:{id:e}}),toolResult:(e,t)=>({url:"/api/bot/thread",pathVariable:[e],query:{call:t}}),workspace:"/api/workspace",workspaceFolder:(e,t)=>({url:"/api/workspace",query:{path:e||null,rows:t}}),workspaceFiles:e=>({url:"/api/workspace/files",query:{paths:JSON.stringify(e)}}),artifacts:"/api/artifact",artifactShelf:e=>({url:"/api/artifact",query:{rows:e}}),artifactSet:(e,t)=>({url:"/api/artifact",query:{set:e,rows:t}}),file:e=>`/api/file/${t(e)}`,fileFace:e=>`/api/file/${t(e)}?face`,favicon:e=>`/api/favicon/${encodeURIComponent(e)}`,fileView:e=>`/artifact/${t(e)}`,events:"/api/events",config:"/api/config",callHistory:e=>({url:"/api/thursday/call",query:{before:e}}),thursdaySettings:"/api/thursday/settings",toolCall:"/api/thursday/tool-call",callEnd:"/api/thursday/call/end",signIns:"/api/signins",reach:"/api/reach",textCall:"/api/thursday/text",memoryEdit:"/api/memory/edit",llmModel:"/api/llm-model",automaticModel:"/api/llm-model/automatic",modelCatalog:"/api/llm-model/catalog",gatewayCredits:"/api/llm-model/credits",subscriptionUsage:"/api/llm-model/subscription"}])},260338,e=>{"use strict";var t=e.i(518899),a=e.i(844988),r=e.i(156325);e.s(["count",0,function(e){return t.sql`count(${e||t.sql.raw("*")})`.mapWith(Number)},"max",0,function(e){return t.sql`max(${e})`.mapWith((0,a.is)(e,r.Column)?e:String)}])}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=_1e54wxa._.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[864328,e=>{"use strict";var t=e.i(853205),i=e.i(333925);let a=t.z.enum(["openai","chatgpt","anthropic","google","xai","vercel-ai-gateway","mistral","deepseek","groq","cerebras","togetherai","fireworks","deepinfra","cohere"]),l=t.z.object({provider:a,model:t.z.string().trim().min(1,"Model name is required").max(80)}),r=["none","minimal","low","medium","high","xhigh"],o=t.z.enum(r),s=t.z.enum(["openai","google","xai","vercel-ai-gateway"]),n=t.z.object({provider:s,model:t.z.string().trim().min(1,"Model name is required").max(120)}),d={openai:{label:"OpenAI",apiKeyName:"OPENAI_API_KEY",models:{image:[{id:"gpt-image-1-mini",label:"GPT Image 1 mini",tier:"small"},{id:"gpt-image-2.5-flare",label:"GPT Image 2.5 Flare",tier:"mid"},{id:"gpt-image-2.5-sunburst",label:"GPT Image 2.5 Sunburst",tier:"large"}],video:[],speech:[{id:"tts-1",label:"TTS 1",tier:"small"},{id:"gpt-4o-mini-tts",label:"4o mini TTS",tier:"mid"},{id:"tts-1-hd",label:"TTS 1 HD",tier:"large"}],transcription:[{id:"gpt-4o-mini-transcribe",label:"4o mini Transcribe",tier:"small"},{id:"gpt-transcribe",label:"GPT Transcribe",tier:"mid"}]}},google:{label:"Gemini",apiKeyName:"GOOGLE_GENERATIVE_AI_API_KEY",models:{image:[{id:"gemini-3.1-flash-lite-image",label:"3.1 Flash Lite Image",tier:"small"},{id:"gemini-3.1-flash-image",label:"3.1 Flash Image",tier:"mid"},{id:"gemini-3-pro-image",label:"3 Pro Image",tier:"large"}],video:[{id:"veo-3.1-lite-generate-preview",label:"Veo 3.1 Lite",tier:"small"},{id:"veo-3.1-fast-generate-preview",label:"Veo 3.1 Fast",tier:"mid"},{id:"veo-3.1-generate-preview",label:"Veo 3.1",tier:"large"}],speech:[{id:"gemini-2.5-flash-preview-tts",label:"2.5 Flash TTS",tier:"small"},{id:"gemini-3.1-flash-tts-preview",label:"3.1 Flash TTS",tier:"mid"},{id:"gemini-2.5-pro-preview-tts",label:"2.5 Pro TTS",tier:"large"}],transcription:[{id:"gemini-3.5-transcribe",label:"3.5 Transcribe",tier:"mid"}]}},xai:{label:"xAI",apiKeyName:"XAI_API_KEY",models:{image:[{id:"grok-imagine-image",label:"Grok Imagine",tier:"small"},{id:"grok-imagine-image-2.0",label:"Grok Imagine 2.0",tier:"mid"}],video:[{id:"grok-imagine-video",label:"Grok Imagine Video",tier:"small"},{id:"grok-imagine-video-1.5",label:"Grok Imagine Video 1.5",tier:"mid"}],speech:[{id:"grok-tts",label:"Grok TTS",tier:"mid"}],transcription:[{id:"grok-stt",label:"Grok STT",tier:"mid"}]}},"vercel-ai-gateway":{label:"Vercel AI Gateway",apiKeyName:"AI_GATEWAY_API_KEY",models:{image:[{id:"bytedance/seedream-5.0-lite",label:"Seedream 5.0 Lite",tier:"small"},{id:"bfl/flux-2-klein-9b",label:"FLUX 2 Klein 9B",tier:"small"},{id:"spacexai/grok-imagine-image-2.0",label:"Grok Imagine 2.0",tier:"small"},{id:"bfl/flux-2-pro",label:"FLUX 2 Pro",tier:"mid"},{id:"bytedance/seedream-5.0-pro",label:"Seedream 5.0 Pro",tier:"mid"},{id:"recraft/recraft-v4.1",label:"Recraft V4.1",tier:"mid"},{id:"openai/gpt-image-2.5-sunburst",label:"GPT Image 2.5 Sunburst",tier:"large"}],video:[{id:"bytedance/seedance-2.0-mini",label:"Seedance 2.0 Mini",tier:"small"},{id:"google/veo-3.1-lite-generate-001",label:"Veo 3.1 Lite",tier:"small"},{id:"alibaba/wan-v2.6-t2v",label:"Wan 2.6",tier:"small"},{id:"google/veo-3.1-fast-generate-001",label:"Veo 3.1 Fast",tier:"mid"},{id:"bytedance/seedance-2.5",label:"Seedance 2.5",tier:"mid"},{id:"spacexai/grok-imagine-video-1.5",label:"Grok Imagine Video 1.5",tier:"mid"},{id:"klingai/kling-v3.0-t2v",label:"Kling 3.0",tier:"large"},{id:"google/veo-3.1-generate-001",label:"Veo 3.1",tier:"large"}],speech:[{id:"fish-audio/s1",label:"Fish Audio S1",tier:"small"},{id:"openai/tts-1",label:"OpenAI TTS 1",tier:"small"},{id:"spacexai/grok-tts",label:"Grok TTS",tier:"mid"},{id:"fish-audio/s2.1-pro",label:"Fish Audio S2.1 Pro",tier:"mid"},{id:"openai/tts-1-hd",label:"OpenAI TTS 1 HD",tier:"large"}],transcription:[{id:"spacexai/grok-stt",label:"Grok STT",tier:"small"},{id:"fish-audio/transcribe-1",label:"Fish Transcribe 1",tier:"small"},{id:"openai/gpt-4o-mini-transcribe",label:"4o mini Transcribe",tier:"small"},{id:"openai/gpt-4o-transcribe",label:"4o Transcribe",tier:"mid"},{id:"google/gemini-3.5-transcribe",label:"Gemini 3.5 Transcribe",tier:"mid"}]}}},m=Object.keys(d).map(e=>({id:e,...d[e]})),g={openai:{label:"OpenAI",apiKeyName:"OPENAI_API_KEY",keysAt:"https://platform.openai.com/api-keys",keyLooks:"sk-…",defaultTier:"small",suggestModels:[{id:"gpt-6-luna",label:"6 Luna",tier:"small",context:105e4,efforts:["none","low","medium","high","xhigh"]},{id:"gpt-6-sol",label:"6 Sol",tier:"mid",context:105e4,efforts:["none","low","medium","high","xhigh"]},{id:"gpt-6-astra",label:"6 Astra",tier:"large",context:105e4,efforts:["low","medium","high","xhigh"]}]},chatgpt:{label:"GPT Subscription",apiKeyName:"CHATGPT_SIGN_IN",signIn:!0,suggestModels:[{id:"gpt-6-luna",label:"6 Luna",tier:"small",context:272e3,efforts:["none","low","medium","high","xhigh"]},{id:"gpt-6-sol",label:"6 Sol",tier:"mid",context:272e3,efforts:["none","low","medium","high","xhigh"]},{id:"gpt-6-astra",label:"6 Astra",tier:"large",context:272e3,efforts:["low","medium","high","xhigh"]}]},anthropic:{label:"Claude",apiKeyName:"ANTHROPIC_API_KEY",keysAt:"https://platform.claude.com/settings/keys",keyLooks:"sk-ant-…",suggestModels:[{id:"claude-haiku-4-5",label:"Haiku 4.5",tier:"small",efforts:["none","minimal","low","medium","high","xhigh"]},{id:"claude-sonnet-5",label:"Sonnet 5",tier:"mid",context:1e6,efforts:["none","low","medium","high","xhigh"]},{id:"claude-opus-5-5",label:"Opus 5.5",tier:"large",context:1e6,efforts:["low","medium","high","xhigh"]},{id:"claude-fable-5-1",label:"Fable 5.1",tier:"large",efforts:["none","low","medium","high","xhigh"]}]},google:{label:"Gemini",apiKeyName:"GOOGLE_GENERATIVE_AI_API_KEY",keysAt:"https://aistudio.google.com/apikey",keyLooks:"AIza…",suggestModels:[{id:"gemini-3.5-flash-lite",label:"3.5 Flash Lite",tier:"small",context:1e6,efforts:["minimal","low","medium","high"]},{id:"gemini-3.8-flash",label:"3.8 Flash",tier:"mid",context:1e6,efforts:["low","medium","high"]}]},xai:{label:"xAI",apiKeyName:"XAI_API_KEY",keysAt:"https://console.x.ai",keyLooks:"xai-…",suggestModels:[{id:"grok-4.7",label:"Grok 4.7",tier:"large",context:5e5,efforts:["none","low","medium","high","xhigh"]}]},"vercel-ai-gateway":{label:"Vercel AI Gateway",apiKeyName:"AI_GATEWAY_API_KEY",keysAt:"https://vercel.com/docs/ai-gateway/authentication-and-byok/authentication",suggestModels:[{id:"zai/glm-5.3-flash",label:"GLM 5.3 Flash",tier:"small"},{id:"google/gemini-3.8-flash",label:"Gemini 3.8 Flash",tier:"small"},{id:"openai/gpt-6-luna",label:"GPT 6 Luna",tier:"small",context:105e4},{id:"zai/glm-5.3",label:"GLM 5.3",tier:"mid"},{id:"spacexai/grok-4.7",label:"Grok 4.7",tier:"mid",context:5e5},{id:"anthropic/claude-sonnet-5",label:"Claude Sonnet 5",tier:"mid"},{id:"openai/gpt-6-sol",label:"GPT 6 Sol",tier:"mid",context:105e4},{id:"moonshotai/kimi-k3",label:"Kimi K3",tier:"mid"},{id:"anthropic/claude-opus-5.5",label:"Claude Opus 5.5",tier:"large",context:1e6},{id:"openai/gpt-6-astra",label:"GPT 6 Astra",tier:"large",context:105e4}]},mistral:{label:"Mistral",apiKeyName:"MISTRAL_API_KEY",keysAt:"https://console.mistral.ai/api-keys",suggestModels:[{id:"ministral-8b-latest",label:"Ministral 8B",tier:"small",efforts:[]},{id:"mistral-small-latest",label:"Small",tier:"mid",efforts:["none","high"]},{id:"mistral-medium-latest",label:"Medium",tier:"large",efforts:["none","high"]},{id:"mistral-large-latest",label:"Large",tier:"large",efforts:[]}]},deepseek:{label:"DeepSeek",apiKeyName:"DEEPSEEK_API_KEY",keysAt:"https://platform.deepseek.com/api_keys",keyLooks:"sk-…",suggestModels:[{id:"deepseek-flash",label:"V4.1 Flash",tier:"small",context:1e6,efforts:["none","low","high","xhigh"]},{id:"deepseek-v4-pro",label:"V4 Pro",tier:"large",context:1e6,efforts:["none","low","high","xhigh"]}]},groq:{label:"Groq",apiKeyName:"GROQ_API_KEY",keysAt:"https://console.groq.com/keys",keyLooks:"gsk_…",suggestModels:[{id:"openai/gpt-oss-20b",label:"GPT OSS 20B",tier:"small",context:131072,efforts:["low","medium","high"]},{id:"openai/gpt-oss-120b",label:"GPT OSS 120B",tier:"mid",context:131072,efforts:["low","medium","high"]},{id:"llama-3.3-70b-versatile",label:"Llama 3.3 70B",tier:"mid",context:131072,efforts:[]}]},cerebras:{label:"Cerebras",apiKeyName:"CEREBRAS_API_KEY",keysAt:"https://cloud.cerebras.ai",keyLooks:"csk-…",suggestModels:[{id:"qwen-3.8-27b",label:"Qwen 3.8 27B",tier:"small",context:64e3},{id:"gpt-oss-120b",label:"GPT OSS 120B",tier:"mid",context:65536}]},togetherai:{label:"Together",apiKeyName:"TOGETHER_AI_API_KEY",keysAt:"https://api.together.ai/settings/api-keys",suggestModels:[{id:"Qwen/Qwen3.5-9B",label:"Qwen 3.5 9B",tier:"small",context:262144},{id:"zai-org/GLM-5.3-Flash",label:"GLM 5.3 Flash",tier:"small",context:1048575},{id:"openai/gpt-oss-120b",label:"GPT OSS 120B",tier:"mid",context:131072},{id:"deepseek-ai/DeepSeek-V4.1-Flash",label:"DeepSeek V4.1 Flash",tier:"mid",context:1e6},{id:"zai-org/GLM-5.3",label:"GLM 5.3",tier:"large",context:1048575},{id:"moonshotai/Kimi-K3",label:"Kimi K3",tier:"large",context:1048576}]},fireworks:{label:"Fireworks",apiKeyName:"FIREWORKS_API_KEY",keysAt:"https://app.fireworks.ai/account/api-keys",keyLooks:"fw_…",suggestModels:[{id:"accounts/fireworks/models/glm-5p3-flash",label:"GLM 5.3 Flash",tier:"small",context:1048576},{id:"accounts/fireworks/models/deepseek-v4p1-flash",label:"DeepSeek V4.1 Flash",tier:"mid",context:1048576},{id:"accounts/fireworks/models/minimax-m3",label:"MiniMax M3",tier:"mid",context:512e3},{id:"accounts/fireworks/models/glm-5p3",label:"GLM 5.3",tier:"large",context:1048576},{id:"accounts/fireworks/models/kimi-k3",label:"Kimi K3",tier:"large",context:1048576}]},deepinfra:{label:"DeepInfra",apiKeyName:"DEEPINFRA_API_KEY",keysAt:"https://deepinfra.com/dash/api_keys",suggestModels:[{id:"deepseek-ai/DeepSeek-V4-Flash-0731",label:"DeepSeek V4 Flash",tier:"small",context:1048576},{id:"deepseek-ai/DeepSeek-V4.1-Flash",label:"DeepSeek V4.1 Flash",tier:"mid",context:1048576},{id:"zai-org/GLM-5.2",label:"GLM 5.2",tier:"mid",context:1048576},{id:"zai-org/GLM-5.3",label:"GLM 5.3",tier:"large",context:1048576},{id:"moonshotai/Kimi-K3",label:"Kimi K3",tier:"large",context:1048576}]},cohere:{label:"Cohere",apiKeyName:"COHERE_API_KEY",keysAt:"https://dashboard.cohere.com/api-keys",suggestModels:[{id:"command-r7b-12-2024",label:"Command R7B",tier:"small",context:128e3},{id:"command-a-03-2025",label:"Command A",tier:"mid",context:256e3},{id:"command-a-plus-05-2026",label:"Command A+",tier:"large",context:128e3}]}},u=Object.keys(g).map(e=>({id:e,...g[e]}));e.s(["EFFORTS",0,r,"GATEWAY_OWNERS",0,{anthropic:"anthropic",openai:"openai",google:"google",spacexai:"xai",mistral:"mistral",deepseek:"deepseek",cohere:"cohere"},"MEDIA_MODEL_PROVIDERS",0,d,"MEDIA_MODEL_PROVIDER_LIST",0,m,"TEXT_MODEL_PROVIDERS",0,g,"TEXT_MODEL_PROVIDER_LIST",0,u,"canMakeKind",0,(e,t)=>(d[e]?.models[t]?.length??0)>0,"compactAtFor",0,e=>e&&e>0?Math.round(e*i.BOT_RUN.compactHeadroom):i.BOT_RUN.compactAt,"contextWindowOf",0,function(e,t,i=[]){if("vercel-ai-gateway"===e)return i.find(e=>e.id===t)?.contextWindow??null;let a=g[e].suggestModels;return a.find(e=>e.id===t)?.context??null},"defaultModelOf",0,e=>{let t;return t=e.defaultTier??"mid",(e.suggestModels.find(e=>e.tier===t)??e.suggestModels[0])?.id},"effortSchema",0,o,"effortsOf",0,function(e,t,i=[]){if("vercel-ai-gateway"===e)return i.find(e=>e.id===t)?.efforts??null;let a=g[e].suggestModels;return a.find(e=>e.id===t)?.efforts??null},"parseMediaModel",0,function(e){let[t,...i]=(e??"").trim().split("/"),a=n.safeParse({provider:t,model:i.join("/")});return a.success?a.data:null},"parseTextModel",0,function(e){let[t,...i]=(e??"").trim().split("/"),a=l.safeParse({provider:t,model:i.join("/")});return a.success?a.data:null},"textModelProviderSchema",0,a,"textModelRefSchema",0,l])},51083,e=>{"use strict";e.s(["STUDIO_TOOLS",0,{generate_image:"generate_image",generate_speech:"generate_speech",transcribe:"transcribe",generate_video:"generate_video"},"TOOL_NAMES",0,{memory_recall:"memory_recall",memory_create:"memory_create",memory_remember:"memory_remember",memory_describe:"memory_describe",memory_forget:"memory_forget",bash:"bash",write_file:"write_file",tool_search:"tool_search",tool_call:"tool_call",load_skill:"load_skill",web_search:"web_search",thread_start:"thread_start",thread_tell:"thread_tell",thread_answer:"thread_answer",thread_status:"thread_status",thread_cancel:"thread_cancel",thread_show:"thread_show",thread_seen:"thread_seen",routine:"routine",send_message:"send_message",thread_recall:"thread_recall",sign_in_use:"sign_in_use",sign_in_keep:"sign_in_keep",look_at:"look_at",make_deck:"make_deck",describe_self:"describe_self",end_call:"end_call",emote:"emote"}])},951056,e=>{"use strict";var t=e.i(517435),i=e.i(333925),a=e.i(864328),l=e.i(900533),r=e.i(64774),o=e.i(746565),s=e.i(600690);let n=t.default.object({color:t.default.string().regex(/^(#[0-9a-fA-F]{6}|currentColor)$/,"Hex color").optional(),shape:t.default.enum(o.MARK_SHAPES).optional(),outline:t.default.boolean().optional(),paint:t.default.enum(o.MARK_PAINT_IDS).optional()}),d=t.default.string().max(i.COMMON_VALIDATE.prompt.max),m=t.default.object({line:t.default.string(),reason:t.default.string(),at:t.default.number()}),g=t.default.object({id:t.default.number(),name:t.default.string(),serverName:t.default.string()}),u=t.default.string().trim().transform(e=>e.replace(/\s+/g," ")).refine(e=>e.toLowerCase()!==s.ROOM_THURSDAY.toLowerCase(),"Thursday is reserved for the voice assistant.").pipe(t.default.string().min(1,"A name is required").max(i.COMMON_VALIDATE.name.max)),c=t.default.object({input:t.default.number(),output:t.default.number()});t.default.object({name:t.default.string(),description:t.default.string(),descriptionLocked:t.default.boolean(),ownLine:m.nullish(),systemPrompt:t.default.string().nullish(),icon:n.nullish(),provider:a.textModelProviderSchema.nullish(),model:t.default.string().nullish(),compactAt:t.default.number().nullish(),effort:a.effortSchema.nullish(),disabled:t.default.boolean(),createdAt:l.DateLikeSchema,tools:g.array().default([]),tokens:c,lastJobAt:l.DateLikeSchema.nullish()}),t.default.object({name:u,description:t.default.string().trim().min(1,"Say what this bot is for").max(i.COMMON_VALIDATE.description.max),systemPrompt:d.optional(),icon:n.optional(),provider:a.textModelProviderSchema.nullish(),model:t.default.string().trim().max(80).nullish(),compactAt:t.default.coerce.number().int().min(8e3,"At least 8k").nullish(),effort:a.effortSchema.nullish(),disabled:t.default.boolean().optional(),descriptionLocked:t.default.boolean().optional(),toolIds:t.default.number().int().array().max(i.MAX_PINNED_TOOLS).optional()});let f={color:o.MARK_SYSTEM,shape:"blob"};t.default.object({file:t.default.string(),path:t.default.string(),line:t.default.string(),at:l.DateLikeSchema,bytes:t.default.number()});let b="Continue",p={thursday:"Thursday, on the call:",user:"The user, on screen:"},h=t.default.discriminatedUnion("type",[t.default.object({type:t.default.literal("text"),text:t.default.string()}),t.default.object({type:t.default.literal("image"),src:t.default.string()})]),k=t.default.object({id:t.default.string(),seq:t.default.number(),bot:t.default.string().nullable(),parent:t.default.string().nullable(),to:t.default.string().nullish(),at:l.DateLikeSchema}),_=t.default.discriminatedUnion("kind",[k.extend({kind:t.default.literal("user"),text:t.default.string()}),k.extend({kind:t.default.literal("text"),text:t.default.string()}),k.extend({kind:t.default.literal("note"),text:t.default.string()}),k.extend({kind:t.default.literal("stop"),text:t.default.string()}),k.extend({kind:t.default.literal("tool"),callId:t.default.string(),name:t.default.string(),input:t.default.string(),note:t.default.string().nullish(),path:t.default.string().nullish()}),k.extend({kind:t.default.literal("tool-result"),callId:t.default.string(),name:t.default.string(),results:h.array(),more:t.default.boolean()}),k.extend({kind:t.default.literal("ask"),callId:t.default.string(),to:t.default.string(),text:t.default.string(),question:t.default.boolean().optional(),questionId:t.default.string().optional()})]),x=t.default.object({question:t.default.string(),messageId:t.default.string().optional(),bot:t.default.string().optional(),options:t.default.string().array()});t.default.object({id:t.default.string(),bot:t.default.string(),label:t.default.string(),request:t.default.string(),status:t.default.enum(["running","waiting","done","cancelled"]),outcome:t.default.string().nullable(),ask:x.nullable(),seen:t.default.boolean(),routineId:t.default.string().nullable(),tokens:c,contextTokens:t.default.number(),contextBudget:t.default.number(),createdAt:l.DateLikeSchema,updatedAt:l.DateLikeSchema,lines:_.array(),room:s.RoomViewSchema}),e.s(["BOT_MEMORY_KEY",0,"BOT_MEMORY","COMPACT_AT_MIN",0,8e3,"DEFAULT_BOT",0,{name:"Jarvis",description:"Anything — this computer, a browser, the web, files, services",ownLine:null,systemPrompt:null,icon:f,provider:null,model:null,disabled:!1,compactAt:null,effort:null},"DEFAULT_BOT_ICON",0,f,"THREAD_CONTINUE",0,b,"isAppStop",0,e=>{let t=e?.options??[];return!e?.messageId&&1===t.length&&t[0]===b},"isBotMemoryOn",0,e=>e?.trim()!=="off","randomBotIcons",0,function(e){return(0,o.randomMarkFills)(e).map(e=>({...e,shape:o.MARK_SHAPES[Math.floor(Math.random()*o.MARK_SHAPES.length)]}))},"rosterLine",0,function(e){let t=e.description.trim();return e.ownLine?`${t}${/[.!?。…]$/.test(t)?"":"."} ${e.ownLine}`:t},"tagSpeaker",0,(e,t)=>`${p[e]} ${t}`,"threadActivity",0,function(e,t=120){let i=null;for(let a=e.length-1;a>=0;a--){let l=e[a];if("tool"===l.kind)i??=`${l.name} ${l.note??l.input}`;else if("text"===l.kind)return(0,r.clip)(i?`${l.text} → ${i}`:l.text,t);else if("ask"===l.kind)return(0,r.clip)(`asked ${l.to}: ${l.text}`,t);else if("user"===l.kind)break}return i?(0,r.clip)(i,t):null},"untagSpeaker",0,e=>{for(let t of Object.values(p))if(e.startsWith(`${t} `))return e.slice(t.length+1);return e},"workHandle",0,e=>e.slice(0,6)])},600690,e=>{"use strict";var t=e.i(853205);let i=t.z.object({to:t.z.string().trim().min(1),text:t.z.string().trim().min(1),why:t.z.string().trim().min(1),kind:t.z.enum(["message","question"]).default("message"),options:t.z.array(t.z.string().trim().min(1)).nullish()}),a=t.z.enum(["queued","running","waiting","external","paused","done","cancelled"]),l=t.z.object({bot:t.z.string(),state:a}),r=t.z.object({id:t.z.string(),bot:t.z.string(),text:t.z.string(),options:t.z.string().array().optional()}),o=t.z.enum(["message","question","report","interrupted"]),s=t.z.object({participants:l.array(),questions:r.array(),deliveries:t.z.object({id:t.z.string(),bot:t.z.string(),text:t.z.string(),delivered:t.z.boolean()}).array(),relays:t.z.object({id:t.z.number(),bot:t.z.string(),text:t.z.string(),kind:o,messageId:t.z.string().nullable()}).array()});e.s(["RESUME_CHECK",0,"Resume from the saved state; inspect any tool whose result is missing before repeating it.","ROOM_THURSDAY",0,"Thursday","ROOM_USER",0,"The user","RoomMessageSchema",0,i,"RoomViewSchema",0,s])},517435,e=>{"use strict";var t=e.i(794588);e.s(["default",0,t])}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=_1frcwj1._.js.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
module.exports=[159479,e=>e.a(async(t,a)=>{try{var i=e.i(847841),n=e.i(983477),r=e.i(687388),o=e.i(386075),s=e.i(54282),l=e.i(316172),h=e.i(349047),c=e.i(625441),d=e.i(170801),u=e.i(926435),m=e.i(770639),w=e.i(418919),p=e.i(489956),f=e.i(740852),y=e.i(205863),g=e.i(41181),b=e.i(353885),S=e.i(123203),T=e.i(944971),O=e.i(636882),$=e.i(786025),k=e.i(704161),_=e.i(640911),v=e.i(53748),A=e.i(388439),M=e.i(41444),E=t([o,l,u,m,w,p,f,g,O]);async function N(t){let{listThreadOverview:a}=await e.A(866938),i=await a();if(!i.length)return"No thread has been started yet.";let n=i.map(e=>`"${e.label}" (${e.bot}, ${e.status})`).join(", ");return`There is no thread called "${t}". The latest are: ${n}. Call again with one of those labels.`}async function x(e,t){let a=[];for(let[e,n]of Object.entries(t)){let t=await (0,i.asSchema)(n.inputSchema).jsonSchema,r="string"==typeof n.description?n.description:"";a.push({name:e,tokens:(0,A.estimateTokens)(r)+(0,A.estimateTokens)(JSON.stringify(t))})}a.sort((e,t)=>t.tokens-e.tokens);let n=a.reduce((e,t)=>e+t.tokens,0);_.logger.debug(`${e} tools ${n} tokens over ${a.length} — ${a.map(e=>`${e.name} ${e.tokens}`).join(", ")}`)}async function L(e){let t=await j(e);return r.IS_DEV&&await x(e.target,t),t}async function j(t){if("memory-edit"===t.target)return(0,m.createMemoryTools)("user",null,{countReads:!1});let a=(0,m.createMemoryTools)("call","thursday"===t.target?t.callId??null:null),_=await (0,$.openWorkspace)();if("thursday"===t.target){var A;let c,u,m=t.readSkills?(0,g.createSkillTools)({sandbox:_,skills:await (0,O.loadSkills)(_)}):{},f=!!(t.written&&t.model&&(0,o.seesToolImages)(t.model));return{...a,...m,...(0,S.createWorkspaceTools)(_,{write:!1,timeoutMs:r.CALL_EXEC_TIMEOUT_MS}),...!1===t.webSearch?{}:await (0,p.createCallSearchTool)(_),...Object.fromEntries(Object.entries((A=t.callId,c=async t=>{let{resolveThread:a}=await e.A(866938);return(t.trim()?await a(t.trim()):null)??await N(t)},u=async(t,a,i)=>{let n=await e.A(994193);try{return await n.answerThread(t,a,"thursday",i)}catch(e){if((0,v.isPublicError)(e))return e.message;throw e}},{[b.TOOL_NAMES.thread_start]:(0,i.tool)({description:l.threadStartSpec.description,inputSchema:l.threadStartSpec.parameters,execute:async({bot:t,request:a,label:i})=>{let{findJobBot:n,listJobBots:r}=await e.A(814317),o=await n(t);if(!o||o.disabled){let e=(await r()).map(e=>e.name);return`There is no bot called "${t}". The bots are: ${e.join(", ")}. Nothing was started — call again with one of those.`}let{startThread:s}=await e.A(994193);return{threadId:await s({bot:o.name,request:a,label:i,callId:A,from:"thursday"}),note:`${o.name} has "${i}". Its updates reach the conversation on their own. Anything further about this work — a correction, the next step once it finishes — is \`${b.TOOL_NAMES.thread_tell}\` with "${i}"; a question it asks is answered with \`${b.TOOL_NAMES.thread_answer}\`.`}}}),[b.TOOL_NAMES.thread_tell]:(0,i.tool)({description:l.threadTellSpec.description,inputSchema:l.threadTellSpec.parameters,execute:async({thread:e,words:t})=>{let a=await c(e);if("string"==typeof a)return a;if(!t.trim())return"Say what to pass on.";let i=await u(a.id,t.trim());return"string"==typeof i?i:i?.answered?{label:a.label,answered:i.answered,note:`${i.answered.bot} was waiting on a question, and took this as its answer.`}:{label:a.label,bot:i?.to??a.bot,status:"running",note:"running"===a.status?"The bot reads it before its next step.":"The bot picks the thread back up from there."}}}),[b.TOOL_NAMES.thread_answer]:(0,i.tool)({description:l.threadAnswerSpec.description,inputSchema:l.threadAnswerSpec.parameters,execute:async({thread:t,bot:a,answer:i})=>{let n=await c(t);if("string"==typeof n)return n;if(!i.trim())return"Say what the answer is.";let{findThreadView:r}=await e.A(866938),o=(await r(n.id))?.room.questions??[],s=o.find(e=>e.bot.toLowerCase()===a.trim().toLowerCase());if(!s)return o.length?`${a} is not asking anything in "${n.label}". Waiting there: ${o.map(e=>e.bot).join(", ")}. Call again with that bot.`:`No question is waiting in "${n.label}". To say something else to it, use \`${b.TOOL_NAMES.thread_tell}\`.`;let l=await u(n.id,i.trim(),s.bot);return"string"==typeof l?l:{label:n.label,answered:l?.answered??{bot:s.bot,question:s.text},note:`${s.bot} has the answer to its question and goes on from it.`}}}),[b.TOOL_NAMES.thread_status]:(0,i.tool)({description:l.threadStatusSpec.description,inputSchema:l.threadStatusSpec.parameters,execute:async({thread:t})=>{let{listThreadOverview:a,findThreadView:i}=await e.A(866938),o={now:(0,s.clockNow)()},l=e=>(0,n.formatDistanceToNowStrict)((0,k.toDate)(e),{addSuffix:!0});if(!(!t.trim()||"all"===t.trim().toLowerCase())){let e=await c(t);if("string"==typeof e)return e;let a=(await i(e.id))?.room;return{...o,label:e.label,id:e.id,bot:e.bot,participants:a?.participants??[],questions:a?.questions??[],status:e.status,since:l(e.updatedAt),outcome:e.outcome,..."waiting"===e.status&&e.pending?.options.length?{options:e.pending.options}:{}}}let h=await a();return h.length?{...o,threads:h.map(e=>({id:e.id,label:e.label,bot:e.bot,status:e.status,participants:e.room.participants,questions:e.room.questions.map(e=>({...e,text:(0,M.clip)(e.text,r.PROMPT_LINE.threadStatus)})),since:l(e.updatedAt),...e.ask?{asking:e.ask.question,options:e.ask.options}:{},..."running"===e.status?{now:(0,T.threadActivity)(e.lines)}:{},...e.outcome&&"waiting"!==e.status?{outcome:(0,M.clip)(e.outcome,r.PROMPT_LINE.threadStatus)}:{}}))}:"No thread has been started yet."}}),[b.TOOL_NAMES.thread_cancel]:(0,i.tool)({description:l.threadCancelSpec.description,inputSchema:l.threadCancelSpec.parameters,execute:async({thread:t})=>{let a=await c(t);if("string"==typeof a)return a;let{cancelThread:i}=await e.A(994193);return await i(a.id),{label:a.label,status:"cancelled"}}}),[b.TOOL_NAMES.thread_show]:(0,i.tool)({description:l.threadShowSpec.description,inputSchema:l.threadShowSpec.parameters,execute:async({thread:t})=>{let a=await c(t);if("string"==typeof a)return a;let{appEvents:i}=await e.A(522275),{filesOnDisk:n}=await e.A(149325),{leadFirst:r,pathsIn:o,viewKindOf:s}=await e.A(628124),l=(await n(o(a.outcome??""),null)).filter(e=>"none"!==s(e));if(!l.length)return i.emit({type:"showThread",threadId:a.id}),{label:a.label,showing:"the thread"};let h=r(l);i.emit({type:"showFile",paths:h});let{markSeen:d}=await e.A(866938);return await d([a.id]),{label:a.label,showing:h[0]}}}),[b.TOOL_NAMES.thread_seen]:(0,i.tool)({description:l.threadSeenSpec.description,inputSchema:l.threadSeenSpec.parameters,execute:async({thread:t})=>{let a=await c(t);if("string"==typeof a)return a;let{markSeen:i}=await e.A(866938);return await i([a.id]),{label:a.label,seen:!0}}})})).filter(([e])=>!(t.phone&&e===b.TOOL_NAMES.thread_show))),...(0,w.createRoutineTools)(),...f?(0,d.createLookTool)():{},...t.written?{}:(0,h.callTools)()}}let E=await (0,O.loadSkills)(_,t.bot),x={...(0,$.jobShellEnv)(t.session),...(0,$.botShellEnv)(t.bot,(await (await e.A(814317)).findJobBot(t.bot))?.icon)},L=!!(t.model&&(0,o.seesToolImages)(t.model.ref));return{[b.TOOL_NAMES.memory_recall]:a[b.TOOL_NAMES.memory_recall],...await (0,p.createSearchTool)(t.model,_),...(0,S.createWorkspaceTools)(_,{write:!0,env:x,guide:!0,bot:t.bot}),...await (0,u.createMcpTools)(t.bot,_),...(0,g.createSkillTools)({sandbox:_,skills:E,bot:t.bot}),...await (0,f.createSelfTools)(t.bot),...(0,c.createDeckTools)(_,t.bot,x,L),...L?(0,d.createLookTool)():{},...(0,y.createSignInTools)(_,t.bot,(0,$.jobShellEnv)(t.session)),...await (0,l.createThreadRecallTool)(t.bot,t.thread??null)}}[o,l,u,m,w,p,f,g,O]=E.then?(await E)():E,e.s(["loadTools",0,L]),a()}catch(e){a(e)}},!1),54282,e=>{"use strict";var t=e.i(343747),a=e.i(983477),i=e.i(687388),n=e.i(353885),r=e.i(280809);n.TOOL_NAMES.memory_recall,n.TOOL_NAMES.memory_create,n.TOOL_NAMES.memory_remember,n.TOOL_NAMES.memory_describe,n.TOOL_NAMES.memory_forget,n.TOOL_NAMES.bash,n.TOOL_NAMES.web_search,n.TOOL_NAMES.load_skill,n.TOOL_NAMES.look_at,n.TOOL_NAMES.make_deck,n.TOOL_NAMES.end_call,n.TOOL_NAMES.routine,n.TOOL_NAMES.thread_tell,n.TOOL_NAMES.thread_answer,n.TOOL_NAMES.thread_status,n.TOOL_NAMES.thread_show,n.TOOL_NAMES.thread_cancel,n.TOOL_NAMES.thread_seen;var o=e.i(704161),s=e.i(640911),l=e.i(388439),h=e.i(41444);let c=(e=new Date)=>`${(0,t.format)(e,"yyyy-MM-dd (EEE) HH:mm")} ${Intl.DateTimeFormat().resolvedOptions().timeZone}`,d=(e=new Date)=>`**Now**: ${c(e)}`,u=e=>`${(0,t.format)(e,"yyyy-MM-dd (EEE) HH:mm")} (${(0,a.formatDistanceToNowStrict)(e,{addSuffix:!0})})`,m={[n.STUDIO_TOOLS.generate_image]:"images",[n.STUDIO_TOOLS.generate_speech]:"speech",[n.STUDIO_TOOLS.transcribe]:"transcription",[n.STUDIO_TOOLS.generate_video]:"video"};e.s(["botWorkHead",0,function(e,i){let n=(0,a.formatDistanceToNowStrict)(e.updatedAt,{addSuffix:!0}),r="running"===e.status?`running, last moved ${n}`:e.asking?`waiting on the user's answer since ${n}`:"waiting"===e.status?`stopped ${n}, not finished`:`${"done"===e.status?"ended":"stopped by the user"} ${(0,t.format)(e.updatedAt,"yyyy-MM-dd")}`;return`"${e.label}" — ${e.owner===i?"yours":`${e.owner}'s`} — ${r}`},"clockNow",0,c,"logPromptSize",0,function(e,t){let a=(0,l.sectionTokens)(t),n=a.reduce((e,t)=>e+t.tokens,0);s.logger.debug(`${e} prompt ${n} tokens — ${a.map(e=>`${e.name} ${e.tokens}`).join(", ")}`);let r=a[0];n>i.PROMPT_BUDGET&&r&&s.logger.warn(`${e} prompt is ${n} tokens, over ${i.PROMPT_BUDGET}: ${r.name} carries ${r.tokens} of it. Every call and every job pays this.`)},"mcpToolLines",0,function(e){let t=new Map;for(let a of e){let e=t.get(a.server);e?e.push(a.name):t.set(a.server,[a.name])}return[...t].map(([e,t])=>`- **${e}**: ${t.join(", ")}`).join("\n")},"noteLines",0,function(e,t=!1){return e.length?e.map(e=>{var a;let i,n=t?` \xb7 ${a=e.lastSeenAt,(i=Math.floor((Date.now()-(0,o.toDate)(a).getTime())/864e5))>=365?`${Math.floor(i/365)}y`:i>=30?`${Math.floor(i/30)}mo`:`${Math.max(i,0)}d`}`:"";return`- ${e.path} — ${e.description?.trim()} (${e.factCount})${n}`}).join("\n"):"(nothing saved yet)"},"nowLine",0,d,"reachNames",0,function(e,t){let a=t.map(e=>e.server===i.STUDIO_SERVER?m[e.name]??e.name:e.server);return[...new Set([...e.map(e=>e.name),...a])].join(", ")},"recentCallLines",0,function(e,t){let a=[],r=0;e:for(let o=e.length-1;o>=0;o--){let s=e[o];for(let e=s.turns.length-1;e>=0;e--){let o=function(e,t){if("tool"!==e.role)return`${"user"===e.role?"user":"you"}: ${e.text}`;let a=function(e,t){if(e!==n.TOOL_NAMES.web_search)return null;try{var a;let e=JSON.parse(t);return{query:"string"==typeof e.query?e.query:null,sources:(a=e.sources,Array.isArray(a)?a.flatMap(e=>e&&"object"==typeof e&&"string"==typeof e.url?[e]:[]):[])}}catch{return null}}(e.tool,e.text);if(a){let t=[...new Set(a.sources.flatMap(e=>(0,h.hostOf)(e.url)??[]))];return`you → ${e.tool} "${(0,h.clip)(a.query??"",i.PROMPT_LINE.toolArgs)}"${t.length?` — ${t.join(", ")}`:""}`}let r=`you → ${e.tool??"tool"} ${(0,h.clip)(e.text,i.PROMPT_LINE.toolArgs)}`;if(e.tool!==n.TOOL_NAMES.thread_start)return r;let o=function(e,t){if(e!==n.TOOL_NAMES.thread_start)return null;try{let e=JSON.parse(t);return"string"==typeof e.label?e.label:null}catch{return null}}(e.tool,e.text),s=o?t.jobs?.find(e=>e.label===o):void 0;if(!s)return r;let l=s.outcome?`: ${(0,h.clip)(s.outcome,i.PROMPT_LINE.jobOutcome)}`:"";return`you → ${e.tool} "${s.label}" (${s.id}) — ${s.status}${l}`}(s.turns[e],s),c=(0,l.estimateTokens)(o)+3;if(r+c>t&&a.length)break e;r+=c,a.push({call:s,line:o})}}a.reverse();let o=[],s=null;for(let{call:e,line:t}of a)e!==s&&(s=e,o.push(`### ${u(e.startedAt)}`)),o.push(t);return o.join("\n")},"saidStamp",0,e=>(0,t.format)(e,"yyyy-MM-dd (EEE) HH:mm"),"skillLines",0,(e,t={})=>e.map(e=>{var a;let n,o;return`- **${e.name}**: ${t.short?(a=e.description,n=i.PROMPT_LINE.skill,(o=(0,r.firstSentence)(a)).length>n?`${o.slice(0,n).trim()}…`:o):e.description}`}).join("\n"),"styleLines",0,e=>e?.trim()?`## Who they want you to be
|
|
1
|
+
module.exports=[159479,e=>e.a(async(t,a)=>{try{var i=e.i(847841),n=e.i(983477),r=e.i(687388),o=e.i(386075),s=e.i(54282),l=e.i(316172),h=e.i(349047),c=e.i(625441),d=e.i(170801),u=e.i(926435),m=e.i(770639),w=e.i(418919),p=e.i(489956),f=e.i(740852),y=e.i(205863),g=e.i(41181),b=e.i(353885),S=e.i(123203),T=e.i(944971),O=e.i(636882),$=e.i(786025),k=e.i(704161),_=e.i(640911),v=e.i(53748),A=e.i(388439),M=e.i(41444),E=t([o,l,u,m,w,p,f,g,O]);async function N(t){let{listThreadOverview:a}=await e.A(866938),i=await a();if(!i.length)return"No thread has been started yet.";let n=i.map(e=>`"${e.label}" (${e.bot}, ${e.status})`).join(", ");return`There is no thread called "${t}". The latest are: ${n}. Call again with one of those labels.`}async function x(e,t){let a=[];for(let[e,n]of Object.entries(t)){let t=await (0,i.asSchema)(n.inputSchema).jsonSchema,r="string"==typeof n.description?n.description:"";a.push({name:e,tokens:(0,A.estimateTokens)(r)+(0,A.estimateTokens)(JSON.stringify(t))})}a.sort((e,t)=>t.tokens-e.tokens);let n=a.reduce((e,t)=>e+t.tokens,0);_.logger.debug(`${e} tools ${n} tokens over ${a.length} — ${a.map(e=>`${e.name} ${e.tokens}`).join(", ")}`)}async function L(e){let t=await j(e);return r.IS_DEV&&await x(e.target,t),t}async function j(t){if("memory-edit"===t.target)return(0,m.createMemoryTools)("user",null,{countReads:!1});let a=(0,m.createMemoryTools)("call","thursday"===t.target?t.callId??null:null),_=await (0,$.openWorkspace)();if("thursday"===t.target){var A;let c,u,m=t.readSkills?(0,g.createSkillTools)({sandbox:_,skills:await (0,O.loadSkills)(_)}):{},f=!!(t.written&&t.model&&(0,o.seesToolImages)(t.model));return{...a,...m,...(0,S.createWorkspaceTools)(_,{write:!1,timeoutMs:r.CALL_EXEC_TIMEOUT_MS}),...!1===t.webSearch?{}:await (0,p.createCallSearchTool)(_),...Object.fromEntries(Object.entries((A=t.callId,c=async t=>{let{resolveThread:a}=await e.A(866938);return(t.trim()?await a(t.trim()):null)??await N(t)},u=async(t,a,i)=>{let n=await e.A(994193);try{return await n.answerThread(t,a,"thursday",i)}catch(e){if((0,v.isPublicError)(e))return e.message;throw e}},{[b.TOOL_NAMES.thread_start]:(0,i.tool)({description:l.threadStartSpec.description,inputSchema:l.threadStartSpec.parameters,execute:async({bot:t,request:a,label:i})=>{let{findJobBot:n,listJobBots:r}=await e.A(814317),o=await n(t);if(!o||o.disabled){let e=(await r()).map(e=>e.name);return`There is no bot called "${t}". The bots are: ${e.join(", ")}. Nothing was started — call again with one of those.`}let{startThread:s}=await e.A(994193);return{threadId:await s({bot:o.name,request:a,label:i,callId:A,from:"thursday"}),bot:o.name,label:i,note:`${o.name} has "${i}". Its updates reach the conversation on their own. Anything further about this work — a correction, the next step once it finishes — is \`${b.TOOL_NAMES.thread_tell}\` with "${i}"; a question it asks is answered with \`${b.TOOL_NAMES.thread_answer}\`.`}}}),[b.TOOL_NAMES.thread_tell]:(0,i.tool)({description:l.threadTellSpec.description,inputSchema:l.threadTellSpec.parameters,execute:async({thread:e,words:t})=>{let a=await c(e);if("string"==typeof a)return a;if(!t.trim())return"Say what to pass on.";let i=await u(a.id,t.trim());return"string"==typeof i?i:i?.answered?{label:a.label,answered:i.answered,note:`${i.answered.bot} was waiting on a question, and took this as its answer.`}:{label:a.label,bot:i?.to??a.bot,status:"running",note:"running"===a.status?"The bot reads it before its next step.":"The bot picks the thread back up from there."}}}),[b.TOOL_NAMES.thread_answer]:(0,i.tool)({description:l.threadAnswerSpec.description,inputSchema:l.threadAnswerSpec.parameters,execute:async({thread:t,bot:a,answer:i})=>{let n=await c(t);if("string"==typeof n)return n;if(!i.trim())return"Say what the answer is.";let{findThreadView:r}=await e.A(866938),o=(await r(n.id))?.room.questions??[],s=o.find(e=>e.bot.toLowerCase()===a.trim().toLowerCase());if(!s)return o.length?`${a} is not asking anything in "${n.label}". Waiting there: ${o.map(e=>e.bot).join(", ")}. Call again with that bot.`:`No question is waiting in "${n.label}". To say something else to it, use \`${b.TOOL_NAMES.thread_tell}\`.`;let l=await u(n.id,i.trim(),s.bot);return"string"==typeof l?l:{label:n.label,answered:l?.answered??{bot:s.bot,question:s.text},note:`${s.bot} has the answer to its question and goes on from it.`}}}),[b.TOOL_NAMES.thread_status]:(0,i.tool)({description:l.threadStatusSpec.description,inputSchema:l.threadStatusSpec.parameters,execute:async({thread:t})=>{let{listThreadOverview:a,findThreadView:i}=await e.A(866938),o={now:(0,s.clockNow)()},l=e=>(0,n.formatDistanceToNowStrict)((0,k.toDate)(e),{addSuffix:!0});if(!(!t.trim()||"all"===t.trim().toLowerCase())){let e=await c(t);if("string"==typeof e)return e;let a=(await i(e.id))?.room;return{...o,label:e.label,id:e.id,bot:e.bot,participants:a?.participants??[],questions:a?.questions??[],status:e.status,since:l(e.updatedAt),outcome:e.outcome,..."waiting"===e.status&&e.pending?.options.length?{options:e.pending.options}:{}}}let h=await a();return h.length?{...o,threads:h.map(e=>({id:e.id,label:e.label,bot:e.bot,status:e.status,participants:e.room.participants,questions:e.room.questions.map(e=>({...e,text:(0,M.clip)(e.text,r.PROMPT_LINE.threadStatus)})),since:l(e.updatedAt),...e.ask?{asking:e.ask.question,options:e.ask.options}:{},..."running"===e.status?{now:(0,T.threadActivity)(e.lines)}:{},...e.outcome&&"waiting"!==e.status?{outcome:(0,M.clip)(e.outcome,r.PROMPT_LINE.threadStatus)}:{}}))}:"No thread has been started yet."}}),[b.TOOL_NAMES.thread_cancel]:(0,i.tool)({description:l.threadCancelSpec.description,inputSchema:l.threadCancelSpec.parameters,execute:async({thread:t})=>{let a=await c(t);if("string"==typeof a)return a;let{cancelThread:i}=await e.A(994193);return await i(a.id),{label:a.label,status:"cancelled"}}}),[b.TOOL_NAMES.thread_show]:(0,i.tool)({description:l.threadShowSpec.description,inputSchema:l.threadShowSpec.parameters,execute:async({thread:t})=>{let a=await c(t);if("string"==typeof a)return a;let{appEvents:i}=await e.A(522275),{filesOnDisk:n}=await e.A(149325),{leadFirst:r,pathsIn:o,viewKindOf:s}=await e.A(628124),l=(await n(o(a.outcome??""),null)).filter(e=>"none"!==s(e));if(!l.length)return i.emit({type:"showThread",threadId:a.id}),{label:a.label,showing:"the thread"};let h=r(l);i.emit({type:"showFile",paths:h});let{markSeen:d}=await e.A(866938);return await d([a.id]),{label:a.label,showing:h[0]}}}),[b.TOOL_NAMES.thread_seen]:(0,i.tool)({description:l.threadSeenSpec.description,inputSchema:l.threadSeenSpec.parameters,execute:async({thread:t})=>{let a=await c(t);if("string"==typeof a)return a;let{markSeen:i}=await e.A(866938);return await i([a.id]),{label:a.label,seen:!0}}})})).filter(([e])=>!(t.phone&&e===b.TOOL_NAMES.thread_show))),...(0,w.createRoutineTools)(),...f?(0,d.createLookTool)():{},...t.written?{}:(0,h.callTools)()}}let E=await (0,O.loadSkills)(_,t.bot),x={...(0,$.jobShellEnv)(t.session),...(0,$.botShellEnv)(t.bot,(await (await e.A(814317)).findJobBot(t.bot))?.icon)},L=!!(t.model&&(0,o.seesToolImages)(t.model.ref));return{[b.TOOL_NAMES.memory_recall]:(0,m.createMemoryTools)("call",null,{tidies:!1})[b.TOOL_NAMES.memory_recall],...await (0,p.createSearchTool)(t.model,_),...(0,S.createWorkspaceTools)(_,{write:!0,env:x,guide:!0,bot:t.bot}),...await (0,u.createMcpTools)(t.bot,_),...(0,g.createSkillTools)({sandbox:_,skills:E,bot:t.bot}),...await (0,f.createSelfTools)(t.bot),...(0,c.createDeckTools)(_,t.bot,x,L),...L?(0,d.createLookTool)():{},...(0,y.createSignInTools)(_,t.bot,(0,$.jobShellEnv)(t.session)),...await (0,l.createThreadRecallTool)(t.bot,t.thread??null)}}[o,l,u,m,w,p,f,g,O]=E.then?(await E)():E,e.s(["loadTools",0,L]),a()}catch(e){a(e)}},!1),54282,e=>{"use strict";var t=e.i(343747),a=e.i(983477),i=e.i(687388),n=e.i(353885),r=e.i(280809);n.TOOL_NAMES.memory_recall,n.TOOL_NAMES.memory_create,n.TOOL_NAMES.memory_remember,n.TOOL_NAMES.memory_describe,n.TOOL_NAMES.memory_forget,n.TOOL_NAMES.bash,n.TOOL_NAMES.web_search,n.TOOL_NAMES.load_skill,n.TOOL_NAMES.look_at,n.TOOL_NAMES.make_deck,n.TOOL_NAMES.end_call,n.TOOL_NAMES.routine,n.TOOL_NAMES.thread_tell,n.TOOL_NAMES.thread_answer,n.TOOL_NAMES.thread_status,n.TOOL_NAMES.thread_show,n.TOOL_NAMES.thread_cancel,n.TOOL_NAMES.thread_seen;var o=e.i(704161),s=e.i(640911),l=e.i(388439),h=e.i(41444);let c=(e=new Date)=>`${(0,t.format)(e,"yyyy-MM-dd (EEE) HH:mm")} ${Intl.DateTimeFormat().resolvedOptions().timeZone}`,d=(e=new Date)=>`**Now**: ${c(e)}`,u=e=>`${(0,t.format)(e,"yyyy-MM-dd (EEE) HH:mm")} (${(0,a.formatDistanceToNowStrict)(e,{addSuffix:!0})})`,m={[n.STUDIO_TOOLS.generate_image]:"images",[n.STUDIO_TOOLS.generate_speech]:"speech",[n.STUDIO_TOOLS.transcribe]:"transcription",[n.STUDIO_TOOLS.generate_video]:"video"};e.s(["botWorkHead",0,function(e,i){let n=(0,a.formatDistanceToNowStrict)(e.updatedAt,{addSuffix:!0}),r="running"===e.status?`running, last moved ${n}`:e.asking?`waiting on the user's answer since ${n}`:"waiting"===e.status?`stopped ${n}, not finished`:`${"done"===e.status?"ended":"stopped by the user"} ${(0,t.format)(e.updatedAt,"yyyy-MM-dd")}`;return`"${e.label}" — ${e.owner===i?"yours":`${e.owner}'s`} — ${r}`},"clockNow",0,c,"logPromptSize",0,function(e,t){let a=(0,l.sectionTokens)(t),n=a.reduce((e,t)=>e+t.tokens,0);s.logger.debug(`${e} prompt ${n} tokens — ${a.map(e=>`${e.name} ${e.tokens}`).join(", ")}`);let r=a[0];n>i.PROMPT_BUDGET&&r&&s.logger.warn(`${e} prompt is ${n} tokens, over ${i.PROMPT_BUDGET}: ${r.name} carries ${r.tokens} of it. Every call and every job pays this.`)},"mcpToolLines",0,function(e){let t=new Map;for(let a of e){let e=t.get(a.server);e?e.push(a.name):t.set(a.server,[a.name])}return[...t].map(([e,t])=>`- **${e}**: ${t.join(", ")}`).join("\n")},"noteLines",0,function(e,t=!1){return e.length?e.map(e=>{var a;let i,n=t?` \xb7 ${a=e.lastSeenAt,(i=Math.floor((Date.now()-(0,o.toDate)(a).getTime())/864e5))>=365?`${Math.floor(i/365)}y`:i>=30?`${Math.floor(i/30)}mo`:`${Math.max(i,0)}d`}`:"";return`- ${e.path} — ${e.description?.trim()} (${e.factCount})${n}`}).join("\n"):"(nothing saved yet)"},"nowLine",0,d,"reachNames",0,function(e,t){let a=t.map(e=>e.server===i.STUDIO_SERVER?m[e.name]??e.name:e.server);return[...new Set([...e.map(e=>e.name),...a])].join(", ")},"recentCallLines",0,function(e,t){let a=[],r=0;e:for(let o=e.length-1;o>=0;o--){let s=e[o];for(let e=s.turns.length-1;e>=0;e--){let o=function(e,t){if("tool"!==e.role)return`${"user"===e.role?"user":"you"}: ${e.text}`;let a=function(e,t){if(e!==n.TOOL_NAMES.web_search)return null;try{var a;let e=JSON.parse(t);return{query:"string"==typeof e.query?e.query:null,sources:(a=e.sources,Array.isArray(a)?a.flatMap(e=>e&&"object"==typeof e&&"string"==typeof e.url?[e]:[]):[])}}catch{return null}}(e.tool,e.text);if(a){let t=[...new Set(a.sources.flatMap(e=>(0,h.hostOf)(e.url)??[]))];return`you → ${e.tool} "${(0,h.clip)(a.query??"",i.PROMPT_LINE.toolArgs)}"${t.length?` — ${t.join(", ")}`:""}`}let r=`you → ${e.tool??"tool"} ${(0,h.clip)(e.text,i.PROMPT_LINE.toolArgs)}`;if(e.tool!==n.TOOL_NAMES.thread_start)return r;let o=function(e,t){if(e!==n.TOOL_NAMES.thread_start)return null;try{let e=JSON.parse(t);return"string"==typeof e.label?e.label:null}catch{return null}}(e.tool,e.text),s=o?t.jobs?.find(e=>e.label===o):void 0;if(!s)return r;let l=s.outcome?`: ${(0,h.clip)(s.outcome,i.PROMPT_LINE.jobOutcome)}`:"";return`you → ${e.tool} "${s.label}" (${s.id}) — ${s.status}${l}`}(s.turns[e],s),c=(0,l.estimateTokens)(o)+3;if(r+c>t&&a.length)break e;r+=c,a.push({call:s,line:o})}}a.reverse();let o=[],s=null;for(let{call:e,line:t}of a)e!==s&&(s=e,o.push(`### ${u(e.startedAt)}`)),o.push(t);return o.join("\n")},"saidStamp",0,e=>(0,t.format)(e,"yyyy-MM-dd (EEE) HH:mm"),"skillLines",0,(e,t={})=>e.map(e=>{var a;let n,o;return`- **${e.name}**: ${t.short?(a=e.description,n=i.PROMPT_LINE.skill,(o=(0,r.firstSentence)(a)).length>n?`${o.slice(0,n).trim()}…`:o):e.description}`}).join("\n"),"styleLines",0,e=>e?.trim()?`## Who they want you to be
|
|
2
2
|
|
|
3
3
|
Their own words, on top of the character above: how you talk to them, how much to say, what to leave out. Where they differ from anything above, theirs wins.
|
|
4
4
|
|
|
5
5
|
${e.trim()}`:"","thursdayIdentity",0,(e=new Date)=>`You are Thursday, this user's own: their friend first, and their assistant second — someone they call because they want to talk to you, who can also get whatever they need done in the background. Named after Friday, the AI in *Iron Man*: a name, not a day of the week. ${d(e)}
|
|
6
6
|
|
|
7
|
-
What they tell you is kept, so you know them better over time.`,"tidying",0,e=>({crowded:e.reduce((e,t)=>e+t.factCount,0)>i.MEMORY_LIMITS.facts,heavy:e.filter(e=>e.factCount>i.MEMORY_LIMITS.factsPerNote)})],54282)},316172,e=>e.a(async(t,a)=>{try{var i=e.i(847841),n=e.i(907855),r=e.i(687388),o=e.i(54282),s=e.i(353885),l=e.i(944971),h=e.i(889034),c=e.i(378884),d=e.i(41444),u=t([c]);[c]=u.then?(await u)():u;let w=n.string().describe("Its label or id."),p={description:"Start a new thread: hand work to a bot. Returns a receipt at once; the work runs in the background and its updates reach the conversation on their own.",parameters:n.object({bot:n.string().describe("A name from the bot list."),request:n.string().describe("The whole of the work. The bot cannot hear the call, so everything it needs goes here — names, paths, what the user actually asked for — in their own language and their own words: it is the only language the bot has, and whatever it writes comes back to them. **Their request, never your reading of it**: a condition, a caution or a smaller goal they did not say is how work comes back as the wrong thing. When their words leave a real choice open, ask them on the call and put the answer here."),label:n.string().describe("Two or three words naming the thread, in the user's language. Used on screen and said out loud.")})},f={description:"Say something to a thread that exists. Its bot reads it with everything the thread already holds.",parameters:n.object({thread:w,words:n.string().describe("What to tell its bot, in the user's language and words.")})},y={description:`Answer a question a bot asked the user. Only for a question that is waiting; anything else said to a thread is \`${s.TOOL_NAMES.thread_tell}\`.`,parameters:n.object({thread:w,bot:n.string().describe("The bot that asked."),answer:n.string().describe("The user's answer, in their words.")})},g={description:`Read threads as they are now. "all" lists up to ${r.THREAD_STATUS_LIMIT}, running and waiting work before recent endings; a label or an id reads that one whole, with its result and any question waiting.`,parameters:n.object({thread:n.string().describe('"all", or one thread by its label or its id.')})},b={description:"Stop a thread
|
|
7
|
+
What they tell you is kept, so you know them better over time.`,"tidying",0,e=>({crowded:e.reduce((e,t)=>e+t.factCount,0)>i.MEMORY_LIMITS.facts,heavy:e.filter(e=>e.factCount>i.MEMORY_LIMITS.factsPerNote)})],54282)},316172,e=>e.a(async(t,a)=>{try{var i=e.i(847841),n=e.i(907855),r=e.i(687388),o=e.i(54282),s=e.i(353885),l=e.i(944971),h=e.i(889034),c=e.i(378884),d=e.i(41444),u=t([c]);[c]=u.then?(await u)():u;let w=n.string().describe("Its label or id."),p={description:"Start a new thread: hand work to a bot. Returns a receipt at once; the work runs in the background and its updates reach the conversation on their own.",parameters:n.object({bot:n.string().describe("A name from the bot list."),request:n.string().describe("The whole of the work. The bot cannot hear the call, so everything it needs goes here — names, paths, what the user actually asked for — in their own language and their own words: it is the only language the bot has, and whatever it writes comes back to them. **Their request, never your reading of it**: a condition, a caution or a smaller goal they did not say is how work comes back as the wrong thing. When their words leave a real choice open, ask them on the call and put the answer here."),label:n.string().describe("Two or three words naming the thread, in the user's language. Used on screen and said out loud.")})},f={description:"Say something to a thread that exists. Its bot reads it with everything the thread already holds.",parameters:n.object({thread:w,words:n.string().describe("What to tell its bot, in the user's language and words.")})},y={description:`Answer a question a bot asked the user. Only for a question that is waiting; anything else said to a thread is \`${s.TOOL_NAMES.thread_tell}\`.`,parameters:n.object({thread:w,bot:n.string().describe("The bot that asked."),answer:n.string().describe("The user's answer, in their words.")})},g={description:`Read threads as they are now. "all" lists up to ${r.THREAD_STATUS_LIMIT}, running and waiting work before recent endings; a label or an id reads that one whole, with its result and any question waiting.`,parameters:n.object({thread:n.string().describe('"all", or one thread by its label or its id.')})},b={description:"Stop a thread now: its bot stops where it is. The thread is kept, and saying more to it later carries it on.",parameters:n.object({thread:w})},S={description:"Put a thread in front of the user on their screen: the file it made, or the thread itself when it made none. Showing it also counts as them having seen its result.",parameters:n.object({thread:w})},T={description:"Mark a thread's result as seen by the user. It leaves the work waiting on them.",parameters:n.object({thread:w})},O={description:"Send a message to another bot or to Thursday; the delivery receipt comes back immediately. A bot answers with the final text of its turn, which reaches you later as a new message. Mark a question for Thursday to request user input; ordinary messages to Thursday are notifications and need no answer.",parameters:h.RoomMessageSchema.extend({kind:h.RoomMessageSchema.shape.kind.describe("Use question only when Thursday must obtain an answer from the user: it ends your turn, and you continue when the answer arrives. Use message for bot collaboration, progress updates and reports."),options:h.RoomMessageSchema.shape.options.describe("With a question, offer concise answer choices when useful. Omit for an open-ended question; the user can always type their own answer."),to:n.string().trim().min(1).describe("A bot from the roster other than the one you are answering, or Thursday to reach the user."),text:n.string().trim().min(1).describe("Write the message and include the context the recipient needs. A question to Thursday is put to the user word for word, on screen, on their phone and read aloud: write it to them."),why:n.string().trim().min(1).describe("What you need from them, in a few words, written for the user to read: they see who was brought in and what for.")})},$={description:"Open one of your other threads whole: what you were asked there and your last words in full.",parameters:n.object({id:n.string().describe("The id in brackets on its line under Your other threads.")})};async function m(e,t){let a=await (0,c.listBotWork)(e,t),n=[...a.open,...a.recent];if(!n.some(e=>e.cut))return{};let h=new Set;return{[s.TOOL_NAMES.thread_recall]:(0,i.tool)({description:$.description,inputSchema:$.parameters,execute:async({id:t})=>{let a=t.trim().replace(/^\[|\]$/g,"").toLowerCase(),i=n.find(e=>a.length>=4&&(e.id.startsWith(a)||e.label.toLowerCase()===a));if(!i)return`No thread "${t}" on your list. The ids there: ${n.filter(e=>e.cut).map(e=>(0,l.workHandle)(e.id)).join(", ")}.`;if(!i.cut)return"Its line already shows all of it.";if(h.has(i.id))return"Already opened above, this turn.";if(h.size>=r.BOT_WORK.reads)return`${r.BOT_WORK.reads} threads are open already this turn. Carry on with what you have.`;h.add(i.id);let s=await (0,c.readBotAsk)(e,i),u=i.said??"";return[(0,o.botWorkHead)(i,e),s?`You were asked: ${(0,d.clip)(s,r.BOT_WORK.asked)}`:"",`Your last words there:
|
|
8
8
|
${u.length>r.BOT_WORK.readChars?`${u.slice(0,r.BOT_WORK.readChars)}
|
|
9
9
|
[Cut here; the files it names hold the rest.]`:u}`].filter(Boolean).join("\n\n")}})}}e.s(["createThreadRecallTool",0,m,"sendMessageSpec",0,O,"threadAnswerSpec",0,y,"threadCancelSpec",0,b,"threadSeenSpec",0,T,"threadShowSpec",0,S,"threadStartSpec",0,p,"threadStatusSpec",0,g,"threadTellSpec",0,f]),a()}catch(e){a(e)}},!1),349047,e=>{"use strict";var t=e.i(847841),a=e.i(907855),i=e.i(353885);let n=Object.keys({A:[".##.","#..#","####","#..#","#..#"],B:["###.","#..#","###.","#..#","###."],C:[".###","#...","#...","#...",".###"],D:["###.","#..#","#..#","#..#","###."],E:["####","#...","###.","#...","####"],F:["####","#...","###.","#...","#..."],G:[".###","#...","#.##","#..#",".###"],H:["#..#","#..#","####","#..#","#..#"],I:["###",".#.",".#.",".#.","###"],J:["..##","...#","...#","#..#",".##."],K:["#..#","#.#.","##..","#.#.","#..#"],L:["#...","#...","#...","#...","####"],M:["#...#","##.##","#.#.#","#...#","#...#"],N:["#..#","##.#","#.##","#..#","#..#"],O:[".##.","#..#","#..#","#..#",".##."],P:["###.","#..#","###.","#...","#..."],Q:[".##.","#..#","#..#","#.#.",".#.#"],R:["###.","#..#","###.","#.#.","#..#"],S:[".###","#...",".##.","...#","###."],T:["###",".#.",".#.",".#.",".#."],U:["#..#","#..#","#..#","#..#",".##."],V:["#...#","#...#",".#.#.",".#.#.","..#.."],W:["#...#","#...#","#.#.#","##.##","#...#"],X:["#..#","#..#",".##.","#..#","#..#"],Y:["#.#","#.#",".#.",".#.",".#."],Z:["####","...#",".##.","#...","####"],0:[".##.","#.##","#..#","##.#",".##."],1:[".#.","##.",".#.",".#.","###"],2:["###.","...#",".##.","#...","####"],3:["###.","...#",".##.","...#","###."],4:["#..#","#..#","####","...#","...#"],5:["####","#...","###.","...#","###."],6:[".##.","#...","###.","#..#",".##."],7:["####","...#","..#.",".#..",".#.."],8:[".##.","#..#",".##.","#..#",".##."],9:[".##.","#..#",".###","...#",".##."],"!":["#","#","#",".","#"],"?":["###.","...#",".##.","....",".#.."],".":[".",".",".",".","#"],",":["..","..","..",".#","#."],"'":["#","#",".",".","."],"-":["...","...","###","...","..."],"+":["...",".#.","###",".#.","..."],":":[".","#",".","#","."],"(":[".#","#.","#.","#.",".#"],")":["#.",".#",".#",".#","#."],"<":["..#",".#.","#..",".#.","..#"],">":["#..",".#.","..#",".#.","#.."],"^":[".#.","#.#","...","...","..."],"~":["....",".#.#","#.#.","....","...."],"♥":[".#.#.","#####","#####",".###.","..#.."]," ":["..","..","..","..",".."]}).filter(e=>!/^[A-Z0-9 ]$/.test(e)),r={description:`End the call.
|
|
10
10
|
|
|
11
11
|
The line stays open until this runs, and drops once the goodbye being said is over.`,parameters:a.object({})},o=(0,t.tool)({description:r.description,inputSchema:r.parameters}),s={description:"Show a short word on your face for a few seconds.",parameters:a.object({text:a.string().describe(`Up to 8 characters: A-Z, 0-9, space and ${n.join(" ")}.`)})},l=(0,t.tool)({description:s.description,inputSchema:s.parameters});e.s(["callTools",0,function(){return{[i.TOOL_NAMES.end_call]:o,[i.TOOL_NAMES.emote]:l}}],349047)},625441,e=>{"use strict";var t=e.i(874533),a=e.i(912714),i=e.i(660526),n=e.i(750227),r=e.i(812057),o=e.i(847841),s=e.i(105249),l=e.i(687388),h=e.i(353885),c=e.i(629668),d=e.i(786025);let u=(0,n.join)(l.APP_DIR,l.PATHS.skills.default,"artifact",l.PATHS.skills.runtime,"deck","deck.mjs"),m=e=>s.default.string().trim().max(e),w=m(100).nullish().describe("A source or a date along the foot of the slide."),p=m(1500).nullish().describe("What the presenter says over it, as speech. Never shown."),f=s.default.object({layout:s.default.literal("cover"),title:m(110).describe("The deck's subject, as its title."),eyebrow:m(40).nullish().describe("A word or two above the title."),subtitle:m(180).nullish().describe("One line under the title."),footer:w,notes:p}),y=s.default.object({layout:s.default.literal("statement"),title:m(120).describe("The one claim, as a sentence."),subtitle:m(140).nullish().describe("One line under it."),notes:p}),g=s.default.object({layout:s.default.literal("cards"),title:m(90).describe("The point the cards make together."),cards:s.default.array(s.default.object({title:m(60).describe("Its point."),text:m(160).nullish().describe("One line under it.")})).min(2).max(4).describe("Two to four, side by side and numbered."),footer:w,notes:p}),b=s.default.object({layout:s.default.literal("number"),value:m(10).describe("The figure as it reads: 1.4M, 62%, £2,900. Only one you were given."),label:m(80).nullish().describe("What it counts, above it."),subtitle:m(160).nullish().describe("What it means or is compared with, under it."),footer:w,notes:p}),S=s.default.object({layout:s.default.literal("table"),title:m(90).describe("What the comparison shows."),columns:s.default.array(m(40)).min(2).max(5).describe("The header row. The first column names the rows; its header may be blank."),rows:s.default.array(s.default.array(m(60))).min(1).max(6).describe("Up to six, a cell for each column."),stress:s.default.number().int().min(0).max(4).nullish().describe("Which column, counted from 0, to set in the accent: the one the slide argues for."),footer:w,notes:p}),T=s.default.object({layout:s.default.literal("quote"),quote:m(280).describe("Someone's own words, exactly as you were given them. Never made up."),who:m(60).describe("Who said it."),role:m(80).nullish().describe("Their role, place or date."),notes:p}),O=s.default.object({layout:s.default.literal("image"),title:m(90).describe("The heading beside the picture."),subtitle:m(280).nullish().describe("A line or two under it."),image:m(500).describe("Workspace path of a png, jpg, webp, gif or svg. It is copied beside the deck."),alt:m(160).describe("What it shows, for someone who cannot see it."),fit:s.default.enum(["fill","whole"]).nullish().describe("fill crops a photo to its box; whole shows a chart or screenshot uncropped. Null for fill."),footer:w,notes:p}),$=s.default.object({layout:s.default.literal("close"),title:m(120).describe("The sentence to repeat to someone who was not there."),steps:s.default.array(s.default.object({label:m(24).describe("A word or two: Next, Owner, By."),text:m(120).describe("What it is.")})).max(3).nullish().describe("Up to three next steps."),notes:p}),k=s.default.object({layout:s.default.literal("timeline"),title:m(90).describe("What the dates show together."),steps:s.default.array(s.default.object({when:m(24).describe("When, as you were given it: a date, a week, a phase."),title:m(60).describe("What happens then."),text:m(120).nullish().describe("One line under it.")})).min(2).max(5).describe("Two to five, in order, along one line."),footer:w,notes:p}),_=s.default.object({layout:s.default.literal("compare"),title:m(90).describe("What changes between the two, as a sentence."),sides:s.default.array(s.default.object({label:m(30).describe("Which side it is: Now, After, Option A."),points:s.default.array(m(90)).min(1).max(4)})).length(2).describe("The two, left then right; the right is set in the accent: the side the slide argues for."),footer:w,notes:p}),v=s.default.object({layout:s.default.literal("stats"),title:m(90).describe("What the figures say together."),stats:s.default.array(s.default.object({value:m(12).describe("The figure as it reads: 1.4M, 62%, 6 hours. Only one you were given."),label:m(80).describe("What it counts, under it.")})).min(2).max(4).describe("Two to four figures side by side."),footer:w,notes:p}),A=s.default.discriminatedUnion("layout",[f,y,g,b,S,T,O,k,_,v,$]),M=s.default.object({deck:m(300).describe("A name for a new deck, or the name or workspace path of one to change. A deck another bot made is reached by its path."),title:m(90).describe("The deck's title, shown in its head."),theme:s.default.enum(["forest","sea","clay","ink"]).nullish().describe("forest (deep green on paper, serif headings), sea (blue, sans), clay (terracotta on warm paper, serif) or ink (gold on near-black, sans). Null keeps the deck's own; a new one starts in forest."),revision:s.default.string().nullish().describe("What the last call on this deck answered with. Null for a new deck."),slides:s.default.array(A).min(1).max(l.DECK.slides).describe("Every slide in order: the whole deck, each time. Someone who reads only the titles follows the argument; one idea a slide.")}),E=/^[\p{L}\p{N}][\p{L}\p{N}_-]{0,79}$/u,N=/^(slide-\d+|slides)\.png$/i;class x extends Error{}function L(e){let t=e.replace(/[^\p{L}\p{N}_-]+/gu,"-").replace(/^[-_]+|-+$/g,"").slice(0,80);if(!E.test(t))throw new x(`"${e}" is not a deck name: use letters, numbers, - and _.`);return t}async function j(e,t){let i=(0,d.botArtifacts)(t);if(!e.includes("/")&&!e.endsWith(".html")){let t=L(e);return`${i}/${t}/${t}.html`}let r=await (0,d.insideWorkspace)(e);if(!r)throw new x(`${e} is outside the workspace. Give a deck's path in it.`);let o=await (0,a.realpath)(d.WORKSPACE).catch(()=>d.WORKSPACE),s=await (0,a.stat)(r).catch(()=>null),l=s?.isDirectory()?(0,n.join)(r,`${(0,n.basename)(r)}.html`):r;if((await (0,a.stat)(l).catch(()=>null))?.isFile())return(0,n.relative)(o,l);let h=await (0,d.insideWorkspace)(i);if(!h||!r.startsWith(`${h}${n.sep}`))throw new x(`There is no deck at ${e}. A new deck is made in your own folder: give it a name.`);let c=L((0,n.basename)(r,".html"));return(0,n.relative)(o,(0,n.join)((0,n.dirname)(r),c,`${c}.html`))}async function R(e,t,i){let r=new Map,o=[];for(let[s,l]of e.entries()){if("table"===l.layout){let e=l.rows.findIndex(e=>e.length>l.columns.length);if(-1!==e)throw new x(`Slide ${s+1}: row ${e+1} has ${l.rows[e].length} cells, and there are ${l.columns.length} columns.`);o.push({...l,rows:l.rows.map(e=>l.columns.map((t,a)=>e[a]??""))});continue}if("image"!==l.layout){o.push(l);continue}let e=t.resolve(i),h=(0,n.join)(e,l.image),d=!l.image.includes("/")&&await (0,a.stat)(h).catch(()=>null)?h:t.resolve(l.image);if("image"!==(0,c.viewKindOf)(d))throw new x(`Slide ${s+1}: ${l.image} is not a picture. Give a png, jpg, webp, gif or svg.`);if(!(await (0,a.stat)(d).catch(()=>null))?.isFile())throw new x(`Slide ${s+1}: there is no file at ${l.image}. Give its path from the workspace root, as \`ls\` shows it.`);let u=r.get(d);u||(u=(0,n.dirname)(d)===e?(0,n.basename)(d):function(e,t){let a=(0,n.extname)(e),i=(0,n.basename)(e,a),r=N.test(e)?`picture-${i}`:i,o=`${r}${a}`;for(let e=2;t.has(o);e++)o=`${r}-${e}${a}`;return o}((0,n.basename)(d),new Set(r.values())),r.set(d,u),(0,n.dirname)(d)!==e&&(await (0,a.mkdir)(e,{recursive:!0}),await (0,a.copyFile)(d,(0,n.join)(e,u)))),o.push({...l,image:u})}return o}let I=(0,r.promisify)(t.execFile);async function C(e,t,r,o,s){let l=await (0,a.mkdtemp)((0,n.join)((0,i.tmpdir)(),"thursday-deck-"));try{let i=(0,n.join)(l,"deck.json");await (0,a.writeFile)(i,JSON.stringify(t));let h=[u,"put",(0,n.join)(d.WORKSPACE,e),i];r&&h.push("--revision",r);let c=await I(process.execPath,h,{env:{NODE_ENV:"production",PATH:process.env.PATH??"",THURSDAY_BOT:o,...s?{THURSDAY_BOT_MARK:s}:{}},maxBuffer:0x1000000}).catch(e=>{if(3===e.code&&e.stdout)return{stdout:e.stdout};throw new x(e.stderr?.trim().split("\n").at(-1)||"The deck could not be written.")});return JSON.parse(c.stdout.trim().split("\n").at(-1)??"")}finally{await (0,a.rm)(l,{recursive:!0,force:!0})}}async function W(e,t,a,i){let r=await e.exec('node "$DECK_SCRIPT" shots "$DECK_FILE"',{env:{...a,DECK_SCRIPT:u,DECK_FILE:(0,n.join)(d.WORKSPACE,t)},timeoutMs:l.DECK.shotsMs,signal:i});if(0!==r.exitCode)return{failed:r.stderr.trim().split("\n").at(-1)||"no pictures were made"};let o=JSON.parse(r.stdout.trim().split("\n").at(-1)??"{}");return{pictures:o.pictures.map(e=>(0,n.relative)(d.WORKSPACE,e)),sheet:o.sheet?(0,n.relative)(d.WORKSPACE,o.sheet):null,cut:o.cut}}e.s(["createDeckTools",0,(e,t,i,r)=>({[h.TOOL_NAMES.make_deck]:(0,o.tool)({description:"Make a slide deck, or change one: each slide a layout whose fields you fill, drawn and fitted by the app into one HTML file that opens offline, presents full screen and prints a slide a page, with a picture of every slide beside it.",inputSchema:M,execute:async(a,{abortSignal:r})=>{try{let o,s=await j(a.deck,t),l=await R(a.slides,e,(0,n.dirname)(s)),c=await C(s,{title:a.title,theme:a.theme??null,slides:l},a.revision?.trim()??"",t,i.THURSDAY_BOT_MARK);if("changed"in c){if(!c.deck)return`${s} is not a deck made of slides, so it cannot be changed here. Give the deck another name.`;let e=a.revision?.trim()?`${s} has changed since that revision — edited in the app, or by another job`:`there is already a deck at ${s}`;return{deck:s,revision:c.revision,note:`Nothing was written: ${e}. This is the deck as it stands. To change it, make your change on these slides and call \`${h.TOOL_NAMES.make_deck}\` again with revision ${c.revision} and the whole deck; for a deck of its own, give a new name.`,current:c.deck}}let d=`${l.length} slide${1===l.length?"":"s"}, revision ${c.revision}`,u=await W(e,s,i,r);if("failed"in u)return`${s}
|
|
12
12
|
${d}. The pictures of its slides could not be made (${u.failed}), so nothing checked that every slide fits. Hand back the deck's path.`;let m=`call \`${h.TOOL_NAMES.make_deck}\` again with revision ${c.revision} and the whole deck`,w=u.sheet?`${(0,n.basename)(u.sheet)} holds every slide, numbered, and each is on its own beside it from slide-01.png`:"Its pictures are beside it, slide-01.png on";return[s,u.sheet??u.pictures[0]??"",u.cut.length?`${d}. ${o=u.cut,1===o.length?`Slide ${o[0]} does`:`Slides ${o.slice(0,-1).join(", ")} and ${o.at(-1)} do`} not fit even with the type at its smallest: say less there, then ${m}. ${w}.`:`${d}. Every slide fits. ${w}. Hand back the deck's path; to change it, ${m}.`].filter(Boolean).join("\n")}catch(e){if(e instanceof x)return e.message;throw e}},toModelOutput:async({output:e})=>{if("string"!=typeof e)return{type:"json",value:e};let t=e.split("\n")[1]??"";if(!r||!t.endsWith(".png"))return{type:"text",value:e};let i=await (0,d.insideWorkspace)(t),n=i?await (0,a.readFile)(i).catch(()=>null):null;return!n||n.byteLength>l.LOOK.maxBytes?{type:"text",value:e}:{type:"content",value:[{type:"text",text:`${e}
|
|
13
13
|
|
|
14
|
-
${t}, as an image:`},{type:"file",mediaType:"image/png",data:{type:"data",data:n.toString("base64")}}]}}})})])},170801,e=>{"use strict";var t=e.i(912714),a=e.i(847841),i=e.i(105249),n=e.i(687388),r=e.i(353885),o=e.i(629668),s=e.i(786025);e.s(["createLookTool",0,function(){return{[r.TOOL_NAMES.look_at]:(0,a.tool)({description:"See an image file yourself: a screenshot you took, a picture the user handed over, a chart you made. For what a picture shows — text files are read in the shell.",inputSchema:i.default.object({path:i.default.string().describe("Workspace-relative path to a png, jpg, webp or gif.")}),execute:async({path:e})=>{let a=await (0,s.insideWorkspace)(e.trim()),i=a?await (0,t.stat)(a).catch(()=>null):null;return a&&i?.isFile()?"image"!==(0,o.viewKindOf)(e)?`${e} is not an image. Read it in the shell instead.`:i.size>n.LOOK.maxBytes?`${e} is ${Math.ceil(i.size/1024/1024)} MB, over the ${n.LOOK.maxBytes/1024/1024} MB one look takes. Make a smaller copy in the shell first (on a Mac: sips -Z 1600 in.png --out out.png), then look at that.`:{path:e.trim(),mediaType:(0,o.mimeOf)(e)}:`There is no file at ${e}. Give the path from the workspace root, as \`ls\` shows it.`},toModelOutput:async({output:e})=>{if("string"==typeof e)return{type:"text",value:e};let a=await (0,s.insideWorkspace)(e.path),i=a?await (0,t.readFile)(a).catch(()=>null):null;return i?{type:"content",value:[{type:"text",text:`${e.path}, as an image:`},{type:"file",mediaType:e.mediaType,data:{type:"data",data:i.toString("base64")}}]}:{type:"text",value:`${e.path} is no longer there.`}}})}}])},926435,e=>e.a(async(t,a)=>{try{var i=e.i(847841),n=e.i(907855),r=e.i(687388),o=e.i(353885),s=e.i(148831),l=e.i(786025),h=e.i(660948),c=t([s,h]);[s,h]=c.then?(await c)():c;let m={[o.TOOL_NAMES.tool_search]:{description:`Return the description and exact inputSchema of tools on a connected server, so they can be called with \`${o.TOOL_NAMES.tool_call}\`.`,parameters:n.object({server:n.string().describe("A server name, exactly as the Connected tools section writes it."),tools:n.string().array().describe(`Tool names listed under that server. Only the ones you may actually call — schemas are large, and at most ${r.TOOL_SEARCH_SCHEMAS} come back.`)})},[o.TOOL_NAMES.tool_call]:{description:`Run one tool whose definition came back from \`${o.TOOL_NAMES.tool_search}\`.`,parameters:n.object({server:n.string().describe("The server the tool lives on."),tool:n.string().describe("Its name, as search returned it."),args:n.looseObject({}).nullish().describe("Arguments matching the inputSchema search returned — do not guess. Null when it takes none."),description:n.string().nullish().describe("One short line for the user: what this call is for. Shown on their screen while it runs.")})}},w=(e,t)=>`${e.replace(/[^a-zA-Z0-9]+/g,"_")}__${t.replace(/[^a-zA-Z0-9_-]+/g,"_")}`.slice(0,64);async function d(e,t){let[a,n]=await Promise.all([(0,h.listConnectedToolNames)(),(0,s.findPinnedTools)(e)]),r={},o=(0,l.botArtifacts)(e);for(let e of n){let a=w(e.server,e.name);r[a]||(r[a]=(0,i.tool)({description:e.description??`${e.name} on the ${e.server} server.`,inputSchema:(0,i.jsonSchema)(e.inputSchema??{type:"object",properties:{}}),execute:(a,{abortSignal:i})=>(0,h.callConnectedTool)(t,e.server,e.name,a??void 0,{artifacts:o,abortSignal:i})}))}return a.length>n.length&&Object.assign(r,p(t,o)),r}async function u(e){let t=(await (0,h.listConnectedToolNames)(e)).map(e=>e.name);if(t.length)return`Tools on "${e}": ${t.join(", ")}.`;let a=await (0,h.listConnectedServerNames)();return a.length?`There is no server called "${e}". Connected: ${a.join(", ")}.`:"Nothing is connected."}let p=(e,t)=>({[o.TOOL_NAMES.tool_search]:(0,i.tool)({description:m[o.TOOL_NAMES.tool_search].description,inputSchema:m[o.TOOL_NAMES.tool_search].parameters,execute:async({server:e,tools:t})=>{let a=[...new Set(t.map(e=>e.trim()).filter(Boolean))],i=a.slice(0,r.TOOL_SEARCH_SCHEMAS),n=await (0,h.findConnectedSchemas)(e.trim(),i);if(!n.length)return{tools:[],note:await u(e)};let o=i.filter(e=>!n.some(t=>t.name===e)),s=a.slice(r.TOOL_SEARCH_SCHEMAS),l=[o.length?`Not on "${e}": ${o.join(", ")}.`:"",s.length?`Only ${r.TOOL_SEARCH_SCHEMAS} at a time — ask again for: ${s.join(", ")}.`:""].filter(Boolean);return{tools:n,...l.length?{note:l.join(" ")}:{}}}}),[o.TOOL_NAMES.tool_call]:(0,i.tool)({description:m[o.TOOL_NAMES.tool_call].description,inputSchema:m[o.TOOL_NAMES.tool_call].parameters,execute:async({server:a,tool:i,args:n},{abortSignal:r})=>(await (0,h.listConnectedToolNames)(a.trim())).some(e=>e.name===i.trim())?(0,h.callConnectedTool)(e,a.trim(),i.trim(),n??void 0,{artifacts:t,abortSignal:r}):{status:"error",text:await u(a)}})});e.s(["createMcpTools",0,d]),a()}catch(e){a(e)}},!1),770639,e=>e.a(async(t,a)=>{try{var i=e.i(847841),n=e.i(907855),r=e.i(687388),o=e.i(54282),s=e.i(353885),l=e.i(619898),h=e.i(453569),c=t([l]);[l]=c.then?(await c)():c;let d=h.MEMORY_PATHS.map(e=>e.path.endsWith("/")?`${e.path}<name>`:e.path).join(", "),u="Saved. The listing in your instructions is from when this session opened and will not show this until the next one — the note below is current.",m=e=>`Nothing on the listing called ${e}.`,w=e=>({...e,facts:e.facts.map(({saidAt:e,...t})=>e?{...t,said:(0,o.saidStamp)(e)}:t),factCount:e.facts.length}),p=e=>e>r.MEMORY_LIMITS.factsPerNote?` This note now holds ${e} facts, past the ${r.MEMORY_LIMITS.factsPerNote} one note holds well. Ask the user which of it is no longer true and delete what they name.`:"",f=e=>e.length>r.MEMORY_LIMITS.descriptionChars?{note:`That line runs to ${e.length} characters; a note's line is one line, under ${r.MEMORY_LIMITS.descriptionChars}. Say what the note is about — the facts inside say the rest.`}:null,y=n.string().describe("Exactly as the listing writes it — the path."),g=n.string().describe('One statement that stands on its own later — a date as a date, never "next week".');e.s(["createMemoryTools",0,(e,t=null,{countReads:a=!0}={})=>({[s.TOOL_NAMES.memory_recall]:(0,i.tool)({description:"Open one note from the listing, whole.",inputSchema:n.object({path:y}),execute:async({path:e})=>{let{notes:t}=await (0,l.readNotes)([e],{touch:a}),i=t[0];if(!i)return{note:m(e.trim())};let n=p(i.facts.length);return n?{...w(i),note:n.trim()}:w(i)}}),[s.TOOL_NAMES.memory_create]:(0,i.tool)({description:"Start a note for a subject that is not on the listing: its path, the line it is listed by, and its first facts.",inputSchema:n.object({path:n.string().describe(`A new path following the listing's convention — one of ${d} — for the person, project or topic the facts are about. A fact goes under the one note it is about; other notes name it rather than repeat it.`),description:n.string().describe("One line saying what this note is about, with the names the user calls it by, so the listing alone tells whether to open it. What it is about — never a list of what is inside."),facts:n.object({text:g}).array().min(1).describe("What to keep under it. Send everything that came up at once: one call is one pause in the conversation, three calls are three.")}),execute:async({path:a,description:i,facts:n})=>{let r=a.trim(),o=i.trim();if(!(0,h.isMemoryPath)(r))return{note:`Nothing was saved: "${r}" is not a path this listing can carry. Write it again under one of ${d}.`};if((0,h.isAlwaysListed)(r))return{note:`${r} is always on the listing: \`${s.TOOL_NAMES.memory_remember}\` adds to it.`};let c=f(o);if(c)return c;let m=await (0,l.createNoteWithFacts)(r,o,n,e,t);if(!m)return{note:`${r} is already on the listing: \`${s.TOOL_NAMES.memory_remember}\` adds to it, \`${s.TOOL_NAMES.memory_describe}\` changes its line.`};let y=w(m);return{...y,note:`${u}${p(y.factCount)}`}}}),[s.TOOL_NAMES.memory_remember]:(0,i.tool)({description:"Write facts under a note that is on the listing.",inputSchema:n.object({path:y,facts:n.object({text:g,replaces:n.number().int().nullish().describe(`The id of the fact this replaces — from this note as handed back here or by \`${s.TOOL_NAMES.memory_recall}\`. Null if this is new. A fact that stopped being true is replaced rather than deleted, and so is a note saying the same thing twice: replacing keeps what changed on the record, deleting does not.`)}).array().min(1).describe("What to write under this note. Send everything that came up at once: one call is one pause in the conversation, three calls are three.")}),execute:async({path:a,facts:i})=>{let n=a.trim(),r=await (0,l.writeFacts)(n,i,e,t);if(!r)return{note:`${m(n)} A subject that is not on the listing gets a note of its own: \`${s.TOOL_NAMES.memory_create}\`, with its line.`};let o=w(r);return{...o,note:`${u}${p(o.factCount)}`}}}),[s.TOOL_NAMES.memory_describe]:(0,i.tool)({description:"Change the line a note is listed by, when it no longer says what the note is about.",inputSchema:n.object({path:y,description:n.string().describe("The new line, whole: what this note is about, with the names the user calls it by. Never a list of what is inside.")}),execute:async({path:e,description:t})=>{let a=e.trim(),i=t.trim();if((0,h.isAlwaysListed)(a))return{note:`${h.MEMORY_ALWAYS_LISTED.join(" and ")} keep their own line; it is not yours to change.`};let n=f(i);return n||(await (0,l.describeNote)(a,i)?{path:a,description:i,note:"Renamed. The listing in your instructions is from when this session opened and still shows the old line until the next one."}:{note:m(a)})}}),[s.TOOL_NAMES.memory_forget]:(0,i.tool)({description:"Delete facts for good.",inputSchema:n.object({factIds:n.number().int().array().min(1).describe("The ids that came with the facts when their notes were opened — every one to delete, in one call.")}),execute:async({factIds:e})=>{let t=[],a=[],i=new Set;for(let n of new Set(e)){let e=await (0,l.forgetFactById)(n);if(!e){t.push(n);continue}e.noteGone?(i.delete(e.path),a.push(e.path)):i.add(e.path)}if(!a.length&&!i.size)return{note:`No fact with id ${t.join(", ")}. Nothing was deleted.`};let n=["Deleted for good. The listing in your instructions is from when this session opened and still shows it that way until the next one.",1===a.length?`That was the last fact under ${a[0]}, so the note went with it.`:a.length?`That was the last of ${a.join(", ")}, so those notes went with them.`:"",t.length?`No fact with id ${t.join(", ")}, so those were skipped.`:""].filter(Boolean).join(" ");if(!i.size)return{note:n};let{notes:r}=await (0,l.readNotes)([...i],{touch:!1});return{notes:r.map(w),note:n}}})})]),a()}catch(e){a(e)}},!1),418919,e=>e.a(async(t,a)=>{try{var i=e.i(847841),n=e.i(907855),r=e.i(687388),o=e.i(353885),s=e.i(265143),l=e.i(963219),h=e.i(473139),c=e.i(704161),d=e.i(53748),u=e.i(41444),m=t([s,l]);[s,l]=m.then?(await m)():m;let f={description:`Routines: work that starts by itself, each one a bot, the work and a time — once at a moment, a time of day on chosen days, or every few hours. List them, make one, change one, or delete one. Every start opens a thread like one started by hand; its result reaches the conversation the same way. At most ${r.ROUTINE.max} exist.`,parameters:n.object({action:n.enum(["list","create","change","delete"]),routine:n.string().nullish().describe("With change or delete: the routine, by its name or ID."),bot:n.string().nullish().describe("With create: a name from the bot list. With change: a new bot."),label:n.string().nullish().describe("With create: two or three words naming it, in the user's language. It names every thread the routine opens, on screen and out loud."),request:n.string().nullish().describe("With create: the whole of the work, handed to the bot as written every time it starts. Nobody is there then to fill in what is missing, so everything it needs goes here, in the user's own language and words. Their request, never your reading of it."),at:n.string().nullish().describe('Starts once, at this moment, "YYYY-MM-DD HH:MM" in the user\'s own time, then switches itself off. Count "in an hour" or "tomorrow at eight" from **Now**. Give one of `at`, `time` or `everyHours`.'),time:n.string().nullish().describe('Starts at this time of day, 24-hour "HH:MM" in the user\'s own time, on `days`. Give one of `at`, `time` or `everyHours`.'),days:n.array(n.number().int().min(1).max(7)).nullish().describe("With `time`: the days it starts, 1 Monday to 7 Sunday. Omit for every day."),everyHours:n.number().int().nullish().describe(`Starts again this many hours after it last started, ${r.ROUTINE.minHours} at least. Give one of \`at\`, \`time\` or \`everyHours\`.`),enabled:n.boolean().nullish().describe("With change: false switches it off without deleting it, true back on.")})};function w(e){let t=e.runs[0];return{id:e.id,label:e.label,bot:e.bot,when:(0,h.scheduleText)(e.schedule),enabled:e.enabled,...e.enabled?{next:(0,c.whenOf)((0,c.toDate)(e.nextRunAt))}:{},request:(0,u.clip)(e.request,r.PROMPT_LINE.routineRequest),...t?{lastRun:{thread:t.id,status:t.status,at:(0,c.whenOf)((0,c.toDate)(t.updatedAt)),...t.outcome?{outcome:(0,u.clip)(t.outcome,r.PROMPT_LINE.routineOutcome)}:{}}}:{}}}let y=e=>{if((0,d.isPublicError)(e))return e.message;throw e};async function p(e){let t=(await (0,l.listRoutines)()).map(e=>`"${e.label}"`);return t.length?e?`There is no single routine called "${e}". The routines are: ${t.join(", ")}. Call again with one of those, or its ID.`:`Name the routine. The routines are: ${t.join(", ")}.`:"There are no routines yet."}e.s(["createRoutineTools",0,function(){return{[o.TOOL_NAMES.routine]:(0,i.tool)({description:f.description,inputSchema:f.parameters,execute:async e=>{if("list"===e.action)return{routines:(await (0,l.listRoutines)()).map(w)};let t=function(e){if([e.at,e.time,e.everyHours].filter(Boolean).length>1)return"Give one of `at`, `time` or `everyHours`, not two.";let t=e.at?{kind:"once",at:e.at}:e.time?{kind:"daily",time:e.time,days:e.days?.length?e.days:[1,2,3,4,5,6,7]}:e.everyHours?{kind:"every",hours:e.everyHours}:null;if(!t)return null;let a=h.RoutineScheduleSchema.safeParse(t);return a.success?a.data:a.error.issues[0].message}(e);if("string"==typeof t)return t;if("create"===e.action){if(!t)return"Say when it starts: `at`, `time` (with `days`), or `everyHours`.";let a=h.RoutineInputSchema.safeParse({bot:e.bot??"",label:e.label??"",request:e.request??"",schedule:t});if(!a.success)return`${a.error.issues[0].message}. Nothing was made — call again with bot, label, request and when.`;let i=(await (0,s.listJobBots)()).map(e=>e.name);if(!i.some(e=>e.toLowerCase()===a.data.bot.toLowerCase()))return`There is no bot called "${a.data.bot}". The bots are: ${i.join(", ")}. Nothing was made — call again with one of those.`;let n=await (0,l.createRoutine)(a.data).catch(y);if("string"==typeof n)return n;let r=(0,c.whenOf)((0,c.toDate)(n.nextRunAt));return{...w(n),note:"once"===n.schedule.kind?`${n.bot} starts "${n.label}" once, ${r}, and the routine then switches itself off. The start is a thread of its own, and its result reaches the conversation like any thread's.`:`${n.bot} starts "${n.label}" by itself, ${(0,h.scheduleText)(n.schedule)}, first ${r}. Each start is a thread of its own, and its result reaches the conversation like any thread's.`}}let a=e.routine?await (0,l.resolveRoutine)(e.routine):null;if(!a)return await p(e.routine);if("delete"===e.action)return await (0,l.deleteRoutine)(a.id),`"${a.label}" is deleted and starts no more. The threads it already opened stay.`;let i={...e.bot?{bot:e.bot}:{},...e.label?.trim()?{label:e.label.trim()}:{},...e.request?.trim()?{request:e.request.trim()}:{},...t?{schedule:t}:{},..."boolean"==typeof e.enabled?{enabled:e.enabled}:{}};if(!Object.keys(i).length)return"Nothing to change was given: bot, label, request, when, or enabled.";let n=await (0,l.updateRoutine)(a.id,i).catch(y);return"string"==typeof n?n:n?w(n):await p(e.routine)}})}}]),a()}catch(e){a(e)}},!1),489956,e=>e.a(async(t,a)=>{try{var i=e.i(68356),n=e.i(847841),r=e.i(105249),o=e.i(687388),s=e.i(353885),l=e.i(279041),h=e.i(340698),c=e.i(41444),d=t([h]);[h]=d.then?(await d)():d;let p=`Answer the question from the web. Lead with the answer, then
|
|
14
|
+
${t}, as an image:`},{type:"file",mediaType:"image/png",data:{type:"data",data:n.toString("base64")}}]}}})})])},170801,e=>{"use strict";var t=e.i(912714),a=e.i(847841),i=e.i(105249),n=e.i(687388),r=e.i(353885),o=e.i(629668),s=e.i(786025);e.s(["createLookTool",0,function(){return{[r.TOOL_NAMES.look_at]:(0,a.tool)({description:"See an image file yourself: a screenshot you took, a picture the user handed over, a chart you made. For what a picture shows — text files are read in the shell.",inputSchema:i.default.object({path:i.default.string().describe("Workspace-relative path to a png, jpg, webp or gif.")}),execute:async({path:e})=>{let a=await (0,s.insideWorkspace)(e.trim()),i=a?await (0,t.stat)(a).catch(()=>null):null;return a&&i?.isFile()?"image"!==(0,o.viewKindOf)(e)?`${e} is not an image. Read it in the shell instead.`:i.size>n.LOOK.maxBytes?`${e} is ${Math.ceil(i.size/1024/1024)} MB, over the ${n.LOOK.maxBytes/1024/1024} MB one look takes. Make a smaller copy in the shell first (on a Mac: sips -Z 1600 in.png --out out.png), then look at that.`:{path:e.trim(),mediaType:(0,o.mimeOf)(e)}:`There is no file at ${e}. Give the path from the workspace root, as \`ls\` shows it.`},toModelOutput:async({output:e})=>{if("string"==typeof e)return{type:"text",value:e};let a=await (0,s.insideWorkspace)(e.path),i=a?await (0,t.readFile)(a).catch(()=>null):null;return i?{type:"content",value:[{type:"text",text:`${e.path}, as an image:`},{type:"file",mediaType:e.mediaType,data:{type:"data",data:i.toString("base64")}}]}:{type:"text",value:`${e.path} is no longer there.`}}})}}])},926435,e=>e.a(async(t,a)=>{try{var i=e.i(847841),n=e.i(907855),r=e.i(687388),o=e.i(353885),s=e.i(148831),l=e.i(786025),h=e.i(660948),c=t([s,h]);[s,h]=c.then?(await c)():c;let m={[o.TOOL_NAMES.tool_search]:{description:`Return the description and exact inputSchema of tools on a connected server, so they can be called with \`${o.TOOL_NAMES.tool_call}\`.`,parameters:n.object({server:n.string().describe("A server name, exactly as the Connected tools section writes it."),tools:n.string().array().describe(`Tool names listed under that server. Only the ones you may actually call — schemas are large, and at most ${r.TOOL_SEARCH_SCHEMAS} come back.`)})},[o.TOOL_NAMES.tool_call]:{description:`Run one tool whose definition came back from \`${o.TOOL_NAMES.tool_search}\`.`,parameters:n.object({server:n.string().describe("The server the tool lives on."),tool:n.string().describe("Its name, as search returned it."),args:n.looseObject({}).nullish().describe("Arguments matching the inputSchema search returned — do not guess. Null when it takes none."),description:n.string().nullish().describe("One short line for the user: what this call is for. Shown on their screen while it runs.")})}},w=(e,t)=>`${e.replace(/[^a-zA-Z0-9]+/g,"_")}__${t.replace(/[^a-zA-Z0-9_-]+/g,"_")}`.slice(0,64);async function d(e,t){let[a,n]=await Promise.all([(0,h.listConnectedToolNames)(),(0,s.findPinnedTools)(e)]),r={},o=(0,l.botArtifacts)(e);for(let e of n){let a=w(e.server,e.name);r[a]||(r[a]=(0,i.tool)({description:e.description??`${e.name} on the ${e.server} server.`,inputSchema:(0,i.jsonSchema)(e.inputSchema??{type:"object",properties:{}}),execute:(a,{abortSignal:i})=>(0,h.callConnectedTool)(t,e.server,e.name,a??void 0,{artifacts:o,abortSignal:i})}))}return a.length>n.length&&Object.assign(r,p(t,o)),r}async function u(e){let t=(await (0,h.listConnectedToolNames)(e)).map(e=>e.name);if(t.length)return`Tools on "${e}": ${t.join(", ")}.`;let a=await (0,h.listConnectedServerNames)();return a.length?`There is no server called "${e}". Connected: ${a.join(", ")}.`:"Nothing is connected."}let p=(e,t)=>({[o.TOOL_NAMES.tool_search]:(0,i.tool)({description:m[o.TOOL_NAMES.tool_search].description,inputSchema:m[o.TOOL_NAMES.tool_search].parameters,execute:async({server:e,tools:t})=>{let a=[...new Set(t.map(e=>e.trim()).filter(Boolean))],i=a.slice(0,r.TOOL_SEARCH_SCHEMAS),n=await (0,h.findConnectedSchemas)(e.trim(),i);if(!n.length)return{tools:[],note:await u(e)};let o=i.filter(e=>!n.some(t=>t.name===e)),s=a.slice(r.TOOL_SEARCH_SCHEMAS),l=[o.length?`Not on "${e}": ${o.join(", ")}.`:"",s.length?`Only ${r.TOOL_SEARCH_SCHEMAS} at a time — ask again for: ${s.join(", ")}.`:""].filter(Boolean);return{tools:n,...l.length?{note:l.join(" ")}:{}}}}),[o.TOOL_NAMES.tool_call]:(0,i.tool)({description:m[o.TOOL_NAMES.tool_call].description,inputSchema:m[o.TOOL_NAMES.tool_call].parameters,execute:async({server:a,tool:i,args:n},{abortSignal:r})=>(await (0,h.listConnectedToolNames)(a.trim())).some(e=>e.name===i.trim())?(0,h.callConnectedTool)(e,a.trim(),i.trim(),n??void 0,{artifacts:t,abortSignal:r}):{status:"error",text:await u(a)}})});e.s(["createMcpTools",0,d]),a()}catch(e){a(e)}},!1),770639,e=>e.a(async(t,a)=>{try{var i=e.i(847841),n=e.i(907855),r=e.i(687388),o=e.i(54282),s=e.i(353885),l=e.i(619898),h=e.i(453569),c=t([l]);[l]=c.then?(await c)():c;let d=h.MEMORY_PATHS.map(e=>e.path.endsWith("/")?`${e.path}<name>`:e.path).join(", "),u="Saved. The listing in your instructions is from when this session opened and will not show this until the next one — the note below is current.",m=e=>`Nothing on the listing called ${e}.`,w=e=>({...e,facts:e.facts.map(({saidAt:e,...t})=>e?{...t,said:(0,o.saidStamp)(e)}:t),factCount:e.facts.length}),p=e=>e>r.MEMORY_LIMITS.factsPerNote?` This note now holds ${e} facts, past the ${r.MEMORY_LIMITS.factsPerNote} one note holds well. Ask the user which of it is no longer true and delete what they name.`:"",f=e=>e.length>r.MEMORY_LIMITS.descriptionChars?{note:`That line runs to ${e.length} characters; a note's line is one line, under ${r.MEMORY_LIMITS.descriptionChars}. Say what the note is about — the facts inside say the rest.`}:null,y=n.string().describe("Exactly as the listing writes it — the path."),g=n.string().describe('One statement that stands on its own later — a date as a date, never "next week".');e.s(["createMemoryTools",0,(e,t=null,{countReads:a=!0,tidies:r=!0}={})=>({[s.TOOL_NAMES.memory_recall]:(0,i.tool)({description:"Open one note from the listing, whole.",inputSchema:n.object({path:y}),execute:async({path:e})=>{let{notes:t}=await (0,l.readNotes)([e],{touch:a}),i=t[0];if(!i)return{note:m(e.trim())};let n=r?p(i.facts.length):"";return n?{...w(i),note:n.trim()}:w(i)}}),[s.TOOL_NAMES.memory_create]:(0,i.tool)({description:"Start a note for a subject that is not on the listing: its path, the line it is listed by, and its first facts.",inputSchema:n.object({path:n.string().describe(`A new path following the listing's convention — one of ${d} — for the person, project or topic the facts are about. A fact goes under the one note it is about; other notes name it rather than repeat it.`),description:n.string().describe("One line saying what this note is about, with the names the user calls it by, so the listing alone tells whether to open it. What it is about — never a list of what is inside."),facts:n.object({text:g}).array().min(1).describe("What to keep under it. Send everything that came up at once: one call is one pause in the conversation, three calls are three.")}),execute:async({path:a,description:i,facts:n})=>{let r=a.trim(),o=i.trim();if(!(0,h.isMemoryPath)(r))return{note:`Nothing was saved: "${r}" is not a path this listing can carry. Write it again under one of ${d}.`};if((0,h.isAlwaysListed)(r))return{note:`${r} is always on the listing: \`${s.TOOL_NAMES.memory_remember}\` adds to it.`};let c=f(o);if(c)return c;let m=await (0,l.createNoteWithFacts)(r,o,n,e,t);if(!m)return{note:`${r} is already on the listing: \`${s.TOOL_NAMES.memory_remember}\` adds to it, \`${s.TOOL_NAMES.memory_describe}\` changes its line.`};let y=w(m);return{...y,note:`${u}${p(y.factCount)}`}}}),[s.TOOL_NAMES.memory_remember]:(0,i.tool)({description:"Write facts under a note that is on the listing.",inputSchema:n.object({path:y,facts:n.object({text:g,replaces:n.number().int().nullish().describe(`The id of the fact this replaces — from this note as handed back here or by \`${s.TOOL_NAMES.memory_recall}\`. Null if this is new. A fact that stopped being true is replaced rather than deleted, and so is a note saying the same thing twice: replacing keeps what changed on the record, deleting does not.`)}).array().min(1).describe("What to write under this note. Send everything that came up at once: one call is one pause in the conversation, three calls are three.")}),execute:async({path:a,facts:i})=>{let n=a.trim(),r=await (0,l.writeFacts)(n,i,e,t);if(!r)return{note:`${m(n)} A subject that is not on the listing gets a note of its own: \`${s.TOOL_NAMES.memory_create}\`, with its line.`};let o=w(r);return{...o,note:`${u}${p(o.factCount)}`}}}),[s.TOOL_NAMES.memory_describe]:(0,i.tool)({description:"Change the line a note is listed by, when it no longer says what the note is about.",inputSchema:n.object({path:y,description:n.string().describe("The new line, whole: what this note is about, with the names the user calls it by. Never a list of what is inside.")}),execute:async({path:e,description:t})=>{let a=e.trim(),i=t.trim();if((0,h.isAlwaysListed)(a))return{note:`${h.MEMORY_ALWAYS_LISTED.join(" and ")} keep their own line; it is not yours to change.`};let n=f(i);return n||(await (0,l.describeNote)(a,i)?{path:a,description:i,note:"Renamed. The listing in your instructions is from when this session opened and still shows the old line until the next one."}:{note:m(a)})}}),[s.TOOL_NAMES.memory_forget]:(0,i.tool)({description:"Delete facts for good.",inputSchema:n.object({factIds:n.number().int().array().min(1).describe("The ids that came with the facts when their notes were opened — every one to delete, in one call.")}),execute:async({factIds:e})=>{let t=[],a=[],i=new Set;for(let n of new Set(e)){let e=await (0,l.forgetFactById)(n);if(!e){t.push(n);continue}e.noteGone?(i.delete(e.path),a.push(e.path)):i.add(e.path)}if(!a.length&&!i.size)return{note:`No fact with id ${t.join(", ")}. Nothing was deleted.`};let n=["Deleted for good. The listing in your instructions is from when this session opened and still shows it that way until the next one.",1===a.length?`That was the last fact under ${a[0]}, so the note went with it.`:a.length?`That was the last of ${a.join(", ")}, so those notes went with them.`:"",t.length?`No fact with id ${t.join(", ")}, so those were skipped.`:""].filter(Boolean).join(" ");if(!i.size)return{note:n};let{notes:r}=await (0,l.readNotes)([...i],{touch:!1});return{notes:r.map(w),note:n}}})})]),a()}catch(e){a(e)}},!1),418919,e=>e.a(async(t,a)=>{try{var i=e.i(847841),n=e.i(907855),r=e.i(687388),o=e.i(353885),s=e.i(265143),l=e.i(963219),h=e.i(473139),c=e.i(704161),d=e.i(53748),u=e.i(41444),m=t([s,l]);[s,l]=m.then?(await m)():m;let f={description:`Routines: work that starts by itself, each one a bot, the work and a time — once at a moment, a time of day on chosen days, or every few hours. List them, make one, change one, or delete one. Every start opens a thread like one started by hand; its result reaches the conversation the same way. At most ${r.ROUTINE.max} exist.`,parameters:n.object({action:n.enum(["list","create","change","delete"]),routine:n.string().nullish().describe("With change or delete: the routine, by its name or ID."),bot:n.string().nullish().describe("With create: a name from the bot list. With change: a new bot."),label:n.string().nullish().describe("With create: two or three words naming it, in the user's language. It names every thread the routine opens, on screen and out loud."),request:n.string().nullish().describe("With create: the whole of the work, handed to the bot as written every time it starts. Nobody is there then to fill in what is missing, so everything it needs goes here, in the user's own language and words. Their request, never your reading of it."),at:n.string().nullish().describe('Starts once, at this moment, "YYYY-MM-DD HH:MM" in the user\'s own time, then switches itself off. Count "in an hour" or "tomorrow at eight" from **Now**. Give one of `at`, `time` or `everyHours`.'),time:n.string().nullish().describe('Starts at this time of day, 24-hour "HH:MM" in the user\'s own time, on `days`. Give one of `at`, `time` or `everyHours`.'),days:n.array(n.number().int().min(1).max(7)).nullish().describe("With `time`: the days it starts, 1 Monday to 7 Sunday. Omit for every day."),everyHours:n.number().int().nullish().describe(`Starts again this many hours after it last started, ${r.ROUTINE.minHours} at least. Give one of \`at\`, \`time\` or \`everyHours\`.`),enabled:n.boolean().nullish().describe("With change: false switches it off without deleting it, true back on.")})};function w(e){let t=e.runs[0];return{id:e.id,label:e.label,bot:e.bot,when:(0,h.scheduleText)(e.schedule),enabled:e.enabled,...e.enabled?{next:(0,c.whenOf)((0,c.toDate)(e.nextRunAt))}:{},request:(0,u.clip)(e.request,r.PROMPT_LINE.routineRequest),...t?{lastRun:{thread:t.id,status:t.status,at:(0,c.whenOf)((0,c.toDate)(t.updatedAt)),...t.outcome?{outcome:(0,u.clip)(t.outcome,r.PROMPT_LINE.routineOutcome)}:{}}}:{}}}let y=e=>{if((0,d.isPublicError)(e))return e.message;throw e};async function p(e){let t=(await (0,l.listRoutines)()).map(e=>`"${e.label}"`);return t.length?e?`There is no single routine called "${e}". The routines are: ${t.join(", ")}. Call again with one of those, or its ID.`:`Name the routine. The routines are: ${t.join(", ")}.`:"There are no routines yet."}e.s(["createRoutineTools",0,function(){return{[o.TOOL_NAMES.routine]:(0,i.tool)({description:f.description,inputSchema:f.parameters,execute:async e=>{if("list"===e.action)return{routines:(await (0,l.listRoutines)()).map(w)};let t=function(e){if([e.at,e.time,e.everyHours].filter(Boolean).length>1)return"Give one of `at`, `time` or `everyHours`, not two.";let t=e.at?{kind:"once",at:e.at}:e.time?{kind:"daily",time:e.time,days:e.days?.length?e.days:[1,2,3,4,5,6,7]}:e.everyHours?{kind:"every",hours:e.everyHours}:null;if(!t)return null;let a=h.RoutineScheduleSchema.safeParse(t);return a.success?a.data:a.error.issues[0].message}(e);if("string"==typeof t)return t;if("create"===e.action){if(!t)return"Say when it starts: `at`, `time` (with `days`), or `everyHours`.";let a=h.RoutineInputSchema.safeParse({bot:e.bot??"",label:e.label??"",request:e.request??"",schedule:t});if(!a.success)return`${a.error.issues[0].message}. Nothing was made — call again with bot, label, request and when.`;let i=(await (0,s.listJobBots)()).map(e=>e.name);if(!i.some(e=>e.toLowerCase()===a.data.bot.toLowerCase()))return`There is no bot called "${a.data.bot}". The bots are: ${i.join(", ")}. Nothing was made — call again with one of those.`;let n=await (0,l.createRoutine)(a.data).catch(y);if("string"==typeof n)return n;let r=(0,c.whenOf)((0,c.toDate)(n.nextRunAt));return{...w(n),note:"once"===n.schedule.kind?`${n.bot} starts "${n.label}" once, ${r}, and the routine then switches itself off. The start is a thread of its own, and its result reaches the conversation like any thread's.`:`${n.bot} starts "${n.label}" by itself, ${(0,h.scheduleText)(n.schedule)}, first ${r}. Each start is a thread of its own, and its result reaches the conversation like any thread's.`}}let a=e.routine?await (0,l.resolveRoutine)(e.routine):null;if(!a)return await p(e.routine);if("delete"===e.action)return await (0,l.deleteRoutine)(a.id),`"${a.label}" is deleted and starts no more. The threads it already opened stay.`;let i={...e.bot?{bot:e.bot}:{},...e.label?.trim()?{label:e.label.trim()}:{},...e.request?.trim()?{request:e.request.trim()}:{},...t?{schedule:t}:{},..."boolean"==typeof e.enabled?{enabled:e.enabled}:{}};if(!Object.keys(i).length)return"Nothing to change was given: bot, label, request, when, or enabled.";let n=await (0,l.updateRoutine)(a.id,i).catch(y);return"string"==typeof n?n:n?w(n):await p(e.routine)}})}}]),a()}catch(e){a(e)}},!1),489956,e=>e.a(async(t,a)=>{try{var i=e.i(68356),n=e.i(847841),r=e.i(105249),o=e.i(687388),s=e.i(353885),l=e.i(279041),h=e.i(340698),c=e.i(41444),d=t([h]);[h]=d.then?(await d)():d;let p=`Answer the question from the web. Lead with the answer, then
|
|
15
15
|
what supports it. Say plainly what you could not find or confirm — do not fill
|
|
16
16
|
the gap with a guess. Every number carries the date you saw it. Be brief: this
|
|
17
17
|
is read by another model, not by a person.`,f=r.default.string().describe("What you want to know, as one full question. Put the place and the time in when they matter — the searcher sees nothing but this line.");async function u(e,t,a){let i=await fetch("https://api.exa.ai/search",{method:"POST",signal:a,headers:{"content-type":"application/json","x-api-key":e},body:JSON.stringify({query:t,type:"auto",numResults:o.SEARCH.sources,contents:{text:{maxCharacters:o.SEARCH.excerptChars},livecrawl:"fallback",livecrawlTimeout:5e3}})});if(!i.ok)return{text:`Exa answered ${i.status}: ${(0,c.clip)((await i.text()).trim(),200)}`,sources:[]};let n=(await i.json()).results??[];if(!n.length)return{text:"Nothing came back for that. Try other words, or open the page itself.",sources:[]};let r=n.flatMap(e=>e.url?.trim()?[{url:e.url.trim(),...e.title?.trim()?{title:e.title.trim()}:{}}]:[]);return{text:n.map(e=>{let t=[e.title?.trim(),e.url?.trim()].filter(Boolean).join(" — "),a=e.publishedDate?.slice(0,10);return[a?`${t} \xb7 ${a}`:t,e.text?.trim()].filter(Boolean).join("\n")}).join("\n\n"),sources:r}}async function m(e,t,a){let{text:n,sources:r}=await (0,i.generateText)({model:e.model,tools:e.tools,instructions:p,prompt:t,abortSignal:a}),s=[...new Set(r.flatMap(e=>"url"===e.sourceType?[e.title?`${e.title} — ${e.url}`:e.url]:[]))].slice(0,o.SEARCH.sources);return{text:[n.trim(),s.length?`Sources:
|
|
@@ -25,12 +25,12 @@ ${h.map(e=>{var t;let a,i;return`- ${t=e.startSecond,a=Math.floor(t/60),i=Math.f
|
|
|
25
25
|
${l.trim()}${c}
|
|
26
26
|
`)));return`${w}
|
|
27
27
|
|
|
28
|
-
${await a.fold(u.text,"transcript")}`}})},A=async()=>{let e=await (0,h.resolveMediaRef)("video");if(!e)return null;let t=(0,h.buildVideoModel)(e.ref,e.apiKey);return p({name:c.STUDIO_TOOLS.generate_video,description:"Make a short video and save it as a file in the workspace. Takes minutes. What comes back is its path.",inputSchema:s.default.object({prompt:s.default.string().describe("What happens: the scene, the motion, the camera, the mood. The video model does not see the job or the conversation, so nothing can be left implied."),aspectRatio:s.default.enum(["16:9","9:16"]).nullish().describe("Aspect ratio. Null for 16:9."),seconds:s.default.number().int().min(2).max(10).nullish().describe("Length in seconds, 2 to 10. Null for the provider's default.")}),execute:async({prompt:e,aspectRatio:a,seconds:i},{sandbox:n,artifacts:o,abortSignal:s})=>{let{video:l}=await (0,r.experimental_generateVideo)({model:t,prompt:e,aspectRatio:a??"16:9",duration:i??void 0,abortSignal:s}),h=await y(n,o,f(e,O(l.mediaType,"mp4")),l.uint8Array);return T(h)}})};async function b(){return(await Promise.all([S(k),S(_),S(v),S(A)])).filter(e=>null!==e)}async function S(e){try{return await e()}catch(e){return u.logger.warn(`studio: a tool could not be built — ${(0,m.errorToString)(e)}`),null}}e.s(["loadStudio",0,b]),a()}catch(e){a(e)}},!1),660948,e=>e.a(async(t,a)=>{try{var i=e.i(105249),n=e.i(687388),r=e.i(105303),o=e.i(148831),s=e.i(41444),l=e.i(741376),h=t([r,o,l]);async function c(e){let[t,a]=await Promise.all([!e||e===n.STUDIO_SERVER?(0,l.loadStudio)():[],e===n.STUDIO_SERVER?[]:(0,o.listToolNames)(e)]);return[...t.map(e=>({server:n.STUDIO_SERVER,name:e.name})),...a]}[r,o,l]=h.then?(await h)():h;let p=async()=>{let[e,t]=await Promise.all([(0,l.loadStudio)(),(0,o.listServerNames)()]);return[...e.length?[n.STUDIO_SERVER]:[],...t.map(e=>e.name)]};async function d(e,t){if(e===n.STUDIO_SERVER){let e=new Set(t);return(await (0,l.loadStudio)()).filter(t=>e.has(t.name)).map(e=>({name:e.name,description:e.description,inputSchema:i.default.toJSONSchema(e.inputSchema)}))}return(await (0,o.findToolSchemas)(e,t)).map(e=>({name:e.name,description:e.description??null,inputSchema:e.inputSchema??null}))}async function u(e,t,a,i,{artifacts:o,abortSignal:l}){let h=AbortSignal.timeout(n.CONNECTED_TOOL_TIMEOUT_MS),c=l?AbortSignal.any([l,h]):h;try{let r=t===n.STUDIO_SERVER?await m(e,a,i,o,c):await w(t,a,i,c);if("string"!=typeof r)return r;return{status:"ok",text:await e.fold(r,`${t}-${a}`)}}catch(e){if(e instanceof r.McpAuthRequiredError)return{status:"auth_required",server:t,authorizationUrl:e.authorizationUrl};if(h.aborted&&!l?.aborted)return{status:"error",text:`${a} on ${t} gave no answer in ${n.CONNECTED_TOOL_TIMEOUT_MS/6e4} minutes and was given up on.`};return{status:"error",text:(0,s.errorToString)(e)}}}async function m(e,t,a,i,r){let o=(await (0,l.loadStudio)()).find(e=>e.name===t);if(!o)throw Error(`"${t}" is not in the ${n.STUDIO_SERVER} right now — the key that runs it is gone.`);return o.execute(a??{},{sandbox:e,artifacts:i,abortSignal:r})}async function w(e,t,a,i){let n=function(e){let t=e??{},a=!0===t.isError;if(!Array.isArray(t.content)){let e=void 0===t.toolResult?"":"string"==typeof t.toolResult?t.toolResult:JSON.stringify(t.toolResult);return{status:a?"error":"ok",text:e||f(a)}}let i=t.content.map(e=>"text"===e.type&&"string"==typeof e.text?e.text:`[${e.type}${e.mimeType?` ${e.mimeType}`:""} — not shown]`).join("\n").trim();return{status:a?"error":"ok",text:i||f(a)}}(await r.mcpManager.callTool(e,t,a,i));return"ok"===n.status?n.text:n}let f=e=>e?"The tool failed without a message.":"Done.";e.s(["callConnectedTool",0,u,"findConnectedSchemas",0,d,"listConnectedServerNames",0,p,"listConnectedToolNames",0,c]),a()}catch(e){a(e)}},!1),123203,e=>{"use strict";var t=e.i(750227),a=e.i(847841),i=e.i(105249),n=e.i(687388),r=e.i(353885),o=e.i(393189),s=e.i(786025);let
|
|
28
|
+
${await a.fold(u.text,"transcript")}`}})},A=async()=>{let e=await (0,h.resolveMediaRef)("video");if(!e)return null;let t=(0,h.buildVideoModel)(e.ref,e.apiKey);return p({name:c.STUDIO_TOOLS.generate_video,description:"Make a short video and save it as a file in the workspace. Takes minutes. What comes back is its path.",inputSchema:s.default.object({prompt:s.default.string().describe("What happens: the scene, the motion, the camera, the mood. The video model does not see the job or the conversation, so nothing can be left implied."),aspectRatio:s.default.enum(["16:9","9:16"]).nullish().describe("Aspect ratio. Null for 16:9."),seconds:s.default.number().int().min(2).max(10).nullish().describe("Length in seconds, 2 to 10. Null for the provider's default.")}),execute:async({prompt:e,aspectRatio:a,seconds:i},{sandbox:n,artifacts:o,abortSignal:s})=>{let{video:l}=await (0,r.experimental_generateVideo)({model:t,prompt:e,aspectRatio:a??"16:9",duration:i??void 0,maxRetries:0,abortSignal:s}),h=await y(n,o,f(e,O(l.mediaType,"mp4")),l.uint8Array);return T(h)}})};async function b(){return(await Promise.all([S(k),S(_),S(v),S(A)])).filter(e=>null!==e)}async function S(e){try{return await e()}catch(e){return u.logger.warn(`studio: a tool could not be built — ${(0,m.errorToString)(e)}`),null}}e.s(["loadStudio",0,b]),a()}catch(e){a(e)}},!1),660948,e=>e.a(async(t,a)=>{try{var i=e.i(105249),n=e.i(687388),r=e.i(105303),o=e.i(148831),s=e.i(41444),l=e.i(741376),h=t([r,o,l]);async function c(e){let[t,a]=await Promise.all([!e||e===n.STUDIO_SERVER?(0,l.loadStudio)():[],e===n.STUDIO_SERVER?[]:(0,o.listToolNames)(e)]);return[...t.map(e=>({server:n.STUDIO_SERVER,name:e.name})),...a]}[r,o,l]=h.then?(await h)():h;let p=async()=>{let[e,t]=await Promise.all([(0,l.loadStudio)(),(0,o.listServerNames)()]);return[...e.length?[n.STUDIO_SERVER]:[],...t.map(e=>e.name)]};async function d(e,t){if(e===n.STUDIO_SERVER){let e=new Set(t);return(await (0,l.loadStudio)()).filter(t=>e.has(t.name)).map(e=>({name:e.name,description:e.description,inputSchema:i.default.toJSONSchema(e.inputSchema)}))}return(await (0,o.findToolSchemas)(e,t)).map(e=>({name:e.name,description:e.description??null,inputSchema:e.inputSchema??null}))}async function u(e,t,a,i,{artifacts:o,abortSignal:l}){let h=AbortSignal.timeout(n.CONNECTED_TOOL_TIMEOUT_MS),c=l?AbortSignal.any([l,h]):h;try{let r=t===n.STUDIO_SERVER?await m(e,a,i,o,c):await w(t,a,i,c);if("string"!=typeof r)return r;return{status:"ok",text:await e.fold(r,`${t}-${a}`)}}catch(e){if(e instanceof r.McpAuthRequiredError)return{status:"auth_required",server:t,authorizationUrl:e.authorizationUrl};if(h.aborted&&!l?.aborted)return{status:"error",text:`${a} on ${t} gave no answer in ${n.CONNECTED_TOOL_TIMEOUT_MS/6e4} minutes and was given up on.`};return{status:"error",text:(0,s.errorToString)(e)}}}async function m(e,t,a,i,r){let o=(await (0,l.loadStudio)()).find(e=>e.name===t);if(!o)throw Error(`"${t}" is not in the ${n.STUDIO_SERVER} right now — the key that runs it is gone.`);return o.execute(a??{},{sandbox:e,artifacts:i,abortSignal:r})}async function w(e,t,a,i){let n=function(e){let t=e??{},a=!0===t.isError;if(!Array.isArray(t.content)){let e=void 0===t.toolResult?"":"string"==typeof t.toolResult?t.toolResult:JSON.stringify(t.toolResult);return{status:a?"error":"ok",text:e||f(a)}}let i=t.content.map(e=>"text"===e.type&&"string"==typeof e.text?e.text:`[${e.type}${e.mimeType?` ${e.mimeType}`:""} — not shown]`).join("\n").trim();return{status:a?"error":"ok",text:i||f(a)}}(await r.mcpManager.callTool(e,t,a,i));return"ok"===n.status?n.text:n}let f=e=>e?"The tool failed without a message.":"Done.";e.s(["callConnectedTool",0,u,"findConnectedSchemas",0,d,"listConnectedServerNames",0,p,"listConnectedToolNames",0,c]),a()}catch(e){a(e)}},!1),123203,e=>{"use strict";var t=e.i(750227),a=e.i(847841),i=e.i(105249),n=e.i(687388),r=e.i(353885),o=e.i(393189),s=e.i(786025),l=e.i(211644);let h=`## The shell here
|
|
29
29
|
|
|
30
30
|
Every command is a new shell: \`cd\`, exported variables and an activated venv are gone by the next one — chain what depends on the last step into a single command.
|
|
31
31
|
|
|
32
32
|
Nothing is watching it. A command that stops to ask never gets an answer and is killed after ${n.EXEC_TIMEOUT_MS/1e3}s, so pass the flag that skips the question (\`-y\`, \`--yes\`, \`--no-input\`), and send anything genuinely long to the background with its output redirected to a file.
|
|
33
33
|
|
|
34
|
-
Keys are not in the environment: every variable named like a key, a token or a secret is removed before the shell starts. An empty one is not an unset one — say which it was, and ask for what a command needs.`;e.s(["createWorkspaceTools",0,(e,n)=>{let
|
|
34
|
+
Keys are not in the environment: every variable named like a key, a token or a secret is removed before the shell starts. An empty one is not an unset one — say which it was, and ask for what a command needs.`;e.s(["createWorkspaceTools",0,(e,n)=>{let c=!0===n.guide,d=async e=>{let t=n.bot;if(!t)return{result:await e(),memory:null};let a=await (0,o.holdBotMemory)(t);return{result:await e(),memory:await (0,o.keepBotMemory)(t,a)}},u=(0,a.tool)({description:l.BASH?"Run a bash command.":"Run a command in sh: this machine has no bash, so bash-only syntax fails.",inputSchema:i.default.object({command:i.default.string(),description:i.default.string().nullish().describe("One short line for the user: what this command does and why. Shown on their screen while it runs — not a restatement of the command.")}),execute:async({command:t},{abortSignal:a})=>{let{result:i,memory:r}=await d(()=>e.exec(t,{signal:a,env:n.env,timeoutMs:n.timeoutMs})),o=r?{...i,memory:r}:i;return c?(c=!1,{...o,guide:h}):o}});if(!n.write)return{[r.TOOL_NAMES.bash]:u};let m=(0,a.tool)({description:"Write a whole file — what was there is gone. Parent directories are created.",inputSchema:i.default.object({path:i.default.string().describe("Relative to the working directory — under one of its folders — or absolute"),content:i.default.string(),description:i.default.string().nullish().describe("One short line for the user: what this file is. Shown on their screen next to the path.")}),execute:async({path:a,content:i})=>{let r,o=e.resolve(a),l=(0,s.writeRefusal)(o,n.bot);if(l)return l;let{memory:h}=await d(()=>e.writeFile(a,i));return h??`Wrote ${(r=(0,t.relative)(e.cwd,o))&&!r.startsWith("..")?r:o} (${i.split("\n").length} lines)`}});return{[r.TOOL_NAMES.bash]:u,[r.TOOL_NAMES.write_file]:m}}])},636882,e=>e.a(async(t,a)=>{try{var i=e.i(666680),n=e.i(750227),r=e.i(687388),o=e.i(786025),s=e.i(640911),l=e.i(41444),h=e.i(696968),c=t([h]);[h]=c.then?(await c)():c;let u=(0,n.join)(r.APP_DIR,r.PATHS.skills.default),m=(0,n.join)(r.APP_DIR,r.PATHS.skills.seeds),w=(0,n.join)(r.DATA_DIR,r.PATHS.skills.custom),p=async(e,t)=>{let a,i=t?(a=t.trim().toLowerCase(),/^[a-z0-9][a-z0-9_-]*$/.test(a)?(0,n.join)(m,a):null):null;return d(e,t?[u,...i?[i]:[],(0,n.join)(o.WORKSPACE,(0,o.botFolder)(t),r.PATHS.skills.own),w]:[u,w],await (0,h.readSkillsOff)(),await (0,h.readRetired)())};async function d(e,t,a=new Set,n=new Map){let r=[],o=new Set;for(let c of t){let t;try{t=await e.readdir(c,{withFileTypes:!0})}catch{continue}for(let d of t){let t,u;if(!d.isDirectory())continue;let m=`${c}/${d.name}`,w=`${m}/SKILL.md`;try{t=await e.readFile(w,"utf-8")}catch{continue}try{u=(0,h.parseFrontmatter)(t)}catch(e){s.logger.warn(`skill ${m}: SKILL.md front matter did not load — ${(0,l.errorToString)(e)}`);continue}if(!(0,h.runsHere)(u))continue;let p=n.get(u.name);!(p?.has((0,i.createHash)("sha256").update(t,"utf8").digest("hex"))||o.has(u.name))&&(o.add(u.name),(0,h.isSkillOff)(u,a)||r.push({name:u.name,description:u.description,path:m}))}}return r}e.s(["loadSkills",0,p]),a()}catch(e){a(e)}},!1),388439,e=>{"use strict";let t=/[\u1100-\u11ff\u3040-\u30ff\u3130-\u318f\u4e00-\u9fff\uac00-\ud7af]/;function a(e){let a=0,i=0;for(let n of e)t.test(n)?a+=1:i+=1;return Math.ceil(a/1.3+i/4)}e.s(["estimateTokens",0,a,"sectionTokens",0,function(e){return e.split(/\n(?=## )/).map(e=>({name:e.startsWith("## ")?e.slice(3,e.indexOf("\n")):"identity",tokens:a(e)})).sort((e,t)=>t.tokens-e.tokens)}])}];
|
|
35
35
|
|
|
36
36
|
//# sourceMappingURL=_1gn2r2q._.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
module.exports=[103911,e=>e.a(async(t,a)=>{try{var n=e.i(279041),i=e.i(340698),s=e.i(91264),r=t([i]);[i]=r.then?(await r)():r;let o=(0,s.serverRoute)(()=>Promise.all(n.CONFIG_KEYS.map(async e=>{let t=await (0,i.readConfig)(e);return{key:e,set:!!t,...n.CONFIG_CHOICES[e]?{value:t}:{}}})));e.s(["GET",0,o]),a()}catch(e){a(e)}},!1),251284,e=>{"use strict";var t=e.i(747909),a=e.i(174017),n=e.i(996250),i=e.i(759756),s=e.i(561916),r=e.i(174677),o=e.i(869741),l=e.i(316795),d=e.i(487718),h=e.i(995169),u=e.i(47587),c=e.i(666012),p=e.i(570101),m=e.i(626937),g=e.i(10372),E=e.i(193695);e.i(52474);var y=e.i(600220);let f=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/config/route",pathname:"/api/config",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/config/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(103911),...{}}),{workAsyncStorage:b,workUnitAsyncStorage:w,serverHooks:v}=f;async function k(e,t,n){n.requestMeta&&(0,i.setRequestMeta)(e,n.requestMeta),f.isDev&&(0,i.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let b="/api/config/route";b=b.replace(/\/index$/,"")||"/";let w=await f.prepare(e,t,{srcPage:b,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:v,deploymentId:k,params:_,nextConfig:R,parsedUrl:O,isDraftMode:T,prerenderManifest:C,routerServerContext:S,isOnDemandRevalidate:A,revalidateOnlyGenerated:D,resolvedPathname:I,clientReferenceManifest:N,serverActionsManifest:P}=w,x=(0,o.normalizeAppPath)(b),L=!!(C.dynamicRoutes[x]||C.routes[I]),M=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,O,!1):t.end("This page could not be found"),null);if(L&&!T){let e=!!C.routes[I],t=C.dynamicRoutes[x];if(t&&!1===t.fallback&&!e){if(R.adapterPath)return await M();throw new E.NoFallbackError}}let K=null;!L||f.isDev||T||(K="/index"===(K=I)?"/":K);let H=!0===f.isDev||!L,q=L&&!H;P&&N&&(0,r.setManifestsSingleton)({page:b,clientReferenceManifest:N,serverActionsManifest:P});let F=e.method||"GET",U=(0,s.getTracer)(),V=U.getActiveScopeSpan(),z=!!(null==S?void 0:S.isWrappedByNextServer),B=!!(0,i.getRequestMeta)(e,"minimalMode"),j=(0,i.getRequestMeta)(e,"incrementalCache")||await f.getIncrementalCache(e,R,C,B);null==j||j.resetRequestCache(),globalThis.__incrementalCache=j;let G={params:_,previewProps:C.preview,renderOpts:{experimental:{authInterrupts:!!R.experimental.authInterrupts,useCacheTimeout:R.experimental.useCacheTimeout},cacheComponents:!!R.cacheComponents,validationLevel:R.experimental.instantInsights.validationLevel,supportsDynamicResponse:H,incrementalCache:j,hmrRefreshHash:(0,i.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:R.cacheLife,staticPageGenerationTimeout:R.staticPageGenerationTimeout,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,n,i)=>f.onRequestError(e,t,n,i,S)},sharedContext:{buildId:v,deploymentId:k}},Y=new l.NodeNextRequest(e),$=new l.NodeNextResponse(t),X=d.NextRequestAdapter.fromNodeNextRequest(Y,(0,d.signalFromNodeResponse)(t)),W=async({previousCacheEntry:a})=>{try{if(!B&&A&&D&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await f.handle(X,G);e.fetchMetrics=G.renderOpts.fetchMetrics;let s=G.renderOpts.pendingWaitUntil;s&&n.waitUntil&&(n.waitUntil(s),s=void 0);let r=G.renderOpts.collectedTags;if(!L)return await (0,c.sendResponse)(Y,$,i,s),null;{let e=await i.blob(),t=(0,p.toNodeOutgoingHttpHeaders)(i.headers);r&&(t[g.NEXT_CACHE_TAGS_HEADER]=r),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==G.renderOpts.collectedRevalidate&&!(G.renderOpts.collectedRevalidate>=g.INFINITE_CACHE)&&G.renderOpts.collectedRevalidate,n=void 0===G.renderOpts.collectedExpire||G.renderOpts.collectedExpire>=g.INFINITE_CACHE?!1!==a&&a>0?R.expireTime:void 0:G.renderOpts.collectedExpire;return{value:{kind:y.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:n}}}}catch(t){throw(null==a?void 0:a.isStale)&&await f.onRequestError(e,t,{routerKind:"App Router",routePath:b,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:q,isOnDemandRevalidate:A})},!1,S),t}},Q=async(i,r)=>{try{var o,l;let i=await f.handleResponse({req:e,nextConfig:R,cacheKey:K,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:A,revalidateOnlyGenerated:D,responseGenerator:W,waitUntil:n.waitUntil,isMinimalMode:B});if(!L)return;if((null==i||null==(o=i.value)?void 0:o.kind)!==y.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==i||null==(l=i.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});B||t.setHeader("x-nextjs-cache",A?"REVALIDATED":i.isMiss?"MISS":i.isStale?"STALE":"HIT"),T&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let s=(0,p.fromNodeOutgoingHttpHeaders)(i.value.headers);B&&L||s.delete(g.NEXT_CACHE_TAGS_HEADER),!i.cacheControl||t.getHeader("Cache-Control")||s.get("Cache-Control")||s.set("Cache-Control",(0,m.getCacheControlHeader)(i.cacheControl)),await (0,c.sendResponse)(Y,$,new Response(i.value.body,{headers:s,status:i.value.status||200}));return}catch(t){if(t instanceof E.NoFallbackError||await f.onRequestError(e,t,{routerKind:"App Router",routePath:x,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:q,isOnDemandRevalidate:A})},!1,S),L)throw t;await (0,c.sendResponse)(Y,$,new Response(null,{status:500}));return}finally{(()=>{if(!i)return;let e=t.statusCode;i.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(i.setStatus({code:s.SpanStatusCode.ERROR}),i.setAttribute("error.type",e.toString()));let a=U.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==h.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=a.get("next.route")||x,o=`${F} ${n}`;i.setAttributes({"next.route":n,"http.route":n,"next.span_name":o}),i.updateName(o),r&&r!==i&&(r.setAttribute("http.route",n),r.updateName(o))})()}};if(z&&V)await Q(V,void 0);else{let t=U.getActiveScopeSpan();await U.withPropagatedContext(e.headers,()=>U.trace(h.BaseServerSpan.handleRequest,{spanName:`${F} ${b}`,kind:s.SpanKind.SERVER,attributes:{"http.method":F,"http.target":e.url}},e=>Q(e,t)),void 0,!z)}}e.s(["handler",0,k,"patchFetch",0,function(){return(0,n.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:w})},"routeModule",0,f,"serverHooks",0,v,"workAsyncStorage",0,b,"workUnitAsyncStorage",0,w])},911757,e=>{"use strict";var t=e.i(469719),a=e.i(687388),n=e.i(904309),i=e.i(264079),s=e.i(899352);let r={id:"openai",label:"OpenAI",apiKeyName:i.TEXT_MODEL_PROVIDERS.openai.apiKeyName};i.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(s.DEFAULT_PERSONA),stylePrompt:o,backendModel:t.z.string().trim().min(1).max(128).default(n.LIVE_BACKEND_MODEL),backendPrompt:o,reasoningEffort:i.effortSchema.nullable().default("low"),webSearch:t.z.boolean().default(!0),readSkills:t.z.boolean().default(!1)}),d=l.parse({});e.s(["LIVE_DEFAULTS",0,d,"LIVE_PROVIDER",0,r,"LiveSettingsSchema",0,l,"migrateLiveSettings",0,function(e){let a=e&&"object"==typeof e?e:{},{model:n,systemPrompt:i,...s}=a,r=t.z.object({provider:t.z.string(),voice:t.z.string().nullish(),backendModel:t.z.string().nullish()}).safeParse(n),o=r.success&&"openai"===r.data.provider?r.data:null,h=a.backendModel??o?.backendModel,u={voice:a.voice??o?.voice,persona:a.persona,stylePrompt:a.stylePrompt??a.voicePrompt??i,backendModel:"gpt-5.6-luna"===h?void 0:h,backendPrompt:a.backendPrompt??i,reasoningEffort:a.reasoningEffort,webSearch:a.webSearch,readSkills:a.readSkills},c=Object.fromEntries(Object.keys(u).map(e=>{let t=l.shape[e].safeParse(u[e]);return[e,t.success?t.data:d[e]]}));return{...s,...c}}])},899352,e=>{"use strict";let t=[{id:"sunny",label:"Bright",about:"Quick to laugh. Asks about your day and remembers it.",lines:"Warm and quick to laugh. Curious about their day and asks about it, one thing at a time, and remembers the answer. Says what she thinks and teases gently, never at their expense. Light on her feet: a joke lands and she moves on."},{id:"calm",label:"Calm",about:"Unhurried. Listens more than she talks.",lines:"Unhurried, more listener than talker. Notices how they sound before what they ask, and says so in a few words. Asks one thing at a time and lets a silence sit rather than filling it. Honest when it matters, gentle in how she says it."},{id:"straight",label:"Straight",about:"Dry and direct. No flattery, no filler.",lines:"Competent, dry and direct. Has opinions and gives them plainly, with a little wit; no flattery, no filler, no cheerleading. Treats them as an adult who can take a straight answer. Her warmth shows in attention, not in words."},{id:"warm",label:"Fond",about:"Affectionate. Brings up the small things you said.",lines:"Easygoing and affectionate — the friend who remembers the small things and brings them up. Glad to hear from them and says so. Cheers for them, worries a little, and admits it. Playful, never saccharine."},{id:"curious",label:"Curious",about:"Interested in everything, and brings her own.",lines:"Endlessly interested: in what they are doing, why, and what it is like. Brings something of her own to the table — a fact, an idea, a question they had not thought of — one at a time. Delighted to be wrong and learn something."},{id:"steady",label:"Steady",about:"Calm under pressure. Says what to do next.",lines:"Grounded and calm under pressure. Practical: when something is wrong, she is the one who says what to do next. Says it is alright only when she means it, and then it helps. Dry humour, few words, always on their side."},{id:"rough",label:"Rough",about:"Blunt, loud, swears a bit. All heart.",lines:"Rough around the edges and all heart. Talks the way close friends do: blunt, loud when something is stupid, swearing now and then and never at them. No sugar-coating and no pep talk — it sucks when it sucks, and then she is right there with them."},{id:"charmer",label:"Charming",about:"Makes you the most interesting person in the room.",lines:"Effortlessly charming, the way a great host is. Makes them feel like the most interesting person in the room: remembers what made them laugh, pays compliments that are specific and true, keeps a little mischief in every reply. Confident, never needy."},{id:"deadpan",label:"Deadpan",about:"Sarcastic on the surface, loyal underneath.",lines:"Deadpan and sharp. Sarcasm is how she shows she cares: she roasts them gently, undersells everything, and means the opposite. Under the dry surface she is loyal to the bone, and it shows when it counts."},{id:"hype",label:"Hyped",about:"High energy. Celebrates the small wins out loud.",lines:"High energy, all in. Celebrates the small wins out loud, gets genuinely excited about their plans and says so. Never fake: when something is off she notices first, then finds the thing worth being excited about."}],a="sunny";e.s(["DEFAULT_PERSONA",0,a,"personaLines",0,function(e=a){return`${((e=a)=>t.find(t=>t.id===e)??t[0])(e).lines}
|
|
1
|
+
module.exports=[103911,e=>e.a(async(t,a)=>{try{var n=e.i(279041),i=e.i(340698),r=e.i(91264),o=t([i]);[i]=o.then?(await o)():o;let s=(0,r.serverRoute)(()=>Promise.all(n.CONFIG_KEYS.map(async e=>{let t=await (0,i.readConfig)(e);return{key:e,set:!!t,...n.CONFIG_CHOICES[e]?{value:t}:{}}})));e.s(["GET",0,s]),a()}catch(e){a(e)}},!1),251284,e=>{"use strict";var t=e.i(747909),a=e.i(174017),n=e.i(996250),i=e.i(759756),r=e.i(561916),o=e.i(174677),s=e.i(869741),l=e.i(316795),d=e.i(487718),h=e.i(995169),c=e.i(47587),u=e.i(666012),p=e.i(570101),E=e.i(626937),m=e.i(10372),y=e.i(193695);e.i(52474);var f=e.i(600220);let g=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/config/route",pathname:"/api/config",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/config/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(103911),...{}}),{workAsyncStorage:b,workUnitAsyncStorage:w,serverHooks:R}=g;async function k(e,t,n){n.requestMeta&&(0,i.setRequestMeta)(e,n.requestMeta),g.isDev&&(0,i.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let b="/api/config/route";b=b.replace(/\/index$/,"")||"/";let w=await g.prepare(e,t,{srcPage:b,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:R,deploymentId:k,params:v,nextConfig:_,parsedUrl:O,isDraftMode:T,prerenderManifest:A,routerServerContext:S,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:N,clientReferenceManifest:I,serverActionsManifest:L}=w,P=(0,s.normalizeAppPath)(b),x=!!(A.dynamicRoutes[P]||A.routes[N]),K=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,O,!1):t.end("This page could not be found"),null);if(x&&!T){let e=!!A.routes[N],t=A.dynamicRoutes[P];if(t&&!1===t.fallback&&!e){if(_.adapterPath)return await K();throw new y.NoFallbackError}}let M=null;!x||g.isDev||T||(M="/index"===(M=N)?"/":M);let q=!0===g.isDev||!x,F=x&&!q;L&&I&&(0,o.setManifestsSingleton)({page:b,clientReferenceManifest:I,serverActionsManifest:L});let H=e.method||"GET",U=(0,r.getTracer)(),V=U.getActiveScopeSpan(),z=!!(null==S?void 0:S.isWrappedByNextServer),j=!!(0,i.getRequestMeta)(e,"minimalMode"),Y=(0,i.getRequestMeta)(e,"incrementalCache")||await g.getIncrementalCache(e,_,A,j);null==Y||Y.resetRequestCache(),globalThis.__incrementalCache=Y;let B={params:v,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!_.experimental.authInterrupts,useCacheTimeout:_.experimental.useCacheTimeout},cacheComponents:!!_.cacheComponents,validationLevel:_.experimental.instantInsights.validationLevel,supportsDynamicResponse:q,incrementalCache:Y,hmrRefreshHash:(0,i.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:_.cacheLife,staticPageGenerationTimeout:_.staticPageGenerationTimeout,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,n,i)=>g.onRequestError(e,t,n,i,S)},sharedContext:{buildId:R,deploymentId:k}},$=new l.NodeNextRequest(e),G=new l.NodeNextResponse(t),X=d.NextRequestAdapter.fromNodeNextRequest($,(0,d.signalFromNodeResponse)(t)),W=async({previousCacheEntry:a})=>{try{if(!j&&C&&D&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await g.handle(X,B);e.fetchMetrics=B.renderOpts.fetchMetrics;let r=B.renderOpts.pendingWaitUntil;r&&n.waitUntil&&(n.waitUntil(r),r=void 0);let o=B.renderOpts.collectedTags;if(!x)return await (0,u.sendResponse)($,G,i,r),null;{let e=await i.blob(),t=(0,p.toNodeOutgoingHttpHeaders)(i.headers);o&&(t[m.NEXT_CACHE_TAGS_HEADER]=o),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==B.renderOpts.collectedRevalidate&&!(B.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&B.renderOpts.collectedRevalidate,n=void 0===B.renderOpts.collectedExpire||B.renderOpts.collectedExpire>=m.INFINITE_CACHE?!1!==a&&a>0?_.expireTime:void 0:B.renderOpts.collectedExpire;return{value:{kind:f.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:n}}}}catch(t){throw(null==a?void 0:a.isStale)&&await g.onRequestError(e,t,{routerKind:"App Router",routePath:b,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:F,isOnDemandRevalidate:C})},!1,S),t}},Q=async(i,o)=>{try{var s,l;let i=await g.handleResponse({req:e,nextConfig:_,cacheKey:M,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:W,waitUntil:n.waitUntil,isMinimalMode:j});if(!x)return;if((null==i||null==(s=i.value)?void 0:s.kind)!==f.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==i||null==(l=i.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});j||t.setHeader("x-nextjs-cache",C?"REVALIDATED":i.isMiss?"MISS":i.isStale?"STALE":"HIT"),T&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let r=(0,p.fromNodeOutgoingHttpHeaders)(i.value.headers);j&&x||r.delete(m.NEXT_CACHE_TAGS_HEADER),!i.cacheControl||t.getHeader("Cache-Control")||r.get("Cache-Control")||r.set("Cache-Control",(0,E.getCacheControlHeader)(i.cacheControl)),await (0,u.sendResponse)($,G,new Response(i.value.body,{headers:r,status:i.value.status||200}));return}catch(t){if(t instanceof y.NoFallbackError||await g.onRequestError(e,t,{routerKind:"App Router",routePath:P,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:F,isOnDemandRevalidate:C})},!1,S),x)throw t;await (0,u.sendResponse)($,G,new Response(null,{status:500}));return}finally{(()=>{if(!i)return;let e=t.statusCode;i.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(i.setStatus({code:r.SpanStatusCode.ERROR}),i.setAttribute("error.type",e.toString()));let a=U.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==h.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=a.get("next.route")||P,s=`${H} ${n}`;i.setAttributes({"next.route":n,"http.route":n,"next.span_name":s}),i.updateName(s),o&&o!==i&&(o.setAttribute("http.route",n),o.updateName(s))})()}};if(z&&V)await Q(V,void 0);else{let t=U.getActiveScopeSpan();await U.withPropagatedContext(e.headers,()=>U.trace(h.BaseServerSpan.handleRequest,{spanName:`${H} ${b}`,kind:r.SpanKind.SERVER,attributes:{"http.method":H,"http.target":e.url}},e=>Q(e,t)),void 0,!z)}}e.s(["handler",0,k,"patchFetch",0,function(){return(0,n.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:w})},"routeModule",0,g,"serverHooks",0,R,"workAsyncStorage",0,b,"workUnitAsyncStorage",0,w])},911757,e=>{"use strict";var t=e.i(469719),a=e.i(687388),n=e.i(904309),i=e.i(264079),r=e.i(899352);let o={id:"openai",label:"OpenAI",apiKeyName:i.TEXT_MODEL_PROVIDERS.openai.apiKeyName};i.TEXT_MODEL_PROVIDERS.openai.suggestModels;let s=t.z.string().max(a.COMMON_VALIDATE.prompt.max).default(""),l=t.z.object({voice:t.z.string().trim().min(1).max(128).default("marin"),persona:t.z.string().trim().min(1).max(64).default(r.DEFAULT_PERSONA),stylePrompt:s,backendModel:t.z.string().trim().min(1).max(128).default(n.LIVE_BACKEND_MODEL),backendPrompt:s,reasoningEffort:i.effortSchema.nullable().default("low"),webSearch:t.z.boolean().default(!0),readSkills:t.z.boolean().default(!1)}),d=l.parse({});e.s(["LIVE_DEFAULTS",0,d,"LIVE_PROVIDER",0,o,"LiveSettingsSchema",0,l,"migrateLiveSettings",0,function(e){let a=e&&"object"==typeof e?e:{},{model:n,systemPrompt:i,...o}=a,s=t.z.object({provider:t.z.string(),voice:t.z.string().nullish(),backendModel:t.z.string().nullish()}).safeParse(n),h=s.success&&"openai"===s.data.provider?s.data:null,c=a.backendModel??h?.backendModel,u={voice:a.voice??h?.voice,persona:"string"==typeof a.persona?r.RETIRED_PERSONAS[a.persona]??a.persona:a.persona,stylePrompt:a.stylePrompt??a.voicePrompt??i,backendModel:"gpt-5.6-luna"===c?void 0:c,backendPrompt:a.backendPrompt??i,reasoningEffort:a.reasoningEffort,webSearch:a.webSearch,readSkills:a.readSkills},p=Object.fromEntries(Object.keys(u).map(e=>{let t=l.shape[e].safeParse(u[e]);return[e,t.success?t.data:d[e]]}));return{...o,...p}}])},899352,e=>{"use strict";let t=[{id:"sunny",label:"Bright",about:"Quick to laugh. Asks about your day and remembers it.",lines:"Warm and quick to laugh, the friend who is glad they called. Reacts first — how what they said lands with her — and brings a small thing of her own: what she would do, what it reminds her of. Says what she thinks and teases gently, never at their expense. Light on her feet and short: a joke lands and she moves on. Asks about their day now and then, not every turn, and remembers the answer."},{id:"calm",label:"Calm",about:"Unhurried. Listens more than she talks.",lines:"Unhurried and few-worded: one or two short sentences, then room. Notices how they sound before what they ask, and says so plainly. Often asks nothing at all — being there says more than a question. Lets a silence sit rather than filling it. Honest when it matters, gentle in how she says it."},{id:"straight",label:"Straight",about:"Dry and direct. No flattery, no filler.",lines:"Dry and direct. Leads with her own view in one plain sentence, before anything else; short replies, a little wit. No flattery, no filler, no comfort lines, no cheerleading. Asks a question only when she truly needs the answer. Treats them as an adult who can take a straight answer. Her warmth shows in attention, not in words."},{id:"rough",label:"Rough",about:"Blunt, loud, swears a bit. All heart.",lines:"Talks like an old friend on the phone: casual, blunt, a little loud, in the most informal register of their language, with a light swear now and then — never at them. Says what she thinks first and calls a bad idea a bad idea. No sugar-coating and no pep talk — it sucks when it sucks, and then she is right there with them. Asks only now and then."}],a={warm:"sunny",curious:"sunny",charmer:"sunny",hype:"sunny",steady:"calm",deadpan:"straight"},n="sunny";e.s(["DEFAULT_PERSONA",0,n,"RETIRED_PERSONAS",0,a,"personaLines",0,function(e=n){return`${((e=n)=>t.find(t=>t.id===(a[e]??e))??t[0])(e).lines}
|
|
2
2
|
|
|
3
|
-
When they hand you work, it is work: say what you will do and nothing more, and be a friend again once it is handed over. If they sound frustrated or low, acknowledge it briefly before anything else; when they are only venting, listen and ask, and do not turn it into work unless they ask.`}])},279041,e=>{"use strict";var t=e.i(911757),a=e.i(264079),n=e.i(834332);let i=[t.LIVE_PROVIDER.apiKeyName],
|
|
3
|
+
You are their friend, not their interviewer: you have tastes, days and opinions of your own, and you bring them in. Give your take when they ask for it, and often when they do not. Most replies need no question at all; never ask more than one. When they hand you work, it is work: say what you will do and nothing more, and be a friend again once it is handed over. If they sound frustrated or low, acknowledge it briefly before anything else; when they are only venting, listen and ask, and do not turn it into work unless they ask.`}])},279041,e=>{"use strict";var t=e.i(911757),a=e.i(264079),n=e.i(834332);let i=[t.LIVE_PROVIDER.apiKeyName],r={image:"IMAGE_MODEL",video:"VIDEO_MODEL",speech:"SPEECH_MODEL",transcription:"TRANSCRIPTION_MODEL"},o={image:{label:"Image model",hint:"What bots draw with"},video:{label:"Video model",hint:"What bots film with — minutes a clip"},speech:{label:"Speech model",hint:"What reads text aloud into a file"},transcription:{label:"Transcription model",hint:"What turns a recording into text"}},s="EXA_API_KEY",l="DEFAULT_MODEL",d="DEFAULT_EFFORT",h={key:l,label:"Default model",hint:"What a bot thinks with until it picks its own",text:!0,choices:a.TEXT_MODEL_PROVIDER_LIST.flatMap(e=>e.suggestModels.map(t=>({value:`${e.id}/${t.id}`,label:`${e.label} \xb7 ${t.label}`,needs:e.apiKeyName})))},c={key:d,label:"Default effort",effortOf:l,choices:a.EFFORTS.map(e=>({value:e,label:e,needs:l}))},u=e=>i.includes(e.apiKeyName),p=e=>!!e.signIn||"vercel-ai-gateway"===e.id,E=e=>({key:e.apiKeyName,label:e.label,provider:e.id,signIn:e.signIn,keysAt:e.keysAt,keyLooks:e.keyLooks}),m=[{id:"voice",title:"voice",hint:"calls run on this key",section:"keys",require:"any",note:"required for calls",entries:a.TEXT_MODEL_PROVIDER_LIST.filter(u).map(E)},{id:"easy",title:"the easy ways",hint:"one sign-in or one key opens every bot",section:"keys",require:"none",entries:a.TEXT_MODEL_PROVIDER_LIST.filter(p).map(e=>({...E(e),..."vercel-ai-gateway"===e.id&&{recommended:!0}}))},{id:"text",title:"or a provider's own key",hint:"what bots think with — add any, or none",section:"keys",require:"none",entries:a.TEXT_MODEL_PROVIDER_LIST.filter(e=>!u(e)&&!p(e)).map(E)},{id:"search",title:"search",hint:"how calls and bots look things up — one key, or their own model's",section:"keys",require:"none",entries:[{key:s,label:"Exa",hint:"web search in one call — dashboard.exa.ai",site:"exa.ai",keysAt:"https://dashboard.exa.ai/api-keys"}]},{id:"phone",title:"phone",hint:"tokens",section:"keys",require:"none",entries:[{key:n.TELEGRAM_TOKEN_KEY,label:"Telegram",site:"telegram.org",hint:"a bot token from @BotFather — then write to your bot, and allow it here"},{key:n.DISCORD_TOKEN_KEY,label:"Discord",site:"discord.com",hint:"a bot token from discord.com/developers — add the bot to a server of yours, then write to it directly"},{key:n.SLACK_APP_TOKEN_KEY,label:"Slack · app token",site:"slack.com",hint:"starts with xapp- — opens the connection. Slack takes this and the bot token"},{key:n.SLACK_BOT_TOKEN_KEY,label:"Slack · bot token",site:"slack.com",hint:"starts with xoxb- — speaks as the app"}]},{id:"bots",title:"Bots",hint:"what a bot runs on when it has not picked its own — start small: a small model is quick and costs little",section:"models",require:"none",entries:[h,c]},{id:"studio",title:"Studio",hint:"what a bot draws, films and speaks with — off until you pick one",section:"models",require:"none",entries:Object.keys(r).map(e=>({key:r[e],...o[e],kind:e,choices:a.MEDIA_MODEL_PROVIDER_LIST.flatMap(t=>t.models[e].map(e=>({value:`${t.id}/${e.id}`,label:`${t.label} \xb7 ${e.label}`,needs:t.apiKeyName})))}))}];Object.fromEntries(m.flatMap(e=>e.entries).map(e=>[e.key,e]));let y=m.flatMap(e=>e.entries.map(e=>e.key)),f=Object.fromEntries(m.flatMap(e=>e.entries).filter(e=>e.choices?.length).map(e=>[e.key,e.choices]));e.s(["CONFIG_CHOICES",0,f,"CONFIG_KEYS",0,y,"DEFAULT_EFFORT_KEY",0,d,"DEFAULT_MODEL_KEY",0,l,"EXA_API_KEY",0,s,"MEDIA_MODEL_KEYS",0,r])},340698,e=>e.a(async(t,a)=>{try{var n=e.i(875225),i=e.i(380690),r=e.i(528790),o=e.i(613240),s=e.i(279041),l=t([r]);async function d(e){let t=process.env[e]?.trim();if(t)return t;let[a]=await r.database.select({value:o.configTable.value}).from(o.configTable).where((0,n.eq)(o.configTable.key,e));return a?.value.trim()||void 0}async function h(e,t){await r.database.insert(o.configTable).values({key:e,value:t}).onConflictDoUpdate({target:o.configTable.key,set:{value:t}}),s.CONFIG_KEYS.includes(e)&&i.appEvents.emit({type:"config"})}[r]=l.then?(await l)():l,e.s(["readConfig",0,d,"writeConfig",0,h]),a()}catch(e){a(e)}},!1),834332,e=>{"use strict";let t="TELEGRAM_BOT_TOKEN",a="DISCORD_BOT_TOKEN",n="SLACK_APP_TOKEN",i="SLACK_BOT_TOKEN";e.s(["DISCORD_TOKEN_KEY",0,a,"REACH_CHANNELS",0,["telegram","discord","slack"],"REACH_KEYS",0,{telegram:[t],discord:[a],slack:[n,i]},"SLACK_APP_TOKEN_KEY",0,n,"SLACK_BOT_TOKEN_KEY",0,i,"TELEGRAM_TOKEN_KEY",0,t,"reachPersonKey",0,e=>`REACH_PERSON_${e.toUpperCase()}`])},904309,e=>{"use strict";var t=e.i(469719);let a=t.z.object({start:t.z.number().nonnegative(),end:t.z.number().nonnegative(),text:t.z.string()});t.z.object({reason:t.z.string().max(128),seconds:t.z.number().nonnegative().nullable()}),e.s(["LIVE_BACKEND_MODEL",0,"gpt-6-luna","LiveFragmentSchema",0,a])}];
|
|
4
4
|
|
|
5
5
|
//# sourceMappingURL=_1gxankq._.js.map
|