agentnetes 0.1.6 → 0.1.7

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 (114) hide show
  1. package/package.json +1 -1
  2. package/web/.next/BUILD_ID +1 -1
  3. package/web/.next/build-manifest.json +3 -3
  4. package/web/.next/prerender-manifest.json +28 -0
  5. package/web/.next/required-server-files.json +1 -3
  6. package/web/.next/server/app/_global-error/page.js.nft.json +1 -1
  7. package/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  8. package/web/.next/server/app/_global-error.html +1 -1
  9. package/web/.next/server/app/_global-error.rsc +1 -1
  10. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  11. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  12. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  13. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  14. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  15. package/web/.next/server/app/_not-found/page/next-font-manifest.json +7 -2
  16. package/web/.next/server/app/_not-found/page.js +1 -1
  17. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  18. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  19. package/web/.next/server/app/_not-found.html +1 -1
  20. package/web/.next/server/app/_not-found.rsc +9 -10
  21. package/web/.next/server/app/_not-found.segments/_full.segment.rsc +9 -10
  22. package/web/.next/server/app/_not-found.segments/_head.segment.rsc +3 -3
  23. package/web/.next/server/app/_not-found.segments/_index.segment.rsc +5 -6
  24. package/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  25. package/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  26. package/web/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -3
  27. package/web/.next/server/app/api/config.body +1 -0
  28. package/web/.next/server/app/api/config.meta +1 -0
  29. package/web/.next/server/app/demo/page/next-font-manifest.json +7 -2
  30. package/web/.next/server/app/demo/page.js +1 -1
  31. package/web/.next/server/app/demo/page.js.nft.json +1 -1
  32. package/web/.next/server/app/demo/page_client-reference-manifest.js +1 -1
  33. package/web/.next/server/app/demo.html +1 -1
  34. package/web/.next/server/app/demo.rsc +13 -12
  35. package/web/.next/server/app/demo.segments/_full.segment.rsc +13 -12
  36. package/web/.next/server/app/demo.segments/_head.segment.rsc +3 -3
  37. package/web/.next/server/app/demo.segments/_index.segment.rsc +5 -6
  38. package/web/.next/server/app/demo.segments/_tree.segment.rsc +4 -3
  39. package/web/.next/server/app/demo.segments/demo/__PAGE__.segment.rsc +4 -4
  40. package/web/.next/server/app/demo.segments/demo.segment.rsc +3 -3
  41. package/web/.next/server/app/docs/page/next-font-manifest.json +7 -2
  42. package/web/.next/server/app/docs/page.js +1 -1
  43. package/web/.next/server/app/docs/page.js.nft.json +1 -1
  44. package/web/.next/server/app/docs/page_client-reference-manifest.js +1 -1
  45. package/web/.next/server/app/docs.html +3 -3
  46. package/web/.next/server/app/docs.rsc +13 -12
  47. package/web/.next/server/app/docs.segments/_full.segment.rsc +13 -12
  48. package/web/.next/server/app/docs.segments/_head.segment.rsc +3 -3
  49. package/web/.next/server/app/docs.segments/_index.segment.rsc +5 -6
  50. package/web/.next/server/app/docs.segments/_tree.segment.rsc +4 -3
  51. package/web/.next/server/app/docs.segments/docs/__PAGE__.segment.rsc +4 -4
  52. package/web/.next/server/app/docs.segments/docs.segment.rsc +3 -3
  53. package/web/.next/server/app/index.html +1 -1
  54. package/web/.next/server/app/index.rsc +13 -12
  55. package/web/.next/server/app/index.segments/__PAGE__.segment.rsc +4 -4
  56. package/web/.next/server/app/index.segments/_full.segment.rsc +13 -12
  57. package/web/.next/server/app/index.segments/_head.segment.rsc +3 -3
  58. package/web/.next/server/app/index.segments/_index.segment.rsc +5 -6
  59. package/web/.next/server/app/index.segments/_tree.segment.rsc +4 -3
  60. package/web/.next/server/app/page/next-font-manifest.json +7 -2
  61. package/web/.next/server/app/page.js +1 -1
  62. package/web/.next/server/app/page.js.nft.json +1 -1
  63. package/web/.next/server/app/page_client-reference-manifest.js +1 -1
  64. package/web/.next/server/chunks/[root-of-the-server]__0h9pqwt._.js +1 -1
  65. package/web/.next/server/chunks/ssr/{[root-of-the-server]__0amff4c._.js → [root-of-the-server]__0fzgx80._.js} +2 -2
  66. package/web/.next/server/chunks/ssr/{[root-of-the-server]__08ixfva._.js → [root-of-the-server]__0r3ayxw._.js} +2 -2
  67. package/web/.next/server/chunks/ssr/[root-of-the-server]__0tlv0_c._.js +3 -0
  68. package/web/.next/server/chunks/ssr/app_demo_page_tsx_0.31s93._.js +2 -2
  69. package/web/.next/server/chunks/ssr/app_docs_page_tsx_0a3qz3_._.js +3 -3
  70. package/web/.next/server/chunks/ssr/app_page_tsx_0es_sk2._.js +1 -1
  71. package/web/.next/server/chunks/ssr/node_modules_08x2~-f._.js +3 -0
  72. package/web/.next/server/chunks/ssr/{node_modules_0fx6-.x._.js → node_modules_0blbtbs._.js} +4 -2
  73. package/web/.next/server/chunks/ssr/node_modules_0mwlsb-._.js +3 -0
  74. package/web/.next/server/chunks/ssr/{node_modules_0lynej0._.js → node_modules_10h38q2._.js} +2 -2
  75. package/web/.next/server/middleware-build-manifest.js +3 -3
  76. package/web/.next/server/next-font-manifest.js +1 -1
  77. package/web/.next/server/next-font-manifest.json +19 -2
  78. package/web/.next/server/pages/404.html +1 -1
  79. package/web/.next/server/pages/500.html +1 -1
  80. package/web/.next/static/chunks/00gs7ywo3p_-j.css +3 -0
  81. package/web/.next/static/chunks/00pksrk9b32qm.js +1 -0
  82. package/web/.next/static/chunks/07h.efnrmr0xe.js +185 -0
  83. package/web/.next/static/chunks/{0wsoljjoc5b47.js → 08845o78x1i1w.js} +5 -5
  84. package/web/.next/static/chunks/0cn.wl1796p2h.js +3 -0
  85. package/web/.next/static/chunks/0z1bg424bhco1.js +3 -0
  86. package/web/.next/static/chunks/{0u46szahhg8-l.js → 13l7oudco0wo6.js} +1 -1
  87. package/web/.next/static/media/13bf9871fe164e7f-s.0s19wthhh_6~m.woff2 +0 -0
  88. package/web/.next/static/media/1bffadaabf893a1e-s.16ipb6fqu393i.woff2 +0 -0
  89. package/web/.next/static/media/2bbe8d2671613f1f-s.067x_6k0k23tk.woff2 +0 -0
  90. package/web/.next/static/media/2c55a0e60120577a-s.0bjc5tiuqdqro.woff2 +0 -0
  91. package/web/.next/static/media/3fe682a82f50d426-s.09q3q1i5159bl.woff2 +0 -0
  92. package/web/.next/static/media/5476f68d60460930-s.0wxq9webf.ew4.woff2 +0 -0
  93. package/web/.next/static/media/70bc3e132a0a741e-s.p.1409xf.ylxg8g.woff2 +0 -0
  94. package/web/.next/static/media/71b036adf157cdcf-s.03nf~dfjdkf~..woff2 +0 -0
  95. package/web/.next/static/media/83afe278b6a6bb3c-s.p.0q-301v4kxxnr.woff2 +0 -0
  96. package/web/.next/static/media/89b21bb081cb7469-s.0gfhww.tctz1o.woff2 +0 -0
  97. package/web/.next/static/media/9c72aa0f40e4eef8-s.0m6w47a4e5dy9.woff2 +0 -0
  98. package/web/.next/static/media/ad66f9afd8947f86-s.11u06r12fd6v_.woff2 +0 -0
  99. package/web/.next/static/media/cc545e633e20c56d-s.0dza.stei.9v7.woff2 +0 -0
  100. package/web/package.json +12 -1
  101. package/web/server.js +1 -1
  102. package/web/.next/server/chunks/ssr/_062mb1e._.js +0 -3
  103. package/web/.next/server/chunks/ssr/node_modules_05cohki._.js +0 -3
  104. package/web/.next/server/chunks/ssr/node_modules_0n.ghpl._.js +0 -5
  105. package/web/.next/server/chunks/ssr/node_modules_120b470._.js +0 -5
  106. package/web/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_038euao._.js +0 -3
  107. package/web/.next/static/chunks/05bvvz79zswfr.js +0 -1
  108. package/web/.next/static/chunks/0a4bykb92jbu2.js +0 -3
  109. package/web/.next/static/chunks/0zarrl-ygjy7b.js +0 -1
  110. package/web/.next/static/chunks/164_6pqattb9q.css +0 -1
  111. package/web/.next/static/chunks/16xltw7vj2r00.js +0 -185
  112. /package/web/.next/static/{x6OtPfrxJ7vA5hRM_7Q7K → SMcLeSYWNCOVrWD-oXgfW}/_buildManifest.js +0 -0
  113. /package/web/.next/static/{x6OtPfrxJ7vA5hRM_7Q7K → SMcLeSYWNCOVrWD-oXgfW}/_clientMiddlewareManifest.js +0 -0
  114. /package/web/.next/static/{x6OtPfrxJ7vA5hRM_7Q7K → SMcLeSYWNCOVrWD-oXgfW}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,31713,e=>{"use strict";var t=e.i(47167),s=e.i(43476),a=e.i(22016),r=e.i(57688),l=e.i(71645),i=e.i(72520),n=e.i(50682),o=e.i(39312),d=e.i(75254);let c=(0,d.default)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);var x=e.i(52008),h=e.i(68054),m=e.i(78917);let p=(0,d.default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);var g=e.i(63059),b=e.i(72664);let u=(0,d.default)("network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);var w=e.i(97625);let f=(0,d.default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);var v=e.i(97250),j=e.i(91799);let N=(0,d.default)("target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]),y=(0,d.default)("split",[["path",{d:"M16 3h5v5",key:"1806ms"}],["path",{d:"M8 3H3v5",key:"15dfkv"}],["path",{d:"M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3",key:"1qrqzj"}],["path",{d:"m15 9 6-6",key:"ko1vev"}]]),k=(0,d.default)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]),A=(0,d.default)("message-square",[["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"}]]),T=(0,d.default)("check-check",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]]);var S=e.i(63178);let I=[{delay:0,type:"cmd",text:'$ agentnetes run "Add @ai-sdk/deepseek with streaming support"'},{delay:700,type:"info",text:"Initializing vRLM runtime..."},{delay:1100,type:"info",text:"Warming sandbox snapshot [vercel-ai-monorepo @ a3f7bc2]"},{delay:1600,type:"dim",text:""},{delay:1800,type:"root",text:"[root] Tech Lead spawned analyzing goal + monorepo"},{delay:2200,type:"exec",text:' > grep -r "LanguageModelV1" packages/ --include="*.ts" -l'},{delay:2500,type:"exec",text:' > find packages -name "package.json" -maxdepth 2'},{delay:2900,type:"exec",text:" > Spawning 4 specialist agents"},{delay:3200,type:"dim",text:""},{delay:3400,type:"agent",text:"[0.3s] Architecture Scout running mapping provider interfaces"},{delay:3800,type:"agent",text:"[0.8s] Provider Engineer running implementing LanguageModelV1"},{delay:4200,type:"agent",text:"[1.4s] Test Engineer running vitest coverage + types"},{delay:4600,type:"agent",text:"[1.9s] Package Engineer running ESM + CJS exports"},{delay:5e3,type:"dim",text:""},{delay:5100,type:"collab",text:"[2.1s] Collaboration: Test Engineer -> Provider Engineer"},{delay:5300,type:"exec",text:" > Type error in DeepSeekChatModel.doStream() -- patching"},{delay:5700,type:"exec",text:" > Re-running test suite..."},{delay:6100,type:"dim",text:""},{delay:6300,type:"success",text:"Done in 47s"},{delay:6500,type:"success",text:" 8/8 tests passing 0 TypeScript errors 4 files generated"}],M=["Self-Organizing","On Demand","Self-Replicating","Self-Learning","Self-Resilient"];function R(){let[e,t]=(0,l.useState)(0),[a,r]=(0,l.useState)(!0);return(0,l.useEffect)(()=>{let e=setInterval(()=>{r(!1),setTimeout(()=>{t(e=>(e+1)%M.length),r(!0)},400)},2200);return()=>clearInterval(e)},[]),(0,s.jsx)("span",{className:"inline-block transition-all duration-300 gradient-text",style:{opacity:+!!a,transform:a?"translateY(0)":"translateY(-8px)"},children:M[e]})}function C(){let[e,t]=(0,l.useState)(0),a=(0,l.useRef)(null);return(0,l.useEffect)(()=>{if(e>=I.length){let e=setTimeout(()=>t(0),4e3);return()=>clearTimeout(e)}let s=I[e],a=e>0?I[e-1].delay:0,r=setTimeout(()=>t(e=>e+1),0===e?0:s.delay-a);return()=>clearTimeout(r)},[e]),(0,l.useEffect)(()=>{a.current?.scrollTo({top:a.current.scrollHeight,behavior:"smooth"})},[e]),(0,s.jsxs)("div",{className:"rounded-2xl border border-white/10 overflow-hidden shadow-2xl shadow-black/20",style:{background:"var(--bg-panel)"},children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-4 py-3 border-b border-white/[0.06] bg-white/[0.02]",children:[(0,s.jsx)("span",{className:"w-3 h-3 rounded-full bg-[#ff5f57]"}),(0,s.jsx)("span",{className:"w-3 h-3 rounded-full bg-[#ffbd2e]"}),(0,s.jsx)("span",{className:"w-3 h-3 rounded-full bg-[#28c840]"}),(0,s.jsx)("span",{className:"ml-3 text-sm text-white/80 font-mono flex-1",children:"agentnetes -- vRLM runtime"}),e>=I.length&&(0,s.jsx)("button",{onClick:()=>t(0),className:"text-white/80 hover:text-white transition-colors",children:(0,s.jsx)(f,{size:11})})]}),(0,s.jsxs)("div",{ref:a,className:"p-5 font-mono text-sm leading-6 space-y-0.5 overflow-y-auto",style:{height:"290px",background:"var(--bg-panel)"},children:[I.slice(0,e).map((e,t)=>(0,s.jsx)("div",{className:`whitespace-pre ${function(e){switch(e){case"cmd":return"text-white font-semibold";case"info":return"text-white/75";case"dim":return"opacity-0 select-none";case"root":return"text-yellow-400 font-medium";case"exec":return"text-violet-400";case"agent":return"text-purple-300";case"collab":return"text-orange-400 font-medium";case"success":return"text-emerald-400 font-semibold"}}(e.type)}`,children:e.text||" "},t)),e<I.length&&(0,s.jsx)("span",{className:"inline-block w-2 h-3.5 bg-violet-400 animate-pulse align-middle"})]})]})}let L=["Add a @ai-sdk/deepseek provider with streaming","Find security vulnerabilities in the auth flow","Add a /research command with source citations","Refactor the rate-limiter following existing patterns"];function z(){let[e,t]=(0,l.useState)(!0);return(0,l.useEffect)(()=>{let e=setInterval(()=>t(e=>!e),500);return()=>clearInterval(e)},[]),(0,s.jsx)("span",{className:`inline-block w-0.5 h-4 bg-violet-400 ml-px align-middle transition-opacity ${e?"opacity-100":"opacity-0"}`})}function P(){let[e,t]=(0,l.useState)(0),[a,r]=(0,l.useState)(0),[i,n]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{let s=L[e];if(!i&&a<s.length){let e=setTimeout(()=>r(e=>e+1),36);return()=>clearTimeout(e)}if(!i&&a===s.length){let e=setTimeout(()=>n(!0),2200);return()=>clearTimeout(e)}if(i&&a>0){let e=setTimeout(()=>r(e=>e-1),15);return()=>clearTimeout(e)}if(i&&0===a){let e=setTimeout(()=>{n(!1),t(e=>(e+1)%L.length)},0);return()=>clearTimeout(e)}},[a,i,e]),(0,s.jsxs)("span",{className:"text-violet-300",children:[L[e].slice(0,a),(0,s.jsx)(z,{})]})}function E({to:e,suffix:t=""}){let[a,r]=(0,l.useState)(0);return(0,l.useEffect)(()=>{let t=0,s=Math.max(1,Math.ceil(e/50)),a=setInterval(()=>{r(t=Math.min(t+s,e)),t>=e&&clearInterval(a)},28);return()=>clearInterval(a)},[e]),(0,s.jsxs)(s.Fragment,{children:[a,t]})}let $=[{id:"goal",shortLabel:"Define Goal",icon:N,color:"text-blue-400",bg:"bg-blue-400/10",border:"border-blue-400/30",glow:"shadow-blue-400/20",title:"User defines the goal",desc:"A single goal starts the run. The system treats it as the source of truth for the team that will be created.",detail:(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"rounded-xl border border-white/10 overflow-hidden",style:{background:"var(--bg-panel)"},children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-white/[0.06]",children:[(0,s.jsx)("span",{className:"w-2 h-2 rounded-full bg-blue-400/60"}),(0,s.jsx)("span",{className:"text-xs font-mono text-white/40",children:"goal input"})]}),(0,s.jsxs)("div",{className:"px-4 py-3 font-mono text-sm",children:[(0,s.jsx)("span",{className:"text-white/40",children:"$ "}),(0,s.jsx)("span",{className:"text-emerald-400",children:"agentnetes run"}),(0,s.jsx)("span",{className:"text-violet-300",children:' "Ship a production ready billing portal"'})]})]}),(0,s.jsx)("div",{className:"grid grid-cols-3 gap-2",children:[{label:"Goal",value:"defined"},{label:"Priority",value:"high"},{label:"Scope",value:"multi-agent"}].map(e=>(0,s.jsxs)("div",{className:"rounded-xl border border-white/[0.06] px-3 py-3",style:{background:"var(--bg-subtle)"},children:[(0,s.jsx)("div",{className:"text-[10px] font-mono uppercase tracking-[0.16em] text-white/30",children:e.label}),(0,s.jsx)("div",{className:"mt-1 text-sm font-semibold text-white/80",children:e.value})]},e.label))})]})},{id:"root",shortLabel:"Decompose Tasks",icon:y,color:"text-violet-400",bg:"bg-violet-400/10",border:"border-violet-400/30",glow:"shadow-violet-400/20",title:"Root agent decomposes the task",desc:"The root agent reads the goal, frames the work, and breaks it into clear task units with ownership.",detail:(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"rounded-xl border border-white/[0.08] px-4 py-4",style:{background:"var(--bg-panel)"},children:[(0,s.jsxs)("div",{className:"mb-3 flex items-center justify-between gap-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(y,{size:14,className:"text-white/70"}),(0,s.jsx)("span",{className:"text-sm font-mono font-semibold text-white/80",children:"root agent planner"})]}),(0,s.jsx)("span",{className:"text-[10px] font-mono uppercase tracking-[0.16em] text-white/30",children:"analysis pass"})]}),(0,s.jsx)("div",{className:"grid grid-cols-4 gap-2 text-center text-xs font-mono",children:["read goal","analyze constraints","decompose work","assign ownership"].map(e=>(0,s.jsx)("div",{className:"rounded-lg border border-white/[0.06] bg-white/[0.03] px-2 py-3 text-white/65",children:e},e))})]}),(0,s.jsx)("div",{className:"space-y-1.5",children:["Map surfaces: UI, backend, tests, rollout","Identify blockers, dependencies, and validation","Create work packets for specialists"].map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-white/[0.06] px-4 py-2.5",style:{background:"var(--bg-panel)"},children:[(0,s.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-white/40"}),(0,s.jsx)("span",{className:"text-sm text-white/65",children:e})]},e))})]})},{id:"team",shortLabel:"Spawn Agent Teams",icon:k,color:"text-emerald-400",bg:"bg-emerald-400/10",border:"border-emerald-400/30",glow:"shadow-emerald-400/20",title:"Root agent spawns agent teams on demand",desc:"Agent teams are created only when needed. The root agent spawns the exact specialists required for the goal.",detail:(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("div",{className:"grid grid-cols-2 gap-2",children:[{name:"Planner",status:"active",note:"holds the goal and plan"},{name:"Frontend",status:"spawned",note:"owns product UI work"},{name:"Runtime",status:"spawned",note:"owns APIs and state"},{name:"Verifier",status:"spawned",note:"owns tests and checks"}].map(({name:e,status:t,note:a})=>(0,s.jsxs)("div",{className:"rounded-xl border border-white/[0.06] p-3",style:{background:"var(--bg-panel)"},children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsx)("span",{className:"text-sm font-semibold text-white/80",children:e}),(0,s.jsx)("span",{className:"rounded-full border border-white/10 px-2 py-0.5 text-[10px] font-mono uppercase tracking-[0.14em] text-white/35",children:t})]}),(0,s.jsx)("div",{className:"mt-2 text-xs text-white/45",children:a})]},e))}),(0,s.jsxs)("div",{className:"rounded-xl border border-white/[0.06] px-4 py-3",style:{background:"var(--bg-subtle)"},children:[(0,s.jsx)("div",{className:"text-[10px] font-mono uppercase tracking-[0.16em] text-white/30",children:"team behavior"}),(0,s.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:["self organizing","elastic team size","spawned on demand"].map(e=>(0,s.jsx)("span",{className:"rounded-full border border-white/10 bg-white/[0.03] px-3 py-1 text-xs text-white/55",children:e},e))})]})]})},{id:"sandbox",shortLabel:"Sandbox + RLM",icon:b.Box,color:"text-emerald-400",bg:"bg-emerald-400/10",border:"border-emerald-400/30",glow:"shadow-emerald-400/20",title:"Each agent gets sandbox and enters the RLM loop",desc:"Every agent gets its own sandbox, coding agent, context, and a live RLM loop for execution and verification.",detail:(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("div",{className:"grid grid-cols-2 gap-2",children:[{name:"Frontend",context:"design tokens, routes, UI constraints"},{name:"Runtime",context:"schemas, APIs, repo state"},{name:"Verifier",context:"test plan, acceptance checks"},{name:"Researcher",context:"docs, patterns, prior findings"}].map(({name:e,context:t})=>(0,s.jsxs)("div",{className:"rounded-xl border border-white/[0.06] overflow-hidden",style:{background:"var(--bg-panel)"},children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 border-b border-white/[0.04] px-3 py-2",children:[(0,s.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-white/40"}),(0,s.jsx)("span",{className:"text-xs font-mono font-semibold text-white/65",children:e})]}),(0,s.jsxs)("div",{className:"space-y-1.5 px-3 py-3 text-[11px] font-mono text-white/45",children:[(0,s.jsx)("div",{children:"firecracker sandbox"}),(0,s.jsx)("div",{children:"coding agent attached"}),(0,s.jsx)("div",{children:"external vars mounted"}),(0,s.jsx)("div",{className:"text-white/35",children:t})]})]},e))}),(0,s.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-white/[0.08] px-4 py-2.5",style:{background:"var(--bg-subtle)"},children:[(0,s.jsx)(c,{size:14,className:"text-white/60 shrink-0"}),(0,s.jsx)("span",{className:"text-xs text-white/55",children:"Isolated sandboxes keep work clean. The team shares findings, not a shared filesystem or a stuffed context window."})]})]})},{id:"research",shortLabel:"Auto Research",icon:f,color:"text-blue-400",bg:"bg-blue-400/10",border:"border-blue-400/30",glow:"shadow-blue-400/20",title:"Auto research technique kicks in",desc:"Agents search, read, execute, and verify repeatedly so each task can improve as new information arrives.",detail:(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"rounded-xl border border-white/[0.06] overflow-hidden",style:{background:"var(--bg-panel)"},children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-white/[0.04]",children:[(0,s.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-white/50 animate-pulse"}),(0,s.jsx)("span",{className:"text-xs font-mono font-semibold text-white/70",children:"runtime specialist"}),(0,s.jsx)("span",{className:"text-[10px] font-mono text-white/25 ml-auto",children:"rlm iteration 3 of 5"})]}),(0,s.jsx)("div",{className:"px-4 py-3 space-y-2 font-mono text-sm",children:[["search","scan handlers, routes, and existing billing code"],["read","load the relevant files and prior findings"],["think","pick the safest pattern for this repo"],["execute","write code, run checks, capture output"],["verify","confirm the result before reporting back"]].map(([e,t])=>(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("span",{className:"w-14 shrink-0 text-xs uppercase tracking-[0.14em] text-white/40",children:e}),(0,s.jsx)("span",{className:"text-white/55",children:t})]},e))})]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,s.jsxs)("div",{className:"rounded-lg border border-white/[0.06] px-3 py-3 text-center",style:{background:"var(--bg-subtle)"},children:[(0,s.jsx)("div",{className:"text-sm font-mono font-semibold text-white/75",children:"Auto research"}),(0,s.jsx)("div",{className:"mt-1 text-[11px] text-white/40",children:"repo search, docs, prior outputs"})]}),(0,s.jsxs)("div",{className:"rounded-lg border border-white/[0.06] px-3 py-3 text-center",style:{background:"var(--bg-subtle)"},children:[(0,s.jsx)("div",{className:"text-sm font-mono font-semibold text-white/75",children:"Closed loop"}),(0,s.jsx)("div",{className:"mt-1 text-[11px] text-white/40",children:"plan, act, verify, refine"})]})]})]})},{id:"collaborate",shortLabel:"Collaborate + A2A",icon:A,color:"text-orange-400",bg:"bg-orange-400/10",border:"border-orange-400/30",glow:"shadow-orange-400/20",title:"Agents collaborate, learn, and expose A2A",desc:"Agents share findings, learn from each other, and coordinate through collaboration patterns with A2A shown as work in progress.",detail:(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"grid gap-3 lg:grid-cols-[1.2fr_0.8fr]",children:[(0,s.jsxs)("div",{className:"rounded-xl border border-white/[0.06] overflow-hidden",style:{background:"var(--bg-panel)"},children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-white/[0.04]",children:[(0,s.jsx)(A,{size:12,className:"text-white/65"}),(0,s.jsx)("span",{className:"text-xs font-mono text-white/65 font-semibold",children:"team collaboration stream"})]}),(0,s.jsx)("div",{className:"px-4 py-3 space-y-2 text-sm font-mono",children:["Researcher found an existing auth pattern and shared it with Runtime","Verifier reported a failing edge case and Frontend patched the flow","Root agent updated the plan after the new findings landed"].map(e=>(0,s.jsx)("div",{className:"rounded-lg border border-white/[0.06] bg-white/[0.03] px-3 py-2 text-white/60",children:e},e))})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-white/[0.06] p-4",style:{background:"var(--bg-subtle)"},children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(u,{size:14,className:"text-white/60"}),(0,s.jsx)("span",{className:"text-sm font-mono font-semibold text-white/75",children:"A2A card"})]}),(0,s.jsxs)("div",{className:"mt-3 rounded-xl border border-dashed border-white/12 px-3 py-4 text-center",children:[(0,s.jsx)("div",{className:"text-[10px] font-mono uppercase tracking-[0.18em] text-white/30",children:"status"}),(0,s.jsx)("div",{className:"mt-2 text-sm font-semibold text-white/70",children:"work in progress"}),(0,s.jsx)("div",{className:"mt-2 text-xs text-white/45",children:"Agent to agent coordination is visible in the system design and still evolving."})]})]})]}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:["self healing","shared learning","resilient coordination"].map(e=>(0,s.jsx)("span",{className:"rounded-full border border-white/10 bg-white/[0.03] px-3 py-1 text-xs text-white/55",children:e},e))})]})},{id:"deliver",shortLabel:"Deliver",icon:T,color:"text-emerald-400",bg:"bg-emerald-400/10",border:"border-emerald-400/30",glow:"shadow-emerald-400/20",title:"One goal achieved, results come back to the user",desc:"The root agent gathers the outputs, validates the work, and returns a complete result back to the user.",detail:(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"rounded-xl border border-white/[0.08] overflow-hidden",style:{background:"var(--bg-panel)"},children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-4 py-2.5 border-b border-white/[0.06] bg-white/[0.03]",children:[(0,s.jsx)(T,{size:14,className:"text-white/75"}),(0,s.jsx)("span",{className:"text-sm font-semibold text-white/80 font-mono",children:"result package"}),(0,s.jsx)("span",{className:"text-xs text-white/35 ml-auto font-mono",children:"47s, 4 agents, verified"})]}),(0,s.jsx)("div",{className:"px-4 py-3 space-y-2 text-sm",children:["Working code and updated files","Checks, tests, and validation summary","Open issues or follow ups if any remain","A clean result returned to the user"].map(e=>(0,s.jsxs)("div",{className:"flex items-start gap-2",children:[(0,s.jsx)("span",{className:"text-white/60 mt-0.5",children:"✓"}),(0,s.jsx)("span",{className:"text-white/65",children:e})]},e))})]}),(0,s.jsx)("div",{className:"grid grid-cols-3 gap-2",children:["self organizing","self healing","self resilient"].map(e=>(0,s.jsxs)("div",{className:"rounded-xl border border-white/[0.06] px-3 py-3 text-center",style:{background:"var(--bg-subtle)"},children:[(0,s.jsx)("div",{className:"text-[10px] font-mono uppercase tracking-[0.16em] text-white/30",children:"team"}),(0,s.jsx)("div",{className:"mt-1 text-sm font-semibold text-white/75",children:e})]},e))})]})}],G={goal:["one goal","clear intent","user input"],root:["analyze","decompose","plan"],team:["on demand","specialists","elastic"],sandbox:["isolated","coder attached","external context"],research:["auto research","RLM loop","verify"],collaborate:["shared findings","A2A WIP","learn together"],deliver:["verified output","results back","complete"]};function F(){let e,[t,a]=(0,l.useState)(0),[r,i]=(0,l.useState)(!1),[n,o]=(0,l.useState)(!1),d=(0,l.useRef)(null),c=(t+1)/$.length*100;function x(e){return e===t?"text-white shadow-[0_20px_60px_rgba(0,0,0,0.22)] scale-[1.02]":e<t?"border-white/10 bg-white/[0.04] text-white/75":"border-white/[0.06] bg-white/[0.02] text-white/40"}return(0,l.useEffect)(()=>{let e=d.current;if(!e)return;let t=new IntersectionObserver(([e])=>{e.isIntersecting&&!n&&(o(!0),i(!0))},{threshold:.3});return t.observe(e),()=>t.disconnect()},[n]),(0,l.useEffect)(()=>{if(!r)return;let e=setInterval(()=>{a(e=>(e+1)%$.length)},2200);return()=>clearInterval(e)},[r]),(0,s.jsxs)("section",{ref:d,className:"py-24 px-6 relative overflow-hidden",children:[(0,s.jsx)("div",{className:"absolute inset-0 dot-grid opacity-30 pointer-events-none"}),(0,s.jsx)("div",{className:"absolute inset-x-0 top-0 h-40 pointer-events-none",style:{background:"linear-gradient(180deg, rgba(var(--fg), 0.035), transparent)"}}),(0,s.jsx)("div",{className:"max-w-5xl mx-auto mb-0",children:(0,s.jsx)("hr",{className:"gradient-divider"})}),(0,s.jsxs)("div",{className:"max-w-6xl mx-auto relative z-10",children:[(0,s.jsxs)("div",{className:"text-center mb-16",children:[(0,s.jsx)("div",{className:"text-sm font-mono text-white/65 uppercase tracking-[0.24em] mb-3",children:"How It Works"}),(0,s.jsx)("h2",{className:"text-4xl font-bold mb-4 text-white",children:"From one goal to a working team."}),(0,s.jsx)("p",{className:"text-white/60 text-lg max-w-2xl mx-auto leading-relaxed mb-4",children:"An animated infographic that keeps moving. Click any stage to jump in."}),(0,s.jsx)("div",{className:"inline-flex flex-wrap items-center justify-center gap-2 rounded-full border border-white/10 bg-white/[0.03] px-4 py-2 text-[11px] font-mono uppercase tracking-[0.18em] text-white/45",children:["Goal","Decompose","Teams","Sandbox + RLM","Auto Research","Collaborate + A2A","Deliver"].map((e,t)=>(0,s.jsxs)("span",{className:"inline-flex items-center gap-2",children:[(0,s.jsx)("span",{children:e}),t<6&&(0,s.jsx)("span",{className:"text-white/20",children:"/"})]},e))})]}),(0,s.jsxs)("div",{className:"rounded-[32px] border border-white/[0.08] p-5 md:p-7",style:{background:"linear-gradient(180deg, rgba(var(--fg), 0.04), rgba(var(--fg), 0.02))"},children:[(0,s.jsxs)("div",{className:"mb-6 flex flex-col gap-5 lg:flex-row lg:items-end lg:justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-2xl font-semibold text-white",children:$[t].title}),(0,s.jsx)("p",{className:"mt-2 max-w-xl text-sm leading-relaxed text-white/50",children:$[t].desc})]}),(0,s.jsxs)("div",{className:"min-w-[220px]",children:[(0,s.jsx)("div",{className:"mb-2 flex items-center justify-end text-[10px] font-mono uppercase tracking-[0.18em] text-white/35",children:(0,s.jsxs)("span",{children:[String(t+1).padStart(2,"0")," / ",String($.length).padStart(2,"0")]})}),(0,s.jsx)("div",{className:"h-1.5 rounded-full bg-white/[0.08] overflow-hidden",children:(0,s.jsx)("div",{className:"h-full rounded-full transition-all duration-700",style:{width:`${c}%`,background:t<=1?"linear-gradient(90deg, rgba(96,165,250,0.9), rgba(168,85,247,0.75))":t<=3?"linear-gradient(90deg, rgba(16,185,129,0.9), rgba(96,165,250,0.7))":"linear-gradient(90deg, rgba(168,85,247,0.75), rgba(251,146,60,0.7))"}})})]})]}),(0,s.jsx)("div",{className:"hidden xl:flex xl:items-center xl:gap-3",children:$.map((e,r)=>{let l=e.icon,n=r===t,o=r<t;return(0,s.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[(0,s.jsxs)("button",{onClick:()=>{a(r),i(!0)},className:`min-w-[126px] flex-1 rounded-2xl border p-4 text-left transition-all duration-500 ${x(r)} ${n?`${e.border} ${e.bg}`:""}`,children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)("div",{className:`flex h-10 w-10 items-center justify-center rounded-2xl border transition-all duration-500 ${n?`${e.border} ${e.bg}`:"border-white/10 bg-white/[0.03]"}`,children:(0,s.jsx)(l,{size:16,className:n?e.color:"text-white/55"})}),(0,s.jsx)("div",{className:`h-2.5 w-2.5 rounded-full ${n?"bg-white animate-pulse":o?"bg-white/55":"bg-white/15"}`})]}),(0,s.jsx)("div",{className:"mt-4 text-sm font-semibold",children:e.shortLabel})]}),r<$.length-1&&(0,s.jsx)("div",{className:`process-flow ${r<t?"is-active":""}`,"aria-hidden":"true",children:(0,s.jsx)("span",{className:"process-flow-dot",style:{animationDelay:`${.12*r}s`}})})]},e.id)})}),(0,s.jsx)("div",{className:"grid gap-3 xl:hidden",children:$.map((e,r)=>{let l=e.icon,n=r===t,o=r<t;return(0,s.jsxs)("div",{children:[(0,s.jsx)("button",{onClick:()=>{a(r),i(!0)},className:`w-full rounded-2xl border p-4 text-left transition-all duration-500 ${x(r)} ${n?`${e.border} ${e.bg}`:""}`,children:(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:`flex h-10 w-10 items-center justify-center rounded-2xl border ${n?`${e.border} ${e.bg}`:"border-white/10 bg-white/[0.03]"}`,children:(0,s.jsx)(l,{size:16,className:n?e.color:"text-white/55"})}),(0,s.jsx)("div",{className:"text-sm font-semibold text-white/80",children:e.title})]}),(0,s.jsx)("div",{className:`h-2.5 w-2.5 rounded-full ${n?"bg-white animate-pulse":o?"bg-white/55":"bg-white/15"}`})]})}),r<$.length-1&&(0,s.jsx)("div",{className:`process-flow-vertical ${r<t?"is-active":""}`,"aria-hidden":"true",children:(0,s.jsx)("span",{className:"process-flow-dot-vertical",style:{animationDelay:`${.12*r}s`}})})]},e.id)})}),(0,s.jsxs)("div",{className:"mt-6 grid gap-4 lg:grid-cols-[1fr_220px]",children:[(0,s.jsxs)("div",{className:"rounded-[28px] border border-white/[0.08] p-5",style:{background:"var(--bg-panel)"},children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:`flex h-11 w-11 items-center justify-center rounded-2xl border ${$[t].border} ${$[t].bg}`,children:(e=$[t].icon,(0,s.jsx)(e,{size:18,className:$[t].color}))}),(0,s.jsx)("div",{children:(0,s.jsx)("div",{className:"text-lg font-semibold text-white",children:$[t].title})})]}),(0,s.jsx)("p",{className:"mt-4 max-w-2xl text-sm leading-relaxed text-white/55",children:$[t].desc})]}),(0,s.jsxs)("div",{className:"rounded-[28px] border border-white/[0.08] p-5",style:{background:"var(--bg-panel)"},children:[(0,s.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:G[$[t].id].map(e=>(0,s.jsx)("span",{className:"rounded-full border border-white/10 bg-white/[0.03] px-3 py-1 text-xs text-white/55",children:e},e))}),(0,s.jsxs)("div",{className:"mt-4 rounded-2xl border border-white/[0.06] px-3 py-3 text-xs text-white/45",style:{background:"var(--bg-subtle)"},children:["self organizing",(0,s.jsx)("br",{}),"self healing",(0,s.jsx)("br",{}),"self resilient"]})]})]})]})]})]})}function D(){return(0,s.jsxs)("div",{className:"rounded-2xl border border-white/10 p-7 glass-card",children:[(0,s.jsx)("div",{className:"flex justify-center mb-5",children:(0,s.jsxs)("div",{className:"flex items-center gap-2 border border-white/10 rounded-xl px-5 py-2.5 bg-white/5",children:[(0,s.jsx)("span",{className:"text-emerald-400 text-sm font-mono",children:"goal:"}),(0,s.jsx)("span",{className:"text-violet-400 text-sm font-mono",children:'"Add @ai-sdk/deepseek provider"'})]})}),(0,s.jsx)("div",{className:"flex justify-center mb-3",children:(0,s.jsx)("div",{className:"w-px h-5 bg-white/10"})}),(0,s.jsx)("div",{className:"flex justify-center mb-3",children:(0,s.jsxs)("div",{className:"border border-white/15 bg-white/[0.03] rounded-xl px-5 py-3 text-center",children:[(0,s.jsx)("div",{className:"text-violet-400 text-sm font-mono font-semibold",children:"Root Agent / Tech Lead"}),(0,s.jsxs)("div",{className:"text-white/75 text-sm mt-0.5 font-mono",children:[(0,s.jsx)("span",{className:"text-blue-400",children:"Gemini 2.5 Pro"})," via AI Gateway"]}),(0,s.jsxs)("div",{className:"flex items-center justify-center gap-1.5 mt-1.5",children:[(0,s.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-orange-400 animate-pulse"}),(0,s.jsx)("span",{className:"text-orange-400 text-sm font-mono",children:"vRLM orchestrator"})]})]})}),(0,s.jsx)("div",{className:"flex justify-center gap-14 mb-3",children:[0,1,2,3].map(e=>(0,s.jsx)("div",{className:"w-px h-5 bg-white/10"},e))}),(0,s.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3 mb-5",children:[{icon:"🔍",label:"Architecture Scout",tool:"search()",toolColor:"text-emerald-400"},{icon:"⚙️",label:"Provider Engineer",tool:"execute()",toolColor:"text-emerald-400"},{icon:"🧪",label:"Test Engineer",tool:"execute()",toolColor:"text-emerald-400"},{icon:"📦",label:"Package Engineer",tool:"execute()",toolColor:"text-emerald-400"}].map(e=>(0,s.jsxs)("div",{className:"rounded-xl border border-white/10 bg-white/[0.02] p-3 text-center",children:[(0,s.jsx)("div",{className:"text-lg mb-1",children:e.icon}),(0,s.jsx)("div",{className:"text-violet-400 text-sm font-medium leading-tight",children:e.label}),(0,s.jsx)("div",{className:"text-blue-400/60 text-sm font-mono mt-1",children:"Gemini 2.5 Flash"}),(0,s.jsxs)("div",{className:"mt-2 flex items-center justify-center gap-1",children:[(0,s.jsx)("span",{className:"w-1 h-1 rounded-full bg-emerald-400/50"}),(0,s.jsx)("span",{className:`${e.toolColor} text-sm font-mono`,children:e.tool})]})]},e.label))}),(0,s.jsxs)("div",{className:"border-t border-white/5 pt-4 flex flex-wrap justify-center gap-5",children:[(0,s.jsxs)("span",{className:"text-sm font-mono text-white/65",children:[(0,s.jsx)("span",{className:"text-orange-400",children:"Firecracker"})," microVM per agent"]}),(0,s.jsxs)("span",{className:"text-sm font-mono text-white/65",children:[(0,s.jsx)("span",{className:"text-emerald-400",children:"search()"})," + ",(0,s.jsx)("span",{className:"text-emerald-400",children:"execute()"})," MCP only"]}),(0,s.jsxs)("span",{className:"text-sm font-mono text-white/65",children:[(0,s.jsx)("span",{className:"text-violet-400",children:"SSE"})," event stream to UI"]})]})]})}function W({badge:e,badgeColor:t,icon:a,title:r,description:l,detail:i,cite:n,code:o}){return(0,s.jsxs)("div",{className:"group rounded-2xl border border-white/10 p-6 hover:border-white/20 flex flex-col gap-4 card-hover",style:{background:"var(--bg-card)"},children:[(0,s.jsxs)("div",{className:"flex items-start justify-between",children:[(0,s.jsx)("div",{className:"text-sm font-mono px-2 py-0.5 rounded border border-white/15 text-white/60",children:e}),(0,s.jsx)("div",{className:"text-white/80 group-hover:text-white transition-colors",children:a})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-white font-semibold text-base mb-2",children:r}),(0,s.jsx)("p",{className:"text-white/85 text-lg leading-relaxed mb-3",children:l}),(0,s.jsx)("p",{className:"text-white/80 text-lg leading-relaxed",children:i})]}),o&&(0,s.jsx)("div",{className:"rounded-lg bg-black/40 border border-white/[0.06] px-3 py-2.5 font-mono text-sm text-violet-300 overflow-x-auto",children:o}),n&&(0,s.jsx)("div",{className:"text-sm text-white/75 font-mono border-t border-white/5 pt-3",children:n})]})}function O({name:e,version:t,highlight:a}){return(0,s.jsxs)("div",{className:`flex flex-col sm:flex-row sm:items-center sm:justify-between gap-1 sm:gap-2 border rounded-xl px-4 py-3 ${a?"border-white/15 bg-white/[0.03]":"border-white/[0.08]"}`,style:a?{}:{background:"var(--bg-subtle)"},children:[(0,s.jsx)("div",{className:"text-white font-semibold text-sm",children:e}),(0,s.jsx)("div",{className:"text-violet-400/70 text-sm font-mono",children:t})]})}function V({n:e,title:t,body:a,accent:r}){return(0,s.jsxs)("div",{className:"flex gap-4",children:[(0,s.jsx)("div",{className:`shrink-0 w-8 h-8 rounded-full border flex items-center justify-center text-sm font-mono mt-0.5 ${r}`,children:e}),(0,s.jsxs)("div",{className:"pt-0.5",children:[(0,s.jsx)("h4",{className:"text-white font-semibold text-base mb-1.5",children:t}),(0,s.jsx)("p",{className:"text-white/90 text-lg leading-relaxed",children:a})]})]})}function U(){let{theme:e,setTheme:t}=(0,S.useTheme)(),[a,r]=(0,l.useState)(!1);return((0,l.useEffect)(()=>{let e=requestAnimationFrame(()=>r(!0));return()=>cancelAnimationFrame(e)},[]),a)?(0,s.jsx)("button",{onClick:()=>t("dark"===e?"light":"dark"),className:"p-2 rounded-lg border border-white/15 text-white/80 hover:text-white hover:border-white/30 transition-all","aria-label":"Toggle theme",children:"dark"===e?(0,s.jsx)(v.Sun,{size:15}):(0,s.jsx)(j.Moon,{size:15})}):(0,s.jsx)("div",{className:"w-9 h-9"})}let _=t.default.env.NEXT_PUBLIC_BASE_PATH??"";function q({size:e=28}){return(0,s.jsx)(r.default,{src:`${_}/favicon.png`,alt:"Agentnetes",width:e,height:e,className:"rounded-lg",priority:!0})}e.s(["default",0,function(){return(0,l.useEffect)(()=>{let e=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.target.classList.add("visible")})},{threshold:.1,rootMargin:"0px 0px -50px 0px"});return document.querySelectorAll(".fade-in-section, .stagger-children").forEach(t=>e.observe(t)),()=>e.disconnect()},[]),(0,s.jsxs)("div",{className:"overflow-x-hidden",style:{fontFamily:"'Inter', sans-serif",background:"var(--bg-base)",color:"rgb(var(--fg))"},children:[(0,s.jsx)("nav",{className:"fixed top-0 inset-x-0 z-50 border-b border-white/[0.06] backdrop-blur-xl",style:{background:"color-mix(in srgb, var(--bg-base) 90%, transparent)"},children:(0,s.jsxs)("div",{className:"max-w-6xl mx-auto px-6 h-14 flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,s.jsx)(q,{size:36}),(0,s.jsx)("span",{className:"font-bold tracking-tight text-white",children:"Agentnetes"}),(0,s.jsx)("span",{className:"text-sm font-mono text-white/80 border border-white/15 rounded px-2 py-0.5 uppercase tracking-wider hidden sm:inline",children:"Kubernetes-inspired Agent Orchestration"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)(U,{}),(0,s.jsx)(a.default,{href:"/docs",className:"text-white/80 hover:text-white transition-colors text-sm hidden sm:block",children:"Docs"}),(0,s.jsx)("a",{href:"https://github.com/Shashikant86/agentnetes",target:"_blank",rel:"noreferrer",className:"text-white/80 hover:text-white transition-colors p-1",children:(0,s.jsx)(n.Github,{size:16})}),(0,s.jsxs)(a.default,{href:"/demo",className:"flex items-center gap-1.5 text-sm font-semibold px-4 py-2 rounded-lg transition-all bg-white text-black hover:bg-white/90",children:["Try Demo ",(0,s.jsx)(i.ArrowRight,{size:11})]})]})]})}),(0,s.jsx)("section",{className:"pt-28 pb-20 px-6 relative overflow-hidden ambient-orb orb-purple noise-overlay",style:{backgroundColor:"#000000"},children:(0,s.jsxs)("div",{className:"max-w-4xl mx-auto text-center relative z-10",children:[(0,s.jsxs)("div",{className:"flex flex-col items-center gap-2 mb-6",children:[(0,s.jsx)("div",{className:"inline-flex items-center gap-2 rounded-full px-5 py-2 text-sm font-mono border border-white/10",style:{background:"var(--bg-subtle)"},children:(0,s.jsx)("span",{className:"text-white/90 font-semibold",children:"Self-Organizing AI Agent Swarms. On Demand."})}),(0,s.jsxs)("div",{className:"text-sm font-mono text-white/60",children:[(0,s.jsx)("span",{className:"text-emerald-400 font-semibold",children:"k8s"})," orchestrates containers."," ",(0,s.jsx)("span",{className:"text-violet-400 font-semibold",children:"a8s"})," orchestrates AI agents."]})]}),(0,s.jsxs)("h1",{className:"text-5xl sm:text-7xl font-extrabold tracking-tight mb-5 leading-[1.05] text-glow",children:[(0,s.jsx)("span",{className:"text-white",children:"Zero to a"}),(0,s.jsx)("br",{}),(0,s.jsx)("span",{className:"text-white",children:(0,s.jsx)(R,{})}),(0,s.jsx)("br",{}),(0,s.jsx)("span",{className:"text-white",children:"AI Agency."})]}),(0,s.jsx)("p",{className:"text-white/75 text-lg mb-4 max-w-2xl mx-auto leading-relaxed font-medium",children:"Type a goal. Agentnetes forms a dynamic team of specialist agents, roles invented on the fly, each running in its own isolated sandbox with the repo pre-cloned."}),(0,s.jsx)("p",{className:"text-white/80 text-base mb-4 max-w-xl mx-auto leading-relaxed",children:"No static agent configs. No stuffed context windows. The team assembles itself, works in parallel, and delivers together."}),(0,s.jsx)("div",{className:"flex flex-wrap items-center justify-center gap-2 mb-10",children:[{label:"RLM Pattern",sub:"MIT CSAIL",color:"text-blue-400"},{label:"AutoResearch Loop",sub:"Karpathy",color:"text-violet-400"},{label:"Two-Tool MCP",sub:"search() + execute()",color:"text-emerald-400"},{label:"A2A Protocol",sub:"Google Agent-to-Agent",color:"text-orange-400"}].map(({label:e,sub:t,color:a})=>(0,s.jsxs)("div",{className:"flex items-center gap-2 rounded-full border border-white/10 px-4 py-2 text-sm font-mono",style:{background:"var(--bg-subtle)"},children:[(0,s.jsx)("span",{className:`font-semibold ${a}`,children:e}),(0,s.jsx)("span",{className:"text-white/50",children:t})]},e))}),(0,s.jsxs)("div",{className:"inline-flex items-center gap-3 rounded-2xl px-5 py-3.5 mb-10 text-base font-mono max-w-full overflow-hidden border border-white/10",style:{background:"var(--bg-subtle)",boxShadow:"0 8px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.04)"},children:[(0,s.jsx)("span",{className:"text-white/75 shrink-0",children:"$"}),(0,s.jsx)("span",{className:"text-white/75 shrink-0",children:"agentnetes run"}),(0,s.jsx)(P,{})]}),(0,s.jsxs)("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-3 mb-16",children:[(0,s.jsxs)(a.default,{href:"/demo",className:"flex items-center gap-2 font-semibold px-7 py-3 rounded-xl text-base transition-all hover:opacity-90 hover:scale-[1.02] animate-glow-pulse bg-white text-black",children:[(0,s.jsx)(o.Zap,{size:14}),"Try Demo"]}),(0,s.jsxs)(a.default,{href:"/docs",className:"flex items-center gap-2 border border-white/15 text-white/70 px-7 py-3 rounded-xl hover:border-white/30 hover:text-white transition-all text-base",children:["Read the docs ",(0,s.jsx)(g.ChevronRight,{size:13})]})]}),(0,s.jsx)("div",{className:"max-w-xl mx-auto w-full mb-10",children:(0,s.jsxs)("div",{className:"rounded-2xl border border-white/10 overflow-hidden",style:{background:"var(--bg-subtle)"},children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-4 py-2 border-b border-white/[0.06]",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-red-500/60"}),(0,s.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-yellow-500/60"}),(0,s.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-green-500/60"})]}),(0,s.jsx)("span",{className:"text-white/30 text-sm font-mono",children:"terminal"}),(0,s.jsx)("a",{href:"https://www.npmjs.com/package/agentnetes",target:"_blank",rel:"noreferrer",className:"text-sm font-mono text-white/50 hover:text-white/70 transition-colors",children:"npmjs.com/package/agentnetes →"})]}),(0,s.jsxs)("div",{className:"px-5 py-4 space-y-2 text-base font-mono text-left overflow-x-auto",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-white/30",children:"$ "}),(0,s.jsx)("span",{className:"text-green-400",children:"npm"}),(0,s.jsx)("span",{className:"text-white/80",children:" install -g agentnetes"})]}),(0,s.jsx)("div",{className:"text-white/30 text-sm pt-1 border-t border-white/[0.05]",children:"then run on any git repo"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-white/30",children:"$ "}),(0,s.jsx)("span",{className:"text-green-400",children:"agentnetes"}),(0,s.jsx)("span",{className:"text-white/80",children:" run "}),(0,s.jsx)("span",{className:"text-purple-400",children:'"add dark mode to this app"'})]})]})]})}),(0,s.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-px rounded-2xl overflow-hidden glass-card shimmer-border",children:[{n:6,s:"+",label:"parallel agents"},{n:2,s:" tools",label:"per agent (MCP)"},{n:100,s:"K+",label:"lines explored"},{n:1,s:" goal",label:"to a full team"}].map(({n:e,s:t,label:a})=>(0,s.jsxs)("div",{className:"py-5 px-4 text-center",style:{background:"var(--bg-subtle)"},children:[(0,s.jsx)("div",{className:"text-3xl font-bold mb-0.5 font-mono text-white",children:(0,s.jsx)(E,{to:e,suffix:t})}),(0,s.jsx)("div",{className:"text-sm text-white/70 font-mono",children:a})]},a))})]})}),(0,s.jsx)(F,{}),(0,s.jsxs)("section",{className:"py-24 px-6 relative overflow-hidden ambient-orb orb-blue fade-in-section",children:[(0,s.jsx)("div",{className:"max-w-5xl mx-auto mb-0",children:(0,s.jsx)("hr",{className:"gradient-divider"})}),(0,s.jsxs)("div",{className:"max-w-5xl mx-auto",children:[(0,s.jsxs)("div",{className:"text-center mb-14",children:[(0,s.jsx)("div",{className:"text-sm font-mono text-white/80 uppercase tracking-widest mb-3",children:"The Problem"}),(0,s.jsx)("h2",{className:"text-4xl font-bold mb-4 text-white",children:"Single agents break on real codebases."}),(0,s.jsx)("p",{className:"text-white/85 text-lg max-w-2xl mx-auto leading-relaxed",children:"Teams have tried everything: single coding agents, prompt-stuffed RAG pipelines, hand-wired MCP tools, elaborate harnesses. They all hit the same wall. Real codebases are too large for one context window, too complex for one agent, and too dynamic for static tool configs. Nobody stopped to ask: what if the agents invented their own team?"})]}),(0,s.jsx)("div",{className:"grid sm:grid-cols-3 gap-4 mb-12",children:[{label:"Single agent + tools",problem:!0,sub:"Cursor, Copilot, custom harnesses",points:["Entire codebase stuffed into context","Context rot beyond ~50K tokens","Sequential: one task at a time","One failure halts everything","Static tool lists, no emergent roles"]},{label:"Agentnetes",problem:!1,sub:"vRLM runtime · RLM pattern",points:["Context lives in sandboxes, not prompts","Agents explore via grep, find, cat","Specialists run in parallel","Agents catch and fix each other's errors","Roles invented per goal, never hardcoded"]},{label:"Teams using AI tools",problem:null,sub:"Copilot, Cursor, RAG, MCP harnesses",points:["Try different coding agent harnesses","Hand-wire MCP tools and hope they compose","Build RAG pipelines to stuff context","Tune prompts and pray context holds","Never break the problem down RLM-style"]}].map(({label:e,problem:t,sub:a,points:r})=>(0,s.jsxs)("div",{className:`rounded-2xl border p-6 card-hover ${!1===t?"border-white/20 shimmer-border":"border-white/10"}`,style:{background:!1===t?"rgba(255,255,255,0.03)":"var(--bg-subtle)"},children:[(0,s.jsx)("div",{className:`text-sm font-semibold mb-0.5 ${!1===t?"text-white":"text-white/80"}`,children:e}),(0,s.jsx)("div",{className:`text-sm font-mono mb-4 ${!1===t?"text-white/70":"text-white/50"}`,children:a}),(0,s.jsx)("ul",{className:"space-y-2",children:r.map(e=>(0,s.jsxs)("li",{className:"flex items-start gap-2 text-sm",children:[(0,s.jsx)("span",{className:`mt-1 shrink-0 text-sm ${!1===t?"text-white/70":"text-white/20"}`,children:!1===t?"✓":"✗"}),(0,s.jsx)("span",{className:!1===t?"text-white/75":"text-white/70",children:e})]},e))})]},e))})]})]}),(0,s.jsxs)("section",{className:"py-20 px-6 dot-grid fade-in-section",children:[(0,s.jsx)("div",{className:"max-w-5xl mx-auto mb-0",children:(0,s.jsx)("hr",{className:"gradient-divider"})}),(0,s.jsxs)("div",{className:"max-w-5xl mx-auto",children:[(0,s.jsxs)("div",{className:"text-center mb-12",children:[(0,s.jsx)("div",{className:"text-sm font-mono text-white/80 uppercase tracking-widest mb-3",children:"Who Is This For"}),(0,s.jsx)("h2",{className:"text-4xl font-bold mb-4 text-white",children:"Built for developers who move fast."})]}),(0,s.jsx)("div",{className:"grid sm:grid-cols-2 lg:grid-cols-4 gap-4 stagger-children",children:[{icon:"🧑‍💻",title:"Solo developers",body:"Get the leverage of a full engineering team on your personal projects. Ship faster without hiring."},{icon:"🏗️",title:"Monorepo teams",body:"Point the swarm at your large codebase. Agents explore only what they need · no context limits."},{icon:"🔐",title:"Security engineers",body:"Spin up a dedicated audit swarm to scan, analyse, and fix vulnerabilities across the entire codebase."},{icon:"⚙️",title:"Platform engineers",body:"Automate cross-cutting concerns · test coverage, observability, migrations · across all services."}].map(({icon:e,title:t,body:a})=>(0,s.jsxs)("div",{className:"rounded-2xl border border-white/10 p-6 card-hover",style:{background:"var(--bg-card)"},children:[(0,s.jsx)("div",{className:"text-2xl mb-3",children:e}),(0,s.jsx)("div",{className:"text-white font-semibold text-base mb-2",children:t}),(0,s.jsx)("div",{className:"text-white/80 text-lg leading-relaxed",children:a})]},t))})]})]}),(0,s.jsxs)("section",{className:"py-20 px-6 mesh-gradient fade-in-section",children:[(0,s.jsx)("div",{className:"max-w-5xl mx-auto mb-0",children:(0,s.jsx)("hr",{className:"gradient-divider"})}),(0,s.jsxs)("div",{className:"max-w-5xl mx-auto",children:[(0,s.jsxs)("div",{className:"text-center mb-12",children:[(0,s.jsx)("div",{className:"text-sm font-mono text-white/80 uppercase tracking-widest mb-3",children:"Differentiation"}),(0,s.jsx)("h2",{className:"text-4xl font-bold mb-4 text-white",children:"Not another AI coding assistant."}),(0,s.jsx)("p",{className:"text-white/85 text-lg max-w-lg mx-auto",children:"Agentnetes is not autocomplete. It is not a chatbot. It is a swarm that investigates, builds, tests, and delivers."})]}),(0,s.jsx)("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-4 stagger-children",children:[{n:"01",title:"Self-organizing teams",body:"The model invents the roles it needs. A provider task spawns a Scout, Engineer, Tester. A security audit spawns an entirely different team. Nothing is hardcoded."},{n:"02",title:"Real code execution",body:"Agents run real shell commands in real sandboxes. Tests actually execute. Build failures get fixed. This is not a simulation of engineering · it is engineering."},{n:"03",title:"Any model, same swarm",body:"Swap Gemini for Claude or GPT by changing one env var. The swarm architecture is model-agnostic. Route through Vercel AI Gateway or call Google directly."},{n:"04",title:"Two-tool MCP strategy",body:"Each agent has exactly two tools: search() and execute(). ~1,000 token footprint regardless of codebase size. No tool bloat, no context waste."},{n:"05",title:"Context stays external",body:"Files never enter the prompt. Agents write code to explore the codebase · grep, find, cat. Proven by the MIT CSAIL RLM paper to outperform context-stuffing 2×."},{n:"06",title:"Agents fix each other",body:"When the Tester finds a bug, it routes back to the Engineer automatically. The swarm has a built-in try → test → fix loop that runs until tests pass."}].map(({n:e,title:t,body:a})=>(0,s.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] p-6 hover:border-white/20 group card-hover",style:{background:"var(--bg-card)"},children:[(0,s.jsx)("div",{className:"text-sm font-mono mb-3 text-white/30",children:e}),(0,s.jsx)("div",{className:"text-white font-semibold text-base mb-2",children:t}),(0,s.jsx)("div",{className:"text-white/80 text-lg leading-relaxed",children:a})]},e))})]})]}),(0,s.jsxs)("section",{className:"py-24 px-6 relative overflow-hidden ambient-orb orb-purple fade-in-section",children:[(0,s.jsx)("div",{className:"max-w-5xl mx-auto mb-0",children:(0,s.jsx)("hr",{className:"gradient-divider"})}),(0,s.jsxs)("div",{className:"max-w-5xl mx-auto",children:[(0,s.jsxs)("div",{className:"text-center mb-12",children:[(0,s.jsx)("div",{className:"text-sm font-mono text-white/80 uppercase tracking-widest mb-3",children:"Architecture"}),(0,s.jsx)("h2",{className:"text-4xl font-bold mb-4 text-white",children:"One goal. A recursive agent swarm."}),(0,s.jsx)("p",{className:"text-white/90 text-lg max-w-xl mx-auto leading-relaxed",children:"The root agent decomposes your goal, invents the right team of specialists, and orchestrates them across isolated sandboxes. Roles are fully emergent. Nothing is hardcoded."})]}),(0,s.jsxs)("div",{className:"grid lg:grid-cols-2 gap-8 items-start",children:[(0,s.jsx)(D,{}),(0,s.jsx)("div",{className:"space-y-3",children:[{icon:(0,s.jsx)(u,{size:14}),title:"Emergent team formation",body:(0,s.jsxs)(s.Fragment,{children:["The root agent reads the codebase, understands the task, and invents the right specialist roles. A provider task gets a ",(0,s.jsx)("span",{className:"text-violet-400 font-mono",children:"Scout"}),", ",(0,s.jsx)("span",{className:"text-violet-400 font-mono",children:"Engineer"}),", ",(0,s.jsx)("span",{className:"text-violet-400 font-mono",children:"Tester"}),", and ",(0,s.jsx)("span",{className:"text-violet-400 font-mono",children:"Packager"}),". A security audit gets an entirely different team."]})},{icon:(0,s.jsx)(b.Box,{size:14}),title:"Isolated Firecracker sandboxes",body:(0,s.jsxs)(s.Fragment,{children:["Each agent runs in its own ",(0,s.jsx)("span",{className:"text-emerald-400 font-mono",children:"Vercel Sandbox"})," (Firecracker microVM). Pre-warmed from a repo snapshot for near-instant startup. Agents cannot interfere with each other."]})},{icon:(0,s.jsx)(w.Code2,{size:14}),title:"Context externalized, not stuffed",body:(0,s.jsxs)(s.Fragment,{children:["Agents do not receive hundreds of files in their prompts. They write code to explore context: ",(0,s.jsx)("span",{className:"text-emerald-400 font-mono",children:"grep"}),", ",(0,s.jsx)("span",{className:"text-emerald-400 font-mono",children:"find"}),", ",(0,s.jsx)("span",{className:"text-emerald-400 font-mono",children:"cat"}),". This is the ",(0,s.jsx)("span",{className:"text-blue-400 font-mono",children:"RLM Pattern"})," from MIT CSAIL, proven 2x more effective."]})},{icon:(0,s.jsx)(f,{size:14}),title:"Agents collaborate at runtime",body:(0,s.jsxs)(s.Fragment,{children:["When the ",(0,s.jsx)("span",{className:"text-violet-400 font-mono",children:"Test Engineer"})," finds a type error, that finding routes back to the ",(0,s.jsx)("span",{className:"text-violet-400 font-mono",children:"Provider Engineer"})," automatically. The ",(0,s.jsx)("span",{className:"text-orange-400 font-mono",children:"vRLM"})," runtime handles inter-agent communication."]})}].map(e=>(0,s.jsxs)("div",{className:"flex gap-3 p-4 rounded-xl border border-white/[0.07] hover:border-white/15 card-hover",style:{background:"var(--bg-card)"},children:[(0,s.jsx)("div",{className:"text-white/80 mt-0.5 shrink-0",children:e.icon}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-white text-base font-semibold mb-1",children:e.title}),(0,s.jsx)("div",{className:"text-white/85 text-lg leading-relaxed",children:e.body})]})]},e.title))})]})]})]}),(0,s.jsx)("section",{className:"py-24 px-6 relative noise-overlay fade-in-section",style:{background:"var(--bg-base)"},children:(0,s.jsxs)("div",{className:"max-w-4xl mx-auto relative z-10",children:[(0,s.jsxs)("div",{className:"text-center mb-10",children:[(0,s.jsx)("div",{className:"text-sm font-mono text-white/80 uppercase tracking-widest mb-3",children:"Live Preview"}),(0,s.jsx)("h2",{className:"text-4xl font-bold mb-3 text-white",children:"Watch the swarm execute"}),(0,s.jsx)("p",{className:"text-white/90 text-lg max-w-md mx-auto",children:"Real output from a simulated run. The actual runtime produces identical event streams."})]}),(0,s.jsx)(C,{}),(0,s.jsx)("div",{className:"flex flex-wrap justify-center gap-5 mt-6",children:[{dot:"bg-yellow-400",label:"Root orchestrator"},{dot:"bg-violet-400",label:"Shell execution"},{dot:"bg-purple-300",label:"Worker agent"},{dot:"bg-orange-400",label:"Inter-agent collaboration"},{dot:"bg-emerald-400",label:"Completion"}].map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${e.dot}`}),(0,s.jsx)("span",{className:"text-sm text-white/80 font-mono",children:e.label})]},e.label))})]})}),(0,s.jsxs)("section",{className:"py-24 px-6 dot-grid fade-in-section",children:[(0,s.jsx)("div",{className:"max-w-6xl mx-auto mb-0",children:(0,s.jsx)("hr",{className:"gradient-divider"})}),(0,s.jsxs)("div",{className:"max-w-6xl mx-auto",children:[(0,s.jsxs)("div",{className:"text-center mb-14",children:[(0,s.jsx)("div",{className:"text-sm font-mono text-white/80 uppercase tracking-widest mb-3",children:"Research Foundations"}),(0,s.jsx)("h2",{className:"text-4xl font-bold mb-4 text-white",children:"Five ideas. One system."}),(0,s.jsx)("p",{className:"text-white/90 text-lg max-w-lg mx-auto",children:"Agentnetes combines five research-backed patterns that individually improve agent performance and together create something qualitatively different."})]}),(0,s.jsxs)("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-4 stagger-children",children:[(0,s.jsx)(W,{badge:"MIT CSAIL",badgeColor:"border-blue-500/40 text-blue-400",icon:(0,s.jsx)(x.Layers,{size:15}),title:"RLM Pattern: Context lives in sandboxes",description:"Recursive Language Model runtime. Instead of stuffing files into an agent's context window, context is externalized into a filesystem that agents explore programmatically.",detail:"Agents write small shell scripts to grep, find, and read exactly what they need. This keeps token footprints tiny regardless of codebase size and has been shown to outperform naive context-stuffing by 2x on software engineering benchmarks.",code:"agent.execute('grep -r LanguageModelV1 packages/ -l')",cite:"Based on: RLM paper, MIT CSAIL -- externalized context via code execution"}),(0,s.jsx)(W,{badge:"Karpathy",badgeColor:"border-purple-500/40 text-purple-400",icon:(0,s.jsx)(f,{size:15}),title:"AutoResearch Loop: Try, measure, keep",description:"Agents do not write code and hope for the best. They write code, run tests, measure the result, and either keep the change or discard it and try again.",detail:"The Test Engineer runs vitest after every change. Type errors trigger re-implementation. Test failures trigger targeted patches. The loop runs until everything passes or the agent escalates to root.",code:"run tests -> check failures -> patch -> repeat",cite:"Based on: AutoResearch pattern -- Andrej Karpathy"}),(0,s.jsx)(W,{badge:"MCP v2",badgeColor:"border-emerald-500/40 text-emerald-400",icon:(0,s.jsx)(h.Terminal,{size:15}),title:"Two-Tool MCP: search() and execute()",description:"Each agent has exactly two tools exposed via MCP: search() for finding things in the codebase, and execute() for running shell commands in its sandbox.",detail:"This keeps the agent's tool surface to roughly 1,000 tokens regardless of task complexity. The agent writes arbitrary code against these two primitives. No tool proliferation. Just two powerful primitives that compose into anything.",code:"tools: [search(), execute()] // ~1000 token footprint",cite:"MCP protocol -- two-tool minimal surface strategy"}),(0,s.jsx)(W,{badge:"A2A Protocol",badgeColor:"border-orange-500/40 text-orange-400",icon:(0,s.jsx)(c,{size:15}),title:"A2A-Ready: Every agent is a publishable service",description:"Every agent Agentnetes spawns generates a standard A2A Agent Card describing its capabilities, skills, and endpoints.",detail:"Today these cards are internal. Tomorrow any specialist agent can be published as an independent, discoverable service. A Provider Engineer becomes a reusable service any other system can call.",code:"GET /agents/provider-engineer/.well-known/agent.json",cite:"A2A Protocol v1.0 -- Google Agent-to-Agent standard"}),(0,s.jsx)(W,{badge:"Kubernetes-inspired",badgeColor:"border-cyan-500/40 text-cyan-400",icon:(0,s.jsx)(u,{size:15}),title:"Load Balancing: Work distributed across the swarm",description:"All specialist agents run concurrently via Promise.allSettled. Work is load-balanced across the agent pool automatically. One agent failing never blocks the others.",detail:"maxWorkers caps concurrency like Kubernetes resource limits on a node. Promise.allSettled provides fault-tolerant dispatch: a failing Engineer never kills the Scout or Tester. The swarm delivers what it can regardless of individual failures.",code:"Promise.allSettled(workers.map(task => runWorker(task)))",cite:"Kubernetes-inspired: parallel execution + fault-tolerant dispatch"})]})]})]}),(0,s.jsx)("section",{className:"py-24 px-6 mesh-gradient fade-in-section",style:{background:"var(--bg-base)"},children:(0,s.jsxs)("div",{className:"max-w-5xl mx-auto",children:[(0,s.jsxs)("div",{className:"text-center mb-14",children:[(0,s.jsx)("div",{className:"text-sm font-mono text-white/80 uppercase tracking-widest mb-3",children:"Stack"}),(0,s.jsx)("h2",{className:"text-4xl font-bold mb-4 text-white",children:"Built on the bleeding edge"}),(0,s.jsx)("p",{className:"text-white/90 text-lg max-w-lg mx-auto",children:"Every layer is the latest available. No legacy versions. No compatibility shims."})]}),(0,s.jsx)("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-4 mb-8 stagger-children",children:[{label:"AI Runtime",items:[{name:"ai (Vercel AI SDK)",version:"v7.0.0-beta.33",highlight:!0},{name:"ToolLoopAgent",version:"beta agent primitive",highlight:!0},{name:"@ai-sdk/google",version:"v3.0.52",highlight:!1}],note:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-pink-400",children:"ToolLoopAgent"})," is the core primitive in AI SDK v7 beta. Each worker runs two MCP tools: ",(0,s.jsx)("span",{className:"text-emerald-400",children:"search()"})," and ",(0,s.jsx)("span",{className:"text-emerald-400",children:"execute()"}),"."]})},{label:"Sandbox",items:[{name:"Docker",version:"node:20-alpine · local default",highlight:!0},{name:"@vercel/sandbox",version:"Firecracker microVMs",highlight:!1},{name:"Local shell",version:"no-install fallback",highlight:!1}],note:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-emerald-400",children:"Docker"})," is the default sandbox for local runs. ",(0,s.jsx)("span",{className:"text-orange-400",children:"Vercel Firecracker"})," available for cloud self-hosting."]})},{label:"Models",items:[{name:"Gemini 3.1 Pro",version:"planner · latest",highlight:!0},{name:"Gemini 2.5 Flash",version:"planner + worker · default",highlight:!0},{name:"Gemini 3.1 Flash-Lite",version:"worker · fastest",highlight:!1}],note:(0,s.jsxs)(s.Fragment,{children:["Full ",(0,s.jsx)("span",{className:"text-blue-400",children:"Gemini 2.0 · 2.5 · 3.x"})," lineup supported. Separate ",(0,s.jsx)("span",{className:"text-violet-400",children:"planner"})," and ",(0,s.jsx)("span",{className:"text-violet-400",children:"worker"})," models configurable in the UI."]})}].map(e=>(0,s.jsxs)("div",{className:"rounded-2xl border border-white/10 p-5 glass-card card-hover",children:[(0,s.jsx)("div",{className:"text-sm font-mono text-white/65 uppercase tracking-wider mb-4",children:e.label}),(0,s.jsx)("div",{className:"space-y-2",children:e.items.map(e=>(0,s.jsx)(O,{...e},e.name))}),(0,s.jsx)("div",{className:"text-sm text-white/80 font-mono mt-4 leading-relaxed",children:e.note})]},e.label))}),(0,s.jsxs)("div",{className:"rounded-2xl border border-white/10 overflow-hidden",style:{background:"var(--bg-panel)"},children:[(0,s.jsx)("div",{className:"flex items-center gap-2 px-4 py-3 border-b border-white/[0.06] bg-white/[0.02]",children:(0,s.jsx)("span",{className:"text-sm font-mono text-white/65",children:"lib/vrlm/runtime.ts"})}),(0,s.jsxs)("div",{className:"p-5 font-mono text-sm leading-7 overflow-x-auto",children:[(0,s.jsx)("div",{children:(0,s.jsx)("span",{className:"text-white/65",children:"// Each worker: two tools, one sandbox, emergent role"})}),(0,s.jsxs)("div",{className:"mt-1.5",children:[(0,s.jsx)("span",{className:"text-violet-400",children:"const"}),(0,s.jsx)("span",{className:"text-white",children:" agent "}),(0,s.jsx)("span",{className:"text-white/75",children:"="}),(0,s.jsx)("span",{className:"text-white",children:" new "}),(0,s.jsx)("span",{className:"text-pink-400",children:"ToolLoopAgent"}),(0,s.jsx)("span",{className:"text-white",children:"({"})]}),(0,s.jsxs)("div",{className:"pl-6",children:[(0,s.jsx)("span",{className:"text-white/70",children:"model: "}),(0,s.jsx)("span",{className:"text-orange-400",children:"google"}),(0,s.jsx)("span",{className:"text-white",children:"('gemini-2.5-flash'),"})]}),(0,s.jsxs)("div",{className:"pl-6",children:[(0,s.jsx)("span",{className:"text-white/70",children:"tools: "}),(0,s.jsx)("span",{className:"text-white",children:"{ "}),(0,s.jsx)("span",{className:"text-emerald-400",children:"search"}),(0,s.jsx)("span",{className:"text-white",children:", "}),(0,s.jsx)("span",{className:"text-emerald-400",children:"execute"}),(0,s.jsxs)("span",{className:"text-white",children:[" ","}",","]})]}),(0,s.jsxs)("div",{className:"pl-6",children:[(0,s.jsx)("span",{className:"text-white/70",children:"stopWhen: "}),(0,s.jsx)("span",{className:"text-orange-400",children:"stepCountIs"}),(0,s.jsx)("span",{className:"text-white",children:"(40),"})]}),(0,s.jsxs)("div",{className:"pl-6",children:[(0,s.jsx)("span",{className:"text-white/70",children:"instructions: "}),(0,s.jsx)("span",{className:"text-white",children:"buildWorkerPrompt(task),"})]}),(0,s.jsx)("div",{children:(0,s.jsx)("span",{className:"text-white",children:"});"})}),(0,s.jsx)("div",{className:"mt-2",children:(0,s.jsx)("span",{className:"text-white/65",children:"// Drive the tool loop; events stream to the UI via SSE"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-violet-400",children:"for await "}),(0,s.jsx)("span",{className:"text-white",children:"("}),(0,s.jsx)("span",{className:"text-violet-400",children:"const "}),(0,s.jsx)("span",{className:"text-white",children:"_ "}),(0,s.jsx)("span",{className:"text-violet-400",children:"of "}),(0,s.jsx)("span",{className:"text-white",children:"result."}),(0,s.jsx)("span",{className:"text-pink-400",children:"fullStream"}),(0,s.jsxs)("span",{className:"text-white",children:[") ","{ ... }"]})]})]})]})]})}),(0,s.jsx)("section",{className:"py-24 px-6 border-t border-white/[0.05] fade-in-section",children:(0,s.jsxs)("div",{className:"max-w-4xl mx-auto",children:[(0,s.jsxs)("div",{className:"text-center mb-14",children:[(0,s.jsx)("div",{className:"text-sm font-mono text-white/80 uppercase tracking-widest mb-3",children:"Workflow"}),(0,s.jsx)("h2",{className:"text-4xl font-bold mb-4 text-white",children:"One sentence. Dynamic team. Real results."}),(0,s.jsx)("p",{className:"text-white/90 text-lg max-w-md mx-auto",children:"From goal to dynamic team formation to delivered artifacts in isolated sandboxes."})]}),(0,s.jsxs)("div",{className:"grid sm:grid-cols-2 gap-7 stagger-children",children:[(0,s.jsx)(V,{n:"01",accent:"border-white/15 text-white/50",title:"You give a goal",body:"Type what you want built. Not instructions on how. Just what. Agentnetes figures out the rest. The goal can reference a GitHub repo or an uploaded codebase."}),(0,s.jsx)(V,{n:"02",accent:"border-white/15 text-white/50",title:"Root agent explores",body:"The Tech Lead spawns a Firecracker sandbox pre-warmed with the target repo. It uses grep, find, and cat to map the architecture. Context lives in the filesystem, not the prompt."}),(0,s.jsx)(V,{n:"03",accent:"border-white/15 text-white/50",title:"Team self-assembles",body:"Based on what it finds, the root agent invents the team. Roles, goals, and dependencies are all emergent. A provider task gets different specialists than a security audit."}),(0,s.jsx)(V,{n:"04",accent:"border-white/15 text-white/50",title:"Agents work in parallel",body:"Each specialist runs concurrently in its own Firecracker microVM. They explore, write code, run tests, and fix failures. No sequential bottlenecks."}),(0,s.jsx)(V,{n:"05",accent:"border-white/15 text-white/50",title:"Agents collaborate",body:"Test failures and findings route back to the right specialist automatically. The vRLM runtime handles inter-agent communication. No human needed to relay."}),(0,s.jsx)(V,{n:"06",accent:"border-white/15 text-white/50",title:"Synthesis and delivery",body:"The root agent collects all artifacts, verifies completeness, and streams a structured summary to the UI with every generated file. Each agent publishes an A2A card."})]})]})}),(0,s.jsx)("section",{className:"py-24 px-6 border-t border-white/[0.05] relative overflow-hidden ambient-orb orb-pink fade-in-section",style:{background:"var(--bg-base)"},children:(0,s.jsxs)("div",{className:"max-w-4xl mx-auto relative z-10",children:[(0,s.jsxs)("div",{className:"text-center mb-14",children:[(0,s.jsx)("div",{className:"text-sm font-mono text-white/80 uppercase tracking-widest mb-3",children:"Runtime"}),(0,s.jsx)("h2",{className:"text-4xl font-bold mb-4 text-white",children:"vRLM: The Orchestration Runtime"}),(0,s.jsxs)("p",{className:"text-white/85 text-lg max-w-xl mx-auto",children:["Virtual Recursive Language Model Runtime. The engine between your goal and the agents. Inspired by the ",(0,s.jsx)("a",{href:"https://arxiv.org/abs/2512.24601",target:"_blank",rel:"noreferrer",className:"text-white/80 underline underline-offset-2 hover:text-white transition-colors",children:"RLM pattern from MIT CSAIL"}),"."]})]}),(0,s.jsx)("div",{className:"grid md:grid-cols-3 gap-4 mb-10",children:[{n:"01",phase:"Plan",color:"border-white/10 bg-white/[0.02]",badge:"text-white/80",body:"Root agent explores the repo with grep and find, then calls the Gemini planner to invent a specialist team. Roles are fully emergent. Nothing is hardcoded."},{n:"02",phase:"Execute",color:"border-white/10 bg-white/[0.02]",badge:"text-white/80",body:"Workers run in parallel. Each gets an isolated Docker container with the repo pre-cloned, and two tools: search() to grep the codebase and execute() to run any shell command."},{n:"03",phase:"Synthesize",color:"border-white/10 bg-white/[0.02]",badge:"text-white/80",body:"When all workers complete, the root agent reads their findings and artifacts, then produces a structured summary. Every generated file is collected and streamed to the UI."}].map(e=>(0,s.jsxs)("div",{className:`rounded-2xl border p-5 ${e.color} card-hover`,children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,s.jsx)("span",{className:"text-sm font-mono text-white/25",children:e.n}),(0,s.jsx)("span",{className:`text-sm font-bold ${e.badge}`,children:e.phase})]}),(0,s.jsx)("p",{className:"text-white/80 text-lg leading-relaxed",children:e.body})]},e.n))}),(0,s.jsxs)("div",{className:"grid md:grid-cols-2 gap-5 items-start",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm font-mono text-violet-400/50 uppercase tracking-widest mb-3",children:"Event Stream · SSE"}),(0,s.jsx)("p",{className:"text-white/80 text-lg leading-relaxed mb-4",children:"Every phase emits typed events over Server-Sent Events. The UI subscribes and renders agent activity in real time with no polling."}),(0,s.jsx)("div",{className:"space-y-1.5",children:[{type:"task-created",desc:"new agent spawned",color:"text-white/60"},{type:"task-updated",desc:"status or progress change",color:"text-white/40"},{type:"task-completed",desc:"agent finished with artifacts",color:"text-white/60"},{type:"task-failed",desc:"agent error",color:"text-white/40"},{type:"finding",desc:"agent discovered something",color:"text-white/60"},{type:"terminal",desc:"shell command + output",color:"text-white/60"},{type:"artifact",desc:"file produced by an agent",color:"text-white/50"},{type:"collaboration",desc:"inter-agent finding shared",color:"text-white/60"},{type:"synthesis",desc:"root agent final summary",color:"text-white/60"},{type:"done",desc:"run complete",color:"text-white/40"},{type:"error",desc:"runtime error",color:"text-white/40"}].map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-3 font-mono text-sm",children:[(0,s.jsx)("span",{className:`w-32 shrink-0 ${e.color}`,children:e.type}),(0,s.jsx)("span",{className:"text-white/30",children:e.desc})]},e.type))})]}),(0,s.jsxs)("div",{className:"rounded-2xl border border-white/10 overflow-hidden",style:{background:"var(--bg-panel)"},children:[(0,s.jsx)("div",{className:"px-4 py-2.5 border-b border-white/[0.06] text-sm font-mono text-white/35",children:"lib/vrlm/types.ts"}),(0,s.jsxs)("div",{className:"p-4 font-mono text-sm leading-6 space-y-0.5 overflow-x-auto",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-violet-400",children:"interface "}),(0,s.jsxs)("span",{className:"text-white",children:["VrlmConfig ","{"]})]}),(0,s.jsxs)("div",{className:"pl-4",children:[(0,s.jsx)("span",{className:"text-white/50",children:"maxWorkers: "}),(0,s.jsx)("span",{className:"text-blue-400",children:"number"}),(0,s.jsx)("span",{className:"text-white/30",children:"; // default 6"})]}),(0,s.jsxs)("div",{className:"pl-4",children:[(0,s.jsx)("span",{className:"text-white/50",children:"maxStepsPerAgent: "}),(0,s.jsx)("span",{className:"text-blue-400",children:"number"}),(0,s.jsx)("span",{className:"text-white/30",children:"; // default 20"})]}),(0,s.jsxs)("div",{className:"pl-4",children:[(0,s.jsx)("span",{className:"text-white/50",children:"plannerModel: "}),(0,s.jsx)("span",{className:"text-blue-400",children:"string"}),(0,s.jsx)("span",{className:"text-white/30",children:"; // orchestrator"})]}),(0,s.jsxs)("div",{className:"pl-4",children:[(0,s.jsx)("span",{className:"text-white/50",children:"workerModel: "}),(0,s.jsx)("span",{className:"text-blue-400",children:"string"}),(0,s.jsx)("span",{className:"text-white/30",children:"; // specialists"})]}),(0,s.jsxs)("div",{className:"pl-4",children:[(0,s.jsx)("span",{className:"text-white/50",children:"repoUrl: "}),(0,s.jsx)("span",{className:"text-blue-400",children:"string"}),(0,s.jsx)("span",{className:"text-white/30",children:"; // cloned per agent"})]}),(0,s.jsxs)("div",{className:"pl-4",children:[(0,s.jsx)("span",{className:"text-white/50",children:"sandboxProvider: "}),(0,s.jsx)("span",{className:"text-emerald-400",children:"'docker' | 'vercel' | 'e2b' | 'daytona' | 'local'"}),(0,s.jsx)("span",{className:"text-white/30",children:";"})]}),(0,s.jsxs)("div",{className:"pl-4",children:[(0,s.jsx)("span",{className:"text-white/50",children:"googleApiKey?: "}),(0,s.jsx)("span",{className:"text-blue-400",children:"string"}),(0,s.jsx)("span",{className:"text-white/30",children:"; // UI override"})]}),(0,s.jsx)("div",{children:(0,s.jsx)("span",{className:"text-white",children:"}"})})]})]})]})]})}),(0,s.jsx)("section",{className:"py-24 px-6 border-t border-white/[0.05] fade-in-section",children:(0,s.jsxs)("div",{className:"max-w-4xl mx-auto",children:[(0,s.jsxs)("div",{className:"text-center mb-14",children:[(0,s.jsx)("div",{className:"text-sm font-mono text-white/80 uppercase tracking-widest mb-3",children:"Get Started"}),(0,s.jsx)("h2",{className:"text-4xl font-bold mb-4 text-white",children:"Three ways to run"}),(0,s.jsx)("p",{className:"text-white/90 text-lg max-w-md mx-auto",children:"From instant browser demo to full local execution with Docker sandboxes"})]}),(0,s.jsxs)("div",{className:"grid md:grid-cols-3 gap-5",children:[(0,s.jsxs)("div",{className:"rounded-2xl border border-white/10 p-6 card-hover",style:{background:"var(--bg-card)"},children:[(0,s.jsx)("div",{className:"flex items-center gap-2 mb-4",children:(0,s.jsx)("span",{className:"text-sm font-mono px-2 py-0.5 rounded-full border border-white/15 text-white/60",children:"no setup"})}),(0,s.jsx)("div",{className:"text-xl font-semibold text-white mb-2",children:"Simulation"}),(0,s.jsx)("p",{className:"text-white/80 text-lg leading-relaxed mb-5",children:"Watch the full agent lifecycle in your browser. No API key, no Docker, no install. Pre-scripted scenarios replay real event sequences."}),(0,s.jsxs)("div",{className:"rounded-xl border border-white/[0.06] px-3 py-2 font-mono text-sm mb-5 overflow-x-auto",style:{background:"var(--bg-panel)"},children:[(0,s.jsx)("span",{className:"text-white/80",children:"Open "}),(0,s.jsx)("span",{className:"text-violet-400",children:"/demo"}),(0,s.jsx)("span",{className:"text-white/80",children:" → toggle "}),(0,s.jsx)("span",{className:"text-emerald-400",children:"Simulation"}),(0,s.jsx)("span",{className:"text-white/80",children:" → watch"})]}),(0,s.jsxs)(a.default,{href:"/demo",className:"flex items-center gap-1.5 text-sm font-semibold px-4 py-2 rounded-lg transition-all hover:opacity-90 w-full justify-center bg-white text-black",children:["Try Demo ",(0,s.jsx)(i.ArrowRight,{size:12})]})]}),(0,s.jsxs)("div",{className:"rounded-2xl border border-white/20 p-6 relative card-hover shimmer-border",style:{background:"var(--bg-card)"},children:[(0,s.jsx)("div",{className:"flex items-center gap-2 mb-4",children:(0,s.jsx)("span",{className:"text-sm font-mono px-2 py-0.5 rounded-full border border-white/20 text-white/70",children:"recommended"})}),(0,s.jsx)("div",{className:"text-xl font-semibold text-white mb-2",children:"Self-host · Local"}),(0,s.jsxs)("p",{className:"text-white/80 text-lg leading-relaxed mb-5",children:["Clone the repo and run locally. Both simulation and real agent execution available. Configure your Google API key and target repo directly in the UI. No ",(0,s.jsx)("code",{className:"text-white/50 text-sm",children:".env"})," file needed."]}),(0,s.jsxs)("div",{className:"rounded-xl border border-white/[0.06] px-3 py-2 font-mono text-sm mb-5 space-y-1 overflow-x-auto",style:{background:"var(--bg-panel)"},children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-white/40",children:"$ "}),(0,s.jsx)("span",{className:"text-emerald-400",children:"git clone"}),(0,s.jsx)("span",{className:"text-white/80",children:" · "}),(0,s.jsx)("span",{className:"text-emerald-400",children:"npm install"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-white/40",children:"$ "}),(0,s.jsx)("span",{className:"text-emerald-400",children:"docker pull"}),(0,s.jsx)("span",{className:"text-white/80",children:" node:20-alpine"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-white/40",children:"$ "}),(0,s.jsx)("span",{className:"text-emerald-400",children:"npm run dev"}),(0,s.jsx)("span",{className:"text-white/80",children:" → open "}),(0,s.jsx)("span",{className:"text-violet-400",children:"/demo"})]})]}),(0,s.jsxs)(a.default,{href:"/docs",className:"flex items-center gap-1.5 text-sm font-semibold px-4 py-2 rounded-lg border border-white/15 text-white/65 hover:border-white/30 hover:text-white transition-all w-full justify-center",children:["Read the docs ",(0,s.jsx)(g.ChevronRight,{size:12})]})]}),(0,s.jsxs)("div",{className:"rounded-2xl border border-white/10 p-6 card-hover",style:{background:"var(--bg-card)"},children:[(0,s.jsx)("div",{className:"flex items-center gap-2 mb-4",children:(0,s.jsx)("span",{className:"text-sm font-mono px-2 py-0.5 rounded-full border border-white/15 text-white/60",children:"CLI"})}),(0,s.jsx)("div",{className:"text-xl font-semibold text-white mb-2",children:"CLI · Any Repo"}),(0,s.jsx)("p",{className:"text-white/80 text-lg leading-relaxed mb-5",children:"Install the npm package globally and run against any local git repo. Requires Docker running locally and a Google API key."}),(0,s.jsxs)("div",{className:"rounded-xl border border-white/[0.06] px-3 py-2 font-mono text-sm mb-5 space-y-1 overflow-x-auto",style:{background:"var(--bg-panel)"},children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-white/40",children:"$ "}),(0,s.jsx)("span",{className:"text-emerald-400",children:"npm install"}),(0,s.jsx)("span",{className:"text-white/80",children:" -g agentnetes"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-white/40",children:"$ "}),(0,s.jsx)("span",{className:"text-emerald-400",children:"export"}),(0,s.jsx)("span",{className:"text-white/80",children:" GOOGLE_API_KEY="}),(0,s.jsx)("span",{className:"text-violet-400",children:"..."})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-white/40",children:"$ "}),(0,s.jsx)("span",{className:"text-emerald-400",children:"agentnetes"}),(0,s.jsx)("span",{className:"text-white/80",children:" run "}),(0,s.jsx)("span",{className:"text-violet-400",children:'"your goal"'})]})]}),(0,s.jsxs)("a",{href:"https://www.npmjs.com/package/agentnetes",target:"_blank",rel:"noreferrer",className:"flex items-center gap-1.5 text-sm font-semibold px-4 py-2 rounded-lg border border-white/10 text-white/55 hover:border-white/20 hover:text-white/75 transition-all w-full justify-center",children:["npm package ",(0,s.jsx)(m.ExternalLink,{size:11})]})]})]})]})}),(0,s.jsx)("section",{className:"py-24 px-6 border-t border-white/[0.05] dot-grid fade-in-section",style:{background:"var(--bg-base)"},children:(0,s.jsx)("div",{className:"max-w-4xl mx-auto",children:(0,s.jsxs)("div",{className:"grid lg:grid-cols-2 gap-12 items-center",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm font-mono text-white/80 uppercase tracking-widest mb-3",children:"Models"}),(0,s.jsx)("h2",{className:"text-4xl font-bold mb-4 text-white",children:"Any model. Same swarm."}),(0,s.jsx)("p",{className:"text-white/85 text-lg leading-relaxed mb-6",children:"Bring your own Google API key and swap models from the UI. No config file needed. Separate planner and worker models let you balance quality vs cost."}),(0,s.jsx)("div",{className:"space-y-3",children:[{label:"Gemini 3.x, 2.5, 2.0 all supported",done:!0},{label:"Separate planner and worker models",done:!0},{label:"BYOK: paste API key directly in the UI",done:!0},{label:"Claude / GPT-4o support",done:!1}].map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-2.5",children:[e.done?(0,s.jsx)(p,{size:14,className:"text-white/60 shrink-0"}):(0,s.jsx)("div",{className:"w-3.5 h-3.5 rounded-full border border-white/20 shrink-0"}),(0,s.jsx)("span",{className:`text-base ${e.done?"text-white/80":"text-white/65"}`,children:e.label}),!e.done&&(0,s.jsx)("span",{className:"text-sm font-mono text-white/50 border border-white/20 rounded px-1",children:"soon"})]},e.label))})]}),(0,s.jsxs)("div",{className:"space-y-3",children:[[{label:"Gemini 3.1 Pro",role:"Planner · latest",color:"border-white/15 bg-white/[0.03]",badge:"new"},{label:"Gemini 2.5 Flash",role:"Planner + Worker · default",color:"border-white/15 bg-white/[0.03]",badge:"recommended"},{label:"Gemini 3.1 Flash-Lite",role:"Worker · fastest",color:"border-white/10 bg-white/[0.02]",badge:"fast"},{label:"Gemini 2.0 Flash",role:"Worker · budget",color:"border-white/10 bg-white/[0.02]",badge:""}].map(e=>(0,s.jsxs)("div",{className:`flex items-center gap-3 border rounded-xl px-4 py-3 ${e.color}`,children:[(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("div",{className:"text-white text-base font-medium",children:e.label}),(0,s.jsx)("div",{className:"text-white/80 text-sm font-mono mt-0.5",children:e.role})]}),e.badge&&(0,s.jsx)("span",{className:"text-sm font-mono text-white/65 border border-white/10 rounded px-1.5 py-0.5",children:e.badge})]},e.label)),(0,s.jsxs)("div",{className:"rounded-xl border border-white/10 px-4 py-3 font-mono text-sm overflow-x-auto",style:{background:"var(--bg-panel)"},children:[(0,s.jsxs)("span",{className:"text-white/65",children:["createGoogleGenerativeAI","({"]}),(0,s.jsx)("br",{}),(0,s.jsxs)("span",{className:"text-white/65",children:[" ","apiKey: "]}),(0,s.jsx)("span",{className:"text-violet-400",children:"process.env.GOOGLE_API_KEY"}),(0,s.jsx)("br",{}),(0,s.jsxs)("span",{className:"text-white/65",children:["}",");"]})]})]})]})})}),(0,s.jsx)("section",{className:"py-24 px-6 border-t border-white/[0.05] relative overflow-hidden ambient-orb orb-pink fade-in-section",children:(0,s.jsx)("div",{className:"max-w-2xl mx-auto relative z-10",children:(0,s.jsxs)("div",{className:"rounded-2xl border border-white/10 p-12 text-center relative overflow-hidden noise-overlay",style:{background:"var(--bg-card)"},children:[(0,s.jsx)("div",{className:"flex justify-center mb-5 relative z-10",children:(0,s.jsx)(r.default,{src:`${_}/favicon.png`,alt:"Agentnetes",width:48,height:48,className:"rounded-xl"})}),(0,s.jsx)("div",{className:"text-sm font-mono text-white/80 uppercase tracking-widest mb-4 relative z-10",children:"Try it now"}),(0,s.jsx)("h2",{className:"text-3xl font-bold mb-3 gradient-text relative z-10",children:"See the swarm execute"}),(0,s.jsx)("p",{className:"text-white/90 text-base mb-8 max-w-sm mx-auto leading-relaxed relative z-10",children:"Give it a goal. Watch specialist agents spawn, explore, implement, test, and deliver inside isolated sandboxes. Under 90 seconds."}),(0,s.jsxs)("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-3 relative z-10",children:[(0,s.jsxs)(a.default,{href:"/demo",className:"flex items-center gap-2 font-semibold px-8 py-3 rounded-xl text-base transition-all hover:opacity-90 hover:scale-[1.02] bg-white text-black",children:["Try Demo ",(0,s.jsx)(i.ArrowRight,{size:14})]}),(0,s.jsx)(a.default,{href:"/docs",className:"flex items-center gap-2 border border-white/15 text-white/70 px-8 py-3 rounded-xl hover:border-white/30 hover:text-white transition-all text-base",children:"Read the docs"})]})]})})}),(0,s.jsx)("footer",{className:"border-t border-white/[0.05] py-10 px-6",children:(0,s.jsxs)("div",{className:"max-w-6xl mx-auto flex flex-col sm:flex-row items-center justify-between gap-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,s.jsx)(q,{size:30}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"font-bold text-base text-white",children:"Agentnetes"}),(0,s.jsx)("div",{className:"text-white/80 text-sm font-mono",children:"Zero to Agent London 2026"})]})]}),(0,s.jsx)("div",{className:"text-white/80 text-sm font-mono text-center",children:"Zero to Agent London · Google DeepMind x Vercel · 2026"}),(0,s.jsxs)("div",{className:"flex items-center gap-5",children:[(0,s.jsx)(a.default,{href:"/demo",className:"text-white/80 hover:text-white transition-colors text-sm",children:"Simulation"}),(0,s.jsxs)("a",{href:"https://cerebralvalley.ai/e/zero-to-agent-london",target:"_blank",rel:"noreferrer",className:"flex items-center gap-1 text-white/80 hover:text-white transition-colors text-sm",children:["Hackathon ",(0,s.jsx)(m.ExternalLink,{size:10})]}),(0,s.jsx)("a",{href:"https://github.com/Shashikant86/agentnetes",target:"_blank",rel:"noreferrer",className:"text-white/80 hover:text-white transition-colors",children:(0,s.jsx)(n.Github,{size:14})})]})]})})]})}],31713)}]);
@@ -0,0 +1,185 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,38999,e=>{"use strict";var t=e.i(47167),s=e.i(43476),a=e.i(71645),n=e.i(22016),r=e.i(57688),i=e.i(75254);let o=(0,i.default)("send",[["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"}]]),l=["Audit all dependencies for known CVEs and outdated versions","Add rate limiting middleware with configurable limits per route","Find all TODO and FIXME comments and summarise what needs to be done","Add input validation and sanitisation to every request handler"],d=["Add a new provider package with streaming and tool-use support","Find security vulnerabilities in the authentication flow","Refactor the router module to improve test coverage","Generate TypeScript types for all public API endpoints"];function c({content:e}){let t=e.split("\n");return(0,s.jsx)("div",{className:"prose text-base space-y-1.5",children:t.map((e,t)=>{if(e.startsWith("## "))return(0,s.jsx)("h2",{className:"text-lg font-semibold text-white mt-3 mb-1",children:e.slice(3)},t);if(e.startsWith("### "))return(0,s.jsx)("h3",{className:"text-base font-semibold text-white mt-2",children:e.slice(4)},t);if(e.startsWith("- ")){let a=e.slice(2).replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/`(.*?)`/g,"<code>$1</code>");return(0,s.jsx)("li",{className:"ml-4 text-white/80",dangerouslySetInnerHTML:{__html:a}},t)}if(e.startsWith("**Goal:**"))return(0,s.jsxs)("p",{className:"text-white/65",children:[(0,s.jsx)("strong",{className:"text-white",children:"Goal:"}),e.slice(9)]},t);if(""===e.trim())return(0,s.jsx)("div",{className:"h-1"},t);let a=e.replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/`(.*?)`/g,"<code>$1</code>");return(0,s.jsx)("p",{className:"text-white/80",dangerouslySetInnerHTML:{__html:a}},t)})})}function p({onSubmit:e,messages:n,isRunning:i,mode:m="real"}){let[x,h]=(0,a.useState)(""),u=(0,a.useRef)(null);return(0,a.useEffect)(()=>{u.current?.scrollIntoView({behavior:"smooth"})},[n]),(0,s.jsxs)("div",{className:"h-full flex flex-col",children:[(0,s.jsxs)("div",{className:"flex-1 overflow-y-auto p-4 space-y-4",children:[0===n.length&&(0,s.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-center px-4",children:[(0,s.jsx)(r.default,{src:`${t.default.env.NEXT_PUBLIC_BASE_PATH??""}/logo.png`,alt:"Agentnetes",width:72,height:72,className:"rounded-2xl mb-6 animate-float"}),(0,s.jsx)("h2",{className:"text-white text-2xl font-extrabold tracking-tight mb-2",children:"Agentnetes"}),(0,s.jsx)("p",{className:"text-white/70 text-base mb-1.5 max-w-md",children:"simulation"===m?"Watch the swarm in action · no setup needed.":"Self-organizing agents · real Docker sandboxes."}),(0,s.jsx)("p",{className:"text-white/40 text-sm mb-10 max-w-md",children:"simulation"===m?"Pre-scripted scenarios showing real event sequences.":"Agents clone your repo, run shell commands, and deliver results."}),(0,s.jsx)("div",{className:"space-y-2.5 w-full max-w-md",children:("simulation"===m?d:l).map((e,t)=>(0,s.jsx)("button",{onClick:()=>h(e),className:"w-full text-left text-sm text-white/60 border border-white/10 rounded-xl px-4 py-3 hover:border-white/20 hover:text-white/80 transition-all card-hover bg-white/[0.03]",children:e},t))})]}),n.map((e,t)=>(0,s.jsx)("div",{className:`flex ${"user"===e.role?"justify-end":"justify-start"}`,children:"user"===e.role?(0,s.jsx)("div",{className:"max-w-[80%] border border-white/15 rounded-2xl rounded-br-sm px-5 py-3 text-base",style:{background:"var(--bg-hover)"},children:e.content}):(0,s.jsx)("div",{className:"max-w-[90%] border border-white/[0.06] rounded-2xl rounded-bl-sm px-5 py-4",style:{background:"var(--bg-panel)"},children:(0,s.jsx)(c,{content:e.content})})},t)),i&&(0,s.jsx)("div",{className:"flex justify-start",children:(0,s.jsx)("div",{className:"border border-white/[0.06] rounded-2xl rounded-bl-sm px-5 py-4",style:{background:"var(--bg-panel)"},children:(0,s.jsxs)("div",{className:"flex items-center gap-2 text-white/55 text-sm font-mono",children:[(0,s.jsx)("span",{className:"w-2 h-2 bg-yellow-400 rounded-full animate-pulse"}),"Agents working..."]})})}),(0,s.jsx)("div",{ref:u})]}),(0,s.jsx)("div",{className:"p-4 border-t border-white/[0.07]",children:(0,s.jsxs)("form",{onSubmit:function(t){t.preventDefault(),x.trim()&&!i&&(e(x.trim()),h(""))},className:"flex gap-3",children:[(0,s.jsx)("input",{value:x,onChange:e=>h(e.target.value),disabled:i,placeholder:"simulation"===m?"Describe a task for the simulated swarm...":"Give the agents a goal for your repo...",className:"flex-1 bg-white/[0.04] border border-white/15 rounded-xl px-5 py-3 text-base text-white placeholder-white/30 outline-none focus:border-white/30 disabled:opacity-50 transition-colors"}),(0,s.jsx)("button",{type:"submit",disabled:!x.trim()||i,className:"bg-white text-black rounded-xl px-4 py-3 hover:bg-[#e0e0e0] disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:(0,s.jsx)(o,{size:18})})]})})]})}let m=(0,i.default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);var x=e.i(63059),h=e.i(68054);let u=(0,i.default)("file-code",[["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 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]]),g=(0,i.default)("share-2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]),f=(0,i.default)("hexagon",[["path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z",key:"yt0hxn"}]]);function b({status:e}){return(0,s.jsx)("span",{className:`inline-block w-2 h-2 rounded-full shrink-0 ${{pending:"bg-white/20",running:"bg-yellow-400 animate-pulse shadow-[0_0_6px_rgba(250,204,21,0.6)]",completed:"bg-green-400 shadow-[0_0_6px_rgba(74,222,128,0.5)]",failed:"bg-red-400"}[e]}`})}function k({artifact:e,onClick:t}){return(0,s.jsxs)("button",{onClick:t,className:"flex items-center gap-1.5 text-xs font-mono bg-[#0d1117] border border-[#30363d] text-[#7dd3fc] px-2.5 py-1.5 rounded-md hover:border-[#58a6ff] hover:bg-[#161b22] transition-colors",children:[(0,s.jsx)(u,{size:12}),e.filename.split("/").pop()]})}function v({artifact:e,onClose:t}){let a=e.content.split("\n");return(0,s.jsx)("div",{className:"fixed inset-0 bg-black/80 z-50 flex items-center justify-center p-6 backdrop-blur-sm",onClick:t,children:(0,s.jsxs)("div",{className:"w-full max-w-3xl max-h-[80vh] flex flex-col bg-[#0d1117] border border-[#30363d] rounded-xl overflow-hidden shadow-2xl",onClick:e=>e.stopPropagation(),children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[#21262d] shrink-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(u,{size:14,className:"text-[#7dd3fc]"}),(0,s.jsx)("span",{className:"text-sm font-mono text-[#e6edf3]",children:e.filename}),(0,s.jsx)("span",{className:"text-xs text-[#555] bg-[#161b22] border border-[#21262d] px-1.5 py-0.5 rounded",children:e.language})]}),(0,s.jsx)("button",{onClick:t,className:"text-[#555] hover:text-white text-lg leading-none",children:"×"})]}),(0,s.jsx)("div",{className:"overflow-auto flex-1 p-4",children:(0,s.jsx)("div",{className:"font-mono text-sm leading-5",children:a.map((e,t)=>(0,s.jsxs)("div",{className:"flex gap-4 hover:bg-[#161b22] px-2 rounded",children:[(0,s.jsx)("span",{className:"text-[#555] w-6 shrink-0 select-none text-right",children:t+1}),(0,s.jsx)("span",{className:"text-[#e6edf3] whitespace-pre",children:e})]},t))})})]})})}function w({task:e,onClose:t}){var n;let r,i,o=(i=(n=e).role.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-]/g,""),{name:n.role,description:n.goal,url:`https://agentnetes.vercel.app/agents/${i}`,version:"1.0.0",provider:{organization:"Agentnetes"},capabilities:{streaming:!0,pushNotifications:!1,stateTransitionHistory:!0},authentication:{schemes:["bearer"]},defaultInputModes:["text/plain","application/json"],defaultOutputModes:["text/plain","application/json"],skills:(r=n.role.toLowerCase()).includes("scout")||r.includes("explorer")||r.includes("architect")?[{id:"explore-codebase",name:"Explore Codebase",description:"Scans a repository and documents architecture patterns, interface contracts, and file conventions",tags:["codebase","architecture","typescript","monorepo"],examples:["Explore the provider package structure in vercel/ai","Document interface contracts for LanguageModelV1","Find all test patterns across packages"]},{id:"map-dependencies",name:"Map Dependencies",description:"Traces dependency graphs across a monorepo and identifies shared utilities",tags:["dependencies","monorepo","pnpm"],examples:["Map all workspace dependencies in vercel/ai","Find all packages that depend on @ai-sdk/provider"]}]:r.includes("provider")||r.includes("implement")||r.includes("engineer")?[{id:"implement-provider",name:"Implement Provider",description:"Creates a new AI SDK provider package following existing patterns — provider class, chat model, streaming",tags:["typescript","ai-sdk","provider","streaming"],examples:["Add @ai-sdk/deepseek with streaming and reasoning tokens","Implement a new OpenAI-compatible provider","Add tool-calling support to an existing provider"]},{id:"implement-feature",name:"Implement Feature",description:"Builds a software feature in an existing codebase following discovered conventions",tags:["typescript","implementation","feature"],examples:["Add a /research command to a CLI tool","Implement a new API endpoint following existing patterns"]}]:r.includes("test")||r.includes("verif")||r.includes("qa")?[{id:"write-tests",name:"Write Tests",description:"Writes comprehensive tests following the codebase test conventions — unit, integration, streaming",tags:["vitest","testing","typescript","coverage"],examples:["Write tests for a new provider package","Add streaming tests for a chat model","Write integration tests for a new API endpoint"]},{id:"run-verification",name:"Run Verification",description:"Runs tests, type checks, and linting to verify correctness. Reports failures with context.",tags:["typescript","vitest","tsc","verification"],examples:["Verify TypeScript compilation passes","Run all tests and report failures"]}]:r.includes("package")||r.includes("config")||r.includes("integrat")?[{id:"setup-package",name:"Setup Package",description:"Configures package.json, tsconfig.json, exports, and monorepo wiring for a new package",tags:["monorepo","pnpm","typescript","package"],examples:["Set up a new @ai-sdk/* package from scratch","Configure ESM + CJS dual exports","Wire a new package into pnpm workspace"]}]:r.includes("security")||r.includes("scanner")||r.includes("auth")||r.includes("risk")?[{id:"security-audit",name:"Security Audit",description:"Analyzes code for security vulnerabilities — auth flows, input validation, dependency CVEs",tags:["security","audit","vulnerabilities","owasp"],examples:["Audit authentication flows for session fixation","Scan dependencies for known CVEs","Find XSS vulnerabilities in user input handling"]}]:[{id:"general-task",name:"General Engineering Task",description:"Performs software engineering tasks — exploration, implementation, verification",tags:["typescript","engineering"],examples:["Implement a requested feature following existing patterns"]}]}),l=JSON.stringify(o,null,2),[d,c]=(0,a.useState)(!1);return(0,s.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6 backdrop-blur-md",style:{background:"rgba(0,0,0,0.85)"},onClick:t,children:(0,s.jsxs)("div",{className:"w-full max-w-2xl max-h-[90vh] flex flex-col rounded-2xl overflow-hidden shadow-2xl border border-purple-500/20",style:{background:"var(--bg-base)"},onClick:e=>e.stopPropagation(),children:[(0,s.jsxs)("div",{className:"px-6 py-5 border-b border-white/[0.08] shrink-0",style:{background:"linear-gradient(135deg, rgba(168,85,247,0.08), rgba(236,72,153,0.05))"},children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"w-10 h-10 rounded-xl flex items-center justify-center text-lg",style:{background:"linear-gradient(135deg, rgba(168,85,247,0.2), rgba(236,72,153,0.15))",border:"1px solid rgba(168,85,247,0.3)"},children:e.icon}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-white font-bold text-lg",children:e.role}),(0,s.jsx)("p",{className:"text-white/50 text-sm font-mono mt-0.5",children:o.url})]})]}),(0,s.jsx)("button",{onClick:t,className:"text-white/30 hover:text-white/70 transition-colors text-xl leading-none p-1",children:"✕"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs font-mono px-2.5 py-1 rounded-full font-semibold",style:{background:"linear-gradient(135deg, rgba(168,85,247,0.2), rgba(236,72,153,0.15))",border:"1px solid rgba(168,85,247,0.3)",color:"#c084fc"},children:"A2A Agent Card"}),(0,s.jsxs)("span",{className:"text-xs font-mono text-white/30",children:["v",o.version]}),(0,s.jsx)("span",{className:"text-xs font-mono text-white/30",children:"·"}),(0,s.jsx)("span",{className:"text-xs font-mono text-emerald-400/70",children:"streaming"}),(0,s.jsx)("span",{className:"text-xs font-mono text-white/30",children:"·"}),(0,s.jsxs)("span",{className:"text-xs font-mono text-white/30",children:[o.authentication.schemes[0]," auth"]})]})]}),(0,s.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[(0,s.jsxs)("div",{className:"px-6 py-4 border-b border-white/[0.06]",children:[(0,s.jsx)("p",{className:"text-xs font-mono text-white/40 uppercase tracking-widest mb-2",children:"Description"}),(0,s.jsx)("p",{className:"text-white/80 text-sm leading-relaxed",children:o.description})]}),(0,s.jsxs)("div",{className:"px-6 py-4 border-b border-white/[0.06]",children:[(0,s.jsx)("p",{className:"text-xs font-mono text-white/40 uppercase tracking-widest mb-3",children:"Capabilities"}),(0,s.jsx)("div",{className:"grid grid-cols-3 gap-3",children:[{label:"Streaming",value:o.capabilities.streaming,color:"emerald"},{label:"Push Notifications",value:o.capabilities.pushNotifications,color:"yellow"},{label:"State History",value:o.capabilities.stateTransitionHistory,color:"blue"}].map(e=>(0,s.jsxs)("div",{className:"rounded-xl border border-white/[0.08] px-3 py-2.5 text-center",style:{background:"var(--bg-card)"},children:[(0,s.jsx)("div",{className:`text-sm font-mono font-semibold ${e.value?`text-${e.color}-400`:"text-white/20"}`,children:e.value?"✓":"✗"}),(0,s.jsx)("div",{className:"text-xs text-white/50 mt-1",children:e.label})]},e.label))})]}),(0,s.jsxs)("div",{className:"px-6 py-4 border-b border-white/[0.06]",children:[(0,s.jsx)("p",{className:"text-xs font-mono text-white/40 uppercase tracking-widest mb-3",children:"Skills"}),(0,s.jsx)("div",{className:"space-y-3",children:o.skills.map(e=>(0,s.jsxs)("div",{className:"rounded-xl border border-white/[0.08] p-4",style:{background:"var(--bg-card)"},children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,s.jsx)("span",{className:"text-violet-400 font-semibold text-sm",children:e.name}),(0,s.jsx)("span",{className:"text-xs font-mono text-white/25",children:e.id})]}),(0,s.jsx)("p",{className:"text-sm text-white/60 leading-relaxed mb-3",children:e.description}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1.5 mb-3",children:e.tags.map(e=>(0,s.jsx)("span",{className:"text-xs font-mono text-emerald-400/70 border border-emerald-500/20 bg-emerald-500/5 px-2 py-0.5 rounded-md",children:e},e))}),e.examples.length>0&&(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("p",{className:"text-xs text-white/30 font-mono",children:"Examples:"}),e.examples.map((e,t)=>(0,s.jsx)("div",{className:"text-sm text-white/50 pl-3 border-l-2 border-white/[0.06]",children:e},t))]})]},e.id))})]}),(0,s.jsxs)("div",{className:"px-6 py-4 border-b border-white/[0.06]",children:[(0,s.jsx)("p",{className:"text-xs font-mono text-white/40 uppercase tracking-widest mb-3",children:"Input / Output"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs text-white/30 mb-1.5",children:"Input Modes"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1.5",children:o.defaultInputModes.map(e=>(0,s.jsx)("span",{className:"text-xs font-mono text-blue-400/70 border border-blue-500/20 bg-blue-500/5 px-2 py-0.5 rounded-md",children:e},e))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs text-white/30 mb-1.5",children:"Output Modes"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1.5",children:o.defaultOutputModes.map(e=>(0,s.jsx)("span",{className:"text-xs font-mono text-orange-400/70 border border-orange-500/20 bg-orange-500/5 px-2 py-0.5 rounded-md",children:e},e))})]})]})]}),(0,s.jsxs)("div",{className:"px-6 py-4",children:[(0,s.jsxs)("button",{onClick:()=>c(e=>!e),className:"flex items-center gap-2 text-sm font-mono text-white/40 hover:text-white/70 transition-colors mb-3",children:[(0,s.jsx)(u,{size:14}),(0,s.jsxs)("span",{children:[d?"Hide":"Show"," agent-card.json"]}),d?(0,s.jsx)(m,{size:14}):(0,s.jsx)(x.ChevronRight,{size:14})]}),d&&(0,s.jsxs)("div",{className:"rounded-xl border border-white/[0.08] overflow-hidden",style:{background:"var(--bg-panel)"},children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-4 py-2 border-b border-white/[0.06]",children:[(0,s.jsx)("span",{className:"text-xs text-white/30 font-mono",children:"agent-card.json"}),(0,s.jsx)("span",{className:"text-xs text-white/20 font-mono",children:"A2A v1.0"})]}),(0,s.jsx)("div",{className:"p-4 font-mono text-sm leading-6 overflow-x-auto",children:l.split("\n").map((e,t)=>(0,s.jsxs)("div",{className:"flex gap-4 hover:bg-white/[0.02] px-2 rounded",children:[(0,s.jsx)("span",{className:"text-white/20 w-5 shrink-0 select-none text-right",children:t+1}),(0,s.jsx)("span",{dangerouslySetInnerHTML:{__html:e.replace(/"([^"]+)":/g,'<span class="text-[#79c0ff]">"$1"</span>:').replace(/: "([^"]*)"(,?)/g,': <span class="text-[#a5d6ff]">"$1"</span>$2').replace(/: (true|false)(,?)/g,': <span class="text-[#ff7b72]">$1</span>$2')},className:"whitespace-pre"})]},t))})]})]})]}),(0,s.jsxs)("div",{className:"px-6 py-4 border-t border-white/[0.08] flex items-center justify-between shrink-0",style:{background:"var(--bg-card)"},children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(g,{size:14,className:"text-purple-400/50"}),(0,s.jsxs)("span",{className:"text-sm text-white/40",children:[o.skills.length," skill",o.skills.length>1?"s":""," · Google A2A Protocol"]})]}),(0,s.jsx)("button",{onClick:t,className:"text-sm font-semibold px-5 py-2 rounded-xl transition-all hover:opacity-90",style:{background:"linear-gradient(135deg, #a855f7, #ec4899)",color:"#fff"},children:"Close"})]})]})})}function y({lines:e}){let t=(0,a.useRef)(null);return((0,a.useEffect)(()=>{t.current?.scrollTo({top:t.current.scrollHeight,behavior:"smooth"})},[e]),0===e.length)?null:(0,s.jsxs)("div",{className:"mt-2 border border-white/[0.06] rounded-lg overflow-hidden",style:{background:"var(--bg-panel)"},children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5 px-3 py-1.5 border-b border-white/[0.06]",children:[(0,s.jsx)(h.Terminal,{size:12,className:"text-white/30"}),(0,s.jsx)("span",{className:"text-xs text-white/35 font-mono uppercase tracking-wider",children:"sandbox"})]}),(0,s.jsx)("div",{ref:t,className:"max-h-32 overflow-y-auto p-3 space-y-0.5",children:e.map((e,t)=>(0,s.jsx)("div",{className:`text-sm font-mono leading-5 whitespace-pre-wrap ${e.startsWith("$")?"text-[#7dd3fc]":e.includes("error")||e.includes("FAIL")?"text-red-400":e.includes("✓")||e.includes("passed")?"text-green-400":"text-white/50"}`,children:e},t))})]})}function j({task:e,terminalLines:t,isCollabTarget:n,isCollabSource:r}){let[i,o]=(0,a.useState)(!1),[l,d]=(0,a.useState)(null),[c,p]=(0,a.useState)(!1),h=function(e,t=18){let[s,n]=(0,a.useState)(e),r=(0,a.useRef)(e);return(0,a.useEffect)(()=>{if(e===r.current)return;r.current=e,n("");let s=0,a=setInterval(()=>{s++,n(e.slice(0,s)),s>=e.length&&clearInterval(a)},t);return()=>clearInterval(a)},[e,t]),s}(e.statusText,20),u=n?"border-purple-500/60 shadow-[0_0_12px_rgba(168,85,247,0.25)]":r?"border-purple-400/40":"running"===e.status?"border-yellow-500/40 shadow-[0_0_8px_rgba(234,179,8,0.1)]":"completed"===e.status?"border-green-500/25":"failed"===e.status?"border-red-500/25":"border-white/[0.06]",f="running"===e.status?"bg-yellow-500/[0.04]":"completed"===e.status?"bg-green-500/[0.04]":"failed"===e.status?"bg-red-500/[0.04]":"";return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:`rounded-xl border transition-all duration-500 ${u} ${f} overflow-hidden`,style:{background:f?void 0:"var(--bg-card)"},children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-4 py-3 cursor-pointer select-none",onClick:()=>o(e=>!e),children:[(0,s.jsx)("span",{className:"text-base shrink-0",children:e.icon}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-violet-400 font-semibold text-base",children:e.role}),(0,s.jsx)(b,{status:e.status}),"completed"===e.status&&(0,s.jsx)("span",{className:"text-xs text-green-400 font-mono",children:"✓ done"})]}),(0,s.jsx)("p",{className:"text-sm text-white/45 font-mono mt-0.5 truncate",children:h})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[e.artifacts.length>0&&(0,s.jsxs)("span",{className:"text-xs text-white/35 font-mono",children:[e.artifacts.length," file",e.artifacts.length>1?"s":""]}),(0,s.jsxs)("button",{onClick:e=>{e.stopPropagation(),p(!0)},title:"View A2A Agent Card",className:"flex items-center gap-1.5 text-xs font-mono px-2.5 py-1 rounded-lg transition-all hover:scale-105",style:{background:"linear-gradient(135deg, rgba(168,85,247,0.15), rgba(236,72,153,0.15))",border:"1px solid rgba(168,85,247,0.3)"},children:[(0,s.jsx)(g,{size:11,className:"text-purple-400"}),(0,s.jsx)("span",{className:"text-purple-300 font-semibold",children:"A2A"})]}),i?(0,s.jsx)(m,{size:14,className:"text-white/30"}):(0,s.jsx)(x.ChevronRight,{size:14,className:"text-white/30"})]})]}),i&&(0,s.jsxs)("div",{className:"px-4 pb-3 border-t border-white/[0.07] pt-3 space-y-3",children:[(0,s.jsx)("p",{className:"text-sm text-white/45 italic",children:e.goal}),(0,s.jsx)(y,{lines:t}),e.findings.length>0&&(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("p",{className:"text-xs text-white/35 uppercase tracking-wider font-mono",children:"Findings"}),e.findings.map((e,t)=>(0,s.jsxs)("div",{className:"flex gap-2 text-sm text-white/70",children:[(0,s.jsx)("span",{className:"text-green-400 shrink-0",children:"✓"}),(0,s.jsx)("span",{children:e})]},t))]}),e.artifacts.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs text-white/35 uppercase tracking-wider font-mono mb-2",children:"Files"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1.5",children:e.artifacts.map((e,t)=>(0,s.jsx)(k,{artifact:e,onClick:()=>d(e)},t))})]})]})]}),l&&(0,s.jsx)(v,{artifact:l,onClose:()=>d(null)}),c&&(0,s.jsx)(w,{task:e,onClose:()=>p(!1)})]})}function N({event:e,tasks:t}){let a=e.fromTaskId?t[e.fromTaskId]?.role:"?",n=e.toTaskId?t[e.toTaskId]?.role:"?";return(0,s.jsxs)("div",{className:"flex items-start gap-2 px-3 py-2.5 rounded-xl bg-purple-500/8 border border-purple-500/20 animate-pulse-once",children:[(0,s.jsx)("span",{className:"text-base shrink-0",children:"🔗"}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"text-sm text-purple-300 font-medium",children:[a," → ",n]}),(0,s.jsx)("div",{className:"text-sm text-purple-400/80 font-mono mt-0.5",children:String(e.data.message??"")})]})]})}function S({tasks:e,rootId:t}){let a=Object.values(e).filter(e=>e.id!==t);if(0===a.length)return null;let n=a.filter(e=>"completed"===e.status).length,r=Math.round(n/a.length*100);return(0,s.jsxs)("div",{className:"px-4 py-2.5 border-b border-white/[0.07]",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between text-xs text-white/40 font-mono mb-1.5",children:[(0,s.jsxs)("span",{children:[n,"/",a.length," agents complete"]}),(0,s.jsxs)("span",{children:[r,"%"]})]}),(0,s.jsx)("div",{className:"h-1.5 bg-white/[0.06] rounded-full overflow-hidden",children:(0,s.jsx)("div",{className:"h-full bg-gradient-to-r from-purple-500 via-pink-500 to-orange-400 rounded-full transition-all duration-700 ease-out",style:{width:`${r}%`}})})]})}function I({tasks:e,rootId:t,events:n}){let r=Object.values(e),i=t?e[t]:null,o=r.filter(e=>e.id!==t),l=n.filter(e=>"collaboration"===e.type),[d,c]=(0,a.useState)(new Set);(0,a.useEffect)(()=>{r.forEach((e,t)=>{setTimeout(()=>c(t=>new Set([...t,e.id])),120*t)})},[r.length]);let p={};for(let e of n)if("terminal"===e.type&&e.taskId){p[e.taskId]||(p[e.taskId]=[]);let t=String(e.data.output??"");p[e.taskId].push(...t.split("\n").filter(Boolean))}let m=new Set(l.map(e=>e.toTaskId).filter(Boolean)),x=new Set(l.map(e=>e.fromTaskId).filter(Boolean));return 0===r.length?(0,s.jsx)("div",{className:"h-full flex items-center justify-center text-center p-8",children:(0,s.jsxs)("div",{children:[(0,s.jsx)(f,{size:48,className:"text-white/15 mx-auto mb-4"}),(0,s.jsx)("p",{className:"text-white/30 text-base",children:"Agent activity appears here"}),(0,s.jsx)("p",{className:"text-white/20 text-sm mt-1",children:"Tasks and agent progress will show when a run starts"})]})}):(0,s.jsxs)("div",{className:"h-full flex flex-col overflow-hidden",children:[(0,s.jsx)(S,{tasks:e,rootId:t}),(0,s.jsxs)("div",{className:"flex-1 overflow-y-auto p-4 space-y-3",children:[i&&d.has(i.id)&&(0,s.jsxs)("div",{className:"transition-all duration-300 animate-slide-in",children:[(0,s.jsx)("div",{className:"text-xs text-white/30 uppercase tracking-widest font-mono mb-2",children:"Orchestrator"}),(0,s.jsx)(j,{task:i,terminalLines:p[i.id]??[],isCollabTarget:!1,isCollabSource:!1})]}),o.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"text-xs text-white/30 uppercase tracking-widest font-mono mb-2",children:["Agent Team · ",o.length," specialists"]}),(0,s.jsx)("div",{className:"space-y-2",children:o.map(e=>d.has(e.id)?(0,s.jsx)("div",{className:"transition-all duration-300 animate-slide-in",children:(0,s.jsx)(j,{task:e,terminalLines:p[e.id]??[],isCollabTarget:m.has(e.id),isCollabSource:x.has(e.id)})},e.id):null)})]}),l.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs text-white/30 uppercase tracking-widest font-mono mb-2",children:"Collaborations"}),(0,s.jsx)("div",{className:"space-y-2",children:l.map((t,a)=>(0,s.jsx)(N,{event:t,tasks:e},a))})]})]})]})}let C=[{id:"google/gemini-3.1-pro",label:"Gemini 3.1 Pro",badge:"latest"},{id:"google/gemini-3.1-flash-lite",label:"Gemini 3.1 Flash-Lite",badge:"fast"},{id:"google/gemini-3-pro",label:"Gemini 3 Pro",badge:""},{id:"google/gemini-3-flash",label:"Gemini 3 Flash",badge:""},{id:"google/gemini-2.5-pro",label:"Gemini 2.5 Pro",badge:""},{id:"google/gemini-2.5-flash",label:"Gemini 2.5 Flash",badge:"recommended"},{id:"google/gemini-2.5-flash-lite",label:"Gemini 2.5 Flash-Lite",badge:""},{id:"google/gemini-2.0-flash",label:"Gemini 2.0 Flash",badge:""},{id:"google/gemini-2.0-flash-lite",label:"Gemini 2.0 Flash-Lite",badge:"budget"}];function A({value:e,onChange:t}){return(0,s.jsx)("select",{value:e,onChange:e=>t(e.target.value),className:"border border-white/15 text-sm rounded-lg px-3 py-1.5 outline-none focus:border-white/30 cursor-pointer",style:{background:"var(--bg-hover)",color:"rgb(var(--fg))"},children:C.map(e=>(0,s.jsxs)("option",{value:e.id,children:[e.label,e.badge?` (${e.badge})`:""]},e.id))})}let T=(0,i.default)("panel-right-open",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m10 15-3-3 3-3",key:"1pgupc"}]]),M=(0,i.default)("panel-right-close",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m8 9 3 3-3 3",key:"12hl5m"}]]),$=(0,i.default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);var P=e.i(39616);let _=(0,i.default)("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]),E=(0,i.default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);var R=e.i(78917);class L{handlers=[];queue=[];closed=!1;on(e){for(let t of(this.handlers.push(e),this.queue))e(t)}emit(e){for(let t of(this.queue.push(e),this.handlers))t(e)}close(){this.closed=!0}isClosed(){return this.closed}}let D={maxDepth:3,maxWorkers:6,maxTotalTasks:15,maxStepsPerAgent:20,plannerModel:"google/gemini-2.5-pro",workerModel:"google/gemini-2.5-flash",repoUrl:""},z=e=>new Promise(t=>setTimeout(t,e));function O(e){return{parentId:null,status:"pending",statusText:"Waiting to start...",findings:[],artifacts:[],children:[],sandboxId:null,model:"google/gemini-2.5-flash",createdAt:Date.now(),completedAt:null,depth:1,icon:"⚙️",...e}}class F{emitter;config;constructor(e={}){this.emitter=new L,this.config={...D,...e}}onEvent(e){this.emitter.on(e)}async run(e){let t=O({id:"root",parentId:null,role:"Tech Lead",goal:e,depth:0,model:this.config.plannerModel,icon:"🧠",status:"running",statusText:"Spinning up sandbox..."});for(let[e,s,a]of(this.emitter.emit({type:"task-created",taskId:"root",data:{task:t}}),[[400,"Spinning up sandbox..."],[500,"Analyzing goal..."],[300,"Exploring monorepo structure...","$ ls packages/ | wc -l\n47"],[600,"Scanning provider packages...",'$ find packages -name "*-provider.ts" | head -8\npackages/openai/src/openai-provider.ts\npackages/anthropic/src/anthropic-provider.ts\npackages/google/src/google-provider.ts\npackages/mistral/src/mistral-provider.ts'],[700,"Reading interface contracts...",'$ grep -r "implements LanguageModelV1" packages/ --include="*.ts" -l\npackages/openai/src/openai-chat-model.ts\npackages/anthropic/src/anthropic-messages-language-model.ts'],[500,"Understanding test patterns...","$ ls packages/openai/src/__tests__/\nopenai-chat-model.test.ts\nopenai-completion-model.test.ts\nopenai-provider.test.ts"],[400,"Assembling the team..."]]))await z(e),this.emitter.emit({type:"task-updated",taskId:"root",data:{statusText:s}}),a&&(this.emitter.emit({type:"terminal",taskId:"root",data:{output:a}}),await z(200));let s=this.buildWorkerPlan(e);for(let e of s)e.icon=function(e){let t=e.toLowerCase();return t.includes("scout")||t.includes("architect")||t.includes("analysis")||t.includes("explorer")?"🔍":t.includes("lead")||t.includes("planner")||t.includes("tech")?"🧠":t.includes("test")||t.includes("qa")||t.includes("verif")?"🧪":t.includes("package")||t.includes("config")||t.includes("infra")?"📦":t.includes("doc")?"📝":t.includes("front")||t.includes("ui")||t.includes("design")?"🎨":t.includes("security")||t.includes("auth")||t.includes("risk")?"🔐":t.includes("scanner")||t.includes("scan")?"🔎":"⚙️"}(e.role);for(let e of s)this.emitter.emit({type:"task-created",taskId:e.id,data:{task:e}}),await z(280);this.emit("task-completed","root","Team assembled — workers running in parallel"),await Promise.all(s.map((e,t)=>this.runWorker(e,150*t))),await z(500);let a=s.flatMap(e=>e.artifacts);this.emitter.emit({type:"task-updated",taskId:"root",data:{statusText:"Synthesizing results..."}}),await z(600);let n=this.buildSummary(e,s,a);this.emitter.emit({type:"synthesis",taskId:"root",data:{content:n,artifacts:a}}),await z(300),this.emitter.emit({type:"done",data:{content:n,artifacts:a}}),this.emitter.close()}emit(e,t,s){this.emitter.emit({type:e,taskId:t,data:{statusText:s}})}buildWorkerPlan(e){let t=e.toLowerCase();return t.includes("provider")||t.includes("sdk")||t.includes("package")||t.includes("deepseek")?[O({id:"scout",role:"Architecture Scout",goal:"Explore existing provider packages and document interface contracts, file patterns, and test conventions",icon:"🔍"}),O({id:"engineer",role:"Provider Engineer",goal:"Implement the new provider package — provider class, chat model, streaming, reasoning tokens",icon:"⚙️"}),O({id:"tester",role:"Test Engineer",goal:"Write comprehensive tests matching existing monorepo test patterns",icon:"🧪"}),O({id:"packager",role:"Package Engineer",goal:"Set up package.json, tsconfig.json, exports, and wire into the monorepo build system",icon:"📦"})]:t.includes("security")||t.includes("vulnerabilit")||t.includes("audit")?[O({id:"dep-scanner",role:"Dependency Scanner",goal:"Audit all dependencies for known vulnerabilities",icon:"🔎"}),O({id:"auth-analyzer",role:"Auth Flow Analyzer",goal:"Trace authentication flows and identify weaknesses",icon:"🔐"}),O({id:"input-checker",role:"Input Validator",goal:"Check all user input handling for injection attack surfaces",icon:"⚙️"}),O({id:"risk-report",role:"Risk Prioritizer",goal:"Combine all findings into a prioritized security report",icon:"📝"})]:t.includes("research")||t.includes("command")||t.includes("cli")||t.includes("feature")?[O({id:"explorer",role:"Codebase Explorer",goal:"Map the existing command structure and extension patterns",icon:"🔍"}),O({id:"implementer",role:"Feature Engineer",goal:"Implement the new feature following existing patterns",icon:"⚙️"}),O({id:"integrator",role:"Integration Engineer",goal:"Wire the feature into the CLI entry point and config",icon:"📦"}),O({id:"tester",role:"Test Engineer",goal:"Write integration tests covering the new command end-to-end",icon:"🧪"})]:[O({id:"explorer",role:"Codebase Explorer",goal:"Map the repository structure and identify relevant files",icon:"🔍"}),O({id:"implementer",role:"Implementation Engineer",goal:"Implement the requested changes following existing patterns",icon:"⚙️"}),O({id:"verifier",role:"Verification Engineer",goal:"Verify the implementation is correct and consistent",icon:"🧪"})]}async runWorker(e,t){for(let s of(await z(t),this.emitter.emit({type:"task-updated",taskId:e.id,data:{status:"running",statusText:"Starting sandbox..."}}),await z(300),this.stepsForRole(e.role)))await z(s.delay),this.emitter.emit({type:"task-updated",taskId:e.id,data:{statusText:s.text}}),s.cmd&&(this.emitter.emit({type:"terminal",taskId:e.id,data:{output:s.cmd}}),await z(180));"engineer"===e.id&&(await z(600),this.emitter.emit({type:"collaboration",fromTaskId:"tester",toTaskId:"engineer",data:{message:"Type error: doStream() must return AsyncIterable<LanguageModelV1StreamPart>"}}),await z(300),this.emitter.emit({type:"task-updated",taskId:e.id,data:{statusText:"Fixing streaming return type..."}}),this.emitter.emit({type:"terminal",taskId:e.id,data:{output:"$ npx tsc --noEmit\nsrc/deepseek-chat-model.ts:47:5 - error TS2322: Type mismatch on doStream return\n\nFixing..."}}),await z(700),this.emitter.emit({type:"task-updated",taskId:e.id,data:{statusText:"Type check passing ✓"}}),this.emitter.emit({type:"terminal",taskId:e.id,data:{output:"$ npx tsc --noEmit\n✓ No errors found"}}),await z(300));let s=this.artifactsForRole(e.role),a=this.findingsForRole(e.role);for(let t of s)await z(150),this.emitter.emit({type:"artifact",taskId:e.id,data:{artifact:t}});for(let t of a)this.emitter.emit({type:"finding",taskId:e.id,data:{content:t}});await z(200),this.emitter.emit({type:"task-completed",taskId:e.id,data:{statusText:"Done",artifacts:s,findings:a}}),e.status="completed",e.artifacts=s,e.findings=a}stepsForRole(e){let t=e.toLowerCase();return t.includes("scout")||t.includes("explorer")||t.includes("codebase")?[{text:"Scanning packages directory...",delay:400,cmd:"$ ls packages/ | head -12\nai anthropic azure cohere deepseek\ngoogle groq mistral openai perplexity"},{text:"Reading openai provider structure...",delay:700,cmd:'$ find packages/openai/src -name "*.ts" | head -6\npackages/openai/src/index.ts\npackages/openai/src/openai-provider.ts\npackages/openai/src/openai-chat-model.ts\npackages/openai/src/convert-to-openai-messages.ts'},{text:"Extracting interface contracts...",delay:800,cmd:'$ head -30 packages/openai/src/openai-chat-model.ts\nexport class OpenAIChatModel implements LanguageModelV1 {\n readonly specificationVersion = "v1";\n readonly provider: string;\n readonly modelId: string;\n ...'},{text:"Checking test patterns...",delay:600,cmd:'$ head -20 packages/openai/src/__tests__/openai-chat-model.test.ts\nimport { describe, it, expect, vi } from "vitest";\nimport { createOpenAI } from "../openai-provider";\n\nconst server = createTestServer({...})'},{text:"Documenting findings...",delay:500}]:t.includes("provider")||t.includes("feature")||t.includes("implement")?[{text:"Reading Architecture Scout findings...",delay:400},{text:"Creating package directory...",delay:300,cmd:"$ mkdir -p packages/deepseek/src/__tests__"},{text:"Writing deepseek-provider.ts...",delay:900,cmd:'$ cat > packages/deepseek/src/deepseek-provider.ts\nexport function createDeepSeek(options) {\n const baseURL = options.baseURL ?? "https://api.deepseek.com/v1";\n return { chat: (modelId) => new DeepSeekChatModel(modelId, ...) }\n}'},{text:"Implementing chat model...",delay:1100,cmd:"$ cat > packages/deepseek/src/deepseek-chat-model.ts\nexport class DeepSeekChatModel implements LanguageModelV1 {\n async doGenerate(options) { ... }\n async doStream(options) { ... }\n}"},{text:"Adding streaming support...",delay:800,cmd:"$ wc -l packages/deepseek/src/deepseek-chat-model.ts\n 187 packages/deepseek/src/deepseek-chat-model.ts"},{text:"Running type check...",delay:600,cmd:"$ npx tsc --noEmit\n...(checking)"}]:t.includes("test")||t.includes("verif")?[{text:"Studying existing test patterns...",delay:500,cmd:'$ grep -r "createTestServer\\|mockFetch" packages/openai --include="*.ts" -l\npackages/openai/src/__tests__/openai-chat-model.test.ts'},{text:"Writing provider tests...",delay:700,cmd:'$ cat > packages/deepseek/src/__tests__/deepseek-provider.test.ts\ndescribe("createDeepSeek", () => {\n it("creates provider with default URL", () => {...})\n it("passes apiKey to model", () => {...})\n})'},{text:"Writing streaming tests...",delay:800,cmd:'$ cat >> packages/deepseek/src/__tests__/deepseek-chat-model.test.ts\nit("streams text chunks correctly", async () => {\n const chunks = [];\n for await (const chunk of stream) { chunks.push(chunk); }\n expect(chunks[0].type).toBe("text-delta");\n})'},{text:"Running vitest...",delay:900,cmd:"$ npx vitest run packages/deepseek --reporter=verbose\n✓ deepseek-provider.test.ts (3)\n✓ deepseek-chat-model.test.ts (4)\n✗ deepseek-chat-model.test.ts > streaming type (1)\n\nFAIL: expected AsyncIterable<StreamPart>, got ReadableStream"},{text:"Reporting type error to Provider Engineer...",delay:400},{text:"Waiting for fix...",delay:1200},{text:"Re-running vitest...",delay:400,cmd:"$ npx vitest run packages/deepseek --reporter=verbose\n✓ deepseek-provider.test.ts (3)\n✓ deepseek-chat-model.test.ts (5)\n\nTest Files 1 passed\nTests 8 passed\nDuration 1.24s"}]:t.includes("package")||t.includes("config")||t.includes("integrat")?[{text:"Checking workspace config...",delay:400,cmd:'$ cat pnpm-workspace.yaml\npackages:\n - "packages/*"\n - "packages/provider-utils"'},{text:"Writing package.json...",delay:500,cmd:'$ cat > packages/deepseek/package.json\n{\n "name": "@ai-sdk/deepseek",\n "version": "1.0.0",\n "dependencies": {\n "@ai-sdk/provider": "workspace:*"\n }\n}'},{text:"Writing tsconfig.json...",delay:400,cmd:'$ cat > packages/deepseek/tsconfig.json\n{\n "extends": "../../tsconfig.json",\n "compilerOptions": { "outDir": "dist" },\n "include": ["src"]\n}'},{text:"Wiring into monorepo...",delay:500,cmd:'$ cat >> tsconfig.json\n{ "path": "packages/deepseek/tsconfig.json" }'},{text:"Verifying workspace links...",delay:400,cmd:"$ pnpm list @ai-sdk/deepseek\n@ai-sdk/deepseek 1.0.0 packages/deepseek"}]:t.includes("auth")||t.includes("input")||t.includes("risk")||t.includes("dep")?[{text:"Scanning codebase...",delay:500,cmd:'$ find . -name "*.ts" | xargs grep -l "password\\|token\\|secret" | head -8'},{text:"Analyzing patterns...",delay:800},{text:"Running checks...",delay:700,cmd:"$ npx audit-ci --moderate"},{text:"Compiling findings...",delay:500}]:[{text:"Analyzing task...",delay:500},{text:"Working...",delay:1e3},{text:"Finalizing...",delay:600}]}artifactsForRole(e){let t=e.toLowerCase();return t.includes("scout")||t.includes("codebase")?[{filename:"architecture-findings.md",language:"markdown",content:`# Architecture Findings
2
+
3
+ ## Provider Pattern
4
+ All providers implement \`LanguageModelV1\` from \`@ai-sdk/provider\`.
5
+
6
+ ## Standard File Structure
7
+ \`\`\`
8
+ packages/<provider>/
9
+ src/
10
+ index.ts — public exports
11
+ <name>-provider.ts — factory function
12
+ <name>-chat-model.ts — core model class
13
+ package.json
14
+ tsconfig.json
15
+ \`\`\`
16
+
17
+ ## Key Interfaces
18
+ - \`LanguageModelV1\` — must implement \`doGenerate()\` and \`doStream()\`
19
+ - \`LanguageModelV1StreamPart\` — union type for stream chunks
20
+ - \`createJsonErrorResponseHandler\` — shared error utility
21
+
22
+ ## Test Conventions
23
+ - Vitest with \`createTestServer\` mock helper
24
+ - One test file per source file
25
+ - Snapshot tests for API request shapes`}]:t.includes("provider")||t.includes("feature")||t.includes("implement")?[{filename:"src/deepseek-provider.ts",language:"typescript",content:`import { withoutTrailingSlash } from '@ai-sdk/provider-utils';
26
+ import { DeepSeekChatModel } from './deepseek-chat-model';
27
+
28
+ export interface DeepSeekProvider {
29
+ (modelId: DeepSeekChatModelId): DeepSeekChatModel;
30
+ chat(modelId: DeepSeekChatModelId): DeepSeekChatModel;
31
+ }
32
+
33
+ export interface DeepSeekProviderSettings {
34
+ baseURL?: string;
35
+ apiKey?: string;
36
+ }
37
+
38
+ export function createDeepSeek(
39
+ options: DeepSeekProviderSettings = {},
40
+ ): DeepSeekProvider {
41
+ const baseURL = withoutTrailingSlash(
42
+ options.baseURL ?? 'https://api.deepseek.com/v1',
43
+ );
44
+ const apiKey = options.apiKey ?? process.env.DEEPSEEK_API_KEY ?? '';
45
+
46
+ const createModel = (modelId: DeepSeekChatModelId) =>
47
+ new DeepSeekChatModel(modelId, { baseURL, apiKey });
48
+
49
+ const provider = (modelId: DeepSeekChatModelId) => createModel(modelId);
50
+ provider.chat = createModel;
51
+ return provider as DeepSeekProvider;
52
+ }
53
+
54
+ export const deepseek = createDeepSeek();
55
+
56
+ export type DeepSeekChatModelId =
57
+ | 'deepseek-chat'
58
+ | 'deepseek-reasoner'
59
+ | (string & {});`},{filename:"src/deepseek-chat-model.ts",language:"typescript",content:`import {
60
+ LanguageModelV1,
61
+ LanguageModelV1StreamPart,
62
+ } from '@ai-sdk/provider';
63
+ import {
64
+ createJsonResponseHandler,
65
+ createEventSourceResponseHandler,
66
+ postJsonToApi,
67
+ } from '@ai-sdk/provider-utils';
68
+
69
+ export class DeepSeekChatModel implements LanguageModelV1 {
70
+ readonly specificationVersion = 'v1';
71
+ readonly provider = 'deepseek';
72
+ readonly defaultObjectGenerationMode = 'json' as const;
73
+
74
+ constructor(
75
+ readonly modelId: string,
76
+ private readonly config: { baseURL: string; apiKey: string },
77
+ ) {}
78
+
79
+ async doGenerate(
80
+ options: Parameters<LanguageModelV1['doGenerate']>[0],
81
+ ) {
82
+ const response = await postJsonToApi({
83
+ url: \`\${this.config.baseURL}/chat/completions\`,
84
+ headers: { Authorization: \`Bearer \${this.config.apiKey}\` },
85
+ body: { model: this.modelId, messages: options.prompt },
86
+ successfulResponseHandler: createJsonResponseHandler(),
87
+ failedResponseHandler: createJsonErrorResponseHandler(),
88
+ abortSignal: options.abortSignal,
89
+ });
90
+ // ... map response
91
+ return { text: response.choices[0].message.content, finishReason: 'stop', usage: { promptTokens: 0, completionTokens: 0 } };
92
+ }
93
+
94
+ async doStream(
95
+ options: Parameters<LanguageModelV1['doStream']>[0],
96
+ ): Promise<{ stream: AsyncIterable<LanguageModelV1StreamPart>; rawCall: unknown }> {
97
+ const response = await postJsonToApi({
98
+ url: \`\${this.config.baseURL}/chat/completions\`,
99
+ headers: { Authorization: \`Bearer \${this.config.apiKey}\` },
100
+ body: { model: this.modelId, messages: options.prompt, stream: true },
101
+ successfulResponseHandler: createEventSourceResponseHandler(),
102
+ failedResponseHandler: createJsonErrorResponseHandler(),
103
+ abortSignal: options.abortSignal,
104
+ });
105
+ return { stream: response, rawCall: { rawPrompt: options.prompt, rawSettings: {} } };
106
+ }
107
+ }`}]:t.includes("test")||t.includes("verif")?[{filename:"src/__tests__/deepseek-chat-model.test.ts",language:"typescript",content:`import { describe, it, expect, vi, beforeEach } from 'vitest';
108
+ import { createDeepSeek } from '../deepseek-provider';
109
+ import { createTestServer } from '@ai-sdk/provider-utils/test';
110
+
111
+ const server = createTestServer({
112
+ 'https://api.deepseek.com/v1/chat/completions': {},
113
+ });
114
+
115
+ describe('DeepSeekChatModel', () => {
116
+ it('has correct provider name', () => {
117
+ const model = createDeepSeek({ apiKey: 'test' }).chat('deepseek-chat');
118
+ expect(model.provider).toBe('deepseek');
119
+ });
120
+
121
+ it('has correct model id', () => {
122
+ const model = createDeepSeek({ apiKey: 'test' }).chat('deepseek-chat');
123
+ expect(model.modelId).toBe('deepseek-chat');
124
+ });
125
+
126
+ it('sends correct Authorization header', async () => {
127
+ server.urls['https://api.deepseek.com/v1/chat/completions']
128
+ .response = { body: { choices: [{ message: { content: 'hi' } }] } };
129
+ const model = createDeepSeek({ apiKey: 'sk-test' }).chat('deepseek-chat');
130
+ await model.doGenerate({ prompt: [], mode: { type: 'regular' }, ... });
131
+ expect(server.calls[0].requestHeaders['authorization']).toBe('Bearer sk-test');
132
+ });
133
+
134
+ it('streams text-delta chunks', async () => {
135
+ // ... streaming test
136
+ const chunks: unknown[] = [];
137
+ for await (const chunk of stream) chunks.push(chunk);
138
+ expect(chunks[0]).toMatchObject({ type: 'text-delta' });
139
+ });
140
+
141
+ // 4 more tests...
142
+ });
143
+
144
+ // 8 tests total — all passing ✓`}]:t.includes("package")||t.includes("integrat")?[{filename:"package.json",language:"json",content:JSON.stringify({name:"@ai-sdk/deepseek",version:"1.0.0",license:"Apache-2.0",sideEffects:!1,main:"./dist/index.js",module:"./dist/index.mjs",types:"./dist/index.d.ts",exports:{".":{import:"./dist/index.mjs",require:"./dist/index.js",types:"./dist/index.d.ts"}},dependencies:{"@ai-sdk/provider":"workspace:*","@ai-sdk/provider-utils":"workspace:*"},devDependencies:{vitest:"workspace:*",typescript:"workspace:*"}},null,2)}]:[]}findingsForRole(e){let t=e.toLowerCase();return t.includes("scout")||t.includes("codebase")?["47 packages in the monorepo, 12 are provider implementations","All providers implement LanguageModelV1 with doGenerate() + doStream()","OpenAI-compatible APIs share postJsonToApi() + createEventSourceResponseHandler()","Tests use createTestServer() mock with snapshot assertions"]:t.includes("provider")||t.includes("implement")?["DeepSeekProvider factory function implemented","DeepSeekChatModel with doGenerate() and doStream() — 187 lines","Supports deepseek-chat and deepseek-reasoner model IDs","TypeScript compilation: 0 errors"]:t.includes("test")?["8 tests written: provider creation, model config, auth headers, streaming","All 8 passing after streaming type fix","Test duration: 1.24s"]:t.includes("package")||t.includes("integrat")?["package.json with ESM + CJS dual exports configured","tsconfig.json referencing workspace dependencies","Wired into root tsconfig.json references array","pnpm workspace linking verified"]:t.includes("auth")?["3 auth flows analyzed","1 missing token expiry check found","Session fixation risk in OAuth callback"]:t.includes("dep")?["47 dependencies scanned","2 moderate vulnerabilities found","Recommended: upgrade axios to 1.6.8+"]:t.includes("input")?["12 input handlers analyzed","No SQL injection vectors found","2 XSS risks in markdown renderer"]:t.includes("risk")?["4 findings prioritized","High: missing token expiry","Medium: XSS in markdown renderer"]:["Task completed"]}buildSummary(e,t,s){let a=s.map(e=>`- \`${e.filename}\``).join("\n"),n=e.toLowerCase(),r=n.includes("provider")||n.includes("sdk")||n.includes("deepseek"),i=n.includes("security")||n.includes("vulnerabilit");return r?`## ✅ Task Complete
145
+
146
+ **Goal:** ${e}
147
+
148
+ ### Files Created
149
+ ${a}
150
+
151
+ ### Results
152
+ - ✅ TypeScript: 0 errors
153
+ - ✅ Tests: 8/8 passing (1.24s)
154
+ - ✅ Package wired into monorepo
155
+ - ✅ ESM + CJS dual exports configured
156
+
157
+ ### Agent Team (${t.length} agents)
158
+ ${t.map(e=>`- **${e.role}**: ${e.findings[0]??"Completed"}`).join("\n")}
159
+
160
+ ### Key Decisions
161
+ - Followed OpenAI-compatible provider pattern (same base utilities)
162
+ - Streaming uses \`createEventSourceResponseHandler\` from provider-utils
163
+ - Supports \`deepseek-chat\` and \`deepseek-reasoner\` model IDs`:i?`## ✅ Security Audit Complete
164
+
165
+ **Goal:** ${e}
166
+
167
+ ### Findings
168
+ ${a}
169
+
170
+ ### Summary
171
+ - 🔴 **High:** Missing token expiry check in session handler
172
+ - 🟡 **Medium:** XSS risk in markdown renderer (2 locations)
173
+ - 🟡 **Medium:** Outdated axios dependency (CVE-2024-28849)
174
+ - 🟢 **Low:** No SQL injection vectors found
175
+
176
+ ### Agent Team (${t.length} agents)
177
+ ${t.map(e=>`- **${e.role}**: ${e.findings[0]??"Completed"}`).join("\n")}`:`## ✅ Task Complete
178
+
179
+ **Goal:** ${e}
180
+
181
+ ### Files Created
182
+ ${a}
183
+
184
+ ### Agent Team (${t.length} agents)
185
+ ${t.map(e=>`- **${e.role}**: ${e.findings[0]??"Completed"}`).join("\n")}`}}let G="agentnetes-settings",V="true"===t.default.env.NEXT_PUBLIC_STATIC_MODE,W={sandboxProvider:"docker",repoUrl:"https://github.com/expressjs/express",plannerModel:"google/gemini-2.5-flash",workerModel:"google/gemini-2.5-flash"};function H({current:e,apiKeySet:t,onClose:n}){let[r,i]=(0,a.useState)(e),o=e=>i(t=>({...t,...e}));return(0,s.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 backdrop-blur-sm",style:{background:"rgba(0,0,0,0.7)"},onClick:t=>t.target===t.currentTarget&&n(e),children:(0,s.jsxs)("div",{className:"w-full max-w-md rounded-2xl border border-white/[0.12] overflow-hidden shadow-2xl",style:{background:"var(--bg-card)"},children:[(0,s.jsxs)("div",{className:"px-6 pt-5 pb-4 border-b border-white/[0.07] flex items-center justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-white font-bold text-base",children:"Runtime Settings"}),(0,s.jsx)("p",{className:"text-sm text-white/40 font-mono mt-0.5",children:"Saved in your browser"})]}),(0,s.jsx)("button",{onClick:()=>n(e),className:"text-white/30 hover:text-white/60 transition-colors text-xl leading-none",children:"✕"})]}),(0,s.jsxs)("div",{className:"px-6 py-5 space-y-5",children:[(0,s.jsxs)("div",{className:`flex items-start gap-3 rounded-xl px-4 py-3 border ${t?"border-green-500/20 bg-green-500/5":"border-yellow-500/20 bg-yellow-500/5"}`,children:[t?(0,s.jsx)(_,{size:15,className:"text-green-400 mt-0.5 shrink-0"}):(0,s.jsx)(E,{size:15,className:"text-yellow-400 mt-0.5 shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("p",{className:"text-sm font-mono font-medium",style:{color:t?"rgb(134 239 172)":"rgb(253 224 71)"},children:["GOOGLE_API_KEY ",t?"is set":"not set"]}),!t&&(0,s.jsxs)("div",{className:"mt-1.5 space-y-1.5",children:[(0,s.jsx)("p",{className:"text-sm text-white/45",children:"Option 1: export in your shell, then restart:"}),(0,s.jsx)("div",{className:"rounded-lg px-3 py-2 font-mono text-sm text-green-300/80 border border-white/10",style:{background:"var(--bg-subtle)"},children:"export GOOGLE_API_KEY=your_key_here"}),(0,s.jsxs)("p",{className:"text-sm text-white/45",children:["Option 2: add to ",(0,s.jsx)("span",{className:"font-mono text-white/60",children:".env.local"})," and restart:"]}),(0,s.jsx)("div",{className:"rounded-lg px-3 py-2 font-mono text-sm text-green-300/80 border border-white/10",style:{background:"var(--bg-subtle)"},children:"GOOGLE_API_KEY=your_key_here"}),(0,s.jsxs)("a",{href:"https://aistudio.google.com/apikey",target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-0.5 text-purple-400/70 hover:text-purple-400 transition-colors text-sm",children:["Get a free key at aistudio.google.com ",(0,s.jsx)(R.ExternalLink,{size:12})]})]})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{className:"text-xs font-mono text-white/40 uppercase tracking-widest block mb-1.5",children:["Target Repo URL ",(0,s.jsx)("span",{className:"text-red-400/80",children:"*"})]}),(0,s.jsx)("input",{type:"text",value:r.repoUrl,onChange:e=>o({repoUrl:e.target.value}),placeholder:"https://github.com/owner/repo",autoFocus:!0,className:"w-full rounded-lg border border-white/15 px-3 py-2 text-sm font-mono outline-none focus:border-purple-500/50 transition-colors",style:{background:"var(--bg-subtle)",color:"rgb(var(--fg))"}}),(0,s.jsx)("p",{className:"text-sm text-white/35 mt-1",children:"Agents clone this into each sandbox. Use a small repo for faster runs."})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-xs font-mono text-white/40 uppercase tracking-widest block mb-1.5",children:"Sandbox Provider"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,s.jsxs)("button",{onClick:()=>o({sandboxProvider:"docker"}),className:`rounded-lg border px-4 py-3 text-left transition-all ${"docker"===r.sandboxProvider?"border-purple-500/50 bg-purple-500/10":"border-white/10 hover:border-white/20"}`,children:[(0,s.jsx)("div",{className:"text-white text-sm font-mono font-medium",children:"docker"}),(0,s.jsx)("div",{className:"text-white/40 text-xs mt-0.5",children:"Isolated containers · recommended"})]}),(0,s.jsxs)("button",{onClick:()=>o({sandboxProvider:"local"}),className:`rounded-lg border px-4 py-3 text-left transition-all ${"local"===r.sandboxProvider?"border-yellow-500/40 bg-yellow-500/5":"border-white/10 hover:border-white/20"}`,children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5 text-sm font-mono font-medium text-white/70",children:[(0,s.jsx)(E,{size:11,className:"text-yellow-500/70"})," local"]}),(0,s.jsx)("div",{className:"text-white/35 text-xs mt-0.5",children:"No isolation · not recommended"})]})]}),"docker"===r.sandboxProvider&&(0,s.jsxs)("p",{className:"text-sm text-white/35 mt-1.5 font-mono",children:["Make sure Docker is running: ",(0,s.jsx)("span",{className:"text-white/50",children:"docker pull node:20-alpine"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-xs font-mono text-white/40 uppercase tracking-widest block mb-2",children:"Models"}),(0,s.jsxs)("div",{className:"space-y-2.5",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("span",{className:"text-xs text-white/35 w-14 shrink-0",children:"Planner"}),(0,s.jsx)(A,{value:r.plannerModel,onChange:e=>o({plannerModel:e})})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("span",{className:"text-xs text-white/35 w-14 shrink-0",children:"Worker"}),(0,s.jsx)(A,{value:r.workerModel,onChange:e=>o({workerModel:e})})]})]})]})]}),(0,s.jsxs)("div",{className:"px-6 pb-5 flex justify-end gap-3 border-t border-white/[0.05] pt-4",children:[(0,s.jsx)("button",{onClick:()=>n(e),className:"px-4 py-2 rounded-lg text-sm text-white/40 hover:text-white/65 transition-colors",children:"Cancel"}),(0,s.jsx)("button",{onClick:function(){try{localStorage.setItem(G,JSON.stringify(r))}catch{}n(r)},disabled:!r.repoUrl.trim().startsWith("http"),className:"px-6 py-2.5 rounded-xl text-sm font-semibold transition-all disabled:opacity-30 disabled:cursor-not-allowed",style:{background:"linear-gradient(135deg, #a855f7, #ec4899)",color:"#fff"},children:"Save"})]})]})})}e.s(["default",0,function(){let[e,i]=(0,a.useState)([]),[o,l]=(0,a.useState)({}),[d,c]=(0,a.useState)(null),[m,x]=(0,a.useState)([]),[h,u]=(0,a.useState)(!1),[g,f]=(0,a.useState)(!0),[b,k]=(0,a.useState)(!1),[v,w]=(0,a.useState)(V?"simulation":"real"),[y,j]=(0,a.useState)(W),[N,S]=(0,a.useState)(!1),C=(0,a.useRef)(!1);(0,a.useEffect)(()=>{C.current||(C.current=!0,j(function(){try{let e=localStorage.getItem(G);return e?{...W,...JSON.parse(e)}:{...W}}catch{return{...W}}}()),fetch("/api/config").then(e=>e.json()).then(e=>S(!!e.googleApiKeySet)).catch(()=>{}))},[]);let A=(0,a.useCallback)((e,t)=>{if(x(t=>[...t,e]),"task-created"===e.type){let t=e.data.task;l(e=>({...e,[t.id]:t})),0===t.depth&&c(t.id)}"task-updated"===e.type&&e.taskId&&l(t=>{let s=t[e.taskId];return s?{...t,[e.taskId]:{...s,status:e.data.status??s.status,statusText:e.data.statusText??s.statusText}}:t}),"task-completed"===e.type&&e.taskId&&l(t=>{let s=t[e.taskId];return s?{...t,[e.taskId]:{...s,status:"completed",statusText:"Done",completedAt:Date.now(),artifacts:e.data.artifacts??s.artifacts,findings:e.data.findings??s.findings}}:t}),"artifact"===e.type&&e.taskId&&l(t=>{let s=t[e.taskId];if(!s)return t;let a=e.data.artifact;return s.artifacts.some(e=>e.filename===a.filename)?t:{...t,[e.taskId]:{...s,artifacts:[...s.artifacts,a]}}}),"done"===e.type&&(t.content=String(e.data.content??"")),"error"===e.type&&(t.content=`Error: ${String(e.data.message??e.data)}`)},[]),_=(0,a.useCallback)(async e=>{i(t=>[...t,{role:"user",content:e}]),l({}),c(null),x([]),u(!0);let t={content:""};try{if("simulation"===v){let s=new F({});s.onEvent(e=>A(e,t)),await s.run(e)}else{let s=await fetch("/api/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:e,sandboxProvider:y.sandboxProvider,repoUrl:y.repoUrl,plannerModel:y.plannerModel,workerModel:y.workerModel})});if(!s.body)throw Error("No response body");let a=s.body.getReader(),n=new TextDecoder;for(;;){let{done:e,value:s}=await a.read();if(e)break;for(let e of n.decode(s,{stream:!0}).split("\n"))if(e.startsWith("data: "))try{A(JSON.parse(e.slice(6)),t)}catch{}}}t.content&&i(e=>[...e,{role:"assistant",content:t.content}])}catch(e){i(t=>[...t,{role:"assistant",content:`Error: ${String(e)}`}])}finally{u(!1)}},[v,y,A]);return(0,s.jsxs)("div",{className:"h-screen overflow-hidden flex flex-col",style:{background:"var(--bg-base)",color:"rgb(var(--fg))"},children:[b&&(0,s.jsx)(H,{current:y,apiKeySet:N,onClose:e=>{j(e),k(!1)}}),(0,s.jsxs)("header",{className:"flex items-center justify-between px-5 py-2.5 border-b border-white/[0.07] shrink-0",style:{background:"var(--bg-base)"},children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsxs)(n.default,{href:"/",className:"flex items-center gap-1.5 text-white/50 hover:text-white/80 transition-colors text-sm font-mono",children:[(0,s.jsx)($,{size:15})," Home"]}),(0,s.jsx)("span",{className:"text-white/20",children:"|"}),(0,s.jsx)(r.default,{src:`${t.default.env.NEXT_PUBLIC_BASE_PATH??""}/logo.png`,alt:"Agentnetes",width:28,height:28,className:"rounded-lg"}),(0,s.jsx)("span",{className:"text-lg font-extrabold tracking-tight",children:"Agentnetes"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1 rounded-full p-1 border border-white/[0.10]",style:{background:"var(--bg-subtle)"},children:[V?(0,s.jsx)("span",{className:"px-4 py-1.5 rounded-full text-sm font-mono text-white/20 cursor-not-allowed",title:"Real mode requires agentnetes serve or self-hosting",children:"Real"}):(0,s.jsx)("button",{onClick:()=>w("real"),className:`px-4 py-1.5 rounded-full text-sm font-mono font-medium transition-all ${"real"===v?"text-white":"text-white/35 hover:text-white/55"}`,style:"real"===v?{background:"linear-gradient(135deg, #a855f7, #ec4899)",color:"#fff"}:{},children:"Real"}),(0,s.jsx)("button",{onClick:()=>w("simulation"),className:`px-4 py-1.5 rounded-full text-sm font-mono font-medium transition-all ${"simulation"===v?"bg-white/10 text-white":"text-white/35 hover:text-white/55"}`,children:"Simulation"})]}),!V&&"real"===v&&(0,s.jsxs)("button",{onClick:()=>k(!0),className:"flex items-center gap-1.5 text-sm font-mono border border-white/10 rounded-xl px-3 py-1.5 transition-all",style:{background:"var(--bg-subtle)"},title:"Runtime settings",children:[(0,s.jsx)(P.Settings,{size:14,className:"text-white/50"}),(0,s.jsxs)("span",{className:"text-white/45",children:[y.sandboxProvider," · ",y.repoUrl.replace("https://github.com/","")]}),!N&&(0,s.jsx)("span",{className:"text-yellow-400/70 text-xs font-mono",children:"· no key"})]}),(0,s.jsx)("button",{onClick:()=>f(e=>!e),className:"text-white/50 hover:text-white/75 transition-colors p-1",title:g?"Hide agent panel":"Show agent panel",children:g?(0,s.jsx)(M,{size:19}):(0,s.jsx)(T,{size:19})})]})]}),V?(0,s.jsxs)("div",{className:"px-4 py-2 border-b border-white/[0.07] flex items-center justify-between shrink-0",style:{background:"var(--bg-subtle)"},children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs font-mono text-green-400/80 border border-green-500/20 bg-green-500/5 rounded px-2.5 py-1",children:"simulation only"}),(0,s.jsx)("span",{className:"text-sm text-white/45",children:"This is a preview. Real agents require a server."})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3 text-sm font-mono",children:[(0,s.jsx)("span",{className:"text-white/40",children:"Run real agents:"}),(0,s.jsx)("code",{className:"text-purple-400/80 bg-purple-500/10 border border-purple-500/20 rounded px-2 py-0.5",children:"npx agentnetes serve"}),(0,s.jsx)("a",{href:"https://github.com/Shashikant86/agentnetes#running-locally",target:"_blank",rel:"noreferrer",className:"text-white/30 hover:text-white/60 transition-colors",children:"self-host"})]})]}):"simulation"===v&&(0,s.jsxs)("div",{className:"px-4 py-2 border-b border-white/[0.07] flex items-center gap-2 shrink-0",style:{background:"var(--bg-subtle)"},children:[(0,s.jsx)("span",{className:"text-xs font-mono text-green-400/80 border border-green-500/20 bg-green-500/5 rounded px-2.5 py-1",children:"simulation"}),(0,s.jsx)("span",{className:"text-sm text-white/45",children:"Pre-scripted scenarios · no API key or Docker required · switch to Real for live execution"})]}),(0,s.jsxs)("div",{className:"flex-1 flex overflow-hidden",children:[(0,s.jsx)("div",{className:`flex flex-col border-r border-white/[0.07] overflow-hidden transition-all duration-300 ${g?"w-1/2":"w-full"}`,children:(0,s.jsx)(p,{messages:e,onSubmit:_,isRunning:h,mode:v})}),g&&(0,s.jsxs)("div",{className:"w-1/2 flex flex-col overflow-hidden",children:[(0,s.jsxs)("div",{className:"px-4 py-2.5 border-b border-white/[0.07] flex items-center justify-between shrink-0",children:[(0,s.jsx)("span",{className:"text-sm text-white/70 font-mono uppercase tracking-wider",children:"Agent Activity"}),Object.keys(o).length>0&&(0,s.jsxs)("span",{className:"text-sm text-white/60 font-mono",children:[Object.values(o).filter(e=>"completed"===e.status).length,"/",Object.keys(o).length," done"]})]}),(0,s.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,s.jsx)(I,{tasks:o,rootId:d,events:m})})]})]})]})}],38999)}]);