@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/webtools.js CHANGED
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.webSearch = webSearch;
4
+ exports.searchEngines = searchEngines;
4
5
  exports._resetEngineCooldowns = _resetEngineCooldowns;
5
6
  exports.tinyfishSearch = tinyfishSearch;
6
7
  exports.ddgSearch = ddgSearch;
@@ -32,16 +33,25 @@ async function webSearch(cfg, query, count, signal, deep = false, warn, _retried
32
33
  // path stays a single query so an agent's tool loop isn't slowed.
33
34
  const queries = deep ? (0, searchcore_1.expandQueries)(query) : [query];
34
35
  const perEngine = Math.min(count, 15);
36
+ const engines = searchEngines(cfg);
35
37
  const engineCalls = [];
36
38
  for (const q of queries) {
37
- if (cfg.searchBackend === "tinyfish" && cfg.tinyfishApiKey) {
38
- engineCalls.push(tinyfishSearch(cfg, q, perEngine, signal));
39
- }
40
- else {
41
- engineCalls.push(ddgSearch(q, perEngine, signal), bingSearch(q, perEngine, signal));
42
- if (cfg.searchBackend === "auto" && cfg.tinyfishApiKey) {
43
- engineCalls.push(tinyfishSearch(cfg, q, perEngine, signal));
39
+ for (const e of engines) {
40
+ let call = e.search(q, perEngine, signal);
41
+ // When TinyFish is the sole engine by configuration, an outage must not
42
+ // blank web research for the whole mission — fall back to the free
43
+ // scraping engines for this call.
44
+ if (engines.length === 1 && e.name === "tinyfish") {
45
+ call = call.catch(async (err) => {
46
+ warn?.(`tinyfish failed (${(0, util_1.errMsg)(err)}); falling back to duckduckgo/bing`);
47
+ const fallback = await Promise.allSettled([ddgSearch(q, perEngine, signal), bingSearch(q, perEngine, signal)]);
48
+ const hits = fallback.flatMap((s) => (s.status === "fulfilled" ? s.value : []));
49
+ if (!hits.length && fallback.every((s) => s.status === "rejected"))
50
+ throw err;
51
+ return hits;
52
+ });
44
53
  }
54
+ engineCalls.push(call);
45
55
  }
46
56
  }
47
57
  // Scholarly questions also sweep the keyless academic APIs (deep mode only).
@@ -63,8 +73,10 @@ async function webSearch(cfg, query, count, signal, deep = false, warn, _retried
63
73
  return webSearch(cfg, alt, count, signal, deep, warn, true);
64
74
  }
65
75
  }
76
+ // At least one engine answered with a genuine empty result set: that is
77
+ // "no results", not an error, even if another engine failed alongside it.
66
78
  if (firstErr)
67
- throw firstErr.reason;
79
+ warn?.(`no results (and ${(0, util_1.errMsg)(firstErr.reason)})`);
68
80
  return [];
69
81
  }
70
82
  const failures = settled.filter((s) => s.status === "rejected").length;
@@ -119,7 +131,7 @@ async function fetchReadable(url, signal) {
119
131
  try {
120
132
  const res = await fetch(`https://raw.githubusercontent.com/${gh[1]}/${gh[2]}/${branch}/README.md`, {
121
133
  headers: { "user-agent": UA },
122
- signal: mergeSignal(20_000, signal),
134
+ signal: (0, util_1.mergeSignal)(20_000, signal),
123
135
  });
124
136
  if (res.ok)
125
137
  return clip(await res.text());
@@ -131,7 +143,7 @@ async function fetchReadable(url, signal) {
131
143
  }
132
144
  const res = await fetch(url, {
133
145
  headers: { "user-agent": UA, accept: "text/html,application/pdf,text/*;q=0.9,*/*;q=0.5" },
134
- signal: mergeSignal(20_000, signal),
146
+ signal: (0, util_1.mergeSignal)(20_000, signal),
135
147
  redirect: "follow",
136
148
  });
137
149
  if (!res.ok)
@@ -154,13 +166,24 @@ function clip(text) {
154
166
  const words = text.replace(/\s+/g, " ").trim().split(" ");
155
167
  return words.slice(0, 3000).join(" ");
156
168
  }
157
- function mergeSignal(timeoutMs, signal) {
158
- const t = AbortSignal.timeout(timeoutMs);
159
- if (!signal)
160
- return t;
161
- return typeof AbortSignal.any === "function" ? AbortSignal.any([t, signal]) : signal;
169
+ /**
170
+ * The engine set a web_search call fans out to under the given config —
171
+ * the single source of truth shared by webSearch and the settings
172
+ * diagnostics endpoint, so "Test search" probes exactly what runs use.
173
+ */
174
+ function searchEngines(cfg) {
175
+ if (cfg.searchBackend === "tinyfish" && cfg.tinyfishApiKey) {
176
+ return [{ name: "tinyfish", search: (q, n, s) => tinyfishSearch(cfg, q, n, s) }];
177
+ }
178
+ const engines = [
179
+ { name: "duckduckgo", search: ddgSearch },
180
+ { name: "bing", search: bingSearch },
181
+ ];
182
+ if (cfg.searchBackend === "auto" && cfg.tinyfishApiKey) {
183
+ engines.push({ name: "tinyfish", search: (q, n, s) => tinyfishSearch(cfg, q, n, s) });
184
+ }
185
+ return engines;
162
186
  }
163
- // ---------------------------------------------------------------- engines
164
187
  /**
165
188
  * Per-engine rate-limit cooldowns: an engine that answers 429/403/503 sits
166
189
  * out (60s, or the server's retry-after up to 120s) instead of getting
@@ -178,7 +201,7 @@ async function engineFetch(engine, url, init, signal) {
178
201
  throw new Error(`${engine} is cooling down after a rate limit (${Math.ceil((until - Date.now()) / 1000)}s left)`);
179
202
  }
180
203
  for (let attempt = 0;; attempt++) {
181
- const res = await fetch(url, { ...init, signal: mergeSignal(20_000, signal) });
204
+ const res = await fetch(url, { ...init, signal: (0, util_1.mergeSignal)(20_000, signal) });
182
205
  if (![429, 403, 503].includes(res.status))
183
206
  return res;
184
207
  const retryAfter = Number(res.headers.get("retry-after"));
@@ -195,7 +218,7 @@ async function tinyfishSearch(cfg, query, count, signal) {
195
218
  const url = `https://api.search.tinyfish.ai?query=${encodeURIComponent(query)}`;
196
219
  const res = await fetch(url, {
197
220
  headers: { "X-API-Key": cfg.tinyfishApiKey },
198
- signal: mergeSignal(20_000, signal),
221
+ signal: (0, util_1.mergeSignal)(20_000, signal),
199
222
  });
200
223
  if (!res.ok)
201
224
  throw new Error(`tinyfish search ${res.status}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robzilla1738/agentswarm",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -1 +1 @@
1
- <!DOCTYPE html><!--7_pihFubDGD40BCy2ynlr--><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><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><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 style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>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)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></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[4431,[],\"OutletBoundary\"]\n6:I[5278,[],\"AsyncMetadataOutlet\"]\n8:I[4431,[],\"ViewportBoundary\"]\na:I[4431,[],\"MetadataBoundary\"]\nb:\"$Sreact.suspense\"\nd: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\":\"7_pihFubDGD40BCy2ynlr\",\"p\":\"\",\"c\":[\"\",\"_not-found\",\"\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"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\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$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\":[[[\"$\",\"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.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$L5\",[\"$\",\"$L6\",null,{\"promise\":\"$@7\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]],[\"$\",\"$La\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$b\",null,{\"fallback\":null,\"children\":\"$Lc\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$d\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"2\",{\"name\":\"theme-color\",\"content\":\"#050505\"}]]\n5:null\n"])</script><script>self.__next_f.push([1,"e:I[622,[],\"IconMark\"]\n7:{\"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\"}],[\"$\",\"$Le\",\"3\",{}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"c:\"$7:metadata\"\n"])</script></body></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><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><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 style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>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)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></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[4431,[],\"OutletBoundary\"]\n6:I[5278,[],\"AsyncMetadataOutlet\"]\n8:I[4431,[],\"ViewportBoundary\"]\na:I[4431,[],\"MetadataBoundary\"]\nb:\"$Sreact.suspense\"\nd: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\":[\"\",\"_not-found\",\"\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"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\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$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\":[[[\"$\",\"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.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$L5\",[\"$\",\"$L6\",null,{\"promise\":\"$@7\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]],[\"$\",\"$La\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$b\",null,{\"fallback\":null,\"children\":\"$Lc\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$d\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"2\",{\"name\":\"theme-color\",\"content\":\"#050505\"}]]\n5:null\n"])</script><script>self.__next_f.push([1,"e:I[622,[],\"IconMark\"]\n7:{\"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\"}],[\"$\",\"$Le\",\"3\",{}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"c:\"$7:metadata\"\n"])</script></body></html>
package/ui/out/404.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><!--7_pihFubDGD40BCy2ynlr--><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><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><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 style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>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)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></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[4431,[],\"OutletBoundary\"]\n6:I[5278,[],\"AsyncMetadataOutlet\"]\n8:I[4431,[],\"ViewportBoundary\"]\na:I[4431,[],\"MetadataBoundary\"]\nb:\"$Sreact.suspense\"\nd: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\":\"7_pihFubDGD40BCy2ynlr\",\"p\":\"\",\"c\":[\"\",\"_not-found\",\"\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"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\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$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\":[[[\"$\",\"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.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$L5\",[\"$\",\"$L6\",null,{\"promise\":\"$@7\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]],[\"$\",\"$La\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$b\",null,{\"fallback\":null,\"children\":\"$Lc\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$d\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"2\",{\"name\":\"theme-color\",\"content\":\"#050505\"}]]\n5:null\n"])</script><script>self.__next_f.push([1,"e:I[622,[],\"IconMark\"]\n7:{\"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\"}],[\"$\",\"$Le\",\"3\",{}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"c:\"$7:metadata\"\n"])</script></body></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><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><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 style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>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)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></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[4431,[],\"OutletBoundary\"]\n6:I[5278,[],\"AsyncMetadataOutlet\"]\n8:I[4431,[],\"ViewportBoundary\"]\na:I[4431,[],\"MetadataBoundary\"]\nb:\"$Sreact.suspense\"\nd: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\":[\"\",\"_not-found\",\"\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"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\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$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\":[[[\"$\",\"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.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$L5\",[\"$\",\"$L6\",null,{\"promise\":\"$@7\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]],[\"$\",\"$La\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$b\",null,{\"fallback\":null,\"children\":\"$Lc\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$d\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"2\",{\"name\":\"theme-color\",\"content\":\"#050505\"}]]\n5:null\n"])</script><script>self.__next_f.push([1,"e:I[622,[],\"IconMark\"]\n7:{\"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\"}],[\"$\",\"$Le\",\"3\",{}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"c:\"$7:metadata\"\n"])</script></body></html>
@@ -0,0 +1 @@
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:()=>v,cB:()=>x,Xt:()=>m,Iq:()=>k});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,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){t.usage={promptTokens:t.usage.promptTokens+e.promptTokens,completionTokens:t.usage.completionTokens+e.completionTokens,cacheHitTokens:t.usage.cacheHitTokens+e.cacheHitTokens,cacheMissTokens:t.usage.cacheMissTokens+e.cacheMissTokens}}function h(t,e){var n;let a=null!=(n=i[null!=t?t:""])?n:{inMiss:0,inHit:0,out:0};return((e.cacheMissTokens||Math.max(0,e.promptTokens-e.cacheHitTokens))*a.inMiss+e.cacheHitTokens*a.inHit+e.completionTokens*a.out)/1e6}function f(t,e,n){let a={t:e.t,taskId:e.taskId,teamId:n,agentId:e.agentId,key:e.key,kind:e.kind,text:e.text,url:"string"==typeof e.url?e.url:void 0};return t.notes.push(a),t.notes.length>500&&t.notes.splice(0,t.notes.length-500),a}function p(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 g=["done","failed","cancelled"];function m(t){let e=(0,a.useRef)(o()),[n,i]=(0,a.useState)(null),[m,k]=(0,a.useState)(!1),[x,v]=(0,a.useState)(null),y=(0,a.useRef)(!1);return(0,a.useEffect)(()=>{if(!t)return;e.current=o(),i(null),v(null);let n=!1,a=null,m=null,x=()=>{y.current&&(y.current=!1,i(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.slice(),conductorLog:t.conductorLog.slice(),operatorNotes:t.operatorNotes.slice(),activity:t.activity.slice(),usage:t.usage,cost:t.cost,budgetSeries:t.budgetSeries.slice(),planUpdatedAt:t.planUpdatedAt,finalSummary:t.finalSummary,finalReportPath:t.finalReportPath,lastSeq:t.lastSeq,updatedAt:t.lastT}}(e.current)))},b=setInterval(x,120),S=t=>{!function(t,e){var n,a,s,i,o,g,m,k,x,v,y,b,S,w;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;d(t,n),t.cost+=h(e.model,n),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:p(e.name,e.args,null==(n=t.meta)?void 0:n.cwd)}):"note.added"===e.type&&f(t,e,e.teamId);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!=(i=e.model)?i:"",purpose:null!=(o=e.purpose)?o:"",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!=(g=e.steps)?g: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:p(e.name,e.args,null==(m=t.meta)?void 0:m.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!=(x=e.summary)?x:""):(0,r.AA)(String(null!=(v=e.summary)?v:""),null==(k=t.meta)?void 0:k.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!=(y=e.taskId)?y:"",kind:"spawn",text:"".concat(e.taskId," runs as a sub-swarm (").concat(null!=(b=e.maxWorkers)?b:"?"," workers)")});break}case"note.added":{let n=f(t,e);u(t,{id:"n".concat(e.seq),t:e.t,agentId:null!=(S=e.agentId)?S:"",taskId:null!=(w=e.taskId)?w:"",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;d(t,n),"number"==typeof e.cost&&Number.isFinite(e.cost)?t.cost=e.cost:t.cost+=h(e.model,n),l(t,e.t);break}case"plan.updated":t.planUpdatedAt=e.t;break;case"run.final":t.finalSummary=e.summary,t.finalReportPath=e.reportPath}}}(e.current,t),y.current=!0,g.includes(e.current.status)&&setTimeout(x,160)},w=()=>{if(m)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)S(t);k(!0),v(r),!r&&g.includes(e.current.status)&&m&&(clearInterval(m),m=null)}catch(t){k(!1)}};n(),m=setInterval(n,1200)};return"undefined"!=typeof EventSource?(()=>{try{a=new EventSource(s.F.streamUrl(t))}catch(t){w();return}a.onopen=()=>k(!0),a.onmessage=t=>{try{S(JSON.parse(t.data))}catch(t){}},a.addEventListener("live",t=>{try{v(!!JSON.parse(t.data).live)}catch(t){}}),a.onerror=()=>{if(k(!1),g.includes(e.current.status)){null==a||a.close();return}m||n||w()}})():w(),()=>{n=!0,clearInterval(b),m&&clearInterval(m),null==a||a.close()}},[t]),{data:n,connected:m,engineLive:x}}function k(){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 x(){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 v(){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:()=>f,i8:()=>v,jT:()=>m,md:()=>p,pF:()=>h,pp:()=>y,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 f(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 p(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)(p,{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 v(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 y(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")}}}]);
@@ -0,0 +1 @@
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:()=>Z});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)(R,{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){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"1px 6px";return{fontSize:9,letterSpacing:"0.1em",padding:t,borderRadius:4,border:e?void 0:"1px solid var(--color-border)"}}function M(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:C(a),children:[null!=(t=({decision:"◆",conflict:"≠","open-question":"?",handoff:"⇢",claim:"⚑"})[s])?t:"\xb7"," ",s]})}function R(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 Map;for(let n of t){var s;let t=n.kind||"finding";e.set(t,(null!=(s=e.get(t))?s:0)+1)}return[...e.entries()].sort((e,t)=>{let[s]=e,[n]=t;return s.localeCompare(n)})},[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=>{let[t,s]=e;return(0,n.jsxs)("button",{onClick:()=>c(l===t?null:t),className:"mono uppercase ".concat(l===t?"chip-solid":"text-ink-faint hover:text-ink-dim"),style:C(l===t,"2px 7px"),children:[t," ",s]},t)})})]}),(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)(M,{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 z(e){switch(e){case"done":return"✓";case"failed":return"✗";case"blocked":return"⊘";case"verifying":return"◈";default:return""}}function A(e){return e.replace(/[#*`_>]+/g,"").replace(/\s+/g," ").trim().slice(0,140)}function F(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:z(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:A(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:A(s.feedback||s.error||"")})]})}function E(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?A(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:z(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 O="0 0 22px -6px rgb(var(--hi) / 0.5)",L=["done","failed","blocked"];function I(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)(P,{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)(H,{text:f.get(s).text}),(0,n.jsx)(B,{wave:s,group:a,agentForTask:g,now:x,onSelect:h})]},s)}),!b&&j&&(0,n.jsx)(H,{text:j.text,pulse:k}),!k&&(o?(0,n.jsx)(W,{summary:o,onOpenReport:p}):(0,n.jsx)(_,{status:c}))]})}function P(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?O:"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 H(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?O: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 B(e){let{wave:t,group:s,agentForTask:a,now:i,onSelect:l}=e,r=s.filter(e=>L.includes(e.status)),c=s.filter(e=>!L.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)(E,{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)(F,{task:e,agent:a(e),now:i,onClick:()=>l(e)},e.id))})]})}function W(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 _(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 Q(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)(U,{task:i}),(0,n.jsx)(D,{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)(D,{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)(D,{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)(D,{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)(D,{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)(D,{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)(D,{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)(D,{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)(D,{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)(D,{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)(V,{agent:e,now:c,expanded:e===p,attempt:t+1},e.id))})})]})]})]})}function U(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)(D,{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 V(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 D(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 $=s(830),q=s(6168);function K(){let e=(0,l.useSearchParams)().get("id"),{data:t,connected:s,engineLive:a}=(0,q.Xt)(e),c=(0,q.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)($.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)($.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},L=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)($.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)(X,{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)(X,{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)(J,{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",L>0?" \xb7 ".concat(L,"% 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)(I,{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)(Q,{runId:e,task:w,agents:t.agents,now:c,onClose:()=>o(null)})]})}function J(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 X(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 Z(){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)(K,{})})}}},e=>{e.O(0,[532,677,441,255,358],()=>e(e.s=4218)),_N_E=e.O()}]);
package/ui/out/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><!--7_pihFubDGD40BCy2ynlr--><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-721ce1c8b7a6a317.js" async=""></script><script src="/_next/static/chunks/app/page-dc9f6744d203e76c.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)"><span></span><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><main class="max-w-6xl mx-auto px-5 sm:px-8 pb-10"><div class="max-w-3xl mx-auto flex flex-col justify-center" style="min-height:calc(100vh - 3.5rem)"><div class="flex flex-col items-center gap-3 mb-8" style="animation:var(--animate-rise)"><img src="/swarm-mark.png" alt="" aria-hidden="true" class="shrink-0 select-none" style="height:64px;width:auto;filter:var(--logo-filter)" draggable="false"/><h1 class="font-display" style="font-size:26px">agentswarm</h1></div><section class="panel p-5 sm:p-6" style="animation:var(--animate-rise)"><textarea class="input resize-none" rows="3" autofocus="" placeholder="Describe a mission — the swarm decomposes it into parallel tasks and runs them autonomously." style="font-size:15px;line-height:1.6"></textarea><div class="flex flex-wrap items-center gap-1.5 mt-3"><span class="text-2xs text-ink-faint mr-1">Try</span><button title="Research the top 5 open-source vector databases in 2026 and produce a comparison table with a recommendation for a RAG app at 10M vectors." class="chip">Research</button><button title="Build a small CLI tool in Python that converts CSV to a formatted Markdown table, with tests. Save it as an artifact." class="chip">Build</button><button title="Audit this codebase for security issues and dependency risks, then write a prioritized remediation plan." class="chip">Audit</button><button title="Plan and draft a 6-email onboarding sequence for a developer-tools SaaS, with subject lines and send timing." class="chip">Plan</button><button class="chip" title="Run the swarm inside an existing project or folder">+ Folder</button><button class="btn btn-ghost btn-sm ml-auto" aria-expanded="false">Options · standard<span style="font-size:9px;transform:none;transition:transform 0.15s">▼</span></button></div><div class="collapse-v" data-open="false"><div inert=""><div class="mt-4 pt-4 space-y-4 border-t border-border-soft"><div class="flex flex-wrap items-center gap-1.5"><span class="text-2xs text-ink-faint mr-1">Size</span><button class="chip" title="4 agents · 16 tasks · small budget · no verification">Quick</button><button class="chip" title="Your saved defaults from Settings" style="color:var(--color-ink);border-color:rgb(var(--hi) / 0.45);background:rgb(var(--hi) / 0.05)">Standard</button><button class="chip" title="20 agents · 300 tasks · 120M budget · strict verification — hundreds of sources, long-horizon research">Deep research</button></div><div class="grid grid-cols-2 sm:grid-cols-3 gap-3"><label class="block"><div class="flex items-baseline justify-between mb-1 gap-2"><span class="text-2xs font-medium text-ink-dim">Agents in parallel</span><span class="text-2xs truncate text-ink-faint">working at once</span></div><input type="number" class="input" min="1" max="32" value="6"/></label><label class="block"><div class="flex items-baseline justify-between mb-1 gap-2"><span class="text-2xs font-medium text-ink-dim">Task limit</span><span class="text-2xs truncate text-ink-faint">whole run</span></div><input type="number" class="input" min="1" max="1000" value="48"/></label><label class="block"><div class="flex items-baseline justify-between mb-1 gap-2"><span class="text-2xs font-medium text-ink-dim">Steps per task</span><span class="text-2xs truncate text-ink-faint">tool calls per agent</span></div><input type="number" class="input" min="3" max="200" value="30"/></label><label class="block"><div class="flex items-baseline justify-between mb-1 gap-2"><span class="text-2xs font-medium text-ink-dim">Budget · M tokens</span><span class="text-2xs truncate text-ink-faint">12.00M cap</span></div><input type="number" class="input" min="0.5" step="0.5" value="12"/></label><label class="block"><div class="flex items-baseline justify-between mb-1 gap-2"><span class="text-2xs font-medium text-ink-dim">Verification</span><span class="text-2xs truncate text-ink-faint">re-check finished work</span></div><select class="input"><option value="off">off — trust the workers</option><option value="normal" selected="">normal</option><option value="strict">strict — verify everything</option></select></label><label class="block"><div class="flex items-baseline justify-between mb-1 gap-2"><span class="text-2xs font-medium text-ink-dim">Reasoning effort</span><span class="text-2xs truncate text-ink-faint">thinking depth</span></div><select class="input"><option value="low">low</option><option value="medium">medium</option><option value="high" selected="">high</option><option value="max">max</option></select></label><label class="block"><div class="flex items-baseline justify-between mb-1 gap-2"><span class="text-2xs font-medium text-ink-dim">Worker model</span></div><input class="input mono" list="composer-models" placeholder="model id" value="deepseek-v4-flash"/><datalist id="composer-models"></datalist></label><label class="block"><div class="flex items-baseline justify-between mb-1 gap-2"><span class="text-2xs font-medium text-ink-dim">Workspace</span><span class="text-2xs truncate text-ink-faint">isolated, throwaway</span></div><select class="input"><option value="sandbox" selected="">Isolated workspace</option><option value="dir">A directory on disk</option></select></label></div></div></div></div><div class="flex items-center justify-between gap-3 mt-4"><div class="text-2xs"><span class="text-ink-faint">Isolated workspace on this machine<!-- --> · ⌘↵ to launch</span></div><button class="btn btn-primary" disabled=""> Launch swarm</button></div></section></div><section class="mt-12"><div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4"><div class="panel h-40 skeleton opacity-50"></div><div class="panel h-40 skeleton opacity-50"></div><div class="panel h-40 skeleton opacity-50"></div></div></section></main></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[8363,[\"532\",\"static/chunks/532-35122e93f37719b9.js\",\"677\",\"static/chunks/677-721ce1c8b7a6a317.js\",\"974\",\"static/chunks/app/page-dc9f6744d203e76c.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\":\"7_pihFubDGD40BCy2ynlr\",\"p\":\"\",\"c\":[\"\",\"\"],\"i\":false,\"f\":[[[\"\",{\"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\":[\"__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],[\"$\",\"$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: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>
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/page-dc9f6744d203e76c.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)"><span></span><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><main class="max-w-6xl mx-auto px-5 sm:px-8 pb-10"><div class="max-w-3xl mx-auto flex flex-col justify-center" style="min-height:calc(100vh - 3.5rem)"><div class="flex flex-col items-center gap-3 mb-8" style="animation:var(--animate-rise)"><img src="/swarm-mark.png" alt="" aria-hidden="true" class="shrink-0 select-none" style="height:64px;width:auto;filter:var(--logo-filter)" draggable="false"/><h1 class="font-display" style="font-size:26px">agentswarm</h1></div><section class="panel p-5 sm:p-6" style="animation:var(--animate-rise)"><textarea class="input resize-none" rows="3" autofocus="" placeholder="Describe a mission — the swarm decomposes it into parallel tasks and runs them autonomously." style="font-size:15px;line-height:1.6"></textarea><div class="flex flex-wrap items-center gap-1.5 mt-3"><span class="text-2xs text-ink-faint mr-1">Try</span><button title="Research the top 5 open-source vector databases in 2026 and produce a comparison table with a recommendation for a RAG app at 10M vectors." class="chip">Research</button><button title="Build a small CLI tool in Python that converts CSV to a formatted Markdown table, with tests. Save it as an artifact." class="chip">Build</button><button title="Audit this codebase for security issues and dependency risks, then write a prioritized remediation plan." class="chip">Audit</button><button title="Plan and draft a 6-email onboarding sequence for a developer-tools SaaS, with subject lines and send timing." class="chip">Plan</button><button class="chip" title="Run the swarm inside an existing project or folder">+ Folder</button><button class="btn btn-ghost btn-sm ml-auto" aria-expanded="false">Options · standard<span style="font-size:9px;transform:none;transition:transform 0.15s">▼</span></button></div><div class="collapse-v" data-open="false"><div inert=""><div class="mt-4 pt-4 space-y-4 border-t border-border-soft"><div class="flex flex-wrap items-center gap-1.5"><span class="text-2xs text-ink-faint mr-1">Size</span><button class="chip" title="4 agents · 16 tasks · small budget · no verification">Quick</button><button class="chip" title="Your saved defaults from Settings" style="color:var(--color-ink);border-color:rgb(var(--hi) / 0.45);background:rgb(var(--hi) / 0.05)">Standard</button><button class="chip" title="20 agents · 300 tasks · 120M budget · strict verification — hundreds of sources, long-horizon research">Deep research</button></div><div class="grid grid-cols-2 sm:grid-cols-3 gap-3"><label class="block"><div class="flex items-baseline justify-between mb-1 gap-2"><span class="text-2xs font-medium text-ink-dim">Agents in parallel</span><span class="text-2xs truncate text-ink-faint">working at once</span></div><input type="number" class="input" min="1" max="32" value="6"/></label><label class="block"><div class="flex items-baseline justify-between mb-1 gap-2"><span class="text-2xs font-medium text-ink-dim">Task limit</span><span class="text-2xs truncate text-ink-faint">whole run</span></div><input type="number" class="input" min="1" max="1000" value="48"/></label><label class="block"><div class="flex items-baseline justify-between mb-1 gap-2"><span class="text-2xs font-medium text-ink-dim">Steps per task</span><span class="text-2xs truncate text-ink-faint">tool calls per agent</span></div><input type="number" class="input" min="3" max="200" value="30"/></label><label class="block"><div class="flex items-baseline justify-between mb-1 gap-2"><span class="text-2xs font-medium text-ink-dim">Budget · M tokens</span><span class="text-2xs truncate text-ink-faint">12.00M cap</span></div><input type="number" class="input" min="0.5" step="0.5" value="12"/></label><label class="block"><div class="flex items-baseline justify-between mb-1 gap-2"><span class="text-2xs font-medium text-ink-dim">Verification</span><span class="text-2xs truncate text-ink-faint">re-check finished work</span></div><select class="input"><option value="off">off — trust the workers</option><option value="normal" selected="">normal</option><option value="strict">strict — verify everything</option></select></label><label class="block"><div class="flex items-baseline justify-between mb-1 gap-2"><span class="text-2xs font-medium text-ink-dim">Reasoning effort</span><span class="text-2xs truncate text-ink-faint">thinking depth</span></div><select class="input"><option value="low">low</option><option value="medium">medium</option><option value="high" selected="">high</option><option value="max">max</option></select></label><label class="block"><div class="flex items-baseline justify-between mb-1 gap-2"><span class="text-2xs font-medium text-ink-dim">Worker model</span></div><input class="input mono" list="composer-models" placeholder="model id" value="deepseek-v4-flash"/><datalist id="composer-models"></datalist></label><label class="block"><div class="flex items-baseline justify-between mb-1 gap-2"><span class="text-2xs font-medium text-ink-dim">Workspace</span><span class="text-2xs truncate text-ink-faint">isolated, throwaway</span></div><select class="input"><option value="sandbox" selected="">Isolated workspace</option><option value="dir">A directory on disk</option></select></label></div></div></div></div><div class="flex items-center justify-between gap-3 mt-4"><div class="text-2xs"><span class="text-ink-faint">Isolated workspace on this machine<!-- --> · ⌘↵ to launch</span></div><button class="btn btn-primary" disabled=""> Launch swarm</button></div></section></div><section class="mt-12"><div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4"><div class="panel h-40 skeleton opacity-50"></div><div class="panel h-40 skeleton opacity-50"></div><div class="panel h-40 skeleton opacity-50"></div></div></section></main></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[8363,[\"532\",\"static/chunks/532-35122e93f37719b9.js\",\"677\",\"static/chunks/677-a62d486d6734bcf3.js\",\"974\",\"static/chunks/app/page-dc9f6744d203e76c.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\":[\"\",\"\"],\"i\":false,\"f\":[[[\"\",{\"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\":[\"__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],[\"$\",\"$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: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/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[8363,["532","static/chunks/532-35122e93f37719b9.js","677","static/chunks/677-721ce1c8b7a6a317.js","974","static/chunks/app/page-dc9f6744d203e76c.js"],"default"]
5
+ 5:I[8363,["532","static/chunks/532-35122e93f37719b9.js","677","static/chunks/677-a62d486d6734bcf3.js","974","static/chunks/app/page-dc9f6744d203e76c.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":"7_pihFubDGD40BCy2ynlr","p":"","c":["",""],"i":false,"f":[[["",{"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":["__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],["$","$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}
15
+ 0:{"P":null,"b":"JFkx5KtNi0DYyqm_THzbY","p":"","c":["",""],"i":false,"f":[[["",{"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":["__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],["$","$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: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"}]]