@aoagents/ao-web 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +146 -146
  3. package/.next/app-path-routes-manifest.json +8 -8
  4. package/.next/build-manifest.json +6 -6
  5. package/.next/next-server.js.nft.json +1 -1
  6. package/.next/prerender-manifest.json +19 -19
  7. package/.next/react-loadable-manifest.json +3 -3
  8. package/.next/required-server-files.json +3 -3
  9. package/.next/server/app/_not-found/page.js +2 -2
  10. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  11. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  12. package/.next/server/app/_not-found.html +1 -1
  13. package/.next/server/app/_not-found.rsc +7 -7
  14. package/.next/server/app/api/backlog/route.js +1 -1
  15. package/.next/server/app/api/backlog/route.js.nft.json +1 -1
  16. package/.next/server/app/api/backlog/route_client-reference-manifest.js +1 -1
  17. package/.next/server/app/api/browse-directory/route.js +1 -1
  18. package/.next/server/app/api/browse-directory/route_client-reference-manifest.js +1 -1
  19. package/.next/server/app/api/filesystem/browse/route.js +1 -1
  20. package/.next/server/app/api/filesystem/browse/route_client-reference-manifest.js +1 -1
  21. package/.next/server/app/api/issues/route.js +1 -1
  22. package/.next/server/app/api/issues/route.js.nft.json +1 -1
  23. package/.next/server/app/api/issues/route_client-reference-manifest.js +1 -1
  24. package/.next/server/app/api/observability/route.js +1 -1
  25. package/.next/server/app/api/observability/route.js.nft.json +1 -1
  26. package/.next/server/app/api/observability/route_client-reference-manifest.js +1 -1
  27. package/.next/server/app/api/orchestrators/route.js +1 -1
  28. package/.next/server/app/api/orchestrators/route.js.nft.json +1 -1
  29. package/.next/server/app/api/orchestrators/route_client-reference-manifest.js +1 -1
  30. package/.next/server/app/api/projects/[id]/route.js +1 -1
  31. package/.next/server/app/api/projects/[id]/route.js.nft.json +1 -1
  32. package/.next/server/app/api/projects/[id]/route_client-reference-manifest.js +1 -1
  33. package/.next/server/app/api/projects/reload/route.js +1 -1
  34. package/.next/server/app/api/projects/reload/route.js.nft.json +1 -1
  35. package/.next/server/app/api/projects/reload/route_client-reference-manifest.js +1 -1
  36. package/.next/server/app/api/projects/route.js +1 -1
  37. package/.next/server/app/api/projects/route.js.nft.json +1 -1
  38. package/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
  39. package/.next/server/app/api/prs/[id]/merge/route.js +1 -1
  40. package/.next/server/app/api/prs/[id]/merge/route.js.nft.json +1 -1
  41. package/.next/server/app/api/prs/[id]/merge/route_client-reference-manifest.js +1 -1
  42. package/.next/server/app/api/runtime/terminal/route.js +1 -1
  43. package/.next/server/app/api/runtime/terminal/route_client-reference-manifest.js +1 -1
  44. package/.next/server/app/api/sessions/[id]/kill/route.js +1 -1
  45. package/.next/server/app/api/sessions/[id]/kill/route.js.nft.json +1 -1
  46. package/.next/server/app/api/sessions/[id]/kill/route_client-reference-manifest.js +1 -1
  47. package/.next/server/app/api/sessions/[id]/message/route.js +1 -1
  48. package/.next/server/app/api/sessions/[id]/message/route.js.nft.json +1 -1
  49. package/.next/server/app/api/sessions/[id]/message/route_client-reference-manifest.js +1 -1
  50. package/.next/server/app/api/sessions/[id]/remap/route.js +1 -1
  51. package/.next/server/app/api/sessions/[id]/remap/route.js.nft.json +1 -1
  52. package/.next/server/app/api/sessions/[id]/remap/route_client-reference-manifest.js +1 -1
  53. package/.next/server/app/api/sessions/[id]/restore/route.js +1 -1
  54. package/.next/server/app/api/sessions/[id]/restore/route.js.nft.json +1 -1
  55. package/.next/server/app/api/sessions/[id]/restore/route_client-reference-manifest.js +1 -1
  56. package/.next/server/app/api/sessions/[id]/route.js +1 -1
  57. package/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -1
  58. package/.next/server/app/api/sessions/[id]/route_client-reference-manifest.js +1 -1
  59. package/.next/server/app/api/sessions/[id]/send/route.js +1 -1
  60. package/.next/server/app/api/sessions/[id]/send/route.js.nft.json +1 -1
  61. package/.next/server/app/api/sessions/[id]/send/route_client-reference-manifest.js +1 -1
  62. package/.next/server/app/api/sessions/patches/route.js +1 -1
  63. package/.next/server/app/api/sessions/patches/route.js.nft.json +1 -1
  64. package/.next/server/app/api/sessions/patches/route_client-reference-manifest.js +1 -1
  65. package/.next/server/app/api/sessions/route.js +1 -1
  66. package/.next/server/app/api/sessions/route.js.nft.json +1 -1
  67. package/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -1
  68. package/.next/server/app/api/setup-labels/route.js +1 -1
  69. package/.next/server/app/api/setup-labels/route.js.nft.json +1 -1
  70. package/.next/server/app/api/setup-labels/route_client-reference-manifest.js +1 -1
  71. package/.next/server/app/api/spawn/route.js +1 -1
  72. package/.next/server/app/api/spawn/route.js.nft.json +1 -1
  73. package/.next/server/app/api/spawn/route_client-reference-manifest.js +1 -1
  74. package/.next/server/app/api/verify/route.js +1 -1
  75. package/.next/server/app/api/verify/route.js.nft.json +1 -1
  76. package/.next/server/app/api/verify/route_client-reference-manifest.js +1 -1
  77. package/.next/server/app/api/webhooks/[...slug]/route.js +1 -1
  78. package/.next/server/app/api/webhooks/[...slug]/route.js.nft.json +1 -1
  79. package/.next/server/app/api/webhooks/[...slug]/route_client-reference-manifest.js +1 -1
  80. package/.next/server/app/apple-icon/route.js +1 -1
  81. package/.next/server/app/apple-icon/route.js.nft.json +1 -1
  82. package/.next/server/app/apple-icon/route_client-reference-manifest.js +1 -1
  83. package/.next/server/app/dev/terminal-test/page.js +4 -4
  84. package/.next/server/app/dev/terminal-test/page.js.nft.json +1 -1
  85. package/.next/server/app/dev/terminal-test/page_client-reference-manifest.js +1 -1
  86. package/.next/server/app/dev/terminal-test.html +1 -1
  87. package/.next/server/app/dev/terminal-test.rsc +8 -8
  88. package/.next/server/app/icon/route.js +1 -1
  89. package/.next/server/app/icon/route.js.nft.json +1 -1
  90. package/.next/server/app/icon/route_client-reference-manifest.js +1 -1
  91. package/.next/server/app/icon-192/route.js +1 -1
  92. package/.next/server/app/icon-192/route.js.nft.json +1 -1
  93. package/.next/server/app/icon-192/route_client-reference-manifest.js +1 -1
  94. package/.next/server/app/icon-512/route.js +1 -1
  95. package/.next/server/app/icon-512/route.js.nft.json +1 -1
  96. package/.next/server/app/icon-512/route_client-reference-manifest.js +1 -1
  97. package/.next/server/app/manifest.webmanifest/route.js +2 -2
  98. package/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  99. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  100. package/.next/server/app/orchestrators/page.js +2 -2
  101. package/.next/server/app/orchestrators/page.js.nft.json +1 -1
  102. package/.next/server/app/orchestrators/page_client-reference-manifest.js +1 -1
  103. package/.next/server/app/page.js +2 -2
  104. package/.next/server/app/page.js.nft.json +1 -1
  105. package/.next/server/app/page_client-reference-manifest.js +1 -1
  106. package/.next/server/app/projects/[projectId]/page.js +2 -2
  107. package/.next/server/app/projects/[projectId]/page.js.nft.json +1 -1
  108. package/.next/server/app/projects/[projectId]/page_client-reference-manifest.js +1 -1
  109. package/.next/server/app/projects/[projectId]/sessions/[id]/page.js +2 -2
  110. package/.next/server/app/projects/[projectId]/sessions/[id]/page.js.nft.json +1 -1
  111. package/.next/server/app/projects/[projectId]/sessions/[id]/page_client-reference-manifest.js +1 -1
  112. package/.next/server/app/projects/[projectId]/settings/page.js +2 -2
  113. package/.next/server/app/projects/[projectId]/settings/page.js.nft.json +1 -1
  114. package/.next/server/app/projects/[projectId]/settings/page_client-reference-manifest.js +1 -1
  115. package/.next/server/app/prs/page.js +2 -2
  116. package/.next/server/app/prs/page.js.nft.json +1 -1
  117. package/.next/server/app/prs/page_client-reference-manifest.js +1 -1
  118. package/.next/server/app/sessions/[id]/page.js +2 -2
  119. package/.next/server/app/sessions/[id]/page.js.nft.json +1 -1
  120. package/.next/server/app/sessions/[id]/page_client-reference-manifest.js +1 -1
  121. package/.next/server/app/test-direct/page.js +2 -2
  122. package/.next/server/app/test-direct/page.js.nft.json +1 -1
  123. package/.next/server/app/test-direct/page_client-reference-manifest.js +1 -1
  124. package/.next/server/app/test-direct.html +1 -1
  125. package/.next/server/app/test-direct.rsc +8 -8
  126. package/.next/server/app-paths-manifest.json +8 -8
  127. package/.next/server/chunks/1172.js +1 -1
  128. package/.next/server/chunks/1271.js +1 -1
  129. package/.next/server/chunks/1876.js +2 -2
  130. package/.next/server/chunks/3131.js +3 -0
  131. package/.next/server/chunks/4520.js +1 -1
  132. package/.next/server/chunks/7167.js +1 -1
  133. package/.next/server/chunks/7173.js +1 -1
  134. package/.next/server/chunks/{9381.js → 801.js} +7 -7
  135. package/.next/server/chunks/9223.js +10 -10
  136. package/.next/server/middleware-build-manifest.js +1 -1
  137. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  138. package/.next/server/pages/404.html +1 -1
  139. package/.next/server/pages/500.html +1 -1
  140. package/.next/server/server-reference-manifest.json +1 -1
  141. package/.next/static/chunks/{1383.faf35b62c555f5a1.js → 1383.c891a8ba72ee600c.js} +1 -1
  142. package/.next/static/chunks/3764.89a5955e46eb74b4.js +1 -0
  143. package/.next/static/chunks/{3780-e20898ff49ddc867.js → 3780-52c4733ce6591b8d.js} +1 -1
  144. package/.next/static/chunks/{4465-0c7772f1499dffa4.js → 4465-17154f7a01abfe85.js} +1 -1
  145. package/.next/static/chunks/app/dev/terminal-test/page-5819e40b3d4754ef.js +1 -0
  146. package/.next/static/chunks/app/{error-3ebcf3275d91d60a.js → error-da1d10c96ff5dd29.js} +1 -1
  147. package/.next/static/chunks/app/global-error-ca06d2b1be2d4ae0.js +1 -0
  148. package/.next/static/chunks/app/{layout-be776dec5531d47b.js → layout-bb6db479523cb3d6.js} +1 -1
  149. package/.next/static/chunks/app/{not-found-0eb78483b8277b8d.js → not-found-824d5d3c6e296eeb.js} +1 -1
  150. package/.next/static/chunks/app/orchestrators/page-f07983413ed1a44b.js +1 -0
  151. package/.next/static/chunks/app/page-6aa506a579ac9949.js +1 -0
  152. package/.next/static/chunks/app/projects/[projectId]/page-49eb5b990c74ca8f.js +1 -0
  153. package/.next/static/chunks/app/projects/[projectId]/sessions/[id]/page-2450704c6b66a4b4.js +1 -0
  154. package/.next/static/chunks/app/projects/[projectId]/settings/{page-ce2e904def1bef9c.js → page-d1da671e72a7bd5e.js} +1 -1
  155. package/.next/static/chunks/app/prs/{page-95dbbebb4d372535.js → page-2332a7180a47f28c.js} +1 -1
  156. package/.next/static/chunks/app/sessions/[id]/{error-5468aace23fd8872.js → error-8de5b24e86eeae7b.js} +1 -1
  157. package/.next/static/chunks/app/sessions/[id]/{not-found-0eb78483b8277b8d.js → not-found-824d5d3c6e296eeb.js} +1 -1
  158. package/.next/static/chunks/app/sessions/[id]/page-b60b49ccbafe51c9.js +1 -0
  159. package/.next/static/chunks/app/test-direct/{page-ab98dc9b04bacaa5.js → page-eb366dde03fab6a7.js} +1 -1
  160. package/.next/static/chunks/{main-app-4b27cdf1baf203ad.js → main-app-690acf9d5d2050c9.js} +1 -1
  161. package/.next/static/chunks/{webpack-ab12779265bdb8f9.js → webpack-d2dfbd3e9262b74e.js} +1 -1
  162. package/.next/static/css/fcafd381715071b8.css +1 -0
  163. package/dist-server/mux-websocket.js +5 -6
  164. package/package.json +12 -12
  165. package/.next/server/chunks/8539.js +0 -3
  166. package/.next/static/chunks/3764.ba81c7b8d5b21136.js +0 -1
  167. package/.next/static/chunks/app/dev/terminal-test/page-095511c7a110fbc9.js +0 -1
  168. package/.next/static/chunks/app/global-error-8f082029a4cf6af1.js +0 -1
  169. package/.next/static/chunks/app/orchestrators/page-406e530b0d4ad46f.js +0 -1
  170. package/.next/static/chunks/app/page-a92f3646b54545b0.js +0 -1
  171. package/.next/static/chunks/app/projects/[projectId]/page-d14fdcff4998d3bf.js +0 -1
  172. package/.next/static/chunks/app/projects/[projectId]/sessions/[id]/page-96fc04db76c65761.js +0 -1
  173. package/.next/static/chunks/app/sessions/[id]/page-8ef744531757185e.js +0 -1
  174. package/.next/static/css/397ea3e60645d3f3.css +0 -1
  175. /package/.next/static/{5nmlY5IOwz-Od3p2SB2hh → YR6Xi4DC5A7S7E2PoZuif}/_buildManifest.js +0 -0
  176. /package/.next/static/{5nmlY5IOwz-Od3p2SB2hh → YR6Xi4DC5A7S7E2PoZuif}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- <!DOCTYPE html><!--5nmlY5IOwz_Od3p2SB2hh--><html lang="en" class="dark"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover"/><link rel="stylesheet" href="/_next/static/css/397ea3e60645d3f3.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-ab12779265bdb8f9.js"/><script src="/_next/static/chunks/88a6fc35-f836b4b72df5eafa.js" async=""></script><script src="/_next/static/chunks/1461-af7c54935f21d56d.js" async=""></script><script src="/_next/static/chunks/main-app-4b27cdf1baf203ad.js" async=""></script><script src="/_next/static/chunks/app/layout-be776dec5531d47b.js" async=""></script><script src="/_next/static/chunks/8713-d3d663f55dc00e48.js" async=""></script><script src="/_next/static/chunks/app/error-3ebcf3275d91d60a.js" async=""></script><script src="/_next/static/chunks/app/not-found-0eb78483b8277b8d.js" async=""></script><script src="/_next/static/chunks/app/test-direct/page-ab98dc9b04bacaa5.js" async=""></script><script src="/_next/static/chunks/app/global-error-8f082029a4cf6af1.js" async=""></script><meta name="theme-color" media="(prefers-color-scheme: light)" content="#f5f3f0"/><meta name="theme-color" media="(prefers-color-scheme: dark)" content="#121110"/><title>ao | integrator</title><meta name="description" content="Dashboard for managing parallel AI coding agents"/><link rel="manifest" href="/manifest.webmanifest"/><meta name="mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-title" content="ao | integrator"/><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/><link rel="icon" href="/icon?fde4afff4688df3a" type="image/png" sizes="32x32"/><link rel="apple-touch-icon" href="/apple-icon?95aeb60ec7acf330" type="image/png" sizes="180x180"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="h-screen overflow-hidden bg-[var(--color-bg-base)] text-[var(--color-text-primary)] antialiased"><div hidden=""><!--$--><!--/$--></div><script>((a,b,c,d,e,f,g,h)=>{let i=document.documentElement,j=["light","dark"];function k(b){var c;(Array.isArray(a)?a:[a]).forEach(a=>{let c="class"===a,d=c&&f?e.map(a=>f[a]||a):e;c?(i.classList.remove(...d),i.classList.add(f&&f[b]?f[b]:b)):i.setAttribute(a,b)}),c=b,h&&j.includes(c)&&(i.style.colorScheme=c)}if(d)k(d);else try{let a=localStorage.getItem(b)||c,d=g&&"system"===a?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a;k(d)}catch(a){}})("class","theme","dark",null,["light","dark"],null,false,true)</script><!--$--><!--$!--><template data-dgst="BAILOUT_TO_CLIENT_SIDE_RENDERING"></template><div class="flex min-h-screen items-center justify-center">Loading...</div><!--/$--><!--$--><!--/$--><!--/$--><script src="/_next/static/chunks/webpack-ab12779265bdb8f9.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[1012,[\"7177\",\"static/chunks/app/layout-be776dec5531d47b.js\"],\"Providers\"]\n3:I[1992,[],\"\"]\n4:I[3464,[\"8713\",\"static/chunks/8713-d3d663f55dc00e48.js\",\"8039\",\"static/chunks/app/error-3ebcf3275d91d60a.js\"],\"default\"]\n5:I[7678,[],\"\"]\n6:I[9789,[\"8713\",\"static/chunks/8713-d3d663f55dc00e48.js\",\"4345\",\"static/chunks/app/not-found-0eb78483b8277b8d.js\"],\"ErrorDisplay\"]\n7:I[7285,[\"7177\",\"static/chunks/app/layout-be776dec5531d47b.js\"],\"ServiceWorkerRegistrar\"]\n8:I[7573,[],\"ClientPageRoot\"]\n9:I[8746,[\"9495\",\"static/chunks/app/test-direct/page-ab98dc9b04bacaa5.js\"],\"default\"]\nc:I[2901,[],\"OutletBoundary\"]\ne:I[9904,[],\"AsyncMetadataOutlet\"]\n10:I[2901,[],\"ViewportBoundary\"]\n12:I[2901,[],\"MetadataBoundary\"]\n13:\"$Sreact.suspense\"\n15:I[7494,[\"8713\",\"static/chunks/8713-d3d663f55dc00e48.js\",\"4219\",\"static/chunks/app/global-error-8f082029a4cf6af1.js\"],\"default\"]\n:HL[\"/_next/static/css/397ea3e60645d3f3.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"5nmlY5IOwz-Od3p2SB2hh\",\"p\":\"\",\"c\":[\"\",\"test-direct\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"test-direct\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/397ea3e60645d3f3.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"dark\",\"suppressHydrationWarning\":true,\"children\":[\"$\",\"body\",null,{\"className\":\"h-screen overflow-hidden bg-[var(--color-bg-base)] text-[var(--color-text-primary)] antialiased\",\"children\":[[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$4\",\"errorStyles\":[],\"errorScripts\":[],\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"$L6\",null,{\"title\":\"Page not found\",\"message\":\"This route does not exist in the dashboard. Return to the main view to pick an active project or session.\",\"tone\":\"not-found\",\"primaryAction\":{\"label\":\"Back to dashboard\",\"href\":\"/\"}}],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}],[\"$\",\"$L7\",null,{}]]}]}]]}],{\"children\":[\"test-direct\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"$L8\",null,{\"Component\":\"$9\",\"searchParams\":{},\"params\":{},\"promises\":[\"$@a\",\"$@b\"]}],null,[\"$\",\"$Lc\",null,{\"children\":[\"$Ld\",[\"$\",\"$Le\",null,{\"promise\":\"$@f\"}]]}]]}],{},null,false]},null,false]},[[\"$\",\"div\",\"l\",{\"className\":\"flex min-h-screen items-center justify-center bg-[var(--color-bg-base)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"flex flex-col items-center gap-3\",\"children\":[[\"$\",\"svg\",null,{\"className\":\"h-5 w-5 animate-spin text-[var(--color-text-tertiary)]\",\"fill\":\"none\",\"stroke\":\"currentColor\",\"strokeWidth\":\"2\",\"viewBox\":\"0 0 24 24\",\"children\":[\"$\",\"path\",null,{\"d\":\"M12 3a9 9 0 1 0 9 9\"}]}],[\"$\",\"p\",null,{\"className\":\"text-[13px] text-[var(--color-text-tertiary)]\",\"children\":\"Loading…\"}]]}]}],[],[]],false],[\"$\",\"$1\",\"h\",{\"children\":[null,[[\"$\",\"$L10\",null,{\"children\":\"$L11\"}],null],[\"$\",\"$L12\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$13\",null,{\"fallback\":null,\"children\":\"$L14\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$15\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"a:{}\nb:\"$0:f:0:1:2:children:2:children:1:props:children:0:props:params\"\n"])</script><script>self.__next_f.push([1,"11:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1, viewport-fit=cover\"}],[\"$\",\"meta\",\"2\",{\"name\":\"theme-color\",\"media\":\"(prefers-color-scheme: light)\",\"content\":\"#f5f3f0\"}],[\"$\",\"meta\",\"3\",{\"name\":\"theme-color\",\"media\":\"(prefers-color-scheme: dark)\",\"content\":\"#121110\"}]]\nd:null\n"])</script><script>self.__next_f.push([1,"16:I[7184,[],\"IconMark\"]\n"])</script><script>self.__next_f.push([1,"f:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"ao | integrator\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Dashboard for managing parallel AI coding agents\"}],[\"$\",\"link\",\"2\",{\"rel\":\"manifest\",\"href\":\"/manifest.webmanifest\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"meta\",\"3\",{\"name\":\"mobile-web-app-capable\",\"content\":\"yes\"}],[\"$\",\"meta\",\"4\",{\"name\":\"apple-mobile-web-app-title\",\"content\":\"ao | integrator\"}],[\"$\",\"meta\",\"5\",{\"name\":\"apple-mobile-web-app-status-bar-style\",\"content\":\"black-translucent\"}],[\"$\",\"link\",\"6\",{\"rel\":\"icon\",\"href\":\"/icon?fde4afff4688df3a\",\"alt\":\"$undefined\",\"type\":\"image/png\",\"sizes\":\"32x32\"}],[\"$\",\"link\",\"7\",{\"rel\":\"apple-touch-icon\",\"href\":\"/apple-icon?95aeb60ec7acf330\",\"alt\":\"$undefined\",\"type\":\"image/png\",\"sizes\":\"180x180\"}],[\"$\",\"$L16\",\"8\",{}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"14:\"$f:metadata\"\n"])</script></body></html>
