thursday-agent 0.1.1 → 0.1.2

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.
Files changed (101) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +3 -3
  3. package/.next/prerender-manifest.json +3 -3
  4. package/.next/server/app/_global-error.html +1 -1
  5. package/.next/server/app/_global-error.rsc +1 -1
  6. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  7. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  8. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  9. package/.next/server/app/_not-found.html +1 -1
  10. package/.next/server/app/_not-found.rsc +1 -1
  11. package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  12. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  13. package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  14. package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +1 -1
  15. package/.next/server/app/artifact/[...path]/page.js.nft.json +1 -1
  16. package/.next/server/app/artifact/[...path]/page_client-reference-manifest.js +1 -1
  17. package/.next/server/app/page/server-reference-manifest.json +41 -41
  18. package/.next/server/app/page.js.nft.json +1 -1
  19. package/.next/server/app/page_client-reference-manifest.js +1 -1
  20. package/.next/server/chunks/ssr/{[root-of-the-server]__1e-f3gy._.js → [root-of-the-server]__01id-v3._.js} +2 -2
  21. package/.next/server/chunks/ssr/[root-of-the-server]__0dfwvr4._.js +1 -1
  22. package/.next/server/chunks/ssr/[root-of-the-server]__1-mnhyd._.js +1 -1
  23. package/.next/server/chunks/ssr/{[root-of-the-server]__1ncajna._.js → [root-of-the-server]__185grso._.js} +2 -2
  24. package/.next/server/chunks/ssr/_077-g6s._.js +1 -1
  25. package/.next/server/chunks/ssr/_0ay6b01._.js +1 -1
  26. package/.next/server/chunks/ssr/{_1aca4j8._.js → _0j4v8of._.js} +2 -2
  27. package/.next/server/chunks/ssr/{_1m5popy._.js → _0l81bzy._.js} +2 -2
  28. package/.next/server/chunks/ssr/{_1r2_qk-._.js → _0lc_7c8._.js} +2 -2
  29. package/.next/server/chunks/ssr/_0nso8tp._.js +3 -0
  30. package/.next/server/chunks/ssr/{_1b3yex3._.js → _0q_2f2x._.js} +2 -2
  31. package/.next/server/chunks/ssr/_0sf1isi._.js +1 -1
  32. package/.next/server/chunks/ssr/{_124q1la._.js → _10uvw3l._.js} +2 -2
  33. package/.next/server/chunks/ssr/{_1hkvsg0._.js → _19_o9d-._.js} +2 -2
  34. package/.next/server/chunks/ssr/{_1dnxp2k._.js → _1dcxzqe._.js} +2 -2
  35. package/.next/server/chunks/ssr/_1e-dgz0._.js +1 -1
  36. package/.next/server/chunks/ssr/_1jbv7m1._.js +3 -0
  37. package/.next/server/chunks/ssr/features_bot_components_bot-setting_tsx_01ajft6._.js +1 -1
  38. package/.next/server/chunks/ssr/features_config_components_14jqgy4._.js +1 -1
  39. package/.next/server/chunks/ssr/features_config_components_config-setting_tsx_0xfwqdg._.js +1 -1
  40. package/.next/server/chunks/ssr/features_connectors_components_mcp-setting_tsx_0jmbgvp._.js +1 -1
  41. package/.next/server/chunks/ssr/features_memory_components_memory-setting_tsx_0oa43sw._.js +1 -1
  42. package/.next/server/chunks/ssr/{node_modules_1_w_b81._.js → node_modules_00d6675._.js} +1 -1
  43. package/.next/server/chunks/ssr/{node_modules_1854ebs._.js → node_modules_043-236._.js} +1 -1
  44. package/.next/server/chunks/ssr/{node_modules_1mnmhse._.js → node_modules_06kvvuo._.js} +1 -1
  45. package/.next/server/chunks/ssr/{node_modules_17ls31t._.js → node_modules_0_fvxnt._.js} +1 -1
  46. package/.next/server/chunks/ssr/{node_modules_0eqdzva._.js → node_modules_0_j7-g4._.js} +1 -1
  47. package/.next/server/chunks/ssr/{node_modules_1yxkq1s._.js → node_modules_0bue6gy._.js} +1 -1
  48. package/.next/server/chunks/ssr/{node_modules_1kj6swe._.js → node_modules_0fbw5-u._.js} +1 -1
  49. package/.next/server/chunks/ssr/{node_modules_1euv75v._.js → node_modules_0ipn1ho._.js} +1 -1
  50. package/.next/server/chunks/ssr/{node_modules_00riwzq._.js → node_modules_0ls96je._.js} +1 -1
  51. package/.next/server/chunks/ssr/{node_modules_0i37h34._.js → node_modules_0xwx4u-._.js} +1 -1
  52. package/.next/server/chunks/ssr/{node_modules_0nq_p-o._.js → node_modules_0y2-av4._.js} +1 -1
  53. package/.next/server/chunks/ssr/{node_modules_1wsx1pg._.js → node_modules_108wd2o._.js} +1 -1
  54. package/.next/server/chunks/ssr/{node_modules_01jj5oy._.js → node_modules_13f2md6._.js} +1 -1
  55. package/.next/server/chunks/ssr/{node_modules_03f-6up._.js → node_modules_16i4o_3._.js} +1 -1
  56. package/.next/server/chunks/ssr/{node_modules_14uxpfb._.js → node_modules_1_588_4._.js} +1 -1
  57. package/.next/server/chunks/ssr/{node_modules_0sbobpz._.js → node_modules_1d-is1o._.js} +1 -1
  58. package/.next/server/chunks/ssr/{node_modules_0xe_k12._.js → node_modules_1ee8gav._.js} +1 -1
  59. package/.next/server/chunks/ssr/{node_modules_012m-mo._.js → node_modules_1hn_sd5._.js} +1 -1
  60. package/.next/server/chunks/ssr/{node_modules_0ewynyi._.js → node_modules_1jatz7w._.js} +1 -1
  61. package/.next/server/chunks/ssr/{node_modules_1bjm3ch._.js → node_modules_1k29j1j._.js} +1 -1
  62. package/.next/server/chunks/ssr/{node_modules_1y1m-q4._.js → node_modules_1nhw9qg._.js} +1 -1
  63. package/.next/server/chunks/ssr/{node_modules_1fsvm8f._.js → node_modules_1t0y5jt._.js} +1 -1
  64. package/.next/server/chunks/ssr/{node_modules_0nh2m35._.js → node_modules_1ub40gk._.js} +1 -1
  65. package/.next/server/chunks/ssr/{node_modules_17c71fz._.js → node_modules_1v0077l._.js} +1 -1
  66. package/.next/server/chunks/ssr/{node_modules_07_oxjr._.js → node_modules_1y8_3vg._.js} +1 -1
  67. package/.next/server/chunks/ssr/{node_modules_0egn4iq._.js → node_modules_20ynonm._.js} +1 -1
  68. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1f5re6n._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_092s8nx._.js} +1 -1
  69. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_216aa7f._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1nvexgu._.js} +1 -1
  70. package/.next/server/middleware-build-manifest.js +3 -3
  71. package/.next/server/pages/404.html +1 -1
  72. package/.next/server/pages/500.html +1 -1
  73. package/.next/server/server-reference-manifest.js +1 -1
  74. package/.next/server/server-reference-manifest.json +42 -42
  75. package/.next/static/chunks/{35uo6rtl_otbd.js → 0yysv1gzin17t.js} +1 -1
  76. package/.next/static/chunks/{0yn2yol46cj77.js → 1fr5m75pwtyic.js} +1 -1
  77. package/.next/static/chunks/{0h7pjyewk7ky-.js → 1gy3bbv7usnjo.js} +1 -1
  78. package/.next/static/chunks/{1lpdcqos7mkek.js → 1keib_gt066gc.js} +1 -1
  79. package/.next/static/chunks/{2qci2z603es_m.js → 1khakdu_iuedc.js} +1 -1
  80. package/.next/static/chunks/{2kl3n2d-4-7i5.js → 21rk8w7bda-su.js} +1 -1
  81. package/.next/static/chunks/{261871a8ot1pi.js → 247d-r95j8xs0.js} +1 -1
  82. package/.next/static/chunks/{1u5d-pvhwir9g.js → 28g42tw8tsvhd.js} +1 -1
  83. package/.next/static/chunks/{2ka9uwo_evj7a.js → 2fq_86jvq9ymq.js} +1 -1
  84. package/.next/static/chunks/{3yan6-5cvpk2o.js → 2ihkf6l2jowo9.js} +3 -3
  85. package/.next/static/chunks/{0g2n0xskvyk04.js → 2wngeetfnzxkp.js} +1 -1
  86. package/.next/static/chunks/{1rja48de93vvx.js → 3aquirz5h71da.js} +1 -1
  87. package/.next/static/chunks/{14s7e14xltx47.js → 3fqvc0cg-atq_.js} +1 -1
  88. package/.next/static/chunks/{3w7-y53xzl2ir.js → 3p4egvfjxpatb.js} +1 -1
  89. package/.next/static/chunks/3qe1w1ei-huhl.js +1 -0
  90. package/.next/static/chunks/{34eu8t79ko6lm.js → 3xxa2j56-f3nm.js} +1 -1
  91. package/.next/static/chunks/{0_6qjj4f3t3j-.js → 3y40riycdip-i.js} +1 -1
  92. package/.next/static/chunks/{2v_vqhmdl8de_.js → 45a6zbtkelph9.js} +1 -1
  93. package/README.md +24 -1
  94. package/bin/thursday.mjs +50 -2
  95. package/package.json +1 -1
  96. package/.next/server/chunks/ssr/_19eoufz._.js +0 -3
  97. package/.next/server/chunks/ssr/_1cb_5sv._.js +0 -3
  98. package/.next/static/chunks/2cgzsjzheo2m2.js +0 -1
  99. /package/.next/static/{G-9_HnysmzY_Bx9GpDYAO → X34BUd9bfdH27ripuwwBm}/_buildManifest.js +0 -0
  100. /package/.next/static/{G-9_HnysmzY_Bx9GpDYAO → X34BUd9bfdH27ripuwwBm}/_clientMiddlewareManifest.js +0 -0
  101. /package/.next/static/{G-9_HnysmzY_Bx9GpDYAO → X34BUd9bfdH27ripuwwBm}/_ssgManifest.js +0 -0
