thursday-agent 0.22.0 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +4 -4
- 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/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +12 -12
- package/.next/server/app/_not-found.segments/_full.segment.rsc +12 -12
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +11 -11
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/api/artifact/route.js +6 -6
- package/.next/server/app/api/artifact/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/memory/files/route.js +5 -4
- package/.next/server/app/api/bot/memory/files/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/memory/route.js +9 -9
- package/.next/server/app/api/bot/memory/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/route.js +9 -9
- package/.next/server/app/api/bot/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/thread/[id]/route.js +2 -2
- package/.next/server/app/api/bot/thread/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/thread/file/route.js +12 -12
- package/.next/server/app/api/bot/thread/file/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/thread/route.js +2 -2
- package/.next/server/app/api/bot/thread/route.js.nft.json +1 -1
- package/.next/server/app/api/config/route.js +2 -2
- 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.nft.json +1 -1
- package/.next/server/app/api/file/[...path]/route.js +3 -3
- package/.next/server/app/api/file/[...path]/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/automatic/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/catalog/[provider]/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/credits/[provider]/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 +2 -2
- 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 +13 -13
- package/.next/server/app/api/memory/edit/route.js.nft.json +1 -1
- package/.next/server/app/api/memory/route.js +1 -1
- package/.next/server/app/api/memory/route.js.nft.json +1 -1
- package/.next/server/app/api/reach/route.js +11 -11
- package/.next/server/app/api/reach/route.js.nft.json +1 -1
- package/.next/server/app/api/routine/route.js +9 -9
- package/.next/server/app/api/routine/route.js.nft.json +1 -1
- package/.next/server/app/api/running/route.js.nft.json +1 -1
- package/.next/server/app/api/signins/route.js +7 -6
- package/.next/server/app/api/signins/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/[source]/[name]/route.js +8 -8
- package/.next/server/app/api/skills/[source]/[name]/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/route.js +8 -8
- package/.next/server/app/api/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/call/end/route.js +6 -6
- package/.next/server/app/api/thursday/call/end/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/call/plan/route.js +16 -16
- package/.next/server/app/api/thursday/call/plan/route.js.nft.json +1 -1
- 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 +6 -6
- package/.next/server/app/api/thursday/settings/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/text/route.js +16 -16
- package/.next/server/app/api/thursday/text/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/tool-call/route.js +10 -10
- package/.next/server/app/api/thursday/tool-call/route.js.nft.json +1 -1
- package/.next/server/app/api/workspace/files/route.js +1 -1
- package/.next/server/app/api/workspace/files/route.js.nft.json +1 -1
- package/.next/server/app/api/workspace/route.js +1 -1
- package/.next/server/app/api/workspace/route.js.nft.json +1 -1
- package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +11 -11
- package/.next/server/app/artifact/[...path]/page.js +5 -5
- 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/react-loadable-manifest.json +2 -2
- package/.next/server/app/page/server-reference-manifest.json +162 -162
- package/.next/server/app/page.js +7 -7
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__019e1fy._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__01jpmcj._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__03bjojd._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__03vunn6._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__06kxzw-._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__0atwstu._.js +1 -1
- package/.next/server/chunks/{[root-of-the-server]__005onk_._.js → [root-of-the-server]__0cfv4rq._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__0d-dfqm._.js +1 -1
- package/.next/server/chunks/{[root-of-the-server]__1-i6lgn._.js → [root-of-the-server]__0d00o4_._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__0itmdqy._.js → [root-of-the-server]__0e8y4ok._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__1tyftcr._.js → [root-of-the-server]__0eem_66._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__0xn7a8p._.js → [root-of-the-server]__0jn2qbf._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__08922kg._.js → [root-of-the-server]__0l563r8._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__0mh1tgg._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0mq0qmk._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0ncs9uu._.js +1 -1
- package/.next/server/chunks/{[root-of-the-server]__1a7rgvy._.js → [root-of-the-server]__0pp2355._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__1g08s7l._.js → [root-of-the-server]__0r77huw._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__10_v9ml._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__13hng6h._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1478lu3._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__16xao_p._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__17kdjf6._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__17m7ag9._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__17yv6lg._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__19aqyg-._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__19imprr._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1_04mcf._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__1ceammd._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1fhule0._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1hing45._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0mttntm._.js → [root-of-the-server]__1ivfglf._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__1jcu_e9._.js +5 -0
- package/.next/server/chunks/{[root-of-the-server]__0m0qglo._.js → [root-of-the-server]__1kb-dkn._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__0eluax8._.js → [root-of-the-server]__1mowvzz._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__1ndi14y._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1o7z93z._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1onvx8x._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1q_d6dj._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1u_6dhy._.js +1 -1
- package/.next/server/chunks/{[root-of-the-server]__1_wtn0q._.js → [root-of-the-server]__1yiqjfx._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__1yr_vvq._.js +3 -0
- package/.next/server/chunks/_0-mqt2w._.js +3 -0
- package/.next/server/chunks/_0-qt5if._.js +1 -1
- package/.next/server/chunks/{_0fau3ya._.js → _00aztuo._.js} +2 -2
- package/.next/server/chunks/_021kabv._.js +53 -0
- package/.next/server/chunks/_032k4m6._.js +3 -0
- package/.next/server/chunks/_03p6r2-._.js +1 -1
- package/.next/server/chunks/_06b5b4-._.js +2 -2
- package/.next/server/chunks/_06u9yo-._.js +1 -1
- package/.next/server/chunks/_07mczew._.js +3 -0
- package/.next/server/chunks/_07pkeds._.js +1 -1
- package/.next/server/chunks/_08354bn._.js +22 -22
- package/.next/server/chunks/_083t_nr._.js +5 -0
- package/.next/server/chunks/_0c-s0ei._.js +3 -0
- package/.next/server/chunks/_0cq69mm._.js +1 -1
- package/.next/server/chunks/_0gifi_2._.js +7 -0
- package/.next/server/chunks/_0gxz_1b._.js +1 -1
- package/.next/server/chunks/{_1tjwvoz._.js → _0la8s6t._.js} +2 -2
- package/.next/server/chunks/_0p27in2._.js +1 -1
- package/.next/server/chunks/{_09rtyfn._.js → _0rn3c_0._.js} +24 -26
- package/.next/server/chunks/_0ue8nq-._.js +5 -1
- package/.next/server/chunks/{_1uu4wjr._.js → _0wkhub3._.js} +2 -2
- package/.next/server/chunks/_0wyh244._.js +22 -22
- package/.next/server/chunks/_0ynjnhl._.js +5 -0
- package/.next/server/chunks/_1-wp0r0._.js +1 -1
- package/.next/server/chunks/{_201k0ah._.js → _12-7atf._.js} +2 -2
- package/.next/server/chunks/{_02mn8d7._.js → _124q1p2._.js} +2 -2
- package/.next/server/chunks/{_14xuq46._.js → _13qoxq9._.js} +24 -26
- package/.next/server/chunks/{_11y8h29._.js → _15-_mie._.js} +2 -2
- package/.next/server/chunks/_1823_7a._.js +1 -1
- package/.next/server/chunks/{_0uir6hb._.js → _186uku9._.js} +2 -2
- package/.next/server/chunks/{_0ggqpiz._.js → _18sj4xf._.js} +2 -2
- package/.next/server/chunks/_19kea1l._.js +12 -12
- package/.next/server/chunks/_1ac33qw._.js +2 -2
- package/.next/server/chunks/{_18z965x._.js → _1chy-lk._.js} +2 -2
- package/.next/server/chunks/_1cw6-rv._.js +1 -1
- package/.next/server/chunks/_1evvnbp._.js +1 -1
- package/.next/server/chunks/_1f_x75d._.js +3 -0
- package/.next/server/chunks/_1gn2r2q._.js +7 -9
- package/.next/server/chunks/_1icgbi8._.js +1 -1
- package/.next/server/chunks/{_1ozcb6o._.js → _1k6bmez._.js} +2 -2
- package/.next/server/chunks/_1ko5shz._.js +1 -1
- package/.next/server/chunks/_1ksyu6r._.js +1 -1
- package/.next/server/chunks/_1kwmzab._.js +3 -0
- package/.next/server/chunks/_1lg0lsu._.js +1 -1
- package/.next/server/chunks/_1pv6xbq._.js +5 -0
- package/.next/server/chunks/_1q42187._.js +2 -2
- package/.next/server/chunks/_1q6e56i._.js +7 -9
- package/.next/server/chunks/_1t43w6q._.js +1 -1
- package/.next/server/chunks/_1t8fv7b._.js +1 -1
- package/.next/server/chunks/_1ufbxe1._.js +1 -1
- package/.next/server/chunks/_1wgae1c._.js +1 -1
- package/.next/server/chunks/_1xps4ob._.js +1 -1
- package/.next/server/chunks/_1znrlca._.js +3 -0
- package/.next/server/chunks/config_ts_1g4sz5o._.js +1 -1
- package/.next/server/chunks/features_14kex_m._.js +11 -11
- package/.next/server/chunks/features_bot_08z387_._.js +2 -2
- package/.next/server/chunks/features_bot_1d6ghh5._.js +41 -0
- package/.next/server/chunks/features_bot_1dfrdsb._.js +10 -6
- package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0yd5xa0._.js → node_modules_consola_dist_chunks_prompt_mjs_0k--vqs._.js} +1 -1
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_0ufuc3s._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__05qiosr._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0y03pu0._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0zt_au4._.js +3 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__0eloa6y._.js → [root-of-the-server]__17yeveo._.js} +5 -5
- package/.next/server/chunks/ssr/[root-of-the-server]__1867koj._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__1t38-p_._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1u42eh0._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__203utm3._.js +1 -1
- package/.next/server/chunks/ssr/{_0xurp8n._.js → _0-s7ria._.js} +2 -2
- package/.next/server/chunks/ssr/_03vw3u5._.js +3 -0
- package/.next/server/chunks/ssr/_088qe9a._.js +162 -0
- package/.next/server/chunks/ssr/_09a6bpd._.js +1 -1
- package/.next/server/chunks/ssr/{_0u43zjx._.js → _0a_pedm._.js} +2 -2
- package/.next/server/chunks/ssr/_0ali_i8._.js +3 -0
- package/.next/server/chunks/ssr/_0cd6g3l._.js +3 -3
- package/.next/server/chunks/ssr/{_1nwey7a._.js → _0eprrig._.js} +2 -2
- package/.next/server/chunks/ssr/_0flnog5._.js +3 -0
- package/.next/server/chunks/ssr/_0iuvjnw._.js +1 -1
- package/.next/server/chunks/ssr/{_0t_e9rd._.js → _0k-gl8l._.js} +2 -2
- package/.next/server/chunks/ssr/_0kmldic._.js +41 -0
- package/.next/server/chunks/ssr/_0ks03l-._.js +3 -0
- package/.next/server/chunks/ssr/_0mng-y8._.js +6 -0
- package/.next/server/chunks/ssr/_0tg3o37._.js +1 -1
- package/.next/server/chunks/ssr/_0ugzm_0._.js +3 -0
- package/.next/server/chunks/ssr/{_0ntol64._.js → _0wnv6c0._.js} +2 -2
- package/.next/server/chunks/ssr/{_0-y08rv._.js → _0z9zkd-._.js} +2 -2
- package/.next/server/chunks/ssr/_11l9kc0._.js +1 -1
- package/.next/server/chunks/ssr/_12_ail7._.js +3 -0
- package/.next/server/chunks/ssr/_16_7zeo._.js +1 -1
- package/.next/server/chunks/ssr/_16wjbs2._.js +3 -0
- package/.next/server/chunks/ssr/{_16o81mn._.js → _18rmqqu._.js} +2 -2
- package/.next/server/chunks/ssr/_1bfrntd._.js +2 -2
- package/.next/server/chunks/ssr/{_0gn_i4s._.js → _1ckje8g._.js} +2 -2
- package/.next/server/chunks/ssr/_1crszf7._.js +1 -1
- package/.next/server/chunks/ssr/_1h3qetc._.js +3 -0
- package/.next/server/chunks/ssr/{_1gz4ov7._.js → _1kpvfmn._.js} +3 -3
- package/.next/server/chunks/ssr/{_12hdw8x._.js → _1l-3enz._.js} +26 -28
- package/.next/server/chunks/ssr/_1neoj22._.js +1 -1
- package/.next/server/chunks/ssr/_1soynbw._.js +2 -2
- package/.next/server/chunks/ssr/{_0ux4i2m._.js → _1v1pcoh._.js} +2 -2
- package/.next/server/chunks/ssr/features_ai_components_model-picker_tsx_0ucb1y9._.js +1 -1
- package/.next/server/chunks/ssr/{features_bot_06n7hmd._.js → features_bot_0-7flc-._.js} +2 -2
- package/.next/server/chunks/ssr/features_bot_0tb4ui-._.js +1 -1
- package/.next/server/chunks/ssr/features_bot_1stfytf._.js +41 -0
- package/.next/server/chunks/ssr/features_config_10xs4l1._.js +20 -0
- 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_thursday_0cf9y0b._.js +1 -1
- package/.next/server/chunks/ssr/features_thursday_components_here-globe_tsx_055duhw._.js +1 -1
- package/.next/server/chunks/ssr/lib_utils_ts_0_f1xvm._.js +1 -1
- package/.next/server/chunks/ssr/{node_modules_1i-g3bz._.js → node_modules_00mh9o-._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1bvw77g._.js → node_modules_04f_uw2._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_16tn8xu._.js → node_modules_07udd3z._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0ksqeyy._.js → node_modules_08-pj-2._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0e398ts._.js → node_modules_098h6h5._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_19r9vjv._.js → node_modules_0_7yfem._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_01v7ybp._.js → node_modules_0ayoorn._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0_zk6yd._.js → node_modules_0bp3vfu._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0m-dnm-._.js → node_modules_0ch5hqr._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0536cp2._.js → node_modules_0e-hyim._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0yn2z6s._.js → node_modules_0ffm9w3._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1jf8aik._.js → node_modules_0jzyuwk._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0m2oth3._.js → node_modules_0ln4iwf._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1dlue-g._.js → node_modules_0my2hph._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0cpegwf._.js → node_modules_0y_k4h5._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_13dwal5._.js → node_modules_10bzndo._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1ctm_ju._.js → node_modules_1b5rxw5._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_01fukqn._.js → node_modules_1b_h09q._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_12hh0bx._.js → node_modules_1e83j9e._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_08m1gvh._.js → node_modules_1e9ugfy._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_06n6ruk._.js → node_modules_1hd66k0._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1zdz2zf._.js → node_modules_1inwr2m._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1zalmtr._.js → node_modules_1j9xx1k._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1kfbdfo._.js → node_modules_1k8kypa._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_056xgci._.js → node_modules_1oeu85h._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0ie8g6a._.js → node_modules_1r2ghv5._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules_1fqgrh0._.js → node_modules_1ttpnib._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0nj1l8f._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0ir6p7s._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_17ok98u._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1ejf5ye._.js} +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- 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 +163 -163
- package/.next/static/chunks/02lze_e5sagjn.js +1 -0
- package/.next/static/chunks/{3866u-edsoyj3.js → 081kl7k8r6f8z.js} +1 -1
- package/.next/static/chunks/0_s4z70lx1tgs.js +1 -0
- package/.next/static/chunks/0fklfoj8o_msg.js +18 -0
- package/.next/static/chunks/0ve2gb0hw3wkq.js +1 -0
- package/.next/static/chunks/11c3uijgqik4m.js +39 -0
- package/.next/static/chunks/{0go5_9zqag7l0.js → 125lh2zzxk3r2.js} +1 -1
- package/.next/static/chunks/{3zv4wiqjl5kex.js → 166v36614ycsf.js} +1 -1
- package/.next/static/chunks/16np6727e61io.js +1 -0
- package/.next/static/chunks/18amidjlaqexf.js +1 -0
- package/.next/static/chunks/{35ehi-okrfot5.js → 1ettmta9iet7b.js} +1 -1
- package/.next/static/chunks/{1dy5xaxjdsy11.js → 1j4rndg17wgfk.js} +1 -1
- package/.next/static/chunks/{01r1uco3ikisc.js → 1mpz4epyg-7pz.js} +1 -1
- package/.next/static/chunks/{05blzta_1i7c2.js → 1oh4hbusfz97l.js} +1 -1
- package/.next/static/chunks/{3qfhjwd9yuijo.js → 1x1-44qmhu437.js} +1 -1
- package/.next/static/chunks/{0hpx0--bh7vld.js → 22jb4s3-8ckup.js} +1 -1
- package/.next/static/chunks/236le5kv_yj6a.css +1 -0
- package/.next/static/chunks/24op50z6sqi_5.js +1 -0
- package/.next/static/chunks/2eczs-lporqt6.js +1 -0
- package/.next/static/chunks/{2nbj2t9yp8ke9.js → 2sxclirl-c-um.js} +1 -1
- package/.next/static/chunks/2yfmmo4qr_f-m.js +1 -0
- package/.next/static/chunks/2z4sodeldj_86.js +1 -0
- package/.next/static/chunks/{3tyacy8fh5_18.js → 2zhiqxw61qowv.js} +2 -2
- package/.next/static/chunks/338dt83llhu5m.js +1 -0
- package/.next/static/chunks/3ezjz93yvzmop.js +4 -0
- package/.next/static/chunks/3h6rqjx92wva9.js +1 -0
- package/.next/static/chunks/3ph9u-51x6jhe.js +15 -0
- package/.next/static/chunks/{052u13mcoxt87.js → 3uf32hp_g9stz.js} +1 -1
- package/.next/static/chunks/3w7zt3xzyjn86.js +3 -0
- package/.next/static/chunks/3xkx7vqefm7on.js +2 -0
- package/.next/static/chunks/3ygk41pgsw7nv.js +1 -0
- package/.next/static/chunks/{3146sccz1j76i.js → 411uyd0is9u5s.js} +1 -1
- package/.next/static/chunks/4384atd5zerir.js +1 -0
- package/README.md +1 -1
- package/database/migrations/20260929121448_thread_started_by/migration.sql +1 -0
- package/database/migrations/20260929121448_thread_started_by/snapshot.json +1969 -0
- package/guide/bots.md +89 -44
- package/guide/calls.md +41 -25
- package/guide/index.md +5 -2
- package/guide/phone.md +7 -4
- package/guide/setup.md +12 -6
- package/guide/trouble.md +3 -2
- package/package.json +1 -1
- package/public/voices/intro/mic-b17ca82d.ogg +0 -0
- package/seed-skills/concierge/travel/SKILL.md +2 -1
- package/seed-skills/concierge/travel/page/itinerary.css +1009 -257
- package/seed-skills/concierge/travel/references/itinerary.md +95 -35
- package/seed-skills/concierge/travel/references/plan.md +11 -4
- package/seed-skills/concierge/travel/scripts/itinerary.mjs +754 -138
- package/skills/README.md +7 -4
- package/skills/artifact/SKILL.md +17 -13
- package/skills/artifact/references/canvas.md +4 -5
- package/skills/artifact/references/deck.md +93 -2
- package/skills/artifact/runtime/app/kit/src/index.css +35 -0
- package/skills/artifact/runtime/app/kit/tailwind.config.js +6 -0
- package/skills/artifact/runtime/deck/data.mjs +21 -0
- package/skills/artifact/runtime/deck/deck.css +254 -4
- package/skills/artifact/runtime/deck/deck.html +3 -0
- package/skills/artifact/runtime/deck/deck.js +88 -5
- package/skills/artifact/runtime/deck/deck.mjs +1 -17
- package/skills/artifact/runtime/document/quick.css +264 -89
- package/skills/artifact/runtime/document/quick.html +16 -7
- package/skills/artifact/runtime/document/quick.js +377 -98
- package/skills/artifact/runtime/render.mjs +52 -6
- package/skills/artifact/runtime/sheet/sheet.css +29 -21
- package/skills/artifact/runtime/shell/drafts.js +25 -0
- package/skills/artifact/runtime/shell/fonts/Geist-latin-ext.woff2 +0 -0
- package/skills/artifact/runtime/shell/fonts/Geist-latin.woff2 +0 -0
- package/skills/artifact/runtime/shell/fonts/GeistMono-latin-ext.woff2 +0 -0
- package/skills/artifact/runtime/shell/fonts/GeistMono-latin.woff2 +0 -0
- package/skills/artifact/runtime/shell/fonts/OFL.txt +93 -0
- package/skills/artifact/runtime/shell/head.html +27 -2
- package/skills/artifact/runtime/shell/shell.css +88 -8
- package/skills/artifact/runtime/shell/shell.js +318 -22
- package/skills/artifact/runtime/shell/wear.mjs +114 -12
- package/skills/artifact/scripts/app.mjs +5 -0
- package/skills/artifact/scripts/chart.mjs +20 -19
- package/skills/artifact/scripts/deck.mjs +276 -0
- package/skills/artifact/scripts/document.mjs +55 -2
- package/skills/artifact/scripts/media.mjs +1 -1
- package/skills/artifact/templates/boards/direction.html +55 -2
- package/skills/browser/SKILL.md +1 -1
- package/skills/browser/references/scripts.md +1 -1
- package/skills/daily-brief/SKILL.md +2 -0
- package/skills/daily-brief/page/brief.css +460 -302
- package/skills/daily-brief/references/brief.md +33 -7
- package/skills/daily-brief/scripts/page.mjs +241 -48
- package/skills/media-digest/SKILL.md +1 -0
- package/skills/media-digest/scripts/digest.mjs +57 -43
- package/.next/server/chunks/[root-of-the-server]__00f051a._.js +0 -7
- package/.next/server/chunks/[root-of-the-server]__0340k46._.js +0 -7
- package/.next/server/chunks/[root-of-the-server]__0ndw2yj._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__16y0k92._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__18e65_-._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1a0xgyh._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__1dth047._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__1huywqp._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__1ij4h2a._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1q1s4ls._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1qa67zs._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1t-mfa4._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__20ofm9t._.js +0 -3
- package/.next/server/chunks/_0483t_f._.js +0 -5
- package/.next/server/chunks/_0lcthk8._.js +0 -3
- package/.next/server/chunks/_0uv1gs1._.js +0 -3
- package/.next/server/chunks/_17fjc-7._.js +0 -5
- package/.next/server/chunks/_1dcbwn-._.js +0 -3
- package/.next/server/chunks/_1mgzs18._.js +0 -3
- package/.next/server/chunks/_20qn224._.js +0 -3
- package/.next/server/chunks/features_bot_0zy_q8y._.js +0 -37
- package/.next/server/chunks/ssr/[root-of-the-server]__04upd5v._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0dy20eb._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0yyxgt2._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__14j8gxy._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__20t_4l2._.js +0 -3
- package/.next/server/chunks/ssr/_00buy3i._.js +0 -162
- package/.next/server/chunks/ssr/_014_wjp._.js +0 -3
- package/.next/server/chunks/ssr/_07m4ii5._.js +0 -3
- package/.next/server/chunks/ssr/_0cv9tmv._.js +0 -3
- package/.next/server/chunks/ssr/_0j6rtjm._.js +0 -6
- package/.next/server/chunks/ssr/_0ogkeu-._.js +0 -3
- package/.next/server/chunks/ssr/_10sc7ab._.js +0 -3
- package/.next/server/chunks/ssr/_14nwim3._.js +0 -37
- package/.next/server/chunks/ssr/_1e01b-_._.js +0 -3
- package/.next/server/chunks/ssr/_1nfv27b._.js +0 -3
- package/.next/server/chunks/ssr/features_bot_1c56lew._.js +0 -37
- package/.next/server/chunks/ssr/features_bot_1knyan7._.js +0 -3
- package/.next/server/chunks/ssr/features_config_09wq1s9._.js +0 -20
- package/.next/static/chunks/01gkq9y6_xk4a.js +0 -1
- package/.next/static/chunks/09kwsjbmr_z1w.js +0 -1
- package/.next/static/chunks/0ynv7zu_bguve.js +0 -1
- package/.next/static/chunks/0zi59tghmg1lu.js +0 -18
- package/.next/static/chunks/1_ftsgxa-sia_.js +0 -1
- package/.next/static/chunks/1cg3torc90q5t.js +0 -1
- package/.next/static/chunks/1qnx1h5c8f93b.js +0 -1
- package/.next/static/chunks/1rwn3d9ji5w35.js +0 -1
- package/.next/static/chunks/1so3f5fi7e5g9.js +0 -35
- package/.next/static/chunks/1ya41wxfmp4s8.js +0 -1
- package/.next/static/chunks/27rwkfu7_xvs1.js +0 -4
- package/.next/static/chunks/2hueh8masqd91.js +0 -15
- package/.next/static/chunks/2jrt_752fqz2f.js +0 -1
- package/.next/static/chunks/2ogme4qydxnaq.js +0 -3
- package/.next/static/chunks/2r2tocw2rpvm2.js +0 -1
- package/.next/static/chunks/2t4kimg1lt-p7.js +0 -2
- package/.next/static/chunks/2w6y71o27my_z.js +0 -1
- package/.next/static/chunks/31_am8rtmk_tv.css +0 -1
- package/.next/static/chunks/337g9g_ux2gj-.js +0 -1
- package/public/voices/intro/heard-1f12cd45.ogg +0 -0
- package/public/voices/intro/mic-e561372a.ogg +0 -0
- package/skills/artifact/references/book.md +0 -163
- package/skills/artifact/runtime/book/book.css +0 -256
- package/skills/artifact/runtime/book/book.html +0 -38
- package/skills/artifact/runtime/book/book.js +0 -81
- package/skills/artifact/scripts/book-pdf.mjs +0 -73
- package/skills/artifact/scripts/book-video.mjs +0 -168
- package/skills/artifact/scripts/book.mjs +0 -291
- /package/.next/static/{8exfHAtcoebYtxjUC4ugl → 6tIYlzfG_5P4sIxxgmucO}/_buildManifest.js +0 -0
- /package/.next/static/{8exfHAtcoebYtxjUC4ugl → 6tIYlzfG_5P4sIxxgmucO}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{8exfHAtcoebYtxjUC4ugl → 6tIYlzfG_5P4sIxxgmucO}/_ssgManifest.js +0 -0
- /package/seed-skills/{marketer → writer}/marketing/LICENSE +0 -0
- /package/seed-skills/{marketer → writer}/marketing/SKILL.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/copywriting-copy-frameworks.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/copywriting-natural-transitions.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/copywriting.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/emails-copy-guidelines.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/emails-email-types.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/emails-sequence-templates.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/emails.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/launch.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/product-marketing.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/seo-audit-ai-writing-detection.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/seo-audit-international-seo.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/seo-audit.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/social-carousel-frameworks.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/social-platform-limits.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/social-platforms.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/social-post-templates.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/social-reverse-engineering.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/social-short-form-video.md +0 -0
- /package/seed-skills/{marketer → writer}/marketing/references/social.md +0 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
module.exports=[596410,e=>{"use strict";var t=e.i(527608);let n=(0,e.i(91264).serverRoute)(()=>(0,t.listSignIns)());e.s(["GET",0,n])},938811,e=>{"use strict";var t=e.i(747909),n=e.i(174017),a=e.i(996250),i=e.i(759756),r=e.i(561916),s=e.i(174677),o=e.i(869741),l=e.i(316795),u=e.i(487718),c=e.i(995169),d=e.i(47587),p=e.i(666012),w=e.i(570101),g=e.i(626937),f=e.i(10372),h=e.i(193695);e.i(52474);var R=e.i(600220);let m=new t.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/signins/route",pathname:"/api/signins",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/signins/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(596410),...{}}),{workAsyncStorage:S,workUnitAsyncStorage:y,serverHooks:v}=m;async function I(e,t,a){a.requestMeta&&(0,i.setRequestMeta)(e,a.requestMeta),m.isDev&&(0,i.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let S="/api/signins/route";S=S.replace(/\/index$/,"")||"/";let y=await m.prepare(e,t,{srcPage:S,multiZoneDraftMode:!1});if(!y)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:v,deploymentId:I,params:C,nextConfig:E,parsedUrl:k,isDraftMode:A,prerenderManifest:_,routerServerContext:b,isOnDemandRevalidate:x,revalidateOnlyGenerated:T,resolvedPathname:O,clientReferenceManifest:N,serverActionsManifest:P}=y,H=(0,o.normalizeAppPath)(S),L=!!(_.dynamicRoutes[H]||_.routes[O]),M=async()=>((null==b?void 0:b.render404)?await b.render404(e,t,k,!1):t.end("This page could not be found"),null);if(L&&!A){let e=!!_.routes[O],t=_.dynamicRoutes[H];if(t&&!1===t.fallback&&!e){if(E.adapterPath)return await M();throw new h.NoFallbackError}}let $=null;!L||m.isDev||A||($="/index"===($=O)?"/":$);let U=!0===m.isDev||!L,q=L&&!U;P&&N&&(0,s.setManifestsSingleton)({page:S,clientReferenceManifest:N,serverActionsManifest:P});let D=e.method||"GET",W=(0,r.getTracer)(),j=W.getActiveScopeSpan(),B=!!(null==b?void 0:b.isWrappedByNextServer),z=!!(0,i.getRequestMeta)(e,"minimalMode"),G=(0,i.getRequestMeta)(e,"incrementalCache")||await m.getIncrementalCache(e,E,_,z);null==G||G.resetRequestCache(),globalThis.__incrementalCache=G;let F={params:C,previewProps:_.preview,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts,useCacheTimeout:E.experimental.useCacheTimeout},cacheComponents:!!E.cacheComponents,validationLevel:E.experimental.instantInsights.validationLevel,supportsDynamicResponse:U,incrementalCache:G,hmrRefreshHash:(0,i.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:E.cacheLife,staticPageGenerationTimeout:E.staticPageGenerationTimeout,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,n,a,i)=>m.onRequestError(e,t,a,i,b)},sharedContext:{buildId:v,deploymentId:I}},K=new l.NodeNextRequest(e),Y=new l.NodeNextResponse(t),J=u.NextRequestAdapter.fromNodeNextRequest(K,(0,u.signalFromNodeResponse)(t)),V=async({previousCacheEntry:n})=>{try{if(!z&&x&&T&&!n)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await m.handle(J,F);e.fetchMetrics=F.renderOpts.fetchMetrics;let r=F.renderOpts.pendingWaitUntil;r&&a.waitUntil&&(a.waitUntil(r),r=void 0);let s=F.renderOpts.collectedTags;if(!L)return await (0,p.sendResponse)(K,Y,i,r),null;{let e=await i.blob(),t=(0,w.toNodeOutgoingHttpHeaders)(i.headers);s&&(t[f.NEXT_CACHE_TAGS_HEADER]=s),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let n=void 0!==F.renderOpts.collectedRevalidate&&!(F.renderOpts.collectedRevalidate>=f.INFINITE_CACHE)&&F.renderOpts.collectedRevalidate,a=void 0===F.renderOpts.collectedExpire||F.renderOpts.collectedExpire>=f.INFINITE_CACHE?!1!==n&&n>0?E.expireTime:void 0:F.renderOpts.collectedExpire;return{value:{kind:R.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:n,expire:a}}}}catch(t){throw(null==n?void 0:n.isStale)&&await m.onRequestError(e,t,{routerKind:"App Router",routePath:S,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:q,isOnDemandRevalidate:x})},!1,b),t}},X=async(i,s)=>{try{var o,l;let i=await m.handleResponse({req:e,nextConfig:E,cacheKey:$,routeKind:n.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:_,isRoutePPREnabled:!1,isOnDemandRevalidate:x,revalidateOnlyGenerated:T,responseGenerator:V,waitUntil:a.waitUntil,isMinimalMode:z});if(!L)return;if((null==i||null==(o=i.value)?void 0:o.kind)!==R.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});z||t.setHeader("x-nextjs-cache",x?"REVALIDATED":i.isMiss?"MISS":i.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let r=(0,w.fromNodeOutgoingHttpHeaders)(i.value.headers);z&&L||r.delete(f.NEXT_CACHE_TAGS_HEADER),!i.cacheControl||t.getHeader("Cache-Control")||r.get("Cache-Control")||r.set("Cache-Control",(0,g.getCacheControlHeader)(i.cacheControl)),await (0,p.sendResponse)(K,Y,new Response(i.value.body,{headers:r,status:i.value.status||200}));return}catch(t){if(t instanceof h.NoFallbackError||await m.onRequestError(e,t,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:q,isOnDemandRevalidate:x})},!1,b),L)throw t;await (0,p.sendResponse)(K,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:r.SpanStatusCode.ERROR}),i.setAttribute("error.type",e.toString()));let n=W.getRootSpanAttributes();if(!n)return;if(n.get("next.span_type")!==c.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${n.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=n.get("next.route")||H,o=`${D} ${a}`;i.setAttributes({"next.route":a,"http.route":a,"next.span_name":o}),i.updateName(o),s&&s!==i&&(s.setAttribute("http.route",a),s.updateName(o))})()}};if(B&&j)await X(j,void 0);else{let t=W.getActiveScopeSpan();await W.withPropagatedContext(e.headers,()=>W.trace(c.BaseServerSpan.handleRequest,{spanName:`${D} ${S}`,kind:r.SpanKind.SERVER,attributes:{"http.method":D,"http.target":e.url}},e=>X(e,t)),void 0,!B)}}e.s(["handler",0,I,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:S,workUnitAsyncStorage:y})},"routeModule",0,m,"serverHooks",0,v,"workAsyncStorage",0,S,"workUnitAsyncStorage",0,y])},527608,824664,e=>{"use strict";var t=e.i(666680),n=e.i(912714),a=e.i(750227),i=e.i(469719),r=e.i(380690),s=e.i(687388),o=e.i(786025),l=e.i(640911),u=e.i(268486);let c=e=>e.trim().toLowerCase().replace(/^[a-z]+:\/\//,"").replace(/^www\./,"").replace(/[/?#].*$/,"");e.s(["siteOf",0,c],824664);let d=(0,a.join)(s.DATA_DIR,s.PATHS.signIns),p=i.z.object({site:i.z.string().min(1),account:i.z.string().min(1),bots:i.z.array(i.z.string()),asking:i.z.array(i.z.string()),keptAt:i.z.string(),usedAt:i.z.string().nullable(),state:i.z.unknown()}),w=(e,n)=>(0,a.join)(d,`${encodeURIComponent(c(e))}@${(0,t.createHash)("sha256").update(n).digest("hex").slice(0,16)}.json`),g=e=>(0,a.join)(d,`${encodeURIComponent(c(e))}.json`);function f(e){let[,t]=/^([^@]+)(?:@[0-9a-f]{16})?\.json$/.exec(e)??[];if(!t)return null;try{return decodeURIComponent(t)}catch{return null}}async function h(e){try{let t=p.safeParse(JSON.parse(await (0,n.readFile)(e,"utf8")));return t.success?t.data:null}catch{return null}}async function R(e,t){let n=await h(w(e,t));if(n)return n;let a=await h(g(e));return a?.site===c(e)&&a.account===t?a:null}async function m(e,t){let a=g(e),i=await h(a);i?.site===c(e)&&i.account===t&&await (0,n.rm)(a,{force:!0})}async function S(e){await (0,n.mkdir)(d,{recursive:!0}),await (0,n.writeFile)(w(e.site,e.account),JSON.stringify(e),{mode:384}),await m(e.site,e.account),r.appEvents.emit({type:"signins"})}let y=globalThis.__signInsVault??=(0,u.createKeyedLock)(),v=e=>y("vault",e),I=({state:e,...t})=>t;async function C(){return[...new Set((await (0,n.readdir)(d).catch(()=>[])).flatMap(e=>f(e)??[]))].sort()}async function E(e){let t=(await (0,n.readdir)(d).catch(()=>[])).filter(t=>{let n=f(t);return null!==n&&(!e||e(n))});return(await Promise.all(t.map(async e=>{let n=await h((0,a.join)(d,e));if(!n)return null;let i=(0,a.basename)(w(n.site,n.account));return e===i?n:e!==(0,a.basename)(g(n.site))||t.includes(i)?null:n}))).flatMap(e=>e?[e]:[]).sort((e,t)=>e.site.localeCompare(t.site)||e.account.localeCompare(t.account))}async function k(e){let t=c(e),n=await C(),a=n.includes(t)?t:n.filter(e=>t.endsWith(`.${e}`)).sort((e,t)=>t.length-e.length)[0];return a?E(e=>e===a):[]}async function A(){return(await E()).map(I)}async function _(e,t){return(await (0,o.listBrowsers)(e,t)).find(e=>e.name===t.PLAYWRIGHT_CLI_SESSION)??null}async function b(e,t){let n=await _(e,t);return n?n.attached?"theirs":"own":null}async function x(e,t){let n=await _(e,t);return!!n&&!n.attached&&!0===n.headed}let T=globalThis.__signInsBrowser??=(0,u.createKeyedLock)(),O=(e,t)=>T(e.PLAYWRIGHT_CLI_SESSION??"",t),N=globalThis.__signInsLentByAccount??=new Map,P="__thursdaySignIns";async function H(e,t){let n=await e.exec(`playwright-cli --raw run-code "async page => page.context().${P} ?? null"`,{env:t,timeoutMs:s.BROWSER_CLI.readMs});if(0===n.exitCode)try{let e=JSON.parse(n.stdout);return"string"==typeof e?e:null}catch{return}}let L=!1;async function M(e,t,n){return 0===(await e.exec(`playwright-cli --raw run-code "async page => { page.context().${P} = '${n}'; return true; }"`,{env:t,timeoutMs:s.BROWSER_CLI.readMs})).exitCode&&(!!L||(L=await H(e,t)===n))}async function $(e,n,a,i,r){let s=n.PLAYWRIGHT_CLI_SESSION;if(!s)return;let o=N.get(s);if("kept"===r&&o?.bot===a&&await H(e,n)===o.mark)return void o.sites.set(i.site,i.account);let u=(0,t.randomUUID)().replaceAll("-","");await M(e,n,u)?N.set(s,{bot:a,mark:u,sites:new Map([[i.site,i.account]])}):(N.delete(s),l.logger.warn(`sign-ins: ${s}'s browser could not be marked, so ${i.site} is not renewed from it`))}async function U(e,t){let n=t.PLAYWRIGHT_CLI_SESSION??"",a=N.get(n);a&&!await M(e,t,a.mark)&&N.delete(n)}let q=e=>`${e.name}
|
|
2
|
+
${e.domain}
|
|
3
|
+
${e.path}`;async function D(e,t){let n,a=t.PLAYWRIGHT_CLI_SESSION??"",i=N.get(a);if(!i?.sites.size)return;if(await b(e,t)!=="own")return void N.delete(a);let r=async()=>{let n=await H(e,t);return void 0!==n&&n!==i.mark&&N.delete(a),n===i.mark};if(!await r())return;let l=(0,o.browserStateFile)();try{let a=await e.exec((0,o.saveBrowserState)(l),{env:t,timeoutMs:s.BROWSER_CLI.loadMs});if(0!==a.exitCode)return;let i=JSON.parse(await e.readFile(l,"utf-8"));n=new Map((i.cookies??[]).map(e=>[q(e),e]))}finally{await e.exec(`rm -f ${l}`)}if(N.get(a)===i&&await r())for(let[e,t]of i.sites)await v(async()=>{let a=await R(e,t),r=a?.state;if(!a||!r?.cookies||!a.bots.includes(i.bot))return;let s=!1,o=r.cookies.map(e=>{let t=n.get(q(e));return t&&JSON.stringify(t)!==JSON.stringify(e)?(s=!0,t):e});s&&await S({...a,state:{...r,cookies:o}})})}async function W(e){let t=(0,o.jobShellEnv)(e);if(!N.get(t.PLAYWRIGHT_CLI_SESSION??"")?.sites.size)return;let n=await (0,o.openWorkspace)();await O(t,()=>D(n,t))}e.s(["borrowSignIn",0,function(e,t,n){return v(async()=>{let a=await k(e);if(!a.length)return{kind:"none",kept:await C()};let i=n?.trim(),r=i?a.find(e=>e.account===i):1===a.length?a[0]:void 0;if(!r)return{kind:"pick",site:a[0].site,accounts:a.map(e=>e.account)};if(!r.bots.includes(t))return r.asking.includes(t)||await S({...r,asking:[...r.asking,t]}),{kind:"ask",signIn:I(r)};let s={...r,usedAt:new Date().toISOString()};return await S(s),{kind:"state",signIn:I(s),state:r.state}})},"carryHold",0,U,"forgetBrowser",0,function(e){N.delete(e.PLAYWRIGHT_CLI_SESSION??"")},"holdSignIn",0,$,"inBrowser",0,O,"keepSignIn",0,function(e){return v(async()=>{let t=await k(e.site),n=t[0]?.site??c(e.site),a=e.account.trim()||n,i=t.map(e=>e.account),r=t.find(e=>e.account===a);if(r&&e.another)return{kind:"clash",site:n,accounts:i};if(r&&!r.bots.includes(e.bot)){let t=r.asking.includes(e.bot)?r:{...r,asking:[...r.asking,e.bot]};return t!==r&&await S(t),{kind:"taken",signIn:I(t)}}if(!r&&t.length&&!e.another)return{kind:"unlisted",site:n,accounts:i};let s={site:n,account:a,bots:[...new Set([...r?.bots??[],e.bot])],asking:(r?.asking??[]).filter(t=>t!==e.bot),keptAt:new Date().toISOString(),usedAt:r?.usedAt??null,state:e.state};return await S(s),{kind:"kept",signIn:I(s),replaced:!!r}})},"listSignIns",0,A,"releaseSignIn",0,function(e,t){let n=N.get(e.PLAYWRIGHT_CLI_SESSION??"");if(!n)return;let a=c(t);for(let e of[...n.sites.keys()])(e===a||a.endsWith(`.${e}`)||e.endsWith(`.${a}`))&&n.sites.delete(e)},"renewHeld",0,D,"renewSignIns",0,W,"sessionBrowser",0,b,"sessionWindow",0,x],527608)},268486,e=>{"use strict";var t=e.i(41444);e.s(["createKeyedLock",0,function(){let e=new Map,n=new Map;return function(a,i){let r=e.get(a);r||(r=(0,t.PromiseChain)(),e.set(a,r)),n.set(a,(n.get(a)??0)+1);let s=()=>{let t=(n.get(a)??1)-1;t>0?n.set(a,t):(n.delete(a),e.delete(a))};return r(i).then(e=>(s(),e),e=>{throw s(),e})}}])}];
|
|
4
|
+
|
|
5
|
+
//# sourceMappingURL=_1pv6xbq._.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
module.exports=[102473,e=>{e.v(s=>Promise.all(["server/chunks/[root-of-the-server]__1_04mcf._.js","server/chunks/lib_logger_ts_07e65t5._.js"].map(s=>e.l(s))).then(()=>s(232347)))},130022,e=>{e.v(s=>Promise.all(["server/chunks/config_ts_1g4sz5o._.js"].map(s=>e.l(s))).then(()=>s(333925)))},7313,e=>{e.v(s=>Promise.all(["server/chunks/[root-of-the-server]__13hng6h._.js","server/chunks/_0uet1h6._.js"].map(s=>e.l(s))).then(()=>s(876393)))},266965,e=>{e.v(s=>Promise.all(["server/chunks/[root-of-the-server]__01jpmcj._.js","server/chunks/_10qam6o._.js"].map(s=>e.l(s))).then(()=>s(946280)))},171772,e=>{e.v(s=>Promise.all(["server/chunks/[root-of-the-server]__1ndi14y._.js"].map(s=>e.l(s))).then(()=>s(973589)))},242792,e=>{e.v(s=>Promise.all(["server/chunks/
|
|
1
|
+
module.exports=[102473,e=>{e.v(s=>Promise.all(["server/chunks/[root-of-the-server]__1_04mcf._.js","server/chunks/lib_logger_ts_07e65t5._.js"].map(s=>e.l(s))).then(()=>s(232347)))},130022,e=>{e.v(s=>Promise.all(["server/chunks/config_ts_1g4sz5o._.js"].map(s=>e.l(s))).then(()=>s(333925)))},7313,e=>{e.v(s=>Promise.all(["server/chunks/[root-of-the-server]__13hng6h._.js","server/chunks/_0uet1h6._.js"].map(s=>e.l(s))).then(()=>s(876393)))},266965,e=>{e.v(s=>Promise.all(["server/chunks/[root-of-the-server]__01jpmcj._.js","server/chunks/_10qam6o._.js"].map(s=>e.l(s))).then(()=>s(946280)))},171772,e=>{e.v(s=>Promise.all(["server/chunks/[root-of-the-server]__1ndi14y._.js"].map(s=>e.l(s))).then(()=>s(973589)))},242792,e=>{e.v(s=>Promise.all(["server/chunks/_07mczew._.js","server/chunks/features_bot_1dfrdsb._.js","server/chunks/[root-of-the-server]__17yv6lg._.js","server/chunks/_1cw6-rv._.js","server/chunks/_0cq69mm._.js","server/chunks/features_workspace_workspace_ts_1iyjroj._.js","server/chunks/_07ftwpg._.js","server/chunks/lib_logger_ts_07e65t5._.js","server/chunks/node_modules_zod_v4_0r3ybe4._.js","server/chunks/_07pkeds._.js","server/chunks/_1unludv._.js","server/chunks/_1skgy7b._.js"].map(s=>e.l(s))).then(()=>s(799791)))},327784,e=>{e.v(s=>Promise.all(["server/chunks/[root-of-the-server]__17m7ag9._.js","server/chunks/features_memory_0__61kl._.js","server/chunks/_1-wp0r0._.js","server/chunks/features_bot_1dfrdsb._.js","server/chunks/features_workspace_workspace_ts_1iyjroj._.js","server/chunks/_07pkeds._.js","server/chunks/_008vczq._.js","server/chunks/_0gifi_2._.js","server/chunks/_07ftwpg._.js","server/chunks/_1skgy7b._.js","server/chunks/_1823_7a._.js","server/chunks/node_modules_zod_v4_1t1yj1u._.js","server/chunks/_13qoxq9._.js","server/chunks/_1wgae1c._.js","server/chunks/_0c-s0ei._.js","server/chunks/_1jtvbp9._.js","server/chunks/[root-of-the-server]__0mq0qmk._.js","server/chunks/lib_logger_ts_07e65t5._.js"].map(s=>e.l(s))).then(()=>s(49002)))},193435,e=>{e.v(s=>Promise.all(["server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1y49572._.js","server/chunks/_1-wp0r0._.js","server/chunks/_1cw6-rv._.js","server/chunks/_07ftwpg._.js","server/chunks/_0hin38_._.js","server/chunks/node_modules_zod_v4_0r3ybe4._.js","server/chunks/_1823_7a._.js","server/chunks/lib_logger_ts_07e65t5._.js","server/chunks/[root-of-the-server]__06kxzw-._.js"].map(s=>e.l(s))).then(()=>s(5509)))},68704,e=>{e.v(s=>Promise.all(["server/chunks/_1x2xiyw._.js","server/chunks/_0bcg3vg._.js","server/chunks/[root-of-the-server]__0d-dfqm._.js","server/chunks/_07pkeds._.js","server/chunks/lib_logger_ts_07e65t5._.js","server/chunks/_0uet1h6._.js","server/chunks/_1cw6-rv._.js","server/chunks/node_modules_zod_v4_0r3ybe4._.js","server/chunks/_07ftwpg._.js"].map(s=>e.l(s))).then(()=>s(514025)))},566024,e=>{e.v(s=>Promise.all(["server/chunks/[root-of-the-server]__1onvx8x._.js","server/chunks/_07ftwpg._.js","server/chunks/features_memory_0__61kl._.js","server/chunks/lib_logger_ts_07e65t5._.js","server/chunks/node_modules_zod_v4_0r3ybe4._.js","server/chunks/_0hin38_._.js","server/chunks/_1cw6-rv._.js"].map(s=>e.l(s))).then(()=>s(1363)))},975158,e=>{e.v(s=>Promise.all(["server/chunks/[root-of-the-server]__1478lu3._.js","server/chunks/features_bot_1dfrdsb._.js","server/chunks/_1-wp0r0._.js","server/chunks/features_memory_0__61kl._.js","server/chunks/features_workspace_workspace_ts_1iyjroj._.js","server/chunks/_1823_7a._.js","server/chunks/_008vczq._.js","server/chunks/_0c-s0ei._.js","server/chunks/_07pkeds._.js","server/chunks/_0rn3c_0._.js","server/chunks/node_modules_zod_v4_1t1yj1u._.js","server/chunks/_1skgy7b._.js","server/chunks/_1jtvbp9._.js","server/chunks/_19kea1l._.js","server/chunks/_07ftwpg._.js","server/chunks/lib_logger_ts_07e65t5._.js","server/chunks/_0gifi_2._.js","server/chunks/_032k4m6._.js","server/chunks/_1wgae1c._.js"].map(s=>e.l(s))).then(()=>s(312485)))},569286,e=>{e.v(s=>Promise.all(["server/chunks/[root-of-the-server]__0mh1tgg._.js","server/chunks/features_bot_1dfrdsb._.js","server/chunks/features_memory_0__61kl._.js","server/chunks/_0cq69mm._.js","server/chunks/_1skgy7b._.js","server/chunks/_1cw6-rv._.js","server/chunks/_008vczq._.js","server/chunks/_0gifi_2._.js","server/chunks/_07pkeds._.js","server/chunks/_1jtvbp9._.js","server/chunks/_13qoxq9._.js","server/chunks/_07ftwpg._.js","server/chunks/node_modules_zod_v4_0r3ybe4._.js","server/chunks/lib_logger_ts_07e65t5._.js","server/chunks/_0c-s0ei._.js","server/chunks/_1823_7a._.js","server/chunks/[root-of-the-server]__0mq0qmk._.js","server/chunks/features_workspace_workspace_ts_1iyjroj._.js"].map(s=>e.l(s))).then(()=>s(733184)))},741548,e=>{e.v(s=>Promise.all(["server/chunks/_0ynjnhl._.js","server/chunks/[root-of-the-server]__1jcu_e9._.js","server/chunks/lib_logger_ts_07e65t5._.js","server/chunks/node_modules_zod_v4_0r3ybe4._.js","server/chunks/features_workspace_workspace_ts_1iyjroj._.js"].map(s=>e.l(s))).then(()=>s(379651)))},917723,e=>{e.v(s=>Promise.all(["server/chunks/_07mczew._.js","server/chunks/_1-wp0r0._.js","server/chunks/_07pkeds._.js","server/chunks/_07ftwpg._.js","server/chunks/[root-of-the-server]__11e22s7._.js","server/chunks/_1823_7a._.js","server/chunks/_1cw6-rv._.js","server/chunks/node_modules_zod_v4_0r3ybe4._.js","server/chunks/lib_logger_ts_07e65t5._.js","server/chunks/_0hin38_._.js","server/chunks/_083t_nr._.js"].map(s=>e.l(s))).then(()=>s(520401)))},51833,e=>{e.v(s=>Promise.all(["server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1y49572._.js","server/chunks/[root-of-the-server]__1jcu_e9._.js","server/chunks/features_workspace_workspace_ts_1iyjroj._.js","server/chunks/lib_logger_ts_07e65t5._.js"].map(s=>e.l(s))).then(()=>s(871096)))},482438,e=>{"use strict";async function s(){let{APP_DIR:s,APP_NAME:r,DATA_DIR:_,DB_PATH:t,ENV_PATH:n,HISTORY_KEEP:o,WORKSPACE_KEEP:a}=await e.A(130022),{logger:c}=await e.A(415568),{migrateDatabase:h,NewerDatabase:v}=await e.A(266965);await h().catch(e=>{e instanceof v&&(console.error(` ${e.message}
|
|
2
2
|
Nothing was changed. Start the newer one (npx thursday-agent@latest), or update this one, and it opens as it was.
|
|
3
3
|
`),process.exit(66)),c.error(`Cannot migrate ${t}`),console.error(` ${e instanceof Error?e.message:e}
|
|
4
4
|
Starting over gives an empty one. API keys, bots, connectors, calls, threads and memory go with it; the workspace and skills stay.
|
|
5
5
|
The old ${t} is moved aside as .corrupt-<time> rather than removed, so a file damaged by a crash or a full disk can still be opened.
|
|
6
6
|
`),process.exit(65)});let{ENCRYPTION_KEY_NAME:u,encryptionKey:k}=await e.A(109244);try{"made"===k().from&&c.info(`made the key that seals saved secrets, in ${n}`)}catch(e){c.error(`Cannot load ${u}`),console.error(` ${e instanceof Error?e.message:e}
|
|
7
|
-
`),process.exit(1)}let{sealStoredSecrets:l}=await e.A(68704);await l().then(({sealed:e,unreadable:s,scrub:r})=>{e&&c.info(`sealed ${e} secret(s) kept in the clear`),"done"===r&&c.info("rewrote the database: no key it held in the clear is left in it"),"pending"===r&&c.warn("the database's log could not be emptied: a key it held in the clear may be left in it until the next start rewrites it"),s.length&&c.warn(`${s.join(", ")} can't be unlocked: sealed with an encryption key this data folder no longer has (${u} in ${n}). Put that .env back from a backup and start the app again to open them, or enter each again — Settings marks them`)}).catch(e=>c.error("seal secrets (the next start tries again)",e));let{ensureRootNotes:i}=await e.A(566024);await i();let{refreshSeedWords:j}=await e.A(242792);await j().then(e=>{e&&c.info(`${e} ready-made bot(s) took their seed's new words`)}).catch(e=>c.error("refresh seed words",e));let{installGuide:d}=await e.A(171772);await d().catch(e=>c.error("install guide",e));let{sweepJobFiles:m,sweepThreads:w}=await e.A(327784);await w();let{closeEndedQuestions:p}=await e.A(193435);await p().then(({closed:e,cleared:s})=>{(e||s)&&c.info(`closed ${e} question(s) on ${s} ended job(s)`)}).catch(e=>c.error("close ended questions",e));let f=()=>void m().catch(e=>c.error("sweep job files",e));f(),setInterval(f,a.sweepEveryMs).unref();let{deleteEndedCalls:g,sweepCalls:b}=await e.A(917723);await b();let{removeFinishedThreads:y}=await e.A(327784),A=()=>void(async()=>{let e=new Date(Date.now()-o.forMs),s=await g(e),r=await y(e);(s||r)&&c.info(`cleared ${s} old call(s) and ${r} old job(s)`)})().catch(e=>c.error("sweep history",e));A(),setInterval(A,o.sweepEveryMs).unref();let{presence:P}=await e.A(102473),{pauseThreads:$}=await e.A(327784),{heldCalls:
|
|
7
|
+
`),process.exit(1)}let{sealStoredSecrets:l}=await e.A(68704);await l().then(({sealed:e,unreadable:s,scrub:r})=>{e&&c.info(`sealed ${e} secret(s) kept in the clear`),"done"===r&&c.info("rewrote the database: no key it held in the clear is left in it"),"pending"===r&&c.warn("the database's log could not be emptied: a key it held in the clear may be left in it until the next start rewrites it"),s.length&&c.warn(`${s.join(", ")} can't be unlocked: sealed with an encryption key this data folder no longer has (${u} in ${n}). Put that .env back from a backup and start the app again to open them, or enter each again — Settings marks them`)}).catch(e=>c.error("seal secrets (the next start tries again)",e));let{ensureRootNotes:i}=await e.A(566024);await i();let{refreshSeedWords:j}=await e.A(242792);await j().then(e=>{e&&c.info(`${e} ready-made bot(s) took their seed's new words`)}).catch(e=>c.error("refresh seed words",e));let{installGuide:d}=await e.A(171772);await d().catch(e=>c.error("install guide",e));let{sweepJobFiles:m,sweepThreads:w}=await e.A(327784);await w();let{closeEndedQuestions:p}=await e.A(193435);await p().then(({closed:e,cleared:s})=>{(e||s)&&c.info(`closed ${e} question(s) on ${s} ended job(s)`)}).catch(e=>c.error("close ended questions",e));let f=()=>void m().catch(e=>c.error("sweep job files",e));f(),setInterval(f,a.sweepEveryMs).unref();let{deleteEndedCalls:g,sweepCalls:b}=await e.A(917723);await b();let{removeFinishedThreads:y}=await e.A(327784),A=()=>void(async()=>{let e=new Date(Date.now()-o.forMs),s=await g(e),r=await y(e);(s||r)&&c.info(`cleared ${s} old call(s) and ${r} old job(s)`)})().catch(e=>c.error("sweep history",e));A(),setInterval(A,o.sweepEveryMs).unref();let{presence:P}=await e.A(102473),{pauseThreads:$}=await e.A(327784),{heldCalls:q}=await e.A(975158);P.onGone(()=>{b(q()).catch(e=>c.error("browser gone",e))});let{startRoutineClock:z}=await e.A(569286);z();let{adoptKeptSessions:x}=await e.A(741548);await x().catch(e=>c.error("adopt kept sessions",e));let{startReach:I}=await e.A(975158);if(I().catch(e=>c.error("start reach",e)),process.env.NEXT_MANUAL_SIG_HANDLE){let{checkpoint:s}=await e.A(7313),r=!1;for(let[e,_]of[["SIGINT",130],["SIGTERM",143],["SIGHUP",129]])process.on(e,()=>{r||(r=!0,c.info(`${e} — parking what was running`),Promise.race([$("The server was shut down while this was running.").catch(e=>c.error("pause threads",e)).then(()=>s()).catch(e=>c.error("checkpoint",e)),new Promise(e=>setTimeout(e,3e3))]).finally(()=>process.exit(_)))})}c.info(`${r} is up — app ${s}, data ${_}`);let{ensureBrowser:E}=await e.A(51833);E().catch(e=>c.debug("browser fetch",e))}e.s(["boot",0,s])},415568,e=>{e.v(s=>Promise.all(["server/chunks/[root-of-the-server]__0ncs9uu._.js","server/chunks/lib_logger_ts_07e65t5._.js"].map(s=>e.l(s))).then(()=>s(938281)))},109244,e=>{e.v(s=>Promise.all(["server/chunks/[root-of-the-server]__03bjojd._.js"].map(s=>e.l(s))).then(()=>s(685178)))}];
|
|
8
8
|
|
|
9
9
|
//# sourceMappingURL=_1q42187._.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
module.exports=[159479,e=>e.a(async(t,a)=>{try{var i=e.i(847841),n=e.i(983477),r=e.i(687388),o=e.i(386075),s=e.i(54282),l=e.i(316172),h=e.i(349047),c=e.i(625441),d=e.i(170801),u=e.i(926435),w=e.i(770639),m=e.i(418919),p=e.i(489956),f=e.i(740852),g=e.i(205863),y=e.i(41181),b=e.i(353885),S=e.i(123203),T=e.i(944971),k=e.i(636882),$=e.i(786025),O=e.i(704161),_=e.i(640911),v=e.i(53748),A=e.i(388439),M=e.i(41444),E=t([o,l,u,w,m,p,f,y,k]);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,w.createMemoryTools)("user",null,{countReads:!1});let a=(0,w.createMemoryTools)("call","thursday"===t.target?t.callId??null:null),_=await (0,$.openWorkspace)();if("thursday"===t.target){var A;let c,u,w=t.readSkills?(0,y.createSkillTools)({sandbox:_,skills:await (0,k.loadSkills)(_)}):{},f=!!(t.written&&t.model&&(0,o.seesToolImages)(t.model));return{...a,...w,...(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,O.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,m.createRoutineTools)(),...f?(0,d.createLookTool)():{},...t.written?{}:(0,h.callTools)()}}let E=await (0,k.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,w.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,y.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,g.createSignInTools)(_,t.bot,(0,$.jobShellEnv)(t.session)),...await (0,l.createThreadRecallTool)(t.bot,t.thread??null)}}[o,l,u,w,m,p,f,y,k]=E.then?(await E)():E,e.s(["loadTools",0,L]),a()}catch(e){a(e)}},!1),54282,e=>{"use strict";var t=e.i(343747),a=e.i(983477),i=e.i(687388),n=e.i(353885),r=e.i(280809);n.TOOL_NAMES.memory_recall,n.TOOL_NAMES.memory_create,n.TOOL_NAMES.memory_remember,n.TOOL_NAMES.memory_describe,n.TOOL_NAMES.memory_forget,n.TOOL_NAMES.bash,n.TOOL_NAMES.web_search,n.TOOL_NAMES.load_skill,n.TOOL_NAMES.look_at,n.TOOL_NAMES.make_deck,n.TOOL_NAMES.end_call,n.TOOL_NAMES.look_at_shared,n.TOOL_NAMES.routine,n.TOOL_NAMES.thread_tell,n.TOOL_NAMES.thread_answer,n.TOOL_NAMES.thread_status,n.TOOL_NAMES.thread_show,n.TOOL_NAMES.thread_cancel,n.TOOL_NAMES.thread_seen;var o=e.i(704161),s=e.i(640911),l=e.i(388439),h=e.i(41444);let c=(e=new Date)=>`${(0,t.format)(e,"yyyy-MM-dd (EEE) HH:mm")} ${Intl.DateTimeFormat().resolvedOptions().timeZone}`,d=e=>(0,t.format)(e,"yyyy-MM-dd (EEE) a"),u=(e=new Date)=>`**Now**: ${c(e)}`,w={0:"clear sky",1:"mainly clear",2:"partly cloudy",3:"overcast",45:"fog",48:"depositing rime fog",51:"light drizzle",53:"moderate drizzle",55:"dense drizzle",56:"light freezing drizzle",57:"dense freezing drizzle",61:"slight rain",63:"moderate rain",65:"heavy rain",66:"light freezing rain",67:"heavy freezing rain",71:"slight snow fall",73:"moderate snow fall",75:"heavy snow fall",77:"snow grains",80:"slight rain showers",81:"moderate rain showers",82:"violent rain showers",85:"slight snow showers",86:"heavy snow showers",95:"thunderstorm",96:"thunderstorm with slight hail",99:"thunderstorm with heavy hail"};function m(e){if(!e)return"";let t=e.weather,a=t?`${w[t.code]??`weather code ${t.code}`}, ${Math.round(t.temperature)}\xb0C (today ${Math.round(t.low)}–${Math.round(t.high)}\xb0C), sunrise ${t.sunrise}, sunset ${t.sunset}${null==t.gusts?"":`, gusts ${Math.round(t.gusts)} km/h`}`:"";return e.place?`**Where they are**: ${e.place}${a?` — ${a}`:""}`:a?`**Weather where they are**: ${a}`:""}let p=e=>`${(0,t.format)(e,"yyyy-MM-dd (EEE) HH:mm")} (${(0,a.formatDistanceToNowStrict)(e,{addSuffix:!0})})`,f={[n.STUDIO_TOOLS.generate_image]:"images",[n.STUDIO_TOOLS.generate_speech]:"speech",[n.STUDIO_TOOLS.transcribe]:"transcription",[n.STUDIO_TOOLS.generate_video]:"video"};e.s(["botWorkHead",0,function(e,a){let i=d(e.updatedAt),n="running"===e.status?`running, last moved ${i}`:e.asking?`waiting on the user's answer since ${i}`:"waiting"===e.status?`stopped ${i}, not finished`:`${"done"===e.status?"ended":"stopped by the user"} ${(0,t.format)(e.updatedAt,"yyyy-MM-dd")}`;return`"${e.label}" — ${e.owner===a?"yours":`${e.owner}'s`} — ${n}`},"clockNow",0,c,"logPromptSize",0,function(e,t){let a=(0,l.sectionTokens)(t),n=a.reduce((e,t)=>e+t.tokens,0);s.logger.debug(`${e} prompt ${n} tokens — ${a.map(e=>`${e.name} ${e.tokens}`).join(", ")}`);let r=a[0];n>i.PROMPT_BUDGET&&r&&s.logger.warn(`${e} prompt is ${n} tokens, over ${i.PROMPT_BUDGET}: ${r.name} carries ${r.tokens} of it. Every call and every job pays this.`)},"mcpToolLines",0,function(e){let t=new Map;for(let a of e){let e=t.get(a.server);e?e.push(a.name):t.set(a.server,[a.name])}return[...t].map(([e,t])=>`- **${e}**: ${t.join(", ")}`).join("\n")},"noteLines",0,function(e,t=!1){return e.length?e.map(e=>{var a;let i,n=t?` \xb7 ${a=e.lastSeenAt,(i=Math.floor((Date.now()-(0,o.toDate)(a).getTime())/864e5))>=365?`${Math.floor(i/365)}y`:i>=30?`${Math.floor(i/30)}mo`:`${Math.max(i,0)}d`}`:"";return`- ${e.path} — ${e.description?.trim()} (${e.factCount})${n}`}).join("\n"):"(nothing saved yet)"},"nowLine",0,u,"reachNames",0,function(e,t){let a=t.map(e=>e.server===i.STUDIO_SERVER?f[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(`### ${p(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),w=e.i(770639),m=e.i(418919),p=e.i(489956),f=e.i(740852),g=e.i(205863),y=e.i(41181),b=e.i(353885),S=e.i(123203),T=e.i(944971),k=e.i(636882),$=e.i(786025),O=e.i(704161),v=e.i(640911),_=e.i(53748),A=e.i(388439),M=e.i(41444),E=t([o,l,u,w,m,p,f,y,k]);async function x(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 N(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);v.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 N(e.target,t),t}async function j(t){if("memory-edit"===t.target)return(0,w.createMemoryTools)("user",null,{countReads:!1});let a=(0,w.createMemoryTools)("call","thursday"===t.target?t.callId??null:null),v=await (0,$.openWorkspace)();if("thursday"===t.target){var A;let c,u,w=t.readSkills?(0,y.createSkillTools)({sandbox:v,skills:await (0,k.loadSkills)(v)}):{},f=!!(t.written&&t.model&&(0,o.seesToolImages)(t.model));return{...a,...w,...(0,S.createWorkspaceTools)(v,{write:!1,timeoutMs:r.CALL_EXEC_TIMEOUT_MS}),...!1===t.webSearch?{}:await (0,p.createCallSearchTool)(v),...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 x(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,_.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,O.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,m.createRoutineTools)(),...f?(0,d.createLookTool)():{},...t.written?{}:(0,h.callTools)()}}let E=await (0,k.loadSkills)(v,t.bot),N={...(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,w.createMemoryTools)("call",null,{tidies:!1})[b.TOOL_NAMES.memory_recall],...await (0,p.createSearchTool)(t.model,v),...(0,S.createWorkspaceTools)(v,{write:!0,env:N,guide:!0,bot:t.bot}),...await (0,u.createMcpTools)(t.bot,v),...(0,y.createSkillTools)({sandbox:v,skills:E,bot:t.bot}),...await (0,f.createSelfTools)(t.bot),...(0,c.createDeckTools)(v,t.bot,N,L),...L?(0,d.createLookTool)():{},...(0,g.createSignInTools)(v,t.bot,(0,$.jobShellEnv)(t.session)),...await (0,l.createThreadRecallTool)(t.bot,t.thread??null)}}[o,l,u,w,m,p,f,y,k]=E.then?(await E)():E,e.s(["loadTools",0,L]),a()}catch(e){a(e)}},!1),54282,e=>{"use strict";var t=e.i(343747),a=e.i(983477),i=e.i(687388),n=e.i(353885),r=e.i(280809);n.TOOL_NAMES.memory_recall,n.TOOL_NAMES.memory_create,n.TOOL_NAMES.memory_remember,n.TOOL_NAMES.memory_describe,n.TOOL_NAMES.memory_forget,n.TOOL_NAMES.bash,n.TOOL_NAMES.web_search,n.TOOL_NAMES.load_skill,n.TOOL_NAMES.look_at,n.TOOL_NAMES.make_deck,n.TOOL_NAMES.end_call,n.TOOL_NAMES.routine,n.TOOL_NAMES.thread_tell,n.TOOL_NAMES.thread_answer,n.TOOL_NAMES.thread_status,n.TOOL_NAMES.thread_show,n.TOOL_NAMES.thread_cancel,n.TOOL_NAMES.thread_seen;var o=e.i(704161),s=e.i(640911),l=e.i(388439),h=e.i(41444);let c=(e=new Date)=>`${(0,t.format)(e,"yyyy-MM-dd (EEE) HH:mm")} ${Intl.DateTimeFormat().resolvedOptions().timeZone}`,d=e=>(0,t.format)(e,"yyyy-MM-dd (EEE) a"),u=(e=new Date)=>`**Now**: ${c(e)}`,w={0:"clear sky",1:"mainly clear",2:"partly cloudy",3:"overcast",45:"fog",48:"depositing rime fog",51:"light drizzle",53:"moderate drizzle",55:"dense drizzle",56:"light freezing drizzle",57:"dense freezing drizzle",61:"slight rain",63:"moderate rain",65:"heavy rain",66:"light freezing rain",67:"heavy freezing rain",71:"slight snow fall",73:"moderate snow fall",75:"heavy snow fall",77:"snow grains",80:"slight rain showers",81:"moderate rain showers",82:"violent rain showers",85:"slight snow showers",86:"heavy snow showers",95:"thunderstorm",96:"thunderstorm with slight hail",99:"thunderstorm with heavy hail"};function m(e){if(!e)return"";let t=e.weather,a=t?`${w[t.code]??`weather code ${t.code}`}, ${Math.round(t.temperature)}\xb0C (today ${Math.round(t.low)}–${Math.round(t.high)}\xb0C), sunrise ${t.sunrise}, sunset ${t.sunset}${null==t.gusts?"":`, gusts ${Math.round(t.gusts)} km/h`}`:"";return e.place?`**Where they are**: ${e.place}${a?` — ${a}`:""}`:a?`**Weather where they are**: ${a}`:""}let p=e=>`${(0,t.format)(e,"yyyy-MM-dd (EEE) HH:mm")} (${(0,a.formatDistanceToNowStrict)(e,{addSuffix:!0})})`,f={[n.STUDIO_TOOLS.generate_image]:"images",[n.STUDIO_TOOLS.generate_speech]:"speech",[n.STUDIO_TOOLS.transcribe]:"transcription",[n.STUDIO_TOOLS.generate_video]:"video"};e.s(["botWorkHead",0,function(e,a){let i=d(e.updatedAt),n="running"===e.status?`running, last moved ${i}`:e.asking?`waiting on the user's answer since ${i}`:"waiting"===e.status?`stopped ${i}, not finished`:`${"done"===e.status?"ended":"stopped by the user"} ${(0,t.format)(e.updatedAt,"yyyy-MM-dd")}`;return`"${e.label}" — ${e.owner===a?"yours":`${e.owner}'s`} — ${n}`},"clockNow",0,c,"logPromptSize",0,function(e,t){let a=(0,l.sectionTokens)(t),n=a.reduce((e,t)=>e+t.tokens,0);s.logger.debug(`${e} prompt ${n} tokens — ${a.map(e=>`${e.name} ${e.tokens}`).join(", ")}`);let r=a[0];n>i.PROMPT_BUDGET&&r&&s.logger.warn(`${e} prompt is ${n} tokens, over ${i.PROMPT_BUDGET}: ${r.name} carries ${r.tokens} of it. Every call and every job pays this.`)},"mcpToolLines",0,function(e){let t=new Map;for(let a of e){let e=t.get(a.server);e?e.push(a.name):t.set(a.server,[a.name])}return[...t].map(([e,t])=>`- **${e}**: ${t.join(", ")}`).join("\n")},"noteLines",0,function(e,t=!1){return e.length?e.map(e=>{var a;let i,n=t?` \xb7 ${a=e.lastSeenAt,(i=Math.floor((Date.now()-(0,o.toDate)(a).getTime())/864e5))>=365?`${Math.floor(i/365)}y`:i>=30?`${Math.floor(i/30)}mo`:`${Math.max(i,0)}d`}`:"";return`- ${e.path} — ${e.description?.trim()} (${e.factCount})${n}`}).join("\n"):"(nothing saved yet)"},"nowLine",0,u,"reachNames",0,function(e,t){let a=t.map(e=>e.server===i.STUDIO_SERVER?f[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(`### ${p(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
|
|
|
@@ -9,17 +9,15 @@ What they tell you is kept, so you know them better over time.`,"tidying",0,e=>(
|
|
|
9
9
|
${u.length>r.BOT_WORK.readChars?`${u.slice(0,r.BOT_WORK.readChars)}
|
|
10
10
|
[Cut here; the files it names hold the rest.]`:u}`].filter(Boolean).join("\n\n")}})}}e.s(["createThreadRecallTool",0,w,"sendMessageSpec",0,k,"threadAnswerSpec",0,g,"threadCancelSpec",0,b,"threadSeenSpec",0,T,"threadShowSpec",0,S,"threadStartSpec",0,p,"threadStatusSpec",0,y,"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.
|
|
11
11
|
|
|
12
|
-
The line stays open until this runs, and drops once the goodbye being said is over.`,parameters:a.object({})},o=(0,t.tool)({description:r.description,inputSchema:r.parameters}),s={description:"Show a short word on your face for a few seconds.",parameters:a.object({text:a.string().describe(`Up to 8 characters: A-Z, 0-9, space and ${n.join(" ")}.`)})},l=(0,t.tool)({description:s.description,inputSchema:s.parameters}),h={description:`See what the user is showing you, their screen or their camera, as it is at this moment.
|
|
12
|
+
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"),w=e=>s.default.string().trim().max(e),m=w(100).nullish().describe("A source or a date along the foot of the slide."),p=w(1500).nullish().describe("What the presenter says over it, as speech; a video of the deck reads it aloud. Never shown."),f=w(500).describe("Workspace path of a png, jpg, webp, gif or svg. It is copied beside the deck."),g=s.default.object({layout:s.default.literal("cover"),title:w(110).describe("The deck's subject, as its title."),eyebrow:w(40).nullish().describe("A word or two above the title."),subtitle:w(180).nullish().describe("One line under the title."),footer:m,notes:p}),y=s.default.object({layout:s.default.literal("statement"),title:w(120).describe("The one claim, as a sentence."),subtitle:w(140).nullish().describe("One line under it."),notes:p}),b=s.default.object({layout:s.default.literal("cards"),title:w(90).describe("The point the cards make together."),cards:s.default.array(s.default.object({title:w(60).describe("Its point."),text:w(160).nullish().describe("One line under it.")})).min(2).max(4).describe("Two to four, side by side and numbered."),footer:m,notes:p}),S=s.default.object({layout:s.default.literal("number"),value:w(10).describe("The figure as it reads: 1.4M, 62%, £2,900. Only one you were given."),label:w(80).nullish().describe("What it counts, above it."),subtitle:w(160).nullish().describe("What it means or is compared with, under it."),footer:m,notes:p}),T=s.default.object({layout:s.default.literal("table"),title:w(90).describe("What the comparison shows."),columns:s.default.array(w(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(w(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:m,notes:p}),k=s.default.object({layout:s.default.literal("quote"),quote:w(280).describe("Someone's own words, exactly as you were given them. Never made up."),who:w(60).describe("Who said it."),role:w(80).nullish().describe("Their role, place or date."),notes:p}),$=s.default.object({layout:s.default.literal("image"),title:w(90).describe("The heading beside the picture."),subtitle:w(280).nullish().describe("A line or two under it."),image:f,alt:w(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:m,notes:p}),O=s.default.object({layout:s.default.literal("picture"),image:f,alt:w(160).describe("What it shows, for someone who cannot see it."),text:w(110).describe("The line under the picture: what it shows, in short everyday words."),more:w(110).nullish().describe("A second, lighter line, only when one more is needed."),term:w(40).nullish().describe("The new word this slide names, exactly as `text` writes it: it is marked there. Only on the slide whose picture has just shown the thing."),fit:s.default.enum(["whole","fill"]).nullish().describe("whole shows a drawing, chart or screenshot uncropped; fill crops a photo to its box. Null for whole."),footer:m,notes:p}),v=s.default.object({layout:s.default.literal("quiz"),question:w(120).describe("One question about what the slides before it showed."),choices:s.default.array(s.default.object({text:w(40).describe("The pick, in a word or two."),image:f.nullish()})).min(2).max(4).describe("Two to four picks, side by side."),right:s.default.number().int().min(0).max(3).describe("Which pick is right, counted from 0."),answer:w(160).describe("Why that one is right, in a sentence: shown once a pick is made, and printed."),notes:p}),_=s.default.object({layout:s.default.literal("close"),title:w(120).describe("The sentence to repeat to someone who was not there."),steps:s.default.array(s.default.object({label:w(24).describe("A word or two: Next, Owner, By."),text:w(120).describe("What it is.")})).max(3).nullish().describe("Up to three next steps."),notes:p}),A=s.default.object({layout:s.default.literal("timeline"),title:w(90).describe("What the dates show together."),steps:s.default.array(s.default.object({when:w(24).describe("When, as you were given it: a date, a week, a phase."),title:w(60).describe("What happens then."),text:w(120).nullish().describe("One line under it.")})).min(2).max(5).describe("Two to five, in order, along one line."),footer:m,notes:p}),M=s.default.object({layout:s.default.literal("compare"),title:w(90).describe("What changes between the two, as a sentence."),sides:s.default.array(s.default.object({label:w(30).describe("Which side it is: Now, After, Option A."),points:s.default.array(w(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:m,notes:p}),E=s.default.object({layout:s.default.literal("stats"),title:w(90).describe("What the figures say together."),stats:s.default.array(s.default.object({value:w(12).describe("The figure as it reads: 1.4M, 62%, 6 hours. Only one you were given."),label:w(80).describe("What it counts, under it.")})).min(2).max(4).describe("Two to four figures side by side."),footer:m,notes:p}),x=s.default.discriminatedUnion("layout",[g,y,b,S,T,k,$,O,v,A,M,E,_]),N=s.default.object({deck:w(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:w(90).describe("The deck's title, shown in its head."),theme:s.default.enum(["forest","sea","clay","ink","paper","night"]).nullish().describe("forest (deep green on paper, serif headings), sea (blue, sans), clay (terracotta on warm paper, serif), ink (gold on near-black, sans), paper (black on white, bold sans) or night (white on black, bold 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(x).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.")}),L=/^[\p{L}\p{N}][\p{L}\p{N}_-]{0,79}$/u,j=/^(slide-\d+|slides)\.png$/i;class R extends Error{}function I(e){let t=e.replace(/[^\p{L}\p{N}_-]+/gu,"-").replace(/^[-_]+|-+$/g,"").slice(0,80);if(!L.test(t))throw new R(`"${e}" is not a deck name: use letters, numbers, - and _.`);return t}async function C(e,t){let i=(0,d.botArtifacts)(t);if(!e.includes("/")&&!e.endsWith(".html")){let t=I(e);return`${i}/${t}/${t}.html`}let r=await (0,d.insideWorkspace)(e);if(!r)throw new R(`${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 R(`There is no deck at ${e}. A new deck is made in your own folder: give it a name.`);let c=I((0,n.basename)(r,".html"));return(0,n.relative)(o,(0,n.join)((0,n.dirname)(r),c,`${c}.html`))}async function W(e,t,i){let r=t.resolve(i),o=new Map,s=async(e,i)=>{let s=(0,n.join)(r,i),l=!i.includes("/")&&await (0,a.stat)(s).catch(()=>null)?s:t.resolve(i);if("image"!==(0,c.viewKindOf)(l))throw new R(`Slide ${e+1}: ${i} is not a picture. Give a png, jpg, webp, gif or svg.`);if(!(await (0,a.stat)(l).catch(()=>null))?.isFile())throw new R(`Slide ${e+1}: there is no file at ${i}. Give its path from the workspace root, as \`ls\` shows it.`);let h=o.get(l);if(!h){if((0,n.dirname)(l)===r)h=(0,n.basename)(l);else{let e=await D(r,l,new Set(o.values()));h=e.name,e.there||(await (0,a.mkdir)(r,{recursive:!0}),await (0,a.copyFile)(l,(0,n.join)(r,h)))}o.set(l,h)}return h},l=[];for(let[t,a]of e.entries())if("table"===a.layout){let e=a.rows.findIndex(e=>e.length>a.columns.length);if(-1!==e)throw new R(`Slide ${t+1}: row ${e+1} has ${a.rows[e].length} cells, and there are ${a.columns.length} columns.`);l.push({...a,rows:a.rows.map(e=>a.columns.map((t,a)=>e[a]??""))})}else if("image"===a.layout||"picture"===a.layout)l.push({...a,image:await s(t,a.image)});else if("quiz"===a.layout){if(a.right>=a.choices.length)throw new R(`Slide ${t+1}: right is ${a.right}, and there are ${a.choices.length} picks, counted from 0.`);let e=[];for(let i of a.choices)e.push(i.image?{...i,image:await s(t,i.image)}:i);l.push({...a,choices:e})}else l.push(a);return l}async function D(e,t,i){let r=(0,n.extname)(t),o=(0,n.basename)(t,r),s=j.test((0,n.basename)(t))?`picture-${o}`:o,l=await (0,a.readFile)(t);for(let t=1;;t++){let o=1===t?`${s}${r}`:`${s}-${t}${r}`;if(i.has(o))continue;let h=await (0,a.readFile)((0,n.join)(e,o)).catch(()=>null);if(!h)return{name:o,there:!1};if(h.equals(l))return{name:o,there:!0}}}let P=(0,r.promisify)(t.execFile);async function H(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 P(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 R(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 q(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:N,execute:async(a,{abortSignal:r})=>{try{let o,s=await C(a.deck,t),l=await W(a.slides,e,(0,n.dirname)(s)),c=await H(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 q(e,s,i,r);if("failed"in u)return`${s}
|
|
13
|
+
${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 w=`call \`${h.TOOL_NAMES.make_deck}\` again with revision ${c.revision} and the whole deck`,m=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 ${w}. ${m}.`:`${d}. Every slide fits. ${m}. Hand back the deck's path; to change it, ${w}.`].filter(Boolean).join("\n")}catch(e){if(e instanceof R)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
14
|
|
|
14
|
-
The picture comes right after this result. When they are showing nothing, the result says so.`,parameters:a.object({})},c=(0,t.tool)({description:h.description,inputSchema:h.parameters});e.s(["callTools",0,function(){return{[i.TOOL_NAMES.end_call]:o,[i.TOOL_NAMES.emote]:l,[i.TOOL_NAMES.look_at_shared]:c}}],349047)},625441,e=>{"use strict";var t=e.i(874533),a=e.i(912714),i=e.i(660526),n=e.i(750227),r=e.i(812057),o=e.i(847841),s=e.i(105249),l=e.i(687388),h=e.i(353885),c=e.i(629668),d=e.i(786025);let u=(0,n.join)(l.APP_DIR,l.PATHS.skills.default,"artifact",l.PATHS.skills.runtime,"deck","deck.mjs"),w=e=>s.default.string().trim().max(e),m=w(100).nullish().describe("A source or a date along the foot of the slide."),p=w(1500).nullish().describe("What the presenter says over it, as speech. Never shown."),f=s.default.object({layout:s.default.literal("cover"),title:w(110).describe("The deck's subject, as its title."),eyebrow:w(40).nullish().describe("A word or two above the title."),subtitle:w(180).nullish().describe("One line under the title."),footer:m,notes:p}),g=s.default.object({layout:s.default.literal("statement"),title:w(120).describe("The one claim, as a sentence."),subtitle:w(140).nullish().describe("One line under it."),notes:p}),y=s.default.object({layout:s.default.literal("cards"),title:w(90).describe("The point the cards make together."),cards:s.default.array(s.default.object({title:w(60).describe("Its point."),text:w(160).nullish().describe("One line under it.")})).min(2).max(4).describe("Two to four, side by side and numbered."),footer:m,notes:p}),b=s.default.object({layout:s.default.literal("number"),value:w(10).describe("The figure as it reads: 1.4M, 62%, £2,900. Only one you were given."),label:w(80).nullish().describe("What it counts, above it."),subtitle:w(160).nullish().describe("What it means or is compared with, under it."),footer:m,notes:p}),S=s.default.object({layout:s.default.literal("table"),title:w(90).describe("What the comparison shows."),columns:s.default.array(w(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(w(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:m,notes:p}),T=s.default.object({layout:s.default.literal("quote"),quote:w(280).describe("Someone's own words, exactly as you were given them. Never made up."),who:w(60).describe("Who said it."),role:w(80).nullish().describe("Their role, place or date."),notes:p}),k=s.default.object({layout:s.default.literal("image"),title:w(90).describe("The heading beside the picture."),subtitle:w(280).nullish().describe("A line or two under it."),image:w(500).describe("Workspace path of a png, jpg, webp, gif or svg. It is copied beside the deck."),alt:w(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:m,notes:p}),$=s.default.object({layout:s.default.literal("close"),title:w(120).describe("The sentence to repeat to someone who was not there."),steps:s.default.array(s.default.object({label:w(24).describe("A word or two: Next, Owner, By."),text:w(120).describe("What it is.")})).max(3).nullish().describe("Up to three next steps."),notes:p}),O=s.default.object({layout:s.default.literal("timeline"),title:w(90).describe("What the dates show together."),steps:s.default.array(s.default.object({when:w(24).describe("When, as you were given it: a date, a week, a phase."),title:w(60).describe("What happens then."),text:w(120).nullish().describe("One line under it.")})).min(2).max(5).describe("Two to five, in order, along one line."),footer:m,notes:p}),_=s.default.object({layout:s.default.literal("compare"),title:w(90).describe("What changes between the two, as a sentence."),sides:s.default.array(s.default.object({label:w(30).describe("Which side it is: Now, After, Option A."),points:s.default.array(w(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:m,notes:p}),v=s.default.object({layout:s.default.literal("stats"),title:w(90).describe("What the figures say together."),stats:s.default.array(s.default.object({value:w(12).describe("The figure as it reads: 1.4M, 62%, 6 hours. Only one you were given."),label:w(80).describe("What it counts, under it.")})).min(2).max(4).describe("Two to four figures side by side."),footer:m,notes:p}),A=s.default.discriminatedUnion("layout",[f,g,y,b,S,T,k,O,_,v,$]),M=s.default.object({deck:w(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:w(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}
|
|
15
|
-
${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 w=`call \`${h.TOOL_NAMES.make_deck}\` again with revision ${c.revision} and the whole deck`,m=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 ${w}. ${m}.`:`${d}. Every slide fits. ${m}. Hand back the deck's path; to change it, ${w}.`].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}
|
|
16
|
-
|
|
17
|
-
${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 w={[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.")})}},m=(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=m(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:w[o.TOOL_NAMES.tool_search].description,inputSchema:w[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:w[o.TOOL_NAMES.tool_call].description,inputSchema:w[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.",w=e=>`Nothing on the listing called ${e}.`,m=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,g=n.string().describe("Exactly as the listing writes it — the path."),y=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:g}),execute:async({path:e})=>{let{notes:t}=await (0,l.readNotes)([e],{touch:a}),i=t[0];if(!i)return{note:w(e.trim())};let n=r?p(i.facts.length):"";return n?{...m(i),note:n.trim()}:m(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:y}).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 w=await (0,l.createNoteWithFacts)(r,o,n,e,t);if(!w)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 g=m(w);return{...g,note:`${u}${p(g.factCount)}`}}}),[s.TOOL_NAMES.memory_remember]:(0,i.tool)({description:"Write facts under a note that is on the listing.",inputSchema:n.object({path:g,facts:n.object({text:y,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:`${w(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=m(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:g,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:w(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(m),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),w=t([s,l]);[s,l]=w.then?(await w)():w;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 m(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 g=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(m)};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(g);if("string"==typeof n)return n;let r=(0,c.whenOf)((0,c.toDate)(n.nextRunAt));return{...m(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(g);return"string"==typeof n?n:n?m(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
|
+
${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),l=e.i(41444);async function h(e){let a=await (0,s.insideWorkspace)(e.trim()),i=a?await (0,t.stat)(a).catch(()=>null):null;return a&&i?.isFile()?(0,o.isPicture)(e)?i.size>n.LOOK.maxBytes?{tooBig:i.size}:{full:a,mediaType:(0,o.mimeOf)(e),bytes:i.size}:{notPicture:!0}:{missing:!0}}let c=(e,t)=>`${e} is ${(0,l.formatBytes)(t)}, over the ${(0,l.formatBytes)(n.LOOK.maxBytes)} a picture sent to a model can be. Make a smaller copy in the shell first (on a Mac: sips -Z 1600 in.png --out out.png), then look at that.`;e.s(["checkPicture",0,h,"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 t=await h(e);return"missing"in t?`There is no file at ${e}. Give the path from the workspace root, as \`ls\` shows it.`:"notPicture"in t?`${e} is not a png, jpg, webp or gif. Read it in the shell instead.`:"tooBig"in t?c(e,t.tooBig):{path:e.trim(),mediaType:t.mediaType}},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.`}}})}},"tooBigToSee",0,c])},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 w={[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.")})}},m=(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=m(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:w[o.TOOL_NAMES.tool_search].description,inputSchema:w[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:w[o.TOOL_NAMES.tool_call].description,inputSchema:w[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.",w=e=>`Nothing on the listing called ${e}.`,m=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,g=n.string().describe("Exactly as the listing writes it — the path."),y=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:g}),execute:async({path:e})=>{let{notes:t}=await (0,l.readNotes)([e],{touch:a}),i=t[0];if(!i)return{note:w(e.trim())};let n=r?p(i.facts.length):"";return n?{...m(i),note:n.trim()}:m(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:y}).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 w=await (0,l.createNoteWithFacts)(r,o,n,e,t);if(!w)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 g=m(w);return{...g,note:`${u}${p(g.factCount)}`}}}),[s.TOOL_NAMES.memory_remember]:(0,i.tool)({description:"Write facts under a note that is on the listing.",inputSchema:n.object({path:g,facts:n.object({text:y,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:`${w(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=m(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:g,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:w(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(m),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),w=t([s,l]);[s,l]=w.then?(await w)():w;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 m(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 g=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(m)};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(g);if("string"==typeof n)return n;let r=(0,c.whenOf)((0,c.toDate)(n.nextRunAt));return{...m(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(g);return"string"==typeof n?n:n?m(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
|
|
18
16
|
what supports it. Say plainly what you could not find or confirm — do not fill
|
|
19
17
|
the gap with a guess. Every number carries the date you saw it. Be brief: this
|
|
20
18
|
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 w(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:
|
|
21
19
|
${s.join("\n")}`:""].filter(Boolean).join("\n\n"),sources:[]}}async function m(e,t,a){let i=AbortSignal.timeout(o.SEARCH.timeoutMs),n=t?AbortSignal.any([t,i]):i;return e(n).catch(e=>{if(t?.aborted)throw e;return{text:i.aborted?`The search did not come back in ${o.SEARCH.timeoutMs/1e3}s. ${a.slow}`:`Search failed: ${(0,c.errorToString)(e)}. ${a.failed}`,sources:[]}})}let g=async(e,t)=>{let a=await (0,h.readConfig)(l.EXA_API_KEY),i=e?.searchTools?{model:e.model,tools:e.searchTools}:null,o=a?(e,t)=>u(a,e,t):i?(e,t)=>w(i,e,t):null;return o?{[s.TOOL_NAMES.web_search]:(0,n.tool)({description:"Search the web and get back what the pages say, with their links. For a fact, a price, a date, what a page says. Not for a page that has to be clicked, filled, or signed into — that is the browser.",inputSchema:r.default.object({query:f}),execute:async({query:e},{abortSignal:a})=>{let i=await m(t=>o(e,t),a,{slow:"Ask something narrower, or open the page in the browser.",failed:"The browser is the other way in."});return t.fold(i.text,"web-search")}})}:{}},y=async e=>{let t=await (0,h.readConfig)(l.EXA_API_KEY);return t?{[s.TOOL_NAMES.web_search]:(0,n.tool)({description:"Search the web and get back what the pages say, with their links. For a fact, a price, a date, what a page says.",inputSchema:r.default.object({query:f}),execute:async({query:a},{abortSignal:i})=>{let n=await m(e=>u(t,a,e),i,{slow:"Ask something narrower, or hand it to a bot.",failed:"A bot can open the page instead."});return{results:await e.fold(n.text,"web-search"),sources:n.sources}}})}:{}};e.s(["createCallSearchTool",0,y,"createSearchTool",0,g]),a()}catch(e){a(e)}},!1),740852,e=>e.a(async(t,a)=>{try{var i=e.i(847841),n=e.i(105249),r=e.i(687388),o=e.i(353885),s=e.i(265143),l=t([s]);async function h(e){let t=await (0,s.ownLineOf)(e);if(!t)return{};let a=t.line?` It replaces the line you wrote before: "${t.line}".`:"";return{[o.TOOL_NAMES.describe_self]:(0,i.tool)({description:`Write your own line: a few words the roster reads after the description the user gave you, where Thursday and the other bots pick who gets a job.${a} Use it rarely — only when what you do has changed for good: the user told you what you are for, you now hold a skill of your own the description does not name, or the same kind of job keeps coming to you and it misses it. Never for one job, and never to describe a job.`,inputSchema:n.default.object({line:n.default.string().trim().min(1).max(r.COMMON_VALIDATE.shortDescription.max).describe("The whole line, in the words people ask with: what you do that the description does not say. Leave out any subject another bot's line in the roster already names, or a job has two bots to go to."),reason:n.default.string().trim().min(1).describe("What changed for good, in a sentence: why the roster should read this now.")}),execute:async({line:t,reason:a})=>{let i=await (0,s.writeOwnLine)(e,t,a);return i?i.was===t?"That is your line already; nothing changed.":{was:i.was,now:t,reason:a,note:"Thursday and the other bots read it from their next turn. Say in your answer that you wrote it, and why."}:"Nothing was written: the user keeps your line as it is now."}})}}[s]=l.then?(await l)():l,e.s(["createSelfTools",0,h]),a()}catch(e){a(e)}},!1),205863,e=>{"use strict";var t=e.i(847841),a=e.i(105249),i=e.i(687388),n=e.i(353885),r=e.i(527608),o=e.i(824664),s=e.i(786025),l=e.i(640911);let h=a.default.string().describe("The site's address, like instagram.com. No path, no https://.");e.s(["createSignInTools",0,function(e,c,d){let u=async t=>{let a=await e.exec(t,{env:d,timeoutMs:i.BROWSER_CLI.loadMs});return 0===a.exitCode?null:(a.stderr||a.stdout).trim().slice(0,300)||`exit ${a.exitCode}`},w=async(t,a)=>{if(!await (0,r.sessionWindow)(e,d).catch(()=>!1))return"";let o=await e.exec('playwright-cli --raw run-code "async page => page.url()"',{env:d,timeoutMs:i.BROWSER_CLI.readMs}),s="";try{s=String(JSON.parse(o.stdout))}catch{}let l=await u("playwright-cli close")??await u("playwright-cli open")??await u(`playwright-cli state-load ${t}`);l?(0,r.forgetBrowser)(d):await (0,r.carryHold)(e,d);let h=l??(/^https?:/.test(s)?await u(`playwright-cli goto '${s.replaceAll("'","'\\''")}'`):null),c=`\`${n.TOOL_NAMES.sign_in_use}\` with ${a.site} and \`account\` ${a.account}`;return h?`The window closed, but your browser did not come back signed in: ${h}. Open it (\`playwright-cli open\`) and call ${c}.`:`The window was for the sign-in, so it is closed: your browser goes on without one, signed in, on the same page. When what comes next is theirs to see, open it \`--headed\` and call ${c} again.`};return{[n.TOOL_NAMES.sign_in_use]:(0,t.tool)({description:"Sign your browser in to a site with a sign-in the user already made and the app kept. Open your browser first: the sign-in goes into the browser you have open, and opening another one afterwards throws it away.",inputSchema:a.default.object({site:h,account:a.default.string().nullish().describe("Which of the site's accounts, as the app names them, when it keeps more than one.")}),execute:({site:t,account:a})=>(0,r.inBrowser)(d,async()=>{if(await (0,r.sessionBrowser)(e,d)==="theirs")return"You are working in their own Chrome: it is already signed in as them, and nothing is loaded into it. Go to the site.";await (0,r.renewHeld)(e,d).catch(e=>l.logger.warn(`${c}: kept sign-ins were not renewed`,e));let i=await (0,r.borrowSignIn)(t,c,a);if("none"===i.kind)return i.kept.length?`Nothing is kept for ${(0,o.siteOf)(t)}. Kept: ${i.kept.join(", ")} — call again with one of those if it is the same site. Otherwise open the site's sign-in page in a window they can see, ask them to sign in there, and call \`${n.TOOL_NAMES.sign_in_keep}\` once they have.`:`Nothing is kept for ${(0,o.siteOf)(t)}. Open its sign-in page in a window they can see, ask them to sign in there, and call \`${n.TOOL_NAMES.sign_in_keep}\` once they have.`;if("pick"===i.kind)return a?.trim()?`Nothing is kept for ${i.site} as ${a.trim()}. Kept there: ${i.accounts.join(", ")} — call again with one of those as it is written. For another account, open the site's sign-in page in a new browser they can see (\`playwright-cli open <its sign-in url> --headed\`), ask them to sign in there, and call \`${n.TOOL_NAMES.sign_in_keep}\` once they have.`:`${i.site} keeps more than one account: ${i.accounts.join(", ")}. Call again with \`account\`, the one this work is for; when the user has not said which, ask them.`;if("ask"===i.kind)return`The user keeps a ${i.signIn.site} sign-in (${i.signIn.account}) and has not let you use it. Ask them, as a question, whether you may; they allow it on screen. Call again with \`account\` ${i.signIn.account} once they have said yes.`;let h=(0,s.browserStateFile)();await e.writeFile(h,JSON.stringify(i.state));let w=await u(`playwright-cli state-load ${h}`).finally(()=>e.exec(`rm -f ${h}`));return w?(0,r.forgetBrowser)(d):await (0,r.holdSignIn)(e,d,c,i.signIn,"loaded"),w?`The sign-in could not be loaded into your browser: ${w}. Open the browser you mean to keep (\`playwright-cli open …\`, headed if you want a window), then call this again — opening another browser after this throws the sign-in away.`:`Signed in to ${i.signIn.site} as ${i.signIn.account}. Go to the site again (\`goto\`) — a page drawn before this still looks signed out. If it still shows you signed out after that, the site does not accept a sign-in carried over from another browser, and signing in again here will not last either: work in their own Chrome instead, \`playwright-cli attach --extension=chrome\`.`})}),[n.TOOL_NAMES.sign_in_keep]:(0,t.tool)({description:"Keep the sign-in the user just made in your browser window, so later work is signed in without asking them again. Call it right after they say they signed in. The window was for the sign-in: it closes, and your browser goes on without one, signed in, on the same page.",inputSchema:a.default.object({site:h,account:a.default.string().describe("Who it is signed in as, as the site shows it — a handle, an email. The site's name when nothing is shown."),keepWindow:a.default.boolean().nullish().describe("True when what comes next on this site is theirs to see — the products to choose, a checkout to confirm — and the window stays up."),another:a.default.boolean().nullish().describe("True when this is a different account from the ones the app keeps for the site.")}),execute:({site:t,account:a,keepWindow:i,another:n})=>(0,r.inBrowser)(d,async()=>{if(await (0,r.sessionBrowser)(e,d)==="theirs")return"You are working in their own Chrome: it stays signed in as them by itself, and nothing is kept from it.";(0,r.releaseSignIn)(d,t);let o=(0,s.browserStateFile)(),l=await u((0,s.saveBrowserState)(o));if(l)return await e.exec(`rm -f ${o}`),`The browser's state could not be read: ${l}. Nothing was kept.`;try{let s=JSON.parse(await e.readFile(o,"utf-8")),l=await (0,r.keepSignIn)({site:t,account:a,bot:c,state:s,another:n});if("unlisted"===l.kind)return`Not kept yet: ${l.site} keeps ${l.accounts.join(", ")}. If they signed in again as one of those, call this again with \`account\` written as it is there; if this is a different account, call again with \`another\` set to true.`;if("clash"===l.kind)return`Not kept yet: ${l.site} keeps a sign-in as ${a.trim()||l.site} already. If this is that account signed in again, call this again without \`another\`; if it is a different one, call again with an \`account\` that tells it apart from ${l.accounts.join(", ")} — what the site shows for it, or what the user calls it.`;if("taken"===l.kind)return`Not kept: the user already keeps a ${l.signIn.site} sign-in (${l.signIn.account}) for other bots, and only they choose who uses it. This browser stays signed in for this job. Ask them, as a question, whether you may use the kept one — they allow it under Settings › Sign-ins — or, if this one should replace it, to sign out of the kept one there first; then call this again.`;await (0,r.holdSignIn)(e,d,c,l.signIn,"kept");let h=`Kept: ${l.signIn.site} as ${l.signIn.account}${l.replaced?", in place of the sign-in kept under that name before":""}. It is listed for them under Settings › Sign-ins, where they can sign out of it.`;return i?h:`${h} ${await w(o,l.signIn)}`.trim()}finally{await e.exec(`rm -f ${o}`)}})})}}])},41181,e=>e.a(async(t,a)=>{try{var i=e.i(847841),n=e.i(105249),r=e.i(687388),o=e.i(353885),s=e.i(636882),l=e.i(696968),h=t([s,l]);[s,l]=h.then?(await h)():h,e.s(["createSkillTools",0,({skills:e,sandbox:t,bot:a})=>({[o.TOOL_NAMES.load_skill]:(0,i.tool)({description:"Load one skill: its instructions, and the files that ship with it.",inputSchema:n.default.object({name:n.default.string().describe("Exact name from the Skills list, or of a skill installed during this job. Do not guess names.")}),execute:async({name:i},{messages:n})=>{let h=(e,t)=>e.find(e=>e.name.toLowerCase()===t.toLowerCase()),c=h(e,i)?e:await (0,s.loadSkills)(t,a),d=h(c,i)?void 0:r.SKILLS_FOLDED[i.toLowerCase()],u=h(c,d??i);if(!u)return{error:`No skill named '${i}'.`,available:c.map(e=>e.name)};let w=`${u.path}/SKILL.md`;if(n.some(e=>Array.isArray(e.content)&&e.content.some(e=>{if("tool-result"!==e.type||e.toolName!==o.TOOL_NAMES.load_skill||"json"!==e.output.type)return!1;let t=e.output.value;return t?.skillDirectory===u.path&&"string"==typeof t.content})))return{skillDirectory:u.path,note:`Use the full '${u.name}' instructions already in your conversation. To check for changes on disk, read ${w} with the shell.`};let m=await t.readFile(w,"utf-8"),{body:p}=(0,l.splitFrontmatter)(m),{files:f,total:g}=await t.listFiles(u.path,{limit:r.SKILL_FILES_LISTED,skip:[r.PATHS.skills.runtime]});return{skillDirectory:u.path,files:f.map(e=>`${u.path}/${e}`),...g>f.length&&{more:`${g-f.length} more files, deeper in these folders. List a folder in the shell to see them.`},...d&&{note:`'${i}' is part of '${u.name}' now: these are its instructions.`},content:p}}})})]),a()}catch(e){a(e)}},!1),741376,e=>e.a(async(t,a)=>{try{var i=e.i(912714),n=e.i(750227),r=e.i(68356),o=e.i(343747),s=e.i(105249),l=e.i(687388),h=e.i(386075),c=e.i(353885),d=e.i(629668),u=e.i(640911),w=e.i(41444),m=t([h]);function p(e){return{...e,execute:(t,a)=>{let i=e.inputSchema.safeParse(t);if(!i.success)throw Error(s.default.prettifyError(i.error));return e.execute(i.data,a)}}}function f(e,t){let a=(0,w.slug)(e),i=(0,o.format)(new Date,"yyyyMMdd-HHmmss");return`${i}${a?`-${a}`:""}.${t}`}async function g(e,t,a,i){let n=`${t}/${a}`;return await e.exec(`mkdir -p ${t}`),await e.writeFile(n,Buffer.from(i)),n}async function y(e,t){let a=t.trim();if("image"!==(0,d.viewKindOf)(a))return`${a} is not a picture. Work from a png, jpg, webp or gif.`;let n=e.resolve(a),r=await (0,i.stat)(n).catch(()=>null);return r?.isFile()?r.size>l.LOOK.maxBytes?`${a} is ${Math.ceil(r.size/1024/1024)} MB, over the ${l.LOOK.maxBytes/1024/1024} MB one picture takes. Make a smaller copy in the shell first (on a Mac: sips -Z 1600 in.png --out out.png), then use that.`:(0,i.readFile)(n):`There is no file at ${a}. Give the path from the workspace root, as \`ls\` shows it.`}[h]=m.then?(await m)():m;let T=e=>`${e}
|
|
22
|
-
Saved. Give the user this path — the file opens from the thread row. Do not describe it back to them; they can open it.`,k=(e,t)=>e?.split("/")[1]?.split(";")[0]||t,$=["1:1","16:9","9:16","4:3","3:4"],O=async()=>{let e=await (0,h.resolveMediaRef)("image");if(!e)return null;let t=(0,h.buildImageModel)(e.ref,e.apiKey);return p({name:c.STUDIO_TOOLS.generate_image,description:"Draw an image and save it as a file in the workspace, or change pictures already there. What comes back is its path.",inputSchema:s.default.object({prompt:s.default.string().describe("What to draw, described: subject, style, mood, what is in frame. With `images`, what to change about them. The image model does not see the job or the conversation, so nothing can be left implied."),images:s.default.array(s.default.string()).nullish().describe("Workspace paths of pictures to work from: the one being changed, or ones to draw from. Hand the picture over rather than describing it — whatever the words leave out is kept. Null to draw from nothing."),aspectRatio:s.default.enum($).nullish().describe("Aspect ratio. Null for square, or for the shape of what `images` names.")}),execute:async({prompt:e,images:a,aspectRatio:i},{sandbox:n,artifacts:o,abortSignal:s})=>{let l=[];for(let e of a??[]){let t=await y(n,e);if("string"==typeof t)return t;l.push(t)}let{image:h}=await (0,r.generateImage)({model:t,prompt:l.length?{images:l,text:e}:e,aspectRatio:i??(l.length?void 0:"1:1"),abortSignal:s}),c=await g(n,o,f(e,k(h.mediaType,"png")),h.uint8Array);return T(c)}})},
|
|
20
|
+
Saved. Give the user this path — the file opens from the thread row. Do not describe it back to them; they can open it.`,k=(e,t)=>e?.split("/")[1]?.split(";")[0]||t,$=["1:1","16:9","9:16","4:3","3:4"],O=async()=>{let e=await (0,h.resolveMediaRef)("image");if(!e)return null;let t=(0,h.buildImageModel)(e.ref,e.apiKey);return p({name:c.STUDIO_TOOLS.generate_image,description:"Draw an image and save it as a file in the workspace, or change pictures already there. What comes back is its path.",inputSchema:s.default.object({prompt:s.default.string().describe("What to draw, described: subject, style, mood, what is in frame. With `images`, what to change about them. The image model does not see the job or the conversation, so nothing can be left implied."),images:s.default.array(s.default.string()).nullish().describe("Workspace paths of pictures to work from: the one being changed, or ones to draw from. Hand the picture over rather than describing it — whatever the words leave out is kept. Null to draw from nothing."),aspectRatio:s.default.enum($).nullish().describe("Aspect ratio. Null for square, or for the shape of what `images` names.")}),execute:async({prompt:e,images:a,aspectRatio:i},{sandbox:n,artifacts:o,abortSignal:s})=>{let l=[];for(let e of a??[]){let t=await y(n,e);if("string"==typeof t)return t;l.push(t)}let{image:h}=await (0,r.generateImage)({model:t,prompt:l.length?{images:l,text:e}:e,aspectRatio:i??(l.length?void 0:"1:1"),abortSignal:s}),c=await g(n,o,f(e,k(h.mediaType,"png")),h.uint8Array);return T(c)}})},v=async()=>{let e=await (0,h.resolveMediaRef)("speech");if(!e)return null;let t=(0,h.buildSpeechModel)(e.ref,e.apiKey);return p({name:c.STUDIO_TOOLS.generate_speech,description:"Read text aloud into an audio file in the workspace — something the user listens to or sends, not Thursday's voice. What comes back is its path.",inputSchema:s.default.object({text:s.default.string().min(1).max(4e3).describe("The words to read, up to 4000 characters. Longer pieces are read in parts, one call each."),voice:s.default.string().nullish().describe("A voice name the provider knows. Null for its default."),instructions:s.default.string().nullish().describe('How to read it — "slowly", "warm", "like a news anchor". Null for plain.')}),execute:async({text:e,voice:a,instructions:i},{sandbox:n,artifacts:o,abortSignal:s})=>{let{audio:l}=await (0,r.generateSpeech)({model:t,text:e,voice:a??void 0,instructions:i??void 0,outputFormat:"mp3",abortSignal:s}),h=await g(n,o,f(e.slice(0,60),l.format||"mp3"),l.uint8Array);return T(h)}})},_=async()=>{let e=await (0,h.resolveMediaRef)("transcription");if(!e)return null;let t=(0,h.buildTranscriptionModel)(e.ref,e.apiKey);return p({name:c.STUDIO_TOOLS.transcribe,description:"Turn an audio file — a recording, a voice memo, a meeting — into text. The transcript is saved as a file in the workspace; what comes back is its path and the text.",inputSchema:s.default.object({path:s.default.string().min(1).describe("The audio file: a path relative to the workspace, or an absolute one anywhere on this machine.")}),execute:async({path:e},{sandbox:a,artifacts:o,abortSignal:s})=>{var l,h;let c,d=await (0,i.readFile)(a.resolve(e)),u=await (0,r.transcribe)({model:t,audio:d,abortSignal:s}),w=(0,n.basename)(e,(0,n.extname)(e)),m=await g(a,o,f(w,"md"),Buffer.from((l=u.text,c=(h=u.segments).length?`
|
|
23
21
|
|
|
24
22
|
## Timeline
|
|
25
23
|
|
|
@@ -28,12 +26,12 @@ ${h.map(e=>{var t;let a,i;return`- ${t=e.startSecond,a=Math.floor(t/60),i=Math.f
|
|
|
28
26
|
${l.trim()}${c}
|
|
29
27
|
`)));return`${m}
|
|
30
28
|
|
|
31
|
-
${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 g(n,o,f(e,k(l.mediaType,"mp4")),l.uint8Array);return T(h)}})};async function b(){return(await Promise.all([S(O),S(
|
|
29
|
+
${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 g(n,o,f(e,k(l.mediaType,"mp4")),l.uint8Array);return T(h)}})};async function b(){return(await Promise.all([S(O),S(v),S(_),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,w.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 w(e,a,i,o,c):await m(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 w(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 m(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
|
|
32
30
|
|
|
33
31
|
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.
|
|
34
32
|
|
|
35
33
|
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.
|
|
36
34
|
|
|
37
|
-
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 w=(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]:w}}])},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(
|
|
35
|
+
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 w=(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]:w}}])},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(879078),c=e.i(696968),d=t([c]);[c]=d.then?(await d)():d;let w=(0,n.join)(r.APP_DIR,r.PATHS.skills.default),m=(0,n.join)(r.APP_DIR,r.PATHS.skills.seeds),p=(0,n.join)(r.DATA_DIR,r.PATHS.skills.custom),f=async(e,t)=>{let a,i=t?(a=(0,h.seedKitName)(t),/^[a-z0-9][a-z0-9_-]*$/.test(a)?(0,n.join)(m,a):null):null;return u(e,t?[w,...i?[i]:[],(0,n.join)(o.WORKSPACE,(0,o.botFolder)(t),r.PATHS.skills.own),p]:[w,p],await (0,c.readSkillsOff)(),await (0,c.readRetired)())};async function u(e,t,a=new Set,n=new Map){let r=[],o=new Set;for(let h of t){let t;try{t=await e.readdir(h,{withFileTypes:!0})}catch{continue}for(let d of t){let t,u;if(!d.isDirectory())continue;let w=`${h}/${d.name}`,m=`${w}/SKILL.md`;try{t=await e.readFile(m,"utf-8")}catch{continue}try{u=(0,c.parseFrontmatter)(t)}catch(e){s.logger.warn(`skill ${w}: SKILL.md front matter did not load — ${(0,l.errorToString)(e)}`);continue}if(!(0,c.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,c.isSkillOff)(u,a)||r.push({name:u.name,description:u.description,path:w}))}}return r}e.s(["loadSkills",0,f]),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)}])}];
|
|
38
36
|
|
|
39
37
|
//# sourceMappingURL=_1q6e56i._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[353885,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"
|
|
1
|
+
module.exports=[353885,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"}])},944971,e=>{"use strict";var t=e.i(105249),a=e.i(687388),l=e.i(264079),r=e.i(704161),n=e.i(41444),i=e.i(554199),s=e.i(889034);let o=t.default.object({color:t.default.string().regex(/^(#[0-9a-fA-F]{6}|currentColor)$/,"Hex color").optional(),shape:t.default.enum(i.MARK_SHAPES).optional(),outline:t.default.boolean().optional(),paint:t.default.enum(i.MARK_PAINT_IDS).optional()}),d=t.default.string().max(a.COMMON_VALIDATE.prompt.max),u=t.default.object({line:t.default.string(),reason:t.default.string(),at:t.default.number()}),f=t.default.object({id:t.default.number(),name:t.default.string(),serverName:t.default.string()}),m=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(a.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:u.nullish(),systemPrompt:t.default.string().nullish(),icon:o.nullish(),provider:l.textModelProviderSchema.nullish(),model:t.default.string().nullish(),compactAt:t.default.number().nullish(),effort:l.effortSchema.nullish(),disabled:t.default.boolean(),createdAt:r.DateLikeSchema,tools:f.array().default([]),tokens:c,lastJobAt:r.DateLikeSchema.nullish()}),t.default.object({name:m,description:t.default.string().trim().min(1,"Say what this bot is for").max(a.COMMON_VALIDATE.description.max),systemPrompt:d.optional(),icon:o.optional(),provider:l.textModelProviderSchema.nullish(),model:t.default.string().trim().max(80).nullish(),compactAt:t.default.coerce.number().int().min(8e3,"At least 8k").nullish(),effort:l.effortSchema.nullish(),disabled:t.default.boolean().optional(),descriptionLocked:t.default.boolean().optional(),toolIds:t.default.number().int().array().max(a.MAX_PINNED_TOOLS).optional()});let g={color:i.MARK_SYSTEM,shape:"blob"};t.default.object({file:t.default.string(),path:t.default.string(),line:t.default.string(),at:r.DateLikeSchema,bytes:t.default.number()});let h="Continue",_={thursday:"Thursday, on the call:",user:"The user, on screen:"},b=e=>Object.keys(_).find(t=>e.startsWith(`${_[t]} `))??null,p=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()})]),y=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:r.DateLikeSchema}),k=t.default.discriminatedUnion("kind",[y.extend({kind:t.default.literal("user"),text:t.default.string(),by:t.default.enum(["thursday","user"]).nullable()}),y.extend({kind:t.default.literal("text"),text:t.default.string()}),y.extend({kind:t.default.literal("note"),text:t.default.string()}),y.extend({kind:t.default.literal("stop"),text:t.default.string()}),y.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()}),y.extend({kind:t.default.literal("tool-result"),callId:t.default.string(),name:t.default.string(),results:p.array(),more:t.default.boolean()}),y.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(),exchange:t.default.string().optional(),after:t.default.array(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(),refused:l.textModelProviderSchema.optional()});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(),startedBy:t.default.enum(["thursday","user"]).nullable(),tokens:c,contextTokens:t.default.number(),contextBudget:t.default.number(),createdAt:r.DateLikeSchema,updatedAt:r.DateLikeSchema,lines:k.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:g,provider:null,model:null,disabled:!1,compactAt:null,effort:null},"DEFAULT_BOT_ICON",0,g,"THREAD_CONTINUE",0,h,"isAppStop",0,e=>{let t=e?.options??[];return!e?.messageId&&1===t.length&&t[0]===h},"isBotMemoryOn",0,e=>e?.trim()!=="off","rosterLine",0,function(e){let t=e.description.trim();return e.ownLine?`${t}${/[.!?。…]$/.test(t)?"":"."} ${e.ownLine}`:t},"speakerOf",0,b,"tagSpeaker",0,(e,t)=>`${_[e]} ${t}`,"threadActivity",0,function(e,t=120){let a=null;for(let l=e.length-1;l>=0;l--){let r=e[l];if("tool"===r.kind)a??=`${r.name} ${r.note??r.input}`;else if("text"===r.kind)return(0,n.clip)(a?`${r.text} → ${a}`:r.text,t);else if("ask"===r.kind)return(0,n.clip)(`asked ${r.to}: ${r.text}`,t);else if("user"===r.kind)break}return a?(0,n.clip)(a,t):null},"untagSpeaker",0,e=>{let t=b(e);return t?e.slice(_[t].length+1):e},"workHandle",0,e=>e.slice(0,6)])},889034,e=>{"use strict";var t=e.i(469719);let a=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(),after:t.z.array(t.z.string().trim().min(1)).nullish()}),l=t.z.enum(["queued","running","waiting","external","paused","done","cancelled"]),r=t.z.object({bot:t.z.string(),state:l}),n=t.z.object({id:t.z.string(),bot:t.z.string(),caller:t.z.string(),state:l,waitsFor:t.z.string().array()}),i=t.z.object({id:t.z.string(),bot:t.z.string(),text:t.z.string(),options:t.z.string().array().optional()}),s=t.z.enum(["message","question","report","interrupted"]),o="Thursday",d=t.z.object({participants:r.array(),questions:i.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:s,messageId:t.z.string().nullable()}).array(),exchanges:n.array()});e.s(["RESUME_CHECK",0,"Resume from the saved state; inspect any tool whose result is missing before repeating it.","ROOM_THURSDAY",0,o,"ROOM_USER",0,"The user","RoomMessageSchema",0,a,"RoomViewSchema",0,d,"isCoordinatorSeat",0,(e,t,a)=>e===t&&a===o])},105249,e=>{"use strict";var t=e.i(562810);e.s(["default",0,t])}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=_1t43w6q._.js.map
|