@robzilla1738/agentswarm 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent.js +4 -14
- package/dist/cli.js +19 -9
- package/dist/config.js +17 -0
- package/dist/crawltools.js +3 -22
- package/dist/executor.js +37 -21
- package/dist/hub.js +1 -3
- package/dist/journal.js +39 -5
- package/dist/memory.js +12 -7
- package/dist/report.js +2 -1
- package/dist/state.js +41 -19
- package/dist/tools.js +14 -2
- package/dist/util.js +32 -3
- package/dist/webtools.js +41 -18
- package/package.json +1 -1
- package/ui/out/404/index.html +1 -1
- package/ui/out/404.html +1 -1
- package/ui/out/_next/static/chunks/677-a62d486d6734bcf3.js +1 -0
- package/ui/out/_next/static/chunks/app/run/page-c29f95c51af08c60.js +1 -0
- package/ui/out/index.html +1 -1
- package/ui/out/index.txt +2 -2
- package/ui/out/run/index.html +1 -1
- package/ui/out/run/index.txt +2 -2
- package/ui/out/settings/index.html +1 -1
- package/ui/out/settings/index.txt +2 -2
- package/ui/out/_next/static/chunks/677-721ce1c8b7a6a317.js +0 -1
- package/ui/out/_next/static/chunks/app/run/page-3674e103981703a2.js +0 -1
- /package/ui/out/_next/static/{7_pihFubDGD40BCy2ynlr → JFkx5KtNi0DYyqm_THzbY}/_buildManifest.js +0 -0
- /package/ui/out/_next/static/{7_pihFubDGD40BCy2ynlr → JFkx5KtNi0DYyqm_THzbY}/_ssgManifest.js +0 -0
package/ui/out/run/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><!--
|
|
1
|
+
<!DOCTYPE html><!--JFkx5KtNi0DYyqm_THzbY--><html lang="en" class="__variable_73ee6c __variable_3c557b"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/4c9affa5bc8f420e-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/bb3ef058b751a6ad-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/d95c2ba395730031.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-38639c05c96dbeca.js"/><script src="/_next/static/chunks/4bd1b696-c023c6e3521b1417.js" async=""></script><script src="/_next/static/chunks/255-2aa030c9ba2867e3.js" async=""></script><script src="/_next/static/chunks/main-app-889ed884f8bc78e3.js" async=""></script><script src="/_next/static/chunks/532-35122e93f37719b9.js" async=""></script><script src="/_next/static/chunks/677-a62d486d6734bcf3.js" async=""></script><script src="/_next/static/chunks/app/run/page-c29f95c51af08c60.js" async=""></script><meta name="next-size-adjust" content=""/><meta name="theme-color" content="#050505"/><title>agentswarm</title><meta name="description" content="A local agent swarm for long-horizon, autonomous work."/><link rel="icon" href="/icon.png?bdc9175d46e1d0aa" type="image/png" sizes="256x256"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><script>try{var t=localStorage.getItem("theme");if(t==="light"||t==="dark")document.documentElement.dataset.theme=t}catch(e){}</script><!--$!--><template data-dgst="BAILOUT_TO_CLIENT_SIDE_RENDERING"></template><div class="min-h-screen grid place-items-center text-ink-faint"><span class="inline-block rounded-full animate-spin" style="width:14px;height:14px;border:1.5px solid rgb(var(--hi) / 0.18);border-top-color:var(--ink-hi)"></span></div><!--/$--><!--$--><!--/$--><script src="/_next/static/chunks/webpack-38639c05c96dbeca.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[9766,[],\"\"]\n3:I[8924,[],\"\"]\n4:I[1959,[],\"ClientPageRoot\"]\n5:I[5182,[\"532\",\"static/chunks/532-35122e93f37719b9.js\",\"677\",\"static/chunks/677-a62d486d6734bcf3.js\",\"64\",\"static/chunks/app/run/page-c29f95c51af08c60.js\"],\"default\"]\n8:I[4431,[],\"OutletBoundary\"]\na:I[5278,[],\"AsyncMetadataOutlet\"]\nc:I[4431,[],\"ViewportBoundary\"]\ne:I[4431,[],\"MetadataBoundary\"]\nf:\"$Sreact.suspense\"\n11:I[7150,[],\"\"]\n:HL[\"/_next/static/media/4c9affa5bc8f420e-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/media/bb3ef058b751a6ad-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/css/d95c2ba395730031.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"JFkx5KtNi0DYyqm_THzbY\",\"p\":\"\",\"c\":[\"\",\"run\",\"\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"run\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/d95c2ba395730031.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"__variable_73ee6c __variable_3c557b\",\"children\":[\"$\",\"body\",null,{\"children\":[[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"try{var t=localStorage.getItem(\\\"theme\\\");if(t===\\\"light\\\"||t===\\\"dark\\\")document.documentElement.dataset.theme=t}catch(e){}\"}}],[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}]}]]}],{\"children\":[\"run\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"$L4\",null,{\"Component\":\"$5\",\"searchParams\":{},\"params\":{},\"promises\":[\"$@6\",\"$@7\"]}],null,[\"$\",\"$L8\",null,{\"children\":[\"$L9\",[\"$\",\"$La\",null,{\"promise\":\"$@b\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[[\"$\",\"$Lc\",null,{\"children\":\"$Ld\"}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]],[\"$\",\"$Le\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$f\",null,{\"fallback\":null,\"children\":\"$L10\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$11\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"6:{}\n7:\"$0:f:0:1:2:children:2:children:1:props:children:0:props:params\"\n"])</script><script>self.__next_f.push([1,"d:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"2\",{\"name\":\"theme-color\",\"content\":\"#050505\"}]]\n9:null\n"])</script><script>self.__next_f.push([1,"12:I[622,[],\"IconMark\"]\nb:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"agentswarm\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"A local agent swarm for long-horizon, autonomous work.\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/icon.png?bdc9175d46e1d0aa\",\"type\":\"image/png\",\"sizes\":\"256x256\"}],[\"$\",\"$L12\",\"3\",{}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"10:\"$b:metadata\"\n"])</script></body></html>
|
package/ui/out/run/index.txt
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
2:I[9766,[],""]
|
|
3
3
|
3:I[8924,[],""]
|
|
4
4
|
4:I[1959,[],"ClientPageRoot"]
|
|
5
|
-
5:I[5182,["532","static/chunks/532-35122e93f37719b9.js","677","static/chunks/677-
|
|
5
|
+
5:I[5182,["532","static/chunks/532-35122e93f37719b9.js","677","static/chunks/677-a62d486d6734bcf3.js","64","static/chunks/app/run/page-c29f95c51af08c60.js"],"default"]
|
|
6
6
|
8:I[4431,[],"OutletBoundary"]
|
|
7
7
|
a:I[5278,[],"AsyncMetadataOutlet"]
|
|
8
8
|
c:I[4431,[],"ViewportBoundary"]
|
|
@@ -12,7 +12,7 @@ f:"$Sreact.suspense"
|
|
|
12
12
|
:HL["/_next/static/media/4c9affa5bc8f420e-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
13
13
|
:HL["/_next/static/media/bb3ef058b751a6ad-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
14
14
|
:HL["/_next/static/css/d95c2ba395730031.css","style"]
|
|
15
|
-
0:{"P":null,"b":"
|
|
15
|
+
0:{"P":null,"b":"JFkx5KtNi0DYyqm_THzbY","p":"","c":["","run",""],"i":false,"f":[[["",{"children":["run",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/d95c2ba395730031.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","className":"__variable_73ee6c __variable_3c557b","children":["$","body",null,{"children":[["$","script",null,{"dangerouslySetInnerHTML":{"__html":"try{var t=localStorage.getItem(\"theme\");if(t===\"light\"||t===\"dark\")document.documentElement.dataset.theme=t}catch(e){}"}}],["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]]}]}]]}],{"children":["run",["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[["$","$L4",null,{"Component":"$5","searchParams":{},"params":{},"promises":["$@6","$@7"]}],null,["$","$L8",null,{"children":["$L9",["$","$La",null,{"promise":"$@b"}]]}]]}],{},null,false]},null,false]},null,false],["$","$1","h",{"children":[null,[["$","$Lc",null,{"children":"$Ld"}],["$","meta",null,{"name":"next-size-adjust","content":""}]],["$","$Le",null,{"children":["$","div",null,{"hidden":true,"children":["$","$f",null,{"fallback":null,"children":"$L10"}]}]}]]}],false]],"m":"$undefined","G":["$11",[]],"s":false,"S":true}
|
|
16
16
|
6:{}
|
|
17
17
|
7:"$0:f:0:1:2:children:2:children:1:props:children:0:props:params"
|
|
18
18
|
d:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","2",{"name":"theme-color","content":"#050505"}]]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><!--
|
|
1
|
+
<!DOCTYPE html><!--JFkx5KtNi0DYyqm_THzbY--><html lang="en" class="__variable_73ee6c __variable_3c557b"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/4c9affa5bc8f420e-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/bb3ef058b751a6ad-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" as="image" href="/swarm-mark.png"/><link rel="stylesheet" href="/_next/static/css/d95c2ba395730031.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-38639c05c96dbeca.js"/><script src="/_next/static/chunks/4bd1b696-c023c6e3521b1417.js" async=""></script><script src="/_next/static/chunks/255-2aa030c9ba2867e3.js" async=""></script><script src="/_next/static/chunks/main-app-889ed884f8bc78e3.js" async=""></script><script src="/_next/static/chunks/532-35122e93f37719b9.js" async=""></script><script src="/_next/static/chunks/677-a62d486d6734bcf3.js" async=""></script><script src="/_next/static/chunks/app/settings/page-41a5d8ba43ecfd4a.js" async=""></script><meta name="next-size-adjust" content=""/><meta name="theme-color" content="#050505"/><title>agentswarm</title><meta name="description" content="A local agent swarm for long-horizon, autonomous work."/><link rel="icon" href="/icon.png?bdc9175d46e1d0aa" type="image/png" sizes="256x256"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><script>try{var t=localStorage.getItem("theme");if(t==="light"||t==="dark")document.documentElement.dataset.theme=t}catch(e){}</script><div class="min-h-screen"><header class="sticky top-0 z-40 flex items-center justify-between px-5 sm:px-8 h-14" style="background:color-mix(in oklab, var(--color-bg) 82%, transparent);backdrop-filter:blur(14px)"><a class="flex items-center gap-2.5" href="/"><img src="/swarm-mark.png" alt="" aria-hidden="true" class="shrink-0 select-none" style="height:28px;width:auto;filter:var(--logo-filter)" draggable="false"/><span class="font-display" style="font-size:15px">agentswarm</span></a><div class="flex items-center gap-3"><button class="btn btn-ghost btn-sm" title="Toggle light / dark" aria-label="Toggle color theme">◐</button><a class="btn btn-ghost btn-sm" href="/settings/">Settings</a></div></header><div class="max-w-2xl mx-auto p-16 flex justify-center text-ink-faint"><span class="inline-block rounded-full animate-spin" style="width:14px;height:14px;border:1.5px solid rgb(var(--hi) / 0.18);border-top-color:var(--ink-hi)"></span></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-38639c05c96dbeca.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[9766,[],\"\"]\n3:I[8924,[],\"\"]\n4:I[1959,[],\"ClientPageRoot\"]\n5:I[2802,[\"532\",\"static/chunks/532-35122e93f37719b9.js\",\"677\",\"static/chunks/677-a62d486d6734bcf3.js\",\"662\",\"static/chunks/app/settings/page-41a5d8ba43ecfd4a.js\"],\"default\"]\n8:I[4431,[],\"OutletBoundary\"]\na:I[5278,[],\"AsyncMetadataOutlet\"]\nc:I[4431,[],\"ViewportBoundary\"]\ne:I[4431,[],\"MetadataBoundary\"]\nf:\"$Sreact.suspense\"\n11:I[7150,[],\"\"]\n:HL[\"/_next/static/media/4c9affa5bc8f420e-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/media/bb3ef058b751a6ad-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/css/d95c2ba395730031.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"JFkx5KtNi0DYyqm_THzbY\",\"p\":\"\",\"c\":[\"\",\"settings\",\"\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"settings\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/d95c2ba395730031.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"__variable_73ee6c __variable_3c557b\",\"children\":[\"$\",\"body\",null,{\"children\":[[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"try{var t=localStorage.getItem(\\\"theme\\\");if(t===\\\"light\\\"||t===\\\"dark\\\")document.documentElement.dataset.theme=t}catch(e){}\"}}],[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}]}]]}],{\"children\":[\"settings\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"$L4\",null,{\"Component\":\"$5\",\"searchParams\":{},\"params\":{},\"promises\":[\"$@6\",\"$@7\"]}],null,[\"$\",\"$L8\",null,{\"children\":[\"$L9\",[\"$\",\"$La\",null,{\"promise\":\"$@b\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[[\"$\",\"$Lc\",null,{\"children\":\"$Ld\"}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]],[\"$\",\"$Le\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$f\",null,{\"fallback\":null,\"children\":\"$L10\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$11\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"6:{}\n7:\"$0:f:0:1:2:children:2:children:1:props:children:0:props:params\"\n"])</script><script>self.__next_f.push([1,"d:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"2\",{\"name\":\"theme-color\",\"content\":\"#050505\"}]]\n9:null\n"])</script><script>self.__next_f.push([1,"12:I[622,[],\"IconMark\"]\nb:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"agentswarm\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"A local agent swarm for long-horizon, autonomous work.\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/icon.png?bdc9175d46e1d0aa\",\"type\":\"image/png\",\"sizes\":\"256x256\"}],[\"$\",\"$L12\",\"3\",{}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"10:\"$b:metadata\"\n"])</script></body></html>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
2:I[9766,[],""]
|
|
3
3
|
3:I[8924,[],""]
|
|
4
4
|
4:I[1959,[],"ClientPageRoot"]
|
|
5
|
-
5:I[2802,["532","static/chunks/532-35122e93f37719b9.js","677","static/chunks/677-
|
|
5
|
+
5:I[2802,["532","static/chunks/532-35122e93f37719b9.js","677","static/chunks/677-a62d486d6734bcf3.js","662","static/chunks/app/settings/page-41a5d8ba43ecfd4a.js"],"default"]
|
|
6
6
|
8:I[4431,[],"OutletBoundary"]
|
|
7
7
|
a:I[5278,[],"AsyncMetadataOutlet"]
|
|
8
8
|
c:I[4431,[],"ViewportBoundary"]
|
|
@@ -12,7 +12,7 @@ f:"$Sreact.suspense"
|
|
|
12
12
|
:HL["/_next/static/media/4c9affa5bc8f420e-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
13
13
|
:HL["/_next/static/media/bb3ef058b751a6ad-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
14
14
|
:HL["/_next/static/css/d95c2ba395730031.css","style"]
|
|
15
|
-
0:{"P":null,"b":"
|
|
15
|
+
0:{"P":null,"b":"JFkx5KtNi0DYyqm_THzbY","p":"","c":["","settings",""],"i":false,"f":[[["",{"children":["settings",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/d95c2ba395730031.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","className":"__variable_73ee6c __variable_3c557b","children":["$","body",null,{"children":[["$","script",null,{"dangerouslySetInnerHTML":{"__html":"try{var t=localStorage.getItem(\"theme\");if(t===\"light\"||t===\"dark\")document.documentElement.dataset.theme=t}catch(e){}"}}],["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]]}]}]]}],{"children":["settings",["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[["$","$L4",null,{"Component":"$5","searchParams":{},"params":{},"promises":["$@6","$@7"]}],null,["$","$L8",null,{"children":["$L9",["$","$La",null,{"promise":"$@b"}]]}]]}],{},null,false]},null,false]},null,false],["$","$1","h",{"children":[null,[["$","$Lc",null,{"children":"$Ld"}],["$","meta",null,{"name":"next-size-adjust","content":""}]],["$","$Le",null,{"children":["$","div",null,{"hidden":true,"children":["$","$f",null,{"fallback":null,"children":"$L10"}]}]}]]}],false]],"m":"$undefined","G":["$11",[]],"s":false,"S":true}
|
|
16
16
|
6:{}
|
|
17
17
|
7:"$0:f:0:1:2:children:2:children:1:props:children:0:props:params"
|
|
18
18
|
d:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","2",{"name":"theme-color","content":"#050505"}]]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[677],{830:(t,e,n)=>{n.d(e,{V:()=>u});var a=n(5155),s=n(2619),r=n.n(s),i=n(2115),o=n(7621),l=n(6420);function c(){let[,t]=(0,i.useState)(0);return(0,a.jsx)("button",{className:"btn btn-ghost btn-sm",title:"Toggle light / dark","aria-label":"Toggle color theme",onClick:()=>{let e="light"===(()=>{if("undefined"==typeof document)return"dark";let t=document.documentElement.dataset.theme;return"light"===t||"dark"===t?t:window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark"})()?"dark":"light";document.documentElement.dataset.theme=e;try{localStorage.setItem("theme",e)}catch(t){}t(t=>t+1)},children:"◐"})}function u(t){let{right:e,hideLogo:n}=t,[s,u]=(0,i.useState)(null),[d,h]=(0,i.useState)(!0);return(0,i.useEffect)(()=>{let t=!0,e=()=>o.F.health().then(e=>t&&(u(e),h(!0))).catch(()=>t&&h(!1));e();let n=setInterval(e,5e3);return()=>{t=!1,clearInterval(n)}},[]),(0,a.jsxs)("header",{className:"sticky top-0 z-40 flex items-center justify-between px-5 sm:px-8 h-14",style:{background:"color-mix(in oklab, var(--color-bg) 82%, transparent)",backdropFilter:"blur(14px)"},children:[n?(0,a.jsx)("span",{}):(0,a.jsx)(l.gu,{}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[!d&&(0,a.jsx)("span",{className:"chip chip-solid",children:"hub offline"}),d&&s&&!s.apiKey&&(0,a.jsx)(r(),{href:"/settings",className:"chip text-ink",style:{borderColor:"rgb(var(--hi) / 0.4)"},children:"no api key"}),e,(0,a.jsx)(c,{}),(0,a.jsx)(r(),{href:"/settings",className:"btn btn-ghost btn-sm",children:"Settings"})]})]})}},4643:(t,e,n)=>{function a(t,e){if(!t.startsWith("/")&&!/^[A-Za-z]:\\/.test(t))return t;let n=t.replace(/^.*?\/runs\/run_[a-z0-9]+\/workspace\/?/,"");if(n!==t)return n||"workspace/";if(e&&t.startsWith(e+"/"))return t.slice(e.length+1);if(e&&t===e)return".";let a=t.split("/").filter(Boolean);return a.length<=2?t:"…/"+a.slice(-2).join("/")}function s(t,e){let n=t.replace(/\s+/g," ").trim(),s=n.match(/ENOENT[^']*'([^']*)'/);if(s)return"file not found: ".concat(a(s[1],e));if(/ENOENT/.test(n))return"file not found";if(/EACCES|EPERM/.test(n))return"permission denied";if(/ETIMEDOUT|timed? ?out/i.test(n))return"timed out";if(/EEXIST/.test(n))return"already exists";if(/EISDIR/.test(n))return"path is a directory";if(/ENOTDIR/.test(n))return"path is not a directory";let r=n.match(/exit(?:ed)?(?: with)? code (\d+)/i);if(r)return"exited with code ".concat(r[1]);let i=n.replace(/^(ERROR|Error)[:\s]+/g,"").trim();return i.length>120?i.slice(0,117)+"…":i||"failed"}n.d(e,{AA:()=>s,XJ:()=>i,_1:()=>a});let r=new Set(["read_file","list_dir","write_file","replace_in_file","save_artifact"]);function i(t){let e=[];for(let s of t){var n,a;let t=e[e.length-1];if(!("result"===s.kind&&s.ok&&(null==t?void 0:t.kind)==="tool"&&t.name===s.name&&t.taskId===s.taskId&&r.has(null!=(n=s.name)?n:""))){if("tool"===s.kind&&(null==t?void 0:t.kind)==="tool"&&t.name===s.name&&t.taskId===s.taskId){e[e.length-1]={...s,id:t.id,count:(null!=(a=t.count)?a:1)+1};continue}e.push(s)}}return e}},6168:(t,e,n)=>{n.d(e,{UK:()=>m,cB:()=>g,Xt:()=>p,Iq:()=>f});var a=n(2115),s=n(7621),r=n(4643);let i={"deepseek-v4-flash":{inMiss:.14,inHit:.0028,out:.28},"deepseek-v4-pro":{inMiss:.435,inHit:.003625,out:.87},"deepseek-chat":{inMiss:.14,inHit:.0028,out:.28},"deepseek-reasoner":{inMiss:.14,inHit:.0028,out:.28}};function o(){return{meta:null,status:"planning",statusReason:"",tasks:new Map,taskOrder:[],agents:new Map,notes:[],conductorLog:[],operatorNotes:[],activity:[],usage:{promptTokens:0,completionTokens:0,cacheHitTokens:0,cacheMissTokens:0},cost:0,budgetSeries:[],planUpdatedAt:0,planExcerpt:"",lastSeq:0,lastT:0}}function l(t,e){var n,a,s;let r=t.usage.promptTokens+t.usage.completionTokens,i=null!=(s=null==(a=t.meta)||null==(n=a.options)?void 0:n.maxTokens)?s:0,o=i>0?Math.max(2e3,.005*i):2e3,l=t.budgetSeries[t.budgetSeries.length-1];if(l&&r-l.tokens<o){l.t=e,l.tokens=r,l.cost=t.cost;return}t.budgetSeries.push({t:e,tokens:r,cost:t.cost}),t.budgetSeries.length>600&&(t.budgetSeries=t.budgetSeries.filter((e,n)=>n%2==0||n===t.budgetSeries.length-1))}function c(t,e){return t.length<=e?t:t.slice(t.length-e)}function u(t,e){t.activity.push(e),t.activity.length>260&&t.activity.splice(0,t.activity.length-260)}function d(t,e,n){var a,s,i,o,l,c,u,d;if(!e||"object"!=typeof e)return"";switch(t){case"shell":return String(null!=(a=e.command)?a:"");case"read_file":case"write_file":case"replace_in_file":case"save_artifact":return(0,r._1)(String(null!=(i=null!=(s=e.path)?s:e.name)?i:""),n);case"web_search":return String(null!=(o=e.query)?o:"");case"fetch_url":return String(null!=(l=e.url)?l:"");case"list_dir":return(0,r._1)(String(null!=(c=e.path)?c:"."),n);case"note":return String(null!=(u=e.text)?u:"");case"spawn_tasks":{let t=Array.isArray(e.tasks)?e.tasks:[];return"".concat(t.length," task(s): ")+t.map(t=>t.title).filter(Boolean).slice(0,4).join(", ")}case"report":return String(null!=(d=e.status)?d:"");default:return Object.values(e).map(String).join(" ").slice(0,120)}}let h=["done","failed","cancelled"];function p(t){let e=(0,a.useRef)(o()),[n,p]=(0,a.useState)(null),[f,g]=(0,a.useState)(!1),[m,k]=(0,a.useState)(null),x=(0,a.useRef)(!1);return(0,a.useEffect)(()=>{if(!t)return;e.current=o(),p(null),k(null);let n=!1,a=null,f=null,m=()=>{x.current&&(x.current=!1,p(function(t){let e=t.taskOrder.map(e=>t.tasks.get(e)).filter(Boolean),n=[...t.agents.values()];return{meta:t.meta,status:t.status,statusReason:t.statusReason,tasks:e,agents:n,activeAgents:n.filter(t=>"running"===t.status),notes:t.notes,conductorLog:t.conductorLog,operatorNotes:t.operatorNotes,activity:t.activity,usage:t.usage,cost:t.cost,budgetSeries:t.budgetSeries,planUpdatedAt:t.planUpdatedAt,finalSummary:t.finalSummary,finalReportPath:t.finalReportPath,lastSeq:t.lastSeq,updatedAt:t.lastT}}(e.current)))},y=setInterval(m,120),v=t=>{!function(t,e){var n,a,s,o,h,p,f,g,m,k,x,y,v,b,S,w,T;if(!(e.seq<=t.lastSeq)||"run.created"===e.type){if(t.lastSeq=Math.max(t.lastSeq,e.seq),"number"==typeof e.t&&(t.lastT=Math.max(t.lastT,e.t)),"string"==typeof e.teamId){if("usage"===e.type){let n=e.usage;t.usage={promptTokens:t.usage.promptTokens+n.promptTokens,completionTokens:t.usage.completionTokens+n.completionTokens,cacheHitTokens:t.usage.cacheHitTokens+n.cacheHitTokens,cacheMissTokens:t.usage.cacheMissTokens+n.cacheMissTokens},"number"==typeof e.cost&&Number.isFinite(e.cost)&&(t.cost=e.cost),l(t,e.t)}else"tool.call"===e.type?u(t,{id:"t".concat(e.seq),t:e.t,agentId:e.agentId,taskId:e.teamId,kind:"tool",name:e.name,text:d(e.name,e.args,null==(n=t.meta)?void 0:n.cwd)}):"note.added"===e.type&&(t.notes.push({t:e.t,taskId:e.taskId,agentId:e.agentId,key:e.key,kind:e.kind,text:e.text,url:"string"==typeof e.url?e.url:void 0}),t.notes.length>500&&t.notes.splice(0,t.notes.length-500));return}switch(e.type){case"run.created":t.meta=e.meta;break;case"run.status":t.status=e.status,e.reason&&(t.statusReason=String(e.reason));break;case"run.resumed":for(let n of Array.isArray(e.resets)?e.resets:[]){let e=t.tasks.get(n);e&&(e.status="pending",e.startedAt=void 0,e.endedAt=void 0,t.tasks.set(n,{...e}))}for(let n of t.agents.values())"running"===n.status&&(n.status="done",n.endedAt=e.t,t.agents.set(n.id,{...n}));t.statusReason="";break;case"task.created":{let n=e.task;t.tasks.has(n.id)||t.taskOrder.push(n.id),t.tasks.set(n.id,{...n}),u(t,{id:"c".concat(e.seq),t:e.t,agentId:"",taskId:n.id,kind:"spawn",text:"".concat(n.id," created \xb7 ").concat(n.title)});break}case"task.status":{let n=t.tasks.get(e.taskId);n&&(n.status=e.status,"number"==typeof e.attempt&&(n.attempt=e.attempt),"running"!==e.status||n.startedAt||(n.startedAt=e.t),["done","failed","blocked"].includes(String(e.status))&&(n.endedAt=e.t),e.reason&&(n.error=String(e.reason)),t.tasks.set(n.id,{...n}));break}case"task.report":{let n=t.tasks.get(e.taskId);n&&(n.report=e.report,n.reportStatus=e.status,n.artifacts=null!=(a=e.artifacts)?a:n.artifacts,Array.isArray(e.keyFacts)&&(n.keyFacts=e.keyFacts),Array.isArray(e.openQuestions)&&(n.openQuestions=e.openQuestions),Array.isArray(e.filesTouched)&&(n.filesTouched=e.filesTouched),Array.isArray(e.sources)&&(n.sources=e.sources),t.tasks.set(n.id,{...n}),u(t,{id:"r".concat(e.seq),t:e.t,agentId:"",taskId:n.id,kind:"report",text:"".concat(n.id," reported (").concat(e.status,")")}));break}case"verify.result":{let n=t.tasks.get(e.taskId);n&&(n.feedback=e.feedback,t.tasks.set(n.id,{...n}));break}case"agent.spawned":t.agents.set(e.agentId,{id:e.agentId,taskId:e.taskId,role:null!=(s=e.role)?s:"agent",model:null!=(o=e.model)?o:"",purpose:null!=(h=e.purpose)?h:"",status:"running",steps:0,startedAt:e.t,lastText:"",lastThink:""});break;case"agent.delta":{let n=t.agents.get(e.agentId);n&&("text"===e.channel?n.lastText=c(n.lastText+e.text,4e3):n.lastThink=c(n.lastThink+e.text,4e3),t.agents.set(n.id,{...n}));break}case"agent.done":{let n=t.agents.get(e.agentId);n&&(n.status="done",n.endedAt=e.t,n.steps=null!=(p=e.steps)?p:n.steps,t.agents.set(n.id,{...n}));break}case"tool.call":{let n=t.agents.get(e.agentId);n&&(n.lastTool=e.name,n.steps++,t.agents.set(n.id,{...n})),u(t,{id:"t".concat(e.seq),t:e.t,agentId:e.agentId,taskId:e.taskId,kind:"tool",name:e.name,text:d(e.name,e.args,null==(f=t.meta)?void 0:f.cwd)});break}case"tool.result":u(t,{id:"x".concat(e.seq),t:e.t,agentId:e.agentId,taskId:e.taskId,kind:"result",name:e.name,ok:e.ok,text:e.ok?String(null!=(m=e.summary)?m:""):(0,r.AA)(String(null!=(k=e.summary)?k:""),null==(g=t.meta)?void 0:g.cwd)});break;case"task.checkpoint":{let n=t.tasks.get(e.taskId);n&&(n.lastCheckpoint=e.summary,t.tasks.set(n.id,{...n}));break}case"team.created":{let n=t.tasks.get(e.taskId);n&&(n.team=!0,t.tasks.set(n.id,{...n})),u(t,{id:"tm".concat(e.seq),t:e.t,agentId:"",taskId:null!=(x=e.taskId)?x:"",kind:"spawn",text:"".concat(e.taskId," runs as a sub-swarm (").concat(null!=(y=e.maxWorkers)?y:"?"," workers)")});break}case"note.added":{let n={t:e.t,taskId:e.taskId,agentId:e.agentId,key:e.key,kind:e.kind,text:e.text,url:"string"==typeof e.url?e.url:void 0};t.notes.push(n),t.notes.length>500&&t.notes.splice(0,t.notes.length-500),u(t,{id:"n".concat(e.seq),t:e.t,agentId:null!=(v=e.agentId)?v:"",taskId:null!=(b=e.taskId)?b:"",kind:"note",text:(n.key?"[".concat(n.key,"] "):"")+n.text});break}case"conductor.say":t.conductorLog.push({t:e.t,text:e.text}),t.conductorLog.length>200&&t.conductorLog.splice(0,t.conductorLog.length-200);break;case"operator.note":t.operatorNotes.push({t:e.t,text:e.text,consumed:!1});break;case"operator.note.consumed":{let e=t.operatorNotes.findIndex(t=>!t.consumed);e>=0&&(t.operatorNotes[e].consumed=!0);break}case"usage":{let n=e.usage;if(t.usage={promptTokens:t.usage.promptTokens+n.promptTokens,completionTokens:t.usage.completionTokens+n.completionTokens,cacheHitTokens:t.usage.cacheHitTokens+n.cacheHitTokens,cacheMissTokens:t.usage.cacheMissTokens+n.cacheMissTokens},"number"==typeof e.cost&&Number.isFinite(e.cost))t.cost=e.cost;else{let a=null!=(w=i[null!=(S=e.model)?S:""])?w:{inMiss:0,inHit:0,out:0},s=n.cacheMissTokens||Math.max(0,n.promptTokens-n.cacheHitTokens);t.cost+=(s*a.inMiss+n.cacheHitTokens*a.inHit+n.completionTokens*a.out)/1e6}l(t,e.t);break}case"plan.updated":t.planUpdatedAt=e.t,t.planExcerpt=String(null!=(T=e.excerpt)?T:"");break;case"run.final":t.finalSummary=e.summary,t.finalReportPath=e.reportPath}}}(e.current,t),x.current=!0,h.includes(e.current.status)&&setTimeout(m,160)},b=()=>{if(f)return;let n=async()=>{try{let n=e.current.lastSeq,{events:a,live:r}=await s.F.events(t,n);for(let t of a)v(t);g(!0),k(r),!r&&h.includes(e.current.status)&&f&&(clearInterval(f),f=null)}catch(t){g(!1)}};n(),f=setInterval(n,1200)};return"undefined"!=typeof EventSource?(()=>{try{a=new EventSource(s.F.streamUrl(t))}catch(t){b();return}a.onopen=()=>g(!0),a.onmessage=t=>{try{v(JSON.parse(t.data))}catch(t){}},a.addEventListener("live",t=>{try{k(!!JSON.parse(t.data).live)}catch(t){}}),a.onerror=()=>{if(g(!1),h.includes(e.current.status)){null==a||a.close();return}f||n||b()}})():b(),()=>{n=!0,clearInterval(y),f&&clearInterval(f),null==a||a.close()}},[t]),{data:n,connected:f,engineLive:m}}function f(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2500,[e,n]=(0,a.useState)([]),[r,i]=(0,a.useState)(!0),[o,l]=(0,a.useState)(null),[c,u]=(0,a.useState)(0);return(0,a.useEffect)(()=>{let e=!0,a=async()=>{try{let{runs:t}=await s.F.listRuns();e&&(n(t),l(null))}catch(t){e&&l((null==t?void 0:t.message)||"hub unreachable")}finally{e&&i(!1)}};a();let r=setInterval(a,t);return()=>{e=!1,clearInterval(r)}},[t,c]),{runs:e,loading:r,error:o,refresh:()=>u(t=>t+1)}}function g(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3,[e,n]=(0,a.useState)(()=>Date.now());return(0,a.useEffect)(()=>{let e=setInterval(()=>n(Date.now()),t);return()=>clearInterval(e)},[t]),e}function m(){let[t,e]=(0,a.useState)(null),[n,r]=(0,a.useState)(null),i=(0,a.useMemo)(()=>async()=>{try{e(await s.F.getConfig()),r(null)}catch(t){r((null==t?void 0:t.message)||"could not load config")}},[]);return(0,a.useEffect)(()=>{i()},[i]),{config:t,setConfig:e,error:n,reload:i}}},6420:(t,e,n)=>{n.d(e,{Md:()=>u,OQ:()=>d,OW:()=>k,Wh:()=>g,gu:()=>p,i8:()=>y,jT:()=>m,md:()=>f,pF:()=>h,pp:()=>v,si:()=>b,y$:()=>x});var a=n(5155),s=n(2619),r=n.n(s),i=n(2115),o=n(6504),l=n(5459),c=n(7e3);function u(t){let{children:e,compact:n,dim:s}=t;return(0,a.jsx)("div",{className:"prose-report".concat(n?" prose-compact":"").concat(s?" prose-dim":""),children:(0,a.jsx)(o.oz,{remarkPlugins:[l.A],children:e})})}function d(t){let{children:e,lines:n=3}=t,[s,r]=(0,i.useState)(!1),[o,l]=(0,i.useState)(!1),c=(0,i.useRef)(null),u="".concat(Math.round(1.55*n*10)/10,"em");return(0,i.useLayoutEffect)(()=>{let t=c.current;if(!t)return;let e=()=>l(t.scrollHeight>t.clientHeight+2);e();let n=new ResizeObserver(e);return n.observe(t),()=>n.disconnect()},[e,s]),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{ref:c,className:!s&&o?"clamp-fade":void 0,style:s?void 0:{maxHeight:u,overflow:"hidden"},children:e}),(o||s)&&(0,a.jsx)("button",{onClick:()=>r(t=>!t),className:"text-2xs mt-1 text-ink-faint hover:text-ink transition-colors",children:s?"Show less ▴":"Show more ▾"})]})}function h(t){let{size:e=30}=t;return(0,a.jsx)("img",{src:"/swarm-mark.png",alt:"","aria-hidden":!0,className:"shrink-0 select-none",style:{height:e,width:"auto",filter:"var(--logo-filter)"},draggable:!1})}function p(t){let{small:e}=t;return(0,a.jsxs)(r(),{href:"/",className:"flex items-center gap-2.5",children:[(0,a.jsx)(h,{size:e?24:28}),(0,a.jsx)("span",{className:"font-display",style:{fontSize:e?14:15},children:"agentswarm"})]})}function f(t){let{status:e,size:n=8,pulse:s}=t,r=(0,c.ST)(e),i=null!=s?s:["running","planning","synthesizing","verifying"].includes(e);return(0,a.jsxs)("span",{className:"relative inline-flex",style:{width:n,height:n},children:[i&&(0,a.jsx)("span",{className:"absolute inset-0 rounded-full animate-ping",style:{background:r,opacity:.4}}),(0,a.jsx)("span",{className:"relative rounded-full",style:{width:n,height:n,background:r}})]})}function g(t){let{status:e}=t;if("failed"===e)return(0,a.jsx)("span",{className:"chip chip-solid",children:"✕ failed"});let n=(0,c.ST)(e);return(0,a.jsxs)("span",{className:"chip",style:{color:n,borderColor:"color-mix(in oklab, ".concat(n," 35%, var(--color-border))"),background:"color-mix(in oklab, ".concat(n," 7%, transparent)")},children:[(0,a.jsx)(f,{status:e,size:6}),e]})}function m(t){let{spent:e,cap:n,height:s=5}=t,r=n>0?Math.min(100,e/n*100):0;return(0,a.jsx)("div",{className:"w-full rounded-full overflow-hidden",style:{height:s,background:"rgb(var(--hi) / 0.07)"},children:(0,a.jsx)("div",{className:"h-full rounded-full bg-ink transition-all duration-500",style:{width:"".concat(r,"%"),animation:r>85?"var(--animate-pulse-soft)":void 0}})})}function k(t){let{points:e,width:n=120,height:s=26}=t;if(e.length<2)return null;let r=Math.max(...e),i=Math.min(...e),o=r-i||1,l=n/(e.length-1),c=t=>s-2-(t-i)/o*(s-4),u=e.map((t,e)=>"".concat(0===e?"M":"L").concat((e*l).toFixed(1),",").concat(c(t).toFixed(1))).join(" "),d="".concat(u," L").concat(n,",").concat(s," L0,").concat(s," Z");return(0,a.jsxs)("svg",{width:n,height:s,viewBox:"0 0 ".concat(n," ").concat(s),className:"block","aria-hidden":!0,children:[(0,a.jsx)("path",{d:d,fill:"rgb(var(--hi) / 0.06)",stroke:"none"}),(0,a.jsx)("path",{d:u,fill:"none",stroke:"currentColor",strokeWidth:"1.4",opacity:"0.65"}),(0,a.jsx)("circle",{cx:n,cy:c(e[e.length-1]),r:"2",fill:"currentColor",opacity:"0.9"})]})}function x(t){let{size:e=14,dark:n}=t;return(0,a.jsx)("span",{className:"inline-block rounded-full animate-spin",style:{width:e,height:e,border:n?"1.5px solid color-mix(in srgb, var(--color-bg) 25%, transparent)":"1.5px solid rgb(var(--hi) / 0.18)",borderTopColor:n?"var(--color-bg)":"var(--ink-hi)"}})}function y(t){let{text:e,label:n="Copy"}=t,[s,r]=(0,i.useState)(!1);return(0,a.jsx)("button",{className:"btn btn-sm",onClick:async()=>{try{await navigator.clipboard.writeText("function"==typeof e?e():e),r(!0),setTimeout(()=>r(!1),1500)}catch(t){}},children:s?"Copied ✓":n})}function v(t){let{glyph:e,title:n,sub:s}=t;return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-14 px-6 text-center",children:[(0,a.jsx)("div",{className:"glyph mb-4",style:{width:44,height:44,fontSize:17},children:e}),(0,a.jsx)("div",{className:"font-semibold text-sm text-ink-dim",children:n}),s&&(0,a.jsx)("div",{className:"text-xs mt-1.5 max-w-[340px] leading-relaxed text-ink-faint",children:s})]})}function b(t){var e;let{name:n}=t;return(0,a.jsx)("span",{className:"mono text-ink-faint",children:null!=(e=({shell:"❯",read_file:"▤",write_file:"✎",replace_in_file:"✎",list_dir:"▸",web_search:"⌕",fetch_url:"↓",note:"✦",save_artifact:"↧",report:"✓",spawn_tasks:"⊕",verdict:"◈",submit_final:"■",wait:"∥",finish:"▣"})[null!=n?n:""])?e:"\xb7"})}},7e3:(t,e,n)=>{function a(t){return t?t>=1e9?(t/1e9).toFixed(2)+"B":t>=1e6?(t/1e6).toFixed(2)+"M":t>=1e3?(t/1e3).toFixed(1)+"K":String(Math.round(t)):"0"}function s(t){return t?t<.01?"<$0.01":t<1?"$"+t.toFixed(3):"$"+t.toFixed(2):"$0.00"}function r(t){return t<1024?t+" B":t<1048576?(t/1024).toFixed(1)+" KB":(t/1024/1024).toFixed(1)+" MB"}function i(t){let e=Math.max(0,Math.round(t/1e3));if(e<60)return"".concat(e,"s");let n=Math.floor(e/60);if(n<60)return"".concat(n,"m ").concat(e%60,"s");let a=Math.floor(n/60);return"".concat(a,"h ").concat(n%60,"m")}function o(t,e){let n=Math.max(0,Math.round((e-t)/1e3));if(n<5)return"just now";if(n<60)return"".concat(n,"s ago");let a=Math.floor(n/60);if(a<60)return"".concat(a,"m ago");let s=Math.floor(a/60);return s<24?"".concat(s,"h ago"):"".concat(Math.floor(s/24),"d ago")}function l(t){return new Date(t).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}function c(t){return new Date(t).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1})}n.d(e,{ME:()=>l,MZ:()=>c,S8:()=>s,ST:()=>d,nc:()=>i,rB:()=>o,yj:()=>a,zi:()=>r});let u={pending:"var(--color-ink-faint)",running:"var(--ink-hi)",verifying:"var(--status-warm)",done:"var(--color-ink-dim)",failed:"var(--ink-hi)",blocked:"var(--status-cool)",planning:"var(--ink-hi)",synthesizing:"var(--status-warm)",cancelled:"var(--color-ink-dim)"};function d(t){var e;return null!=(e=u[t])?e:"var(--color-ink-dim)"}},7621:(t,e,n)=>{n.d(e,{F:()=>o});var a=n(5704);function s(){let t=a.env.NEXT_PUBLIC_HUB;if(t)return t.replace(/\/+$/,"");let{protocol:e,hostname:n,port:s}=window.location;return"7780"===s?"".concat(e,"//").concat(n,":7777"):""}async function r(t){let e=await fetch(s()+t,{cache:"no-store"});if(!e.ok)throw Error("".concat(e.status," ").concat((await e.text().catch(()=>"")).slice(0,200)));return e.json()}async function i(t,e){let n=await fetch(s()+t,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)});if(!n.ok){let t=await n.text().catch(()=>""),e=t;try{e=JSON.parse(t).error||t}catch(t){}throw Error(e||"".concat(n.status))}return n.json()}let o={health:()=>r("/api/health"),getConfig:()=>r("/api/config"),setConfig:t=>i("/api/config",t),models:()=>r("/api/models"),validate:()=>r("/api/validate"),sandboxTest:t=>i("/api/sandbox/test",t?{runtime:t}:{}),searchTest:()=>i("/api/search/test",{}),crawlTest:()=>i("/api/crawl/test",{}),listDirs:t=>r("/api/fs/dirs".concat(t?"?path=".concat(encodeURIComponent(t)):"")),listRuns:()=>r("/api/runs"),createRun:t=>i("/api/runs",t),getRun:t=>r("/api/runs/".concat(t)),events:(t,e)=>r("/api/runs/".concat(t,"/events?since=").concat(e)),note:(t,e)=>i("/api/runs/".concat(t,"/note"),{text:e}),cancel:t=>i("/api/runs/".concat(t,"/cancel"),{}),resume:t=>i("/api/runs/".concat(t,"/resume"),{}),deleteRun:async t=>{let e=await fetch(s()+"/api/runs/".concat(t),{method:"DELETE"});if(!e.ok){let t=await e.text().catch(()=>""),n=t;try{n=JSON.parse(t).error||t}catch(t){}throw Error(n||"".concat(e.status))}},artifacts:t=>r("/api/runs/".concat(t,"/artifacts")),fetchPlan:async t=>{let e=await fetch(s()+"/api/runs/".concat(t,"/plan"),{cache:"no-store"});return e.ok?e.text():null},artifactUrl:(t,e)=>s()+"/api/runs/".concat(t,"/artifacts/").concat(encodeURIComponent(e)),reportUrl:t=>s()+"/api/runs/".concat(t,"/report"),streamUrl:t=>s()+"/api/runs/".concat(t,"/stream")}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[64],{63:(e,t,s)=>{"use strict";var n=s(7260);s.o(n,"useRouter")&&s.d(t,{useRouter:function(){return n.useRouter}}),s.o(n,"useSearchParams")&&s.d(t,{useSearchParams:function(){return n.useSearchParams}})},4218:(e,t,s)=>{Promise.resolve().then(s.bind(s,5182))},5182:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>X});var n=s(5155),a=s(2619),i=s.n(a),l=s(63),r=s(2115),c=s(6504),d=s(5459),o=s(7621),x=s(7e3),m=s(6420);function h(e){let{id:t,hasFinal:s,live:a}=e,[i,l]=(0,r.useState)(null),[h,u]=(0,r.useState)([]),[f,j]=(0,r.useState)(!0),[g,k]=(0,r.useState)(null),[b,v]=(0,r.useState)(0);return((0,r.useEffect)(()=>{let e=!0;return j(!0),k(null),Promise.all([fetch(o.F.reportUrl(t)).then(e=>e.ok?e.text():404===e.status?null:Promise.reject(Error("HTTP ".concat(e.status)))),o.F.artifacts(t).then(e=>e.artifacts)]).then(t=>{let[s,n]=t;e&&(l(s),u(n),j(!1))}).catch(t=>{e&&(k((null==t?void 0:t.message)||"request failed"),j(!1))}),()=>{e=!1}},[t,s,b]),f)?(0,n.jsxs)("div",{className:"panel p-10 flex items-center justify-center gap-3 text-ink-faint",children:[(0,n.jsx)(m.y$,{})," loading report…"]}):g?(0,n.jsxs)("div",{className:"panel",children:[(0,n.jsx)(m.pp,{glyph:"⚠",title:"Couldn't load the report",sub:"The hub didn't answer (".concat(g,"). Check that swarm serve is still running, then retry.")}),(0,n.jsx)("div",{className:"flex justify-center pb-8 -mt-2",children:(0,n.jsx)("button",{className:"btn btn-sm",onClick:()=>v(e=>e+1),children:"Retry"})})]}):(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsx)("div",{className:"panel overflow-hidden",children:i?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-3 px-5 sm:px-7 py-3 border-b border-border-soft",style:{background:"rgb(var(--hi) / 0.015)"},children:[(0,n.jsx)("span",{className:"label",children:"Final report"}),(0,n.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,n.jsx)(m.i8,{text:i,label:"Copy markdown"}),(0,n.jsx)("button",{className:"btn btn-sm",onClick:()=>{if(!i)return;let e=new Blob([i],{type:"text/markdown"}),s=URL.createObjectURL(e),n=document.createElement("a");n.href=s,n.download="".concat(t,"-report.md"),n.click(),URL.revokeObjectURL(s)},children:"Download .md"}),(0,n.jsx)("a",{className:"btn btn-sm",href:o.F.reportUrl(t),target:"_blank",rel:"noreferrer",children:"Raw ↗"})]})]}),(0,n.jsx)("div",{className:"p-5 sm:p-8",children:(0,n.jsx)("div",{className:"prose-report",children:(0,n.jsx)(c.oz,{remarkPlugins:[d.A],children:i})})})]}):(0,n.jsx)(m.pp,{glyph:"▤",title:a?"No report yet":"No final report",sub:a?"The synthesizer composes the final report when the mission finishes — it will appear here automatically.":"This run ended without a synthesized report."})}),h.length>0&&(0,n.jsxs)("div",{className:"panel p-5",children:[(0,n.jsxs)("h3",{className:"label mb-3",children:["Artifacts \xb7 ",h.length]}),(0,n.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:h.map(e=>(0,n.jsxs)("a",{href:o.F.artifactUrl(t,e.name),target:"_blank",rel:"noreferrer",className:"flex items-center gap-2.5 px-3 py-2.5 tile tile-hover",children:[(0,n.jsx)(p,{name:e.name}),(0,n.jsx)("span",{className:"mono text-xs truncate flex-1 text-ink",children:e.name}),(0,n.jsx)("span",{className:"text-2xs shrink-0 mono text-ink-faint",children:(0,x.zi)(e.size)}),(0,n.jsx)("span",{className:"text-ink-dim",children:"↗"})]},e.name))})]})]})}function p(e){let{name:t}=e,s=t.lastIndexOf("."),a=s>0?t.slice(s+1).toLowerCase().slice(0,4):"file";return(0,n.jsx)("span",{className:"mono shrink-0 uppercase grid place-items-center text-ink-dim",style:{fontSize:9.5,letterSpacing:"0.08em",width:34,height:20,borderRadius:5,background:"rgb(var(--hi) / 0.05)",border:"1px solid var(--color-border)"},children:a})}function u(e){let{id:t,onSent:s}=e,[a,i]=(0,r.useState)(""),[l,c]=(0,r.useState)(!1),[d,x]=(0,r.useState)(!1),m=async()=>{if(a.trim()&&!l){c(!0);try{await o.F.note(t,a.trim()),i(""),x(!0),setTimeout(()=>x(!1),1400),null==s||s()}finally{c(!1)}}};return(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("input",{className:"input",placeholder:"Steer the conductor — type guidance and press ↵",value:a,onChange:e=>i(e.target.value),onKeyDown:e=>"Enter"===e.key&&m(),style:{fontSize:13,padding:"9px 13px"}}),(0,n.jsx)("button",{className:"btn",disabled:!a.trim()||l,onClick:m,style:{whiteSpace:"nowrap"},children:d?"Sent ✓":"Send"})]})}function f(e){let{id:t,live:s}=e,[a,i]=(0,r.useState)(!1),[l,c]=(0,r.useState)(!1);return s?l?(0,n.jsx)("button",{className:"btn",disabled:!0,style:{padding:"8px 13px"},children:"stopping…"}):a?(0,n.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,n.jsx)("button",{className:"btn btn-danger",style:{padding:"8px 12px"},onClick:async()=>{c(!0),i(!1);try{await o.F.cancel(t)}catch(e){c(!1)}},children:"Confirm stop"}),(0,n.jsx)("button",{className:"btn",style:{padding:"8px 12px"},onClick:()=>i(!1),children:"Keep"})]}):(0,n.jsx)("button",{className:"btn btn-danger",style:{padding:"8px 13px"},onClick:()=>i(!0),children:"Stop"}):null}var j=s(4643);function g(e){let t=0x811c9dc5;for(let s=0;s<e.length;s++)t^=e.charCodeAt(s),t=Math.imul(t,0x1000193);return t>>>0}let k=["Apis","Vesper","Bumble","Nectar","Pollen","Maja","Melli","Buzz","Wax","Comb","Clover","Sage","Tupelo","Aster","Bryony","Cassia","Dahlia","Elder","Fennel","Heather","Indigo","Juniper","Laurel","Mallow","Nettle","Olive","Poppy","Quince","Rowan","Sylvie","Thistle","Verbena","Willow","Yarrow","Zinnia","Basil","Cedar","Flax","Hazel","Iris","Maple","Reed","Sorrel","Hum","Drone","Scout","Forage","Ember"];function b(e){return k[g(e)%k.length]}function v(e){let{seed:t,size:s=14,className:a}=e,i=g(t),l=g(t+"\xb7"),r=[];for(let e=0;e<5;e++)for(let t=0;t<3;t++){let s=3*e+t;if(!(i>>s&1))continue;let n=l>>s&1?.95:.45;r.push({x:t,y:e,o:n}),t<2&&r.push({x:4-t,y:e,o:n})}return 0===r.length&&r.push({x:2,y:1,o:.95},{x:2,y:2,o:.45},{x:2,y:3,o:.95}),(0,n.jsx)("span",{className:"inline-grid place-items-center shrink-0 ".concat(null!=a?a:""),style:{width:s,height:s,borderRadius:Math.max(4,Math.round(.22*s)),background:"rgb(var(--hi) / 0.05)",border:"1px solid var(--color-border-soft)"},"aria-hidden":!0,children:(0,n.jsx)("svg",{width:Math.round(.62*s),height:Math.round(.62*s),viewBox:"0 0 5 5",shapeRendering:"crispEdges",children:r.map((e,t)=>(0,n.jsx)("rect",{x:e.x,y:e.y,width:1,height:1,fill:"var(--color-ink)",opacity:e.o},t))})})}function N(e){let{runId:t,activity:s,conductorLog:a,notes:i,operatorNotes:l,planUpdatedAt:c,now:d}=e,[o,x]=(0,r.useState)("activity"),m=[{id:"activity",label:"Activity"},{id:"conductor",label:"Conductor",count:a.length+l.length},{id:"blackboard",label:"Blackboard",count:i.length},{id:"plan",label:"Plan"}];return(0,n.jsxs)("div",{className:"panel flex flex-col h-[480px] lg:h-[calc(100vh-88px)] lg:sticky lg:top-[72px]",children:[(0,n.jsx)("div",{className:"flex items-center gap-5 px-4 border-b border-border-soft shrink-0",children:m.map(e=>(0,n.jsxs)("button",{className:"tab","data-active":o===e.id,onClick:()=>x(e.id),children:[e.label,e.count?(0,n.jsx)("span",{className:"mono text-2xs text-ink-faint",children:e.count}):null]},e.id))}),(0,n.jsxs)("div",{className:"flex-1 overflow-hidden relative",children:["activity"===o&&(0,n.jsx)(w,{activity:s,now:d}),"conductor"===o&&(0,n.jsx)(T,{log:a,operatorNotes:l,now:d}),"blackboard"===o&&(0,n.jsx)(M,{notes:i,now:d}),"plan"===o&&(0,n.jsx)(y,{runId:t,planUpdatedAt:c})]})]})}function y(e){let{runId:t,planUpdatedAt:s}=e,[a,i]=(0,r.useState)(null),[l,c]=(0,r.useState)(!1);return((0,r.useEffect)(()=>{let e=!0;return o.F.fetchPlan(t).then(t=>{e&&(i(t),c(!0))}).catch(()=>{e&&c(!0)}),()=>{e=!1}},[t,s]),l)?a?(0,n.jsx)("div",{className:"h-full overflow-y-auto px-4 py-3 text-xs leading-relaxed",children:(0,n.jsx)(m.Md,{compact:!0,dim:!0,children:a})}):(0,n.jsx)(m.pp,{glyph:"◈",title:"No plan yet",sub:"On longer missions the conductor maintains a living plan (mission-plan.md) — it appears here as it evolves."}):(0,n.jsx)(m.pp,{glyph:"◈",title:"Loading plan…",sub:""})}function w(e){let{activity:t,now:s}=e,a=(0,r.useRef)(null),[i,l]=(0,r.useState)(!0),c=(0,r.useMemo)(()=>(0,j.XJ)(t),[t]);return((0,r.useEffect)(()=>{i&&a.current&&(a.current.scrollTop=a.current.scrollHeight)},[t,i]),0===t.length)?(0,n.jsx)(m.pp,{glyph:"❯",title:"No activity yet",sub:"Every agent tool call streams here live."}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{ref:a,onScroll:e=>{let t=e.currentTarget;l(t.scrollHeight-t.scrollTop-t.clientHeight<60)},className:"h-full overflow-y-auto px-3 py-2 space-y-0.5",children:c.map(e=>(0,n.jsx)(S,{item:e},e.id))}),!i&&(0,n.jsx)("button",{onClick:()=>{l(!0),a.current&&(a.current.scrollTop=a.current.scrollHeight)},className:"absolute bottom-3 left-1/2 -translate-x-1/2 btn btn-sm",style:{background:"color-mix(in oklab, var(--color-panel) 92%, transparent)",borderColor:"rgb(var(--hi) / 0.35)",boxShadow:"0 6px 20px -6px rgba(0,0,0,0.6)"},children:"↓ Latest"})]})}function S(e){var t,s,a;let{item:i}=e,l="result"===i.kind,r=null,c=null!=(t=i.text)?t:"",d="text-ink-dim";return"tool"===i.kind?(r=(0,n.jsxs)("span",{className:"mono font-medium text-ink mr-1.5 whitespace-nowrap",children:[(0,n.jsx)(m.si,{name:i.name})," ",i.name,(null!=(s=i.count)?s:1)>1&&(0,n.jsxs)("span",{className:"text-ink-faint",children:[" \xd7",i.count]})]}),d="text-ink-faint"):l?(r=(0,n.jsx)("span",{className:"mr-1.5 ".concat(i.ok?"text-ink-faint":"text-ink-dim"),children:i.ok?"↳":"↳ ✗"}),d=i.ok?"text-ink-faint":"text-ink-dim"):"note"===i.kind?r=(0,n.jsx)("span",{className:"text-ink-dim mr-1.5",children:"✦"}):"spawn"===i.kind?(r=(0,n.jsx)("span",{className:"text-ink mr-1.5",children:"⊕"}),d="text-ink"):"report"===i.kind?r=(0,n.jsx)("span",{className:"text-ink-dim mr-1.5",children:"✓"}):(r=(0,n.jsx)("span",{className:"mono font-medium text-ink mr-1.5",children:i.name}),c=null!=(a=i.text)?a:""),(0,n.jsxs)("div",{className:"flex items-center gap-2 py-1 text-xs leading-snug",style:{animation:"var(--animate-rise)"},title:"".concat(new Date(i.t).toLocaleString()).concat(i.taskId?" \xb7 ".concat(i.taskId," ").concat(b(i.taskId)):" \xb7 conductor").concat(i.name?"\n".concat(i.name):"").concat(c?"\n".concat(c):""),children:[(0,n.jsx)("span",{className:"flex items-center gap-1.5 shrink-0 w-[52px]",children:i.taskId?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(v,{seed:i.taskId,size:18}),(0,n.jsx)("span",{className:"mono text-2xs text-ink-faint",children:i.taskId})]}):(0,n.jsx)("span",{className:"mono text-2xs text-ink-faint inline-flex items-center justify-center",style:{width:18},children:"◉"})}),(0,n.jsxs)("span",{className:"min-w-0 flex-1 truncate ".concat(l?"pl-2 border-l border-border-soft":""),children:[r,(0,n.jsx)("span",{className:d,children:c})]}),(0,n.jsx)("span",{className:"mono text-2xs shrink-0 w-[36px] text-right text-ink-faint",children:(0,x.MZ)(i.t)})]})}function T(e){let{log:t,operatorNotes:s,now:a}=e,i=[...t.map(e=>({t:e.t,kind:"say",text:e.text})),...s.map(e=>({t:e.t,kind:"op",text:e.text}))].sort((e,t)=>e.t-t.t),l=(0,r.useRef)(null);return((0,r.useEffect)(()=>{l.current&&(l.current.scrollTop=l.current.scrollHeight)},[i.length]),0===i.length)?(0,n.jsx)(m.pp,{glyph:"◉",title:"Conductor is quiet",sub:"Its decisions and commentary appear here. Send it a note from the header to steer the run."}):(0,n.jsx)("div",{ref:l,className:"h-full overflow-y-auto px-3.5 py-3 space-y-3",children:i.map((e,t)=>(0,n.jsx)("div",{style:{animation:"var(--animate-rise)"},children:"op"===e.kind?(0,n.jsxs)("div",{className:"rounded-lg p-2.5 text-xs",style:{background:"rgb(var(--hi) / 0.05)",border:"1px solid rgb(var(--hi) / 0.18)"},children:[(0,n.jsxs)("div",{className:"label mb-1 text-ink",style:{letterSpacing:"0.12em"},children:["you \xb7 ",(0,x.rB)(e.t,a)]}),(0,n.jsx)("div",{className:"text-ink-dim",children:e.text})]}):(0,n.jsxs)("div",{className:"text-xs leading-relaxed",children:[(0,n.jsxs)("div",{className:"label mb-0.5",style:{letterSpacing:"0.12em"},children:["◉ conductor \xb7 ",(0,x.ME)(e.t)]}),(0,n.jsx)(m.Md,{compact:!0,dim:!0,children:e.text})]})},t))})}function C(e){var t;let{kind:s}=e,a="decision"===s||"conflict"===s;return(0,n.jsxs)("span",{className:"mono shrink-0 uppercase ".concat(a?"chip-solid":""),style:{fontSize:9,letterSpacing:"0.1em",padding:"1px 6px",borderRadius:4,border:a?void 0:"1px solid var(--color-border)"},children:[null!=(t=({decision:"◆",conflict:"≠","open-question":"?",handoff:"⇢",claim:"⚑"})[s])?t:"\xb7"," ",s]})}function M(e){let{notes:t,now:s}=e,[a,i]=(0,r.useState)(""),[l,c]=(0,r.useState)(null),d=(0,r.useMemo)(()=>{let e=new Set;for(let s of t)e.add(s.kind||"finding");return[...e].sort()},[t]),o=(0,r.useMemo)(()=>{let e=a.trim().toLowerCase();return t.filter(t=>(!l||(t.kind||"finding")===l)&&(!e||[t.text,t.key,t.taskId,t.url].some(t=>t&&t.toLowerCase().includes(e))))},[t,a,l]);return 0===t.length?(0,n.jsx)(m.pp,{glyph:"✦",title:"Blackboard is empty",sub:"Durable facts agents post for the rest of the swarm show up here."}):(0,n.jsxs)("div",{className:"h-full flex flex-col",children:[(0,n.jsxs)("div",{className:"px-3.5 pt-2.5 pb-2 space-y-2 shrink-0 border-b border-border-soft",children:[(0,n.jsx)("input",{className:"input",style:{padding:"4px 10px",fontSize:12},placeholder:"Search ".concat(t.length," notes…"),value:a,onChange:e=>i(e.target.value)}),d.length>1&&(0,n.jsx)("div",{className:"flex items-center gap-1.5 flex-wrap",children:d.map(e=>(0,n.jsxs)("button",{onClick:()=>c(l===e?null:e),className:"mono uppercase ".concat(l===e?"chip-solid":"text-ink-faint hover:text-ink-dim"),style:{fontSize:9,letterSpacing:"0.1em",padding:"2px 7px",borderRadius:4,border:l===e?void 0:"1px solid var(--color-border)"},children:[e," ",t.filter(t=>(t.kind||"finding")===e).length]},e))})]}),(0,n.jsxs)("div",{className:"flex-1 overflow-y-auto px-3.5 py-3 space-y-2",children:[0===o.length&&(0,n.jsx)("div",{className:"text-xs text-ink-faint py-4 text-center",children:"No notes match."}),[...o].reverse().map((e,t)=>(0,n.jsxs)("div",{className:"tile p-3 text-xs",style:{animation:"var(--animate-rise)"},children:[(0,n.jsxs)("div",{className:"flex items-baseline gap-2 mb-1.5 text-2xs text-ink-faint",children:[e.kind&&"finding"!==e.kind&&(0,n.jsx)(C,{kind:e.kind}),e.key&&(0,n.jsx)("span",{className:"mono font-semibold text-ink truncate",children:e.key.replace(/[_-]+/g," ")}),e.taskId&&(0,n.jsx)("span",{className:"mono shrink-0",children:e.taskId}),(0,n.jsx)("span",{className:"ml-auto shrink-0",children:(0,x.rB)(e.t,s)})]}),(0,n.jsx)(m.OQ,{lines:5,children:(0,n.jsx)(m.Md,{compact:!0,dim:!0,children:e.text})}),e.url&&(0,n.jsxs)("a",{href:e.url,target:"_blank",rel:"noreferrer",className:"mono text-2xs text-ink-faint hover:text-ink underline underline-offset-2 block truncate mt-1.5",title:e.url,children:["↗ ",e.url.replace(/^https?:\/\//,"")]})]},t))]})]})}function R(e){switch(e){case"done":return"✓";case"failed":return"✗";case"blocked":return"⊘";case"verifying":return"◈";default:return""}}function z(e){return e.replace(/[#*`_>]+/g,"").replace(/\s+/g," ").trim().slice(0,140)}function A(e){var t;let{task:s,agent:a,now:i,onClick:l}=e,r=(0,x.ST)(s.status),c="running"===s.status||"verifying"===s.status,d="verifying"===s.status?"verifier":s.role,o=s.startedAt?(0,x.nc)((null!=(t=s.endedAt)?t:i)-s.startedAt):"";return(0,n.jsxs)("button",{onClick:l,className:"panel panel-hover text-left p-3.5 w-full relative overflow-hidden flex flex-col",style:{animation:"var(--animate-rise)",borderColor:c?"rgb(var(--hi) / 0.16)":void 0,opacity:"pending"===s.status?.75:1},children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 mb-1.5 w-full",children:[(0,n.jsx)(v,{seed:s.id,size:26}),(0,n.jsx)("span",{className:"mono text-2xs font-bold shrink-0",style:{color:r},children:s.id}),(0,n.jsx)("span",{className:"text-2xs font-medium shrink-0 text-ink-dim",children:b(s.id)}),(0,n.jsxs)("span",{className:"text-2xs shrink-0 text-ink-faint",children:["\xb7 ",d]}),s.team&&(0,n.jsx)("span",{title:"runs as a sub-swarm",className:"text-2xs text-ink-dim",children:"⌬"}),s.modelTier&&"default"!==s.modelTier&&(0,n.jsx)("span",{title:"".concat(s.modelTier," model tier"),className:"mono text-2xs shrink-0 text-ink-faint",children:"strong"===s.modelTier?"S":"\xa2"}),s.verify&&(0,n.jsx)("span",{title:"adversarially verified",className:"text-2xs text-ink-dim",children:"⊛"}),s.attempt>1&&(0,n.jsxs)("span",{className:"text-2xs shrink-0 text-ink-dim",children:["retry ",s.attempt]}),(0,n.jsxs)("span",{className:"ml-auto flex items-center gap-1.5 shrink-0",children:[c?(0,n.jsx)(m.y$,{size:11}):(0,n.jsx)("span",{className:"text-sm",style:{color:r},children:R(s.status)}),o&&(0,n.jsx)("span",{className:"mono text-2xs text-ink-faint",children:o})]})]}),(0,n.jsx)("div",{className:"text-sm leading-snug mb-1.5 line-clamp-2 text-ink",children:s.title}),(0,n.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[s.deps.length>0&&(0,n.jsxs)("span",{className:"mono text-2xs text-ink-faint",children:["⇠ ",s.deps.join(", ")]}),s.artifacts.length>0&&(0,n.jsxs)("span",{className:"mono text-2xs text-ink-dim",title:s.artifacts.join(", "),children:["↧ ",s.artifacts.length," artifact",s.artifacts.length>1?"s":""]})]}),c&&a&&(0,n.jsxs)("div",{className:"mt-2 pt-2 text-2xs flex items-start gap-1.5 w-full border-t border-border-soft text-ink-dim",children:[(0,n.jsx)(m.si,{name:a.lastTool}),(0,n.jsxs)("span",{className:"line-clamp-2 text-ink-faint",style:{animation:"var(--animate-pulse-soft)",overflowWrap:"anywhere"},children:[a.lastTool?(0,n.jsx)("span",{className:"mono text-ink-dim",children:a.lastTool}):null,a.lastTool?" \xb7 ":"",function(e){let t=(e.lastText||e.lastThink||"").replace(/\s+/g," ").trim();return t.length>90?"…"+t.slice(t.length-89):t}(a)||"thinking…"]})]}),!c&&"done"===s.status&&s.report&&(0,n.jsx)("div",{className:"mt-1.5 text-2xs line-clamp-2 text-ink-faint",children:z(s.report)}),("failed"===s.status||"blocked"===s.status)&&(s.error||s.feedback)&&(0,n.jsx)("div",{className:"mt-1.5 text-2xs line-clamp-2",style:{color:r},children:z(s.feedback||s.error||"")})]})}function F(e){var t;let{task:s,now:a,onClick:i}=e,l=(0,x.ST)(s.status),r="failed"===s.status||"blocked"===s.status,c=s.startedAt?(0,x.nc)((null!=(t=s.endedAt)?t:a)-s.startedAt):"—",d=r?z(s.feedback||s.error||""):"";return(0,n.jsxs)("button",{onClick:i,className:"flex items-center gap-2.5 w-full text-left px-3 py-2 hover:bg-[rgb(var(--hi)/0.04)] transition-colors",style:{animation:"var(--animate-rise)"},children:[(0,n.jsx)("span",{className:"mono text-sm shrink-0 w-4 text-center ".concat(r?"font-bold":""),style:{color:l},children:R(s.status)}),(0,n.jsx)(v,{seed:s.id,size:20}),(0,n.jsx)("span",{className:"mono text-2xs shrink-0 w-7 ".concat(r?"font-bold text-ink":"text-ink-dim"),children:s.id}),(0,n.jsx)("span",{className:"text-2xs shrink-0 w-16 truncate hidden sm:inline text-ink-dim",children:b(s.id)}),(0,n.jsx)("span",{className:"text-2xs shrink-0 w-20 truncate hidden md:inline text-ink-faint",children:s.role}),(0,n.jsxs)("span",{className:"text-xs truncate flex-1 min-w-0 text-ink",children:[s.title,d&&(0,n.jsx)("span",{className:"ml-2",style:{color:l},children:d})]}),s.attempt>1&&(0,n.jsxs)("span",{className:"text-2xs shrink-0 hidden sm:inline text-ink-faint",children:["retry ",s.attempt]}),(0,n.jsx)("span",{className:"mono text-2xs shrink-0 w-9 text-right text-ink-faint",title:s.artifacts.join(", "),children:s.artifacts.length>0?"↧ ".concat(s.artifacts.length):""}),(0,n.jsx)("span",{className:"mono text-2xs shrink-0 w-14 text-right text-ink-faint",children:c})]})}let E="0 0 22px -6px rgb(var(--hi) / 0.5)",O=["done","failed","blocked"];function L(e){var t,s,a;let{tasks:i,agents:l,status:c,conductorLog:d,finalSummary:o,now:x,onSelect:h,onOpenReport:p}=e,u=(0,r.useMemo)(()=>{let e=new Map;for(let t of i){let s=t.wave||1;e.has(s)||e.set(s,[]),e.get(s).push(t)}return[...e.entries()].sort((e,t)=>e[0]-t[0])},[i]),{preWave:f,tail:j}=(0,r.useMemo)(()=>{let e,t=u.map(e=>{let[t,s]=e;return[t,Math.min(...s.map(e=>e.createdAt))]}),s=new Map;for(let n of d){let a=t.find(e=>{let[,t]=e;return n.t<t+1e3});a?s.set(a[0],n):e=n}return{preWave:s,tail:e}},[u,d]),g=e=>{let t=l.filter(t=>t.taskId===e.id&&"running"===t.status);return t[t.length-1]},k=["planning","running","synthesizing"].includes(c),b="planning"===c&&0===i.length,v=null==(t=u[0])?void 0:t[0],N=null!=(a=void 0!==v?null==(s=f.get(v))?void 0:s.text:void 0)?a:b?null==j?void 0:j.text:void 0;return(0,n.jsxs)("div",{className:"spine flex flex-col gap-6",children:[(0,n.jsx)(I,{status:c,latest:N,taskCount:i.length}),b?(0,n.jsx)("div",{className:"spine-item",children:(0,n.jsx)("div",{className:"panel",children:(0,n.jsx)(m.pp,{glyph:"◌",title:"Conductor is planning…",sub:"Decomposing your mission into the first wave of parallel tasks."})})}):0===i.length?(0,n.jsx)("div",{className:"spine-item",children:(0,n.jsx)("div",{className:"panel",children:(0,n.jsx)(m.pp,{glyph:"◇",title:"No tasks yet",sub:"The conductor hasn't spawned any work."})})}):u.map((e,t)=>{let[s,a]=e;return(0,n.jsxs)(r.Fragment,{children:[t>0&&f.get(s)&&(0,n.jsx)(P,{text:f.get(s).text}),(0,n.jsx)(H,{wave:s,group:a,agentForTask:g,now:x,onSelect:h})]},s)}),!b&&j&&(0,n.jsx)(P,{text:j.text,pulse:k}),!k&&(o?(0,n.jsx)(B,{summary:o,onOpenReport:p}):(0,n.jsx)(W,{status:c}))]})}function I(e){let{status:t,latest:s,taskCount:a}=e,i=["planning","running","synthesizing"].includes(t);return(0,n.jsxs)("div",{className:"spine-item",children:[(0,n.jsx)("span",{className:"spine-node text-ink",style:{boxShadow:i?E:"none",transition:"box-shadow 0.4s"},children:"◉"}),(0,n.jsxs)("div",{className:"flex items-baseline gap-2.5",children:[(0,n.jsx)("span",{className:"font-semibold text-sm tracking-tight text-ink",children:"Conductor"}),(0,n.jsx)("span",{className:"mono text-2xs text-ink-faint",children:"synthesizing"===t?"synthesizing the final report":"orchestrating ".concat(a," task").concat(1!==a?"s":"")})]}),(0,n.jsx)("p",{className:"text-xs leading-snug mt-1 line-clamp-2 text-ink-dim",children:s||(i?"coordinating the swarm…":"idle")})]})}function P(e){let{text:t,pulse:s}=e;return(0,n.jsxs)("div",{className:"spine-item",style:{animation:"var(--animate-rise)"},children:[(0,n.jsx)("span",{className:"spine-node",style:{boxShadow:s?E:void 0,transition:"box-shadow 0.4s"},children:"◉"}),(0,n.jsx)("p",{className:"text-xs leading-snug line-clamp-2 text-ink-dim",style:{minHeight:21,animation:s?"var(--animate-pulse-soft)":void 0},children:t})]})}function H(e){let{wave:t,group:s,agentForTask:a,now:i,onSelect:l}=e,r=s.filter(e=>O.includes(e.status)),c=s.filter(e=>!O.includes(e.status)),d=r.filter(e=>"failed"===e.status).length;return(0,n.jsxs)("div",{className:"spine-item",style:{animation:"var(--animate-rise)"},children:[(0,n.jsx)("span",{className:"spine-node",style:{fontSize:10},children:t}),(0,n.jsxs)("div",{className:"flex items-center gap-3 mb-2.5",style:{minHeight:21},children:[(0,n.jsxs)("span",{className:"label",children:["Wave ",t]}),(0,n.jsxs)("span",{className:"mono text-2xs ".concat(d?"text-ink":"text-ink-faint"),children:[r.length,"/",s.length," settled",d?" \xb7 ".concat(d," failed"):""]}),(0,n.jsx)("span",{className:"flex-1 h-px bg-border-soft"})]}),r.length>0&&(0,n.jsx)("div",{className:"tile divide-y divide-border-soft overflow-hidden",children:r.map(e=>(0,n.jsx)(F,{task:e,now:i,onClick:()=>l(e)},e.id))}),c.length>0&&(0,n.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 ".concat(r.length>0?"mt-3":""),children:c.map(e=>(0,n.jsx)(A,{task:e,agent:a(e),now:i,onClick:()=>l(e)},e.id))})]})}function B(e){let{summary:t,onOpenReport:s}=e;return(0,n.jsxs)("div",{className:"spine-item",style:{animation:"var(--animate-rise)"},children:[(0,n.jsx)("span",{className:"spine-node text-ink",children:"✓"}),(0,n.jsxs)("div",{className:"panel p-4",style:{borderColor:"rgb(var(--hi) / 0.22)",background:"rgb(var(--hi) / 0.03)"},children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-3 mb-1.5",children:[(0,n.jsx)("div",{className:"label text-ink",children:"✓ Mission summary"}),(0,n.jsx)("button",{className:"btn btn-sm shrink-0",onClick:s,children:"Open full report →"})]}),(0,n.jsx)(m.OQ,{lines:4,children:(0,n.jsx)(m.Md,{compact:!0,children:t})})]})]})}function W(e){let{status:t}=e;return(0,n.jsxs)("div",{className:"spine-item",style:{animation:"var(--animate-rise)"},children:[(0,n.jsx)("span",{className:"spine-node",children:"failed"===t?"✗":"cancelled"===t?"⊘":"■"}),(0,n.jsxs)("p",{className:"text-xs text-ink-faint flex items-center",style:{minHeight:21},children:["run ended — ",t]})]})}function _(e){var t,s;let{runId:a,task:i,agents:l,now:c,onClose:d}=e;if((0,r.useEffect)(()=>{let e=e=>"Escape"===e.key&&d();return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[d]),!i)return null;let h=l.filter(e=>e.taskId===i.id),p=h[h.length-1],u=(0,x.ST)(i.status);return(0,n.jsxs)("div",{className:"fixed inset-0 z-50 flex justify-end",style:{animation:"var(--animate-fade-in)"},children:[(0,n.jsx)("div",{className:"absolute inset-0",style:{background:"rgba(0,0,0,0.55)",backdropFilter:"blur(2px)"},onClick:d}),(0,n.jsxs)("div",{className:"relative h-full overflow-y-auto",style:{width:"min(580px, 94vw)",background:"var(--color-bg-soft)",borderLeft:"1px solid var(--color-border)",animation:"var(--animate-slide-in)"},children:[(0,n.jsxs)("div",{className:"sticky top-0 z-10 px-6 pt-5 pb-4 border-b border-border-soft",style:{background:"color-mix(in oklab, var(--color-bg-soft) 88%, transparent)",backdropFilter:"blur(12px)"},children:[(0,n.jsxs)("div",{className:"flex items-start justify-between gap-3 mb-2.5",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2.5 flex-wrap",children:[(0,n.jsx)(v,{seed:i.id,size:30}),(0,n.jsx)("span",{className:"mono font-bold text-lg",style:{color:u},children:i.id}),(0,n.jsx)("span",{className:"text-sm font-medium text-ink-dim",children:b(i.id)}),(0,n.jsx)(m.Wh,{status:i.status}),(0,n.jsx)("span",{className:"text-2xs text-ink-faint",children:i.role})]}),(0,n.jsx)("button",{onClick:d,className:"btn btn-sm shrink-0",children:"esc ✕"})]}),(0,n.jsx)("h2",{className:"text-lg font-semibold leading-snug",children:i.title}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-x-3 gap-y-1 text-2xs mt-1.5 text-ink-faint",children:[(0,n.jsxs)("span",{children:["wave ",i.wave]}),i.team&&(0,n.jsx)("span",{className:"text-ink-dim",children:"⌬ sub-swarm"}),i.modelTier&&"default"!==i.modelTier&&(0,n.jsxs)("span",{className:"mono text-ink-dim",children:[i.modelTier," tier"]}),i.deps.length>0&&(0,n.jsxs)("span",{className:"mono",children:["⇠ ",i.deps.join(", ")]}),i.verify&&(0,n.jsx)("span",{className:"text-ink-dim",children:"⊛ adversarially verified"}),i.attempt>1&&(0,n.jsxs)("span",{className:"text-ink-dim",children:["attempt ",i.attempt]}),i.startedAt&&(0,n.jsx)("span",{className:"mono",children:(0,x.nc)((null!=(t=i.endedAt)?t:c)-i.startedAt)})]})]}),(0,n.jsxs)("div",{className:"px-6 py-5",children:[(0,n.jsx)(Q,{task:i}),(0,n.jsx)(V,{title:"Objective",children:(0,n.jsx)(m.OQ,{lines:3,children:(0,n.jsx)(m.Md,{compact:!0,children:i.objective})})}),i.context&&(0,n.jsx)(V,{title:"Context from the conductor",children:(0,n.jsx)(m.OQ,{lines:3,children:(0,n.jsx)(m.Md,{compact:!0,dim:!0,children:i.context})})}),i.report&&(0,n.jsx)(V,{title:"failed"===(s=i).status||"blocked"===s.status?"Last report (unverified \xb7 attempt ".concat(s.attempt,")"):"verifying"===s.status?"Report (being verified)":"Report",children:(0,n.jsx)("div",{className:"rounded-xl px-4 py-3.5 border border-border-soft",style:{background:"var(--input-bg)"},children:(0,n.jsx)(m.OQ,{lines:10,children:(0,n.jsx)(m.Md,{compact:!0,dim:"failed"===i.status||"blocked"===i.status,children:i.report})})})}),i.keyFacts&&i.keyFacts.length>0&&(0,n.jsx)(V,{title:"Key facts (handoff)",children:(0,n.jsx)("ul",{className:"space-y-1.5",children:i.keyFacts.map((e,t)=>(0,n.jsxs)("li",{className:"flex items-start gap-2 text-xs leading-relaxed text-ink-dim",children:[(0,n.jsx)("span",{className:"text-ink-faint shrink-0",style:{marginTop:1},children:"◆"}),(0,n.jsx)(m.Md,{compact:!0,dim:!0,children:e})]},t))})}),i.openQuestions&&i.openQuestions.length>0&&(0,n.jsx)(V,{title:"Open questions",children:(0,n.jsx)("ul",{className:"space-y-1.5",children:i.openQuestions.map((e,t)=>(0,n.jsxs)("li",{className:"flex items-start gap-2 text-xs leading-relaxed text-ink-faint",children:[(0,n.jsx)("span",{className:"shrink-0",style:{marginTop:1},children:"?"}),(0,n.jsx)(m.Md,{compact:!0,dim:!0,children:e})]},t))})}),i.filesTouched&&i.filesTouched.length>0&&(0,n.jsx)(V,{title:"Files touched \xb7 ".concat(i.filesTouched.length),children:(0,n.jsx)("div",{className:"flex flex-wrap gap-1.5",children:i.filesTouched.map(e=>(0,n.jsx)("span",{className:"chip",children:e},e))})}),i.lastCheckpoint&&"done"!==i.status&&(0,n.jsx)(V,{title:"Latest checkpoint",children:(0,n.jsx)("div",{className:"rounded-xl px-3.5 py-3 border border-border-soft",style:{background:"rgb(var(--hi) / 0.02)"},children:(0,n.jsx)(m.Md,{compact:!0,dim:!0,children:i.lastCheckpoint})})}),i.feedback&&"failed"!==i.status&&"blocked"!==i.status&&(0,n.jsx)(V,{title:"Verifier feedback (previous attempt)",children:(0,n.jsx)("div",{className:"rounded-xl p-3.5",style:{background:"rgb(var(--hi) / 0.03)",border:"1px solid rgb(var(--hi) / 0.16)"},children:(0,n.jsx)(m.OQ,{lines:5,children:(0,n.jsx)(m.Md,{compact:!0,dim:!0,children:i.feedback})})})}),i.artifacts.length>0&&(0,n.jsx)(V,{title:"Artifacts \xb7 ".concat(i.artifacts.length),children:(0,n.jsx)("div",{className:"flex flex-col gap-1.5",children:i.artifacts.map(e=>(0,n.jsxs)("a",{href:o.F.artifactUrl(a,e),target:"_blank",rel:"noreferrer",className:"flex items-center gap-2 px-3 py-2 tile tile-hover text-ink",children:[(0,n.jsx)("span",{className:"mono text-xs truncate flex-1",children:e}),(0,n.jsx)("span",{className:"mono text-2xs text-ink-dim",children:"open ↗"})]},e))})}),h.length>0&&(0,n.jsx)(V,{title:"Agents \xb7 ".concat(h.length),children:(0,n.jsx)("div",{className:"flex flex-col gap-2",children:h.map((e,t)=>(0,n.jsx)(U,{agent:e,now:c,expanded:e===p,attempt:t+1},e.id))})})]})]})]})}function Q(e){var t,s,a,i;let{task:l}=e;if("failed"!==l.status&&"blocked"!==l.status)return null;let r=null!=(a=null==(t=l.error)?void 0:t.trim())?a:"",c=null!=(i=null==(s=l.feedback)?void 0:s.trim())?i:"",d=!!r&&!!c&&(r===c||r.startsWith(c.slice(0,80))||c.startsWith(r.slice(0,80))),o=d?c:r||c;return o?(0,n.jsx)(V,{title:"blocked"===l.status?"Why it's blocked":"Why it failed",children:(0,n.jsxs)("div",{className:"rounded-xl p-3.5",style:{background:"rgb(var(--hi) / 0.05)",border:"1px solid rgb(var(--hi) / 0.22)"},children:[(0,n.jsx)(m.OQ,{lines:6,children:(0,n.jsx)(m.Md,{compact:!0,children:o})}),!d&&r&&c&&(0,n.jsxs)("div",{className:"mt-2.5 pt-2.5 border-t border-border-soft",children:[(0,n.jsx)("div",{className:"label mb-1",children:"Verifier feedback"}),(0,n.jsx)(m.OQ,{lines:6,children:(0,n.jsx)(m.Md,{compact:!0,dim:!0,children:c})})]})]})}):null}function U(e){var t;let{agent:s,now:a,expanded:i,attempt:l}=e,[c,d]=(0,r.useState)(i),o="running"===s.status,h=(0,x.nc)((null!=(t=s.endedAt)?t:a)-s.startedAt);return(0,n.jsxs)("div",{className:"tile overflow-hidden",children:[(0,n.jsxs)("button",{onClick:()=>d(e=>!e),className:"w-full flex items-center gap-2 px-3 py-2.5 text-left",children:[(0,n.jsx)("span",{className:"rounded-full shrink-0",style:{width:7,height:7,background:o?"var(--color-ink)":"var(--color-ink-faint)"}}),(0,n.jsx)("span",{className:"mono text-2xs text-ink-dim",children:s.id}),(0,n.jsx)("span",{className:"text-2xs text-ink-dim",children:s.role}),(0,n.jsxs)("span",{className:"mono text-2xs ml-auto shrink-0 text-ink-faint",children:["#",l," \xb7 ",s.steps," steps \xb7 ",h,o?" \xb7 live":""]}),(0,n.jsx)("span",{className:"text-ink-faint",style:{fontSize:9,transform:c?"rotate(180deg)":"none",transition:"transform 0.15s"},children:"▼"})]}),c&&(0,n.jsxs)("div",{className:"px-3 pb-3 space-y-2.5 border-t border-border-soft",style:{paddingTop:10},children:[s.lastThink&&(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"label mb-1",children:"reasoning"}),(0,n.jsx)("div",{className:"text-xs leading-relaxed whitespace-pre-wrap mono text-ink-faint",style:{maxHeight:180,overflow:"auto"},children:s.lastThink.slice(-1400)})]}),s.lastText&&(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"label mb-1",children:"output"}),(0,n.jsx)("div",{style:{maxHeight:180,overflow:"auto"},children:(0,n.jsx)(m.Md,{compact:!0,dim:!0,children:s.lastText.slice(-1400)})})]}),!s.lastThink&&!s.lastText&&(0,n.jsx)("div",{className:"text-2xs text-ink-faint",children:o?"Waiting for the first output…":"No captured output."}),s.lastTool&&(0,n.jsxs)("div",{className:"text-2xs mono text-ink-faint",children:["last tool: ",s.lastTool]})]})]})}function V(e){let{title:t,children:s}=e;return(0,n.jsxs)("div",{className:"mb-6",children:[(0,n.jsx)("div",{className:"label mb-2",children:t}),s]})}var D=s(830),$=s(6168);function q(){let e=(0,l.useSearchParams)().get("id"),{data:t,connected:s,engineLive:a}=(0,$.Xt)(e),c=(0,$.cB)(1e3),[d,o]=(0,r.useState)(null),[p,j]=(0,r.useState)("swarm"),[g,k]=(0,r.useState)(!1),[b,v]=(0,r.useState)(!1);(0,r.useEffect)(()=>{v(!1);let e=setTimeout(()=>v(!0),8e3);return()=>clearTimeout(e)},[e]);let y=!!t&&["done","failed","cancelled"].includes(t.status);(0,r.useEffect)(()=>{y&&!g&&((null==t?void 0:t.finalSummary)||(null==t?void 0:t.finalReportPath))&&(j("report"),k(!0))},[y,g,null==t?void 0:t.finalSummary,null==t?void 0:t.finalReportPath]);let w=(0,r.useMemo)(()=>{var e;return t&&d&&null!=(e=t.tasks.find(e=>e.id===d))?e:null},[t,d]),S=(0,r.useMemo)(()=>{if(!t)return 0;let e=new Set;for(let s of t.tasks)for(let t of s.artifacts)e.add(t);return t.finalReportPath&&e.add("final-report.md"),e.size},[t]);if(!e)return(0,n.jsxs)("div",{className:"min-h-screen",children:[(0,n.jsx)(D.V,{}),(0,n.jsxs)("div",{className:"max-w-3xl mx-auto p-10 text-center text-ink-dim",children:["No run id. ",(0,n.jsx)(i(),{href:"/",className:"underline",children:"Back to dashboard"})]})]});if(!t||!t.meta)return(0,n.jsxs)("div",{className:"min-h-screen",children:[(0,n.jsx)(D.V,{}),(0,n.jsxs)("div",{className:"max-w-3xl mx-auto p-16 text-center",children:[(0,n.jsxs)("div",{className:"flex items-center justify-center gap-3 text-ink-faint",children:[(0,n.jsx)(m.y$,{})," connecting to run…"]}),b&&(0,n.jsxs)("div",{className:"mt-6 text-sm leading-relaxed text-ink-dim",style:{animation:"var(--animate-rise)"},children:["Still connecting. This run id may not exist, or the hub isn't reachable — check that"," ",(0,n.jsx)("span",{className:"mono text-ink",children:"swarm serve"})," is running.",(0,n.jsx)("div",{className:"mt-3",children:(0,n.jsx)(i(),{href:"/",className:"btn btn-sm",style:{display:"inline-flex"},children:"Back to dashboard"})})]})]})]});let T=t.meta,C=t.usage.promptTokens+t.usage.completionTokens,M=T.options.maxTokens,R=!y,z="failed"===t.status,A=z&&/auth|api key|rejected|401/i.test(t.statusReason||""),F=R&&!1===a,E=(0,x.nc)(((y||F)&&t.updatedAt?t.updatedAt:c)-T.createdAt),O={done:t.tasks.filter(e=>"done"===e.status).length,failed:t.tasks.filter(e=>"failed"===e.status).length,blocked:t.tasks.filter(e=>"blocked"===e.status).length,total:t.tasks.length},I=t.usage.promptTokens>0?Math.round(t.usage.cacheHitTokens/t.usage.promptTokens*100):0,P=[T.options.model,T.sandbox?"isolated workspace":"real directory","".concat(T.options.maxWorkers,"\xd7 parallel"),..."off"!==T.options.verification?["verify ".concat(T.options.verification)]:[]].join(" \xb7 ");return(0,n.jsxs)("div",{className:"min-h-screen",children:[(0,n.jsx)(D.V,{right:(0,n.jsxs)("span",{className:"hidden md:flex items-center gap-2 text-2xs text-ink-faint",children:[(0,n.jsx)(m.md,{status:s?R?"running":t.status:"failed",size:7,pulse:s&&R}),s?R?"live":"loaded":"reconnecting…"]})}),(0,n.jsxs)("main",{className:"max-w-[1400px] mx-auto px-4 sm:px-6 py-5 grid grid-cols-1 lg:grid-cols-[minmax(0,1fr)_380px] gap-5 items-start",children:[(0,n.jsxs)("div",{className:"min-w-0",children:[z&&(0,n.jsxs)(J,{glyph:"✕",title:"This run failed",children:[t.statusReason||"The run ended without completing.",A&&(0,n.jsx)(i(),{href:"/settings",className:"btn btn-sm mt-3",style:{display:"inline-flex"},children:"Fix your API key in Settings"})]}),F&&(0,n.jsxs)(J,{glyph:"◌",title:"Engine process is not running",children:["This run was interrupted before it could finish — the journal shows its last known state. Resuming keeps completed work and re-runs only the tasks that were in flight.",(0,n.jsx)("div",{className:"mt-3",children:(0,n.jsx)(K,{id:e})})]}),(0,n.jsxs)("div",{className:"panel p-4 mb-4",children:[(0,n.jsxs)("div",{className:"flex items-start justify-between gap-4 flex-wrap",children:[(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsx)("h1",{className:"text-base font-semibold leading-snug mb-1.5 text-ink",children:T.mission}),(0,n.jsxs)("div",{className:"flex items-center gap-x-3 gap-y-1.5 flex-wrap",children:[(0,n.jsx)(m.Wh,{status:t.status}),(0,n.jsx)("span",{className:"mono text-2xs text-ink-faint",children:P}),(0,n.jsxs)("button",{className:"mono text-2xs text-ink-faint hover:text-ink-dim transition-colors",title:"Copy run id",onClick:()=>{var t;return null==(t=navigator.clipboard)?void 0:t.writeText(e).catch(()=>{})},children:[e," ⧉"]})]}),t.statusReason&&y&&(0,n.jsx)("p",{className:"text-xs mt-2 text-ink-faint",children:t.statusReason})]}),(0,n.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,n.jsx)(f,{id:e,live:R&&!F}),(t.finalSummary||y)&&"report"!==p&&(0,n.jsx)("button",{onClick:()=>j("report"),className:"btn",children:"View report"})]})]}),(0,n.jsxs)("div",{className:"mono text-2xs text-ink-faint mt-3 flex flex-wrap items-center gap-x-2 gap-y-1",children:[(0,n.jsxs)("span",{className:"text-ink-dim",children:[O.done,"/",O.total," tasks"]}),O.failed>0&&(0,n.jsxs)("span",{className:"text-ink font-bold",children:[O.failed," failed"]}),O.blocked>0&&(0,n.jsxs)("span",{className:"text-ink font-bold",children:[O.blocked," blocked"]}),(0,n.jsx)("span",{children:"\xb7"}),(0,n.jsxs)("span",{children:[t.activeAgents.length," active"]}),(0,n.jsx)("span",{children:"\xb7"}),(0,n.jsxs)("span",{children:[(0,x.yj)(C)," tok",I>0?" \xb7 ".concat(I,"% cached"):""]}),(0,n.jsx)("span",{children:"\xb7"}),(0,n.jsxs)("span",{title:"total artifacts saved by the swarm",children:["↧ ",S," sources"]}),(0,n.jsx)("span",{children:"\xb7"}),(0,n.jsx)("span",{children:(0,x.S8)(t.cost)}),(0,n.jsx)("span",{children:"\xb7"}),(0,n.jsx)("span",{children:E})]}),(0,n.jsxs)("div",{className:"mt-3 flex items-center gap-3",children:[(0,n.jsx)("div",{className:"flex-1 min-w-0",children:(0,n.jsx)(m.jT,{spent:C,cap:M,height:3})}),t.budgetSeries.length>2&&(0,n.jsx)("span",{className:"shrink-0 text-ink-faint hidden sm:block",title:"token spend over time (".concat((0,x.yj)(C)," total)"),children:(0,n.jsx)(m.OW,{points:t.budgetSeries.map(e=>e.tokens),width:96,height:20})}),(0,n.jsxs)("span",{className:"mono text-2xs text-ink-faint shrink-0",children:[M>0?Math.min(100,Math.round(C/M*100)):0,"% of ",(0,x.yj)(M)]})]}),R&&!F&&(0,n.jsx)("div",{className:"mt-3",children:(0,n.jsx)(u,{id:e})})]}),(0,n.jsxs)("div",{className:"flex items-center gap-6 mb-4 border-b border-border-soft",children:[(0,n.jsx)("button",{className:"tab","data-active":"swarm"===p,onClick:()=>j("swarm"),children:"Swarm"}),(0,n.jsxs)("button",{className:"tab","data-active":"report"===p,onClick:()=>j("report"),children:["Report",t.finalSummary?(0,n.jsx)("span",{className:"text-ink",children:"✓"}):null,S>0&&(0,n.jsx)("span",{className:"mono text-2xs text-ink-faint",children:S})]})]}),"swarm"===p?(0,n.jsx)("div",{className:"min-w-0",children:(0,n.jsx)(L,{tasks:t.tasks,agents:t.agents,status:t.status,conductorLog:t.conductorLog,finalSummary:t.finalSummary,now:c,onSelect:e=>o(e.id),onOpenReport:()=>j("report")})}):(0,n.jsx)(h,{id:e,hasFinal:!!t.finalSummary,live:R})]}),(0,n.jsx)(N,{runId:e,activity:t.activity,conductorLog:t.conductorLog,notes:t.notes,operatorNotes:t.operatorNotes,planUpdatedAt:t.planUpdatedAt,now:c})]}),(0,n.jsx)(_,{runId:e,task:w,agents:t.agents,now:c,onClose:()=>o(null)})]})}function K(e){let{id:t}=e,[s,a]=(0,r.useState)("idle");return(0,n.jsxs)("button",{className:"btn btn-sm",disabled:"resuming"===s,onClick:async()=>{a("resuming");try{await o.F.resume(t)}catch(e){a("error")}},children:["resuming"===s?(0,n.jsx)(m.y$,{size:12}):null,"error"===s?"Resume failed — retry":"Resume run"]})}function J(e){let{glyph:t,title:s,children:a}=e;return(0,n.jsxs)("div",{className:"panel p-4 mb-5 flex items-start gap-3.5",style:{borderColor:"rgb(var(--hi) / 0.28)",background:"rgb(var(--hi) / 0.03)",animation:"var(--animate-rise)"},children:[(0,n.jsx)("span",{className:"glyph shrink-0 text-ink",style:{width:30,height:30,fontSize:13},children:t}),(0,n.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,n.jsx)("div",{className:"font-semibold text-ink",children:s}),(0,n.jsx)("div",{className:"text-sm mt-0.5 leading-relaxed text-ink-dim",children:a})]})]})}function X(){return(0,n.jsx)(r.Suspense,{fallback:(0,n.jsx)("div",{className:"min-h-screen grid place-items-center text-ink-faint",children:(0,n.jsx)(m.y$,{})}),children:(0,n.jsx)(q,{})})}}},e=>{e.O(0,[532,677,441,255,358],()=>e(e.s=4218)),_N_E=e.O()}]);
|
/package/ui/out/_next/static/{7_pihFubDGD40BCy2ynlr → JFkx5KtNi0DYyqm_THzbY}/_buildManifest.js
RENAMED
|
File without changes
|
/package/ui/out/_next/static/{7_pihFubDGD40BCy2ynlr → JFkx5KtNi0DYyqm_THzbY}/_ssgManifest.js
RENAMED
|
File without changes
|