thursday-agent 0.9.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +0 -1
- package/.next/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/routes-manifest.json +0 -6
- package/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +2 -2
- package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/api/artifact/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/keep-working/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/memory/files/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/memory/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/thread/[id]/route.js.nft.json +1 -1
- 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.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.nft.json +1 -1
- package/.next/server/app/api/memory/route.js.nft.json +1 -1
- package/.next/server/app/api/reach/route.js +13 -13
- package/.next/server/app/api/reach/route.js.nft.json +1 -1
- package/.next/server/app/api/routine/route.js.nft.json +1 -1
- package/.next/server/app/api/signins/route.js +1 -1
- package/.next/server/app/api/signins/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/[source]/[name]/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/call/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/text/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/tool-call/route.js +14 -15
- package/.next/server/app/api/thursday/tool-call/route.js.nft.json +1 -1
- package/.next/server/app/api/workspace/files/route.js.nft.json +1 -1
- package/.next/server/app/api/workspace/route.js.nft.json +1 -1
- package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +1 -1
- package/.next/server/app/artifact/[...path]/page.js.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 +56 -56
- package/.next/server/app/page.js +4 -4
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +0 -1
- package/.next/server/chunks/[root-of-the-server]__014ydvq._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__0209ah4._.js +7 -5
- package/.next/server/chunks/[root-of-the-server]__04r4h-2._.js +4 -2
- package/.next/server/chunks/[root-of-the-server]__0542v_d._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0gewdg9._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__0mrk2it._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1-swlkw._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__12iddfq._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1ai5lme._.js +3 -3
- package/.next/server/chunks/[root-of-the-server]__1cjxw0-._.js +2 -2
- package/.next/server/chunks/{[root-of-the-server]__1fy2g82._.js → [root-of-the-server]__1k3j52n._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__1kyjt5m._.js +3 -3
- package/.next/server/chunks/[root-of-the-server]__1ygplx1._.js +1 -1
- package/.next/server/chunks/_05v8k21._.js +3 -1
- package/.next/server/chunks/_0awtznl._.js +1 -1
- package/.next/server/chunks/_0na2fj1._.js +1 -1
- package/.next/server/chunks/_0x-ej3f._.js +17 -17
- package/.next/server/chunks/_12-amdu._.js +2 -2
- package/.next/server/chunks/_15740dw._.js +60 -0
- package/.next/server/chunks/_1dc_d1q._.js +3 -3
- package/.next/server/chunks/_1i350l5._.js +3 -1
- package/.next/server/chunks/_1jc5g4p._.js +2 -2
- package/.next/server/chunks/_1jn-aep._.js +4 -4
- package/.next/server/chunks/_1m88lkh._.js +11 -11
- package/.next/server/chunks/_1ogqovh._.js +4 -4
- package/.next/server/chunks/_1uuucy-._.js +1 -1
- package/.next/server/chunks/_1zxp-p6._.js +1 -1
- package/.next/server/chunks/features_0rfvely._.js +5 -3
- package/.next/server/chunks/ssr/{[root-of-the-server]__1se25x0._.js → [root-of-the-server]__0hpp3nw._.js} +29 -13
- package/.next/server/chunks/ssr/[root-of-the-server]__0m7u9j-._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0tzekbl._.js +24 -60
- package/.next/server/chunks/ssr/[root-of-the-server]__1cz2rz5._.js +3 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__0tvavy9._.js → [root-of-the-server]__1iwyp1e._.js} +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__1w9hqq8._.js +1 -1
- package/.next/server/chunks/ssr/_097-ljd._.js +1 -1
- package/.next/server/chunks/ssr/{_1tmu8z-._.js → _0btzccu._.js} +2 -2
- package/.next/server/chunks/ssr/_0fqhhwi._.js +1 -1
- package/.next/server/chunks/ssr/_0hjzb5o._.js +3 -0
- package/.next/server/chunks/ssr/_0ld9_qq._.js +1 -1
- package/.next/server/chunks/ssr/{_0urj3mc._.js → _0ouzu9f._.js} +2 -2
- package/.next/server/chunks/ssr/{_1-zyvdb._.js → _0u7ko71._.js} +2 -2
- package/.next/server/chunks/ssr/{_0ltz2q5._.js → _0wd_o8-._.js} +2 -2
- package/.next/server/chunks/ssr/_0ya0cb0._.js +3 -0
- package/.next/server/chunks/ssr/_10yyqtk._.js +67 -0
- package/.next/server/chunks/ssr/{_1uy0xom._.js → _12eyown._.js} +3 -3
- package/.next/server/chunks/ssr/_12mijol._.js +11 -11
- package/.next/server/chunks/ssr/_132qkfz._.js +1 -1
- package/.next/server/chunks/ssr/_184327j._.js +1 -1
- package/.next/server/chunks/ssr/{_1z74dmq._.js → _19ps4p3._.js} +7 -7
- package/.next/server/chunks/ssr/{_1flbs77._.js → _1bhy4yg._.js} +2 -2
- package/.next/server/chunks/ssr/_1d423aj._.js +7 -5
- package/.next/server/chunks/ssr/{_1a-nuxx._.js → _1kd843u._.js} +2 -2
- package/.next/server/chunks/ssr/{_0ital-2._.js → _1kq2ye_._.js} +2 -2
- package/.next/server/chunks/ssr/_1mqn9mc._.js +1 -1
- package/.next/server/chunks/ssr/_1neoj22._.js +1 -1
- package/.next/server/chunks/ssr/_1p8xorg._.js +3 -0
- package/.next/server/chunks/ssr/{_1x-kojb._.js → _1q683w8._.js} +3 -3
- package/.next/server/chunks/ssr/_1tawxu2._.js +3 -0
- package/.next/server/chunks/ssr/{_0scf7xy._.js → _1w2oba6._.js} +2 -2
- package/.next/server/chunks/ssr/_1xoch6f._.js +1 -1
- package/.next/server/chunks/ssr/{_0kjj5ts._.js → _1ybo1hd._.js} +3 -3
- package/.next/server/chunks/ssr/features_bot_0s11m4r._.js +3 -0
- package/.next/server/chunks/ssr/features_connectors_components_mcp-setting_tsx_0jmbgvp._.js +1 -1
- package/.next/server/chunks/ssr/features_memory_components_memory-setting_tsx_0oa43sw._.js +1 -1
- package/.next/server/chunks/ssr/features_routine_components_routine-setting_tsx_055fknz._.js +1 -1
- package/.next/server/chunks/ssr/features_workspace_00jz2hu._.js +1 -1
- package/.next/server/chunks/ssr/{node_modules_1af3w91._.js → node_modules_00pocul._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0th357h._.js → node_modules_02zt4az._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0jljel9._.js → node_modules_05ojmcl._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0wnlddw._.js → node_modules_06i6bli._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_06bb4q8._.js → node_modules_09dj429._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_068ws5v._.js → node_modules_0auzgvx._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1ogczzz._.js → node_modules_0evjwh1._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_13kwejm._.js → node_modules_0gmdur8._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1s-gb-1._.js → node_modules_0j3te-1._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1bucjlk._.js → node_modules_0rbaymq._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1wbkzl9._.js → node_modules_0tf8_1e._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_12et8d5._.js → node_modules_0yqy-0b._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1lkix61._.js → node_modules_1-53ebx._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_03d0rfz._.js → node_modules_1-y9aho._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0x630an._.js → node_modules_11bltzp._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0uyh_vb._.js → node_modules_18jn2qo._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0dzm4um._.js → node_modules_1_te3bu._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_07rs_p2._.js → node_modules_1c0pg3k._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0sgy-dc._.js → node_modules_1en2jx5._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0ubdtk-._.js → node_modules_1p-c8cr._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1z1lrbk._.js → node_modules_1qe-oxg._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_04_sbbc._.js → node_modules_1rjt833._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0yvz9e0._.js → node_modules_1tzw5sn._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1uwg-gz._.js → node_modules_1x6uwvn._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0t_ez6-._.js → node_modules_1zqddke._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_05ybmta._.js → node_modules_211zgim._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0r443fh._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0y51bqj._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_10wnlbk._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1sc114e._.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 +57 -57
- package/.next/static/chunks/{13ixzheqw7o-w.js → 03-724sj0nk_z.js} +2 -2
- package/.next/static/chunks/03bhu4mk8en2q.js +1 -0
- package/.next/static/chunks/{3h2e-xv1zxh_f.js → 04imzjhvzw65d.js} +2 -2
- package/.next/static/chunks/{27tvv1i-smrck.js → 0gljzv9fz1g7d.js} +1 -1
- package/.next/static/chunks/{37j27b3e1gt7r.js → 0h0lythv1ql93.js} +1 -1
- package/.next/static/chunks/{2o4dndk0d68do.js → 0hzbj7f48cmx0.js} +1 -1
- package/.next/static/chunks/0lwunwbl7u7pt.js +1 -0
- package/.next/static/chunks/{0u9ae9k_2g7k3.js → 0r6nwxg4dv83t.js} +1 -1
- package/.next/static/chunks/0rn9nbg6aif9f.js +17 -0
- package/.next/static/chunks/{3bbzsitgiltnt.js → 0x_w4shtvrrfg.js} +1 -1
- package/.next/static/chunks/{2sdwbfs1x5skp.js → 0ympuji_ufypd.js} +1 -1
- package/.next/static/chunks/{3t9huugh-5_ps.js → 0zmrz4zfzm4dt.js} +1 -1
- package/.next/static/chunks/{0qmd8n52hp-6v.js → 11tlxkr7a_rpc.js} +1 -1
- package/.next/static/chunks/{2c64drdevdla3.js → 12scesro428m7.js} +2 -2
- package/.next/static/chunks/16s2fx3890_jd.js +65 -0
- package/.next/static/chunks/{0oyz95sujd2c7.js → 1qzfgplyo18tc.js} +1 -1
- package/.next/static/chunks/{04e-e--5lk26x.js → 1r4zajz14jp9-.js} +1 -1
- package/.next/static/chunks/1s6m4cmbn7htf.js +1 -0
- package/.next/static/chunks/1wl9t1-3i-q8p.css +1 -0
- package/.next/static/chunks/2-asot3p1j3yg.js +1 -0
- package/.next/static/chunks/{0u3ktztrzu1fa.js → 2-jn4xscbm-i2.js} +1 -1
- package/.next/static/chunks/22h9gvclqtx_2.js +1 -0
- package/.next/static/chunks/{337g9g_ux2gj-.js → 26-eblxwnykck.js} +1 -1
- package/.next/static/chunks/{43q9cgbuw8krx.js → 2kzwhbuobpkw3.js} +2 -2
- package/.next/static/chunks/2m6jd3586ijb-.js +1 -0
- package/.next/static/chunks/{0_awn8tucznxc.js → 304q9p54tcgm1.js} +1 -1
- package/.next/static/chunks/{1u5i-jti87jbo.js → 35wdx3wt7cg4a.js} +1 -1
- package/.next/static/chunks/37unh9460im7v.js +18 -0
- package/.next/static/chunks/{01xjer0i_e5z5.js → 39gj5vxz1zpm_.js} +1 -1
- package/.next/static/chunks/{427qsc6kahxyo.js → 39vrqy1r_00jc.js} +1 -1
- package/.next/static/chunks/{245hb85nsy6j4.js → 3dipmu0mptqum.js} +1 -1
- package/.next/static/chunks/3gki-squw28yu.js +1 -0
- package/.next/static/chunks/{3obf9n3cxj99k.js → 3jvldk2wvwbge.js} +1 -1
- package/.next/static/chunks/{38301ji-85i30.js → 3nnzdl_te20hv.js} +1 -1
- package/.next/static/chunks/{2m267diam_vib.js → 3tz4dr0_8pq1-.js} +1 -1
- package/.next/static/chunks/{2gocl3dq0_h1s.js → 3x6pggb-2kyrk.js} +1 -1
- package/.next/static/chunks/{025bmrgeukcb2.js → 4440mws9jz3mt.js} +1 -1
- package/README.md +4 -0
- package/app/api/thursday/tool-call/route.ts +1 -15
- package/components/ui/radio-group.tsx +2 -2
- package/docs/images/demo-still.jpg +0 -0
- package/docs/live-calls.md +19 -11
- package/features/ai/prompts/live.prompt.ts +51 -26
- package/features/ai/prompts/prompt-helper.ts +1 -9
- package/features/ai/prompts/thursday.prompt.ts +8 -2
- package/features/bot/bot.run.ts +9 -3
- package/features/bot/bot.seed.ts +35 -91
- package/features/bot/components/bot-room.tsx +0 -6
- package/features/bot/components/bot-setting.tsx +4 -4
- package/features/bot/components/room-pill.tsx +4 -2
- package/features/bot/seed-bots.ts +2 -2
- package/features/intro/components/intro.tsx +2 -3
- package/features/reach/reach.ts +2 -2
- package/features/routine/components/routine-setting.tsx +1 -1
- package/features/signins/signins.query.ts +66 -1
- package/features/thursday/components/side-captions.tsx +31 -8
- package/features/thursday/components/thursday-setting.tsx +5 -5
- package/features/thursday/components/thursday.tsx +97 -39
- package/features/thursday/components/write-line.tsx +28 -17
- package/features/thursday/thursday.action.ts +4 -20
- package/features/thursday/thursday.schema.ts +0 -9
- package/features/thursday/thursday.store.ts +11 -15
- package/features/thursday/thursday.text.ts +10 -8
- package/features/thursday/tool-line.ts +17 -6
- package/features/thursday/use-call-ring.ts +1 -5
- package/features/thursday/use-text-call.ts +37 -21
- package/features/thursday/use-thursday.ts +14 -44
- package/features/workspace/workspace.ts +4 -2
- package/guide/bots.md +13 -3
- package/guide/calls.md +7 -5
- package/knip.json +1 -0
- package/lib/live/live.session.ts +0 -39
- package/package.json +1 -1
- package/scripts/live-session.test.mts +19 -26
- package/seed-skills/analyst/README.md +18 -0
- package/seed-skills/analyst/data-report/SKILL.md +60 -0
- package/seed-skills/analyst/data-report/references/brief.md +31 -0
- package/seed-skills/analyst/data-report/references/company.md +41 -0
- package/seed-skills/analyst/data-report/references/comparison.md +42 -0
- package/seed-skills/analyst/data-report/references/decision.md +28 -0
- package/seed-skills/analyst/data-report/references/market-size.md +49 -0
- package/seed-skills/analyst/data-report/references/price-check.md +33 -0
- package/seed-skills/analyst/data-report/references/sources.md +51 -0
- package/seed-skills/analyst/data-report/references/trend.md +39 -0
- package/seed-skills/analyst/data-report/scripts/fetch.mjs +521 -0
- package/seed-skills/insta/instagram/SKILL.md +36 -0
- package/seed-skills/insta/instagram/references/dm.md +49 -0
- package/seed-skills/insta/instagram/references/post.md +74 -0
- package/seed-skills/insta/instagram/scripts/compose.mjs +333 -0
- package/seed-skills/insta/instagram/scripts/inbox.mjs +163 -0
- package/seed-skills/insta/instagram/scripts/lib.mjs +33 -0
- package/seed-skills/insta/instagram/scripts/media.mjs +104 -0
- package/seed-skills/insta/instagram/scripts/profile.mjs +143 -0
- package/seed-skills/insta/instagram/scripts/read.mjs +244 -0
- package/seed-skills/insta/instagram/scripts/search.mjs +137 -0
- package/seed-skills/insta/instagram/scripts/selectors.mjs +56 -0
- package/seed-skills/insta/instagram/scripts/sheet.mjs +43 -0
- package/seed-skills/insta/instagram/templates/carousel.html +62 -0
- package/seed-skills/marketer/README.md +6 -4
- package/seed-skills/marketer/copywriting/SKILL.md +1 -1
- package/seed-skills/marketer/emails/SKILL.md +1 -1
- package/seed-skills/marketer/launch/SKILL.md +1 -1
- package/seed-skills/marketer/product-marketing/SKILL.md +5 -5
- package/seed-skills/marketer/seo-audit/SKILL.md +1 -1
- package/seed-skills/marketer/social/SKILL.md +1 -1
- package/seed-skills/tutor/picture-book/SKILL.md +16 -0
- package/seed-skills/tutor/picture-book/book/book.css +181 -0
- package/seed-skills/tutor/picture-book/book/book.html +33 -0
- package/seed-skills/tutor/picture-book/book/book.js +60 -0
- package/seed-skills/tutor/picture-book/references/picture-book.md +104 -0
- package/seed-skills/tutor/picture-book/scripts/book-video.mjs +177 -0
- package/seed-skills/tutor/picture-book/scripts/book.mjs +98 -0
- package/skills/browser/SKILL.md +13 -4
- package/skills/browser/references/scripts.md +55 -0
- package/skills/browser/scripts/image-size.mjs +30 -0
- package/skills/browser/scripts/render.mjs +126 -0
- package/skills/browser/scripts/session.mjs +105 -0
- package/skills/browser/scripts/sheet.mjs +97 -0
- package/skills/browser/scripts/webimage.mjs +105 -0
- package/skills/interactive-page/SKILL.md +4 -3
- package/skills/interactive-page/scripts/chart.mjs +679 -0
- package/skills/interactive-page/scripts/page.mjs +1 -0
- package/.next/server/app/api/probe/route/app-paths-manifest.json +0 -3
- package/.next/server/app/api/probe/route/build-manifest.json +0 -12
- package/.next/server/app/api/probe/route/server-reference-manifest.json +0 -4
- package/.next/server/app/api/probe/route.js +0 -10
- package/.next/server/app/api/probe/route.js.map +0 -5
- package/.next/server/app/api/probe/route.js.nft.json +0 -1
- package/.next/server/app/api/probe/route_client-reference-manifest.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__012s2o8._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0z0hc1f._.js +0 -4
- package/.next/server/chunks/[root-of-the-server]__1v7-zke._.js +0 -5
- package/.next/server/chunks/_0whlpyi._.js +0 -4
- package/.next/server/chunks/_next-internal_server_app_api_probe_route_actions_0cqd30j.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0oo-wlv._.js +0 -103
- package/.next/server/chunks/ssr/[root-of-the-server]__0zuns7e._.js +0 -3
- package/.next/server/chunks/ssr/_070nv1_._.js +0 -3
- package/.next/server/chunks/ssr/_0dshsh4._.js +0 -3
- package/.next/server/chunks/ssr/_0l_mcfz._.js +0 -3
- package/.next/server/chunks/ssr/_0u5xv6g._.js +0 -3
- package/.next/server/chunks/ssr/_157yfrk._.js +0 -3
- package/.next/server/chunks/ssr/features_bot_1nr94ks._.js +0 -3
- package/.next/static/chunks/06nt9tatr-dug.js +0 -1
- package/.next/static/chunks/0ge-hx0ed83a1.js +0 -1
- package/.next/static/chunks/0pda_vf-abwvx.js +0 -1
- package/.next/static/chunks/0rowp9rx3qbxu.js +0 -18
- package/.next/static/chunks/1grkt5gr8pbg1.js +0 -17
- package/.next/static/chunks/1yugpvvi8qrbu.js +0 -101
- package/.next/static/chunks/27lkanxvtdn09.js +0 -1
- package/.next/static/chunks/3fec-aeteddr-.js +0 -1
- package/.next/static/chunks/3go3hwp1z2_h2.css +0 -1
- package/.next/static/chunks/3h2bun3hcggg8.js +0 -1
- package/.next/static/chunks/3j1y335o95mj7.js +0 -1
- package/lib/probe.server.ts +0 -17
- package/lib/probe.ts +0 -55
- /package/.next/static/{u8kJqShUAa49vY7BxAWsw → En1vUPazxcYjPjnnahcN5}/_buildManifest.js +0 -0
- /package/.next/static/{u8kJqShUAa49vY7BxAWsw → En1vUPazxcYjPjnnahcN5}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{u8kJqShUAa49vY7BxAWsw → En1vUPazxcYjPjnnahcN5}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Many pictures as one image, each with a label under it, so one look sees them all:
|
|
4
|
+
* a page's photos, rendered slides, a feed's covers. Pictures are fetched by the
|
|
5
|
+
* session's browser (it carries its cookies) and inlined, so the sheet needs no server.
|
|
6
|
+
*
|
|
7
|
+
* node sheet.mjs --out sheet.png <image url | file>... [--cols 4]
|
|
8
|
+
*/
|
|
9
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
10
|
+
import { extname, resolve } from "node:path";
|
|
11
|
+
import { pathToFileURL } from "node:url";
|
|
12
|
+
import { fail, inPage, orFail, parseArgs } from "./session.mjs";
|
|
13
|
+
|
|
14
|
+
const MIME = {
|
|
15
|
+
".png": "image/png",
|
|
16
|
+
".webp": "image/webp",
|
|
17
|
+
".gif": "image/gif",
|
|
18
|
+
".svg": "image/svg+xml",
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Draws `items` — `{ src }` an http(s) url, `{ file }` a local path, or `{ data }` a data
|
|
23
|
+
* URL, each with a `label` — into one PNG at `out`. Resolves to `{ out, missing }`.
|
|
24
|
+
*/
|
|
25
|
+
export async function makeSheet(items, out, cols = 4) {
|
|
26
|
+
const lost = items.find((it) => it.file && !existsSync(it.file));
|
|
27
|
+
if (lost) fail(`No such file: ${lost.file}`);
|
|
28
|
+
const cells = items.map(({ file, ...it }) =>
|
|
29
|
+
file
|
|
30
|
+
? {
|
|
31
|
+
...it,
|
|
32
|
+
data: `data:${MIME[extname(file).toLowerCase()] ?? "image/jpeg"};base64,${readFileSync(file).toString("base64")}`,
|
|
33
|
+
}
|
|
34
|
+
: it,
|
|
35
|
+
);
|
|
36
|
+
return orFail(
|
|
37
|
+
await inPage(
|
|
38
|
+
async (page, { items, out, cols }) => {
|
|
39
|
+
const cells = [];
|
|
40
|
+
for (const it of items) {
|
|
41
|
+
let src = it.data ?? "";
|
|
42
|
+
if (!src && it.src)
|
|
43
|
+
try {
|
|
44
|
+
const r = await page.request.get(it.src, { timeout: 30000 });
|
|
45
|
+
if (r.ok())
|
|
46
|
+
src = `data:${r.headers()["content-type"] ?? "image/jpeg"};base64,${(await r.body()).toString("base64")}`;
|
|
47
|
+
} catch {}
|
|
48
|
+
cells.push({ src, label: it.label });
|
|
49
|
+
}
|
|
50
|
+
const esc = (s) =>
|
|
51
|
+
String(s).replace(/[&<>"]/g, (c) => `&#${c.charCodeAt(0)};`);
|
|
52
|
+
const html = `<!doctype html><meta charset="utf-8"><style>
|
|
53
|
+
body{margin:0;background:#fff;font:13px/1.35 system-ui,sans-serif;color:#111}
|
|
54
|
+
.grid{display:grid;grid-template-columns:repeat(${cols},240px);gap:10px;padding:10px}
|
|
55
|
+
.cell img,.cell .none{width:240px;height:300px;object-fit:contain;background:#e8e8e8;display:block}
|
|
56
|
+
.cell div{padding:3px 2px;height:36px;overflow:hidden}</style>
|
|
57
|
+
<div class="grid">${cells
|
|
58
|
+
.map(
|
|
59
|
+
(c) =>
|
|
60
|
+
`<div class="cell">${c.src ? `<img src="${c.src}">` : `<div class="none"></div>`}<div>${esc(c.label)}</div></div>`,
|
|
61
|
+
)
|
|
62
|
+
.join("")}</div>`;
|
|
63
|
+
const tab = await page.context().newPage();
|
|
64
|
+
try {
|
|
65
|
+
await tab.setViewportSize({ width: cols * 250 + 10, height: 400 });
|
|
66
|
+
await tab.setContent(html, { waitUntil: "load" });
|
|
67
|
+
await tab.screenshot({ path: out, fullPage: true, scale: "css" });
|
|
68
|
+
} finally {
|
|
69
|
+
await tab.close();
|
|
70
|
+
}
|
|
71
|
+
return { out, missing: cells.filter((c) => !c.src).length };
|
|
72
|
+
},
|
|
73
|
+
{ items: cells, out: resolve(out), cols },
|
|
74
|
+
),
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/** Command-line pictures as items: a url stays a url, anything else is a file. */
|
|
79
|
+
export const pictures = (args) =>
|
|
80
|
+
args.map((x, i) =>
|
|
81
|
+
/^https?:/.test(x)
|
|
82
|
+
? { src: x, label: `${i + 1}` }
|
|
83
|
+
: { file: x, label: `${i + 1} ${x.split("/").pop()}` },
|
|
84
|
+
);
|
|
85
|
+
|
|
86
|
+
if (import.meta.url === pathToFileURL(process.argv[1]).href) {
|
|
87
|
+
const opts = parseArgs();
|
|
88
|
+
if (!opts.out || !opts._.length)
|
|
89
|
+
fail(
|
|
90
|
+
"usage: node sheet.mjs --out sheet.png <image url | file>... [--cols 4]",
|
|
91
|
+
);
|
|
92
|
+
const items = pictures(opts._);
|
|
93
|
+
const made = await makeSheet(items, opts.out, Number(opts.cols ?? 4));
|
|
94
|
+
console.log(
|
|
95
|
+
`${made.out} — ${items.length} pictures${made.missing ? `, ${made.missing} did not load` : ""}`,
|
|
96
|
+
);
|
|
97
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Saves the picture a web page shares itself with (og:image, else twitter:image),
|
|
4
|
+
* and with --all the large pictures in its body too, through the session's browser
|
|
5
|
+
* so a site that refuses curl still answers. Prints each file with its size and
|
|
6
|
+
* the credit line to put on the slide.
|
|
7
|
+
*
|
|
8
|
+
* node webimage.mjs <page url> --out <dir> [--all] [--min 600]
|
|
9
|
+
*/
|
|
10
|
+
import { mkdirSync, writeFileSync } from "node:fs";
|
|
11
|
+
import { resolve } from "node:path";
|
|
12
|
+
import { imageSize } from "./image-size.mjs";
|
|
13
|
+
import { fail, inPage, orFail, parseArgs } from "./session.mjs";
|
|
14
|
+
|
|
15
|
+
const opts = parseArgs();
|
|
16
|
+
const url = opts._[0];
|
|
17
|
+
if (!url || !opts.out)
|
|
18
|
+
fail("usage: node webimage.mjs <page url> --out <dir> [--all] [--min 600]");
|
|
19
|
+
const out = resolve(opts.out);
|
|
20
|
+
mkdirSync(out, { recursive: true });
|
|
21
|
+
|
|
22
|
+
const got = orFail(
|
|
23
|
+
await inPage(
|
|
24
|
+
async (page, { url, all, min }) => {
|
|
25
|
+
const res = await page.request.get(url, { timeout: 30000 });
|
|
26
|
+
const html = await res.text();
|
|
27
|
+
const meta = (key) => {
|
|
28
|
+
const tag = html.match(
|
|
29
|
+
new RegExp(`<meta[^>]+(?:property|name)=["']${key}["'][^>]*>`, "i"),
|
|
30
|
+
)?.[0];
|
|
31
|
+
return tag?.match(/content=["']([^"']+)["']/i)?.[1] ?? null;
|
|
32
|
+
};
|
|
33
|
+
const decode = (s) => s?.replace(/&/g, "&").replace(///g, "/");
|
|
34
|
+
// The VM has no URL class
|
|
35
|
+
const origin = url.match(/^https?:\/\/[^/]+/)[0];
|
|
36
|
+
const absolute = (src) =>
|
|
37
|
+
src.startsWith("//")
|
|
38
|
+
? `https:${src}`
|
|
39
|
+
: src.startsWith("/")
|
|
40
|
+
? origin + src
|
|
41
|
+
: src;
|
|
42
|
+
const site =
|
|
43
|
+
decode(meta("og:site_name")) ?? origin.replace(/^https?:\/\//, "");
|
|
44
|
+
const title =
|
|
45
|
+
decode(meta("og:title")) ?? html.match(/<title>([^<]*)/i)?.[1] ?? "";
|
|
46
|
+
const wanted = [decode(meta("og:image")) ?? decode(meta("twitter:image"))]
|
|
47
|
+
.filter(Boolean)
|
|
48
|
+
.map((src) => ({ src: absolute(src), alt: "og:image" }));
|
|
49
|
+
if (all) {
|
|
50
|
+
const tab = await page.context().newPage();
|
|
51
|
+
try {
|
|
52
|
+
await tab.goto(url, { waitUntil: "load", timeout: 45000 });
|
|
53
|
+
await tab.waitForTimeout(1500);
|
|
54
|
+
const found = await tab.evaluate(
|
|
55
|
+
(min) =>
|
|
56
|
+
[...document.images]
|
|
57
|
+
.filter((i) => i.naturalWidth >= min)
|
|
58
|
+
.map((i) => ({ src: i.currentSrc || i.src, alt: i.alt || "" })),
|
|
59
|
+
min,
|
|
60
|
+
);
|
|
61
|
+
for (const f of found)
|
|
62
|
+
if (!wanted.some((w) => w.src === f.src)) wanted.push(f);
|
|
63
|
+
} finally {
|
|
64
|
+
await tab.close();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
const files = [];
|
|
68
|
+
for (const w of wanted.slice(0, 8)) {
|
|
69
|
+
try {
|
|
70
|
+
const r = await page.request.get(w.src, {
|
|
71
|
+
headers: { referer: url },
|
|
72
|
+
timeout: 30000,
|
|
73
|
+
});
|
|
74
|
+
if (!r.ok()) continue;
|
|
75
|
+
const type = r.headers()["content-type"] ?? "";
|
|
76
|
+
if (!type.startsWith("image/")) continue;
|
|
77
|
+
files.push({ ...w, type, data: (await r.body()).toString("base64") });
|
|
78
|
+
} catch {}
|
|
79
|
+
}
|
|
80
|
+
return { site, title, files, status: res.status() };
|
|
81
|
+
},
|
|
82
|
+
{ url, all: Boolean(opts.all), min: Number(opts.min ?? 600) },
|
|
83
|
+
),
|
|
84
|
+
);
|
|
85
|
+
|
|
86
|
+
if (!got.files.length)
|
|
87
|
+
fail(
|
|
88
|
+
`No picture came back from ${url} (page answered ${got.status}). Open it in the browser and take one from the page, or try --all.`,
|
|
89
|
+
);
|
|
90
|
+
const ext = (type) =>
|
|
91
|
+
({
|
|
92
|
+
"image/png": "png",
|
|
93
|
+
"image/webp": "webp",
|
|
94
|
+
"image/gif": "gif",
|
|
95
|
+
"image/avif": "avif",
|
|
96
|
+
})[type.split(";")[0]] ?? "jpg";
|
|
97
|
+
got.files.forEach((f, i) => {
|
|
98
|
+
const path = `${out}/web-${String(i + 1).padStart(2, "0")}.${ext(f.type)}`;
|
|
99
|
+
writeFileSync(path, Buffer.from(f.data, "base64"));
|
|
100
|
+
const size = imageSize(path);
|
|
101
|
+
console.log(
|
|
102
|
+
`${path} ${size ? `${size.w}x${size.h}` : f.type} ${f.alt ? `(${f.alt.slice(0, 60)})` : ""}`,
|
|
103
|
+
);
|
|
104
|
+
});
|
|
105
|
+
console.log(`Credit: ${got.site} — ${got.title.trim().slice(0, 100)}`);
|
|
@@ -9,7 +9,7 @@ license: Complete terms in LICENSE.txt
|
|
|
9
9
|
## Diagrams and charts
|
|
10
10
|
|
|
11
11
|
- A diagram — how something is built, how a process flows, calls in order, where data goes, the states it moves through — is drawn by the archify engine in `scripts/archify`, not as a mermaid block: it checks the layout, so a crossing edge or a clipped label never reaches the user. Read `references/diagram.md` first. It is a page of its own; when a report needs one, name both files as you hand back.
|
|
12
|
-
- A chart of numbers
|
|
12
|
+
- A chart of numbers is drawn from a CSV into a quick page by `node <skill dir>/scripts/chart.mjs <page.html> <figure id> <data.csv>` — a cited inline SVG with its rows; with no arguments it lists its options. Never hand-write chart SVG. A report that stays a `.md` takes a `mermaid` block, which the app draws; candlesticks and zoom need the kit.
|
|
13
13
|
|
|
14
14
|
## A quick page
|
|
15
15
|
|
|
@@ -58,8 +58,9 @@ every page can import it from then on. Keep what one page needs in its own
|
|
|
58
58
|
folder rather than in the kit's `src/`: an app update replaces those shared files.
|
|
59
59
|
|
|
60
60
|
To look at it yourself, the `browser` skill: it refuses `file:` URLs, so serve the
|
|
61
|
-
folder
|
|
62
|
-
|
|
61
|
+
folder on a port nobody else holds (`python3 -u -m http.server 0 --bind 127.0.0.1
|
|
62
|
+
--directory <dir> > <scratch>/serve.log &`, the port is in the log), `goto` it, and kill the
|
|
63
|
+
server after. Do it only
|
|
63
64
|
when asked or when something looks wrong: testing upfront adds latency between
|
|
64
65
|
the request and the finished file.
|
|
65
66
|
|