1
+ <!DOCTYPE html><!--YR6Xi4DC5A7S7E2PoZuif--><html lang="en" class="dark"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover"/><link rel="stylesheet" href="/_next/static/css/fcafd381715071b8.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-d2dfbd3e9262b74e.js"/><script src="/_next/static/chunks/88a6fc35-f836b4b72df5eafa.js" async=""></script><script src="/_next/static/chunks/1461-af7c54935f21d56d.js" async=""></script><script src="/_next/static/chunks/main-app-690acf9d5d2050c9.js" async=""></script><script src="/_next/static/chunks/app/layout-bb6db479523cb3d6.js" async=""></script><script src="/_next/static/chunks/8713-d3d663f55dc00e48.js" async=""></script><script src="/_next/static/chunks/app/error-da1d10c96ff5dd29.js" async=""></script><script src="/_next/static/chunks/app/not-found-824d5d3c6e296eeb.js" async=""></script><script src="/_next/static/chunks/app/test-direct/page-eb366dde03fab6a7.js" async=""></script><script src="/_next/static/chunks/app/global-error-ca06d2b1be2d4ae0.js" async=""></script><meta name="theme-color" media="(prefers-color-scheme: light)" content="#f5f3f0"/><meta name="theme-color" media="(prefers-color-scheme: dark)" content="#121110"/><title>ao | integrator</title><meta name="description" content="Dashboard for managing parallel AI coding agents"/><link rel="manifest" href="/manifest.webmanifest"/><meta name="mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-title" content="ao | integrator"/><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/><link rel="icon" href="/icon?fde4afff4688df3a" type="image/png" sizes="32x32"/><link rel="apple-touch-icon" href="/apple-icon?95aeb60ec7acf330" type="image/png" sizes="180x180"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="h-screen overflow-hidden bg-[var(--color-bg-base)] text-[var(--color-text-primary)] antialiased"><div hidden=""><!--$--><!--/$--></div><script>((a,b,c,d,e,f,g,h)=>{let i=document.documentElement,j=["light","dark"];function k(b){var c;(Array.isArray(a)?a:[a]).forEach(a=>{let c="class"===a,d=c&&f?e.map(a=>f[a]||a):e;c?(i.classList.remove(...d),i.classList.add(f&&f[b]?f[b]:b)):i.setAttribute(a,b)}),c=b,h&&j.includes(c)&&(i.style.colorScheme=c)}if(d)k(d);else try{let a=localStorage.getItem(b)||c,d=g&&"system"===a?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a;k(d)}catch(a){}})("class","theme","dark",null,["light","dark"],null,false,true)</script><!--$--><!--$!--><template data-dgst="BAILOUT_TO_CLIENT_SIDE_RENDERING"></template><div class="flex min-h-screen items-center justify-center">Loading...</div><!--/$--><!--$--><!--/$--><!--/$--><script src="/_next/static/chunks/webpack-d2dfbd3e9262b74e.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[1012,[\"7177\",\"static/chunks/app/layout-bb6db479523cb3d6.js\"],\"Providers\"]\n3:I[1992,[],\"\"]\n4:I[3464,[\"8713\",\"static/chunks/8713-d3d663f55dc00e48.js\",\"8039\",\"static/chunks/app/error-da1d10c96ff5dd29.js\"],\"default\"]\n5:I[7678,[],\"\"]\n6:I[9789,[\"8713\",\"static/chunks/8713-d3d663f55dc00e48.js\",\"4345\",\"static/chunks/app/not-found-824d5d3c6e296eeb.js\"],\"ErrorDisplay\"]\n7:I[7285,[\"7177\",\"static/chunks/app/layout-bb6db479523cb3d6.js\"],\"ServiceWorkerRegistrar\"]\n8:I[7573,[],\"ClientPageRoot\"]\n9:I[8746,[\"9495\",\"static/chunks/app/test-direct/page-eb366dde03fab6a7.js\"],\"default\"]\nc:I[2901,[],\"OutletBoundary\"]\ne:I[9904,[],\"AsyncMetadataOutlet\"]\n10:I[2901,[],\"ViewportBoundary\"]\n12:I[2901,[],\"MetadataBoundary\"]\n13:\"$Sreact.suspense\"\n15:I[7494,[\"8713\",\"static/chunks/8713-d3d663f55dc00e48.js\",\"4219\",\"static/chunks/app/global-error-ca06d2b1be2d4ae0.js\"],\"default\"]\n:HL[\"/_next/static/css/fcafd381715071b8.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"YR6Xi4DC5A7S7E2PoZuif\",\"p\":\"\",\"c\":[\"\",\"test-direct\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"test-direct\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/fcafd381715071b8.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"dark\",\"suppressHydrationWarning\":true,\"children\":[\"$\",\"body\",null,{\"className\":\"h-screen overflow-hidden bg-[var(--color-bg-base)] text-[var(--color-text-primary)] antialiased\",\"children\":[[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$4\",\"errorStyles\":[],\"errorScripts\":[],\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"$L6\",null,{\"title\":\"Page not found\",\"message\":\"This route does not exist in the dashboard. Return to the main view to pick an active project or session.\",\"tone\":\"not-found\",\"primaryAction\":{\"label\":\"Back to dashboard\",\"href\":\"/\"}}],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}],[\"$\",\"$L7\",null,{}]]}]}]]}],{\"children\":[\"test-direct\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"$L8\",null,{\"Component\":\"$9\",\"searchParams\":{},\"params\":{},\"promises\":[\"$@a\",\"$@b\"]}],null,[\"$\",\"$Lc\",null,{\"children\":[\"$Ld\",[\"$\",\"$Le\",null,{\"promise\":\"$@f\"}]]}]]}],{},null,false]},null,false]},[[\"$\",\"div\",\"l\",{\"className\":\"flex min-h-screen items-center justify-center bg-[var(--color-bg-base)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"flex flex-col items-center gap-3\",\"children\":[[\"$\",\"svg\",null,{\"className\":\"h-5 w-5 animate-spin text-[var(--color-text-tertiary)]\",\"fill\":\"none\",\"stroke\":\"currentColor\",\"strokeWidth\":\"2\",\"viewBox\":\"0 0 24 24\",\"children\":[\"$\",\"path\",null,{\"d\":\"M12 3a9 9 0 1 0 9 9\"}]}],[\"$\",\"p\",null,{\"className\":\"text-[13px] text-[var(--color-text-tertiary)]\",\"children\":\"Loading…\"}]]}]}],[],[]],false],[\"$\",\"$1\",\"h\",{\"children\":[null,[[\"$\",\"$L10\",null,{\"children\":\"$L11\"}],null],[\"$\",\"$L12\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$13\",null,{\"fallback\":null,\"children\":\"$L14\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$15\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"a:{}\nb:\"$0:f:0:1:2:children:2:children:1:props:children:0:props:params\"\n"])</script><script>self.__next_f.push([1,"11:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1, viewport-fit=cover\"}],[\"$\",\"meta\",\"2\",{\"name\":\"theme-color\",\"media\":\"(prefers-color-scheme: light)\",\"content\":\"#f5f3f0\"}],[\"$\",\"meta\",\"3\",{\"name\":\"theme-color\",\"media\":\"(prefers-color-scheme: dark)\",\"content\":\"#121110\"}]]\nd:null\n"])</script><script>self.__next_f.push([1,"16:I[7184,[],\"IconMark\"]\n"])</script><script>self.__next_f.push([1,"f:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"ao | integrator\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Dashboard for managing parallel AI coding agents\"}],[\"$\",\"link\",\"2\",{\"rel\":\"manifest\",\"href\":\"/manifest.webmanifest\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"meta\",\"3\",{\"name\":\"mobile-web-app-capable\",\"content\":\"yes\"}],[\"$\",\"meta\",\"4\",{\"name\":\"apple-mobile-web-app-title\",\"content\":\"ao | integrator\"}],[\"$\",\"meta\",\"5\",{\"name\":\"apple-mobile-web-app-status-bar-style\",\"content\":\"black-translucent\"}],[\"$\",\"link\",\"6\",{\"rel\":\"icon\",\"href\":\"/icon?fde4afff4688df3a\",\"alt\":\"$undefined\",\"type\":\"image/png\",\"sizes\":\"32x32\"}],[\"$\",\"link\",\"7\",{\"rel\":\"apple-touch-icon\",\"href\":\"/apple-icon?95aeb60ec7acf330\",\"alt\":\"$undefined\",\"type\":\"image/png\",\"sizes\":\"180x180\"}],[\"$\",\"$L16\",\"8\",{}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"14:\"$f:metadata\"\n"])</script></body></html>
@@ -1,20 +1,20 @@
1
1
  1:"$Sreact.fragment"
2
- 2:I[1012,["7177","static/chunks/app/layout-be776dec5531d47b.js"],"Providers"]
2
+ 2:I[1012,["7177","static/chunks/app/layout-bb6db479523cb3d6.js"],"Providers"]
3
3
  3:I[1992,[],""]
4
- 4:I[3464,["8713","static/chunks/8713-d3d663f55dc00e48.js","8039","static/chunks/app/error-3ebcf3275d91d60a.js"],"default"]
4
+ 4:I[3464,["8713","static/chunks/8713-d3d663f55dc00e48.js","8039","static/chunks/app/error-da1d10c96ff5dd29.js"],"default"]
5
5
  5:I[7678,[],""]
6
- 6:I[9789,["8713","static/chunks/8713-d3d663f55dc00e48.js","4345","static/chunks/app/not-found-0eb78483b8277b8d.js"],"ErrorDisplay"]
7
- 7:I[7285,["7177","static/chunks/app/layout-be776dec5531d47b.js"],"ServiceWorkerRegistrar"]
6
+ 6:I[9789,["8713","static/chunks/8713-d3d663f55dc00e48.js","4345","static/chunks/app/not-found-824d5d3c6e296eeb.js"],"ErrorDisplay"]
7
+ 7:I[7285,["7177","static/chunks/app/layout-bb6db479523cb3d6.js"],"ServiceWorkerRegistrar"]
8
8
  8:I[7573,[],"ClientPageRoot"]
9
- 9:I[8746,["9495","static/chunks/app/test-direct/page-ab98dc9b04bacaa5.js"],"default"]
9
+ 9:I[8746,["9495","static/chunks/app/test-direct/page-eb366dde03fab6a7.js"],"default"]
10
10
  c:I[2901,[],"OutletBoundary"]
11
11
  e:I[9904,[],"AsyncMetadataOutlet"]
12
12
  10:I[2901,[],"ViewportBoundary"]
13
13
  12:I[2901,[],"MetadataBoundary"]
14
14
  13:"$Sreact.suspense"
