thursday-agent 0.1.2 → 0.2.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 +1 -0
- package/.next/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/routes-manifest.json +6 -0
- 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 +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 +13 -13
- package/.next/server/app/_not-found.segments/_full.segment.rsc +13 -13
- 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 +1 -1
- package/.next/server/app/api/artifact/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/notes/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/bot/notes/route/build-manifest.json +12 -0
- package/.next/server/app/api/bot/notes/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/bot/notes/route.js +14 -0
- package/.next/server/app/api/bot/notes/route.js.map +5 -0
- package/.next/server/app/api/bot/notes/route.js.nft.json +1 -0
- package/.next/server/app/api/bot/notes/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/bot/route.js +4 -4
- package/.next/server/app/api/bot/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/task/[id]/route.js +6 -6
- package/.next/server/app/api/bot/task/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/task/route.js +6 -6
- package/.next/server/app/api/bot/task/route.js.nft.json +1 -1
- package/.next/server/app/api/config/route.js +3 -3
- package/.next/server/app/api/config/route.js.nft.json +1 -1
- package/.next/server/app/api/events/route.js +1 -1
- package/.next/server/app/api/events/route.js.nft.json +1 -1
- package/.next/server/app/api/file/[...path]/route.js +1 -1
- package/.next/server/app/api/file/[...path]/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/catalog/route.js +6 -6
- package/.next/server/app/api/llm-model/catalog/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/route.js +3 -3
- package/.next/server/app/api/llm-model/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/[name]/route.js +3 -3
- 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 +3 -3
- package/.next/server/app/api/mcp/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/tools/route.js +3 -3
- package/.next/server/app/api/mcp/tools/route.js.nft.json +1 -1
- package/.next/server/app/api/memory/route.js +7 -7
- package/.next/server/app/api/memory/route.js.nft.json +1 -1
- package/.next/server/app/api/memory/tidy/route.js +10 -11
- package/.next/server/app/api/memory/tidy/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/[source]/[name]/route.js +1 -1
- package/.next/server/app/api/skills/[source]/[name]/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/route.js +1 -1
- package/.next/server/app/api/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/call/route.js +8 -8
- package/.next/server/app/api/thursday/call/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/skills/route.js +8 -8
- package/.next/server/app/api/thursday/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/tool-call/route.js +11 -12
- package/.next/server/app/api/thursday/tool-call/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 +1 -1
- package/.next/server/app/artifact/[...path]/page.js +3 -3
- 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/page/server-reference-manifest.json +63 -41
- 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/app-paths-manifest.json +1 -0
- package/.next/server/chunks/0d-b_next_dist_server_app-render_after-task-async-storage_external_0-exn7p.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0t_dqaj._.js → [root-of-the-server]__0-npkh_._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__005var5._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__019dx9f._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__02va5wz._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__1mzp_el._.js → [root-of-the-server]__04_8spk._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__06t77t4._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0bed6hu._.js +4 -4
- package/.next/server/chunks/[root-of-the-server]__0cro2dz._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__0emr6go._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0le4d-p._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0m8ywyo._.js +5 -5
- package/.next/server/chunks/{[root-of-the-server]__113fqg5._.js → [root-of-the-server]__0p32jfz._.js} +3 -3
- package/.next/server/chunks/[root-of-the-server]__0phdgco._.js +4 -4
- package/.next/server/chunks/[root-of-the-server]__0wvgrsl._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__11j52t0._.js +5 -0
- package/.next/server/chunks/{[root-of-the-server]__0j_n5l3._.js → [root-of-the-server]__1692zrv._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__16thabu._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__173nhwf._.js +3 -3
- package/.next/server/chunks/[root-of-the-server]__1bn73ih._.js +10 -0
- package/.next/server/chunks/[root-of-the-server]__1bqhuh9._.js +4 -4
- package/.next/server/chunks/[root-of-the-server]__1ccon1w._.js +10 -0
- package/.next/server/chunks/[root-of-the-server]__1cqizfq._.js +1 -1
- package/.next/server/chunks/{[root-of-the-server]__1u_qvc7._.js → [root-of-the-server]__1fboj2j._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__1dow0bz._.js → [root-of-the-server]__1oli73c._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__1txedx6._.js +4 -4
- package/.next/server/chunks/[root-of-the-server]__1untqv8._.js +5 -0
- package/.next/server/chunks/_0-73of8._.js +55 -0
- package/.next/server/chunks/{_2050gwn._.js → _00_584r._.js} +66 -28
- package/.next/server/chunks/{_0y8is-s._.js → _03a0897._.js} +1 -1
- package/.next/server/chunks/_05h2cii._.js +1 -1
- package/.next/server/chunks/_06mxlgn._.js +1 -1
- package/.next/server/chunks/_0a351g7._.js +1 -1
- package/.next/server/chunks/{_0hin38_._.js → _0khihjk._.js} +5 -5
- package/.next/server/chunks/_0kjjmag._.js +1 -1
- package/.next/server/chunks/{_1t8fv7b._.js → _0n74zsf._.js} +5 -5
- package/.next/server/chunks/_0nn99o2._.js +3 -0
- package/.next/server/chunks/_0pppbb5._.js +10 -6
- package/.next/server/chunks/{_1icgbi8._.js → _0rnf-6n._.js} +5 -5
- package/.next/server/chunks/_0u10wmw._.js +55 -0
- package/.next/server/chunks/{_0kl37zl._.js → _0vnutv9._.js} +1 -1
- package/.next/server/chunks/_0wp4le3._.js +1 -1
- package/.next/server/chunks/_0y5fg-x._.js +1 -1
- package/.next/server/chunks/_106co2o._.js +3 -0
- package/.next/server/chunks/_12bbv5i._.js +10 -6
- package/.next/server/chunks/_15hq89o._.js +1 -1
- package/.next/server/chunks/_15q1pig._.js +1 -1
- package/.next/server/chunks/_18-1wcc._.js +55 -0
- package/.next/server/chunks/_19wg5yn._.js +138 -0
- package/.next/server/chunks/_1_5mnq4._.js +18 -0
- package/.next/server/chunks/_1bt95p9._.js +55 -0
- package/.next/server/chunks/_1cbk7ms._.js +9 -9
- package/.next/server/chunks/_1drgfx4._.js +18 -0
- package/.next/server/chunks/_1drv2et._.js +10 -6
- package/.next/server/chunks/{_10qam6o._.js → _1e48czp._.js} +5 -5
- package/.next/server/chunks/{_1skgy7b._.js → _1kg70wc._.js} +5 -5
- package/.next/server/chunks/_1php4eq._.js +1 -1
- package/.next/server/chunks/_1rysr-r._.js +10 -0
- package/.next/server/chunks/_1u3rwbr._.js +3 -0
- package/.next/server/chunks/_1x7p319._.js +1 -1
- package/.next/server/chunks/_1yuv4vp._.js +1 -1
- package/.next/server/chunks/_next-internal_server_app_api_bot_notes_route_actions_0qcsyu7.js +3 -0
- package/.next/server/chunks/config_ts_1g4sz5o._.js +1 -1
- package/.next/server/chunks/features_bot_task_query_ts_11xuzl3._.js +1 -1
- package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0228f43._.js → node_modules_consola_dist_chunks_prompt_mjs_02s3hjt._.js} +1 -1
- package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0ir-vo2._.js → node_modules_consola_dist_chunks_prompt_mjs_06067w6._.js} +1 -1
- package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0otw8ef._.js → node_modules_consola_dist_chunks_prompt_mjs_096ais_._.js} +1 -1
- package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0tf290y._.js → node_modules_consola_dist_chunks_prompt_mjs_0a1rd09._.js} +1 -1
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_0gzvgfv._.js +3 -0
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_0j61-ma._.js +3 -0
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_0tvkfgh._.js +3 -0
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_11zjo-1._.js +3 -0
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1pycqsq._.js +3 -0
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1tpvamf._.js +3 -0
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1y9-wcr._.js +3 -0
- package/.next/server/chunks/ssr/[externals]__0dizgek._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0f6s48x._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0m1b5ky._.js +3 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__0dfwvr4._.js → [root-of-the-server]__0un-erv._.js} +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__1-mnhyd._.js +5 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__1bww500._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1mzi-ju._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__1qfqvmg._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1vcdast._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1xwnu-h._.js +3 -0
- package/.next/server/chunks/ssr/_03webdr._.js +3 -0
- package/.next/server/chunks/ssr/{_0gd4vaa._.js → _040sk32._.js} +71 -29
- package/.next/server/chunks/ssr/_077-g6s._.js +1 -1
- package/.next/server/chunks/ssr/{_0lc_7c8._.js → _09ja_w1._.js} +2 -2
- package/.next/server/chunks/ssr/{_1dcxzqe._.js → _0f_b_9s._.js} +2 -2
- package/.next/server/chunks/ssr/_0h7zdni._.js +1 -1
- package/.next/server/chunks/ssr/_0lu1n_x._.js +3 -0
- package/.next/server/chunks/ssr/_0sf1isi._.js +1 -1
- package/.next/server/chunks/ssr/_0su6_08._.js +3 -0
- package/.next/server/chunks/ssr/{_0nso8tp._.js → _0w5bgak._.js} +2 -2
- package/.next/server/chunks/ssr/{_19_o9d-._.js → _0x_nu5e._.js} +2 -2
- package/.next/server/chunks/ssr/_1-teee5._.js +3 -3
- package/.next/server/chunks/ssr/_13punpm._.js +1 -1
- package/.next/server/chunks/ssr/{_0ay6b01._.js → _1ciyoo3._.js} +2 -2
- package/.next/server/chunks/ssr/_1e-dgz0._.js +1 -1
- package/.next/server/chunks/ssr/_1fq7zgb._.js +1 -1
- package/.next/server/chunks/ssr/{_0cvjbuz._.js → _1g6l4uj._.js} +2 -2
- package/.next/server/chunks/ssr/{_0q_2f2x._.js → _1lip4th._.js} +2 -2
- package/.next/server/chunks/ssr/_1m3bsfr._.js +3 -0
- package/.next/server/chunks/ssr/_1mznrxk._.js +1 -1
- package/.next/server/chunks/ssr/_1ruzehw._.js +3 -0
- package/.next/server/chunks/ssr/_1vyd1ji._.js +3 -0
- package/.next/server/chunks/ssr/features_bot_components_bot-setting_tsx_01ajft6._.js +2 -2
- package/.next/server/chunks/ssr/features_config_components_14jqgy4._.js +1 -1
- 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/features_memory_components_memory-setting_tsx_0oa43sw._.js +1 -1
- package/.next/server/chunks/ssr/lib_realtime_12wg_dd._.js +27 -0
- package/.next/server/chunks/ssr/lib_realtime_15h_v1v._.js +27 -0
- package/.next/server/chunks/ssr/{node_modules_108wd2o._.js → node_modules_004qlr4._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1ub40gk._.js → node_modules_01qnv-a._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1y8_3vg._.js → node_modules_04n7mjs._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0_j7-g4._.js → node_modules_08d8bke._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0y2-av4._.js → node_modules_09xhur7._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_043-236._.js → node_modules_0_n241r._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0ls96je._.js → node_modules_0iz1rzd._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0xwx4u-._.js → node_modules_0kl7-tn._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1jatz7w._.js → node_modules_0kxz4gt._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1t0y5jt._.js → node_modules_0lrjk5t._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_13f2md6._.js → node_modules_0m93zeg._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1nhw9qg._.js → node_modules_0n1kj4p._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1k29j1j._.js → node_modules_0ndvxub._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_16i4o_3._.js → node_modules_13r44jq._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0fbw5-u._.js → node_modules_17lrt3y._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1d-is1o._.js → node_modules_18_dk7_._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1hn_sd5._.js → node_modules_19dp7ko._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_20ynonm._.js → node_modules_1dwguw_._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_00d6675._.js → node_modules_1hd-5tv._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1ee8gav._.js → node_modules_1hn8z1f._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0bue6gy._.js → node_modules_1n5ygqe._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1_588_4._.js → node_modules_1q0p85z._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0ipn1ho._.js → node_modules_1toafc-._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0_fvxnt._.js → node_modules_1xyd7ov._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1v0077l._.js → node_modules_1zu988w._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_06kvvuo._.js → node_modules_20yebtj._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_092s8nx._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0m9a4y0._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1nvexgu._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_13w_wy9._.js} +1 -1
- package/.next/server/chunks/ssr/node_modules_consola_dist_chunks_prompt_mjs_05cwqv2._.js +47 -0
- 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 +64 -42
- package/.next/static/chunks/05b6nx_o3_f_n.js +1 -0
- package/.next/static/chunks/{3aquirz5h71da.js → 07kl352c-lvcz.js} +1 -1
- package/.next/static/chunks/0dmns-gi0raa4.js +1 -0
- package/.next/static/chunks/0oc4_xoia77dg.css +1 -0
- package/.next/static/chunks/0pheo8m3a-rzi.js +1 -0
- package/.next/static/chunks/{2ihkf6l2jowo9.js → 18vhba44l1fc9.js} +3 -3
- package/.next/static/chunks/19i8h2t-5evjx.js +1 -0
- package/.next/static/chunks/{1gy3bbv7usnjo.js → 1c5fcj473025q.js} +1 -1
- package/.next/static/chunks/1pi_hbmjw-f-z.js +1 -0
- package/.next/static/chunks/{0tydnn2kybibk.js → 1twt6k09vg4np.js} +1 -1
- package/.next/static/chunks/{21rk8w7bda-su.js → 28gotuisldmom.js} +1 -1
- package/.next/static/chunks/{3xxa2j56-f3nm.js → 2998p0y7k1c8z.js} +1 -1
- package/.next/static/chunks/2l233xfycjpd8.js +1 -0
- package/.next/static/chunks/2p5n7pa3c40t-.js +2 -0
- package/.next/static/chunks/2ru1q132af7h7.js +1 -0
- package/.next/static/chunks/{2fq_86jvq9ymq.js → 2t8wqycwg3y04.js} +2 -2
- package/.next/static/chunks/32z_ypgtchw48.js +1 -0
- package/.next/static/chunks/{247d-r95j8xs0.js → 33pyjb3xd1iez.js} +1 -1
- package/.next/static/chunks/3786h5vayt80-.js +28 -0
- package/.next/static/chunks/3_h9txt3tq8t8.js +28 -0
- package/.next/static/chunks/{1khakdu_iuedc.js → 3ard_noqapnw1.js} +1 -1
- package/.next/static/chunks/{1fr5m75pwtyic.js → 3omud5xunrk1f.js} +1 -1
- package/.next/static/chunks/42dnrkbph9e-1.js +1 -0
- package/app/api/events/app-event.client.ts +24 -0
- package/app/api/events/app-event.server.ts +45 -0
- package/app/api/events/app-event.ts +44 -0
- package/app/api/llm-model/catalog/route.ts +12 -0
- package/app/api/llm-model/route.ts +21 -0
- package/app/api/query-key.ts +144 -0
- package/app/api/thursday/tool-call/route.ts +67 -0
- package/components/ui/button-group.tsx +45 -0
- package/components/ui/custom-icon.tsx +259 -0
- package/components/ui/dropdown-menu.tsx +271 -0
- package/components/ui/folded-text.tsx +68 -0
- package/components/ui/input-group.tsx +157 -0
- package/components/ui/json-view.tsx +240 -0
- package/components/ui/shiny-text.tsx +141 -0
- package/components/ui/text-type.tsx +213 -0
- package/components/ui/theme-sync.tsx +9 -0
- package/database/migrations/{20260908030742_rainy_marvel_zombies → 20260909060813_optimal_sabretooth}/migration.sql +7 -0
- package/database/migrations/{20260908030742_rainy_marvel_zombies → 20260909060813_optimal_sabretooth}/snapshot.json +54 -1
- package/database/migrations/20260909063821_bitter_tenebrous/migration.sql +1 -0
- package/database/migrations/20260909063821_bitter_tenebrous/snapshot.json +1285 -0
- package/docs/how-it-works.md +59 -0
- package/docs/images/keeps-going.png +0 -0
- package/docs/images/task-thread.png +0 -0
- package/docs/images/two-minds.png +0 -0
- package/features/ai/load-tools.ts +55 -5
- package/features/ai/prompts/bot.prompt.ts +121 -26
- package/features/ai/prompts/memory-tidy.prompt.ts +7 -1
- package/features/ai/prompts/prompt-helper.ts +31 -5
- package/features/ai/prompts/thursday.prompt.ts +2 -0
- package/features/ai/tools/bot.tool.ts +37 -18
- package/features/ai/tools/mcp.tool.ts +5 -5
- package/features/ai/tools/memory.tool.ts +17 -10
- package/features/ai/tools/studio.tool.ts +5 -5
- package/features/ai/tools/tool-name.ts +2 -0
- package/features/ai/tools/workspace.tool.ts +33 -5
- package/features/bot/bot.action.ts +31 -4
- package/features/bot/bot.notes.ts +120 -0
- package/features/bot/bot.query.ts +56 -1
- package/features/bot/bot.run.ts +43 -3
- package/features/bot/bot.runner.ts +94 -20
- package/features/bot/bot.schema.ts +17 -0
- package/features/bot/components/bot-room.tsx +405 -306
- package/features/bot/components/bot-setting.tsx +123 -20
- package/features/bot/task.query.ts +18 -5
- package/features/memory/components/memory-setting.tsx +11 -2
- package/features/memory/memory.query.ts +9 -2
- package/features/memory/memory.schema.ts +30 -0
- package/features/skills/components/skills-setting.tsx +9 -1
- package/features/workspace/workspace.ts +136 -3
- package/hooks/use-draft.ts +37 -0
- package/hooks/use-hotkey.ts +105 -0
- package/hooks/use-object-state.ts +51 -0
- package/hooks/use-on-visible.ts +72 -0
- package/hooks/use-theme.ts +106 -0
- package/hooks/use-wake-word.ts +262 -0
- package/lib/realtime/realtime.driver.ts +34 -1
- package/lib/realtime/realtime.protocol.ts +6 -0
- package/lib/sandbox.ts +9 -1
- package/lib/tokens.ts +19 -0
- package/package.json +1 -1
- package/.next/server/chunks/[root-of-the-server]__02kt8yn._.js +0 -10
- package/.next/server/chunks/[root-of-the-server]__0h59di-._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__0qjqtwo._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__0yk6s3w._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__0z3gelv._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__11w_7_3._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1_0q_9w._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1gmn1cs._.js +0 -10
- package/.next/server/chunks/_0fzqt2y._.js +0 -100
- package/.next/server/chunks/_0jgm3b8._.js +0 -55
- package/.next/server/chunks/_0ks6_sg._.js +0 -55
- package/.next/server/chunks/_0tzfesa._.js +0 -3
- package/.next/server/chunks/_0zmestz._.js +0 -55
- package/.next/server/chunks/_12nr4xc._.js +0 -3
- package/.next/server/chunks/_1hzrsvg._.js +0 -55
- package/.next/server/chunks/_1uj4_io._.js +0 -10
- package/.next/server/chunks/_1yldgo4._.js +0 -55
- package/.next/server/chunks/features_0scmr4i._.js +0 -3
- package/.next/server/chunks/features_bot_bot_query_ts_12mgkl2._.js +0 -3
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_0ykklj0._.js +0 -3
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1ryg3wh._.js +0 -3
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1vwbnq_._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__01id-v3._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0b-0i32._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__185grso._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__1minz8_._.js +0 -3
- package/.next/server/chunks/ssr/_0j4v8of._.js +0 -3
- package/.next/server/chunks/ssr/_0l81bzy._.js +0 -3
- package/.next/server/chunks/ssr/_10uvw3l._.js +0 -3
- package/.next/server/chunks/ssr/_1jbv7m1._.js +0 -3
- package/.next/server/chunks/ssr/lib_realtime_0aetuyp._.js +0 -24
- package/.next/server/chunks/ssr/lib_realtime_18k_aj-._.js +0 -24
- package/.next/server/chunks/ssr/node_modules_zod_v4_classic_errors_05xv7vp.js +0 -3
- package/.next/static/chunks/0yysv1gzin17t.js +0 -1
- package/.next/static/chunks/1keib_gt066gc.js +0 -1
- package/.next/static/chunks/28g42tw8tsvhd.js +0 -1
- package/.next/static/chunks/2cwjgkt_hoyhj.js +0 -22
- package/.next/static/chunks/2rbf1fpd8n80-.js +0 -22
- package/.next/static/chunks/2ukj8k69y89um.js +0 -1
- package/.next/static/chunks/2wngeetfnzxkp.js +0 -2
- package/.next/static/chunks/388-t2v72jh39.css +0 -1
- package/.next/static/chunks/3fqvc0cg-atq_.js +0 -1
- package/.next/static/chunks/3p4egvfjxpatb.js +0 -1
- package/.next/static/chunks/3qe1w1ei-huhl.js +0 -1
- package/.next/static/chunks/3y40riycdip-i.js +0 -1
- package/.next/static/chunks/45a6zbtkelph9.js +0 -1
- /package/.next/static/{X34BUd9bfdH27ripuwwBm → YR4NWcDDuzwLbTTU7U7Vr}/_buildManifest.js +0 -0
- /package/.next/static/{X34BUd9bfdH27ripuwwBm → YR4NWcDDuzwLbTTU7U7Vr}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{X34BUd9bfdH27ripuwwBm → YR4NWcDDuzwLbTTU7U7Vr}/_ssgManifest.js +0 -0
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
module.exports=[232347,e=>{"use strict";let t,r,n,o,a,i;var s,l=e.i(333925),c=e.i(938281);let u={tasks:!0,memory:!0,mcp:!0,"memory-tidy":!0},d=globalThis,f=d.__appEvents??=(t=new Set,{emit(e){for(let r of[...t])try{r(e)}catch(e){console.error("event listener failed",e)}},subscribe:e=>(t.add(e),()=>{t.delete(e)})}),p=d.__presence??=(s=l.BROWSER_GONE_MS,r=!1,n=null,o=new Set,a=new Set,i=e=>{for(let t of[...e])try{t()}catch(e){console.error("presence listener failed",e)}},{get watching(){return r},track(e){if(e>0){n&&clearTimeout(n),n=null,r||(r=!0,i(a));return}!n&&r&&(n=setTimeout(()=>{n=null,r=!1,i(o)},s))},onGone:e=>(o.add(e),()=>o.delete(e)),onBack:e=>(a.add(e),()=>a.delete(e))}),h=d.__appEventStream??=function(e,t={}){let r=new TextEncoder,n=t.heartbeatMs??2e4,o=0;return{respond:(a,i)=>{let s=()=>{};return new Response(new ReadableStream({async start(l){let u=!1,d=new Map,f=[],p=e=>{if(!u)try{l.enqueue(r.encode(e))}catch{s()}},h=e=>p(`data: ${JSON.stringify(e)}
|
|
2
|
-
|
|
3
|
-
`),m=e=>{let r=t.coalesce?.keyOf(e)??null;if(null===r)return h(e);let n=d.get(r);n&&clearTimeout(n),d.set(r,setTimeout(()=>{d.delete(r),h(e)},t.coalesce?.ms))},y=e.subscribe(e=>f?f.push(e):m(e)),w=setInterval(()=>p(": ping\n\n"),n);o+=1,t.onWatchers?.(o),s=()=>{if(!u){for(let e of(u=!0,o-=1,t.onWatchers?.(o),y(),clearInterval(w),d.values()))clearTimeout(e);try{l.close()}catch{}}},a.addEventListener("abort",s);try{for(let e of await i?.()??[])h(e)}catch(e){c.logger.error("event stream opening failed",e),s();return}let b=f;for(let e of(f=null,b))m(e)},cancel(){s()}}),{headers:{"Content-Type":"text/event-stream; charset=utf-8","Cache-Control":"no-store","X-Accel-Buffering":"no"}})},get watchers(){return o}}}(f,{coalesce:{ms:150,keyOf:e=>e.type in u?e.type:null},onWatchers:p.track});d.__bootId??=crypto.randomUUID(),e.s(["appEventStream",0,h,"appEvents",0,f,"presence",0,p],232347)},333925,e=>{"use strict";let t=process.env.THURSDAY_APP_DIR?.trim()||process.cwd(),r=process.env.THURSDAY_HOME?.trim()||process.cwd(),n=process.env.THURSDAY_URL?.trim()||`http://localhost:${process.env.PORT?.trim()||3e3}`,o=`file:${r}/local.db`,a=".ai-workspace",i={workspace:a,artifacts:"artifacts",projects:"projects",scratch:"scratch",output:".output",skills:{default:"skills",custom:`${a}/.agents/skills`}};e.s(["APP_DIR",0,t,"APP_NAME",0,"Thursday","APP_URL",0,n,"BOT_RUN",0,{steps:25,compactAt:12e4,summaryWords:{min:600,max:3e3,perTokens:200},resumeMessages:20},"BROWSER_GONE_MS",0,1e4,"BROWSER_VIEWPORT",0,"700x700","DATA_DIR",0,r,"DB_FILE_NAME",0,o,"IS_DEV",0,!1,"MEMORY_LISTING_TOKENS",0,1e3,"PAGE_SIZE",0,50,"PATHS",0,i,"PROMPT_LINE",0,{skill:90,toolArgs:30},"STUDIO_SERVER",0,"studio","TOOL_OUTPUT",0,{max:8e3,head:5500,tail:1500}])},656719,e=>{"use strict";var t=e.i(864328);let r=[...new Set(Object.values(t.SPEACH_MODEL_PROVIDERS).map(e=>e.apiKeyName))],n={image:"IMAGE_MODEL",video:"VIDEO_MODEL",speech:"SPEECH_MODEL",transcription:"TRANSCRIPTION_MODEL"},o={image:{label:"Image model",hint:"What bots draw with"},video:{label:"Video model",hint:"What bots film with — minutes a clip"},speech:{label:"Speech model",hint:"What reads text aloud into a file"},transcription:{label:"Transcription model",hint:"What turns a recording into text"}},a="DEFAULT_MODEL",i={key:a,label:"Default model",hint:"What a bot thinks with until it picks its own",text:!0,choices:t.TEXT_MODEL_PROVIDER_LIST.flatMap(e=>e.suggestModels.map(t=>({value:`${e.id}/${t.id}`,label:`${e.label} \xb7 ${t.label}`,needs:e.apiKeyName})))},s=e=>r.includes(e.apiKeyName),l=e=>({key:e.apiKeyName,label:e.label,provider:e.id}),c=[{id:"voice",title:"voice",hint:"calls run on one of these",section:"keys",require:"any",note:"one is required",entries:t.TEXT_MODEL_PROVIDER_LIST.filter(s).map(l)},{id:"text",title:"models",hint:"what bots think with — add any, or none",section:"keys",require:"none",entries:t.TEXT_MODEL_PROVIDER_LIST.filter(e=>!s(e)).map(l)},{id:"bots",title:"Bots",hint:"what a bot runs on when it has not picked its own",section:"models",require:"none",entries:[i]},{id:"studio",title:"Studio",hint:"what a bot draws, films and speaks with — off until you pick one",section:"models",require:"none",entries:Object.keys(n).map(e=>({key:n[e],...o[e],kind:e,choices:t.MEDIA_MODEL_PROVIDER_LIST.flatMap(t=>t.models[e].map(e=>({value:`${t.id}/${e.id}`,label:`${t.label} \xb7 ${e.label}`,needs:t.apiKeyName})))}))}];Object.fromEntries(c.flatMap(e=>e.entries).map(e=>[e.key,e])),c.flatMap(e=>e.entries.map(e=>e.key)),Object.fromEntries(c.flatMap(e=>e.entries).filter(e=>e.choices?.length).map(e=>[e.key,e.choices])),e.s(["DEFAULT_MODEL_KEY",0,a,"MEDIA_MODEL_KEYS",0,n])},724185,e=>e.a(async(t,r)=>{try{var n=e.i(336763),o=e.i(876393),a=e.i(220376);e.i(656719);var i=t([o]);async function s(e){let t=process.env[e]?.trim();if(t)return t;let[r]=await o.database.select({value:a.configTable.value}).from(a.configTable).where((0,n.eq)(a.configTable.key,e));return r?.value.trim()||void 0}[o]=i.then?(await i)():i,e.s(["readConfig",0,s]),r()}catch(e){r(e)}},!1),933395,e=>{"use strict";var t=e.i(517435),r=e.i(864328),n=e.i(951056),o=e.i(986129);t.default.object({systemPrompt:t.default.string().max(o.COMMON_VALIDATE.prompt.max).nullish(),model:r.speachModelRefSchema.nullish(),locale:t.default.string().max(35).nullish()}),n.botIconSchema.extend({kind:t.default.enum(["mark","ascii"]).default("ascii"),charset:t.default.enum(["ascii","emoji","emojiOnly"]).default("ascii"),fontSize:t.default.number().min(4).max(16).default(8),density:t.default.number().min(.6).max(2).default(1.4)}).parse({});t.default.object({enabled:t.default.boolean(),phrase:t.default.string().trim().min(3).max(32)}),t.default.object({enabled:t.default.boolean(),combo:t.default.string().trim().min(1).max(64)}),t.default.enum(["off","waiting","any"]),t.default.enum(["center","sides"]),t.default.object({id:t.default.string().min(1),role:t.default.enum(["user","assistant","tool"]),tool:t.default.string().nullish(),text:t.default.string(),seq:t.default.number().int().min(0)}),e.s(["THURSDAY_KEYS",0,{skills:"THURSDAY_SKILLS"},"isSkillsOn",0,e=>e?.trim()==="on"],933395)},520401,e=>e.a(async(t,r)=>{try{var n=e.i(336763),o=e.i(396918),a=e.i(876393),i=e.i(220376),s=e.i(724185),l=e.i(933395),c=t([a,s]);async function u(){return(0,l.isSkillsOn)(await (0,s.readConfig)(l.THURSDAY_KEYS.skills))}async function d(e,t){return(await a.database.select({role:i.callMessageTable.role,text:i.callMessageTable.text}).from(i.callMessageTable).where((0,n.and)((0,n.eq)(i.callMessageTable.callId,e),(0,n.inArray)(i.callMessageTable.role,["user","assistant"]))).orderBy((0,o.desc)(i.callMessageTable.seq)).limit(t)).reverse().map(e=>({role:e.role,text:e.text}))}async function f(){return(await a.database.select({id:i.callTable.id}).from(i.callTable).where((0,n.isNull)(i.callTable.endedAt)).limit(1)).length>0}async function p(){await a.database.update(i.callTable).set({endedAt:new Date}).where((0,n.isNull)(i.callTable.endedAt))}[a,s]=c.then?(await c)():c,e.s(["isAnyCallLive",0,f,"listCallTurns",0,d,"readCallSkillsOn",0,u,"sweepCalls",0,p]),r()}catch(e){r(e)}},!1),871096,e=>{"use strict";var t=e.i(912714),r=e.i(750227),n=e.i(333925),o=e.i(938281),a=e.i(874533);let i=new Set(["node_modules",".git",".next","dist","build",".venv","__pycache__",".turbo","coverage"]);async function s(e,n,o,a){if(e.length<=a.max)return e;let i=(0,r.join)(o,a.dir),s=(0,r.join)(i,`${new Date().toISOString().replace(/[:.]/g,"-")}-${n.replace(/[^a-zA-Z0-9_-]+/g,"_")}.txt`),l=s;try{await (0,t.mkdir)(i,{recursive:!0}),await (0,t.writeFile)(s,e),l=(0,r.relative)(o,s)||s}catch{l="(could not be written to a file)"}let c=(e.match(/\n/g)?.length??0)+1;return`${e.slice(0,a.head).trimEnd()}
|
|
4
|
-
|
|
5
|
-
[${n} cut at ${a.max.toLocaleString("en")} chars — the whole thing (${c} lines) is at ${l}. Read the part you need with \`sed -n\`.]
|
|
6
|
-
|
|
7
|
-
${e.slice(-a.tail).trimStart()}`}let l=n.APP_DIR,c=(0,r.join)(n.DATA_DIR,n.PATHS.workspace),u=(process.env.THURSDAY_TOOL_PATH?.split(":")??[(0,r.join)(l,"node_modules",".bin")]).filter(Boolean);(0,r.join)(c,n.PATHS.artifacts);let d=[n.PATHS.artifacts,n.PATHS.projects,n.PATHS.scratch],f=new Set([...d,".agents"]),p=(e,t)=>t===e||t.startsWith(e+r.sep),h=e=>(0,t.realpath)(e).catch(()=>null);async function m(e){let t=await h(c)??c,n=(0,r.resolve)(c,e);if(!p(c,n))return null;let o=n,a=await h(o);for(;null===a&&(0,r.dirname)(o)!==o;)o=(0,r.dirname)(o),a=await h(o);if(null===a)return null;let i=(0,r.relative)(o,n),s=i?(0,r.join)(a,i):a;return p(t,s)?s:null}let y=e=>e?{PLAYWRIGHT_CLI_SESSION:`task-${e}`,PLAYWRIGHT_MCP_VIEWPORT_SIZE:n.BROWSER_VIEWPORT}:{};async function w(){if(process.env.THURSDAY_SKIP_BROWSER)return;let e=await O(),t=await e.exec("playwright-cli install-browser chromium").catch(e=>({exitCode:1,stderr:String(e)}));0!==t.exitCode&&o.logger.warn(`no browser — bots cannot open a page until \`playwright-cli install-browser chromium\` succeeds: ${t.stderr.trim().split("\n").at(-1)??""}`)}async function b(e){let t=await O();await t.exec("playwright-cli close",{env:y(e),timeoutMs:15e3}).catch(()=>{}),await g()}async function g(){let e=(0,r.join)(c,".playwright-cli"),n=await (0,t.readdir)(e,{withFileTypes:!0}).catch(()=>[]),o=Date.now()-36e5;for(let a of n){if(!a.isFile())continue;let n=(0,r.join)(e,a.name),i=await (0,t.stat)(n).catch(()=>null);i&&i.mtimeMs<o&&await (0,t.unlink)(n).catch(()=>{})}}let T={"pnpm-workspace.yaml":"packages:\n - '**'\n",".npmrc":"recursive-install=false\n"};async function O(){for(let e of d)await (0,t.mkdir)((0,r.join)(c,e),{recursive:!0});for(let[e,n]of Object.entries(T))await (0,t.writeFile)((0,r.join)(c,e),n,{flag:"wx"}).catch(()=>{});return(({workingDirectory:e,spill:n,toolPath:o})=>{let l=(0,r.resolve)(e),c=(o??[]).filter(Boolean).join(":"),u=e=>e.startsWith("/")||/^[A-Za-z]:/.test(e)?e:(0,r.resolve)(l,e);async function*d(e){let n;try{n=await (0,t.readdir)(e,{withFileTypes:!0})}catch{return}for(let t of n){if(i.has(t.name)||t.name.startsWith("."))continue;let n=(0,r.join)(e,t.name);t.isDirectory()?yield*d(n):t.isFile()&&(yield n)}}return{cwd:l,resolve:u,readFile:(e,r)=>(0,t.readFile)(u(e),r),async writeFile(e,n){let o=u(e);await (0,t.mkdir)((0,r.join)(o,".."),{recursive:!0}),await (0,t.writeFile)(o,n)},readdir:(e,r)=>(0,t.readdir)(u(e),r),fold:(e,t="output")=>s(e,t,l,n),async glob(e,{path:t=".",limit:n=200}={}){let o=u(t),a=RegExp("^"+e.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*\*\//g,"(?:.*/)?").replace(/\*/g,"[^/]*").replace(/\?/g,"[^/]")+"$"),i=[];for await(let e of d(o)){let t=(0,r.relative)(o,e).split(r.sep).join("/");if((a.test(t)||a.test(e))&&i.push(e),i.length>=n)break}return i},exec:(e,{cwd:t,timeoutMs:r=18e4,signal:o,env:i}={})=>new Promise(d=>{let f=function(){let e={...process.env};for(let t of Object.keys(e))/KEY|TOKEN|SECRET|PASSWORD|CREDENTIAL|_AUTH/i.test(t)&&delete e[t];return e.TERM="dumb",e.PAGER="cat",e.GIT_PAGER="cat",e}();c&&(f.PATH=`${f.PATH??""}:${c}`);let p=(0,a.spawn)(e,{shell:!0,cwd:t?u(t):l,env:{...f,...i},detached:!0}),h="",m="";p.stdout?.on("data",e=>h+=e),p.stderr?.on("data",e=>m+=e);let y=e=>{m+=`
|
|
8
|
-
[${e}]`;try{p.pid&&process.kill(-p.pid,"SIGTERM")}catch{p.kill("SIGTERM")}},w=setTimeout(()=>y(`Timed out after ${r}ms`),r),b=()=>y("Aborted");o?.aborted?b():o?.addEventListener("abort",b,{once:!0});let g=async e=>{clearTimeout(w),o?.removeEventListener("abort",b),d({...e,stdout:await s(e.stdout,"stdout",l,n),stderr:await s(e.stderr,"stderr",l,n)})};p.on("close",e=>g({stdout:h,stderr:m,exitCode:e??-1})),p.on("error",e=>g({stdout:h,stderr:m+String(e),exitCode:-1}))})}})({workingDirectory:c,spill:{dir:n.PATHS.output,...n.TOOL_OUTPUT},toolPath:u})}e.s(["closeJobShell",0,b,"ensureBrowser",0,w,"insideWorkspace",0,m,"jobShellEnv",0,y,"openWorkspace",0,O,"writeRefusal",0,function(e){if(p(c,e)){let t=(0,r.relative)(c,e),[o]=t.split(r.sep);return o&&f.has(o)?null:`Not written: ${t||"the workspace root"} is outside the workspace's folders. Finished work goes under ${n.PATHS.artifacts}/, code under ${n.PATHS.projects}/, everything else under ${n.PATHS.scratch}/.`}return p(l,e)?`Not written: ${e} is inside the app that is running you, not the user's files. Work in ${c}; outside it, write only where the user pointed you.`:null}],871096)},198306,(e,t,r)=>{"use strict";var n=Object.create,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,s=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,c=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of i(t))l.call(e,s)||s===r||o(e,s,{get:()=>t[s],enumerable:!(n=a(t,s))||n.enumerable});return e},u=(e,t,r)=>(r=null!=e?n(s(e)):{},c(!t&&e&&e.__esModule?r:o(r,"default",{value:e,enumerable:!0}),e)),d={},f={isValidAccessToken:()=>T,readAuthConfig:()=>b,writeAuthConfig:()=>g};for(var p in f)o(d,p,{get:f[p],enumerable:!0});t.exports=c(o({},"__esModule",{value:!0}),d);var h=u(e.r(522734)),m=u(e.r(814747)),y=e.r(913803);function w(){let e=(0,y.getVercelDataDir)();if(!e)throw Error(`Unable to find Vercel CLI data directory. Your platform: ${process.platform}. Supported: darwin, linux, win32.`);return m.join(e,"auth.json")}function b(){try{let e=w();if(!h.existsSync(e))return null;let t=h.readFileSync(e,"utf8");if(!t)return null;return JSON.parse(t)}catch(e){return null}}function g(e){let t=w(),r=m.dirname(t);h.existsSync(r)||h.mkdirSync(r,{mode:504,recursive:!0}),h.writeFileSync(t,JSON.stringify(e,null,2),{mode:384})}function T(e,t=0){if(!e.token)return!1;if("number"!=typeof e.expiresAt)return!0;let r=Math.floor(Date.now()/1e3);return e.expiresAt>=r+t/1e3}},736374,(e,t,r)=>{"use strict";var n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,s={},l={AccessTokenMissingError:()=>u,RefreshAccessTokenFailedError:()=>d};for(var c in l)n(s,c,{get:l[c],enumerable:!0});t.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of a(t))i.call(e,s)||void 0===s||n(e,s,{get:()=>t[s],enumerable:!(r=o(t,s))||r.enumerable});return e})(n({},"__esModule",{value:!0}),s);class u extends Error{constructor(){super("No authentication found. Please log in with the Vercel CLI (vercel login)."),this.name="AccessTokenMissingError"}}class d extends Error{constructor(e){super("Failed to refresh authentication token.",{cause:e}),this.name="RefreshAccessTokenFailedError"}}},903736,(e,t,r)=>{"use strict";var n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,s={},l={processTokenResponse:()=>m,refreshTokenRequest:()=>h};for(var c in l)n(s,c,{get:l[c],enumerable:!0});t.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of a(t))i.call(e,s)||void 0===s||n(e,s,{get:()=>t[s],enumerable:!(r=o(t,s))||r.enumerable});return e})(n({},"__esModule",{value:!0}),s);var u=e.r(446786);let d=`@vercel/oidc node-${process.version} ${(0,u.platform)()} (${(0,u.arch)()}) ${(0,u.hostname)()}`,f=null;async function p(){if(f)return f;let e=await fetch("https://vercel.com/.well-known/openid-configuration",{headers:{"user-agent":d}});if(!e.ok)throw Error("Failed to discover OAuth endpoints");let t=await e.json();if(!t||"string"!=typeof t.token_endpoint)throw Error("Invalid OAuth discovery response");let r=t.token_endpoint;return f=r,r}async function h(e){let t=await p();return await fetch(t,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded","user-agent":d},body:new URLSearchParams({client_id:"cl_HYyOPBNtFMfHhaUn9L4QPfTZz6TP47bp",grant_type:"refresh_token",...e})})}async function m(e){let t=await e.json();return e.ok?"object"!=typeof t||null===t?[Error("Invalid token response")]:"string"!=typeof t.access_token?[Error("Missing access_token in response")]:"Bearer"!==t.token_type?[Error("Invalid token_type in response")]:"number"!=typeof t.expires_in?[Error("Missing expires_in in response")]:[null,t]:[Error("object"==typeof t&&t&&"error"in t?String(t.error):"Token refresh failed")]}},424134,(e,t,r)=>{"use strict";var n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,s={},l={VercelOidcTokenError:()=>u};for(var c in l)n(s,c,{get:l[c],enumerable:!0});t.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of a(t))i.call(e,s)||void 0===s||n(e,s,{get:()=>t[s],enumerable:!(r=o(t,s))||r.enumerable});return e})(n({},"__esModule",{value:!0}),s);class u extends Error{constructor(e,t){super(e),this.name="VercelOidcTokenError",this.cause=t}toString(){return this.cause?`${this.name}: ${this.message}: ${this.cause}`:`${this.name}: ${this.message}`}}},713292,(e,t,r)=>{"use strict";var n=Object.create,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,s=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,c=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of i(t))l.call(e,s)||s===r||o(e,s,{get:()=>t[s],enumerable:!(n=a(t,s))||n.enumerable});return e},u=(e,t,r)=>(r=null!=e?n(s(e)):{},c(!t&&e&&e.__esModule?r:o(r,"default",{value:e,enumerable:!0}),e)),d={},f={findRootDir:()=>b,getUserDataDir:()=>g};for(var p in f)o(d,p,{get:f[p],enumerable:!0});t.exports=c(o({},"__esModule",{value:!0}),d);var h=u(e.r(814747)),m=u(e.r(522734)),y=u(e.r(446786)),w=e.r(424134);function b(){try{let e=process.cwd();for(;e!==h.default.dirname(e);){let t=h.default.join(e,".vercel");if(m.default.existsSync(t))return e;e=h.default.dirname(e)}}catch(e){throw new w.VercelOidcTokenError("Token refresh only supported in node server environments")}return null}function g(){if(process.env.XDG_DATA_HOME)return process.env.XDG_DATA_HOME;switch(y.default.platform()){case"darwin":return h.default.join(y.default.homedir(),"Library/Application Support");case"linux":return h.default.join(y.default.homedir(),".local/share");case"win32":if(process.env.LOCALAPPDATA)return process.env.LOCALAPPDATA;return null;default:return null}}},913803,(e,t,r)=>{"use strict";var n=Object.create,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,s=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,c=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of i(t))l.call(e,s)||s===r||o(e,s,{get:()=>t[s],enumerable:!(n=a(t,s))||n.enumerable});return e},u=(e,t,r)=>(r=null!=e?n(s(e)):{},c(!t&&e&&e.__esModule?r:o(r,"default",{value:e,enumerable:!0}),e)),d={},f={assertVercelOidcTokenResponse:()=>E,findProjectInfo:()=>_,getTokenPayload:()=>A,getVercelDataDir:()=>O,getVercelOidcToken:()=>v,getVercelToken:()=>k,isExpired:()=>P,loadToken:()=>j,saveToken:()=>S};for(var p in f)o(d,p,{get:f[p],enumerable:!0});t.exports=c(o({},"__esModule",{value:!0}),d);var h=u(e.r(814747)),m=u(e.r(522734)),y=e.r(424134),w=e.r(713292),b=e.r(198306),g=e.r(903736),T=e.r(736374);function O(){let e=(0,w.getUserDataDir)();return e?h.join(e,"com.vercel.cli"):null}async function k(e){let t=(0,b.readAuthConfig)();if(!t?.token)throw new T.AccessTokenMissingError;if((0,b.isValidAccessToken)(t,e?.expirationBufferMs))return t.token;if(!t.refreshToken)throw(0,b.writeAuthConfig)({}),new T.RefreshAccessTokenFailedError("No refresh token available");try{let e=await (0,g.refreshTokenRequest)({refresh_token:t.refreshToken}),[r,n]=await (0,g.processTokenResponse)(e);if(r||!n)throw(0,b.writeAuthConfig)({}),new T.RefreshAccessTokenFailedError(r);let o={token:n.access_token,expiresAt:Math.floor(Date.now()/1e3)+n.expires_in};return n.refresh_token&&(o.refreshToken=n.refresh_token),(0,b.writeAuthConfig)(o),o.token}catch(e){if((0,b.writeAuthConfig)({}),e instanceof T.AccessTokenMissingError||e instanceof T.RefreshAccessTokenFailedError)throw e;throw new T.RefreshAccessTokenFailedError(e)}}async function v(e,t,r){let n=`https://api.vercel.com/v1/projects/${t}/token?source=vercel-oidc-refresh${r?`&teamId=${r}`:""}`,o=await fetch(n,{method:"POST",headers:{Authorization:`Bearer ${e}`}});if(!o.ok)throw new y.VercelOidcTokenError(`Failed to refresh OIDC token: ${o.statusText}`);let a=await o.json();return E(a),a}function E(e){if(!e||"object"!=typeof e)throw TypeError("Vercel OIDC token is malformed. Expected an object. Please run `vc env pull` and try again");if(!("token"in e)||"string"!=typeof e.token)throw TypeError("Vercel OIDC token is malformed. Expected a string-valued token property. Please run `vc env pull` and try again")}function _(){let e=(0,w.findRootDir)();if(!e)throw new y.VercelOidcTokenError("Unable to find project root directory. Have you linked your project with `vc link?`");let t=h.join(e,".vercel","project.json");if(!m.existsSync(t))throw new y.VercelOidcTokenError("project.json not found, have you linked your project with `vc link?`");let r=JSON.parse(m.readFileSync(t,"utf8"));if("string"!=typeof r.projectId&&"string"!=typeof r.orgId)throw TypeError("Expected a string-valued projectId property. Try running `vc link` to re-link your project.");return{projectId:r.projectId,teamId:r.orgId}}function S(e,t){let r=(0,w.getUserDataDir)();if(!r)throw new y.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let n=h.join(r,"com.vercel.token",`${t}.json`),o=JSON.stringify(e);m.mkdirSync(h.dirname(n),{mode:504,recursive:!0}),m.writeFileSync(n,o),m.chmodSync(n,432)}function j(e){let t=(0,w.getUserDataDir)();if(!t)throw new y.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let r=h.join(t,"com.vercel.token",`${e}.json`);if(!m.existsSync(r))return null;let n=JSON.parse(m.readFileSync(r,"utf8"));return E(n),n}function A(e){let t=e.split(".");if(3!==t.length)throw new y.VercelOidcTokenError("Invalid token. Please run `vc env pull` and try again");let r=t[1].replace(/-/g,"+").replace(/_/g,"/"),n=r.padEnd(r.length+(4-r.length%4)%4,"=");return JSON.parse(Buffer.from(n,"base64").toString("utf8"))}function P(e,t=0){return 1e3*e.exp<Date.now()+t}}];
|
|
9
|
-
|
|
10
|
-
//# sourceMappingURL=_1uj4_io._.js.map
|