quadwork 1.5.2 → 1.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/bin/quadwork.js +13 -1
  2. package/out/404.html +1 -1
  3. package/out/__next.__PAGE__.txt +1 -1
  4. package/out/__next._full.txt +1 -1
  5. package/out/__next._head.txt +1 -1
  6. package/out/__next._index.txt +1 -1
  7. package/out/__next._tree.txt +1 -1
  8. package/out/_next/static/chunks/{0-7v31f-nsgw-.js → 09sq17vme9g6p.js} +1 -1
  9. package/out/_next/static/chunks/{0m83k84.midd1.js → 0wreuebrwlg.2.js} +1 -1
  10. package/out/_not-found/__next._full.txt +1 -1
  11. package/out/_not-found/__next._head.txt +1 -1
  12. package/out/_not-found/__next._index.txt +1 -1
  13. package/out/_not-found/__next._not-found.__PAGE__.txt +1 -1
  14. package/out/_not-found/__next._not-found.txt +1 -1
  15. package/out/_not-found/__next._tree.txt +1 -1
  16. package/out/_not-found.html +1 -1
  17. package/out/_not-found.txt +1 -1
  18. package/out/app-shell/__next._full.txt +1 -1
  19. package/out/app-shell/__next._head.txt +1 -1
  20. package/out/app-shell/__next._index.txt +1 -1
  21. package/out/app-shell/__next._tree.txt +1 -1
  22. package/out/app-shell/__next.app-shell.__PAGE__.txt +1 -1
  23. package/out/app-shell/__next.app-shell.txt +1 -1
  24. package/out/app-shell.html +1 -1
  25. package/out/app-shell.txt +1 -1
  26. package/out/index.html +1 -1
  27. package/out/index.txt +1 -1
  28. package/out/project/_/__next._full.txt +2 -2
  29. package/out/project/_/__next._head.txt +1 -1
  30. package/out/project/_/__next._index.txt +1 -1
  31. package/out/project/_/__next._tree.txt +1 -1
  32. package/out/project/_/__next.project.$d$id.__PAGE__.txt +2 -2
  33. package/out/project/_/__next.project.$d$id.txt +1 -1
  34. package/out/project/_/__next.project.txt +1 -1
  35. package/out/project/_/memory/__next._full.txt +1 -1
  36. package/out/project/_/memory/__next._head.txt +1 -1
  37. package/out/project/_/memory/__next._index.txt +1 -1
  38. package/out/project/_/memory/__next._tree.txt +1 -1
  39. package/out/project/_/memory/__next.project.$d$id.memory.__PAGE__.txt +1 -1
  40. package/out/project/_/memory/__next.project.$d$id.memory.txt +1 -1
  41. package/out/project/_/memory/__next.project.$d$id.txt +1 -1
  42. package/out/project/_/memory/__next.project.txt +1 -1
  43. package/out/project/_/memory.html +1 -1
  44. package/out/project/_/memory.txt +1 -1
  45. package/out/project/_/queue/__next._full.txt +1 -1
  46. package/out/project/_/queue/__next._head.txt +1 -1
  47. package/out/project/_/queue/__next._index.txt +1 -1
  48. package/out/project/_/queue/__next._tree.txt +1 -1
  49. package/out/project/_/queue/__next.project.$d$id.queue.__PAGE__.txt +1 -1
  50. package/out/project/_/queue/__next.project.$d$id.queue.txt +1 -1
  51. package/out/project/_/queue/__next.project.$d$id.txt +1 -1
  52. package/out/project/_/queue/__next.project.txt +1 -1
  53. package/out/project/_/queue.html +1 -1
  54. package/out/project/_/queue.txt +1 -1
  55. package/out/project/_.html +1 -1
  56. package/out/project/_.txt +2 -2
  57. package/out/settings/__next._full.txt +1 -1
  58. package/out/settings/__next._head.txt +1 -1
  59. package/out/settings/__next._index.txt +1 -1
  60. package/out/settings/__next._tree.txt +1 -1
  61. package/out/settings/__next.settings.__PAGE__.txt +1 -1
  62. package/out/settings/__next.settings.txt +1 -1
  63. package/out/settings.html +1 -1
  64. package/out/settings.txt +1 -1
  65. package/out/setup/__next._full.txt +1 -1
  66. package/out/setup/__next._head.txt +1 -1
  67. package/out/setup/__next._index.txt +1 -1
  68. package/out/setup/__next._tree.txt +1 -1
  69. package/out/setup/__next.setup.__PAGE__.txt +1 -1
  70. package/out/setup/__next.setup.txt +1 -1
  71. package/out/setup.html +1 -1
  72. package/out/setup.txt +1 -1
  73. package/package.json +1 -1
  74. package/server/routes.js +100 -3
  75. package/server/routes.telegramBridge.test.js +97 -2
  76. package/templates/config.toml +8 -0
  77. /package/out/_next/static/{yMYfZ4LAn8Fy22suFUnOy → X4zdS6Y6HkLOaElNeHwnq}/_buildManifest.js +0 -0
  78. /package/out/_next/static/{yMYfZ4LAn8Fy22suFUnOy → X4zdS6Y6HkLOaElNeHwnq}/_clientMiddlewareManifest.js +0 -0
  79. /package/out/_next/static/{yMYfZ4LAn8Fy22suFUnOy → X4zdS6Y6HkLOaElNeHwnq}/_ssgManifest.js +0 -0
