thursday-agent 0.2.0 → 0.4.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/app-path-routes-manifest.json +5 -2
- package/.next/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +5 -5
- package/.next/routes-manifest.json +24 -6
- package/.next/server/app/_global-error/page.js +2 -2
- package/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +2 -2
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js +2 -2
- 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 +14 -14
- package/.next/server/app/_not-found.segments/_full.segment.rsc +14 -14
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +12 -12
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/api/artifact/route.js +3 -3
- package/.next/server/app/api/artifact/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/memory/files/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/bot/memory/files/route.js +10 -0
- package/.next/server/app/api/bot/memory/files/route.js.nft.json +1 -0
- package/.next/server/app/api/bot/memory/files/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/bot/memory/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/bot/memory/route.js +14 -0
- package/.next/server/app/api/bot/{notes → memory}/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/memory/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/bot/route.js +6 -6
- package/.next/server/app/api/bot/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/task/[id]/route.js +8 -8
- package/.next/server/app/api/bot/task/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/task/route.js +8 -8
- package/.next/server/app/api/bot/task/route.js.nft.json +1 -1
- package/.next/server/app/api/config/route.js +5 -5
- package/.next/server/app/api/config/route.js.nft.json +1 -1
- package/.next/server/app/api/events/route.js +4 -5
- package/.next/server/app/api/events/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/catalog/route.js +9 -8
- package/.next/server/app/api/llm-model/catalog/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/credits/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/llm-model/credits/route/build-manifest.json +12 -0
- package/.next/server/app/api/llm-model/credits/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/llm-model/credits/route.js +16 -0
- package/.next/server/app/api/llm-model/credits/route.js.map +5 -0
- package/.next/server/app/api/llm-model/credits/route.js.nft.json +1 -0
- package/.next/server/app/api/llm-model/credits/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/llm-model/route.js +10 -8
- package/.next/server/app/api/llm-model/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/subscription/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/llm-model/subscription/route/build-manifest.json +12 -0
- package/.next/server/app/api/llm-model/subscription/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/llm-model/subscription/route.js +15 -0
- package/.next/server/app/api/llm-model/subscription/route.js.map +5 -0
- package/.next/server/app/api/llm-model/subscription/route.js.nft.json +1 -0
- package/.next/server/app/api/llm-model/subscription/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/mcp/[name]/route.js +4 -4
- package/.next/server/app/api/mcp/[name]/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/oauth/callback/route.js +5 -5
- package/.next/server/app/api/mcp/oauth/callback/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/route.js +4 -4
- package/.next/server/app/api/mcp/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/tools/route.js +4 -4
- package/.next/server/app/api/mcp/tools/route.js.nft.json +1 -1
- package/.next/server/app/api/memory/edit/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/memory/edit/route/build-manifest.json +12 -0
- package/.next/server/app/api/memory/edit/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/memory/edit/route.js +24 -0
- package/.next/server/app/api/memory/edit/route.js.map +5 -0
- package/.next/server/app/api/memory/edit/route.js.nft.json +1 -0
- package/.next/server/app/api/memory/{tidy → edit}/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/memory/route.js +6 -7
- package/.next/server/app/api/memory/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/[source]/[name]/route.js +3 -3
- package/.next/server/app/api/skills/[source]/[name]/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/route.js +3 -3
- package/.next/server/app/api/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/call/route.js +9 -7
- package/.next/server/app/api/thursday/call/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/skills/route.js +9 -7
- package/.next/server/app/api/thursday/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/tool-call/route.js +17 -15
- package/.next/server/app/api/thursday/tool-call/route.js.nft.json +1 -1
- package/.next/server/app/api/workspace/route.js +4 -5
- package/.next/server/app/api/workspace/route.js.nft.json +1 -1
- package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +1 -1
- package/.next/server/app/artifact/[...path]/page.js +5 -6
- 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 +3 -4
- package/.next/server/app/favicon.ico/route.js.nft.json +1 -1
- package/.next/server/app/favicon.ico.body +0 -0
- package/.next/server/app/page/server-reference-manifest.json +57 -90
- package/.next/server/app/page.js +10 -10
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +5 -2
- package/.next/server/chunks/[externals]__0dzuk6_._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__01dkp4a._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__02va5wz._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__02xjoto._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__04q--0f._.js +8 -0
- package/.next/server/chunks/[root-of-the-server]__0bl-e63._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0ce8nf8._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__0ffbg85._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0j7z0r3._.js +12 -0
- package/.next/server/chunks/[root-of-the-server]__0jq4ohy._.js +8 -0
- package/.next/server/chunks/[root-of-the-server]__0ls6_8y._.js +8 -0
- package/.next/server/chunks/[root-of-the-server]__0ncs9uu._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0pa2n68._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0q0vvt2._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__1-ga0kh._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__11n256_._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__12cabg9._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1339jnv._.js +8 -0
- package/.next/server/chunks/[root-of-the-server]__15bjnu5._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__18_teo8._.js +8 -0
- package/.next/server/chunks/[root-of-the-server]__1_04mcf._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__1anc1p9._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1ccon1w._.js +5 -5
- package/.next/server/chunks/[root-of-the-server]__1fizn31._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1llj3-b._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1orn-5b._.js +12 -0
- package/.next/server/chunks/[root-of-the-server]__1p8m3f4._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1wa1k7r._.js +8 -0
- package/.next/server/chunks/_0-73of8._.js +5 -5
- package/.next/server/chunks/_0-fjql4._.js +26 -0
- package/.next/server/chunks/_00xh_q0._.js +25 -0
- package/.next/server/chunks/_051qh8u._.js +3 -0
- package/.next/server/chunks/{node_modules_next_04q-o58._.js → _05dla15._.js} +2 -2
- package/.next/server/chunks/_05h2cii._.js +1 -1
- package/.next/server/chunks/_0c9j6rb._.js +49 -0
- package/.next/server/chunks/_0fzqt2y._.js +134 -0
- package/.next/server/chunks/{_0vnutv9._.js → _0ioz3nd._.js} +1 -1
- package/.next/server/chunks/_0iwfby5._.js +3 -0
- package/.next/server/chunks/_0mecv0f._.js +26 -0
- package/.next/server/chunks/_0mh8j4m._.js +3 -0
- package/.next/server/chunks/_0n74zsf._.js +4 -4
- package/.next/server/chunks/_0obojvv._.js +3 -0
- package/.next/server/chunks/_0recufk._.js +49 -0
- package/.next/server/chunks/_0rnf-6n._.js +4 -4
- package/.next/server/chunks/_0sb7tlz._.js +3 -0
- package/.next/server/chunks/_0u10wmw._.js +5 -5
- package/.next/server/chunks/_0u4aiy2._.js +3 -0
- package/.next/server/chunks/_0wp4le3._.js +1 -1
- package/.next/server/chunks/_0y5fg-x._.js +1 -1
- package/.next/server/chunks/_1230wbx._.js +10 -0
- package/.next/server/chunks/_12nheja._.js +3 -0
- package/.next/server/chunks/_13510xh._.js +3 -0
- package/.next/server/chunks/_15hq89o._.js +1 -1
- package/.next/server/chunks/_17l5ygt._.js +49 -0
- package/.next/server/chunks/_18-1wcc._.js +5 -5
- package/.next/server/chunks/_1_5mnq4._.js +4 -4
- package/.next/server/chunks/_1_9mjx-._.js +3 -0
- package/.next/server/chunks/{_0pppbb5._.js → _1c78vw5._.js} +166 -37
- package/.next/server/chunks/_1d0j961._.js +6 -0
- package/.next/server/chunks/_1d5zmy8._.js +1 -1
- package/.next/server/chunks/_1drgfx4._.js +4 -4
- package/.next/server/chunks/_1f46eie._.js +3 -0
- package/.next/server/chunks/_1h5_8sk._.js +3 -0
- package/.next/server/chunks/_1hdnxb7._.js +3 -0
- package/.next/server/chunks/_1j8k_j5._.js +3 -0
- package/.next/server/chunks/_1krd9rf._.js +3 -0
- package/.next/server/chunks/_1nc0eui._.js +11 -0
- package/.next/server/chunks/_1nula3v._.js +3 -0
- package/.next/server/chunks/_1pf4qe-._.js +3 -0
- package/.next/server/chunks/_1php4eq._.js +1 -1
- package/.next/server/chunks/_1qxheoa._.js +3 -0
- package/.next/server/chunks/_1x6kd1r._.js +3 -0
- package/.next/server/chunks/_1yuv4vp._.js +1 -1
- package/.next/server/chunks/_1zjrdag._.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_bot_memory_files_route_actions_1_xd_8f.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_bot_memory_route_actions_1a8xfr7.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_llm-model_credits_route_actions_0v424pb.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_llm-model_subscription_route_actions_0-udcm5.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_memory_edit_route_actions_02sfnmr.js +3 -0
- package/.next/server/chunks/config_ts_1g4sz5o._.js +1 -1
- package/.next/server/chunks/features_0rpfxbk._.js +3 -0
- package/.next/server/chunks/features_1qf3cei._.js +3 -0
- package/.next/server/chunks/features_bot_0zt92oh._.js +3 -0
- package/.next/server/chunks/features_bot_bot_query_ts_12mgkl2._.js +3 -0
- package/.next/server/chunks/features_memory_1uqvksn._.js +6 -0
- package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0a1rd09._.js → node_modules_consola_dist_chunks_prompt_mjs_0i7cvml._.js} +1 -1
- package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_06067w6._.js → node_modules_consola_dist_chunks_prompt_mjs_0icqaqw._.js} +1 -1
- package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_096ais_._.js → node_modules_consola_dist_chunks_prompt_mjs_0r28-sm._.js} +1 -1
- package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_02s3hjt._.js → node_modules_consola_dist_chunks_prompt_mjs_0v_7drq._.js} +1 -1
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1xoq2rl._.js +3 -0
- package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0tvkfgh._.js → node_modules_consola_dist_chunks_prompt_mjs_1y49572._.js} +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__092knlj._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__09q9med._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0hg5gib._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0i8ie7f._.js +3 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__0jsmmb-._.js → [root-of-the-server]__0mz33a7._.js} +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0s9dq5u._.js +3 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__0m1b5ky._.js → [root-of-the-server]__0s9l2sv._.js} +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0tbkdlx._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0vnmv-s._.js +3 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__0f6s48x._.js → [root-of-the-server]__0xpcv9w._.js} +3 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0xsog8n._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0xtssj3._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__10-dz5o._.js +61 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__15_uhip._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__16jc196._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__1gtlw6v._.js +43 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1mzi-ju._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__1ox7hbk._.js +4 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__1qfqvmg._.js → [root-of-the-server]__202p40z._.js} +2 -2
- package/.next/server/chunks/ssr/{_1mznrxk._.js → _001_ms1._.js} +3 -3
- package/.next/server/chunks/ssr/_01n3o0m._.js +3 -0
- package/.next/server/chunks/ssr/_0ap2fzn._.js +3 -0
- package/.next/server/chunks/ssr/_0fz4mf_._.js +3 -0
- package/.next/server/chunks/ssr/_0gb4gmf._.js +3 -0
- package/.next/server/chunks/ssr/_0h42fze._.js +3 -0
- package/.next/server/chunks/ssr/_0h7zdni._.js +1 -1
- package/.next/server/chunks/ssr/_0i_6q1w._.js +41 -0
- package/.next/server/chunks/ssr/_0ilna52._.js +42 -0
- package/.next/server/chunks/ssr/_0n3toaw._.js +3 -0
- package/.next/server/chunks/ssr/{_13punpm._.js → _0q0zan6._.js} +2 -2
- package/.next/server/chunks/ssr/{_077-g6s._.js → _0s99bgb._.js} +3 -3
- package/.next/server/chunks/ssr/_0zcjrbg._.js +3 -0
- package/.next/server/chunks/ssr/_0zhoc3r._.js +3 -0
- package/.next/server/chunks/ssr/{_1lip4th._.js → _1-_etts._.js} +2 -2
- package/.next/server/chunks/ssr/_1-teee5._.js +3 -3
- package/.next/server/chunks/ssr/_13fke0x._.js +3 -0
- package/.next/server/chunks/ssr/_15j2_8f._.js +3 -0
- package/.next/server/chunks/ssr/_1b2mjwr._.js +3 -0
- package/.next/server/chunks/ssr/{_09ja_w1._.js → _1f-dg-6._.js} +2 -2
- package/.next/server/chunks/ssr/_1fojd41._.js +4 -0
- package/.next/server/chunks/ssr/_1gd8q8l._.js +3 -0
- package/.next/server/chunks/ssr/{_1m3bsfr._.js → _1h0rw11._.js} +2 -2
- package/.next/server/chunks/ssr/_1jhd09t._.js +3 -0
- package/.next/server/chunks/ssr/{_040sk32._.js → _1lz_cq2._.js} +84 -88
- package/.next/server/chunks/ssr/_1nnsk7z._.js +3 -0
- package/.next/server/chunks/ssr/_1sji22n._.js +3 -0
- package/.next/server/chunks/ssr/{_0x_nu5e._.js → _1vi_uo7._.js} +2 -2
- package/.next/server/chunks/ssr/_1vyd1ji._.js +1 -1
- package/.next/server/chunks/ssr/features_bot_1s_-2vj._.js +3 -0
- package/.next/server/chunks/ssr/features_config_components_config-setting_tsx_0xfwqdg._.js +1 -1
- package/.next/server/chunks/ssr/features_connectors_components_mcp-setting_tsx_0jmbgvp._.js +1 -1
- package/.next/server/chunks/ssr/{node_modules_0kxz4gt._.js → node_modules_00etblx._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_18_dk7_._.js → node_modules_04jf_m8._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0_n241r._.js → node_modules_08dhkiq._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0n1kj4p._.js → node_modules_0940ns5._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_17lrt3y._.js → node_modules_09q35v_._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1toafc-._.js → node_modules_0_-_a--._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0lrjk5t._.js → node_modules_0arus10._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_04n7mjs._.js → node_modules_0b__sgl._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0iz1rzd._.js → node_modules_0cxaxk9._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0ndvxub._.js → node_modules_0g7fzk3._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0kl7-tn._.js → node_modules_0had7xd._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_19dp7ko._.js → node_modules_0pvd7q-._.js} +1 -1
- package/.next/server/chunks/ssr/node_modules_0x3-ply._.js +3 -0
- package/.next/server/chunks/ssr/{node_modules_1dwguw_._.js → node_modules_0yugy6m._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_004qlr4._.js → node_modules_14om4ar._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1q0p85z._.js → node_modules_14q6g4n._.js} +1 -1
- package/.next/server/chunks/ssr/node_modules_17bwo43._.js +55 -0
- package/.next/server/chunks/ssr/{node_modules_1hd-5tv._.js → node_modules_198nmll._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0m93zeg._.js → node_modules_1_pc9kq._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1n5ygqe._.js → node_modules_1aaxuef._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_01qnv-a._.js → node_modules_1cx_ql6._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1zu988w._.js → node_modules_1cz2hle._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1xyd7ov._.js → node_modules_1efrqxi._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_13r44jq._.js → node_modules_1eg7m6c._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_08d8bke._.js → node_modules_1gdh31p._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1hn8z1f._.js → node_modules_1hpopmo._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_20yebtj._.js → node_modules_1qpjvy5._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_09xhur7._.js → node_modules_1vh5ntv._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0m9a4y0._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1b748ic._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_13w_wy9._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1z4hm5e._.js} +1 -1
- package/.next/server/chunks/ssr/node_modules_@vercel_oidc_dist_06mk8id._.js +3 -0
- package/.next/server/chunks/ssr/{node_modules_next_dist_0w6mzq5._.js → node_modules_next_dist_0drixxt._.js} +4 -4
- package/.next/server/chunks/ssr/node_modules_next_dist_1n3w9lb._.js +2 -2
- package/.next/server/instrumentation.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 +58 -91
- package/.next/static/chunks/00rd4-v8r7axp.js +1 -0
- package/.next/static/chunks/08qe4as2q428z.js +3 -0
- package/.next/static/chunks/{31ttnjt6g35a0.js → 0ev4hyghq0mbb.js} +1 -1
- package/.next/static/chunks/0fl3gwe4-l6tz.js +1 -0
- package/.next/static/chunks/0gnqdjn2lvdad.js +2 -0
- package/.next/static/chunks/0hwap1-p0m5sa.js +1 -0
- package/.next/static/chunks/0r5qcctujhxli.js +1 -0
- package/.next/static/chunks/0w52rrrmuj9r9.js +1 -0
- package/.next/static/chunks/{07kl352c-lvcz.js → 0wcprt5ot5she.js} +1 -1
- package/.next/static/chunks/10teww7wt-f6h.js +1 -0
- package/.next/static/chunks/15m575979un5f.js +38 -0
- package/.next/static/chunks/17p6tk6k88dq6.js +1 -0
- package/.next/static/chunks/{3_h9txt3tq8t8.js → 1dkjg87pxk0n9.js} +1 -1
- package/.next/static/chunks/1jd09sxcjddu1.js +1 -0
- package/.next/static/chunks/1kq8h8wi_e0bc.js +53 -0
- package/.next/static/chunks/{18vhba44l1fc9.js → 1w73ece_6bheu.js} +1 -1
- package/.next/static/chunks/{3ard_noqapnw1.js → 214ya3n5gxeih.js} +1 -1
- package/.next/static/chunks/22_zkas21rpna.js +1 -0
- package/.next/static/chunks/2h0sd2vumhb15.js +1 -0
- package/.next/static/chunks/2t4vhi3m8ahya.js +1 -0
- package/.next/static/chunks/2tigdtz3dpcy8.js +1 -0
- package/.next/static/chunks/2u7xt6mxg44lf.js +1 -0
- package/.next/static/chunks/39j0fvpybzabl.js +40 -0
- package/.next/static/chunks/3akmqm77muj4-.js +1 -0
- package/.next/static/chunks/3cq5g494yuke8.css +1 -0
- package/.next/static/chunks/3woj-xd7ki5_i.js +1 -0
- package/.next/static/chunks/3xk7yqgomx7yq.js +1 -0
- package/.next/static/chunks/3zmcsnuo25zvq.js +1 -0
- package/.next/static/media/favicon.37o1pjldwi2uc.ico +0 -0
- package/README.md +47 -22
- package/app/api/bot/memory/files/route.ts +14 -0
- package/app/api/bot/memory/route.ts +5 -0
- package/app/api/events/app-event.ts +3 -7
- package/app/api/llm-model/credits/route.ts +11 -0
- package/app/api/llm-model/route.ts +6 -1
- package/app/api/llm-model/subscription/route.ts +11 -0
- package/app/api/memory/edit/route.ts +7 -0
- package/app/api/memory/route.ts +21 -0
- package/app/api/query-key.ts +19 -4
- package/bin/port.mjs +65 -0
- package/bin/thursday.mjs +5 -33
- package/components/ui/shiny-text.tsx +48 -134
- package/database/migrations/{20260909060813_optimal_sabretooth → 20260910173049_numerous_spirit}/migration.sql +24 -34
- package/database/migrations/{20260909060813_optimal_sabretooth → 20260910173049_numerous_spirit}/snapshot.json +71 -145
- package/database/migrations/20260911030320_opposite_jack_power/migration.sql +1 -0
- package/database/migrations/{20260909063821_bitter_tenebrous → 20260911030320_opposite_jack_power}/snapshot.json +57 -184
- package/docs/how-it-works.md +11 -7
- package/docs/images/face-dark.png +0 -0
- package/docs/images/face-light.png +0 -0
- package/docs/images/keeps-going.png +0 -0
- package/features/ai/chatgpt.ts +639 -0
- package/features/ai/components/chatgpt-sign-in.tsx +66 -0
- package/features/ai/components/model-picker.tsx +17 -1
- package/features/ai/components/provider-icon.tsx +1 -0
- package/features/ai/load-tools.ts +78 -56
- package/features/ai/model.schema.ts +232 -34
- package/features/ai/model.ts +169 -24
- package/features/ai/prompts/bot.prompt.ts +207 -114
- package/features/ai/prompts/memory-edit.prompt.ts +33 -0
- package/features/ai/prompts/prompt-helper.ts +45 -26
- package/features/ai/prompts/thursday.prompt.ts +57 -27
- package/features/ai/tools/bot.tool.ts +35 -52
- package/features/ai/tools/connected.ts +17 -4
- package/features/ai/tools/memory.tool.ts +181 -117
- package/features/ai/tools/search.tool.ts +136 -47
- package/features/ai/tools/tool-name.ts +2 -6
- package/features/ai/tools/workspace.tool.ts +5 -1
- package/features/bot/bot.action.ts +14 -19
- package/features/bot/bot.memory.ts +89 -0
- package/features/bot/bot.query.ts +37 -57
- package/features/bot/bot.run.ts +512 -242
- package/features/bot/bot.runner.ts +434 -120
- package/features/bot/bot.schema.ts +104 -19
- package/features/bot/bot.seed.ts +89 -16
- package/features/bot/components/bot-mark.tsx +122 -20
- package/features/bot/components/bot-room.tsx +214 -132
- package/features/bot/components/bot-setting.tsx +790 -402
- package/features/bot/components/bot-tool.tsx +2 -7
- package/features/bot/components/mark-palette.tsx +54 -0
- package/features/bot/components/path-chips.tsx +1 -1
- package/features/bot/components/task-badge.tsx +26 -6
- package/features/bot/components/task-reply.tsx +22 -33
- package/features/bot/components/task-setting.tsx +20 -17
- package/features/bot/task.query.ts +240 -34
- package/features/bot/task.store.ts +76 -13
- package/features/config/components/config-setting.tsx +265 -34
- package/features/config/components/models-badge.tsx +42 -0
- package/features/config/config.action.ts +12 -0
- package/features/config/config.const.ts +38 -2
- package/features/connectors/mcp.manager.ts +10 -2
- package/features/intro/components/intro.tsx +47 -46
- package/features/memory/components/memory-edit.tsx +340 -0
- package/features/memory/components/memory-setting.tsx +75 -77
- package/features/memory/memory.action.ts +3 -43
- package/features/memory/memory.edit.ts +87 -0
- package/features/memory/memory.query.ts +24 -42
- package/features/memory/memory.schema.ts +29 -106
- package/features/settings/components/settings.tsx +2 -0
- package/features/settings/settings.alert.ts +3 -1
- package/features/thursday/components/ascii-orb.tsx +106 -90
- package/features/thursday/components/boot.tsx +7 -0
- package/features/thursday/components/call-log.tsx +219 -92
- package/features/thursday/components/face.tsx +6 -4
- package/features/thursday/components/tab-state.tsx +97 -0
- package/features/thursday/components/thursday-mark.tsx +4 -1
- package/features/thursday/components/thursday-setting.tsx +17 -47
- package/features/thursday/components/thursday.tsx +208 -98
- package/features/thursday/thursday.action.ts +12 -17
- package/features/thursday/thursday.query.ts +61 -70
- package/features/thursday/thursday.schema.ts +20 -7
- package/features/thursday/tool-line.ts +85 -12
- package/features/thursday/use-thursday.ts +87 -60
- package/features/workspace/components/file-view.tsx +4 -2
- package/features/workspace/workspace.ts +110 -26
- package/lib/limits.ts +1 -1
- package/lib/oauth-page.ts +27 -0
- package/lib/realtime/openai.ts +2 -2
- package/lib/realtime/realtime.protocol.ts +1 -1
- package/lib/realtime/realtime.tap.ts +122 -0
- package/lib/sandbox.ts +59 -36
- package/package.json +1 -1
- package/skills/browser/SKILL.md +55 -34
- package/.next/server/app/api/bot/notes/route/app-paths-manifest.json +0 -3
- package/.next/server/app/api/bot/notes/route.js +0 -14
- package/.next/server/app/api/bot/notes/route_client-reference-manifest.js +0 -3
- package/.next/server/app/api/memory/tidy/route/app-paths-manifest.json +0 -3
- package/.next/server/app/api/memory/tidy/route.js +0 -22
- package/.next/server/app/api/memory/tidy/route.js.nft.json +0 -1
- package/.next/server/chunks/0d-b_next_dist_server_app-render_after-task-async-storage_external_0-exn7p.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0-npkh_._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__005var5._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__019dx9f._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__02_2sm-._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__04_8spk._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__05luceg._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__06t77t4._.js +0 -11
- package/.next/server/chunks/[root-of-the-server]__0bed6hu._.js +0 -8
- package/.next/server/chunks/[root-of-the-server]__0cro2dz._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__0dupqt7._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__0emr6go._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0le4d-p._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0m8ywyo._.js +0 -10
- package/.next/server/chunks/[root-of-the-server]__0nfuugi._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__0p32jfz._.js +0 -12
- package/.next/server/chunks/[root-of-the-server]__0phdgco._.js +0 -8
- package/.next/server/chunks/[root-of-the-server]__0wvgrsl._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__10qshki._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__11j52t0._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__1692zrv._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__16thabu._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__173nhwf._.js +0 -8
- package/.next/server/chunks/[root-of-the-server]__1_aoyr9._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1bn73ih._.js +0 -10
- package/.next/server/chunks/[root-of-the-server]__1bqhuh9._.js +0 -8
- package/.next/server/chunks/[root-of-the-server]__1cqizfq._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__1e-ci13._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1fboj2j._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1lr7j9t._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__1oli73c._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1txedx6._.js +0 -8
- package/.next/server/chunks/[root-of-the-server]__1untqv8._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__1zgpz1w._.js +0 -3
- package/.next/server/chunks/_00_584r._.js +0 -293
- package/.next/server/chunks/_012yhfm._.js +0 -39
- package/.next/server/chunks/_06mxlgn._.js +0 -3
- package/.next/server/chunks/_07rtlxv._.js +0 -3
- package/.next/server/chunks/_0a351g7._.js +0 -6
- package/.next/server/chunks/_0kjjmag._.js +0 -3
- package/.next/server/chunks/_0nn99o2._.js +0 -3
- package/.next/server/chunks/_0zuzmt_._.js +0 -39
- package/.next/server/chunks/_106co2o._.js +0 -3
- package/.next/server/chunks/_12bbv5i._.js +0 -100
- package/.next/server/chunks/_15q1pig._.js +0 -3
- package/.next/server/chunks/_19wg5yn._.js +0 -138
- package/.next/server/chunks/_1bt95p9._.js +0 -55
- package/.next/server/chunks/_1cbk7ms._.js +0 -26
- package/.next/server/chunks/_1drv2et._.js +0 -40
- package/.next/server/chunks/_1ic3bew._.js +0 -5
- package/.next/server/chunks/_1mxn_lb._.js +0 -3
- package/.next/server/chunks/_1rysr-r._.js +0 -10
- package/.next/server/chunks/_1u3rwbr._.js +0 -3
- package/.next/server/chunks/_1x7p319._.js +0 -6
- package/.next/server/chunks/_next-internal_server_app_api_bot_notes_route_actions_0qcsyu7.js +0 -3
- package/.next/server/chunks/_next-internal_server_app_api_memory_tidy_route_actions_0_cfuom.js +0 -3
- package/.next/server/chunks/features_bot_task_query_ts_11xuzl3._.js +0 -3
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_0gzvgfv._.js +0 -3
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_0vorg6w._.js +0 -3
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1tpvamf._.js +0 -3
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1vmaq9f._.js +0 -3
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1y9-wcr._.js +0 -3
- package/.next/server/chunks/ssr/[externals]_node_crypto_1kn79-7._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0iuoa-r._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0un-erv._.js +0 -4
- package/.next/server/chunks/ssr/[root-of-the-server]__1-mnhyd._.js +0 -92
- package/.next/server/chunks/ssr/[root-of-the-server]__1bww500._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__1vcdast._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__1xwnu-h._.js +0 -3
- package/.next/server/chunks/ssr/_0-mc7ro._.js +0 -3
- package/.next/server/chunks/ssr/_01p5r6-._.js +0 -3
- package/.next/server/chunks/ssr/_03webdr._.js +0 -3
- package/.next/server/chunks/ssr/_09-0k3z._.js +0 -3
- package/.next/server/chunks/ssr/_0f_b_9s._.js +0 -3
- package/.next/server/chunks/ssr/_0fafgvl._.js +0 -3
- package/.next/server/chunks/ssr/_0sf1isi._.js +0 -3
- package/.next/server/chunks/ssr/_0su6_08._.js +0 -3
- package/.next/server/chunks/ssr/_0ti51xc._.js +0 -3
- package/.next/server/chunks/ssr/_0w5bgak._.js +0 -3
- package/.next/server/chunks/ssr/_0y84qo6._.js +0 -3
- package/.next/server/chunks/ssr/_1ciyoo3._.js +0 -3
- package/.next/server/chunks/ssr/_1e-dgz0._.js +0 -4
- package/.next/server/chunks/ssr/_1fq7zgb._.js +0 -3
- package/.next/server/chunks/ssr/_1g6l4uj._.js +0 -3
- package/.next/server/chunks/ssr/_1ruzehw._.js +0 -3
- package/.next/server/chunks/ssr/features_bot_components_bot-setting_tsx_01ajft6._.js +0 -4
- package/.next/server/chunks/ssr/features_config_components_14jqgy4._.js +0 -3
- package/.next/server/chunks/ssr/features_memory_components_memory-setting_tsx_0oa43sw._.js +0 -4
- package/.next/server/chunks/ssr/node_modules_zod_v4_classic_external_15fmmz3.js +0 -55
- package/.next/static/chunks/05b6nx_o3_f_n.js +0 -1
- package/.next/static/chunks/0dmns-gi0raa4.js +0 -1
- package/.next/static/chunks/0f9sq-7q_yxyl.js +0 -1
- package/.next/static/chunks/0oc4_xoia77dg.css +0 -1
- package/.next/static/chunks/0pheo8m3a-rzi.js +0 -1
- package/.next/static/chunks/19i8h2t-5evjx.js +0 -1
- package/.next/static/chunks/1c5fcj473025q.js +0 -1
- package/.next/static/chunks/1pi_hbmjw-f-z.js +0 -1
- package/.next/static/chunks/1twt6k09vg4np.js +0 -1
- package/.next/static/chunks/1ytnip8wdng93.js +0 -1
- package/.next/static/chunks/28gotuisldmom.js +0 -1
- package/.next/static/chunks/2998p0y7k1c8z.js +0 -3
- package/.next/static/chunks/29gyb3nubj51j.js +0 -53
- package/.next/static/chunks/2l233xfycjpd8.js +0 -1
- package/.next/static/chunks/2p5n7pa3c40t-.js +0 -2
- package/.next/static/chunks/2ru1q132af7h7.js +0 -1
- package/.next/static/chunks/2t8wqycwg3y04.js +0 -2
- package/.next/static/chunks/2uxum7qbyeyxd.js +0 -1
- package/.next/static/chunks/32z_ypgtchw48.js +0 -1
- package/.next/static/chunks/33pyjb3xd1iez.js +0 -1
- package/.next/static/chunks/3omud5xunrk1f.js +0 -1
- package/.next/static/chunks/42dnrkbph9e-1.js +0 -1
- package/.next/static/media/favicon.2vob68tjqpejf.ico +0 -0
- package/database/migrations/20260909063821_bitter_tenebrous/migration.sql +0 -1
- package/features/ai/prompts/memory-tidy.prompt.ts +0 -129
- package/features/ai/tools/tidy.tool.ts +0 -22
- package/features/bot/bot.notes.ts +0 -120
- package/features/memory/components/memory-tidy.tsx +0 -395
- package/features/memory/components/memory-view.tsx +0 -84
- package/features/memory/memory.tidy.ts +0 -332
- package/features/memory/tidy.query.ts +0 -135
- package/features/thursday/use-call-title.ts +0 -31
- /package/.next/server/app/api/bot/{notes → memory/files}/route/build-manifest.json +0 -0
- /package/.next/server/app/api/bot/{notes → memory/files}/route/server-reference-manifest.json +0 -0
- /package/.next/server/app/api/bot/{notes → memory/files}/route.js.map +0 -0
- /package/.next/server/app/api/{memory/tidy → bot/memory}/route/build-manifest.json +0 -0
- /package/.next/server/app/api/{memory/tidy → bot/memory}/route/server-reference-manifest.json +0 -0
- /package/.next/server/app/api/{memory/tidy → bot/memory}/route.js.map +0 -0
- /package/.next/static/{YR4NWcDDuzwLbTTU7U7Vr → kaTO0UHqF1bMnWgCDik2f}/_buildManifest.js +0 -0
- /package/.next/static/{YR4NWcDDuzwLbTTU7U7Vr → kaTO0UHqF1bMnWgCDik2f}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{YR4NWcDDuzwLbTTU7U7Vr → kaTO0UHqF1bMnWgCDik2f}/_ssgManifest.js +0 -0
|
@@ -5,10 +5,9 @@ import { useAppEvent } from "@/app/api/events/app-event.client";
|
|
|
5
5
|
import { queryKey } from "@/app/api/query-key";
|
|
6
6
|
import { toast } from "@/components/ui/toast";
|
|
7
7
|
import { TOOL_NAMES } from "@/features/ai/tools/tool-name";
|
|
8
|
-
import { markReportedAction } from "@/features/bot/bot.action";
|
|
9
8
|
import {
|
|
10
9
|
type Bot,
|
|
11
|
-
|
|
10
|
+
isAppStop,
|
|
12
11
|
TASK_CONTINUE,
|
|
13
12
|
type Task,
|
|
14
13
|
} from "@/features/bot/bot.schema";
|
|
@@ -45,7 +44,7 @@ import type {
|
|
|
45
44
|
LiveStatus,
|
|
46
45
|
} from "./thursday.schema";
|
|
47
46
|
import { thursdaySettings, useThursdayStore } from "./thursday.store";
|
|
48
|
-
import { toolLine } from "./tool-line";
|
|
47
|
+
import { toolBot, toolLine } from "./tool-line";
|
|
49
48
|
|
|
50
49
|
/**
|
|
51
50
|
* One live call, plus the task inbox the app watches even with no call open.
|
|
@@ -103,6 +102,14 @@ const IDLE_GRACE_MS = 15_000;
|
|
|
103
102
|
/** The countdown shows on screen inside this window. */
|
|
104
103
|
const IDLE_WARN_MS = 15_000;
|
|
105
104
|
|
|
105
|
+
/**
|
|
106
|
+
* The user finished a turn and nothing came back — no words, no tool — for this
|
|
107
|
+
* long. The line is up and the model is not on it, so there is no goodbye to
|
|
108
|
+
* ask for: the page hangs up. Only armed while an answer is owed, so a quiet
|
|
109
|
+
* line still ends the slow way (IDLE_HANG_UP_MS).
|
|
110
|
+
*/
|
|
111
|
+
const AGENT_SILENT_MS = 30_000;
|
|
112
|
+
|
|
106
113
|
const IDLE_LINE =
|
|
107
114
|
"The user has said nothing for a minute. Say a one-line goodbye, then call end_call.";
|
|
108
115
|
|
|
@@ -112,13 +119,9 @@ const IDLE_LINE =
|
|
|
112
119
|
*/
|
|
113
120
|
const RELAY_MIC_MS = 15_000;
|
|
114
121
|
|
|
115
|
-
/**
|
|
116
|
-
* A line queued for the model. `mark` is the task id to mark reported once the
|
|
117
|
-
* line is actually sent, not when it is queued.
|
|
118
|
-
*/
|
|
122
|
+
/** A line queued for the model. */
|
|
119
123
|
type Said = {
|
|
120
124
|
line: string;
|
|
121
|
-
mark?: string;
|
|
122
125
|
/** Shown on the activity line when the line is sent. */
|
|
123
126
|
show?: ToolRun;
|
|
124
127
|
};
|
|
@@ -132,8 +135,10 @@ export type ToolRun = {
|
|
|
132
135
|
name: string;
|
|
133
136
|
line: string | null;
|
|
134
137
|
done: boolean;
|
|
135
|
-
/** A relay from a bot (
|
|
138
|
+
/** A relay from a bot (answer or question) rather than a tool; `name` is the task label. */
|
|
136
139
|
kind?: "tool" | "relay";
|
|
140
|
+
/** The bot this names, when it names one: the row draws its face instead of a glyph. */
|
|
141
|
+
bot?: string | null;
|
|
137
142
|
};
|
|
138
143
|
|
|
139
144
|
export function useThursday() {
|
|
@@ -162,12 +167,16 @@ export function useThursday() {
|
|
|
162
167
|
spoke: boolean;
|
|
163
168
|
giveUp: ReturnType<typeof setTimeout> | null;
|
|
164
169
|
}>({ tool: false, reading: false, spoke: false, giveUp: null });
|
|
165
|
-
/**
|
|
170
|
+
/**
|
|
171
|
+
* Last activity time, whether the goodbye was requested, and when an answer
|
|
172
|
+
* started being owed (null once she answers or works).
|
|
173
|
+
*/
|
|
166
174
|
const idle = useRef<{
|
|
167
175
|
since: number;
|
|
168
176
|
asked: boolean;
|
|
177
|
+
owed: number | null;
|
|
169
178
|
grace: ReturnType<typeof setTimeout> | null;
|
|
170
|
-
}>({ since: 0, asked: false, grace: null });
|
|
179
|
+
}>({ since: 0, asked: false, owed: null, grace: null });
|
|
171
180
|
const linger = useRef<ReturnType<typeof setTimeout> | null>(null);
|
|
172
181
|
// Every server-run tool in this call starts with this signal, so one abort
|
|
173
182
|
// reaches running browser commands. Delegated tasks are server-owned and outlive the call
|
|
@@ -176,14 +185,15 @@ export function useThursday() {
|
|
|
176
185
|
const callId = useRef<string | null>(null);
|
|
177
186
|
/**
|
|
178
187
|
* Relays sent this call, keyed by relayKey (id + updatedAt): an answered task
|
|
179
|
-
*
|
|
180
|
-
* silence its second question.
|
|
188
|
+
* can stop to ask again, so the id alone would silence its second question.
|
|
181
189
|
*/
|
|
182
190
|
const relayed = useRef(new Set<string>());
|
|
191
|
+
/** When this call was placed. An ending from before it is already in her prompt. */
|
|
192
|
+
const placedAt = useRef(0);
|
|
183
193
|
/**
|
|
184
194
|
* Lines for the model, including ones raised before the line opens. Held
|
|
185
|
-
* until the session exists
|
|
186
|
-
*
|
|
195
|
+
* until the session exists, which is also what lets a call-back queue its
|
|
196
|
+
* line first.
|
|
187
197
|
*/
|
|
188
198
|
const outboxRef = useRef<Outbox<Said> | null>(null);
|
|
189
199
|
const outbox = (outboxRef.current ??= createOutbox<Said>());
|
|
@@ -206,6 +216,7 @@ export function useThursday() {
|
|
|
206
216
|
setTool({
|
|
207
217
|
name: call.name,
|
|
208
218
|
line: toolLine(call.name, call.arguments),
|
|
219
|
+
bot: toolBot(call.name, call.arguments),
|
|
209
220
|
done: false,
|
|
210
221
|
});
|
|
211
222
|
}, []);
|
|
@@ -343,11 +354,15 @@ export function useThursday() {
|
|
|
343
354
|
},
|
|
344
355
|
tasks: () => void revalidate(queryKey.tasks),
|
|
345
356
|
memory: () => void revalidate(queryKey.memory),
|
|
346
|
-
"memory-tidy": () => void revalidate(queryKey.memoryTidy),
|
|
347
357
|
mcp: () => {
|
|
348
358
|
void revalidate(queryKey.mcp);
|
|
349
359
|
void revalidate(queryKey.mcpTools);
|
|
350
360
|
},
|
|
361
|
+
// A sign-in finished in its own window (ai/chatgpt): the key rows and the model picker both read it
|
|
362
|
+
config: () => {
|
|
363
|
+
void revalidate(queryKey.config);
|
|
364
|
+
void revalidate(queryKey.llmModel);
|
|
365
|
+
},
|
|
351
366
|
});
|
|
352
367
|
|
|
353
368
|
// faces come from the bot list
|
|
@@ -356,23 +371,28 @@ export function useThursday() {
|
|
|
356
371
|
if (tasks) botTasks.sync(tasks, bots);
|
|
357
372
|
}, [tasks, bots]);
|
|
358
373
|
|
|
359
|
-
//
|
|
360
|
-
//
|
|
361
|
-
//
|
|
362
|
-
//
|
|
374
|
+
// A question is relayed on every call, because it still needs an answer. An
|
|
375
|
+
// ending is relayed only on the call it happened during: one from before is
|
|
376
|
+
// already in her prompt, on the `delegate` line that opened it. Telling is not
|
|
377
|
+
// seeing — the badge clears when the user opens the job. Sending while the
|
|
378
|
+
// line is still opening is fine: the outbox holds the line. `status` is in
|
|
379
|
+
// deps because the guard is a ref; without it a list that arrived before the
|
|
380
|
+
// line opened would wait for the next tasks change
|
|
363
381
|
useEffect(() => {
|
|
364
382
|
if (!tasks || !calling.current) return;
|
|
365
383
|
for (const task of tasks) {
|
|
366
|
-
if (task.status === "running"
|
|
384
|
+
if (task.status === "running") continue;
|
|
385
|
+
// A stop the app picks back up by itself is not news: it runs again in a moment
|
|
386
|
+
if (task.ask?.auto) continue;
|
|
387
|
+
if (
|
|
388
|
+
task.status !== "waiting" &&
|
|
389
|
+
toDate(task.updatedAt).getTime() < placedAt.current
|
|
390
|
+
)
|
|
391
|
+
continue;
|
|
367
392
|
const key = relayKey(task);
|
|
368
393
|
if (relayed.current.has(key)) continue;
|
|
369
394
|
relayed.current.add(key);
|
|
370
|
-
|
|
371
|
-
outbox.send({
|
|
372
|
-
line: relayLine(task),
|
|
373
|
-
mark: task.id,
|
|
374
|
-
show: relayShow(task),
|
|
375
|
-
});
|
|
395
|
+
outbox.send({ line: relayLine(task), show: relayShow(task) });
|
|
376
396
|
}
|
|
377
397
|
}, [tasks, outbox, status]);
|
|
378
398
|
|
|
@@ -385,7 +405,7 @@ export function useThursday() {
|
|
|
385
405
|
line:
|
|
386
406
|
act.kind === "answered"
|
|
387
407
|
? `The user answered task "${act.label}" on screen: ${act.answer}. The bot is going on with that — do not ask again.`
|
|
388
|
-
: `The user stopped task "${act.label}" on screen. It is not running any more — do not wait for it or
|
|
408
|
+
: `The user stopped task "${act.label}" on screen. It is not running any more — do not wait for it or say anything more about it.`,
|
|
389
409
|
});
|
|
390
410
|
}),
|
|
391
411
|
[outbox],
|
|
@@ -401,7 +421,7 @@ export function useThursday() {
|
|
|
401
421
|
calling.current = false;
|
|
402
422
|
opening.current = false;
|
|
403
423
|
relayed.current.clear();
|
|
404
|
-
// unsent lines
|
|
424
|
+
// unsent lines go: a question is relayed again next call, an ending is in her prompt
|
|
405
425
|
outbox.close();
|
|
406
426
|
outbox.clear();
|
|
407
427
|
// holds the closed session; the next call sets its own
|
|
@@ -414,7 +434,7 @@ export function useThursday() {
|
|
|
414
434
|
// a pending face timer must not fire after the call
|
|
415
435
|
restFace();
|
|
416
436
|
if (idle.current.grace) clearTimeout(idle.current.grace);
|
|
417
|
-
idle.current = { since: 0, asked: false, grace: null };
|
|
437
|
+
idle.current = { since: 0, asked: false, owed: null, grace: null };
|
|
418
438
|
setIdleLeft(null);
|
|
419
439
|
setSince(null);
|
|
420
440
|
setStatus("idle");
|
|
@@ -459,8 +479,17 @@ export function useThursday() {
|
|
|
459
479
|
* agent activity does not, so the goodbye cannot cancel itself.
|
|
460
480
|
*/
|
|
461
481
|
const stir = useCallback((who: "user" | "agent") => {
|
|
462
|
-
|
|
463
|
-
|
|
482
|
+
const now = Date.now();
|
|
483
|
+
idle.current.since = now;
|
|
484
|
+
if (who !== "user") {
|
|
485
|
+
// Words or a tool: she is on the line, so nothing is owed.
|
|
486
|
+
idle.current.owed = null;
|
|
487
|
+
return;
|
|
488
|
+
}
|
|
489
|
+
// Rewound by anything the user does, transcript deltas included, so a long
|
|
490
|
+
// turn is never mistaken for a line that stopped answering; it runs from the
|
|
491
|
+
// moment they stopped rather than from the moment they started.
|
|
492
|
+
idle.current.owed = now;
|
|
464
493
|
if (idle.current.grace) clearTimeout(idle.current.grace);
|
|
465
494
|
idle.current.grace = null;
|
|
466
495
|
idle.current.asked = false;
|
|
@@ -473,6 +502,17 @@ export function useThursday() {
|
|
|
473
502
|
const tick = setInterval(() => {
|
|
474
503
|
const live = session.current;
|
|
475
504
|
if (!live) return;
|
|
505
|
+
const owed = idle.current.owed;
|
|
506
|
+
if (owed !== null && Date.now() - owed >= AGENT_SILENT_MS) {
|
|
507
|
+
// Nothing to say goodbye with; the model is what would have said it.
|
|
508
|
+
toast.add({
|
|
509
|
+
type: "error",
|
|
510
|
+
title: "Call ended",
|
|
511
|
+
description: "The model stopped answering.",
|
|
512
|
+
});
|
|
513
|
+
void hangUp();
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
476
516
|
const left = IDLE_HANG_UP_MS - (Date.now() - idle.current.since);
|
|
477
517
|
setIdleLeft(
|
|
478
518
|
left <= IDLE_WARN_MS && !idle.current.asked
|
|
@@ -499,6 +539,7 @@ export function useThursday() {
|
|
|
499
539
|
// from here on this is a call; the outbox holds lines until the session exists
|
|
500
540
|
opening.current = true;
|
|
501
541
|
calling.current = true;
|
|
542
|
+
placedAt.current = Date.now();
|
|
502
543
|
outbox.clear();
|
|
503
544
|
try {
|
|
504
545
|
const handshake = unwrapResult(await openCallAction(thursdaySettings()));
|
|
@@ -601,8 +642,6 @@ export function useThursday() {
|
|
|
601
642
|
live.say(queued.length === 1 ? queued[0].line : mergedRelay(queued));
|
|
602
643
|
const last = queued.at(-1)?.show;
|
|
603
644
|
if (last) showRelay(last);
|
|
604
|
-
const marks = queued.flatMap((one) => one.mark ?? []);
|
|
605
|
-
if (marks.length) markReported(marks);
|
|
606
645
|
outbox.close();
|
|
607
646
|
};
|
|
608
647
|
|
|
@@ -615,7 +654,7 @@ export function useThursday() {
|
|
|
615
654
|
// line open: flush held lines first
|
|
616
655
|
outbox.open((one) => flush([one]));
|
|
617
656
|
|
|
618
|
-
//
|
|
657
|
+
// An opening — a first call, or memory to tidy — makes the model speak first, on the same path as a relay
|
|
619
658
|
if (handshake.opening) {
|
|
620
659
|
readAloud();
|
|
621
660
|
live.say(handshake.opening);
|
|
@@ -669,7 +708,8 @@ export function useThursday() {
|
|
|
669
708
|
if (!tasks) return;
|
|
670
709
|
const wants = tasks.filter(
|
|
671
710
|
(task) =>
|
|
672
|
-
!task.
|
|
711
|
+
!task.seen &&
|
|
712
|
+
!task.ask?.auto &&
|
|
673
713
|
(asksSomething(task) ||
|
|
674
714
|
(callBack === "any" && task.status !== "running")),
|
|
675
715
|
);
|
|
@@ -809,25 +849,12 @@ function persistTurn(
|
|
|
809
849
|
});
|
|
810
850
|
}
|
|
811
851
|
|
|
812
|
-
/** Failure surfaces as a toast: an unmarked report is read again next call. */
|
|
813
|
-
function markReported(ids: string[]) {
|
|
814
|
-
markReportedAction(ids)
|
|
815
|
-
.then(unwrapResult)
|
|
816
|
-
.catch((cause) =>
|
|
817
|
-
toast.add({
|
|
818
|
-
type: "error",
|
|
819
|
-
title: "Could not mark the report as delivered",
|
|
820
|
-
description: errorToString(cause),
|
|
821
|
-
}),
|
|
822
|
-
);
|
|
823
|
-
}
|
|
824
|
-
|
|
825
852
|
/**
|
|
826
|
-
* Waiting on a real question. A
|
|
853
|
+
* Waiting on a real question. A job the app stopped waits in the inbox
|
|
827
854
|
* instead of ringing.
|
|
828
855
|
*/
|
|
829
856
|
function asksSomething(task: Task) {
|
|
830
|
-
return task.status === "waiting" && !
|
|
857
|
+
return task.status === "waiting" && !isAppStop(task.ask);
|
|
831
858
|
}
|
|
832
859
|
|
|
833
860
|
/**
|
|
@@ -835,16 +862,16 @@ function asksSomething(task: Task) {
|
|
|
835
862
|
* sender and recipient or the model answers it as user speech.
|
|
836
863
|
*/
|
|
837
864
|
function relayLine(task: Task) {
|
|
838
|
-
// The label travels with the
|
|
865
|
+
// The label travels with the answer: what the user says next about this job
|
|
839
866
|
// is a word to it, and the task tool takes it by that name
|
|
840
867
|
const from = `[${task.bot} → you, about "${task.label}" — not the user speaking; they have not heard this. Anything more on this job goes to the task tool as "${task.label}", never a new job.]`;
|
|
841
868
|
switch (task.status) {
|
|
842
869
|
case "waiting": {
|
|
843
|
-
// a
|
|
870
|
+
// a stop is told, not read as a question
|
|
844
871
|
const options = task.ask?.options ?? [];
|
|
845
872
|
const said = task.ask?.question ?? task.outcome ?? "";
|
|
846
|
-
if (
|
|
847
|
-
return `${from}
|
|
873
|
+
if (isAppStop(task.ask)) {
|
|
874
|
+
return `${from} It stopped before finishing. Where it got to: ${said} Ask whether to keep going; if yes, send "${TASK_CONTINUE}" with the task tool.`;
|
|
848
875
|
}
|
|
849
876
|
const list = options.length ? ` Options: ${options.join(" / ")}.` : "";
|
|
850
877
|
return `${from} It asks: ${said}${list} Answer with the task tool if you can; otherwise ask the user and send back what they say.`;
|
|
@@ -852,7 +879,7 @@ function relayLine(task: Task) {
|
|
|
852
879
|
case "failed":
|
|
853
880
|
return `${from} It could not finish: ${task.outcome ?? ""}`;
|
|
854
881
|
default:
|
|
855
|
-
return `${from} Done. Its
|
|
882
|
+
return `${from} Done. Its answer: ${task.outcome ?? ""}`;
|
|
856
883
|
}
|
|
857
884
|
}
|
|
858
885
|
|
|
@@ -871,13 +898,13 @@ ${queued.map((one) => one.line).join("\n\n")}`;
|
|
|
871
898
|
function relayShow(task: Task): ToolRun {
|
|
872
899
|
const line =
|
|
873
900
|
task.status === "waiting"
|
|
874
|
-
?
|
|
875
|
-
? `${task.bot}
|
|
901
|
+
? isAppStop(task.ask)
|
|
902
|
+
? `${task.bot} stopped`
|
|
876
903
|
: `${task.bot} is asking`
|
|
877
904
|
: task.status === "failed"
|
|
878
905
|
? `${task.bot} could not finish`
|
|
879
|
-
: `
|
|
880
|
-
return { kind: "relay", name: task.label, line, done: true };
|
|
906
|
+
: `Answer from ${task.bot}`;
|
|
907
|
+
return { kind: "relay", name: task.label, line, done: true, bot: task.bot };
|
|
881
908
|
}
|
|
882
909
|
|
|
883
910
|
export type { CallMessage, CallStatus };
|
|
@@ -158,10 +158,12 @@ export function FileLink({
|
|
|
158
158
|
const PAD: Record<FileViewPlace, { prose: string; block: string }> = {
|
|
159
159
|
dialog: { prose: "px-5 py-4", block: "px-4 py-3" },
|
|
160
160
|
page: { prose: "px-5 py-6 sm:px-8", block: "px-5 py-5" },
|
|
161
|
+
// Opened under a list row, which already sets the edges
|
|
162
|
+
inline: { prose: "pb-3", block: "pb-3" },
|
|
161
163
|
};
|
|
162
164
|
|
|
163
|
-
/** Where the file is read: inside the dialog
|
|
164
|
-
export type FileViewPlace = "dialog" | "page";
|
|
165
|
+
/** Where the file is read: inside the dialog, on its own page, or opened in place under a row. */
|
|
166
|
+
export type FileViewPlace = "dialog" | "page" | "inline";
|
|
165
167
|
|
|
166
168
|
export function FileBody({
|
|
167
169
|
kind,
|
|
@@ -14,9 +14,10 @@ import {
|
|
|
14
14
|
DATA_DIR,
|
|
15
15
|
PATHS,
|
|
16
16
|
TOOL_OUTPUT,
|
|
17
|
+
WORKSPACE_KEEP,
|
|
17
18
|
} from "@/config";
|
|
18
19
|
import { logger } from "@/lib/logger";
|
|
19
|
-
import { createSandBox, type Sandbox } from "@/lib/sandbox";
|
|
20
|
+
import { createSandBox, type Sandbox, walkFiles } from "@/lib/sandbox";
|
|
20
21
|
|
|
21
22
|
/**
|
|
22
23
|
* Where the sandbox is opened. The app's own skills live outside the
|
|
@@ -225,6 +226,48 @@ export async function ensureBrowser(): Promise<void> {
|
|
|
225
226
|
);
|
|
226
227
|
}
|
|
227
228
|
|
|
229
|
+
/** What a job leaves on disk: stale browser snapshots and spilled tool output. */
|
|
230
|
+
export async function pruneJobFiles(): Promise<void> {
|
|
231
|
+
await pruneBrowserFiles();
|
|
232
|
+
await pruneOutputFiles();
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
type ListedBrowser = { name: string; headed?: boolean; attached?: boolean };
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* A job that ended closes the browser nobody can see. Headless is the bot's
|
|
239
|
+
* working copy; `--headed` is the bot putting a window on their screen on
|
|
240
|
+
* purpose — an order at checkout, a map with a pin, a sign-in — and that one is
|
|
241
|
+
* theirs to close (`skills/browser`). A session attached to their own Chrome is
|
|
242
|
+
* never touched. Anything unreadable — no playwright, a failed or folded `list`
|
|
243
|
+
* — leaves the browser as it is.
|
|
244
|
+
*/
|
|
245
|
+
export async function closeHiddenBrowser(taskId: string): Promise<void> {
|
|
246
|
+
const sandbox = await openWorkspace();
|
|
247
|
+
const env = jobShellEnv(taskId);
|
|
248
|
+
const listed = await sandbox
|
|
249
|
+
.exec("playwright-cli list --json", { env, timeoutMs: 15_000 })
|
|
250
|
+
.catch(() => null);
|
|
251
|
+
let session: ListedBrowser | undefined;
|
|
252
|
+
try {
|
|
253
|
+
const { browsers } = JSON.parse(listed?.stdout ?? "") as {
|
|
254
|
+
browsers?: ListedBrowser[];
|
|
255
|
+
};
|
|
256
|
+
session = browsers?.find((b) => b.name === env.PLAYWRIGHT_CLI_SESSION);
|
|
257
|
+
} catch {}
|
|
258
|
+
if (session?.headed === false && !session.attached) {
|
|
259
|
+
await sandbox
|
|
260
|
+
.exec("playwright-cli close", { env, timeoutMs: 15_000 })
|
|
261
|
+
.catch(() => {});
|
|
262
|
+
}
|
|
263
|
+
await pruneJobFiles();
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Closes the job's browser whatever it shows. Only for a job the user cancelled
|
|
268
|
+
* or deleted: its row is gone, so a window left open would belong to nothing on
|
|
269
|
+
* the screen.
|
|
270
|
+
*/
|
|
228
271
|
export async function closeJobShell(taskId: string): Promise<void> {
|
|
229
272
|
const sandbox = await openWorkspace();
|
|
230
273
|
await sandbox
|
|
@@ -233,20 +276,18 @@ export async function closeJobShell(taskId: string): Promise<void> {
|
|
|
233
276
|
timeoutMs: 15_000,
|
|
234
277
|
})
|
|
235
278
|
.catch(() => {});
|
|
236
|
-
await
|
|
237
|
-
await pruneOutputFiles();
|
|
279
|
+
await pruneJobFiles();
|
|
238
280
|
}
|
|
239
281
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
*/
|
|
244
|
-
const BROWSER_FILE_TTL_MS = 60 * 60 * 1000;
|
|
282
|
+
const pruneOutputFiles = () => pruneOldFiles(PATHS.output);
|
|
283
|
+
|
|
284
|
+
const pruneBrowserFiles = () => pruneOldFiles(BROWSER_DIR);
|
|
245
285
|
|
|
246
|
-
|
|
247
|
-
|
|
286
|
+
/** Files directly in a workspace folder that have not changed for WORKSPACE_KEEP.forMs. */
|
|
287
|
+
async function pruneOldFiles(folder: string): Promise<void> {
|
|
288
|
+
const dir = join(WORKSPACE, folder);
|
|
248
289
|
const entries = await readdir(dir, { withFileTypes: true }).catch(() => []);
|
|
249
|
-
const cutoff = Date.now() -
|
|
290
|
+
const cutoff = Date.now() - WORKSPACE_KEEP.forMs;
|
|
250
291
|
for (const entry of entries) {
|
|
251
292
|
if (!entry.isFile()) continue;
|
|
252
293
|
const file = join(dir, entry.name);
|
|
@@ -255,24 +296,35 @@ async function pruneOutputFiles(): Promise<void> {
|
|
|
255
296
|
}
|
|
256
297
|
}
|
|
257
298
|
|
|
299
|
+
/** Every folder under `scratch/`, workspace-relative, as jobScratch names them. */
|
|
300
|
+
export async function listScratchFolders(): Promise<string[]> {
|
|
301
|
+
const entries = await readdir(join(WORKSPACE, PATHS.scratch), {
|
|
302
|
+
withFileTypes: true,
|
|
303
|
+
}).catch(() => []);
|
|
304
|
+
return entries
|
|
305
|
+
.filter((entry) => entry.isDirectory())
|
|
306
|
+
.map((entry) => `${PATHS.scratch}/${entry.name}`);
|
|
307
|
+
}
|
|
308
|
+
|
|
258
309
|
/**
|
|
259
|
-
*
|
|
260
|
-
*
|
|
261
|
-
*
|
|
262
|
-
*
|
|
310
|
+
* Removes the workspace folders among `folders` that have not changed for
|
|
311
|
+
* WORKSPACE_KEEP.forMs, judged by the folder itself. Only for folders no job owns
|
|
312
|
+
* (bot.runner sweepJobFiles): a job that has just made its folder is never old
|
|
313
|
+
* enough to be caught. Returns what went.
|
|
263
314
|
*/
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
const
|
|
268
|
-
const
|
|
269
|
-
const
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
315
|
+
export async function removeUnchangedFolders(
|
|
316
|
+
folders: string[],
|
|
317
|
+
): Promise<string[]> {
|
|
318
|
+
const cutoff = Date.now() - WORKSPACE_KEEP.forMs;
|
|
319
|
+
const removed: string[] = [];
|
|
320
|
+
for (const folder of folders) {
|
|
321
|
+
const full = join(WORKSPACE, folder);
|
|
322
|
+
const info = await stat(full).catch(() => null);
|
|
323
|
+
if (!info?.isDirectory() || info.mtimeMs >= cutoff) continue;
|
|
324
|
+
await rm(full, { recursive: true, force: true }).catch(() => {});
|
|
325
|
+
removed.push(folder);
|
|
275
326
|
}
|
|
327
|
+
return removed;
|
|
276
328
|
}
|
|
277
329
|
|
|
278
330
|
/**
|
|
@@ -304,6 +356,38 @@ export async function openWorkspace(): Promise<Sandbox> {
|
|
|
304
356
|
});
|
|
305
357
|
}
|
|
306
358
|
|
|
359
|
+
/** Files read off one job's folder at most; a folder of generated files is not a list anyone reads. */
|
|
360
|
+
const JOB_FOLDER_WALK = 500;
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* What of a job's files is on disk: the paths it gave `write_file` that still exist,
|
|
364
|
+
* and every file under its own folder however it got there — a shell command, a
|
|
365
|
+
* download, a screenshot. Workspace-relative where inside the workspace, each once,
|
|
366
|
+
* the most recently changed last (bot.run filesUnder).
|
|
367
|
+
*/
|
|
368
|
+
export async function filesOnDisk(
|
|
369
|
+
written: string[],
|
|
370
|
+
folder: string | null,
|
|
371
|
+
): Promise<string[]> {
|
|
372
|
+
const candidates = written.map((path) => resolve(WORKSPACE, path));
|
|
373
|
+
if (folder) {
|
|
374
|
+
let walked = 0;
|
|
375
|
+
for await (const full of walkFiles(join(WORKSPACE, folder))) {
|
|
376
|
+
candidates.push(full);
|
|
377
|
+
walked += 1;
|
|
378
|
+
if (walked >= JOB_FOLDER_WALK) break;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
const found = new Map<string, number>();
|
|
382
|
+
for (const full of candidates) {
|
|
383
|
+
const info = await stat(full).catch(() => null);
|
|
384
|
+
if (!info?.isFile()) continue;
|
|
385
|
+
const rel = relative(WORKSPACE, full);
|
|
386
|
+
found.set(rel && !rel.startsWith("..") ? rel : full, info.mtimeMs);
|
|
387
|
+
}
|
|
388
|
+
return [...found].sort((a, b) => a[1] - b[1]).map(([path]) => path);
|
|
389
|
+
}
|
|
390
|
+
|
|
307
391
|
/**
|
|
308
392
|
* Removes a job's working folder. Its lifetime is the task's: when the row goes,
|
|
309
393
|
* so does what it was working with (features/bot/bot.runner). Never touches
|
package/lib/limits.ts
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The page an OAuth redirect lands on: a detour tab that says how it went and closes itself
|
|
3
|
+
* when it went well. Every sign-in that comes back through a browser draws this one.
|
|
4
|
+
*/
|
|
5
|
+
export function oauthPage(
|
|
6
|
+
title: string,
|
|
7
|
+
detail: string,
|
|
8
|
+
{ autoClose = false }: { autoClose?: boolean } = {},
|
|
9
|
+
): string {
|
|
10
|
+
return `<!doctype html>
|
|
11
|
+
<meta charset="utf-8">
|
|
12
|
+
<title>${escapeHtml(title)}</title>
|
|
13
|
+
<body style="font-family: ui-monospace, monospace; display: grid; place-items: center; min-height: 100dvh; margin: 0">
|
|
14
|
+
<div style="text-align: center; max-width: 28rem; padding: 1.5rem">
|
|
15
|
+
<p style="font-size: 1.125rem; margin: 0 0 .5rem">${escapeHtml(title)}</p>
|
|
16
|
+
<p style="color: #666; font-size: .875rem; margin: 0">${escapeHtml(detail)}</p>
|
|
17
|
+
</div>
|
|
18
|
+
${autoClose ? "<script>setTimeout(() => window.close(), 900)</script>" : ""}
|
|
19
|
+
</body>`;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function escapeHtml(text: string) {
|
|
23
|
+
return text
|
|
24
|
+
.replaceAll("&", "&")
|
|
25
|
+
.replaceAll("<", "<")
|
|
26
|
+
.replaceAll(">", ">");
|
|
27
|
+
}
|
package/lib/realtime/openai.ts
CHANGED
|
@@ -6,8 +6,8 @@ import { createWebRtcTransport } from "./realtime.transport";
|
|
|
6
6
|
|
|
7
7
|
const CALLS_URL = "https://api.openai.com/v1/realtime/calls";
|
|
8
8
|
|
|
9
|
-
/** Streams user transcripts as recognized;
|
|
10
|
-
const TRANSCRIPTION_MODEL = "gpt-
|
|
9
|
+
/** Streams user transcripts as recognized; the file models report only after the turn ends. */
|
|
10
|
+
const TRANSCRIPTION_MODEL = "gpt-live-transcribe";
|
|
11
11
|
|
|
12
12
|
export const createOpenAiSession = realtimeSession({
|
|
13
13
|
transport: ({ credential, audio, on }) =>
|
|
@@ -46,7 +46,7 @@ export type OpenAiSessionConfig = {
|
|
|
46
46
|
audio?: {
|
|
47
47
|
input?: {
|
|
48
48
|
format?: RealtimeAudioFormat;
|
|
49
|
-
/** Null turns transcription off.
|
|
49
|
+
/** Null turns transcription off. A file model reports only at turn end; `gpt-live-transcribe` streams deltas. */
|
|
50
50
|
transcription?: {
|
|
51
51
|
model: string;
|
|
52
52
|
language?: string;
|