thursday-agent 0.16.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +1 -1
- package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/api/artifact/route.js +9 -9
- package/.next/server/app/api/artifact/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/memory/files/route.js +3 -3
- package/.next/server/app/api/bot/memory/files/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/memory/route.js +8 -8
- package/.next/server/app/api/bot/memory/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/route.js +8 -8
- package/.next/server/app/api/bot/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/thread/[id]/route.js +3 -3
- package/.next/server/app/api/bot/thread/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/thread/route.js +3 -3
- package/.next/server/app/api/bot/thread/route.js.nft.json +1 -1
- package/.next/server/app/api/config/route.js.nft.json +1 -1
- package/.next/server/app/api/events/route.js.nft.json +1 -1
- package/.next/server/app/api/favicon/[host]/route.js.nft.json +1 -1
- package/.next/server/app/api/file/[...path]/route.js +4 -4
- package/.next/server/app/api/file/[...path]/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/catalog/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/credits/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/subscription/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/[name]/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/oauth/callback/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/tools/route.js.nft.json +1 -1
- package/.next/server/app/api/memory/edit/route.js +11 -11
- package/.next/server/app/api/memory/edit/route.js.nft.json +1 -1
- package/.next/server/app/api/memory/route.js.nft.json +1 -1
- package/.next/server/app/api/reach/route.js +11 -11
- package/.next/server/app/api/reach/route.js.nft.json +1 -1
- package/.next/server/app/api/routine/route.js +7 -7
- package/.next/server/app/api/routine/route.js.nft.json +1 -1
- package/.next/server/app/api/signins/route.js +5 -5
- package/.next/server/app/api/signins/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/[source]/[name]/route.js +7 -7
- package/.next/server/app/api/skills/[source]/[name]/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/route.js +7 -7
- package/.next/server/app/api/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/call/route.js +5 -5
- package/.next/server/app/api/thursday/call/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/settings/route.js +5 -5
- package/.next/server/app/api/thursday/settings/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/text/route.js +13 -13
- package/.next/server/app/api/thursday/text/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/tool-call/route.js +12 -12
- package/.next/server/app/api/thursday/tool-call/route.js.nft.json +1 -1
- package/.next/server/app/api/workspace/files/route.js +8 -8
- package/.next/server/app/api/workspace/files/route.js.nft.json +1 -1
- package/.next/server/app/api/workspace/route.js +9 -9
- package/.next/server/app/api/workspace/route.js.nft.json +1 -1
- package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +3 -3
- package/.next/server/app/artifact/[...path]/page.js +4 -4
- package/.next/server/app/artifact/[...path]/page.js.nft.json +1 -1
- package/.next/server/app/artifact/[...path]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/favicon.ico/route.js.nft.json +1 -1
- package/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/.next/server/app/page/server-reference-manifest.json +60 -60
- package/.next/server/app/page.js +5 -5
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__00qyw01._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__01ypm_z._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__021dkui._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__18e65_-._.js → [root-of-the-server]__03xamry._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__05dp5tr._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__09gdscj._.js +7 -0
- package/.next/server/chunks/{[root-of-the-server]__10_7vqz._.js → [root-of-the-server]__0b36yfw._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__1gamvcz._.js → [root-of-the-server]__0jzwdg-._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0mrk2it._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0nmust6._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__0svzjwa._.js +7 -0
- package/.next/server/chunks/{[root-of-the-server]__16yw3mb._.js → [root-of-the-server]__12m24xl._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__1zrwxis._.js → [root-of-the-server]__12tahb4._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__1ep-pao._.js → [root-of-the-server]__1_h4hf9._.js} +4 -4
- package/.next/server/chunks/{[root-of-the-server]__1-tdj60._.js → [root-of-the-server]__1de1o6m._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__1voqqyc._.js → [root-of-the-server]__1ignh6-._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__1t02-1p._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1ygplx1._.js +1 -1
- package/.next/server/chunks/{[root-of-the-server]__11g20j-._.js → [root-of-the-server]__1yl5l25._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__1mbd2w_._.js → [root-of-the-server]__208vmyf._.js} +1 -1
- package/.next/server/chunks/{_1mfu9a3._.js → _02lipqs._.js} +1 -1
- package/.next/server/chunks/_05sa7xl._.js +1 -1
- package/.next/server/chunks/{_1rg5bfd._.js → _074f2ts._.js} +1 -1
- package/.next/server/chunks/_07nxi75._.js +3 -3
- package/.next/server/chunks/_08btiir._.js +7 -0
- package/.next/server/chunks/_0caua_s._.js +1 -1
- package/.next/server/chunks/{_0qoush_._.js → _0gt6cbj._.js} +1 -1
- package/.next/server/chunks/_0xygcxs._.js +3 -3
- package/.next/server/chunks/{_09c4we8._.js → _17i1lt2._.js} +1 -1
- package/.next/server/chunks/_19kea1l._.js +9 -9
- package/.next/server/chunks/_1gn2r2q._.js +3 -3
- package/.next/server/chunks/{_03niwml._.js → _1ntwp1s._.js} +1 -1
- package/.next/server/chunks/_1q6e56i._.js +3 -3
- package/.next/server/chunks/{_02fn1o3._.js → _1tkzgtm._.js} +1 -1
- package/.next/server/chunks/_1wl2g8_._.js +2 -2
- package/.next/server/chunks/{_1w6uf9k._.js → _1y3mnz4._.js} +1 -1
- package/.next/server/chunks/features_workspace_workspace_ts_13h82gv._.js +4 -4
- package/.next/server/chunks/features_workspace_workspace_ts_1iyjroj._.js +4 -4
- package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0cux6zt._.js → node_modules_consola_dist_chunks_prompt_mjs_04oxl25._.js} +1 -1
- package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0w32bqh._.js → node_modules_consola_dist_chunks_prompt_mjs_0g87zst._.js} +1 -1
- package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_1clmnaj._.js → node_modules_consola_dist_chunks_prompt_mjs_1341cnf._.js} +1 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__02jdtqa._.js → [root-of-the-server]__07660xu._.js} +2 -2
- package/.next/server/chunks/ssr/{[root-of-the-server]__0rnjkw2._.js → [root-of-the-server]__149x25m._.js} +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__17h1ggo._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__19s8qyj._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1jyeu61._.js +1 -1
- package/.next/server/chunks/ssr/_088vzgn._.js +3 -0
- package/.next/server/chunks/ssr/{_0wupyvd._.js → _0_vnw9v._.js} +2 -2
- package/.next/server/chunks/ssr/{_1u5vsy-._.js → _0aeknva._.js} +2 -2
- package/.next/server/chunks/ssr/_0fo4552._.js +3 -3
- package/.next/server/chunks/ssr/{_0-ou1b0._.js → _0n2scfq._.js} +2 -2
- package/.next/server/chunks/ssr/_0o_o9ji._.js +3 -0
- package/.next/server/chunks/ssr/_0qne8xs._.js +3 -0
- package/.next/server/chunks/ssr/_0r0g9ki._.js +1 -1
- package/.next/server/chunks/ssr/_0v9r8g2._.js +3 -0
- package/.next/server/chunks/ssr/_0x8ophf._.js +1 -1
- package/.next/server/chunks/ssr/{_0ncuqct._.js → _0ztbn5q._.js} +2 -2
- package/.next/server/chunks/ssr/{_0w8r7o7._.js → _1-41lck._.js} +2 -2
- package/.next/server/chunks/ssr/{_10fwcz_._.js → _14dfh7a._.js} +2 -2
- package/.next/server/chunks/ssr/{_1f6s34p._.js → _15m5ctz._.js} +2 -2
- package/.next/server/chunks/ssr/{_11pnnvd._.js → _18-e7zi._.js} +2 -2
- package/.next/server/chunks/ssr/{_0y28gl3._.js → _1c5iqz1._.js} +3 -3
- package/.next/server/chunks/ssr/{_1dqaksc._.js → _1hbjh6n._.js} +2 -2
- package/.next/server/chunks/ssr/_1neoj22._.js +1 -1
- package/.next/server/chunks/ssr/{_1k0efi3._.js → _1sttj8x._.js} +2 -2
- package/.next/server/chunks/ssr/_1uij_rj._.js +1 -1
- package/.next/server/chunks/ssr/_1umbr78._.js +1 -1
- package/.next/server/chunks/ssr/{_17ble8k._.js → _1vtgiou._.js} +3 -3
- package/.next/server/chunks/ssr/_1w9w1ok._.js +1 -1
- package/.next/server/chunks/ssr/{_1z586yw._.js → _1z6pirx._.js} +2 -2
- package/.next/server/chunks/ssr/features_0796o8r._.js +1 -1
- package/.next/server/chunks/ssr/features_bot_1knyan7._.js +3 -0
- package/.next/server/chunks/ssr/features_bot_1kr0_m-._.js +3 -0
- package/.next/server/chunks/ssr/{features_config_11dpa7r._.js → features_config_0n0zu89._.js} +3 -3
- package/.next/server/chunks/ssr/features_connectors_components_mcp-setting_tsx_0jmbgvp._.js +1 -1
- package/.next/server/chunks/ssr/features_memory_components_memory-setting_tsx_0oa43sw._.js +1 -1
- package/.next/server/chunks/ssr/features_routine_components_routine-setting_tsx_055fknz._.js +1 -1
- package/.next/server/chunks/ssr/features_workspace_workspace_ts_1wc7_u_._.js +4 -4
- package/.next/server/chunks/ssr/{node_modules_1r5o-bo._.js → node_modules_00h1t1j._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1o9n7_n._.js → node_modules_02ficyi._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0u24mg0._.js → node_modules_03q71_j._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_138kcrz._.js → node_modules_03uejh6._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0x_2io2._.js → node_modules_06grs09._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0n1js5k._.js → node_modules_07mo9rn._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0bas34k._.js → node_modules_09e8kz_._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1dzye0n._.js → node_modules_09ikzel._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_18yn_bs._.js → node_modules_0_d_7gq._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0ka8te1._.js → node_modules_0_p8w7p._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0mark4f._.js → node_modules_0f5bmkb._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0sdjzae._.js → node_modules_0kwie-o._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1ozyial._.js → node_modules_0r-9e4n._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_156m1qh._.js → node_modules_0u_8z64._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0-ew8f8._.js → node_modules_0zf3wuu._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1xua-g1._.js → node_modules_1-7fc7h._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0ld7p-1._.js → node_modules_142z3o5._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0-8r9yw._.js → node_modules_180l3i0._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1tj7_9z._.js → node_modules_197vh1s._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0y5uubt._.js → node_modules_1_n9o9s._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0etz1i0._.js → node_modules_1fw32pg._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0bbwe-u._.js → node_modules_1hefp6h._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_097cl9f._.js → node_modules_1irot3r._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0uibk9z._.js → node_modules_1om2itc._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1zkzksd._.js → node_modules_1ubln7w._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_02uwbwp._.js → node_modules_1wyhtw9._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_133hjui._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0aczkbn._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1b3vwd3._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0ah684s._.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 +61 -61
- package/.next/static/chunks/{1ub9obhgfm4jl.js → 024plctckvq-1.js} +1 -1
- package/.next/static/chunks/04toe_3nqfjqt.js +1 -0
- package/.next/static/chunks/{0609ejkwuy4sf.js → 0_b_bi2pobasx.js} +2 -2
- package/.next/static/chunks/{3ro66d9dc70bc.js → 0dfvwgnyrp8qt.js} +1 -1
- package/.next/static/chunks/{314szf8yer-3n.js → 0f47nnshdlucs.js} +1 -1
- package/.next/static/chunks/0sowxe4nnl5qu.js +1 -0
- package/.next/static/chunks/{07vcuxousbmy1.js → 0sv142q1yrva2.js} +1 -1
- package/.next/static/chunks/{0q4ws7qd21chx.js → 0tp868040z9nn.js} +2 -2
- package/.next/static/chunks/{0unonxbajyknw.js → 1-63yde5eaz7i.js} +1 -1
- package/.next/static/chunks/14qitm0kwsb6g.js +15 -0
- package/.next/static/chunks/{2xjr5b-yk_h3o.js → 1bgvxd3xny53w.js} +1 -1
- package/.next/static/chunks/{245_cp14iz637.js → 1cyrrz4q871aj.js} +1 -1
- package/.next/static/chunks/1st3b0c9vhxg3.js +1 -0
- package/.next/static/chunks/{39miwvg4k-b2d.js → 1wbqaidq7vc3_.js} +1 -1
- package/.next/static/chunks/{0cl_fgkphk1oz.js → 28sxb_k460e9h.js} +1 -1
- package/.next/static/chunks/{3j-l8un0d77v7.js → 2v6e_9p95o2e3.js} +1 -1
- package/.next/static/chunks/{23tx-2paw9qa6.js → 3-qp777vtfglj.js} +1 -1
- package/.next/static/chunks/{2jbjyazqfqyoh.js → 33ekkscpcq-z1.js} +1 -1
- package/.next/static/chunks/388l-zszwa_jf.js +1 -0
- package/.next/static/chunks/{3vwjs5kq11417.js → 38edd4rpcbvzp.js} +1 -1
- package/.next/static/chunks/3bwrvpjk95_x4.js +1 -0
- package/.next/static/chunks/{42m371fn687r5.js → 3itdg6t243u6f.js} +1 -1
- package/.next/static/chunks/{2oa4gpkzjtpni.js → 44vre0f7xqsh-.js} +1 -1
- package/README.md +12 -12
- package/guide/bots.md +48 -8
- package/guide/calls.md +13 -12
- package/guide/setup.md +4 -2
- package/package.json +1 -1
- package/public/sounds/NOTICE +3 -0
- package/public/sounds/opening-land.ogg +0 -0
- package/public/sounds/opening-rise.ogg +0 -0
- package/public/sounds/opening-step-1.ogg +0 -0
- package/public/sounds/opening-step-2.ogg +0 -0
- package/public/sounds/opening-step-3.ogg +0 -0
- package/skills/README.md +3 -0
- package/skills/artifact/SKILL.md +6 -5
- package/skills/artifact/references/book.md +22 -8
- package/skills/artifact/references/deck.md +4 -2
- package/skills/artifact/references/document.md +9 -0
- package/skills/artifact/references/sheet.md +108 -0
- package/skills/artifact/runtime/book/book.css +75 -0
- package/skills/artifact/runtime/book/book.html +6 -3
- package/skills/artifact/runtime/book/book.js +21 -0
- package/skills/artifact/runtime/canvas/canvas.css +1 -1
- package/skills/artifact/runtime/canvas/canvas.js +11 -1
- package/skills/artifact/runtime/deck/deck.css +164 -1
- package/skills/artifact/runtime/deck/deck.js +76 -1
- package/skills/artifact/runtime/document/docx.js +631 -0
- package/skills/artifact/runtime/document/markdown.mjs +58 -2
- package/skills/artifact/runtime/document/quick.css +66 -0
- package/skills/artifact/runtime/document/quick.html +1 -0
- package/skills/artifact/runtime/document/quick.js +154 -0
- package/skills/artifact/runtime/document/word.mjs +65 -0
- package/skills/artifact/runtime/sheet/format.mjs +385 -0
- package/skills/artifact/runtime/sheet/formula.mjs +755 -0
- package/skills/artifact/runtime/sheet/sheet.css +499 -0
- package/skills/artifact/runtime/sheet/sheet.html +102 -0
- package/skills/artifact/runtime/sheet/sheet.js +1361 -0
- package/skills/artifact/runtime/sheet/xlsx.mjs +320 -0
- package/skills/artifact/runtime/shell/head.html +1 -1
- package/skills/artifact/runtime/shell/shell.css +3 -0
- package/skills/artifact/runtime/shell/wear.mjs +47 -1
- package/skills/artifact/runtime/vendor/fflate.LICENSE.md +23 -0
- package/skills/artifact/runtime/vendor/fflate.mjs +2710 -0
- package/skills/artifact/scripts/book.mjs +141 -5
- package/skills/artifact/scripts/chart.mjs +229 -11
- package/skills/artifact/scripts/document.mjs +29 -2
- package/skills/artifact/scripts/spreadsheet.mjs +1068 -0
- package/skills/data-report/SKILL.md +8 -1
- package/.next/server/chunks/[root-of-the-server]__0aijj66._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0tvoct-._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__118qjk_._.js +0 -7
- package/.next/server/chunks/[root-of-the-server]__1b8tp42._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__1gzcbda._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1qcn1ti._.js +0 -7
- package/.next/server/chunks/_0xx3ryc._.js +0 -7
- package/.next/server/chunks/ssr/[root-of-the-server]__1y5_1cv._.js +0 -3
- package/.next/server/chunks/ssr/_0l1-xc6._.js +0 -3
- package/.next/server/chunks/ssr/_1g48r6t._.js +0 -3
- package/.next/server/chunks/ssr/features_bot_1k25jdg._.js +0 -3
- package/.next/server/chunks/ssr/features_bot_1s_-2vj._.js +0 -3
- package/.next/server/chunks/ssr/lib_utils_ts_0_f1xvm._.js +0 -3
- package/.next/static/chunks/00d54fcfm-lko.js +0 -1
- package/.next/static/chunks/0gjlsu6vrfzod.js +0 -1
- package/.next/static/chunks/17yqt1p_svv13.js +0 -1
- package/.next/static/chunks/203pbwecfs3tm.js +0 -1
- package/.next/static/chunks/3ghvoe_mlljzs.js +0 -15
- package/.next/static/chunks/3gn7dubb4-pwy.js +0 -1
- /package/.next/static/{RtLRT9EEaGn-OqwpMFdYg → VtbCMn-0G969p8QJsWdGv}/_buildManifest.js +0 -0
- /package/.next/static/{RtLRT9EEaGn-OqwpMFdYg → VtbCMn-0G969p8QJsWdGv}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{RtLRT9EEaGn-OqwpMFdYg → VtbCMn-0G969p8QJsWdGv}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
module.exports=[159479,e=>e.a(async(t,a)=>{try{var i=e.i(847841),n=e.i(983477),r=e.i(687388),o=e.i(386075),s=e.i(54282),l=e.i(316172),h=e.i(349047),c=e.i(625441),d=e.i(170801),u=e.i(926435),m=e.i(770639),w=e.i(418919),p=e.i(489956),f=e.i(740852),y=e.i(205863),g=e.i(41181),b=e.i(353885),S=e.i(123203),T=e.i(944971),O=e.i(636882),$=e.i(786025),k=e.i(704161),_=e.i(640911),v=e.i(53748),A=e.i(388439),M=e.i(41444),E=t([o,l,u,m,w,p,f,g,O]);async function N(t){let{listThreadOverview:a}=await e.A(866938),i=await a();if(!i.length)return"No thread has been started yet.";let n=i.map(e=>`"${e.label}" (${e.bot}, ${e.status})`).join(", ");return`There is no thread called "${t}". The latest are: ${n}. Call again with one of those labels.`}async function L(e,t){let a=[];for(let[e,n]of Object.entries(t)){let t=await (0,i.asSchema)(n.inputSchema).jsonSchema,r="string"==typeof n.description?n.description:"";a.push({name:e,tokens:(0,A.estimateTokens)(r)+(0,A.estimateTokens)(JSON.stringify(t))})}a.sort((e,t)=>t.tokens-e.tokens);let n=a.reduce((e,t)=>e+t.tokens,0);_.logger.debug(`${e} tools ${n} tokens over ${a.length} — ${a.map(e=>`${e.name} ${e.tokens}`).join(", ")}`)}async function x(e){let t=await j(e);return r.IS_DEV&&await L(e.target,t),t}async function j(t){if("memory-edit"===t.target)return(0,m.createMemoryTools)("user",null,{countReads:!1});let a=(0,m.createMemoryTools)("call","thursday"===t.target?t.callId??null:null),_=await (0,$.openWorkspace)();if("thursday"===t.target){var A;let c,u,m=t.readSkills?(0,g.createSkillTools)({sandbox:_,skills:await (0,O.loadSkills)(_)}):{},f=!!(t.written&&t.model&&(0,o.seesToolImages)(t.model));return{...a,...m,...(0,S.createWorkspaceTools)(_,{write:!1,timeoutMs:r.CALL_EXEC_TIMEOUT_MS}),...!1===t.webSearch?{}:await (0,p.createCallSearchTool)(_),...Object.fromEntries(Object.entries((A=t.callId,c=async t=>{let{resolveThread:a}=await e.A(866938);return(t.trim()?await a(t.trim()):null)??await N(t)},u=async(t,a,i)=>{let n=await e.A(994193);try{return await n.answerThread(t,a,"thursday",i)}catch(e){if((0,v.isPublicError)(e))return e.message;throw e}},{[b.TOOL_NAMES.thread_start]:(0,i.tool)({description:l.threadStartSpec.description,inputSchema:l.threadStartSpec.parameters,execute:async({bot:t,request:a,label:i})=>{let{findJobBot:n,listJobBots:r}=await e.A(814317),o=await n(t);if(!o||o.disabled){let e=(await r()).map(e=>e.name);return`There is no bot called "${t}". The bots are: ${e.join(", ")}. Nothing was started — call again with one of those.`}let{startThread:s}=await e.A(994193);return{threadId:await s({bot:o.name,request:a,label:i,callId:A,from:"thursday"}),note:`${o.name} has "${i}". Its updates reach the conversation on their own. Anything further about this work — a correction, the next step once it finishes — is \`${b.TOOL_NAMES.thread_tell}\` with "${i}"; a question it asks is answered with \`${b.TOOL_NAMES.thread_answer}\`.`}}}),[b.TOOL_NAMES.thread_tell]:(0,i.tool)({description:l.threadTellSpec.description,inputSchema:l.threadTellSpec.parameters,execute:async({thread:e,words:t})=>{let a=await c(e);if("string"==typeof a)return a;if(!t.trim())return"Say what to pass on.";let i=await u(a.id,t.trim());return"string"==typeof i?i:i?.answered?{label:a.label,answered:i.answered,note:`${i.answered.bot} was waiting on a question, and took this as its answer.`}:{label:a.label,bot:i?.to??a.bot,status:"running",note:"running"===a.status?"The bot reads it before its next step.":"The bot picks the thread back up from there."}}}),[b.TOOL_NAMES.thread_answer]:(0,i.tool)({description:l.threadAnswerSpec.description,inputSchema:l.threadAnswerSpec.parameters,execute:async({thread:t,bot:a,answer:i})=>{let n=await c(t);if("string"==typeof n)return n;if(!i.trim())return"Say what the answer is.";let{findThreadView:r}=await e.A(866938),o=(await r(n.id))?.room.questions??[],s=o.find(e=>e.bot.toLowerCase()===a.trim().toLowerCase());if(!s)return o.length?`${a} is not asking anything in "${n.label}". Waiting there: ${o.map(e=>e.bot).join(", ")}. Call again with that bot.`:`No question is waiting in "${n.label}". To say something else to it, use \`${b.TOOL_NAMES.thread_tell}\`.`;let l=await u(n.id,i.trim(),s.bot);return"string"==typeof l?l:{label:n.label,answered:l?.answered??{bot:s.bot,question:s.text},note:`${s.bot} has the answer to its question and goes on from it.`}}}),[b.TOOL_NAMES.thread_status]:(0,i.tool)({description:l.threadStatusSpec.description,inputSchema:l.threadStatusSpec.parameters,execute:async({thread:t})=>{let{listThreadOverview:a,findThreadView:i}=await e.A(866938),o={now:(0,s.clockNow)()},l=e=>(0,n.formatDistanceToNowStrict)((0,k.toDate)(e),{addSuffix:!0});if(!(!t.trim()||"all"===t.trim().toLowerCase())){let e=await c(t);if("string"==typeof e)return e;let a=(await i(e.id))?.room;return{...o,label:e.label,id:e.id,bot:e.bot,participants:a?.participants??[],questions:a?.questions??[],status:e.status,since:l(e.updatedAt),outcome:e.outcome,..."waiting"===e.status&&e.pending?.options.length?{options:e.pending.options}:{}}}let h=await a();return h.length?{...o,threads:h.map(e=>({id:e.id,label:e.label,bot:e.bot,status:e.status,participants:e.room.participants,questions:e.room.questions.map(e=>({...e,text:(0,M.clip)(e.text,r.PROMPT_LINE.threadStatus)})),since:l(e.updatedAt),...e.ask?{asking:e.ask.question,options:e.ask.options}:{},..."running"===e.status?{now:(0,T.threadActivity)(e.lines)}:{},...e.outcome&&"waiting"!==e.status?{outcome:(0,M.clip)(e.outcome,r.PROMPT_LINE.threadStatus)}:{}}))}:"No thread has been started yet."}}),[b.TOOL_NAMES.thread_cancel]:(0,i.tool)({description:l.threadCancelSpec.description,inputSchema:l.threadCancelSpec.parameters,execute:async({thread:t})=>{let a=await c(t);if("string"==typeof a)return a;let{cancelThread:i}=await e.A(994193);return await i(a.id),{label:a.label,status:"cancelled"}}}),[b.TOOL_NAMES.thread_show]:(0,i.tool)({description:l.threadShowSpec.description,inputSchema:l.threadShowSpec.parameters,execute:async({thread:t})=>{let a=await c(t);if("string"==typeof a)return a;let{appEvents:i}=await e.A(522275),{filesOnDisk:n}=await e.A(149325),{leadFirst:r,pathsIn:o,viewKindOf:s}=await e.A(628124),l=(await n(o(a.outcome??""),null)).filter(e=>"none"!==s(e));if(!l.length)return i.emit({type:"showThread",threadId:a.id}),{label:a.label,showing:"the thread"};let h=r(l);i.emit({type:"showFile",paths:h});let{markSeen:d}=await e.A(866938);return await d([a.id]),{label:a.label,showing:h[0]}}}),[b.TOOL_NAMES.thread_seen]:(0,i.tool)({description:l.threadSeenSpec.description,inputSchema:l.threadSeenSpec.parameters,execute:async({thread:t})=>{let a=await c(t);if("string"==typeof a)return a;let{markSeen:i}=await e.A(866938);return await i([a.id]),{label:a.label,seen:!0}}})})).filter(([e])=>!(t.phone&&e===b.TOOL_NAMES.thread_show))),...(0,w.createRoutineTools)(),...f?(0,d.createLookTool)():{},...t.written?{}:(0,h.callTools)()}}let E=await (0,O.loadSkills)(_,t.bot),L=!!(t.model&&(0,o.seesToolImages)(t.model.ref));return{[b.TOOL_NAMES.memory_recall]:a[b.TOOL_NAMES.memory_recall],...await (0,p.createSearchTool)(t.model,_),...(0,S.createWorkspaceTools)(_,{write:!0,env:{...(0,$.jobShellEnv)(t.session),...(0,$.botShellEnv)(t.bot)},guide:!0,bot:t.bot}),...await (0,u.createMcpTools)(t.bot,_),...(0,g.createSkillTools)({sandbox:_,skills:E,bot:t.bot}),...await (0,f.createSelfTools)(t.bot),...(0,c.createDeckTools)(_,t.bot,{...(0,$.jobShellEnv)(t.session),...(0,$.botShellEnv)(t.bot)},L),...L?(0,d.createLookTool)():{},...(0,y.createSignInTools)(_,t.bot,(0,$.jobShellEnv)(t.session)),...await (0,l.createThreadRecallTool)(t.bot,t.thread??null)}}[o,l,u,m,w,p,f,g,O]=E.then?(await E)():E,e.s(["loadTools",0,x]),a()}catch(e){a(e)}},!1),54282,e=>{"use strict";var t=e.i(343747),a=e.i(983477),i=e.i(687388),n=e.i(353885),r=e.i(280809);n.TOOL_NAMES.memory_recall,n.TOOL_NAMES.memory_create,n.TOOL_NAMES.memory_remember,n.TOOL_NAMES.memory_describe,n.TOOL_NAMES.memory_forget,n.TOOL_NAMES.bash,n.TOOL_NAMES.web_search,n.TOOL_NAMES.load_skill,n.TOOL_NAMES.look_at,n.TOOL_NAMES.make_deck,n.TOOL_NAMES.end_call,n.TOOL_NAMES.routine,n.TOOL_NAMES.thread_tell,n.TOOL_NAMES.thread_answer,n.TOOL_NAMES.thread_status,n.TOOL_NAMES.thread_show,n.TOOL_NAMES.thread_cancel,n.TOOL_NAMES.thread_seen;var o=e.i(704161),s=e.i(640911),l=e.i(388439),h=e.i(41444);let c=(e=new Date)=>`${(0,t.format)(e,"yyyy-MM-dd (EEE) HH:mm")} ${Intl.DateTimeFormat().resolvedOptions().timeZone}`,d=(e=new Date)=>`**Now**: ${c(e)}`,u=e=>`${(0,t.format)(e,"yyyy-MM-dd (EEE) HH:mm")} (${(0,a.formatDistanceToNowStrict)(e,{addSuffix:!0})})`,m={[n.STUDIO_TOOLS.generate_image]:"images",[n.STUDIO_TOOLS.generate_speech]:"speech",[n.STUDIO_TOOLS.transcribe]:"transcription",[n.STUDIO_TOOLS.generate_video]:"video"};e.s(["botWorkHead",0,function(e,i){let n=(0,a.formatDistanceToNowStrict)(e.updatedAt,{addSuffix:!0}),r="running"===e.status?`running, last moved ${n}`:e.asking?`waiting on the user's answer since ${n}`:"waiting"===e.status?`stopped ${n}, not finished`:`${"done"===e.status?"ended":"stopped by the user"} ${(0,t.format)(e.updatedAt,"yyyy-MM-dd")}`;return`"${e.label}" — ${e.owner===i?"yours":`${e.owner}'s`} — ${r}`},"clockNow",0,c,"logPromptSize",0,function(e,t){let a=(0,l.sectionTokens)(t),n=a.reduce((e,t)=>e+t.tokens,0);s.logger.debug(`${e} prompt ${n} tokens — ${a.map(e=>`${e.name} ${e.tokens}`).join(", ")}`);let r=a[0];n>i.PROMPT_BUDGET&&r&&s.logger.warn(`${e} prompt is ${n} tokens, over ${i.PROMPT_BUDGET}: ${r.name} carries ${r.tokens} of it. Every call and every job pays this.`)},"mcpToolLines",0,function(e){let t=new Map;for(let a of e){let e=t.get(a.server);e?e.push(a.name):t.set(a.server,[a.name])}return[...t].map(([e,t])=>`- **${e}**: ${t.join(", ")}`).join("\n")},"noteLines",0,function(e,t=!1){return e.length?e.map(e=>{var a;let i,n=t?` \xb7 ${a=e.lastSeenAt,(i=Math.floor((Date.now()-(0,o.toDate)(a).getTime())/864e5))>=365?`${Math.floor(i/365)}y`:i>=30?`${Math.floor(i/30)}mo`:`${Math.max(i,0)}d`}`:"";return`- ${e.path} — ${e.description?.trim()} (${e.factCount})${n}`}).join("\n"):"(nothing saved yet)"},"nowLine",0,d,"reachNames",0,function(e,t){let a=t.map(e=>e.server===i.STUDIO_SERVER?m[e.name]??e.name:e.server);return[...new Set([...e.map(e=>e.name),...a])].join(", ")},"recentCallLines",0,function(e,t){let a=[],r=0;e:for(let o=e.length-1;o>=0;o--){let s=e[o];for(let e=s.turns.length-1;e>=0;e--){let o=function(e,t){if("tool"!==e.role)return`${"user"===e.role?"user":"you"}: ${e.text}`;let a=function(e,t){if(e!==n.TOOL_NAMES.web_search)return null;try{var a;let e=JSON.parse(t);return{query:"string"==typeof e.query?e.query:null,sources:(a=e.sources,Array.isArray(a)?a.flatMap(e=>e&&"object"==typeof e&&"string"==typeof e.url?[e]:[]):[])}}catch{return null}}(e.tool,e.text);if(a){let t=[...new Set(a.sources.flatMap(e=>(0,h.hostOf)(e.url)??[]))];return`you → ${e.tool} "${(0,h.clip)(a.query??"",i.PROMPT_LINE.toolArgs)}"${t.length?` — ${t.join(", ")}`:""}`}let r=`you → ${e.tool??"tool"} ${(0,h.clip)(e.text,i.PROMPT_LINE.toolArgs)}`;if(e.tool!==n.TOOL_NAMES.thread_start)return r;let o=function(e,t){if(e!==n.TOOL_NAMES.thread_start)return null;try{let e=JSON.parse(t);return"string"==typeof e.label?e.label:null}catch{return null}}(e.tool,e.text),s=o?t.jobs?.find(e=>e.label===o):void 0;if(!s)return r;let l=s.outcome?`: ${(0,h.clip)(s.outcome,i.PROMPT_LINE.jobOutcome)}`:"";return`you → ${e.tool} "${s.label}" (${s.id}) — ${s.status}${l}`}(s.turns[e],s),c=(0,l.estimateTokens)(o)+3;if(r+c>t&&a.length)break e;r+=c,a.push({call:s,line:o})}}a.reverse();let o=[],s=null;for(let{call:e,line:t}of a)e!==s&&(s=e,o.push(`### ${u(e.startedAt)}`)),o.push(t);return o.join("\n")},"saidStamp",0,e=>(0,t.format)(e,"yyyy-MM-dd (EEE) HH:mm"),"skillLines",0,(e,t={})=>e.map(e=>{var a;let n,o;return`- **${e.name}**: ${t.short?(a=e.description,n=i.PROMPT_LINE.skill,(o=(0,r.firstSentence)(a)).length>n?`${o.slice(0,n).trim()}…`:o):e.description}`}).join("\n"),"styleLines",0,e=>e?.trim()?`## Who they want you to be
|
|
1
|
+
module.exports=[159479,e=>e.a(async(t,a)=>{try{var i=e.i(847841),n=e.i(983477),r=e.i(687388),o=e.i(386075),s=e.i(54282),l=e.i(316172),h=e.i(349047),c=e.i(625441),d=e.i(170801),u=e.i(926435),m=e.i(770639),w=e.i(418919),p=e.i(489956),f=e.i(740852),y=e.i(205863),g=e.i(41181),b=e.i(353885),S=e.i(123203),T=e.i(944971),O=e.i(636882),$=e.i(786025),k=e.i(704161),_=e.i(640911),v=e.i(53748),A=e.i(388439),M=e.i(41444),E=t([o,l,u,m,w,p,f,g,O]);async function N(t){let{listThreadOverview:a}=await e.A(866938),i=await a();if(!i.length)return"No thread has been started yet.";let n=i.map(e=>`"${e.label}" (${e.bot}, ${e.status})`).join(", ");return`There is no thread called "${t}". The latest are: ${n}. Call again with one of those labels.`}async function x(e,t){let a=[];for(let[e,n]of Object.entries(t)){let t=await (0,i.asSchema)(n.inputSchema).jsonSchema,r="string"==typeof n.description?n.description:"";a.push({name:e,tokens:(0,A.estimateTokens)(r)+(0,A.estimateTokens)(JSON.stringify(t))})}a.sort((e,t)=>t.tokens-e.tokens);let n=a.reduce((e,t)=>e+t.tokens,0);_.logger.debug(`${e} tools ${n} tokens over ${a.length} — ${a.map(e=>`${e.name} ${e.tokens}`).join(", ")}`)}async function L(e){let t=await j(e);return r.IS_DEV&&await x(e.target,t),t}async function j(t){if("memory-edit"===t.target)return(0,m.createMemoryTools)("user",null,{countReads:!1});let a=(0,m.createMemoryTools)("call","thursday"===t.target?t.callId??null:null),_=await (0,$.openWorkspace)();if("thursday"===t.target){var A;let c,u,m=t.readSkills?(0,g.createSkillTools)({sandbox:_,skills:await (0,O.loadSkills)(_)}):{},f=!!(t.written&&t.model&&(0,o.seesToolImages)(t.model));return{...a,...m,...(0,S.createWorkspaceTools)(_,{write:!1,timeoutMs:r.CALL_EXEC_TIMEOUT_MS}),...!1===t.webSearch?{}:await (0,p.createCallSearchTool)(_),...Object.fromEntries(Object.entries((A=t.callId,c=async t=>{let{resolveThread:a}=await e.A(866938);return(t.trim()?await a(t.trim()):null)??await N(t)},u=async(t,a,i)=>{let n=await e.A(994193);try{return await n.answerThread(t,a,"thursday",i)}catch(e){if((0,v.isPublicError)(e))return e.message;throw e}},{[b.TOOL_NAMES.thread_start]:(0,i.tool)({description:l.threadStartSpec.description,inputSchema:l.threadStartSpec.parameters,execute:async({bot:t,request:a,label:i})=>{let{findJobBot:n,listJobBots:r}=await e.A(814317),o=await n(t);if(!o||o.disabled){let e=(await r()).map(e=>e.name);return`There is no bot called "${t}". The bots are: ${e.join(", ")}. Nothing was started — call again with one of those.`}let{startThread:s}=await e.A(994193);return{threadId:await s({bot:o.name,request:a,label:i,callId:A,from:"thursday"}),note:`${o.name} has "${i}". Its updates reach the conversation on their own. Anything further about this work — a correction, the next step once it finishes — is \`${b.TOOL_NAMES.thread_tell}\` with "${i}"; a question it asks is answered with \`${b.TOOL_NAMES.thread_answer}\`.`}}}),[b.TOOL_NAMES.thread_tell]:(0,i.tool)({description:l.threadTellSpec.description,inputSchema:l.threadTellSpec.parameters,execute:async({thread:e,words:t})=>{let a=await c(e);if("string"==typeof a)return a;if(!t.trim())return"Say what to pass on.";let i=await u(a.id,t.trim());return"string"==typeof i?i:i?.answered?{label:a.label,answered:i.answered,note:`${i.answered.bot} was waiting on a question, and took this as its answer.`}:{label:a.label,bot:i?.to??a.bot,status:"running",note:"running"===a.status?"The bot reads it before its next step.":"The bot picks the thread back up from there."}}}),[b.TOOL_NAMES.thread_answer]:(0,i.tool)({description:l.threadAnswerSpec.description,inputSchema:l.threadAnswerSpec.parameters,execute:async({thread:t,bot:a,answer:i})=>{let n=await c(t);if("string"==typeof n)return n;if(!i.trim())return"Say what the answer is.";let{findThreadView:r}=await e.A(866938),o=(await r(n.id))?.room.questions??[],s=o.find(e=>e.bot.toLowerCase()===a.trim().toLowerCase());if(!s)return o.length?`${a} is not asking anything in "${n.label}". Waiting there: ${o.map(e=>e.bot).join(", ")}. Call again with that bot.`:`No question is waiting in "${n.label}". To say something else to it, use \`${b.TOOL_NAMES.thread_tell}\`.`;let l=await u(n.id,i.trim(),s.bot);return"string"==typeof l?l:{label:n.label,answered:l?.answered??{bot:s.bot,question:s.text},note:`${s.bot} has the answer to its question and goes on from it.`}}}),[b.TOOL_NAMES.thread_status]:(0,i.tool)({description:l.threadStatusSpec.description,inputSchema:l.threadStatusSpec.parameters,execute:async({thread:t})=>{let{listThreadOverview:a,findThreadView:i}=await e.A(866938),o={now:(0,s.clockNow)()},l=e=>(0,n.formatDistanceToNowStrict)((0,k.toDate)(e),{addSuffix:!0});if(!(!t.trim()||"all"===t.trim().toLowerCase())){let e=await c(t);if("string"==typeof e)return e;let a=(await i(e.id))?.room;return{...o,label:e.label,id:e.id,bot:e.bot,participants:a?.participants??[],questions:a?.questions??[],status:e.status,since:l(e.updatedAt),outcome:e.outcome,..."waiting"===e.status&&e.pending?.options.length?{options:e.pending.options}:{}}}let h=await a();return h.length?{...o,threads:h.map(e=>({id:e.id,label:e.label,bot:e.bot,status:e.status,participants:e.room.participants,questions:e.room.questions.map(e=>({...e,text:(0,M.clip)(e.text,r.PROMPT_LINE.threadStatus)})),since:l(e.updatedAt),...e.ask?{asking:e.ask.question,options:e.ask.options}:{},..."running"===e.status?{now:(0,T.threadActivity)(e.lines)}:{},...e.outcome&&"waiting"!==e.status?{outcome:(0,M.clip)(e.outcome,r.PROMPT_LINE.threadStatus)}:{}}))}:"No thread has been started yet."}}),[b.TOOL_NAMES.thread_cancel]:(0,i.tool)({description:l.threadCancelSpec.description,inputSchema:l.threadCancelSpec.parameters,execute:async({thread:t})=>{let a=await c(t);if("string"==typeof a)return a;let{cancelThread:i}=await e.A(994193);return await i(a.id),{label:a.label,status:"cancelled"}}}),[b.TOOL_NAMES.thread_show]:(0,i.tool)({description:l.threadShowSpec.description,inputSchema:l.threadShowSpec.parameters,execute:async({thread:t})=>{let a=await c(t);if("string"==typeof a)return a;let{appEvents:i}=await e.A(522275),{filesOnDisk:n}=await e.A(149325),{leadFirst:r,pathsIn:o,viewKindOf:s}=await e.A(628124),l=(await n(o(a.outcome??""),null)).filter(e=>"none"!==s(e));if(!l.length)return i.emit({type:"showThread",threadId:a.id}),{label:a.label,showing:"the thread"};let h=r(l);i.emit({type:"showFile",paths:h});let{markSeen:d}=await e.A(866938);return await d([a.id]),{label:a.label,showing:h[0]}}}),[b.TOOL_NAMES.thread_seen]:(0,i.tool)({description:l.threadSeenSpec.description,inputSchema:l.threadSeenSpec.parameters,execute:async({thread:t})=>{let a=await c(t);if("string"==typeof a)return a;let{markSeen:i}=await e.A(866938);return await i([a.id]),{label:a.label,seen:!0}}})})).filter(([e])=>!(t.phone&&e===b.TOOL_NAMES.thread_show))),...(0,w.createRoutineTools)(),...f?(0,d.createLookTool)():{},...t.written?{}:(0,h.callTools)()}}let E=await (0,O.loadSkills)(_,t.bot),x={...(0,$.jobShellEnv)(t.session),...(0,$.botShellEnv)(t.bot,(await (await e.A(814317)).findJobBot(t.bot))?.icon)},L=!!(t.model&&(0,o.seesToolImages)(t.model.ref));return{[b.TOOL_NAMES.memory_recall]:a[b.TOOL_NAMES.memory_recall],...await (0,p.createSearchTool)(t.model,_),...(0,S.createWorkspaceTools)(_,{write:!0,env:x,guide:!0,bot:t.bot}),...await (0,u.createMcpTools)(t.bot,_),...(0,g.createSkillTools)({sandbox:_,skills:E,bot:t.bot}),...await (0,f.createSelfTools)(t.bot),...(0,c.createDeckTools)(_,t.bot,x,L),...L?(0,d.createLookTool)():{},...(0,y.createSignInTools)(_,t.bot,(0,$.jobShellEnv)(t.session)),...await (0,l.createThreadRecallTool)(t.bot,t.thread??null)}}[o,l,u,m,w,p,f,g,O]=E.then?(await E)():E,e.s(["loadTools",0,L]),a()}catch(e){a(e)}},!1),54282,e=>{"use strict";var t=e.i(343747),a=e.i(983477),i=e.i(687388),n=e.i(353885),r=e.i(280809);n.TOOL_NAMES.memory_recall,n.TOOL_NAMES.memory_create,n.TOOL_NAMES.memory_remember,n.TOOL_NAMES.memory_describe,n.TOOL_NAMES.memory_forget,n.TOOL_NAMES.bash,n.TOOL_NAMES.web_search,n.TOOL_NAMES.load_skill,n.TOOL_NAMES.look_at,n.TOOL_NAMES.make_deck,n.TOOL_NAMES.end_call,n.TOOL_NAMES.routine,n.TOOL_NAMES.thread_tell,n.TOOL_NAMES.thread_answer,n.TOOL_NAMES.thread_status,n.TOOL_NAMES.thread_show,n.TOOL_NAMES.thread_cancel,n.TOOL_NAMES.thread_seen;var o=e.i(704161),s=e.i(640911),l=e.i(388439),h=e.i(41444);let c=(e=new Date)=>`${(0,t.format)(e,"yyyy-MM-dd (EEE) HH:mm")} ${Intl.DateTimeFormat().resolvedOptions().timeZone}`,d=(e=new Date)=>`**Now**: ${c(e)}`,u=e=>`${(0,t.format)(e,"yyyy-MM-dd (EEE) HH:mm")} (${(0,a.formatDistanceToNowStrict)(e,{addSuffix:!0})})`,m={[n.STUDIO_TOOLS.generate_image]:"images",[n.STUDIO_TOOLS.generate_speech]:"speech",[n.STUDIO_TOOLS.transcribe]:"transcription",[n.STUDIO_TOOLS.generate_video]:"video"};e.s(["botWorkHead",0,function(e,i){let n=(0,a.formatDistanceToNowStrict)(e.updatedAt,{addSuffix:!0}),r="running"===e.status?`running, last moved ${n}`:e.asking?`waiting on the user's answer since ${n}`:"waiting"===e.status?`stopped ${n}, not finished`:`${"done"===e.status?"ended":"stopped by the user"} ${(0,t.format)(e.updatedAt,"yyyy-MM-dd")}`;return`"${e.label}" — ${e.owner===i?"yours":`${e.owner}'s`} — ${r}`},"clockNow",0,c,"logPromptSize",0,function(e,t){let a=(0,l.sectionTokens)(t),n=a.reduce((e,t)=>e+t.tokens,0);s.logger.debug(`${e} prompt ${n} tokens — ${a.map(e=>`${e.name} ${e.tokens}`).join(", ")}`);let r=a[0];n>i.PROMPT_BUDGET&&r&&s.logger.warn(`${e} prompt is ${n} tokens, over ${i.PROMPT_BUDGET}: ${r.name} carries ${r.tokens} of it. Every call and every job pays this.`)},"mcpToolLines",0,function(e){let t=new Map;for(let a of e){let e=t.get(a.server);e?e.push(a.name):t.set(a.server,[a.name])}return[...t].map(([e,t])=>`- **${e}**: ${t.join(", ")}`).join("\n")},"noteLines",0,function(e,t=!1){return e.length?e.map(e=>{var a;let i,n=t?` \xb7 ${a=e.lastSeenAt,(i=Math.floor((Date.now()-(0,o.toDate)(a).getTime())/864e5))>=365?`${Math.floor(i/365)}y`:i>=30?`${Math.floor(i/30)}mo`:`${Math.max(i,0)}d`}`:"";return`- ${e.path} — ${e.description?.trim()} (${e.factCount})${n}`}).join("\n"):"(nothing saved yet)"},"nowLine",0,d,"reachNames",0,function(e,t){let a=t.map(e=>e.server===i.STUDIO_SERVER?m[e.name]??e.name:e.server);return[...new Set([...e.map(e=>e.name),...a])].join(", ")},"recentCallLines",0,function(e,t){let a=[],r=0;e:for(let o=e.length-1;o>=0;o--){let s=e[o];for(let e=s.turns.length-1;e>=0;e--){let o=function(e,t){if("tool"!==e.role)return`${"user"===e.role?"user":"you"}: ${e.text}`;let a=function(e,t){if(e!==n.TOOL_NAMES.web_search)return null;try{var a;let e=JSON.parse(t);return{query:"string"==typeof e.query?e.query:null,sources:(a=e.sources,Array.isArray(a)?a.flatMap(e=>e&&"object"==typeof e&&"string"==typeof e.url?[e]:[]):[])}}catch{return null}}(e.tool,e.text);if(a){let t=[...new Set(a.sources.flatMap(e=>(0,h.hostOf)(e.url)??[]))];return`you → ${e.tool} "${(0,h.clip)(a.query??"",i.PROMPT_LINE.toolArgs)}"${t.length?` — ${t.join(", ")}`:""}`}let r=`you → ${e.tool??"tool"} ${(0,h.clip)(e.text,i.PROMPT_LINE.toolArgs)}`;if(e.tool!==n.TOOL_NAMES.thread_start)return r;let o=function(e,t){if(e!==n.TOOL_NAMES.thread_start)return null;try{let e=JSON.parse(t);return"string"==typeof e.label?e.label:null}catch{return null}}(e.tool,e.text),s=o?t.jobs?.find(e=>e.label===o):void 0;if(!s)return r;let l=s.outcome?`: ${(0,h.clip)(s.outcome,i.PROMPT_LINE.jobOutcome)}`:"";return`you → ${e.tool} "${s.label}" (${s.id}) — ${s.status}${l}`}(s.turns[e],s),c=(0,l.estimateTokens)(o)+3;if(r+c>t&&a.length)break e;r+=c,a.push({call:s,line:o})}}a.reverse();let o=[],s=null;for(let{call:e,line:t}of a)e!==s&&(s=e,o.push(`### ${u(e.startedAt)}`)),o.push(t);return o.join("\n")},"saidStamp",0,e=>(0,t.format)(e,"yyyy-MM-dd (EEE) HH:mm"),"skillLines",0,(e,t={})=>e.map(e=>{var a;let n,o;return`- **${e.name}**: ${t.short?(a=e.description,n=i.PROMPT_LINE.skill,(o=(0,r.firstSentence)(a)).length>n?`${o.slice(0,n).trim()}…`:o):e.description}`}).join("\n"),"styleLines",0,e=>e?.trim()?`## Who they want you to be
|
|
2
2
|
|
|
3
3
|
Their own words, on top of the character above: how you talk to them, how much to say, what to leave out. Where they differ from anything above, theirs wins.
|
|
4
4
|
|
|
@@ -8,8 +8,8 @@ What they tell you is kept, so you know them better over time.`,"tidying",0,e=>(
|
|
|
8
8
|
${u.length>r.BOT_WORK.readChars?`${u.slice(0,r.BOT_WORK.readChars)}
|
|
9
9
|
[Cut here; the files it names hold the rest.]`:u}`].filter(Boolean).join("\n\n")}})}}e.s(["createThreadRecallTool",0,m,"sendMessageSpec",0,O,"threadAnswerSpec",0,y,"threadCancelSpec",0,b,"threadSeenSpec",0,T,"threadShowSpec",0,S,"threadStartSpec",0,p,"threadStatusSpec",0,g,"threadTellSpec",0,f]),a()}catch(e){a(e)}},!1),349047,e=>{"use strict";var t=e.i(847841),a=e.i(907855),i=e.i(353885);let n=Object.keys({A:[".##.","#..#","####","#..#","#..#"],B:["###.","#..#","###.","#..#","###."],C:[".###","#...","#...","#...",".###"],D:["###.","#..#","#..#","#..#","###."],E:["####","#...","###.","#...","####"],F:["####","#...","###.","#...","#..."],G:[".###","#...","#.##","#..#",".###"],H:["#..#","#..#","####","#..#","#..#"],I:["###",".#.",".#.",".#.","###"],J:["..##","...#","...#","#..#",".##."],K:["#..#","#.#.","##..","#.#.","#..#"],L:["#...","#...","#...","#...","####"],M:["#...#","##.##","#.#.#","#...#","#...#"],N:["#..#","##.#","#.##","#..#","#..#"],O:[".##.","#..#","#..#","#..#",".##."],P:["###.","#..#","###.","#...","#..."],Q:[".##.","#..#","#..#","#.#.",".#.#"],R:["###.","#..#","###.","#.#.","#..#"],S:[".###","#...",".##.","...#","###."],T:["###",".#.",".#.",".#.",".#."],U:["#..#","#..#","#..#","#..#",".##."],V:["#...#","#...#",".#.#.",".#.#.","..#.."],W:["#...#","#...#","#.#.#","##.##","#...#"],X:["#..#","#..#",".##.","#..#","#..#"],Y:["#.#","#.#",".#.",".#.",".#."],Z:["####","...#",".##.","#...","####"],0:[".##.","#.##","#..#","##.#",".##."],1:[".#.","##.",".#.",".#.","###"],2:["###.","...#",".##.","#...","####"],3:["###.","...#",".##.","...#","###."],4:["#..#","#..#","####","...#","...#"],5:["####","#...","###.","...#","###."],6:[".##.","#...","###.","#..#",".##."],7:["####","...#","..#.",".#..",".#.."],8:[".##.","#..#",".##.","#..#",".##."],9:[".##.","#..#",".###","...#",".##."],"!":["#","#","#",".","#"],"?":["###.","...#",".##.","....",".#.."],".":[".",".",".",".","#"],",":["..","..","..",".#","#."],"'":["#","#",".",".","."],"-":["...","...","###","...","..."],"+":["...",".#.","###",".#.","..."],":":[".","#",".","#","."],"(":[".#","#.","#.","#.",".#"],")":["#.",".#",".#",".#","#."],"<":["..#",".#.","#..",".#.","..#"],">":["#..",".#.","..#",".#.","#.."],"^":[".#.","#.#","...","...","..."],"~":["....",".#.#","#.#.","....","...."],"♥":[".#.#.","#####","#####",".###.","..#.."]," ":["..","..","..","..",".."]}).filter(e=>!/^[A-Z0-9 ]$/.test(e)),r={description:`End the call.
|
|
10
10
|
|
|
11
|
-
The line stays open until this runs, and drops once the goodbye being said is over.`,parameters:a.object({})},o=(0,t.tool)({description:r.description,inputSchema:r.parameters}),s={description:"Show a short word on your face for a few seconds.",parameters:a.object({text:a.string().describe(`Up to 8 characters: A-Z, 0-9, space and ${n.join(" ")}.`)})},l=(0,t.tool)({description:s.description,inputSchema:s.parameters});e.s(["callTools",0,function(){return{[i.TOOL_NAMES.end_call]:o,[i.TOOL_NAMES.emote]:l}}],349047)},625441,e=>{"use strict";var t=e.i(874533),a=e.i(912714),i=e.i(660526),n=e.i(750227),r=e.i(812057),o=e.i(847841),s=e.i(105249),l=e.i(687388),h=e.i(353885),c=e.i(629668),d=e.i(786025);let u=(0,n.join)(l.APP_DIR,l.PATHS.skills.default,"artifact",l.PATHS.skills.runtime,"deck","deck.mjs"),m=e=>s.default.string().trim().max(e),w=m(100).nullish().describe("A source or a date along the foot of the slide."),p=m(1500).nullish().describe("What the presenter says over it, as speech. Never shown."),f=s.default.object({layout:s.default.literal("cover"),title:m(110).describe("The deck's subject, as its title."),eyebrow:m(40).nullish().describe("A word or two above the title."),subtitle:m(180).nullish().describe("One line under the title."),footer:w,notes:p}),y=s.default.object({layout:s.default.literal("statement"),title:m(120).describe("The one claim, as a sentence."),subtitle:m(140).nullish().describe("One line under it."),notes:p}),g=s.default.object({layout:s.default.literal("cards"),title:m(90).describe("The point the cards make together."),cards:s.default.array(s.default.object({title:m(60).describe("Its point."),text:m(160).nullish().describe("One line under it.")})).min(2).max(4).describe("Two to four, side by side and numbered."),footer:w,notes:p}),b=s.default.object({layout:s.default.literal("number"),value:m(10).describe("The figure as it reads: 1.4M, 62%, £2,900. Only one you were given."),label:m(80).nullish().describe("What it counts, above it."),subtitle:m(160).nullish().describe("What it means or is compared with, under it."),footer:w,notes:p}),S=s.default.object({layout:s.default.literal("table"),title:m(90).describe("What the comparison shows."),columns:s.default.array(m(40)).min(2).max(5).describe("The header row. The first column names the rows; its header may be blank."),rows:s.default.array(s.default.array(m(60))).min(1).max(6).describe("Up to six, a cell for each column."),stress:s.default.number().int().min(0).max(4).nullish().describe("Which column, counted from 0, to set in the accent: the one the slide argues for."),footer:w,notes:p}),T=s.default.object({layout:s.default.literal("quote"),quote:m(280).describe("Someone's own words, exactly as you were given them. Never made up."),who:m(60).describe("Who said it."),role:m(80).nullish().describe("Their role, place or date."),notes:p}),O=s.default.object({layout:s.default.literal("image"),title:m(90).describe("The heading beside the picture."),subtitle:m(280).nullish().describe("A line or two under it."),image:m(500).describe("Workspace path of a png, jpg, webp, gif or svg. It is copied beside the deck."),alt:m(160).describe("What it shows, for someone who cannot see it."),fit:s.default.enum(["fill","whole"]).nullish().describe("fill crops a photo to its box; whole shows a chart or screenshot uncropped. Null for fill."),footer:w,notes:p}),$=s.default.object({layout:s.default.literal("close"),title:m(120).describe("The sentence to repeat to someone who was not there."),steps:s.default.array(s.default.object({label:m(24).describe("A word or two: Next, Owner, By."),text:m(120).describe("What it is.")})).max(3).nullish().describe("Up to three next steps."),notes:p}),k=s.default.discriminatedUnion("layout",[f,y,g,b,S,T,O,$]),_=s.default.object({deck:m(300).describe("A name for a new deck, or the name or workspace path of one to change. A deck another bot made is reached by its path."),title:m(90).describe("The deck's title, shown in its head."),theme:s.default.enum(["forest","sea","clay","ink"]).nullish().describe("forest (deep green on paper, serif headings), sea (blue, sans), clay (terracotta on warm paper, serif) or ink (gold on near-black, sans). Null keeps the deck's own; a new one starts in forest."),revision:s.default.string().nullish().describe("What the last call on this deck answered with. Null for a new deck."),slides:s.default.array(k).min(1).max(l.DECK.slides).describe("Every slide in order: the whole deck, each time. Someone who reads only the titles follows the argument; one idea a slide.")}),v=/^[\p{L}\p{N}][\p{L}\p{N}_-]{0,79}$/u,A=/^(slide-\d+|slides)\.png$/i;class M extends Error{}function E(e){let t=e.replace(/[^\p{L}\p{N}_-]+/gu,"-").replace(/^[-_]+|-+$/g,"").slice(0,80);if(!v.test(t))throw new M(`"${e}" is not a deck name: use letters, numbers, - and _.`);return t}async function N(e,t){let i=(0,d.botArtifacts)(t);if(!e.includes("/")&&!e.endsWith(".html")){let t=E(e);return`${i}/${t}/${t}.html`}let r=await (0,d.insideWorkspace)(e);if(!r)throw new M(`${e} is outside the workspace. Give a deck's path in it.`);let o=await (0,a.realpath)(d.WORKSPACE).catch(()=>d.WORKSPACE),s=await (0,a.stat)(r).catch(()=>null),l=s?.isDirectory()?(0,n.join)(r,`${(0,n.basename)(r)}.html`):r;if((await (0,a.stat)(l).catch(()=>null))?.isFile())return(0,n.relative)(o,l);let h=await (0,d.insideWorkspace)(i);if(!h||!r.startsWith(`${h}${n.sep}`))throw new M(`There is no deck at ${e}. A new deck is made in your own folder: give it a name.`);let c=E((0,n.basename)(r,".html"));return(0,n.relative)(o,(0,n.join)((0,n.dirname)(r),c,`${c}.html`))}async function L(e,t,i){let r=new Map,o=[];for(let[s,l]of e.entries()){if("table"===l.layout){let e=l.rows.findIndex(e=>e.length>l.columns.length);if(-1!==e)throw new M(`Slide ${s+1}: row ${e+1} has ${l.rows[e].length} cells, and there are ${l.columns.length} columns.`);o.push({...l,rows:l.rows.map(e=>l.columns.map((t,a)=>e[a]??""))});continue}if("image"!==l.layout){o.push(l);continue}let e=t.resolve(i),h=(0,n.join)(e,l.image),d=!l.image.includes("/")&&await (0,a.stat)(h).catch(()=>null)?h:t.resolve(l.image);if("image"!==(0,c.viewKindOf)(d))throw new M(`Slide ${s+1}: ${l.image} is not a picture. Give a png, jpg, webp, gif or svg.`);if(!(await (0,a.stat)(d).catch(()=>null))?.isFile())throw new M(`Slide ${s+1}: there is no file at ${l.image}. Give its path from the workspace root, as \`ls\` shows it.`);let u=r.get(d);u||(u=(0,n.dirname)(d)===e?(0,n.basename)(d):function(e,t){let a=(0,n.extname)(e),i=(0,n.basename)(e,a),r=A.test(e)?`picture-${i}`:i,o=`${r}${a}`;for(let e=2;t.has(o);e++)o=`${r}-${e}${a}`;return o}((0,n.basename)(d),new Set(r.values())),r.set(d,u),(0,n.dirname)(d)!==e&&(await (0,a.mkdir)(e,{recursive:!0}),await (0,a.copyFile)(d,(0,n.join)(e,u)))),o.push({...l,image:u})}return o}let x=(0,r.promisify)(t.execFile);async function j(e,t,r,o){let s=await (0,a.mkdtemp)((0,n.join)((0,i.tmpdir)(),"thursday-deck-"));try{let i=(0,n.join)(s,"deck.json");await (0,a.writeFile)(i,JSON.stringify(t));let l=[u,"put",(0,n.join)(d.WORKSPACE,e),i];r&&l.push("--revision",r);let h=await x(process.execPath,l,{env:{NODE_ENV:"production",PATH:process.env.PATH??"",THURSDAY_BOT:o},maxBuffer:0x1000000}).catch(e=>{if(3===e.code&&e.stdout)return{stdout:e.stdout};throw new M(e.stderr?.trim().split("\n").at(-1)||"The deck could not be written.")});return JSON.parse(h.stdout.trim().split("\n").at(-1)??"")}finally{await (0,a.rm)(s,{recursive:!0,force:!0})}}async function I(e,t,a,i){let r=await e.exec('node "$DECK_SCRIPT" shots "$DECK_FILE"',{env:{...a,DECK_SCRIPT:u,DECK_FILE:(0,n.join)(d.WORKSPACE,t)},timeoutMs:l.DECK.shotsMs,signal:i});if(0!==r.exitCode)return{failed:r.stderr.trim().split("\n").at(-1)||"no pictures were made"};let o=JSON.parse(r.stdout.trim().split("\n").at(-1)??"{}");return{pictures:o.pictures.map(e=>(0,n.relative)(d.WORKSPACE,e)),sheet:o.sheet?(0,n.relative)(d.WORKSPACE,o.sheet):null,cut:o.cut}}e.s(["createDeckTools",0,(e,t,i,r)=>({[h.TOOL_NAMES.make_deck]:(0,o.tool)({description:"Make a slide deck, or change one: each slide a layout whose fields you fill, drawn and fitted by the app into one HTML file that opens offline, presents full screen and prints a slide a page, with a picture of every slide beside it.",inputSchema:_,execute:async(a,{abortSignal:r})=>{try{let o,s=await N(a.deck,t),l=await L(a.slides,e,(0,n.dirname)(s)),c=await j(s,{title:a.title,theme:a.theme??null,slides:l},a.revision?.trim()??"",t);if("changed"in c){if(!c.deck)return`${s} is not a deck made of slides, so it cannot be changed here. Give the deck another name.`;let e=a.revision?.trim()?`${s} has changed since that revision — edited in the app, or by another job`:`there is already a deck at ${s}`;return{deck:s,revision:c.revision,note:`Nothing was written: ${e}. This is the deck as it stands. To change it, make your change on these slides and call \`${h.TOOL_NAMES.make_deck}\` again with revision ${c.revision} and the whole deck; for a deck of its own, give a new name.`,current:c.deck}}let d=`${l.length} slide${1===l.length?"":"s"}, revision ${c.revision}`,u=await I(e,s,i,r);if("failed"in u)return`${s}
|
|
12
|
-
${d}. The pictures of its slides could not be made (${u.failed}), so nothing checked that every slide fits. Hand back the deck's path.`;let m=`call \`${h.TOOL_NAMES.make_deck}\` again with revision ${c.revision} and the whole deck`,w=u.sheet?`${(0,n.basename)(u.sheet)} holds every slide, numbered, and each is on its own beside it from slide-01.png`:"Its pictures are beside it, slide-01.png on";return[s,u.sheet??u.pictures[0]??"",u.cut.length?`${d}. ${o=u.cut,1===o.length?`Slide ${o[0]} does`:`Slides ${o.slice(0,-1).join(", ")} and ${o.at(-1)} do`} not fit even with the type at its smallest: say less there, then ${m}. ${w}.`:`${d}. Every slide fits. ${w}. Hand back the deck's path; to change it, ${m}.`].filter(Boolean).join("\n")}catch(e){if(e instanceof
|
|
11
|
+
The line stays open until this runs, and drops once the goodbye being said is over.`,parameters:a.object({})},o=(0,t.tool)({description:r.description,inputSchema:r.parameters}),s={description:"Show a short word on your face for a few seconds.",parameters:a.object({text:a.string().describe(`Up to 8 characters: A-Z, 0-9, space and ${n.join(" ")}.`)})},l=(0,t.tool)({description:s.description,inputSchema:s.parameters});e.s(["callTools",0,function(){return{[i.TOOL_NAMES.end_call]:o,[i.TOOL_NAMES.emote]:l}}],349047)},625441,e=>{"use strict";var t=e.i(874533),a=e.i(912714),i=e.i(660526),n=e.i(750227),r=e.i(812057),o=e.i(847841),s=e.i(105249),l=e.i(687388),h=e.i(353885),c=e.i(629668),d=e.i(786025);let u=(0,n.join)(l.APP_DIR,l.PATHS.skills.default,"artifact",l.PATHS.skills.runtime,"deck","deck.mjs"),m=e=>s.default.string().trim().max(e),w=m(100).nullish().describe("A source or a date along the foot of the slide."),p=m(1500).nullish().describe("What the presenter says over it, as speech. Never shown."),f=s.default.object({layout:s.default.literal("cover"),title:m(110).describe("The deck's subject, as its title."),eyebrow:m(40).nullish().describe("A word or two above the title."),subtitle:m(180).nullish().describe("One line under the title."),footer:w,notes:p}),y=s.default.object({layout:s.default.literal("statement"),title:m(120).describe("The one claim, as a sentence."),subtitle:m(140).nullish().describe("One line under it."),notes:p}),g=s.default.object({layout:s.default.literal("cards"),title:m(90).describe("The point the cards make together."),cards:s.default.array(s.default.object({title:m(60).describe("Its point."),text:m(160).nullish().describe("One line under it.")})).min(2).max(4).describe("Two to four, side by side and numbered."),footer:w,notes:p}),b=s.default.object({layout:s.default.literal("number"),value:m(10).describe("The figure as it reads: 1.4M, 62%, £2,900. Only one you were given."),label:m(80).nullish().describe("What it counts, above it."),subtitle:m(160).nullish().describe("What it means or is compared with, under it."),footer:w,notes:p}),S=s.default.object({layout:s.default.literal("table"),title:m(90).describe("What the comparison shows."),columns:s.default.array(m(40)).min(2).max(5).describe("The header row. The first column names the rows; its header may be blank."),rows:s.default.array(s.default.array(m(60))).min(1).max(6).describe("Up to six, a cell for each column."),stress:s.default.number().int().min(0).max(4).nullish().describe("Which column, counted from 0, to set in the accent: the one the slide argues for."),footer:w,notes:p}),T=s.default.object({layout:s.default.literal("quote"),quote:m(280).describe("Someone's own words, exactly as you were given them. Never made up."),who:m(60).describe("Who said it."),role:m(80).nullish().describe("Their role, place or date."),notes:p}),O=s.default.object({layout:s.default.literal("image"),title:m(90).describe("The heading beside the picture."),subtitle:m(280).nullish().describe("A line or two under it."),image:m(500).describe("Workspace path of a png, jpg, webp, gif or svg. It is copied beside the deck."),alt:m(160).describe("What it shows, for someone who cannot see it."),fit:s.default.enum(["fill","whole"]).nullish().describe("fill crops a photo to its box; whole shows a chart or screenshot uncropped. Null for fill."),footer:w,notes:p}),$=s.default.object({layout:s.default.literal("close"),title:m(120).describe("The sentence to repeat to someone who was not there."),steps:s.default.array(s.default.object({label:m(24).describe("A word or two: Next, Owner, By."),text:m(120).describe("What it is.")})).max(3).nullish().describe("Up to three next steps."),notes:p}),k=s.default.object({layout:s.default.literal("timeline"),title:m(90).describe("What the dates show together."),steps:s.default.array(s.default.object({when:m(24).describe("When, as you were given it: a date, a week, a phase."),title:m(60).describe("What happens then."),text:m(120).nullish().describe("One line under it.")})).min(2).max(5).describe("Two to five, in order, along one line."),footer:w,notes:p}),_=s.default.object({layout:s.default.literal("compare"),title:m(90).describe("What changes between the two, as a sentence."),sides:s.default.array(s.default.object({label:m(30).describe("Which side it is: Now, After, Option A."),points:s.default.array(m(90)).min(1).max(4)})).length(2).describe("The two, left then right; the right is set in the accent: the side the slide argues for."),footer:w,notes:p}),v=s.default.object({layout:s.default.literal("stats"),title:m(90).describe("What the figures say together."),stats:s.default.array(s.default.object({value:m(12).describe("The figure as it reads: 1.4M, 62%, 6 hours. Only one you were given."),label:m(80).describe("What it counts, under it.")})).min(2).max(4).describe("Two to four figures side by side."),footer:w,notes:p}),A=s.default.discriminatedUnion("layout",[f,y,g,b,S,T,O,k,_,v,$]),M=s.default.object({deck:m(300).describe("A name for a new deck, or the name or workspace path of one to change. A deck another bot made is reached by its path."),title:m(90).describe("The deck's title, shown in its head."),theme:s.default.enum(["forest","sea","clay","ink"]).nullish().describe("forest (deep green on paper, serif headings), sea (blue, sans), clay (terracotta on warm paper, serif) or ink (gold on near-black, sans). Null keeps the deck's own; a new one starts in forest."),revision:s.default.string().nullish().describe("What the last call on this deck answered with. Null for a new deck."),slides:s.default.array(A).min(1).max(l.DECK.slides).describe("Every slide in order: the whole deck, each time. Someone who reads only the titles follows the argument; one idea a slide.")}),E=/^[\p{L}\p{N}][\p{L}\p{N}_-]{0,79}$/u,N=/^(slide-\d+|slides)\.png$/i;class x extends Error{}function L(e){let t=e.replace(/[^\p{L}\p{N}_-]+/gu,"-").replace(/^[-_]+|-+$/g,"").slice(0,80);if(!E.test(t))throw new x(`"${e}" is not a deck name: use letters, numbers, - and _.`);return t}async function j(e,t){let i=(0,d.botArtifacts)(t);if(!e.includes("/")&&!e.endsWith(".html")){let t=L(e);return`${i}/${t}/${t}.html`}let r=await (0,d.insideWorkspace)(e);if(!r)throw new x(`${e} is outside the workspace. Give a deck's path in it.`);let o=await (0,a.realpath)(d.WORKSPACE).catch(()=>d.WORKSPACE),s=await (0,a.stat)(r).catch(()=>null),l=s?.isDirectory()?(0,n.join)(r,`${(0,n.basename)(r)}.html`):r;if((await (0,a.stat)(l).catch(()=>null))?.isFile())return(0,n.relative)(o,l);let h=await (0,d.insideWorkspace)(i);if(!h||!r.startsWith(`${h}${n.sep}`))throw new x(`There is no deck at ${e}. A new deck is made in your own folder: give it a name.`);let c=L((0,n.basename)(r,".html"));return(0,n.relative)(o,(0,n.join)((0,n.dirname)(r),c,`${c}.html`))}async function R(e,t,i){let r=new Map,o=[];for(let[s,l]of e.entries()){if("table"===l.layout){let e=l.rows.findIndex(e=>e.length>l.columns.length);if(-1!==e)throw new x(`Slide ${s+1}: row ${e+1} has ${l.rows[e].length} cells, and there are ${l.columns.length} columns.`);o.push({...l,rows:l.rows.map(e=>l.columns.map((t,a)=>e[a]??""))});continue}if("image"!==l.layout){o.push(l);continue}let e=t.resolve(i),h=(0,n.join)(e,l.image),d=!l.image.includes("/")&&await (0,a.stat)(h).catch(()=>null)?h:t.resolve(l.image);if("image"!==(0,c.viewKindOf)(d))throw new x(`Slide ${s+1}: ${l.image} is not a picture. Give a png, jpg, webp, gif or svg.`);if(!(await (0,a.stat)(d).catch(()=>null))?.isFile())throw new x(`Slide ${s+1}: there is no file at ${l.image}. Give its path from the workspace root, as \`ls\` shows it.`);let u=r.get(d);u||(u=(0,n.dirname)(d)===e?(0,n.basename)(d):function(e,t){let a=(0,n.extname)(e),i=(0,n.basename)(e,a),r=N.test(e)?`picture-${i}`:i,o=`${r}${a}`;for(let e=2;t.has(o);e++)o=`${r}-${e}${a}`;return o}((0,n.basename)(d),new Set(r.values())),r.set(d,u),(0,n.dirname)(d)!==e&&(await (0,a.mkdir)(e,{recursive:!0}),await (0,a.copyFile)(d,(0,n.join)(e,u)))),o.push({...l,image:u})}return o}let I=(0,r.promisify)(t.execFile);async function C(e,t,r,o,s){let l=await (0,a.mkdtemp)((0,n.join)((0,i.tmpdir)(),"thursday-deck-"));try{let i=(0,n.join)(l,"deck.json");await (0,a.writeFile)(i,JSON.stringify(t));let h=[u,"put",(0,n.join)(d.WORKSPACE,e),i];r&&h.push("--revision",r);let c=await I(process.execPath,h,{env:{NODE_ENV:"production",PATH:process.env.PATH??"",THURSDAY_BOT:o,...s?{THURSDAY_BOT_MARK:s}:{}},maxBuffer:0x1000000}).catch(e=>{if(3===e.code&&e.stdout)return{stdout:e.stdout};throw new x(e.stderr?.trim().split("\n").at(-1)||"The deck could not be written.")});return JSON.parse(c.stdout.trim().split("\n").at(-1)??"")}finally{await (0,a.rm)(l,{recursive:!0,force:!0})}}async function W(e,t,a,i){let r=await e.exec('node "$DECK_SCRIPT" shots "$DECK_FILE"',{env:{...a,DECK_SCRIPT:u,DECK_FILE:(0,n.join)(d.WORKSPACE,t)},timeoutMs:l.DECK.shotsMs,signal:i});if(0!==r.exitCode)return{failed:r.stderr.trim().split("\n").at(-1)||"no pictures were made"};let o=JSON.parse(r.stdout.trim().split("\n").at(-1)??"{}");return{pictures:o.pictures.map(e=>(0,n.relative)(d.WORKSPACE,e)),sheet:o.sheet?(0,n.relative)(d.WORKSPACE,o.sheet):null,cut:o.cut}}e.s(["createDeckTools",0,(e,t,i,r)=>({[h.TOOL_NAMES.make_deck]:(0,o.tool)({description:"Make a slide deck, or change one: each slide a layout whose fields you fill, drawn and fitted by the app into one HTML file that opens offline, presents full screen and prints a slide a page, with a picture of every slide beside it.",inputSchema:M,execute:async(a,{abortSignal:r})=>{try{let o,s=await j(a.deck,t),l=await R(a.slides,e,(0,n.dirname)(s)),c=await C(s,{title:a.title,theme:a.theme??null,slides:l},a.revision?.trim()??"",t,i.THURSDAY_BOT_MARK);if("changed"in c){if(!c.deck)return`${s} is not a deck made of slides, so it cannot be changed here. Give the deck another name.`;let e=a.revision?.trim()?`${s} has changed since that revision — edited in the app, or by another job`:`there is already a deck at ${s}`;return{deck:s,revision:c.revision,note:`Nothing was written: ${e}. This is the deck as it stands. To change it, make your change on these slides and call \`${h.TOOL_NAMES.make_deck}\` again with revision ${c.revision} and the whole deck; for a deck of its own, give a new name.`,current:c.deck}}let d=`${l.length} slide${1===l.length?"":"s"}, revision ${c.revision}`,u=await W(e,s,i,r);if("failed"in u)return`${s}
|
|
12
|
+
${d}. The pictures of its slides could not be made (${u.failed}), so nothing checked that every slide fits. Hand back the deck's path.`;let m=`call \`${h.TOOL_NAMES.make_deck}\` again with revision ${c.revision} and the whole deck`,w=u.sheet?`${(0,n.basename)(u.sheet)} holds every slide, numbered, and each is on its own beside it from slide-01.png`:"Its pictures are beside it, slide-01.png on";return[s,u.sheet??u.pictures[0]??"",u.cut.length?`${d}. ${o=u.cut,1===o.length?`Slide ${o[0]} does`:`Slides ${o.slice(0,-1).join(", ")} and ${o.at(-1)} do`} not fit even with the type at its smallest: say less there, then ${m}. ${w}.`:`${d}. Every slide fits. ${w}. Hand back the deck's path; to change it, ${m}.`].filter(Boolean).join("\n")}catch(e){if(e instanceof x)return e.message;throw e}},toModelOutput:async({output:e})=>{if("string"!=typeof e)return{type:"json",value:e};let t=e.split("\n")[1]??"";if(!r||!t.endsWith(".png"))return{type:"text",value:e};let i=await (0,d.insideWorkspace)(t),n=i?await (0,a.readFile)(i).catch(()=>null):null;return!n||n.byteLength>l.LOOK.maxBytes?{type:"text",value:e}:{type:"content",value:[{type:"text",text:`${e}
|
|
13
13
|
|
|
14
14
|
${t}, as an image:`},{type:"file",mediaType:"image/png",data:{type:"data",data:n.toString("base64")}}]}}})})])},170801,e=>{"use strict";var t=e.i(912714),a=e.i(847841),i=e.i(105249),n=e.i(687388),r=e.i(353885),o=e.i(629668),s=e.i(786025);e.s(["createLookTool",0,function(){return{[r.TOOL_NAMES.look_at]:(0,a.tool)({description:"See an image file yourself: a screenshot you took, a picture the user handed over, a chart you made. For what a picture shows — text files are read in the shell.",inputSchema:i.default.object({path:i.default.string().describe("Workspace-relative path to a png, jpg, webp or gif.")}),execute:async({path:e})=>{let a=await (0,s.insideWorkspace)(e.trim()),i=a?await (0,t.stat)(a).catch(()=>null):null;return a&&i?.isFile()?"image"!==(0,o.viewKindOf)(e)?`${e} is not an image. Read it in the shell instead.`:i.size>n.LOOK.maxBytes?`${e} is ${Math.ceil(i.size/1024/1024)} MB, over the ${n.LOOK.maxBytes/1024/1024} MB one look takes. Make a smaller copy in the shell first (on a Mac: sips -Z 1600 in.png --out out.png), then look at that.`:{path:e.trim(),mediaType:(0,o.mimeOf)(e)}:`There is no file at ${e}. Give the path from the workspace root, as \`ls\` shows it.`},toModelOutput:async({output:e})=>{if("string"==typeof e)return{type:"text",value:e};let a=await (0,s.insideWorkspace)(e.path),i=a?await (0,t.readFile)(a).catch(()=>null):null;return i?{type:"content",value:[{type:"text",text:`${e.path}, as an image:`},{type:"file",mediaType:e.mediaType,data:{type:"data",data:i.toString("base64")}}]}:{type:"text",value:`${e.path} is no longer there.`}}})}}])},926435,e=>e.a(async(t,a)=>{try{var i=e.i(847841),n=e.i(907855),r=e.i(687388),o=e.i(353885),s=e.i(148831),l=e.i(786025),h=e.i(660948),c=t([s,h]);[s,h]=c.then?(await c)():c;let m={[o.TOOL_NAMES.tool_search]:{description:`Return the description and exact inputSchema of tools on a connected server, so they can be called with \`${o.TOOL_NAMES.tool_call}\`.`,parameters:n.object({server:n.string().describe("A server name, exactly as the Connected tools section writes it."),tools:n.string().array().describe(`Tool names listed under that server. Only the ones you may actually call — schemas are large, and at most ${r.TOOL_SEARCH_SCHEMAS} come back.`)})},[o.TOOL_NAMES.tool_call]:{description:`Run one tool whose definition came back from \`${o.TOOL_NAMES.tool_search}\`.`,parameters:n.object({server:n.string().describe("The server the tool lives on."),tool:n.string().describe("Its name, as search returned it."),args:n.looseObject({}).nullish().describe("Arguments matching the inputSchema search returned — do not guess. Null when it takes none."),description:n.string().nullish().describe("One short line for the user: what this call is for. Shown on their screen while it runs.")})}},w=(e,t)=>`${e.replace(/[^a-zA-Z0-9]+/g,"_")}__${t.replace(/[^a-zA-Z0-9_-]+/g,"_")}`.slice(0,64);async function d(e,t){let[a,n]=await Promise.all([(0,h.listConnectedToolNames)(),(0,s.findPinnedTools)(e)]),r={},o=(0,l.botArtifacts)(e);for(let e of n){let a=w(e.server,e.name);r[a]||(r[a]=(0,i.tool)({description:e.description??`${e.name} on the ${e.server} server.`,inputSchema:(0,i.jsonSchema)(e.inputSchema??{type:"object",properties:{}}),execute:(a,{abortSignal:i})=>(0,h.callConnectedTool)(t,e.server,e.name,a??void 0,{artifacts:o,abortSignal:i})}))}return a.length>n.length&&Object.assign(r,p(t,o)),r}async function u(e){let t=(await (0,h.listConnectedToolNames)(e)).map(e=>e.name);if(t.length)return`Tools on "${e}": ${t.join(", ")}.`;let a=await (0,h.listConnectedServerNames)();return a.length?`There is no server called "${e}". Connected: ${a.join(", ")}.`:"Nothing is connected."}let p=(e,t)=>({[o.TOOL_NAMES.tool_search]:(0,i.tool)({description:m[o.TOOL_NAMES.tool_search].description,inputSchema:m[o.TOOL_NAMES.tool_search].parameters,execute:async({server:e,tools:t})=>{let a=[...new Set(t.map(e=>e.trim()).filter(Boolean))],i=a.slice(0,r.TOOL_SEARCH_SCHEMAS),n=await (0,h.findConnectedSchemas)(e.trim(),i);if(!n.length)return{tools:[],note:await u(e)};let o=i.filter(e=>!n.some(t=>t.name===e)),s=a.slice(r.TOOL_SEARCH_SCHEMAS),l=[o.length?`Not on "${e}": ${o.join(", ")}.`:"",s.length?`Only ${r.TOOL_SEARCH_SCHEMAS} at a time — ask again for: ${s.join(", ")}.`:""].filter(Boolean);return{tools:n,...l.length?{note:l.join(" ")}:{}}}}),[o.TOOL_NAMES.tool_call]:(0,i.tool)({description:m[o.TOOL_NAMES.tool_call].description,inputSchema:m[o.TOOL_NAMES.tool_call].parameters,execute:async({server:a,tool:i,args:n},{abortSignal:r})=>(await (0,h.listConnectedToolNames)(a.trim())).some(e=>e.name===i.trim())?(0,h.callConnectedTool)(e,a.trim(),i.trim(),n??void 0,{artifacts:t,abortSignal:r}):{status:"error",text:await u(a)}})});e.s(["createMcpTools",0,d]),a()}catch(e){a(e)}},!1),770639,e=>e.a(async(t,a)=>{try{var i=e.i(847841),n=e.i(907855),r=e.i(687388),o=e.i(54282),s=e.i(353885),l=e.i(619898),h=e.i(453569),c=t([l]);[l]=c.then?(await c)():c;let d=h.MEMORY_PATHS.map(e=>e.path.endsWith("/")?`${e.path}<name>`:e.path).join(", "),u="Saved. The listing in your instructions is from when this session opened and will not show this until the next one — the note below is current.",m=e=>`Nothing on the listing called ${e}.`,w=e=>({...e,facts:e.facts.map(({saidAt:e,...t})=>e?{...t,said:(0,o.saidStamp)(e)}:t),factCount:e.facts.length}),p=e=>e>r.MEMORY_LIMITS.factsPerNote?` This note now holds ${e} facts, past the ${r.MEMORY_LIMITS.factsPerNote} one note holds well. Ask the user which of it is no longer true and delete what they name.`:"",f=e=>e.length>r.MEMORY_LIMITS.descriptionChars?{note:`That line runs to ${e.length} characters; a note's line is one line, under ${r.MEMORY_LIMITS.descriptionChars}. Say what the note is about — the facts inside say the rest.`}:null,y=n.string().describe("Exactly as the listing writes it — the path."),g=n.string().describe('One statement that stands on its own later — a date as a date, never "next week".');e.s(["createMemoryTools",0,(e,t=null,{countReads:a=!0}={})=>({[s.TOOL_NAMES.memory_recall]:(0,i.tool)({description:"Open one note from the listing, whole.",inputSchema:n.object({path:y}),execute:async({path:e})=>{let{notes:t}=await (0,l.readNotes)([e],{touch:a}),i=t[0];if(!i)return{note:m(e.trim())};let n=p(i.facts.length);return n?{...w(i),note:n.trim()}:w(i)}}),[s.TOOL_NAMES.memory_create]:(0,i.tool)({description:"Start a note for a subject that is not on the listing: its path, the line it is listed by, and its first facts.",inputSchema:n.object({path:n.string().describe(`A new path following the listing's convention — one of ${d} — for the person, project or topic the facts are about. A fact goes under the one note it is about; other notes name it rather than repeat it.`),description:n.string().describe("One line saying what this note is about, with the names the user calls it by, so the listing alone tells whether to open it. What it is about — never a list of what is inside."),facts:n.object({text:g}).array().min(1).describe("What to keep under it. Send everything that came up at once: one call is one pause in the conversation, three calls are three.")}),execute:async({path:a,description:i,facts:n})=>{let r=a.trim(),o=i.trim();if(!(0,h.isMemoryPath)(r))return{note:`Nothing was saved: "${r}" is not a path this listing can carry. Write it again under one of ${d}.`};if((0,h.isAlwaysListed)(r))return{note:`${r} is always on the listing: \`${s.TOOL_NAMES.memory_remember}\` adds to it.`};let c=f(o);if(c)return c;let m=await (0,l.createNoteWithFacts)(r,o,n,e,t);if(!m)return{note:`${r} is already on the listing: \`${s.TOOL_NAMES.memory_remember}\` adds to it, \`${s.TOOL_NAMES.memory_describe}\` changes its line.`};let y=w(m);return{...y,note:`${u}${p(y.factCount)}`}}}),[s.TOOL_NAMES.memory_remember]:(0,i.tool)({description:"Write facts under a note that is on the listing.",inputSchema:n.object({path:y,facts:n.object({text:g,replaces:n.number().int().nullish().describe(`The id of the fact this replaces — from this note as handed back here or by \`${s.TOOL_NAMES.memory_recall}\`. Null if this is new. A fact that stopped being true is replaced rather than deleted, and so is a note saying the same thing twice: replacing keeps what changed on the record, deleting does not.`)}).array().min(1).describe("What to write under this note. Send everything that came up at once: one call is one pause in the conversation, three calls are three.")}),execute:async({path:a,facts:i})=>{let n=a.trim(),r=await (0,l.writeFacts)(n,i,e,t);if(!r)return{note:`${m(n)} A subject that is not on the listing gets a note of its own: \`${s.TOOL_NAMES.memory_create}\`, with its line.`};let o=w(r);return{...o,note:`${u}${p(o.factCount)}`}}}),[s.TOOL_NAMES.memory_describe]:(0,i.tool)({description:"Change the line a note is listed by, when it no longer says what the note is about.",inputSchema:n.object({path:y,description:n.string().describe("The new line, whole: what this note is about, with the names the user calls it by. Never a list of what is inside.")}),execute:async({path:e,description:t})=>{let a=e.trim(),i=t.trim();if((0,h.isAlwaysListed)(a))return{note:`${h.MEMORY_ALWAYS_LISTED.join(" and ")} keep their own line; it is not yours to change.`};let n=f(i);return n||(await (0,l.describeNote)(a,i)?{path:a,description:i,note:"Renamed. The listing in your instructions is from when this session opened and still shows the old line until the next one."}:{note:m(a)})}}),[s.TOOL_NAMES.memory_forget]:(0,i.tool)({description:"Delete facts for good.",inputSchema:n.object({factIds:n.number().int().array().min(1).describe("The ids that came with the facts when their notes were opened — every one to delete, in one call.")}),execute:async({factIds:e})=>{let t=[],a=[],i=new Set;for(let n of new Set(e)){let e=await (0,l.forgetFactById)(n);if(!e){t.push(n);continue}e.noteGone?(i.delete(e.path),a.push(e.path)):i.add(e.path)}if(!a.length&&!i.size)return{note:`No fact with id ${t.join(", ")}. Nothing was deleted.`};let n=["Deleted for good. The listing in your instructions is from when this session opened and still shows it that way until the next one.",1===a.length?`That was the last fact under ${a[0]}, so the note went with it.`:a.length?`That was the last of ${a.join(", ")}, so those notes went with them.`:"",t.length?`No fact with id ${t.join(", ")}, so those were skipped.`:""].filter(Boolean).join(" ");if(!i.size)return{note:n};let{notes:r}=await (0,l.readNotes)([...i],{touch:!1});return{notes:r.map(w),note:n}}})})]),a()}catch(e){a(e)}},!1),418919,e=>e.a(async(t,a)=>{try{var i=e.i(847841),n=e.i(907855),r=e.i(687388),o=e.i(353885),s=e.i(265143),l=e.i(963219),h=e.i(473139),c=e.i(704161),d=e.i(53748),u=e.i(41444),m=t([s,l]);[s,l]=m.then?(await m)():m;let f={description:`Routines: work that starts by itself, each one a bot, the work and a time — once at a moment, a time of day on chosen days, or every few hours. List them, make one, change one, or delete one. Every start opens a thread like one started by hand; its result reaches the conversation the same way. At most ${r.ROUTINE.max} exist.`,parameters:n.object({action:n.enum(["list","create","change","delete"]),routine:n.string().nullish().describe("With change or delete: the routine, by its name or ID."),bot:n.string().nullish().describe("With create: a name from the bot list. With change: a new bot."),label:n.string().nullish().describe("With create: two or three words naming it, in the user's language. It names every thread the routine opens, on screen and out loud."),request:n.string().nullish().describe("With create: the whole of the work, handed to the bot as written every time it starts. Nobody is there then to fill in what is missing, so everything it needs goes here, in the user's own language and words. Their request, never your reading of it."),at:n.string().nullish().describe('Starts once, at this moment, "YYYY-MM-DD HH:MM" in the user\'s own time, then switches itself off. Count "in an hour" or "tomorrow at eight" from **Now**. Give one of `at`, `time` or `everyHours`.'),time:n.string().nullish().describe('Starts at this time of day, 24-hour "HH:MM" in the user\'s own time, on `days`. Give one of `at`, `time` or `everyHours`.'),days:n.array(n.number().int().min(1).max(7)).nullish().describe("With `time`: the days it starts, 1 Monday to 7 Sunday. Omit for every day."),everyHours:n.number().int().nullish().describe(`Starts again this many hours after it last started, ${r.ROUTINE.minHours} at least. Give one of \`at\`, \`time\` or \`everyHours\`.`),enabled:n.boolean().nullish().describe("With change: false switches it off without deleting it, true back on.")})};function w(e){let t=e.runs[0];return{id:e.id,label:e.label,bot:e.bot,when:(0,h.scheduleText)(e.schedule),enabled:e.enabled,...e.enabled?{next:(0,c.whenOf)((0,c.toDate)(e.nextRunAt))}:{},request:(0,u.clip)(e.request,r.PROMPT_LINE.routineRequest),...t?{lastRun:{thread:t.id,status:t.status,at:(0,c.whenOf)((0,c.toDate)(t.updatedAt)),...t.outcome?{outcome:(0,u.clip)(t.outcome,r.PROMPT_LINE.routineOutcome)}:{}}}:{}}}let y=e=>{if((0,d.isPublicError)(e))return e.message;throw e};async function p(e){let t=(await (0,l.listRoutines)()).map(e=>`"${e.label}"`);return t.length?e?`There is no single routine called "${e}". The routines are: ${t.join(", ")}. Call again with one of those, or its ID.`:`Name the routine. The routines are: ${t.join(", ")}.`:"There are no routines yet."}e.s(["createRoutineTools",0,function(){return{[o.TOOL_NAMES.routine]:(0,i.tool)({description:f.description,inputSchema:f.parameters,execute:async e=>{if("list"===e.action)return{routines:(await (0,l.listRoutines)()).map(w)};let t=function(e){if([e.at,e.time,e.everyHours].filter(Boolean).length>1)return"Give one of `at`, `time` or `everyHours`, not two.";let t=e.at?{kind:"once",at:e.at}:e.time?{kind:"daily",time:e.time,days:e.days?.length?e.days:[1,2,3,4,5,6,7]}:e.everyHours?{kind:"every",hours:e.everyHours}:null;if(!t)return null;let a=h.RoutineScheduleSchema.safeParse(t);return a.success?a.data:a.error.issues[0].message}(e);if("string"==typeof t)return t;if("create"===e.action){if(!t)return"Say when it starts: `at`, `time` (with `days`), or `everyHours`.";let a=h.RoutineInputSchema.safeParse({bot:e.bot??"",label:e.label??"",request:e.request??"",schedule:t});if(!a.success)return`${a.error.issues[0].message}. Nothing was made — call again with bot, label, request and when.`;let i=(await (0,s.listJobBots)()).map(e=>e.name);if(!i.some(e=>e.toLowerCase()===a.data.bot.toLowerCase()))return`There is no bot called "${a.data.bot}". The bots are: ${i.join(", ")}. Nothing was made — call again with one of those.`;let n=await (0,l.createRoutine)(a.data).catch(y);if("string"==typeof n)return n;let r=(0,c.whenOf)((0,c.toDate)(n.nextRunAt));return{...w(n),note:"once"===n.schedule.kind?`${n.bot} starts "${n.label}" once, ${r}, and the routine then switches itself off. The start is a thread of its own, and its result reaches the conversation like any thread's.`:`${n.bot} starts "${n.label}" by itself, ${(0,h.scheduleText)(n.schedule)}, first ${r}. Each start is a thread of its own, and its result reaches the conversation like any thread's.`}}let a=e.routine?await (0,l.resolveRoutine)(e.routine):null;if(!a)return await p(e.routine);if("delete"===e.action)return await (0,l.deleteRoutine)(a.id),`"${a.label}" is deleted and starts no more. The threads it already opened stay.`;let i={...e.bot?{bot:e.bot}:{},...e.label?.trim()?{label:e.label.trim()}:{},...e.request?.trim()?{request:e.request.trim()}:{},...t?{schedule:t}:{},..."boolean"==typeof e.enabled?{enabled:e.enabled}:{}};if(!Object.keys(i).length)return"Nothing to change was given: bot, label, request, when, or enabled.";let n=await (0,l.updateRoutine)(a.id,i).catch(y);return"string"==typeof n?n:n?w(n):await p(e.routine)}})}}]),a()}catch(e){a(e)}},!1),489956,e=>e.a(async(t,a)=>{try{var i=e.i(68356),n=e.i(847841),r=e.i(105249),o=e.i(687388),s=e.i(353885),l=e.i(279041),h=e.i(340698),c=e.i(41444),d=t([h]);[h]=d.then?(await d)():d;let p=`Answer the question from the web. Lead with the answer, then
|
|
15
15
|
what supports it. Say plainly what you could not find or confirm — do not fill
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
module.exports=[953002,e=>e.a(async(t,a)=>{try{var r=e.i(105249),n=e.i(440998),i=e.i(91264),s=t([n]);[n]=s.then?(await s)():s;let o=r.default.array(r.default.string().min(1)),l=(0,i.serverRoute)(async e=>{let t,a=new URL(e.url).searchParams.get("paths")??"[]";try{t=JSON.parse(a)}catch{t=null}return(0,n.statFiles)(o.parse(t))});e.s(["GET",0,l]),a()}catch(e){a(e)}},!1),933096,e=>{"use strict";var t=e.i(747909),a=e.i(174017),r=e.i(996250),n=e.i(759756),i=e.i(561916),s=e.i(174677),o=e.i(869741),l=e.i(316795),u=e.i(487718),d=e.i(995169),c=e.i(47587),p=e.i(666012),h=e.i(570101),R=e.i(626937),v=e.i(10372),m=e.i(193695);e.i(52474);var f=e.i(600220);let g=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/workspace/files/route",pathname:"/api/workspace/files",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/workspace/files/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(953002),...{}}),{workAsyncStorage:w,workUnitAsyncStorage:E,serverHooks:C}=g;async function x(e,t,r){r.requestMeta&&(0,n.setRequestMeta)(e,r.requestMeta),g.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let w="/api/workspace/files/route";w=w.replace(/\/index$/,"")||"/";let E=await g.prepare(e,t,{srcPage:w,multiZoneDraftMode:!1});if(!E)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:C,deploymentId:x,params:_,nextConfig:y,parsedUrl:A,isDraftMode:T,prerenderManifest:P,routerServerContext:S,isOnDemandRevalidate:N,revalidateOnlyGenerated:b,resolvedPathname:O,clientReferenceManifest:k,serverActionsManifest:q}=E,H=(0,o.normalizeAppPath)(w),I=!!(P.dynamicRoutes[H]||P.routes[O]),M=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,A,!1):t.end("This page could not be found"),null);if(I&&!T){let e=!!P.routes[O],t=P.dynamicRoutes[H];if(t&&!1===t.fallback&&!e){if(y.adapterPath)return await M();throw new m.NoFallbackError}}let U=null;!I||g.isDev||T||(U="/index"===(U=O)?"/":U);let D=!0===g.isDev||!I,j=I&&!D;q&&k&&(0,s.setManifestsSingleton)({page:w,clientReferenceManifest:k,serverActionsManifest:q});let F=e.method||"GET",K=(0,i.getTracer)(),L=K.getActiveScopeSpan(),$=!!(null==S?void 0:S.isWrappedByNextServer),B=!!(0,n.getRequestMeta)(e,"minimalMode"),G=(0,n.getRequestMeta)(e,"incrementalCache")||await g.getIncrementalCache(e,y,P,B);null==G||G.resetRequestCache(),globalThis.__incrementalCache=G;let V={params:_,previewProps:P.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:D,incrementalCache:G,hmrRefreshHash:(0,n.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,r,n)=>g.onRequestError(e,t,r,n,S)},sharedContext:{buildId:C,deploymentId:x}},X=new l.NodeNextRequest(e),W=new l.NodeNextResponse(t),z=u.NextRequestAdapter.fromNodeNextRequest(X,(0,u.signalFromNodeResponse)(t)),J=async({previousCacheEntry:a})=>{try{if(!B&&N&&b&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await g.handle(z,V);e.fetchMetrics=V.renderOpts.fetchMetrics;let i=V.renderOpts.pendingWaitUntil;i&&r.waitUntil&&(r.waitUntil(i),i=void 0);let s=V.renderOpts.collectedTags;if(!I)return await (0,p.sendResponse)(X,W,n,i),null;{let e=await n.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(n.headers);s&&(t[v.NEXT_CACHE_TAGS_HEADER]=s),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==V.renderOpts.collectedRevalidate&&!(V.renderOpts.collectedRevalidate>=v.INFINITE_CACHE)&&V.renderOpts.collectedRevalidate,r=void 0===V.renderOpts.collectedExpire||V.renderOpts.collectedExpire>=v.INFINITE_CACHE?!1!==a&&a>0?y.expireTime:void 0:V.renderOpts.collectedExpire;return{value:{kind:f.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:r}}}}catch(t){throw(null==a?void 0:a.isStale)&&await g.onRequestError(e,t,{routerKind:"App Router",routePath:w,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:j,isOnDemandRevalidate:N})},!1,S),t}},Z=async(n,s)=>{try{var o,l;let n=await g.handleResponse({req:e,nextConfig:y,cacheKey:U,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:P,isRoutePPREnabled:!1,isOnDemandRevalidate:N,revalidateOnlyGenerated:b,responseGenerator:J,waitUntil:r.waitUntil,isMinimalMode:B});if(!I)return;if((null==n||null==(o=n.value)?void 0:o.kind)!==f.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==n||null==(l=n.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});B||t.setHeader("x-nextjs-cache",N?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),T&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let i=(0,h.fromNodeOutgoingHttpHeaders)(n.value.headers);B&&I||i.delete(v.NEXT_CACHE_TAGS_HEADER),!n.cacheControl||t.getHeader("Cache-Control")||i.get("Cache-Control")||i.set("Cache-Control",(0,R.getCacheControlHeader)(n.cacheControl)),await (0,p.sendResponse)(X,W,new Response(n.value.body,{headers:i,status:n.value.status||200}));return}catch(t){if(t instanceof m.NoFallbackError||await g.onRequestError(e,t,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:j,isOnDemandRevalidate:N})},!1,S),I)throw t;await (0,p.sendResponse)(X,W,new Response(null,{status:500}));return}finally{(()=>{if(!n)return;let e=t.statusCode;n.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(n.setStatus({code:i.SpanStatusCode.ERROR}),n.setAttribute("error.type",e.toString()));let a=K.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==d.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=a.get("next.route")||H,o=`${F} ${r}`;n.setAttributes({"next.route":r,"http.route":r,"next.span_name":o}),n.updateName(o),s&&s!==n&&(s.setAttribute("http.route",r),s.updateName(o))})()}};if($&&L)await Z(L,void 0);else{let t=K.getActiveScopeSpan();await K.withPropagatedContext(e.headers,()=>K.trace(d.BaseServerSpan.handleRequest,{spanName:`${F} ${w}`,kind:i.SpanKind.SERVER,attributes:{"http.method":F,"http.target":e.url}},e=>Z(e,t)),void 0,!$)}}e.s(["handler",0,x,"patchFetch",0,function(){return(0,r.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:E})},"routeModule",0,g,"serverHooks",0,C,"workAsyncStorage",0,w,"workUnitAsyncStorage",0,E])},329280,e=>{e.v(t=>Promise.all(["server/chunks/[externals]_node_readline_1u65a-m._.js","server/chunks/node_modules_consola_dist_chunks_prompt_mjs_02axwqv._.js"].map(t=>e.l(t))).then(()=>t(781937)))}];
|
|
2
2
|
|
|
3
|
-
//# sourceMappingURL=
|
|
3
|
+
//# sourceMappingURL=_1tkzgtm._.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
module.exports=[102473,e=>{e.v(s=>Promise.all(["server/chunks/[root-of-the-server]__1_04mcf._.js","server/chunks/lib_logger_ts_07e65t5._.js"].map(s=>e.l(s))).then(()=>s(232347)))},130022,e=>{e.v(s=>Promise.all(["server/chunks/config_ts_1g4sz5o._.js"].map(s=>e.l(s))).then(()=>s(333925)))},7313,e=>{e.v(s=>Promise.all(["server/chunks/[root-of-the-server]__13hng6h._.js","server/chunks/_0uet1h6._.js"].map(s=>e.l(s))).then(()=>s(876393)))},266965,e=>{e.v(s=>Promise.all(["server/chunks/[root-of-the-server]__0h656y-._.js","server/chunks/_10qam6o._.js"].map(s=>e.l(s))).then(()=>s(946280)))},171772,e=>{e.v(s=>Promise.all(["server/chunks/[root-of-the-server]__1ndi14y._.js"].map(s=>e.l(s))).then(()=>s(973589)))},327784,e=>{e.v(s=>Promise.all(["server/chunks/[root-of-the-server]__0mrk2it._.js","server/chunks/features_memory_0__61kl._.js","server/chunks/
|
|
1
|
+
module.exports=[102473,e=>{e.v(s=>Promise.all(["server/chunks/[root-of-the-server]__1_04mcf._.js","server/chunks/lib_logger_ts_07e65t5._.js"].map(s=>e.l(s))).then(()=>s(232347)))},130022,e=>{e.v(s=>Promise.all(["server/chunks/config_ts_1g4sz5o._.js"].map(s=>e.l(s))).then(()=>s(333925)))},7313,e=>{e.v(s=>Promise.all(["server/chunks/[root-of-the-server]__13hng6h._.js","server/chunks/_0uet1h6._.js"].map(s=>e.l(s))).then(()=>s(876393)))},266965,e=>{e.v(s=>Promise.all(["server/chunks/[root-of-the-server]__0h656y-._.js","server/chunks/_10qam6o._.js"].map(s=>e.l(s))).then(()=>s(946280)))},171772,e=>{e.v(s=>Promise.all(["server/chunks/[root-of-the-server]__1ndi14y._.js"].map(s=>e.l(s))).then(()=>s(973589)))},327784,e=>{e.v(s=>Promise.all(["server/chunks/[root-of-the-server]__0mrk2it._.js","server/chunks/features_memory_0__61kl._.js","server/chunks/_05sa7xl._.js","server/chunks/_08btiir._.js","server/chunks/features_workspace_workspace_ts_1iyjroj._.js","server/chunks/_1skgy7b._.js","server/chunks/_136j09a._.js","server/chunks/_07nxi75._.js","server/chunks/_1xcnogc._.js","server/chunks/[root-of-the-server]__05n-hql._.js","server/chunks/lib_logger_ts_07e65t5._.js"].map(s=>e.l(s))).then(()=>s(49002)))},193435,e=>{e.v(s=>Promise.all(["server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1y49572._.js","server/chunks/_20oecmn._.js","server/chunks/[root-of-the-server]__0nmust6._.js","server/chunks/_0hin38_._.js","server/chunks/_1y8w80a._.js","server/chunks/lib_logger_ts_07e65t5._.js","server/chunks/_0caua_s._.js"].map(s=>e.l(s))).then(()=>s(5509)))},566024,e=>{e.v(s=>Promise.all(["server/chunks/[root-of-the-server]__1p47fbb._.js","server/chunks/features_memory_0__61kl._.js","server/chunks/_0hin38_._.js","server/chunks/_1y8w80a._.js","server/chunks/lib_logger_ts_07e65t5._.js"].map(s=>e.l(s))).then(()=>s(1363)))},975158,e=>{e.v(s=>Promise.all(["server/chunks/[root-of-the-server]__05dp5tr._.js","server/chunks/features_workspace_workspace_ts_1iyjroj._.js","server/chunks/features_memory_0__61kl._.js","server/chunks/_1xcnogc._.js","server/chunks/_08btiir._.js","server/chunks/_05sa7xl._.js","server/chunks/_136j09a._.js","server/chunks/_19kea1l._.js","server/chunks/_0xygcxs._.js","server/chunks/_1skgy7b._.js","server/chunks/_02lipqs._.js","server/chunks/lib_logger_ts_07e65t5._.js"].map(s=>e.l(s))).then(()=>s(312485)))},569286,e=>{e.v(s=>Promise.all(["server/chunks/[root-of-the-server]__1ygplx1._.js","server/chunks/features_memory_0__61kl._.js","server/chunks/_05sa7xl._.js","server/chunks/_08btiir._.js","server/chunks/features_workspace_workspace_ts_1iyjroj._.js","server/chunks/lib_logger_ts_07e65t5._.js","server/chunks/_07nxi75._.js","server/chunks/_1y8w80a._.js","server/chunks/_1skgy7b._.js","server/chunks/_1xcnogc._.js","server/chunks/[root-of-the-server]__05n-hql._.js"].map(s=>e.l(s))).then(()=>s(733184)))},741548,e=>{e.v(s=>Promise.all(["server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1y49572._.js","server/chunks/[root-of-the-server]__0svzjwa._.js","server/chunks/features_workspace_workspace_ts_1iyjroj._.js","server/chunks/lib_logger_ts_07e65t5._.js"].map(s=>e.l(s))).then(()=>s(379651)))},917723,e=>{e.v(s=>Promise.all(["server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1y49572._.js","server/chunks/_0uzj57i._.js","server/chunks/_05sa7xl._.js","server/chunks/_20oecmn._.js","server/chunks/_0hin38_._.js","server/chunks/lib_logger_ts_07e65t5._.js","server/chunks/[root-of-the-server]__1_h4hf9._.js","server/chunks/_1y8w80a._.js"].map(s=>e.l(s))).then(()=>s(520401)))},51833,e=>{e.v(s=>Promise.all(["server/chunks/[root-of-the-server]__1t02-1p._.js","server/chunks/lib_logger_ts_07e65t5._.js","server/chunks/features_workspace_workspace_ts_1iyjroj._.js"].map(s=>e.l(s))).then(()=>s(871096)))},482438,e=>{"use strict";async function s(){let{APP_DIR:s,APP_NAME:r,DATA_DIR:_,DB_PATH:t,HISTORY_KEEP:o,WORKSPACE_KEEP:a}=await e.A(130022),{logger:n}=await e.A(415568),{migrateDatabase:c}=await e.A(266965);await c().catch(e=>{n.error(`Cannot migrate ${t}`),console.error(` ${e instanceof Error?e.message:e}
|
|
2
2
|
Starting over gives an empty one. API keys, bots, connectors, calls, threads and memory go with it; the workspace and skills stay.
|
|
3
3
|
The old ${t} is moved aside as .corrupt-<time> rather than removed, so a file damaged by a crash or a full disk can still be opened.
|
|
4
|
-
`),process.exit(65)});let{ensureRootNotes:h}=await e.A(566024);await h();let{installGuide:l}=await e.A(171772);await l().catch(e=>n.error("install guide",e));let{sweepJobFiles:
|
|
4
|
+
`),process.exit(65)});let{ensureRootNotes:h}=await e.A(566024);await h();let{installGuide:l}=await e.A(171772);await l().catch(e=>n.error("install guide",e));let{sweepJobFiles:i,sweepThreads:v}=await e.A(327784);await v();let{closeEndedQuestions:u}=await e.A(193435);await u().then(({closed:e,cleared:s})=>{(e||s)&&n.info(`closed ${e} question(s) on ${s} ended job(s)`)}).catch(e=>n.error("close ended questions",e));let k=()=>void i().catch(e=>n.error("sweep job files",e));k(),setInterval(k,a.sweepEveryMs).unref();let{deleteEndedCalls:j,sweepCalls:m}=await e.A(917723);await m();let{removeFinishedThreads:w}=await e.A(327784),p=()=>void(async()=>{let e=new Date(Date.now()-o.forMs),s=await j(e),r=await w(e);(s||r)&&n.info(`cleared ${s} old call(s) and ${r} old job(s)`)})().catch(e=>n.error("sweep history",e));p(),setInterval(p,o.sweepEveryMs).unref();let{presence:f}=await e.A(102473),{pauseThreads:g}=await e.A(327784),{heldCalls:d}=await e.A(975158);f.onGone(()=>{m(d()).catch(e=>n.error("browser gone",e))});let{startRoutineClock:y}=await e.A(569286);y();let{adoptKeptSessions:b}=await e.A(741548);await b().catch(e=>n.error("adopt kept sessions",e));let{startReach:A}=await e.A(975158);if(A().catch(e=>n.error("start reach",e)),process.env.NEXT_MANUAL_SIG_HANDLE){let{checkpoint:s}=await e.A(7313),r=!1;for(let[e,_]of[["SIGINT",130],["SIGTERM",143]])process.on(e,()=>{r||(r=!0,n.info(`${e} — parking what was running`),Promise.race([g("The server was shut down while this was running.").catch(e=>n.error("pause threads",e)).then(()=>s()).catch(e=>n.error("checkpoint",e)),new Promise(e=>setTimeout(e,3e3))]).finally(()=>process.exit(_)))})}n.info(`${r} is up — app ${s}, data ${_}`);let{ensureBrowser:P}=await e.A(51833);P().catch(e=>n.debug("browser fetch",e))}e.s(["boot",0,s])},415568,e=>{e.v(s=>Promise.all(["server/chunks/[root-of-the-server]__0sm5xvm._.js","server/chunks/lib_logger_ts_07e65t5._.js"].map(s=>e.l(s))).then(()=>s(938281)))}];
|
|
5
5
|
|
|
6
6
|
//# sourceMappingURL=_1wl2g8_._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
module.exports=[175936,e=>{"use strict";let i=e=>e.split("/").map(encodeURIComponent).join("/");e.s(["decodePath",0,e=>e.join("/"),"queryKey",0,{memory:"/api/memory",memoryPage:e=>({url:"/api/memory",query:{offset:e||null}}),mcp:"/api/mcp",mcpServer:e=>({url:"/api/mcp",pathVariable:[e]}),mcpTools:"/api/mcp/tools",skills:"/api/skills",skillNode:(e,i,t)=>({url:"/api/skills",pathVariable:[e,i],query:{path:t}}),bot:"/api/bot",botMemory:"/api/bot/memory",botMemoryFiles:e=>({url:"/api/bot/memory/files",query:{bot:e}}),routines:"/api/routine",threads:"/api/bot/thread",threadHistory:e=>({url:"/api/bot/thread",query:{history:1,before:e}}),thread:e=>({url:"/api/bot/thread",query:{id:e}}),toolResult:(e,i)=>({url:"/api/bot/thread",pathVariable:[e],query:{call:i}}),workspace:"/api/workspace",workspaceFolder:(e,i)=>({url:"/api/workspace",query:{path:e||null,rows:i}}),workspaceFiles:e=>({url:"/api/workspace/files",query:{paths:JSON.stringify(e)}}),artifacts:"/api/artifact",artifactShelf:e=>({url:"/api/artifact",query:{rows:e}}),artifactSet:(e,i)=>({url:"/api/artifact",query:{set:e,rows:i}}),file:e=>`/api/file/${i(e)}`,fileFace:e=>`/api/file/${i(e)}?face`,favicon:e=>`/api/favicon/${encodeURIComponent(e)}`,fileView:e=>`/artifact/${i(e)}`,events:"/api/events",config:"/api/config",callHistory:e=>({url:"/api/thursday/call",query:{before:e}}),thursdaySettings:"/api/thursday/settings",toolCall:"/api/thursday/tool-call",signIns:"/api/signins",reach:"/api/reach",textCall:"/api/thursday/text",memoryEdit:"/api/memory/edit",llmModel:"/api/llm-model",modelCatalog:"/api/llm-model/catalog",gatewayCredits:"/api/llm-model/credits",subscriptionUsage:"/api/llm-model/subscription"}])},629668,e=>{"use strict";var i=e.i(175936),t=e.i(687388);let a=e=>`text/${e}; charset=utf-8`,m={md:{kind:"markdown",mime:a("markdown")},markdown:{kind:"markdown",mime:a("markdown")},csv:{kind:"csv",mime:a("csv")},json:{kind:"json",mime:"application/json; charset=utf-8"},txt:{kind:"text",mime:a("plain")},log:{kind:"text",mime:a("plain")},html:{kind:"frame",mime:a("html")},htm:{kind:"frame",mime:a("html")},pdf:{kind:"frame",mime:"application/pdf"},png:{kind:"image",mime:"image/png"},jpg:{kind:"image",mime:"image/jpeg"},jpeg:{kind:"image",mime:"image/jpeg"},gif:{kind:"image",mime:"image/gif"},webp:{kind:"image",mime:"image/webp"},svg:{kind:"image",mime:"image/svg+xml"},mp3:{kind:"audio",mime:"audio/mpeg"},wav:{kind:"audio",mime:"audio/wav"},mp4:{kind:"video",mime:"video/mp4"},webm:{kind:"video",mime:"video/webm"},docx:{kind:"none",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},xlsx:{kind:"none",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},pptx:{kind:"none",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"},css:{kind:"none",mime:a("css")},js:{kind:"none",mime:a("javascript")},woff2:{kind:"none",mime:"font/woff2"}},n=e=>e.split(".").pop()?.toLowerCase()??"",l=new Set(["node_modules","__pycache__"]),o=new Set(["css","js","woff2"]),r=Object.keys(m).filter(e=>!o.has(e)),s=RegExp(String.raw`(?<![\p{L}\p{N}_/:@%-])\/?(?:[\p{L}\p{N}_.@%-]+/)*[\p{L}\p{N}_@%-]+(?:\.[\p{L}\p{N}_-]+)*\.(?:${r.join("|")})\b`,"giu"),p=`${t.PATHS.workspace}/`,d=i.queryKey.file(""),c=e=>e.startsWith(`${t.PATHS.artifacts}/`)&&["md","markdown","html","htm"].includes(n(e));e.s(["isListedFile",0,e=>!e.startsWith(".")&&!o.has(n(e)),"isListedFolder",0,e=>!e.startsWith(".")&&!l.has(e),"leadFirst",0,function(e){let i=e.findIndex(c);return i>0?[e[i],...e.filter((e,t)=>t!==i)]:e},"mimeOf",0,e=>m[n(e)]?.mime??"application/octet-stream","pathsIn",0,function(e){let i=e.replace(/\b[a-z][\w+.-]*:\/\/\S+/gi," ").replace(/\b[a-z][\w+.-]+:(?=\/)/gi," "),t=new Set,a="";for(let[e]of i.matchAll(s)){let i=!e.includes("/"),m=function(e){let i,t,a=(t=(i=function(e){if(!e.startsWith(d))return e;let i=e.slice(d.length);try{return decodeURIComponent(i)}catch{return i}}(e.trim())).indexOf(p))>=0?i.slice(t+p.length)||null:i.startsWith("/")||/^[A-Za-z]:/.test(i)||i.split("/").includes("..")?null:i||null;if(!a)return null;let[m,...n]=a.split("/");return n.length&&m.includes(".")?null:a}(i?a+e:e);i||(a=m?.slice(0,m.lastIndexOf("/")+1)??""),m&&t.add(m)}return[...t].slice(0,12)},"viewKindOf",0,e=>m[n(e)]?.kind??"none"])},329280,e=>{e.v(i=>Promise.all(["server/chunks/[externals]_node_readline_1u65a-m._.js","server/chunks/node_modules_consola_dist_chunks_prompt_mjs_02axwqv._.js"].map(i=>e.l(i))).then(()=>i(781937)))}];
|
|
2
2
|
|
|
3
|
-
//# sourceMappingURL=
|
|
3
|
+
//# sourceMappingURL=_1y3mnz4._.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
module.exports=[786025,t=>{"use strict";var e=t.i(666680),
|
|
1
|
+
module.exports=[786025,t=>{"use strict";var e=t.i(666680),a=t.i(902157),r=t.i(912714),i=t.i(660526),n=t.i(750227),o=t.i(687388),s=t.i(554199);let l=2*Math.PI,c=t=>Math.round(100*t)/100;function u(t){let e=t>>>0;return()=>{let t=Math.imul((e=e+0x6d2b79f5>>>0)^e>>>15,1|e);return(((t=t+Math.imul(t^t>>>7,61|t)^t)^t>>>14)>>>0)/0x100000000}}function h(t,e){return[t[0]-e[0],t[1]-e[1]]}function d(t){let e=Math.hypot(t[0],t[1])||1;return[t[0]/e,t[1]/e]}let f={shape:"blob",sides:3,corner:.74,rotation:0,squircle:4.6,wobble:.2,seed:113,autofit:!0,color:"currentColor",fill:!0,strokeWidth:14,eyeLen:51,eyeWidth:38,eyeBend:-1,eyeTaper:.35,eyeTilt:-90,eyeSkew:0,eyeGap:88,eyeY:100,gazeRange:7,follow:!0,ripple:9,pulse:7,punch:.05,bandEase:.019,bobRate:1,stretch:15,idle:!0,liveliness:55,float:7,breathe:3.7,speed:1.7,blink:!0,notify:!1,notifyAngle:41,notifyDist:109,notifyR:25,notifyRing:11};function p(t,e,a=.035){let r=u(12139^e),i=[2,3,5].map(t=>({k:t,a:(2*r()-1)/t,p:r()*l})),n=t.map((t,e)=>{let a=e/128*l,r=0;for(let t of i)r+=t.a*Math.sin(t.k*a+t.p);return r}),o=Math.max(...n.map(Math.abs))||1;return t.map((t,e)=>t*(1+a*n[e]/o))}let w=new Map;var m=t.i(640911),S=t.i(874533),T=o;let y=new Set(["node_modules",".git",".next","dist","build",".venv","__pycache__",".turbo","coverage"]);async function*M(t){let e;try{e=await (0,r.readdir)(t,{withFileTypes:!0})}catch{return}for(let a of e){if(y.has(a.name)||a.name.startsWith("."))continue;let e=(0,n.join)(t,a.name);a.isDirectory()?yield*M(e):a.isFile()&&(yield e)}}let $=/^(PORT|HOSTNAME|NODE_ENV|INIT_CWD|NEXT_MANUAL_SIG_HANDLE)$|^_*NEXT_|^TURBOPACK|^npm_|^THURSDAY_/i;async function A(t,e,a,i){if(t.length<=i.max)return t;let o=(0,n.join)(a,i.dir),s=(0,n.join)(o,`${new Date().toISOString().replace(/[:.]/g,"-")}-${e.replace(/[^a-zA-Z0-9_-]+/g,"_")}.txt`),l=s;try{await (0,r.mkdir)(o,{recursive:!0}),await (0,r.writeFile)(s,t),l=(0,n.relative)(a,s)||s}catch{l="(could not be written to a file)"}let c=(t.match(/\n/g)?.length??0)+1;return`${t.slice(0,i.head).trimEnd()}
|
|
2
2
|
|
|
3
|
-
[${e} cut at ${
|
|
3
|
+
[${e} cut at ${i.max.toLocaleString("en")} chars — the whole thing (${c} lines) is at ${l}. Read the part you need with \`sed -n\`.]
|
|
4
4
|
|
|
5
|
-
${t.slice(-
|
|
6
|
-
[${t}]`,
|
|
5
|
+
${t.slice(-i.tail).trimStart()}`}var _=t.i(41444);let b=o.APP_DIR,P=(0,n.join)(o.DATA_DIR,o.PATHS.workspace),g=(process.env.THURSDAY_TOOL_PATH?.split(":")??[(0,n.join)(b,"node_modules",".bin")]).filter(Boolean),E=(0,n.join)(P,o.PATHS.artifacts),R=[o.PATHS.artifacts,o.PATHS.projects,o.PATHS.scratch,o.PATHS.bots],I=new Set([...R,".agents"]),v=".playwright-cli",H=(t,e)=>e===t||e.startsWith(t+n.sep),O=t=>(0,r.realpath)(t).catch(()=>null);async function L(t){let e=await O(P)??P,a=(0,n.resolve)(P,t);if(!H(P,a))return null;let r=a,i=await O(r);for(;null===i&&(0,n.dirname)(r)!==r;)r=(0,n.dirname)(r),i=await O(r);if(null===i)return null;let o=(0,n.relative)(r,a),s=o?(0,n.join)(i,o):i;return H(e,s)?s:null}function j(t,e){return`${o.PATHS.scratch}/${(0,_.slug)(e)||"job"}-${t.slice(0,6)}`}let k=t=>t.replace(/[^\p{L}\p{N}_-]+/gu,"-"),W=t=>`${o.PATHS.bots}/${k(t)}`,C=t=>`${o.PATHS.artifacts}/${k(t)}`;async function D(t){let e=W(t),a=C(t);return await Promise.all([e,a].map(t=>(0,r.mkdir)((0,n.join)(P,t),{recursive:!0}))),{own:e,artifacts:a}}async function x(t,e){let a=j(t,e);return await (0,r.mkdir)((0,n.join)(P,a),{recursive:!0}),a}let F=t=>({PLAYWRIGHT_MCP_BROWSER:"chromium",...t?{PLAYWRIGHT_CLI_SESSION:`thread-${t}`,PLAYWRIGHT_MCP_VIEWPORT_SIZE:o.BROWSER_VIEWPORT}:{}}),N={runtimes:["node","python3","uv","bun","deno"],managers:["pnpm","npm","yarn"]};async function B(t){let e=Object.values(N).flat(),{stdout:a}=await t.exec(e.map(t=>`command -v ${t} >/dev/null 2>&1 && printf '%s ' ${t}`).join("; "),{timeoutMs:1e4}),r=new Set(a.trim().split(/\s+/).filter(Boolean)),i=t=>({found:t.filter(t=>r.has(t)),missing:t.filter(t=>!r.has(t))});return{runtimes:i(N.runtimes),managers:i(N.managers),browser:null}}async function U(){await V(),await z()}async function Y(t,e){let{browsers:a}=JSON.parse((await t.exec("playwright-cli list --json",{env:e,timeoutMs:o.BROWSER_CLI.readMs})).stdout||"{}");return a??[]}async function G(t){await q(t,await Z(t,!1))}async function K(t){await Z(t,!0)}async function J(t){await q(t,await Z(t,!0))}async function q(t,e){let a=await X(),i=F(t).PLAYWRIGHT_CLI_SESSION;for(let t of(await (0,r.readdir)(a).catch(()=>[]))){let o=t.startsWith("ud-")?t.slice(3):t;(o===i||o.startsWith(`${i}-`)||o.startsWith(`${i}.`))&&(e.some(t=>o===t||o.startsWith(`${t}-`)||o.startsWith(`${t}.`))||await (0,r.rm)((0,n.join)(a,t),{recursive:!0,force:!0}).catch(e=>m.logger.warn(`browser data ${t}: ${String(e)}`)))}}async function X(){let t=process.env.XDG_CACHE_HOME||(0,n.join)((0,i.homedir)(),".cache"),a=await (0,r.realpath)(P).catch(()=>P);return(0,n.join)(t,"ms-playwright","daemon",(0,e.createHash)("sha1").update(a).digest("hex").slice(0,16))}async function Z(t,e){let r=await tr(),i=F(t),n=await Y(r,i).then(t=>t.filter(t=>t.name===i.PLAYWRIGHT_CLI_SESSION||t.name.startsWith(`${i.PLAYWRIGHT_CLI_SESSION}-`))).catch(()=>[]),s=n.length?await X():"";s&&!(0,a.existsSync)(s)&&m.logger.warn(`playwright-cli keeps this workspace's browsers somewhere other than ${s}: removing a thread will leave its browser profiles on disk`);let l=[];for(let t of n){if(t.attached||!e&&!1!==t.headed){l.push(t.name);continue}await r.exec("playwright-cli close",{env:{...i,PLAYWRIGHT_CLI_SESSION:t.name},timeoutMs:o.BROWSER_CLI.readMs}).catch(()=>{})}return await U(),l}let z=()=>Q(o.PATHS.output),V=()=>Q(v);async function Q(t){let e=(0,n.join)(P,t),a=await (0,r.readdir)(e,{withFileTypes:!0}).catch(()=>[]),i=Date.now()-o.WORKSPACE_KEEP.forMs;for(let t of a){if(!t.isFile())continue;let a=(0,n.join)(e,t.name),o=await (0,r.stat)(a).catch(()=>null);o&&o.mtimeMs<i&&await (0,r.unlink)(a).catch(()=>{})}}async function tt(){return(await (0,r.readdir)((0,n.join)(P,o.PATHS.scratch),{withFileTypes:!0}).catch(()=>[])).filter(t=>t.isDirectory()).map(t=>`${o.PATHS.scratch}/${t.name}`)}async function te(t){let e=Date.now()-o.WORKSPACE_KEEP.forMs,a=[];for(let i of t){let t=(0,n.join)(P,i),o=await (0,r.stat)(t).catch(()=>null);o?.isDirectory()&&!(o.mtimeMs>=e)&&(await (0,r.rm)(t,{recursive:!0,force:!0}).catch(()=>{}),a.push(i))}return a}let ta={"pnpm-workspace.yaml":"packages:\n - '**'\n",".npmrc":"recursive-install=false\n"};async function tr(){for(let t of[...R,".playwright"])await (0,r.mkdir)((0,n.join)(P,t),{recursive:!0});for(let[t,e]of Object.entries(ta))await (0,r.writeFile)((0,n.join)(P,t),e,{flag:"wx"}).catch(()=>{});return(({workingDirectory:t,spill:e,toolPath:a})=>{let i=(0,n.resolve)(t),o=(a??[]).filter(Boolean).join(":"),s=t=>t.startsWith("/")||/^[A-Za-z]:/.test(t)?t:(0,n.resolve)(i,t);return{cwd:i,resolve:s,readFile:(t,e)=>(0,r.readFile)(s(t),e),async writeFile(t,e){let a=s(t);await (0,r.mkdir)((0,n.join)(a,".."),{recursive:!0}),await (0,r.writeFile)(a,e)},readdir:(t,e)=>(0,r.readdir)(s(t),e),fold:(t,a="output")=>A(t,a,i,e),async listFiles(t,{limit:e=200,skip:a=[]}={}){let r=s(t),i=[];for await(let t of M(r)){let e=(0,n.relative)(r,t).split(n.sep).join("/");a.includes(e.split("/")[0]??"")||i.push(e)}return i.sort((t,e)=>t.split("/").length-e.split("/").length||(t<e?-1:+(t>e))),{files:i.slice(0,e),total:i.length}},exec:(t,{cwd:a,timeoutMs:r=T.EXEC_TIMEOUT_MS,signal:n,env:l}={})=>new Promise(c=>{let u,h,d=function(){let t={...process.env};for(let e of Object.keys(t))($.test(e)||/KEY|TOKEN|SECRET|PASSWORD|CREDENTIAL|_AUTH/i.test(e))&&delete t[e];return t.TERM="dumb",t.PAGER="cat",t.GIT_PAGER="cat",t}();o&&(d.PATH=`${d.PATH??""}:${o}`);let f=(0,S.spawn)(t,{shell:!0,cwd:a?s(a):i,env:{...d,...l},detached:!0}),p="",w="";f.stdout?.on("data",t=>p+=t),f.stderr?.on("data",t=>w+=t);let m=t=>{try{f.pid&&process.kill(-f.pid,t)}catch{f.kill(t)}},y=!1,M=async t=>{y||(y=!0,clearTimeout(b),clearTimeout(u),clearTimeout(h),n?.removeEventListener("abort",P),c({...t,stdout:await A(t.stdout,"stdout",i,e),stderr:await A(t.stderr,"stderr",i,e)}))},_=t=>{u||y||(w+=`
|
|
6
|
+
[${t}]`,m("SIGTERM"),u=setTimeout(()=>{w+="\n[Killed: it did not exit on SIGTERM]",m("SIGKILL"),h=setTimeout(()=>{f.stdout?.destroy(),f.stderr?.destroy(),M({stdout:p,stderr:w,exitCode:-1})},1e3)},T.EXEC_KILL_GRACE_MS))},b=setTimeout(()=>_(`Timed out after ${r}ms`),r),P=()=>_("Aborted");n?.aborted?P():n?.addEventListener("abort",P,{once:!0}),f.on("close",t=>M({stdout:p,stderr:w,exitCode:t??-1})),f.on("error",t=>M({stdout:p,stderr:w+String(t),exitCode:-1}))})}})({workingDirectory:P,spill:{dir:o.PATHS.output,...o.TOOL_OUTPUT},toolPath:g})}async function ti(t,e){let a=t.map(t=>(0,n.resolve)(P,t));if(e){let t=0;for await(let r of M((0,n.join)(P,e)))if(a.push(r),(t+=1)>=o.JOB_FOLDER_WALK)break}let i=new Map;for(let t of a){let e=await (0,r.stat)(t).catch(()=>null);if(!e?.isFile())continue;let a=(0,n.relative)(P,t);i.set(a&&!a.startsWith("..")?a:t,e.mtimeMs)}return[...i].sort((t,e)=>t[1]-e[1]).map(([t])=>t)}async function tn(t,e){let a=j(t,e);await (0,r.rm)((0,n.join)(P,a),{recursive:!0,force:!0}).catch(t=>m.logger.warn(`job folder ${a}: ${String(t)}`))}t.s(["ARTIFACTS",0,E,"DELETED_BOT_MARK",0,".deleted-bot.json","WORKSPACE",0,P,"botArtifacts",0,C,"botBrowserSession",0,(t,a)=>`${t}-bot-${(0,e.createHash)("sha256").update(a.trim().toLowerCase()).digest("hex").slice(0,20)}`,"botFolder",0,W,"botFolderName",0,k,"botShellEnv",0,(t,e)=>({THURSDAY_BOT:t,THURSDAY_BOT_MARK:JSON.stringify(function(t,e){let{head:a,eyes:r}=function(t,e=f.shape){let a=(t,e)=>(function(t){let e=t.tilt*Math.PI/180,a=Math.cos(e),r=Math.sin(e),i=(e,i)=>[t.cx+e*a-i*r,t.cy+e*r+i*a],n=-t.len/2,o=t.len/2,s=[],l=[];for(let e=0;e<=30;e++){let a=e/30,r=1-a,c=r*r*n+a*a*o,u=-(2*r*a*t.bend),h=-(2*r*n)+2*a*o,d=-(2*r*t.bend)+2*a*t.bend,f=Math.hypot(h,d)||1,p=-d/f,w=h/f,m=t.width/2*Math.sin(Math.PI*a)**t.taper;s.push(i(c+p*m,u+w*m)),l.push(i(c-p*m,u-w*m))}let u=`M${c(s[0][0])} ${c(s[0][1])}`;for(let t=1;t<=30;t++)u+=`L${c(s[t][0])} ${c(s[t][1])}`;for(let t=29;t>=0;t--)u+=`L${c(l[t][0])} ${c(l[t][1])}`;return`${u}Z`})({len:f.eyeLen,width:f.eyeWidth,bend:f.eyeBend,taper:f.eyeTaper,tilt:e,cx:t,cy:f.eyeY});return{head:function(t){let e=t.map((t,e)=>{let a=e/128*l;return[120+Math.cos(a)*t,120+Math.sin(a)*t]}),a=`M${c(e[0][0])} ${c(e[0][1])}`;for(let t=0;t<128;t++){let r=e[(t-1+128)%128],i=e[t],n=e[(t+1)%128],o=e[(t+2)%128],s=i[0]+(n[0]-r[0])/6,l=i[1]+(n[1]-r[1])/6,u=n[0]-(o[0]-i[0])/6,h=n[1]-(o[1]-i[1])/6;a+=`C${c(s)} ${c(l)} ${c(u)} ${c(h)} ${c(n[0])} ${c(n[1])}`}return`${a}Z`}(function(t,e,a){var r,i,n;let o=`${"poly"===e?`poly|${t.sides}|${t.corner}|${t.rotation}|${a}`:"squircle"===e?`squircle|${t.squircle}|${a}`:"heart"===e?`heart|${a}`:`blob|${t.wobble}|${a}`}|${t.autofit}`,s=w.get(o);if(s)return s;let c=function(t){let e=Array(128);for(let a=0;a<128;a++){let r=a/128*l,i=Math.cos(r),n=Math.sin(r),o=0;for(let e=0;e<t.length;e++){let a=t[e],r=t[(e+1)%t.length],s=r[0]-a[0],l=r[1]-a[1],c=i*l-n*s;if(1e-9>Math.abs(c))continue;let u=a[0]-120,h=a[1]-120,d=(u*l-h*s)/c,f=(u*n-h*i)/c;d>o&&f>=-1e-9&&f<=1+1e-9&&(o=d)}e[a]=o||112}return e}((r=t,i=e,n=a,"squircle"===i?function(t){let e=[],a=2/t;for(let t=0;t<360;t++){let r=t/360*l,i=Math.cos(r),n=Math.sin(r);e.push([120+Math.sign(i)*Math.abs(i)**a*112,120+Math.sign(n)*Math.abs(n)**a*112])}return e}(r.squircle):"poly"===i?function(t,e,a){let r=a*Math.PI/180-Math.PI/2,i=[];for(let e=0;e<t;e++){let a=r+e/t*l;i.push([120+112*Math.cos(a),120+112*Math.sin(a)])}let n=(Math.PI-l/t)/2,o=224*Math.sin(Math.PI/t)/2*Math.tan(n)*Math.min(1,Math.max(.001,e)),s=o/Math.tan(n),c=[];for(let e=0;e<t;e++){let a=i[e],r=i[(e-1+t)%t],u=i[(e+1)%t],f=d(h(r,a)),p=d(h(u,a)),w=[a[0]+f[0]*s,a[1]+f[1]*s],m=d([f[0]+p[0],f[1]+p[1]]),S=[a[0]+m[0]*o/Math.sin(n),a[1]+m[1]*o/Math.sin(n)],T=Math.atan2(w[1]-S[1],w[0]-S[0]),y=[a[0]+p[0]*s,a[1]+p[1]*s],M=Math.atan2(y[1]-S[1],y[0]-S[0])-T;for(;M>Math.PI;)M-=l;for(;M<-Math.PI;)M+=l;for(let t=0;t<=20;t++){let e=T+t/20*M;c.push([S[0]+Math.cos(e)*o,S[1]+Math.sin(e)*o])}}return c}(r.sides,r.corner,r.rotation):"heart"===i?function(){let t=[];for(let e=0;e<400;e++){let a=e/400*l,r=16*Math.sin(a)**3,i=13*Math.cos(a)-5*Math.cos(2*a)-2*Math.cos(3*a)-Math.cos(4*a);t.push([120+6.6*r,120-(i+2.2)*7.26])}return t}():function(t,e){let a=u(t),r=[1,2,3,4,5].map(t=>({k:t,a:(2*a()-1)/t,p:a()*l})),i=[],n=0;for(let t=0;t<360;t++){let e=t/360*l,a=0;for(let t of r)a+=t.a*Math.sin(t.k*e+t.p);i.push(a),n=Math.max(n,Math.abs(a))}let o=n>0?e/n:0;return i.map((t,e)=>{let a=e/360*l,r=112*(1+t*o);return[120+Math.cos(a)*r,120+Math.sin(a)*r]})}(n,r.wobble))),f="blob"===e?c:"heart"===e?function(t,e){let a=t;for(let t=0;t<2;t++){let t=a;a=t.map((e,a)=>{let r=0;for(let e=-3;e<=3;e++)r+=t[(a+e+128)%128];return r/7})}let r=a.reduce((t,e)=>t+e,0)/128,i=p(a.map(t=>.95*t+.05*r),e,.05),n=Math.round((2*u(20977^e)()-1)*3);return n?i.map((t,e)=>i[(e-n+256)%128]):i}(c,a):p(c,a),m=t.autofit?function(t){let e=l/128,a=0,r=0;for(let i of t)a+=.5*i*i*e,i>r&&(r=i);if(a<=0)return t;let i=Math.min(Math.sqrt(112*Math.PI*112/a),130/r);return t.map(t=>t*i)}(f):f;return w.size>400&&w.clear(),w.set(o,m),m}(f,e,function(t){if("number"==typeof t)return t;let e=0x811c9dc5;for(let a=0;a<t.length;a++)e=Math.imul(e^t.charCodeAt(a),0x1000193);return(e>>>0)%1e4}(t))),eyes:[a(120-f.eyeGap/2,f.eyeTilt),a(120+f.eyeGap/2,f.eyeTilt+f.eyeSkew)]}}(t,e?.shape??f.shape),i=e?.paint?s.MARK_PAINTS[e.paint]:null;return{head:a,eyes:r,ink:(0,s.markInk)(e?.color??s.MARK_SYSTEM,!1),paint:i?"aurora"===i.look?i.colors.slice(0,2):[...i.colors]:null,outline:e?.outline===!0}}(t,e)),THURSDAY_ARTIFACTS:(0,n.join)(P,C(t)),THURSDAY_SKILLS:(0,n.join)(o.APP_DIR,o.PATHS.skills.default),THURSDAY_TOOL_OUTPUT:String(o.TOOL_OUTPUT.max),DISABLE_TELEMETRY:"1"}),"browserStateFile",0,()=>`${v}/state-${crypto.randomUUID()}.json`,"closeHiddenBrowser",0,G,"closeJobShell",0,K,"filesOnDisk",0,ti,"insideWorkspace",0,L,"jobScratch",0,j,"jobShellEnv",0,F,"listBrowsers",0,Y,"listScratchFolders",0,tt,"openBotFolders",0,D,"openJobScratch",0,x,"openWorkspace",0,tr,"pruneJobFiles",0,U,"readMachineTools",0,B,"removeJobBrowsers",0,J,"removeJobScratch",0,tn,"removeUnchangedFolders",0,te,"saveBrowserState",0,t=>`mkdir -p ${v} && playwright-cli state-save ${t}`,"writeRefusal",0,function(t,e){if(H(P,t)){let r=(0,n.relative)(P,t),[i,s]=r.split(n.sep);return i&&I.has(i)?e&&i===o.PATHS.artifacts&&s&&s.toLowerCase()!==k(e).toLowerCase()&&!(0,a.existsSync)((0,n.join)(E,s))?`Not written: ${r} would sit loose at the top of ${o.PATHS.artifacts}/. Your finished work goes in ${C(e)}/.`:null:`Not written: ${r||"the workspace root"} is outside the workspace's folders. Finished work goes under ${e?C(e):o.PATHS.artifacts}/, code under ${o.PATHS.projects}/, your own kit under ${o.PATHS.bots}/, and this job's working material under ${o.PATHS.scratch}/.`}return H(b,t)?`Not written: ${t} is inside the app that is running you, not the user's files. Work in ${P}; outside it, write only where the user pointed you.`:null}],786025)}];
|
|
7
7
|
|
|
8
8
|
//# sourceMappingURL=features_workspace_workspace_ts_13h82gv._.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
module.exports=[871096,t=>{"use strict";var e=t.i(666680),
|
|
1
|
+
module.exports=[871096,t=>{"use strict";var e=t.i(666680),r=t.i(902157),a=t.i(912714),i=t.i(660526),n=t.i(750227),o=t.i(333925),s=t.i(746565);let l=2*Math.PI,c=t=>Math.round(100*t)/100;function u(t){let e=t>>>0;return()=>{let t=Math.imul((e=e+0x6d2b79f5>>>0)^e>>>15,1|e);return(((t=t+Math.imul(t^t>>>7,61|t)^t)^t>>>14)>>>0)/0x100000000}}function h(t,e){return[t[0]-e[0],t[1]-e[1]]}function d(t){let e=Math.hypot(t[0],t[1])||1;return[t[0]/e,t[1]/e]}let f={shape:"blob",sides:3,corner:.74,rotation:0,squircle:4.6,wobble:.2,seed:113,autofit:!0,color:"currentColor",fill:!0,strokeWidth:14,eyeLen:51,eyeWidth:38,eyeBend:-1,eyeTaper:.35,eyeTilt:-90,eyeSkew:0,eyeGap:88,eyeY:100,gazeRange:7,follow:!0,ripple:9,pulse:7,punch:.05,bandEase:.019,bobRate:1,stretch:15,idle:!0,liveliness:55,float:7,breathe:3.7,speed:1.7,blink:!0,notify:!1,notifyAngle:41,notifyDist:109,notifyR:25,notifyRing:11};function p(t,e,r=.035){let a=u(12139^e),i=[2,3,5].map(t=>({k:t,a:(2*a()-1)/t,p:a()*l})),n=t.map((t,e)=>{let r=e/128*l,a=0;for(let t of i)a+=t.a*Math.sin(t.k*r+t.p);return a}),o=Math.max(...n.map(Math.abs))||1;return t.map((t,e)=>t*(1+r*n[e]/o))}let w=new Map;var m=t.i(938281),S=t.i(874533),y=o;let T=new Set(["node_modules",".git",".next","dist","build",".venv","__pycache__",".turbo","coverage"]);async function*M(t){let e;try{e=await (0,a.readdir)(t,{withFileTypes:!0})}catch{return}for(let r of e){if(T.has(r.name)||r.name.startsWith("."))continue;let e=(0,n.join)(t,r.name);r.isDirectory()?yield*M(e):r.isFile()&&(yield e)}}let $=/^(PORT|HOSTNAME|NODE_ENV|INIT_CWD|NEXT_MANUAL_SIG_HANDLE)$|^_*NEXT_|^TURBOPACK|^npm_|^THURSDAY_/i;async function A(t,e,r,i){if(t.length<=i.max)return t;let o=(0,n.join)(r,i.dir),s=(0,n.join)(o,`${new Date().toISOString().replace(/[:.]/g,"-")}-${e.replace(/[^a-zA-Z0-9_-]+/g,"_")}.txt`),l=s;try{await (0,a.mkdir)(o,{recursive:!0}),await (0,a.writeFile)(s,t),l=(0,n.relative)(r,s)||s}catch{l="(could not be written to a file)"}let c=(t.match(/\n/g)?.length??0)+1;return`${t.slice(0,i.head).trimEnd()}
|
|
2
2
|
|
|
3
|
-
[${e} cut at ${
|
|
3
|
+
[${e} cut at ${i.max.toLocaleString("en")} chars — the whole thing (${c} lines) is at ${l}. Read the part you need with \`sed -n\`.]
|
|
4
4
|
|
|
5
|
-
${t.slice(-
|
|
6
|
-
[${t}]`,
|
|
5
|
+
${t.slice(-i.tail).trimStart()}`}var _=t.i(64774);let b=o.APP_DIR,g=(0,n.join)(o.DATA_DIR,o.PATHS.workspace),P=(process.env.THURSDAY_TOOL_PATH?.split(":")??[(0,n.join)(b,"node_modules",".bin")]).filter(Boolean),E=(0,n.join)(g,o.PATHS.artifacts),R=[o.PATHS.artifacts,o.PATHS.projects,o.PATHS.scratch,o.PATHS.bots],I=new Set([...R,".agents"]),v=".playwright-cli",H=(t,e)=>e===t||e.startsWith(t+n.sep),O=t=>(0,a.realpath)(t).catch(()=>null);async function L(t){let e=await O(g)??g,r=(0,n.resolve)(g,t);if(!H(g,r))return null;let a=r,i=await O(a);for(;null===i&&(0,n.dirname)(a)!==a;)a=(0,n.dirname)(a),i=await O(a);if(null===i)return null;let o=(0,n.relative)(a,r),s=o?(0,n.join)(i,o):i;return H(e,s)?s:null}function j(t,e){return`${o.PATHS.scratch}/${(0,_.slug)(e)||"job"}-${t.slice(0,6)}`}let k=t=>`${o.PATHS.bots}/${t.replace(/[^\p{L}\p{N}_-]+/gu,"-")}`,W=t=>`${o.PATHS.artifacts}/${t.replace(/[^\p{L}\p{N}_-]+/gu,"-")}`;async function C(t){let e=k(t),r=W(t);return await Promise.all([e,r].map(t=>(0,a.mkdir)((0,n.join)(g,t),{recursive:!0}))),{own:e,artifacts:r}}async function x(t,e){let r=j(t,e);return await (0,a.mkdir)((0,n.join)(g,r),{recursive:!0}),r}let D=t=>({PLAYWRIGHT_MCP_BROWSER:"chromium",...t?{PLAYWRIGHT_CLI_SESSION:`thread-${t}`,PLAYWRIGHT_MCP_VIEWPORT_SIZE:o.BROWSER_VIEWPORT}:{}}),N=null,B={runtimes:["node","python3","uv","bun","deno"],managers:["pnpm","npm","yarn"]};async function F(t){let e=Object.values(B).flat(),{stdout:r}=await t.exec(e.map(t=>`command -v ${t} >/dev/null 2>&1 && printf '%s ' ${t}`).join("; "),{timeoutMs:1e4}),a=new Set(r.trim().split(/\s+/).filter(Boolean)),i=t=>({found:t.filter(t=>a.has(t)),missing:t.filter(t=>!a.has(t))});return{runtimes:i(B.runtimes),managers:i(B.managers),browser:N}}async function U(){if(process.env.THURSDAY_SKIP_BROWSER)return;let t=await ti(),e=await t.exec("playwright-cli install-browser chromium").catch(t=>({exitCode:1,stderr:String(t)}));(N=0===e.exitCode)||m.logger.warn(`no browser — bots cannot open a page until \`playwright-cli install-browser chromium\` succeeds: ${e.stderr.trim().split("\n").at(-1)??""}`)}async function Y(){await Q(),await V()}async function G(t,e){let{browsers:r}=JSON.parse((await t.exec("playwright-cli list --json",{env:e,timeoutMs:o.BROWSER_CLI.readMs})).stdout||"{}");return r??[]}async function K(t){await X(t,await z(t,!1))}async function J(t){await z(t,!0)}async function q(t){await X(t,await z(t,!0))}async function X(t,e){let r=await Z(),i=D(t).PLAYWRIGHT_CLI_SESSION;for(let t of(await (0,a.readdir)(r).catch(()=>[]))){let o=t.startsWith("ud-")?t.slice(3):t;(o===i||o.startsWith(`${i}-`)||o.startsWith(`${i}.`))&&(e.some(t=>o===t||o.startsWith(`${t}-`)||o.startsWith(`${t}.`))||await (0,a.rm)((0,n.join)(r,t),{recursive:!0,force:!0}).catch(e=>m.logger.warn(`browser data ${t}: ${String(e)}`)))}}async function Z(){let t=process.env.XDG_CACHE_HOME||(0,n.join)((0,i.homedir)(),".cache"),r=await (0,a.realpath)(g).catch(()=>g);return(0,n.join)(t,"ms-playwright","daemon",(0,e.createHash)("sha1").update(r).digest("hex").slice(0,16))}async function z(t,e){let a=await ti(),i=D(t),n=await G(a,i).then(t=>t.filter(t=>t.name===i.PLAYWRIGHT_CLI_SESSION||t.name.startsWith(`${i.PLAYWRIGHT_CLI_SESSION}-`))).catch(()=>[]),s=n.length?await Z():"";s&&!(0,r.existsSync)(s)&&m.logger.warn(`playwright-cli keeps this workspace's browsers somewhere other than ${s}: removing a thread will leave its browser profiles on disk`);let l=[];for(let t of n){if(t.attached||!e&&!1!==t.headed){l.push(t.name);continue}await a.exec("playwright-cli close",{env:{...i,PLAYWRIGHT_CLI_SESSION:t.name},timeoutMs:o.BROWSER_CLI.readMs}).catch(()=>{})}return await Y(),l}let V=()=>tt(o.PATHS.output),Q=()=>tt(v);async function tt(t){let e=(0,n.join)(g,t),r=await (0,a.readdir)(e,{withFileTypes:!0}).catch(()=>[]),i=Date.now()-o.WORKSPACE_KEEP.forMs;for(let t of r){if(!t.isFile())continue;let r=(0,n.join)(e,t.name),o=await (0,a.stat)(r).catch(()=>null);o&&o.mtimeMs<i&&await (0,a.unlink)(r).catch(()=>{})}}async function te(){return(await (0,a.readdir)((0,n.join)(g,o.PATHS.scratch),{withFileTypes:!0}).catch(()=>[])).filter(t=>t.isDirectory()).map(t=>`${o.PATHS.scratch}/${t.name}`)}async function tr(t){let e=Date.now()-o.WORKSPACE_KEEP.forMs,r=[];for(let i of t){let t=(0,n.join)(g,i),o=await (0,a.stat)(t).catch(()=>null);o?.isDirectory()&&!(o.mtimeMs>=e)&&(await (0,a.rm)(t,{recursive:!0,force:!0}).catch(()=>{}),r.push(i))}return r}let ta={"pnpm-workspace.yaml":"packages:\n - '**'\n",".npmrc":"recursive-install=false\n"};async function ti(){for(let t of[...R,".playwright"])await (0,a.mkdir)((0,n.join)(g,t),{recursive:!0});for(let[t,e]of Object.entries(ta))await (0,a.writeFile)((0,n.join)(g,t),e,{flag:"wx"}).catch(()=>{});return(({workingDirectory:t,spill:e,toolPath:r})=>{let i=(0,n.resolve)(t),o=(r??[]).filter(Boolean).join(":"),s=t=>t.startsWith("/")||/^[A-Za-z]:/.test(t)?t:(0,n.resolve)(i,t);return{cwd:i,resolve:s,readFile:(t,e)=>(0,a.readFile)(s(t),e),async writeFile(t,e){let r=s(t);await (0,a.mkdir)((0,n.join)(r,".."),{recursive:!0}),await (0,a.writeFile)(r,e)},readdir:(t,e)=>(0,a.readdir)(s(t),e),fold:(t,r="output")=>A(t,r,i,e),async listFiles(t,{limit:e=200,skip:r=[]}={}){let a=s(t),i=[];for await(let t of M(a)){let e=(0,n.relative)(a,t).split(n.sep).join("/");r.includes(e.split("/")[0]??"")||i.push(e)}return i.sort((t,e)=>t.split("/").length-e.split("/").length||(t<e?-1:+(t>e))),{files:i.slice(0,e),total:i.length}},exec:(t,{cwd:r,timeoutMs:a=y.EXEC_TIMEOUT_MS,signal:n,env:l}={})=>new Promise(c=>{let u,h,d=function(){let t={...process.env};for(let e of Object.keys(t))($.test(e)||/KEY|TOKEN|SECRET|PASSWORD|CREDENTIAL|_AUTH/i.test(e))&&delete t[e];return t.TERM="dumb",t.PAGER="cat",t.GIT_PAGER="cat",t}();o&&(d.PATH=`${d.PATH??""}:${o}`);let f=(0,S.spawn)(t,{shell:!0,cwd:r?s(r):i,env:{...d,...l},detached:!0}),p="",w="";f.stdout?.on("data",t=>p+=t),f.stderr?.on("data",t=>w+=t);let m=t=>{try{f.pid&&process.kill(-f.pid,t)}catch{f.kill(t)}},T=!1,M=async t=>{T||(T=!0,clearTimeout(b),clearTimeout(u),clearTimeout(h),n?.removeEventListener("abort",g),c({...t,stdout:await A(t.stdout,"stdout",i,e),stderr:await A(t.stderr,"stderr",i,e)}))},_=t=>{u||T||(w+=`
|
|
6
|
+
[${t}]`,m("SIGTERM"),u=setTimeout(()=>{w+="\n[Killed: it did not exit on SIGTERM]",m("SIGKILL"),h=setTimeout(()=>{f.stdout?.destroy(),f.stderr?.destroy(),M({stdout:p,stderr:w,exitCode:-1})},1e3)},y.EXEC_KILL_GRACE_MS))},b=setTimeout(()=>_(`Timed out after ${a}ms`),a),g=()=>_("Aborted");n?.aborted?g():n?.addEventListener("abort",g,{once:!0}),f.on("close",t=>M({stdout:p,stderr:w,exitCode:t??-1})),f.on("error",t=>M({stdout:p,stderr:w+String(t),exitCode:-1}))})}})({workingDirectory:g,spill:{dir:o.PATHS.output,...o.TOOL_OUTPUT},toolPath:P})}async function tn(t,e){let r=t.map(t=>(0,n.resolve)(g,t));if(e){let t=0;for await(let a of M((0,n.join)(g,e)))if(r.push(a),(t+=1)>=o.JOB_FOLDER_WALK)break}let i=new Map;for(let t of r){let e=await (0,a.stat)(t).catch(()=>null);if(!e?.isFile())continue;let r=(0,n.relative)(g,t);i.set(r&&!r.startsWith("..")?r:t,e.mtimeMs)}return[...i].sort((t,e)=>t[1]-e[1]).map(([t])=>t)}async function to(t,e){let r=j(t,e);await (0,a.rm)((0,n.join)(g,r),{recursive:!0,force:!0}).catch(t=>m.logger.warn(`job folder ${r}: ${String(t)}`))}t.s(["WORKSPACE",0,g,"botArtifacts",0,W,"botBrowserSession",0,(t,r)=>`${t}-bot-${(0,e.createHash)("sha256").update(r.trim().toLowerCase()).digest("hex").slice(0,20)}`,"botFolder",0,k,"botShellEnv",0,(t,e)=>({THURSDAY_BOT:t,THURSDAY_BOT_MARK:JSON.stringify(function(t,e){let{head:r,eyes:a}=function(t,e=f.shape){let r=(t,e)=>(function(t){let e=t.tilt*Math.PI/180,r=Math.cos(e),a=Math.sin(e),i=(e,i)=>[t.cx+e*r-i*a,t.cy+e*a+i*r],n=-t.len/2,o=t.len/2,s=[],l=[];for(let e=0;e<=30;e++){let r=e/30,a=1-r,c=a*a*n+r*r*o,u=-(2*a*r*t.bend),h=-(2*a*n)+2*r*o,d=-(2*a*t.bend)+2*r*t.bend,f=Math.hypot(h,d)||1,p=-d/f,w=h/f,m=t.width/2*Math.sin(Math.PI*r)**t.taper;s.push(i(c+p*m,u+w*m)),l.push(i(c-p*m,u-w*m))}let u=`M${c(s[0][0])} ${c(s[0][1])}`;for(let t=1;t<=30;t++)u+=`L${c(s[t][0])} ${c(s[t][1])}`;for(let t=29;t>=0;t--)u+=`L${c(l[t][0])} ${c(l[t][1])}`;return`${u}Z`})({len:f.eyeLen,width:f.eyeWidth,bend:f.eyeBend,taper:f.eyeTaper,tilt:e,cx:t,cy:f.eyeY});return{head:function(t){let e=t.map((t,e)=>{let r=e/128*l;return[120+Math.cos(r)*t,120+Math.sin(r)*t]}),r=`M${c(e[0][0])} ${c(e[0][1])}`;for(let t=0;t<128;t++){let a=e[(t-1+128)%128],i=e[t],n=e[(t+1)%128],o=e[(t+2)%128],s=i[0]+(n[0]-a[0])/6,l=i[1]+(n[1]-a[1])/6,u=n[0]-(o[0]-i[0])/6,h=n[1]-(o[1]-i[1])/6;r+=`C${c(s)} ${c(l)} ${c(u)} ${c(h)} ${c(n[0])} ${c(n[1])}`}return`${r}Z`}(function(t,e,r){var a,i,n;let o=`${"poly"===e?`poly|${t.sides}|${t.corner}|${t.rotation}|${r}`:"squircle"===e?`squircle|${t.squircle}|${r}`:"heart"===e?`heart|${r}`:`blob|${t.wobble}|${r}`}|${t.autofit}`,s=w.get(o);if(s)return s;let c=function(t){let e=Array(128);for(let r=0;r<128;r++){let a=r/128*l,i=Math.cos(a),n=Math.sin(a),o=0;for(let e=0;e<t.length;e++){let r=t[e],a=t[(e+1)%t.length],s=a[0]-r[0],l=a[1]-r[1],c=i*l-n*s;if(1e-9>Math.abs(c))continue;let u=r[0]-120,h=r[1]-120,d=(u*l-h*s)/c,f=(u*n-h*i)/c;d>o&&f>=-1e-9&&f<=1+1e-9&&(o=d)}e[r]=o||112}return e}((a=t,i=e,n=r,"squircle"===i?function(t){let e=[],r=2/t;for(let t=0;t<360;t++){let a=t/360*l,i=Math.cos(a),n=Math.sin(a);e.push([120+Math.sign(i)*Math.abs(i)**r*112,120+Math.sign(n)*Math.abs(n)**r*112])}return e}(a.squircle):"poly"===i?function(t,e,r){let a=r*Math.PI/180-Math.PI/2,i=[];for(let e=0;e<t;e++){let r=a+e/t*l;i.push([120+112*Math.cos(r),120+112*Math.sin(r)])}let n=(Math.PI-l/t)/2,o=224*Math.sin(Math.PI/t)/2*Math.tan(n)*Math.min(1,Math.max(.001,e)),s=o/Math.tan(n),c=[];for(let e=0;e<t;e++){let r=i[e],a=i[(e-1+t)%t],u=i[(e+1)%t],f=d(h(a,r)),p=d(h(u,r)),w=[r[0]+f[0]*s,r[1]+f[1]*s],m=d([f[0]+p[0],f[1]+p[1]]),S=[r[0]+m[0]*o/Math.sin(n),r[1]+m[1]*o/Math.sin(n)],y=Math.atan2(w[1]-S[1],w[0]-S[0]),T=[r[0]+p[0]*s,r[1]+p[1]*s],M=Math.atan2(T[1]-S[1],T[0]-S[0])-y;for(;M>Math.PI;)M-=l;for(;M<-Math.PI;)M+=l;for(let t=0;t<=20;t++){let e=y+t/20*M;c.push([S[0]+Math.cos(e)*o,S[1]+Math.sin(e)*o])}}return c}(a.sides,a.corner,a.rotation):"heart"===i?function(){let t=[];for(let e=0;e<400;e++){let r=e/400*l,a=16*Math.sin(r)**3,i=13*Math.cos(r)-5*Math.cos(2*r)-2*Math.cos(3*r)-Math.cos(4*r);t.push([120+6.6*a,120-(i+2.2)*7.26])}return t}():function(t,e){let r=u(t),a=[1,2,3,4,5].map(t=>({k:t,a:(2*r()-1)/t,p:r()*l})),i=[],n=0;for(let t=0;t<360;t++){let e=t/360*l,r=0;for(let t of a)r+=t.a*Math.sin(t.k*e+t.p);i.push(r),n=Math.max(n,Math.abs(r))}let o=n>0?e/n:0;return i.map((t,e)=>{let r=e/360*l,a=112*(1+t*o);return[120+Math.cos(r)*a,120+Math.sin(r)*a]})}(n,a.wobble))),f="blob"===e?c:"heart"===e?function(t,e){let r=t;for(let t=0;t<2;t++){let t=r;r=t.map((e,r)=>{let a=0;for(let e=-3;e<=3;e++)a+=t[(r+e+128)%128];return a/7})}let a=r.reduce((t,e)=>t+e,0)/128,i=p(r.map(t=>.95*t+.05*a),e,.05),n=Math.round((2*u(20977^e)()-1)*3);return n?i.map((t,e)=>i[(e-n+256)%128]):i}(c,r):p(c,r),m=t.autofit?function(t){let e=l/128,r=0,a=0;for(let i of t)r+=.5*i*i*e,i>a&&(a=i);if(r<=0)return t;let i=Math.min(Math.sqrt(112*Math.PI*112/r),130/a);return t.map(t=>t*i)}(f):f;return w.size>400&&w.clear(),w.set(o,m),m}(f,e,function(t){if("number"==typeof t)return t;let e=0x811c9dc5;for(let r=0;r<t.length;r++)e=Math.imul(e^t.charCodeAt(r),0x1000193);return(e>>>0)%1e4}(t))),eyes:[r(120-f.eyeGap/2,f.eyeTilt),r(120+f.eyeGap/2,f.eyeTilt+f.eyeSkew)]}}(t,e?.shape??f.shape),i=e?.paint?s.MARK_PAINTS[e.paint]:null;return{head:r,eyes:a,ink:(0,s.markInk)(e?.color??s.MARK_SYSTEM,!1),paint:i?"aurora"===i.look?i.colors.slice(0,2):[...i.colors]:null,outline:e?.outline===!0}}(t,e)),THURSDAY_ARTIFACTS:(0,n.join)(g,W(t)),THURSDAY_SKILLS:(0,n.join)(o.APP_DIR,o.PATHS.skills.default),THURSDAY_TOOL_OUTPUT:String(o.TOOL_OUTPUT.max),DISABLE_TELEMETRY:"1"}),"browserStateFile",0,()=>`${v}/state-${crypto.randomUUID()}.json`,"closeHiddenBrowser",0,K,"closeJobShell",0,J,"ensureBrowser",0,U,"filesOnDisk",0,tn,"insideWorkspace",0,L,"jobScratch",0,j,"jobShellEnv",0,D,"listBrowsers",0,G,"listScratchFolders",0,te,"openBotFolders",0,C,"openJobScratch",0,x,"openWorkspace",0,ti,"pruneJobFiles",0,Y,"readMachineTools",0,F,"removeJobBrowsers",0,q,"removeJobScratch",0,to,"removeUnchangedFolders",0,tr,"saveBrowserState",0,t=>`mkdir -p ${v} && playwright-cli state-save ${t}`,"writeRefusal",0,function(t,e){if(H(g,t)){let a=(0,n.relative)(g,t),[i,s]=a.split(n.sep);return i&&I.has(i)?e&&i===o.PATHS.artifacts&&s&&s.toLowerCase()!==e.replace(/[^\p{L}\p{N}_-]+/gu,"-").toLowerCase()&&!(0,r.existsSync)((0,n.join)(E,s))?`Not written: ${a} would sit loose at the top of ${o.PATHS.artifacts}/. Your finished work goes in ${W(e)}/.`:null:`Not written: ${a||"the workspace root"} is outside the workspace's folders. Finished work goes under ${e?W(e):o.PATHS.artifacts}/, code under ${o.PATHS.projects}/, your own kit under ${o.PATHS.bots}/, and this job's working material under ${o.PATHS.scratch}/.`}return H(b,t)?`Not written: ${t} is inside the app that is running you, not the user's files. Work in ${g}; outside it, write only where the user pointed you.`:null}],871096)}];
|
|
7
7
|
|
|
8
8
|
//# sourceMappingURL=features_workspace_workspace_ts_1iyjroj._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
module.exports=[329280,e=>{e.v(s=>Promise.all(["server/chunks/[externals]_node_readline_1u65a-m._.js","server/chunks/node_modules_consola_dist_chunks_prompt_mjs_02axwqv._.js"].map(s=>e.l(s))).then(()=>s(781937)))}];
|
|
2
2
|
|
|
3
|
-
//# sourceMappingURL=
|
|
3
|
+
//# sourceMappingURL=node_modules_consola_dist_chunks_prompt_mjs_04oxl25._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
module.exports=[329280,e=>{e.v(s=>Promise.all(["server/chunks/[externals]_node_readline_1u65a-m._.js","server/chunks/node_modules_consola_dist_chunks_prompt_mjs_02axwqv._.js"].map(s=>e.l(s))).then(()=>s(781937)))}];
|
|
2
2
|
|
|
3
|
-
//# sourceMappingURL=
|
|
3
|
+
//# sourceMappingURL=node_modules_consola_dist_chunks_prompt_mjs_0g87zst._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
module.exports=[329280,e=>{e.v(s=>Promise.all(["server/chunks/[externals]_node_readline_1u65a-m._.js","server/chunks/node_modules_consola_dist_chunks_prompt_mjs_02axwqv._.js"].map(s=>e.l(s))).then(()=>s(781937)))}];
|
|
2
2
|
|
|
3
|
-
//# sourceMappingURL=
|
|
3
|
+
//# sourceMappingURL=node_modules_consola_dist_chunks_prompt_mjs_1341cnf._.js.map
|
|
@@ -32,7 +32,7 @@ module.exports=[70729,a=>{a.v(a=>Promise.resolve().then(()=>a(666680)))},133300,
|
|
|
32
32
|
|
|
33
33
|
**Ground every claim.** Competitors, prices, search terms and what people say about the problem come from pages you opened, with the link beside them. What you could not check is marked as a guess.
|
|
34
34
|
|
|
35
|
-
**What you keep.** One brief per product — what it is, for whom, against what, in which voice — dated, and every later job starts from it.`}];a.s(["BOT_SEEDS",0,e,"findBotSeed",0,a=>e.find(b=>b.name===a)??null,"rollSeedIcons",0,()=>{let a=(0,d.randomBotIcons)(e.length);return e.map((b,c)=>b.name===d.DEFAULT_BOT.name?d.DEFAULT_BOT_ICON:a[c])}])},343064,a=>{a.v(a=>Promise.resolve().then(()=>a(344853)))},453556,a=>{a.v(a=>Promise.resolve().then(()=>a(233398)))},394298,a=>{a.v(a=>Promise.resolve().then(()=>a(684321)))},451208,a=>a.a(async(b,c)=>{try{var d=a.i(137936),e=a.i(569572),f=a.i(821415),g=a.i(941981),h=a.i(225689),i=a.i(293480),j=a.i(201013),k=a.i(182248),l=a.i(713095),m=b([g]);[g]=m.then?(await m)():m;let o=(0,h.serverAction)(async a=>{let{target:b,full:c}=await n(a);try{await (0,j.openPath)(c)}catch(a){(0,i.publicError)(`Could not open ${b}: ${(0,k.errorToString)(a)}`)}}),p=(0,h.serverAction)(async a=>{let{target:b,full:c}=await n(a);try{await (0,j.revealPath)(c)}catch(a){(0,i.publicError)(`Could not show ${b}: ${(0,k.errorToString)(a)}`)}});async function n(a){let b=a.trim();b||(0,i.publicError)("Which file?");let c=await (0,f.openWorkspace)();return{target:b,full:c.resolve(b)}}let q=(0,h.serverAction)(async a=>{let b=a.trim();b||(0,i.publicError)("Which file?"),await (0,g.deleteWorkspaceFile)(b)}),r=(0,h.serverAction)(async(a,b,c)=>{let d=a.trim();return d||(0,i.publicError)("Which page?"),"string"!=typeof b&&(0,i.publicError)("Nothing to keep."),"string"!=typeof c&&(0,i.publicError)("Which revision?"),(0,g.savePage)(d,b,c)}),s=(0,h.serverAction)(async()=>(0,g.emptyScratch)()),t=(0,h.serverAction)(async a=>{a instanceof FormData||(0,i.publicError)("No files came with that.");let b=a.getAll("file").filter(a=>a instanceof File&&a.size>0);b.length||(0,i.publicError)("No files came with that."),b.length>e.GIVEN_FILES.perMessage&&(0,i.publicError)(`At most ${e.GIVEN_FILES.perMessage} files at a time.`);let c=b.find(a=>a.size>e.GIVEN_FILES.maxBytes);return c&&(0,i.publicError)(`${c.name} is larger than ${Math.round(e.GIVEN_FILES.maxBytes/1024/1024)} MB.`),(0,g.keepGivenFiles)(b)});(0,l.ensureServerEntryExports)([o,p,q,r,s,t]),(0,d.registerServerReference)(o,"
|
|
35
|
+
**What you keep.** One brief per product — what it is, for whom, against what, in which voice — dated, and every later job starts from it.`}];a.s(["BOT_SEEDS",0,e,"findBotSeed",0,a=>e.find(b=>b.name===a)??null,"rollSeedIcons",0,()=>{let a=(0,d.randomBotIcons)(e.length);return e.map((b,c)=>b.name===d.DEFAULT_BOT.name?d.DEFAULT_BOT_ICON:a[c])}])},343064,a=>{a.v(a=>Promise.resolve().then(()=>a(344853)))},453556,a=>{a.v(a=>Promise.resolve().then(()=>a(233398)))},394298,a=>{a.v(a=>Promise.resolve().then(()=>a(684321)))},451208,a=>a.a(async(b,c)=>{try{var d=a.i(137936),e=a.i(569572),f=a.i(821415),g=a.i(941981),h=a.i(225689),i=a.i(293480),j=a.i(201013),k=a.i(182248),l=a.i(713095),m=b([g]);[g]=m.then?(await m)():m;let o=(0,h.serverAction)(async a=>{let{target:b,full:c}=await n(a);try{await (0,j.openPath)(c)}catch(a){(0,i.publicError)(`Could not open ${b}: ${(0,k.errorToString)(a)}`)}}),p=(0,h.serverAction)(async a=>{let{target:b,full:c}=await n(a);try{await (0,j.revealPath)(c)}catch(a){(0,i.publicError)(`Could not show ${b}: ${(0,k.errorToString)(a)}`)}});async function n(a){let b=a.trim();b||(0,i.publicError)("Which file?");let c=await (0,f.openWorkspace)();return{target:b,full:c.resolve(b)}}let q=(0,h.serverAction)(async a=>{let b=a.trim();b||(0,i.publicError)("Which file?"),await (0,g.deleteWorkspaceFile)(b)}),r=(0,h.serverAction)(async(a,b,c)=>{let d=a.trim();return d||(0,i.publicError)("Which page?"),"string"!=typeof b&&(0,i.publicError)("Nothing to keep."),"string"!=typeof c&&(0,i.publicError)("Which revision?"),(0,g.savePage)(d,b,c)}),s=(0,h.serverAction)(async()=>(0,g.emptyScratch)()),t=(0,h.serverAction)(async a=>{a instanceof FormData||(0,i.publicError)("No files came with that.");let b=a.getAll("file").filter(a=>a instanceof File&&a.size>0);b.length||(0,i.publicError)("No files came with that."),b.length>e.GIVEN_FILES.perMessage&&(0,i.publicError)(`At most ${e.GIVEN_FILES.perMessage} files at a time.`);let c=b.find(a=>a.size>e.GIVEN_FILES.maxBytes);return c&&(0,i.publicError)(`${c.name} is larger than ${Math.round(e.GIVEN_FILES.maxBytes/1024/1024)} MB.`),(0,g.keepGivenFiles)(b)});(0,l.ensureServerEntryExports)([o,p,q,r,s,t]),(0,d.registerServerReference)(o,"7fe61c424a192eff8b33705563234528ffd3439904",null),(0,d.registerServerReference)(p,"7fb306c03a36ba57f08b97ce0197e84dfde019688e",null),(0,d.registerServerReference)(q,"7f63eb7eb8847592bfa5a261159d6461de9da119dd",null),(0,d.registerServerReference)(r,"7f4457235d7fbf5ecbfad58feb9d9f75eb0f89ccec",null),(0,d.registerServerReference)(s,"7fcb96e35b94bbe0a1a67aa6a0844d6a26346965f3",null),(0,d.registerServerReference)(t,"7f437b7e9ad4bf7261b89d1fcf6c445f53cd95d337",null),a.s(["deleteWorkspaceFileAction",0,q,"emptyScratchAction",0,s,"giveFilesAction",0,t,"openFileAction",0,o,"revealFileAction",0,p,"savePageAction",0,r]),c()}catch(a){c(a)}},!1),122690,a=>{a.v(a=>Promise.resolve().then(()=>a(821415)))},225689,a=>{"use strict";var b=a.i(422842);a.s(["serverAction",0,a=>(...c)=>(0,b.toResult)(()=>a(...c))])},201013,a=>{"use strict";var b=a.i(874533),c=a.i(912714),d=a.i(750227),e=a.i(812057);let f={darwin:a=>["open",[a]],win32:a=>["cmd.exe",["/c","start","",a]],linux:a=>["xdg-open",[a]]},g={darwin:a=>["open",["-R",a]],win32:a=>["explorer.exe",[`/select,${a}`]],linux:a=>["xdg-open",[(0,d.dirname)(a)]]};async function h(a){await (0,c.access)(a),await j(f,a)}async function i(a){let b=await (0,c.stat)(a);await j(b.isDirectory()?f:g,a)}async function j(a,c){let d=a[process.platform]?.(c);if(!d)throw Error(`Opening files is not wired up on ${process.platform}.`);let[f,g]=d;await (0,e.promisify)(b.execFile)(f,g,{windowsHide:!0}).catch(a=>{if("explorer.exe"!==f)throw a})}a.s(["openPath",0,h,"revealPath",0,i])},682672,a=>{a.v(a=>Promise.resolve().then(()=>a(72918)))},966249,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@vercel_oidc_dist_token_16gdpgb.js"].map(b=>a.l(b))).then(()=>b(860544)))},832030,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[externals]_node_readline_1u65a-m._.js","server/chunks/ssr/node_modules_consola_dist_chunks_prompt_mjs_1j4x-_j._.js"].map(b=>a.l(b))).then(()=>b(322479)))},713095,(a,b,c)=>{"use strict";function d(a){for(let b=0;b<a.length;b++){let c=a[b];if("function"!=typeof c)throw Object.defineProperty(Error(`A "use server" file can only export async functions, found ${typeof c}.
|
|
36
36
|
Read more: https://nextjs.org/docs/messages/invalid-use-server-value`),"__NEXT_ERROR_CODE",{value:"E352",enumerable:!1,configurable:!0})}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ensureServerEntryExports",{enumerable:!0,get:function(){return d}})},137936,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"registerServerReference",{enumerable:!0,get:function(){return d.registerServerReference}});let d=a.r(211857)}];
|
|
37
37
|
|
|
38
|
-
//# sourceMappingURL=%5Broot-of-the-server%
|
|
38
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__07660xu._.js.map
|