package/bin/quadwork.js CHANGED
@@ -1116,12 +1116,24 @@ bridge_sender = "telegram-bridge"
1116
1116
  if (fs.existsSync(bridgeScript)) {
1117
1117
  log("Starting Telegram bridge...");
1118
1118
  const bridgeToml = path.join(CONFIG_DIR, `telegram-${setup.projectName}.toml`);
1119
- const bridgeTomlContent = `[telegram]\nbot_token = "${botToken}"\nchat_id = "${chatId}"\n\n[agentchattr]\nurl = "${projectChattrUrl}"\n`;
1119
+ // #383 Bug 2: the bridge only reads agentchattr_url from
1120
+ // inside [telegram]. A separate [agentchattr] section is
1121
+ // silently ignored and the bridge falls back to :8300.
1122
+ const bridgeTomlContent = `[telegram]\nbot_token = "${botToken}"\nchat_id = "${chatId}"\nagentchattr_url = "${projectChattrUrl}"\n`;
1120
1123
  fs.writeFileSync(bridgeToml, bridgeTomlContent, { mode: 0o600 });
1121
1124
  fs.chmodSync(bridgeToml, 0o600);
1125
+ // #383 Bug 4: scrub TELEGRAM_*/AGENTCHATTR_URL from the
1126
+ // child env so an ambient shell that exported a different
1127
+ // bot's token can't silently override the TOML we just
1128
+ // wrote. Same fix as server/routes.js Start handler.
1129
+ const bridgeEnv = { ...process.env };
1130
+ delete bridgeEnv.TELEGRAM_BOT_TOKEN;
1131
+ delete bridgeEnv.TELEGRAM_CHAT_ID;
1132
+ delete bridgeEnv.AGENTCHATTR_URL;
1122
1133
  const bridgeProc = spawn("python3", [bridgeScript, "--config", bridgeToml], {
1123
1134
  stdio: "ignore",
1124
1135
  detached: true,
1136
+ env: bridgeEnv,
1125
1137
  });
1126
1138
  bridgeProc.unref();
1127
1139
  if (bridgeProc.pid) {
package/out/404.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en" class="geist_mono_8d43a2aa-module__8Li5zG__variable h-full"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/0ccoe1hsu70ql.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/0z~0.4hivi.f2.js"/><script src="/_next/static/chunks/0ezniz80psxr6.js" async=""></script><script src="/_next/static/chunks/0r7t_sj_sejq9.js" async=""></script><script src="/_next/static/chunks/15i5_ay.0ap.6.js" async=""></script><script src="/_next/static/chunks/0excsn2a_5qsb.js" async=""></script><script src="/_next/static/chunks/turbopack-0wh29ykoy-rb5.js" async=""></script><script src="/_next/static/chunks/04_t39bv8y9pe.js" async=""></script><script src="/_next/static/chunks/0ox7p_szjhn69.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><title>QuadWork</title><meta name="description" content="Unified dashboard for multi-agent coding teams"/><link rel="icon" href="/favicon.ico?favicon.0x3dzn~oxb6tn.ico" sizes="256x256" type="image/x-icon"/><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body class="h-full flex flex-col"><div hidden=""><!--$--><!--/$--></div><header class="sticky top-0 z-40 flex h-12 items-center justify-between border-b border-white/10 bg-neutral-950/90 px-4 backdrop-blur" aria-hidden="true"></header><div class="flex flex-1 min-h-0"><aside class="w-16 shrink-0 h-full border-r border-border bg-bg-surface flex flex-col items-center py-3"><a class="w-10 h-10 flex items-center justify-center rounded-sm transition-colors text-text-muted hover:text-text hover:bg-[#1a1a1a]" title="Home" href="/"><svg width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M3 10L10 3l7 7"></path><path d="M5 8.5V16h3.5v-4h3v4H15V8.5"></path></svg></a><div class="w-6 h-px bg-border my-2"></div><div class="flex-1 flex flex-col items-center gap-2 overflow-y-auto min-h-0"><a class="w-10 h-10 flex items-center justify-center rounded-full border border-dashed border-border text-text-muted hover:text-text hover:bg-[#1a1a1a] transition-colors" title="Add project" href="/setup"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M8 3v10M3 8h10"></path></svg></a></div><div class="w-6 h-px bg-border my-2"></div><a class="w-10 h-10 flex items-center justify-center rounded-sm transition-colors text-text-muted hover:text-text hover:bg-[#1a1a1a]" title="Settings" href="/settings"><svg width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="9" r="2.5"></circle><path d="M7.5 1.5h3l.4 2.1a5.5 5.5 0 011.3.7l2-.8 1.5 2.6-1.6 1.3a5.5 5.5 0 010 1.5l1.6 1.3-1.5 2.6-2-.8a5.5 5.5 0 01-1.3.7l-.4 2.1h-3l-.4-2.1a5.5 5.5 0 01-1.3-.7l-2 .8-1.5-2.6 1.6-1.3a5.5 5.5 0 010-1.5L2.3 6.1l1.5-2.6 2 .8a5.5 5.5 0 011.3-.7z"></path></svg></a></aside><main class="flex-1 min-w-0 overflow-auto"><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><!--$--><!--/$--></main></div><script src="/_next/static/chunks/0z~0.4hivi.f2.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[34852,[\"/_next/static/chunks/04_t39bv8y9pe.js\",\"/_next/static/chunks/0ox7p_szjhn69.js\"],\"default\"]\n3:I[86081,[\"/_next/static/chunks/04_t39bv8y9pe.js\",\"/_next/static/chunks/0ox7p_szjhn69.js\"],\"default\"]\n4:I[12527,[\"/_next/static/chunks/04_t39bv8y9pe.js\",\"/_next/static/chunks/0ox7p_szjhn69.js\"],\"default\"]\n5:I[59763,[\"/_next/static/chunks/04_t39bv8y9pe.js\",\"/_next/static/chunks/0ox7p_szjhn69.js\"],\"default\"]\n6:I[11717,[\"/_next/static/chunks/04_t39bv8y9pe.js\",\"/_next/static/chunks/0ox7p_szjhn69.js\"],\"OutletBoundary\"]\n7:\"$Sreact.suspense\"\na:I[11717,[\"/_next/static/chunks/04_t39bv8y9pe.js\",\"/_next/static/chunks/0ox7p_szjhn69.js\"],\"ViewportBoundary\"]\nc:I[11717,[\"/_next/static/chunks/04_t39bv8y9pe.js\",\"/_next/static/chunks/0ox7p_szjhn69.js\"],\"MetadataBoundary\"]\ne:I[92243,[\"/_next/static/chunks/04_t39bv8y9pe.js\",\"/_next/static/chunks/0ox7p_szjhn69.js\"],\"default\",1]\n:HL[\"/_next/static/chunks/0ccoe1hsu70ql.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0ccoe1hsu70ql.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/04_t39bv8y9pe.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/0ox7p_szjhn69.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"geist_mono_8d43a2aa-module__8Li5zG__variable h-full\",\"children\":[\"$\",\"body\",null,{\"className\":\"h-full flex flex-col\",\"children\":[[\"$\",\"$L2\",null,{}],[\"$\",\"div\",null,{\"className\":\"flex flex-1 min-h-0\",\"children\":[[\"$\",\"$L3\",null,{}],[\"$\",\"main\",null,{\"className\":\"flex-1 min-w-0 overflow-auto\",\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",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\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:1:props:children:1:props:children:props:notFound:0:1:props:style\",\"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\":\"$0:f:0:1:0:props:children:1:props:children:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$7\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@8\"}]}]]}],{},null,false,null]},null,false,\"$@9\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$La\",null,{\"children\":\"$Lb\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Lc\",null,{\"children\":[\"$\",\"$7\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Ld\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$e\",[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0ccoe1hsu70ql.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"yMYfZ4LAn8Fy22suFUnOy\"}\n"])</script><script>self.__next_f.push([1,"f:[]\n9:\"$Wf\"\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"10:I[80070,[\"/_next/static/chunks/04_t39bv8y9pe.js\",\"/_next/static/chunks/0ox7p_szjhn69.js\"],\"IconMark\"]\n8:null\nd:[[\"$\",\"title\",\"0\",{\"children\":\"QuadWork\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Unified dashboard for multi-agent coding teams\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?favicon.0x3dzn~oxb6tn.ico\",\"sizes\":\"256x256\",\"type\":\"image/x-icon\"}],[\"$\",\"$L10\",\"3\",{}]]\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="en" class="geist_mono_8d43a2aa-module__8Li5zG__variable h-full"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/0ccoe1hsu70ql.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/0z~0.4hivi.f2.js"/><script src="/_next/static/chunks/0ezniz80psxr6.js" async=""></script><script src="/_next/static/chunks/0r7t_sj_sejq9.js" async=""></script><script src="/_next/static/chunks/15i5_ay.0ap.6.js" async=""></script><script src="/_next/static/chunks/0excsn2a_5qsb.js" async=""></script><script src="/_next/static/chunks/turbopack-0wh29ykoy-rb5.js" async=""></script><script src="/_next/static/chunks/04_t39bv8y9pe.js" async=""></script><script src="/_next/static/chunks/0ox7p_szjhn69.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><title>QuadWork</title><meta name="description" content="Unified dashboard for multi-agent coding teams"/><link rel="icon" href="/favicon.ico?favicon.0x3dzn~oxb6tn.ico" sizes="256x256" type="image/x-icon"/><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body class="h-full flex flex-col"><div hidden=""><!--$--><!--/$--></div><header class="sticky top-0 z-40 flex h-12 items-center justify-between border-b border-white/10 bg-neutral-950/90 px-4 backdrop-blur" aria-hidden="true"></header><div class="flex flex-1 min-h-0"><aside class="w-16 shrink-0 h-full border-r border-border bg-bg-surface flex flex-col items-center py-3"><a class="w-10 h-10 flex items-center justify-center rounded-sm transition-colors text-text-muted hover:text-text hover:bg-[#1a1a1a]" title="Home" href="/"><svg width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M3 10L10 3l7 7"></path><path d="M5 8.5V16h3.5v-4h3v4H15V8.5"></path></svg></a><div class="w-6 h-px bg-border my-2"></div><div class="flex-1 flex flex-col items-center gap-2 overflow-y-auto min-h-0"><a class="w-10 h-10 flex items-center justify-center rounded-full border border-dashed border-border text-text-muted hover:text-text hover:bg-[#1a1a1a] transition-colors" title="Add project" href="/setup"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M8 3v10M3 8h10"></path></svg></a></div><div class="w-6 h-px bg-border my-2"></div><a class="w-10 h-10 flex items-center justify-center rounded-sm transition-colors text-text-muted hover:text-text hover:bg-[#1a1a1a]" title="Settings" href="/settings"><svg width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="9" r="2.5"></circle><path d="M7.5 1.5h3l.4 2.1a5.5 5.5 0 011.3.7l2-.8 1.5 2.6-1.6 1.3a5.5 5.5 0 010 1.5l1.6 1.3-1.5 2.6-2-.8a5.5 5.5 0 01-1.3.7l-.4 2.1h-3l-.4-2.1a5.5 5.5 0 01-1.3-.7l-2 .8-1.5-2.6 1.6-1.3a5.5 5.5 0 010-1.5L2.3 6.1l1.5-2.6 2 .8a5.5 5.5 0 011.3-.7z"></path></svg></a></aside><main class="flex-1 min-w-0 overflow-auto"><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><!--$--><!--/$--></main></div><script src="/_next/static/chunks/0z~0.4hivi.f2.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[34852,[\"/_next/static/chunks/04_t39bv8y9pe.js\",\"/_next/static/chunks/0ox7p_szjhn69.js\"],\"default\"]\n3:I[86081,[\"/_next/static/chunks/04_t39bv8y9pe.js\",\"/_next/static/chunks/0ox7p_szjhn69.js\"],\"default\"]\n4:I[12527,[\"/_next/static/chunks/04_t39bv8y9pe.js\",\"/_next/static/chunks/0ox7p_szjhn69.js\"],\"default\"]\n5:I[59763,[\"/_next/static/chunks/04_t39bv8y9pe.js\",\"/_next/static/chunks/0ox7p_szjhn69.js\"],\"default\"]\n6:I[11717,[\"/_next/static/chunks/04_t39bv8y9pe.js\",\"/_next/static/chunks/0ox7p_szjhn69.js\"],\"OutletBoundary\"]\n7:\"$Sreact.suspense\"\na:I[11717,[\"/_next/static/chunks/04_t39bv8y9pe.js\",\"/_next/static/chunks/0ox7p_szjhn69.js\"],\"ViewportBoundary\"]\nc:I[11717,[\"/_next/static/chunks/04_t39bv8y9pe.js\",\"/_next/static/chunks/0ox7p_szjhn69.js\"],\"MetadataBoundary\"]\ne:I[92243,[\"/_next/static/chunks/04_t39bv8y9pe.js\",\"/_next/static/chunks/0ox7p_szjhn69.js\"],\"default\",1]\n:HL[\"/_next/static/chunks/0ccoe1hsu70ql.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0ccoe1hsu70ql.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/04_t39bv8y9pe.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/0ox7p_szjhn69.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"geist_mono_8d43a2aa-module__8Li5zG__variable h-full\",\"children\":[\"$\",\"body\",null,{\"className\":\"h-full flex flex-col\",\"children\":[[\"$\",\"$L2\",null,{}],[\"$\",\"div\",null,{\"className\":\"flex flex-1 min-h-0\",\"children\":[[\"$\",\"$L3\",null,{}],[\"$\",\"main\",null,{\"className\":\"flex-1 min-w-0 overflow-auto\",\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",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\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:1:props:children:1:props:children:props:notFound:0:1:props:style\",\"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\":\"$0:f:0:1:0:props:children:1:props:children:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$7\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@8\"}]}]]}],{},null,false,null]},null,false,\"$@9\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$La\",null,{\"children\":\"$Lb\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Lc\",null,{\"children\":[\"$\",\"$7\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Ld\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$e\",[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0ccoe1hsu70ql.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"X4zdS6Y6HkLOaElNeHwnq\"}\n"])</script><script>self.__next_f.push([1,"f:[]\n9:\"$Wf\"\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"10:I[80070,[\"/_next/static/chunks/04_t39bv8y9pe.js\",\"/_next/static/chunks/0ox7p_szjhn69.js\"],\"IconMark\"]\n8:null\nd:[[\"$\",\"title\",\"0\",{\"children\":\"QuadWork\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Unified dashboard for multi-agent coding teams\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?favicon.0x3dzn~oxb6tn.ico\",\"sizes\":\"256x256\",\"type\":\"image/x-icon\"}],[\"$\",\"$L10\",\"3\",{}]]\n"])</script></body></html>
@@ -2,5 +2,5 @@
2
2
  2:I[16348,["/_next/static/chunks/04_t39bv8y9pe.js","/_next/static/chunks/0ox7p_szjhn69.js","/_next/static/chunks/0e.ktwt1nyj...js"],"default"]
3
3
  3:I[11717,["/_next/static/chunks/04_t39bv8y9pe.js","/_next/static/chunks/0ox7p_szjhn69.js"],"OutletBoundary"]
4
4
  4:"$Sreact.suspense"
5
- 0:{"rsc":["$","$1","c",{"children":[["$","$L2",null,{}],[["$","script","script-0",{"src":"/_next/static/chunks/0e.ktwt1nyj...js","async":true}]],["$","$L3",null,{"children":["$","$4",null,{"name":"Next.MetadataOutlet","children":"$@5"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"yMYfZ4LAn8Fy22suFUnOy"}
5
+ 0:{"rsc":["$","$1","c",{"children":[["$","$L2",null,{}],[["$","script","script-0",{"src":"/_next/static/chunks/0e.ktwt1nyj...js","async":true}]],["$","$L3",null,{"children":["$","$4",null,{"name":"Next.MetadataOutlet","children":"$@5"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"X4zdS6Y6HkLOaElNeHwnq"}
6
6
  5:null
@@ -11,7 +11,7 @@ c:I[11717,["/_next/static/chunks/04_t39bv8y9pe.js","/_next/static/chunks/0ox7p_s
11
11
  e:I[92243,["/_next/static/chunks/04_t39bv8y9pe.js","/_next/static/chunks/0ox7p_szjhn69.js"],"default",1]
12
12
  :HL["/_next/static/chunks/0ccoe1hsu70ql.css","style"]
13
13
  :HL["/_next/static/media/797e433ab948586e-s.p.0.q-h669a_dqa.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
14
- 0:{"P":null,"c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0ccoe1hsu70ql.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/04_t39bv8y9pe.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/_next/static/chunks/0ox7p_szjhn69.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","className":"geist_mono_8d43a2aa-module__8Li5zG__variable h-full","children":["$","body",null,{"className":"h-full flex flex-col","children":[["$","$L2",null,{}],["$","div",null,{"className":"flex flex-1 min-h-0","children":[["$","$L3",null,{}],["$","main",null,{"className":"flex-1 min-w-0 overflow-auto","children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[["$","$1","c",{"children":[["$","$L6",null,{}],[["$","script","script-0",{"src":"/_next/static/chunks/0e.ktwt1nyj...js","async":true,"nonce":"$undefined"}]],["$","$L7",null,{"children":["$","$8",null,{"name":"Next.MetadataOutlet","children":"$@9"}]}]]}],{},null,false,null]},null,false,null],["$","$1","h",{"children":[null,["$","$La",null,{"children":"$Lb"}],["$","div",null,{"hidden":true,"children":["$","$Lc",null,{"children":["$","$8",null,{"name":"Next.Metadata","children":"$Ld"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$e",[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0ccoe1hsu70ql.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"yMYfZ4LAn8Fy22suFUnOy"}
14
+ 0:{"P":null,"c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0ccoe1hsu70ql.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/04_t39bv8y9pe.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/_next/static/chunks/0ox7p_szjhn69.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","className":"geist_mono_8d43a2aa-module__8Li5zG__variable h-full","children":["$","body",null,{"className":"h-full flex flex-col","children":[["$","$L2",null,{}],["$","div",null,{"className":"flex flex-1 min-h-0","children":[["$","$L3",null,{}],["$","main",null,{"className":"flex-1 min-w-0 overflow-auto","children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[["$","$1","c",{"children":[["$","$L6",null,{}],[["$","script","script-0",{"src":"/_next/static/chunks/0e.ktwt1nyj...js","async":true,"nonce":"$undefined"}]],["$","$L7",null,{"children":["$","$8",null,{"name":"Next.MetadataOutlet","children":"$@9"}]}]]}],{},null,false,null]},null,false,null],["$","$1","h",{"children":[null,["$","$La",null,{"children":"$Lb"}],["$","div",null,{"hidden":true,"children":["$","$Lc",null,{"children":["$","$8",null,{"name":"Next.Metadata","children":"$Ld"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$e",[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0ccoe1hsu70ql.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"X4zdS6Y6HkLOaElNeHwnq"}
15
15
  b:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
16
16
  f:I[80070,["/_next/static/chunks/04_t39bv8y9pe.js","/_next/static/chunks/0ox7p_szjhn69.js"],"IconMark"]
17
17
  9:null
@@ -3,4 +3,4 @@
3
3
  3:I[11717,["/_next/static/chunks/04_t39bv8y9pe.js","/_next/static/chunks/0ox7p_szjhn69.js"],"MetadataBoundary"]
4
4
  4:"$Sreact.suspense"
5
5
  5:I[80070,["/_next/static/chunks/04_t39bv8y9pe.js","/_next/static/chunks/0ox7p_szjhn69.js"],"IconMark"]
6
- 0:{"rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"QuadWork"}],["$","meta","1",{"name":"description","content":"Unified dashboard for multi-agent coding teams"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.0x3dzn~oxb6tn.ico","sizes":"256x256","type":"image/x-icon"}],["$","$L5","3",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"yMYfZ4LAn8Fy22suFUnOy"}
6
+ 0:{"rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"QuadWork"}],["$","meta","1",{"name":"description","content":"Unified dashboard for multi-agent coding teams"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.0x3dzn~oxb6tn.ico","sizes":"256x256","type":"image/x-icon"}],["$","$L5","3",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"X4zdS6Y6HkLOaElNeHwnq"}
@@ -4,4 +4,4 @@
4
4
  4:I[12527,["/_next/static/chunks/04_t39bv8y9pe.js","/_next/static/chunks/0ox7p_szjhn69.js"],"default"]
5
5
  5:I[59763,["/_next/static/chunks/04_t39bv8y9pe.js","/_next/static/chunks/0ox7p_szjhn69.js"],"default"]
6
6
  :HL["/_next/static/chunks/0ccoe1hsu70ql.css","style"]
7
- 0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0ccoe1hsu70ql.css","precedence":"next"}],["$","script","script-0",{"src":"/_next/static/chunks/04_t39bv8y9pe.js","async":true}],["$","script","script-1",{"src":"/_next/static/chunks/0ox7p_szjhn69.js","async":true}]],["$","html",null,{"lang":"en","className":"geist_mono_8d43a2aa-module__8Li5zG__variable h-full","children":["$","body",null,{"className":"h-full flex flex-col","children":[["$","$L2",null,{}],["$","div",null,{"className":"flex flex-1 min-h-0","children":[["$","$L3",null,{}],["$","main",null,{"className":"flex-1 min-w-0 overflow-auto","children":["$","$L4",null,{"parallelRouterKey":"children","template":["$","$L5",null,{}],"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."}]}]]}]}]],[]]}]}]]}]]}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"yMYfZ4LAn8Fy22suFUnOy"}
7
+ 0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0ccoe1hsu70ql.css","precedence":"next"}],["$","script","script-0",{"src":"/_next/static/chunks/04_t39bv8y9pe.js","async":true}],["$","script","script-1",{"src":"/_next/static/chunks/0ox7p_szjhn69.js","async":true}]],["$","html",null,{"lang":"en","className":"geist_mono_8d43a2aa-module__8Li5zG__variable h-full","children":["$","body",null,{"className":"h-full flex flex-col","children":[["$","$L2",null,{}],["$","div",null,{"className":"flex flex-1 min-h-0","children":[["$","$L3",null,{}],["$","main",null,{"className":"flex-1 min-w-0 overflow-auto","children":["$","$L4",null,{"parallelRouterKey":"children","template":["$","$L5",null,{}],"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."}]}]]}]}]],[]]}]}]]}]]}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"X4zdS6Y6HkLOaElNeHwnq"}
@@ -1,3 +1,3 @@
1
1
  :HL["/_next/static/chunks/0ccoe1hsu70ql.css","style"]
2
2
  :HL["/_next/static/media/797e433ab948586e-s.p.0.q-h669a_dqa.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
3
- 0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}},"staleTime":300,"buildId":"yMYfZ4LAn8Fy22suFUnOy"}
3
+ 0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}},"staleTime":300,"buildId":"X4zdS6Y6HkLOaElNeHwnq"}
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,15352,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"BailoutToCSR",{enumerable:!0,get:function(){return l}});let r=e.r(17071);function l({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new r.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},87083,(e,t,n)=>{"use strict";function r(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"encodeURIPath",{enumerable:!0,get:function(){return r}})},48021,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"PreloadChunks",{enumerable:!0,get:function(){return a}});let r=e.r(85899),l=e.r(90184),u=e.r(27807),o=e.r(87083),s=e.r(7866);function a({moduleIds:e}){if("u">typeof window)return null;let t=u.workAsyncStorage.getStore();if(void 0===t)return null;let n=[];if(t.reactLoadableManifest&&e){let r=t.reactLoadableManifest;for(let t of e){if(!r[t])continue;let e=r[t].files;n.push(...e)}}if(0===n.length)return null;let i=(0,s.getAssetTokenQuery)();return(0,r.jsx)(r.Fragment,{children:n.map(e=>{let n=`${t.assetPrefix}/_next/${(0,o.encodeURIPath)(e)}${i}`;return e.endsWith(".css")?(0,r.jsx)("link",{precedence:"dynamic",href:n,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,l.preload)(n,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},82525,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return i}});let r=e.r(85899),l=e.r(4232),u=e.r(15352),o=e.r(48021);function s(e){return{default:e&&"default"in e?e.default:e}}let a={loader:()=>Promise.resolve(s(()=>null)),loading:null,ssr:!0},i=function(e){let t={...a,...e},n=(0,l.lazy)(()=>t.loader().then(s)),i=t.loading;function d(e){let s=i?(0,r.jsx)(i,{isLoading:!0,pastDelay:!0,error:null}):null,a=!t.ssr||!!t.loading,d=a?l.Suspense:l.Fragment,c=t.ssr?(0,r.jsxs)(r.Fragment,{children:["u"<typeof window?(0,r.jsx)(o.PreloadChunks,{moduleIds:t.modules}):null,(0,r.jsx)(n,{...e})]}):(0,r.jsx)(u.BailoutToCSR,{reason:"next/dynamic",children:(0,r.jsx)(n,{...e})});return(0,r.jsx)(d,{...a?{fallback:s}:{},children:c})}return d.displayName="LoadableComponent",d}},52279,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return l}});let r=e.r(5581)._(e.r(82525));function l(e,t){let n={};"function"==typeof e&&(n.loader=e);let l={...n,...t};return(0,r.default)({...l,modules:l.loadableGenerated?.modules})}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},66610,e=>{"use strict";var t=e.i(85899),n=e.i(52279),r=e.i(16353);let l=(0,n.default)(()=>e.A(34183),{loadableGenerated:{modules:[71714]},ssr:!1});e.s(["default",0,function(){let e=(0,r.usePathname)().split("/")[2]||"";return e&&"_"!==e?(0,t.jsx)("div",{className:"w-full h-full",children:(0,t.jsx)(l,{projectId:e})}):null}])},34183,e=>{e.v(t=>Promise.all(["static/chunks/0whtwwbpg72ar.js","static/chunks/0m83k84.midd1.js","static/chunks/17oc2l.ekcs8b.css"].map(t=>e.l(t))).then(()=>t(71714)))}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,15352,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"BailoutToCSR",{enumerable:!0,get:function(){return l}});let r=e.r(17071);function l({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new r.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},87083,(e,t,n)=>{"use strict";function r(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"encodeURIPath",{enumerable:!0,get:function(){return r}})},48021,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"PreloadChunks",{enumerable:!0,get:function(){return a}});let r=e.r(85899),l=e.r(90184),u=e.r(27807),o=e.r(87083),s=e.r(7866);function a({moduleIds:e}){if("u">typeof window)return null;let t=u.workAsyncStorage.getStore();if(void 0===t)return null;let n=[];if(t.reactLoadableManifest&&e){let r=t.reactLoadableManifest;for(let t of e){if(!r[t])continue;let e=r[t].files;n.push(...e)}}if(0===n.length)return null;let i=(0,s.getAssetTokenQuery)();return(0,r.jsx)(r.Fragment,{children:n.map(e=>{let n=`${t.assetPrefix}/_next/${(0,o.encodeURIPath)(e)}${i}`;return e.endsWith(".css")?(0,r.jsx)("link",{precedence:"dynamic",href:n,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,l.preload)(n,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},82525,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return i}});let r=e.r(85899),l=e.r(4232),u=e.r(15352),o=e.r(48021);function s(e){return{default:e&&"default"in e?e.default:e}}let a={loader:()=>Promise.resolve(s(()=>null)),loading:null,ssr:!0},i=function(e){let t={...a,...e},n=(0,l.lazy)(()=>t.loader().then(s)),i=t.loading;function d(e){let s=i?(0,r.jsx)(i,{isLoading:!0,pastDelay:!0,error:null}):null,a=!t.ssr||!!t.loading,d=a?l.Suspense:l.Fragment,c=t.ssr?(0,r.jsxs)(r.Fragment,{children:["u"<typeof window?(0,r.jsx)(o.PreloadChunks,{moduleIds:t.modules}):null,(0,r.jsx)(n,{...e})]}):(0,r.jsx)(u.BailoutToCSR,{reason:"next/dynamic",children:(0,r.jsx)(n,{...e})});return(0,r.jsx)(d,{...a?{fallback:s}:{},children:c})}return d.displayName="LoadableComponent",d}},52279,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return l}});let r=e.r(5581)._(e.r(82525));function l(e,t){let n={};"function"==typeof e&&(n.loader=e);let l={...n,...t};return(0,r.default)({...l,modules:l.loadableGenerated?.modules})}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},66610,e=>{"use strict";var t=e.i(85899),n=e.i(52279),r=e.i(16353);let l=(0,n.default)(()=>e.A(34183),{loadableGenerated:{modules:[71714]},ssr:!1});e.s(["default",0,function(){let e=(0,r.usePathname)().split("/")[2]||"";return e&&"_"!==e?(0,t.jsx)("div",{className:"w-full h-full",children:(0,t.jsx)(l,{projectId:e})}):null}])},34183,e=>{e.v(t=>Promise.all(["static/chunks/0whtwwbpg72ar.js","static/chunks/0wreuebrwlg.2.js","static/chunks/17oc2l.ekcs8b.css"].map(t=>e.l(t))).then(()=>t(71714)))}]);
@@ -22,6 +22,6 @@ WARNING: This link could potentially be dangerous`)){let i=window.open();if(i){t
22
22
  @head: Merge any PR with both approvals, assign next from ${i}.
23
23
  @dev: Work on assigned ticket or address review feedback.
24
24
  @reviewer1 & 2: Review open PRs. If @dev pushed fixes, re-review. Post verdict on PR AND notify @dev here.
25
- ALL: Communicate via this chat by tagging agents. Your terminal is NOT visible.`},[e]),T=(0,_.useCallback)(async()=>{try{let i=await fetch("/api/triggers");if(!i.ok)throw Error(`${i.status}`);let s=(await i.json())[e]||null;if(r(s),s){if(s.message&&!b.current&&(n(s.message),b.current=s.message),!y.current)if(s.enabled&&s.interval){let e=Math.max(1,Math.round(s.interval/6e4));l(e),h(String(e))}else"number"==typeof s.intervalMin&&s.intervalMin>0&&(l(s.intervalMin),h(String(s.intervalMin)));!S.current&&"number"==typeof s.durationMin&&s.durationMin>=0&&(d(s.durationMin),f(aU(s.durationMin)))}E(null)}catch(e){E(e.message)}},[e]);(0,_.useEffect)(()=>{s||n(P)},[P,s]),(0,_.useEffect)(()=>{T();let e=window.setInterval(T,5e3);return()=>window.clearInterval(e)},[T]),(0,_.useEffect)(()=>{if(!i?.enabled){N(""),M("");return}let e=()=>{if(i.nextAt&&N(aK(Math.max(0,i.nextAt-Date.now()))),i.expiresAt){let e=Math.max(0,i.expiresAt-Date.now());M(aK(e)),e<=0&&T()}else M("")};e();let r=window.setInterval(e,1e3);return()=>window.clearInterval(r)},[i?.enabled,i?.nextAt,i?.expiresAt,T]);let L=async()=>{C(!0),E(null);let i=parseFloat(u),r=Math.round(60*(Number.isFinite(i)?a$(i):3));r!==c&&(d(r),f(aU(r)));let n=parseInt(a,10),p=Number.isFinite(n)?Math.max(1,Math.min(1440,n)):15;p!==o&&(l(p),h(String(p)));try{let i=await fetch(`/api/triggers/${encodeURIComponent(e)}/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({interval:p,duration:r,message:s})});if(!i.ok)throw Error(`${i.status}`);g(!1),x(!1),await T()}catch(e){E(e.message)}finally{C(!1)}},B=async()=>{C(!0),E(null);try{let n=await fetch(`/api/triggers/${encodeURIComponent(e)}/stop`,{method:"POST"});if(!n.ok)throw Error(`${n.status}`);r({...i||{interval:0,lastSent:null,nextAt:null,expiresAt:null,message:s,intervalMin:o,durationMin:c},enabled:!1}),await T()}catch(e){E(e.message)}finally{C(!1)}},A=!!i?.enabled;return(0,p.jsxs)("div",{className:"flex flex-col border border-border",children:[(0,p.jsxs)("div",{className:"flex items-center justify-between h-7 px-3 shrink-0 border-b border-border",children:[(0,p.jsxs)("span",{className:"text-[11px] text-text-muted uppercase tracking-wider",children:["Scheduled Trigger",A?" (running)":""]}),k&&(0,p.jsxs)("span",{className:"text-[10px] text-error",children:["err: ",k]})]}),A?(0,p.jsxs)("div",{className:"p-3 flex flex-col gap-2",children:[(0,p.jsx)("div",{className:"text-[11px] text-text-muted",children:"Sending:"}),(0,p.jsx)("pre",{className:"text-[11px] font-mono whitespace-pre-wrap text-text bg-bg-surface border border-border p-2 max-h-28 overflow-auto",children:(i?.message||s).slice(0,400)}),(0,p.jsxs)("div",{className:"flex items-center gap-3 flex-wrap text-[11px]",children:[(0,p.jsxs)("span",{className:"flex items-center gap-1",children:[(0,p.jsxs)("span",{className:"relative inline-flex items-center justify-center w-2 h-2",children:[(0,p.jsx)("span",{className:"absolute inline-flex h-full w-full rounded-full bg-accent opacity-60 animate-ping"}),(0,p.jsx)("span",{className:"relative w-1.5 h-1.5 rounded-full bg-accent"})]}),(0,p.jsx)("span",{className:"text-accent",children:"Running"})]}),(0,p.jsxs)("span",{className:"tabular-nums text-text",children:["Next: ",R]}),D&&(0,p.jsxs)("span",{className:"tabular-nums text-text-muted",children:["Stops in: ",D]}),!i?.expiresAt&&(0,p.jsx)("span",{className:"text-text-muted",children:"(until stopped)"})]}),(0,p.jsx)("button",{onClick:B,disabled:w,className:"self-start px-3 py-1 text-[11px] text-text-muted border border-border hover:text-error hover:border-error/40 disabled:opacity-50 transition-colors",children:w?"Stopping…":"Stop Trigger"})]}):(0,p.jsxs)("div",{className:"p-3 flex flex-col gap-2",children:[(0,p.jsx)("label",{className:"text-[10px] text-text-muted uppercase tracking-wider",children:"Message"}),(0,p.jsx)("textarea",{value:s,onChange:e=>n(e.target.value),rows:6,spellCheck:!1,className:"w-full bg-bg text-text text-[11px] font-mono p-2 border border-border outline-none focus:border-accent resize-y"}),(0,p.jsxs)("div",{className:"flex items-center gap-2 flex-wrap text-[11px]",children:[(0,p.jsx)("span",{className:"text-text-muted",children:"Send every"}),(0,p.jsx)("input",{type:"number",value:a,onChange:e=>{h(e.target.value),g(!0)},onBlur:()=>{let e=parseInt(a,10),i=Number.isFinite(e)?Math.max(1,Math.min(1440,e)):15;l(i),h(String(i))},min:1,max:1440,className:"w-12 bg-transparent border border-border px-1 py-0.5 text-[11px] text-text outline-none focus:border-accent text-center"}),(0,p.jsx)("span",{className:"text-text-muted",children:"min for"}),(0,p.jsx)("input",{type:"number",value:u,onChange:e=>{f(e.target.value),x(!0)},onBlur:()=>{let e=parseFloat(u),i=Math.round(60*(Number.isFinite(e)?a$(e):3));d(i),f(aU(i))},min:.1,max:24,step:.1,className:"w-14 bg-transparent border border-border px-1 py-0.5 text-[11px] text-text outline-none focus:border-accent text-center"}),(0,p.jsx)("span",{className:"text-text-muted",children:"hours"})]}),(0,p.jsx)("button",{onClick:L,disabled:w||!s.trim(),className:"self-start px-3 py-1 text-[11px] font-semibold text-bg bg-accent hover:bg-accent-dim disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:w?"Starting…":"Start Trigger"})]})]})}function aV({open:e,initialChatId:i="",onClose:r,onSave:s}){let[n,o]=(0,_.useState)(""),[l,a]=(0,_.useState)(i),[h,c]=(0,_.useState)(!1),[d,u]=(0,_.useState)(null),[f,m]=(0,_.useState)(!1);if((0,_.useEffect)(()=>{e&&a(i)},[e,i]),(0,_.useEffect)(()=>{if(!e)return;let i=e=>{"Escape"===e.key&&r()};return window.addEventListener("keydown",i),()=>window.removeEventListener("keydown",i)},[e,r]),!e)return null;let g=async()=>{c(!0),u(null);try{await s(n.trim(),l.trim()),r()}catch(e){u(e.message||"Save failed")}finally{c(!1)}};return(0,p.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",onClick:r,role:"dialog","aria-modal":"true","aria-labelledby":"telegram-setup-title",children:(0,p.jsxs)("div",{className:"relative mx-4 max-w-xl w-full max-h-[90vh] overflow-auto rounded-lg border border-white/10 bg-neutral-950 p-6 shadow-2xl",onClick:e=>e.stopPropagation(),children:[(0,p.jsx)("button",{type:"button",onClick:r,"aria-label":"Close",className:"absolute right-3 top-3 rounded p-1 text-neutral-400 hover:bg-white/5 hover:text-white",children:(0,p.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:(0,p.jsx)("path",{d:"M4 4l12 12M16 4L4 16",strokeLinecap:"round"})})}),(0,p.jsx)("h2",{id:"telegram-setup-title",className:"text-base font-semibold text-white",children:"Set up your Telegram Bridge"}),(0,p.jsx)("p",{className:"mt-2 text-[12px] leading-relaxed text-neutral-300",children:"The bridge forwards AgentChattr messages from your project to a Telegram chat, so you can read and reply on your phone."}),(0,p.jsxs)("div",{className:"mt-4 text-[12px] text-neutral-300 space-y-3",children:[(0,p.jsxs)("section",{children:[(0,p.jsx)("h3",{className:"text-[13px] font-semibold text-white",children:"Step 1 — Create a Telegram bot"}),(0,p.jsxs)("ol",{className:"mt-1 pl-4 list-decimal space-y-0.5 text-neutral-300",children:[(0,p.jsxs)("li",{children:["Open Telegram and search for ",(0,p.jsx)("b",{children:"@BotFather"}),"."]}),(0,p.jsxs)("li",{children:["Send ",(0,p.jsx)("code",{className:"bg-white/5 px-1 rounded text-[11px]",children:"/newbot"})," and follow the prompts."]}),(0,p.jsxs)("li",{children:["Choose a name and username (must end in ",(0,p.jsx)("code",{className:"bg-white/5 px-1 rounded text-[11px]",children:"bot"}),")."]}),(0,p.jsxs)("li",{children:["BotFather replies with a ",(0,p.jsx)("b",{children:"bot token"})," that looks like ",(0,p.jsx)("code",{className:"bg-white/5 px-1 rounded text-[11px]",children:"123456:ABC-DEF1234ghIkl…"}),". Copy it."]})]})]}),(0,p.jsxs)("section",{children:[(0,p.jsx)("h3",{className:"text-[13px] font-semibold text-white",children:"Step 2 — Get your chat ID"}),(0,p.jsxs)("ol",{className:"mt-1 pl-4 list-decimal space-y-0.5 text-neutral-300",children:[(0,p.jsxs)("li",{children:["Open Telegram and search for your new bot by its exact ",(0,p.jsx)("code",{className:"bg-white/5 px-1 rounded text-[11px]",children:"@username"}),"."]}),(0,p.jsxs)("li",{children:["Tap ",(0,p.jsx)("b",{children:"Start"})," and send any message (e.g. ",(0,p.jsx)("code",{className:"bg-white/5 px-1 rounded text-[11px]",children:"hello"}),")."," ",(0,p.jsxs)("span",{className:"text-neutral-400",children:["You must send at least one message first — ",(0,p.jsx)("code",{className:"bg-white/5 px-0.5 rounded",children:"getUpdates"})," returns ",(0,p.jsx)("code",{className:"bg-white/5 px-0.5 rounded",children:'{"ok":true,"result":[]}'})," until Telegram has an inbound message on record."]})]}),(0,p.jsxs)("li",{children:["Open this URL in your browser (replace ",(0,p.jsx)("code",{className:"bg-white/5 px-1 rounded text-[11px]",children:"YOUR_TOKEN"}),"):",(0,p.jsx)("pre",{className:"mt-1 p-2 bg-white/5 rounded text-[11px] text-neutral-200 overflow-auto",children:"https://api.telegram.org/botYOUR_TOKEN/getUpdates"})]}),(0,p.jsxs)("li",{children:["Look for ",(0,p.jsx)("code",{className:"bg-white/5 px-1 rounded text-[11px]",children:'"chat":{"id":<NUMBER>'})," in the JSON. That number is your ",(0,p.jsx)("b",{children:"chat id"}),". Group chat ids are negative (e.g. ",(0,p.jsx)("code",{className:"bg-white/5 px-1 rounded text-[11px]",children:"-1001234567890"}),") — paste the full value ",(0,p.jsx)("b",{children:"including the minus sign"}),"."]})]}),(0,p.jsx)("p",{className:"mt-1 text-neutral-400",children:"Or use one of these terminal one-liners:"}),(0,p.jsxs)("p",{className:"mt-1 text-[11px] text-neutral-400",children:["With ",(0,p.jsx)("code",{className:"bg-white/5 px-1 rounded text-[11px]",children:"jq"})," (cleanest):"]}),(0,p.jsx)("pre",{className:"mt-1 p-2 bg-white/5 rounded text-[11px] text-neutral-200 overflow-auto",children:"curl -s \"https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates\" | jq '.result[-1].message.chat.id'"}),(0,p.jsxs)("p",{className:"mt-1 text-[11px] text-neutral-400",children:["Without ",(0,p.jsx)("code",{className:"bg-white/5 px-1 rounded text-[11px]",children:"jq"})," (pure grep):"]}),(0,p.jsx)("pre",{className:"mt-1 p-2 bg-white/5 rounded text-[11px] text-neutral-200 overflow-auto",children:'curl -s "https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates" | grep -o \'"chat":{"id":-\\?[0-9]*\' | tail -1'}),(0,p.jsxs)("p",{className:"mt-1 text-[11px] text-neutral-500",children:["The first message from a brand-new bot sometimes doesn't propagate to ",(0,p.jsx)("code",{className:"bg-white/5 px-0.5 rounded",children:"getUpdates"})," instantly. If ",(0,p.jsx)("code",{className:"bg-white/5 px-0.5 rounded",children:"result"})," is empty, send 2-3 more messages and retry."]}),(0,p.jsx)("button",{type:"button",onClick:()=>m(e=>!e),className:"mt-2 text-[11px] text-accent hover:underline","aria-expanded":f,children:f?"Hide troubleshooting ▾":"Still empty? Troubleshooting ▸"}),f&&(0,p.jsxs)("div",{className:"mt-2 p-2 border border-white/10 rounded text-[11px] text-neutral-300 space-y-2",children:[(0,p.jsxs)("div",{children:[(0,p.jsx)("b",{className:"text-white",children:"Webhook conflict."})," Something else may be consuming updates. Check and delete any active webhook:",(0,p.jsx)("pre",{className:"mt-1 p-2 bg-white/5 rounded text-[11px] text-neutral-200 overflow-auto",children:'curl -s "https://api.telegram.org/bot<TOKEN>/getWebhookInfo" curl -s "https://api.telegram.org/bot<TOKEN>/deleteWebhook"'})]}),(0,p.jsxs)("div",{children:[(0,p.jsx)("b",{className:"text-white",children:"Stale bridge process."}),"A leftover bridge from a previous install will hold the update queue. Two consumers can't share one bot:",(0,p.jsx)("pre",{className:"mt-1 p-2 bg-white/5 rounded text-[11px] text-neutral-200 overflow-auto",children:"ps aux | grep telegram_bridge | grep -v grep"}),"Kill any PIDs that show up before retrying the curl."]}),(0,p.jsxs)("div",{children:[(0,p.jsx)("b",{className:"text-white",children:"Token / bot mismatch."})," A token that doesn't match the bot you're messaging silently returns empty results. Confirm the token's ",(0,p.jsx)("code",{className:"bg-white/5 px-0.5 rounded",children:"username"})," matches the ",(0,p.jsx)("code",{className:"bg-white/5 px-0.5 rounded",children:"@username"}),"you're chatting with:",(0,p.jsx)("pre",{className:"mt-1 p-2 bg-white/5 rounded text-[11px] text-neutral-200 overflow-auto",children:'curl -s "https://api.telegram.org/bot<TOKEN>/getMe"'})]})]})]}),(0,p.jsxs)("section",{children:[(0,p.jsx)("h3",{className:"text-[13px] font-semibold text-white",children:"Step 3 — Paste credentials below"}),(0,p.jsxs)("div",{className:"mt-2 flex flex-col gap-2",children:[(0,p.jsxs)("label",{className:"text-[11px] text-neutral-400",children:["Bot token",(0,p.jsx)("input",{type:"password",value:n,onChange:e=>o(e.target.value),placeholder:"123456:ABC-DEF…",className:"mt-0.5 w-full bg-transparent border border-white/10 px-2 py-1 text-[12px] text-white outline-none focus:border-accent font-mono"})]}),(0,p.jsxs)("label",{className:"text-[11px] text-neutral-400",children:["Chat id",(0,p.jsx)("input",{type:"text",value:l,onChange:e=>a(e.target.value),placeholder:"123456789",className:"mt-0.5 w-full bg-transparent border border-white/10 px-2 py-1 text-[12px] text-white outline-none focus:border-accent font-mono"})]}),d&&(0,p.jsx)("div",{className:"text-[11px] text-error",children:d}),(0,p.jsx)("button",{type:"button",onClick:g,disabled:h||!n.trim()||!l.trim(),className:"mt-1 self-start px-3 py-1 text-[11px] font-semibold text-bg bg-accent hover:bg-accent-dim disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:h?"Saving…":"Save and start bridge"})]})]})]})]})})}async function aY(e,i){let r=await fetch(`/api/telegram?action=${encodeURIComponent(e)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}),s=await r.json();if(!r.ok||!1===s.ok)throw Error(s.error||`${r.status}`);return s}function aX({projectId:e}){let[i,r]=(0,_.useState)(null),[s,n]=(0,_.useState)(!1),[o,l]=(0,_.useState)(null),[a,h]=(0,_.useState)(null),[c,d]=(0,_.useState)(!1),u=(0,_.useCallback)(async()=>{try{let i=await fetch(`/api/telegram?project=${encodeURIComponent(e)}`);if(!i.ok)throw Error(`${i.status}`);let s=await i.json();r(s),h(null)}catch(e){h(e.message)}},[e]);(0,_.useEffect)(()=>{u();let e=window.setInterval(u,5e3);return()=>window.clearInterval(e)},[u]);let f=async()=>{n(!0),l(null);try{i&&!i.bridge_installed&&await aY("install",{}),await aY("start",{project_id:e}),await u()}catch(e){l(e.message)}finally{n(!1)}},m=async()=>{n(!0),l(null);try{await aY("stop",{project_id:e}),await u()}catch(e){l(e.message)}finally{n(!1)}},g=async(r,s)=>{await aY("save-config",{project_id:e,bot_token:r,chat_id:s});try{i&&!i.bridge_installed&&await aY("install",{}),await aY("start",{project_id:e})}catch(e){l(e.message)}await u()},v=!!i?.configured,x=!!i?.running,b=o||a||!x&&i?.last_error||"";return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("div",{className:"flex flex-col border border-border",children:[(0,p.jsxs)("div",{className:"flex items-center justify-between h-7 px-3 shrink-0 border-b border-border",children:[(0,p.jsx)("span",{className:"text-[11px] text-text-muted uppercase tracking-wider",children:"Telegram Bridge"}),b&&(0,p.jsx)("span",{className:"text-[10px] text-error",children:"error"})]}),(0,p.jsxs)("div",{className:"p-3 flex flex-col gap-2",children:[v?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("div",{className:"flex items-center gap-2 text-[11px] flex-wrap",children:[x?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("span",{className:"relative inline-flex items-center justify-center w-2 h-2",children:[(0,p.jsx)("span",{className:"absolute inline-flex h-full w-full rounded-full bg-accent opacity-60 animate-ping"}),(0,p.jsx)("span",{className:"relative w-1.5 h-1.5 rounded-full bg-accent"})]}),(0,p.jsx)("span",{className:"text-accent",children:"Running"})]}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-text-muted"}),(0,p.jsx)("span",{className:"text-text-muted",children:"Stopped"})]}),i?.bot_username&&(0,p.jsxs)("span",{className:"text-text-muted",children:["· Bot: @",i.bot_username]}),i?.chat_id&&(0,p.jsxs)("span",{className:"text-text-muted tabular-nums",children:["· Chat: ",i.chat_id]})]}),(0,p.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[x?(0,p.jsx)("button",{onClick:m,disabled:s,className:"px-3 py-1 text-[11px] text-text-muted border border-border hover:text-error hover:border-error/40 disabled:opacity-50 transition-colors",children:s?"Stopping…":"Stop"}):(0,p.jsx)("button",{onClick:f,disabled:s,className:"px-3 py-1 text-[11px] font-semibold text-bg bg-accent hover:bg-accent-dim disabled:opacity-50 transition-colors",children:s?"Starting…":"Start"}),(0,p.jsx)("button",{onClick:()=>d(!0),disabled:s,className:"px-3 py-1 text-[11px] text-text-muted border border-border hover:text-text disabled:opacity-50 transition-colors",children:"How to set up"}),(0,p.jsx)("button",{onClick:()=>d(!0),disabled:s,className:"px-3 py-1 text-[11px] text-text-muted border border-border hover:text-text disabled:opacity-50 transition-colors",children:"Edit credentials"})]})]}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("div",{className:"flex items-center gap-2 text-[11px] text-text-muted",children:[(0,p.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-text-muted"}),(0,p.jsx)("span",{children:"Not configured"})]}),(0,p.jsx)("button",{onClick:()=>d(!0),disabled:s,className:"self-start px-3 py-1 text-[11px] font-semibold text-bg bg-accent hover:bg-accent-dim disabled:opacity-50 transition-colors",children:"Set up Telegram Bridge"})]}),b&&(0,p.jsxs)("div",{className:"mt-1 p-2 text-[10px] text-error border border-error/40 bg-error/5 font-mono whitespace-pre-wrap break-words max-h-40 overflow-y-auto",children:[b,o&&(0,p.jsx)("button",{type:"button",onClick:()=>l(null),className:"block mt-1 text-text-muted hover:text-text underline",children:"dismiss"})]})]})]}),(0,p.jsx)(aV,{open:c,initialChatId:i?.chat_id||"",onClose:()=>d(!1),onSave:g})]})}function aG({projectId:e}){let[i,r]=(0,_.useState)(30),[s,n]=(0,_.useState)("30"),[o,l]=(0,_.useState)(!1),[a,h]=(0,_.useState)(null),[c,d]=(0,_.useState)(null),[u,f]=(0,_.useState)(!1),[m,g]=(0,_.useState)(!1),[v,x]=(0,_.useState)(30),[b,y]=(0,_.useState)("30"),[S,w]=(0,_.useState)(!1);(0,_.useEffect)(()=>{fetch(`/api/loop-guard?project=${encodeURIComponent(e)}`).then(e=>e.ok?e.json():null).then(e=>{e&&"number"==typeof e.value&&(r(e.value),n(String(e.value)))}).catch(()=>{}),fetch("/api/config").then(e=>e.ok?e.json():null).then(i=>{if(!i||!Array.isArray(i.projects))return;let r=i.projects.find(i=>i.id===e);if(!r)return;g(!!r.auto_continue_loop_guard);let s=Number.isFinite(r.auto_continue_delay_sec)?r.auto_continue_delay_sec:30;x(s),y(String(s))}).catch(()=>{})},[e]);let C=async(i,r)=>{w(!0);try{let s=await fetch("/api/config");if(!s.ok)throw Error(`GET /api/config ${s.status}`);let n=await s.json();if(!n||!Array.isArray(n.projects))throw Error("config shape");let o=n.projects.findIndex(i=>i.id===e);if(o<0)throw Error(`project ${e} not found`);n.projects[o]={...n.projects[o],auto_continue_loop_guard:i,auto_continue_delay_sec:r};let l=await fetch("/api/config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!l.ok)throw Error(`PUT /api/config ${l.status}`)}finally{w(!1)}};return(0,p.jsxs)("div",{className:"border border-border rounded p-2 text-[11px] font-mono",children:[(0,p.jsxs)("div",{className:"flex items-center gap-1.5 mb-1",children:[(0,p.jsx)("span",{className:"uppercase tracking-wider text-text-muted",children:"Loop Guard"}),(0,p.jsx)("button",{type:"button","aria-label":"About loop guard",onClick:()=>f(e=>!e),className:"w-3.5 h-3.5 rounded-full border border-border text-[9px] leading-none text-text-muted hover:text-accent hover:border-accent inline-flex items-center justify-center",children:"?"})]}),u&&(0,p.jsxs)("div",{className:"mb-1.5 p-1.5 text-[10px] leading-snug text-text bg-bg-surface border border-border/60 rounded",children:[(0,p.jsx)("b",{children:"Loop Guard"})," pauses agent-to-agent message chains after this many hops with no human reply. Higher values let agents work longer overnight; lower values add safety against runaway loops. AgentChattr accepts ",(0,p.jsx)("b",{children:"4–50"}),"; QuadWork defaults to ",(0,p.jsx)("b",{children:"30"})," (about 5–6 full PR cycles). Posting any chat message yourself resets the counter immediately."]}),(0,p.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,p.jsx)("span",{className:"text-text-muted",children:"Pause after"}),(0,p.jsx)("input",{type:"number",min:4,max:50,value:s,onChange:e=>n(e.target.value),disabled:o,className:"w-12 bg-transparent px-1 py-0.5 border border-border rounded text-text outline-none focus:ring-1 focus:ring-accent"}),(0,p.jsx)("span",{className:"text-text-muted",children:"hops"}),(0,p.jsx)("button",{type:"button",onClick:()=>{let i=parseInt(s,10);!Number.isInteger(i)||i<4||i>50?h("Must be an integer between 4 and 50."):(l(!0),h(null),fetch(`/api/loop-guard?project=${encodeURIComponent(e)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:i})}).then(async e=>{if(!e.ok){let i=await e.text().catch(()=>"");throw Error(`${e.status}: ${i.slice(0,120)}`)}return e.json()}).then(e=>{r(e.value),d(e.live)}).catch(e=>h(e.message||String(e))).finally(()=>l(!1)))},disabled:o||s===String(i),className:"ml-auto px-2 py-0.5 text-[10px] text-accent border border-accent/40 rounded hover:bg-accent/10 transition-colors disabled:opacity-30 disabled:cursor-not-allowed",title:"Apply (writes config.toml + live-pushes to AgentChattr)",children:o?"…":"Apply"})]}),a&&(0,p.jsx)("div",{className:"mt-1 text-[10px] text-red-400",children:a}),!1===c&&!a&&(0,p.jsx)("div",{className:"mt-1 text-[10px] text-text-muted",children:"Saved to config.toml — live update failed; takes effect on next AC restart."}),(0,p.jsxs)("label",{className:"mt-2 flex items-center gap-1.5 text-[10px] text-text-muted cursor-pointer select-none",children:[(0,p.jsx)("input",{type:"checkbox",checked:m,disabled:S,onChange:e=>{let i=e.target.checked;g(i),C(i,v).catch(()=>{g(!i)})}}),"Auto-continue after pause",(0,p.jsx)("span",{className:"text-text-muted",children:"— wait"}),(0,p.jsx)("input",{type:"number",min:5,max:300,value:b,disabled:S||!m,onChange:e=>y(e.target.value),onBlur:()=>{let e=parseInt(b,10),i=Number.isFinite(e)?Math.max(5,Math.min(300,e)):30;x(i),y(String(i)),i!==v&&C(m,i).catch(()=>{})},className:"w-10 bg-transparent px-1 py-0.5 border border-border rounded text-text outline-none focus:ring-1 focus:ring-accent disabled:opacity-40 text-center"}),(0,p.jsx)("span",{className:"text-text-muted",children:"s before /continue"})]})]})}function aJ({projectId:e}){let i=(0,_.useRef)(null),[r,s]=(0,_.useState)(null),[n,o]=(0,_.useState)(null),[l,a]=(0,_.useState)(null),[h,c]=(0,_.useState)([]),[d,u]=(0,_.useState)(!1),[f,m]=(0,_.useState)(!1);(0,_.useEffect)(()=>{fetch("/api/config").then(e=>e.ok?e.json():null).then(i=>{if(!i||!Array.isArray(i.projects))return;let r=i.projects.find(i=>i.id===e);r&&u(!!r.auto_restore_after_restart)}).catch(()=>{})},[e]);let g=async i=>{m(!0);try{let r=await fetch("/api/config");if(!r.ok)throw Error(`GET /api/config ${r.status}`);let s=await r.json(),n=s.projects?.findIndex(i=>i.id===e)??-1;if(n<0)throw Error("project not found");s.projects[n]={...s.projects[n],auto_restore_after_restart:i};let o=await fetch("/api/config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!o.ok)throw Error(`PUT /api/config ${o.status}`)}finally{m(!1)}},v=()=>{fetch(`/api/project-history/snapshots?project=${encodeURIComponent(e)}`).then(e=>e.ok?e.json():null).then(e=>{e&&Array.isArray(e.snapshots)&&c(e.snapshots)}).catch(()=>{})};(0,_.useEffect)(()=>{v();let e=setInterval(v,15e3);return()=>clearInterval(e)},[e]);let x=async i=>{if(window.confirm(`Restore snapshot ${i}? This will replay every message through AgentChattr (tagged by the original sender) and may duplicate history already in the chat. Continue?`)){s("restore"),o(null),a(null);try{let r=await fetch(`/api/project-history/restore?project=${encodeURIComponent(e)}&name=${encodeURIComponent(i)}`,{method:"POST"}),s=await r.json().catch(()=>null);if(!r.ok)throw Error(s&&s.error||`HTTP ${r.status}`);s&&"number"==typeof s.imported&&a(s)}catch(e){o(e.message||String(e))}finally{s(null),v()}}},b=async()=>{s("export"),o(null),a(null);try{let i=await fetch(`/api/project-history?project=${encodeURIComponent(e)}`);if(!i.ok){let e=await i.text().catch(()=>"");throw Error(`HTTP ${i.status}: ${e.slice(0,200)}`)}let r=await i.blob(),s=URL.createObjectURL(r),n=document.createElement("a"),o=new Date().toISOString().slice(0,10);n.href=s,n.download=`${e}-history-${o}.json`,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(s)}catch(e){o(e.message||String(e))}finally{s(null)}},y=async r=>{let n;if(r.size>0xa00000)return void o(`File too large (${r.size} bytes; limit 10485760)`);s("import"),o(null),a(null);try{let e=await r.text();n=JSON.parse(e)}catch(e){s(null),o(`Invalid JSON: ${e.message||String(e)}`);return}if(!n||"object"!=typeof n||!Array.isArray(n.messages)){s(null),o("File missing 'messages' array");return}let l=!1;if(n.project_id&&n.project_id!==e){if(!window.confirm(`This export is from project '${n.project_id}' but you're importing into '${e}'. Continue anyway?`))return void s(null);l=!0}let h=new Set(["head","dev","reviewer1","reviewer2","t1","t2a","t2b","t3","system"]),c=!1,d=new Set;for(let e of n.messages)if(e&&"object"==typeof e){let i=e.sender;if("string"==typeof i&&h.has(i.toLowerCase())&&(d.add(i),d.size>=5))break}if(d.size>0){if(!window.confirm(`This export contains messages attributed to reserved agent/system identities (${[...d].join(", ")}). Importing will replay them as those agents — only do this for a legitimate disaster-recovery restore. Continue?`))return void s(null);c=!0}let u=!1,f=i=>fetch(`/api/project-history?project=${encodeURIComponent(e)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...n,allow_project_mismatch:l,allow_agent_senders:c,allow_duplicate:u,...i})});try{let e=await f({}),i=await e.json().catch(()=>null);if(409===e.status&&i&&"string"==typeof i.error&&/already imported/i.test(i.error)){if(!window.confirm(`${i.error}
25
+ ALL: Communicate via this chat by tagging agents. Your terminal is NOT visible.`},[e]),T=(0,_.useCallback)(async()=>{try{let i=await fetch("/api/triggers");if(!i.ok)throw Error(`${i.status}`);let s=(await i.json())[e]||null;if(r(s),s){if(s.message&&!b.current&&(n(s.message),b.current=s.message),!y.current)if(s.enabled&&s.interval){let e=Math.max(1,Math.round(s.interval/6e4));l(e),h(String(e))}else"number"==typeof s.intervalMin&&s.intervalMin>0&&(l(s.intervalMin),h(String(s.intervalMin)));!S.current&&"number"==typeof s.durationMin&&s.durationMin>=0&&(d(s.durationMin),f(aU(s.durationMin)))}E(null)}catch(e){E(e.message)}},[e]);(0,_.useEffect)(()=>{s||n(P)},[P,s]),(0,_.useEffect)(()=>{T();let e=window.setInterval(T,5e3);return()=>window.clearInterval(e)},[T]),(0,_.useEffect)(()=>{if(!i?.enabled){N(""),M("");return}let e=()=>{if(i.nextAt&&N(aK(Math.max(0,i.nextAt-Date.now()))),i.expiresAt){let e=Math.max(0,i.expiresAt-Date.now());M(aK(e)),e<=0&&T()}else M("")};e();let r=window.setInterval(e,1e3);return()=>window.clearInterval(r)},[i?.enabled,i?.nextAt,i?.expiresAt,T]);let L=async()=>{C(!0),E(null);let i=parseFloat(u),r=Math.round(60*(Number.isFinite(i)?a$(i):3));r!==c&&(d(r),f(aU(r)));let n=parseInt(a,10),p=Number.isFinite(n)?Math.max(1,Math.min(1440,n)):15;p!==o&&(l(p),h(String(p)));try{let i=await fetch(`/api/triggers/${encodeURIComponent(e)}/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({interval:p,duration:r,message:s})});if(!i.ok)throw Error(`${i.status}`);g(!1),x(!1),await T()}catch(e){E(e.message)}finally{C(!1)}},B=async()=>{C(!0),E(null);try{let n=await fetch(`/api/triggers/${encodeURIComponent(e)}/stop`,{method:"POST"});if(!n.ok)throw Error(`${n.status}`);r({...i||{interval:0,lastSent:null,nextAt:null,expiresAt:null,message:s,intervalMin:o,durationMin:c},enabled:!1}),await T()}catch(e){E(e.message)}finally{C(!1)}},A=!!i?.enabled;return(0,p.jsxs)("div",{className:"flex flex-col border border-border",children:[(0,p.jsxs)("div",{className:"flex items-center justify-between h-7 px-3 shrink-0 border-b border-border",children:[(0,p.jsxs)("span",{className:"text-[11px] text-text-muted uppercase tracking-wider",children:["Scheduled Trigger",A?" (running)":""]}),k&&(0,p.jsxs)("span",{className:"text-[10px] text-error",children:["err: ",k]})]}),A?(0,p.jsxs)("div",{className:"p-3 flex flex-col gap-2",children:[(0,p.jsx)("div",{className:"text-[11px] text-text-muted",children:"Sending:"}),(0,p.jsx)("pre",{className:"text-[11px] font-mono whitespace-pre-wrap text-text bg-bg-surface border border-border p-2 max-h-28 overflow-auto",children:(i?.message||s).slice(0,400)}),(0,p.jsxs)("div",{className:"flex items-center gap-3 flex-wrap text-[11px]",children:[(0,p.jsxs)("span",{className:"flex items-center gap-1",children:[(0,p.jsxs)("span",{className:"relative inline-flex items-center justify-center w-2 h-2",children:[(0,p.jsx)("span",{className:"absolute inline-flex h-full w-full rounded-full bg-accent opacity-60 animate-ping"}),(0,p.jsx)("span",{className:"relative w-1.5 h-1.5 rounded-full bg-accent"})]}),(0,p.jsx)("span",{className:"text-accent",children:"Running"})]}),(0,p.jsxs)("span",{className:"tabular-nums text-text",children:["Next: ",R]}),D&&(0,p.jsxs)("span",{className:"tabular-nums text-text-muted",children:["Stops in: ",D]}),!i?.expiresAt&&(0,p.jsx)("span",{className:"text-text-muted",children:"(until stopped)"})]}),(0,p.jsx)("button",{onClick:B,disabled:w,className:"self-start px-3 py-1 text-[11px] text-text-muted border border-border hover:text-error hover:border-error/40 disabled:opacity-50 transition-colors",children:w?"Stopping…":"Stop Trigger"})]}):(0,p.jsxs)("div",{className:"p-3 flex flex-col gap-2",children:[(0,p.jsx)("label",{className:"text-[10px] text-text-muted uppercase tracking-wider",children:"Message"}),(0,p.jsx)("textarea",{value:s,onChange:e=>n(e.target.value),rows:6,spellCheck:!1,className:"w-full bg-bg text-text text-[11px] font-mono p-2 border border-border outline-none focus:border-accent resize-y"}),(0,p.jsxs)("div",{className:"flex items-center gap-2 flex-wrap text-[11px]",children:[(0,p.jsx)("span",{className:"text-text-muted",children:"Send every"}),(0,p.jsx)("input",{type:"number",value:a,onChange:e=>{h(e.target.value),g(!0)},onBlur:()=>{let e=parseInt(a,10),i=Number.isFinite(e)?Math.max(1,Math.min(1440,e)):15;l(i),h(String(i))},min:1,max:1440,className:"w-12 bg-transparent border border-border px-1 py-0.5 text-[11px] text-text outline-none focus:border-accent text-center"}),(0,p.jsx)("span",{className:"text-text-muted",children:"min for"}),(0,p.jsx)("input",{type:"number",value:u,onChange:e=>{f(e.target.value),x(!0)},onBlur:()=>{let e=parseFloat(u),i=Math.round(60*(Number.isFinite(e)?a$(e):3));d(i),f(aU(i))},min:.1,max:24,step:.1,className:"w-14 bg-transparent border border-border px-1 py-0.5 text-[11px] text-text outline-none focus:border-accent text-center"}),(0,p.jsx)("span",{className:"text-text-muted",children:"hours"})]}),(0,p.jsx)("button",{onClick:L,disabled:w||!s.trim(),className:"self-start px-3 py-1 text-[11px] font-semibold text-bg bg-accent hover:bg-accent-dim disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:w?"Starting…":"Start Trigger"})]})]})}function aV({open:e,initialChatId:i="",onClose:r,onSave:s}){let[n,o]=(0,_.useState)(""),[l,a]=(0,_.useState)(i),[h,c]=(0,_.useState)(!1),[d,u]=(0,_.useState)(null),[f,m]=(0,_.useState)(!1);if((0,_.useEffect)(()=>{e&&a(i)},[e,i]),(0,_.useEffect)(()=>{if(!e)return;let i=e=>{"Escape"===e.key&&r()};return window.addEventListener("keydown",i),()=>window.removeEventListener("keydown",i)},[e,r]),!e)return null;let g=async()=>{c(!0),u(null);try{await s(n.trim(),l.trim()),r()}catch(e){u(e.message||"Save failed")}finally{c(!1)}};return(0,p.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",onClick:r,role:"dialog","aria-modal":"true","aria-labelledby":"telegram-setup-title",children:(0,p.jsxs)("div",{className:"relative mx-4 max-w-xl w-full max-h-[90vh] overflow-auto rounded-lg border border-white/10 bg-neutral-950 p-6 shadow-2xl",onClick:e=>e.stopPropagation(),children:[(0,p.jsx)("button",{type:"button",onClick:r,"aria-label":"Close",className:"absolute right-3 top-3 rounded p-1 text-neutral-400 hover:bg-white/5 hover:text-white",children:(0,p.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:(0,p.jsx)("path",{d:"M4 4l12 12M16 4L4 16",strokeLinecap:"round"})})}),(0,p.jsx)("h2",{id:"telegram-setup-title",className:"text-base font-semibold text-white",children:"Set up your Telegram Bridge"}),(0,p.jsx)("p",{className:"mt-2 text-[12px] leading-relaxed text-neutral-300",children:"The bridge forwards AgentChattr messages from your project to a Telegram chat, so you can read and reply on your phone."}),(0,p.jsxs)("div",{className:"mt-4 text-[12px] text-neutral-300 space-y-3",children:[(0,p.jsxs)("section",{children:[(0,p.jsx)("h3",{className:"text-[13px] font-semibold text-white",children:"Step 1 — Create a Telegram bot"}),(0,p.jsxs)("ol",{className:"mt-1 pl-4 list-decimal space-y-0.5 text-neutral-300",children:[(0,p.jsxs)("li",{children:["Open Telegram and search for ",(0,p.jsx)("b",{children:"@BotFather"}),"."]}),(0,p.jsxs)("li",{children:["Send ",(0,p.jsx)("code",{className:"bg-white/5 px-1 rounded text-[11px]",children:"/newbot"})," and follow the prompts."]}),(0,p.jsxs)("li",{children:["Choose a name and username (must end in ",(0,p.jsx)("code",{className:"bg-white/5 px-1 rounded text-[11px]",children:"bot"}),")."]}),(0,p.jsxs)("li",{children:["BotFather replies with a ",(0,p.jsx)("b",{children:"bot token"})," that looks like ",(0,p.jsx)("code",{className:"bg-white/5 px-1 rounded text-[11px]",children:"123456:ABC-DEF1234ghIkl…"}),". Copy it."]})]})]}),(0,p.jsxs)("section",{children:[(0,p.jsx)("h3",{className:"text-[13px] font-semibold text-white",children:"Step 2 — Get your chat ID"}),(0,p.jsxs)("ol",{className:"mt-1 pl-4 list-decimal space-y-0.5 text-neutral-300",children:[(0,p.jsxs)("li",{children:["Open Telegram and search for your new bot by its exact ",(0,p.jsx)("code",{className:"bg-white/5 px-1 rounded text-[11px]",children:"@username"}),"."]}),(0,p.jsxs)("li",{children:["Tap ",(0,p.jsx)("b",{children:"Start"})," and send any message (e.g. ",(0,p.jsx)("code",{className:"bg-white/5 px-1 rounded text-[11px]",children:"hello"}),")."," ",(0,p.jsxs)("span",{className:"text-neutral-400",children:["You must send at least one message first — ",(0,p.jsx)("code",{className:"bg-white/5 px-0.5 rounded",children:"getUpdates"})," returns ",(0,p.jsx)("code",{className:"bg-white/5 px-0.5 rounded",children:'{"ok":true,"result":[]}'})," until Telegram has an inbound message on record."]})]}),(0,p.jsxs)("li",{children:["Open this URL in your browser (replace ",(0,p.jsx)("code",{className:"bg-white/5 px-1 rounded text-[11px]",children:"YOUR_TOKEN"}),"):",(0,p.jsx)("pre",{className:"mt-1 p-2 bg-white/5 rounded text-[11px] text-neutral-200 overflow-auto",children:"https://api.telegram.org/botYOUR_TOKEN/getUpdates"})]}),(0,p.jsxs)("li",{children:["Look for ",(0,p.jsx)("code",{className:"bg-white/5 px-1 rounded text-[11px]",children:'"chat":{"id":<NUMBER>'})," in the JSON. That number is your ",(0,p.jsx)("b",{children:"chat id"}),". Group chat ids are negative (e.g. ",(0,p.jsx)("code",{className:"bg-white/5 px-1 rounded text-[11px]",children:"-1001234567890"}),") — paste the full value ",(0,p.jsx)("b",{children:"including the minus sign"}),"."]})]}),(0,p.jsx)("p",{className:"mt-1 text-neutral-400",children:"Or use one of these terminal one-liners:"}),(0,p.jsxs)("p",{className:"mt-1 text-[11px] text-neutral-400",children:["With ",(0,p.jsx)("code",{className:"bg-white/5 px-1 rounded text-[11px]",children:"jq"})," (cleanest):"]}),(0,p.jsx)("pre",{className:"mt-1 p-2 bg-white/5 rounded text-[11px] text-neutral-200 overflow-auto",children:"curl -s \"https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates\" | jq '.result[-1].message.chat.id'"}),(0,p.jsxs)("p",{className:"mt-1 text-[11px] text-neutral-400",children:["Without ",(0,p.jsx)("code",{className:"bg-white/5 px-1 rounded text-[11px]",children:"jq"})," (pure grep):"]}),(0,p.jsx)("pre",{className:"mt-1 p-2 bg-white/5 rounded text-[11px] text-neutral-200 overflow-auto",children:'curl -s "https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates" | grep -o \'"chat":{"id":-\\?[0-9]*\' | tail -1'}),(0,p.jsxs)("p",{className:"mt-1 text-[11px] text-neutral-500",children:["The first message from a brand-new bot sometimes doesn't propagate to ",(0,p.jsx)("code",{className:"bg-white/5 px-0.5 rounded",children:"getUpdates"})," instantly. If ",(0,p.jsx)("code",{className:"bg-white/5 px-0.5 rounded",children:"result"})," is empty, send 2-3 more messages and retry."]}),(0,p.jsx)("button",{type:"button",onClick:()=>m(e=>!e),className:"mt-2 text-[11px] text-accent hover:underline","aria-expanded":f,children:f?"Hide troubleshooting ▾":"Still empty? Troubleshooting ▸"}),f&&(0,p.jsxs)("div",{className:"mt-2 p-2 border border-white/10 rounded text-[11px] text-neutral-300 space-y-2",children:[(0,p.jsxs)("div",{children:[(0,p.jsx)("b",{className:"text-white",children:"Webhook conflict."})," Something else may be consuming updates. Check and delete any active webhook:",(0,p.jsx)("pre",{className:"mt-1 p-2 bg-white/5 rounded text-[11px] text-neutral-200 overflow-auto",children:'curl -s "https://api.telegram.org/bot<TOKEN>/getWebhookInfo" curl -s "https://api.telegram.org/bot<TOKEN>/deleteWebhook"'})]}),(0,p.jsxs)("div",{children:[(0,p.jsx)("b",{className:"text-white",children:"Stale bridge process."}),"A leftover bridge from a previous install will hold the update queue. Two consumers can't share one bot:",(0,p.jsx)("pre",{className:"mt-1 p-2 bg-white/5 rounded text-[11px] text-neutral-200 overflow-auto",children:"ps aux | grep telegram_bridge | grep -v grep"}),"Kill any PIDs that show up before retrying the curl."]}),(0,p.jsxs)("div",{children:[(0,p.jsx)("b",{className:"text-white",children:"Token / bot mismatch."})," A token that doesn't match the bot you're messaging silently returns empty results. Confirm the token's ",(0,p.jsx)("code",{className:"bg-white/5 px-0.5 rounded",children:"username"})," matches the ",(0,p.jsx)("code",{className:"bg-white/5 px-0.5 rounded",children:"@username"}),"you're chatting with:",(0,p.jsx)("pre",{className:"mt-1 p-2 bg-white/5 rounded text-[11px] text-neutral-200 overflow-auto",children:'curl -s "https://api.telegram.org/bot<TOKEN>/getMe"'})]})]})]}),(0,p.jsxs)("section",{children:[(0,p.jsx)("h3",{className:"text-[13px] font-semibold text-white",children:"Step 3 — Paste credentials below"}),(0,p.jsxs)("div",{className:"mt-2 flex flex-col gap-2",children:[(0,p.jsxs)("label",{className:"text-[11px] text-neutral-400",children:["Bot token",(0,p.jsx)("input",{type:"password",value:n,onChange:e=>o(e.target.value),placeholder:"123456:ABC-DEF…",className:"mt-0.5 w-full bg-transparent border border-white/10 px-2 py-1 text-[12px] text-white outline-none focus:border-accent font-mono"})]}),(0,p.jsxs)("label",{className:"text-[11px] text-neutral-400",children:["Chat id",(0,p.jsx)("input",{type:"text",value:l,onChange:e=>a(e.target.value),placeholder:"123456789",className:"mt-0.5 w-full bg-transparent border border-white/10 px-2 py-1 text-[12px] text-white outline-none focus:border-accent font-mono"})]}),d&&(0,p.jsx)("div",{className:"text-[11px] text-error",children:d}),(0,p.jsx)("button",{type:"button",onClick:g,disabled:h||!n.trim()||!l.trim(),className:"mt-1 self-start px-3 py-1 text-[11px] font-semibold text-bg bg-accent hover:bg-accent-dim disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:h?"Saving…":"Save and start bridge"})]})]})]})]})})}async function aY(e,i){let r=await fetch(`/api/telegram?action=${encodeURIComponent(e)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}),s=await r.json();if(!r.ok||!1===s.ok)throw Error(s.error||`${r.status}`);return s}function aX({projectId:e}){let[i,r]=(0,_.useState)(null),[s,n]=(0,_.useState)(!1),[o,l]=(0,_.useState)(null),[a,h]=(0,_.useState)(null),[c,d]=(0,_.useState)(!1),[u,f]=(0,_.useState)(null),m=(0,_.useCallback)(async()=>{try{let i=await fetch(`/api/telegram?project=${encodeURIComponent(e)}`);if(!i.ok)throw Error(`${i.status}`);let s=await i.json();r(s),h(null)}catch(e){h(e.message)}},[e]);(0,_.useEffect)(()=>{m();let e=window.setInterval(m,5e3);return()=>window.clearInterval(e)},[m]);let g=e=>{let i=Array.isArray(e?.patched_projects)?e.patched_projects:[];i.length>0?f(`Install Bridge patched ${i.length} AgentChattr config(s) (${i.join(", ")}) to declare [agents.telegram-bridge]. Click SERVER → Restart so AgentChattr picks up the new agent slug, then click Start again. Without the restart, Start will fail with a 400 registration loop.`):f(null)},v=async()=>{n(!0),l(null);try{if(i&&!i.bridge_installed){let e=await aY("install",{});g(e)}await aY("start",{project_id:e}),await m()}catch(e){l(e.message)}finally{n(!1)}},x=async()=>{n(!0),l(null);try{await aY("stop",{project_id:e}),await m()}catch(e){l(e.message)}finally{n(!1)}},b=async(r,s)=>{await aY("save-config",{project_id:e,bot_token:r,chat_id:s});try{if(i&&!i.bridge_installed){let e=await aY("install",{});g(e)}await aY("start",{project_id:e})}catch(e){l(e.message)}await m()},y=!!i?.configured,S=!!i?.running,w=o||a||!S&&i?.last_error||"";return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("div",{className:"flex flex-col border border-border",children:[(0,p.jsxs)("div",{className:"flex items-center justify-between h-7 px-3 shrink-0 border-b border-border",children:[(0,p.jsx)("span",{className:"text-[11px] text-text-muted uppercase tracking-wider",children:"Telegram Bridge"}),w&&(0,p.jsx)("span",{className:"text-[10px] text-error",children:"error"})]}),(0,p.jsxs)("div",{className:"p-3 flex flex-col gap-2",children:[y?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("div",{className:"flex items-center gap-2 text-[11px] flex-wrap",children:[S?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("span",{className:"relative inline-flex items-center justify-center w-2 h-2",children:[(0,p.jsx)("span",{className:"absolute inline-flex h-full w-full rounded-full bg-accent opacity-60 animate-ping"}),(0,p.jsx)("span",{className:"relative w-1.5 h-1.5 rounded-full bg-accent"})]}),(0,p.jsx)("span",{className:"text-accent",children:"Running"})]}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-text-muted"}),(0,p.jsx)("span",{className:"text-text-muted",children:"Stopped"})]}),i?.bot_username&&(0,p.jsxs)("span",{className:"text-text-muted",children:["· Bot: @",i.bot_username]}),i?.chat_id&&(0,p.jsxs)("span",{className:"text-text-muted tabular-nums",children:["· Chat: ",i.chat_id]})]}),(0,p.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[S?(0,p.jsx)("button",{onClick:x,disabled:s,className:"px-3 py-1 text-[11px] text-text-muted border border-border hover:text-error hover:border-error/40 disabled:opacity-50 transition-colors",children:s?"Stopping…":"Stop"}):(0,p.jsx)("button",{onClick:v,disabled:s,className:"px-3 py-1 text-[11px] font-semibold text-bg bg-accent hover:bg-accent-dim disabled:opacity-50 transition-colors",children:s?"Starting…":"Start"}),(0,p.jsx)("button",{onClick:()=>d(!0),disabled:s,className:"px-3 py-1 text-[11px] text-text-muted border border-border hover:text-text disabled:opacity-50 transition-colors",children:"How to set up"}),(0,p.jsx)("button",{onClick:()=>d(!0),disabled:s,className:"px-3 py-1 text-[11px] text-text-muted border border-border hover:text-text disabled:opacity-50 transition-colors",children:"Edit credentials"})]})]}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("div",{className:"flex items-center gap-2 text-[11px] text-text-muted",children:[(0,p.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-text-muted"}),(0,p.jsx)("span",{children:"Not configured"})]}),(0,p.jsx)("button",{onClick:()=>d(!0),disabled:s,className:"self-start px-3 py-1 text-[11px] font-semibold text-bg bg-accent hover:bg-accent-dim disabled:opacity-50 transition-colors",children:"Set up Telegram Bridge"})]}),u&&(0,p.jsxs)("div",{className:"mt-1 p-2 text-[10px] text-accent border border-accent/40 bg-accent/5 whitespace-pre-wrap break-words",children:[u,(0,p.jsx)("button",{type:"button",onClick:()=>f(null),className:"block mt-1 text-text-muted hover:text-text underline",children:"dismiss"})]}),w&&(0,p.jsxs)("div",{className:"mt-1 p-2 text-[10px] text-error border border-error/40 bg-error/5 font-mono whitespace-pre-wrap break-words max-h-40 overflow-y-auto",children:[w,o&&(0,p.jsx)("button",{type:"button",onClick:()=>l(null),className:"block mt-1 text-text-muted hover:text-text underline",children:"dismiss"})]})]})]}),(0,p.jsx)(aV,{open:c,initialChatId:i?.chat_id||"",onClose:()=>d(!1),onSave:b})]})}function aG({projectId:e}){let[i,r]=(0,_.useState)(30),[s,n]=(0,_.useState)("30"),[o,l]=(0,_.useState)(!1),[a,h]=(0,_.useState)(null),[c,d]=(0,_.useState)(null),[u,f]=(0,_.useState)(!1),[m,g]=(0,_.useState)(!1),[v,x]=(0,_.useState)(30),[b,y]=(0,_.useState)("30"),[S,w]=(0,_.useState)(!1);(0,_.useEffect)(()=>{fetch(`/api/loop-guard?project=${encodeURIComponent(e)}`).then(e=>e.ok?e.json():null).then(e=>{e&&"number"==typeof e.value&&(r(e.value),n(String(e.value)))}).catch(()=>{}),fetch("/api/config").then(e=>e.ok?e.json():null).then(i=>{if(!i||!Array.isArray(i.projects))return;let r=i.projects.find(i=>i.id===e);if(!r)return;g(!!r.auto_continue_loop_guard);let s=Number.isFinite(r.auto_continue_delay_sec)?r.auto_continue_delay_sec:30;x(s),y(String(s))}).catch(()=>{})},[e]);let C=async(i,r)=>{w(!0);try{let s=await fetch("/api/config");if(!s.ok)throw Error(`GET /api/config ${s.status}`);let n=await s.json();if(!n||!Array.isArray(n.projects))throw Error("config shape");let o=n.projects.findIndex(i=>i.id===e);if(o<0)throw Error(`project ${e} not found`);n.projects[o]={...n.projects[o],auto_continue_loop_guard:i,auto_continue_delay_sec:r};let l=await fetch("/api/config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!l.ok)throw Error(`PUT /api/config ${l.status}`)}finally{w(!1)}};return(0,p.jsxs)("div",{className:"border border-border rounded p-2 text-[11px] font-mono",children:[(0,p.jsxs)("div",{className:"flex items-center gap-1.5 mb-1",children:[(0,p.jsx)("span",{className:"uppercase tracking-wider text-text-muted",children:"Loop Guard"}),(0,p.jsx)("button",{type:"button","aria-label":"About loop guard",onClick:()=>f(e=>!e),className:"w-3.5 h-3.5 rounded-full border border-border text-[9px] leading-none text-text-muted hover:text-accent hover:border-accent inline-flex items-center justify-center",children:"?"})]}),u&&(0,p.jsxs)("div",{className:"mb-1.5 p-1.5 text-[10px] leading-snug text-text bg-bg-surface border border-border/60 rounded",children:[(0,p.jsx)("b",{children:"Loop Guard"})," pauses agent-to-agent message chains after this many hops with no human reply. Higher values let agents work longer overnight; lower values add safety against runaway loops. AgentChattr accepts ",(0,p.jsx)("b",{children:"4–50"}),"; QuadWork defaults to ",(0,p.jsx)("b",{children:"30"})," (about 5–6 full PR cycles). Posting any chat message yourself resets the counter immediately."]}),(0,p.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,p.jsx)("span",{className:"text-text-muted",children:"Pause after"}),(0,p.jsx)("input",{type:"number",min:4,max:50,value:s,onChange:e=>n(e.target.value),disabled:o,className:"w-12 bg-transparent px-1 py-0.5 border border-border rounded text-text outline-none focus:ring-1 focus:ring-accent"}),(0,p.jsx)("span",{className:"text-text-muted",children:"hops"}),(0,p.jsx)("button",{type:"button",onClick:()=>{let i=parseInt(s,10);!Number.isInteger(i)||i<4||i>50?h("Must be an integer between 4 and 50."):(l(!0),h(null),fetch(`/api/loop-guard?project=${encodeURIComponent(e)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:i})}).then(async e=>{if(!e.ok){let i=await e.text().catch(()=>"");throw Error(`${e.status}: ${i.slice(0,120)}`)}return e.json()}).then(e=>{r(e.value),d(e.live)}).catch(e=>h(e.message||String(e))).finally(()=>l(!1)))},disabled:o||s===String(i),className:"ml-auto px-2 py-0.5 text-[10px] text-accent border border-accent/40 rounded hover:bg-accent/10 transition-colors disabled:opacity-30 disabled:cursor-not-allowed",title:"Apply (writes config.toml + live-pushes to AgentChattr)",children:o?"…":"Apply"})]}),a&&(0,p.jsx)("div",{className:"mt-1 text-[10px] text-red-400",children:a}),!1===c&&!a&&(0,p.jsx)("div",{className:"mt-1 text-[10px] text-text-muted",children:"Saved to config.toml — live update failed; takes effect on next AC restart."}),(0,p.jsxs)("label",{className:"mt-2 flex items-center gap-1.5 text-[10px] text-text-muted cursor-pointer select-none",children:[(0,p.jsx)("input",{type:"checkbox",checked:m,disabled:S,onChange:e=>{let i=e.target.checked;g(i),C(i,v).catch(()=>{g(!i)})}}),"Auto-continue after pause",(0,p.jsx)("span",{className:"text-text-muted",children:"— wait"}),(0,p.jsx)("input",{type:"number",min:5,max:300,value:b,disabled:S||!m,onChange:e=>y(e.target.value),onBlur:()=>{let e=parseInt(b,10),i=Number.isFinite(e)?Math.max(5,Math.min(300,e)):30;x(i),y(String(i)),i!==v&&C(m,i).catch(()=>{})},className:"w-10 bg-transparent px-1 py-0.5 border border-border rounded text-text outline-none focus:ring-1 focus:ring-accent disabled:opacity-40 text-center"}),(0,p.jsx)("span",{className:"text-text-muted",children:"s before /continue"})]})]})}function aJ({projectId:e}){let i=(0,_.useRef)(null),[r,s]=(0,_.useState)(null),[n,o]=(0,_.useState)(null),[l,a]=(0,_.useState)(null),[h,c]=(0,_.useState)([]),[d,u]=(0,_.useState)(!1),[f,m]=(0,_.useState)(!1);(0,_.useEffect)(()=>{fetch("/api/config").then(e=>e.ok?e.json():null).then(i=>{if(!i||!Array.isArray(i.projects))return;let r=i.projects.find(i=>i.id===e);r&&u(!!r.auto_restore_after_restart)}).catch(()=>{})},[e]);let g=async i=>{m(!0);try{let r=await fetch("/api/config");if(!r.ok)throw Error(`GET /api/config ${r.status}`);let s=await r.json(),n=s.projects?.findIndex(i=>i.id===e)??-1;if(n<0)throw Error("project not found");s.projects[n]={...s.projects[n],auto_restore_after_restart:i};let o=await fetch("/api/config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!o.ok)throw Error(`PUT /api/config ${o.status}`)}finally{m(!1)}},v=()=>{fetch(`/api/project-history/snapshots?project=${encodeURIComponent(e)}`).then(e=>e.ok?e.json():null).then(e=>{e&&Array.isArray(e.snapshots)&&c(e.snapshots)}).catch(()=>{})};(0,_.useEffect)(()=>{v();let e=setInterval(v,15e3);return()=>clearInterval(e)},[e]);let x=async i=>{if(window.confirm(`Restore snapshot ${i}? This will replay every message through AgentChattr (tagged by the original sender) and may duplicate history already in the chat. Continue?`)){s("restore"),o(null),a(null);try{let r=await fetch(`/api/project-history/restore?project=${encodeURIComponent(e)}&name=${encodeURIComponent(i)}`,{method:"POST"}),s=await r.json().catch(()=>null);if(!r.ok)throw Error(s&&s.error||`HTTP ${r.status}`);s&&"number"==typeof s.imported&&a(s)}catch(e){o(e.message||String(e))}finally{s(null),v()}}},b=async()=>{s("export"),o(null),a(null);try{let i=await fetch(`/api/project-history?project=${encodeURIComponent(e)}`);if(!i.ok){let e=await i.text().catch(()=>"");throw Error(`HTTP ${i.status}: ${e.slice(0,200)}`)}let r=await i.blob(),s=URL.createObjectURL(r),n=document.createElement("a"),o=new Date().toISOString().slice(0,10);n.href=s,n.download=`${e}-history-${o}.json`,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(s)}catch(e){o(e.message||String(e))}finally{s(null)}},y=async r=>{let n;if(r.size>0xa00000)return void o(`File too large (${r.size} bytes; limit 10485760)`);s("import"),o(null),a(null);try{let e=await r.text();n=JSON.parse(e)}catch(e){s(null),o(`Invalid JSON: ${e.message||String(e)}`);return}if(!n||"object"!=typeof n||!Array.isArray(n.messages)){s(null),o("File missing 'messages' array");return}let l=!1;if(n.project_id&&n.project_id!==e){if(!window.confirm(`This export is from project '${n.project_id}' but you're importing into '${e}'. Continue anyway?`))return void s(null);l=!0}let h=new Set(["head","dev","reviewer1","reviewer2","t1","t2a","t2b","t3","system"]),c=!1,d=new Set;for(let e of n.messages)if(e&&"object"==typeof e){let i=e.sender;if("string"==typeof i&&h.has(i.toLowerCase())&&(d.add(i),d.size>=5))break}if(d.size>0){if(!window.confirm(`This export contains messages attributed to reserved agent/system identities (${[...d].join(", ")}). Importing will replay them as those agents — only do this for a legitimate disaster-recovery restore. Continue?`))return void s(null);c=!0}let u=!1,f=i=>fetch(`/api/project-history?project=${encodeURIComponent(e)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...n,allow_project_mismatch:l,allow_agent_senders:c,allow_duplicate:u,...i})});try{let e=await f({}),i=await e.json().catch(()=>null);if(409===e.status&&i&&"string"==typeof i.error&&/already imported/i.test(i.error)){if(!window.confirm(`${i.error}
26
26
 
27
27
  This file looks like it was already imported. Re-import will duplicate every message. Continue anyway?`))return void s(null);u=!0,e=await f({allow_duplicate:!0}),i=await e.json().catch(()=>null)}if(!e.ok)throw Error(i&&i.error||`HTTP ${e.status}`);a(i)}catch(e){o(e.message||String(e))}finally{s(null),i.current&&(i.current.value="")}};return(0,p.jsxs)("div",{className:"border border-border rounded p-2 text-[11px] font-mono",children:[(0,p.jsx)("div",{className:"text-text-muted uppercase tracking-wider mb-1.5",children:"Project History"}),(0,p.jsxs)("div",{className:"flex items-center gap-1.5 flex-wrap",children:[(0,p.jsx)("button",{type:"button",onClick:b,disabled:null!==r,className:"px-2 py-0.5 text-[10px] text-accent border border-accent/40 rounded hover:bg-accent/10 transition-colors disabled:opacity-30 disabled:cursor-not-allowed",title:"Download a JSON snapshot of this project's chat history",children:"export"===r?"…":`Export ${e} chat`}),(0,p.jsx)("button",{type:"button",onClick:()=>{o(null),a(null),i.current?.click()},disabled:null!==r,className:"px-2 py-0.5 text-[10px] text-text-muted border border-border rounded hover:text-text hover:border-accent transition-colors disabled:opacity-30 disabled:cursor-not-allowed",title:"Restore a previously exported chat history (JSON)",children:"import"===r?"Importing…":"Import history…"}),(0,p.jsx)("input",{ref:i,type:"file",accept:"application/json,.json",className:"hidden",onChange:e=>{let i=e.target.files&&e.target.files[0];i&&y(i)}})]}),n&&(0,p.jsx)("div",{className:"mt-1 text-[10px] text-red-400",children:n}),l&&(0,p.jsxs)("div",{className:"mt-1 text-[10px] text-text-muted",children:["Imported ",l.imported," / ",l.total,l.skipped>0&&` \xb7 skipped ${l.skipped}`,l.errors.length>0&&` \xb7 ${l.errors.length} errors`]}),(0,p.jsxs)("label",{className:"mt-2 flex items-center gap-1.5 text-[10px] text-text-muted cursor-pointer select-none",children:[(0,p.jsx)("input",{type:"checkbox",checked:d,disabled:f,onChange:e=>{let i=e.target.checked;u(i),g(i).catch(()=>u(!i))}}),"Auto-restore newest snapshot after AC restart"]}),h.length>0&&(0,p.jsxs)("div",{className:"mt-2 border-t border-border/50 pt-1.5",children:[(0,p.jsx)("div",{className:"text-[9px] text-text-muted uppercase tracking-wider mb-0.5",children:"Auto-snapshots (before restart)"}),h.map(e=>{let i=new Date(e.mtime).toLocaleString();return(0,p.jsxs)("div",{className:"flex items-center gap-1.5 text-[10px] py-0.5",children:[(0,p.jsx)("span",{className:"text-text-muted tabular-nums flex-1 truncate",title:e.name,children:i}),(0,p.jsxs)("span",{className:"text-text-muted tabular-nums shrink-0",children:[Math.round(e.size/1024),"KB"]}),(0,p.jsx)("button",{type:"button",onClick:()=>x(e.name),disabled:null!==r,className:"px-1.5 py-0.5 text-[10px] text-accent border border-accent/40 rounded hover:bg-accent/10 transition-colors disabled:opacity-30 disabled:cursor-not-allowed",title:`Restore ${e.name}`,children:"restore"===r?"…":"Restore"})]},e.name)})]})]})}let aZ=["minimal","low","medium","high"],aQ={codex:[{value:"",label:"(CLI default)"},{value:"gpt-5.4",label:"gpt-5.4"},{value:"gpt-5",label:"gpt-5"},{value:"gpt-4o",label:"gpt-4o"}],claude:[{value:"",label:"(CLI default)"},{value:"claude-opus-4-6",label:"claude-opus-4-6"},{value:"claude-sonnet-4-6",label:"claude-sonnet-4-6"},{value:"claude-haiku-4-5-20251001",label:"claude-haiku-4-5"}]};function a0(e){return aQ[e]||[{value:"",label:"(CLI default)"}]}function a1({projectId:e,onClose:i}){let[r,s]=(0,_.useState)(null),[n,o]=(0,_.useState)(null),[l,a]=(0,_.useState)(null),[h,c]=(0,_.useState)(new Set),d=(0,_.useCallback)(async()=>{try{let i=await fetch(`/api/project/${encodeURIComponent(e)}/agent-models`);if(!i.ok)throw Error(`${i.status}`);let r=await i.json();s(r.agents||[]),o(null)}catch(e){o(e.message)}},[e]);(0,_.useEffect)(()=>{d()},[d]),(0,_.useEffect)(()=>{let e=e=>{"Escape"===e.key&&i()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[i]);let u=async(i,r)=>{a(i),o(null);try{let s=await fetch(`/api/project/${encodeURIComponent(e)}/agent-models/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}),n=await s.json();if(!s.ok||!1===n.ok)throw Error(n.error||`${s.status}`);c(e=>{let r=new Set(e);return r.add(i),r}),await d()}catch(e){o(e.message)}finally{a(null)}},f=async i=>{a(i),o(null);try{let r=await fetch(`/api/agents/${encodeURIComponent(e)}/${encodeURIComponent(i)}/restart`,{method:"POST"}),s=await r.json();if(!r.ok||!1===s.ok)throw Error(s.error||`${r.status}`);c(e=>{let r=new Set(e);return r.delete(i),r})}catch(e){o(e.message)}finally{a(null)}};return(0,p.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",onClick:i,role:"dialog","aria-modal":"true","aria-labelledby":"agent-models-title",children:(0,p.jsxs)("div",{className:"relative mx-4 w-full max-w-[520px] max-h-[90vh] overflow-auto rounded-lg border border-white/10 bg-neutral-950 p-6 shadow-2xl",onClick:e=>e.stopPropagation(),children:[(0,p.jsx)("button",{type:"button",onClick:i,"aria-label":"Close",className:"absolute right-3 top-3 rounded p-1 text-neutral-400 hover:bg-white/5 hover:text-white",children:(0,p.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:(0,p.jsx)("path",{d:"M4 4l12 12M16 4L4 16",strokeLinecap:"round"})})}),(0,p.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,p.jsx)("h2",{id:"agent-models-title",className:"text-base font-semibold text-white",children:"Agent Models"}),n&&(0,p.jsxs)("span",{className:"text-[10px] text-error max-w-[60%] truncate ml-2",title:n,children:["err: ",n]})]}),(0,p.jsxs)("div",{className:"flex flex-col gap-1.5",children:[!r&&(0,p.jsx)("div",{className:"text-[11px] text-text-muted",children:"Loading…"}),r&&0===r.length&&(0,p.jsx)("div",{className:"text-[11px] text-text-muted",children:"No agents configured."}),r&&r.map(e=>(0,p.jsxs)("div",{className:"flex items-center gap-1.5 flex-wrap",children:[(0,p.jsx)("span",{className:"text-[11px] text-text font-semibold w-16 shrink-0",children:e.agent_id}),(0,p.jsx)("span",{className:"text-[10px] text-text-muted w-12 shrink-0",children:e.backend}),h.has(e.agent_id)&&(0,p.jsx)("span",{className:"text-[9px] text-[#ffcc00] border border-[#ffcc00]/40 px-1 py-[1px] shrink-0",title:"Config changed — running session is still on the old model/effort. Click Restart to apply.",children:"restart required"}),(0,p.jsxs)("select",{value:e.model,disabled:l===e.agent_id,onChange:i=>u(e.agent_id,{model:i.target.value}),className:"flex-1 min-w-[140px] bg-transparent border border-border px-1 py-0.5 text-[11px] font-mono text-text outline-none focus:border-accent cursor-pointer disabled:opacity-50",children:[a0(e.backend).map(e=>(0,p.jsx)("option",{value:e.value,className:"bg-bg-surface",children:e.label},e.value)),e.model&&!a0(e.backend).some(i=>i.value===e.model)&&(0,p.jsxs)("option",{value:e.model,className:"bg-bg-surface",children:[e.model," (custom)"]})]}),e.reasoning_supported?(0,p.jsxs)("select",{value:e.reasoning_effort||"",disabled:l===e.agent_id,onChange:i=>u(e.agent_id,{reasoning_effort:i.target.value}),className:"bg-transparent border border-border px-1 py-0.5 text-[11px] text-text outline-none focus:border-accent cursor-pointer disabled:opacity-50",children:[(0,p.jsx)("option",{value:"",className:"bg-bg-surface",children:"(default)"}),aZ.map(e=>(0,p.jsx)("option",{value:e,className:"bg-bg-surface",children:e},e))]}):(0,p.jsx)("span",{className:"text-[10px] text-text-muted w-16 text-center",children:"—"}),(0,p.jsx)("button",{type:"button",onClick:()=>f(e.agent_id),disabled:l===e.agent_id,title:"Restart this agent to pick up the new model / reasoning setting",className:"shrink-0 px-1.5 py-0.5 text-[10px] text-text-muted border border-border hover:text-accent hover:border-accent/40 disabled:opacity-50 transition-colors",children:l===e.agent_id?"…":"Restart"})]},e.agent_id)),(0,p.jsxs)("p",{className:"mt-2 text-[10px] text-text-muted leading-snug",children:["Codex reasoning effort defaults to ",(0,p.jsx)("code",{className:"text-text",children:"medium"})," for new projects. Blank model falls back to the CLI default. Click Restart to apply changes to a live session."]})]})]})})}function a2({projectId:e}){let[i,r]=(0,_.useState)(!1),[s,n]=(0,_.useState)(null);return(0,_.useEffect)(()=>{let i=!1;return fetch(`/api/project/${encodeURIComponent(e)}/agent-models`).then(e=>e.ok?e.json():null).then(e=>{i||!e||n((e.agents||[]).map(e=>({id:e.agent_id,backend:e.backend})))}).catch(()=>{}),()=>{i=!0}},[e]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("div",{className:"flex flex-col border border-border",children:[(0,p.jsxs)("div",{className:"flex items-center justify-between h-7 px-3 shrink-0 border-b border-border",children:[(0,p.jsx)("span",{className:"text-[11px] text-text-muted uppercase tracking-wider",children:"Agent Models"}),(0,p.jsx)("button",{type:"button",onClick:()=>r(!0),className:"px-2 py-0.5 text-[10px] text-text-muted border border-border hover:text-accent hover:border-accent/40 transition-colors",children:"Configure →"})]}),s&&s.length>0&&(0,p.jsx)("div",{className:"px-3 py-1 text-[10px] text-text-muted truncate",title:s.map(e=>`${e.id}: ${e.backend}`).join(" · "),children:s.map((e,i)=>(0,p.jsxs)("span",{children:[i>0&&(0,p.jsx)("span",{className:"text-text-muted/60",children:" · "}),(0,p.jsx)("span",{className:"text-text",children:e.id}),(0,p.jsxs)("span",{children:[": ",e.backend]})]},e.id))})]}),i&&(0,p.jsx)(a1,{projectId:e,onClose:()=>r(!1)})]})}function a5({projectId:e}){return(0,p.jsxs)("div",{className:"flex flex-col h-full min-h-0",children:[(0,p.jsx)(m,{label:"Operator Features"}),(0,p.jsxs)("div",{className:"flex-1 min-h-0 flex flex-col lg:flex-row gap-2 p-2 overflow-auto lg:overflow-hidden",children:[(0,p.jsx)("div",{className:"lg:flex-1 lg:min-w-[280px] lg:min-h-0",children:(0,p.jsx)(aq,{projectId:e})}),(0,p.jsx)("div",{className:"hidden lg:block w-px self-stretch bg-border"}),(0,p.jsxs)("div",{className:"lg:flex-1 lg:min-h-0 lg:overflow-y-auto flex flex-col gap-2",children:[(0,p.jsx)(a2,{projectId:e}),(0,p.jsx)(aX,{projectId:e}),(0,p.jsx)(aG,{projectId:e}),(0,p.jsx)(aJ,{projectId:e})]})]})]})}e.s(["default",0,function({projectId:e}){let i=(0,_.useRef)(null),[r,s]=(0,_.useState)(.5),[n,o]=(0,_.useState)(.5),l=(0,_.useRef)(null),[a,h]=(0,_.useState)({});(0,_.useEffect)(()=>{let i=()=>{fetch("/api/agents").then(e=>e.ok?e.json():{}).then(i=>{let r={};for(let[s,n]of Object.entries(i))s.startsWith(`${e}/`)&&(r[s.split("/")[1]]=n.state);h(r)}).catch(()=>{})};i();let r=setInterval(i,5e3);return()=>clearInterval(r)},[e]);let c=(0,_.useCallback)((e,i)=>Math.min((i-4-150)/i,Math.max(150/i,e)),[]);(0,_.useEffect)(()=>{let e=e=>{if(!l.current||!i.current)return;let r=i.current.getBoundingClientRect();"col"===l.current?s(c((e.clientX-r.left)/r.width,r.width)):o(c((e.clientY-r.top)/r.height,r.height))},r=()=>{l.current=null,document.body.style.cursor="",document.body.style.userSelect=""};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",r),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",r)}},[c]);let d=e=>{l.current=e,document.body.style.cursor="col"===e?"col-resize":"row-resize",document.body.style.userSelect="none"},u=`${100*r}% 4px 1fr`,f=`${100*n}% 4px 1fr`;return(0,p.jsxs)("div",{ref:i,className:"w-full h-full",style:{display:"grid",gridTemplateColumns:u,gridTemplateRows:f},children:[(0,p.jsxs)("div",{className:"flex flex-col overflow-hidden border-2 border-accent",children:[(0,p.jsx)(m,{label:"AgentChattr — primary chat"}),(0,p.jsx)("div",{className:"flex-1 min-h-0",children:(0,p.jsx)(B,{projectId:e})}),(0,p.jsx)(rn,{projectId:e})]}),(0,p.jsx)("div",{className:"bg-border cursor-col-resize hover:bg-accent-dim transition-colors",onMouseDown:()=>d("col")}),(0,p.jsx)("div",{className:"flex flex-col overflow-hidden",children:(0,p.jsx)(aW,{projectId:e,agentStates:a,onStatusChange:(e,i)=>{h(r=>({...r,[e]:i}))}})}),(0,p.jsx)("div",{className:"bg-border cursor-row-resize hover:bg-accent-dim transition-colors",onMouseDown:()=>d("row")}),(0,p.jsx)("div",{className:"bg-border cursor-move",onMouseDown:()=>d("col")}),(0,p.jsx)("div",{className:"bg-border cursor-row-resize hover:bg-accent-dim transition-colors",onMouseDown:()=>d("row")}),(0,p.jsxs)("div",{className:"flex flex-col overflow-hidden",children:[(0,p.jsx)(m,{label:"GitHub"}),(0,p.jsx)("div",{className:"flex-1 min-h-0",children:(0,p.jsx)(re,{projectId:e})})]}),(0,p.jsx)("div",{className:"bg-border cursor-col-resize hover:bg-accent-dim transition-colors",onMouseDown:()=>d("col")}),(0,p.jsx)(a5,{projectId:e})]})}],36330)},71714,e=>{e.n(e.i(36330))}]);
@@ -9,7 +9,7 @@ a:I[11717,["/_next/static/chunks/04_t39bv8y9pe.js","/_next/static/chunks/0ox7p_s
9
9
  c:I[11717,["/_next/static/chunks/04_t39bv8y9pe.js","/_next/static/chunks/0ox7p_szjhn69.js"],"MetadataBoundary"]
10
10
  e:I[92243,["/_next/static/chunks/04_t39bv8y9pe.js","/_next/static/chunks/0ox7p_szjhn69.js"],"default",1]
11
11
  :HL["/_next/static/chunks/0ccoe1hsu70ql.css","style"]
12
- 0:{"P":null,"c":["","_not-found"],"q":"","i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0ccoe1hsu70ql.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/04_t39bv8y9pe.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/_next/static/chunks/0ox7p_szjhn69.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","className":"geist_mono_8d43a2aa-module__8Li5zG__variable h-full","children":["$","body",null,{"className":"h-full flex flex-col","children":[["$","$L2",null,{}],["$","div",null,{"className":"flex flex-1 min-h-0","children":[["$","$L3",null,{}],["$","main",null,{"className":"flex-1 min-w-0 overflow-auto","children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:1:props:children:1:props:children:props:notFound:0:1:props:style","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":"$0:f:0:1:0:props:children:1:props:children:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],{},null,false,null]},null,false,"$@9"]},null,false,null],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$La",null,{"children":"$Lb"}],["$","div",null,{"hidden":true,"children":["$","$Lc",null,{"children":["$","$7",null,{"name":"Next.Metadata","children":"$Ld"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$e",[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0ccoe1hsu70ql.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"yMYfZ4LAn8Fy22suFUnOy"}
12
+ 0:{"P":null,"c":["","_not-found"],"q":"","i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0ccoe1hsu70ql.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/04_t39bv8y9pe.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/_next/static/chunks/0ox7p_szjhn69.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","className":"geist_mono_8d43a2aa-module__8Li5zG__variable h-full","children":["$","body",null,{"className":"h-full flex flex-col","children":[["$","$L2",null,{}],["$","div",null,{"className":"flex flex-1 min-h-0","children":[["$","$L3",null,{}],["$","main",null,{"className":"flex-1 min-w-0 overflow-auto","children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:1:props:children:1:props:children:props:notFound:0:1:props:style","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":"$0:f:0:1:0:props:children:1:props:children:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],{},null,false,null]},null,false,"$@9"]},null,false,null],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$La",null,{"children":"$Lb"}],["$","div",null,{"hidden":true,"children":["$","$Lc",null,{"children":["$","$7",null,{"name":"Next.Metadata","children":"$Ld"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$e",[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0ccoe1hsu70ql.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"X4zdS6Y6HkLOaElNeHwnq"}
13
13
  f:[]
14
14
  9:"$Wf"
15
15
  b:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
@@ -3,4 +3,4 @@
3
3
  3:I[11717,["/_next/static/chunks/04_t39bv8y9pe.js","/_next/static/chunks/0ox7p_szjhn69.js"],"MetadataBoundary"]
4
4
  4:"$Sreact.suspense"
5
5
  5:I[80070,["/_next/static/chunks/04_t39bv8y9pe.js","/_next/static/chunks/0ox7p_szjhn69.js"],"IconMark"]
6
- 0:{"rsc":["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"QuadWork"}],["$","meta","1",{"name":"description","content":"Unified dashboard for multi-agent coding teams"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.0x3dzn~oxb6tn.ico","sizes":"256x256","type":"image/x-icon"}],["$","$L5","3",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"yMYfZ4LAn8Fy22suFUnOy"}
6
+ 0:{"rsc":["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"QuadWork"}],["$","meta","1",{"name":"description","content":"Unified dashboard for multi-agent coding teams"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.0x3dzn~oxb6tn.ico","sizes":"256x256","type":"image/x-icon"}],["$","$L5","3",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"X4zdS6Y6HkLOaElNeHwnq"}
@@ -4,4 +4,4 @@
4
4
  4:I[12527,["/_next/static/chunks/04_t39bv8y9pe.js","/_next/static/chunks/0ox7p_szjhn69.js"],"default"]
5
5
  5:I[59763,["/_next/static/chunks/04_t39bv8y9pe.js","/_next/static/chunks/0ox7p_szjhn69.js"],"default"]
6
6
  :HL["/_next/static/chunks/0ccoe1hsu70ql.css","style"]
7
- 0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0ccoe1hsu70ql.css","precedence":"next"}],["$","script","script-0",{"src":"/_next/static/chunks/04_t39bv8y9pe.js","async":true}],["$","script","script-1",{"src":"/_next/static/chunks/0ox7p_szjhn69.js","async":true}]],["$","html",null,{"lang":"en","className":"geist_mono_8d43a2aa-module__8Li5zG__variable h-full","children":["$","body",null,{"className":"h-full flex flex-col","children":[["$","$L2",null,{}],["$","div",null,{"className":"flex flex-1 min-h-0","children":[["$","$L3",null,{}],["$","main",null,{"className":"flex-1 min-w-0 overflow-auto","children":["$","$L4",null,{"parallelRouterKey":"children","template":["$","$L5",null,{}],"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."}]}]]}]}]],[]]}]}]]}]]}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"yMYfZ4LAn8Fy22suFUnOy"}
7
+ 0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0ccoe1hsu70ql.css","precedence":"next"}],["$","script","script-0",{"src":"/_next/static/chunks/04_t39bv8y9pe.js","async":true}],["$","script","script-1",{"src":"/_next/static/chunks/0ox7p_szjhn69.js","async":true}]],["$","html",null,{"lang":"en","className":"geist_mono_8d43a2aa-module__8Li5zG__variable h-full","children":["$","body",null,{"className":"h-full flex flex-col","children":[["$","$L2",null,{}],["$","div",null,{"className":"flex flex-1 min-h-0","children":[["$","$L3",null,{}],["$","main",null,{"className":"flex-1 min-w-0 overflow-auto","children":["$","$L4",null,{"parallelRouterKey":"children","template":["$","$L5",null,{}],"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."}]}]]}]}]],[]]}]}]]}]]}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"X4zdS6Y6HkLOaElNeHwnq"}
@@ -1,5 +1,5 @@
1
1
  1:"$Sreact.fragment"
2
2
  2:I[11717,["/_next/static/chunks/04_t39bv8y9pe.js","/_next/static/chunks/0ox7p_szjhn69.js"],"OutletBoundary"]
3
3
  3:"$Sreact.suspense"
4
- 0:{"rsc":["$","$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,["$","$L2",null,{"children":["$","$3",null,{"name":"Next.MetadataOutlet","children":"$@4"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"yMYfZ4LAn8Fy22suFUnOy"}
4
+ 0:{"rsc":["$","$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,["$","$L2",null,{"children":["$","$3",null,{"name":"Next.MetadataOutlet","children":"$@4"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"X4zdS6Y6HkLOaElNeHwnq"}
5
5
  4:null
@@ -2,4 +2,4 @@
2
2
  2:I[12527,["/_next/static/chunks/04_t39bv8y9pe.js","/_next/static/chunks/0ox7p_szjhn69.js"],"default"]
3
3
  3:I[59763,["/_next/static/chunks/04_t39bv8y9pe.js","/_next/static/chunks/0ox7p_szjhn69.js"],"default"]
4
4
  4:[]
5
- 0:{"rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"isPartial":false,"staleTime":300,"varyParams":"$W4","buildId":"yMYfZ4LAn8Fy22suFUnOy"}
5
+ 0:{"rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"isPartial":false,"staleTime":300,"varyParams":"$W4","buildId":"X4zdS6Y6HkLOaElNeHwnq"}
@@ -1,2 +1,2 @@
1
1
  :HL["/_next/static/chunks/0ccoe1hsu70ql.css","style"]
2
- 0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"/_not-found","param":null,"prefetchHints":0,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}}}},"staleTime":300,"buildId":"yMYfZ4LAn8Fy22suFUnOy"}
2
+ 0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"/_not-found","param":null,"prefetchHints":0,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}}}},"staleTime":300,"buildId":"X4zdS6Y6HkLOaElNeHwnq"}