15
- 15:I[7494,["8713","static/chunks/8713-d3d663f55dc00e48.js","4219","static/chunks/app/global-error-8f082029a4cf6af1.js"],"default"]
16
- :HL["/_next/static/css/397ea3e60645d3f3.css","style"]
17
- 0:{"P":null,"b":"5nmlY5IOwz-Od3p2SB2hh","p":"","c":["","test-direct"],"i":false,"f":[[["",{"children":["test-direct",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/397ea3e60645d3f3.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","className":"dark","suppressHydrationWarning":true,"children":["$","body",null,{"className":"h-screen overflow-hidden bg-[var(--color-bg-base)] text-[var(--color-text-primary)] antialiased","children":[["$","$L2",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$4","errorStyles":[],"errorScripts":[],"template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","$L6",null,{"title":"Page not found","message":"This route does not exist in the dashboard. Return to the main view to pick an active project or session.","tone":"not-found","primaryAction":{"label":"Back to dashboard","href":"/"}}],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}],["$","$L7",null,{}]]}]}]]}],{"children":["test-direct",["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[["$","$L8",null,{"Component":"$9","searchParams":{},"params":{},"promises":["$@a","$@b"]}],null,["$","$Lc",null,{"children":["$Ld",["$","$Le",null,{"promise":"$@f"}]]}]]}],{},null,false]},null,false]},[["$","div","l",{"className":"flex min-h-screen items-center justify-center bg-[var(--color-bg-base)]","children":["$","div",null,{"className":"flex flex-col items-center gap-3","children":[["$","svg",null,{"className":"h-5 w-5 animate-spin text-[var(--color-text-tertiary)]","fill":"none","stroke":"currentColor","strokeWidth":"2","viewBox":"0 0 24 24","children":["$","path",null,{"d":"M12 3a9 9 0 1 0 9 9"}]}],["$","p",null,{"className":"text-[13px] text-[var(--color-text-tertiary)]","children":"Loading…"}]]}]}],[],[]],false],["$","$1","h",{"children":[null,[["$","$L10",null,{"children":"$L11"}],null],["$","$L12",null,{"children":["$","div",null,{"hidden":true,"children":["$","$13",null,{"fallback":null,"children":"$L14"}]}]}]]}],false]],"m":"$undefined","G":["$15",[]],"s":false,"S":true}
15
+ 15:I[7494,["8713","static/chunks/8713-d3d663f55dc00e48.js","4219","static/chunks/app/global-error-ca06d2b1be2d4ae0.js"],"default"]
16
+ :HL["/_next/static/css/fcafd381715071b8.css","style"]
17
+ 0:{"P":null,"b":"YR6Xi4DC5A7S7E2PoZuif","p":"","c":["","test-direct"],"i":false,"f":[[["",{"children":["test-direct",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/fcafd381715071b8.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","className":"dark","suppressHydrationWarning":true,"children":["$","body",null,{"className":"h-screen overflow-hidden bg-[var(--color-bg-base)] text-[var(--color-text-primary)] antialiased","children":[["$","$L2",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$4","errorStyles":[],"errorScripts":[],"template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","$L6",null,{"title":"Page not found","message":"This route does not exist in the dashboard. Return to the main view to pick an active project or session.","tone":"not-found","primaryAction":{"label":"Back to dashboard","href":"/"}}],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}],["$","$L7",null,{}]]}]}]]}],{"children":["test-direct",["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[["$","$L8",null,{"Component":"$9","searchParams":{},"params":{},"promises":["$@a","$@b"]}],null,["$","$Lc",null,{"children":["$Ld",["$","$Le",null,{"promise":"$@f"}]]}]]}],{},null,false]},null,false]},[["$","div","l",{"className":"flex min-h-screen items-center justify-center bg-[var(--color-bg-base)]","children":["$","div",null,{"className":"flex flex-col items-center gap-3","children":[["$","svg",null,{"className":"h-5 w-5 animate-spin text-[var(--color-text-tertiary)]","fill":"none","stroke":"currentColor","strokeWidth":"2","viewBox":"0 0 24 24","children":["$","path",null,{"d":"M12 3a9 9 0 1 0 9 9"}]}],["$","p",null,{"className":"text-[13px] text-[var(--color-text-tertiary)]","children":"Loading…"}]]}]}],[],[]],false],["$","$1","h",{"children":[null,[["$","$L10",null,{"children":"$L11"}],null],["$","$L12",null,{"children":["$","div",null,{"hidden":true,"children":["$","$13",null,{"fallback":null,"children":"$L14"}]}]}]]}],false]],"m":"$undefined","G":["$15",[]],"s":false,"S":true}
18
18
  a:{}
19
19
  b:"$0:f:0:1:2:children:2:children:1:props:children:0:props:params"
20
20
  11:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1, viewport-fit=cover"}],["$","meta","2",{"name":"theme-color","media":"(prefers-color-scheme: light)","content":"#f5f3f0"}],["$","meta","3",{"name":"theme-color","media":"(prefers-color-scheme: dark)","content":"#121110"}]]
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "/_not-found/page": "app/_not-found/page.js",
3
3
  "/api/observability/route": "app/api/observability/route.js",
4
- "/api/orchestrators/route": "app/api/orchestrators/route.js",
5
4
  "/api/prs/[id]/merge/route": "app/api/prs/[id]/merge/route.js",
5
+ "/api/orchestrators/route": "app/api/orchestrators/route.js",
6
6
  "/api/sessions/[id]/kill/route": "app/api/sessions/[id]/kill/route.js",
7
+ "/api/sessions/[id]/remap/route": "app/api/sessions/[id]/remap/route.js",
7
8
  "/api/sessions/[id]/restore/route": "app/api/sessions/[id]/restore/route.js",
8
9
  "/api/sessions/[id]/route": "app/api/sessions/[id]/route.js",
9
- "/api/sessions/[id]/remap/route": "app/api/sessions/[id]/remap/route.js",
10
- "/api/sessions/route": "app/api/sessions/route.js",
11
10
  "/api/spawn/route": "app/api/spawn/route.js",
11
+ "/api/sessions/route": "app/api/sessions/route.js",
12
12
  "/icon-192/route": "app/icon-192/route.js",
13
13
  "/icon-512/route": "app/icon-512/route.js",
14
14
  "/manifest.webmanifest/route": "app/manifest.webmanifest/route.js",
@@ -18,23 +18,23 @@
18
18
  "/api/filesystem/browse/route": "app/api/filesystem/browse/route.js",
19
19
  "/api/issues/route": "app/api/issues/route.js",
20
20
  "/api/runtime/terminal/route": "app/api/runtime/terminal/route.js",
21
- "/api/sessions/patches/route": "app/api/sessions/patches/route.js",
22
- "/api/sessions/[id]/send/route": "app/api/sessions/[id]/send/route.js",
23
21
  "/api/projects/route": "app/api/projects/route.js",
24
22
  "/api/setup-labels/route": "app/api/setup-labels/route.js",
25
23
  "/api/sessions/[id]/message/route": "app/api/sessions/[id]/message/route.js",
26
- "/api/verify/route": "app/api/verify/route.js",
24
+ "/api/sessions/[id]/send/route": "app/api/sessions/[id]/send/route.js",
25
+ "/api/sessions/patches/route": "app/api/sessions/patches/route.js",
27
26
  "/api/webhooks/[...slug]/route": "app/api/webhooks/[...slug]/route.js",
28
27
  "/api/projects/[id]/route": "app/api/projects/[id]/route.js",
28
+ "/api/verify/route": "app/api/verify/route.js",
29
29
  "/icon/route": "app/icon/route.js",
30
30
  "/apple-icon/route": "app/apple-icon/route.js",
31
31
  "/projects/[projectId]/sessions/[id]/page": "app/projects/[projectId]/sessions/[id]/page.js",
32
32
  "/sessions/[id]/page": "app/sessions/[id]/page.js",
33
33
  "/page": "app/page.js",
34
- "/orchestrators/page": "app/orchestrators/page.js",
35
34
  "/projects/[projectId]/page": "app/projects/[projectId]/page.js",
36
- "/projects/[projectId]/settings/page": "app/projects/[projectId]/settings/page.js",
37
35
  "/prs/page": "app/prs/page.js",
36
+ "/projects/[projectId]/settings/page": "app/projects/[projectId]/settings/page.js",
38
37
  "/test-direct/page": "app/test-direct/page.js",
38
+ "/orchestrators/page": "app/orchestrators/page.js",
39
39
  "/dev/terminal-test/page": "app/dev/terminal-test/page.js"
40
40
  }
@@ -1 +1 @@
1
- "use strict";exports.id=1172,exports.ids=[1172],exports.modules={13219:(a,b,c)=>{c.d(b,{Dashboard:()=>d});let d=(0,c(10864).registerClientReference)(function(){throw Error("Attempted to call Dashboard() from the server but Dashboard is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/equinox/.worktrees/agent-orchestrator/ao-168/packages/web/src/components/Dashboard.tsx","Dashboard")},16602:(a,b,c)=>{c.d(b,{Dashboard:()=>L});var d=c(33666),e=c(81115),f=c(47489),g=c.n(f),h=c(50436),i=c(52754),j=c(37155),k=c(85489),l=c(61875),m=c(82732),n=c(37501),o=c(88950);let p=new Set,q=(0,e.memo)(function({session:a,onSend:b,onKill:c,onMerge:f,onRestore:g}){var h,i;let[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(null),[u,v]=(0,e.useState)(null),[w,x]=(0,e.useState)(null),[y,z]=(0,e.useState)(null),[A,B]=(0,e.useState)(!1),[C,D]=(0,e.useState)(""),E=(0,e.useRef)(null),F=(0,e.useRef)(null),[G]=(0,e.useState)(()=>p.has(a.id)),H=(0,j.ng)(a),I=a.pr,J=async c=>{let d=c.trim();if(!d||null!==w)return!1;x(d),z(null);try{return await Promise.resolve(b?.(a.id,d)),z(d),F.current&&clearTimeout(F.current),F.current=setTimeout(()=>z(null),2e3),!0}catch{return!1}finally{x(null)}},K=async a=>{"Enter"===a.key&&!a.shiftKey&&(a.preventDefault(),await J(C)&&D(""))},L=async(c,d)=>{if(null===s){t(c),v(null);try{await Promise.resolve(b?.(a.id,d)),E.current&&clearTimeout(E.current),E.current=setTimeout(()=>t(null),2e3)}catch{t(null),v(c),E.current&&clearTimeout(E.current),E.current=setTimeout(()=>v(null),2e3)}}},M=!!I&&(0,j.fZ)(I),N=!!I&&(0,j.sZ)(I),O=function(a){let b=a.pr;if(!b||"open"!==b.state||(0,j.fZ)(b)||(0,j.sZ)(b))return[];let c=a.metadata,e=[],f=a.lifecycle?.prReason??null,g=c.status,h=b.ciStatus===j.U1.FAILING||"ci_failing"===f||"ci_failed"===g,i="changes_requested"===b.reviewDecision||"changes_requested"===f||"changes_requested"===g,k=!b.mergeability.noConflicts;if(h){let a=b.ciChecks.find(a=>"failed"===a.status),d=b.ciChecks.filter(a=>"failed"===a.status).length;0===d&&b.ciStatus!==j.U1.FAILING?e.push({key:"ci-fail",type:"ci",icon:"✗",label:"CI failing",url:b.url+"/checks",notified:!!c.lastCIFailureDispatchHash,actionLabel:"Ask to fix",actionMessage:`Please fix the failing CI checks on ${b.url}`}):0===d?e.push({key:"ci-unknown",type:"ci",icon:"?",label:"CI unknown",url:b.url+"/checks"}):e.push({key:"ci-fail",type:"ci",icon:"✗",count:d,label:`check${d>1?"s":""} failing`,url:a?.url??b.url+"/checks",notified:!!c.lastCIFailureDispatchHash,actionLabel:"Ask to fix",actionMessage:`Please fix the failing CI checks on ${b.url}`})}if(i?e.push({key:"changes",type:"changes",icon:"↻",label:"changes requested",url:b.url,notified:!!c.lastPendingReviewDispatchHash,actionLabel:"Ask to address",actionMessage:`Please address the requested changes on ${b.url}`}):b.isDraft||"pending"!==b.reviewDecision&&"none"!==b.reviewDecision||e.push({key:"review",type:"review",icon:(0,d.jsxs)("svg",{width:"9",height:"9",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,d.jsx)("path",{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"}),(0,d.jsx)("circle",{cx:"9",cy:"7",r:"4"}),(0,d.jsx)("path",{d:"M23 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75"})]}),label:"needs review",url:b.url,actionLabel:"Ask to post",actionMessage:`Post ${b.url} on slack asking for a review.`}),k&&e.push({key:"conflict",type:"conflict",icon:"⚠",label:"merge conflict",url:b.url,notified:"true"===c.lastMergeConflictDispatched,actionLabel:"Ask to fix",actionMessage:`Please resolve the merge conflicts on ${b.url} by rebasing on the base branch`}),b.unresolvedThreads>0){let a=b.unresolvedComments[0]?.url??b.url+"/files";e.push({key:"comments",type:"comment",icon:"\uD83D\uDCAC",label:"unresolved comments",count:b.unresolvedThreads,url:a,actionLabel:"Ask to resolve",actionMessage:`Please address all unresolved review comments on ${b.url}`})}return e}(a),P=!M&&I?.mergeability.mergeable&&"open"===I.state,Q=(0,j.nH)(a),R=(0,j.wy)(a),S=(0,l.Pn)(a),T=(h=a,i=H,P||"merge"===i?"mergeable":h.lifecycle?.sessionState==="detecting"?"detecting":"respond"===i?(0,j.Ou)(h):h.lifecycle?.prReason==="ci_failing"||"ci_failed"===h.status?"ci failing":"review"===i?(0,j.of)(h):(0,j.Ou)(h)),U=M||!I||N?[]:I.ciChecks.filter(a=>"passed"===a.status).slice(0,3),V=(0,j.dG)(a)||"done"===H,W=a.lifecycle?`Session ${(0,j.Ou)(a)} \xb7 PR ${(0,j.of)(a)} \xb7 Runtime ${(0,j.Kw)(a)}`:null,X=a.issueLabel?`${a.issueLabel}${a.issueTitle?` \xb7 ${a.issueTitle}`:""}`:a.issueTitle??(a.summary&&a.summary!==S?a.summary:null),Y=P?"session-card--merge-frame":O.length>0?"session-card--alert-frame":"session-card--fixed",Z=P?"session-card--accent-merge":"working"===H?"session-card--accent-working":"respond"===H?"session-card--accent-respond":"review"===H||"pending"===H?"session-card--accent-attention":"session-card--accent-default";if(V){let b=function(a){let b=a.activity,c=a.status,e=a.lifecycle?.prState??a.pr?.state;return"merged"===e||"merged"===c?{label:"merged",pillClass:"done-status-pill--merged",icon:(0,d.jsx)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2.5",viewBox:"0 0 24 24",className:"h-3 w-3",children:(0,d.jsx)("path",{d:"M20 6 9 17l-5-5"})})}:"closed"===e?{label:"closed",pillClass:"done-status-pill--exited",icon:(0,d.jsxs)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"h-3 w-3",children:[(0,d.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,d.jsx)("path",{d:"M9 12h6"})]})}:a.lifecycle?.sessionState==="terminated"||"killed"===c||"terminated"===c?{label:(0,j.Ou)(a),pillClass:"done-status-pill--killed",icon:(0,d.jsx)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2.5",viewBox:"0 0 24 24",className:"h-3 w-3",children:(0,d.jsx)("path",{d:"M18 6 6 18M6 6l12 12"})})}:{label:"exited"===b?"exited":(0,j.Ou)(a),pillClass:"done-status-pill--exited",icon:(0,d.jsxs)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"h-3 w-3",children:[(0,d.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,d.jsx)("path",{d:"M9 12h6"})]})}}(a);return(0,d.jsxs)("div",{className:(0,k.cn)("session-card-done",q&&"done-expanded"),onClick:a=>{a.target.closest("a, button, textarea")||r(!q)},children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 px-3.5 pt-3 pb-1.5",children:[(0,d.jsxs)("span",{className:(0,k.cn)("done-status-pill",b.pillClass),children:[b.icon,b.label]}),(0,d.jsx)("span",{className:"font-[var(--font-mono)] text-[10px] tracking-wide text-[var(--color-text-muted)]",children:a.id}),(0,d.jsx)("div",{className:"flex-1"}),R&&(0,d.jsxs)("button",{onClick:b=>{b.stopPropagation(),g?.(a.id)},className:"done-restore-btn",children:[(0,d.jsxs)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"h-3 w-3",children:[(0,d.jsx)("polyline",{points:"1 4 1 10 7 10"}),(0,d.jsx)("path",{d:"M3.51 15a9 9 0 1 0 2.13-9.36L1 10"})]}),"restore"]})]}),(0,d.jsx)("div",{className:"px-3.5 pb-2",children:(0,d.jsx)("p",{className:"session-card-done__title text-[13px] font-semibold leading-snug [display:-webkit-box] [-webkit-box-orient:vertical] [-webkit-line-clamp:2] overflow-hidden",children:S})}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5 px-3.5 pb-3",children:[a.branch&&(0,d.jsxs)("span",{className:"done-meta-chip font-[var(--font-mono)]",children:[(0,d.jsxs)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"h-2.5 w-2.5 opacity-50",children:[(0,d.jsx)("path",{d:"M6 3v12M18 9a3 3 0 0 1-3 3H9a3 3 0 0 0-3 3"}),(0,d.jsx)("circle",{cx:"18",cy:"6",r:"3"})]}),a.branch]}),I&&(0,d.jsxs)("a",{href:I.url,target:"_blank",rel:"noopener noreferrer",onClick:a=>a.stopPropagation(),className:"done-meta-chip font-[var(--font-mono)] font-bold text-[var(--color-text-primary)] no-underline underline-offset-2 hover:underline",children:["#",I.number]}),I&&!M&&(N?(0,d.jsx)("span",{className:"inline-block h-[14px] w-16 animate-pulse rounded-full bg-[var(--color-bg-subtle)]"}):(0,d.jsxs)("span",{className:"done-meta-chip font-[var(--font-mono)]",children:[(0,d.jsxs)("span",{className:"text-[var(--color-status-ready)]",children:["+",I.additions]})," ",(0,d.jsxs)("span",{className:"text-[var(--color-status-error)]",children:["-",I.deletions]})," ",(0,n.i_)(I.additions,I.deletions),(0,d.jsx)("span",{className:"sr-only",children:`+${I.additions} -${I.deletions} ${(0,n.i_)(I.additions,I.deletions)}`})]})),(0,d.jsx)("a",{href:(0,o.Nc)(a.projectId,a.id),onClick:a=>a.stopPropagation(),className:"done-meta-chip font-[var(--font-mono)] font-semibold text-[var(--color-accent)] no-underline hover:underline",children:"View current context"})]}),q&&(0,d.jsxs)("div",{className:"done-expand-section px-3.5 py-3",children:[a.summary&&I?.title&&a.summary!==I.title&&(0,d.jsxs)("div",{className:"mb-3",children:[(0,d.jsxs)("div",{className:"done-detail-heading",children:[(0,d.jsx)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{d:"M4 6h16M4 12h16M4 18h10"})}),"Summary"]}),(0,d.jsx)("p",{className:"text-[12px] leading-relaxed text-[var(--color-text-secondary)]",children:a.summary})]}),a.issueUrl&&(0,d.jsxs)("div",{className:"mb-3",children:[(0,d.jsxs)("div",{className:"done-detail-heading",children:[(0,d.jsxs)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:[(0,d.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,d.jsx)("path",{d:"M12 8v4M12 16h.01"})]}),"Issue"]}),(0,d.jsxs)("a",{href:a.issueUrl,target:"_blank",rel:"noopener noreferrer",onClick:a=>a.stopPropagation(),className:"text-[12px] text-[var(--color-accent)] hover:underline",children:[a.issueLabel||a.issueUrl,a.issueTitle&&`: ${a.issueTitle}`]})]}),I&&I.ciChecks.length>0&&(0,d.jsxs)("div",{className:"mb-3",children:[(0,d.jsxs)("div",{className:"done-detail-heading",children:[(0,d.jsxs)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:[(0,d.jsx)("path",{d:"M9 12l2 2 4-4"}),(0,d.jsx)("circle",{cx:"12",cy:"12",r:"10"})]}),"CI Checks"]}),(0,d.jsx)(m.zm,{checks:I.ciChecks})]}),I&&(0,d.jsxs)("div",{className:"mb-3",children:[(0,d.jsxs)("div",{className:"done-detail-heading",children:[(0,d.jsxs)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:[(0,d.jsx)("path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65S8.93 17.38 9 18v4"}),(0,d.jsx)("path",{d:"M9 18c-4.51 2-5-2-7-2"})]}),"PR"]}),(0,d.jsxs)("p",{className:"text-[12px] text-[var(--color-text-secondary)]",children:[(0,d.jsx)("a",{href:I.url,target:"_blank",rel:"noopener noreferrer",onClick:a=>a.stopPropagation(),className:"hover:underline",children:I.title}),N?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("br",{}),(0,d.jsxs)("span",{className:"mt-1 inline-flex items-center gap-2 text-[10px] text-[var(--color-text-muted)]",children:[(0,d.jsx)("span",{className:"inline-block h-3 w-12 animate-pulse rounded bg-[var(--color-bg-subtle)]"}),(0,d.jsx)("span",{children:"PR details loading..."})]})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("br",{}),(0,d.jsxs)("span",{className:"mt-1 inline-flex items-center gap-2",children:[(0,d.jsxs)("span",{className:"done-meta-chip font-[var(--font-mono)]",children:[(0,d.jsxs)("span",{className:"text-[var(--color-status-ready)]",children:["+",I.additions]})," ",(0,d.jsxs)("span",{className:"text-[var(--color-status-error)]",children:["-",I.deletions]})]}),(0,d.jsx)("span",{className:"text-[var(--color-text-muted)]",children:"\xb7"}),(0,d.jsxs)("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:["mergeable: ",I.mergeability.mergeable?"yes":"no"]}),(0,d.jsx)("span",{className:"text-[var(--color-text-muted)]",children:"\xb7"}),(0,d.jsxs)("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:["review: ",I.reviewDecision]})]})]})]})]}),!I&&(0,d.jsx)("p",{className:"text-[12px] text-[var(--color-text-tertiary)]",children:"No PR associated with this session."})]})]})}let $=Q?"exited":P||"merge"===H||"review"===H?"ready":"respond"===H?"waiting":"pending"===H?"idle":"working"===H?"working":"idle";return(0,d.jsxs)("div",{className:(0,k.cn)("session-card border",!G&&"kanban-card-enter",Y,Z,P&&"card-merge-ready"),children:[(0,d.jsxs)("div",{className:"session-card__header",children:[(0,d.jsx)("span",{className:(0,k.cn)("card__adot","working"===$&&"card__adot--working","ready"===$&&"card__adot--ready","idle"===$&&"card__adot--idle","waiting"===$&&"card__adot--waiting","exited"===$&&"card__adot--exited")}),(0,d.jsx)("span",{className:"card__id",children:a.id}),(0,d.jsx)("div",{className:"flex-1"}),R&&(0,d.jsxs)("button",{onClick:b=>{b.stopPropagation(),g?.(a.id)},className:"session-card__control session-card__restore-control",children:[(0,d.jsxs)("svg",{className:"session-card__control-icon",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:[(0,d.jsx)("path",{d:"M20 11a8 8 0 0 0-14.9-3.98"}),(0,d.jsx)("path",{d:"M4 5v4h4"}),(0,d.jsx)("path",{d:"M4 13a8 8 0 0 0 14.9 3.98"}),(0,d.jsx)("path",{d:"M20 19v-4h-4"})]}),"restore"]}),!Q&&(0,d.jsxs)("a",{href:(0,o.$l)(a.projectId,a.id,"#session-terminal-section"),onClick:a=>a.stopPropagation(),className:"session-card__control session-card__terminal-link",children:[(0,d.jsxs)("svg",{className:"session-card__control-icon",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:[(0,d.jsx)("rect",{x:"2",y:"4",width:"20",height:"16",rx:"2"}),(0,d.jsx)("path",{d:"M6 10l4 2-4 2"}),(0,d.jsx)("path",{d:"M14 14h4"})]}),"terminal"]})]}),(0,d.jsxs)("div",{className:"session-card__body flex min-h-0 flex-1 flex-col",children:[(0,d.jsx)("div",{className:"card__title-wrap",children:(0,d.jsx)("p",{className:"card__title",children:S})}),(0,d.jsxs)("div",{className:"card__meta",children:[a.branch&&(0,d.jsx)("span",{className:"card__branch",children:a.branch}),a.branch&&I?(0,d.jsx)("span",{className:"card__meta-sep","aria-hidden":"true",children:"\xb7"}):null,I&&(0,d.jsxs)("a",{href:I.url,target:"_blank",rel:"noopener noreferrer",onClick:a=>a.stopPropagation(),className:"card__pr",children:["#",I.number]}),I&&!M&&(N?(0,d.jsx)("span",{className:"inline-block h-[14px] w-16 animate-pulse rounded-full bg-[var(--color-bg-subtle)]"}):(0,d.jsxs)("span",{className:"card__diff inline-flex items-center",children:[(0,d.jsxs)("span",{className:"card__diff-add",children:["+",I.additions]})," ",(0,d.jsxs)("span",{className:"card__diff-del",children:["-",I.deletions]})," ",(0,d.jsx)("span",{className:"card__diff-size",children:(0,n.i_)(I.additions,I.deletions)}),(0,d.jsx)("span",{className:"sr-only",children:`+${I.additions} -${I.deletions} ${(0,n.i_)(I.additions,I.deletions)}`})]}))]}),X&&(0,d.jsx)("div",{className:"px-[10px] pb-[5px]",children:"merge"===H||P?(0,d.jsxs)("p",{className:"session-card__secondary session-card__secondary--merge",children:[(0,d.jsx)("svg",{width:"9",height:"9",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,d.jsx)("path",{d:"M20 6 9 17l-5-5"})}),(0,d.jsx)("span",{children:X})]}):(0,d.jsx)("p",{className:"session-card__secondary",children:X})}),W&&(0,d.jsx)("div",{className:"px-[10px] pb-[5px]",children:(0,d.jsx)("p",{className:"text-[10px] leading-relaxed text-[var(--color-text-tertiary)]",children:W})}),M&&I?.state==="open"&&(0,d.jsx)("div",{className:"px-[10px] pb-[5px]",children:(0,d.jsxs)("span",{className:"inline-flex items-center gap-1 text-[10px] text-[var(--color-text-muted)]",children:[(0,d.jsxs)("svg",{className:"h-3 w-3 text-[var(--color-text-tertiary)]",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:[(0,d.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,d.jsx)("path",{d:"M12 8v4M12 16h.01"})]}),"PR data rate limited"]})}),U.length>0&&(0,d.jsx)("div",{className:"card__ci",children:U.map(a=>{let b=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("svg",{width:"8",height:"8",fill:"none",stroke:"currentColor",strokeWidth:"2.5",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,d.jsx)("path",{d:"M20 6 9 17l-5-5"})}),a.name]});return a.url?(0,d.jsx)("a",{href:a.url,target:"_blank",rel:"noopener noreferrer",className:"ci-chip ci-chip--pass",onClick:a=>a.stopPropagation(),children:b},a.name):(0,d.jsx)("span",{className:"ci-chip ci-chip--pass",children:b},a.name)})}),!M&&O.length>0&&(0,d.jsx)("div",{className:"card__alerts flex flex-col",children:O.slice(0,3).map(a=>(0,d.jsxs)("div",{className:(0,k.cn)("alert-row",`alert-row--${a.type}`),children:[(0,d.jsx)("span",{className:"alert-row__icon",children:a.icon}),(0,d.jsxs)("span",{className:"alert-row__text",children:[(0,d.jsxs)("a",{href:a.url,target:"_blank",rel:"noopener noreferrer",onClick:a=>a.stopPropagation(),children:[void 0!==a.count&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{className:"font-bold",children:a.count})," "]}),a.label]}),a.notified&&(0,d.jsxs)("span",{className:"alert-row__notified",title:"Agent has been notified",children:[" ","\xb7 notified"]})]}),a.actionLabel&&(0,d.jsx)("button",{onClick:b=>{b.stopPropagation(),L(a.key,a.actionMessage??"")},disabled:s===a.key,className:"alert-row__action",children:s===a.key?"sent!":u===a.key?"failed":a.actionLabel})]},a.key))}),"respond"===H&&(0,d.jsxs)("div",{className:"quick-reply",onClick:a=>a.stopPropagation(),children:[a.summary&&!a.summaryIsFallback&&(0,d.jsxs)("div",{className:"card__agent-msg",children:[(0,d.jsx)("svg",{className:"card__agent-msg-icon",width:"10",height:"10",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,d.jsx)("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})}),(0,d.jsx)("span",{children:a.summary})]}),(0,d.jsx)("a",{href:(0,o.Nc)(a.projectId,a.id),onClick:a=>a.stopPropagation(),className:"card__view-context",children:"View current context →"}),!Q&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"card__presets",children:[(0,d.jsx)("button",{className:"card__preset",onClick:()=>void J("continue"),disabled:null!==w,children:"continue"===w?"Sending...":"continue"===y?"Sent":"Continue"}),(0,d.jsx)("button",{className:"card__preset",onClick:()=>void J("abort"),disabled:null!==w,children:"abort"===w?"Sending...":"abort"===y?"Sent":"Abort"}),(0,d.jsx)("button",{className:"card__preset",onClick:()=>void J("skip"),disabled:null!==w,children:"skip"===w?"Sending...":"skip"===y?"Sent":"Skip"})]}),(0,d.jsx)("div",{className:"card__reply-wrap",children:(0,d.jsx)("textarea",{className:"card__reply",placeholder:null!==w?"Sending...":"Type a reply... (Enter to send)","aria-label":"Type a reply to the agent",value:C,onChange:a=>D(a.target.value),onKeyDown:a=>{K(a)},rows:1,disabled:null!==w})})]})]}),(0,d.jsxs)("div",{className:"session-card__footer",children:[(0,d.jsx)("span",{className:"card__status min-w-0 truncate",title:a.userPrompt??void 0,children:!a.issueUrl&&a.userPrompt?a.userPrompt.length>60?a.userPrompt.slice(0,60)+"…":a.userPrompt:T}),P&&I?(0,d.jsxs)("button",{onClick:a=>{a.stopPropagation(),f?.(I.number)},className:"session-card__control session-card__merge-control",children:[(0,d.jsxs)("svg",{className:"session-card__control-icon",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:[(0,d.jsx)("circle",{cx:"6",cy:"6",r:"2"}),(0,d.jsx)("circle",{cx:"18",cy:"18",r:"2"}),(0,d.jsx)("circle",{cx:"18",cy:"6",r:"2"}),(0,d.jsx)("path",{d:"M8 6h5a3 3 0 0 1 3 3v7"})]}),"Merge PR #",I.number]}):!Q&&(0,d.jsx)("button",{onClick:b=>{if(b.stopPropagation(),!A)return void B(!0);B(!1),c?.(a.id)},onMouseLeave:()=>B(!1),onBlur:()=>B(!1),"aria-label":A?"Confirm terminate session":"Terminate session",className:(0,k.cn)("session-card__control session-card__terminate btn--danger",A&&"is-confirming"),children:A?(0,d.jsx)("span",{className:"font-mono text-[10px] font-semibold tracking-[0.04em]",children:"kill?"}):(0,d.jsxs)("svg",{className:"session-card__control-icon",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:[(0,d.jsx)("path",{d:"M3 6h18"}),(0,d.jsx)("path",{d:"M8 6V4h8v2"}),(0,d.jsx)("path",{d:"M19 6l-1 14H6L5 6"})]})})]})]})]})},function(a,b){return a.session===b.session&&a.onSend===b.onSend&&a.onKill===b.onKill&&a.onMerge===b.onMerge&&a.onRestore===b.onRestore}),r={merge:{label:"Ready",emptyMessage:"Nothing cleared to land yet."},action:{label:"Action",emptyMessage:"No agents need your input."},respond:{label:"Respond",emptyMessage:"No agents need your input."},review:{label:"Review",emptyMessage:"No code waiting for review."},pending:{label:"Pending",emptyMessage:"Nothing blocked."},working:{label:"Working",emptyMessage:"No agents running."},done:{label:"Done",emptyMessage:"No completed sessions."}},s=(0,e.memo)(function({level:a,sessions:b,onSend:c,onKill:f,onMerge:g,onRestore:h,collapsed:i,onToggle:j,compactMobile:k,onPreview:l,resetKey:m}){let n=r[a],o=void 0!==j,[p,s]=(0,e.useState)(!1),u=o&&k&&!p?b.slice(0,5):b,v=b.length-u.length;return o?(0,d.jsxs)("div",{className:`accordion-section${i?" accordion-section--collapsed":" accordion-section--expanded"}`,"data-level":a,children:[(0,d.jsxs)("button",{type:"button",className:"accordion-header",onClick:()=>j(a),"aria-expanded":!i,"aria-controls":`accordion-body-${a}`,children:[(0,d.jsx)("span",{className:"accordion-header__dot","data-level":a}),(0,d.jsx)("span",{className:"accordion-header__label",children:n.label}),(0,d.jsx)("span",{className:"accordion-header__count",children:b.length}),(0,d.jsx)("span",{className:"accordion-header__chevron","aria-hidden":"true",children:"▶"})]}),(0,d.jsx)("div",{id:`accordion-body-${a}`,className:"accordion-body",children:b.length>0?(0,d.jsxs)("div",{className:k?"mobile-session-list":"flex flex-col gap-2 p-3",children:[u.map(b=>k?(0,d.jsx)(t,{session:b,level:a,onPreview:l},b.id):(0,d.jsx)(q,{session:b,onSend:c,onKill:f,onMerge:g,onRestore:h},b.id)),k&&v>0?(0,d.jsxs)("button",{type:"button",className:"mobile-session-list__view-all",onClick:()=>s(!0),children:["View all ",b.length]}):null]}):k?(0,d.jsx)("div",{className:"mobile-session-list",children:(0,d.jsx)("div",{className:"mobile-session-list__empty",children:n.emptyMessage})}):null})]}):(0,d.jsxs)("div",{className:"kanban-column","data-level":a,children:[(0,d.jsx)("div",{className:"kanban-column__header",children:(0,d.jsxs)("div",{className:"kanban-column__title-row",children:[(0,d.jsx)("div",{className:"kanban-column__dot","data-level":a}),(0,d.jsx)("span",{className:"kanban-column__title",children:n.label}),(0,d.jsx)("span",{className:"kanban-column__count",children:b.length})]})}),(0,d.jsx)("div",{className:"kanban-column-body",children:b.length>0?(0,d.jsx)("div",{className:"kanban-column__stack",children:b.map(a=>(0,d.jsx)(q,{session:a,onSend:c,onKill:f,onMerge:g,onRestore:h},a.id))}):null})]})},function(a,b){return a.level===b.level&&a.collapsed===b.collapsed&&a.onToggle===b.onToggle&&a.onSend===b.onSend&&a.onKill===b.onKill&&a.onMerge===b.onMerge&&a.onRestore===b.onRestore&&a.compactMobile===b.compactMobile&&a.onPreview===b.onPreview&&a.resetKey===b.resetKey&&a.sessions.length===b.sessions.length&&a.sessions.every((a,c)=>a===b.sessions[c])});function t({session:a,level:b,onPreview:c}){let e=[a.branch,a.pr?`PR #${a.pr.number}`:null,a.issueLabel].filter(Boolean);return(0,d.jsxs)("div",{className:"mobile-session-row",children:[(0,d.jsxs)("button",{type:"button",className:"mobile-session-row__preview",onClick:()=>c?.(a),"aria-label":`Open ${(0,l.Pn)(a)}`,children:[(0,d.jsxs)("div",{className:"mobile-session-row__line",children:[(0,d.jsx)("span",{className:"mobile-session-row__dot","data-level":b,"aria-hidden":"true"}),(0,d.jsx)("span",{className:"mobile-session-row__title",children:(0,l.Pn)(a)})]}),(0,d.jsx)("div",{className:"mobile-session-row__meta",children:e.length>0?e.join(" \xb7 "):"No branch or PR metadata"})]}),(0,d.jsxs)("div",{className:"mobile-session-row__side",children:[(0,d.jsx)(u,{session:a,level:b}),(0,d.jsx)("a",{href:(0,o.Nc)(a.projectId,a.id),className:"mobile-session-row__open","aria-label":`Go to ${(0,l.Pn)(a)}`,children:(0,d.jsxs)("svg",{className:"mobile-session-row__open-icon",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,d.jsx)("path",{d:"M4 17V7a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2Z"}),(0,d.jsx)("path",{d:"m8 10 2 2-2 2M12 14h4"})]})})]})]})}function u({session:a,level:b}){let c=r[b].label.toLowerCase();if("merge"===b&&a.pr&&(0,j.QN)(a.pr))c="ready";else if("action"===b)c="needs_input"===a.status?"needs input":"stuck"===a.status?"stuck":"errored"===a.status?"errored":"waiting_input"===a.activity?"waiting":"exited"===a.activity?"crashed":"blocked"===a.activity?"blocked":"ci_failed"===a.status?"ci failed":"changes_requested"===a.status?"changes":a.pr?.ciStatus==="failing"?"ci failed":a.pr?.reviewDecision==="changes_requested"?"changes":a.pr&&!a.pr.mergeability.noConflicts?"conflicts":"action";else"respond"===b?c="waiting_input"===a.activity?"waiting":"needs input":"review"===b?c=a.pr?.reviewDecision==="changes_requested"?"changes":"review":"pending"===b?c=a.pr?.unresolvedThreads?"threads":"pending":"working"===b&&(c="idle"===a.activity?"idle":"active");return(0,d.jsx)("span",{className:"mobile-session-row__chip",children:c})}var v=c(18768),w=c(20057),x=c(58976),y=c(31849);let z=["Working","Pending","Review","Respond","Merge"];function A({message:a,orchestratorHref:b,onSpawnOrchestrator:c=null,spawnLabel:e="Spawn Orchestrator",spawnDisabled:f=!1}){return(0,d.jsxs)("div",{className:"board-wrapper",children:[(0,d.jsx)("div",{className:"kanban-ghost","aria-hidden":"true",children:z.map(a=>(0,d.jsx)("div",{className:"kanban-ghost__col",children:(0,d.jsx)("div",{className:"kanban-ghost__head",children:a})},a))}),(0,d.jsx)("div",{className:"board-center",children:(0,d.jsxs)("div",{className:"empty-state",role:"status",children:[(0,d.jsx)("div",{className:"empty-state__icon",children:(0,d.jsxs)("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,d.jsx)("circle",{cx:"12",cy:"5.5",r:"2.5",fill:"rgba(249,115,22,0.18)",stroke:"#f97316",strokeWidth:"1.5"}),(0,d.jsx)("circle",{cx:"5.5",cy:"17",r:"2.5",fill:"var(--color-bg-subtle)",stroke:"var(--color-border-strong)",strokeWidth:"1.5"}),(0,d.jsx)("circle",{cx:"18.5",cy:"17",r:"2.5",fill:"var(--color-bg-subtle)",stroke:"var(--color-border-strong)",strokeWidth:"1.5"}),(0,d.jsx)("line",{x1:"12",y1:"8",x2:"6.7",y2:"14.8",stroke:"rgba(249,115,22,0.22)",strokeWidth:"1",strokeDasharray:"2.5 2"}),(0,d.jsx)("line",{x1:"12",y1:"8",x2:"17.3",y2:"14.8",stroke:"rgba(249,115,22,0.22)",strokeWidth:"1",strokeDasharray:"2.5 2"}),(0,d.jsx)("line",{x1:"7.8",y1:"17",x2:"16.2",y2:"17",stroke:"var(--color-border-subtle)",strokeWidth:"1",strokeDasharray:"2.5 2"})]})}),a?(0,d.jsx)("p",{className:"empty-state__text",children:a}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{className:"empty-state__headline",children:"Ready to orchestrate"}),(0,d.jsx)("p",{className:"empty-state__hint",children:"Open the main orchestrator to start a session and fan out parallel agents across your codebase."}),b?(0,d.jsxs)("a",{href:b,className:"empty-state__cta",children:[(0,d.jsxs)("svg",{width:"12",height:"12",fill:"none",stroke:"currentColor",strokeWidth:"1.6",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,d.jsx)("circle",{cx:"12",cy:"5",r:"2",fill:"currentColor",stroke:"none"}),(0,d.jsx)("path",{d:"M12 7v4M12 11H6M12 11h6M6 11v3M12 11v3M18 11v3"}),(0,d.jsx)("circle",{cx:"6",cy:"17",r:"2"}),(0,d.jsx)("circle",{cx:"12",cy:"17",r:"2"}),(0,d.jsx)("circle",{cx:"18",cy:"17",r:"2"})]}),"Open Orchestrator"]}):c?(0,d.jsxs)("button",{type:"button",className:"empty-state__cta",onClick:c,disabled:f,children:[(0,d.jsxs)("svg",{width:"12",height:"12",fill:"none",stroke:"currentColor",strokeWidth:"1.6",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,d.jsx)("circle",{cx:"12",cy:"5",r:"2",fill:"currentColor",stroke:"none"}),(0,d.jsx)("path",{d:"M12 7v4M12 11H6M12 11h6M6 11v3M12 11v3M18 11v3"}),(0,d.jsx)("circle",{cx:"6",cy:"17",r:"2"}),(0,d.jsx)("circle",{cx:"12",cy:"17",r:"2"}),(0,d.jsx)("circle",{cx:"18",cy:"17",r:"2"})]}),e]}):null]})]})})]})}var B=c(71276);function C({status:a}){return"connected"===a?null:"disconnected"===a?(0,d.jsx)("button",{type:"button",className:"connection-bar connection-bar--disconnected","aria-live":"assertive","aria-atomic":"true",onClick:()=>window.location.reload(),children:"Offline \xb7 tap to retry"}):(0,d.jsx)("div",{className:"connection-bar connection-bar--reconnecting",role:"status","aria-live":"polite","aria-atomic":"true",children:"Reconnecting…"})}let D=[/\bBearer\s+[A-Za-z0-9._\-+/=]+\b/gi,/\bsk-[A-Za-z0-9]{10,}\b/g,/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\b/g];function E({projectId:a}){let{showToast:b}=(0,B.d)(),[c,f]=(0,e.useState)(!1),g=(0,e.useCallback)(async()=>{if(!c){f(!0);try{let c,d=await fetch("/api/observability",{credentials:"same-origin"});if(!d.ok)return void b("Could not fetch observability snapshot","error");let e=d.headers.get("x-correlation-id");try{c=await d.json()}catch{b("Could not parse observability snapshot","error");return}let f=function a(b,c=new WeakSet){if("string"==typeof b)return D.reduce((a,b)=>a.replace(b,"[REDACTED]"),b);if(Array.isArray(b))return b.map(b=>a(b,c));if(b&&"object"==typeof b){if(c.has(b))return"[Circular]";c.add(b);let d={};for(let[e,f]of Object.entries(b))d[e]=a(f,c);return d}return b}(function(a,b){if(!b||!a||"object"!=typeof a)return a;let c={...a},d=c.projects;if(d&&"object"==typeof d&&!Array.isArray(d)){let a=d[b];c.projects=void 0===a?{}:{[b]:a}}return c}(c,a)),g={copiedAt:new Date().toISOString(),pageHref:`${window.location.origin}${window.location.pathname}`,projectId:a??null,correlationId:e,userAgent:navigator.userAgent,observability:f};await navigator.clipboard.writeText(JSON.stringify(g,null,2)),b("Debug bundle copied to clipboard","success")}catch{b("Could not copy debug bundle","error")}finally{f(!1)}}},[c,a,b]);return(0,d.jsxs)("button",{type:"button",className:"orchestrator-btn flex min-h-[44px] min-w-[44px] items-center gap-2 px-4 py-2 text-[12px] font-semibold text-[var(--color-text-secondary)] transition-colors hover:bg-[var(--color-bg-hover)] disabled:opacity-50",onClick:()=>void g(),disabled:c,"aria-label":"Copy debug bundle for issue reports",children:[(0,d.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:[(0,d.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,d.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]}),"Copy debug info"]})}var F=c(70162);let G=["working","pending","action","merge"],H=["working","pending","review","respond","merge"],I=[];function J({session:a,onRestore:b}){let c=!a.summaryIsFallback&&a.summary||a.issueTitle||a.summary||a.id,e=a.pr?.state==="merged"||"merged"===a.status,f="killed"===a.status||"terminated"===a.status,g=!j.N_.has(a.status),h=`done-card__badge ${f?"done-card__badge--terminated":"done-card__badge--merged"}`;return(0,d.jsxs)("div",{className:"done-card",children:[(0,d.jsx)("p",{className:"done-card__title",children:c}),(0,d.jsxs)("div",{className:"done-card__meta",children:[(0,d.jsx)("span",{className:h,children:e?"merged":f?"terminated":"done"}),a.pr?(0,d.jsxs)("a",{href:a.pr.url,target:"_blank",rel:"noopener noreferrer",className:"done-card__pr",onClick:a=>a.stopPropagation(),children:[(0,d.jsxs)("svg",{width:"9",height:"9",fill:"none",stroke:"currentColor",strokeWidth:"1.8",viewBox:"0 0 24 24",children:[(0,d.jsx)("circle",{cx:"18",cy:"18",r:"3"}),(0,d.jsx)("circle",{cx:"6",cy:"6",r:"3"}),(0,d.jsx)("path",{d:"M6 9v3a6 6 0 0 0 6 6h3"})]}),"#",a.pr.number]}):null,(0,d.jsx)("span",{className:"done-card__age",children:function(a){if(!a)return"just now";let b=new Date(a).getTime();if(!Number.isFinite(b))return"just now";let c=Date.now()-b;if(c<=0)return"just now";let d=Math.floor(c/1e3),e=Math.floor(d/60),f=Math.floor(e/60),g=Math.floor(f/24);return d<60?`${d}s ago`:e<60?`${e}m ago`:f<24?`${f}h ago`:`${g}d ago`}(a.lastActivityAt)}),g?(0,d.jsx)("button",{type:"button",className:"done-card__restore",onClick:c=>{c.stopPropagation(),b(a.id)},children:"Restore"}):null]})]})}function K({initialSessions:a,projectId:b,projectName:c,projects:f=[],orchestrators:k,attentionZones:l="simple",dashboardLoadError:m}){let n=(0,x.eT)(),p="detailed"===l?H:G,q=(0,e.useMemo)(()=>{let b={};for(let c of a)b[c.id]=(0,j.ng)(c,l);return b},[a,l]),{sessions:r,attentionLevels:t,liveSessionsResolved:u,loadError:z}=(0,w.D)({initialSessions:a,muxSessions:n?.status==="connected"?n.sessions:void 0,muxLastError:n?.lastError,initialAttentionLevels:q,attentionZones:l}),D=(0,e.useMemo)(()=>b?r.filter(a=>a.projectId===b):r,[r,b]),K=n?.status==="disconnected"?"disconnected":n?.status==="connected"?"connected":"reconnecting",L=z??(m&&u?void 0:m),N=(0,h.useSearchParams)(),O=(0,h.useRouter)(),P=(0,e.useRef)(O);P.current=O;let Q=N.get("session")??void 0,[R,S]=(0,e.useState)(!1),[T,U]=(0,e.useState)(k??I),[V,W]=(0,e.useState)([]),[X,Y]=(0,e.useState)({}),[Z,$]=(0,e.useState)(!1),[_,aa]=(0,e.useState)(!1),ab=(0,i.U)(i.D),ac=N.get("debug"),ad=f.length>=1,{showToast:ae}=(0,B.d)(),[af,ag]=(0,e.useState)(!1),ah=(0,e.useRef)(r);ah.current=r;let ai=f.length>1&&ad&&void 0===b,aj=(0,e.useMemo)(()=>b?T.find(a=>a.projectId===b)??null:null,[T,b]),ak=aj?(0,o.Nc)(aj.projectId,aj.id):null,al=!ai&&!!b&&f.some(a=>a.id===b&&!a.resolveError)&&!ak,am=b?f.find(a=>a.id===b)??null:null,an=!!b&&V.includes(b),ao=b?X[b]??null:null,ap=(0,e.useMemo)(()=>ai||!Q?D:D.filter(a=>a.id===Q),[D,ai,Q]),aq=(0,e.useMemo)(()=>{let a={merge:[],action:[],respond:[],review:[],pending:[],working:[],done:[]};for(let b of ap)a[(0,j.ng)(b,l)].push(b);return a},[ap,l]),ar=(0,e.useMemo)(()=>{let a=new Map;for(let b of r){let c=a.get(b.projectId);if(c){c.push(b);continue}a.set(b.projectId,[b])}return a},[r]),as=(0,e.useMemo)(()=>ai?f.map(a=>{let b=ar.get(a.id)??[],c={merge:0,action:0,respond:0,review:0,pending:0,working:0,done:0};for(let a of b)c[(0,j.ng)(a,l)]++;return{project:a,orchestrator:T.find(b=>b.projectId===a.id)??null,sessionCount:b.length,openPRCount:b.filter(a=>a.pr?.state==="open").length,counts:c}}):[],[T,ai,l,f,ar]),at=(0,e.useCallback)(async(a,b)=>{try{let c=await fetch(`/api/sessions/${encodeURIComponent(a)}/send`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:b})});if(!c.ok){let b=await c.text()||"Unknown error";console.error(`Failed to send message to ${a}:`,b),ae(`Send failed: ${b}`,"error");let d=Error(b);throw d.toastShown=!0,d}}catch(b){throw b instanceof Error&&"toastShown"in b&&b.toastShown||(console.error(`Network error sending message to ${a}:`,b),ae("Network error while sending message","error")),b}},[ae]),au=(0,e.useCallback)(async a=>{try{let b=await fetch(`/api/sessions/${encodeURIComponent(a)}/kill`,{method:"POST"});if(b.ok)ae("Session terminated","success");else{let c=await b.text();console.error(`Failed to kill ${a}:`,c),ae(`Terminate failed: ${c}`,"error")}}catch(b){console.error(`Network error killing ${a}:`,b),ae("Network error while terminating session","error")}},[ae]),av=(0,e.useCallback)(a=>{let b=ah.current.find(b=>b.id===a)??null;b&&au(b.id)},[au]),aw=(0,e.useCallback)(async a=>{try{let b=await fetch(`/api/prs/${a}/merge`,{method:"POST"});if(b.ok)ae(`PR #${a} merged`,"success");else{let c=await b.text();console.error(`Failed to merge PR #${a}:`,c),ae(`Merge failed: ${c}`,"error");return}}catch(b){console.error(`Network error merging PR #${a}:`,b),ae("Network error while merging PR","error")}},[ae]),ax=(0,e.useCallback)(async a=>{try{let b=await fetch(`/api/sessions/${encodeURIComponent(a)}/restore`,{method:"POST"});if(b.ok)ae("Session restored","success"),P.current.refresh();else{let c=await b.text();console.error(`Failed to restore ${a}:`,c),ae(`Restore failed: ${c}`,"error")}}catch(b){console.error(`Network error restoring ${a}:`,b),ae("Network error while restoring session","error")}},[ae]),ay=async a=>{W(b=>b.includes(a.id)?b:[...b,a.id]),Y(({[a.id]:b,...c})=>c);try{let b=await fetch("/api/orchestrators",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectId:a.id})}),c=await b.json().catch(()=>null);if(!b.ok||!c?.orchestrator)throw Error(c?.error??`Failed to spawn orchestrator for ${a.name}`);let d=c.orchestrator;U(b=>{let c=b.filter(b=>b.projectId!==a.id);return c.push(d),c})}catch(c){let b=c instanceof Error?c.message:"Failed to spawn orchestrator";Y(c=>({...c,[a.id]:b})),console.error(`Failed to spawn orchestrator for ${a.id}:`,c)}finally{W(b=>b.filter(b=>b!==a.id))}},az=p.some(a=>aq[a].length>0),aA=!ai&&!az&&!L,aB=L?(0,d.jsxs)("div",{className:"dashboard-alert mb-6 flex flex-col gap-1.5 border border-[color-mix(in_srgb,var(--color-status-error)_28%,transparent)] bg-[color-mix(in_srgb,var(--color-status-error)_10%,transparent)] px-3.5 py-2.5 text-[11px] md:mb-4",role:"alert","aria-live":"assertive",children:[(0,d.jsx)("span",{className:"font-semibold text-[var(--color-status-error)]",children:"Orchestrator failed to load"}),(0,d.jsx)("span",{className:"break-words text-[var(--color-text-secondary)]",children:L}),(0,d.jsxs)("span",{className:"text-[var(--color-text-secondary)]",children:["Confirm ",(0,d.jsx)("span",{className:"font-mono text-[10px]",children:"agent-orchestrator.yaml"})," exists and is valid, then run ",(0,d.jsx)("span",{className:"font-mono text-[10px]",children:"ao doctor"})," for diagnostics."]})]}):null,aC=(0,e.useMemo)(()=>r.some(a=>a.pr&&(0,j.fZ)(a.pr)),[r]),aD="agent orchestrator"===c?.trim().toLowerCase()?b??c??(ai?"All projects":"Dashboard"):c??(ai?"All projects":"Dashboard"),aE=!ai&&aD.trim().length>0,aF=()=>{$(a=>!a)};return(0,d.jsx)(F.I.Provider,{value:{onToggleSidebar:aF,mobileSidebarOpen:_},children:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(C,{status:K}),(0,d.jsxs)("div",{className:"dashboard-app-shell",children:[(0,d.jsxs)("header",{className:"dashboard-app-header",children:[ad?(0,d.jsx)("button",{type:"button",className:"dashboard-app-sidebar-toggle",onClick:aF,"aria-label":"Toggle sidebar",children:ab?(0,d.jsx)("svg",{width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,d.jsx)("path",{d:"M4 6h16M4 12h16M4 18h16"})}):(0,d.jsxs)("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"1.75",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,d.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),(0,d.jsx)("path",{d:"M9 3v18"})]})}):null,(0,d.jsxs)("div",{className:"dashboard-app-header__brand",children:[(0,d.jsx)("span",{className:"dashboard-app-header__brand-dot","aria-hidden":"true"}),(0,d.jsx)("span",{children:"Agent Orchestrator"})]}),aE?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{className:"dashboard-app-header__sep","aria-hidden":"true"}),(0,d.jsx)("span",{className:"dashboard-app-header__project",children:aD})]}):null,ab||"1"!==ac&&"true"!==ac?null:(0,d.jsx)(E,{projectId:b}),(0,d.jsx)("div",{className:"dashboard-app-header__spacer"}),(0,d.jsx)("div",{className:"dashboard-app-header__actions",children:!ai&&ak?(0,d.jsxs)(g(),{href:ak,className:"dashboard-app-btn dashboard-app-btn--amber","aria-label":"Orchestrator",children:[(0,d.jsxs)("svg",{width:"12",height:"12",fill:"none",stroke:"currentColor",strokeWidth:"1.6",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,d.jsx)("circle",{cx:"12",cy:"5",r:"2",fill:"currentColor",stroke:"none"}),(0,d.jsx)("path",{d:"M12 7v4M12 11H6M12 11h6M6 11v3M12 11v3M18 11v3"}),(0,d.jsx)("circle",{cx:"6",cy:"17",r:"2"}),(0,d.jsx)("circle",{cx:"12",cy:"17",r:"2"}),(0,d.jsx)("circle",{cx:"18",cy:"17",r:"2"})]}),"Orchestrator"]}):al&&am?(0,d.jsxs)("button",{type:"button",className:"dashboard-app-btn dashboard-app-btn--amber","aria-label":"Spawn Orchestrator",onClick:()=>void ay(am),disabled:an,children:[(0,d.jsxs)("svg",{width:"12",height:"12",fill:"none",stroke:"currentColor",strokeWidth:"1.6",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,d.jsx)("circle",{cx:"12",cy:"5",r:"2",fill:"currentColor",stroke:"none"}),(0,d.jsx)("path",{d:"M12 7v4M12 11H6M12 11h6M6 11v3M12 11v3M18 11v3"}),(0,d.jsx)("circle",{cx:"6",cy:"17",r:"2"}),(0,d.jsx)("circle",{cx:"12",cy:"17",r:"2"}),(0,d.jsx)("circle",{cx:"18",cy:"17",r:"2"})]}),an?"Spawning...":"Spawn Orchestrator"]}):null})]}),(0,d.jsxs)("div",{className:`dashboard-shell dashboard-shell--desktop${Z?" dashboard-shell--sidebar-collapsed":""}`,children:[ad&&(0,d.jsx)("div",{className:`sidebar-wrapper${_?" sidebar-wrapper--mobile-open":""}`,children:(0,d.jsx)(y.u,{projects:f,sessions:r,orchestrators:T,activeProjectId:b,activeSessionId:Q,collapsed:Z,onToggleCollapsed:()=>$(a=>!a),onMobileClose:()=>aa(!1)})}),_&&(0,d.jsx)("div",{className:"sidebar-mobile-backdrop",onClick:()=>aa(!1)}),(0,d.jsxs)("main",{className:"dashboard-main dashboard-main--desktop",children:[(0,d.jsx)(v.u,{attentionLevels:t,projectName:c}),(0,d.jsxs)("div",{className:"dashboard-main__subhead",children:[(0,d.jsx)("h1",{className:"dashboard-main__title",children:"Dashboard"}),(0,d.jsx)("p",{className:"dashboard-main__subtitle",children:"Live agent sessions, pull requests, and merge status."})]}),(0,d.jsxs)("div",{className:"dashboard-main__body",children:[aB,aC&&!R&&(0,d.jsxs)("div",{className:"dashboard-alert mb-4 flex items-center gap-2.5 border border-[color-mix(in_srgb,var(--color-status-attention)_25%,transparent)] bg-[var(--color-tint-yellow)] px-3.5 py-2.5 text-[11px] text-[var(--color-status-attention)]",children:[(0,d.jsxs)("svg",{className:"h-3.5 w-3.5 shrink-0",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:[(0,d.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,d.jsx)("path",{d:"M12 8v4M12 16h.01"})]}),(0,d.jsx)("span",{className:"flex-1",children:"GitHub API rate limited — PR data (CI status, review state, sizes) may be stale. Will retry automatically on next refresh."}),(0,d.jsx)("button",{onClick:()=>S(!0),className:"ml-1 shrink-0 opacity-60 hover:opacity-100","aria-label":"Dismiss",children:(0,d.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{d:"M18 6 6 18M6 6l12 12"})})})]}),ai&&(0,d.jsx)(M,{overviews:as,onSpawnOrchestrator:ay,spawningProjectIds:V,spawnErrors:X,attentionZones:l}),!ai&&az&&(0,d.jsx)("div",{className:"kanban-board-wrap",children:(0,d.jsx)("div",{className:"kanban-board","data-columns":p.length,style:{"--kanban-column-count":p.length},children:p.map(a=>(0,d.jsx)(s,{level:a,sessions:aq[a],onSend:at,onKill:av,onMerge:aw,onRestore:ax},a))})}),aA?(0,d.jsx)(A,{orchestratorHref:ak,onSpawnOrchestrator:al&&am?()=>{ay(am)}:null,spawnLabel:an?"Spawning...":"Spawn Orchestrator",spawnDisabled:an}):null,!ai&&ao?(0,d.jsx)("p",{className:"mt-3 text-[11px] text-[var(--color-status-error)]",children:ao}):null,!ai&&aq.done.length>0&&(0,d.jsxs)("div",{className:"done-bar mt-6",children:[(0,d.jsxs)("button",{type:"button",className:"done-bar__toggle",onClick:()=>ag(a=>!a),"aria-expanded":af,children:[(0,d.jsx)("svg",{className:`done-bar__chevron${af?" done-bar__chevron--open":""}`,fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,d.jsx)("path",{d:"m9 18 6-6-6-6"})}),(0,d.jsx)("span",{className:"done-bar__label",children:"Done / Terminated"}),(0,d.jsx)("span",{className:"done-bar__count",children:aq.done.length})]}),af&&(0,d.jsx)("div",{className:"done-bar__cards",children:aq.done.map(a=>(0,d.jsx)(J,{session:a,onRestore:ax},a.id))})]})]})]})]})]})]})})}function L(a){return(0,d.jsx)(B.t,{children:(0,d.jsx)(K,{...a})})}function M({overviews:a,onSpawnOrchestrator:b,spawningProjectIds:c,spawnErrors:e,attentionZones:f}){return(0,d.jsx)("div",{className:"mb-8 grid gap-4 md:grid-cols-2 xl:grid-cols-3",children:a.map(({project:a,orchestrator:h,sessionCount:i,openPRCount:j,counts:k})=>(()=>{let l=!!a.resolveError,m=(0,o.bn)(a.id);return(0,d.jsxs)("section",{className:"border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] p-4",children:[(0,d.jsxs)("div",{className:"mb-4 flex items-start justify-between gap-3",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h2",{className:"text-[14px] font-semibold text-[var(--color-text-primary)]",children:a.name}),(0,d.jsx)("div",{className:"mt-1 text-[11px] text-[var(--color-text-muted)]",children:l?"Config needs repair":(0,d.jsxs)(d.Fragment,{children:[i," active session",1!==i?"s":"",j>0?` \xb7 ${j} open PR${1!==j?"s":""}`:""]})})]}),(0,d.jsx)(g(),{href:m,className:"border border-[var(--color-border-default)] px-3 py-1.5 text-[11px] font-medium text-[var(--color-text-secondary)] hover:bg-[var(--color-bg-hover)] hover:no-underline",children:"Open project"})]}),(0,d.jsxs)("div",{className:"mb-4 flex flex-wrap gap-2",children:[(0,d.jsx)(N,{label:"Merge",value:k.merge,tone:"ready"}),"detailed"===f?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(N,{label:"Respond",value:k.respond,tone:"error"}),(0,d.jsx)(N,{label:"Review",value:k.review,tone:"orange"})]}):(0,d.jsx)(N,{label:"Action",value:k.action,tone:"orange"}),(0,d.jsx)(N,{label:"Pending",value:k.pending,tone:"attention"}),(0,d.jsx)(N,{label:"Working",value:k.working,tone:"working"})]}),(0,d.jsxs)("div",{className:"border-t border-[var(--color-border-subtle)] pt-3",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,d.jsx)("div",{className:"text-[11px] text-[var(--color-text-muted)]",children:l?"Project config could not be resolved":h?"Per-project orchestrator available":"No running orchestrator"}),l?(0,d.jsx)(g(),{href:m,className:"border border-[var(--color-border-default)] px-3 py-1.5 text-[11px] font-semibold text-[var(--color-text-secondary)] hover:bg-[var(--color-bg-hover)] hover:no-underline",children:"Repair project"}):h?(0,d.jsxs)(g(),{href:(0,o.Nc)(h.projectId,h.id),className:"orchestrator-btn flex items-center gap-2 px-3 py-1.5 text-[11px] font-semibold hover:no-underline",children:[(0,d.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-[var(--color-accent)] opacity-80"}),"orchestrator"]}):(0,d.jsx)("button",{type:"button",onClick:()=>void b(a),disabled:c.includes(a.id),className:"orchestrator-btn px-3 py-1.5 text-[11px] font-semibold disabled:cursor-wait disabled:opacity-70",children:c.includes(a.id)?"Spawning...":"Spawn Orchestrator"})]}),e[a.id]?(0,d.jsx)("p",{className:"mt-2 text-[11px] text-[var(--color-status-error)]",children:e[a.id]}):null]})]},a.id)})())})}function N({label:a,value:b,tone:c}){return(0,d.jsxs)("div",{className:"min-w-[78px] border border-[var(--color-border-subtle)] px-2.5 py-2",children:[(0,d.jsx)("div",{className:"text-[10px] uppercase tracking-[0.08em] text-[var(--color-text-tertiary)]",children:a}),(0,d.jsx)("div",{className:"project-metric__value mt-1 text-[18px] font-semibold tabular-nums","data-tone":c,children:b})]})}},70162:(a,b,c)=>{c.d(b,{I:()=>d});let d=(0,c(81115).createContext)(null)}};
1
+ "use strict";exports.id=1172,exports.ids=[1172],exports.modules={13219:(a,b,c)=>{c.d(b,{Dashboard:()=>d});let d=(0,c(10864).registerClientReference)(function(){throw Error("Attempted to call Dashboard() from the server but Dashboard is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/equinox/agent-orchestrator/packages/web/src/components/Dashboard.tsx","Dashboard")},16602:(a,b,c)=>{c.d(b,{Dashboard:()=>L});var d=c(33666),e=c(81115),f=c(47489),g=c.n(f),h=c(50436),i=c(52754),j=c(37155),k=c(85489),l=c(61875),m=c(82732),n=c(37501),o=c(88950);let p=new Set,q=(0,e.memo)(function({session:a,onSend:b,onKill:c,onMerge:f,onRestore:g}){var h,i;let[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(null),[u,v]=(0,e.useState)(null),[w,x]=(0,e.useState)(null),[y,z]=(0,e.useState)(null),[A,B]=(0,e.useState)(!1),[C,D]=(0,e.useState)(""),E=(0,e.useRef)(null),F=(0,e.useRef)(null),[G]=(0,e.useState)(()=>p.has(a.id)),H=(0,j.ng)(a),I=a.pr,J=async c=>{let d=c.trim();if(!d||null!==w)return!1;x(d),z(null);try{return await Promise.resolve(b?.(a.id,d)),z(d),F.current&&clearTimeout(F.current),F.current=setTimeout(()=>z(null),2e3),!0}catch{return!1}finally{x(null)}},K=async a=>{"Enter"===a.key&&!a.shiftKey&&(a.preventDefault(),await J(C)&&D(""))},L=async(c,d)=>{if(null===s){t(c),v(null);try{await Promise.resolve(b?.(a.id,d)),E.current&&clearTimeout(E.current),E.current=setTimeout(()=>t(null),2e3)}catch{t(null),v(c),E.current&&clearTimeout(E.current),E.current=setTimeout(()=>v(null),2e3)}}},M=!!I&&(0,j.fZ)(I),N=!!I&&(0,j.sZ)(I),O=function(a){let b=a.pr;if(!b||"open"!==b.state||(0,j.fZ)(b)||(0,j.sZ)(b))return[];let c=a.metadata,e=[],f=a.lifecycle?.prReason??null,g=c.status,h=b.ciStatus===j.U1.FAILING||"ci_failing"===f||"ci_failed"===g,i="changes_requested"===b.reviewDecision||"changes_requested"===f||"changes_requested"===g,k=!b.mergeability.noConflicts;if(h){let a=b.ciChecks.find(a=>"failed"===a.status),d=b.ciChecks.filter(a=>"failed"===a.status).length;0===d&&b.ciStatus!==j.U1.FAILING?e.push({key:"ci-fail",type:"ci",icon:"✗",label:"CI failing",url:b.url+"/checks",notified:!!c.lastCIFailureDispatchHash,actionLabel:"Ask to fix",actionMessage:`Please fix the failing CI checks on ${b.url}`}):0===d?e.push({key:"ci-unknown",type:"ci",icon:"?",label:"CI unknown",url:b.url+"/checks"}):e.push({key:"ci-fail",type:"ci",icon:"✗",count:d,label:`check${d>1?"s":""} failing`,url:a?.url??b.url+"/checks",notified:!!c.lastCIFailureDispatchHash,actionLabel:"Ask to fix",actionMessage:`Please fix the failing CI checks on ${b.url}`})}if(i?e.push({key:"changes",type:"changes",icon:"↻",label:"changes requested",url:b.url,notified:!!c.lastPendingReviewDispatchHash,actionLabel:"Ask to address",actionMessage:`Please address the requested changes on ${b.url}`}):b.isDraft||"pending"!==b.reviewDecision&&"none"!==b.reviewDecision||e.push({key:"review",type:"review",icon:(0,d.jsxs)("svg",{width:"9",height:"9",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,d.jsx)("path",{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"}),(0,d.jsx)("circle",{cx:"9",cy:"7",r:"4"}),(0,d.jsx)("path",{d:"M23 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75"})]}),label:"needs review",url:b.url,actionLabel:"Ask to post",actionMessage:`Post ${b.url} on slack asking for a review.`}),k&&e.push({key:"conflict",type:"conflict",icon:"⚠",label:"merge conflict",url:b.url,notified:"true"===c.lastMergeConflictDispatched,actionLabel:"Ask to fix",actionMessage:`Please resolve the merge conflicts on ${b.url} by rebasing on the base branch`}),b.unresolvedThreads>0){let a=b.unresolvedComments[0]?.url??b.url+"/files";e.push({key:"comments",type:"comment",icon:"\uD83D\uDCAC",label:"unresolved comments",count:b.unresolvedThreads,url:a,actionLabel:"Ask to resolve",actionMessage:`Please address all unresolved review comments on ${b.url}`})}return e}(a),P=!M&&I?.mergeability.mergeable&&"open"===I.state,Q=(0,j.nH)(a),R=(0,j.wy)(a),S=(0,l.Pn)(a),T=(h=a,i=H,P||"merge"===i?"mergeable":h.lifecycle?.sessionState==="detecting"?"detecting":"respond"===i?(0,j.Ou)(h):h.lifecycle?.prReason==="ci_failing"||"ci_failed"===h.status?"ci failing":"review"===i?(0,j.of)(h):(0,j.Ou)(h)),U=M||!I||N?[]:I.ciChecks.filter(a=>"passed"===a.status).slice(0,3),V=(0,j.dG)(a)||"done"===H,W=a.lifecycle?`Session ${(0,j.Ou)(a)} \xb7 PR ${(0,j.of)(a)} \xb7 Runtime ${(0,j.Kw)(a)}`:null,X=a.issueLabel?`${a.issueLabel}${a.issueTitle?` \xb7 ${a.issueTitle}`:""}`:a.issueTitle??(a.summary&&a.summary!==S?a.summary:null),Y=P?"session-card--merge-frame":O.length>0?"session-card--alert-frame":"session-card--fixed",Z=P?"session-card--accent-merge":"working"===H?"session-card--accent-working":"respond"===H?"session-card--accent-respond":"review"===H||"pending"===H?"session-card--accent-attention":"session-card--accent-default";if(V){let b=function(a){let b=a.activity,c=a.status,e=a.lifecycle?.prState??a.pr?.state;return"merged"===e||"merged"===c?{label:"merged",pillClass:"done-status-pill--merged",icon:(0,d.jsx)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2.5",viewBox:"0 0 24 24",className:"h-3 w-3",children:(0,d.jsx)("path",{d:"M20 6 9 17l-5-5"})})}:"closed"===e?{label:"closed",pillClass:"done-status-pill--exited",icon:(0,d.jsxs)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"h-3 w-3",children:[(0,d.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,d.jsx)("path",{d:"M9 12h6"})]})}:a.lifecycle?.sessionState==="terminated"||"killed"===c||"terminated"===c?{label:(0,j.Ou)(a),pillClass:"done-status-pill--killed",icon:(0,d.jsx)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2.5",viewBox:"0 0 24 24",className:"h-3 w-3",children:(0,d.jsx)("path",{d:"M18 6 6 18M6 6l12 12"})})}:{label:"exited"===b?"exited":(0,j.Ou)(a),pillClass:"done-status-pill--exited",icon:(0,d.jsxs)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"h-3 w-3",children:[(0,d.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,d.jsx)("path",{d:"M9 12h6"})]})}}(a);return(0,d.jsxs)("div",{className:(0,k.cn)("session-card-done",q&&"done-expanded"),onClick:a=>{a.target.closest("a, button, textarea")||r(!q)},children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 px-3.5 pt-3 pb-1.5",children:[(0,d.jsxs)("span",{className:(0,k.cn)("done-status-pill",b.pillClass),children:[b.icon,b.label]}),(0,d.jsx)("span",{className:"font-[var(--font-mono)] text-[10px] tracking-wide text-[var(--color-text-muted)]",children:a.id}),(0,d.jsx)("div",{className:"flex-1"}),R&&(0,d.jsxs)("button",{onClick:b=>{b.stopPropagation(),g?.(a.id)},className:"done-restore-btn",children:[(0,d.jsxs)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"h-3 w-3",children:[(0,d.jsx)("polyline",{points:"1 4 1 10 7 10"}),(0,d.jsx)("path",{d:"M3.51 15a9 9 0 1 0 2.13-9.36L1 10"})]}),"restore"]})]}),(0,d.jsx)("div",{className:"px-3.5 pb-2",children:(0,d.jsx)("p",{className:"session-card-done__title text-[13px] font-semibold leading-snug [display:-webkit-box] [-webkit-box-orient:vertical] [-webkit-line-clamp:2] overflow-hidden",children:S})}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5 px-3.5 pb-3",children:[a.branch&&(0,d.jsxs)("span",{className:"done-meta-chip font-[var(--font-mono)]",children:[(0,d.jsxs)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"h-2.5 w-2.5 opacity-50",children:[(0,d.jsx)("path",{d:"M6 3v12M18 9a3 3 0 0 1-3 3H9a3 3 0 0 0-3 3"}),(0,d.jsx)("circle",{cx:"18",cy:"6",r:"3"})]}),a.branch]}),I&&(0,d.jsxs)("a",{href:I.url,target:"_blank",rel:"noopener noreferrer",onClick:a=>a.stopPropagation(),className:"done-meta-chip font-[var(--font-mono)] font-bold text-[var(--color-text-primary)] no-underline underline-offset-2 hover:underline",children:["#",I.number]}),I&&!M&&(N?(0,d.jsx)("span",{className:"inline-block h-[14px] w-16 animate-pulse rounded-full bg-[var(--color-bg-subtle)]"}):(0,d.jsxs)("span",{className:"done-meta-chip font-[var(--font-mono)]",children:[(0,d.jsxs)("span",{className:"text-[var(--color-status-ready)]",children:["+",I.additions]})," ",(0,d.jsxs)("span",{className:"text-[var(--color-status-error)]",children:["-",I.deletions]})," ",(0,n.i_)(I.additions,I.deletions),(0,d.jsx)("span",{className:"sr-only",children:`+${I.additions} -${I.deletions} ${(0,n.i_)(I.additions,I.deletions)}`})]})),(0,d.jsx)("a",{href:(0,o.Nc)(a.projectId,a.id),onClick:a=>a.stopPropagation(),className:"done-meta-chip font-[var(--font-mono)] font-semibold text-[var(--color-accent)] no-underline hover:underline",children:"View current context"})]}),q&&(0,d.jsxs)("div",{className:"done-expand-section px-3.5 py-3",children:[a.summary&&I?.title&&a.summary!==I.title&&(0,d.jsxs)("div",{className:"mb-3",children:[(0,d.jsxs)("div",{className:"done-detail-heading",children:[(0,d.jsx)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{d:"M4 6h16M4 12h16M4 18h10"})}),"Summary"]}),(0,d.jsx)("p",{className:"text-[12px] leading-relaxed text-[var(--color-text-secondary)]",children:a.summary})]}),a.issueUrl&&(0,d.jsxs)("div",{className:"mb-3",children:[(0,d.jsxs)("div",{className:"done-detail-heading",children:[(0,d.jsxs)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:[(0,d.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,d.jsx)("path",{d:"M12 8v4M12 16h.01"})]}),"Issue"]}),(0,d.jsxs)("a",{href:a.issueUrl,target:"_blank",rel:"noopener noreferrer",onClick:a=>a.stopPropagation(),className:"text-[12px] text-[var(--color-accent)] hover:underline",children:[a.issueLabel||a.issueUrl,a.issueTitle&&`: ${a.issueTitle}`]})]}),I&&I.ciChecks.length>0&&(0,d.jsxs)("div",{className:"mb-3",children:[(0,d.jsxs)("div",{className:"done-detail-heading",children:[(0,d.jsxs)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:[(0,d.jsx)("path",{d:"M9 12l2 2 4-4"}),(0,d.jsx)("circle",{cx:"12",cy:"12",r:"10"})]}),"CI Checks"]}),(0,d.jsx)(m.zm,{checks:I.ciChecks})]}),I&&(0,d.jsxs)("div",{className:"mb-3",children:[(0,d.jsxs)("div",{className:"done-detail-heading",children:[(0,d.jsxs)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:[(0,d.jsx)("path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65S8.93 17.38 9 18v4"}),(0,d.jsx)("path",{d:"M9 18c-4.51 2-5-2-7-2"})]}),"PR"]}),(0,d.jsxs)("p",{className:"text-[12px] text-[var(--color-text-secondary)]",children:[(0,d.jsx)("a",{href:I.url,target:"_blank",rel:"noopener noreferrer",onClick:a=>a.stopPropagation(),className:"hover:underline",children:I.title}),N?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("br",{}),(0,d.jsxs)("span",{className:"mt-1 inline-flex items-center gap-2 text-[10px] text-[var(--color-text-muted)]",children:[(0,d.jsx)("span",{className:"inline-block h-3 w-12 animate-pulse rounded bg-[var(--color-bg-subtle)]"}),(0,d.jsx)("span",{children:"PR details loading..."})]})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("br",{}),(0,d.jsxs)("span",{className:"mt-1 inline-flex items-center gap-2",children:[(0,d.jsxs)("span",{className:"done-meta-chip font-[var(--font-mono)]",children:[(0,d.jsxs)("span",{className:"text-[var(--color-status-ready)]",children:["+",I.additions]})," ",(0,d.jsxs)("span",{className:"text-[var(--color-status-error)]",children:["-",I.deletions]})]}),(0,d.jsx)("span",{className:"text-[var(--color-text-muted)]",children:"\xb7"}),(0,d.jsxs)("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:["mergeable: ",I.mergeability.mergeable?"yes":"no"]}),(0,d.jsx)("span",{className:"text-[var(--color-text-muted)]",children:"\xb7"}),(0,d.jsxs)("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:["review: ",I.reviewDecision]})]})]})]})]}),!I&&(0,d.jsx)("p",{className:"text-[12px] text-[var(--color-text-tertiary)]",children:"No PR associated with this session."})]})]})}let $=Q?"exited":P||"merge"===H||"review"===H?"ready":"respond"===H?"waiting":"pending"===H?"idle":"working"===H?"working":"idle";return(0,d.jsxs)("div",{className:(0,k.cn)("session-card border",!G&&"kanban-card-enter",Y,Z,P&&"card-merge-ready"),children:[(0,d.jsxs)("div",{className:"session-card__header",children:[(0,d.jsx)("span",{className:(0,k.cn)("card__adot","working"===$&&"card__adot--working","ready"===$&&"card__adot--ready","idle"===$&&"card__adot--idle","waiting"===$&&"card__adot--waiting","exited"===$&&"card__adot--exited")}),(0,d.jsx)("span",{className:"card__id",children:a.id}),(0,d.jsx)("div",{className:"flex-1"}),R&&(0,d.jsxs)("button",{onClick:b=>{b.stopPropagation(),g?.(a.id)},className:"session-card__control session-card__restore-control",children:[(0,d.jsxs)("svg",{className:"session-card__control-icon",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:[(0,d.jsx)("path",{d:"M20 11a8 8 0 0 0-14.9-3.98"}),(0,d.jsx)("path",{d:"M4 5v4h4"}),(0,d.jsx)("path",{d:"M4 13a8 8 0 0 0 14.9 3.98"}),(0,d.jsx)("path",{d:"M20 19v-4h-4"})]}),"restore"]}),!Q&&(0,d.jsxs)("a",{href:(0,o.$l)(a.projectId,a.id,"#session-terminal-section"),onClick:a=>a.stopPropagation(),className:"session-card__control session-card__terminal-link",children:[(0,d.jsxs)("svg",{className:"session-card__control-icon",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:[(0,d.jsx)("rect",{x:"2",y:"4",width:"20",height:"16",rx:"2"}),(0,d.jsx)("path",{d:"M6 10l4 2-4 2"}),(0,d.jsx)("path",{d:"M14 14h4"})]}),"terminal"]})]}),(0,d.jsxs)("div",{className:"session-card__body flex min-h-0 flex-1 flex-col",children:[(0,d.jsx)("div",{className:"card__title-wrap",children:(0,d.jsx)("p",{className:"card__title",children:S})}),(0,d.jsxs)("div",{className:"card__meta",children:[a.branch&&(0,d.jsx)("span",{className:"card__branch",children:a.branch}),a.branch&&I?(0,d.jsx)("span",{className:"card__meta-sep","aria-hidden":"true",children:"\xb7"}):null,I&&(0,d.jsxs)("a",{href:I.url,target:"_blank",rel:"noopener noreferrer",onClick:a=>a.stopPropagation(),className:"card__pr",children:["#",I.number]}),I&&!M&&(N?(0,d.jsx)("span",{className:"inline-block h-[14px] w-16 animate-pulse rounded-full bg-[var(--color-bg-subtle)]"}):(0,d.jsxs)("span",{className:"card__diff inline-flex items-center",children:[(0,d.jsxs)("span",{className:"card__diff-add",children:["+",I.additions]})," ",(0,d.jsxs)("span",{className:"card__diff-del",children:["-",I.deletions]})," ",(0,d.jsx)("span",{className:"card__diff-size",children:(0,n.i_)(I.additions,I.deletions)}),(0,d.jsx)("span",{className:"sr-only",children:`+${I.additions} -${I.deletions} ${(0,n.i_)(I.additions,I.deletions)}`})]}))]}),X&&(0,d.jsx)("div",{className:"px-[10px] pb-[5px]",children:"merge"===H||P?(0,d.jsxs)("p",{className:"session-card__secondary session-card__secondary--merge",children:[(0,d.jsx)("svg",{width:"9",height:"9",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,d.jsx)("path",{d:"M20 6 9 17l-5-5"})}),(0,d.jsx)("span",{children:X})]}):(0,d.jsx)("p",{className:"session-card__secondary",children:X})}),W&&(0,d.jsx)("div",{className:"px-[10px] pb-[5px]",children:(0,d.jsx)("p",{className:"text-[10px] leading-relaxed text-[var(--color-text-tertiary)]",children:W})}),M&&I?.state==="open"&&(0,d.jsx)("div",{className:"px-[10px] pb-[5px]",children:(0,d.jsxs)("span",{className:"inline-flex items-center gap-1 text-[10px] text-[var(--color-text-muted)]",children:[(0,d.jsxs)("svg",{className:"h-3 w-3 text-[var(--color-text-tertiary)]",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:[(0,d.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,d.jsx)("path",{d:"M12 8v4M12 16h.01"})]}),"PR data rate limited"]})}),U.length>0&&(0,d.jsx)("div",{className:"card__ci",children:U.map(a=>{let b=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("svg",{width:"8",height:"8",fill:"none",stroke:"currentColor",strokeWidth:"2.5",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,d.jsx)("path",{d:"M20 6 9 17l-5-5"})}),a.name]});return a.url?(0,d.jsx)("a",{href:a.url,target:"_blank",rel:"noopener noreferrer",className:"ci-chip ci-chip--pass",onClick:a=>a.stopPropagation(),children:b},a.name):(0,d.jsx)("span",{className:"ci-chip ci-chip--pass",children:b},a.name)})}),!M&&O.length>0&&(0,d.jsx)("div",{className:"card__alerts flex flex-col",children:O.slice(0,3).map(a=>(0,d.jsxs)("div",{className:(0,k.cn)("alert-row",`alert-row--${a.type}`),children:[(0,d.jsx)("span",{className:"alert-row__icon",children:a.icon}),(0,d.jsxs)("span",{className:"alert-row__text",children:[(0,d.jsxs)("a",{href:a.url,target:"_blank",rel:"noopener noreferrer",onClick:a=>a.stopPropagation(),children:[void 0!==a.count&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{className:"font-bold",children:a.count})," "]}),a.label]}),a.notified&&(0,d.jsxs)("span",{className:"alert-row__notified",title:"Agent has been notified",children:[" ","\xb7 notified"]})]}),a.actionLabel&&(0,d.jsx)("button",{onClick:b=>{b.stopPropagation(),L(a.key,a.actionMessage??"")},disabled:s===a.key,className:"alert-row__action",children:s===a.key?"sent!":u===a.key?"failed":a.actionLabel})]},a.key))}),"respond"===H&&(0,d.jsxs)("div",{className:"quick-reply",onClick:a=>a.stopPropagation(),children:[a.summary&&!a.summaryIsFallback&&(0,d.jsxs)("div",{className:"card__agent-msg",children:[(0,d.jsx)("svg",{className:"card__agent-msg-icon",width:"10",height:"10",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,d.jsx)("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})}),(0,d.jsx)("span",{children:a.summary})]}),(0,d.jsx)("a",{href:(0,o.Nc)(a.projectId,a.id),onClick:a=>a.stopPropagation(),className:"card__view-context",children:"View current context →"}),!Q&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"card__presets",children:[(0,d.jsx)("button",{className:"card__preset",onClick:()=>void J("continue"),disabled:null!==w,children:"continue"===w?"Sending...":"continue"===y?"Sent":"Continue"}),(0,d.jsx)("button",{className:"card__preset",onClick:()=>void J("abort"),disabled:null!==w,children:"abort"===w?"Sending...":"abort"===y?"Sent":"Abort"}),(0,d.jsx)("button",{className:"card__preset",onClick:()=>void J("skip"),disabled:null!==w,children:"skip"===w?"Sending...":"skip"===y?"Sent":"Skip"})]}),(0,d.jsx)("div",{className:"card__reply-wrap",children:(0,d.jsx)("textarea",{className:"card__reply",placeholder:null!==w?"Sending...":"Type a reply... (Enter to send)","aria-label":"Type a reply to the agent",value:C,onChange:a=>D(a.target.value),onKeyDown:a=>{K(a)},rows:1,disabled:null!==w})})]})]}),(0,d.jsxs)("div",{className:"session-card__footer",children:[(0,d.jsx)("span",{className:"card__status min-w-0 truncate",title:a.userPrompt??void 0,children:!a.issueUrl&&a.userPrompt?a.userPrompt.length>60?a.userPrompt.slice(0,60)+"…":a.userPrompt:T}),P&&I?(0,d.jsxs)("button",{onClick:a=>{a.stopPropagation(),f?.(I.number)},className:"session-card__control session-card__merge-control",children:[(0,d.jsxs)("svg",{className:"session-card__control-icon",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:[(0,d.jsx)("circle",{cx:"6",cy:"6",r:"2"}),(0,d.jsx)("circle",{cx:"18",cy:"18",r:"2"}),(0,d.jsx)("circle",{cx:"18",cy:"6",r:"2"}),(0,d.jsx)("path",{d:"M8 6h5a3 3 0 0 1 3 3v7"})]}),"Merge PR #",I.number]}):!Q&&(0,d.jsx)("button",{onClick:b=>{if(b.stopPropagation(),!A)return void B(!0);B(!1),c?.(a.id)},onMouseLeave:()=>B(!1),onBlur:()=>B(!1),"aria-label":A?"Confirm terminate session":"Terminate session",className:(0,k.cn)("session-card__control session-card__terminate btn--danger",A&&"is-confirming"),children:A?(0,d.jsx)("span",{className:"font-mono text-[10px] font-semibold tracking-[0.04em]",children:"kill?"}):(0,d.jsxs)("svg",{className:"session-card__control-icon",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:[(0,d.jsx)("path",{d:"M3 6h18"}),(0,d.jsx)("path",{d:"M8 6V4h8v2"}),(0,d.jsx)("path",{d:"M19 6l-1 14H6L5 6"})]})})]})]})]})},function(a,b){return a.session===b.session&&a.onSend===b.onSend&&a.onKill===b.onKill&&a.onMerge===b.onMerge&&a.onRestore===b.onRestore}),r={merge:{label:"Ready",emptyMessage:"Nothing cleared to land yet."},action:{label:"Action",emptyMessage:"No agents need your input."},respond:{label:"Respond",emptyMessage:"No agents need your input."},review:{label:"Review",emptyMessage:"No code waiting for review."},pending:{label:"Pending",emptyMessage:"Nothing blocked."},working:{label:"Working",emptyMessage:"No agents running."},done:{label:"Done",emptyMessage:"No completed sessions."}},s=(0,e.memo)(function({level:a,sessions:b,onSend:c,onKill:f,onMerge:g,onRestore:h,collapsed:i,onToggle:j,compactMobile:k,onPreview:l,resetKey:m}){let n=r[a],o=void 0!==j,[p,s]=(0,e.useState)(!1),u=o&&k&&!p?b.slice(0,5):b,v=b.length-u.length;return o?(0,d.jsxs)("div",{className:`accordion-section${i?" accordion-section--collapsed":" accordion-section--expanded"}`,"data-level":a,children:[(0,d.jsxs)("button",{type:"button",className:"accordion-header",onClick:()=>j(a),"aria-expanded":!i,"aria-controls":`accordion-body-${a}`,children:[(0,d.jsx)("span",{className:"accordion-header__dot","data-level":a}),(0,d.jsx)("span",{className:"accordion-header__label",children:n.label}),(0,d.jsx)("span",{className:"accordion-header__count",children:b.length}),(0,d.jsx)("span",{className:"accordion-header__chevron","aria-hidden":"true",children:"▶"})]}),(0,d.jsx)("div",{id:`accordion-body-${a}`,className:"accordion-body",children:b.length>0?(0,d.jsxs)("div",{className:k?"mobile-session-list":"flex flex-col gap-2 p-3",children:[u.map(b=>k?(0,d.jsx)(t,{session:b,level:a,onPreview:l},b.id):(0,d.jsx)(q,{session:b,onSend:c,onKill:f,onMerge:g,onRestore:h},b.id)),k&&v>0?(0,d.jsxs)("button",{type:"button",className:"mobile-session-list__view-all",onClick:()=>s(!0),children:["View all ",b.length]}):null]}):k?(0,d.jsx)("div",{className:"mobile-session-list",children:(0,d.jsx)("div",{className:"mobile-session-list__empty",children:n.emptyMessage})}):null})]}):(0,d.jsxs)("div",{className:"kanban-column","data-level":a,children:[(0,d.jsx)("div",{className:"kanban-column__header",children:(0,d.jsxs)("div",{className:"kanban-column__title-row",children:[(0,d.jsx)("div",{className:"kanban-column__dot","data-level":a}),(0,d.jsx)("span",{className:"kanban-column__title",children:n.label}),(0,d.jsx)("span",{className:"kanban-column__count",children:b.length})]})}),(0,d.jsx)("div",{className:"kanban-column-body",children:b.length>0?(0,d.jsx)("div",{className:"kanban-column__stack",children:b.map(a=>(0,d.jsx)(q,{session:a,onSend:c,onKill:f,onMerge:g,onRestore:h},a.id))}):null})]})},function(a,b){return a.level===b.level&&a.collapsed===b.collapsed&&a.onToggle===b.onToggle&&a.onSend===b.onSend&&a.onKill===b.onKill&&a.onMerge===b.onMerge&&a.onRestore===b.onRestore&&a.compactMobile===b.compactMobile&&a.onPreview===b.onPreview&&a.resetKey===b.resetKey&&a.sessions.length===b.sessions.length&&a.sessions.every((a,c)=>a===b.sessions[c])});function t({session:a,level:b,onPreview:c}){let e=[a.branch,a.pr?`PR #${a.pr.number}`:null,a.issueLabel].filter(Boolean);return(0,d.jsxs)("div",{className:"mobile-session-row",children:[(0,d.jsxs)("button",{type:"button",className:"mobile-session-row__preview",onClick:()=>c?.(a),"aria-label":`Open ${(0,l.Pn)(a)}`,children:[(0,d.jsxs)("div",{className:"mobile-session-row__line",children:[(0,d.jsx)("span",{className:"mobile-session-row__dot","data-level":b,"aria-hidden":"true"}),(0,d.jsx)("span",{className:"mobile-session-row__title",children:(0,l.Pn)(a)})]}),(0,d.jsx)("div",{className:"mobile-session-row__meta",children:e.length>0?e.join(" \xb7 "):"No branch or PR metadata"})]}),(0,d.jsxs)("div",{className:"mobile-session-row__side",children:[(0,d.jsx)(u,{session:a,level:b}),(0,d.jsx)("a",{href:(0,o.Nc)(a.projectId,a.id),className:"mobile-session-row__open","aria-label":`Go to ${(0,l.Pn)(a)}`,children:(0,d.jsxs)("svg",{className:"mobile-session-row__open-icon",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,d.jsx)("path",{d:"M4 17V7a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2Z"}),(0,d.jsx)("path",{d:"m8 10 2 2-2 2M12 14h4"})]})})]})]})}function u({session:a,level:b}){let c=r[b].label.toLowerCase();if("merge"===b&&a.pr&&(0,j.QN)(a.pr))c="ready";else if("action"===b)c="needs_input"===a.status?"needs input":"stuck"===a.status?"stuck":"errored"===a.status?"errored":"waiting_input"===a.activity?"waiting":"exited"===a.activity?"crashed":"blocked"===a.activity?"blocked":"ci_failed"===a.status?"ci failed":"changes_requested"===a.status?"changes":a.pr?.ciStatus==="failing"?"ci failed":a.pr?.reviewDecision==="changes_requested"?"changes":a.pr&&!a.pr.mergeability.noConflicts?"conflicts":"action";else"respond"===b?c="waiting_input"===a.activity?"waiting":"needs input":"review"===b?c=a.pr?.reviewDecision==="changes_requested"?"changes":"review":"pending"===b?c=a.pr?.unresolvedThreads?"threads":"pending":"working"===b&&(c="idle"===a.activity?"idle":"active");return(0,d.jsx)("span",{className:"mobile-session-row__chip",children:c})}var v=c(18768),w=c(20057),x=c(58976),y=c(31849);let z=["Working","Pending","Review","Respond","Merge"];function A({message:a,orchestratorHref:b,onSpawnOrchestrator:c=null,spawnLabel:e="Spawn Orchestrator",spawnDisabled:f=!1}){return(0,d.jsxs)("div",{className:"board-wrapper",children:[(0,d.jsx)("div",{className:"kanban-ghost","aria-hidden":"true",children:z.map(a=>(0,d.jsx)("div",{className:"kanban-ghost__col",children:(0,d.jsx)("div",{className:"kanban-ghost__head",children:a})},a))}),(0,d.jsx)("div",{className:"board-center",children:(0,d.jsxs)("div",{className:"empty-state",role:"status",children:[(0,d.jsx)("div",{className:"empty-state__icon",children:(0,d.jsxs)("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,d.jsx)("circle",{cx:"12",cy:"5.5",r:"2.5",fill:"rgba(249,115,22,0.18)",stroke:"#f97316",strokeWidth:"1.5"}),(0,d.jsx)("circle",{cx:"5.5",cy:"17",r:"2.5",fill:"var(--color-bg-subtle)",stroke:"var(--color-border-strong)",strokeWidth:"1.5"}),(0,d.jsx)("circle",{cx:"18.5",cy:"17",r:"2.5",fill:"var(--color-bg-subtle)",stroke:"var(--color-border-strong)",strokeWidth:"1.5"}),(0,d.jsx)("line",{x1:"12",y1:"8",x2:"6.7",y2:"14.8",stroke:"rgba(249,115,22,0.22)",strokeWidth:"1",strokeDasharray:"2.5 2"}),(0,d.jsx)("line",{x1:"12",y1:"8",x2:"17.3",y2:"14.8",stroke:"rgba(249,115,22,0.22)",strokeWidth:"1",strokeDasharray:"2.5 2"}),(0,d.jsx)("line",{x1:"7.8",y1:"17",x2:"16.2",y2:"17",stroke:"var(--color-border-subtle)",strokeWidth:"1",strokeDasharray:"2.5 2"})]})}),a?(0,d.jsx)("p",{className:"empty-state__text",children:a}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{className:"empty-state__headline",children:"Ready to orchestrate"}),(0,d.jsx)("p",{className:"empty-state__hint",children:"Open the main orchestrator to start a session and fan out parallel agents across your codebase."}),b?(0,d.jsxs)("a",{href:b,className:"empty-state__cta",children:[(0,d.jsxs)("svg",{width:"12",height:"12",fill:"none",stroke:"currentColor",strokeWidth:"1.6",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,d.jsx)("circle",{cx:"12",cy:"5",r:"2",fill:"currentColor",stroke:"none"}),(0,d.jsx)("path",{d:"M12 7v4M12 11H6M12 11h6M6 11v3M12 11v3M18 11v3"}),(0,d.jsx)("circle",{cx:"6",cy:"17",r:"2"}),(0,d.jsx)("circle",{cx:"12",cy:"17",r:"2"}),(0,d.jsx)("circle",{cx:"18",cy:"17",r:"2"})]}),"Open Orchestrator"]}):c?(0,d.jsxs)("button",{type:"button",className:"empty-state__cta",onClick:c,disabled:f,children:[(0,d.jsxs)("svg",{width:"12",height:"12",fill:"none",stroke:"currentColor",strokeWidth:"1.6",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,d.jsx)("circle",{cx:"12",cy:"5",r:"2",fill:"currentColor",stroke:"none"}),(0,d.jsx)("path",{d:"M12 7v4M12 11H6M12 11h6M6 11v3M12 11v3M18 11v3"}),(0,d.jsx)("circle",{cx:"6",cy:"17",r:"2"}),(0,d.jsx)("circle",{cx:"12",cy:"17",r:"2"}),(0,d.jsx)("circle",{cx:"18",cy:"17",r:"2"})]}),e]}):null]})]})})]})}var B=c(71276);function C({status:a}){return"connected"===a?null:"disconnected"===a?(0,d.jsx)("button",{type:"button",className:"connection-bar connection-bar--disconnected","aria-live":"assertive","aria-atomic":"true",onClick:()=>window.location.reload(),children:"Offline \xb7 tap to retry"}):(0,d.jsx)("div",{className:"connection-bar connection-bar--reconnecting",role:"status","aria-live":"polite","aria-atomic":"true",children:"Reconnecting…"})}let D=[/\bBearer\s+[A-Za-z0-9._\-+/=]+\b/gi,/\bsk-[A-Za-z0-9]{10,}\b/g,/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\b/g];function E({projectId:a}){let{showToast:b}=(0,B.d)(),[c,f]=(0,e.useState)(!1),g=(0,e.useCallback)(async()=>{if(!c){f(!0);try{let c,d=await fetch("/api/observability",{credentials:"same-origin"});if(!d.ok)return void b("Could not fetch observability snapshot","error");let e=d.headers.get("x-correlation-id");try{c=await d.json()}catch{b("Could not parse observability snapshot","error");return}let f=function a(b,c=new WeakSet){if("string"==typeof b)return D.reduce((a,b)=>a.replace(b,"[REDACTED]"),b);if(Array.isArray(b))return b.map(b=>a(b,c));if(b&&"object"==typeof b){if(c.has(b))return"[Circular]";c.add(b);let d={};for(let[e,f]of Object.entries(b))d[e]=a(f,c);return d}return b}(function(a,b){if(!b||!a||"object"!=typeof a)return a;let c={...a},d=c.projects;if(d&&"object"==typeof d&&!Array.isArray(d)){let a=d[b];c.projects=void 0===a?{}:{[b]:a}}return c}(c,a)),g={copiedAt:new Date().toISOString(),pageHref:`${window.location.origin}${window.location.pathname}`,projectId:a??null,correlationId:e,userAgent:navigator.userAgent,observability:f};await navigator.clipboard.writeText(JSON.stringify(g,null,2)),b("Debug bundle copied to clipboard","success")}catch{b("Could not copy debug bundle","error")}finally{f(!1)}}},[c,a,b]);return(0,d.jsxs)("button",{type:"button",className:"orchestrator-btn flex min-h-[44px] min-w-[44px] items-center gap-2 px-4 py-2 text-[12px] font-semibold text-[var(--color-text-secondary)] transition-colors hover:bg-[var(--color-bg-hover)] disabled:opacity-50",onClick:()=>void g(),disabled:c,"aria-label":"Copy debug bundle for issue reports",children:[(0,d.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:[(0,d.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,d.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]}),"Copy debug info"]})}var F=c(70162);let G=["working","pending","action","merge"],H=["working","pending","review","respond","merge"],I=[];function J({session:a,onRestore:b}){let c=!a.summaryIsFallback&&a.summary||a.issueTitle||a.summary||a.id,e=a.pr?.state==="merged"||"merged"===a.status,f="killed"===a.status||"terminated"===a.status,g=!j.N_.has(a.status),h=`done-card__badge ${f?"done-card__badge--terminated":"done-card__badge--merged"}`;return(0,d.jsxs)("div",{className:"done-card",children:[(0,d.jsx)("p",{className:"done-card__title",children:c}),(0,d.jsxs)("div",{className:"done-card__meta",children:[(0,d.jsx)("span",{className:h,children:e?"merged":f?"terminated":"done"}),a.pr?(0,d.jsxs)("a",{href:a.pr.url,target:"_blank",rel:"noopener noreferrer",className:"done-card__pr",onClick:a=>a.stopPropagation(),children:[(0,d.jsxs)("svg",{width:"9",height:"9",fill:"none",stroke:"currentColor",strokeWidth:"1.8",viewBox:"0 0 24 24",children:[(0,d.jsx)("circle",{cx:"18",cy:"18",r:"3"}),(0,d.jsx)("circle",{cx:"6",cy:"6",r:"3"}),(0,d.jsx)("path",{d:"M6 9v3a6 6 0 0 0 6 6h3"})]}),"#",a.pr.number]}):null,(0,d.jsx)("span",{className:"done-card__age",children:function(a){if(!a)return"just now";let b=new Date(a).getTime();if(!Number.isFinite(b))return"just now";let c=Date.now()-b;if(c<=0)return"just now";let d=Math.floor(c/1e3),e=Math.floor(d/60),f=Math.floor(e/60),g=Math.floor(f/24);return d<60?`${d}s ago`:e<60?`${e}m ago`:f<24?`${f}h ago`:`${g}d ago`}(a.lastActivityAt)}),g?(0,d.jsx)("button",{type:"button",className:"done-card__restore",onClick:c=>{c.stopPropagation(),b(a.id)},children:"Restore"}):null]})]})}function K({initialSessions:a,projectId:b,projectName:c,projects:f=[],orchestrators:k,attentionZones:l="simple",dashboardLoadError:m}){let n=(0,x.eT)(),p="detailed"===l?H:G,q=(0,e.useMemo)(()=>{let b={};for(let c of a)b[c.id]=(0,j.ng)(c,l);return b},[a,l]),{sessions:r,attentionLevels:t,liveSessionsResolved:u,loadError:z}=(0,w.D)({initialSessions:a,muxSessions:n?.status==="connected"?n.sessions:void 0,muxLastError:n?.lastError,initialAttentionLevels:q,attentionZones:l}),D=(0,e.useMemo)(()=>b?r.filter(a=>a.projectId===b):r,[r,b]),K=n?.status==="disconnected"?"disconnected":n?.status==="connected"?"connected":"reconnecting",L=z??(m&&u?void 0:m),N=(0,h.useSearchParams)(),O=(0,h.useRouter)(),P=(0,e.useRef)(O);P.current=O;let Q=N.get("session")??void 0,[R,S]=(0,e.useState)(!1),[T,U]=(0,e.useState)(k??I),[V,W]=(0,e.useState)([]),[X,Y]=(0,e.useState)({}),[Z,$]=(0,e.useState)(!1),[_,aa]=(0,e.useState)(!1),ab=(0,i.U)(i.D),ac=N.get("debug"),{showToast:ad}=(0,B.d)(),[ae,af]=(0,e.useState)(!1),ag=(0,e.useRef)(r);ag.current=r;let ah=f.length>1&&void 0===b,ai=(0,e.useMemo)(()=>b?T.find(a=>a.projectId===b)??null:null,[T,b]),aj=ai?(0,o.Nc)(ai.projectId,ai.id):null,ak=!ah&&!!b&&f.some(a=>a.id===b&&!a.resolveError)&&!aj,al=b?f.find(a=>a.id===b)??null:null,am=!!b&&V.includes(b),an=b?X[b]??null:null,ao=(0,e.useMemo)(()=>ah||!Q?D:D.filter(a=>a.id===Q),[D,ah,Q]),ap=(0,e.useMemo)(()=>{let a={merge:[],action:[],respond:[],review:[],pending:[],working:[],done:[]};for(let b of ao)a[(0,j.ng)(b,l)].push(b);return a},[ao,l]),aq=(0,e.useMemo)(()=>{let a=new Map;for(let b of r){let c=a.get(b.projectId);if(c){c.push(b);continue}a.set(b.projectId,[b])}return a},[r]),ar=(0,e.useMemo)(()=>ah?f.map(a=>{let b=aq.get(a.id)??[],c={merge:0,action:0,respond:0,review:0,pending:0,working:0,done:0};for(let a of b)c[(0,j.ng)(a,l)]++;return{project:a,orchestrator:T.find(b=>b.projectId===a.id)??null,sessionCount:b.length,openPRCount:b.filter(a=>a.pr?.state==="open").length,counts:c}}):[],[T,ah,l,f,aq]),as=(0,e.useCallback)(async(a,b)=>{try{let c=await fetch(`/api/sessions/${encodeURIComponent(a)}/send`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:b})});if(!c.ok){let b=await c.text()||"Unknown error";console.error(`Failed to send message to ${a}:`,b),ad(`Send failed: ${b}`,"error");let d=Error(b);throw d.toastShown=!0,d}}catch(b){throw b instanceof Error&&"toastShown"in b&&b.toastShown||(console.error(`Network error sending message to ${a}:`,b),ad("Network error while sending message","error")),b}},[ad]),at=(0,e.useCallback)(async a=>{try{let b=await fetch(`/api/sessions/${encodeURIComponent(a)}/kill`,{method:"POST"});if(b.ok)ad("Session terminated","success");else{let c=await b.text();console.error(`Failed to kill ${a}:`,c),ad(`Terminate failed: ${c}`,"error")}}catch(b){console.error(`Network error killing ${a}:`,b),ad("Network error while terminating session","error")}},[ad]),au=(0,e.useCallback)(a=>{let b=ag.current.find(b=>b.id===a)??null;b&&at(b.id)},[at]),av=(0,e.useCallback)(async a=>{try{let b=await fetch(`/api/prs/${a}/merge`,{method:"POST"});if(b.ok)ad(`PR #${a} merged`,"success");else{let c=await b.text();console.error(`Failed to merge PR #${a}:`,c),ad(`Merge failed: ${c}`,"error");return}}catch(b){console.error(`Network error merging PR #${a}:`,b),ad("Network error while merging PR","error")}},[ad]),aw=(0,e.useCallback)(async a=>{try{let b=await fetch(`/api/sessions/${encodeURIComponent(a)}/restore`,{method:"POST"});if(b.ok)ad("Session restored","success"),P.current.refresh();else{let c=await b.text();console.error(`Failed to restore ${a}:`,c),ad(`Restore failed: ${c}`,"error")}}catch(b){console.error(`Network error restoring ${a}:`,b),ad("Network error while restoring session","error")}},[ad]),ax=async a=>{W(b=>b.includes(a.id)?b:[...b,a.id]),Y(({[a.id]:b,...c})=>c);try{let b=await fetch("/api/orchestrators",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectId:a.id})}),c=await b.json().catch(()=>null);if(!b.ok||!c?.orchestrator)throw Error(c?.error??`Failed to spawn orchestrator for ${a.name}`);let d=c.orchestrator;U(b=>{let c=b.filter(b=>b.projectId!==a.id);return c.push(d),c})}catch(c){let b=c instanceof Error?c.message:"Failed to spawn orchestrator";Y(c=>({...c,[a.id]:b})),console.error(`Failed to spawn orchestrator for ${a.id}:`,c)}finally{W(b=>b.filter(b=>b!==a.id))}},ay=p.some(a=>ap[a].length>0),az=!ah&&!ay&&!L,aA=L?(0,d.jsxs)("div",{className:"dashboard-alert mb-6 flex flex-col gap-1.5 border border-[color-mix(in_srgb,var(--color-status-error)_28%,transparent)] bg-[color-mix(in_srgb,var(--color-status-error)_10%,transparent)] px-3.5 py-2.5 text-[11px] md:mb-4",role:"alert","aria-live":"assertive",children:[(0,d.jsx)("span",{className:"font-semibold text-[var(--color-status-error)]",children:"Orchestrator failed to load"}),(0,d.jsx)("span",{className:"break-words text-[var(--color-text-secondary)]",children:L}),(0,d.jsxs)("span",{className:"text-[var(--color-text-secondary)]",children:["Confirm ",(0,d.jsx)("span",{className:"font-mono text-[10px]",children:"agent-orchestrator.yaml"})," exists and is valid, then run ",(0,d.jsx)("span",{className:"font-mono text-[10px]",children:"ao doctor"})," for diagnostics."]})]}):null,aB=(0,e.useMemo)(()=>r.some(a=>a.pr&&(0,j.fZ)(a.pr)),[r]),aC="agent orchestrator"===c?.trim().toLowerCase()?b??c??(ah?"All projects":"Dashboard"):c??(ah?"All projects":"Dashboard"),aD=!ah&&aC.trim().length>0,aE=()=>{$(a=>!a)};return(0,d.jsx)(F.I.Provider,{value:{onToggleSidebar:aE,mobileSidebarOpen:_},children:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(C,{status:K}),(0,d.jsxs)("div",{className:"dashboard-app-shell",children:[(0,d.jsxs)("header",{className:"dashboard-app-header",children:[(0,d.jsx)("button",{type:"button",className:"dashboard-app-sidebar-toggle",onClick:aE,"aria-label":"Toggle sidebar",children:ab?(0,d.jsx)("svg",{width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,d.jsx)("path",{d:"M4 6h16M4 12h16M4 18h16"})}):(0,d.jsxs)("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"1.75",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,d.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),(0,d.jsx)("path",{d:"M9 3v18"})]})}),(0,d.jsxs)("div",{className:"dashboard-app-header__brand",children:[(0,d.jsx)("span",{className:"dashboard-app-header__brand-dot","aria-hidden":"true"}),(0,d.jsx)("span",{children:"Agent Orchestrator"})]}),aD?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{className:"dashboard-app-header__sep","aria-hidden":"true"}),(0,d.jsx)("span",{className:"dashboard-app-header__project",children:aC})]}):null,ab||"1"!==ac&&"true"!==ac?null:(0,d.jsx)(E,{projectId:b}),(0,d.jsx)("div",{className:"dashboard-app-header__spacer"}),(0,d.jsx)("div",{className:"dashboard-app-header__actions",children:!ah&&aj?(0,d.jsxs)(g(),{href:aj,className:"dashboard-app-btn dashboard-app-btn--amber","aria-label":"Orchestrator",children:[(0,d.jsxs)("svg",{width:"12",height:"12",fill:"none",stroke:"currentColor",strokeWidth:"1.6",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,d.jsx)("circle",{cx:"12",cy:"5",r:"2",fill:"currentColor",stroke:"none"}),(0,d.jsx)("path",{d:"M12 7v4M12 11H6M12 11h6M6 11v3M12 11v3M18 11v3"}),(0,d.jsx)("circle",{cx:"6",cy:"17",r:"2"}),(0,d.jsx)("circle",{cx:"12",cy:"17",r:"2"}),(0,d.jsx)("circle",{cx:"18",cy:"17",r:"2"})]}),"Orchestrator"]}):ak&&al?(0,d.jsxs)("button",{type:"button",className:"dashboard-app-btn dashboard-app-btn--amber","aria-label":"Spawn Orchestrator",onClick:()=>void ax(al),disabled:am,children:[(0,d.jsxs)("svg",{width:"12",height:"12",fill:"none",stroke:"currentColor",strokeWidth:"1.6",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,d.jsx)("circle",{cx:"12",cy:"5",r:"2",fill:"currentColor",stroke:"none"}),(0,d.jsx)("path",{d:"M12 7v4M12 11H6M12 11h6M6 11v3M12 11v3M18 11v3"}),(0,d.jsx)("circle",{cx:"6",cy:"17",r:"2"}),(0,d.jsx)("circle",{cx:"12",cy:"17",r:"2"}),(0,d.jsx)("circle",{cx:"18",cy:"17",r:"2"})]}),am?"Spawning...":"Spawn Orchestrator"]}):null})]}),(0,d.jsxs)("div",{className:`dashboard-shell dashboard-shell--desktop${Z?" dashboard-shell--sidebar-collapsed":""}`,children:[(0,d.jsx)("div",{className:`sidebar-wrapper${_?" sidebar-wrapper--mobile-open":""}`,children:(0,d.jsx)(y.u,{projects:f,sessions:r,orchestrators:T,activeProjectId:b,activeSessionId:Q,collapsed:Z,onToggleCollapsed:()=>$(a=>!a),onMobileClose:()=>aa(!1)})}),_&&(0,d.jsx)("div",{className:"sidebar-mobile-backdrop",onClick:()=>aa(!1)}),(0,d.jsxs)("main",{className:"dashboard-main dashboard-main--desktop",children:[(0,d.jsx)(v.u,{attentionLevels:t,projectName:c}),(0,d.jsxs)("div",{className:"dashboard-main__subhead",children:[(0,d.jsx)("h1",{className:"dashboard-main__title",children:"Dashboard"}),(0,d.jsx)("p",{className:"dashboard-main__subtitle",children:"Live agent sessions, pull requests, and merge status."})]}),(0,d.jsxs)("div",{className:"dashboard-main__body",children:[aA,aB&&!R&&(0,d.jsxs)("div",{className:"dashboard-alert mb-4 flex items-center gap-2.5 border border-[color-mix(in_srgb,var(--color-status-attention)_25%,transparent)] bg-[var(--color-tint-yellow)] px-3.5 py-2.5 text-[11px] text-[var(--color-status-attention)]",children:[(0,d.jsxs)("svg",{className:"h-3.5 w-3.5 shrink-0",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:[(0,d.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,d.jsx)("path",{d:"M12 8v4M12 16h.01"})]}),(0,d.jsx)("span",{className:"flex-1",children:"GitHub API rate limited — PR data (CI status, review state, sizes) may be stale. Will retry automatically on next refresh."}),(0,d.jsx)("button",{onClick:()=>S(!0),className:"ml-1 shrink-0 opacity-60 hover:opacity-100","aria-label":"Dismiss",children:(0,d.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{d:"M18 6 6 18M6 6l12 12"})})})]}),ah&&(0,d.jsx)(M,{overviews:ar,onSpawnOrchestrator:ax,spawningProjectIds:V,spawnErrors:X,attentionZones:l}),!ah&&ay&&(0,d.jsx)("div",{className:"kanban-board-wrap",children:(0,d.jsx)("div",{className:"kanban-board","data-columns":p.length,style:{"--kanban-column-count":p.length},children:p.map(a=>(0,d.jsx)(s,{level:a,sessions:ap[a],onSend:as,onKill:au,onMerge:av,onRestore:aw},a))})}),az?(0,d.jsx)(A,{orchestratorHref:aj,onSpawnOrchestrator:ak&&al?()=>{ax(al)}:null,spawnLabel:am?"Spawning...":"Spawn Orchestrator",spawnDisabled:am}):null,!ah&&an?(0,d.jsx)("p",{className:"mt-3 text-[11px] text-[var(--color-status-error)]",children:an}):null,!ah&&ap.done.length>0&&(0,d.jsxs)("div",{className:"done-bar mt-6",children:[(0,d.jsxs)("button",{type:"button",className:"done-bar__toggle",onClick:()=>af(a=>!a),"aria-expanded":ae,children:[(0,d.jsx)("svg",{className:`done-bar__chevron${ae?" done-bar__chevron--open":""}`,fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,d.jsx)("path",{d:"m9 18 6-6-6-6"})}),(0,d.jsx)("span",{className:"done-bar__label",children:"Done / Terminated"}),(0,d.jsx)("span",{className:"done-bar__count",children:ap.done.length})]}),ae&&(0,d.jsx)("div",{className:"done-bar__cards",children:ap.done.map(a=>(0,d.jsx)(J,{session:a,onRestore:aw},a.id))})]})]})]})]})]})]})})}function L(a){return(0,d.jsx)(B.t,{children:(0,d.jsx)(K,{...a})})}function M({overviews:a,onSpawnOrchestrator:b,spawningProjectIds:c,spawnErrors:e,attentionZones:f}){return(0,d.jsx)("div",{className:"mb-8 grid gap-4 md:grid-cols-2 xl:grid-cols-3",children:a.map(({project:a,orchestrator:h,sessionCount:i,openPRCount:j,counts:k})=>(()=>{let l=!!a.resolveError,m=(0,o.bn)(a.id);return(0,d.jsxs)("section",{className:"border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] p-4",children:[(0,d.jsxs)("div",{className:"mb-4 flex items-start justify-between gap-3",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h2",{className:"text-[14px] font-semibold text-[var(--color-text-primary)]",children:a.name}),(0,d.jsx)("div",{className:"mt-1 text-[11px] text-[var(--color-text-muted)]",children:l?"Config needs repair":(0,d.jsxs)(d.Fragment,{children:[i," active session",1!==i?"s":"",j>0?` \xb7 ${j} open PR${1!==j?"s":""}`:""]})})]}),(0,d.jsx)(g(),{href:m,className:"border border-[var(--color-border-default)] px-3 py-1.5 text-[11px] font-medium text-[var(--color-text-secondary)] hover:bg-[var(--color-bg-hover)] hover:no-underline",children:"Open project"})]}),(0,d.jsxs)("div",{className:"mb-4 flex flex-wrap gap-2",children:[(0,d.jsx)(N,{label:"Merge",value:k.merge,tone:"ready"}),"detailed"===f?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(N,{label:"Respond",value:k.respond,tone:"error"}),(0,d.jsx)(N,{label:"Review",value:k.review,tone:"orange"})]}):(0,d.jsx)(N,{label:"Action",value:k.action,tone:"orange"}),(0,d.jsx)(N,{label:"Pending",value:k.pending,tone:"attention"}),(0,d.jsx)(N,{label:"Working",value:k.working,tone:"working"})]}),(0,d.jsxs)("div",{className:"border-t border-[var(--color-border-subtle)] pt-3",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,d.jsx)("div",{className:"text-[11px] text-[var(--color-text-muted)]",children:l?"Project config could not be resolved":h?"Per-project orchestrator available":"No running orchestrator"}),l?(0,d.jsx)(g(),{href:m,className:"border border-[var(--color-border-default)] px-3 py-1.5 text-[11px] font-semibold text-[var(--color-text-secondary)] hover:bg-[var(--color-bg-hover)] hover:no-underline",children:"Repair project"}):h?(0,d.jsxs)(g(),{href:(0,o.Nc)(h.projectId,h.id),className:"orchestrator-btn flex items-center gap-2 px-3 py-1.5 text-[11px] font-semibold hover:no-underline",children:[(0,d.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-[var(--color-accent)] opacity-80"}),"orchestrator"]}):(0,d.jsx)("button",{type:"button",onClick:()=>void b(a),disabled:c.includes(a.id),className:"orchestrator-btn px-3 py-1.5 text-[11px] font-semibold disabled:cursor-wait disabled:opacity-70",children:c.includes(a.id)?"Spawning...":"Spawn Orchestrator"})]}),e[a.id]?(0,d.jsx)("p",{className:"mt-2 text-[11px] text-[var(--color-status-error)]",children:e[a.id]}):null]})]},a.id)})())})}function N({label:a,value:b,tone:c}){return(0,d.jsxs)("div",{className:"min-w-[78px] border border-[var(--color-border-subtle)] px-2.5 py-2",children:[(0,d.jsx)("div",{className:"text-[10px] uppercase tracking-[0.08em] text-[var(--color-text-tertiary)]",children:a}),(0,d.jsx)("div",{className:"project-metric__value mt-1 text-[18px] font-semibold tabular-nums","data-tone":c,children:b})]})}},70162:(a,b,c)=>{c.d(b,{I:()=>d});let d=(0,c(81115).createContext)(null)}};
@@ -1 +1 @@
1
- "use strict";exports.id=1271,exports.ids=[1271],exports.modules={21271:(a,b,c)=>{c.d(b,{bV:()=>w,Ik:()=>q,g$:()=>v,oc:()=>t,WQ:()=>p,KI:()=>k,cg:()=>o});var d=c(96898),e=c(36269);class f{constructor(a=3e5){this.cache=new Map,this.ttlMs=a,this.cleanupInterval=setInterval(()=>this.evictExpired(),a),this.cleanupInterval.unref&&this.cleanupInterval.unref()}get(a){let b=this.cache.get(a);return b?Date.now()>b.expiresAt?(this.cache.delete(a),null):b.value:null}set(a,b,c){this.cache.set(a,{value:b,expiresAt:Date.now()+(c??this.ttlMs)})}evictExpired(){let a=Date.now();for(let[b,c]of this.cache.entries())a>c.expiresAt&&this.cache.delete(b)}clear(){this.cache.clear(),this.cleanupInterval&&(clearInterval(this.cleanupInterval),this.cleanupInterval=void 0)}size(){return this.cache.size}}var g=c(68544);let h=new f(3e5),i=new f(12e4);function j(a){try{let b=new URL(a);return"http:"===b.protocol||"https:"===b.protocol}catch{return!1}}function k(a,b){let c=b[a.projectId];if(c)return c;let d=Object.entries(b).find(([,b])=>(0,g.G)(a.id,b.sessionPrefix));if(d)return d[1];let e=Object.keys(b)[0];return e?b[e]:void 0}function l(a){return a.replace(/_/g," ")}function m(a,b){return"idle"===a&&"merged_waiting_decision"===b?"merged, waiting decision":"none"===a?"not created":"alive"===a?"alive":"missing"===a?"missing":l(a)}function n(a){return a.attentionLevel=(0,e.ng)(a),a}function o(a){var b;let c=a.agentInfo?.summary,d=c??a.metadata.summary??null;return n({id:a.id,projectId:a.projectId,status:a.status,activity:a.activity,activitySignal:{state:a.activitySignal.state,activity:a.activitySignal.activity,timestamp:a.activitySignal.timestamp?.toISOString()??null,source:a.activitySignal.source,detail:a.activitySignal.detail},lifecycle:function(a){let b=a.lifecycle;return{sessionState:b.session.state,sessionReason:b.session.reason,prState:b.pr.state,prReason:b.pr.reason,runtimeState:b.runtime.state,runtimeReason:b.runtime.reason,session:{state:b.session.state,reason:b.session.reason,label:m(b.session.state,b.session.reason),reasonLabel:l(b.session.reason),startedAt:b.session.startedAt,completedAt:b.session.completedAt,terminatedAt:b.session.terminatedAt,lastTransitionAt:b.session.lastTransitionAt},pr:{state:b.pr.state,reason:b.pr.reason,label:m(b.pr.state,b.pr.reason),reasonLabel:l(b.pr.reason),number:b.pr.number,url:b.pr.url,lastObservedAt:b.pr.lastObservedAt},runtime:{state:b.runtime.state,reason:b.runtime.reason,label:m(b.runtime.state,b.runtime.reason),reasonLabel:l(b.runtime.reason),lastObservedAt:b.runtime.lastObservedAt},legacyStatus:a.status,evidence:a.metadata.lifecycleEvidence??null,detectingAttempts:Number.parseInt(a.metadata.detectingAttempts??"0",10)||0,detectingEscalatedAt:a.metadata.detectingEscalatedAt??null,summary:function(a){let{lifecycle:b}=a;return"detecting"===b.session.state?`Detecting runtime truth (${l(b.session.reason)})`:"merged"===b.pr.state?a.metadata.mergedPendingCleanupSince?"PR merged; worker session will be cleaned up automatically":"PR merged":"closed"===b.pr.state?"PR closed without merge":"ci_failing"===b.pr.reason?"PR is open and CI is failing":"changes_requested"===b.pr.reason?"PR is open with requested changes":"review_pending"===b.pr.reason?"PR is open and waiting on review":`Session ${l(b.session.state)} (${l(b.session.reason)})`}(a),guidance:null}}(a),branch:a.branch,issueId:a.issueId,issueUrl:a.issueId&&j(a.issueId)?a.issueId:null,issueLabel:null,issueTitle:null,userPrompt:a.metadata.userPrompt??null,displayName:a.metadata.displayName??null,summary:d,summaryIsFallback:!!c&&(a.agentInfo?.summaryIsFallback??!1),createdAt:a.createdAt.toISOString(),lastActivityAt:a.lastActivityAt.toISOString(),pr:a.pr?{...{number:(b=a.pr).number,url:b.url,title:b.title,owner:b.owner,repo:b.repo,branch:b.branch,baseBranch:b.baseBranch,isDraft:b.isDraft,state:"open",additions:0,deletions:0,ciStatus:"none",ciChecks:[],reviewDecision:"none",mergeability:{mergeable:!1,ciPassing:!1,approved:!1,noConflicts:!0,blockers:[]},unresolvedThreads:0,unresolvedComments:[],enriched:!1},state:function(a){switch(a){case"merged":return"merged";case"closed":return"closed";default:return"open"}}(a.lifecycle.pr.state)}:null,metadata:a.metadata,agentReportAudit:[]})}function p(a,b){let c=Object.entries(b).map(([a,b])=>b.sessionPrefix??a),e=new Map;for(let f of a){if(!(0,d.tTz)(f,b[f.projectId]?.sessionPrefix??f.projectId,c))continue;let a=e.get(f.projectId);if(!a){e.set(f.projectId,f);continue}let g=(0,d.zi)(a),h=(0,d.zi)(f);if(g!==h){h||e.set(f.projectId,f);continue}let i=a.lastActivityAt?.getTime()??a.createdAt?.getTime()??0,j=f.lastActivityAt?.getTime()??f.createdAt?.getTime()??0;if(j>i){e.set(f.projectId,f);continue}j===i&&f.id.localeCompare(a.id)>0&&e.set(f.projectId,f)}return[...e.values()].map(a=>({id:a.id,projectId:a.projectId,projectName:b[a.projectId]?.name??a.projectId})).sort((a,b)=>a.projectName.localeCompare(b.projectName)||a.id.localeCompare(b.id))}function q(a){if(!a.pr)return!1;let b=function(a){let b=a.prEnrichment;if(!b)return null;try{let c=JSON.parse(b),d={unresolvedThreads:0,unresolvedComments:[]},e=a.prReviewComments;if(e)try{d=JSON.parse(e)}catch{}return{state:c.state??"open",title:c.title??"",additions:c.additions??0,deletions:c.deletions??0,ciStatus:c.ciStatus??"none",ciChecks:(c.ciChecks??[]).map(a=>({name:a.name,status:a.status,url:a.url})),reviewDecision:c.reviewDecision??"none",mergeability:{mergeable:c.mergeable??!1,ciPassing:"passing"===c.ciStatus||"none"===c.ciStatus,approved:"approved"===c.reviewDecision,noConflicts:!c.hasConflicts,blockers:c.blockers??[]},unresolvedThreads:d.unresolvedThreads??0,unresolvedComments:d.unresolvedComments??[]}}catch{return null}}(a.metadata);return!!b&&(a.pr.state=b.state,b.title&&(a.pr.title=b.title),a.pr.additions=b.additions,a.pr.deletions=b.deletions,a.pr.ciStatus=b.ciStatus,a.pr.ciChecks=b.ciChecks,a.pr.reviewDecision=b.reviewDecision,a.pr.mergeability=b.mergeability,a.pr.unresolvedThreads=b.unresolvedThreads,a.pr.unresolvedComments=b.unresolvedComments,a.pr.enriched=!0,n(a),!0)}async function r(a,b,c){if(!a.summary)try{let d=await c.getSessionInfo(b);d?.summary&&(a.summary=d.summary,a.summaryIsFallback=d.summaryIsFallback??!1)}catch{}}async function s(a,b,c){if(!a.issueUrl||!a.issueLabel)return;let d=h.get(a.issueUrl);if(d){a.issueTitle=d;return}if(!i.get(a.issueUrl))try{let d=a.issueLabel.replace(/^#/,""),e=await b.getIssue(d,c);e.title&&(a.issueTitle=e.title,h.set(a.issueUrl,e.title))}catch{i.set(a.issueUrl,!0)}}async function t(a,b,c,d){let{summaryPromises:e}=u(a,b,c,d);await Promise.allSettled(e)}function u(a,b,c,d){let e=a.map(a=>k(a,c.projects));e.forEach((a,c)=>{if(!b[c].issueUrl&&!b[c].issueId||!a?.tracker?.plugin)return;let e=d.get("tracker",a.tracker.plugin);e&&function(a,b,c){let d=a.issueId??a.issueUrl;if(d){if(j(d))a.issueUrl=d;else if(/\s/.test(d))a.issueUrl=null;else if(b.issueUrl)try{let e=b.issueUrl(d,c);e&&j(e)?a.issueUrl=e:console.warn("[enrichSessionIssue] tracker.issueUrl() returned a non-absolute URL",{tracker:b.name,issueReference:d,candidateUrl:e})}catch(a){console.warn("[enrichSessionIssue] tracker.issueUrl() failed",{tracker:b.name,issueReference:d,error:String(a)})}if(a.issueUrl)if(b.issueLabel)try{a.issueLabel=b.issueLabel(a.issueUrl,c)}catch{let b=a.issueUrl.split("/");a.issueLabel=b[b.length-1]||a.issueUrl}else{let b=a.issueUrl.split("/");a.issueLabel=b[b.length-1]||a.issueUrl}}}(b[c],e,a)});let f=a.map((a,f)=>{if(b[f].summary)return Promise.resolve();let g=e[f]?.agent??c.defaults.agent;if(!g)return Promise.resolve();let h=d.get("agent",g);return h?r(b[f],a,h):Promise.resolve()});return{projects:e,summaryPromises:f}}async function v(a,b,c,d){let{projects:e,summaryPromises:f}=u(a,b,c,d),g=e.map((a,c)=>{if(!b[c].issueUrl||!b[c].issueLabel||!a?.tracker?.plugin)return Promise.resolve();let e=d.get("tracker",a.tracker.plugin);return e?s(b[c],e,a):Promise.resolve()});await Promise.allSettled([...f,...g])}function w(a){return{totalSessions:a.length,workingSessions:a.filter(a=>null!==a.activity&&"exited"!==a.activity).length,openPRs:a.filter(a=>a.pr?.state==="open").length,needsReview:a.filter(a=>a.pr&&!a.pr.isDraft&&"pending"===a.pr.reviewDecision).length}}},36269:(a,b,c)=>{c.d(b,{ng:()=>g});var d=c(15407);function e(a){return a.mergeability.blockers.includes("API rate limited or unavailable")}function f(a){return!1===a.enriched}function g(a,b="detailed"){let c=function(a){if(a.lifecycle?"done"===a.lifecycle.sessionState||"terminated"===a.lifecycle.sessionState||"merged"===a.lifecycle.prState:"merged"===a.status||"killed"===a.status||"cleanup"===a.status||"done"===a.status||"terminated"===a.status||a.pr?.state==="merged")return"done";if(a.lifecycle?.prReason==="merge_ready"||a.lifecycle?.prReason==="approved"||"mergeable"===a.status||"approved"===a.status||a.pr&&!f(a.pr)&&a.pr.mergeability.mergeable)return"merge";if(a.lifecycle?.sessionState==="detecting"||a.lifecycle?.sessionState==="needs_input"||a.lifecycle?.sessionState==="stuck"||a.status===d.SB.ERRORED||a.status===d.SB.NEEDS_INPUT||a.status===d.SB.STUCK||a.activity===d.u3.WAITING_INPUT||a.activity===d.u3.BLOCKED||a.activity===d.u3.EXITED)return"respond";if(a.lifecycle?.prReason==="ci_failing"||a.lifecycle?.prReason==="changes_requested"||"ci_failed"===a.status||"changes_requested"===a.status)return"review";if(a.pr&&!e(a.pr)&&!f(a.pr)){let b=a.pr;if(b.ciStatus===d.U1.FAILING||"changes_requested"===b.reviewDecision||!b.mergeability.noConflicts)return"review"}if(a.lifecycle?.prReason==="review_pending"||a.lifecycle?.prReason==="closed_unmerged"||"review_pending"===a.status)return"pending";if(a.pr&&!e(a.pr)&&!f(a.pr)){let b=a.pr;if(!b.isDraft&&b.unresolvedThreads>0||!b.isDraft&&("pending"===b.reviewDecision||"none"===b.reviewDecision))return"pending"}return"working"}(a);return"simple"===b&&("respond"===c||"review"===c)?"action":c}},68544:(a,b,c)=>{c.d(b,{G:()=>d});function d(a,b){return a===b||a.startsWith(`${b}-`)}}};
1
+ "use strict";exports.id=1271,exports.ids=[1271],exports.modules={21271:(a,b,c)=>{c.d(b,{bV:()=>w,Ik:()=>q,g$:()=>v,oc:()=>t,WQ:()=>p,KI:()=>k,cg:()=>o});var d=c(35217),e=c(36269);class f{constructor(a=3e5){this.cache=new Map,this.ttlMs=a,this.cleanupInterval=setInterval(()=>this.evictExpired(),a),this.cleanupInterval.unref&&this.cleanupInterval.unref()}get(a){let b=this.cache.get(a);return b?Date.now()>b.expiresAt?(this.cache.delete(a),null):b.value:null}set(a,b,c){this.cache.set(a,{value:b,expiresAt:Date.now()+(c??this.ttlMs)})}evictExpired(){let a=Date.now();for(let[b,c]of this.cache.entries())a>c.expiresAt&&this.cache.delete(b)}clear(){this.cache.clear(),this.cleanupInterval&&(clearInterval(this.cleanupInterval),this.cleanupInterval=void 0)}size(){return this.cache.size}}var g=c(68544);let h=new f(3e5),i=new f(12e4);function j(a){try{let b=new URL(a);return"http:"===b.protocol||"https:"===b.protocol}catch{return!1}}function k(a,b){let c=b[a.projectId];if(c)return c;let d=Object.entries(b).find(([,b])=>(0,g.G)(a.id,b.sessionPrefix));if(d)return d[1];let e=Object.keys(b)[0];return e?b[e]:void 0}function l(a){return a.replace(/_/g," ")}function m(a,b){return"idle"===a&&"merged_waiting_decision"===b?"merged, waiting decision":"none"===a?"not created":"alive"===a?"alive":"missing"===a?"missing":l(a)}function n(a){return a.attentionLevel=(0,e.ng)(a),a}function o(a){var b;let c=a.agentInfo?.summary,d=c??a.metadata.summary??null;return n({id:a.id,projectId:a.projectId,status:a.status,activity:a.activity,activitySignal:{state:a.activitySignal.state,activity:a.activitySignal.activity,timestamp:a.activitySignal.timestamp?.toISOString()??null,source:a.activitySignal.source,detail:a.activitySignal.detail},lifecycle:function(a){let b=a.lifecycle;return{sessionState:b.session.state,sessionReason:b.session.reason,prState:b.pr.state,prReason:b.pr.reason,runtimeState:b.runtime.state,runtimeReason:b.runtime.reason,session:{state:b.session.state,reason:b.session.reason,label:m(b.session.state,b.session.reason),reasonLabel:l(b.session.reason),startedAt:b.session.startedAt,completedAt:b.session.completedAt,terminatedAt:b.session.terminatedAt,lastTransitionAt:b.session.lastTransitionAt},pr:{state:b.pr.state,reason:b.pr.reason,label:m(b.pr.state,b.pr.reason),reasonLabel:l(b.pr.reason),number:b.pr.number,url:b.pr.url,lastObservedAt:b.pr.lastObservedAt},runtime:{state:b.runtime.state,reason:b.runtime.reason,label:m(b.runtime.state,b.runtime.reason),reasonLabel:l(b.runtime.reason),lastObservedAt:b.runtime.lastObservedAt},legacyStatus:a.status,evidence:a.metadata.lifecycleEvidence??null,detectingAttempts:Number.parseInt(a.metadata.detectingAttempts??"0",10)||0,detectingEscalatedAt:a.metadata.detectingEscalatedAt??null,summary:function(a){let{lifecycle:b}=a;return"detecting"===b.session.state?`Detecting runtime truth (${l(b.session.reason)})`:"merged"===b.pr.state?a.metadata.mergedPendingCleanupSince?"PR merged; worker session will be cleaned up automatically":"PR merged":"closed"===b.pr.state?"PR closed without merge":"ci_failing"===b.pr.reason?"PR is open and CI is failing":"changes_requested"===b.pr.reason?"PR is open with requested changes":"review_pending"===b.pr.reason?"PR is open and waiting on review":`Session ${l(b.session.state)} (${l(b.session.reason)})`}(a),guidance:null}}(a),branch:a.branch,issueId:a.issueId,issueUrl:a.issueId&&j(a.issueId)?a.issueId:null,issueLabel:null,issueTitle:null,userPrompt:a.metadata.userPrompt??null,displayName:a.metadata.displayName??null,summary:d,summaryIsFallback:!!c&&(a.agentInfo?.summaryIsFallback??!1),createdAt:a.createdAt.toISOString(),lastActivityAt:a.lastActivityAt.toISOString(),pr:a.pr?{...{number:(b=a.pr).number,url:b.url,title:b.title,owner:b.owner,repo:b.repo,branch:b.branch,baseBranch:b.baseBranch,isDraft:b.isDraft,state:"open",additions:0,deletions:0,ciStatus:"none",ciChecks:[],reviewDecision:"none",mergeability:{mergeable:!1,ciPassing:!1,approved:!1,noConflicts:!0,blockers:[]},unresolvedThreads:0,unresolvedComments:[],enriched:!1},state:function(a){switch(a){case"merged":return"merged";case"closed":return"closed";default:return"open"}}(a.lifecycle.pr.state)}:null,metadata:a.metadata,agentReportAudit:[]})}function p(a,b){let c=Object.entries(b).map(([a,b])=>b.sessionPrefix??a),e=new Map;for(let f of a){if(!(0,d.tTz)(f,b[f.projectId]?.sessionPrefix??f.projectId,c))continue;let a=e.get(f.projectId);if(!a){e.set(f.projectId,f);continue}let g=(0,d.zi)(a),h=(0,d.zi)(f);if(g!==h){h||e.set(f.projectId,f);continue}let i=a.lastActivityAt?.getTime()??a.createdAt?.getTime()??0,j=f.lastActivityAt?.getTime()??f.createdAt?.getTime()??0;if(j>i){e.set(f.projectId,f);continue}j===i&&f.id.localeCompare(a.id)>0&&e.set(f.projectId,f)}return[...e.values()].map(a=>({id:a.id,projectId:a.projectId,projectName:b[a.projectId]?.name??a.projectId})).sort((a,b)=>a.projectName.localeCompare(b.projectName)||a.id.localeCompare(b.id))}function q(a){if(!a.pr)return!1;let b=function(a){let b=a.prEnrichment;if(!b)return null;try{let c=JSON.parse(b),d={unresolvedThreads:0,unresolvedComments:[]},e=a.prReviewComments;if(e)try{d=JSON.parse(e)}catch{}return{state:c.state??"open",title:c.title??"",additions:c.additions??0,deletions:c.deletions??0,ciStatus:c.ciStatus??"none",ciChecks:(c.ciChecks??[]).map(a=>({name:a.name,status:a.status,url:a.url})),reviewDecision:c.reviewDecision??"none",mergeability:{mergeable:c.mergeable??!1,ciPassing:"passing"===c.ciStatus||"none"===c.ciStatus,approved:"approved"===c.reviewDecision,noConflicts:!c.hasConflicts,blockers:c.blockers??[]},unresolvedThreads:d.unresolvedThreads??0,unresolvedComments:d.unresolvedComments??[]}}catch{return null}}(a.metadata);return!!b&&(a.pr.state=b.state,b.title&&(a.pr.title=b.title),a.pr.additions=b.additions,a.pr.deletions=b.deletions,a.pr.ciStatus=b.ciStatus,a.pr.ciChecks=b.ciChecks,a.pr.reviewDecision=b.reviewDecision,a.pr.mergeability=b.mergeability,a.pr.unresolvedThreads=b.unresolvedThreads,a.pr.unresolvedComments=b.unresolvedComments,a.pr.enriched=!0,n(a),!0)}async function r(a,b,c){if(!a.summary)try{let d=await c.getSessionInfo(b);d?.summary&&(a.summary=d.summary,a.summaryIsFallback=d.summaryIsFallback??!1)}catch{}}async function s(a,b,c){if(!a.issueUrl||!a.issueLabel)return;let d=h.get(a.issueUrl);if(d){a.issueTitle=d;return}if(!i.get(a.issueUrl))try{let d=a.issueLabel.replace(/^#/,""),e=await b.getIssue(d,c);e.title&&(a.issueTitle=e.title,h.set(a.issueUrl,e.title))}catch{i.set(a.issueUrl,!0)}}async function t(a,b,c,d){let{summaryPromises:e}=u(a,b,c,d);await Promise.allSettled(e)}function u(a,b,c,d){let e=a.map(a=>k(a,c.projects));e.forEach((a,c)=>{if(!b[c].issueUrl&&!b[c].issueId||!a?.tracker?.plugin)return;let e=d.get("tracker",a.tracker.plugin);e&&function(a,b,c){let d=a.issueId??a.issueUrl;if(d){if(j(d))a.issueUrl=d;else if(/\s/.test(d))a.issueUrl=null;else if(b.issueUrl)try{let e=b.issueUrl(d,c);e&&j(e)?a.issueUrl=e:console.warn("[enrichSessionIssue] tracker.issueUrl() returned a non-absolute URL",{tracker:b.name,issueReference:d,candidateUrl:e})}catch(a){console.warn("[enrichSessionIssue] tracker.issueUrl() failed",{tracker:b.name,issueReference:d,error:String(a)})}if(a.issueUrl)if(b.issueLabel)try{a.issueLabel=b.issueLabel(a.issueUrl,c)}catch{let b=a.issueUrl.split("/");a.issueLabel=b[b.length-1]||a.issueUrl}else{let b=a.issueUrl.split("/");a.issueLabel=b[b.length-1]||a.issueUrl}}}(b[c],e,a)});let f=a.map((a,f)=>{if(b[f].summary)return Promise.resolve();let g=e[f]?.agent??c.defaults.agent;if(!g)return Promise.resolve();let h=d.get("agent",g);return h?r(b[f],a,h):Promise.resolve()});return{projects:e,summaryPromises:f}}async function v(a,b,c,d){let{projects:e,summaryPromises:f}=u(a,b,c,d),g=e.map((a,c)=>{if(!b[c].issueUrl||!b[c].issueLabel||!a?.tracker?.plugin)return Promise.resolve();let e=d.get("tracker",a.tracker.plugin);return e?s(b[c],e,a):Promise.resolve()});await Promise.allSettled([...f,...g])}function w(a){return{totalSessions:a.length,workingSessions:a.filter(a=>null!==a.activity&&"exited"!==a.activity).length,openPRs:a.filter(a=>a.pr?.state==="open").length,needsReview:a.filter(a=>a.pr&&!a.pr.isDraft&&"pending"===a.pr.reviewDecision).length}}},36269:(a,b,c)=>{c.d(b,{ng:()=>g});var d=c(15407);function e(a){return a.mergeability.blockers.includes("API rate limited or unavailable")}function f(a){return!1===a.enriched}function g(a,b="detailed"){let c=function(a){if(a.lifecycle?"done"===a.lifecycle.sessionState||"terminated"===a.lifecycle.sessionState||"merged"===a.lifecycle.prState:"merged"===a.status||"killed"===a.status||"cleanup"===a.status||"done"===a.status||"terminated"===a.status||a.pr?.state==="merged")return"done";if(a.lifecycle?.prReason==="merge_ready"||a.lifecycle?.prReason==="approved"||"mergeable"===a.status||"approved"===a.status||a.pr&&!f(a.pr)&&a.pr.mergeability.mergeable)return"merge";if(a.lifecycle?.sessionState==="detecting"||a.lifecycle?.sessionState==="needs_input"||a.lifecycle?.sessionState==="stuck"||a.status===d.SB.ERRORED||a.status===d.SB.NEEDS_INPUT||a.status===d.SB.STUCK||a.activity===d.u3.WAITING_INPUT||a.activity===d.u3.BLOCKED||a.activity===d.u3.EXITED)return"respond";if(a.lifecycle?.prReason==="ci_failing"||a.lifecycle?.prReason==="changes_requested"||"ci_failed"===a.status||"changes_requested"===a.status)return"review";if(a.pr&&!e(a.pr)&&!f(a.pr)){let b=a.pr;if(b.ciStatus===d.U1.FAILING||"changes_requested"===b.reviewDecision||!b.mergeability.noConflicts)return"review"}if(a.lifecycle?.prReason==="review_pending"||a.lifecycle?.prReason==="closed_unmerged"||"review_pending"===a.status)return"pending";if(a.pr&&!e(a.pr)&&!f(a.pr)){let b=a.pr;if(!b.isDraft&&b.unresolvedThreads>0||!b.isDraft&&("pending"===b.reviewDecision||"none"===b.reviewDecision))return"pending"}return"working"}(a);return"simple"===b&&("respond"===c||"review"===c)?"action":c}},68544:(a,b,c)=>{c.d(b,{G:()=>d});function d(a,b){return a===b||a.startsWith(`${b}-`)}}};