@@ -1,3 +0,0 @@
1
- module.exports=[210799,a=>a.a(async(b,c)=>{try{var d=a.i(187924),e=a.i(589027),f=a.i(875160),g=a.i(272944),h=a.i(19895),i=a.i(951675),j=a.i(572131),k=a.i(767561),l=a.i(340695),m=a.i(676504),n=a.i(446181),o=a.i(545097),p=a.i(950463),q=a.i(939774),r=a.i(517499),s=a.i(884358),t=a.i(411509),u=a.i(913834),v=a.i(467268),w=a.i(42380),x=a.i(8468),y=a.i(777279),z=a.i(619477),A=a.i(199169),B=a.i(313237),C=a.i(862966),D=a.i(759497),E=a.i(497895),F=a.i(394440),G=b([v,x]);[v,x]=G.then?(await G)():G;let L="w-36";function H({task:a,bots:b,open:c,onToggle:k,onStop:n,onDelete:p}){var q,r;let s,x="running"===a.status||"waiting"===a.status,z="running"===a.status,B=(0,j.useMemo)(()=>(0,y.taskFromRow)(a,b),[a,b]),C=function(a){if("waiting"===a.status&&a.ask)return(0,t.isBudgetAsk)(a.ask)?{text:(0,E.plainText)(a.outcome??a.ask.question),tone:"text-muted-foreground"}:{text:a.ask.question,tone:E.WAITING_INK};if("failed"===a.status)return{text:(0,E.plainText)(a.outcome??"Failed"),tone:"text-destructive"};if("done"===a.status)return{text:(0,E.plainText)(a.outcome??"Done"),tone:a.reported?"text-muted-foreground":"text-foreground/80"};for(let b=a.lines.length-1;b>=0;b--){let c=a.lines[b];if("tool"===c.kind)return{text:c.note??c.input,tone:"text-muted-foreground",tool:c.name,shine:!0};if("text"===c.kind)return{text:c.text,tone:"text-muted-foreground",shine:!0};if("user"===c.kind||"waiting"===c.kind)break}return{text:`${a.bot} is taking it on…`,tone:"text-muted-foreground italic",shine:!0}}(a),D=a.tokens.input+a.tokens.output;return(0,d.jsxs)("div",{className:"group/row relative transition-colors hover:bg-muted/50",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 p-4",children:[(0,d.jsxs)("button",{type:"button",onClick:k,className:"flex min-w-0 flex-1 items-center gap-3 rounded-md text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,d.jsx)(u.BotMark,{size:40,seed:a.bot,vary:a.id,...(q=a.bot,r=b,s=r?.find(a=>a.name===q)?.icon,{color:s?.color,shape:s?.shape,outline:s?.outline}),state:z?"thinking":"idle",notify:"waiting"===a.status,className:"shrink-0"}),(0,d.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,d.jsxs)("span",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"truncate text-sm font-medium",children:a.label}),(0,d.jsx)(w.BotRoster,{bots:(0,y.rosterOf)(B),taskId:a.id}),z&&(0,d.jsx)(f.Loader2,{className:"size-3 shrink-0 animate-spin text-muted-foreground"})]}),C&&(0,d.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5 text-[13px] leading-snug",children:[C.tool&&(0,d.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground",children:C.tool}),C.shine?(0,d.jsx)(o.default,{text:C.text,speed:2.2,color:"var(--muted-foreground)",shineColor:"var(--foreground)",className:"min-w-0 truncate"}):(0,d.jsx)("span",{className:(0,E.cn)("min-w-0 truncate",C.tone),children:C.text})]})]}),(0,d.jsxs)("span",{className:(0,E.cn)("flex shrink-0 flex-col items-end gap-0.5 font-mono text-[11px] leading-4 text-muted-foreground tabular-nums",L),children:[(0,d.jsx)("span",{children:(0,A.whenOf)(a.updatedAt)}),(0,d.jsxs)("span",{className:"max-w-full truncate text-muted-foreground/70",title:D>0?`${a.id} \xb7 in ${(0,E.formatCount)(a.tokens.input)} \xb7 out ${(0,E.formatCount)(a.tokens.output)}`:a.id,children:[a.bot,D>0&&` \xb7 ${(0,E.formatCount)(D)}`]})]}),(0,d.jsx)(e.ChevronDown,{className:(0,E.cn)("size-4 shrink-0 text-muted-foreground transition-transform",c&&"rotate-180")})]}),(0,d.jsxs)(m.DropdownMenu,{children:[(0,d.jsx)(m.DropdownMenuTrigger,{render:(0,d.jsx)(l.Button,{size:"icon-sm",variant:"ghost"}),children:(0,d.jsx)(g.MoreHorizontal,{})}),(0,d.jsxs)(m.DropdownMenuContent,{align:"end",children:[x&&(0,d.jsxs)(m.DropdownMenuItem,{onClick:n,children:[(0,d.jsx)(h.Square,{}),"Stop"]}),(0,d.jsxs)(m.DropdownMenuItem,{variant:"destructive",onClick:p,children:[(0,d.jsx)(i.Trash2,{}),"Delete"]})]})]})]}),z&&!c&&(0,d.jsx)(I,{task:a}),c&&(0,d.jsxs)("div",{className:"mx-4 mb-4 space-y-2",children:[(0,d.jsx)("div",{className:"rounded-xl border border-border/60 bg-background",children:(0,d.jsx)(v.Conversation,{task:B})}),(0,d.jsx)(F.TaskReply,{task:{id:a.id,label:a.label,bot:a.bot,ask:a.ask},status:a.status})]})]})}function I({task:a}){let b=[];if(a.lines.forEach((c,d)=>{if("tool"!==c.kind)return;let e=a.lines[d+1];b.push({step:c,took:e?(0,A.toDate)(e.at).getTime()-(0,A.toDate)(c.at).getTime():null})}),0===b.length)return null;let c=(0,A.toDate)(a.updatedAt).getTime()-(0,A.toDate)(a.createdAt).getTime();return(0,d.jsxs)("div",{className:"pointer-events-none absolute top-[calc(100%-0.75rem)] left-17 z-20 hidden w-96 max-w-[calc(100%-5rem)] rounded-xl bg-background p-3 pb-2 shadow-xl shadow-black/10 ring-1 ring-border/60 group-hover/row:block",children:[(0,d.jsxs)("div",{className:"mb-1.5 flex items-center gap-2 font-mono text-[10px] text-muted-foreground",children:[(0,d.jsx)("span",{children:a.bot}),(0,d.jsx)("span",{className:"opacity-50",children:"·"}),(0,d.jsxs)("span",{children:[b.length," ",1===b.length?"step":"steps"]}),(0,d.jsx)("span",{className:"opacity-50",children:"·"}),(0,d.jsx)("span",{children:J(c)})]}),b.slice(-6).map(({step:a,took:b})=>{let c=(0,x.toolIcon)(a.name);return(0,d.jsxs)("div",{className:"flex h-5.5 items-center gap-2 font-mono text-[11px]",children:[null===b?(0,d.jsx)(f.Loader2,{className:"size-3 shrink-0 animate-spin text-muted-foreground"}):(0,d.jsx)(c,{className:"size-3 shrink-0 text-muted-foreground"}),(0,d.jsx)("span",{className:"w-24 shrink-0 truncate text-muted-foreground",children:a.name}),null===b?(0,d.jsx)(o.default,{text:a.note??a.input,speed:2.2,color:"var(--muted-foreground)",shineColor:"var(--foreground)",className:"min-w-0 flex-1 truncate"}):(0,d.jsx)("span",{className:"min-w-0 flex-1 truncate text-foreground",children:a.note??a.input}),(0,d.jsx)("span",{className:"w-10 shrink-0 text-right text-muted-foreground/70 tabular-nums",children:null===b?"":J(b)})]},a.id)})]})}function J(a){let b=Math.max(0,a)/1e3;if(b<10)return`${b.toFixed(1)}s`;if(b<60)return`${Math.round(b)}s`;let c=Math.floor(b/60);return`${c}m ${Math.round(b-60*c)}s`}function K(){return(0,d.jsxs)("div",{className:"flex items-center gap-3 p-4",children:[(0,d.jsx)(p.Skeleton,{className:"size-10 shrink-0 rounded-full"}),(0,d.jsxs)("span",{className:"min-w-0 flex-1 space-y-2",children:[(0,d.jsx)(p.Skeleton,{className:"h-3 w-40 max-w-full"}),(0,d.jsx)(p.Skeleton,{className:"h-2.5 w-80 max-w-full"})]}),(0,d.jsxs)("span",{className:(0,E.cn)("flex shrink-0 flex-col items-end gap-1.5",L),children:[(0,d.jsx)(p.Skeleton,{className:"h-2.5 w-12"}),(0,d.jsx)(p.Skeleton,{className:"h-2.5 w-24"})]}),(0,d.jsx)("span",{className:"size-4 shrink-0"}),(0,d.jsx)("span",{className:"size-7 shrink-0"})]})}a.s(["TaskSetting",0,function(){let[a,b]=(0,j.useState)(null),[c,e]=(0,j.useState)(""),{data:f}=(0,D.useServerRoute)(k.queryKey.bot),{items:g,isLoading:h,isLoadingMore:i,error:m,hasMore:o,sentinelRef:p}=(0,C.useServerPages)({key:(a,b)=>{if(0===a)return k.queryKey.taskHistory(null);let c=b?.at(-1);return c?k.queryKey.taskHistory((0,A.toDate)(c.updatedAt).toISOString()):null},size:t.TASK_HISTORY_PAGE,swr:{revalidateFirstPage:!0,refreshInterval:a=>3e3*!!a?.[0]?.some(a=>"running"===a.status)}}),[u]=(0,B.useServerAction)(q.cancelTaskAction,{okMessage:"Task stopped",onOk:a=>{(0,D.revalidate)(k.queryKey.tasks),y.screenActs.announce({kind:"stopped",id:a.id,label:a.label})}}),[v]=(0,B.useServerAction)(s.deleteTaskAction,{okMessage:"Task deleted",onOk:()=>(0,D.revalidate)(k.queryKey.tasks)}),[w]=(0,B.useServerAction)(r.clearFinishedTasksAction,{onOk:()=>(0,D.revalidate)(k.queryKey.tasks)}),x=async()=>{await n.notify.confirm({title:"Clear finished jobs?",description:"Everything done or failed goes, threads included. Running and waiting jobs stay.",okText:"Clear",destructive:!0})&&w()},E=async a=>{await n.notify.confirm({title:`Delete "${a.label}"?`,description:"The thread goes with it — nothing can be picked back up.",okText:"Delete",destructive:!0})&&v(a.id)};if(h)return(0,d.jsx)(z.SettingSkeleton,{rows:3});if(m)return(0,d.jsx)(z.SettingError,{message:m.message});let F=c.trim().toLowerCase(),G=F?g.filter(a=>[a.label,a.outcome,a.bot].join(" ").toLowerCase().includes(F)):g,I=g.filter(a=>"waiting"===a.status).length,J=g.filter(a=>"failed"===a.status).length;return(0,d.jsx)(z.SettingScreen,{footer:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(z.SettingRailNote,{children:[g.length," loaded",I>0&&` \xb7 ${I} waiting on you`,J>0&&` \xb7 ${J} failed`]}),(0,d.jsx)(l.Button,{variant:"outline",size:"sm",onClick:x,children:"Clear finished"})]}),children:(0,d.jsx)(z.SettingGroup,{filter:(0,d.jsx)(z.SettingFilter,{value:c,onChange:e,placeholder:"Filter by label, bot or word"}),right:F?`${G.length} of ${g.length}`:void 0,children:(0,d.jsxs)(z.SettingItems,{children:[0===G.length?(0,d.jsx)("p",{className:"p-4 text-sm leading-relaxed text-muted-foreground",children:F?"Nothing loaded matches. Keep scrolling to search further back.":"Nothing yet. When Thursday hands a job to a bot mid-call, it shows up here — while it runs, and after."}):G.map(c=>(0,d.jsx)(H,{task:c,bots:f,open:a===c.id,onToggle:()=>b(a=>a===c.id?null:c.id),onStop:()=>u(c.id),onDelete:()=>E(c)},c.id)),(0,d.jsx)(z.SettingMore,{hasMore:o,loading:i,sentinelRef:p,ghost:(0,d.jsx)(K,{}),className:"divide-y divide-border/60"})]})})})}]),c()}catch(a){c(a)}},!1),517499,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7ff5bb69b89a59e42d85bcd7d1ec83c4ef70924f4d",b.callServer,void 0,b.findSourceMapURL,"clearFinishedTasksAction");a.s(["clearFinishedTasksAction",0,c])},884358,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7ffff6417a7e86b95a733444a5185cfdf60359699c",b.callServer,void 0,b.findSourceMapURL,"deleteTaskAction");a.s(["deleteTaskAction",0,c])},862966,a=>{"use strict";var b=a.i(572131),c=a.i(988712),d=a.i(426618),e=a.i(664565),f=a.i(487610),g=a.i(561311);let h=Promise.resolve(),i=(0,e.withMiddleware)(c.u,a=>(c,e,i)=>{let j,k=(0,b.useRef)(!1),{cache:l,initialSize:m=1,revalidateAll:n=!1,persistSize:o=!1,revalidateFirstPage:p=!0,revalidateOnMount:q=!1,parallel:r=!1}=i,[,,,s]=d.a.get(d.o);try{(j=(0,d.s)(c?c(0,null):null)[0])&&(j=g.INFINITE_PREFIX+j)}catch(a){}let[t,u,v]=(0,d.c)(l,j),w=(0,b.useCallback)(()=>(0,d.i)(t()._l)?m:t()._l,[l,j,m]);(0,f.useSyncExternalStore)((0,b.useCallback)(a=>j?v(j,()=>{a()}):()=>{},[l,j]),w,w);let x=(0,b.useCallback)(()=>{let a=t()._l;return(0,d.i)(a)?m:a},[j,m]),y=(0,b.useRef)(x());(0,d.u)(()=>{if(!k.current){k.current=!0;return}j&&u({_l:o?y.current:x()})},[j,l]);let z=q&&!k.current,A=a(j,async a=>{let b=t()._i,f=t()._r,g=d.a.get(l),h=g[8],j=()=>g[8]!==h;u({_r:d.U});let k=[],m=x(),[o]=(0,d.c)(l,a),q=o().data,v=[],w=null;for(let a=0;a<m;++a){let[g,h]=(0,d.s)(c(a,r?null:w));if(!g)break;let[m,o]=(0,d.c)(l,g),t=m().data,u=n||b||(0,d.i)(t)||p&&!a&&!(0,d.i)(q)||z||q&&!(0,d.i)(q[a])&&!i.compare(q[a],t);if(e&&("function"==typeof f?f(t,h):u)){let b=async()=>{if(g in s){let a=s[g];delete s[g],t=await a}else t=await e(h);j()||o({data:t,_k:h}),k[a]=t};r?v.push(b):await b()}else k[a]=t;r||(w=t)}return r&&await Promise.all(v.map(a=>a())),j()||u({_i:d.U}),k},i),B=(0,b.useCallback)(function(a,b){let c="boolean"==typeof b?{revalidate:b}:b||{},e=!1!==c.revalidate;return j?(e&&((0,d.i)(a)?u({_i:!0,_r:c.revalidate}):u({_i:!1,_r:c.revalidate})),arguments.length?A.mutate(a,{...c,revalidate:e}):A.mutate()):h},[j,l]),C=(0,b.useCallback)(a=>{let b;if(!j)return h;let[,e]=(0,d.c)(l,j);if((0,d.e)(a)?b=a(x()):"number"==typeof a&&(b=a),"number"!=typeof b)return h;e({_l:b}),y.current=b;let f=[],[g]=(0,d.c)(l,j),i=null;for(let a=0;a<b;++a){let[b]=(0,d.s)(c(a,i)),[e]=(0,d.c)(l,b),h=b?e().data:d.U;if((0,d.i)(h))return B(g().data);f.push(h),i=h}return B(f)},[j,l,B,x]);return{size:x(),setSize:C,mutate:B,get data(){return A.data},get error(){return A.error},get isValidating(){return A.isValidating},get isLoading(){return A.isLoading}}});var j=a.i(287702),k=a.i(759497);a.s(["useServerPages",0,function(a){let c=a.size??j.PAGE_SIZE,{key:d}=a,{data:e,error:f,isLoading:g,isValidating:h,setSize:l,mutate:m}=i((a,b)=>(0,k.resolveKey)(d(a,b)),k.fetchRoute,{dedupingInterval:500,revalidateOnMount:!0,revalidateOnFocus:!0,revalidateOnReconnect:!0,focusThrottleInterval:1e3,revalidateFirstPage:!1,...a.swr}),n=e??[],o=n.flat(),p=n.at(-1),q=void 0!==p&&p.length>=c,r=(0,b.useRef)(0),s=h&&n.length>0&&r.current>n.length,t=(0,b.useRef)({isValidating:h,setSize:l,pages:n.length});t.current={isValidating:h,setSize:l,pages:n.length};let u=(0,k.resolveKey)(d(0,null)),v="string"==typeof u?u:u?.url;(0,b.useEffect)(()=>{if(v)return(0,k.registerPagedReader)({url:v,refresh:()=>m()})},[v,m]);let w=function(a,c={}){let{enabled:d=!0,margin:e="600px",revision:f}=c,g=(0,b.useRef)(a);g.current=a;let h=(0,b.useRef)(null),i=(0,b.useRef)(null),j=(0,b.useCallback)(a=>{h.current=a},[]);return(0,b.useEffect)(()=>{i.current?.disconnect();let a=h.current;if(a&&d)return i.current=new IntersectionObserver(([a])=>{a.isIntersecting&&g.current()},{root:function(a){let b=a.parentElement;for(;b;){let{overflowY:a}=getComputedStyle(b);if(("auto"===a||"scroll"===a)&&b.scrollHeight>b.clientHeight)return b;b=b.parentElement}return null}(a),rootMargin:e}),i.current.observe(a),()=>i.current?.disconnect()},[d,e,f]),j}(()=>{let a=t.current;a.isValidating||(r.current=a.pages+1,a.setSize(a.pages+1))},{enabled:q,revision:`${n.length}:${h}`});return{items:o,isLoading:g,isLoadingMore:s,error:f,hasMore:q,sentinelRef:w,refresh:()=>m()}}],862966)},272944,a=>{"use strict";var b=a.i(164831);let c={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};c.node;let d=(0,b.default)(c);a.s(["MoreHorizontal",0,d],272944)},951675,a=>{"use strict";var b=a.i(164831);let c={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};c.node;let d=(0,b.default)(c);a.s(["Trash2",0,d],951675)}];
2
-
3
- //# sourceMappingURL=_1cb_5sv._.js.map
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,222055,589128,e=>{"use strict";var t=e.i(843476),a=e.i(689664),n=e.i(716327),r=e.i(482022),s=e.i(60744),i=e.i(831458),o=e.i(91511),l=e.i(815170),d=e.i(218964),u=e.i(632781),c=e.i(468590),h=e.i(566595),p=e.i(730274),m=e.i(604139),f=e.i(747925),g=e.i(271645),x=e.i(798120),y=e.i(660302),k=e.i(671428),b=e.i(991322),v=e.i(852116);let M=e.i(328256).BookMarked;e.s(["SkillsMark",0,M],589128);var w=e.i(621285),j=e.i(283653),z=e.i(647163);let S={web_search:function({tool:e,taskId:a,collapsed:n}){let r=A(e.results);return(0,t.jsxs)(O,{tool:e,taskId:a,icon:h.Search,collapsed:n,children:[(0,t.jsxs)("p",{className:"px-3 pt-1 pb-1.5 text-[13px] leading-snug break-keep",children:["“",e.input,"”"]}),r.length>0&&(0,t.jsx)("ol",{className:"space-y-0.5 px-3 pb-2",children:r.map((e,a)=>(0,t.jsxs)("li",{className:"flex gap-2 text-[11.5px] leading-snug text-muted-foreground",children:[(0,t.jsx)("span",{className:"mt-1.25 size-1 shrink-0 rounded-full bg-muted-foreground/50"}),(0,t.jsx)("span",{className:"truncate",children:e})]},`${a}-${e}`))})]})},bash:function({tool:e,taskId:a,collapsed:n}){let r=A(e.results);return(0,t.jsx)(O,{tool:e,taskId:a,icon:m.Terminal,collapsed:n,children:(0,t.jsxs)("pre",{className:"mx-3 overflow-x-auto rounded-lg bg-foreground/5 px-2.5 py-1.5 font-mono text-[11px] leading-relaxed scrollbar-none dark:bg-black/25",children:[(0,t.jsx)("span",{className:"text-muted-foreground/60",children:"$ "}),e.input,r.length>0&&(0,t.jsx)("span",{className:"block text-muted-foreground",children:r.join("\n")})]})})},fetch:e=>(0,t.jsx)(C,{icon:o.Globe,...e}),write_file:e=>(0,t.jsx)(D,{icon:s.FilePen,...e}),generate_image:function({tool:e,taskId:a,collapsed:n}){let[s]=A(e.results);return(0,t.jsxs)(O,{tool:e,taskId:a,icon:l.Image,collapsed:n,children:[(0,t.jsx)("p",{className:"px-3 pt-1 text-[12px] leading-snug break-keep",children:e.input}),s&&(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 pt-1 pb-1.5",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px] text-muted-foreground",children:s}),(0,t.jsxs)(w.FileLink,{path:s,label:`Open ${s}`,className:L,children:[(0,t.jsx)(r.ExternalLink,{className:"size-3"}),"Open"]})]})]})}},N={web_search:h.Search,bash:m.Terminal,fetch:o.Globe,write_file:s.FilePen,generate_image:l.Image,memory_recall:v.MemoryMark,memory_remember:v.MemoryMark,memory_forget:v.MemoryMark,memory_show:v.MemoryMark,load_skill:M,tool_search:b.McpMark,tool_call:b.McpMark,delegate:p.Send,task:d.ListChecks,ask_bot:c.MessageSquare,ask_back:c.MessageSquare,ask_thursday:c.MessageSquare,report:i.Flag},I=e=>N[e]??f.Wrench;function C({icon:e,tool:a,taskId:n,collapsed:r}){return(0,t.jsxs)(O,{tool:a,taskId:n,icon:e,collapsed:r,children:[(0,t.jsx)("p",{className:"truncate px-3 pt-1 pb-1.5 font-mono text-[11px]",children:a.input}),(0,t.jsx)(_,{lines:A(a.results),mono:!0})]})}let L="flex shrink-0 items-center gap-1 rounded-md px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground outline-none transition-colors hover:bg-background hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50";function D({icon:e,tool:a,taskId:n,collapsed:s}){let i=a.path??a.input;return(0,t.jsxs)(O,{tool:a,taskId:n,icon:e,collapsed:s,children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 pt-1 pb-1.5",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px]",children:a.input}),(0,t.jsxs)(w.FileLink,{path:i,label:`Open ${i}`,className:L,children:[(0,t.jsx)(r.ExternalLink,{className:"size-3"}),"Open"]})]}),(0,t.jsx)(_,{lines:A(a.results),mono:!0})]})}function E({tool:e,taskId:a,collapsed:n}){return(0,t.jsxs)(O,{tool:e,taskId:a,icon:I(e.name),collapsed:n,children:[(0,t.jsx)("p",{className:"px-3 pt-1 pb-1.5 text-[12px] leading-snug break-keep",children:e.input}),(0,t.jsx)(_,{lines:A(e.results)})]})}function O({tool:e,taskId:r,icon:s,collapsed:i=!1,children:o}){let l=void 0===e.results,[d,c]=(0,g.useState)(!i),h=d||l,p=e.more&&r&&e.callId;return(0,t.jsxs)("div",{className:(0,z.cn)("@container w-full overflow-hidden rounded-xl transition-colors",h?"bg-background/80 dark:bg-white/4":"hover:bg-foreground/4"),children:[(0,t.jsxs)("button",{type:"button",onClick:()=>c(e=>!e),"aria-expanded":h,className:"flex w-full items-center gap-2 rounded-xl px-2.5 py-1.5 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)("span",{className:"grid size-5 shrink-0 place-items-center rounded-[7px] bg-foreground/8 text-muted-foreground",children:l?(0,t.jsx)(u.Loader2,{className:"size-3 animate-spin"}):(0,t.jsx)(s,{className:"size-3"})}),e.note?(0,t.jsxs)(t.Fragment,{children:[l?(0,t.jsx)(y.default,{text:e.note,speed:2.4,color:"var(--muted-foreground)",shineColor:"var(--foreground)",className:"min-w-0 flex-1 truncate text-[12px] leading-4 break-keep"}):(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-[12px] leading-4 break-keep",children:e.note}),(0,t.jsx)("span",{className:"hidden min-w-0 flex-1 truncate font-mono text-[11px] leading-4 text-muted-foreground/85 @lg:block",children:e.input})]}):l?(0,t.jsx)(y.default,{text:e.input,speed:2.4,color:"var(--muted-foreground)",shineColor:"var(--foreground)",className:"min-w-0 flex-1 truncate font-mono text-[11px] leading-4"}):(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px] leading-4 text-foreground/80",children:e.input}),(0,t.jsx)("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground/70",children:e.name}),!l&&(0,t.jsx)(a.Check,{className:"size-3 shrink-0 text-muted-foreground/50"}),(0,t.jsx)(n.ChevronDown,{className:(0,z.cn)("size-3 shrink-0 text-muted-foreground/50 transition-transform",h&&"rotate-180")})]}),h&&(0,t.jsxs)("div",{className:"pb-1.5 pl-[1.625rem]",children:[o,p&&(0,t.jsx)(R,{taskId:r,callId:e.callId})]})]})}function R({taskId:e,callId:a}){let[r,s]=(0,g.useState)(!1),{data:i,isLoading:o}=(0,j.useServerRoute)(r?x.queryKey.toolResult(e,a):null);return(0,t.jsxs)("div",{className:"px-3 pb-1",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>s(e=>!e),className:"flex items-center gap-1 rounded-md py-0.5 font-mono text-[10px] text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)(n.ChevronDown,{className:(0,z.cn)("size-3",r&&"rotate-180")}),r?"Less":"Everything"]}),r&&(o||!i?(0,t.jsx)(k.Skeleton,{className:"mt-1.5 h-12 w-full rounded-lg"}):(0,t.jsxs)("div",{className:"mt-1.5 space-y-1.5",children:[q(i).map((e,a)=>(0,t.jsx)(T,{src:e},`${a}-${e.length}`)),A(i).length>0&&(0,t.jsx)("pre",{className:"max-h-72 overflow-auto rounded-lg bg-foreground/5 px-2.5 py-2 font-mono text-[11px] leading-relaxed break-all whitespace-pre-wrap dark:bg-black/25",children:A(i).join("\n")})]}))]})}function T({src:e}){return(0,t.jsx)("img",{src:e,alt:"",className:"block w-full rounded-lg bg-muted object-contain"})}function _({lines:e,mono:a}){return 0===e.length?null:(0,t.jsx)("ul",{className:"px-3 pb-1.5",children:e.map((e,n)=>(0,t.jsx)("li",{className:(0,z.cn)("truncate text-[11px] leading-relaxed text-muted-foreground",a&&"font-mono"),children:e},`${n}-${e}`))})}let A=e=>e?.flatMap(e=>"text"===e.type?[e.text]:[])??[],q=e=>e?.flatMap(e=>"image"===e.type?[e.src]:[])??[];e.s(["BotTool",0,function(e){let a=S[e.tool.name]??E;return(0,t.jsx)(a,{...e})},"toolIcon",0,I],222055)},39152,463625,e=>{"use strict";var t=e.i(95187);let a=(0,t.createServerReference)("7f6c0a389e723d17d2e75bda0ac33eb274cb4e12e8",t.callServer,void 0,t.findSourceMapURL,"createSeedBotsAction");e.s(["createSeedBotsAction",0,a],39152);var n=e.i(41533);e.i(864723);let r=[{name:"Jarvis",description:"Any job — turns it into a plan, hands each part to whoever it belongs to, does the rest, reports one result",icon:{shape:"squircle"},recommended:!0,example:"Set up a Google account just for my bots to use",systemPrompt:"You are Jarvis. A job reaches you as a sentence and leaves as a plan: what it actually needs, in what order, and who does each part. Settle what is still open in one round rather than guessing at it, then send for what the job is made of before you build — a part another bot exists for is theirs, and everything nobody else is for is yours. You hold the whole while they hold pieces: the order the parts run in, the seams where what comes back has to fit together, and the single thing that is handed over at the end. The plan is how the job gets done, not what gets handed back."},{name:"Navigator",description:"The web through a real browser — opens the page itself, signs in, brings back prices, images and links as they stand now",icon:{shape:"poly"},recommended:!0,example:"Find thirty wedding pose photos and put them on one page for me",systemPrompt:`You are Navigator. Every browser job is yours: load the \`${n.BROWSER_SKILL}\` skill first and work through it. A search result says a page exists; you say what is on it right now — so open it, sign in where it asks you to, and keep going past the first screen until you have the thing itself: exact figures, the links that open them, the images off the page. Nothing you did not see goes in what you hand back, and a page that refused you is a fact with a url on it, not a gap to fill in from memory. Whoever asked should never need to open the site after you.`},{name:"Scribe",description:"Writing that gets read — finds out what it is for, researches it, then picks the form: prose, table, or a page",icon:{shape:"blob"},recommended:!0,example:"Write up what we decided today as a one-page brief",systemPrompt:"You are Scribe. Who reads it and what they do next decides everything else, so learn that first, then research before you claim: every number and name you write traces back to something you actually read. Pick the form by the reading — a `.md` for something read once, a `.csv` for what gets sorted, a page (the `interactive-page` skill) for something used or something whose pictures are the point. When the request does not settle which it is — something read once or something used — ask before you write rather than committing a whole draft to a guess. Cut what the reader would skip, and never spend a paragraph where a table or a picture answers in one glance. One page they finish beats five they abandon."}];e.s(["BOT_SEEDS",0,r],463625)},992112,e=>{"use strict";var t=e.i(265402);let a=[...new Set(Object.values(t.SPEACH_MODEL_PROVIDERS).map(e=>e.apiKeyName))],n={image:"IMAGE_MODEL",video:"VIDEO_MODEL",speech:"SPEECH_MODEL",transcription:"TRANSCRIPTION_MODEL"},r={image:{label:"Image model",hint:"What bots draw with"},video:{label:"Video model",hint:"What bots film with — minutes a clip"},speech:{label:"Speech model",hint:"What reads text aloud into a file"},transcription:{label:"Transcription model",hint:"What turns a recording into text"}},s={key:"DEFAULT_MODEL",label:"Default model",hint:"What a bot thinks with until it picks its own",text:!0,choices:t.TEXT_MODEL_PROVIDER_LIST.flatMap(e=>e.suggestModels.map(t=>({value:`${e.id}/${t.id}`,label:`${e.label} \xb7 ${t.label}`,needs:e.apiKeyName})))},i=e=>a.includes(e.apiKeyName),o=e=>({key:e.apiKeyName,label:e.label,provider:e.id}),l=[{id:"voice",title:"voice",hint:"calls run on one of these",section:"keys",require:"any",note:"one is required",entries:t.TEXT_MODEL_PROVIDER_LIST.filter(i).map(o)},{id:"text",title:"models",hint:"what bots think with — add any, or none",section:"keys",require:"none",entries:t.TEXT_MODEL_PROVIDER_LIST.filter(e=>!i(e)).map(o)},{id:"bots",title:"Bots",hint:"what a bot runs on when it has not picked its own",section:"models",require:"none",entries:[s]},{id:"studio",title:"Studio",hint:"what a bot draws, films and speaks with — off until you pick one",section:"models",require:"none",entries:Object.keys(n).map(e=>({key:n[e],...r[e],kind:e,choices:t.MEDIA_MODEL_PROVIDER_LIST.flatMap(t=>t.models[e].map(e=>({value:`${t.id}/${e.id}`,label:`${t.label} \xb7 ${e.label}`,needs:t.apiKeyName})))}))}];Object.fromEntries(l.flatMap(e=>e.entries).map(e=>[e.key,e])),l.flatMap(e=>e.entries.map(e=>e.key)),Object.fromEntries(l.flatMap(e=>e.entries).filter(e=>e.choices?.length).map(e=>[e.key,e.choices])),e.s(["CONFIG_GROUPS",0,l,"groupSatisfied",0,function(e,t){return"none"===e.require||(e.requireKeys??e.entries.map(e=>e.key)).some(t)},"isConfigSet",0,function(e,t){return e?.some(e=>e.key===t&&e.set)??!1}])},852116,e=>{"use strict";var t=e.i(456420);let a={name:"cpu",size:24,node:[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]]};a.node;let n=(0,t.default)(a);e.s(["MemoryMark",0,n],852116)},395530,e=>{"use strict";var t=e.i(271645),a=e.i(828918),n=e.i(838452),r=e.i(673553);e.s(["useCompositeItem",0,function(e={}){let{highlightItemOnHover:s,highlightedIndex:i,onHighlightedIndexChange:o}=(0,n.useCompositeRootContext)(),{ref:l,index:d}=(0,r.useCompositeListItem)(e),u=i===d,c=t.useRef(null),h=(0,a.useMergedRefs)(l,c);return{compositeProps:{tabIndex:u?0:-1,onFocus(){o(d)},onMouseMove(){let e=c.current;if(!s||!e)return;let t=e.hasAttribute("disabled")||"true"===e.ariaDisabled;u||t||e.focus()}},compositeRef:h,index:d}}])},53687,e=>{"use strict";var t=e.i(271645),a=e.i(388940),n=e.i(667865),r=e.i(146376),s=e.i(545356),i=e.i(843476);function o(){return new Map}function l(){return new Set}function d(e,t){return e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}e.s(["CompositeList",0,function(e){let{children:u,elementsRef:c,labelsRef:h,onMapChange:p}=e,m=(0,n.useStableCallback)(p),[,f]=t.useState(!1),g=(0,a.useRefWithInit)(l).current,x=(0,a.useRefWithInit)(o).current,y=t.useRef(0),k=t.useRef(!0),b=t.useRef(null),v=t.useRef(null),M=(0,n.useStableCallback)(()=>{k.current||(k.current=!0,f(e=>!e))}),w=(0,n.useStableCallback)((e,t)=>{x.set(e,t),M()}),j=(0,n.useStableCallback)(e=>{x.delete(e),M()}),z=(0,n.useStableCallback)(e=>{let t=new Map;return c.current.length=0,h&&(h.current.length=0),e.forEach(e=>{t.set(e.element,{...e.registration.metadata??{},index:e.index}),c.current[e.index]=e.element,h&&(h.current[e.index]=void 0!==e.registration.label?e.registration.label:e.registration.textRef?.current?.textContent??e.element.textContent)}),y.current=c.current.length,t}),S=(0,n.useStableCallback)(()=>{var e;let t,a,n,r,[s,i]=(e=x,t=new Set,a=[],n=[],e.forEach((e,r)=>{if(!r.isConnected)return;let s=e.index,i={index:s??-1,element:r,registration:e};null===s?n.push(i):s>=0&&(t.add(s),a.push(i))}),r=0,n.sort((e,t)=>d(e.element,t.element)),n.forEach(e=>{for(;t.has(r);)r+=1;e.index=r,a.push(e),r+=1}),t.size>0&&a.sort((e,t)=>e.index-t.index),[a,n.map(e=>e.element)]),o=z(s),l=b.current,u=!l||l.length!==s.length||s.some((e,t)=>{let a=l[t];return e.index!==a.index||e.element!==a.element||e.registration.index!==a.registration.index||e.registration.metadata!==a.registration.metadata});!function(e){if(v.current?.disconnect(),v.current=null,"function"!=typeof MutationObserver||e.length<2)return;let t=new MutationObserver(a=>{if(!function(e){for(let t of e)for(let e=0;e<t.removedNodes.length;e+=1)if(t.removedNodes[e].isConnected)return!0;return!1}(a))return;let n=null;for(let a of e)if(a.isConnected){if(n&&d(n,a)>0){t.disconnect(),M();return}n=a}});v.current=t;let a=new Set;for(let t=1;t<e.length;t+=1){let n=function(e,t){let a=e.parentElement;for(;a&&!a.contains(t);)a=a.parentElement;return a}(e[t-1],e[t]);n&&a.add(n)}a.forEach(e=>t.observe(e,{childList:!0}))}(i),b.current=s,k.current=!1,u&&(g.forEach(e=>e(o)),m(o))});(0,r.useIsoLayoutEffect)(()=>(!k.current&&b.current&&z(b.current),()=>{c.current=[],h&&(h.current=[])}),[c,h,z]),(0,r.useIsoLayoutEffect)(()=>{k.current&&S()}),(0,r.useIsoLayoutEffect)(()=>()=>{v.current?.disconnect(),k.current=!0},[]);let N=(0,n.useStableCallback)(e=>(g.add(e),()=>{g.delete(e)})),I=t.useMemo(()=>({register:w,unregister:j,subscribeMapChange:N,nextIndexRef:y}),[w,j,N,y]);return(0,i.jsx)(s.CompositeListContext.Provider,{value:I,children:u})}])},545356,e=>{"use strict";e.i(247167);var t=e.i(271645);let a=t.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});e.s(["CompositeListContext",0,a,"useCompositeListContext",0,function(){return t.useContext(a)}])},673553,e=>{"use strict";var t=e.i(271645),a=e.i(146376),n=e.i(545356);e.s(["useCompositeListItem",0,function(e={}){let{guess:r,label:s,metadata:i,textRef:o,index:l}=e,{register:d,unregister:u,subscribeMapChange:c,nextIndexRef:h}=(0,n.useCompositeListContext)(),p=t.useRef(-1),[m,f]=t.useState(null==l&&r?()=>{if(-1===p.current){let e=h.current;h.current+=1,p.current=e}return p.current}:-1),g=l??m,x=t.useRef(null),y=t.useCallback(e=>{let t=x.current;t&&u(t),x.current=e,e&&d(e,{metadata:i??null,index:l??null,label:s,textRef:o})},[l,d,u,i,s,o]);return(0,a.useIsoLayoutEffect)(()=>{if(null==l)return c(e=>{let t=x.current?e.get(x.current)?.index:null;null!=t&&f(t)})},[l,c]),{ref:y,index:g}}])},652225,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(552245);let n=t.forwardRef(function(e,t){let{className:n,render:r,orientation:s="horizontal",style:i,...o}=e;return(0,a.useRenderElement)("div",e,{state:{orientation:s},ref:t,props:[{role:"separator","aria-orientation":s},o]})});e.s(["Separator",0,n])},73364,e=>{"use strict";var t=e.i(343084),a=e.i(229315);e.s(["getCssDimensions",0,function(e){let n=(0,a.getComputedStyle)(e),r=parseFloat(n.width)||0,s=parseFloat(n.height)||0,i=(0,a.isHTMLElement)(e),o=i?e.offsetWidth:r,l=i?e.offsetHeight:s;return((0,t.round)(r)!==o||(0,t.round)(s)!==l)&&(r=o,s=l),{width:r,height:s}}])},493801,751898,536015,e=>{"use strict";var t=e.i(24708),a=e.i(55545),n=e.i(455024),r=e.i(99151),s=e.i(845110),i=e.i(281092),o=e.i(234662);e.s(["formatDistanceToNowStrict",0,function(e,l){return function(e,t,l){var d;let u,c,h=(0,n.getDefaultOptions)(),p=l?.locale??h.locale??a.defaultLocale,m=(c=(0,i.toDate)(e)-(0,i.toDate)(t))<0?-1:c>0?1:c;if(isNaN(m))throw RangeError("Invalid time value");let f=Object.assign({},l,{addSuffix:l?.addSuffix,comparison:m}),[g,x]=(0,s.normalizeDates)(l?.in,...m>0?[t,e]:[e,t]),y=(d=l?.roundingMethod??"round",e=>{let t=(d?Math[d]:Math.trunc)(e);return 0===t?0:t}),k=x.getTime()-g.getTime(),b=k/o.millisecondsInMinute,v=(k-((0,r.getTimezoneOffsetInMilliseconds)(x)-(0,r.getTimezoneOffsetInMilliseconds)(g)))/o.millisecondsInMinute,M=l?.unit;if("second"===(u=M||(b<1?"second":b<60?"minute":b<o.minutesInDay?"hour":v<o.minutesInMonth?"day":v<o.minutesInYear?"month":"year"))){let e=y(k/1e3);return p.formatDistance("xSeconds",e,f)}if("minute"===u){let e=y(b);return p.formatDistance("xMinutes",e,f)}if("hour"===u){let e=y(b/60);return p.formatDistance("xHours",e,f)}if("day"===u){let e=y(v/o.minutesInDay);return p.formatDistance("xDays",e,f)}if("month"===u){let e=y(v/o.minutesInMonth);return 12===e&&"month"!==M?p.formatDistance("xYears",1,f):p.formatDistance("xMonths",e,f)}else{let e=y(v/o.minutesInYear);return p.formatDistance("xYears",e,f)}}(e,(0,t.constructNow)(e),l)}],493801);var l=e.i(456420);let d={name:"pin",size:24,node:[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]};d.node;let u=(0,l.default)(d);e.s(["Pin",0,u],751898);var c=e.i(681307),h=e.i(245629);let p=c.z.object({id:c.z.number(),text:c.z.string(),alwaysLoad:c.z.boolean(),createdAt:h.DateLikeSchema});c.z.object({id:c.z.number(),path:c.z.string(),description:c.z.string(),aliases:c.z.string().array().nullish(),ownedByUser:c.z.boolean(),hits:c.z.number(),lastReadAt:h.DateLikeSchema.nullable(),createdAt:h.DateLikeSchema,updatedAt:h.DateLikeSchema,factCount:c.z.number(),facts:p.array()});let m=[{path:"profile",of:"The user themselves — who they are, what they do, where, how they live"},{path:"preferences",of:"How they like things done, and said"},{path:"people/",of:"Who someone is to them, and what matters about them"},{path:"projects/",of:"Something they are building or running"},{path:"plans/",of:"A trip, an appointment, a purchase, a deadline"},{path:"topics/",of:"Anything else worth its own note"},{path:"inbox",of:"Nowhere obvious to go"}],f=m.filter(e=>!e.path.endsWith("/")).map(e=>e.path),g=m.filter(e=>e.path.endsWith("/")).map(e=>e.path.slice(0,-1));RegExp(`^(?:${f.join("|")}|(?:${g.join("|")})/.+)$`);let x=["profile","preferences"],y=c.z.object({op:c.z.enum(["add","replace","forget","carry","uncarry"]),path:c.z.string(),text:c.z.string()});c.z.object({id:c.z.string(),status:c.z.enum(["running","done","stopped","failed"]),provider:c.z.string(),model:c.z.string(),callIds:c.z.string().array(),messages:c.z.number(),changes:y.array(),error:c.z.string().nullable(),inputTokens:c.z.number(),outputTokens:c.z.number(),startedAt:h.DateLikeSchema,endedAt:h.DateLikeSchema.nullable()}),e.s(["isFading",0,function(e){let t,a,n;return t=e.path,!x.includes(t)&&.15>(a=(0,h.toDate)(e.lastReadAt??e.createdAt),n=Math.max(0,(Date.now()-a.getTime())/864e5),(e.hits+1)/(1+n))},"noteTitle",0,function(e){let t=e.indexOf("/");return -1===t?e:e.slice(t+1)},"sectionOf",0,function(e){if("profile"===e||"preferences"===e)return"you";let t=e.slice(0,e.indexOf("/"));return g.includes(t)?t:"inbox"},"tidyTally",0,function(e){let t=t=>e.filter(e=>e.op===t).length,a=[[t("add"),"added"],[t("replace"),"revised"],[t("forget"),"dropped"],[t("carry"),"carried"],[t("uncarry"),"uncarried"]].filter(([e])=>e>0).map(([e,t])=>`${e} ${t}`);return a.length?a.join(", "):"nothing to change"}],536015)},328256,e=>{"use strict";var t=e.i(456420);let a={name:"book-marked",size:24,node:[["path",{d:"M10 2v8l3-3 3 3V2",key:"sqw3rj"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]]};a.node;let n=(0,t.default)(a);e.s(["BookMarked",0,n],328256)},716327,e=>{"use strict";var t=e.i(456420);let a={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};a.node;let n=(0,t.default)(a);e.s(["ChevronDown",0,n],716327)},24071,829600,226091,e=>{"use strict";var t=e.i(456420);let a={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};a.node;let n=(0,t.default)(a);e.s(["ChevronLeft",0,n],24071);let r={name:"file",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]};r.node;let s=(0,t.default)(r);e.s(["File",0,s],829600);let i={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};i.node;let o=(0,t.default)(i);e.s(["FileText",0,o],226091)},986253,e=>{"use strict";var t=e.i(456420);let a={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};a.node;let n=(0,t.default)(a);e.s(["default",0,n])},867927,e=>{"use strict";var t=e.i(986253);e.s(["ChevronRight",()=>t.default])},905015,e=>{"use strict";var t=e.i(456420);let a={name:"file-braces",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],aliases:["file-json"]};a.node;let n=(0,t.default)(a);e.s(["FileJson",0,n],905015)},60744,e=>{"use strict";var t=e.i(456420);let a={name:"file-pen",size:24,node:[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]],aliases:["file-edit"]};a.node;let n=(0,t.default)(a);e.s(["FilePen",0,n],60744)},831458,e=>{"use strict";var t=e.i(456420);let a={name:"flag",size:24,node:[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]};a.node;let n=(0,t.default)(a);e.s(["Flag",0,n],831458)},569644,e=>{"use strict";var t=e.i(456420);let a={name:"folder-open",size:24,node:[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]};a.node;let n=(0,t.default)(a);e.s(["FolderOpen",0,n],569644)},91511,e=>{"use strict";var t=e.i(456420);let a={name:"globe",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]};a.node;let n=(0,t.default)(a);e.s(["Globe",0,n],91511)},815170,e=>{"use strict";var t=e.i(456420);let a={name:"image",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]};a.node;let n=(0,t.default)(a);e.s(["Image",0,n],815170)},218964,468590,730274,604139,991322,e=>{"use strict";var t=e.i(456420);let a={name:"list-checks",size:24,node:[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]]};a.node;let n=(0,t.default)(a);e.s(["ListChecks",0,n],218964);let r={name:"message-square",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]};r.node;let s=(0,t.default)(r);e.s(["MessageSquare",0,s],468590);let i={name:"send",size:24,node:[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]};i.node;let o=(0,t.default)(i);e.s(["Send",0,o],730274);let l={name:"terminal",size:24,node:[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]};l.node;let d=(0,t.default)(l);e.s(["Terminal",0,d],604139);let u={name:"cable",size:24,node:[["path",{d:"M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z",key:"trhst0"}],["path",{d:"M17 21v-2",key:"ds4u3f"}],["path",{d:"M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10",key:"1mo9zo"}],["path",{d:"M21 21v-2",key:"eo0ou"}],["path",{d:"M3 5V3",key:"1k5hjh"}],["path",{d:"M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z",key:"1dd30t"}],["path",{d:"M7 5V3",key:"1t1388"}]]};u.node;let c=(0,t.default)(u);e.s(["McpMark",0,c],991322)},632781,e=>{"use strict";var t=e.i(758379);e.s(["Loader2",()=>t.default])},779266,e=>{"use strict";var t=e.i(456420);let a={name:"rotate-ccw-clock",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],aliases:["history"]};a.node;let n=(0,t.default)(a);e.s(["History",0,n],779266)},466787,e=>{"use strict";var t=e.i(755566);e.s(["TriangleAlert",()=>t.default])},263676,e=>{"use strict";var t=e.i(814387);e.s(["X",()=>t.default])}]);