@made-by-moonlight/athene-web 0.9.2 → 0.10.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 (319) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +241 -219
  3. package/.next/app-path-routes-manifest.json +10 -7
  4. package/.next/build-manifest.json +6 -6
  5. package/.next/prerender-manifest.json +23 -23
  6. package/.next/react-loadable-manifest.json +5 -5
  7. package/.next/required-server-files.json +4 -4
  8. package/.next/routes-manifest.json +16 -0
  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 +9 -9
  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.js.nft.json +1 -1
  21. package/.next/server/app/api/filesystem/browse/route_client-reference-manifest.js +1 -1
  22. package/.next/server/app/api/issues/route.js +1 -1
  23. package/.next/server/app/api/issues/route.js.nft.json +1 -1
  24. package/.next/server/app/api/issues/route_client-reference-manifest.js +1 -1
  25. package/.next/server/app/api/meta/[name]/start/route.js +1 -0
  26. package/.next/server/app/api/meta/[name]/start/route.js.nft.json +1 -0
  27. package/.next/server/app/api/meta/[name]/start/route_client-reference-manifest.js +1 -0
  28. package/.next/server/app/api/meta/route.js +1 -0
  29. package/.next/server/app/api/meta/route.js.nft.json +1 -0
  30. package/.next/server/app/api/meta/route_client-reference-manifest.js +1 -0
  31. package/.next/server/app/api/observability/route.js +1 -1
  32. package/.next/server/app/api/observability/route.js.nft.json +1 -1
  33. package/.next/server/app/api/observability/route_client-reference-manifest.js +1 -1
  34. package/.next/server/app/api/orchestrators/route.js +1 -1
  35. package/.next/server/app/api/orchestrators/route.js.nft.json +1 -1
  36. package/.next/server/app/api/orchestrators/route_client-reference-manifest.js +1 -1
  37. package/.next/server/app/api/projects/[id]/route.js +2 -2
  38. package/.next/server/app/api/projects/[id]/route.js.nft.json +1 -1
  39. package/.next/server/app/api/projects/[id]/route_client-reference-manifest.js +1 -1
  40. package/.next/server/app/api/projects/reload/route.js +1 -1
  41. package/.next/server/app/api/projects/reload/route.js.nft.json +1 -1
  42. package/.next/server/app/api/projects/reload/route_client-reference-manifest.js +1 -1
  43. package/.next/server/app/api/projects/route.js +1 -1
  44. package/.next/server/app/api/projects/route.js.nft.json +1 -1
  45. package/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
  46. package/.next/server/app/api/prs/[id]/merge/route.js +1 -1
  47. package/.next/server/app/api/prs/[id]/merge/route.js.nft.json +1 -1
  48. package/.next/server/app/api/prs/[id]/merge/route_client-reference-manifest.js +1 -1
  49. package/.next/server/app/api/reviews/execute/route.js +1 -1
  50. package/.next/server/app/api/reviews/execute/route.js.nft.json +1 -1
  51. package/.next/server/app/api/reviews/execute/route_client-reference-manifest.js +1 -1
  52. package/.next/server/app/api/reviews/findings/route.js +1 -1
  53. package/.next/server/app/api/reviews/findings/route.js.nft.json +1 -1
  54. package/.next/server/app/api/reviews/findings/route_client-reference-manifest.js +1 -1
  55. package/.next/server/app/api/reviews/route.js +1 -1
  56. package/.next/server/app/api/reviews/route.js.nft.json +1 -1
  57. package/.next/server/app/api/reviews/route_client-reference-manifest.js +1 -1
  58. package/.next/server/app/api/reviews/send/route.js +1 -1
  59. package/.next/server/app/api/reviews/send/route.js.nft.json +1 -1
  60. package/.next/server/app/api/reviews/send/route_client-reference-manifest.js +1 -1
  61. package/.next/server/app/api/runtime/terminal/route.js +1 -1
  62. package/.next/server/app/api/runtime/terminal/route_client-reference-manifest.js +1 -1
  63. package/.next/server/app/api/sessions/[id]/kill/route.js +1 -1
  64. package/.next/server/app/api/sessions/[id]/kill/route.js.nft.json +1 -1
  65. package/.next/server/app/api/sessions/[id]/kill/route_client-reference-manifest.js +1 -1
  66. package/.next/server/app/api/sessions/[id]/message/route.js +1 -1
  67. package/.next/server/app/api/sessions/[id]/message/route.js.nft.json +1 -1
  68. package/.next/server/app/api/sessions/[id]/message/route_client-reference-manifest.js +1 -1
  69. package/.next/server/app/api/sessions/[id]/remap/route.js +1 -1
  70. package/.next/server/app/api/sessions/[id]/remap/route.js.nft.json +1 -1
  71. package/.next/server/app/api/sessions/[id]/remap/route_client-reference-manifest.js +1 -1
  72. package/.next/server/app/api/sessions/[id]/restore/route.js +1 -1
  73. package/.next/server/app/api/sessions/[id]/restore/route.js.nft.json +1 -1
  74. package/.next/server/app/api/sessions/[id]/restore/route_client-reference-manifest.js +1 -1
  75. package/.next/server/app/api/sessions/[id]/route.js +1 -1
  76. package/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -1
  77. package/.next/server/app/api/sessions/[id]/route_client-reference-manifest.js +1 -1
  78. package/.next/server/app/api/sessions/[id]/send/route.js +1 -1
  79. package/.next/server/app/api/sessions/[id]/send/route.js.nft.json +1 -1
  80. package/.next/server/app/api/sessions/[id]/send/route_client-reference-manifest.js +1 -1
  81. package/.next/server/app/api/sessions/patches/route.js +1 -1
  82. package/.next/server/app/api/sessions/patches/route.js.nft.json +1 -1
  83. package/.next/server/app/api/sessions/patches/route_client-reference-manifest.js +1 -1
  84. package/.next/server/app/api/sessions/route.js +1 -1
  85. package/.next/server/app/api/sessions/route.js.nft.json +1 -1
  86. package/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -1
  87. package/.next/server/app/api/setup-labels/route.js +1 -1
  88. package/.next/server/app/api/setup-labels/route.js.nft.json +1 -1
  89. package/.next/server/app/api/setup-labels/route_client-reference-manifest.js +1 -1
  90. package/.next/server/app/api/spawn/route.js +1 -1
  91. package/.next/server/app/api/spawn/route.js.nft.json +1 -1
  92. package/.next/server/app/api/spawn/route_client-reference-manifest.js +1 -1
  93. package/.next/server/app/api/update/route.js +1 -1
  94. package/.next/server/app/api/update/route.js.nft.json +1 -1
  95. package/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
  96. package/.next/server/app/api/verify/route.js +1 -1
  97. package/.next/server/app/api/verify/route.js.nft.json +1 -1
  98. package/.next/server/app/api/verify/route_client-reference-manifest.js +1 -1
  99. package/.next/server/app/api/version/route.js +1 -1
  100. package/.next/server/app/api/version/route.js.nft.json +1 -1
  101. package/.next/server/app/api/version/route_client-reference-manifest.js +1 -1
  102. package/.next/server/app/api/webhooks/[...slug]/route.js +1 -1
  103. package/.next/server/app/api/webhooks/[...slug]/route.js.nft.json +1 -1
  104. package/.next/server/app/api/webhooks/[...slug]/route_client-reference-manifest.js +1 -1
  105. package/.next/server/app/apple-icon/route.js +1 -1
  106. package/.next/server/app/apple-icon/route.js.nft.json +1 -1
  107. package/.next/server/app/apple-icon/route_client-reference-manifest.js +1 -1
  108. package/.next/server/app/apple-icon.body +0 -0
  109. package/.next/server/app/dev/terminal-test/page.js +2 -2
  110. package/.next/server/app/dev/terminal-test/page.js.nft.json +1 -1
  111. package/.next/server/app/dev/terminal-test/page_client-reference-manifest.js +1 -1
  112. package/.next/server/app/dev/terminal-test.html +1 -1
  113. package/.next/server/app/dev/terminal-test.rsc +10 -10
  114. package/.next/server/app/icon/route.js +1 -1
  115. package/.next/server/app/icon/route.js.nft.json +1 -1
  116. package/.next/server/app/icon/route_client-reference-manifest.js +1 -1
  117. package/.next/server/app/icon-192/route.js +1 -1
  118. package/.next/server/app/icon-192/route.js.nft.json +1 -1
  119. package/.next/server/app/icon-192/route_client-reference-manifest.js +1 -1
  120. package/.next/server/app/icon-512/route.js +1 -1
  121. package/.next/server/app/icon-512/route.js.nft.json +1 -1
  122. package/.next/server/app/icon-512/route_client-reference-manifest.js +1 -1
  123. package/.next/server/app/icon.body +0 -0
  124. package/.next/server/app/manifest.webmanifest/route.js +1 -1
  125. package/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  126. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  127. package/.next/server/app/manifest.webmanifest.body +1 -1
  128. package/.next/server/app/meta/[name]/page.js +2 -0
  129. package/.next/server/app/meta/[name]/page.js.nft.json +1 -0
  130. package/.next/server/app/meta/[name]/page_client-reference-manifest.js +1 -0
  131. package/.next/server/app/page.js +2 -2
  132. package/.next/server/app/page.js.nft.json +1 -1
  133. package/.next/server/app/page_client-reference-manifest.js +1 -1
  134. package/.next/server/app/projects/[projectId]/page.js +2 -2
  135. package/.next/server/app/projects/[projectId]/page.js.nft.json +1 -1
  136. package/.next/server/app/projects/[projectId]/page_client-reference-manifest.js +1 -1
  137. package/.next/server/app/projects/[projectId]/sessions/[id]/page.js +2 -2
  138. package/.next/server/app/projects/[projectId]/sessions/[id]/page.js.nft.json +1 -1
  139. package/.next/server/app/projects/[projectId]/sessions/[id]/page_client-reference-manifest.js +1 -1
  140. package/.next/server/app/projects/[projectId]/settings/page.js +2 -2
  141. package/.next/server/app/projects/[projectId]/settings/page.js.nft.json +1 -1
  142. package/.next/server/app/projects/[projectId]/settings/page_client-reference-manifest.js +1 -1
  143. package/.next/server/app/prs/page.js +2 -2
  144. package/.next/server/app/prs/page.js.nft.json +1 -1
  145. package/.next/server/app/prs/page_client-reference-manifest.js +1 -1
  146. package/.next/server/app/review/page.js +2 -2
  147. package/.next/server/app/review/page.js.nft.json +1 -1
  148. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  149. package/.next/server/app/reviews/page.js +2 -2
  150. package/.next/server/app/reviews/page.js.nft.json +1 -1
  151. package/.next/server/app/reviews/page_client-reference-manifest.js +1 -1
  152. package/.next/server/app/sessions/[id]/page.js +2 -2
  153. package/.next/server/app/sessions/[id]/page.js.nft.json +1 -1
  154. package/.next/server/app/sessions/[id]/page_client-reference-manifest.js +1 -1
  155. package/.next/server/app/test-direct/page.js +2 -2
  156. package/.next/server/app/test-direct/page.js.nft.json +1 -1
  157. package/.next/server/app/test-direct/page_client-reference-manifest.js +1 -1
  158. package/.next/server/app/test-direct.html +1 -1
  159. package/.next/server/app/test-direct.rsc +10 -10
  160. package/.next/server/app-paths-manifest.json +10 -7
  161. package/.next/server/chunks/1215.js +1 -1
  162. package/.next/server/chunks/1271.js +1 -1
  163. package/.next/server/chunks/1351.js +3 -0
  164. package/.next/server/chunks/1612.js +1 -0
  165. package/.next/server/chunks/2899.js +1 -1
  166. package/.next/server/chunks/5053.js +1 -1
  167. package/.next/server/chunks/5684.js +942 -0
  168. package/.next/server/chunks/6148.js +2 -2
  169. package/.next/server/chunks/{4033.js → 6319.js} +1 -1
  170. package/.next/server/chunks/7486.js +3 -3
  171. package/.next/server/chunks/9472.js +102 -40
  172. package/.next/server/middleware-build-manifest.js +1 -1
  173. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  174. package/.next/server/next-font-manifest.js +1 -1
  175. package/.next/server/next-font-manifest.json +1 -1
  176. package/.next/server/pages/404.html +1 -1
  177. package/.next/server/pages/500.html +1 -1
  178. package/.next/server/server-reference-manifest.json +1 -1
  179. package/.next/static/TSIgyOuEpSp86lKtHn-Y4/_buildManifest.js +1 -0
  180. package/.next/static/chunks/1089-89713836690dc384.js +1 -0
  181. package/.next/static/chunks/{9876-de0c5a1a319b4e8e.js → 1145-b66ea7e0df4f6842.js} +1 -1
  182. package/.next/static/chunks/1160-0ae37be89137bb48.js +1 -0
  183. package/.next/static/chunks/{2073-4192de0bb00cc993.js → 2554-dbb4cd7dd7f11245.js} +1 -1
  184. package/.next/static/chunks/3764.9c44a4ac0ede4088.js +1 -0
  185. package/.next/static/chunks/5204.0d460c9e7de8b015.js +1 -0
  186. package/.next/static/chunks/8759-2ef1cec1061e251a.js +1 -0
  187. package/.next/static/chunks/9531-6d130ea1232ee102.js +1 -0
  188. package/.next/static/chunks/app/_not-found/page-5634011a1475aa0d.js +1 -0
  189. package/.next/static/chunks/app/api/backlog/route-5634011a1475aa0d.js +1 -0
  190. package/.next/static/chunks/app/api/browse-directory/route-5634011a1475aa0d.js +1 -0
  191. package/.next/static/chunks/app/api/filesystem/browse/route-5634011a1475aa0d.js +1 -0
  192. package/.next/static/chunks/app/api/issues/route-5634011a1475aa0d.js +1 -0
  193. package/.next/static/chunks/app/api/meta/[name]/start/route-5634011a1475aa0d.js +1 -0
  194. package/.next/static/chunks/app/api/meta/route-5634011a1475aa0d.js +1 -0
  195. package/.next/static/chunks/app/api/observability/route-5634011a1475aa0d.js +1 -0
  196. package/.next/static/chunks/app/api/orchestrators/route-5634011a1475aa0d.js +1 -0
  197. package/.next/static/chunks/app/api/projects/[id]/route-5634011a1475aa0d.js +1 -0
  198. package/.next/static/chunks/app/api/projects/reload/route-5634011a1475aa0d.js +1 -0
  199. package/.next/static/chunks/app/api/projects/route-5634011a1475aa0d.js +1 -0
  200. package/.next/static/chunks/app/api/prs/[id]/merge/route-5634011a1475aa0d.js +1 -0
  201. package/.next/static/chunks/app/api/reviews/execute/route-5634011a1475aa0d.js +1 -0
  202. package/.next/static/chunks/app/api/reviews/findings/route-5634011a1475aa0d.js +1 -0
  203. package/.next/static/chunks/app/api/reviews/route-5634011a1475aa0d.js +1 -0
  204. package/.next/static/chunks/app/api/reviews/send/route-5634011a1475aa0d.js +1 -0
  205. package/.next/static/chunks/app/api/runtime/terminal/route-5634011a1475aa0d.js +1 -0
  206. package/.next/static/chunks/app/api/sessions/[id]/kill/route-5634011a1475aa0d.js +1 -0
  207. package/.next/static/chunks/app/api/sessions/[id]/message/route-5634011a1475aa0d.js +1 -0
  208. package/.next/static/chunks/app/api/sessions/[id]/remap/route-5634011a1475aa0d.js +1 -0
  209. package/.next/static/chunks/app/api/sessions/[id]/restore/route-5634011a1475aa0d.js +1 -0
  210. package/.next/static/chunks/app/api/sessions/[id]/route-5634011a1475aa0d.js +1 -0
  211. package/.next/static/chunks/app/api/sessions/[id]/send/route-5634011a1475aa0d.js +1 -0
  212. package/.next/static/chunks/app/api/sessions/patches/route-5634011a1475aa0d.js +1 -0
  213. package/.next/static/chunks/app/api/sessions/route-5634011a1475aa0d.js +1 -0
  214. package/.next/static/chunks/app/api/setup-labels/route-5634011a1475aa0d.js +1 -0
  215. package/.next/static/chunks/app/api/spawn/route-5634011a1475aa0d.js +1 -0
  216. package/.next/static/chunks/app/api/update/route-5634011a1475aa0d.js +1 -0
  217. package/.next/static/chunks/app/api/verify/route-5634011a1475aa0d.js +1 -0
  218. package/.next/static/chunks/app/api/version/route-5634011a1475aa0d.js +1 -0
  219. package/.next/static/chunks/app/api/webhooks/[...slug]/route-5634011a1475aa0d.js +1 -0
  220. package/.next/static/chunks/app/apple-icon/route-5634011a1475aa0d.js +1 -0
  221. package/.next/static/chunks/app/dev/terminal-test/page-2a26b5fc208a0a35.js +1 -0
  222. package/.next/static/chunks/app/error-362a1ff5db756e6f.js +1 -0
  223. package/.next/static/chunks/app/{global-error-f6bef179169bcdae.js → global-error-ca208f2a552a271f.js} +1 -1
  224. package/.next/static/chunks/app/icon/route-5634011a1475aa0d.js +1 -0
  225. package/.next/static/chunks/app/icon-192/route-5634011a1475aa0d.js +1 -0
  226. package/.next/static/chunks/app/icon-512/route-5634011a1475aa0d.js +1 -0
  227. package/.next/static/chunks/app/layout-3937228484f6c652.js +1 -0
  228. package/.next/static/chunks/app/loading-5634011a1475aa0d.js +1 -0
  229. package/.next/static/chunks/app/manifest.webmanifest/route-5634011a1475aa0d.js +1 -0
  230. package/.next/static/chunks/app/meta/[name]/page-305f42c2c391f520.js +1 -0
  231. package/.next/static/chunks/app/{not-found-cba3f587e1f98dcb.js → not-found-3d7a362f3eaf10aa.js} +1 -1
  232. package/.next/static/chunks/app/page-305f42c2c391f520.js +1 -0
  233. package/.next/static/chunks/app/projects/[projectId]/layout-5634011a1475aa0d.js +1 -0
  234. package/.next/static/chunks/app/projects/[projectId]/loading-5634011a1475aa0d.js +1 -0
  235. package/.next/static/chunks/app/projects/[projectId]/page-daf2aefa15d58404.js +1 -0
  236. package/.next/static/chunks/app/projects/[projectId]/sessions/[id]/page-e3e30f31bc5a683f.js +1 -0
  237. package/.next/static/chunks/app/projects/[projectId]/settings/{page-63572555892d7a61.js → page-804b824af9b9d550.js} +1 -1
  238. package/.next/static/chunks/app/projects/layout-f7f6bc8388761510.js +1 -0
  239. package/.next/static/chunks/app/prs/page-220d66ff3931dad7.js +1 -0
  240. package/.next/static/chunks/app/review/{page-022b2d2c326ff413.js → page-13ec034d995001ab.js} +1 -1
  241. package/.next/static/chunks/app/reviews/page-5634011a1475aa0d.js +1 -0
  242. package/.next/static/chunks/app/sessions/[id]/{error-67c0d27f977a1cc1.js → error-419d086d9f9cee0d.js} +1 -1
  243. package/.next/static/chunks/app/sessions/[id]/loading-5634011a1475aa0d.js +1 -0
  244. package/.next/static/chunks/app/sessions/[id]/{not-found-cba3f587e1f98dcb.js → not-found-3d7a362f3eaf10aa.js} +1 -1
  245. package/.next/static/chunks/app/sessions/[id]/page-9879b78853fe3a80.js +1 -0
  246. package/.next/static/chunks/app/test-direct/{page-8b80ed180c0f2f42.js → page-ca223477414cb95d.js} +1 -1
  247. package/.next/static/chunks/{main-app-162601c3f1c01b19.js → main-app-bd2a1b10332da5d9.js} +1 -1
  248. package/.next/static/chunks/{webpack-f9566aaa604a1b07.js → webpack-cc5626a562806e84.js} +1 -1
  249. package/.next/static/css/0863eb7d19a9924a.css +1 -0
  250. package/.next/static/css/3effacfd2e5df88c.css +1 -0
  251. package/dist-server/mux-websocket.js +46 -25
  252. package/dist-server/single-port-server.js +2 -2
  253. package/dist-server/start-all.js +3 -3
  254. package/package.json +33 -33
  255. package/.next/server/chunks/2347.js +0 -3
  256. package/.next/server/chunks/4148.js +0 -942
  257. package/.next/server/chunks/5689.js +0 -1
  258. package/.next/server/chunks/9493.js +0 -1
  259. package/.next/static/chunks/1089-c6d7995c7c19039a.js +0 -1
  260. package/.next/static/chunks/3764.4c736d9a181489a4.js +0 -1
  261. package/.next/static/chunks/4115-1a4fa80ec67a29d3.js +0 -1
  262. package/.next/static/chunks/5204.7de7e266895bced7.js +0 -1
  263. package/.next/static/chunks/8204-7c7837ed694da99c.js +0 -1
  264. package/.next/static/chunks/8759-490573536f93f85c.js +0 -1
  265. package/.next/static/chunks/9531-a5175e55fa0db48d.js +0 -1
  266. package/.next/static/chunks/app/_not-found/page-6add9dacf1870b4b.js +0 -1
  267. package/.next/static/chunks/app/api/backlog/route-6add9dacf1870b4b.js +0 -1
  268. package/.next/static/chunks/app/api/browse-directory/route-6add9dacf1870b4b.js +0 -1
  269. package/.next/static/chunks/app/api/filesystem/browse/route-6add9dacf1870b4b.js +0 -1
  270. package/.next/static/chunks/app/api/issues/route-6add9dacf1870b4b.js +0 -1
  271. package/.next/static/chunks/app/api/observability/route-6add9dacf1870b4b.js +0 -1
  272. package/.next/static/chunks/app/api/orchestrators/route-6add9dacf1870b4b.js +0 -1
  273. package/.next/static/chunks/app/api/projects/[id]/route-6add9dacf1870b4b.js +0 -1
  274. package/.next/static/chunks/app/api/projects/reload/route-6add9dacf1870b4b.js +0 -1
  275. package/.next/static/chunks/app/api/projects/route-6add9dacf1870b4b.js +0 -1
  276. package/.next/static/chunks/app/api/prs/[id]/merge/route-6add9dacf1870b4b.js +0 -1
  277. package/.next/static/chunks/app/api/reviews/execute/route-6add9dacf1870b4b.js +0 -1
  278. package/.next/static/chunks/app/api/reviews/findings/route-6add9dacf1870b4b.js +0 -1
  279. package/.next/static/chunks/app/api/reviews/route-6add9dacf1870b4b.js +0 -1
  280. package/.next/static/chunks/app/api/reviews/send/route-6add9dacf1870b4b.js +0 -1
  281. package/.next/static/chunks/app/api/runtime/terminal/route-6add9dacf1870b4b.js +0 -1
  282. package/.next/static/chunks/app/api/sessions/[id]/kill/route-6add9dacf1870b4b.js +0 -1
  283. package/.next/static/chunks/app/api/sessions/[id]/message/route-6add9dacf1870b4b.js +0 -1
  284. package/.next/static/chunks/app/api/sessions/[id]/remap/route-6add9dacf1870b4b.js +0 -1
  285. package/.next/static/chunks/app/api/sessions/[id]/restore/route-6add9dacf1870b4b.js +0 -1
  286. package/.next/static/chunks/app/api/sessions/[id]/route-6add9dacf1870b4b.js +0 -1
  287. package/.next/static/chunks/app/api/sessions/[id]/send/route-6add9dacf1870b4b.js +0 -1
  288. package/.next/static/chunks/app/api/sessions/patches/route-6add9dacf1870b4b.js +0 -1
  289. package/.next/static/chunks/app/api/sessions/route-6add9dacf1870b4b.js +0 -1
  290. package/.next/static/chunks/app/api/setup-labels/route-6add9dacf1870b4b.js +0 -1
  291. package/.next/static/chunks/app/api/spawn/route-6add9dacf1870b4b.js +0 -1
  292. package/.next/static/chunks/app/api/update/route-6add9dacf1870b4b.js +0 -1
  293. package/.next/static/chunks/app/api/verify/route-6add9dacf1870b4b.js +0 -1
  294. package/.next/static/chunks/app/api/version/route-6add9dacf1870b4b.js +0 -1
  295. package/.next/static/chunks/app/api/webhooks/[...slug]/route-6add9dacf1870b4b.js +0 -1
  296. package/.next/static/chunks/app/apple-icon/route-6add9dacf1870b4b.js +0 -1
  297. package/.next/static/chunks/app/dev/terminal-test/page-d0132109f9d8524e.js +0 -1
  298. package/.next/static/chunks/app/error-d632d0714b987864.js +0 -1
  299. package/.next/static/chunks/app/icon/route-6add9dacf1870b4b.js +0 -1
  300. package/.next/static/chunks/app/icon-192/route-6add9dacf1870b4b.js +0 -1
  301. package/.next/static/chunks/app/icon-512/route-6add9dacf1870b4b.js +0 -1
  302. package/.next/static/chunks/app/layout-5cac6fe817194d7a.js +0 -1
  303. package/.next/static/chunks/app/loading-6add9dacf1870b4b.js +0 -1
  304. package/.next/static/chunks/app/manifest.webmanifest/route-6add9dacf1870b4b.js +0 -1
  305. package/.next/static/chunks/app/page-cf7bccb75990950d.js +0 -1
  306. package/.next/static/chunks/app/projects/[projectId]/layout-6add9dacf1870b4b.js +0 -1
  307. package/.next/static/chunks/app/projects/[projectId]/loading-6add9dacf1870b4b.js +0 -1
  308. package/.next/static/chunks/app/projects/[projectId]/page-039a93b16089ed57.js +0 -1
  309. package/.next/static/chunks/app/projects/[projectId]/sessions/[id]/page-043b525bedb8f0f7.js +0 -1
  310. package/.next/static/chunks/app/projects/layout-d43b2e38d46221bd.js +0 -1
  311. package/.next/static/chunks/app/prs/page-e447852fbe0c6ee4.js +0 -1
  312. package/.next/static/chunks/app/reviews/page-6add9dacf1870b4b.js +0 -1
  313. package/.next/static/chunks/app/sessions/[id]/loading-6add9dacf1870b4b.js +0 -1
  314. package/.next/static/chunks/app/sessions/[id]/page-863cf8dd2c76d06d.js +0 -1
  315. package/.next/static/css/0c9b7451c2ce7c02.css +0 -1
  316. package/.next/static/css/b4a15f23f468892a.css +0 -1
  317. package/.next/static/pROr0laPuZIdA4NYNygMD/_buildManifest.js +0 -1
  318. package/LICENSE +0 -22
  319. /package/.next/static/{pROr0laPuZIdA4NYNygMD → TSIgyOuEpSp86lKtHn-Y4}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3610],{6815:(e,t,r)=>{Promise.resolve().then(r.bind(r,9333))},7594:(e,t,r)=>{"use strict";var n=r(9582);r.o(n,"useParams")&&r.d(t,{useParams:function(){return n.useParams}}),r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}})},9333:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>j});var n=r(3817),s=r(6749),o=r(7594),a=r(5425),c=r(3916),i=r(9789),l=r(545),u=r(9678),d=r(7387),f=r(4723),h=r(8450),m=r(3394);let p=null;function v(e){if(e instanceof DOMException)return"AbortError"===e.name;if(e instanceof Error){let t=e.message.toLowerCase();return t.includes("aborted")||t.includes("aborterror")}return!1}function g(){return(0,n.jsx)("div",{className:"flex h-full min-h-screen items-center justify-center bg-[var(--color-bg-base)]",children:(0,n.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[(0,n.jsx)("svg",{className:"h-5 w-5 animate-spin text-[var(--color-text-tertiary)]",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M12 3a9 9 0 1 0 9 9"})}),(0,n.jsx)("div",{className:"text-[13px] text-[var(--color-text-tertiary)]",children:"Loading session…"})]})})}function j(){var e;let t=(0,o.useParams)(),r=(0,o.usePathname)(),j=(0,o.useRouter)(),y=t.id,b="string"==typeof t.projectId?t.projectId:void 0,x=(()=>{if("undefined"==typeof sessionStorage)return null;try{let e=sessionStorage.getItem("ao-session-nav:".concat(y));if(e)return sessionStorage.removeItem("ao-session-nav:".concat(y)),JSON.parse(e)}catch(e){}return null})(),[w,E]=(0,s.useState)(x),[k,I]=(0,s.useState)(null),[R,S]=(0,s.useState)(void 0),[P,C]=(0,s.useState)([]),[N,T]=(0,s.useState)(null===x),[M,A]=(0,s.useState)(null),[O,L]=(0,s.useState)(!1),[F,_]=(0,s.useState)(new Map),q=null!=(e=null==w?void 0:w.projectId)?e:null,D=[...F.values()],B=!!w&&(0,a.tT)(w,F.get(w.projectId),D),J=(0,s.useRef)(null),U=(0,s.useRef)(!1),W=(0,s.useRef)(null),G=(0,s.useRef)(new Map),Y=(0,s.useRef)(null!==x),Z=(0,s.useRef)(!1),z=(0,s.useRef)(!1),H=(0,s.useRef)(null),K=(0,s.useRef)(null),Q=(0,s.useRef)(!1),V=(0,s.useRef)(!0),X=(0,f.f)(y);(0,s.useEffect)(()=>{G.current=F},[F]),(0,s.useEffect)(()=>{w?document.title=function(e,t,r){var n;let s=e.id,o=void 0!==r?r:e.activity,c=o&&null!=(n=u.R[o])?n:"",i=[...t.values()],l=(0,a.tT)(e,t.get(e.projectId),i)?"Orchestrator Terminal":function(e,t){let r=Array.from(e);return r.length>40?r.slice(0,40).join("")+"...":e}((0,d.Pn)(e),40);return c?"".concat(c," ").concat(s," | ").concat(l):"".concat(s," | ").concat(l)}(w,F,null==X?void 0:X.activity):document.title="".concat(y," | Session Detail")},[w,y,F,X]),(0,s.useEffect)(()=>{J.current=q},[q]),(0,s.useEffect)(()=>{U.current=B},[B]),(0,s.useEffect)(()=>{w&&P.some(e=>e.id===w.projectId)&&(null==r?void 0:r.startsWith("/projects/"))&&b&&w.projectId!==b&&j.replace((0,h.Nc)(w.projectId,w.id))},[b,r,P,j,w]),(0,s.useEffect)(()=>{B||I(null)},[B]);let $=(0,s.useCallback)(async()=>{p&&(C(p),_(new Map(p.map(e=>{var t;return[e.id,null!=(t=e.sessionPrefix)?t:e.id]}))));try{var e,t;let r=await (0,m.uE)("/api/projects",{timeoutMs:5e3,timeoutMessage:"Projects request timed out after ".concat(5e3,"ms")});if(!(null==r?void 0:r.projects))return;e=p,t=r.projects,e&&e.length===t.length&&e.every((e,r)=>JSON.stringify(e)===JSON.stringify(t[r]))||(p=r.projects,C(r.projects),_(new Map(r.projects.map(e=>{var t;return[e.id,null!=(t=e.sessionPrefix)?t:e.id]}))))}catch(e){console.error("Failed to fetch projects:",e)}},[]),ee=(0,s.useCallback)(async()=>{if(Z.current)return;Z.current=!0;let e=new AbortController;H.current=e;try{let t=await (0,m.uE)("/api/sessions/".concat(encodeURIComponent(y)),{signal:e.signal,timeoutMs:8e3,timeoutMessage:"Session request timed out after ".concat(8e3,"ms")});E(t),A(null),L(!1),Y.current=!0}catch(r){if(Q.current||e.signal.aborted||v(r))return;let t=(r instanceof Error?r.message:"Failed to load session").toLowerCase();if(t.includes("session not found")||t.includes("http 404")){Y.current||L(!0),T(!1);return}console.error("Failed to fetch session:",r),Y.current||A(r instanceof Error?r:Error("Failed to load session"))}finally{Z.current=!1,H.current===e&&(H.current=null),!e.signal.aborted||Y.current?T(!1):V.current&&ee()}},[y]),et=(0,s.useCallback)(async()=>{if(z.current)return;let e=J.current;if(!e)return;let t=U.current,r="".concat(e,":").concat(t?"orchestrator":"worker");if(!t&&W.current===r)return;z.current=!0;let n=new AbortController;K.current=n;try{var s,o,c,i,u;let d=t?"/api/sessions?project=".concat(encodeURIComponent(e),"&fresh=true"):"/api/sessions?project=".concat(encodeURIComponent(e),"&orchestratorOnly=true&fresh=true"),f=await (0,m.uE)(d,{signal:n.signal,timeoutMs:5e3,timeoutMessage:"Project sessions request timed out after ".concat(5e3,"ms")}),h=null!=(c=f.sessions)?c:[],p=null!=(u=null!=(i=f.orchestratorId)?i:null==(o=f.orchestrators)||null==(s=o.find(t=>t.projectId===e))?void 0:s.id)?u:null;if(S(e=>e===p?e:p),!t){W.current=r;return}let v={merge:0,respond:0,review:0,pending:0,working:0,done:0},g=[...G.current.values()];for(let e of h)if(!(0,a.tT)(e,G.current.get(e.projectId),g)){let t=(0,l.ng)(e);if("action"===t)continue;v[t]++}I(v)}catch(e){if(Q.current||n.signal.aborted||v(e))return;console.error("Failed to fetch project sessions:",e)}finally{z.current=!1,K.current===n&&(K.current=null)}},[]);return((0,s.useEffect)(()=>{Promise.all([$(),ee()])},[$,ee]),(0,s.useEffect)(()=>{q&&et()},[et,B,q]),(0,s.useEffect)(()=>{let e=setInterval(()=>{ee(),et()},2e3);return()=>clearInterval(e)},[ee,et]),(0,s.useEffect)(()=>{Q.current=!1;let e=()=>{Q.current=!0};return window.addEventListener("pagehide",e),window.addEventListener("beforeunload",e),()=>{window.removeEventListener("pagehide",e),window.removeEventListener("beforeunload",e)}},[]),(0,s.useEffect)(()=>(V.current=!0,()=>{V.current=!1}),[]),(0,s.useEffect)(()=>()=>{var e,t;null==(e=H.current)||e.abort(),null==(t=K.current)||t.abort()},[]),N)?(0,n.jsx)("div",{className:"dashboard-main--desktop",children:(0,n.jsx)(g,{})}):O?(0,n.jsx)("div",{className:"dashboard-main--desktop",children:(0,n.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,n.jsx)(i.ErrorDisplay,{title:"Session not found",message:"This session is no longer available. It may have been removed, renamed, or already cleaned up.",tone:"not-found",primaryAction:{label:"Back to dashboard",href:b?"/projects/".concat(b):"/"},secondaryAction:{label:"Retry",onClick:()=>void ee()},compact:!0,chrome:"card"})})}):M?(0,n.jsx)("div",{className:"dashboard-main--desktop",children:(0,n.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,n.jsx)(i.ErrorDisplay,{title:"Failed to load session",message:function(e){let t=e.message.toLowerCase();return t.includes("timed out")?"The session request is taking too long. You can retry, or return to the project and reopen a different session.":t.includes("network")?"The session request failed before the dashboard got a response. Check the local server connection and try again.":t.includes("404")?"This session is no longer available. It may have been removed while the page was open.":t.includes("500")?"The server returned an internal error while loading this session. Try again to re-fetch the latest state.":"The dashboard could not load this session cleanly. Try again to re-fetch the latest state."}(M),tone:"error",primaryAction:{label:"Try again",onClick:()=>{A(null),L(!1),T(!0),Promise.all([$(),ee()])}},secondaryAction:{label:"Back to dashboard",href:(null==w?void 0:w.projectId)?"/projects/".concat(w.projectId):"/"},error:M,compact:!0,chrome:"card"})})}):w?(0,n.jsx)(c.G,{session:w,isOrchestrator:B,orchestratorZones:null!=k?k:void 0,projectOrchestratorId:R,projects:P}):(0,n.jsx)("div",{className:"dashboard-main--desktop",children:(0,n.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,n.jsx)(i.ErrorDisplay,{title:"Session unavailable",message:"The backend has not returned this session yet. This can happen right after spawning an orchestrator; retry once the terminal registers the session.",tone:"error",primaryAction:{label:"Retry",onClick:()=>void ee()},secondaryAction:{label:"Back to dashboard",href:b?"/projects/".concat(b):"/"},compact:!0,chrome:"card"})})})}}},e=>{e.O(0,[8713,2073,1089,9876,8759,131,1461,7358],()=>e(e.s=6815)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5998],{904:(e,t,s)=>{"use strict";s.d(t,{ProjectLayoutClient:()=>d});var n=s(3817),r=s(6749),o=s(7594),i=s(5309),l=s(5184),a=s(4115),u=s(2466),c=s(9120);function d(e){let{children:t,initialSessions:s,initialProjects:d,initialOrchestrators:v}=e,f=(0,o.useParams)(),p=(0,o.usePathname)(),h="string"==typeof f.projectId?f.projectId:void 0,m=function(e){var t;if(!e)return;let s=e.match(/\/sessions\/([^/]+)/);return null!=(t=null==s?void 0:s[1])?t:void 0}(p),b=(0,c.U)(c.D),[w,g]=(0,r.useState)(!1),[E,L]=(0,r.useState)(!1);(0,r.useEffect)(()=>{L(!1)},[p]);let y=(0,l.eT)(),{sessions:k,liveSessionsResolved:R}=(0,i.D)({initialSessions:s,muxSessions:(null==y?void 0:y.status)==="connected"?y.sessions:void 0,muxLastError:null==y?void 0:y.lastError,attentionZones:"simple"}),j=(0,r.useCallback)(()=>{b?L(e=>!e):g(e=>!e)},[b]);return(0,n.jsx)(u.I.Provider,{value:{onToggleSidebar:j,mobileSidebarOpen:E},children:(0,n.jsx)("div",{className:"dashboard-app-shell",children:(0,n.jsxs)("div",{className:"dashboard-shell--desktop".concat(w?" dashboard-shell--sidebar-collapsed":""),children:[(0,n.jsx)("div",{className:"sidebar-wrapper".concat(E?" sidebar-wrapper--mobile-open":""),children:(0,n.jsx)(a.u,{projects:d,sessions:k,orchestrators:v,activeProjectId:h,activeSessionId:m,loading:!R,collapsed:w,onToggleCollapsed:()=>g(e=>!e),onMobileClose:()=>L(!1)})}),E&&(0,n.jsx)("div",{className:"sidebar-mobile-backdrop",onClick:()=>L(!1)}),t]})})})}},2036:(e,t,s)=>{Promise.resolve().then(s.bind(s,904))},2466:(e,t,s)=>{"use strict";s.d(t,{I:()=>r,V:()=>o});var n=s(6749);let r=(0,n.createContext)(null);function o(){return(0,n.useContext)(r)}},5309:(e,t,s)=>{"use strict";s.d(t,{D:()=>d});var n=s(6749),r=s(545),o=s(3394);let i=new Set(["merge","action","respond","review","pending","working","done"]),l=new Set(["active","ready","idle","waiting_input","blocked","exited"]),a=new Set(["spawning","working","detecting","pr_open","ci_failed","review_pending","changes_requested","approved","mergeable","merged","cleanup","needs_input","stuck","errored","killed","idle","done","terminated"]);function u(e,t){switch(t.type){case"setLoadError":return e.loadError===t.error?e:{...e,loadError:t.error};case"reset":return{...e,sessions:t.sessions,...t.liveResolved?{liveSessionsResolved:!0,loadError:null}:{},...void 0!==t.attentionLevels?{attentionLevels:t.attentionLevels}:{}};case"snapshot":{let s=new Map(t.patches.map(e=>[e.id,e])),n=!1,r=e.sessions.map(e=>{let t=s.get(e.id);return t&&(e.status!==t.status||e.activity!==t.activity||e.lastActivityAt!==t.lastActivityAt)?(n=!0,{...e,status:a.has(t.status)?t.status:e.status,activity:null!==t.activity&&l.has(t.activity)?t.activity:null,lastActivityAt:t.lastActivityAt}):e}),o={};for(let e of t.patches){if(!i.has(e.attentionLevel)){console.warn("[useSessionEvents] Unknown attentionLevel from server:",e.attentionLevel);continue}o[e.id]=e.attentionLevel}let u=n,c=Object.keys(o).length!==Object.keys(e.attentionLevels).length||t.patches.some(t=>e.attentionLevels[t.id]!==t.attentionLevel);if(!u&&!c){if(e.liveSessionsResolved)return e;return{...e,liveSessionsResolved:!0}}return{...e,sessions:u?r:e.sessions,attentionLevels:c?o:e.attentionLevels,liveSessionsResolved:!0}}}}function c(e){return e.map(e=>e.id).sort().join("\0")}function d(e){let{initialSessions:t,project:s,muxSessions:i,initialAttentionLevels:l,muxLastError:a,disabled:d=!1,attentionZones:v}=e,[f,p]=(0,n.useReducer)(u,{sessions:t,attentionLevels:null!=l?l:{},liveSessionsResolved:!1,loadError:null}),h=(0,n.useRef)(f.sessions),m=(0,n.useRef)(l);m.current=l;let b=(0,n.useRef)(null),w=(0,n.useRef)(null),g=(0,n.useRef)(0),E=(0,n.useRef)(0),L=(0,n.useRef)(null),y=(0,n.useRef)(!1);(0,n.useEffect)(()=>{h.current=f.sessions},[f.sessions]),(0,n.useEffect)(()=>{var e;p({type:"reset",sessions:t,attentionLevels:null!=(e=m.current)?e:{}})},[t]),(0,n.useEffect)(()=>{y.current=!1;let e=()=>{y.current=!0};return window.addEventListener("pagehide",e),window.addEventListener("beforeunload",e),()=>{window.removeEventListener("pagehide",e),window.removeEventListener("beforeunload",e)}},[]);let k=(0,n.useCallback)(()=>{b.current||Date.now()-E.current<500||null===L.current&&(b.current=setTimeout(()=>{if(b.current=null,null!==L.current)return;let e=w.current,t=new AbortController;L.current=t,E.current=Date.now();let n=s?"/api/sessions?project=".concat(encodeURIComponent(s)):"/api/sessions";(0,o.uE)(n,{signal:t.signal,cache:"no-store",timeoutMs:6e3,timeoutMessage:"Dashboard refresh timed out after ".concat(6e3,"ms")}).then(e=>{if(t.signal.aborted||!(null==e?void 0:e.sessions)){t.signal.aborted||(g.current=Date.now());return}g.current=Date.now();let s=Object.fromEntries(e.sessions.map(e=>[e.id,(0,r.ng)(e,v)]));p({type:"reset",sessions:e.sessions,attentionLevels:s,liveResolved:!0})}).catch(e=>{y.current||t.signal.aborted||function(e){if(e instanceof DOMException)return"AbortError"===e.name;if(e instanceof Error){let t=e.message.toLowerCase();return t.includes("aborted")||t.includes("aborterror")}return!1}(e)||(console.warn("[useSessionEvents] refresh failed:",e),g.current=Date.now())}).finally(()=>{if(L.current===t&&(L.current=null),t.signal.aborted){null!==w.current&&k();return}if(null!==w.current&&w.current!==e)return void k();w.current=null})},120))},[s,v]);return(0,n.useEffect)(()=>{d||p({type:"setLoadError",error:null!=a?a:null})},[d,a]),(0,n.useEffect)(()=>{if(d||!i)return;let e=new Set(h.current.map(e=>e.id)),t=i.filter(t=>e.has(t.id)),s=i.some(t=>!e.has(t.id));p({type:"snapshot",patches:t});let n=c(h.current),r=c(t);return s||n!==r?(w.current=r,k()):Date.now()-g.current>=15e3&&k(),()=>{var e;null==(e=L.current)||e.abort(),L.current=null}},[d,i,k]),(0,n.useEffect)(()=>()=>{var e;b.current&&(clearTimeout(b.current),b.current=null),null==(e=L.current)||e.abort(),L.current=null},[]),f}}},e=>{e.O(0,[8713,8204,2073,4115,1089,131,1461,7358],()=>e(e.s=2036)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6450],{1363:(e,s,r)=>{Promise.resolve().then(r.bind(r,6802))},2537:(e,s,r)=>{"use strict";r.d(s,{X:()=>o});var a=r(3817),t=r(8713),l=r.n(t);function o(e){let{ariaLabel:s,activeTab:r,dashboardHref:t,prsHref:o,showOrchestrator:n=!0,orchestratorHref:c=null}=e;return(0,a.jsxs)("nav",{className:"mobile-bottom-nav","aria-label":s,children:[(0,a.jsxs)(l(),{href:t,className:"mobile-bottom-nav__item","data-active":"dashboard"===r?"true":"false","aria-current":"dashboard"===r?"page":void 0,children:[(0,a.jsx)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,a.jsx)("path",{d:"M3 13h8V3H3zm10 8h8V11h-8zM3 21h8v-6H3zm10-10h8V3h-8z"})}),(0,a.jsx)("span",{children:"Dashboard"})]}),(0,a.jsxs)(l(),{href:o,className:"mobile-bottom-nav__item","data-active":"prs"===r?"true":"false","aria-current":"prs"===r?"page":void 0,children:[(0,a.jsx)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,a.jsx)("path",{d:"M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01"})}),(0,a.jsx)("span",{children:"PRs"})]}),n?c?(0,a.jsxs)(l(),{href:c,className:"mobile-bottom-nav__item","data-active":"orchestrator"===r?"true":"false","aria-current":"orchestrator"===r?"page":void 0,children:[(0,a.jsxs)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,a.jsx)("path",{d:"M9 3H5a2 2 0 0 0-2 2v4m16 0V5a2 2 0 0 0-2-2h-4m0 18h4a2 2 0 0 0 2-2v-4M3 15v4a2 2 0 0 0 2 2h4"}),(0,a.jsx)("path",{d:"M9 9h6v6H9z"})]}),(0,a.jsx)("span",{children:"Orchestrator"})]}):(0,a.jsxs)("button",{type:"button",className:"mobile-bottom-nav__item",disabled:!0,children:[(0,a.jsxs)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,a.jsx)("path",{d:"M9 3H5a2 2 0 0 0-2 2v4m16 0V5a2 2 0 0 0-2-2h-4m0 18h4a2 2 0 0 0 2-2v-4M3 15v4a2 2 0 0 0 2 2h4"}),(0,a.jsx)("path",{d:"M9 9h6v6H9z"})]}),(0,a.jsx)("span",{children:"Orchestrator"})]}):null]})}},6802:(e,s,r)=>{"use strict";r.d(s,{PullRequestsPage:()=>g});var a=r(3817),t=r(6749),l=r(7594),o=r(9120),n=r(545),c=r(5309),d=r(5184),i=r(4115),p=r(6004),h=r(7848),m=r(1237),x=r(2537);function b(e,s){return s?"".concat(e,"?project=").concat(encodeURIComponent(s)):"".concat(e,"?project=all")}r(5425);var u=r(8450);let j=[];function v(e){return"open"===e?"Open PRs":"merged"===e?"Merged PRs":"closed"===e?"Closed PRs":"All PRs"}function g(e){let{initialSessions:s,projectId:r,projectName:g,projects:N=[],orchestrators:f,attentionZones:_="simple"}=e,M=null!=f?f:j,k=(0,d.eT)(),y=(0,t.useMemo)(()=>{let e={};for(let r of s)e[r.id]=(0,n.ng)(r,_);return e},[s,_]),{sessions:w,attentionLevels:C}=(0,c.D)({initialSessions:s,project:r,muxSessions:(null==k?void 0:k.status)==="connected"?k.sessions:void 0,initialAttentionLevels:y,attentionZones:_}),P=(0,l.useSearchParams)(),[R,O]=(0,t.useState)(!1),[q,S]=(0,t.useState)(!1),H=(0,o.U)(o.D),z=N.length>1,I=z&&void 0===r,B=(0,t.useMemo)(()=>{var e;return r&&null!=(e=M.find(e=>e.projectId===r))?e:null},[M,r]),[W,T]=(0,t.useState)("all"),V=(0,t.useMemo)(()=>w.filter(e=>!!e.pr).map(e=>e.pr).sort((e,s)=>s.number-e.number),[w]),E=(0,t.useMemo)(()=>V.filter(e=>"open"===e.state),[V]),F=(0,t.useMemo)(()=>V.filter(e=>"merged"===e.state),[V]),G=(0,t.useMemo)(()=>V.filter(e=>"closed"===e.state),[V]),A=r?(0,u.bn)(r):b("/",r),D=b("/prs",r),U=B?(0,u.Nc)(B.projectId,B.id):null,L="open"===W?E:"merged"===W?F:"closed"===W?G:V;return(0,t.useEffect)(()=>{S(!1)},[P]),(0,a.jsxs)("div",{className:"dashboard-shell flex h-screen".concat(!H&&R?" dashboard-shell--sidebar-collapsed":""),children:[z?(0,a.jsx)("div",{className:"sidebar-wrapper".concat(q?" sidebar-wrapper--mobile-open":""),children:(0,a.jsx)(i.u,{projects:N,sessions:w,orchestrators:M,activeProjectId:r,activeSessionId:void 0,collapsed:R,onToggleCollapsed:()=>O(e=>!e),onMobileClose:()=>S(!1)})}):null,q&&(0,a.jsx)("div",{className:"sidebar-mobile-backdrop",onClick:()=>S(!1)}),(0,a.jsxs)("div",{className:"dashboard-main flex-1 overflow-y-auto px-4 py-4 md:px-7 md:py-6",children:[(0,a.jsx)(h.u,{attentionLevels:C,projectName:g?"".concat(g," PRs"):"Pull Requests"}),H?(0,a.jsxs)("section",{className:"mobile-pr-page-header",children:[(0,a.jsxs)("div",{className:"mobile-pr-page-header__top",children:[(0,a.jsxs)("div",{className:"mobile-pr-page-header__title-row",children:[z?(0,a.jsx)("button",{type:"button",className:"mobile-menu-toggle",onClick:()=>S(!0),"aria-label":"Open menu",children:(0,a.jsx)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"h-5 w-5",children:(0,a.jsx)("path",{d:"M4 6h16M4 12h16M4 18h16"})})}):null,(0,a.jsx)("h1",{className:"mobile-pr-page-header__title",children:g?"".concat(g," PRs"):"Pull Requests"})]}),(0,a.jsxs)("div",{className:"mobile-pr-page-header__meta",children:[(0,a.jsx)("span",{className:"mobile-pr-page-header__count",children:V.length}),(0,a.jsx)(p.U,{})]})]}),(0,a.jsxs)("p",{className:"mobile-pr-page-header__subtitle",children:["Open pull requests created by agents",I?" across projects":" in this project","."]})]}):(0,a.jsxs)("section",{className:"dashboard-hero mb-5",children:[(0,a.jsx)("div",{className:"dashboard-hero__backdrop"}),(0,a.jsxs)("div",{className:"dashboard-hero__content",children:[z?(0,a.jsx)("button",{type:"button",className:"mobile-menu-toggle",onClick:()=>S(!0),"aria-label":"Open menu",children:(0,a.jsx)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"h-5 w-5",children:(0,a.jsx)("path",{d:"M4 6h16M4 12h16M4 18h16"})})}):null,(0,a.jsxs)("div",{className:"dashboard-hero__primary",children:[(0,a.jsx)("div",{className:"dashboard-hero__heading",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"dashboard-title",children:g?"".concat(g," PRs"):"Pull Requests"}),(0,a.jsxs)("p",{className:"dashboard-subtitle",children:["Open pull requests created by agents",I?" across all projects":" in this project","."]})]})}),(0,a.jsx)("div",{className:"dashboard-stat-cards dashboard-stat-cards--persist-mobile",children:(0,a.jsxs)("div",{className:"dashboard-stat-card",children:[(0,a.jsx)("span",{className:"dashboard-stat-card__value",children:E.length}),(0,a.jsx)("span",{className:"dashboard-stat-card__label",children:"Open PRs"}),(0,a.jsx)("span",{className:"dashboard-stat-card__meta",children:I?"Across all projects":"In this project"})]})})]})]})]}),(0,a.jsxs)("section",{className:"mx-auto max-w-[900px]",children:[(0,a.jsx)("div",{className:H?"mobile-pr-filter-tabs":"mb-4 flex items-center gap-1.5",children:[{value:"all",label:"All",count:V.length},{value:"open",label:"Open",count:E.length},{value:"merged",label:"Merged",count:F.length},{value:"closed",label:"Closed",count:G.length}].map(e=>{let{value:s,label:r,count:t}=e;return(0,a.jsxs)("button",{type:"button",onClick:()=>T(s),className:H?"mobile-pr-filter-tab":["inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-[11px] font-semibold transition-colors",W===s?"border-[var(--color-border-default)] bg-[var(--color-bg-elevated)] text-[var(--color-text-primary)]":"border-transparent bg-transparent text-[var(--color-text-muted)] hover:text-[var(--color-text-secondary)]"].join(" "),"data-active":H?String(W===s):void 0,children:[r,(0,a.jsx)("span",{className:H?"mobile-pr-filter-tab__count":"rounded-full bg-[var(--color-chip-bg)] px-1.5 py-px text-[9.5px] font-mono text-[var(--color-text-muted)]",children:t})]},s)})}),H?(0,a.jsx)("div",{className:"mobile-pr-mobile-layout",children:"all"===W?(0,a.jsxs)(a.Fragment,{children:[E.length>0&&(0,a.jsxs)("section",{className:"mobile-pr-group","aria-label":"Open pull requests",children:[(0,a.jsxs)("div",{className:"mobile-pr-section-header",children:[(0,a.jsx)("span",{children:"Open"}),(0,a.jsx)("span",{children:E.length})]}),(0,a.jsx)("div",{className:"mobile-pr-list",children:E.map(e=>(0,a.jsx)(m.dG,{pr:e},"".concat(e.owner,"/").concat(e.repo,"-").concat(e.number)))})]}),F.length>0&&(0,a.jsxs)("section",{className:"mobile-pr-group","aria-label":"Merged pull requests",children:[(0,a.jsxs)("div",{className:"mobile-pr-section-header",children:[(0,a.jsx)("span",{children:"Merged"}),(0,a.jsx)("span",{children:F.length})]}),(0,a.jsx)("div",{className:"mobile-pr-list",children:F.map(e=>(0,a.jsx)(m.dG,{pr:e,muted:!0},"".concat(e.owner,"/").concat(e.repo,"-").concat(e.number)))})]}),G.length>0&&(0,a.jsxs)("section",{className:"mobile-pr-group","aria-label":"Closed pull requests",children:[(0,a.jsxs)("div",{className:"mobile-pr-section-header",children:[(0,a.jsx)("span",{children:"Closed"}),(0,a.jsx)("span",{children:G.length})]}),(0,a.jsx)("div",{className:"mobile-pr-list",children:G.map(e=>(0,a.jsx)(m.dG,{pr:e,muted:!0},"".concat(e.owner,"/").concat(e.repo,"-").concat(e.number)))})]}),0===V.length&&(0,a.jsx)("div",{className:"mobile-pr-empty",children:"No pull requests yet."})]}):(0,a.jsxs)("section",{className:"mobile-pr-group","aria-label":v(W),children:[(0,a.jsxs)("div",{className:"mobile-pr-section-header",children:[(0,a.jsx)("span",{children:v(W).replace(" PRs","")}),(0,a.jsx)("span",{children:L.length})]}),(0,a.jsx)("div",{className:"mobile-pr-list",children:L.length>0?L.map(e=>(0,a.jsx)(m.dG,{pr:e,muted:"open"!==W},"".concat(e.owner,"/").concat(e.repo,"-").concat(e.number))):(0,a.jsx)("div",{className:"mobile-pr-empty",children:"No pull requests in this view."})})]})}):(0,a.jsx)("div",{className:"overflow-hidden rounded-[7px] border border-[var(--color-border-subtle)]",children:(0,a.jsxs)("table",{className:"w-full border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"border-b border-[var(--color-border-subtle)] bg-[var(--color-bg-elevated)]",children:[(0,a.jsx)("th",{className:"px-3 py-2 text-left text-[10.5px] font-mono font-500 uppercase tracking-[0.05em] text-[var(--color-text-muted)]",children:"PR"}),(0,a.jsx)("th",{className:"px-3 py-2 text-left text-[10.5px] font-mono font-500 uppercase tracking-[0.05em] text-[var(--color-text-muted)]",children:"Title"}),(0,a.jsx)("th",{className:"px-3 py-2 text-left text-[10.5px] font-mono font-500 uppercase tracking-[0.05em] text-[var(--color-text-muted)]",children:"Size"}),(0,a.jsx)("th",{className:"px-3 py-2 text-left text-[10.5px] font-mono font-500 uppercase tracking-[0.05em] text-[var(--color-text-muted)]",children:"CI"}),(0,a.jsx)("th",{className:"px-3 py-2 text-left text-[10.5px] font-mono font-500 uppercase tracking-[0.05em] text-[var(--color-text-muted)]",children:"Review"}),(0,a.jsx)("th",{className:"px-3 py-2 text-left text-[10.5px] font-mono font-500 uppercase tracking-[0.05em] text-[var(--color-text-muted)]",children:"Threads"})]})}),(0,a.jsxs)("tbody",{children:[("all"===W||"open"===W)&&E.length>0&&(0,a.jsxs)(a.Fragment,{children:["all"===W&&(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:6,className:"border-b border-[var(--color-border-subtle)] bg-[var(--color-bg-base)] px-3 py-1.5 text-[9.5px] font-mono font-semibold uppercase tracking-[0.06em] text-[var(--color-text-muted)]",children:"Open"})}),E.map(e=>(0,a.jsx)(m.j6,{pr:e},"".concat(e.owner,"/").concat(e.repo,"-").concat(e.number)))]}),("all"===W||"merged"===W)&&F.length>0&&(0,a.jsxs)(a.Fragment,{children:["all"===W&&(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:6,className:"border-b border-t border-[var(--color-border-subtle)] bg-[var(--color-bg-base)] px-3 py-1.5 text-[9.5px] font-mono font-semibold uppercase tracking-[0.06em] text-[var(--color-text-muted)]",children:"Merged"})}),F.map(e=>(0,a.jsx)(m.j6,{pr:e,muted:!0},"".concat(e.owner,"/").concat(e.repo,"-").concat(e.number)))]}),("all"===W||"closed"===W)&&G.length>0&&(0,a.jsxs)(a.Fragment,{children:["all"===W&&(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:6,className:"border-b border-t border-[var(--color-border-subtle)] bg-[var(--color-bg-base)] px-3 py-1.5 text-[9.5px] font-mono font-semibold uppercase tracking-[0.06em] text-[var(--color-text-muted)]",children:"Closed"})}),G.map(e=>(0,a.jsx)(m.j6,{pr:e,muted:!0},"".concat(e.owner,"/").concat(e.repo,"-").concat(e.number)))]}),0===V.length&&(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:6,className:"px-4 py-6 text-[12px] text-[var(--color-text-secondary)]",children:"No pull requests yet."})})]})]})})]})]}),H?(0,a.jsx)(x.X,{ariaLabel:"PR navigation",activeTab:"prs",dashboardHref:A,prsHref:D,showOrchestrator:!I,orchestratorHref:U}):null]})}}},e=>{e.O(0,[8713,8204,2073,4115,1089,7008,131,1461,7358],()=>e(e.s=1363)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2437,2438,2564,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2437,2438,2564,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[824],{51:(e,t,r)=>{Promise.resolve().then(r.bind(r,3857))},3857:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>N});var s=r(3817),n=r(6749),a=r(7594),o=r(5425),i=r(3916),l=r(9789),c=r(4115),u=r(9120),d=r(545),h=r(9678),f=r(7387),p=r(4723),v=r(5184),m=r(8450),g=r(3394);let b=null,j=null,y=[1e3,2e3,4e3],x=new Set(Object.values(o.SB)),w=new Set(Object.values(o.u3)),S=new Set;function I(e){if(e instanceof DOMException)return"AbortError"===e.name;if(e instanceof Error){let t=e.message.toLowerCase();return t.includes("aborted")||t.includes("aborterror")}return!1}function k(e){let{message:t}=e;return(0,s.jsx)("div",{className:"project-sidebar h-full",children:(0,s.jsxs)("div",{className:"space-y-3 px-3 py-4",children:[(0,s.jsx)("div",{className:"text-[11px] font-medium uppercase tracking-[0.18em] text-[var(--color-text-tertiary)]",children:"Projects"}),(0,s.jsx)("div",{className:"space-y-2",children:Array.from({length:3},(e,t)=>(0,s.jsx)("div",{className:"h-10 animate-pulse border border-[var(--color-border-subtle)] bg-[var(--color-bg-surface)]"},"sidebar-placeholder-".concat(t)))}),(0,s.jsx)("div",{className:"pt-2 text-[12px] text-[var(--color-text-tertiary)]",children:t})]})})}function E(e){let{projects:t,projectsLoading:r,sidebarSessions:a,sidebarOrchestrators:o,sidebarLoading:i,sidebarError:l,onRetrySidebar:d,activeProjectId:h,activeSessionId:f,children:p}=e,v=(0,u.U)(u.D),[m,g]=(0,n.useState)(!1),[b,j]=(0,n.useState)(!1),y=(0,n.useCallback)(()=>{if(v)return void j(e=>!e);g(e=>!e)},[v]);return(0,s.jsxs)("div",{className:"dashboard-app-shell",children:[(0,s.jsxs)("header",{className:"dashboard-app-header",children:[(0,s.jsx)("button",{type:"button",className:"dashboard-app-sidebar-toggle",onClick:y,"aria-label":"Toggle sidebar",children:v?(0,s.jsx)("svg",{width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,s.jsx)("path",{d:"M4 6h16M4 12h16M4 18h16"})}):(0,s.jsxs)("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"1.75",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,s.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),(0,s.jsx)("path",{d:"M9 3v18"})]})}),(0,s.jsx)("div",{className:"dashboard-app-header__spacer"})]}),(0,s.jsxs)("div",{className:"dashboard-shell dashboard-shell--desktop".concat(m?" dashboard-shell--sidebar-collapsed":""),children:[(0,s.jsx)("div",{className:"sidebar-wrapper".concat(b?" sidebar-wrapper--mobile-open":""),children:t.length>0?(0,s.jsx)(c.u,{projects:t,sessions:a,orchestrators:o,loading:i,error:l,onRetry:d,activeProjectId:h,activeSessionId:f,collapsed:m,onToggleCollapsed:()=>g(e=>!e),onMobileClose:()=>j(!1)}):(0,s.jsx)(k,{message:r?"Loading projects...":"Projects unavailable."})}),b&&(0,s.jsx)("div",{className:"sidebar-mobile-backdrop",onClick:()=>j(!1)}),(0,s.jsx)("div",{className:"dashboard-main dashboard-main--desktop",children:(0,s.jsx)("main",{className:"session-detail-page flex-1 min-h-0 flex flex-col bg-[var(--color-bg-base)]",children:(0,s.jsx)("div",{className:"flex-1 min-h-0",children:p})})})]})]})}function C(e,t){if(!e||0===t.length)return e;let r=new Map(t.map(e=>[e.id,e])),s=!1,n=e.map(e=>{var t,n;let a=r.get(e.id);if(!a)return e;if(t=a.status,!x.has(t)){let t="status:".concat(a.status);return S.has(t)||(S.add(t),console.warn("Ignoring mux session patch with unknown status",{sessionId:a.id,status:a.status})),e}if(null!==a.activity&&(n=a.activity,!w.has(n))){let t="activity:".concat(a.activity);return S.has(t)||(S.add(t),console.warn("Ignoring mux session patch with unknown activity",{sessionId:a.id,activity:a.activity})),e}return e.status===a.status&&e.activity===a.activity&&e.lastActivityAt===a.lastActivityAt?e:(s=!0,{...e,status:a.status,activity:a.activity,lastActivityAt:a.lastActivityAt})});return s?n:e}function N(){var e,t,r;let c=(0,a.useParams)(),u=(0,a.usePathname)(),x=(0,a.useRouter)(),w=c.id,S="string"==typeof c.projectId?c.projectId:Array.isArray(c.projectId)?c.projectId[0]:null,k=(0,v.eT)(),N=(()=>{if("undefined"==typeof sessionStorage)return null;try{let e=sessionStorage.getItem("ao-session-nav:".concat(w));if(e)return sessionStorage.removeItem("ao-session-nav:".concat(w)),JSON.parse(e)}catch(e){}return null})(),[R,A]=(0,n.useState)(N),[M,T]=(0,n.useState)(null),[L,O]=(0,n.useState)(void 0),[P,D]=(0,n.useState)([]),[_,B]=(0,n.useState)(null===b),[F,q]=(0,n.useState)(()=>j),[J,W]=(0,n.useState)(void 0),[U,z]=(0,n.useState)(null===N),[G,Y]=(0,n.useState)(null),[Z,H]=(0,n.useState)(!1),[K,Q]=(0,n.useState)(!1),[V,X]=(0,n.useState)(new Map),$=null!=(e=null==R?void 0:R.projectId)?e:null,ee=[...V.values()],et=!!R&&(0,o.tT)(R,V.get(R.projectId),ee),er=(0,n.useRef)(null),es=(0,n.useRef)(!1),en=(0,n.useRef)(null),ea=(0,n.useRef)(new Map),eo=(0,n.useRef)(null!==N),ei=(0,n.useRef)(null),el=(0,n.useRef)(!1),ec=(0,n.useRef)(!1),eu=(0,n.useRef)(!1),ed=(0,n.useRef)(null),eh=(0,n.useRef)(null),ef=(0,n.useRef)(null),ep=(0,n.useRef)(!1),ev=(0,n.useRef)(0),em=(0,n.useRef)(null),eg=(0,n.useRef)(null),eb=(0,n.useCallback)(()=>{eg.current&&(clearTimeout(eg.current),eg.current=null)},[]),ej=(0,n.useCallback)(()=>{ev.current=0,em.current=null,eb()},[eb]);(0,n.useEffect)(()=>{ea.current=V},[V]);let ey=(0,n.useCallback)(async()=>{b&&(D(b),X(new Map(b.map(e=>{var t;return[e.id,null!=(t=e.sessionPrefix)?t:e.id]}))),B(!1));try{var e,t;let r=await (0,g.uE)("/api/projects",{timeoutMs:5e3,timeoutMessage:"Projects request timed out after ".concat(5e3,"ms")});if(!(null==r?void 0:r.projects))return;e=b,t=r.projects,e&&e.length===t.length&&e.every((e,r)=>{let s=t[r];return JSON.stringify(e)===JSON.stringify(s)})||(b=r.projects,D(r.projects),X(new Map(r.projects.map(e=>{var t;return[e.id,null!=(t=e.sessionPrefix)?t:e.id]}))))}catch(e){console.error("Failed to fetch projects:",e)}finally{B(!1)}},[]),ex=(0,p.f)(w);(0,n.useEffect)(()=>{R?document.title=function(e,t,r){var s;let n,a=e.id,i=void 0!==r?r:e.activity,l=i&&null!=(s=h.R[i])?s:"",c=[...t.values()];return n=(0,o.tT)(e,t.get(e.projectId),c)?"Orchestrator Terminal":function(e,t){let r=Array.from(e);return r.length>40?r.slice(0,40).join("")+"...":e}((0,f.Pn)(e),40),l?"".concat(l," ").concat(a," | ").concat(n):"".concat(a," | ").concat(n)}(R,V,null==ex?void 0:ex.activity):document.title="".concat(w," | Session Detail")},[R,w,V,ex]),(0,n.useEffect)(()=>{er.current=$},[$]),(0,n.useEffect)(()=>{if(R&&P.some(e=>e.id===R.projectId)){if(null==u?void 0:u.startsWith("/sessions/"))return void x.replace((0,m.Nc)(R.projectId,R.id));(null==u?void 0:u.startsWith("/projects/"))&&S&&R.projectId!==S&&x.replace((0,m.Nc)(R.projectId,R.id))}},[S,u,P,x,R]),(0,n.useEffect)(()=>{es.current=et},[et]);let ew=(0,n.useCallback)(async()=>{if(el.current)return;el.current=!0;let e=new AbortController;ed.current=e;let t=!1;try{let t=await (0,g.uE)("/api/sessions/".concat(encodeURIComponent(w)),{signal:e.signal,timeoutMs:8e3,timeoutMessage:"Session request timed out after ".concat(8e3,"ms")});A(t),Y(null),H(!1),eo.current=!0,ej()}catch(s){if(ep.current||e.signal.aborted)return;let r=(s instanceof Error?s.message:"Failed to load session").toLowerCase();if(r.includes("session not found")||r.includes("http 404")){eo.current||H(!0),z(!1),ej();return}if(!eo.current&&function(e){if(I(e))return!0;if(e instanceof Error){let t=e.message.toLowerCase();return t.includes("timed out")||t.includes("network")||t.includes("failed to fetch")}return!1}(s)){let e=ev.current+1;ev.current=e,null!=em.current||(em.current=Date.now());let r=Date.now()-em.current;if(e<4&&r<3e4){let r=y[Math.min(e-1,y.length-1)];t=!0,z(!0),console.warn("Session fetch failed transiently; retrying",{sessionId:w,failureCount:e,retryInMs:r,error:s}),eb(),eg.current=setTimeout(()=>{eg.current=null,ew()},r);return}}console.error("Failed to fetch session:",s),eo.current||Y(s instanceof Error?s:Error("Failed to load session"))}finally{t||z(!1),el.current=!1,ed.current===e&&(ed.current=null)}},[eb,w,ej]),eS=(0,n.useCallback)(async()=>{if(ec.current)return;let e=er.current;if(!e)return;let t=es.current,r="".concat(e,":").concat(t?"orchestrator":"worker");if(!t&&en.current===r)return;ec.current=!0;let s=new AbortController;eh.current=s;try{var n,a,i,l,c;let u=t?"/api/sessions?project=".concat(encodeURIComponent(e),"&fresh=true"):"/api/sessions?project=".concat(encodeURIComponent(e),"&orchestratorOnly=true&fresh=true"),h=await (0,g.uE)(u,{signal:s.signal,timeoutMs:5e3,timeoutMessage:"Project sessions request timed out after ".concat(5e3,"ms")}),f=null!=(i=h.sessions)?i:[],p=null!=(c=null!=(l=h.orchestratorId)?l:null==(a=h.orchestrators)||null==(n=a.find(t=>t.projectId===e))?void 0:n.id)?c:null;if(O(e=>e===p?e:p),!t){en.current=r;return}let v={merge:0,respond:0,review:0,pending:0,working:0,done:0},m=[...ea.current.values()];for(let e of f)if(!(0,o.tT)(e,ea.current.get(e.projectId),m)){let t=(0,d.ng)(e);if("action"===t)continue;v[t]++}T(v)}catch(e){if(ep.current||s.signal.aborted||I(e))return;console.error("Failed to fetch project sessions:",e)}finally{ec.current=!1,eh.current===s&&(eh.current=null)}},[]),eI=(0,n.useCallback)(async()=>{if(eu.current)return;eu.current=!0;let e=new AbortController;ef.current=e;try{var t,r,s;let n=await (0,g.uE)("/api/sessions?fresh=true",{signal:e.signal,timeoutMs:5e3,timeoutMessage:"Sidebar sessions request timed out after ".concat(5e3,"ms")}),a=null!=(t=null==n?void 0:n.sessions)?t:[],o=null!=(s=C(a,null!=(r=ei.current)?r:[]))?s:a;j=o,W(null==n?void 0:n.orchestrators),Q(!1),q(e=>e&&e.length===o.length&&e.every((e,t)=>{let r=o[t];return JSON.stringify(e)===JSON.stringify(r)})?e:o)}catch(t){if(ep.current||e.signal.aborted||I(t))return;console.error("Failed to fetch sidebar sessions:",t),Q(!0),q(e=>null===e?[]:e)}finally{eu.current=!1,ef.current===e&&(ef.current=null)}},[]);return((0,n.useEffect)(()=>{if(!(null==k?void 0:k.sessions))return;if("connected"!==k.status){ei.current=null;return}ei.current=k.sessions;let e=C(j,k.sessions);if(e!==j&&(j=e,q(e)),0===k.sessions.length||!j)return;let t=new Set(j.map(e=>e.id)),r=new Set(k.sessions.map(e=>e.id));if(t.size!==r.size)return void eI();for(let e of r)if(!t.has(e))return void eI()},[eI,null==k?void 0:k.sessions,null==k?void 0:k.status]),(0,n.useEffect)(()=>{et||T(null)},[et]),(0,n.useEffect)(()=>{Promise.all([ey(),ew(),eI()])},[ey,ew,eI]),(0,n.useEffect)(()=>{$&&eS()},[eS,et,$]),(0,n.useEffect)(()=>{let e=setInterval(()=>{ew(),eS(),eI()},2e3);return()=>clearInterval(e)},[ew,eS,eI]),(0,n.useEffect)(()=>{ep.current=!1;let e=()=>{ep.current=!0};return window.addEventListener("pagehide",e),window.addEventListener("beforeunload",e),()=>{window.removeEventListener("pagehide",e),window.removeEventListener("beforeunload",e)}},[]),(0,n.useEffect)(()=>()=>{var e,t,r;eb(),null==(e=ed.current)||e.abort(),null==(t=eh.current)||t.abort(),null==(r=ef.current)||r.abort()},[eb]),U)?(0,s.jsx)(E,{projects:P,projectsLoading:_,sidebarSessions:F,sidebarOrchestrators:J,sidebarLoading:null===F,sidebarError:K,onRetrySidebar:eI,activeProjectId:null!=S?S:void 0,activeSessionId:w,children:(0,s.jsx)("div",{className:"flex h-full min-h-screen items-center justify-center bg-[var(--color-bg-base)]",children:(0,s.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[(0,s.jsx)("svg",{className:"h-5 w-5 animate-spin text-[var(--color-text-tertiary)]",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{d:"M12 3a9 9 0 1 0 9 9"})}),(0,s.jsx)("div",{className:"text-[13px] text-[var(--color-text-tertiary)]",children:"Loading session…"})]})})}):Z?(0,s.jsx)(E,{projects:P,projectsLoading:_,sidebarSessions:F,sidebarOrchestrators:J,sidebarLoading:null===F,sidebarError:K,onRetrySidebar:eI,activeProjectId:null!=S?S:void 0,activeSessionId:w,children:(0,s.jsx)(l.ErrorDisplay,{title:"Session not found",message:"This session is no longer available. It may have been removed, renamed, or already cleaned up.",tone:"not-found",primaryAction:{label:"Back to dashboard",href:S?"/projects/".concat(S):"/"},secondaryAction:{label:"Retry",onClick:()=>void ew()},compact:!0,chrome:"card"})}):G?(0,s.jsx)(E,{projects:P,projectsLoading:_,sidebarSessions:F,sidebarOrchestrators:J,sidebarLoading:null===F,sidebarError:K,onRetrySidebar:eI,activeProjectId:null!=(r=null!=(t=null==R?void 0:R.projectId)?t:S)?r:void 0,activeSessionId:w,children:(0,s.jsx)(l.ErrorDisplay,{title:"Failed to load session",message:function(e){let t=e.message.toLowerCase();return t.includes("timed out")?"The session request is taking too long, so the page stopped waiting instead of spinning forever. You can retry, or return to the project and reopen a different session.":t.includes("network")?"The session request failed before the dashboard got a response. Check the local server connection and try again.":t.includes("404")?"This session is no longer available. It may have been removed while the page was open.":t.includes("500")?"The server returned an internal error while loading this session. Try again to re-fetch the latest state.":"The dashboard could not load this session cleanly. Try again to re-fetch the latest state."}(G),tone:"error",primaryAction:{label:"Try again",onClick:()=>{Y(null),H(!1),z(!0),ej(),Promise.all([ey(),ew(),eI()])}},secondaryAction:{label:"Back to dashboard",href:(null==R?void 0:R.projectId)?"/projects/".concat(R.projectId):"/"},error:G,compact:!0,chrome:"card"})}):R?(0,s.jsx)(i.G,{session:R,isOrchestrator:et,orchestratorZones:null!=M?M:void 0,projectOrchestratorId:L,projects:P}):(0,s.jsx)(E,{projects:P,projectsLoading:_,sidebarSessions:F,sidebarOrchestrators:J,sidebarLoading:null===F,sidebarError:K,onRetrySidebar:eI,activeProjectId:null!=S?S:void 0,activeSessionId:w,children:(0,s.jsx)(l.ErrorDisplay,{title:"Session unavailable",message:"The backend has not returned this session yet. This can happen right after spawning an orchestrator; retry once the terminal registers the session.",tone:"error",primaryAction:{label:"Retry",onClick:()=>void ew()},secondaryAction:{label:"Back to dashboard",href:S?"/projects/".concat(S):"/"},compact:!0,chrome:"card"})})}}},e=>{e.O(0,[8713,8204,2073,4115,1089,9876,8759,131,1461,7358],()=>e(e.s=51)),_N_E=e.O()}]);