@mndrk/agx 2.4.4 → 2.4.6

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 (1311) hide show
  1. package/README.md +14 -17
  2. package/cloud-runtime/standalone/apps/local/.next/BUILD_ID +1 -1
  3. package/cloud-runtime/standalone/apps/local/.next/app-path-routes-manifest.json +17 -0
  4. package/cloud-runtime/standalone/apps/local/.next/build-manifest.json +6 -6
  5. package/cloud-runtime/standalone/apps/local/.next/prerender-manifest.json +27 -3
  6. package/cloud-runtime/standalone/apps/local/.next/routes-manifest.json +114 -1
  7. package/cloud-runtime/standalone/apps/local/.next/server/app/_global-error/page/build-manifest.json +4 -4
  8. package/cloud-runtime/standalone/apps/local/.next/server/app/_global-error/page.js +1 -1
  9. package/cloud-runtime/standalone/apps/local/.next/server/app/_global-error/page.js.nft.json +1 -1
  10. package/cloud-runtime/standalone/apps/local/.next/server/app/_global-error.html +2 -2
  11. package/cloud-runtime/standalone/apps/local/.next/server/app/_global-error.rsc +1 -1
  12. package/cloud-runtime/standalone/apps/local/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  13. package/cloud-runtime/standalone/apps/local/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  14. package/cloud-runtime/standalone/apps/local/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  15. package/cloud-runtime/standalone/apps/local/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  16. package/cloud-runtime/standalone/apps/local/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  17. package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found/page/build-manifest.json +4 -4
  18. package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found/page.js +1 -1
  19. package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found/page.js.nft.json +1 -1
  20. package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  21. package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found.html +2 -2
  22. package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found.rsc +2 -2
  23. package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  24. package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  25. package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  26. package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  27. package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  28. package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  29. package/cloud-runtime/standalone/apps/local/.next/server/app/agents/[id]/page/build-manifest.json +4 -4
  30. package/cloud-runtime/standalone/apps/local/.next/server/app/agents/[id]/page.js +1 -1
  31. package/cloud-runtime/standalone/apps/local/.next/server/app/agents/[id]/page.js.nft.json +1 -1
  32. package/cloud-runtime/standalone/apps/local/.next/server/app/agents/[id]/page_client-reference-manifest.js +1 -1
  33. package/cloud-runtime/standalone/apps/local/.next/server/app/agents/page/build-manifest.json +4 -4
  34. package/cloud-runtime/standalone/apps/local/.next/server/app/agents/page.js +1 -1
  35. package/cloud-runtime/standalone/apps/local/.next/server/app/agents/page.js.nft.json +1 -1
  36. package/cloud-runtime/standalone/apps/local/.next/server/app/agents/page_client-reference-manifest.js +1 -1
  37. package/cloud-runtime/standalone/apps/local/.next/server/app/agents.html +2 -2
  38. package/cloud-runtime/standalone/apps/local/.next/server/app/agents.rsc +3 -3
  39. package/cloud-runtime/standalone/apps/local/.next/server/app/agents.segments/_full.segment.rsc +3 -3
  40. package/cloud-runtime/standalone/apps/local/.next/server/app/agents.segments/_head.segment.rsc +1 -1
  41. package/cloud-runtime/standalone/apps/local/.next/server/app/agents.segments/_index.segment.rsc +2 -2
  42. package/cloud-runtime/standalone/apps/local/.next/server/app/agents.segments/_tree.segment.rsc +2 -2
  43. package/cloud-runtime/standalone/apps/local/.next/server/app/agents.segments/agents/__PAGE__.segment.rsc +2 -2
  44. package/cloud-runtime/standalone/apps/local/.next/server/app/agents.segments/agents.segment.rsc +1 -1
  45. package/cloud-runtime/standalone/apps/local/.next/server/app/api/agent-specs/pull/route.js +1 -1
  46. package/cloud-runtime/standalone/apps/local/.next/server/app/api/agent-specs/pull/route.js.nft.json +1 -1
  47. package/cloud-runtime/standalone/apps/local/.next/server/app/api/agent-specs/route.js +3 -3
  48. package/cloud-runtime/standalone/apps/local/.next/server/app/api/agent-specs/route.js.nft.json +1 -1
  49. package/cloud-runtime/standalone/apps/local/.next/server/app/api/agents/[id]/profile/route.js +3 -3
  50. package/cloud-runtime/standalone/apps/local/.next/server/app/api/agents/[id]/profile/route.js.nft.json +1 -1
  51. package/cloud-runtime/standalone/apps/local/.next/server/app/api/agents/[id]/skills/route.js +4 -4
  52. package/cloud-runtime/standalone/apps/local/.next/server/app/api/agents/[id]/skills/route.js.nft.json +1 -1
  53. package/cloud-runtime/standalone/apps/local/.next/server/app/api/agents/export/route.js +5 -4
  54. package/cloud-runtime/standalone/apps/local/.next/server/app/api/agents/export/route.js.nft.json +1 -1
  55. package/cloud-runtime/standalone/apps/local/.next/server/app/api/audit/route.js +1 -1
  56. package/cloud-runtime/standalone/apps/local/.next/server/app/api/audit/route.js.nft.json +1 -1
  57. package/cloud-runtime/standalone/apps/local/.next/server/app/api/automations/create/route.js +4 -4
  58. package/cloud-runtime/standalone/apps/local/.next/server/app/api/automations/create/route.js.nft.json +1 -1
  59. package/cloud-runtime/standalone/apps/local/.next/server/app/api/automations/route.js +2 -2
  60. package/cloud-runtime/standalone/apps/local/.next/server/app/api/automations/route.js.nft.json +1 -1
  61. package/cloud-runtime/standalone/apps/local/.next/server/app/api/chat/route.js +12 -11
  62. package/cloud-runtime/standalone/apps/local/.next/server/app/api/chat/route.js.nft.json +1 -1
  63. package/cloud-runtime/standalone/apps/local/.next/server/app/api/chat-runs/[id]/route.js +1 -1
  64. package/cloud-runtime/standalone/apps/local/.next/server/app/api/chat-runs/[id]/route.js.nft.json +1 -1
  65. package/cloud-runtime/standalone/apps/local/.next/server/app/api/chat-runs/[id]/signal/route.js +1 -1
  66. package/cloud-runtime/standalone/apps/local/.next/server/app/api/chat-runs/[id]/signal/route.js.nft.json +1 -1
  67. package/cloud-runtime/standalone/apps/local/.next/server/app/api/chat-runs/active-agents/route.js +1 -1
  68. package/cloud-runtime/standalone/apps/local/.next/server/app/api/chat-runs/active-agents/route.js.nft.json +1 -1
  69. package/cloud-runtime/standalone/apps/local/.next/server/app/api/chat-runs/route.js +1 -1
  70. package/cloud-runtime/standalone/apps/local/.next/server/app/api/chat-runs/route.js.nft.json +1 -1
  71. package/cloud-runtime/standalone/apps/local/.next/server/app/api/daemon/route.js +1 -1
  72. package/cloud-runtime/standalone/apps/local/.next/server/app/api/daemon/route.js.nft.json +1 -1
  73. package/cloud-runtime/standalone/apps/local/.next/server/app/api/domains/[id]/route.js +1 -1
  74. package/cloud-runtime/standalone/apps/local/.next/server/app/api/domains/[id]/route.js.nft.json +1 -1
  75. package/cloud-runtime/standalone/apps/local/.next/server/app/api/domains/route.js +1 -1
  76. package/cloud-runtime/standalone/apps/local/.next/server/app/api/domains/route.js.nft.json +1 -1
  77. package/cloud-runtime/standalone/apps/local/.next/server/app/api/file-search/route.js.nft.json +1 -1
  78. package/cloud-runtime/standalone/apps/local/.next/server/app/api/filesystem/analyze/route.js +1 -1
  79. package/cloud-runtime/standalone/apps/local/.next/server/app/api/filesystem/analyze/route.js.nft.json +1 -1
  80. package/cloud-runtime/standalone/apps/local/.next/server/app/api/filesystem/browse/route.js +1 -1
  81. package/cloud-runtime/standalone/apps/local/.next/server/app/api/filesystem/browse/route.js.nft.json +1 -1
  82. package/cloud-runtime/standalone/apps/local/.next/server/app/api/filesystem/pick-folder/route.js +1 -1
  83. package/cloud-runtime/standalone/apps/local/.next/server/app/api/filesystem/pick-folder/route.js.nft.json +1 -1
  84. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/issues/route/app-paths-manifest.json +3 -0
  85. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/issues/route/build-manifest.json +11 -0
  86. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/issues/route/server-reference-manifest.json +4 -0
  87. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/issues/route.js +7 -0
  88. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/issues/route.js.map +5 -0
  89. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/issues/route.js.nft.json +1 -0
  90. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/issues/route_client-reference-manifest.js +2 -0
  91. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/prs/context/route/app-paths-manifest.json +3 -0
  92. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/prs/context/route/build-manifest.json +11 -0
  93. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/prs/context/route/server-reference-manifest.json +4 -0
  94. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/prs/context/route.js +7 -0
  95. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/prs/context/route.js.map +5 -0
  96. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/prs/context/route.js.nft.json +1 -0
  97. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/prs/context/route_client-reference-manifest.js +2 -0
  98. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/prs/for-target/route/app-paths-manifest.json +3 -0
  99. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/prs/for-target/route/build-manifest.json +11 -0
  100. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/prs/for-target/route/server-reference-manifest.json +4 -0
  101. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/prs/for-target/route.js +7 -0
  102. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/prs/for-target/route.js.map +5 -0
  103. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/prs/for-target/route.js.nft.json +1 -0
  104. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/prs/for-target/route_client-reference-manifest.js +2 -0
  105. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/prs/link/route/app-paths-manifest.json +3 -0
  106. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/prs/link/route/build-manifest.json +11 -0
  107. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/prs/link/route/server-reference-manifest.json +4 -0
  108. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/prs/link/route.js +7 -0
  109. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/prs/link/route.js.map +5 -0
  110. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/prs/link/route.js.nft.json +1 -0
  111. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/prs/link/route_client-reference-manifest.js +2 -0
  112. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/prs/route/app-paths-manifest.json +3 -0
  113. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/prs/route/build-manifest.json +11 -0
  114. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/prs/route/server-reference-manifest.json +4 -0
  115. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/prs/route.js +7 -0
  116. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/prs/route.js.map +5 -0
  117. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/prs/route.js.nft.json +1 -0
  118. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/prs/route_client-reference-manifest.js +2 -0
  119. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/prs/seed/route/app-paths-manifest.json +3 -0
  120. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/prs/seed/route/build-manifest.json +11 -0
  121. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/prs/seed/route/server-reference-manifest.json +4 -0
  122. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/prs/seed/route.js +7 -0
  123. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/prs/seed/route.js.map +5 -0
  124. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/prs/seed/route.js.nft.json +1 -0
  125. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/prs/seed/route_client-reference-manifest.js +2 -0
  126. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/repos/route/app-paths-manifest.json +3 -0
  127. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/repos/route/build-manifest.json +11 -0
  128. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/repos/route/server-reference-manifest.json +4 -0
  129. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/repos/route.js +7 -0
  130. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/repos/route.js.map +5 -0
  131. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/repos/route.js.nft.json +1 -0
  132. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/repos/route_client-reference-manifest.js +2 -0
  133. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/repos/sync/route/app-paths-manifest.json +3 -0
  134. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/repos/sync/route/build-manifest.json +11 -0
  135. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/repos/sync/route/server-reference-manifest.json +4 -0
  136. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/repos/sync/route.js +9 -0
  137. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/repos/sync/route.js.map +5 -0
  138. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/repos/sync/route.js.nft.json +1 -0
  139. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/repos/sync/route_client-reference-manifest.js +2 -0
  140. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/user-repos/route/app-paths-manifest.json +3 -0
  141. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/user-repos/route/build-manifest.json +11 -0
  142. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/user-repos/route/server-reference-manifest.json +4 -0
  143. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/user-repos/route.js +7 -0
  144. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/user-repos/route.js.map +5 -0
  145. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/user-repos/route.js.nft.json +1 -0
  146. package/cloud-runtime/standalone/apps/local/.next/server/app/api/github/user-repos/route_client-reference-manifest.js +2 -0
  147. package/cloud-runtime/standalone/apps/local/.next/server/app/api/graphs/[graphId]/nodes/[nodeId]/route.js +1 -1
  148. package/cloud-runtime/standalone/apps/local/.next/server/app/api/graphs/[graphId]/nodes/[nodeId]/route.js.nft.json +1 -1
  149. package/cloud-runtime/standalone/apps/local/.next/server/app/api/health/route.js +3 -3
  150. package/cloud-runtime/standalone/apps/local/.next/server/app/api/health/route.js.nft.json +1 -1
  151. package/cloud-runtime/standalone/apps/local/.next/server/app/api/history/route.js +1 -1
  152. package/cloud-runtime/standalone/apps/local/.next/server/app/api/history/route.js.nft.json +1 -1
  153. package/cloud-runtime/standalone/apps/local/.next/server/app/api/knowledge-notes/route.js +2 -2
  154. package/cloud-runtime/standalone/apps/local/.next/server/app/api/knowledge-notes/route.js.nft.json +1 -1
  155. package/cloud-runtime/standalone/apps/local/.next/server/app/api/learnings/route.js +3 -3
  156. package/cloud-runtime/standalone/apps/local/.next/server/app/api/learnings/route.js.nft.json +1 -1
  157. package/cloud-runtime/standalone/apps/local/.next/server/app/api/memories/route.js +2 -2
  158. package/cloud-runtime/standalone/apps/local/.next/server/app/api/memories/route.js.nft.json +1 -1
  159. package/cloud-runtime/standalone/apps/local/.next/server/app/api/messages/[id]/route.js +1 -1
  160. package/cloud-runtime/standalone/apps/local/.next/server/app/api/messages/[id]/route.js.nft.json +1 -1
  161. package/cloud-runtime/standalone/apps/local/.next/server/app/api/migrate/teams-to-projects/route.js +1 -1
  162. package/cloud-runtime/standalone/apps/local/.next/server/app/api/migrate/teams-to-projects/route.js.nft.json +1 -1
  163. package/cloud-runtime/standalone/apps/local/.next/server/app/api/migrate/workspaces-to-projects/route.js +1 -1
  164. package/cloud-runtime/standalone/apps/local/.next/server/app/api/migrate/workspaces-to-projects/route.js.nft.json +1 -1
  165. package/cloud-runtime/standalone/apps/local/.next/server/app/api/orchestrator/tasks/[taskId]/cancel/route.js +1 -1
  166. package/cloud-runtime/standalone/apps/local/.next/server/app/api/orchestrator/tasks/[taskId]/cancel/route.js.nft.json +1 -1
  167. package/cloud-runtime/standalone/apps/local/.next/server/app/api/orchestrator/tasks/[taskId]/signal/route.js +2 -2
  168. package/cloud-runtime/standalone/apps/local/.next/server/app/api/orchestrator/tasks/[taskId]/signal/route.js.nft.json +1 -1
  169. package/cloud-runtime/standalone/apps/local/.next/server/app/api/orchestrator/tasks/[taskId]/start/route.js +4 -4
  170. package/cloud-runtime/standalone/apps/local/.next/server/app/api/orchestrator/tasks/[taskId]/start/route.js.nft.json +1 -1
  171. package/cloud-runtime/standalone/apps/local/.next/server/app/api/orchestrator/tasks/[taskId]/status/route.js +3 -3
  172. package/cloud-runtime/standalone/apps/local/.next/server/app/api/orchestrator/tasks/[taskId]/status/route.js.nft.json +1 -1
  173. package/cloud-runtime/standalone/apps/local/.next/server/app/api/participants/route.js +6 -4
  174. package/cloud-runtime/standalone/apps/local/.next/server/app/api/participants/route.js.nft.json +1 -1
  175. package/cloud-runtime/standalone/apps/local/.next/server/app/api/processes/route.js +1 -1
  176. package/cloud-runtime/standalone/apps/local/.next/server/app/api/processes/route.js.nft.json +1 -1
  177. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/agents/route.js +4 -4
  178. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/agents/route.js.nft.json +1 -1
  179. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/agents/unassigned/route.js +4 -4
  180. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/agents/unassigned/route.js.nft.json +1 -1
  181. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/migrate-v1/route.js +3 -3
  182. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/migrate-v1/route.js.nft.json +1 -1
  183. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/migrate-v2/route.js +3 -3
  184. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/migrate-v2/route.js.nft.json +1 -1
  185. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/objectives/[objectiveId]/activities/route.js +5 -5
  186. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/objectives/[objectiveId]/activities/route.js.nft.json +1 -1
  187. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/objectives/[objectiveId]/notes/[noteId]/route.js +6 -6
  188. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/objectives/[objectiveId]/notes/[noteId]/route.js.nft.json +1 -1
  189. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/objectives/[objectiveId]/notes/route.js +6 -6
  190. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/objectives/[objectiveId]/notes/route.js.nft.json +1 -1
  191. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/objectives/[objectiveId]/route.js +3 -3
  192. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/objectives/[objectiveId]/route.js.nft.json +1 -1
  193. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/objectives/[objectiveId]/scheduled-tasks/route.js +12 -12
  194. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/objectives/[objectiveId]/scheduled-tasks/route.js.nft.json +1 -1
  195. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/objectives/[objectiveId]/validate/route.js +6 -6
  196. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/objectives/[objectiveId]/validate/route.js.nft.json +1 -1
  197. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/objectives/[objectiveId]/worker/route.js +13 -13
  198. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/objectives/[objectiveId]/worker/route.js.nft.json +1 -1
  199. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/route.js +8 -8
  200. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/route.js.nft.json +1 -1
  201. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/search/route.js +8 -8
  202. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/search/route.js.nft.json +1 -1
  203. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/skills/route.js +4 -4
  204. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/skills/route.js.nft.json +1 -1
  205. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/teams/[teamId]/agents/route.js +4 -4
  206. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/teams/[teamId]/agents/route.js.nft.json +1 -1
  207. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/teams/[teamId]/route.js +4 -4
  208. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/teams/[teamId]/route.js.nft.json +1 -1
  209. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/teams/export/route.js +5 -5
  210. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/teams/export/route.js.nft.json +1 -1
  211. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/teams/import/route.js +5 -5
  212. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/teams/import/route.js.nft.json +1 -1
  213. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/teams/route.js +3 -4
  214. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/teams/route.js.nft.json +1 -1
  215. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/threads/route.js +4 -4
  216. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/threads/route.js.nft.json +1 -1
  217. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/variables/[key]/route.js +4 -4
  218. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/variables/[key]/route.js.nft.json +1 -1
  219. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/variables/route.js +4 -4
  220. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/variables/route.js.nft.json +1 -1
  221. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/workspace/[entryId]/route/app-paths-manifest.json +3 -0
  222. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/workspace/[entryId]/route/build-manifest.json +11 -0
  223. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/workspace/[entryId]/route/server-reference-manifest.json +4 -0
  224. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/workspace/[entryId]/route.js +11 -0
  225. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/workspace/[entryId]/route.js.map +5 -0
  226. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/workspace/[entryId]/route.js.nft.json +1 -0
  227. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/workspace/[entryId]/route_client-reference-manifest.js +2 -0
  228. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/workspace/route/app-paths-manifest.json +3 -0
  229. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/workspace/route/build-manifest.json +11 -0
  230. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/workspace/route/server-reference-manifest.json +4 -0
  231. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/workspace/route.js +11 -0
  232. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/workspace/route.js.map +5 -0
  233. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/workspace/route.js.nft.json +1 -0
  234. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/workspace/route_client-reference-manifest.js +2 -0
  235. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/route.js +4 -4
  236. package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/route.js.nft.json +1 -1
  237. package/cloud-runtime/standalone/apps/local/.next/server/app/api/prompt-jobs/[id]/cancel/route.js +3 -3
  238. package/cloud-runtime/standalone/apps/local/.next/server/app/api/prompt-jobs/[id]/cancel/route.js.nft.json +1 -1
  239. package/cloud-runtime/standalone/apps/local/.next/server/app/api/prompt-jobs/[id]/route.js +3 -3
  240. package/cloud-runtime/standalone/apps/local/.next/server/app/api/prompt-jobs/[id]/route.js.nft.json +1 -1
  241. package/cloud-runtime/standalone/apps/local/.next/server/app/api/prompt-jobs/[id]/runs/route.js +3 -3
  242. package/cloud-runtime/standalone/apps/local/.next/server/app/api/prompt-jobs/[id]/runs/route.js.nft.json +1 -1
  243. package/cloud-runtime/standalone/apps/local/.next/server/app/api/prompt-jobs/agents/route.js +4 -4
  244. package/cloud-runtime/standalone/apps/local/.next/server/app/api/prompt-jobs/agents/route.js.nft.json +1 -1
  245. package/cloud-runtime/standalone/apps/local/.next/server/app/api/prompt-jobs/poll/route.js +13 -13
  246. package/cloud-runtime/standalone/apps/local/.next/server/app/api/prompt-jobs/poll/route.js.nft.json +1 -1
  247. package/cloud-runtime/standalone/apps/local/.next/server/app/api/prompt-jobs/route.js +3 -3
  248. package/cloud-runtime/standalone/apps/local/.next/server/app/api/prompt-jobs/route.js.nft.json +1 -1
  249. package/cloud-runtime/standalone/apps/local/.next/server/app/api/providers/check/[id]/route.js +1 -1
  250. package/cloud-runtime/standalone/apps/local/.next/server/app/api/providers/check/[id]/route.js.nft.json +1 -1
  251. package/cloud-runtime/standalone/apps/local/.next/server/app/api/providers/route.js +1 -1
  252. package/cloud-runtime/standalone/apps/local/.next/server/app/api/providers/route.js.nft.json +1 -1
  253. package/cloud-runtime/standalone/apps/local/.next/server/app/api/queue/complete/route.js +4 -4
  254. package/cloud-runtime/standalone/apps/local/.next/server/app/api/queue/complete/route.js.nft.json +1 -1
  255. package/cloud-runtime/standalone/apps/local/.next/server/app/api/queue/route.js +5 -5
  256. package/cloud-runtime/standalone/apps/local/.next/server/app/api/queue/route.js.nft.json +1 -1
  257. package/cloud-runtime/standalone/apps/local/.next/server/app/api/reactions/route.js +1 -1
  258. package/cloud-runtime/standalone/apps/local/.next/server/app/api/reactions/route.js.nft.json +1 -1
  259. package/cloud-runtime/standalone/apps/local/.next/server/app/api/schedules/debug/route.js +11 -11
  260. package/cloud-runtime/standalone/apps/local/.next/server/app/api/schedules/debug/route.js.nft.json +1 -1
  261. package/cloud-runtime/standalone/apps/local/.next/server/app/api/schedules/poll/route.js +9 -9
  262. package/cloud-runtime/standalone/apps/local/.next/server/app/api/schedules/poll/route.js.nft.json +1 -1
  263. package/cloud-runtime/standalone/apps/local/.next/server/app/api/schedules/route.js +4 -4
  264. package/cloud-runtime/standalone/apps/local/.next/server/app/api/schedules/route.js.nft.json +1 -1
  265. package/cloud-runtime/standalone/apps/local/.next/server/app/api/search/route.js +1 -1
  266. package/cloud-runtime/standalone/apps/local/.next/server/app/api/search/route.js.nft.json +1 -1
  267. package/cloud-runtime/standalone/apps/local/.next/server/app/api/skills/assign/route.js +2 -2
  268. package/cloud-runtime/standalone/apps/local/.next/server/app/api/skills/assign/route.js.nft.json +1 -1
  269. package/cloud-runtime/standalone/apps/local/.next/server/app/api/skills/available/route.js +1 -1
  270. package/cloud-runtime/standalone/apps/local/.next/server/app/api/skills/available/route.js.nft.json +1 -1
  271. package/cloud-runtime/standalone/apps/local/.next/server/app/api/skills/detail/route.js +1 -1
  272. package/cloud-runtime/standalone/apps/local/.next/server/app/api/skills/detail/route.js.nft.json +1 -1
  273. package/cloud-runtime/standalone/apps/local/.next/server/app/api/skills/history/route.js +1 -1
  274. package/cloud-runtime/standalone/apps/local/.next/server/app/api/skills/history/route.js.nft.json +1 -1
  275. package/cloud-runtime/standalone/apps/local/.next/server/app/api/skills/learn/route.js +2 -2
  276. package/cloud-runtime/standalone/apps/local/.next/server/app/api/skills/learn/route.js.nft.json +1 -1
  277. package/cloud-runtime/standalone/apps/local/.next/server/app/api/skills/route.js +1 -1
  278. package/cloud-runtime/standalone/apps/local/.next/server/app/api/skills/route.js.nft.json +1 -1
  279. package/cloud-runtime/standalone/apps/local/.next/server/app/api/skills/unlearn/route.js +2 -2
  280. package/cloud-runtime/standalone/apps/local/.next/server/app/api/skills/unlearn/route.js.nft.json +1 -1
  281. package/cloud-runtime/standalone/apps/local/.next/server/app/api/status/route.js +1 -1
  282. package/cloud-runtime/standalone/apps/local/.next/server/app/api/status/route.js.nft.json +1 -1
  283. package/cloud-runtime/standalone/apps/local/.next/server/app/api/summarize/route.js +3 -3
  284. package/cloud-runtime/standalone/apps/local/.next/server/app/api/summarize/route.js.nft.json +1 -1
  285. package/cloud-runtime/standalone/apps/local/.next/server/app/api/system/db-status/route.js +1 -1
  286. package/cloud-runtime/standalone/apps/local/.next/server/app/api/system/db-status/route.js.nft.json +1 -1
  287. package/cloud-runtime/standalone/apps/local/.next/server/app/api/task-groups/[id]/route.js +2 -2
  288. package/cloud-runtime/standalone/apps/local/.next/server/app/api/task-groups/[id]/route.js.nft.json +1 -1
  289. package/cloud-runtime/standalone/apps/local/.next/server/app/api/task-groups/[id]/tasks/route.js +2 -2
  290. package/cloud-runtime/standalone/apps/local/.next/server/app/api/task-groups/[id]/tasks/route.js.nft.json +1 -1
  291. package/cloud-runtime/standalone/apps/local/.next/server/app/api/task-groups/route.js +2 -2
  292. package/cloud-runtime/standalone/apps/local/.next/server/app/api/task-groups/route.js.nft.json +1 -1
  293. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/comments/[commentId]/route.js +3 -3
  294. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/comments/[commentId]/route.js.nft.json +1 -1
  295. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/comments/route.js +4 -4
  296. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/comments/route.js.nft.json +1 -1
  297. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/costs/route.js +3 -3
  298. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/costs/route.js.nft.json +1 -1
  299. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/dependencies/route.js +3 -3
  300. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/dependencies/route.js.nft.json +1 -1
  301. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/graph/events/route.js +7 -7
  302. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/graph/events/route.js.nft.json +1 -1
  303. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/graph/history/route.js +7 -7
  304. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/graph/history/route.js.nft.json +1 -1
  305. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/graph/metrics/route.js +7 -7
  306. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/graph/metrics/route.js.nft.json +1 -1
  307. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/graph/pause/route.js +1 -1
  308. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/graph/pause/route.js.nft.json +1 -1
  309. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/graph/replan/route.js +7 -7
  310. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/graph/replan/route.js.nft.json +1 -1
  311. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/graph/restart/route.js +4 -4
  312. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/graph/restart/route.js.nft.json +1 -1
  313. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/graph/resume/route.js +4 -4
  314. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/graph/resume/route.js.nft.json +1 -1
  315. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/graph/rollback/route.js +7 -7
  316. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/graph/rollback/route.js.nft.json +1 -1
  317. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/graph/route.js +8 -8
  318. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/graph/route.js.nft.json +1 -1
  319. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/graph/schedule/route.js +7 -7
  320. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/graph/schedule/route.js.nft.json +1 -1
  321. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/graph/start/route.js +4 -4
  322. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/graph/start/route.js.nft.json +1 -1
  323. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/graph/stop/route.js +1 -1
  324. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/graph/stop/route.js.nft.json +1 -1
  325. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/heartbeat/route.js +1 -1
  326. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/heartbeat/route.js.nft.json +1 -1
  327. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/history/route.js +3 -3
  328. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/history/route.js.nft.json +1 -1
  329. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/logs/route.js +5 -5
  330. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/logs/route.js.nft.json +1 -1
  331. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/nodes/[nodeId]/comments/route.js +4 -4
  332. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/nodes/[nodeId]/comments/route.js.nft.json +1 -1
  333. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/nodes/[nodeId]/complete/route.js +7 -7
  334. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/nodes/[nodeId]/complete/route.js.nft.json +1 -1
  335. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/nodes/[nodeId]/fail/route.js +7 -7
  336. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/nodes/[nodeId]/fail/route.js.nft.json +1 -1
  337. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/nodes/[nodeId]/resume/route.js +5 -5
  338. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/nodes/[nodeId]/resume/route.js.nft.json +1 -1
  339. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/nodes/[nodeId]/start/route.js +5 -5
  340. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/nodes/[nodeId]/start/route.js.nft.json +1 -1
  341. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/nodes/[nodeId]/stop/route.js +7 -7
  342. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/nodes/[nodeId]/stop/route.js.nft.json +1 -1
  343. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/nodes/[nodeId]/verify/route.js +8 -8
  344. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/nodes/[nodeId]/verify/route.js.nft.json +1 -1
  345. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/route.js +3 -3
  346. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/route.js.nft.json +1 -1
  347. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/assign-orphans/route.js +3 -3
  348. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/assign-orphans/route.js.nft.json +1 -1
  349. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/route.js +6 -6
  350. package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/route.js.nft.json +1 -1
  351. package/cloud-runtime/standalone/apps/local/.next/server/app/api/teams/templates/route/app-paths-manifest.json +3 -0
  352. package/cloud-runtime/standalone/apps/local/.next/server/app/api/teams/templates/route/build-manifest.json +11 -0
  353. package/cloud-runtime/standalone/apps/local/.next/server/app/api/teams/templates/route/server-reference-manifest.json +4 -0
  354. package/cloud-runtime/standalone/apps/local/.next/server/app/api/teams/templates/route.js +7 -0
  355. package/cloud-runtime/standalone/apps/local/.next/server/app/api/teams/templates/route.js.map +5 -0
  356. package/cloud-runtime/standalone/apps/local/.next/server/app/api/teams/templates/route.js.nft.json +1 -0
  357. package/cloud-runtime/standalone/apps/local/.next/server/app/api/teams/templates/route_client-reference-manifest.js +2 -0
  358. package/cloud-runtime/standalone/apps/local/.next/server/app/api/thread-export/route.js +1 -1
  359. package/cloud-runtime/standalone/apps/local/.next/server/app/api/thread-export/route.js.nft.json +1 -1
  360. package/cloud-runtime/standalone/apps/local/.next/server/app/api/thread-repos/route.js +1 -1
  361. package/cloud-runtime/standalone/apps/local/.next/server/app/api/thread-repos/route.js.nft.json +1 -1
  362. package/cloud-runtime/standalone/apps/local/.next/server/app/api/threads/knowledge/route.js +3 -3
  363. package/cloud-runtime/standalone/apps/local/.next/server/app/api/threads/knowledge/route.js.nft.json +1 -1
  364. package/cloud-runtime/standalone/apps/local/.next/server/app/api/threads/route.js +3 -3
  365. package/cloud-runtime/standalone/apps/local/.next/server/app/api/threads/route.js.nft.json +1 -1
  366. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/active-agents/route.js +1 -1
  367. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/active-agents/route.js.nft.json +1 -1
  368. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/auth/route.js +4 -3
  369. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/auth/route.js.nft.json +1 -1
  370. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/callback/route.js +4 -3
  371. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/callback/route.js.nft.json +1 -1
  372. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/groups/route.js +4 -3
  373. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/groups/route.js.nft.json +1 -1
  374. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/items/[id]/activity/route.js +4 -3
  375. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/items/[id]/activity/route.js.nft.json +1 -1
  376. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/items/[id]/recap/route.js +7 -5
  377. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/items/[id]/recap/route.js.nft.json +1 -1
  378. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/items/[id]/route.js +5 -4
  379. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/items/[id]/route.js.nft.json +1 -1
  380. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/items/route.js +4 -3
  381. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/items/route.js.nft.json +1 -1
  382. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/labels/[id]/route.js +1 -1
  383. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/labels/[id]/route.js.nft.json +1 -1
  384. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/labels/route.js +1 -1
  385. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/labels/route.js.nft.json +1 -1
  386. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/mcp-setup/route.js +7 -6
  387. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/mcp-setup/route.js.nft.json +1 -1
  388. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/metadata/bulk/route.js +1 -1
  389. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/metadata/bulk/route.js.nft.json +1 -1
  390. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/metadata/route.js +1 -1
  391. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/metadata/route.js.nft.json +1 -1
  392. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/options/route.js +4 -3
  393. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/options/route.js.nft.json +1 -1
  394. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/runs/[id]/route.js +4 -3
  395. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/runs/[id]/route.js.nft.json +1 -1
  396. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/runs/route.js +5 -4
  397. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/runs/route.js.nft.json +1 -1
  398. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/runs/scripted/route.js +4 -3
  399. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/runs/scripted/route.js.nft.json +1 -1
  400. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/stats/route.js +1 -1
  401. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/stats/route.js.nft.json +1 -1
  402. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/status/route.js +4 -3
  403. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/status/route.js.nft.json +1 -1
  404. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/token/route.js +6 -5
  405. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/token/route.js.nft.json +1 -1
  406. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/token-receive/route.js +4 -3
  407. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/token-receive/route.js.nft.json +1 -1
  408. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/worker/route.js +8 -7
  409. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/[tracker]/worker/route.js.nft.json +1 -1
  410. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/connections/route.js +6 -5
  411. package/cloud-runtime/standalone/apps/local/.next/server/app/api/trackers/connections/route.js.nft.json +1 -1
  412. package/cloud-runtime/standalone/apps/local/.next/server/app/api/update-check/route.js +1 -1
  413. package/cloud-runtime/standalone/apps/local/.next/server/app/api/update-check/route.js.nft.json +1 -1
  414. package/cloud-runtime/standalone/apps/local/.next/server/app/api/upload/route.js +1 -1
  415. package/cloud-runtime/standalone/apps/local/.next/server/app/api/upload/route.js.nft.json +1 -1
  416. package/cloud-runtime/standalone/apps/local/.next/server/app/api/user-settings/route.js +3 -3
  417. package/cloud-runtime/standalone/apps/local/.next/server/app/api/user-settings/route.js.nft.json +1 -1
  418. package/cloud-runtime/standalone/apps/local/.next/server/app/api/userPreferences/route.js +1 -1
  419. package/cloud-runtime/standalone/apps/local/.next/server/app/api/userPreferences/route.js.nft.json +1 -1
  420. package/cloud-runtime/standalone/apps/local/.next/server/app/api/webhooks/[id]/route/app-paths-manifest.json +3 -0
  421. package/cloud-runtime/standalone/apps/local/.next/server/app/api/webhooks/[id]/route/build-manifest.json +11 -0
  422. package/cloud-runtime/standalone/apps/local/.next/server/app/api/webhooks/[id]/route/server-reference-manifest.json +4 -0
  423. package/cloud-runtime/standalone/apps/local/.next/server/app/api/webhooks/[id]/route.js +8 -0
  424. package/cloud-runtime/standalone/apps/local/.next/server/app/api/webhooks/[id]/route.js.map +5 -0
  425. package/cloud-runtime/standalone/apps/local/.next/server/app/api/webhooks/[id]/route.js.nft.json +1 -0
  426. package/cloud-runtime/standalone/apps/local/.next/server/app/api/webhooks/[id]/route_client-reference-manifest.js +2 -0
  427. package/cloud-runtime/standalone/apps/local/.next/server/app/api/webhooks/route/app-paths-manifest.json +3 -0
  428. package/cloud-runtime/standalone/apps/local/.next/server/app/api/webhooks/route/build-manifest.json +11 -0
  429. package/cloud-runtime/standalone/apps/local/.next/server/app/api/webhooks/route/server-reference-manifest.json +4 -0
  430. package/cloud-runtime/standalone/apps/local/.next/server/app/api/webhooks/route.js +8 -0
  431. package/cloud-runtime/standalone/apps/local/.next/server/app/api/webhooks/route.js.map +5 -0
  432. package/cloud-runtime/standalone/apps/local/.next/server/app/api/webhooks/route.js.nft.json +1 -0
  433. package/cloud-runtime/standalone/apps/local/.next/server/app/api/webhooks/route_client-reference-manifest.js +2 -0
  434. package/cloud-runtime/standalone/apps/local/.next/server/app/index.html +2 -2
  435. package/cloud-runtime/standalone/apps/local/.next/server/app/index.rsc +2 -2
  436. package/cloud-runtime/standalone/apps/local/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  437. package/cloud-runtime/standalone/apps/local/.next/server/app/index.segments/_full.segment.rsc +2 -2
  438. package/cloud-runtime/standalone/apps/local/.next/server/app/index.segments/_head.segment.rsc +1 -1
  439. package/cloud-runtime/standalone/apps/local/.next/server/app/index.segments/_index.segment.rsc +2 -2
  440. package/cloud-runtime/standalone/apps/local/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  441. package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos/page/app-paths-manifest.json +3 -0
  442. package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos/page/build-manifest.json +18 -0
  443. package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos/page/next-font-manifest.json +11 -0
  444. package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos/page/react-loadable-manifest.json +1 -0
  445. package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos/page/server-reference-manifest.json +4 -0
  446. package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos/page.js +15 -0
  447. package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos/page.js.map +5 -0
  448. package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos/page.js.nft.json +1 -0
  449. package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos/page_client-reference-manifest.js +2 -0
  450. package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos.html +13 -0
  451. package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos.meta +17 -0
  452. package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos.rsc +24 -0
  453. package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos.segments/_full.segment.rsc +24 -0
  454. package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos.segments/_head.segment.rsc +5 -0
  455. package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos.segments/_index.segment.rsc +10 -0
  456. package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos.segments/_tree.segment.rsc +5 -0
  457. package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos.segments/integrations/github/select-repos/__PAGE__.segment.rsc +9 -0
  458. package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos.segments/integrations/github/select-repos.segment.rsc +4 -0
  459. package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos.segments/integrations/github.segment.rsc +4 -0
  460. package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos.segments/integrations.segment.rsc +4 -0
  461. package/cloud-runtime/standalone/apps/local/.next/server/app/page/build-manifest.json +4 -4
  462. package/cloud-runtime/standalone/apps/local/.next/server/app/page.js +1 -1
  463. package/cloud-runtime/standalone/apps/local/.next/server/app/page.js.nft.json +1 -1
  464. package/cloud-runtime/standalone/apps/local/.next/server/app/page_client-reference-manifest.js +1 -1
  465. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/automations/page/build-manifest.json +4 -4
  466. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/automations/page.js +1 -1
  467. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/automations/page.js.nft.json +1 -1
  468. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/automations/page_client-reference-manifest.js +1 -1
  469. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/env-vars/page/build-manifest.json +4 -4
  470. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/env-vars/page.js +1 -1
  471. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/env-vars/page.js.nft.json +1 -1
  472. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/env-vars/page_client-reference-manifest.js +1 -1
  473. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/folders/page/build-manifest.json +4 -4
  474. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/folders/page.js +1 -1
  475. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/folders/page.js.nft.json +1 -1
  476. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/folders/page_client-reference-manifest.js +1 -1
  477. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/graph/[taskId]/page/build-manifest.json +4 -4
  478. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/graph/[taskId]/page.js +1 -1
  479. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/graph/[taskId]/page.js.nft.json +1 -1
  480. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/graph/[taskId]/page_client-reference-manifest.js +1 -1
  481. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/notifications/page/app-paths-manifest.json +3 -0
  482. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/notifications/page/build-manifest.json +18 -0
  483. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/notifications/page/next-font-manifest.json +11 -0
  484. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/notifications/page/react-loadable-manifest.json +1 -0
  485. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/notifications/page/server-reference-manifest.json +4 -0
  486. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/notifications/page.js +16 -0
  487. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/notifications/page.js.map +5 -0
  488. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/notifications/page.js.nft.json +1 -0
  489. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/notifications/page_client-reference-manifest.js +2 -0
  490. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/objectives/[objectiveId]/page/build-manifest.json +4 -4
  491. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/objectives/[objectiveId]/page.js +1 -1
  492. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/objectives/[objectiveId]/page.js.nft.json +1 -1
  493. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/objectives/[objectiveId]/page_client-reference-manifest.js +1 -1
  494. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/objectives/page/build-manifest.json +4 -4
  495. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/objectives/page.js +1 -1
  496. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/objectives/page.js.nft.json +1 -1
  497. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/objectives/page_client-reference-manifest.js +1 -1
  498. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/page/build-manifest.json +4 -4
  499. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/page.js +1 -1
  500. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/page.js.nft.json +1 -1
  501. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/page_client-reference-manifest.js +1 -1
  502. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/prs/page/app-paths-manifest.json +3 -0
  503. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/prs/page/build-manifest.json +18 -0
  504. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/prs/page/next-font-manifest.json +11 -0
  505. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/prs/page/react-loadable-manifest.json +10 -0
  506. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/prs/page/server-reference-manifest.json +4 -0
  507. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/prs/page.js +16 -0
  508. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/prs/page.js.map +5 -0
  509. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/prs/page.js.nft.json +1 -0
  510. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/prs/page_client-reference-manifest.js +2 -0
  511. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/[teamId]/agents/[agentId]/page/build-manifest.json +4 -4
  512. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/[teamId]/agents/[agentId]/page.js +1 -1
  513. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/[teamId]/agents/[agentId]/page.js.nft.json +1 -1
  514. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/[teamId]/agents/[agentId]/page_client-reference-manifest.js +1 -1
  515. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/[teamId]/page/build-manifest.json +4 -4
  516. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/[teamId]/page.js +1 -1
  517. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/[teamId]/page.js.nft.json +1 -1
  518. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/[teamId]/page_client-reference-manifest.js +1 -1
  519. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/adopt/page/build-manifest.json +4 -4
  520. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/adopt/page.js +1 -1
  521. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/adopt/page.js.nft.json +1 -1
  522. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/adopt/page_client-reference-manifest.js +1 -1
  523. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/new/page/build-manifest.json +4 -4
  524. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/new/page.js +1 -1
  525. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/new/page.js.nft.json +1 -1
  526. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/new/page_client-reference-manifest.js +1 -1
  527. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/page/build-manifest.json +4 -4
  528. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/page.js +1 -1
  529. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/page.js.nft.json +1 -1
  530. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/page_client-reference-manifest.js +1 -1
  531. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/replace/page/build-manifest.json +4 -4
  532. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/replace/page.js +1 -1
  533. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/replace/page.js.nft.json +1 -1
  534. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/replace/page_client-reference-manifest.js +1 -1
  535. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/terminal/page/build-manifest.json +4 -4
  536. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/terminal/page.js +1 -1
  537. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/terminal/page.js.nft.json +1 -1
  538. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/terminal/page_client-reference-manifest.js +1 -1
  539. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/thread/[threadId]/page/build-manifest.json +4 -4
  540. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/thread/[threadId]/page.js +1 -1
  541. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/thread/[threadId]/page.js.nft.json +1 -1
  542. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/thread/[threadId]/page_client-reference-manifest.js +1 -1
  543. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/tracking/[tracker]/page/build-manifest.json +4 -4
  544. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/tracking/[tracker]/page.js +1 -1
  545. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/tracking/[tracker]/page.js.nft.json +1 -1
  546. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/tracking/[tracker]/page_client-reference-manifest.js +1 -1
  547. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/tracking/connect/page/build-manifest.json +4 -4
  548. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/tracking/connect/page.js +1 -1
  549. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/tracking/connect/page.js.nft.json +1 -1
  550. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/tracking/connect/page_client-reference-manifest.js +1 -1
  551. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/tracking/page/build-manifest.json +4 -4
  552. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/tracking/page.js +1 -1
  553. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/tracking/page.js.nft.json +1 -1
  554. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/tracking/page_client-reference-manifest.js +1 -1
  555. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/page/build-manifest.json +4 -4
  556. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/page.js +1 -1
  557. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/page.js.nft.json +1 -1
  558. package/cloud-runtime/standalone/apps/local/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  559. package/cloud-runtime/standalone/apps/local/.next/server/app/projects.html +2 -2
  560. package/cloud-runtime/standalone/apps/local/.next/server/app/projects.rsc +3 -3
  561. package/cloud-runtime/standalone/apps/local/.next/server/app/projects.segments/_full.segment.rsc +3 -3
  562. package/cloud-runtime/standalone/apps/local/.next/server/app/projects.segments/_head.segment.rsc +1 -1
  563. package/cloud-runtime/standalone/apps/local/.next/server/app/projects.segments/_index.segment.rsc +2 -2
  564. package/cloud-runtime/standalone/apps/local/.next/server/app/projects.segments/_tree.segment.rsc +2 -2
  565. package/cloud-runtime/standalone/apps/local/.next/server/app/projects.segments/projects/__PAGE__.segment.rsc +2 -2
  566. package/cloud-runtime/standalone/apps/local/.next/server/app/projects.segments/projects.segment.rsc +1 -1
  567. package/cloud-runtime/standalone/apps/local/.next/server/app/setup/page/build-manifest.json +4 -4
  568. package/cloud-runtime/standalone/apps/local/.next/server/app/setup/page.js +1 -1
  569. package/cloud-runtime/standalone/apps/local/.next/server/app/setup/page.js.nft.json +1 -1
  570. package/cloud-runtime/standalone/apps/local/.next/server/app/setup/page_client-reference-manifest.js +1 -1
  571. package/cloud-runtime/standalone/apps/local/.next/server/app/setup.html +2 -2
  572. package/cloud-runtime/standalone/apps/local/.next/server/app/setup.rsc +2 -2
  573. package/cloud-runtime/standalone/apps/local/.next/server/app/setup.segments/_full.segment.rsc +2 -2
  574. package/cloud-runtime/standalone/apps/local/.next/server/app/setup.segments/_head.segment.rsc +1 -1
  575. package/cloud-runtime/standalone/apps/local/.next/server/app/setup.segments/_index.segment.rsc +2 -2
  576. package/cloud-runtime/standalone/apps/local/.next/server/app/setup.segments/_tree.segment.rsc +2 -2
  577. package/cloud-runtime/standalone/apps/local/.next/server/app/setup.segments/setup/__PAGE__.segment.rsc +1 -1
  578. package/cloud-runtime/standalone/apps/local/.next/server/app/setup.segments/setup.segment.rsc +1 -1
  579. package/cloud-runtime/standalone/apps/local/.next/server/app/status/page/build-manifest.json +4 -4
  580. package/cloud-runtime/standalone/apps/local/.next/server/app/status/page.js +1 -1
  581. package/cloud-runtime/standalone/apps/local/.next/server/app/status/page.js.nft.json +1 -1
  582. package/cloud-runtime/standalone/apps/local/.next/server/app/status/page_client-reference-manifest.js +1 -1
  583. package/cloud-runtime/standalone/apps/local/.next/server/app/status.html +2 -2
  584. package/cloud-runtime/standalone/apps/local/.next/server/app/status.rsc +2 -2
  585. package/cloud-runtime/standalone/apps/local/.next/server/app/status.segments/_full.segment.rsc +2 -2
  586. package/cloud-runtime/standalone/apps/local/.next/server/app/status.segments/_head.segment.rsc +1 -1
  587. package/cloud-runtime/standalone/apps/local/.next/server/app/status.segments/_index.segment.rsc +2 -2
  588. package/cloud-runtime/standalone/apps/local/.next/server/app/status.segments/_tree.segment.rsc +2 -2
  589. package/cloud-runtime/standalone/apps/local/.next/server/app/status.segments/status/__PAGE__.segment.rsc +1 -1
  590. package/cloud-runtime/standalone/apps/local/.next/server/app/status.segments/status.segment.rsc +1 -1
  591. package/cloud-runtime/standalone/apps/local/.next/server/app-paths-manifest.json +17 -0
  592. package/cloud-runtime/standalone/apps/local/.next/server/chunks/0da96_local__next-internal_server_app_api_github_prs_context_route_actions_e8dab062.js +3 -0
  593. package/cloud-runtime/standalone/apps/local/.next/server/chunks/0da96_local__next-internal_server_app_api_github_repos_sync_route_actions_bdb9499c.js +3 -0
  594. package/cloud-runtime/standalone/apps/local/.next/server/chunks/0da96_local__next-internal_server_app_api_github_user-repos_route_actions_47aff2d8.js +3 -0
  595. package/cloud-runtime/standalone/apps/local/.next/server/chunks/30bdd_server_app_api_projects_[id]_workspace_[entryId]_route_actions_3bb3b213.js +3 -0
  596. package/cloud-runtime/standalone/apps/local/.next/server/chunks/9fb8c_next_dist_esm_build_templates_app-route_0b17e5ca.js +1 -1
  597. package/cloud-runtime/standalone/apps/local/.next/server/chunks/9fb8c_next_dist_esm_build_templates_app-route_10446672.js +2 -2
  598. package/cloud-runtime/standalone/apps/local/.next/server/chunks/9fb8c_next_dist_esm_build_templates_app-route_11b3f4a4.js +3 -0
  599. package/cloud-runtime/standalone/apps/local/.next/server/chunks/9fb8c_next_dist_esm_build_templates_app-route_31b5cff3.js +1 -1
  600. package/cloud-runtime/standalone/apps/local/.next/server/chunks/9fb8c_next_dist_esm_build_templates_app-route_33c05c6b.js +1 -1
  601. package/cloud-runtime/standalone/apps/local/.next/server/chunks/9fb8c_next_dist_esm_build_templates_app-route_590e0ad5.js +1 -1
  602. package/cloud-runtime/standalone/apps/local/.next/server/chunks/9fb8c_next_dist_esm_build_templates_app-route_5e83e3ee.js +7 -7
  603. package/cloud-runtime/standalone/apps/local/.next/server/chunks/9fb8c_next_dist_esm_build_templates_app-route_8401c4c5.js +1 -1
  604. package/cloud-runtime/standalone/apps/local/.next/server/chunks/9fb8c_next_dist_esm_build_templates_app-route_952a9017.js +1 -1
  605. package/cloud-runtime/standalone/apps/local/.next/server/chunks/9fb8c_next_dist_esm_build_templates_app-route_a36acede.js +1 -1
  606. package/cloud-runtime/standalone/apps/local/.next/server/chunks/9fb8c_next_dist_esm_build_templates_app-route_ba77f4ed.js +9 -0
  607. package/cloud-runtime/standalone/apps/local/.next/server/chunks/9fb8c_next_dist_esm_build_templates_app-route_ffc6e69f.js +1 -1
  608. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__004cdace._.js +3 -0
  609. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__01811d0e._.js +3 -0
  610. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__03585144._.js +1 -1
  611. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__06575fba._.js +3 -0
  612. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__07bee638._.js +3 -0
  613. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__09088e21._.js +70 -0
  614. package/cloud-runtime/standalone/apps/local/.next/server/chunks/{[root-of-the-server]__66e15f88._.js → [root-of-the-server]__0affc5ad._.js} +3 -3
  615. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__0fbbaf2d._.js +1 -1
  616. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__0fd3df61._.js +80 -0
  617. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__10aebc68._.js +3 -0
  618. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__10f1a668._.js +3 -0
  619. package/cloud-runtime/standalone/apps/local/.next/server/chunks/{[root-of-the-server]__73f80c8c._.js → [root-of-the-server]__1186e538._.js} +2 -2
  620. package/cloud-runtime/standalone/apps/local/.next/server/chunks/{[root-of-the-server]__5da8d281._.js → [root-of-the-server]__1321970e._.js} +2 -2
  621. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__1563ebff._.js +18 -0
  622. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__15a6925d._.js +1 -1
  623. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__15ec4cf6._.js +3 -0
  624. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__18232fa9._.js +13 -0
  625. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__1cd900f2._.js +3 -0
  626. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__1e1f2b15._.js +3 -0
  627. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__23655e4b._.js +3 -3
  628. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__25d281e7._.js +70 -0
  629. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__2b07507a._.js +18 -0
  630. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__2c148e2b._.js +1 -1
  631. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__2c2680ad._.js +3 -0
  632. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__302a3088._.js +3 -0
  633. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__31e86466._.js +150 -0
  634. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__33c6152d._.js +3 -0
  635. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__34f3f619._.js +3 -0
  636. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__38191a64._.js +3 -0
  637. package/cloud-runtime/standalone/apps/local/.next/server/chunks/{[root-of-the-server]__2ff70366._.js → [root-of-the-server]__3a8de8a3._.js} +2 -2
  638. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__3db8e17d._.js +3 -0
  639. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__3ef7d945._.js +3 -0
  640. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__3fdd57cb._.js +3 -0
  641. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__4206f32c._.js +3 -0
  642. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__45af4365._.js +3 -0
  643. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__460ae7b6._.js +136 -0
  644. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__4848a602._.js +80 -0
  645. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__4adce5ec._.js +7 -0
  646. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__4b01d4cf._.js +3 -0
  647. package/cloud-runtime/standalone/apps/local/.next/server/chunks/{[root-of-the-server]__461c7102._.js → [root-of-the-server]__4ea9a658._.js} +2 -2
  648. package/cloud-runtime/standalone/apps/local/.next/server/chunks/{[root-of-the-server]__b91700c0._.js → [root-of-the-server]__4ee88c24._.js} +2 -2
  649. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__4fb1d912._.js +3 -0
  650. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__520d4a7f._.js +3 -0
  651. package/cloud-runtime/standalone/apps/local/.next/server/chunks/{[root-of-the-server]__39baf5f6._.js → [root-of-the-server]__550f4c1c._.js} +1 -1
  652. package/cloud-runtime/standalone/apps/local/.next/server/chunks/{[root-of-the-server]__21721841._.js → [root-of-the-server]__56c4dfbd._.js} +1 -1
  653. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__59a87972._.js +3 -0
  654. package/cloud-runtime/standalone/apps/local/.next/server/chunks/{[root-of-the-server]__c07d22ff._.js → [root-of-the-server]__5b22f93a._.js} +2 -2
  655. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__5d5c71d1._.js +13 -0
  656. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__6003d4d7._.js +140 -0
  657. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__60e89305._.js +129 -0
  658. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__6163ad51._.js +3 -0
  659. package/cloud-runtime/standalone/apps/local/.next/server/chunks/{[root-of-the-server]__ee43b5b0._.js → [root-of-the-server]__61c40dc9._.js} +2 -2
  660. package/cloud-runtime/standalone/apps/local/.next/server/chunks/{[root-of-the-server]__e237981c._.js → [root-of-the-server]__6465e9c6._.js} +2 -2
  661. package/cloud-runtime/standalone/apps/local/.next/server/chunks/{[root-of-the-server]__6edb829d._.js → [root-of-the-server]__66437bd3._.js} +2 -2
  662. package/cloud-runtime/standalone/apps/local/.next/server/chunks/{[root-of-the-server]__c3d88cac._.js → [root-of-the-server]__665fff24._.js} +2 -2
  663. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__66def702._.js +3 -0
  664. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__683b7ad7._.js +8 -0
  665. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__694817d0._.js +3 -0
  666. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__6d4e08bb._.js +6 -0
  667. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__6d6da42e._.js +3 -0
  668. package/cloud-runtime/standalone/apps/local/.next/server/chunks/{[root-of-the-server]__c3408141._.js → [root-of-the-server]__6dd68c9c._.js} +2 -2
  669. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__6ee2d998._.js +136 -0
  670. package/cloud-runtime/standalone/apps/local/.next/server/chunks/{[root-of-the-server]__7d6e19c2._.js → [root-of-the-server]__71fc195c._.js} +4 -4
  671. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__736d5859._.js +3 -0
  672. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__77c3dc54._.js +3 -0
  673. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__7dabddde._.js +4 -0
  674. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__7e56de3d._.js +70 -0
  675. package/cloud-runtime/standalone/apps/local/.next/server/chunks/{[root-of-the-server]__caa79472._.js → [root-of-the-server]__7f6e383e._.js} +2 -2
  676. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__7fe442b7._.js +3 -0
  677. package/cloud-runtime/standalone/apps/local/.next/server/chunks/{[root-of-the-server]__97b5dbf7._.js → [root-of-the-server]__807a1638._.js} +2 -2
  678. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__82b9b3ca._.js +140 -0
  679. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__8680c9de._.js +9 -0
  680. package/cloud-runtime/standalone/apps/local/.next/server/chunks/{[root-of-the-server]__8cb4fb94._.js → [root-of-the-server]__870fac73._.js} +2 -2
  681. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__87c2a907._.js +1 -1
  682. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__8917bc4c._.js +1 -1
  683. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__8caf9c04._.js +3 -0
  684. package/cloud-runtime/standalone/apps/local/.next/server/chunks/{[root-of-the-server]__f9eff837._.js → [root-of-the-server]__8ddbf4ca._.js} +2 -2
  685. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__9079a20c._.js +3 -0
  686. package/cloud-runtime/standalone/apps/local/.next/server/chunks/{[root-of-the-server]__69a60d71._.js → [root-of-the-server]__92d34a52._.js} +2 -2
  687. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__94f42197._.js +3 -0
  688. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__967a2388._.js +3 -0
  689. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__96a659e4._.js +3 -0
  690. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__9cadc914._.js +70 -0
  691. package/cloud-runtime/standalone/apps/local/.next/server/chunks/{[root-of-the-server]__3b27260f._.js → [root-of-the-server]__9cb1dc55._.js} +2 -2
  692. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__9e1746b9._.js +129 -0
  693. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__a1dca50c._.js +3 -0
  694. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__a53b564a._.js +70 -0
  695. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__ab150f86._.js +3 -0
  696. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__abf61695._.js +13 -0
  697. package/cloud-runtime/standalone/apps/local/.next/server/chunks/{[root-of-the-server]__3a038592._.js → [root-of-the-server]__af70f062._.js} +2 -2
  698. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__b00a5099._.js +1 -1
  699. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__b1488939._.js +156 -0
  700. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__b630ee50._.js +70 -0
  701. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__b9538dea._.js +3 -0
  702. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__bc26758f._.js +3 -0
  703. package/cloud-runtime/standalone/apps/local/.next/server/chunks/{[root-of-the-server]__2d6f22a3._.js → [root-of-the-server]__bdc396a9._.js} +2 -2
  704. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__bed6045c._.js +13 -0
  705. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__befbac3e._.js +3 -0
  706. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__c0703065._.js +3 -0
  707. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__c077a33b._.js +121 -0
  708. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__c1581152._.js +3 -0
  709. package/cloud-runtime/standalone/apps/local/.next/server/chunks/{[root-of-the-server]__240d98b0._.js → [root-of-the-server]__c26548ed._.js} +2 -2
  710. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__c3188470._.js +3 -3
  711. package/cloud-runtime/standalone/apps/local/.next/server/chunks/{[root-of-the-server]__f598d976._.js → [root-of-the-server]__c4855d04._.js} +2 -2
  712. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__c5f7b34e._.js +3 -0
  713. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__c7e936d4._.js +3 -0
  714. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__c936d679._.js +6 -6
  715. package/cloud-runtime/standalone/apps/local/.next/server/chunks/{[root-of-the-server]__5af898cb._.js → [root-of-the-server]__ce65d2ba._.js} +2 -2
  716. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__cf474787._.js +76 -0
  717. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__cf7c65b9._.js +3 -0
  718. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__d020d321._.js +69 -0
  719. package/cloud-runtime/standalone/apps/local/.next/server/chunks/{[root-of-the-server]__fb694089._.js → [root-of-the-server]__d4a50292._.js} +2 -2
  720. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__d54c8dfb._.js +13 -0
  721. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__d870d17d._.js +113 -0
  722. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__dacdd4c9._.js +1 -1
  723. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__ded6736b._.js +3 -0
  724. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__e1dcbfd8._.js +3 -0
  725. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__e267d8be._.js +3 -0
  726. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__e4633ba9._.js +8 -0
  727. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__e4afa482._.js +3 -0
  728. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__e71a8a43._.js +13 -0
  729. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__eb3872bd._.js +3 -0
  730. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__eb77f5f8._.js +11 -0
  731. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__eb7e055a._.js +113 -0
  732. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__eb9921fb._.js +3 -0
  733. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__eca53a52._.js +3 -0
  734. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__f107289b._.js +18 -0
  735. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__f158717d._.js +3 -0
  736. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__f1a754d0._.js +3 -0
  737. package/cloud-runtime/standalone/apps/local/.next/server/chunks/{[root-of-the-server]__9e9149cd._.js → [root-of-the-server]__f48224f7._.js} +2 -2
  738. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__f6074a7f._.js +70 -0
  739. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__f6e2a463._.js +3 -0
  740. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__f7a74c7d._.js +3 -0
  741. package/cloud-runtime/standalone/apps/local/.next/server/chunks/{[root-of-the-server]__8269cb17._.js → [root-of-the-server]__f7e2f962._.js} +2 -2
  742. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__f9d933dc._.js +1 -1
  743. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__fce2c984._.js +13 -0
  744. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__fd504704._.js +3 -0
  745. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__fdc68a08._.js +3 -0
  746. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__fe3fc98e._.js +3 -0
  747. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__fe4b2e4e._.js +3 -0
  748. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__ffc62f70._.js +70 -0
  749. package/cloud-runtime/standalone/apps/local/.next/server/chunks/_16bb55a0._.js +2 -2
  750. package/cloud-runtime/standalone/apps/local/.next/server/chunks/_603ba418._.js +2 -2
  751. package/cloud-runtime/standalone/apps/local/.next/server/chunks/_79080c47._.js +3 -0
  752. package/cloud-runtime/standalone/apps/local/.next/server/chunks/{node_modules_d2858615._.js → _9c1d28d4._.js} +2 -2
  753. package/cloud-runtime/standalone/apps/local/.next/server/chunks/_eb019230._.js +2 -2
  754. package/cloud-runtime/standalone/apps/local/.next/server/chunks/{apps_local_5e5f36c4._.js → apps_local_09d85861._.js} +1 -1
  755. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_1d99e7a5._.js +20 -0
  756. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_202a2565._.js +262 -0
  757. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_2124f905._.js +6 -6
  758. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_22ab9b7c._.js +1 -1
  759. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_25136564._.js +1 -1
  760. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_29919ba4._.js +1 -1
  761. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_29a06140._.js +3 -0
  762. package/cloud-runtime/standalone/apps/local/.next/server/chunks/{apps_local_f8b3abae._.js → apps_local_2caf4398._.js} +1 -1
  763. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_2e6439a2._.js +1 -1
  764. package/cloud-runtime/standalone/apps/local/.next/server/chunks/{apps_local_e1f4d9ad._.js → apps_local_31ca7a35._.js} +1 -1
  765. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_4c70e287._.js +1 -1
  766. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_4dec65a2._.js +1 -1
  767. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_50e3a6e3._.js +5 -5
  768. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_520e6344._.js +7 -7
  769. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_56a2544c._.js +122 -0
  770. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_5843a1a1._.js +122 -0
  771. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_5b3f1f41._.js +1 -1
  772. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_65843354._.js +14 -14
  773. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_6c0de567._.js +8 -0
  774. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_9168ed82._.js +1 -1
  775. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_9726bdb7._.js +1 -1
  776. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_9e2c9766._.js +8 -0
  777. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local__next-internal_server_app_api_github_issues_route_actions_21cb97ab.js +3 -0
  778. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local__next-internal_server_app_api_github_prs_link_route_actions_8ac048a5.js +3 -0
  779. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local__next-internal_server_app_api_github_prs_route_actions_20244d74.js +3 -0
  780. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local__next-internal_server_app_api_github_prs_seed_route_actions_7154cd78.js +3 -0
  781. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local__next-internal_server_app_api_github_repos_route_actions_73786015.js +3 -0
  782. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local__next-internal_server_app_api_teams_templates_route_actions_13f2c3d6.js +3 -0
  783. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local__next-internal_server_app_api_webhooks_[id]_route_actions_1c0129f8.js +3 -0
  784. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local__next-internal_server_app_api_webhooks_route_actions_a60f4dfd.js +3 -0
  785. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_a15e73a6._.js +5 -5
  786. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_bd72806a._.js +122 -0
  787. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_c101ba9e._.js +1 -1
  788. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_c47f30a7._.js +1 -1
  789. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_c9c6ee26._.js +1 -1
  790. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_d256aa32._.js +1 -1
  791. package/cloud-runtime/standalone/apps/local/.next/server/chunks/{apps_local_bb07a2e3._.js → apps_local_e27f666b._.js} +1 -1
  792. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_e55f28ef._.js +18 -18
  793. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_ee8ff181._.js +1 -1
  794. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_lib_0857971b._.js +1 -1
  795. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_lib_3e2ced95._.js +1 -1
  796. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_lib_5ab8f104._.js +34 -0
  797. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_lib_6bb79a1d._.js +1 -1
  798. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_lib_6bd3d8a2._.js +10 -10
  799. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_lib_8bf5d476._.js +1 -1
  800. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_lib_929fd1a3._.js +1 -1
  801. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_lib_9663f7e9._.js +1 -1
  802. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_lib_agent-participants_ts_49a308c0._.js +1 -1
  803. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_lib_cli-runner_ts_ead5489c._.js +17 -17
  804. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_lib_d268503a._.js +10 -10
  805. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_lib_db_ts_77c23d6c._.js +3 -0
  806. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_lib_ee6eaa28._.js +152 -0
  807. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_lib_orchestrator_chat-processor_ts_46384f36._.js +26 -22
  808. package/cloud-runtime/standalone/apps/local/.next/server/chunks/{apps_local_lib_sqlite-query-adapter_ts_7ee03cea._.js → apps_local_lib_sqlite-query-adapter_ts_5b6033d8._.js} +1 -1
  809. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_lib_sqlite-query-adapter_ts_7b90c71f._.js +42 -21
  810. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_lib_sqlite-query-adapter_ts_a3d4d8f4._.js +37 -16
  811. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_src_automations_index_ts_d2c1c6c8._.js +3 -3
  812. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_src_graph_api-route-utils_ts_b3e10657._.js +1 -1
  813. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_src_graph_ca6c3a8b._.js +14 -14
  814. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_src_graph_schedule-runner_ts_2e38589d._.js +4 -4
  815. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_src_prompt-scheduler_get-store_ts_918ec858._.js +7 -7
  816. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ebff2__next-internal_server_app_api_github_prs_for-target_route_actions_9d302c68.js +3 -0
  817. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ebff2__next-internal_server_app_api_projects_[id]_workspace_route_actions_6556c571.js +3 -0
  818. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/083c9_next-internal_server_app_integrations_github_select-repos_page_actions_fc7f5a52.js +3 -0
  819. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/9fb8c_lucide-react_dist_esm_icons_8c8ee1bc._.js +3 -0
  820. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/9fb8c_lucide-react_dist_esm_icons_circle-check_eafd6d92.js +3 -0
  821. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/{9fb8c_next_f7451f50._.js → 9fb8c_next_b797d184._.js} +2 -2
  822. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__23838f87._.js +3 -0
  823. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__263b7091._.js +5 -0
  824. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__3b4708d5._.js +3 -0
  825. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__49cbf624._.js +3 -0
  826. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__49cdd178._.js +3 -0
  827. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__4bf7d5b9._.js +3 -0
  828. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__55ed4ff9._.js +3 -0
  829. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__7752d2d2._.js +3 -0
  830. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__9193284e._.js +3 -0
  831. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__95ce39fc._.js +3 -0
  832. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__a61463b8._.js +7 -0
  833. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__bb42490f._.js +3 -0
  834. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__ca35cea0._.js +3 -0
  835. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__e8c6a1f1._.js +3 -0
  836. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/{[root-of-the-server]__b165b26a._.js → [root-of-the-server]__ebe36ac5._.js} +2 -2
  837. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__ee9351f9._.js +3 -0
  838. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__f66530a0._.js +3 -0
  839. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__f81509ea._.js +3 -0
  840. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/_0ecd68e8._.js +3 -0
  841. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/_347d036d._.js +7 -0
  842. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/_5c140c38._.js +7 -0
  843. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/_7863b9d3._.js +3 -0
  844. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/_e120fc49._.js +3 -0
  845. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/_f99c22fd._.js +3 -0
  846. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_093aa68d._.js +3 -0
  847. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_28a1430e._.js +3 -0
  848. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_30d021de._.js +3 -0
  849. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_3b90cb76._.js +18 -0
  850. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_41ca745c._.js +4 -0
  851. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_620cb123._.js +3 -0
  852. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_7d1abfbf._.js +18 -0
  853. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_8969d6a5._.js +3 -0
  854. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_988d29c0._.js +1 -1
  855. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_9f36c765._.js +3 -0
  856. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local__next-internal_server_app_projects_[slug]_prs_page_actions_f636afc6.js +3 -0
  857. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_a0dd6e69._.js +4 -0
  858. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_app_projects_[slug]_layout_tsx_3bb31889._.js +1 -1
  859. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_app_projects_[slug]_page_tsx_76330306._.js +1 -1
  860. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_app_projects_[slug]_teams_[teamId]_page_tsx_6dcfdd52._.js +1 -1
  861. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_app_projects_[slug]_teams_page_tsx_24cd120e._.js +1 -1
  862. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_app_projects_[slug]_terminal_page_tsx_0933eeaf._.js +1 -1
  863. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_app_projects_[slug]_thread_[threadId]_page_tsx_2a1d1d5e._.js +1 -1
  864. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_app_projects_page_tsx_b5cec607._.js +2 -2
  865. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_b4faeb00._.js +18 -0
  866. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_components_PromptJobBoard_tsx_281b2873._.js +8 -0
  867. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_components_TrackerBoard_tsx_98970bab._.js +18 -16
  868. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_components_chat-ui_75dee220._.js +11 -0
  869. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/{apps_local_components_chat-ui_f0554cb4._.js → apps_local_components_chat-ui_d4c3d021._.js} +2 -2
  870. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_components_projects_ProjectObjectivesWorkspace_tsx_751ab3d3._.js +6 -6
  871. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_e322e178._.js +18 -0
  872. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_eec36ab6._.js +3 -0
  873. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_fed01721._.js +3 -0
  874. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_ffd2e9b4._.js +4 -0
  875. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/ebff2__next-internal_server_app_projects_[slug]_notifications_page_actions_899b4c4c.js +3 -0
  876. package/cloud-runtime/standalone/apps/local/.next/server/edge/chunks/[root-of-the-server]__cc2760a4._.js +1 -1
  877. package/cloud-runtime/standalone/apps/local/.next/server/functions-config-manifest.json +12 -0
  878. package/cloud-runtime/standalone/apps/local/.next/server/middleware-build-manifest.js +4 -4
  879. package/cloud-runtime/standalone/apps/local/.next/server/middleware-manifest.json +5 -5
  880. package/cloud-runtime/standalone/apps/local/.next/server/next-font-manifest.js +1 -1
  881. package/cloud-runtime/standalone/apps/local/.next/server/next-font-manifest.json +12 -0
  882. package/cloud-runtime/standalone/apps/local/.next/server/pages/404.html +2 -2
  883. package/cloud-runtime/standalone/apps/local/.next/server/pages/500.html +2 -2
  884. package/cloud-runtime/standalone/apps/local/.next/server/server-reference-manifest.js +1 -1
  885. package/cloud-runtime/standalone/apps/local/.next/server/server-reference-manifest.json +1 -1
  886. package/cloud-runtime/standalone/apps/local/.next/static/chunks/1600dd6ff8607d8f.js +16 -0
  887. package/cloud-runtime/standalone/apps/local/.next/static/chunks/1d8b2726979134e5.js +16 -0
  888. package/cloud-runtime/standalone/apps/local/.next/static/chunks/1fbcd40dccee738f.js +16 -0
  889. package/cloud-runtime/standalone/apps/local/.next/static/chunks/34483580b9496b00.js +1 -0
  890. package/cloud-runtime/standalone/apps/local/.next/static/chunks/37879a60d670876c.js +1 -0
  891. package/cloud-runtime/standalone/apps/local/.next/static/chunks/48feca51cf97c8a7.js +1 -0
  892. package/cloud-runtime/standalone/apps/local/.next/static/chunks/52a7b1805199c6fb.js +1 -0
  893. package/cloud-runtime/standalone/apps/local/.next/static/chunks/5b919825bc31a59e.js +1 -0
  894. package/cloud-runtime/standalone/apps/local/.next/static/chunks/62385f0f137d16a0.js +1 -0
  895. package/cloud-runtime/standalone/apps/local/.next/static/chunks/692103d55fcd0328.js +5 -0
  896. package/cloud-runtime/standalone/apps/local/.next/static/chunks/6952b44e247d594a.js +16 -0
  897. package/cloud-runtime/standalone/apps/local/.next/static/chunks/6bfdc40a24e65ca2.js +1 -0
  898. package/cloud-runtime/standalone/apps/local/.next/static/chunks/6ffcd12eabd7c65e.js +16 -0
  899. package/cloud-runtime/standalone/apps/local/.next/static/chunks/72b4109642bf21f4.js +3 -0
  900. package/cloud-runtime/standalone/apps/local/.next/static/chunks/74e3a3e93be78db8.js +48 -0
  901. package/cloud-runtime/standalone/apps/local/.next/static/chunks/7ff071e8a33d2fd8.js +16 -0
  902. package/cloud-runtime/standalone/apps/local/.next/static/chunks/8966871bc99cb968.js +1 -0
  903. package/cloud-runtime/standalone/apps/local/.next/static/chunks/8d8fe711583a59f0.js +6 -0
  904. package/cloud-runtime/standalone/apps/local/.next/static/chunks/92467c495ad08a85.js +5 -0
  905. package/cloud-runtime/standalone/apps/local/.next/static/chunks/941f7f3626ec442c.js +16 -0
  906. package/cloud-runtime/standalone/apps/local/.next/static/chunks/{d5c307b52fd87861.js → 94a66d2d19268d25.js} +1 -1
  907. package/cloud-runtime/standalone/apps/local/.next/static/chunks/{8bd9cddc3e268c43.js → aa3029ae0b62f930.js} +1 -1
  908. package/cloud-runtime/standalone/apps/local/.next/static/chunks/add53c2fe147af75.css +1 -0
  909. package/cloud-runtime/standalone/apps/local/.next/static/chunks/b35865f64b56d6f4.js +1 -0
  910. package/cloud-runtime/standalone/apps/local/.next/static/chunks/c00eea0c6533548d.js +1 -0
  911. package/cloud-runtime/standalone/apps/local/.next/static/chunks/d662272e49df1950.js +20 -0
  912. package/cloud-runtime/standalone/apps/local/.next/static/chunks/e0d68c6af17c8c87.js +1 -0
  913. package/cloud-runtime/standalone/apps/local/.next/static/chunks/e6d4118b7c32d11c.js +1 -0
  914. package/cloud-runtime/standalone/apps/local/.next/static/chunks/edb0e1ed5398cec6.js +4 -0
  915. package/cloud-runtime/standalone/apps/local/.next/static/chunks/f154e2ed7753f8ee.js +16 -0
  916. package/cloud-runtime/standalone/apps/local/.next/static/chunks/{turbopack-5fc3e551c6965dd2.js → turbopack-87f23485587f08c3.js} +2 -2
  917. package/cloud-runtime/standalone/apps/local/app/api/agent-specs/pull/route.ts +2 -1
  918. package/cloud-runtime/standalone/apps/local/app/api/agent-specs/route.ts +2 -1
  919. package/cloud-runtime/standalone/apps/local/app/api/agents/[id]/profile/route.ts +2 -1
  920. package/cloud-runtime/standalone/apps/local/app/api/agents/[id]/skills/route.ts +7 -3
  921. package/cloud-runtime/standalone/apps/local/app/api/agents/export/route.ts +6 -2
  922. package/cloud-runtime/standalone/apps/local/app/api/automations/create/route.ts +6 -2
  923. package/cloud-runtime/standalone/apps/local/app/api/automations/route.ts +2 -1
  924. package/cloud-runtime/standalone/apps/local/app/api/chat/route.ts +17 -1
  925. package/cloud-runtime/standalone/apps/local/app/api/chat-runs/[id]/signal/route.ts +4 -1
  926. package/cloud-runtime/standalone/apps/local/app/api/domains/[id]/route.ts +2 -1
  927. package/cloud-runtime/standalone/apps/local/app/api/domains/route.ts +2 -1
  928. package/cloud-runtime/standalone/apps/local/app/api/filesystem/analyze/route.ts +2 -1
  929. package/cloud-runtime/standalone/apps/local/app/api/github/issues/route.ts +30 -0
  930. package/cloud-runtime/standalone/apps/local/app/api/github/prs/context/route.ts +46 -0
  931. package/cloud-runtime/standalone/apps/local/app/api/github/prs/for-target/route.ts +41 -0
  932. package/cloud-runtime/standalone/apps/local/app/api/github/prs/link/route.ts +144 -0
  933. package/cloud-runtime/standalone/apps/local/app/api/github/prs/route.ts +42 -0
  934. package/cloud-runtime/standalone/apps/local/app/api/github/prs/seed/route.ts +254 -0
  935. package/cloud-runtime/standalone/apps/local/app/api/github/repos/route.ts +69 -0
  936. package/cloud-runtime/standalone/apps/local/app/api/github/repos/sync/route.ts +56 -0
  937. package/cloud-runtime/standalone/apps/local/app/api/github/user-repos/route.ts +72 -0
  938. package/cloud-runtime/standalone/apps/local/app/api/history/route.ts +2 -1
  939. package/cloud-runtime/standalone/apps/local/app/api/knowledge-notes/route.ts +7 -3
  940. package/cloud-runtime/standalone/apps/local/app/api/learnings/route.ts +4 -3
  941. package/cloud-runtime/standalone/apps/local/app/api/memories/route.ts +3 -2
  942. package/cloud-runtime/standalone/apps/local/app/api/migrate/workspaces-to-projects/route.ts +2 -1
  943. package/cloud-runtime/standalone/apps/local/app/api/orchestrator/tasks/[taskId]/cancel/route.ts +6 -2
  944. package/cloud-runtime/standalone/apps/local/app/api/orchestrator/tasks/[taskId]/signal/route.ts +6 -2
  945. package/cloud-runtime/standalone/apps/local/app/api/orchestrator/tasks/[taskId]/start/route.ts +2 -1
  946. package/cloud-runtime/standalone/apps/local/app/api/orchestrator/tasks/[taskId]/status/route.ts +2 -1
  947. package/cloud-runtime/standalone/apps/local/app/api/participants/route.ts +15 -7
  948. package/cloud-runtime/standalone/apps/local/app/api/projects/[id]/agents/route.ts +12 -6
  949. package/cloud-runtime/standalone/apps/local/app/api/projects/[id]/agents/unassigned/route.ts +2 -1
  950. package/cloud-runtime/standalone/apps/local/app/api/projects/[id]/migrate-v2/route.ts +4 -1
  951. package/cloud-runtime/standalone/apps/local/app/api/projects/[id]/objectives/[objectiveId]/activities/route.ts +3 -2
  952. package/cloud-runtime/standalone/apps/local/app/api/projects/[id]/objectives/[objectiveId]/notes/[noteId]/route.ts +4 -3
  953. package/cloud-runtime/standalone/apps/local/app/api/projects/[id]/objectives/[objectiveId]/notes/route.ts +3 -2
  954. package/cloud-runtime/standalone/apps/local/app/api/projects/[id]/objectives/[objectiveId]/route.ts +3 -2
  955. package/cloud-runtime/standalone/apps/local/app/api/projects/[id]/objectives/[objectiveId]/scheduled-tasks/route.ts +3 -2
  956. package/cloud-runtime/standalone/apps/local/app/api/projects/[id]/objectives/[objectiveId]/worker/route.ts +3 -2
  957. package/cloud-runtime/standalone/apps/local/app/api/projects/[id]/route.ts +5 -4
  958. package/cloud-runtime/standalone/apps/local/app/api/projects/[id]/skills/route.ts +8 -4
  959. package/cloud-runtime/standalone/apps/local/app/api/projects/[id]/teams/[teamId]/agents/route.ts +8 -4
  960. package/cloud-runtime/standalone/apps/local/app/api/projects/[id]/teams/[teamId]/route.ts +8 -4
  961. package/cloud-runtime/standalone/apps/local/app/api/projects/[id]/teams/export/route.ts +2 -1
  962. package/cloud-runtime/standalone/apps/local/app/api/projects/[id]/teams/import/route.ts +2 -1
  963. package/cloud-runtime/standalone/apps/local/app/api/projects/[id]/teams/route.ts +7 -3
  964. package/cloud-runtime/standalone/apps/local/app/api/projects/[id]/threads/route.ts +8 -4
  965. package/cloud-runtime/standalone/apps/local/app/api/projects/[id]/variables/[key]/route.ts +2 -1
  966. package/cloud-runtime/standalone/apps/local/app/api/projects/[id]/variables/route.ts +8 -4
  967. package/cloud-runtime/standalone/apps/local/app/api/projects/[id]/workspace/[entryId]/route.ts +67 -0
  968. package/cloud-runtime/standalone/apps/local/app/api/projects/[id]/workspace/route.ts +75 -0
  969. package/cloud-runtime/standalone/apps/local/app/api/projects/objective-metadata.ts +2 -1
  970. package/cloud-runtime/standalone/apps/local/app/api/projects/payload.ts +23 -1
  971. package/cloud-runtime/standalone/apps/local/app/api/projects/route.ts +3 -2
  972. package/cloud-runtime/standalone/apps/local/app/api/prompt-jobs/[id]/cancel/route.ts +2 -1
  973. package/cloud-runtime/standalone/apps/local/app/api/prompt-jobs/[id]/route.ts +9 -3
  974. package/cloud-runtime/standalone/apps/local/app/api/prompt-jobs/[id]/runs/route.ts +2 -1
  975. package/cloud-runtime/standalone/apps/local/app/api/prompt-jobs/agents/route.ts +2 -1
  976. package/cloud-runtime/standalone/apps/local/app/api/prompt-jobs/poll/route.ts +5 -4
  977. package/cloud-runtime/standalone/apps/local/app/api/prompt-jobs/route.ts +3 -2
  978. package/cloud-runtime/standalone/apps/local/app/api/queue/complete/route.ts +2 -1
  979. package/cloud-runtime/standalone/apps/local/app/api/queue/route.ts +2 -1
  980. package/cloud-runtime/standalone/apps/local/app/api/reactions/route.ts +2 -1
  981. package/cloud-runtime/standalone/apps/local/app/api/schedules/poll/route.ts +7 -3
  982. package/cloud-runtime/standalone/apps/local/app/api/schedules/route.ts +6 -2
  983. package/cloud-runtime/standalone/apps/local/app/api/search/route.ts +2 -1
  984. package/cloud-runtime/standalone/apps/local/app/api/skills/assign/route.ts +6 -2
  985. package/cloud-runtime/standalone/apps/local/app/api/skills/available/route.ts +2 -1
  986. package/cloud-runtime/standalone/apps/local/app/api/skills/detail/route.ts +2 -1
  987. package/cloud-runtime/standalone/apps/local/app/api/skills/history/route.ts +2 -1
  988. package/cloud-runtime/standalone/apps/local/app/api/skills/learn/route.ts +6 -2
  989. package/cloud-runtime/standalone/apps/local/app/api/skills/route.ts +2 -1
  990. package/cloud-runtime/standalone/apps/local/app/api/skills/unlearn/route.ts +6 -2
  991. package/cloud-runtime/standalone/apps/local/app/api/summarize/route.ts +2 -1
  992. package/cloud-runtime/standalone/apps/local/app/api/task-groups/[id]/route.ts +3 -2
  993. package/cloud-runtime/standalone/apps/local/app/api/task-groups/[id]/tasks/route.ts +3 -2
  994. package/cloud-runtime/standalone/apps/local/app/api/task-groups/route.ts +3 -2
  995. package/cloud-runtime/standalone/apps/local/app/api/tasks/[id]/comments/[commentId]/route.ts +2 -1
  996. package/cloud-runtime/standalone/apps/local/app/api/tasks/[id]/comments/route.ts +3 -2
  997. package/cloud-runtime/standalone/apps/local/app/api/tasks/[id]/costs/route.ts +3 -2
  998. package/cloud-runtime/standalone/apps/local/app/api/tasks/[id]/dependencies/route.ts +2 -1
  999. package/cloud-runtime/standalone/apps/local/app/api/tasks/[id]/graph/pause/route.ts +2 -1
  1000. package/cloud-runtime/standalone/apps/local/app/api/tasks/[id]/graph/replan/route.ts +2 -1
  1001. package/cloud-runtime/standalone/apps/local/app/api/tasks/[id]/graph/restart/route.ts +2 -1
  1002. package/cloud-runtime/standalone/apps/local/app/api/tasks/[id]/graph/resume/route.ts +2 -1
  1003. package/cloud-runtime/standalone/apps/local/app/api/tasks/[id]/graph/rollback/route.ts +2 -1
  1004. package/cloud-runtime/standalone/apps/local/app/api/tasks/[id]/graph/route.ts +9 -5
  1005. package/cloud-runtime/standalone/apps/local/app/api/tasks/[id]/graph/start/route.ts +2 -1
  1006. package/cloud-runtime/standalone/apps/local/app/api/tasks/[id]/graph/stop/route.ts +2 -1
  1007. package/cloud-runtime/standalone/apps/local/app/api/tasks/[id]/heartbeat/route.ts +2 -1
  1008. package/cloud-runtime/standalone/apps/local/app/api/tasks/[id]/history/route.ts +2 -1
  1009. package/cloud-runtime/standalone/apps/local/app/api/tasks/[id]/logs/route.ts +3 -2
  1010. package/cloud-runtime/standalone/apps/local/app/api/tasks/[id]/nodes/[nodeId]/resume/route.ts +2 -1
  1011. package/cloud-runtime/standalone/apps/local/app/api/tasks/[id]/nodes/[nodeId]/start/route.ts +2 -1
  1012. package/cloud-runtime/standalone/apps/local/app/api/tasks/[id]/nodes/[nodeId]/verify/route.ts +2 -1
  1013. package/cloud-runtime/standalone/apps/local/app/api/tasks/[id]/route.ts +5 -4
  1014. package/cloud-runtime/standalone/apps/local/app/api/tasks/assign-orphans/route.ts +3 -2
  1015. package/cloud-runtime/standalone/apps/local/app/api/tasks/route.ts +4 -3
  1016. package/cloud-runtime/standalone/apps/local/app/api/teams/templates/route.ts +11 -0
  1017. package/cloud-runtime/standalone/apps/local/app/api/thread-export/route.ts +2 -1
  1018. package/cloud-runtime/standalone/apps/local/app/api/thread-repos/route.ts +2 -1
  1019. package/cloud-runtime/standalone/apps/local/app/api/threads/knowledge/route.ts +2 -1
  1020. package/cloud-runtime/standalone/apps/local/app/api/threads/route.ts +3 -2
  1021. package/cloud-runtime/standalone/apps/local/app/api/tracker/notes/route.ts +16 -3
  1022. package/cloud-runtime/standalone/apps/local/app/api/trackers/[tracker]/items/[id]/recap/route.ts +75 -30
  1023. package/cloud-runtime/standalone/apps/local/app/api/trackers/[tracker]/items/[id]/route.ts +5 -2
  1024. package/cloud-runtime/standalone/apps/local/app/api/trackers/[tracker]/labels/[id]/route.ts +2 -2
  1025. package/cloud-runtime/standalone/apps/local/app/api/trackers/[tracker]/labels/route.ts +18 -7
  1026. package/cloud-runtime/standalone/apps/local/app/api/trackers/[tracker]/metadata/bulk/route.ts +19 -8
  1027. package/cloud-runtime/standalone/apps/local/app/api/trackers/[tracker]/metadata/route.ts +16 -5
  1028. package/cloud-runtime/standalone/apps/local/app/api/trackers/[tracker]/runs/[id]/route.ts +7 -3
  1029. package/cloud-runtime/standalone/apps/local/app/api/trackers/[tracker]/runs/route.ts +7 -3
  1030. package/cloud-runtime/standalone/apps/local/app/api/trackers/[tracker]/runs/scripted/route.ts +6 -2
  1031. package/cloud-runtime/standalone/apps/local/app/api/trackers/[tracker]/token/route.ts +5 -2
  1032. package/cloud-runtime/standalone/apps/local/app/api/trackers/[tracker]/worker/route.ts +4 -3
  1033. package/cloud-runtime/standalone/apps/local/app/api/trackers/connections/route.ts +13 -6
  1034. package/cloud-runtime/standalone/apps/local/app/api/upload/route.ts +3 -2
  1035. package/cloud-runtime/standalone/apps/local/app/api/user-settings/route.ts +4 -3
  1036. package/cloud-runtime/standalone/apps/local/app/api/userPreferences/route.ts +2 -1
  1037. package/cloud-runtime/standalone/apps/local/app/api/webhooks/[id]/route.ts +77 -0
  1038. package/cloud-runtime/standalone/apps/local/app/api/webhooks/route.ts +39 -0
  1039. package/cloud-runtime/standalone/apps/local/app/api/webhooks/shared.ts +159 -0
  1040. package/cloud-runtime/standalone/apps/local/app/integrations/github/select-repos/page.tsx +382 -0
  1041. package/cloud-runtime/standalone/apps/local/app/projects/[slug]/layout.tsx +5 -2
  1042. package/cloud-runtime/standalone/apps/local/app/projects/[slug]/notifications/page.tsx +509 -0
  1043. package/cloud-runtime/standalone/apps/local/app/projects/[slug]/prs/page.tsx +299 -0
  1044. package/cloud-runtime/standalone/apps/local/app/projects/[slug]/teams/[teamId]/page.tsx +58 -2
  1045. package/cloud-runtime/standalone/apps/local/app/projects/[slug]/tracking/[tracker]/page.tsx +17 -1
  1046. package/cloud-runtime/standalone/apps/local/app/projects/[slug]/tracking/connect/page.tsx +23 -18
  1047. package/cloud-runtime/standalone/apps/local/components/GraphDetailSidebar.tsx +1 -1
  1048. package/cloud-runtime/standalone/apps/local/components/PromptJobBoard.tsx +94 -41
  1049. package/cloud-runtime/standalone/apps/local/components/TaskCard.tsx +7 -1
  1050. package/cloud-runtime/standalone/apps/local/components/TrackerBoard.tsx +194 -43
  1051. package/cloud-runtime/standalone/apps/local/components/activity/ActivityStreamButton.tsx +40 -0
  1052. package/cloud-runtime/standalone/apps/local/components/activity/ActivityStreamPopover.tsx +141 -0
  1053. package/cloud-runtime/standalone/apps/local/components/chat-ui/JumpToLatestButton.tsx +30 -0
  1054. package/cloud-runtime/standalone/apps/local/components/chat-ui/LogPanel.tsx +22 -1
  1055. package/cloud-runtime/standalone/apps/local/components/chat-ui/MessageList.tsx +27 -0
  1056. package/cloud-runtime/standalone/apps/local/components/chat-ui/ThreadView.tsx +15 -1
  1057. package/cloud-runtime/standalone/apps/local/components/projects/ObjectiveScheduledTasksPanel.tsx +87 -245
  1058. package/cloud-runtime/standalone/apps/local/components/projects/ProjectObjectivesWorkspace.tsx +99 -66
  1059. package/cloud-runtime/standalone/apps/local/components/projects/RecentlyCompletedCard.tsx +52 -7
  1060. package/cloud-runtime/standalone/apps/local/components/projects/TeamsView.tsx +59 -14
  1061. package/cloud-runtime/standalone/apps/local/components/projects/WorkingNowCard.tsx +56 -7
  1062. package/cloud-runtime/standalone/apps/local/components/projects/home/ToolPathsSection.tsx +60 -2
  1063. package/cloud-runtime/standalone/apps/local/components/prs/PrComposerPanel.tsx +219 -0
  1064. package/cloud-runtime/standalone/apps/local/components/thread/WorkspaceSidebar.tsx +38 -14
  1065. package/cloud-runtime/standalone/apps/local/components/tracker/FolderRow.tsx +7 -4
  1066. package/cloud-runtime/standalone/apps/local/components/tracker/LinkedPrsSection.tsx +251 -0
  1067. package/cloud-runtime/standalone/apps/local/components/tracker/NoteSticker.tsx +9 -0
  1068. package/cloud-runtime/standalone/apps/local/components/tracker/RowActionsMenu.tsx +228 -0
  1069. package/cloud-runtime/standalone/apps/local/components/tracker/SelectionBar.tsx +11 -24
  1070. package/cloud-runtime/standalone/apps/local/components/tracker/TicketPanel.tsx +43 -9
  1071. package/cloud-runtime/standalone/apps/local/components/tracker/TicketRecapSection.tsx +13 -3
  1072. package/cloud-runtime/standalone/apps/local/components/tracker/TicketRow.tsx +63 -5
  1073. package/cloud-runtime/standalone/apps/local/components/tracking/GithubRepoManager.tsx +518 -0
  1074. package/cloud-runtime/standalone/apps/local/components/tracking/TaskIdentifierPrefix.tsx +174 -0
  1075. package/cloud-runtime/standalone/apps/local/components/tracking/TaskTrackingNav.tsx +73 -11
  1076. package/cloud-runtime/standalone/apps/local/components/tracking/TrackerIcon.tsx +2 -0
  1077. package/cloud-runtime/standalone/apps/local/components/tracking/TrackerSetup.tsx +39 -12
  1078. package/cloud-runtime/standalone/apps/local/components/ui/ResizeHandle.tsx +8 -1
  1079. package/cloud-runtime/standalone/apps/local/db/sqlite/001_agx_board_schema.sql +28 -1
  1080. package/cloud-runtime/standalone/apps/local/hooks/useActivityStream.ts +170 -0
  1081. package/cloud-runtime/standalone/apps/local/hooks/useProjects.ts +3 -0
  1082. package/cloud-runtime/standalone/apps/local/hooks/usePromptJobs.ts +16 -3
  1083. package/cloud-runtime/standalone/apps/local/hooks/useSidebarStage.ts +2 -0
  1084. package/cloud-runtime/standalone/apps/local/hooks/useTrackerConnection.ts +6 -1
  1085. package/cloud-runtime/standalone/apps/local/hooks/useTrackerItems.ts +48 -3
  1086. package/cloud-runtime/standalone/apps/local/lib/cli-runner.ts +44 -5
  1087. package/cloud-runtime/standalone/apps/local/lib/db/agents.ts +205 -0
  1088. package/cloud-runtime/standalone/apps/local/lib/db/index.ts +14 -0
  1089. package/cloud-runtime/standalone/apps/local/lib/db/learnings.ts +67 -0
  1090. package/cloud-runtime/standalone/apps/local/lib/db/projects.ts +692 -0
  1091. package/cloud-runtime/standalone/apps/local/lib/db/resolution.ts +74 -0
  1092. package/cloud-runtime/standalone/apps/local/lib/db/shared.ts +222 -0
  1093. package/cloud-runtime/standalone/apps/local/lib/db/task-comments.ts +61 -0
  1094. package/cloud-runtime/standalone/apps/local/lib/db/task-costs.ts +131 -0
  1095. package/cloud-runtime/standalone/apps/local/lib/db/task-logs.ts +62 -0
  1096. package/cloud-runtime/standalone/apps/local/lib/db/tasks.ts +477 -0
  1097. package/cloud-runtime/standalone/apps/local/lib/db/teams.ts +161 -0
  1098. package/cloud-runtime/standalone/apps/local/lib/db/types.ts +359 -0
  1099. package/cloud-runtime/standalone/apps/local/lib/db/user-settings.ts +69 -0
  1100. package/cloud-runtime/standalone/apps/local/lib/db/workflows.ts +439 -0
  1101. package/cloud-runtime/standalone/apps/local/lib/db.ts +1 -2931
  1102. package/cloud-runtime/standalone/apps/local/lib/device-flow.ts +5 -4
  1103. package/cloud-runtime/standalone/apps/local/lib/github-client.ts +382 -0
  1104. package/cloud-runtime/standalone/apps/local/lib/github-db.ts +143 -0
  1105. package/cloud-runtime/standalone/apps/local/lib/github-issue-store.ts +101 -0
  1106. package/cloud-runtime/standalone/apps/local/lib/github-link-resolver.ts +65 -0
  1107. package/cloud-runtime/standalone/apps/local/lib/github-oauth-sessions.ts +55 -0
  1108. package/cloud-runtime/standalone/apps/local/lib/github-pr-context.ts +125 -0
  1109. package/cloud-runtime/standalone/apps/local/lib/github-pr-files-store.ts +59 -0
  1110. package/cloud-runtime/standalone/apps/local/lib/github-pr-store.ts +250 -0
  1111. package/cloud-runtime/standalone/apps/local/lib/github-prs.ts +67 -0
  1112. package/cloud-runtime/standalone/apps/local/lib/github-repo-store.ts +63 -0
  1113. package/cloud-runtime/standalone/apps/local/lib/github-resolvers.ts +41 -0
  1114. package/cloud-runtime/standalone/apps/local/lib/github-token-store.ts +41 -0
  1115. package/cloud-runtime/standalone/apps/local/lib/github-types.ts +116 -0
  1116. package/cloud-runtime/standalone/apps/local/lib/logger.ts +1 -0
  1117. package/cloud-runtime/standalone/apps/local/lib/migrations/task-identifier-migration.ts +39 -0
  1118. package/cloud-runtime/standalone/apps/local/lib/notifications/index.ts +36 -12
  1119. package/cloud-runtime/standalone/apps/local/lib/parse-body.ts +23 -0
  1120. package/cloud-runtime/standalone/apps/local/lib/security.ts +4 -3
  1121. package/cloud-runtime/standalone/apps/local/lib/sqlite-query-adapter.ts +31 -0
  1122. package/cloud-runtime/standalone/apps/local/lib/stream-multiplexer.ts +19 -0
  1123. package/cloud-runtime/standalone/apps/local/lib/task-identifier-store.ts +32 -0
  1124. package/cloud-runtime/standalone/apps/local/lib/tracker/adapters/github/adapter.tsx +242 -0
  1125. package/cloud-runtime/standalone/apps/local/lib/tracker/adapters/github/github-icon.tsx +18 -0
  1126. package/cloud-runtime/standalone/apps/local/lib/tracker/adapters/github/index.ts +1 -0
  1127. package/cloud-runtime/standalone/apps/local/lib/tracker/index.ts +4 -0
  1128. package/cloud-runtime/standalone/apps/local/lib/tracker/recap.ts +71 -3
  1129. package/cloud-runtime/standalone/apps/local/lib/tracker/tracker-item-metadata-store.ts +116 -56
  1130. package/cloud-runtime/standalone/apps/local/lib/tracker/tracker-item-store.ts +16 -5
  1131. package/cloud-runtime/standalone/apps/local/lib/tracker/types.ts +2 -0
  1132. package/cloud-runtime/standalone/apps/local/lib/workspace-categories.ts +44 -0
  1133. package/cloud-runtime/standalone/apps/local/middleware.ts +1 -1
  1134. package/cloud-runtime/standalone/apps/local/migrations/sqlite_schema.sql +4 -0
  1135. package/cloud-runtime/standalone/apps/local/next.config.ts +1 -1
  1136. package/cloud-runtime/standalone/apps/local/public/agx_icon.png +0 -0
  1137. package/cloud-runtime/standalone/apps/local/public/logo_dark.png +0 -0
  1138. package/cloud-runtime/standalone/apps/local/public/logo_light.png +0 -0
  1139. package/cloud-runtime/standalone/apps/local/src/automations/repository.ts +5 -4
  1140. package/cloud-runtime/standalone/apps/local/src/graph/api-route-utils.ts +13 -1
  1141. package/cloud-runtime/standalone/apps/local/src/graph/schedule-runner.ts +23 -22
  1142. package/cloud-runtime/standalone/apps/local/src/graph/work-dispatcher.ts +7 -6
  1143. package/cloud-runtime/standalone/apps/local/src/prompt-scheduler/engine.ts +2 -1
  1144. package/cloud-runtime/standalone/apps/local/src/prompt-scheduler/store.ts +18 -1
  1145. package/cloud-runtime/standalone/apps/local/state/trackerItemsCache.ts +79 -0
  1146. package/cloud-runtime/standalone/apps/local/worker/index.js +1312 -872
  1147. package/lib/cli/onboarding.js +22 -1
  1148. package/lib/cli/providers.js +46 -2
  1149. package/lib/cli/runCli.js +94 -4
  1150. package/lib/commands/board.js +155 -0
  1151. package/lib/commands/daemonBoard.js +23 -9
  1152. package/lib/commands/narratePrs.js +384 -0
  1153. package/lib/commands/teams.js +320 -0
  1154. package/lib/commands/workspace.js +300 -0
  1155. package/package.json +1 -1
  1156. package/cloud-runtime/standalone/apps/local/.next/server/chunks/9fb8c_next_dist_esm_build_templates_app-route_e2187c53.js +0 -3
  1157. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__04ee9637._.js +0 -80
  1158. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__06d2e9cc._.js +0 -3
  1159. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__079c42ac._.js +0 -3
  1160. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__08a40fc7._.js +0 -3
  1161. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__0a528fae._.js +0 -18
  1162. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__0b317b6d._.js +0 -3
  1163. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__0e04eca4._.js +0 -40
  1164. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__0e30f17d._.js +0 -13
  1165. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__101fe653._.js +0 -3
  1166. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__10a90219._.js +0 -69
  1167. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__10bfac8f._.js +0 -76
  1168. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__121d8e45._.js +0 -3
  1169. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__1629da24._.js +0 -9
  1170. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__18ec311a._.js +0 -3
  1171. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__19d0fac1._.js +0 -3
  1172. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__1d970ad0._.js +0 -40
  1173. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__20391b07._.js +0 -3
  1174. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__229b2432._.js +0 -3
  1175. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__2bb933c7._.js +0 -3
  1176. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__2d916976._.js +0 -3
  1177. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__2eb13697._.js +0 -70
  1178. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__368f5ffd._.js +0 -3
  1179. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__37fe207d._.js +0 -13
  1180. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__41534d9e._.js +0 -3
  1181. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__4641ba3f._.js +0 -3
  1182. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__498d8b2d._.js +0 -3
  1183. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__4b167927._.js +0 -113
  1184. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__4b9d4f5c._.js +0 -3
  1185. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__4ddaa4bd._.js +0 -70
  1186. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__4e296e1f._.js +0 -7
  1187. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__4fbf7baa._.js +0 -3
  1188. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__5184da61._.js +0 -20
  1189. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__51eaac77._.js +0 -13
  1190. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__580ddcca._.js +0 -40
  1191. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__5859156d._.js +0 -8
  1192. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__6062bf0a._.js +0 -3
  1193. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__67ee45bc._.js +0 -3
  1194. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__68b692c4._.js +0 -131
  1195. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__6e0ef488._.js +0 -4
  1196. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__6e73b6e1._.js +0 -3
  1197. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__6ead08b8._.js +0 -3
  1198. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__6f6afa0f._.js +0 -70
  1199. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__76030d44._.js +0 -40
  1200. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__7cd28ae0._.js +0 -3
  1201. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__7db7c421._.js +0 -134
  1202. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__80aea589._.js +0 -3
  1203. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__847ab7ae._.js +0 -3
  1204. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__8a8d1048._.js +0 -3
  1205. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__8b130db5._.js +0 -3
  1206. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__8dd3b8c5._.js +0 -3
  1207. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__8e91653e._.js +0 -3
  1208. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__905a5b44._.js +0 -3
  1209. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__90dd5edd._.js +0 -3
  1210. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__938c45c2._.js +0 -18
  1211. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__97e51964._.js +0 -3
  1212. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__9ad5f462._.js +0 -18
  1213. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__9e4c0741._.js +0 -8
  1214. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__a74338e8._.js +0 -6
  1215. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__aa4e5942._.js +0 -3
  1216. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__ab2d839c._.js +0 -70
  1217. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__ab9b38d8._.js +0 -3
  1218. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__ac854687._.js +0 -3
  1219. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__ae54e5ab._.js +0 -3
  1220. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__b1357960._.js +0 -3
  1221. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__b70ca903._.js +0 -13
  1222. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__b810670d._.js +0 -80
  1223. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__bb757af8._.js +0 -3
  1224. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__c2e55fb5._.js +0 -13
  1225. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__c4a986f6._.js +0 -3
  1226. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__c614c26c._.js +0 -3
  1227. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__c9444a83._.js +0 -3
  1228. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__cbd45246._.js +0 -11
  1229. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__d402ed75._.js +0 -3
  1230. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__d8cc43c7._.js +0 -129
  1231. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__d8efbb6c._.js +0 -3
  1232. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__dd538d32._.js +0 -3
  1233. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__df0f00fd._.js +0 -3
  1234. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__e583235c._.js +0 -3
  1235. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__e86865ef._.js +0 -13
  1236. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__eb0fd512._.js +0 -13
  1237. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__ece576c1._.js +0 -3
  1238. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__ef1c393e._.js +0 -70
  1239. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__f21be9eb._.js +0 -3
  1240. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__f6e4b64e._.js +0 -3
  1241. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__f7a936d9._.js +0 -129
  1242. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__fb5944d3._.js +0 -3
  1243. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__fbe43c0a._.js +0 -3
  1244. package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__ff552f94._.js +0 -3
  1245. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_21812330._.js +0 -118
  1246. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_9f0fd451._.js +0 -3
  1247. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_b8cc7add._.js +0 -118
  1248. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_d3245de4._.js +0 -25
  1249. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_e12b284f._.js +0 -118
  1250. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_f938bff7._.js +0 -25
  1251. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_lib_0992c0e3._.js +0 -34
  1252. package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_lib_db_ts_ad844f74._.js +0 -3
  1253. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/9fb8c_lucide-react_dist_esm_icons_5e38c2ed._.js +0 -3
  1254. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/9fb8c_lucide-react_dist_esm_icons_a528155c._.js +0 -3
  1255. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__2af44092._.js +0 -3
  1256. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__452cb0f0._.js +0 -3
  1257. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__489568b4._.js +0 -3
  1258. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__4ebb738f._.js +0 -3
  1259. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__4ec098a0._.js +0 -3
  1260. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__53bd50df._.js +0 -3
  1261. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__7774a40c._.js +0 -3
  1262. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__b8484b0e._.js +0 -7
  1263. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__bc60b3cf._.js +0 -3
  1264. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__bd05ee09._.js +0 -3
  1265. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__c2c07c79._.js +0 -3
  1266. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__fdfb2d96._.js +0 -3
  1267. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/_18162573._.js +0 -3
  1268. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/_8c4beba9._.js +0 -7
  1269. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/_ba2abc47._.js +0 -7
  1270. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/_e00b6c25._.js +0 -3
  1271. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/_e485f527._.js +0 -3
  1272. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_064c7b93._.js +0 -18
  1273. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_1e4a0236._.js +0 -3
  1274. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_1faefdc2._.js +0 -8
  1275. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_3e5712aa._.js +0 -3
  1276. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_4259062a._.js +0 -8
  1277. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_5d6a3ce2._.js +0 -3
  1278. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_5eebb5cb._.js +0 -3
  1279. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_7395ab20._.js +0 -18
  1280. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_86f59be8._.js +0 -3
  1281. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_bbb7b83b._.js +0 -3
  1282. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_c5e75cc1._.js +0 -18
  1283. package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_f67bb291._.js +0 -18
  1284. package/cloud-runtime/standalone/apps/local/.next/static/chunks/00d8a91bcae5edc5.js +0 -1
  1285. package/cloud-runtime/standalone/apps/local/.next/static/chunks/0243e7d015db440d.js +0 -5
  1286. package/cloud-runtime/standalone/apps/local/.next/static/chunks/1533a70763aff97d.js +0 -1
  1287. package/cloud-runtime/standalone/apps/local/.next/static/chunks/1fef9364e8667e88.js +0 -1
  1288. package/cloud-runtime/standalone/apps/local/.next/static/chunks/27c70630ae583211.js +0 -1
  1289. package/cloud-runtime/standalone/apps/local/.next/static/chunks/4eaf7bca1be5edfa.js +0 -1
  1290. package/cloud-runtime/standalone/apps/local/.next/static/chunks/5d047fc7267a8f53.js +0 -16
  1291. package/cloud-runtime/standalone/apps/local/.next/static/chunks/69008b684b4d5abd.js +0 -6
  1292. package/cloud-runtime/standalone/apps/local/.next/static/chunks/7148feb61274d431.css +0 -1
  1293. package/cloud-runtime/standalone/apps/local/.next/static/chunks/716e1716d526ded9.js +0 -46
  1294. package/cloud-runtime/standalone/apps/local/.next/static/chunks/7353a3a1fcd5825c.js +0 -1
  1295. package/cloud-runtime/standalone/apps/local/.next/static/chunks/85b0b6ed57b5df52.js +0 -1
  1296. package/cloud-runtime/standalone/apps/local/.next/static/chunks/8a9626e4d7c259ee.js +0 -16
  1297. package/cloud-runtime/standalone/apps/local/.next/static/chunks/8b91e7692a899f00.js +0 -20
  1298. package/cloud-runtime/standalone/apps/local/.next/static/chunks/938097967e2c1676.js +0 -6
  1299. package/cloud-runtime/standalone/apps/local/.next/static/chunks/9acdd370e9daca0d.js +0 -16
  1300. package/cloud-runtime/standalone/apps/local/.next/static/chunks/9df45611d6c84e02.js +0 -16
  1301. package/cloud-runtime/standalone/apps/local/.next/static/chunks/9e2208153f276f8c.js +0 -1
  1302. package/cloud-runtime/standalone/apps/local/.next/static/chunks/a084c6475513e6fe.js +0 -16
  1303. package/cloud-runtime/standalone/apps/local/.next/static/chunks/aa6db7c91c1ccd5f.js +0 -16
  1304. package/cloud-runtime/standalone/apps/local/.next/static/chunks/cbb4dbdc63177701.js +0 -1
  1305. package/cloud-runtime/standalone/apps/local/.next/static/chunks/d590384ce3045a12.js +0 -5
  1306. package/cloud-runtime/standalone/apps/local/.next/static/chunks/dc1b3f7fdc1eaf5c.js +0 -4
  1307. package/cloud-runtime/standalone/apps/local/.next/static/chunks/f3c1b6295b9442c6.js +0 -1
  1308. package/cloud-runtime/standalone/apps/local/.next/static/chunks/f4acf76cb6c82c73.js +0 -16
  1309. /package/cloud-runtime/standalone/apps/local/.next/static/{3-6VaSnGGXdV-2eV44RDK → fipnHmd6JPn9sTuFdYS0y}/_buildManifest.js +0 -0
  1310. /package/cloud-runtime/standalone/apps/local/.next/static/{3-6VaSnGGXdV-2eV44RDK → fipnHmd6JPn9sTuFdYS0y}/_clientMiddlewareManifest.json +0 -0
  1311. /package/cloud-runtime/standalone/apps/local/.next/static/{3-6VaSnGGXdV-2eV44RDK → fipnHmd6JPn9sTuFdYS0y}/_ssgManifest.js +0 -0
@@ -1,16 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,292135,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},506420,(e,t,r)=>{t.exports=e.r(27944)},524123,e=>{"use strict";var t=e.i(935851);function r(){let[e,r]=(0,t.useState)([]),[a,s]=(0,t.useState)(!1),[o,n]=(0,t.useState)(null),l=(0,t.useCallback)(async()=>{s(!0);try{let e=await fetch("/api/projects");if(!e.ok)throw Error("Failed to fetch projects");let t=await e.json();r(t.projects??[]),n(null)}catch(e){n(e instanceof Error?e:Error("Unknown error"))}finally{s(!1)}},[]);(0,t.useEffect)(()=>{l()},[l]);let i=(0,t.useCallback)(async e=>{let t=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw Error((await t.json().catch(()=>({}))).error||"Failed to create project");let a=(await t.json()).project;return r(e=>[a,...e]),a},[]);return{projects:e,isLoading:a,error:o,refetch:l,createProject:i,updateProject:(0,t.useCallback)(async(e,t)=>{let a=await fetch(`/api/projects/${e}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok)throw Error((await a.json().catch(()=>({}))).error||"Failed to update project");let s=(await a.json()).project;return r(t=>t.map(t=>t.id===e?s:t)),s},[]),deleteProject:(0,t.useCallback)(async e=>{let t=await fetch(`/api/projects/${e}`,{method:"DELETE"});if(!t.ok)throw Error((await t.json().catch(()=>({}))).error||"Failed to delete project");r(t=>t.filter(t=>t.id!==e))},[])}}function a(){let[e,r]=(0,t.useState)([]),[a,s]=(0,t.useState)(!0),o=(0,t.useCallback)(async()=>{try{let e=await fetch("/api/projects");if(!e.ok)return;let{projects:t}=await e.json(),a=await Promise.all((t??[]).map(async e=>{let t=[],r=[];try{let[a,s]=await Promise.all([fetch(`/api/projects/${e.id}/agents`),fetch(`/api/projects/${e.id}/threads`)]);a.ok&&(t=(await a.json()).agents??[]),s.ok&&(r=((await s.json()).threads??[]).map(e=>e.thread_id))}catch{}return{...e,repos:e.repos??[],agents:t.map(t=>({project_id:e.id,agent_id:t.agent_id,routing_order:t.routing_order,created_at:t.created_at})),thread_ids:r,workspace_ids:r}}));r(a)}catch{}finally{s(!1)}},[]);(0,t.useEffect)(()=>{o()},[o]);let n=(0,t.useCallback)(async(e,t)=>{try{let a="string"==typeof e?{name:e}:e,s=a.name.trim(),o=(a.slug||s.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")).trim(),n=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...a,name:s,slug:o})});if(!n.ok)return null;let{project:l}=await n.json(),i=Array.isArray(t)?t:t?[t]:[];for(let e of i)await fetch(`/api/projects/${l.id}/threads`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({threadId:e})}).catch(e=>console.warn("[useProjects] link thread failed:",e));let d={...l,repos:l.repos??[],agents:[],thread_ids:i,workspace_ids:i};return r(e=>[...e,d].sort((e,t)=>e.name.localeCompare(t.name))),d}catch{return null}},[]),l=(0,t.useCallback)(async(e,t)=>{try{if(!(await fetch(`/api/projects/${e}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t})})).ok)return;r(r=>r.map(r=>r.id===e?{...r,name:t}:r).sort((e,t)=>e.name.localeCompare(t.name)))}catch{}},[]),i=(0,t.useCallback)(async e=>{try{if(!(await fetch(`/api/projects/${e}`,{method:"DELETE"})).ok)return;r(t=>t.filter(t=>t.id!==e))}catch{}},[]),d=(0,t.useCallback)(async(e,t)=>{try{let a=await fetch(`/api/projects/${e}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.json().catch(()=>({}));throw Error(e.error||"Failed to update project")}let s=(await a.json()).project;return r(t=>t.map(t=>t.id===e?{...t,...s,repos:s.repos??t.repos}:t)),s}catch{return null}},[]),c=(0,t.useCallback)(async(e,t)=>{try{let a=await fetch(`/api/projects/${e}/agents`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agentId:t})});if(!a.ok)return;let s=((await a.json()).agents??[]).map(t=>({project_id:e,agent_id:t.agent_id,routing_order:t.routing_order,created_at:t.created_at}));r(t=>t.map(t=>t.id===e?{...t,agents:s}:t))}catch{}},[]),u=(0,t.useCallback)(async(e,t)=>{try{let a=await fetch(`/api/projects/${e}/agents?agentId=${t}`,{method:"DELETE"});if(!a.ok)return;let s=((await a.json()).agents??[]).map(t=>({project_id:e,agent_id:t.agent_id,routing_order:t.routing_order,created_at:t.created_at}));r(t=>t.map(t=>t.id===e?{...t,agents:s}:t))}catch{}},[]);return{projects:e,isLoading:a,createProject:n,updateProject:d,renameProject:l,deleteProject:i,addAgent:c,removeAgent:u,reorderAgents:(0,t.useCallback)(async(e,t)=>{try{let a=await fetch(`/api/projects/${e}/agents`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({orderedAgentIds:t})});if(!a.ok)return;let s=((await a.json()).agents??[]).map(t=>({project_id:e,agent_id:t.agent_id,routing_order:t.routing_order,created_at:t.created_at}));r(t=>t.map(t=>t.id===e?{...t,agents:s}:t))}catch{}},[]),moveAgent:(0,t.useCallback)(async(e,t,r)=>{try{await fetch(`/api/projects/${t}/agents?agentId=${e}`,{method:"DELETE"}),await fetch(`/api/projects/${r}/agents`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agentId:e})}),await o()}catch{}},[o]),refresh:o}}e.s(["useProjects",()=>r,"useProjectsWithAgents",()=>a])},353662,e=>{"use strict";var t=e.i(810605);t.NODE_TIMEOUT_DEFAULT_MS,t.GRAPH_TIMEOUT_DEFAULT_MS;let r=new Set(["done","passed"]),a=new Set(["pending","running","awaiting_human","blocked"]);function s(e){return`node--${e}`}function o(e){return e.replace(/_/gu," ")}function n(e,t){return"root"===t.type?t.title?.trim()||"Task Objective":"work"===t.type||"function"===t.type?t.title?.trim()||e:"gate"===t.type?t.gateType.replace(/_gate$/u,"").replace(/_/gu," ").replace(/\b\w/gu,e=>e.toUpperCase()):"fork"===t.type?"Fork":"join"===t.type?`Join (${t.joinStrategy})`:"Conditional"}function l(e){for(let[t,r]of Object.entries(e.nodes))if("root"===r.type)return{id:t,node:r};return null}function i(e){let t,s=l(e);return{mode:e.mode,graphVersion:e.graphVersion,nodeCount:Object.keys(e.nodes).length,progress:0===(t=Object.values(e.nodes).filter(e=>"skipped"!==e.status)).length?100:Math.round(t.filter(e=>r.has(e.status)).length/t.length*100),currentBlocker:function(e){let t=function(e){let t=Object.entries(e.nodes),r=t.filter(([,e])=>"gate"===e.type&&e.required),a=r.find(([,e])=>"failed"===e.status);if(a)return a[0];let s=r.find(([,e])=>"awaiting_human"===e.status);if(s)return s[0];let o=r.find(([,e])=>"pending"===e.status||"running"===e.status);if(o)return o[0];let n=t.find(([,e])=>"work"===e.type&&"blocked"===e.status);return n?.[0]??null}(e);if(!t)return null;let r=e.nodes[t];return r?{nodeId:t,label:n(t,r),status:r.status,required:"gate"===r.type&&r.required}:null}(e),derivedStatus:function(e){let t=Object.keys(e.nodes).length;if(0===t)return"INTAKE";if(1===t){let t=Object.values(e.nodes)[0];if("root"===t.type&&!t.graphCreated)return"INTAKE"}return Object.values(e.nodes).some(e=>a.has(e.status))?"PROGRESS":"DONE"}(e),hasRootNode:null!==s,rootNodeId:s?.id??null}}e.s(["buildGraphSummary",()=>i,"findRootNode",()=>l,"formatNodeStatusLabel",()=>o,"getNodeLabel",()=>n,"toNodeStatusClass",()=>s],353662)},936381,e=>{"use strict";var t=e.i(762281),r=e.i(935851),a=e.i(506420),s=e.i(307241),o=e.i(810605);function n(){let[e,a]=(0,r.useState)(null),[s,n]=(0,r.useState)("loading");(0,r.useEffect)(()=>{let e=!0;async function t(){try{let t=await fetch("/api/health");if(!e)return;if(!t.ok)return void n("error");let r=await t.json();a(r),n(r.connected?"connected":"disconnected")}catch{e&&n("error")}}t();let r=setInterval(t,o.UI_POLL_DB_HEALTH_MS);return()=>{e=!1,clearInterval(r)}},[]);let l={loading:"Checking database…",connected:`${e?.adapter??"db"} connected (${e?.latencyMs??"?"}ms)`,disconnected:`${e?.adapter??"db"} disconnected`,error:"Database unreachable"};return(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs text-[var(--muted-foreground)]",role:"status","aria-label":l[s],children:[(0,t.jsx)("span",{className:`w-2 h-2 rounded-full ${{loading:"bg-yellow-400",connected:"bg-green-500",disconnected:"bg-red-500",error:"bg-red-500"}[s]}`}),(0,t.jsx)("span",{className:"hidden sm:inline",children:l[s]})]})}function l({children:e,fullWidth:r=!1,noFooter:a=!1}){return(0,t.jsxs)("div",{className:"h-screen flex flex-col overflow-hidden",children:[(0,t.jsx)("nav",{className:"desktop-titlebar flex-shrink-0 border-b border-[var(--card-border)] bg-[var(--card-bg)]/80 backdrop-blur-lg z-30",children:(0,t.jsx)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:(0,t.jsxs)("div",{className:"flex items-center justify-between h-16",children:[(0,t.jsx)("div",{className:"flex items-center gap-8",children:(0,t.jsx)(s.default,{href:"/",className:"flex items-center gap-3 group",children:(0,t.jsxs)("svg",{width:"52",height:"31",viewBox:"0 0 64 38",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"transition-transform group-hover:scale-105",children:[(0,t.jsx)("rect",{width:"64",height:"38",rx:"8",fill:"black"}),(0,t.jsxs)("g",{stroke:"white",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M 14 27 C 17 16 19 10 20 8 C 21 12 23 20 25 27"}),(0,t.jsx)("path",{d:"M 16 20 C 19 19 21 21 23 20"}),(0,t.jsx)("path",{d:"M 40 13 C 35 10 30 13 30 19 C 30 25 34 28 38 27 C 40 26 40 22 40 20 L 36 20"}),(0,t.jsx)("path",{d:"M 46 11 C 48 16 51 22 54 27"}),(0,t.jsx)("path",{d:"M 54 11 C 52 16 49 22 46 27"})]})]})})}),(0,t.jsx)("div",{className:"flex items-center gap-3",children:(0,t.jsx)(s.default,{href:"/",className:"text-sm font-medium text-[var(--muted-foreground)] hover:text-[var(--foreground)] transition-colors",children:"Home"})})]})})}),(0,t.jsx)("main",{className:`flex-1 min-h-0 flex flex-col ${r?"p-0":"p-4 sm:p-6 lg:p-8 overflow-y-auto"}`,children:e}),!a&&(0,t.jsx)("footer",{className:"flex-shrink-0 border-t border-[var(--card-border)] bg-[var(--card-bg)]/50 py-4",children:(0,t.jsxs)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex items-center justify-between text-xs text-[var(--muted-foreground)]",children:[(0,t.jsx)("span",{children:"AGX"}),(0,t.jsxs)("span",{className:"hidden sm:inline-flex items-center gap-3",children:[(0,t.jsx)(n,{}),(0,t.jsx)("span",{children:"Built with Next.js + Db"})]})]})})]})}function i(e){return(0,t.jsx)(r.Suspense,{fallback:(0,t.jsx)("div",{className:"h-screen flex items-center justify-center bg-[var(--background)]",children:(0,t.jsx)("span",{className:"spinner w-8 h-8 border-3 border-[var(--primary)] border-t-transparent rounded-full"})}),children:(0,t.jsx)(l,{...e})})}var d=e.i(902572);let c=new Set([d.PROJECT_OBJECTIVES_METADATA_KEY,d.LEGACY_PROJECT_GOALS_METADATA_KEY,d.PROJECT_HEALTH_METADATA_KEY]);function u({project:e,onEdit:r,onDelete:a,onClick:s,onManageTasks:o}){let n=e.repos&&e.repos.length>0;return(0,t.jsxs)("div",{onClick:()=>s?.(e),className:`p-5 surface-card space-y-4
2
- ${s?"cursor-pointer hover:border-gray-300 dark:hover:border-gray-700 hover:shadow-md active:scale-[0.99]":""}`,children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-lg font-semibold",children:e.name}),(0,t.jsx)("p",{className:"text-xs text-[var(--muted-foreground)] tracking-wide uppercase",children:e.slug})]}),(0,t.jsxs)("div",{className:"flex flex-col items-end gap-2",children:[(0,t.jsxs)("span",{className:"text-[11px] font-semibold text-[var(--muted-foreground)]",children:["Updated ",new Date(e.updated_at).toLocaleDateString()]}),(r||a||o)&&(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[o&&(0,t.jsx)("button",{type:"button",onClick:t=>{t.stopPropagation(),o(e)},className:"text-[11px] font-semibold px-2 py-1 rounded-full border border-[var(--card-border)] bg-[var(--background)] hover:border-[var(--primary)] hover:text-[var(--primary)] transition-all",children:"Tasks"}),r&&(0,t.jsx)("button",{type:"button",onClick:t=>{t.stopPropagation(),r(e)},className:"text-[11px] font-semibold px-2 py-1 rounded-full border border-[var(--card-border)] hover:border-[var(--primary)] hover:text-[var(--primary)] transition-all bg-[var(--background)]",children:"Edit"}),a&&(0,t.jsx)("button",{type:"button",onClick:t=>{t.stopPropagation(),a(e)},className:"text-[11px] font-semibold px-2 py-1 rounded-full border border-[var(--card-border)] text-[var(--destructive)] hover:border-[var(--destructive)] transition-all bg-[var(--background)]",children:"Delete"})]})]})]}),e.description&&(0,t.jsx)("p",{className:"text-sm text-[var(--foreground)] line-clamp-2",children:e.description}),e.ci_cd_info&&(0,t.jsxs)("div",{className:"text-sm",children:[(0,t.jsx)("p",{className:"text-[var(--muted-foreground)] text-[12px] uppercase tracking-wide",children:"CI / CD"}),(0,t.jsx)("p",{className:"text-[14px] text-[var(--accent)] font-medium truncate",children:e.ci_cd_info})]}),e.metadata&&Object.keys(e.metadata).some(e=>!c.has(e))&&(0,t.jsxs)("div",{className:"p-3 rounded-lg bg-[var(--muted)]/20 border border-dashed border-[var(--card-border)] space-y-1",children:[(0,t.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wide text-[var(--muted-foreground)]",children:"Metadata"}),(0,t.jsx)("div",{className:"space-y-1",children:Object.entries(e.metadata??{}).filter(([e])=>"undefined"!==e&&""!==e&&!c.has(e)).map(([e,r])=>(0,t.jsxs)("div",{className:"text-[12px] text-[var(--muted-foreground)] flex justify-between",children:[(0,t.jsx)("span",{className:"font-semibold",children:e}),(0,t.jsx)("span",{className:"truncate text-right",children:"string"==typeof r?r:JSON.stringify(r)})]},e))})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-[12px] uppercase tracking-wider text-[var(--muted-foreground)]",children:"Folders"}),(0,t.jsx)("span",{className:"text-[12px] text-[var(--muted-foreground)]",children:n?`${e.repos.length} connected`:"Unlinked"})]}),n?(0,t.jsxs)("div",{className:"mt-3 space-y-2",children:[e.repos.slice(0,2).map(e=>(0,t.jsxs)("div",{className:"p-2 rounded-lg border border-[var(--card-border)] bg-[var(--background)] text-[11px]",children:[(0,t.jsx)("div",{className:"font-semibold truncate",children:e.name}),e.path&&(0,t.jsx)("p",{className:"text-[10px] text-[var(--muted-foreground)] truncate",children:e.path})]},e.id)),e.repos.length>2&&(0,t.jsxs)("p",{className:"text-[10px] text-center text-[var(--muted-foreground)]",children:["+ ",e.repos.length-2," more"]})]}):(0,t.jsx)("p",{className:"mt-3 text-[12px] text-[var(--muted-foreground)]",children:"No folders added yet."})]})]})}var p=e.i(535208),m=e.i(866389);let f=[{value:"queued",label:"Queued",color:"var(--status-queued)",icon:"○"},{value:"in_progress",label:"In Progress",color:"var(--status-in-progress)",icon:"◑"},{value:"blocked",label:"Blocked",color:"var(--status-blocked)",icon:"⊘"},{value:"completed",label:"Done",color:"var(--status-completed)",icon:"●"},{value:"failed",label:"Failed",color:"var(--status-failed)",icon:"✕"}];function h({status:e,onStatusChange:a}){let[s,o]=(0,r.useState)(!1),[n,l]=(0,r.useState)(null),i=(0,r.useRef)(null),d=(0,r.useRef)(null),c=(0,r.useCallback)(()=>{if(!i.current)return;let e=i.current.getBoundingClientRect();l({top:e.bottom+4,left:e.left})},[]);(0,r.useEffect)(()=>{if(!s)return;c();let e=e=>{i.current&&!i.current.contains(e.target)&&d.current&&!d.current.contains(e.target)&&o(!1)};return document.addEventListener("pointerdown",e),()=>document.removeEventListener("pointerdown",e)},[s,c]),(0,r.useEffect)(()=>{o(!1)},[e]);let u=f.find(t=>t.value===e)||f[0],p="completed"===e,h="in_progress"===e;return(0,t.jsxs)("div",{className:"relative flex-shrink-0",ref:i,children:[(0,t.jsxs)("button",{type:"button",onClick:e=>{e.stopPropagation(),a&&o(!s)},className:`w-4 h-4 rounded-full border-[1.5px] flex items-center justify-center transition-all
3
- hover:scale-110 focus-visible:outline-2 focus-visible:outline-[var(--ring)]
4
- ${a?"cursor-pointer":"cursor-default"}
5
- ${h?"animate-pulse":""}
6
- `,style:{borderColor:u.color,backgroundColor:p?u.color:"transparent"},title:u.label,children:[p&&(0,t.jsx)("svg",{className:"w-2.5 h-2.5 text-white",viewBox:"0 0 12 12",fill:"none",children:(0,t.jsx)("path",{d:"M2.5 6L5 8.5L9.5 3.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),"failed"===e&&(0,t.jsx)("svg",{className:"w-2 h-2",viewBox:"0 0 12 12",fill:"none",children:(0,t.jsx)("path",{d:"M3 3L9 9M9 3L3 9",stroke:u.color,strokeWidth:"1.5",strokeLinecap:"round"})}),h&&(0,t.jsx)("div",{className:"w-1.5 h-1.5 rounded-full",style:{backgroundColor:u.color}})]}),s&&n&&(0,m.createPortal)((0,t.jsx)("div",{ref:d,className:"fixed z-[9999] py-1 rounded-lg border shadow-lg min-w-[140px]",style:{top:n.top,left:n.left,backgroundColor:"var(--card-bg)",borderColor:"var(--card-border)"},children:f.map(r=>{let s=r.value===e;return(0,t.jsxs)("button",{type:"button",className:`w-full flex items-center gap-2 px-3 py-1.5 text-xs text-left transition-colors
7
- hover:bg-[var(--item-hover-bg)]
8
- ${s?"font-semibold bg-[var(--item-hover-bg)]":""}
9
- `,onClick:e=>{e.stopPropagation(),a?.(r.value),o(!1)},children:[(0,t.jsxs)("span",{className:"w-3 h-3 rounded-full border-[1.5px] flex items-center justify-center",style:{borderColor:r.color,backgroundColor:"completed"===r.value?r.color:"transparent"},children:["completed"===r.value&&(0,t.jsx)("svg",{className:"w-2 h-2 text-white",viewBox:"0 0 12 12",fill:"none",children:(0,t.jsx)("path",{d:"M2.5 6L5 8.5L9.5 3.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),"failed"===r.value&&(0,t.jsx)("svg",{className:"w-1.5 h-1.5",viewBox:"0 0 12 12",fill:"none",children:(0,t.jsx)("path",{d:"M3 3L9 9M9 3L3 9",stroke:r.color,strokeWidth:"1.5",strokeLinecap:"round"})}),"in_progress"===r.value&&(0,t.jsx)("div",{className:"w-1 h-1 rounded-full",style:{backgroundColor:r.color}})]}),(0,t.jsx)("span",{style:{color:s?r.color:void 0},children:r.label}),s&&(0,t.jsx)("svg",{className:"w-3 h-3 ml-auto",viewBox:"0 0 12 12",fill:"none",children:(0,t.jsx)("path",{d:"M2 6L5 9L10 3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]},r.value)})}),document.body)]})}var x=e.i(353662);let g=new Map,b=new Map;async function j(e){let t=g.get(e);if(void 0!==t)return t;let r=b.get(e);if(r)return r;let a=(async()=>{let t=await fetch(`/api/tasks/${e}/graph`,{method:"GET",cache:"no-store"});if(404===t.status)return g.set(e,null),null;let r=await t.json().catch(()=>({}));if(!t.ok)throw Error(r?.error||`Failed to fetch graph summary (${t.status})`);let a=r?.graph??null,s=a?(0,x.buildGraphSummary)(a):null;return g.set(e,s),s})();b.set(e,a);try{return await a}finally{b.delete(e)}}let v={queued:{className:"badge-status-queued",label:"Queued",dotColor:"bg-[var(--status-queued)]"},in_progress:{className:"badge-status-in_progress",label:"In Progress",dotColor:"bg-[var(--status-in-progress)]"},blocked:{className:"badge-status-blocked",label:"Blocked",dotColor:"bg-[var(--status-blocked)]"},completed:{className:"badge-status-completed",label:"Completed",dotColor:"bg-[var(--status-completed)]"},failed:{className:"badge-status-failed",label:"Failed",dotColor:"bg-[var(--status-failed)]"}},y={INTAKE:{icon:"📥",label:"Intake"},PROGRESS:{icon:"🔄",label:"Progress"},DONE:{icon:"✅",label:"Done"}};function k({task:e,onClick:a,compact:s=!1,onStatusChange:o,onApprovalModeChange:n,onStageChange:l,stageOptions:i,currentStage:d,allTasks:c,relationship:u="none"}){v[e.status||"queued"],e.stage&&y[e.stage];let{summary:p,isLoading:m}=function(e){let t=(0,r.useMemo)(()=>e?g.get(e)??null:null,[e]),[a,s]=(0,r.useState)(t),[o,n]=(0,r.useState)(!!e&&null===t),[l,i]=(0,r.useState)(null),d=(0,r.useCallback)(async()=>{if(!e){s(null),i(null),n(!1);return}n(!0),i(null);try{let t=await j(e);s(t)}catch(e){i(e instanceof Error?e.message:"Failed to fetch graph summary"),s(null)}finally{n(!1)}},[e]);return(0,r.useEffect)(()=>{d()},[d]),{summary:a,isLoading:o,error:l,refresh:d}}("draft"!==e.id?e.id:null),f=d??e.stage,x=f&&i?i.indexOf(f):-1,b=x>0&&i?i[x-1]:null,k=x>=0&&i&&x<i.length-1?i[x+1]:null,w=e.depends_on?.length?e.depends_on.map(e=>{let t=c?.find(t=>t.id===e);return{id:e,title:t?.title||e.slice(0,8),done:t?.status==="completed"}}):null;return w&&w.every(e=>e.done),(0,t.jsxs)("div",{onClick:a,role:"button",tabIndex:0,onKeyDown:e=>"Enter"===e.key&&a?.(),className:`group relative flex flex-col gap-1.5 sm:gap-2 p-2 sm:p-3 surface-card cursor-grab active:cursor-grabbing
10
- focus-visible:outline-2 focus-visible:outline-[var(--ring)] focus-visible:outline-offset-2
11
- ${"active"===u?"border-primary ring-2 ring-primary/20 z-40":"blocking"===u?"border-[var(--status-blocked)] bg-rose-50/30 dark:bg-rose-950/20 z-20":"dependent"===u?"border-[var(--status-in-progress)] bg-blue-50/30 dark:bg-blue-950/20 z-20":"dimmed"===u?"opacity-40 grayscale scale-[0.98]":""}
12
- ${"failed"===e.status&&"none"===u?"border-red-200 bg-red-50/30 dark:bg-red-950/20":""}
13
- ${"completed"===e.status&&"none"===u?"opacity-75 bg-[var(--secondary)]":""}
14
- `,children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,t.jsx)("h3",{className:`text-sm font-medium text-[var(--foreground)] leading-snug line-clamp-2 sm:line-clamp-3
15
- ${"completed"===e.status?"text-[var(--muted-foreground)] line-through":""}
16
- `,children:e.title||"Untitled Task"}),(0,t.jsx)("div",{className:"shrink-0 mt-0.5",children:(0,t.jsx)(h,{status:e.status||"queued",onStatusChange:o})})]}),(0,t.jsx)("div",{className:"flex items-center justify-between min-h-[16px]",children:(0,t.jsxs)("div",{className:"flex items-center gap-2 text-[10px] text-[var(--muted-foreground)] flex-wrap",children:[void 0!==e.priority&&e.priority>0&&(0,t.jsxs)("span",{className:`px-1.5 py-0.5 rounded font-semibold bg-[var(--secondary)] ${0===e.priority?"text-[var(--primary)]":""}`,children:["P",e.priority]}),n&&("auto"===e.approval_mode?(0,t.jsx)("span",{className:"px-1.5 py-0.5 rounded font-semibold bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400 cursor-pointer select-none",title:"Auto-approve enabled. Click to switch to manual.",onClick:e=>{e.stopPropagation(),n("manual")},children:"AUTO"}):(0,t.jsx)("span",{className:"px-1.5 py-0.5 rounded font-semibold bg-gray-100 text-gray-400 dark:bg-gray-800 dark:text-gray-500 cursor-pointer select-none opacity-0 group-hover:opacity-100 transition-opacity",title:"Manual approval. Click to enable auto-approve.",onClick:e=>{e.stopPropagation(),n("auto")},children:"AUTO"})),"draft"!==e.id&&(0,t.jsx)("span",{className:"opacity-0 group-hover:opacity-100 transition-opacity font-mono text-[9px]",children:e.id.slice(0,5)})]})}),l&&f&&(b||k)?(0,t.jsxs)("div",{className:"flex items-center gap-2 pt-1",children:[b?(0,t.jsxs)("button",{type:"button",className:"rounded-full border border-[var(--border)] px-2.5 py-1 text-[10px] font-medium text-[var(--muted-foreground)] transition-colors hover:bg-[var(--app-shell-subtle)] hover:text-[var(--foreground)]",onClick:e=>{e.stopPropagation(),l(b)},children:["Back to ",b]}):null,k?(0,t.jsxs)("button",{type:"button",className:"rounded-full border border-[var(--border)] px-2.5 py-1 text-[10px] font-medium text-[var(--muted-foreground)] transition-colors hover:bg-[var(--app-shell-subtle)] hover:text-[var(--foreground)]",onClick:e=>{e.stopPropagation(),l(k)},children:["Move to ",k]}):null]}):null]})}let w={in_progress:{title:"In Progress",icon:"🔄",color:"var(--status-in-progress)",description:"Currently being worked on by the daemon"},blocked:{title:"Blocked",icon:"🚧",color:"var(--status-blocked)",description:"Waiting for input or resolution"},queued:{title:"Queued",icon:"📋",color:"var(--status-queued)",description:"Ready to be picked up"},completed:{title:"Completed",icon:"✅",color:"var(--status-completed)",description:"Successfully finished"}};function N({tasks:e,onSelectTask:r,onStatusChange:a}){if(0===e.length)return(0,t.jsxs)("div",{className:"text-center py-20 animate-fade-in",children:[(0,t.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-[var(--card-bg)] border border-[var(--card-border)] mb-4",children:(0,t.jsx)("span",{className:"text-3xl",children:"📋"})}),(0,t.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No tasks yet"}),(0,t.jsx)("p",{className:"text-[var(--muted-foreground)] text-sm max-w-md mx-auto",children:"Create your first task to get started. Tasks will appear here organized by status."})]});let s=e.filter(e=>"in_progress"===e.status),o=e.filter(e=>"queued"===e.status),n=e.filter(e=>"blocked"===e.status),l=e.filter(e=>"completed"===e.status||"failed"===e.status),i=(e,s)=>{if(0===s.length)return null;let o=w[e];return(0,t.jsxs)("section",{className:"mb-8 animate-fade-in-up",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-1.5 rounded-lg",style:{backgroundColor:`color-mix(in srgb, ${o.color} 10%, transparent)`},children:[(0,t.jsx)("span",{className:"text-lg",children:o.icon}),(0,t.jsx)("h3",{className:"text-sm font-semibold",style:{color:o.color},children:o.title}),(0,t.jsx)("span",{className:"px-2 py-0.5 rounded-full text-xs font-medium",style:{backgroundColor:`color-mix(in srgb, ${o.color} 15%, transparent)`,color:o.color},children:s.length})]}),(0,t.jsx)("p",{className:"text-xs text-[var(--muted-foreground)] hidden sm:block",children:o.description})]}),(0,t.jsx)("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:s.map((e,s)=>(0,t.jsx)("div",{className:"animate-fade-in-up",style:{animationDelay:`${50*s}ms`},children:(0,t.jsx)(k,{task:e,onClick:()=>r?.(e),onStatusChange:a?t=>a(e.id,t):void 0})},e.id))})]})};return(0,t.jsxs)("div",{children:[i("in_progress",s),i("blocked",n),i("queued",o),i("completed",l)]})}var C=e.i(827976);let _={id:"2c3cc1ca-956d-4b62-b295-4d2d3374103f",email:C.default.env.AGX_BOARD_USER_EMAIL||"local@agx.board",name:C.default.env.AGX_BOARD_USER_NAME||"Local Board User"};var E=e.i(524123);function S(){let e=(0,a.useRouter)(),s=(0,a.useSearchParams)(),{projects:o,isLoading:n,error:l,refetch:d,createProject:c,updateProject:m,deleteProject:f}=(0,E.useProjects)(),h=(0,p.useProjectFormState)(),[x,g]=(0,r.useState)(null),[b,j]=(0,r.useState)(!1),[v,y]=(0,r.useState)(null),{form:k,repos:w,handleRepoChange:N,addRepo:C,removeRepo:_,resetForm:S,hydrateFromProject:O,isSubmitting:A,setIsSubmitting:P,formError:L,setFormError:$,setForm:I}=h,M=()=>{g(null),S(),j(!0)},D=e=>{g(e),O(e),j(!0)};(0,r.useEffect)(()=>{let e=s.get("edit");if(!e||0===o.length||b)return;let t=o.find(t=>t.id===e);t&&D(t)},[s,o,b]),(0,r.useEffect)(()=>{"1"!==s.get("new")||b||(M(),e.replace("/projects"))},[s]);let R=(0,r.useCallback)(t=>{t.slug&&e.push(`/projects/${t.slug}`)},[e]),F=(0,r.useCallback)(e=>{y(e)},[]),B=(0,r.useCallback)(()=>{y(null)},[]),U=()=>{S(),j(!1),g(null),s.get("edit")&&e.replace("/projects")},J=async()=>{if(!k.name.trim())return void $("Project name is required");let t=w.find(e=>e.name.trim()&&!e.path.trim());if(t)return void $(`Local path is required for folder "${t.name}"`);$(null),P(!0);let r=(0,p.createProjectPayload)(k,w);try{if(x)await m(x.id,r),U();else{let t=await c(r);U(),e.push(`/projects/${t.slug}`)}}catch(e){$(e instanceof Error?e.message:"Failed to save project")}finally{P(!1)}},q=async e=>{if(window.confirm(`Delete project "${e.name}"? This cannot be undone.`))try{await f(e.id)}catch(e){alert(e instanceof Error?e.message:"Failed to delete project")}};return(0,t.jsx)(i,{children:(0,t.jsxs)("div",{className:"max-w-7xl mx-auto w-full flex flex-col min-h-full",children:[(0,t.jsxs)("header",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4 py-8",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-3xl font-bold tracking-tight",children:"Projects"}),(0,t.jsx)("p",{className:"text-[var(--muted-foreground)] mt-1",children:"Manage your projects and their folder contexts."})]}),(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)("button",{onClick:d,className:"px-4 py-2 rounded-xl border border-[var(--card-border)] bg-[var(--card-bg)] hover:border-[var(--primary)] transition-all text-sm font-medium",children:"Refresh"}),(0,t.jsx)("button",{onClick:M,className:"btn-primary px-6 py-2 shadow-lg shadow-[var(--primary)]/20",children:"+ New Project"})]})]}),n?(0,t.jsx)("div",{className:"flex-1 flex items-center justify-center py-20",children:(0,t.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,t.jsx)("span",{className:"spinner w-8 h-8 border-3 border-[var(--primary)] border-t-transparent rounded-full"}),(0,t.jsx)("p",{className:"text-sm text-[var(--muted-foreground)] animate-pulse",children:"Loading projects..."})]})}):0===o.length?(0,t.jsxs)("div",{className:"flex-1 flex flex-col items-center justify-center py-20 animate-fade-in",children:[(0,t.jsx)("div",{className:"w-24 h-24 rounded-3xl bg-[var(--card-bg)] border border-[var(--card-border)] flex items-center justify-center text-4xl mb-6 shadow-xl",children:"📂"}),(0,t.jsx)("h2",{className:"text-2xl font-bold mb-2",children:"You have no projects"}),(0,t.jsx)("p",{className:"text-[var(--muted-foreground)] text-center max-w-sm mb-8 leading-relaxed",children:"Create your first project to start organizing your tasks and connecting your folders."}),(0,t.jsx)("button",{onClick:M,className:"btn-primary px-8 py-3 text-lg shadow-xl shadow-[var(--primary)]/20",children:"Create a Project"})]}):(0,t.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 pb-20",children:o.map(e=>(0,t.jsx)(u,{project:e,onEdit:D,onDelete:q,onManageTasks:F,onClick:R},e.id))}),(0,t.jsx)(p.default,{isOpen:b,onClose:U,onSubmit:J,editingProject:x,form:k,repos:w,isSubmitting:A,formError:L,onFieldChange:(e,t)=>I(r=>({...r,[e]:t})),onRepoChange:N,onAddRepo:C,onRemoveRepo:_}),v&&(0,t.jsx)(T,{project:v,onClose:B})]})})}function T({project:e,onClose:a}){let{tasks:s,isLoading:o}=function(e={}){let t="1"===C.default.env.NEXT_PUBLIC_AGX_BOARD_DISABLE_AUTH,a=e.project,s=e.status,o=e.orphan,n=e.realtime,[l,i]=(0,r.useState)([]),[d,c]=(0,r.useState)(!0),[u,p]=(0,r.useState)(null),[m,f]=(0,r.useState)(null),[h,x]=(0,r.useState)(null),g=(0,r.useCallback)(e=>{if(!e)return[];if(Array.isArray(e))return Array.from(new Set(e.map(e=>String(e||"").trim()).filter(Boolean)));if("string"==typeof e){let t=e.trim();if(!t)return[];try{let e=JSON.parse(t);if(Array.isArray(e))return Array.from(new Set(e.map(e=>String(e||"").trim()).filter(Boolean)))}catch{}return Array.from(new Set(t.split(",").map(e=>e.trim()).filter(Boolean)))}return[]},[]),b=(0,r.useCallback)(e=>{let t=String(e||"").match(/^---\n([\s\S]*?)\n---\n?/);if(!t)return[];let r=t[1].split("\n").find(e=>e.trim().toLowerCase().startsWith("depends_on:"));return r?g(r.slice(r.indexOf(":")+1).trim()):[]},[g]),j=(0,r.useCallback)((e,t)=>{let r=g(e.depends_on);if(r.length>0)return{...e,depends_on:r};let a="string"==typeof e?.content?b(e.content):[];if(a.length>0)return{...e,depends_on:a};let s=g(t?.depends_on);return s.length>0?{...e,depends_on:s}:e},[b,g]),v=(0,r.useCallback)(async()=>{try{let e=new URLSearchParams;a&&e.set("project",a),s&&e.set("status",s),o&&e.set("orphan","1");let t=await fetch(`/api/tasks?${e.toString()}`);if(!t.ok)throw Error("Failed to fetch tasks");let r=await t.json(),n=Array.isArray(r.tasks)?r.tasks.map(e=>j(e)):[];i(n),p(null)}catch(e){p(e instanceof Error?e:Error("Unknown error"))}finally{c(!1)}},[a,s,o]);(0,r.useEffect)(()=>{v()},[v]),(0,r.useEffect)(()=>{if(!t||!n)return;let e=setInterval(v,3e3);return()=>clearInterval(e)},[t,n,v]),(0,r.useEffect)(()=>{if(t||!n)return;let e={auth:{getSession:async()=>({data:{session:{access_token:"local-token",refresh_token:"local-refresh",expires_in:3600,user:{id:_.id,email:_.email,user_metadata:{name:_.name,full_name:_.name}}}},error:null}),signInWithOAuth:async()=>({error:Error("Auth disabled in AGX Board local mode")}),signOut:async()=>({error:null}),onAuthStateChange:()=>({data:{subscription:{unsubscribe(){}}}})},channel:()=>({on(){return this},subscribe(){return this}}),removeChannel(){}},r=e.channel("tasks-changes").on("postgres_changes",{event:"*",schema:"public",table:"tasks"},e=>{"INSERT"===e.eventType?i(t=>{let r=j(e.new);return t.some(e=>e.id===r.id)?t:[r,...t]}):"UPDATE"===e.eventType?i(t=>t.map(t=>t.id===e.new.id?j(e.new,t):t)):"DELETE"===e.eventType&&i(t=>t.filter(t=>t.id!==e.old.id))}).subscribe();return()=>{e.removeChannel(r)}},[n,t]),(0,r.useEffect)(()=>{if(t||!n)return;let e=setInterval(v,3e3);return()=>clearInterval(e)},[n,t,v]);let y=(0,r.useCallback)(async(e,t)=>{let r=await fetch("/api/tasks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:e,swarm_models:t})});if(!r.ok)throw Error((await r.json()).error||"Failed to create task");let{task:a}=await r.json(),s=j(a);return i(e=>e.some(e=>e.id===s.id)?e:[s,...e]),s},[e.realtime,j]),k=(0,r.useCallback)(async(e,t)=>{let r=await fetch(`/api/tasks/${e}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){let e=null;throw"function"==typeof r.json&&(e=await r.json().catch(e=>(console.warn("[useTasks] failed to parse response:",e),null))),Error(e?.error||e?.details||`Failed to update task (${r.status} ${r.statusText||"Error"})`)}let{task:a}=await r.json();return i(t=>t.map(t=>t.id===e?j({...t,...a},t):t)),j(a)},[e.realtime,j]),w=(0,r.useCallback)(async e=>{if(!(await fetch(`/api/tasks/${e}`,{method:"DELETE"})).ok)throw Error("Failed to delete task");i(t=>t.filter(t=>t.id!==e))},[e.realtime]),N=(0,r.useCallback)(async e=>{let t=await fetch("/api/queue/complete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw Error((await t.json().catch(()=>({}))).error||"Failed to complete task stage");let{task:r}=await t.json();return i(t=>t.map(t=>t.id===e.taskId?j({...t,...r},t):t)),j(r)},[e.realtime,j]),E=(0,r.useCallback)(async e=>{f(e.taskId),x(null);try{let t=await fetch(`/api/orchestrator/tasks/${e.taskId}/cancel`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e.reason?{reason:e.reason}:{})});if(!t.ok){let e=await t.json().catch(()=>({})),r=e?.error||"Failed to cancel workflow";throw Error(r)}return t.json()}catch(t){let e=t instanceof Error?t:Error("Failed to cancel workflow");throw x(e),e}finally{f(null)}},[]),S=(0,r.useCallback)(async e=>{let t=await fetch(`/api/tasks/${e}`),r=await t.json().catch(e=>(console.warn("[useTasks] failed to parse response:",e),null));if(!t.ok)throw Error(r?.error||"Failed to fetch task details");return j(r?.task)},[j]),T=(0,r.useCallback)(async e=>{let t=await fetch("/api/tasks/assign-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({project_id:e})}),r=await t.json().catch(()=>({}));if(!t.ok)throw Error(r?.error||"Failed to assign orphan tasks");return await v(),{updatedCount:Number(r?.updatedCount||0),taskIds:Array.isArray(r?.taskIds)?r.taskIds:[]}},[v]);return{tasks:l,isLoading:d,error:u,cancellingTaskId:m,isCancelling:!!m,cancelError:h,refetch:v,createTask:y,updateTask:k,deleteTask:w,completeTaskStage:N,cancelWorkflow:E,fetchTask:S,assignOrphanTasksToProject:T}}({project:e.slug});return(0,t.jsx)("div",{className:"modal-backdrop p-2 sm:p-4 z-50 overflow-y-auto flex items-center justify-center",onClick:e=>e.target===e.currentTarget&&a(),children:(0,t.jsxs)("div",{className:"modal-content w-full max-w-5xl mx-2 sm:mx-auto bg-[var(--card-bg)] rounded-3xl border border-[var(--card-border)] shadow-2xl animate-scale-in flex flex-col max-h-[90vh]",children:[(0,t.jsxs)("div",{className:"px-4 py-4 sm:px-8 sm:py-6 border-b border-[var(--card-border)] flex items-center justify-between flex-shrink-0",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("h2",{className:"text-xl font-bold",children:["Tasks for ",e.name]}),(0,t.jsx)("p",{className:"text-xs text-[var(--muted-foreground)] mt-0.5",children:"Viewing all tasks associated with this project."})]}),(0,t.jsx)("button",{onClick:a,className:"p-2 rounded-xl hover:bg-[var(--muted)]/50 transition-colors",children:(0,t.jsx)("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto p-8",children:o?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-20",children:[(0,t.jsx)("span",{className:"spinner w-8 h-8 border-3 border-[var(--primary)] border-t-transparent rounded-full mb-4"}),(0,t.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"Loading project tasks..."})]}):(0,t.jsx)(N,{tasks:s})}),(0,t.jsx)("div",{className:"px-8 py-6 border-t border-[var(--card-border)] flex justify-end flex-shrink-0",children:(0,t.jsx)("button",{onClick:a,className:"px-6 py-2 rounded-xl border border-[var(--card-border)] hover:bg-[var(--muted)]/50 transition-colors text-sm font-medium",children:"Close"})})]})})}e.s(["default",()=>S],936381)}]);
@@ -1,20 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,568656,e=>{"use strict";var t=e.i(762281),r=e.i(307241),a=e.i(506420),s=e.i(935851),o=e.i(958164),n=e.i(429056),i=e.i(417442),l=e.i(363732);let d=(0,l.default)("calendar-clock",[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]]);var c=e.i(529471),u=e.i(580873),m=e.i(575479),x=e.i(640481),p=e.i(929870),b=e.i(8707),h=e.i(794731),v=e.i(169610),f=e.i(572665),g=e.i(519132),j=e.i(797167),y=e.i(524123),w=e.i(945028),k=e.i(490011),N=e.i(984242),S=e.i(208343),C=e.i(884564),$=e.i(40527),I=e.i(378764);let A=(0,l.default)("pause",[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]]);var T=e.i(245900),E=e.i(437307),O=e.i(715908),M=e.i(553069),P=e.i(827430),R=e.i(352687),L=e.i(667480);function D(e){let t=e.cadence||e.cronExpr;return t?(0,M.cronToHuman)(e.cronExpr||t)??t:"No frequency"}function F(e){return"active"===e.state&&(null!==e.nextRunAt&&e.nextRunAt-Date.now()<0?!e.lastRunAt||!(e.lastRunAt>=e.nextRunAt):!!e.prevScheduledAt&&!!e.lastRunAt&&e.lastRunAt>e.prevScheduledAt+3e5)}function _(e,t){if("paused"===t)return"Paused";if("stopped"===t)return"Stopped";if(null===e)return"Pending";let r=e-Date.now();return r<0?"Overdue":r<6e4?`in ${Math.round(r/1e3)}s`:r<36e5?`in ${Math.round(r/6e4)}m`:r<864e5?`in ${Math.round(r/36e5)}h`:`in ${Math.round(r/864e5)}d`}function z(e){return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function U({job:e,onClose:r,onUpdate:a}){let[o,n]=(0,s.useState)({cadence:e.cronExpr||e.cadence||"",condition:e.condition||""}),[i,l]=(0,s.useState)(!0),[d,c]=(0,s.useState)(!1),m=async()=>{i&&(c(!0),await a({cadence:o.cadence,condition:o.condition}),c(!1),r())};return(0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 px-4 py-6",children:(0,t.jsxs)("div",{className:"flex w-full max-w-md max-h-[85vh] flex-col rounded-[28px] border border-[var(--border)] bg-[var(--card-bg)] shadow-2xl",children:[(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-between border-b border-[var(--border)] px-6 py-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,t.jsx)(u.Clock,{className:"h-4 w-4 text-[var(--muted-foreground)]"}),(0,t.jsx)("p",{className:"text-sm font-semibold text-[var(--foreground)]",children:e.name})]}),(0,t.jsx)("button",{type:"button",onClick:r,className:"rounded-lg border border-[var(--border)] p-2 text-[var(--muted-foreground)] transition-colors hover:border-[var(--card-hover-border)] hover:text-[var(--foreground)]",children:(0,t.jsx)(j.X,{className:"h-4 w-4"})})]}),(0,t.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto px-6 py-5",children:(0,t.jsx)(L.ScheduleConditionPicker,{value:o,onChange:(e,t)=>{n(e),l(t.isScheduleValid)},scheduleLabel:"Schedule",conditionLabel:"Condition",conditionHelpText:"Scheduled runs and Run now will check this condition before executing."})}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-end gap-3 border-t border-[var(--border)] px-6 py-4",children:[(0,t.jsx)("button",{type:"button",onClick:r,className:"rounded-xl border border-[var(--border)] px-4 py-2.5 text-sm text-[var(--foreground)] transition-colors hover:border-[var(--card-hover-border)]",children:"Cancel"}),(0,t.jsx)("button",{type:"button",onClick:()=>void m(),disabled:d||!i,className:"rounded-xl border border-emerald-500/30 bg-emerald-500/10 px-4 py-2.5 text-sm text-emerald-400 transition-colors hover:bg-emerald-500/20 disabled:opacity-50",children:d?"Saving...":"Save"})]})]})})}function q({job:e,onClose:r,onUpdate:a}){let[o,n]=(0,s.useState)(e.prompt||""),[i,l]=(0,s.useState)(!1),d=async()=>{o===e.prompt||(l(!0),await a({prompt:o}),l(!1)),r()};return(0,t.jsx)("div",{className:"fixed inset-0 z-40 flex items-center justify-center bg-black/50 px-4 py-6",children:(0,t.jsxs)("div",{className:"flex w-full max-w-6xl max-h-[85vh] flex-col rounded-[28px] border border-[var(--border)] bg-[var(--card-bg)] shadow-2xl",children:[(0,t.jsxs)("div",{className:"flex shrink-0 items-start justify-between gap-4 border-b border-[var(--border)] px-6 py-5",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2.5",children:[(0,t.jsx)("p",{className:"truncate text-lg font-semibold text-[var(--foreground)]",children:e.name}),(0,t.jsx)("span",{className:`rounded-full border px-2 py-0.5 text-[10px] font-semibold uppercase tracking-[0.16em] ${V(e.state)}`,children:J(e.state)}),e.condition?(0,t.jsx)("span",{className:"rounded-md border border-blue-400/20 bg-blue-500/10 px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wider text-blue-400",children:"gated"}):null]}),(0,t.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-3 text-xs text-[var(--muted-foreground)]",children:[(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,t.jsx)(u.Clock,{className:"h-3.5 w-3.5"}),D(e)]}),(0,t.jsxs)("span",{children:["Next run ",_(e.nextRunAt,e.state)]}),(0,t.jsxs)("span",{children:["Updated ",z(e.updatedAt)]})]})]}),(0,t.jsx)("button",{type:"button",onClick:r,className:"rounded-lg border border-[var(--border)] p-2 text-[var(--muted-foreground)] transition-colors hover:border-[var(--card-hover-border)] hover:text-[var(--foreground)]","aria-label":"Close scheduled task details",children:(0,t.jsx)(j.X,{className:"h-4 w-4"})})]}),(0,t.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto px-6 py-6 space-y-5",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mb-2 text-xs font-semibold uppercase tracking-[0.18em] text-[var(--muted-foreground)]",children:"Instructions"}),(0,t.jsx)("div",{className:"rounded-2xl border border-[var(--card-hover-border)] bg-[var(--overlay-panel-muted)] px-1 py-1 text-sm leading-6 text-[var(--foreground)]",children:(0,t.jsx)($.default,{content:o,editable:!0,onChange:n,placeholder:"Write instructions in markdown…"})})]})}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-end gap-3 border-t border-[var(--border)] px-6 py-4",children:[(0,t.jsx)("button",{type:"button",onClick:r,className:"rounded-xl border border-[var(--border)] px-4 py-2.5 text-sm text-[var(--foreground)] transition-colors hover:border-[var(--card-hover-border)]",children:"Cancel"}),(0,t.jsx)("button",{type:"button",onClick:()=>void d(),disabled:i,className:"rounded-xl border border-emerald-500/30 bg-emerald-500/10 px-4 py-2.5 text-sm text-emerald-400 transition-colors hover:bg-emerald-500/20 disabled:opacity-50",children:i?"Saving...":"Save"})]})]})})}function J(e){return"active"===e?"Active":"paused"===e?"Paused":"Stopped"}function V(e){return"active"===e?"border-[var(--status-completed-border)] bg-[var(--status-completed-bg)] text-[var(--status-completed)]":"paused"===e?"border-[var(--status-blocked-border)] bg-[var(--status-blocked-bg)] text-[var(--status-blocked)]":"border-[var(--tone-neutral-border)] bg-[var(--tone-neutral-bg)] text-[var(--tone-neutral)]"}function W({projectId:e,objectiveId:r,objectiveKey:a,createDefaults:o,onCreateTask:n}){let{jobs:i,loading:l,refresh:d,deleteJob:m,toggleJob:x,updateJob:b,fetchRuns:v,runNow:f}=(0,O.usePromptJobs)(e,{requireProjectId:!0,includeObjectiveJobs:!0,objectiveId:r}),[g,j]=(0,s.useState)(!1),[y,w]=(0,s.useState)(null),[k,N]=(0,s.useState)(null),[S,C]=(0,s.useState)(null),[$,I]=(0,s.useState)(null),[M,L]=(0,s.useState)(null),[W,B]=(0,s.useState)([]),H=(0,s.useMemo)(()=>i.filter(e=>e.objectiveId===r).sort((e,t)=>!e.name.toLowerCase().includes("objective worker")-!t.name.toLowerCase().includes("objective worker")),[i,r]),K=(0,s.useMemo)(()=>H.find(e=>e.id===S)??null,[S,H]),X=(0,s.useCallback)(async()=>{if(0===H.length)return void B([]);let e=[];await Promise.all(H.map(async t=>{for(let r of(await v(t.id)))e.push({...r,jobName:t.name})})),e.sort((e,t)=>new Date(t.startedAt??t.createdAt).getTime()-new Date(e.startedAt??e.createdAt).getTime()),B(e.slice(0,10))},[H,v]);(0,s.useEffect)(()=>{X()},[X]);let G=async e=>{w(e.id),N(null);let t=await m(e.id);(w(null),t)?(S===e.id&&C(null),await d()):N(`Failed to hide "${e.name}".`)},Y=async e=>{N(null);let t=await n(e);return t&&await d(),t},Q=(0,s.useMemo)(()=>H.find(e=>e.id===M)??null,[M,H]);return(0,t.jsxs)(t.Fragment,{children:[g?(0,t.jsx)(P.CreateJobModal,{onClose:()=>j(!1),onSubmit:async e=>{await Y(e)},createDefaults:o,contextLabel:a}):null,K?(0,t.jsx)(q,{job:K,onClose:()=>C(null),onUpdate:async e=>{let t=await b(K.id,e);return t&&await d(),t}}):null,Q?(0,t.jsx)(U,{job:Q,onClose:()=>L(null),onUpdate:async e=>{let t=await b(Q.id,e);return t&&await d(),t}}):null,(0,t.jsxs)("div",{className:"px-1",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-semibold text-[var(--foreground)]",children:"Scheduled Jobs"}),(0,t.jsxs)("p",{className:"mt-1 text-sm text-[var(--muted-foreground)]",children:["Shared scheduled-task list filtered to objective label"," ",(0,t.jsx)("span",{className:"font-mono text-[var(--foreground)]",children:a}),"."]})]}),(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:(0,t.jsxs)("button",{type:"button",onClick:()=>j(!0),className:"inline-flex items-center gap-2 rounded-xl border border-[var(--border)] px-3 py-2 text-sm text-[var(--foreground)] transition-colors hover:border-[var(--card-hover-border)]",children:[(0,t.jsx)(p.Plus,{className:"h-4 w-4"}),"New task"]})})]}),k?(0,t.jsx)("p",{className:"mt-4 text-sm text-[var(--destructive)]",children:k}):null,(0,t.jsx)("div",{className:"mt-5 space-y-3",children:l&&0===H.length?(0,t.jsx)("div",{className:"rounded-2xl border border-dashed border-[var(--border)] px-4 py-8 text-sm text-[var(--muted-foreground)]",children:"Loading scheduled tasks..."}):0===H.length?(0,t.jsx)("div",{className:"rounded-2xl border border-dashed border-[var(--border)] px-4 py-8 text-sm text-[var(--muted-foreground)]",children:"No scheduled tasks for this objective yet."}):H.map(e=>(0,t.jsx)("div",{onClick:()=>C(e.id),onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),C(e.id))},role:"button",tabIndex:0,className:`block w-full rounded-2xl border px-4 py-4 text-left transition-colors focus:outline-none focus:ring-2 focus:ring-[var(--card-hover-border)] ${F(e)?"border-amber-500/40 bg-amber-500/5 hover:border-amber-500/60":"border-[var(--border)] bg-[var(--overlay-panel-muted)] hover:border-[var(--card-hover-border)]"}`,children:(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2.5",children:[(0,t.jsx)("span",{className:`inline-block size-2 shrink-0 rounded-full ${"active"===e.state?"bg-emerald-400":"paused"===e.state?"bg-amber-400":"bg-[var(--tone-neutral)]"}`}),(0,t.jsx)("p",{className:"truncate text-sm font-semibold text-[var(--foreground)]",children:e.name}),(0,t.jsx)("span",{className:`rounded-full border px-2 py-0.5 text-[10px] font-semibold uppercase tracking-[0.16em] ${V(e.state)}`,children:J(e.state)}),F(e)&&(0,t.jsxs)("span",{className:"shrink-0 text-[10px] font-semibold uppercase tracking-[0.16em] text-amber-400 bg-amber-500/10 px-2 py-0.5 rounded-full border border-amber-500/20 inline-flex items-center gap-1",children:[(0,t.jsx)(u.Clock,{className:"h-3 w-3"}),"overdue"]})]}),(0,t.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-3 text-xs text-[var(--muted-foreground)]",children:[(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 ${F(e)?"text-amber-400 font-medium":""}`,children:[(0,t.jsx)(u.Clock,{className:"h-3.5 w-3.5"}),"Next run ",_(e.nextRunAt,e.state)]}),(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,t.jsx)(u.Clock,{className:"h-3.5 w-3.5"}),D(e)]}),e.condition?(0,t.jsx)("span",{className:"rounded-md border border-blue-400/20 bg-blue-500/10 px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wider text-blue-400",children:"gated"}):null]}),(0,t.jsx)("p",{className:"mt-3 line-clamp-2 text-sm leading-6 text-[var(--muted-foreground)]",children:e.prompt.split("\n").map(e=>e.trim()).find(Boolean)||"No instructions yet"}),e.condition?(0,t.jsxs)("p",{className:"mt-2 text-xs text-[var(--muted-foreground)]",children:["Condition: ",e.condition]}):null]}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",children:[(0,t.jsx)("button",{type:"button",title:"Run now",onClick:async t=>{t.stopPropagation(),w(e.id),await f(e.id),w(null),await d(),await X()},disabled:y===e.id,className:"rounded-lg border border-[var(--border)] p-2 text-[var(--muted-foreground)] transition-colors hover:border-emerald-400/40 hover:text-emerald-300 disabled:cursor-not-allowed disabled:opacity-50",children:(0,t.jsx)(T.Play,{className:"h-3.5 w-3.5 fill-current"})}),(0,t.jsx)("button",{type:"button",title:"Edit schedule",onClick:t=>{t.stopPropagation(),L(e.id)},className:"rounded-lg border border-[var(--border)] p-2 text-[var(--muted-foreground)] transition-colors hover:border-sky-400/40 hover:text-sky-300",children:(0,t.jsx)(u.Clock,{className:"h-3.5 w-3.5"})}),(0,t.jsx)("button",{type:"button",title:"active"===e.state?"Pause":"Resume",onClick:async t=>{t.stopPropagation(),w(e.id),await x(e),w(null)},disabled:y===e.id,className:`rounded-lg border p-2 transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${"active"===e.state?"border-[var(--border)] text-[var(--muted-foreground)] hover:border-amber-400/40 hover:text-amber-300":"border-emerald-500/30 text-emerald-400 hover:border-emerald-400/50 hover:text-emerald-300"}`,children:"active"===e.state?(0,t.jsx)(A,{className:"h-3.5 w-3.5"}):(0,t.jsx)(T.Play,{className:"h-3.5 w-3.5 fill-current"})}),(0,t.jsx)("button",{type:"button",title:"Delete",onClick:t=>{t.stopPropagation(),I(e)},disabled:y===e.id,className:"rounded-lg border border-[var(--border)] p-2 text-[var(--muted-foreground)] transition-colors hover:border-[var(--status-failed-border)] hover:text-[var(--destructive)] disabled:cursor-not-allowed disabled:opacity-50",children:(0,t.jsx)(h.Trash2,{className:"h-3.5 w-3.5"})})]})]})},e.id))}),W.length>0&&(0,t.jsxs)("div",{className:"mt-8",children:[(0,t.jsx)("p",{className:"text-[11px] font-medium uppercase tracking-[0.18em] text-[var(--muted-foreground)] mb-3",children:"Recent executions"}),(0,t.jsx)("div",{className:"space-y-0.5",children:W.map(e=>{let r=e.startedAt??e.createdAt,a="success"===e.status,s="failed"===e.status,o="running"===e.status;return(0,t.jsxs)("div",{className:"py-2 px-2 rounded-md text-xs",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("span",{className:`flex size-5 shrink-0 items-center justify-center rounded-full border ${a?"border-emerald-500/40 text-emerald-400":s?"border-[var(--status-failed-border)] text-[var(--destructive)]":o?"border-sky-500/40 text-sky-400":"border-[var(--border)] text-[var(--muted-foreground)]"}`,children:a?(0,t.jsx)(c.Check,{className:"h-3 w-3"}):s?(0,t.jsx)(E.XCircle,{className:"h-3 w-3"}):(0,t.jsx)("span",{className:`block size-1.5 rounded-full ${o?"bg-sky-400 animate-pulse":"bg-current"}`})}),(0,t.jsx)("span",{className:"truncate text-[var(--muted-foreground)]",children:e.jobName}),(0,t.jsx)("span",{className:"ml-auto shrink-0 text-[11px] text-[var(--muted-foreground)]",children:z(r)}),null!=e.durationMs&&(0,t.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-[var(--muted-foreground)]",children:e.durationMs<1e3?`${e.durationMs}ms`:`${Math.round(e.durationMs/1e3)}s`})]}),s&&e.error&&(0,t.jsxs)("p",{className:"mt-1 ml-8 text-[11px] leading-snug text-[var(--destructive)] opacity-80 line-clamp-2",children:[e.error,null!=e.exitCode&&` (exit ${e.exitCode})`]}),s&&e.logs&&(0,t.jsxs)("details",{className:"mt-1 ml-8 group",children:[(0,t.jsx)("summary",{className:"cursor-pointer text-[10px] text-[var(--muted-foreground)] hover:text-[var(--foreground)] select-none",children:"Show tail logs"}),(0,t.jsx)("pre",{className:"mt-1 max-h-40 overflow-auto rounded bg-[var(--muted)] px-2 py-1.5 text-[10px] leading-[1.4] text-[var(--foreground)] whitespace-pre-wrap break-words",children:e.logs})]})]},e.id)})})]})]}),(0,t.jsx)(R.default,{isOpen:!!$,title:"Delete scheduled task?",message:"This permanently removes the task and all its run history. This cannot be undone.",preview:$?.name,confirmLabel:"Delete",variant:"danger",onConfirm:()=>{$&&G($),I(null)},onCancel:()=>I(null)})]})}var B=e.i(498027),H=e.i(367859);let K=(0,l.default)("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]),X={"metric-check":{label:"Metric",className:"bg-blue-500/15 text-blue-400 border-blue-500/30"},"status-update":{label:"Status",className:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30"},milestone:{label:"Milestone",className:"bg-amber-500/15 text-amber-400 border-amber-500/30"},note:{label:"Note",className:"bg-[var(--tone-neutral-bg)] text-[var(--tone-neutral)] border-[var(--tone-neutral-border)]"}},G=["metric-check","status-update","milestone","note"];function Y({activity:e}){let[r,a]=(0,s.useState)(!1),o=X[e.type]??X.note,n=e.body.length>200;return(0,t.jsxs)("div",{className:"relative pl-6 pb-6 last:pb-0",children:[(0,t.jsx)("div",{className:"absolute left-0 top-1.5 h-3 w-3 rounded-full border-2 border-[var(--timeline-node-border)] bg-[var(--timeline-node-bg)]"}),(0,t.jsx)("div",{className:"absolute bottom-0 left-[5px] top-4 w-px bg-[var(--timeline-track)] last:hidden"}),(0,t.jsxs)("div",{className:"mb-1.5 flex items-center gap-2",children:[(0,t.jsx)("span",{className:`rounded-full border px-2 py-0.5 text-[10px] font-semibold uppercase tracking-[0.14em] ${o.className}`,children:o.label}),(0,t.jsx)("span",{className:"text-[11px] text-[var(--muted-foreground)]",children:function(e){let t=Date.now(),r=Date.parse(e);if(Number.isNaN(r))return e;let a=Math.floor((t-r)/6e4);if(a<1)return"just now";if(a<60)return`${a}m ago`;let s=Math.floor(a/60);if(s<24)return`${s}h ago`;let o=Math.floor(s/24);return o<30?`${o}d ago`:new Date(r).toLocaleDateString("en-US",{month:"short",day:"numeric",year:o>365?"numeric":void 0})}(e.createdAt)}),"manual"!==e.source&&(0,t.jsx)("span",{className:"max-w-[180px] truncate font-mono text-[11px] text-[var(--app-shell-soft-text)]",children:e.source})]}),r?(0,t.jsx)("div",{className:"prose prose-sm max-w-none text-sm text-[var(--foreground)] prose-neutral dark:prose-invert",children:(0,t.jsx)(S.Markdown,{content:e.body})}):(0,t.jsx)("div",{className:`text-sm leading-relaxed text-[var(--muted-foreground)] ${n?"max-h-24 overflow-hidden [mask-image:linear-gradient(to_bottom,black_72%,transparent)]":""}`,children:(0,t.jsx)(S.Markdown,{content:e.body})}),n&&(0,t.jsxs)("button",{type:"button",onClick:()=>a(!r),className:"mt-1.5 flex items-center gap-1 text-xs text-[var(--muted-foreground)] transition-colors hover:text-[var(--foreground)]",children:[r?(0,t.jsx)(B.ChevronDown,{size:12}):(0,t.jsx)(H.ChevronRight,{size:12}),r?"Show less":"Show more"]})]})}function Q({projectId:e,objectiveId:r,onCreated:a,onCancel:o}){let[n,i]=(0,s.useState)("note"),[l,d]=(0,s.useState)(""),[c,u]=(0,s.useState)(!1),m=(0,s.useRef)(null);(0,s.useEffect)(()=>{m.current?.focus()},[]);let x=async()=>{let t=l.trim();if(t&&!c){u(!0);try{let s=await fetch(`/api/projects/${e}/objectives/${r}/activities`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:n,body:t})});if(!s.ok)throw Error("Failed to create activity");let o=await s.json();a(o)}catch(e){console.error("Failed to create activity:",e)}finally{u(!1)}}};return(0,t.jsxs)("div",{className:"mb-4 rounded-lg border border-[var(--border)] bg-[var(--overlay-panel-muted)] p-3",children:[(0,t.jsx)("div",{className:"mb-3 flex flex-wrap gap-1.5",children:G.map(e=>{let r=X[e],a=n===e;return(0,t.jsx)("button",{type:"button",onClick:()=>i(e),className:`rounded-full border px-2.5 py-0.5 text-[10px] font-semibold uppercase tracking-[0.14em] transition-colors ${a?"border-[var(--foreground)] bg-[var(--foreground)] text-[var(--background)]":`${r.className} hover:opacity-80`}`,children:r.label},e)})}),(0,t.jsx)("textarea",{ref:m,value:l,onChange:e=>d(e.target.value),placeholder:"What did you do?",rows:3,className:"w-full resize-none rounded-md border border-[var(--border)] bg-[var(--input)] px-3 py-2 text-sm text-[var(--foreground)] placeholder:text-[var(--app-shell-soft-text)] focus:border-[var(--card-hover-border)] focus:outline-none"}),(0,t.jsxs)("div",{className:"mt-2 flex items-center justify-end gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:o,className:"px-3 py-1.5 text-xs text-[var(--muted-foreground)] transition-colors hover:text-[var(--foreground)]",children:"Cancel"}),(0,t.jsx)("button",{type:"button",onClick:x,disabled:!l.trim()||c,className:"px-3 py-1.5 text-xs font-medium rounded-md bg-sky-600 text-white hover:bg-sky-500 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:c?"Saving...":"Log activity"})]})]})}function Z({projectId:e,objectiveId:r,onTotalChange:a}){let[o,n]=(0,s.useState)([]),[i,l]=(0,s.useState)(0),[d,c]=(0,s.useState)(!1),[u,m]=(0,s.useState)(1),[x,b]=(0,s.useState)(!0),[h,v]=(0,s.useState)("all"),[f,g]=(0,s.useState)(!1),[y,w]=(0,s.useState)(!1),k=(0,s.useCallback)(async(t,s,o)=>{b(!0);try{let i=new URLSearchParams({page:String(t),limit:"25"});"all"!==s&&i.set("type",s);let d=await fetch(`/api/projects/${e}/objectives/${r}/activities?${i}`);if(!d.ok)throw Error("Failed to load activities");let u=await d.json(),m=Array.isArray(u.activities)?u.activities:[],x="number"==typeof u.total?u.total:m.length,p=!!u.hasMore;n(e=>o?[...e,...m]:m),l(x),a?.(x),c(p)}catch(e){console.error("Failed to fetch activities:",e)}finally{b(!1)}},[e,r]);return(0,s.useEffect)(()=>{m(1),k(1,h,!1)},[k,h]),(0,t.jsxs)("section",{children:[(0,t.jsxs)("div",{className:"mb-3 flex items-center justify-between",children:[(0,t.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"Time-ordered log of outputs from scheduled tasks and manual entries."}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>w(!y),className:`flex items-center gap-1 px-2.5 py-1 rounded-md text-xs font-medium transition-colors ${y?"text-sky-400 bg-sky-500/10":"text-[var(--muted-foreground)] hover:bg-[var(--muted)] hover:text-[var(--foreground)]"}`,children:[y?(0,t.jsx)(j.X,{size:12}):(0,t.jsx)(p.Plus,{size:12}),"Log activity"]}),(0,t.jsx)("button",{type:"button",onClick:()=>g(!f),className:`p-1.5 rounded-md transition-colors ${f||"all"!==h?"text-sky-400 bg-sky-500/10":"text-[var(--muted-foreground)] hover:bg-[var(--muted)] hover:text-[var(--foreground)]"}`,"aria-label":"Filter activities",children:(0,t.jsx)(K,{size:14})})]})]}),f&&(0,t.jsxs)("div",{className:"flex flex-wrap gap-1.5 mb-4",children:[(0,t.jsx)("button",{type:"button",onClick:()=>v("all"),className:`rounded-full border px-2.5 py-0.5 text-[10px] font-semibold uppercase tracking-[0.14em] transition-colors ${"all"===h?"border-[var(--foreground)] bg-[var(--foreground)] text-[var(--background)]":"border-[var(--tone-neutral-border)] bg-[var(--tone-neutral-bg)] text-[var(--tone-neutral)] hover:border-[var(--card-hover-border)]"}`,children:"All"}),G.map(e=>{let r=X[e],a=h===e;return(0,t.jsx)("button",{type:"button",onClick:()=>v(e),className:`rounded-full border px-2.5 py-0.5 text-[10px] font-semibold uppercase tracking-[0.14em] transition-colors ${a?"border-[var(--foreground)] bg-[var(--foreground)] text-[var(--background)]":`${r.className} hover:opacity-80`}`,children:r.label},e)})]}),y&&(0,t.jsx)(Q,{projectId:e,objectiveId:r,onCreated:e=>{n(t=>[e,...t]),l(e=>{let t=e+1;return a?.(t),t}),w(!1)},onCancel:()=>w(!1)}),x&&0===o.length?(0,t.jsx)("div",{className:"py-6 text-center text-sm text-[var(--muted-foreground)]",children:"Loading activities..."}):0===o.length?(0,t.jsxs)("div",{className:"rounded-xl border border-dashed border-[var(--border)] bg-[var(--overlay-panel-muted)] p-6 text-center",children:[(0,t.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"No activities yet."}),(0,t.jsx)("p",{className:"mt-1 text-xs text-[var(--app-shell-soft-text)]",children:"Activities are created by scheduled tasks and agent actions."})]}):(0,t.jsxs)("div",{children:[o.map(e=>(0,t.jsx)(Y,{activity:e},e.id)),d&&(0,t.jsx)("div",{className:"pt-2 pl-6",children:(0,t.jsx)("button",{type:"button",onClick:()=>{let e=u+1;m(e),k(e,h,!0)},disabled:x,className:"text-xs text-sky-400 hover:text-sky-300 transition-colors disabled:opacity-50",children:x?"Loading...":"Load more"})})]})]})}let ee=/(?:^|\n)Objective health:\s*(\d{1,3})%\s*(On track|At risk|Off track|Done)\b/im,et={"on track":"on_track","at risk":"at_risk","off track":"off_track",done:"done"};function er(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function ea(e){return"number"==typeof e&&Number.isFinite(e)?Math.max(0,Math.min(100,Math.round(e))):0}function es(e){if("string"!=typeof e)return null;let t=e.trim().toLowerCase();return"on_track"===t||"at_risk"===t||"off_track"===t||"done"===t?t:et[t]??null}function eo(e){if("string"!=typeof e)return null;let t=Date.parse(e);return Number.isNaN(t)?null:new Date(t).toISOString()}function en(e){return"string"==typeof e&&e.trim()?e.trim():void 0}function ei(...e){let t=e.flatMap(e=>e??[]),r=[];for(let e of[...t].sort((e,t)=>Date.parse(e.recordedAt)-Date.parse(t.recordedAt))){let t=r[r.length-1]??null;t&&t.progress===e.progress&&t.status===e.status&&(!t.source||!e.source||t.source===e.source)&&5e3>=Math.abs(Date.parse(e.recordedAt)-Date.parse(t.recordedAt))||r.push(e)}return r}let el={on_track:{label:"On track",stroke:"var(--status-completed)"},at_risk:{label:"At risk",stroke:"var(--status-blocked)"},off_track:{label:"Off track",stroke:"var(--status-failed)"},done:{label:"Done",stroke:"var(--status-in-progress)"}};function ed(e){let{projectId:r,objectiveId:a,objectiveKey:o,metadata:n,currentProgress:i,currentStatus:l,objectiveUpdatedAt:d}=e,c=(0,s.useMemo)(()=>(function(e,t){if(!er(e)||!t.trim())return[];let r=e.project_objective_health_history;if(!er(r))return[];let a=r[t.trim()];return Array.isArray(a)?ei(a.map(e=>(function(e){if(!er(e))return null;let t=es(e.status),r=eo(e.recordedAt);return t&&r?{progress:ea(e.progress),status:t,recordedAt:r,source:en(e.source),note:en(e.note),objectiveId:en(e.objectiveId)??null,objectiveKey:en(e.objectiveKey)??null}:null})(e)).filter(e=>!!e)):[]})(n,a),[n,a]),[u,m]=(0,s.useState)(c),x=(0,s.useMemo)(()=>({progress:i,status:l,recordedAt:d,objectiveId:a,objectiveKey:o}),[i,l,a,o,d]);(0,s.useEffect)(()=>{m(c)},[c]),(0,s.useEffect)(()=>{let e=!1;return async function(){try{let t=await fetch(`/api/projects/${r}/objectives/${a}/activities?type=status-update&limit=100`);if(!t.ok)throw Error("Failed to load objective activity history");let s=await t.json(),n=Array.isArray(s.activities)?s.activities:[],i=ei(c,ei(n.map(e=>(function(e){if("status-update"!==e.type)return null;let t=e.body.match(ee);if(!t)return null;let r=ea(Number(t[1])),a=es(t[2]),s=eo(e.createdAt);return a&&s?{progress:r,status:a,recordedAt:s,source:en(e.source),objectiveKey:en(e.objectiveLabel)??null}:null})(e)).filter(e=>!!e&&(!o||e.objectiveKey===o))));e||m(i)}catch{e||m(c)}}(),()=>{e=!0}},[c,a,o,r]);let[p,b]=(0,s.useState)(!1);(0,s.useEffect)(()=>{let e=requestAnimationFrame(()=>b(!0));return()=>cancelAnimationFrame(e)},[]);let h=ei(u,[x]),v=h[h.length-1],f=el[v.status];return 0===u.length||1===h.length||h.length,(0,t.jsxs)("div",{"data-testid":"objective-health-trend",className:"ml-auto inline-flex items-center gap-3 rounded-xl border border-[var(--border)] bg-[var(--overlay-panel-muted)] px-3 py-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-[10px] font-semibold uppercase tracking-[0.16em] text-[var(--muted-foreground)]",children:"Objective health"}),(0,t.jsxs)("div",{className:"mt-0.5 text-[20px] font-semibold leading-none text-[var(--foreground)]",children:[v.progress,"%"]}),(0,t.jsx)("div",{className:"mt-0.5 text-[10px] font-medium",style:{color:f.stroke},children:f.label})]}),(0,t.jsx)("div",{className:"h-[40px] w-[14px] overflow-hidden rounded-sm",style:{background:"var(--muted)"},role:"progressbar","aria-valuenow":v.progress,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Objective health",title:`${v.progress}%`,children:(0,t.jsx)("div",{className:"flex h-full flex-col justify-end",children:(0,t.jsx)("div",{className:"relative w-full overflow-hidden rounded-sm transition-[height] duration-700 ease-out",style:{height:p?`${v.progress}%`:"0%",backgroundColor:f.stroke},children:(0,t.jsx)("div",{className:"absolute inset-0 animate-pulse",style:{background:"linear-gradient(0deg, transparent 0%, rgba(255,255,255,0.15) 50%, transparent 100%)"}})})})})]})}var ec=e.i(681619),eu=e.i(44054),em=e.i(434405),ex=e.i(169433),ep=e.i(982141),eb=e.i(902572);let eh={on_track:{label:"On track",chipClass:"border-[var(--status-completed-border)] bg-[var(--status-completed-bg)] text-[var(--status-completed-text)]",toneClass:"text-[var(--status-completed-text)]"},at_risk:{label:"At risk",chipClass:"border-[var(--status-blocked-border)] bg-[var(--status-blocked-bg)] text-[var(--status-blocked-text)]",toneClass:"text-[var(--status-blocked-text)]"},off_track:{label:"Off track",chipClass:"border-[var(--status-failed-border)] bg-[var(--status-failed-bg)] text-[var(--status-failed-text)]",toneClass:"text-[var(--status-failed-text)]"},done:{label:"Done",chipClass:"border-[var(--status-in-progress-border)] bg-[var(--status-in-progress-bg)] text-[var(--status-in-progress-text)]",toneClass:"text-[var(--status-in-progress-text)]"}};function ev({onResize:e}){let{isTouchLayout:r}=(0,eu.useInputCapabilities)();return r?null:(0,t.jsx)("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize objective chat panel",className:"group relative z-10 hidden w-0 shrink-0 cursor-col-resize xl:block",onMouseDown:t=>{t.preventDefault();let r=t.clientX;document.body.style.cursor="col-resize",document.body.style.userSelect="none";let a=t=>{let a=r-t.clientX;r=t.clientX,e(a)},s=()=>{document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("mousemove",a),window.removeEventListener("mouseup",s)};window.addEventListener("mousemove",a),window.addEventListener("mouseup",s)},children:(0,t.jsx)("div",{className:"absolute inset-y-0 -left-0.5 w-1 transition-colors group-hover:bg-[var(--primary)]/40"})})}function ef(e){return new Date(e).toLocaleString([],{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function eg(){return{title:"",teamId:"",summary:""}}function ej(e){let{projects:t,isLoading:r,refetch:a,updateProject:o}=(0,y.useProjects)(),[n,i]=(0,s.useState)([]),l=(0,s.useMemo)(()=>t.find(t=>t.slug===e)??null,[e,t]),d=(0,s.useMemo)(()=>(0,eb.readProjectObjectivesWorkspace)(l?.metadata),[l?.metadata]),c=(0,s.useCallback)(async e=>{if(!l)throw Error("Project not found.");await o(l.id,{metadata:(0,eb.writeProjectObjectivesWorkspace)(l.metadata??{},e)})},[l,o]);return(0,s.useEffect)(()=>{let e=!0;return async function(){if(!l?.id)return i([]);try{let t=await fetch(`/api/projects/${l.id}/teams`);if(!t.ok)throw Error("Failed to fetch teams");let r=await t.json();if(!e)return;i((r.teams??[]).map(e=>({id:"string"==typeof e.id?e.id:"",name:"string"==typeof e.name?e.name:"Untitled team"})).filter(e=>e.id))}catch{if(!e)return;i([])}}(),()=>{e=!1}},[l?.id]),{isLoading:r,project:l,workspace:d,teams:n,persistWorkspace:c,refetchProject:a}}function ey(e){return"user"===e.role&&!e.rootMessageId}function ew({projectId:e,projectSlug:r,objective:a,teamName:o,trackerConnections:l,availableTrackers:d,defaultTrackerType:c,onThreadLinked:u,onObjectiveUpdated:m}){let[x,p]=(0,s.useState)(()=>(0,ex.loadObjectiveChatPanelWidth)()||800),[b,h]=(0,s.useState)(a.threadId??(a.id?`objective-chat:${a.id}`:null)),[f,g]=(0,s.useState)("list"),[j,y]=(0,s.useState)(null),[$,I]=(0,s.useState)(!1),[A,T]=(0,s.useState)(a.chatSessionVersion),[E,O]=(0,s.useState)([]),[M,P]=(0,s.useState)(null),R=(0,s.useRef)(!1),L=(0,s.useRef)(!1),D=window.location?.origin?window.location.origin:null,{messages:F,setMessages:_,sendMessage:z,loadHistory:U,setChatRuns:q,stop:J,chatRuns:V}=(0,w.useGroupChat)(b),{processes:W,streaming:B,chatRuns:H,poll:K}=(0,k.useProcessPolling)(b?{workspaceId:b}:null,{messages:F,setMessages:_});(0,s.useEffect)(()=>{a.threadId&&a.threadId!==b&&h(a.threadId)},[a.threadId,b]),(0,s.useEffect)(()=>{g("list"),y(null),I(!1),L.current=!1},[a.id]),(0,s.useEffect)(()=>{T(a.chatSessionVersion),a.chatSessionVersion>=eb.CURRENT_OBJECTIVE_CHAT_SESSION_VERSION&&(L.current=!0)},[a.chatSessionVersion]);let X=(0,s.useCallback)(async t=>{let r=t.trim();if(r&&!(await fetch(`/api/projects/${e}/threads`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({threadId:r})})).ok)throw Error("Failed to link objective chat to the project.")},[e]);(0,s.useEffect)(()=>{let e=!1;return b?(I(!1),(async()=>{await U(b),e||I(!0)})(),()=>{e=!0}):void I(!0)},[U,b]),(0,s.useEffect)(()=>{let t=!1;return async function(){try{let r=a.teamId?`/api/projects/${e}/teams/${a.teamId}/agents`:`/api/projects/${e}/agents`,[s,o]=await Promise.all([fetch("/api/participants"),fetch(r)]),n=s.ok?await s.json():[],i=Array.isArray(n)?n:[],l=o.ok?await o.json():{agents:[]};if(t)return;let d=((l&&"object"==typeof l?l:{agents:[]}).agents??[]).slice().sort((e,t)=>e.routing_order-t.routing_order).map(e=>e.agent_id);if(0===d.length)return void O(i);let c=new Map(i.map(e=>[e.id,e]));O(d.map(e=>c.get(e)).filter(e=>!!e))}catch(e){if(t)return;console.error("Failed to load objective chat participants",e),O([])}}(),()=>{t=!0}},[e,a.teamId]),(0,s.useEffect)(()=>{a.threadId&&X(a.threadId).catch(e=>{console.warn("Failed to re-link objective chat thread to project",e)})},[X,a.threadId]),(0,s.useEffect)(()=>{if(!a.threadId||!b||!$||A>=eb.CURRENT_OBJECTIVE_CHAT_SESSION_VERSION||L.current)return;L.current=!0;let t=function(e){let t=e.filter(ey).sort((e,t)=>e.timestamp-t.timestamp);if(t.length<=1)return null;let r=t[0]?.id;if(!r)return null;let a=t.slice(1).map(e=>e.id),s=new Set(a);return{messages:[...e].map(e=>{let t=s.has(e.id)&&ey(e),a="string"==typeof e.rootMessageId&&s.has(e.rootMessageId);return t||a?{...e,rootMessageId:r,parentMessageId:r,depth:1}:e}).sort((e,t)=>e.timestamp-t.timestamp),primaryRootMessageId:r,mergedRootMessageIds:a}}(F),r=!1;return(async()=>{P(null);try{if(t){if(!(await fetch("/api/history",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({threadId:b,messages:t.messages})})).ok)throw Error("Failed to migrate the objective chat history.");if(r)return;_(t.messages),y(e=>e&&t.mergedRootMessageIds.includes(e)?t.primaryRootMessageId:e)}if(!(await fetch(`/api/projects/${e}/objectives/${a.id}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({chatSessionVersion:eb.CURRENT_OBJECTIVE_CHAT_SESSION_VERSION})})).ok)throw Error("Failed to update the objective chat session version.");if(r)return;T(eb.CURRENT_OBJECTIVE_CHAT_SESSION_VERSION),m().catch(e=>{console.warn("Failed to refresh objective after objective chat migration",e)})}catch(e){if(r)return;console.warn("Failed to migrate legacy objective chat sessions",e),P(e instanceof Error?e.message:"Failed to migrate the objective chat history.")}})(),()=>{r=!0}},[A,$,F,a.id,a.threadId,m,e,_,b]);let G=(0,s.useCallback)(async()=>{if(a.threadId)return a.threadId;let t=b??(a.id?`objective-chat:${a.id}`:null);if(!t)return null;P(null);try{let s=await em.threadService.createThread({id:t,title:a.title,metadata:{scope:"objective",objectiveId:a.id,projectId:e,projectSlug:r}});return h(s.id),await X(s.id),await u(s.id),s.id}catch(e){return P(e instanceof Error?e.message:"Failed to create the objective chat."),null}},[X,a.id,a.threadId,a.title,u,e,r,b]),Y=(0,s.useMemo)(()=>new Map(E.map(e=>[e.id,e])),[E]);(0,s.useEffect)(()=>{q(e=>{let t=Date.now(),r=new Map(e.filter(e=>"string"==typeof e.chatRunId&&e.chatRunId.length>0).map(e=>[e.chatRunId,e]));for(let e of H)e?.chatRunId&&r.set(e.chatRunId,e);return Array.from(r.values()).filter(e=>!!(!e.optimistic||H.some(t=>t.chatRunId===e.chatRunId))||t-(e.enqueuedAt??0)<=5e3).sort((e,t)=>String(e.chatRunId||"").localeCompare(String(t.chatRunId||"")))})},[H,q]);let Q=(0,s.useMemo)(()=>{let e=Date.now(),t=new Map(H.map(e=>[e.chatRunId,e]));for(let r of V)!(!r.optimistic||t.has(r.chatRunId))&&(e-(r.enqueuedAt??0)>5e3||t.set(r.chatRunId,r));return Array.from(t.values()).filter(e=>"queued"===e.status||"running"===e.status||"awaiting_user"===e.status||"blocked"===e.status)},[V,H]),Z=(0,s.useMemo)(()=>F.filter(ey).sort((e,t)=>t.timestamp-e.timestamp).map(e=>{let t,r=F.filter(t=>t.rootMessageId===e.id).sort((e,t)=>e.timestamp-t.timestamp),a=[e,...r],s=a[a.length-1]??e;return{rootMessageId:e.id,title:(t=e.content.replace(/\s+/g," ").trim())?t.length>56?`${t.slice(0,56).trim()}...`:t:"Untitled session",updatedAt:s.timestamp,messageCount:a.length,messages:a}}),[F]),ee=(0,s.useMemo)(()=>j?Z.find(e=>e.rootMessageId===j)??null:null,[j,Z]),et="detail"===f&&!!j,er=new Set(["queued","running","awaiting_user","blocked"]),ea=Q.length>0||W.some(e=>"spawning"===e.state||"running"===e.state),es=(0,s.useMemo)(()=>{let e=new Map;for(let t of Q){if(!t.rootMessageId||!er.has(t.status))continue;let r="queued"===t.status?"queued":"working";"working"!==e.get(t.rootMessageId)&&e.set(t.rootMessageId,r)}for(let t of W)t.threadId&&("spawning"===t.state||"running"===t.state)&&e.set(t.threadId,"working");return e},[Q,W]),eo=(0,s.useMemo)(()=>W.some(e=>"spawning"===e.state||"running"===e.state)||Q.some(e=>er.has(e.status)&&"queued"!==e.status)?"working":Q.some(e=>"queued"===e.status)?"queued":"ready",[Q,er,W]);(0,s.useEffect)(()=>{R.current&&!ea&&m().catch(e=>{console.warn("Failed to refresh objective after objective chat activity",e)}),R.current=ea},[ea,m]),(0,s.useEffect)(()=>{j&&(0,ep.persistLastSessionForEntity)(a.id,j)},[a.id,j]),(0,s.useEffect)(()=>{if(j||0===Z.length)return;let e=(0,ep.loadLastSessionForEntity)(a.id);e&&Z.some(t=>t.rootMessageId===e)&&y(e)},[a.id,j,Z,y]);let en=(0,s.useCallback)(async e=>{await fetch(`/api/chat-runs/${encodeURIComponent(e)}/signal`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({signal:"cancel",reason:"Interrupted by a new objective chat message"})}).catch(e=>{console.warn("Failed to cancel objective chat run",e)})},[]),ei=(0,s.useCallback)(async()=>{let e=Array.from(new Set(Q.map(e=>e.chatRunId).filter(e=>!!e)));await Promise.all(e.map(e=>en(e))),await J(),await K()},[Q,en,K,J]),el=(0,s.useCallback)(async(t,s,n,i,u,m,x)=>{var p;let b,h,v,f,w,k,N,S,C;ea&&await ei(),P(null);let $=await G();if(!$)return;let I=E.map(e=>e.id),A=et?j:null,T=[(p={available:d,configured:l.filter(e=>e.connected).map(e=>({type:e.type,displayName:e.displayName})),defaultType:c},b=`/api/projects/${e}/objectives/${a.id}`,h=D?`${D}${b}`:b,v=`${h}/scheduled-tasks`,f=`${h}/notes`,w=D?`${D}/api/trackers`:"/api/trackers",k=`~/.agx/projects/${r}/objectives/${a.key}.md`,N=`~/.agx/projects/${r}/objectives/${a.key}/notes/`,S=`${h}/validate`,C=a.notes?.length?a.notes.map(e=>`- **${e.title}**: ${e.body.slice(0,120)}${e.body.length>120?"...":""}`).join("\n"):null,["You are working inside a strategy session for this project objective.",`Project slug: ${r}`,`Objective: ${a.title}`,`Objective label: ${a.key}`,o?`Owning team: ${o}`:"",C?`Current notes:
2
- ${C}`:"Current notes: none yet.","Wake schedule: managed by the built-in objective worker job.",`## Objective file (source of truth)
3
-
4
- This objective is stored as a frontmatter markdown file at:
5
- \`${k}\`
6
-
7
- File format:
8
- - YAML frontmatter between \`---\` delimiters contains all metadata (title, teamId, key, status, progress, scheduledTaskIds, threadId, chatSessionVersion, createdAt, updatedAt).
9
- - \`## Activities\` section contains the activity timeline; each activity is a \`### Title\` block with metadata lines (\`- **id:**\`, \`- **source:**\`, \`- **created:**\`, \`- **body:**\`) and optional \`#### Replies\` sub-section.
10
-
11
- Notes are stored as separate files in \`${N}\`. Each note is a markdown file with YAML frontmatter (id, title, objectiveId, createdAt, updatedAt) and a markdown body.
12
-
13
- When updating the objective, you can edit this file directly. Rules:
14
- - NEVER remove or break the \`---\` frontmatter delimiters.
15
- - NEVER change the \`id\` or \`createdAt\` fields.
16
- - Always update \`updatedAt\` to the current ISO timestamp when making changes.
17
- - After any edit, call \`GET ${S}\` to verify the file is still valid.
18
- - If validation fails, fix the errors immediately before doing anything else.`,"Scheduled tasks live in the shared scheduled-task list and are filtered by this objective label.","Your job is to help the team develop the strategy needed to reach the goal, including the right combination of objective notes, scheduled tasks, and tracker tickets.","Use the current session history to build on prior reasoning. Only reset and start from scratch when the user explicitly starts a new session.","Use this thread to pressure-test strategy, suggest better tactics, rewrite the objective when asked, propose the right operational cadence, and take concrete follow-up actions when the user wants them applied.","When suggesting edits, prefer editing the frontmatter file directly or using the notes API. When the user asks you to make a change, edit the file, validate, then confirm.","Local objective APIs:",`- PATCH ${h} with JSON fields such as {"title","teamId","key"} to update the objective itself.`,`- GET ${f} to list all notes for this objective. Returns {"notes":[...],"total","page","limit","hasMore"}.`,`- POST ${f} with {"title","body"} to create a new note.`,`- GET ${f}/{noteId} to read a single note.`,`- PATCH ${f}/{noteId} with {"title","body"} to update a note.`,`- DELETE ${f}/{noteId} to delete a note.`,`- GET ${v} to inspect the scheduled tasks already tracked for this objective.`,`- POST ${v} with {"name","prompt","cadence","agentId"} to create a scheduled task for this objective.`,`- GET ${S} to validate the objective file on disk. Returns {"valid":true} or {"valid":false,"errors":[...]}.`,"Tracker integrations:",`- Available tracker types: ${p.available.length>0?p.available.map(e=>`${e.displayName} (${e.type})`).join(", "):"none registered"}.`,`- Configured for this project: ${p.configured.length>0?p.configured.map(e=>{let t=p.defaultType===e.type;return`${e.displayName} (${e.type})${t?" — default":""}`}).join(", "):"none — ask the user to connect a tracker in project settings if they want ticket workflows"}.`,p.defaultType?`- Default tracker for ticket workflows: ${p.defaultType}. Prefer this tracker when creating or referencing tickets for this objective unless the user asks otherwise.`:p.configured.length>1?"- No default tracker has been selected; ask the user which connected tracker to use before creating tickets.":"",...p.configured.map(t=>`- GET ${w}/${t.type}/items?projectId=${e} to list ${t.displayName} items. Filter client-side by label "${a.key}" to find tickets tied to this objective.`)].filter(Boolean).join("\n\n")),m].filter(Boolean).join("\n\n"),O=await z(t,s,$,A,n,i,u?[u]:I,r,T,x);!A&&O&&(y(O),g("detail"))},[D,G,ea,ei,et,a,E,e,r,j,z,o]),ed=(0,s.useMemo)(()=>et?ee?.messages??[]:[],[et,ee]),ec=(0,s.useMemo)(()=>et&&j?Object.entries(B).filter(([,e])=>e.rootMessageId===j):[],[et,j,B]),eu=(0,s.useCallback)(e=>{p(t=>{let r=Math.max(320,Math.min(1200,t+e));return(0,ex.persistObjectiveChatPanelWidth)(r),r})},[]);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ev,{onResize:eu}),(0,t.jsxs)("aside",{className:"relative flex h-full min-h-[420px] w-full flex-col overflow-hidden border-t border-[var(--border)] bg-[var(--overlay-panel)] xl:min-h-0 xl:w-[var(--objective-chat-panel-width)] xl:shrink-0 xl:self-stretch xl:border-l xl:border-t-0",style:{"--objective-chat-panel-width":`${x}px`},children:[(0,t.jsx)(eN,{message:M}),et?(0,t.jsx)("div",{className:"border-b border-[var(--border)] px-4 py-4",children:(0,t.jsxs)("button",{type:"button",onClick:()=>g("list"),"aria-label":"Back to sessions",className:"inline-flex min-w-0 items-center gap-2 text-left text-sm font-medium text-[var(--foreground)] transition-colors hover:text-[var(--primary)]",children:[(0,t.jsx)(n.ArrowLeft,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{className:"truncate",children:ee?.title??"Loading session..."})]})}):(0,t.jsx)("div",{className:"border-b border-[var(--border)] px-4 py-4",children:(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("p",{className:"text-xs font-semibold uppercase tracking-[0.18em] text-[var(--muted-foreground)]",children:"Strategy Sessions"}),(0,t.jsx)("p",{className:"text-xs text-[var(--muted-foreground)]",children:"Start a new strategy conversation below, or open an earlier session to keep building on it."})]})}),(0,t.jsx)("div",{className:`min-h-0 flex-1 overflow-y-auto pb-[calc(15rem+env(safe-area-inset-bottom))] ${et?"px-4 py-4":"px-0 py-0"}`,children:et?0===ed.length?(0,t.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2 px-4 text-center text-[var(--muted-foreground)]",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-[var(--foreground)]",children:"Loading strategy session"}),(0,t.jsx)("p",{className:"max-w-sm text-xs",children:"The conversation will appear here once the session history is ready."})]}):(0,t.jsxs)("div",{className:"space-y-5",children:[ed.map(e=>{let r=e.participantId?Y.get(e.participantId):null;return(0,t.jsxs)("div",{className:"flex gap-3",children:["user"===e.role?(0,t.jsx)("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-[var(--overlay-panel-soft)] text-[var(--muted-foreground)]",children:(0,t.jsx)(v.User,{className:"h-4 w-4"})}):(0,t.jsx)("img",{src:(0,C.agentAvatarUrl)(e.participantId??"assistant",32,r?.color),alt:r?.name??"Agent",className:"h-8 w-8 shrink-0 rounded-full border border-[var(--border)] object-cover"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-[var(--foreground)]",children:"user"===e.role?"You":r?.name??"Agent"}),(0,t.jsx)("span",{className:"text-[11px] text-[var(--muted-foreground)]",children:new Date(e.timestamp).toLocaleString([],{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})})]}),(0,t.jsx)("div",{className:"mt-2 rounded-2xl border border-[var(--border)] bg-[var(--overlay-panel-muted)] px-4 py-3 text-sm text-[var(--foreground)]",children:(0,t.jsx)(S.Markdown,{content:e.content,isUser:"user"===e.role})})]})]},e.id)}),ec.map(([e])=>{let r=Y.get(e);return(0,t.jsxs)("div",{className:"flex items-center gap-3 text-sm text-[var(--muted-foreground)]",children:[(0,t.jsx)("img",{src:(0,C.agentAvatarUrl)(e,32,r?.color),alt:r?.name??"Agent",className:"h-8 w-8 shrink-0 rounded-full border border-[var(--border)] object-cover"}),(0,t.jsxs)("span",{children:[r?.name??"Agent"," is thinking..."]})]},`stream-${e}`)})]}):0===Z.length?(0,t.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2 px-4 text-center text-[var(--muted-foreground)]",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-[var(--foreground)]",children:"No strategy sessions yet"}),(0,t.jsx)("p",{className:"max-w-sm text-xs",children:"Use the composer below to start the first conversation about how this objective should be reached."})]}):(0,t.jsx)("div",{className:"divide-y divide-[var(--border)]",children:Z.map(e=>{var r;let a=es.get(e.rootMessageId)??null;return(0,t.jsxs)("button",{type:"button",onClick:()=>{y(e.rootMessageId),g("detail")},className:"flex w-full items-start justify-between gap-3 px-4 py-3 text-left transition-colors hover:bg-[var(--overlay-panel-soft)]",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("p",{className:"truncate text-sm font-medium text-[var(--foreground)]",children:e.title}),(0,t.jsxs)("p",{className:"mt-1 text-[11px] text-[var(--muted-foreground)]",children:[1===(r=e.messageCount)?"1 message":`${r} messages`," · Last"," ",ef(e.updatedAt)]})]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[a?(0,t.jsx)("span",{className:"rounded-full border border-[var(--status-in-progress-border)] bg-[var(--status-in-progress-bg)] px-2 py-1 text-[10px] font-semibold uppercase tracking-[0.18em] text-[var(--status-in-progress-text)]",children:"queued"===a?"Queued":"Working"}):null,(0,t.jsx)(i.ArrowRight,{className:"mt-0.5 h-4 w-4 text-[var(--muted-foreground)]"})]})]},e.rootMessageId)})})}),(0,t.jsx)("div",{className:"absolute bottom-0 left-0 right-0 bg-[var(--overlay-panel)] p-3 pb-[calc(0.75rem+env(safe-area-inset-bottom))]",children:(0,t.jsx)(N.Composer,{onSend:el,onStop:ei,participants:E,commands:[],projectId:e,projectSlug:r,loading:"ready"!==eo,activityStatus:eo,sendInterruptsBusy:!0,placeholder:et?`Continue strategy for "${a.title}"...`:`Start a new strategy session for "${a.title}"...`,initialPinnedParticipantId:E[0]?.id})})]})]})}function ek({label:e}){return(0,t.jsx)("div",{className:"flex h-full items-center justify-center text-sm text-[var(--muted-foreground)]",children:e})}function eN({message:e}){return e?(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-2 rounded-2xl border border-rose-500/20 bg-rose-500/10 px-3 py-2 text-sm text-rose-100",children:[(0,t.jsx)(o.AlertTriangle,{className:"h-4 w-4"}),(0,t.jsx)("span",{children:e})]}):null}function eS({content:e,editable:r=!1,onChange:a,placeholder:s}){let o=e.trim().length>0;return r||o?(0,t.jsx)("div",{className:"overflow-hidden border-l-2 border-[var(--border)]/60 pl-4 transition-all focus-within:border-indigo-500/60",children:r||o?(0,t.jsx)($.default,{content:e,editable:r,onChange:a,placeholder:s}):null}):null}function eC({onResize:e}){let{isTouchLayout:r}=(0,eu.useInputCapabilities)();return r?null:(0,t.jsx)("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize objective list panel",className:"group relative z-10 w-0 shrink-0 cursor-col-resize",onMouseDown:t=>{t.preventDefault();let r=t.clientX;document.body.style.cursor="col-resize",document.body.style.userSelect="none";let a=t=>{let a=t.clientX-r;r=t.clientX,e(a)},s=()=>{document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("mousemove",a),window.removeEventListener("mouseup",s)};window.addEventListener("mousemove",a),window.addEventListener("mouseup",s)},children:(0,t.jsx)("div",{className:"absolute inset-y-0 -left-0.5 w-1 transition-colors group-hover:bg-[var(--primary)]/40"})})}function e$({objective:e,activityCount:r,lastActivityAt:a,activeAgentIds:s,participants:o,isSelected:n,onSelect:i}){let l,d=(l=1===r?"1 activity":`${r} activities`,a?`${l} \xb7 Last ${ef(a)}`:`${l} \xb7 No activity yet`);return(0,t.jsx)("article",{className:"px-2",children:(0,t.jsxs)("button",{type:"button",onClick:i,"aria-label":`Open details for ${e.title}`,className:`group flex w-full items-center gap-3 rounded-xl px-2 py-2 text-left transition-colors ${n?"bg-[var(--primary)]/10 border border-[var(--primary)]/20":"border border-transparent hover:bg-[var(--secondary)]"}`,children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1 py-0.5",children:[(0,t.jsx)("div",{className:"flex min-w-0 items-center gap-2",children:(0,t.jsx)("span",{className:`rounded-full border px-1.5 py-0 text-[9px] font-semibold uppercase tracking-[0.12em] ${eh[e.status].chipClass}`,children:eh[e.status].label})}),(0,t.jsx)("p",{className:"mt-1 truncate text-sm font-medium text-[var(--foreground)]",children:e.title}),(0,t.jsx)("p",{className:"mt-0.5 text-[11px] text-[var(--muted-foreground)]",children:d})]}),s&&s.length>0&&(0,t.jsx)("span",{className:"inline-flex items-center -space-x-1 shrink-0",children:s.slice(0,3).map(e=>{let r=o?.find(t=>t.id===e);return(0,t.jsxs)("span",{className:"relative inline-block",title:r?.name??e,children:[(0,t.jsx)("img",{src:(0,C.agentAvatarUrl)(e,16,r?.color??void 0),alt:r?.name??e,className:"h-3 w-3 rounded-full ring-[1.5px] ring-[var(--background)]"}),(0,t.jsx)("span",{className:"absolute -bottom-px -right-px h-1.5 w-1.5 rounded-full bg-green-500 ring-[1px] ring-[var(--background)]"})]},e)})})]})})}function eI({projectSlug:e,initialObjectiveId:r}){let{isLoading:a,project:o,workspace:n,teams:i,persistWorkspace:l}=ej(e),d=n.objectives,[c,u]=(0,s.useState)(r??null),[m,x]=(0,s.useState)(()=>(0,ex.loadObjectiveListPanelWidth)()||320),[b,h]=(0,s.useState)(null),[v,f]=(0,s.useState)(!1),[g,j]=(0,s.useState)(null),[y,w]=(0,s.useState)(new Map),[k,N]=(0,s.useState)([]);(0,s.useEffect)(()=>{!c&&d.length>0&&u(d[0].id)},[c,d]),(0,s.useEffect)(()=>{c&&d.length>0&&!d.some(e=>e.id===c)&&u(d[0]?.id??null)},[c,d]),(0,s.useEffect)(()=>{let e=!1;return async function(){try{let t=await fetch("/api/participants");t.ok&&!e&&N(await t.json())}catch{}}(),()=>{e=!0}},[]),(0,s.useEffect)(()=>{let e=new Map;for(let t of d)t.threadId&&e.set(t.threadId,t.id);if(0===e.size)return;let t=!1;async function r(){try{let r=Array.from(e.keys()).join(","),a=await fetch(`/api/chat-runs/active-agents?threadIds=${encodeURIComponent(r)}`);if(!a.ok||t)return;let s=await a.json(),o=new Map;for(let[t,r]of Object.entries(s.activeAgents??{})){let a=e.get(t);a&&Array.isArray(r)&&r.length>0&&o.set(a,r)}t||w(o)}catch{}}r();let a=setInterval(()=>void r(),5e3);return()=>{t=!0,clearInterval(a)}},[d]);let S=async()=>{if(!b)return;let e=b.title.trim();if(!e)return void j("Objective statement is required.");let t=b.teamId.trim();if(!t)return void j("Team is required.");let r=new Date().toISOString(),a=(0,eb.createProjectObjective)({title:e,teamId:t,key:(0,eb.generateProjectObjectiveKey)(e,n.objectives),summary:b.summary,now:r});f(!0),j(null);try{await l((0,eb.upsertProjectObjective)(n,a));try{await fetch(`/api/projects/${o?.id}/objectives/${a.id}/worker`,{method:"POST",headers:{"Content-Type":"application/json"}})}catch{}h(null),u(a.id)}catch(e){j(e instanceof Error?e.message:"Failed to save objective updates.")}finally{f(!1)}},C=(0,s.useCallback)(e=>{x(t=>{let r=Math.max(240,Math.min(480,t+e));return(0,ex.persistObjectiveListPanelWidth)(r),r})},[]);return a&&!o?(0,t.jsx)(ek,{label:"Loading objectives..."}):o?(0,t.jsxs)("div",{className:"flex h-full min-h-0 overflow-hidden bg-[var(--background)] text-[var(--foreground)]",children:[(0,t.jsxs)("div",{className:"flex flex-shrink-0 flex-col border-r border-[var(--border)] bg-[var(--background)]",style:{width:m},children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-4 py-3",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("p",{className:"text-xs font-semibold uppercase tracking-[0.12em] text-[var(--muted-foreground)]",children:"Objectives"}),(0,t.jsx)("p",{className:"mt-0.5 text-[11px] text-[var(--muted-foreground)]",children:0===d.length?"None yet":`${d.length} total`})]}),(0,t.jsx)("button",{type:"button",onClick:()=>h(eg()),className:"inline-flex h-7 w-7 items-center justify-center rounded-lg text-[var(--muted-foreground)] transition-colors hover:bg-[var(--secondary)] hover:text-[var(--foreground)]","aria-label":"New objective",children:(0,t.jsx)(p.Plus,{className:"h-4 w-4"})})]}),(0,t.jsx)(eN,{message:g}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto py-1",children:0===d.length?(0,t.jsxs)("div",{className:"px-4 py-8 text-center",children:[(0,t.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"No objectives yet."}),(0,t.jsx)("button",{type:"button",onClick:()=>h(eg()),className:"mt-2 text-sm text-[var(--primary)] hover:underline",children:"Create one"})]}):(0,t.jsx)("div",{className:"space-y-0.5",children:d.map(e=>{let r=(0,eb.buildObjectiveTimelineActivities)({objective:e,workspace:n});return(0,t.jsx)(e$,{objective:e,activityCount:r.length,lastActivityAt:r[0]?.createdAt??null,activeAgentIds:y.get(e.id),participants:k,isSelected:c===e.id,onSelect:()=>u(e.id)},e.id)})})})]}),(0,t.jsx)(eC,{onResize:C}),(0,t.jsx)("div",{className:"flex-1 min-w-0 min-h-0 overflow-hidden",children:c?(0,t.jsx)(eA,{projectSlug:e,objectiveId:c,onObjectiveDeleted:()=>u(null)}):(0,t.jsx)("div",{className:"flex h-full items-center justify-center text-sm text-[var(--muted-foreground)]",children:0===d.length?"Create an objective to get started.":"Select an objective from the list."})}),b?(0,t.jsx)(eE,{mode:"create",draft:b,teams:i,isSaving:v,onChange:h,onClose:()=>h(null),onSave:()=>void S()}):null]}):(0,t.jsx)(ek,{label:"Project not found."})}function eA({projectSlug:e,objectiveId:o,onObjectiveDeleted:n}){var i;let l,v,y,w,k,N,C,$,A,T=(0,a.useRouter)(),{isLoading:E,project:M,workspace:P,teams:R,persistWorkspace:L,refetchProject:D}=ej(e),F=(0,s.useMemo)(()=>P.objectives.find(e=>e.id===o)??null,[o,P.objectives]),_=F?(i=F.teamId,R.find(e=>e.id===i)?.name??null):null,[z,U]=(0,s.useState)(null),[q,J]=(0,s.useState)(null),[V,B]=(0,s.useState)("activity"),[H,K]=(0,s.useState)(0),[X,G]=(0,s.useState)(!1),[Y,Q]=(0,s.useState)(null),[ee,et]=(0,s.useState)([]),[er,ea]=(0,s.useState)(!1),[es,eo]=(0,s.useState)(null),[en,ei]=(0,s.useState)({}),[el,eu]=(0,s.useState)({}),[em,ex]=(0,s.useState)(new Set),[ep,ev]=(0,s.useState)(!1),[eg,ey]=(0,s.useState)(""),[eC,e$]=(0,s.useState)([]),[eI,eA]=(0,s.useState)([]),[eE,eO]=(0,s.useState)([]),[eM,eP]=(0,s.useState)(null),[eR,eL]=(0,s.useState)(!1),{jobs:eD}=(0,O.usePromptJobs)(M?.id??null,{requireProjectId:!0,includeObjectiveJobs:!0,objectiveId:o}),eF=(0,s.useMemo)(()=>eD.filter(e=>e.objectiveId===o).length,[eD,o]),e_=async e=>{G(!0),Q(null);try{await L(e)}catch(e){throw Q(e instanceof Error?e.message:"Failed to save objective updates."),e}finally{G(!1)}},ez=async()=>{if(!z||!F)return;let e=z.title.trim();if(!e)return void Q("Objective statement is required.");let t={...F,title:e,updatedAt:new Date().toISOString()};await e_((0,eb.upsertProjectObjective)(P,t)),U(null)},eU=(0,s.useCallback)(async()=>{if(M?.id&&F?.id){ea(!0);try{let e=await fetch(`/api/projects/${M.id}/objectives/${F.id}/notes?limit=100`);if(e.ok){let t=await e.json();et(t.notes??[])}}catch{}finally{ea(!1)}}},[M?.id,F?.id]);(0,s.useEffect)(()=>{eU()},[eU]),(0,s.useEffect)(()=>{"notes"===V&&eU()},[V,eU]),(0,s.useEffect)(()=>{if(!M?.id||!F?.id)return;let e=new Set;for(let[t,r]of Object.entries(en)){let a=ee.find(e=>e.id===t);a&&a.body!==r&&e.add(t)}for(let[t,r]of Object.entries(el)){let a=ee.find(e=>e.id===t);a&&a.title!==r&&e.add(t)}if(0===e.size)return;let t=[];for(let r of e){let e={},a=en[r],s=el[r],o=ee.find(e=>e.id===r);if(!o||(void 0!==a&&a!==o.body&&(e.body=a),void 0!==s&&s!==o.title&&s.trim()&&(e.title=s.trim()),0===Object.keys(e).length))continue;let n=window.setTimeout(async()=>{ex(e=>new Set(e).add(r));try{let t=await fetch(`/api/projects/${M.id}/objectives/${F.id}/notes/${r}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(t.ok){let e=await t.json();et(t=>t.map(t=>t.id===r?e.note:t))}}catch{Q("Failed to save note.")}finally{ex(e=>{let t=new Set(e);return t.delete(r),t})}},700);t.push(n)}return()=>{for(let e of t)window.clearTimeout(e)}},[en,el,ee,M?.id,F?.id]);let eq=async()=>{if(M?.id&&F?.id){ev(!0);try{let e=await fetch(`/api/projects/${M.id}/objectives/${F.id}/notes`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:"Untitled",body:""})});if(e.ok){let t=await e.json();et(e=>[t.note,...e]),eo(t.note.id)}}catch{Q("Failed to create note.")}finally{ev(!1)}}},eJ=async e=>{if(M?.id&&F?.id)try{let t=await fetch(`/api/projects/${M.id}/objectives/${F.id}/notes/${e}`,{method:"DELETE"});(t.ok||204===t.status)&&(et(t=>t.filter(t=>t.id!==e)),es===e&&eo(null))}catch{Q("Failed to delete note.")}},eV=async()=>{!F||window.confirm(`Delete "${F.title}"?`)&&(await e_((0,eb.removeProjectObjective)(P,F.id)),n?n():T.push(`/projects/${e}`))},eW=(0,s.useCallback)(async e=>{F&&F.threadId!==e&&await e_((0,eb.upsertProjectObjective)(P,{...F,threadId:e,updatedAt:new Date().toISOString()}))},[F,e_,P]),eB=(0,s.useCallback)(async e=>{if(!M?.id||!F?.id)return Q("Objective not found."),!1;Q(null);try{let t=await fetch(`/api/projects/${M.id}/objectives/${F.id}/scheduled-tasks`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...e,prompt:function(e,t){let r=t.trim();if(!r)return r;let a=`Objective label: ${e.key}`;return r.toLowerCase().includes(a.toLowerCase())?r:[a,`Write your output as an activity file at ~/.agx/projects/<project>/objectives/${e.key}/activities/<timestamp>-<slug>.md
19
- The file must have YAML frontmatter with: id (unique), source (your task ID), objectiveLabel: "${e.key}", createdAt (ISO), type (one of: metric-check, status-update, milestone, note).
20
- The markdown body below the frontmatter contains your output.`,r].join("\n\n")}(F,e.prompt)})}),r=await t.json().catch(()=>({}));if(!t.ok)throw Error(r.error||"Failed to create scheduled task.");return await D(),!0}catch(e){return Q(e instanceof Error?e.message:"Failed to create scheduled task."),!1}},[F,M?.id,D]),eH=(0,s.useCallback)(async()=>{if(!M?.id||!F?.id)return Q("Objective not found."),!1;if(!F.teamId)return Q("Assign a team to this objective before creating a worker."),!1;Q(null);try{let e=await fetch(`/api/projects/${M.id}/objectives/${F.id}/worker`,{method:"PUT"}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Failed to trigger objective worker.");return await D(),!0}catch(e){return Q(e instanceof Error?e.message:"Failed to trigger objective worker."),!1}},[F,M?.id,D]);return((0,s.useEffect)(()=>{if(!M?.id||!F?.id||!F?.key){e$([]),eA([]),eO([]);return}let e=M.id,t=F.key,r=!1;return async function(){try{let a=await fetch(`/api/trackers/connections?projectId=${encodeURIComponent(e)}`);if(!a.ok){r||(e$([]),eA([]),eO([]));return}let s=await a.json();if(r)return;let o=Array.isArray(s.available)?s.available:[],n=(s.connections??[]).map(e=>({type:e.type,displayName:o.find(t=>t.type===e.type)?.displayName??e.type,connected:!1!==e.connected})),i="string"==typeof s.defaultTracker&&s.defaultTracker?s.defaultTracker:null;eO(o),eA(n),eP(i);let l=n.filter(e=>e.connected),d=i&&l.some(e=>e.type===i)?l.filter(e=>e.type===i):l;if(0===d.length)return void e$([]);let c=t.trim().toLowerCase(),u=await Promise.all(d.map(async t=>{try{let r=await fetch(`/api/trackers/${encodeURIComponent(t.type)}/items?projectId=${encodeURIComponent(e)}&limit=500`);if(!r.ok)return[];let a=await r.json();return(Array.isArray(a.items)?a.items:[]).filter(e=>(e.labels??[]).some(e=>e.trim().toLowerCase()===c)).map(e=>({id:e.id,trackerType:e.trackerType??t.type,identifier:e.identifier,title:e.title,url:e.url??null,status:e.status,assignee:e.assignee?.name??null,updatedAt:e.updatedAt,labels:e.labels}))}catch{return[]}}));if(r)return;e$(u.flat())}catch(e){if(r)return;console.warn("Failed to load objective tracker resources",e),e$([]),eA([]),eO([])}}(),()=>{r=!0}},[F?.id,F?.key,M?.id]),E&&!M)?(0,t.jsx)(ek,{label:"Loading objective..."}):M?F?(0,t.jsx)("div",{className:"flex h-full min-h-0 flex-col bg-[radial-gradient(circle_at_top_left,rgba(59,130,246,0.1),transparent_28%),var(--background)] text-[var(--foreground)]",children:(0,t.jsx)("div",{className:"flex-1 min-h-0 overflow-hidden",children:(0,t.jsxs)("div",{className:"flex h-full min-h-0 flex-col xl:flex-row",children:[(0,t.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto",children:(0,t.jsxs)("div",{className:"max-w-5xl mx-auto pt-16 px-8 pb-20",children:[(0,t.jsx)(eN,{message:Y}),(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,t.jsx)("span",{className:"rounded-full border border-[var(--tone-neutral-border)] bg-[var(--tone-neutral-bg)] px-2.5 py-0.5 text-[10px] font-mono uppercase tracking-wider text-[var(--tone-neutral)]",children:F.key}),(0,t.jsx)("span",{className:`rounded-full border px-2.5 py-0.5 text-[10px] font-semibold uppercase tracking-[0.18em] ${eh[F.status].chipClass}`,children:eh[F.status].label})]}),(0,t.jsx)("div",{className:"mb-6",children:z?(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("input",{autoFocus:!0,value:z.title,onChange:e=>U({...z,title:e.target.value}),onKeyDown:e=>{"Enter"===e.key&&ez(),"Escape"===e.key&&U(null)},className:"flex-1 border-b-2 border-[var(--primary)] bg-transparent px-0 py-1 text-[28px] font-semibold leading-tight text-[var(--foreground)] outline-none",placeholder:"Objective statement"}),(0,t.jsx)("button",{type:"button",onClick:()=>void ez(),disabled:X,className:"rounded-md p-1.5 text-[var(--primary)] transition-colors hover:bg-[var(--status-in-progress-bg)]","aria-label":"Save objective",children:(0,t.jsx)(c.Check,{size:18})}),(0,t.jsx)("button",{type:"button",onClick:()=>U(null),className:"rounded-md p-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)]","aria-label":"Cancel editing",children:(0,t.jsx)(j.X,{size:18})})]}):(0,t.jsxs)("button",{type:"button","aria-label":`Edit objective ${F.title}`,className:"flex items-center gap-3 group cursor-pointer text-left",onClick:()=>U({id:F.id,title:F.title,teamId:F.teamId,summary:F.summary}),children:[(0,t.jsx)("h1",{className:"text-[28px] leading-tight font-semibold text-[var(--foreground)]",children:F.title}),(0,t.jsx)(x.Pencil,{size:16,className:"shrink-0 text-[var(--muted-foreground)] opacity-0 transition-opacity group-hover:opacity-100"})]})}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-6 gap-y-3 mb-10",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-[var(--muted-foreground)]",children:[(0,t.jsx)(f.Users,{size:12})," Team"]}),(0,t.jsx)("span",{className:"text-[var(--app-shell-soft-text)]",children:"·"}),q?(0,t.jsx)("div",{className:"min-w-[180px]",children:(0,t.jsx)(I.default,{options:R.map(e=>({id:e.id,label:e.name})),value:q.teamId,onChange:e=>{J({teamId:e});let t=e.trim();t&&F&&(e_((0,eb.upsertProjectObjective)(P,{...F,teamId:t,updatedAt:new Date().toISOString()})),J(null))},placeholder:"Select a team…"})}):(0,t.jsxs)("button",{type:"button","aria-label":`Edit team for ${F.title}`,onClick:()=>J({teamId:F.teamId}),className:"group -mx-1.5 -my-0.5 flex items-center gap-2 rounded px-1.5 py-0.5 transition-colors hover:bg-[var(--muted)]",children:[(0,t.jsx)("div",{className:"w-5 h-5 rounded-full bg-blue-500/20 text-blue-400 flex items-center justify-center text-[10px] font-bold border border-blue-500/30",children:(_??"?").charAt(0).toUpperCase()}),(0,t.jsx)("span",{className:"text-sm text-[var(--foreground)] transition-colors group-hover:text-[var(--primary)]",children:_??"Not assigned"})]})]}),M.id&&F.id?(0,t.jsx)(ed,{projectId:M.id,objectiveId:F.id,objectiveKey:F.key,metadata:M.metadata,currentProgress:F.progress,currentStatus:F.status,objectiveUpdatedAt:F.updatedAt}):null]}),(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsxs)("button",{type:"button",onClick:async()=>{eL(!0),await eH(),eL(!1)},disabled:eR,className:"inline-flex items-center gap-2 rounded-xl border border-[var(--status-completed-border)] bg-[var(--status-completed-bg)] px-3 py-2 text-sm text-[var(--status-completed-text)] transition-opacity hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,t.jsx)(g.Sparkles,{className:"h-4 w-4"}),eR?"Working...":"Work on objective"]})}),(0,t.jsx)("div",{className:"mb-8 border-b border-[var(--border)]",children:(0,t.jsx)("nav",{className:"flex gap-1 -mb-px","aria-label":"Objective sections",children:[{id:"activity",label:"Activity",icon:u.Clock},{id:"notes",label:"Notes",icon:m.FileText},{id:"tasks",label:"Tasks",icon:e=>{let r=eI.filter(e=>e.connected),a=(eM&&r.some(e=>e.type===eM)?eM:r[0]?.type)??"tracker";return(0,t.jsx)(ec.TrackerIcon,{trackerType:a,className:"h-3.5 w-3.5"})}},{id:"scheduled-tasks",label:"Scheduled Jobs",icon:d}].map(e=>{let r,a;return(0,t.jsxs)("button",{type:"button",onClick:()=>B(e.id),className:`flex items-center gap-2 px-3 py-2.5 text-sm font-medium border-b-2 transition-colors ${V===e.id?"border-[var(--primary)] text-[var(--foreground)]":"border-transparent text-[var(--muted-foreground)] hover:border-[var(--border)] hover:text-[var(--foreground)]"}`,children:[(0,t.jsx)(e.icon,{size:14}),e.label,"activity"===e.id&&H>0&&(0,t.jsx)("span",{className:"rounded-full bg-[var(--tone-neutral-bg)] px-1.5 py-0.5 font-mono text-[10px] text-[var(--tone-neutral)]",children:H}),"notes"===e.id&&ee.length>0&&(0,t.jsx)("span",{className:"rounded-full bg-[var(--tone-neutral-bg)] px-1.5 py-0.5 font-mono text-[10px] text-[var(--tone-neutral)]",children:ee.length}),"tasks"===e.id&&(r=["done","canceled","cancelled","completed","duplicate"],(a=eC.filter((e,t,a)=>a.findIndex(t=>t.id===e.id)===t&&!r.includes(e.status.toLowerCase()))).length>0?(0,t.jsx)("span",{className:"rounded-full bg-[var(--tone-neutral-bg)] px-1.5 py-0.5 font-mono text-[10px] text-[var(--tone-neutral)]",children:a.length}):null),"scheduled-tasks"===e.id&&eF>0&&(0,t.jsx)("span",{className:"rounded-full bg-[var(--tone-neutral-bg)] px-1.5 py-0.5 font-mono text-[10px] text-[var(--tone-neutral)]",children:eF})]},e.id)})})}),(0,t.jsxs)("div",{className:"space-y-10",children:["notes"===V&&(0,t.jsxs)("section",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,t.jsxs)("div",{className:"relative flex-1",children:[(0,t.jsx)(b.Search,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--muted-foreground)]"}),(0,t.jsx)("input",{type:"text",value:eg,onChange:e=>ey(e.target.value),placeholder:"Search notes...",className:"w-full rounded-md border border-[var(--border)] bg-[var(--input)] py-1.5 pl-8 pr-3 text-sm text-[var(--foreground)] placeholder:text-[var(--app-shell-soft-text)] focus:border-[var(--primary)] focus:outline-none"})]}),(0,t.jsxs)("button",{type:"button",onClick:eq,disabled:ep,className:"flex items-center gap-1.5 rounded-md border border-[var(--status-in-progress-border)] bg-[var(--status-in-progress-bg)] px-3 py-1.5 text-sm font-medium text-[var(--status-in-progress-text)] transition-opacity hover:opacity-90 disabled:opacity-50",children:[(0,t.jsx)(p.Plus,{size:14}),"New note"]})]}),er?(0,t.jsx)("p",{className:"py-4 text-sm text-[var(--muted-foreground)]",children:"Loading notes..."}):0===ee.length?(0,t.jsx)("p",{className:"text-sm text-[var(--muted-foreground)] py-4",children:"No notes yet. Add one above."}):0===(v=(l=eg.toLowerCase())?ee.filter(e=>e.title.toLowerCase().includes(l)||e.body.toLowerCase().includes(l)):ee).length?(0,t.jsx)("p",{className:"text-sm text-[var(--muted-foreground)] py-4",children:"No notes match your search."}):(0,t.jsx)("div",{className:"columns-1 gap-3 sm:columns-2 lg:columns-3",style:{columnFill:"balance"},children:v.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>eo(e.id),className:"mb-3 block w-full break-inside-avoid overflow-hidden rounded-lg border border-[var(--border)] bg-[var(--overlay-panel-muted)] text-left transition-shadow hover:shadow-md",children:[(0,t.jsx)("div",{className:"px-3 pt-3 pb-1",children:(0,t.jsx)("h4",{className:"text-sm font-medium text-[var(--foreground)] leading-snug",children:e.title})}),e.body.trim()&&(0,t.jsx)("div",{className:"px-3 pb-2 text-xs text-[var(--muted-foreground)] line-clamp-4",children:(0,t.jsx)(S.Markdown,{content:e.body})}),(0,t.jsx)("div",{className:"flex items-center justify-between px-3 pb-2",children:(0,t.jsx)("span",{className:"text-[10px] text-[var(--muted-foreground)]",children:new Date(e.updatedAt).toLocaleDateString()})})]},e.id))}),es&&(()=>{let e=ee.find(e=>e.id===es);if(!e)return null;let r=en[e.id]??e.body,a=el[e.id]??e.title,s=em.has(e.id);return(0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-start justify-center bg-black/50 pt-[5vh]",onClick:e=>{e.target===e.currentTarget&&eo(null)},children:(0,t.jsxs)("div",{className:"mx-6 w-full max-w-7xl rounded-xl border border-[var(--border)] bg-[var(--background)] shadow-xl",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[(0,t.jsx)("input",{type:"text",autoFocus:!0,value:a,onFocus:e=>{"Untitled"===a&&e.target.select()},onChange:t=>eu(r=>({...r,[e.id]:t.target.value})),className:"flex-1 bg-transparent text-base font-semibold text-[var(--foreground)] focus:outline-none"}),(0,t.jsxs)("div",{className:"flex items-center gap-2 ml-3",children:[(0,t.jsx)("span",{className:"text-[11px] text-[var(--muted-foreground)]",children:s?"Saving...":new Date(e.updatedAt).toLocaleDateString()}),(0,t.jsx)("button",{type:"button",onClick:()=>eJ(e.id),className:"p-1 text-[var(--muted-foreground)] transition-colors hover:text-[var(--destructive)]",children:(0,t.jsx)(h.Trash2,{size:14})}),(0,t.jsx)("button",{type:"button",onClick:()=>eo(null),className:"p-1 text-[var(--muted-foreground)] transition-colors hover:text-[var(--foreground)]",children:(0,t.jsx)(j.X,{size:14})})]})]}),(0,t.jsx)("div",{className:"max-h-[75vh] overflow-y-auto px-5 py-4",children:(0,t.jsx)(eS,{content:r,editable:!0,onChange:t=>ei(r=>({...r,[e.id]:t})),placeholder:"Write your note..."})})]})})})()]}),"activity"===V&&M.id&&F.id&&(0,t.jsx)(Z,{projectId:M.id,objectiveId:F.id,onTotalChange:K}),"tasks"===V&&(y=eC.filter((e,t,r)=>r.findIndex(t=>t.id===e.id)===t),w=["done","canceled","cancelled","completed","duplicate"],k=y.filter(e=>!w.includes(e.status.toLowerCase())),N=y.filter(e=>w.includes(e.status.toLowerCase())).slice(-5),C=eI.filter(e=>e.connected),A=0===($=eM&&C.some(e=>e.type===eM)?C.filter(e=>e.type===eM):C).length?null:$.map(e=>e.displayName).join(", "),(0,t.jsxs)("section",{children:[(0,t.jsx)("div",{className:"flex flex-wrap items-start justify-between gap-3 mb-4",children:(0,t.jsxs)("p",{className:"text-sm text-[var(--muted-foreground)]",children:["Tickets tracked by the objective label"," ",(0,t.jsx)("code",{className:"rounded bg-[var(--tone-neutral-bg)] px-1.5 py-0.5 font-mono text-[11px] text-[var(--foreground)]",children:F.key}),A?(0,t.jsxs)(t.Fragment,{children:[" across ",A,"."]}):"."]})}),0===$.length?(0,t.jsx)(eT,{label:0===eE.length?"No tracker integrations registered.":`Connect a tracker (${eE.map(e=>e.displayName).join(", ")}) to create and track tickets for this objective.`}):0===y.length?(0,t.jsx)(eT,{label:`No tracker tickets with label ${F.key} yet.`}):(0,t.jsxs)(t.Fragment,{children:[k.length>0&&(0,t.jsx)("div",{className:"space-y-3",children:k.map(r=>(0,t.jsxs)("div",{className:"rounded-xl border border-[var(--border)] bg-[var(--overlay-panel-muted)] p-4",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 text-xs font-semibold uppercase tracking-[0.18em] text-[var(--muted-foreground)]",children:[(0,t.jsx)(ec.TrackerIcon,{trackerType:r.trackerType,className:"h-3 w-3"}),(0,t.jsx)("span",{children:r.identifier})]}),(0,t.jsx)("a",{href:r.url??`/projects/${e}/${r.trackerType}?issue=${r.id}`,target:r.url?"_blank":void 0,rel:r.url?"noreferrer":void 0,className:"mt-1 block text-sm font-medium text-[var(--foreground)] transition-colors hover:text-[var(--primary)]",children:r.title})]}),(0,t.jsx)("span",{className:"rounded-full border border-[var(--tone-neutral-border)] px-2 py-1 text-[10px] font-semibold uppercase tracking-[0.18em] text-[var(--tone-neutral)]",children:r.status})]}),(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-2 text-[11px] text-[var(--muted-foreground)]",children:[(0,t.jsxs)("span",{children:["Updated ",ef(r.updatedAt)]}),(0,t.jsx)("span",{children:r.assignee?`Assigned to ${r.assignee}`:"Unassigned"})]})]},r.id))}),N.length>0&&(0,t.jsxs)("div",{className:k.length>0?"mt-6":"",children:[(0,t.jsx)("p",{className:"text-[11px] font-medium uppercase tracking-[0.18em] text-[var(--muted-foreground)] mb-2",children:"Completed"}),(0,t.jsx)("div",{className:"space-y-0.5",children:N.map(r=>(0,t.jsxs)("a",{href:r.url??`/projects/${e}/${r.trackerType}?issue=${r.id}`,target:r.url?"_blank":void 0,rel:r.url?"noreferrer":void 0,className:"group flex items-center gap-3 rounded-md px-2 py-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)]",children:[(0,t.jsx)(ec.TrackerIcon,{trackerType:r.trackerType,className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"text-[11px] font-mono shrink-0",children:r.identifier}),(0,t.jsx)("span",{className:"text-[12px] truncate",children:r.title}),(0,t.jsx)("span",{className:"ml-auto shrink-0 text-[10px] text-[var(--app-shell-soft-text)] group-hover:text-[var(--muted-foreground)]",children:r.status})]},r.id))})]})]})]})),"scheduled-tasks"===V&&(0,t.jsx)("section",{children:(0,t.jsx)(W,{projectId:M.id,objectiveId:F.id,objectiveKey:F.key,createDefaults:{name:`Work on ${F.title}`},onCreateTask:eB})}),(0,t.jsxs)("section",{className:"pt-10",children:[(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)("h2",{className:"text-sm font-semibold text-[var(--destructive)]",children:"Danger Zone"})}),(0,t.jsxs)("div",{className:"flex items-center justify-between rounded-xl border border-[var(--destructive-border)] bg-[var(--destructive-bg)] p-5",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-[var(--foreground)]",children:"Delete Objective"}),(0,t.jsx)("p",{className:"mt-1 text-sm text-[var(--muted-foreground)]",children:"Once you delete an objective, there is no going back."})]}),(0,t.jsxs)("button",{type:"button",onClick:()=>void eV(),"aria-label":`Delete objective ${F.title}`,className:"flex items-center gap-2 whitespace-nowrap rounded-md border border-[var(--destructive-border)] bg-[var(--destructive-bg)] px-3 py-1.5 text-sm font-medium text-[var(--destructive)] transition-opacity hover:opacity-90",children:[(0,t.jsx)(h.Trash2,{size:14})," Delete"]})]})]})]})]})}),(0,t.jsx)(ew,{projectId:M.id,projectSlug:e,objective:F,teamName:_,trackerConnections:eI,availableTrackers:eE,defaultTrackerType:eM,onThreadLinked:eW,onObjectiveUpdated:D})]})})}):(0,t.jsx)("div",{className:"flex h-full items-center justify-center px-4 bg-[var(--background)]",children:(0,t.jsxs)("div",{className:"rounded-xl border border-[var(--border)] bg-[var(--card-bg)] p-8 text-center",children:[(0,t.jsx)("p",{className:"text-lg font-semibold text-[var(--foreground)]",children:"Objective not found"}),(0,t.jsx)("p",{className:"mt-2 text-sm text-[var(--muted-foreground)]",children:"It may have been deleted or the link is stale."}),(0,t.jsx)(r.default,{href:`/projects/${e}`,className:"mt-4 inline-flex items-center gap-2 rounded-md border border-[var(--border)] bg-[var(--card-bg)] px-3 py-1.5 text-sm text-[var(--foreground)] transition-colors hover:bg-[var(--secondary)]",children:"Back to objectives"})]})}):(0,t.jsx)(ek,{label:"Project not found."})}function eT({label:e}){return(0,t.jsx)("div",{className:"flex items-center rounded-xl border border-dashed border-[var(--border)] bg-[var(--overlay-panel-muted)] p-6",children:(0,t.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:e})})}function eE({mode:e,draft:r,teams:a=[],isSaving:s,onChange:o,onClose:n,onSave:i}){return(0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/45 p-4",children:(0,t.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"edit"===e?"Edit objective":"New objective",className:"w-full max-w-3xl overflow-hidden rounded-[32px] border border-[var(--border)] bg-[var(--overlay-panel-strong)] shadow-2xl",children:[(0,t.jsxs)("div",{className:"border-b border-[var(--border)] px-5 py-4",children:[(0,t.jsx)("h3",{className:"text-lg font-semibold text-[var(--foreground)]",children:"edit"===e?"Edit objective":"New objective"}),(0,t.jsx)("p",{className:"mt-1 text-sm text-[var(--muted-foreground)]",children:"edit"===e?"Update the tracking details for this objective.":"Keep the statement measurable and use notes only for context that matters."})]}),(0,t.jsxs)("div",{className:"space-y-4 px-5 py-5",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(eO,{label:"Objective statement"}),(0,t.jsx)("input",{value:r.title,onChange:e=>o({...r,title:e.target.value}),className:"w-full rounded-2xl border border-[var(--border)] bg-[var(--input)] px-4 py-3 text-sm text-[var(--foreground)] outline-none transition-colors focus:border-[var(--primary)]",placeholder:"Get 50 qualified visitors daily"})]}),"create"===e?(0,t.jsxs)("div",{children:[(0,t.jsx)(eO,{label:"Team"}),(0,t.jsxs)("select",{value:r.teamId,onChange:e=>o({...r,teamId:e.target.value}),className:"w-full rounded-2xl border border-[var(--border)] bg-[var(--input)] px-3 py-3 text-sm text-[var(--foreground)] outline-none transition-colors focus:border-[var(--primary)]",children:[(0,t.jsx)("option",{value:"",children:"Select a team"}),a.map(e=>(0,t.jsx)("option",{value:e.id,children:e.name},e.id))]}),(0,t.jsx)("p",{className:"mt-2 text-xs text-[var(--muted-foreground)]",children:"Teams can only own one objective at a time."})]}):null]}),(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2 border-t border-[var(--border)] px-5 py-4",children:[(0,t.jsx)("button",{type:"button",onClick:n,className:"rounded-xl border border-[var(--border)] px-3 py-2 text-sm text-[var(--muted-foreground)] transition-colors hover:text-[var(--foreground)]",children:"Cancel"}),(0,t.jsx)("button",{type:"button",onClick:i,disabled:s,className:"rounded-xl border border-[var(--status-in-progress-border)] bg-[var(--status-in-progress-bg)] px-3 py-2 text-sm font-medium text-[var(--status-in-progress-text)] transition-opacity hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",children:s?"Saving...":"edit"===e?"Save objective":"Create objective"})]})]})})}function eO({label:e}){return(0,t.jsx)("label",{className:"mb-2 block text-[11px] font-semibold uppercase tracking-[0.18em] text-[var(--muted-foreground)]",children:e})}e.s(["ProjectObjectivesOverview",()=>eI],568656)}]);
@@ -1,6 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,715908,e=>{"use strict";var t=e.i(935851);function r(e,s={}){let[a,n]=(0,t.useState)([]),[d,l]=(0,t.useState)(!0),[o,i]=(0,t.useState)(null),c=(0,t.useRef)(!1),u=s.requireProjectId??!1,x=s.includeObjectiveJobs??!1,m=s.objectiveId?.trim()||null,p=(0,t.useCallback)(async()=>{if(u&&!e){n([]),i(null),l(!1),c.current=!0;return}try{c.current||l(!0);let t=new URLSearchParams;e&&t.set("projectId",e),m&&t.set("objectiveId",m),x&&t.set("includeObjectiveJobs","true");let r=t.toString(),s=await fetch(`/api/prompt-jobs${r?`?${r}`:""}`);if(!s.ok)throw Error(`Failed to fetch: ${s.status}`);let a=await s.json();n(a.jobs??[]),i(null)}catch(e){i(e instanceof Error?e.message:String(e))}finally{l(!1),c.current=!0}},[x,m,e,u]);(0,t.useEffect)(()=>{c.current=!1,p();let e=setInterval(p,1e4);return()=>clearInterval(e)},[p]);let f=(0,t.useCallback)(async e=>{let t=await fetch("/api/prompt-jobs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)return null;let{job:r}=await t.json();return await p(),r?.id??null},[p]),h=(0,t.useCallback)(async(e,t)=>{let r=await fetch(`/api/prompt-jobs/${e}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return r.ok&&await p(),r.ok},[p]),g=(0,t.useCallback)(async e=>{let t=await fetch(`/api/prompt-jobs/${e}`,{method:"DELETE"});return t.ok&&await p(),t.ok},[p]),v=(0,t.useCallback)(async e=>{let t="active"===e.state?"paused":"active",r=await fetch(`/api/prompt-jobs/${e.id}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({state:t})});return r.ok&&await p(),r.ok},[p]),b=(0,t.useCallback)(async e=>{let t=await fetch("/api/prompt-jobs/poll",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jobId:e})});return t.ok&&await p(),t.ok},[p]),j=(0,t.useCallback)(async e=>{let t=await fetch(`/api/prompt-jobs/${e}/cancel`,{method:"POST"});return t.ok&&await p(),t.ok},[p]);return{jobs:a,loading:d,error:o,refresh:p,createJob:f,updateJob:h,deleteJob:g,toggleJob:v,runNow:b,cancelRun:j,fetchRuns:(0,t.useCallback)(async e=>{let t=await fetch(`/api/prompt-jobs/${e}/runs`);return t.ok?(await t.json()).runs??[]:[]},[])}}e.s(["usePromptJobs",()=>r])},248004,e=>{"use strict";let t=(0,e.i(363732).default)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);e.s(["Settings2",()=>t],248004)},827430,e=>{"use strict";var t=e.i(762281),r=e.i(935851),s=e.i(810605),a=e.i(353899),n=e.i(245900),d=e.i(794731),l=e.i(929870),o=e.i(797167),i=e.i(580873),c=e.i(558201),u=e.i(203096),x=e.i(498027),m=e.i(248004),p=e.i(640481),f=e.i(169610),h=e.i(519132),g=e.i(66386),v=e.i(715908),b=e.i(945028),j=e.i(490011),N=e.i(208343),w=e.i(352687),y=e.i(423709),k=e.i(990933),C=e.i(553069),S=e.i(667480);let I=[{value:"prompt",label:"Prompt",description:"Run a prompt on a schedule"},{value:"linear_worker",label:"Linear Worker",description:"Observe Linear workspace and decide what to work on"}],$=(0,a.default)(()=>e.A(501223).then(e=>e.Composer),{loadableGenerated:{modules:[844118]},ssr:!1}),R=(0,a.default)(()=>e.A(469612),{loadableGenerated:{modules:[668610]},ssr:!1});function P(e){return"active"===e.state&&(null!==e.nextRunAt&&e.nextRunAt-Date.now()<0?!e.lastRunAt||!(e.lastRunAt>=e.nextRunAt):!!e.prevScheduledAt&&!!e.lastRunAt&&e.lastRunAt>e.prevScheduledAt+3e5)}function z(e,t){if("paused"===t)return"Paused";if("stopped"===t)return"Stopped";if(null===e)return"Pending...";let r=e-Date.now();return r<0?"Overdue":r<6e4?`in ${Math.round(r/1e3)}s`:r<36e5?`in ${Math.round(r/6e4)}m`:r<864e5?`in ${Math.round(r/36e5)}h`:`in ${Math.round(r/864e5)}d`}function A(e){if(!e)return"—";let t=new Date(e);return t.toLocaleDateString("en-US",{month:"short",day:"numeric"})+", "+t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"})}function T({children:e}){return(0,t.jsx)("div",{className:"text-[10px] font-bold uppercase tracking-[0.12em] text-[var(--muted-foreground)]",children:e})}function M({children:e}){return(0,t.jsx)("label",{className:"block text-[10px] font-semibold text-[var(--muted-foreground)] uppercase tracking-widest mb-2",children:e})}function E(e,t,r=24){let s=t?t.replace("#",""):"e2e8f0";return`https://api.dicebear.com/9.x/bottts-neutral/svg?seed=${encodeURIComponent(e)}&size=${r}&backgroundColor=${s}`}function _({agents:e,value:s,onChange:a}){let[n,d]=(0,r.useState)(!1),l=e.find(e=>e.id===s);return(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(M,{children:"Agent"}),(0,t.jsxs)("button",{type:"button",onClick:()=>d(!n),className:"w-full flex items-center gap-2.5 px-3 py-2.5 rounded-lg border border-[var(--card-border)] bg-[var(--muted)] text-left transition-colors hover:border-[var(--muted-foreground)]",children:[l?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("img",{src:E(l.id,l.color),alt:"",className:"size-6 rounded-full shrink-0"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[var(--foreground)] truncate",children:l.name}),(0,t.jsxs)("div",{className:"text-[10px] text-[var(--muted-foreground)]",children:[l.provider,l.model?` / ${l.model}`:""]})]})]}):(0,t.jsx)("span",{className:"text-xs text-[var(--muted-foreground)]",children:"Select an agent..."}),(0,t.jsx)(x.ChevronDown,{size:14,className:`ml-auto text-[var(--muted-foreground)] transition-transform ${n?"rotate-180":""}`})]}),n&&(0,t.jsx)("div",{className:"absolute z-20 mt-1 w-full rounded-lg border border-[var(--card-border)] bg-[var(--card-bg)] shadow-lg max-h-[280px] overflow-y-auto",children:e.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>{a(e.id),d(!1)},className:`w-full flex items-center gap-2.5 px-3 py-2.5 text-left transition-colors hover:bg-[var(--muted)] ${s===e.id?"bg-[var(--muted)]":""}`,children:[(0,t.jsx)("img",{src:E(e.id,e.color),alt:"",className:"size-6 rounded-full shrink-0"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[var(--foreground)] truncate",children:e.name}),(0,t.jsxs)("div",{className:"text-[10px] text-[var(--muted-foreground)]",children:[e.provider,e.model?` / ${e.model}`:""]})]}),s===e.id&&(0,t.jsx)("span",{className:"text-xs text-[var(--foreground)]",children:"✓"})]},e.id))})]})}function O({onClose:e,onSubmit:s,editingJob:a,createDefaults:n,contextLabel:d}){let[l,i]=(0,r.useState)([]),[c,u]=(0,r.useState)(a?.executionMode??n?.executionMode??"prompt"),[p,f]=(0,r.useState)(a?.name??n?.name??""),[h,g]=(0,r.useState)(a?.prompt??n?.prompt??""),[v,b]=(0,r.useState)(a?.agentId??n?.agentId??""),[j,N]=(0,r.useState)(a?.provider??n?.provider??"claude"),[w,y]=(0,r.useState)(a?.model??n?.model??"");(0,r.useEffect)(()=>{fetch("/api/prompt-jobs/agents").then(e=>e.json()).then(e=>i(e.agents??[])).catch(e=>console.warn("[PromptJobBoard] fetch agents failed:",e))},[]);let[k,C]=(0,r.useState)(a?.cliArgs??n?.cliArgs??""),[I,$]=(0,r.useState)(a?.cronExpr||a?.cadence||n?.cadence||""),[P,z]=(0,r.useState)(a?.condition??n?.condition??""),[A,T]=(0,r.useState)(!!(a?.cronExpr||a?.cadence||n?.cadence)),[E,O]=(0,r.useState)(a?.catchUpPolicy??n?.catchUpPolicy??"fire_once"),[D,U]=(0,r.useState)(!!a?.cliArgs||!!n?.cliArgs||a?.catchUpPolicy!=null&&"fire_once"!==a.catchUpPolicy||n?.catchUpPolicy!=null&&"fire_once"!==n.catchUpPolicy),[L,J]=(0,r.useState)(!1),F=async t=>{t.preventDefault(),p.trim()&&h.trim()&&I.trim()&&A&&(J(!0),await s({name:p.trim(),prompt:h.trim(),agentId:v,provider:j,model:w.trim(),cliArgs:k.trim(),catchUpPolicy:E,cadence:I.trim(),condition:P.trim(),executionMode:c}),J(!1),e())};return(0,t.jsxs)("div",{className:"h-full flex flex-col text-[var(--foreground)]",children:[(0,t.jsxs)("div",{className:"h-14 shrink-0 border-b border-[var(--card-border)] flex items-center justify-between px-6",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("button",{onClick:e,className:"p-1.5 rounded-md text-[var(--muted-foreground)] hover:text-[var(--foreground)] hover:bg-[var(--muted)] transition-colors",children:(0,t.jsx)(o.X,{size:18})}),(0,t.jsx)("h2",{className:"text-sm font-semibold",children:a?"Edit Scheduled Task":"New Scheduled Task"}),d?(0,t.jsx)("span",{className:"rounded-full border border-sky-500/25 bg-sky-500/10 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-[0.16em] text-sky-100",children:d}):null]}),(0,t.jsx)("button",{onClick:F,disabled:L||!p.trim()||!h.trim()||!I.trim()||!A,className:"px-5 py-2 rounded-lg text-sm font-medium bg-[var(--foreground)] text-[var(--background)] hover:opacity-90 disabled:opacity-40 transition-opacity",children:L?"Saving...":a?"Save Changes":"Create Task"})]}),(0,t.jsxs)("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex-1 border-r border-[var(--card-border)] flex flex-col min-w-0",children:[(0,t.jsx)("div",{className:"px-8 pt-8 pb-4",children:(0,t.jsx)("input",{type:"text",value:p,onChange:e=>f(e.target.value),placeholder:"Untitled job",className:"w-full text-2xl font-bold bg-transparent border-none outline-none placeholder:text-[var(--muted-foreground)]/40 text-[var(--foreground)]",autoFocus:!0})}),(0,t.jsxs)("div",{className:"flex-1 px-8 pb-8 overflow-y-auto",children:[(0,t.jsx)(M,{children:"Instructions"}),(0,t.jsx)("div",{className:"bg-[var(--card-bg)] border border-[var(--card-border)] rounded-xl overflow-hidden min-h-[300px]",children:(0,t.jsx)(R,{content:h,onChange:e=>g(e),placeholder:"Describe what this prompt should do..."})})]})]}),(0,t.jsxs)("div",{className:"w-[380px] shrink-0 overflow-y-auto p-6 space-y-6",children:[(0,t.jsx)(_,{agents:l,value:v,onChange:e=>{b(e);let t=l.find(t=>t.id===e);t?(N(t.provider),y(t.model??"")):(N("claude"),y(""))}}),(0,t.jsx)(S.ScheduleConditionPicker,{value:{cadence:I,condition:P},onChange:(e,t)=>{$(e.cadence),z(e.condition),T(t.isScheduleValid)},scheduleLabel:"Schedule",conditionLabel:"Condition",conditionHelpText:"Scheduled runs and Run now will check this condition before executing."}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("button",{type:"button",onClick:()=>U(!D),className:"flex items-center gap-1.5 text-[11px] text-[var(--muted-foreground)] hover:text-[var(--foreground)] transition-colors",children:[(0,t.jsx)(m.Settings2,{size:12})," ",D?"Hide":"Show"," advanced",(0,t.jsx)(x.ChevronDown,{size:12,className:`transition-transform ${D?"rotate-180":""}`})]}),D&&(0,t.jsxs)("div",{className:"mt-3 space-y-3 pt-3 border-t border-[var(--card-border)]",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(M,{children:"CLI Arguments"}),(0,t.jsx)("input",{type:"text",value:k,onChange:e=>C(e.target.value),placeholder:"--dangerously-skip-permissions",className:"w-full bg-[var(--muted)] border border-[var(--card-border)] rounded-lg px-3 py-2 text-sm text-[var(--foreground)] placeholder:text-[var(--muted-foreground)] focus:outline-none focus:border-[var(--foreground)] transition-colors"}),(0,t.jsx)("p",{className:"text-[10px] text-[var(--muted-foreground)] mt-1",children:"Extra flags passed to the CLI command."})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(M,{children:"When missed"}),(0,t.jsx)("div",{className:"space-y-1.5",children:[{id:"fire_once",label:"Run once on recovery",desc:"Execute a single run regardless of how many were missed"},{id:"replay_all",label:"Run all missed",desc:"Queue one run per missed occurrence (use with caution)"},{id:"skip",label:"Skip and wait for next",desc:"Discard missed runs, wait for the next scheduled time"}].map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>O(e.id),className:`w-full text-left px-3 py-2 rounded-lg border transition-all ${E===e.id?"border-[var(--foreground)] bg-[var(--foreground)]/5":"border-[var(--card-border)] bg-[var(--muted)] hover:border-[var(--muted-foreground)]"}`,children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[var(--foreground)]",children:e.label}),(0,t.jsx)("div",{className:"text-[10px] text-[var(--muted-foreground)]",children:e.desc})]},e.id))})]})]})]})]})]})]})}function D(e){let t=Math.floor(e/1e3);if(t<60)return`${t}s`;let r=Math.floor(t/60);if(r<60)return`${r}m ${t%60}s`;let s=Math.floor(r/60);return`${s}h ${r%60}m`}function U(e){return e?new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"—"}function L({run:e,job:s,agentMap:a,onCancelRun:n,onRerun:d}){let l=`prompt-run:${e.id}`,m=s.agentId&&a[s.agentId]?a[s.agentId].name:null,p=s.agentId?a[s.agentId]:null,g="running"===e.status||"queued"===e.status,v=function(e,t){let[s,a]=(0,r.useState)(null);return(0,r.useEffect)(()=>{if(!e||!t)return void a(null);let r=new Date(e).getTime(),s=()=>a(Math.max(0,Date.now()-r));s();let n=setInterval(s,1e3);return()=>clearInterval(n)},[e,t]),s}(e.startedAt,"running"===e.status),[w,C]=(0,r.useState)(!1),[S,I]=(0,r.useState)(new Set);(0,r.useEffect)(()=>{s.projectId&&fetch(`/api/projects/${encodeURIComponent(s.projectId)}/agents`).then(e=>e.json()).then(e=>{I(new Set((e.agents??[]).map(e=>e.agent_id)))}).catch(e=>console.warn("[PromptJobBoard] fetch project agents failed:",e))},[s.projectId]);let R=(0,r.useMemo)(()=>Object.values(a).filter(e=>S.has(e.id)).map(e=>({id:e.id,name:e.name,title:e.title??void 0,provider:e.provider??"claude",model:e.model,color:e.color})),[a,S]),P=(0,r.useMemo)(()=>`run-root:${e.id}`,[e.id]),{messages:z,setMessages:A,sendMessage:T,loadHistory:M,chatRuns:_,stop:O}=(0,b.useGroupChat)(l),{processes:L,streaming:J,chatRuns:F}=(0,j.useProcessPolling)({workspaceId:l,threadId:P},{messages:z,setMessages:A}),q=(0,r.useMemo)(()=>{let e=[..._];for(let t of F)e.some(e=>e.chatRunId===t.chatRunId)||e.push(t);return e},[_,F]),B=q.some(e=>"queued"===e.status||"running"===e.status)||L.some(e=>"spawning"===e.state||"running"===e.state),H=B?q.some(e=>"queued"===e.status)?"queued":"working":"ready",W=(0,r.useRef)(!1);(0,r.useEffect)(()=>{M().then(()=>{if(!W.current){W.current=!0;let t=e.output?`[Automation run output]
2
-
3
- ${e.output}${e.error?`
4
-
5
- [Error]
6
- ${e.error}`:""}`:"[Automation run — no output]";fetch("/api/history",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({threadId:l,messages:[{id:P,role:"assistant",participantId:s.agentId||null,content:t,timestamp:new Date(e.startedAt??e.createdAt).getTime(),rootMessageId:null,parentMessageId:null,depth:0}]})}).catch(e=>console.warn("[PromptJobBoard] save root message failed:",e))}})},[M,l,P,e,s.agentId]);let G=(0,r.useRef)(null),V=(0,r.useRef)(null),K=(0,r.useRef)(z.length);(0,r.useEffect)(()=>{z.length>K.current&&V.current?.scrollIntoView({behavior:"smooth"}),K.current=z.length},[z.length]);let Q=(0,r.useCallback)((e,t,r,s,a,n,d)=>{let l=(0,k.orderParticipantIds)(Array.from(S),a);T(e,t,void 0,P,r,void 0,l.length>0?l:void 0,void 0,n,d)},[T,S,P]);return(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-[var(--card-border)] px-4 py-2",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("div",{className:"text-[12px] font-semibold text-[var(--foreground)] truncate flex items-center gap-2",children:["Run ",e.id.slice(0,8),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[9px] font-bold uppercase tracking-wider ${"running"===e.status?"bg-emerald-500/15 text-emerald-400":"queued"===e.status?"bg-amber-500/15 text-amber-400":"success"===e.status?"bg-emerald-500/10 text-emerald-400/70":"failed"===e.status?"bg-red-500/15 text-red-400":(e.status,"bg-[var(--muted)] text-[var(--muted-foreground)]")}`,children:["running"===e.status&&(0,t.jsx)("span",{className:"size-1.5 rounded-full bg-emerald-400 animate-pulse"}),e.status]})]}),(0,t.jsxs)("div",{className:"text-[10px] text-[var(--muted-foreground)]",children:["running"===e.status&&null!=v?`Running \xb7 ${D(v)}`:null!=e.durationMs?D(e.durationMs):"queued"===e.status?"Queued":null,null!=e.exitCode&&` \xb7 exit ${e.exitCode}`]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:["failed"===e.status&&d&&(0,t.jsxs)("button",{onClick:d,className:"flex items-center gap-1 rounded px-2 py-1 text-[11px] font-medium text-[var(--foreground)] bg-[var(--muted)] hover:bg-[var(--muted)]/80 transition-colors",children:[(0,t.jsx)(u.RefreshCw,{size:12}),"Rerun"]}),g&&n&&(0,t.jsxs)("button",{onClick:()=>{C(!0),n()},disabled:w,className:"inline-flex items-center gap-1 rounded-md border border-red-400/30 px-2 py-1 text-[10px] font-bold uppercase tracking-[0.05em] text-red-400 transition-colors hover:bg-red-500/10 disabled:opacity-50",children:[(0,t.jsx)(o.X,{size:10}),w?"Cancelling…":"Cancel"]})]})]}),(e.startedAt||e.hostPid||e.hostCommand)&&(0,t.jsxs)("div",{className:"border-b border-[var(--card-border)] px-4 py-2 grid grid-cols-[auto_1fr] gap-x-4 gap-y-1 text-[10px]",children:[e.startedAt&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-[var(--muted-foreground)]",children:"Started"}),(0,t.jsx)("span",{className:"text-[var(--foreground)]",children:U(e.startedAt)})]}),e.finishedAt&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-[var(--muted-foreground)]",children:"Finished"}),(0,t.jsx)("span",{className:"text-[var(--foreground)]",children:U(e.finishedAt)})]}),e.hostCommand&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-[var(--muted-foreground)]",children:"Command"}),(0,t.jsx)("span",{className:"font-mono text-[var(--foreground)] truncate",children:e.hostCommand})]}),e.hostPid&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-[var(--muted-foreground)]",children:"PID"}),(0,t.jsx)("span",{className:"font-mono text-[var(--foreground)]",children:e.hostPid})]})]}),(0,t.jsx)("div",{ref:G,className:"min-h-0 flex-1 overflow-y-auto px-4 py-3",children:(0,t.jsxs)("div",{className:"space-y-4 max-w-none",children:[e.output&&(0,t.jsxs)("div",{className:"flex gap-2.5",children:[(0,t.jsx)("div",{className:"shrink-0 mt-0.5",children:p?(0,t.jsx)("img",{src:E(s.agentId,p.color,28),alt:"",className:"size-7 rounded-full"}):(0,t.jsx)("div",{className:"flex size-7 items-center justify-center rounded-full bg-[var(--muted)] text-[10px] text-[var(--muted-foreground)]",children:(0,t.jsx)(c.Terminal,{size:12})})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"mb-1 flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-[11px] font-semibold text-[var(--foreground)]",children:m??s.provider}),(0,t.jsx)("span",{className:"text-[9px] px-1.5 py-0.5 rounded bg-[var(--muted)] text-[var(--muted-foreground)] font-medium uppercase tracking-wider",children:"Run output"})]}),(0,t.jsx)("div",{className:"rounded-lg px-3 py-2 text-[12px] leading-[1.55] bg-[var(--muted)] text-[var(--foreground)]",children:(0,t.jsx)(N.Markdown,{content:e.output})})]})]}),e.error&&(0,t.jsxs)("div",{className:"flex gap-2.5",children:[(0,t.jsx)("div",{className:"shrink-0 mt-0.5",children:(0,t.jsx)("div",{className:"flex size-7 items-center justify-center rounded-full bg-red-500/10 text-[10px] text-red-400",children:"!"})}),(0,t.jsx)("div",{className:"min-w-0 flex-1",children:(0,t.jsx)("div",{className:"rounded-lg px-3 py-2 text-[12px] leading-[1.55] bg-red-500/10 text-red-400",children:(0,t.jsx)("div",{className:"whitespace-pre-wrap break-words",children:e.error})})})]}),e.logs&&(0,t.jsxs)("details",{className:"group",children:[(0,t.jsxs)("summary",{className:"flex cursor-pointer items-center gap-1 text-[11px] text-[var(--muted-foreground)] hover:text-[var(--foreground)] transition-colors select-none",children:[(0,t.jsx)(x.ChevronDown,{size:12,className:"transition-transform group-open:rotate-180"}),"Tail logs"]}),(0,t.jsx)("pre",{className:"mt-2 max-h-64 overflow-auto rounded-lg bg-[var(--muted)] px-3 py-2 text-[11px] leading-[1.5] text-[var(--foreground)] whitespace-pre-wrap break-words",children:e.logs})]}),!e.output&&!e.error&&(0,t.jsx)("div",{className:"text-center py-12 text-[var(--muted-foreground)] text-sm",children:"queued"===e.status?(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,t.jsx)(i.Clock,{size:20,className:"text-amber-400/60"}),(0,t.jsx)("span",{children:"Waiting to start…"})]}):"running"===e.status?(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,t.jsx)(u.RefreshCw,{size:20,className:"text-emerald-400/60 animate-spin"}),(0,t.jsx)("span",{children:null!=v?`Running \xb7 ${D(v)}`:"Running…"}),(0,t.jsx)("span",{className:"text-[11px] text-[var(--muted-foreground)]/60",children:"Waiting for output…"})]}):"No output captured"}),z.filter(e=>e.id!==P).map(e=>{let r="user"===e.role,n=e.participantId?a[e.participantId]:null,d=n?.name??m??s.provider;return(0,t.jsxs)("div",{className:"flex gap-2.5",children:[(0,t.jsx)("div",{className:"shrink-0 mt-0.5",children:r?(0,t.jsx)("div",{className:"flex size-7 items-center justify-center rounded-full bg-[var(--muted)] text-[var(--muted-foreground)]",children:(0,t.jsx)(f.User,{size:12})}):n?(0,t.jsx)("img",{src:E(n.id,n.color,28),alt:"",className:"size-7 rounded-full"}):p?(0,t.jsx)("img",{src:E(s.agentId,p.color,28),alt:"",className:"size-7 rounded-full"}):(0,t.jsx)("div",{className:"flex size-7 items-center justify-center rounded-full bg-[var(--muted)] text-[10px] text-[var(--muted-foreground)]",children:(0,t.jsx)(c.Terminal,{size:12})})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("div",{className:"mb-1",children:(0,t.jsx)("span",{className:"text-[11px] font-semibold text-[var(--foreground)]",children:r?"You":d})}),(0,t.jsx)("div",{className:`rounded-lg px-3 py-2 text-[12px] leading-[1.55] ${r?"bg-blue-500/10 text-[var(--foreground)]":"bg-[var(--muted)] text-[var(--foreground)]"}`,children:(0,t.jsx)(N.Markdown,{content:(0,y.stripMarkers)(e.content),isUser:r})})]})]},e.id)}),Object.entries(J).filter(([,e])=>e.rootMessageId===P).map(([e])=>{let r=a[e]??p;return(0,t.jsxs)("div",{className:"flex gap-2.5 animate-in fade-in duration-300",children:[(0,t.jsx)("div",{className:"shrink-0 mt-0.5",children:r?(0,t.jsx)("img",{src:E(r.id,r.color,28),alt:"",className:"size-7 rounded-full"}):(0,t.jsx)("div",{className:"flex size-7 items-center justify-center rounded-full bg-[var(--muted)] text-[10px] text-[var(--muted-foreground)]",children:(0,t.jsx)(h.Sparkles,{size:12})})}),(0,t.jsx)("div",{className:"min-w-0 flex-1",children:(0,t.jsxs)("div",{className:"flex items-center gap-2 py-1",children:[(0,t.jsx)("span",{className:"text-[11px] text-[var(--muted-foreground)]",children:r?.name??"Thinking"}),(0,t.jsxs)("span",{className:"inline-flex items-center gap-[3px]",children:[(0,t.jsx)("span",{className:"w-1 h-1 rounded-full bg-[var(--muted-foreground)]/50 animate-[pulse-dot_1.4s_ease-in-out_infinite]"}),(0,t.jsx)("span",{className:"w-1 h-1 rounded-full bg-[var(--muted-foreground)]/50 animate-[pulse-dot_1.4s_ease-in-out_0.2s_infinite]"}),(0,t.jsx)("span",{className:"w-1 h-1 rounded-full bg-[var(--muted-foreground)]/50 animate-[pulse-dot_1.4s_ease-in-out_0.4s_infinite]"})]})]})})]},`streaming-${e}`)}),(0,t.jsx)("div",{ref:V})]})}),(0,t.jsx)("div",{className:"px-3 py-2",children:(0,t.jsx)($,{onSend:Q,onStop:O,loading:B,activityStatus:H,participants:R,projectId:s.projectId||void 0,commands:[],placeholder:"Follow up on this run...",initialPinnedParticipantId:s.agentId||void 0})})]})}function J({job:e,agentMap:a,onEdit:l,onToggle:o,onDelete:u,onRunNow:x,onCancelRun:m,fetchRuns:f}){let h,[v,b]=(0,r.useState)([]),[j,N]=(0,r.useState)(!1),{getSelection:w,pushSelection:y,replaceSelection:k}=(0,g.useUrlSelection)(),S=w("run"),$=e.agentId&&a[e.agentId]?a[e.agentId].name:null,R=(0,r.useCallback)(async()=>{N(!1),b(await f(e.id)),N(!0)},[f,e.id]);(0,r.useEffect)(()=>{R()},[R]),(0,r.useEffect)(()=>{let e=setInterval(R,s.UI_POLL_PROMPT_RUNS_MS);return()=>clearInterval(e)},[R]),(0,r.useEffect)(()=>{S&&j&&(v.some(e=>e.id===S)||k({run:null}))},[k,v,j,S]);let M=v.find(e=>e.id===S)??null,_="running"===e.lastOutcome,O=e.cronExpr&&(0,C.cronToHuman)(e.cronExpr)||e.cadence||e.cronExpr,D=(h=e.prompt.split("\n").map(e=>e.trim()).find(Boolean))?h.replace(/^execute\s+/i,""):"No target",U=e.agentId?a[e.agentId]:null;return(0,t.jsx)("div",{className:"h-full flex flex-col text-[var(--foreground)]",children:(0,t.jsxs)("div",{className:"flex min-h-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex w-[420px] shrink-0 flex-col border-r border-[var(--card-border)] overflow-hidden",children:[(0,t.jsx)("div",{className:"border-b border-[var(--card-border)] px-6 py-5",children:(0,t.jsxs)("div",{className:"flex items-start gap-4",children:[(0,t.jsx)("div",{className:"min-w-0 flex-1",children:(0,t.jsx)("h2",{className:"truncate text-[18px] font-semibold text-[var(--foreground)]",children:e.name})}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("button",{onClick:o,type:"button",role:"switch","aria-checked":"active"===e.state,title:"active"===e.state?"Pause":"Resume",className:`relative inline-flex h-[18px] w-[32px] shrink-0 cursor-pointer rounded-full border transition-colors ${"active"===e.state?"border-emerald-400/30 bg-emerald-500/40":"border-[var(--card-border)] bg-[var(--muted)]"}`,children:(0,t.jsx)("span",{className:`pointer-events-none absolute top-[2px] size-[12px] rounded-full bg-white/90 shadow-sm transition-transform ${"active"===e.state?"translate-x-[16px]":"translate-x-[2px]"}`})}),(0,t.jsx)("button",{onClick:x,disabled:_,title:"Run now",className:"rounded-md border border-[var(--card-border)] p-1.5 text-[var(--muted-foreground)] transition-colors hover:border-[var(--foreground)] hover:text-[var(--foreground)] disabled:opacity-50",children:(0,t.jsx)(n.Play,{size:12,className:"fill-current"})}),(0,t.jsx)("button",{onClick:l,title:"Edit",className:"p-1.5 rounded-md border border-[var(--card-border)] text-[var(--muted-foreground)] hover:text-[var(--foreground)] hover:border-[var(--foreground)] transition-colors",children:(0,t.jsx)(p.Pencil,{size:12})}),(0,t.jsx)("button",{onClick:u,title:"Delete",className:"p-1.5 rounded-md border border-[var(--card-border)] text-[var(--muted-foreground)] hover:text-red-400 hover:border-red-400/30 transition-colors",children:(0,t.jsx)(d.Trash2,{size:12})})]})]})}),(0,t.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto",children:(0,t.jsxs)("div",{className:"space-y-0",children:[(0,t.jsx)("div",{className:"px-6 py-5",children:(0,t.jsx)("div",{className:"rounded-2xl border border-[var(--card-border)] bg-[var(--card-bg)] px-5 py-4",children:(0,t.jsxs)("div",{className:"grid grid-cols-[96px,minmax(0,1fr)] items-center gap-x-4 gap-y-4",children:[e.executionMode&&"prompt"!==e.executionMode&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"text-[11px] uppercase tracking-[0.12em] text-[var(--muted-foreground)]",children:"Type"}),(0,t.jsx)("div",{className:"min-w-0",children:(0,t.jsx)("span",{className:"rounded-md border border-violet-400/20 bg-violet-500/10 px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wider text-violet-400",children:I.find(t=>t.value===e.executionMode)?.label??e.executionMode})})]}),(0,t.jsx)("div",{className:"text-[11px] uppercase tracking-[0.12em] text-[var(--muted-foreground)]",children:"Agent"}),(0,t.jsx)("div",{className:"min-w-0 flex items-center justify-between gap-3",children:(0,t.jsxs)("div",{className:"min-w-0 flex items-center gap-2.5",children:[U?(0,t.jsx)("img",{src:E(U.id,U.color,20),alt:"",className:"size-5 rounded-full shrink-0"}):(0,t.jsx)(c.Terminal,{size:14,className:"shrink-0 text-[var(--muted-foreground)]"}),(0,t.jsxs)("div",{className:"truncate text-[13px] font-medium text-[var(--foreground)]",children:[$??e.provider,e.model?` (${e.provider} / ${e.model})`:""]})]})}),(0,t.jsx)("div",{className:"text-[11px] uppercase tracking-[0.12em] text-[var(--muted-foreground)]",children:"Schedule"}),(0,t.jsx)("div",{className:"truncate text-[13px] font-medium text-[var(--foreground)]",children:O||"—"}),(0,t.jsx)("div",{className:"text-[11px] uppercase tracking-[0.12em] text-[var(--muted-foreground)]",children:"Target"}),(0,t.jsx)("div",{className:"truncate font-mono text-[13px] text-[var(--foreground)]",title:D,children:D})]})})}),(0,t.jsxs)("div",{className:"border-t border-[var(--card-border)]",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-6 py-4",children:[(0,t.jsx)(T,{children:"Recent Runs"}),(0,t.jsxs)("span",{className:"text-sm text-[var(--muted-foreground)]",children:[v.length," total"]})]}),(0,t.jsx)("div",{children:0===v.length?(0,t.jsx)("div",{className:"px-6 py-10 text-center text-[11px] text-[var(--muted-foreground)]",children:"No runs yet"}):v.map(e=>{let r=S===e.id,s="success"===e.status;return(0,t.jsxs)("button",{type:"button",onClick:()=>y({run:e.id}),className:`flex w-full items-center gap-4 border-t border-[var(--card-border)]/50 px-6 py-5 text-left transition-colors ${r?"border-l-2 border-l-emerald-400 bg-emerald-500/5":"hover:bg-[var(--muted)]/20"}`,children:[(0,t.jsx)("span",{className:`flex size-6 shrink-0 items-center justify-center rounded-full border text-[11px] ${s?"border-emerald-400 text-emerald-400":"failed"===e.status?"border-red-400 text-red-400":"running"===e.status?"border-sky-400 text-sky-400":"border-[var(--card-border)] text-[var(--muted-foreground)]"}`,children:s?"✓":"failed"===e.status?"!":"•"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("div",{className:"text-[13px] font-medium text-[var(--foreground)]",children:A(e.startedAt??e.createdAt)}),(0,t.jsx)("div",{className:"mt-1 text-[12px] text-[var(--muted-foreground)]",children:null!=e.durationMs?`${(e.durationMs/1e3).toFixed(1)}s`:"running"===e.status?"Running...":e.status.charAt(0).toUpperCase()+e.status.slice(1)})]}),r?(0,t.jsx)("span",{className:"rounded-md bg-[var(--muted)] px-2.5 py-1 text-[10px] font-semibold uppercase tracking-wider text-[var(--muted-foreground)]",children:"Viewing"}):null]},e.id)})})]}),(0,t.jsxs)("div",{className:"border-t border-[var(--card-border)] px-6 py-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[_?(0,t.jsx)("button",{onClick:m,className:"inline-flex items-center gap-1.5 rounded-md border border-red-400/30 px-2.5 py-1 text-[10px] font-bold uppercase tracking-[0.05em] text-red-400 transition-colors hover:bg-red-500/10",children:"Cancel run"}):null,e.condition?(0,t.jsx)("span",{className:"rounded-md border border-blue-400/20 bg-blue-500/10 px-2 py-1 text-[10px] font-semibold uppercase tracking-wider text-blue-400",children:"gated"}):null,P(e)&&(0,t.jsxs)("span",{className:"rounded-md border border-amber-500/20 bg-amber-500/10 px-2 py-1 text-[10px] font-semibold uppercase tracking-wider text-amber-400 inline-flex items-center gap-1",children:[(0,t.jsx)(i.Clock,{size:10}),"overdue"]}),(0,t.jsxs)("span",{className:`text-[11px] ${P(e)?"text-amber-400 font-medium":"text-[var(--muted-foreground)]"}`,children:["Next run ",z(e.nextRunAt,e.state)]}),(0,t.jsxs)("span",{className:"text-[11px] text-[var(--muted-foreground)]",children:["Last ",e.lastRunAt?A(new Date(e.lastRunAt).toISOString()):"Never"]}),(e.cliArgs||"skip"!==e.overlapPolicy)&&(0,t.jsx)("span",{className:"text-[11px] text-[var(--muted-foreground)]",children:e.cliArgs?"Custom CLI args":`Overlap ${e.overlapPolicy}`})]}),e.condition?(0,t.jsx)("div",{className:"mt-3 text-[11px] leading-[1.5] text-[var(--muted-foreground)]",children:e.condition}):null]})]})})]}),M?(0,t.jsx)(L,{run:M,job:e,agentMap:a,onCancelRun:m,onRerun:x},M.id):(0,t.jsx)("div",{className:"flex min-w-0 flex-1 items-center justify-center text-[var(--muted-foreground)] text-sm",children:0===v.length?'No runs yet. Click "Run now" to trigger one.':"Select a run to view its output"})]})})}function F({projectId:e,requireProjectId:s=!1,includeObjectiveJobs:a=!1,visibleJobIds:n,contextLabel:d,createDefaults:o,onCreateJob:x}={}){let{jobs:m,loading:p,refresh:f,createJob:h,updateJob:b,deleteJob:j,toggleJob:N,runNow:y,cancelRun:k,fetchRuns:S}=(0,v.usePromptJobs)(e,{requireProjectId:s,includeObjectiveJobs:a}),[I,$]=(0,r.useState)("all"),[R,A]=(0,r.useState)(null),[T,M]=(0,r.useState)(!1),[_,D]=(0,r.useState)(null),[U,L]=(0,r.useState)(null),[q,B]=(0,r.useState)({}),[H,W]=(0,r.useState)(null),[G,V]=(0,r.useState)({}),{getSelection:K,pushSelection:Q,replaceSelection:X}=(0,g.useUrlSelection)(),Y=K("job"),Z=K("run"),ee=(0,r.useMemo)(()=>n?new Set(n):null,[n]);(0,r.useEffect)(()=>{fetch("/api/prompt-jobs/agents").then(e=>e.json()).then(e=>{let t={};for(let r of e.agents??[])t[r.id]=r;V(t)}).catch(e=>console.warn("[PromptJobBoard] fetch agent map failed:",e))},[]);let et=e=>{W(e),setTimeout(()=>W(null),2500)},er=(0,r.useMemo)(()=>(ee?m.filter(e=>ee.has(e.id)):m).filter(e=>"linear_worker"!==e.executionMode),[m,ee]),es=er.filter(e=>"all"===I||e.state===I),ea=Y?er.find(e=>e.id===Y)??null:null,en=ea??(R?.id===Y&&(!ee||ee.has(R.id))?R:null);er.length,er.filter(e=>"active"===e.state).length,er.filter(e=>"paused"===e.state).length,er.filter(e=>"stopped"===e.state).length;let ed=async e=>{await N(e)&&et(`${e.name} ${"active"===e.state?"paused":"resumed"}`)},el=async(e,t)=>{if(t?.stopPropagation(),q[e])return;B(t=>({...t,[e]:!0}));let r=await y(e);B(t=>{let r={...t};return delete r[e],r}),r&&et("Run triggered")},eo=async e=>{await j(e)&&(Y===e&&Q({job:null,run:null}),et("Job deleted"))},ei=async e=>{await k(e)&&et("Run cancelled")},ec=async t=>{if(_)await b(_.id,t)&&et(`Task "${t.name}" updated`);else{let r=x?await x(t):await h({...t,projectId:e??""});r&&(await f(),Q({job:r,run:null}),et(`Task "${t.name}" created`))}};(0,r.useEffect)(()=>{if(!Y){A(null),Z&&X({run:null});return}if(ee&&!ee.has(Y)){A(null),X({job:null,run:null});return}if(ea)return void A(e=>e?.id===Y?ea:null);let e=!1;return(async()=>{try{let t=await fetch(`/api/prompt-jobs/${encodeURIComponent(Y)}`);if(e)return;if(404===t.status)return void X({job:null,run:null});if(!t.ok)throw Error(`Failed to fetch selected scheduled task: ${t.status}`);let r=await t.json().catch(()=>({}));if(!r.job?.id||!a&&r.job.objectiveId)return void X({job:null,run:null});A(r.job)}catch(t){e||console.error("Failed to hydrate selected prompt job",t)}})(),()=>{e=!0}},[a,X,ea,Y,Z,ee]);let eu=H&&(0,t.jsx)("div",{className:"fixed bottom-8 left-1/2 -translate-x-1/2 z-50 animate-in fade-in slide-in-from-bottom-2 duration-200",children:(0,t.jsx)("div",{className:"bg-[var(--card-bg)] border border-[var(--card-border)] px-4 py-2.5 rounded-xl shadow-lg flex items-center gap-2.5 text-sm font-medium",children:H})});return T?(0,t.jsxs)(t.Fragment,{children:[eu,(0,t.jsx)(O,{onClose:()=>{M(!1),D(null)},onSubmit:ec,editingJob:_,createDefaults:o,contextLabel:d})]}):(0,t.jsxs)("div",{className:"flex h-full min-h-0 flex-col text-[var(--foreground)] lg:flex-row",children:[eu,(0,t.jsxs)("div",{className:"flex w-full shrink-0 flex-col border-b border-[var(--card-border)] lg:w-[390px] lg:border-b-0 lg:border-r",children:[(0,t.jsx)("div",{className:"px-6 pb-0 pt-6",children:(0,t.jsx)("div",{className:"border-b border-[var(--card-border)]",children:(0,t.jsxs)("div",{className:"flex items-end justify-between gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("div",{className:"flex items-end gap-10",children:["all","active","paused"].map(e=>{let r=I===e;return(0,t.jsxs)("button",{onClick:()=>$(e),className:`relative pb-4 text-[18px] font-semibold capitalize transition-colors ${r?"text-[var(--foreground)]":"text-[var(--muted-foreground)] hover:text-[var(--foreground)]"}`,children:[e,r?(0,t.jsx)("span",{className:"absolute bottom-[6px] left-0 h-[4px] w-8 rounded-full bg-[var(--foreground)]"}):null]},e)})}),d?(0,t.jsx)("span",{className:"mb-3 rounded-full border border-sky-500/25 bg-sky-500/10 px-2 py-1 text-[10px] font-semibold uppercase tracking-[0.16em] text-sky-100",children:d}):null]}),(0,t.jsxs)("div",{className:"flex items-center gap-5 pb-4 text-[var(--muted-foreground)]",children:[(0,t.jsx)("button",{onClick:()=>f(),className:"transition-colors hover:text-[var(--foreground)]",title:"Refresh",children:(0,t.jsx)(u.RefreshCw,{size:18})}),(0,t.jsx)("button",{onClick:()=>{D(null),M(!0)},className:"transition-colors hover:text-[var(--foreground)]",title:"New Job",children:(0,t.jsx)(l.Plus,{size:20})})]})]})})}),(0,t.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto pb-5",children:p&&0===er.length?(0,t.jsx)("div",{className:"py-12 text-center text-sm text-[var(--muted-foreground)]",children:"Loading scheduled tasks..."}):(0,t.jsxs)("div",{className:"overflow-hidden",children:[es.map(e=>{let r=Y===e.id,s=e.cronExpr&&(0,C.cronToHuman)(e.cronExpr)||e.cadence||e.cronExpr;return(0,t.jsx)("div",{onClick:()=>Q({job:e.id,run:null}),className:`cursor-pointer border-b border-[var(--card-border)]/50 px-6 py-4 transition-colors ${r?"bg-[var(--card-bg)]":"hover:bg-[var(--muted)]/10"}`,children:(0,t.jsxs)("div",{className:"flex items-start gap-4",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("div",{className:"truncate text-[15px] font-medium text-[var(--foreground)]",children:e.name}),(0,t.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-x-4 gap-y-1 text-[12px] text-[var(--muted-foreground)]",children:[(0,t.jsx)("span",{className:"min-w-0 flex items-center gap-1.5 truncate",children:e.agentId&&G[e.agentId]?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("img",{src:E(e.agentId,G[e.agentId].color,16),alt:"",className:"size-4 rounded-full"}),G[e.agentId].name]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c.Terminal,{size:11}),e.provider]})}),(0,t.jsxs)("span",{className:`flex items-center gap-1 ${P(e)?"text-amber-400 font-medium":""}`,children:[(0,t.jsx)(i.Clock,{size:11}),z(e.nextRunAt,e.state)]}),(0,t.jsx)("span",{className:"truncate font-mono text-[11px]",title:s,children:s}),"linear_worker"===e.executionMode?(0,t.jsx)("span",{className:"rounded-md border border-violet-400/20 bg-violet-500/10 px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wider text-violet-400",children:"linear"}):null,e.condition?(0,t.jsx)("span",{className:"rounded-md border border-blue-400/20 bg-blue-500/10 px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wider text-blue-400",children:"gated"}):null]})]}),(0,t.jsx)("button",{onClick:t=>{t.stopPropagation(),ed(e)},type:"button",role:"switch","aria-checked":"active"===e.state,title:"active"===e.state?"Pause":"Resume",className:`relative inline-flex h-[18px] w-[32px] shrink-0 cursor-pointer rounded-full border transition-colors ${"active"===e.state?"border-emerald-400/30 bg-emerald-500/40":"border-[var(--card-border)] bg-[var(--muted)]"}`,children:(0,t.jsx)("span",{className:`pointer-events-none absolute top-[2px] size-[12px] rounded-full bg-white/90 shadow-sm transition-transform ${"active"===e.state?"translate-x-[16px]":"translate-x-[2px]"}`})})]})},e.id)}),0===es.length&&(0,t.jsx)("div",{className:"rounded-xl border border-dashed border-[var(--card-border)] py-12 text-center text-sm text-[var(--muted-foreground)]",children:0===er.length?"No scheduled tasks yet. Create one to get started.":"No scheduled tasks match the selected filter."})]})})]}),(0,t.jsx)("div",{className:"min-h-0 min-w-0 flex-1",children:en?(0,t.jsx)(J,{job:en,agentMap:G,onEdit:()=>{D(en),M(!0)},onToggle:()=>ed(en),onDelete:()=>L(en),onRunNow:()=>el(en.id),onCancelRun:()=>ei(en.id),fetchRuns:S},en.id):(0,t.jsx)("div",{className:"flex h-full items-center justify-center border-t border-[var(--card-border)] lg:border-l-0 lg:border-t-0",children:(0,t.jsxs)("div",{className:"rounded-2xl border border-dashed border-[var(--card-border)] bg-[var(--card-bg)]/60 px-8 py-10 text-center",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-[var(--foreground)]",children:"Select a scheduled task"}),(0,t.jsx)("p",{className:"mt-2 text-sm text-[var(--muted-foreground)]",children:"The selected job will open here with its runs and chat output."})]})})}),(0,t.jsx)(w.default,{isOpen:!!U,title:"Delete scheduled task?",message:"This permanently removes the task and all its run history. This cannot be undone.",preview:U?.name,confirmLabel:"Delete",variant:"danger",onConfirm:()=>{U&&eo(U.id),L(null)},onCancel:()=>L(null)})]})}e.s(["CreateJobModal",()=>O,"default",()=>F])}]);
@@ -1,16 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,80673,e=>{"use strict";let t=(0,e.i(363732).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);e.s(["Download",()=>t],80673)},741746,e=>{"use strict";let t=(0,e.i(363732).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["AlertCircle",()=>t],741746)},889016,e=>{"use strict";let t=(0,e.i(363732).default)("tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);e.s(["Tag",()=>t],889016)},794731,e=>{"use strict";let t=(0,e.i(363732).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",()=>t],794731)},990933,e=>{"use strict";function t(e){if("string"==typeof e)return e.trim()||void 0}function r(e,r){let a=new Set,n=new Set;!function e(t,r){if(t)for(let a of t)r(a),e(a.content,r)}(e.content,e=>{if("participantMention"!==e.type)return;let t=e.attrs??{},r="string"==typeof t.id?t.id.trim():"",s="string"==typeof t.kind?t.kind:"agent";r&&"agent"===s&&(a.add(r),"parallel"===t.mode&&n.add(r))});let s=t(r);return{...s?{pinnedParticipantId:s}:{},mentionedParticipantIds:Array.from(a),parallelParticipantIds:Array.from(n)}}function a(e,r){let a=function(e){if(!Array.isArray(e))return[];let t=new Set,r=[];for(let a of e){if("string"!=typeof a)continue;let e=a.trim();!e||t.has(e)||(t.add(e),r.push(e))}return r}(e),n=t(r);return n&&a.includes(n)?[n,...a.filter(e=>e!==n)]:a}e.s(["extractComposerRouting",()=>r,"orderParticipantIds",()=>a])},66386,e=>{"use strict";var t=e.i(935851),r=e.i(506420);function a(e){return"string"!=typeof e?null:e.trim()||null}function n(e,t){return(e.get(t)?.trim()??"")||null}function s(){let e=(0,r.useRouter)(),s=(0,r.usePathname)(),i=(0,r.useSearchParams)(),l=(0,t.useCallback)(e=>n(i,e),[i]),c=(0,t.useCallback)((e,t)=>(function(e,t,r){let s=function(e,t){let r={...t},s=e=>Object.prototype.hasOwnProperty.call(t,e);if(s("issue")&&!s("run")){let s=n(e,"issue");a(t.issue)!==s&&(r.run=null)}if(s("job")&&!s("run")){let s=n(e,"job");a(t.job)!==s&&(r.run=null)}if(s("open")&&!s("message")){let s=n(e,"open");a(t.open)!==s&&(r.message=null)}if(s("group")&&!s("issue")){let s=n(e,"group");a(t.group)!==s&&(r.issue=null,r.run=null)}if(s("issue")&&!s("group")){let s=n(e,"issue");a(t.issue)!==s&&(r.group=null)}return r}(t,r),i=new URLSearchParams(t.toString());for(let[e,t]of Object.entries(s)){let r=a(t);r?i.set(e,r):i.delete(e)}let l=i.toString();return l?`${e}?${l}`:e})(t??s,i,e),[s,i]),o=(0,t.useCallback)((t,r)=>{e.push(c(t,r))},[c,e]),u=(0,t.useCallback)((t,r)=>{e.replace(c(t,r))},[c,e]);return{pathname:s,searchParams:i,getSelection:l,buildHref:c,pushSelection:o,replaceSelection:u}}e.s(["useUrlSelection",()=>s])},945028,490011,352687,e=>{"use strict";var t=e.i(935851);function r(e){return`threadId=${encodeURIComponent(e)}`}function a(e){return`workspaceId=${encodeURIComponent(e)}`}function n(e){let[n,s]=(0,t.useState)([]),[i,l]=(0,t.useState)([]),[c,o]=(0,t.useState)([]),u=(0,t.useRef)(e),d=(0,t.useRef)(e);u.current=e,d.current!==e&&(d.current=e,s([]),l([]),o([]));let p=(0,t.useCallback)(async e=>{let t=e?.trim()||u.current?.trim();if(!t){s([]),l([]);return}let n=r(t);try{let[e,r]=await Promise.all([fetch(`/api/history?${n}`),fetch(`/api/logs?${a(t)}`)]);if(u.current!==t)return;e.ok&&s(await e.json()),r.ok&&l(await r.json())}catch{}},[]),h=(0,t.useCallback)(async e=>{let t=e?.trim()||u.current?.trim();if(!t){s([]),l([]);return}let n=r(t);await Promise.all([fetch(`/api/history?${n}`,{method:"DELETE"}),fetch(`/api/logs?${a(t)}`,{method:"DELETE"})]),u.current===t&&(s([]),l([]))},[]),f=(0,t.useCallback)(async(e,t=10,r,a,n,i,l,c,d,p)=>{let h=r?.trim()||u.current?.trim();if(!h)return;let f=Date.now(),m=crypto.randomUUID(),y={id:m,role:"user",participantId:null,content:e,timestamp:f,rootMessageId:a||null,parentMessageId:a||null,depth:+!!a,...i&&i.length>0?{attachments:i}:{}};s(e=>[...e,y]);try{let r=await fetch("/api/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({threadId:h,prompt:e,promptPrefix:d||void 0,maxRounds:t,userMessageId:m,rootMessageId:a||void 0,attachmentIds:n?.length?n:void 0,activeParticipantIds:Array.isArray(l)?l:void 0,projectSlug:c?.trim()||void 0,routing:p})}),i=await r.json().catch(e=>(console.warn("[useGroupChat] failed to parse run response:",e),null));r.ok&&i?.chatRunId?o(e=>[{chatRunId:i.chatRunId,threadId:h,rootMessageId:a||m,status:"queued",optimistic:!0,enqueuedAt:Date.now()},...e.filter(e=>e.chatRunId!==i.chatRunId)]):r.ok||(console.error(`[useGroupChat] POST /api/chat failed (${r.status}):`,i?.error||r.statusText),s(e=>e.map(e=>e.id===m?{...e,sendFailed:!0}:e)))}catch(e){console.error("[useGroupChat] network error sending message:",e),s(e=>e.map(e=>e.id===m?{...e,sendFailed:!0}:e))}return m},[]),m=(0,t.useCallback)(async()=>{let e=u.current?.trim();if(e)try{await fetch(`/api/processes?workspaceId=${encodeURIComponent(e)}`,{method:"DELETE"})}catch{}},[]),y=(0,t.useCallback)(async e=>{let t=u.current?.trim();if(t)try{await fetch(`/api/processes?workspaceId=${encodeURIComponent(t)}&threadId=${encodeURIComponent(e)}`,{method:"DELETE"})}catch{}},[]);return{messages:n,setMessages:s,logs:i,sendMessage:f,loadHistory:p,clearHistory:h,clearLogs:(0,t.useCallback)(async e=>{let t=e?.trim()||u.current?.trim();t?(await fetch(`/api/logs?${a(t)}`,{method:"DELETE"}).catch(e=>console.warn("[useGroupChat] delete logs failed:",e)),u.current===t&&l([])):l([])},[]),chatRuns:c,setChatRuns:o,stop:m,stopThread:y}}e.s(["useGroupChat",()=>n],945028);let s=new Set(["spawning","running"]);function i(e,r){let a=r?.intervalMs??1500,n=r?.idleIntervalMs??1e4,[i,l]=(0,t.useState)(new Set),[c,o]=(0,t.useState)([]),[u,d]=(0,t.useState)({}),[p,h]=(0,t.useState)([]),f=(0,t.useRef)(e);f.current=e,(0,t.useRef)(r?.messages??[]).current=r?.messages??[];let m=(0,t.useRef)(r?.setMessages);m.current=r?.setMessages;let y=(0,t.useRef)(0),g=(0,t.useRef)(new Map),I=(0,t.useRef)(new Map);(0,t.useEffect)(()=>{let e=r?.messages??[];if(e.length>0){let t=Math.max(...e.map(e=>e.timestamp));t>y.current&&(y.current=t)}},[r?.messages]),(0,t.useEffect)(()=>()=>{for(let e of g.current.values())e.close();g.current.clear()},[]);let k=(0,t.useCallback)(async()=>{let e=f.current;if(!e){l(new Set),o([]),d({}),h([]);return}let t=null;if(e.threadId?t=`/api/processes?threadId=${encodeURIComponent(e.threadId)}`:e.workspaceId&&(t=`/api/processes?workspaceId=${encodeURIComponent(e.workspaceId)}`),!t){l(new Set),o([]),d({}),h([]);return}try{let a=e.workspaceId||e.threadId,n=a?`/api/history?threadId=${encodeURIComponent(a)}&since=${y.current}`:null,i=a?`/api/chat-runs?threadId=${encodeURIComponent(a)}&limit=20`:null,c=[fetch(t)];n&&c.push(fetch(n)),i&&c.push(fetch(i));let[u,d,p]=await Promise.all(c),g=f.current;if(g?.threadId!==e.threadId||g?.workspaceId!==e.workspaceId)return;if(u.ok){let e=await u.json();o(e);let t=new Set(e.filter(e=>s.has(e.state)).map(e=>e.agentId));l(t)}if(p?.ok){var r;let e=(r=await p.json(),Array.isArray(r)?r.map(e=>{if(!e||"object"!=typeof e)return null;let t="string"==typeof e.chatRunId?e.chatRunId:"string"==typeof e.id?e.id:null,r="string"==typeof e.threadId?e.threadId:null,a="string"==typeof e.status?e.status:null,n="string"==typeof e.rootMessageId?e.rootMessageId:(e.rootMessageId,null);return t&&r&&a&&("queued"===a||"running"===a||"awaiting_user"===a||"blocked"===a||"completed"===a||"failed"===a||"cancelled"===a)?{chatRunId:t,threadId:r,rootMessageId:n,status:a,optimistic:!1}:null}).filter(e=>!!e):[]);h(e)}if(d?.ok&&m.current){let e=await d.json();if(e.length>0){let t=Math.max(...e.map(e=>e.timestamp));t>y.current&&(y.current=t),m.current(t=>{let r=new Set(t.map(e=>e.id)),a=e.filter(e=>!r.has(e.id)),n=t.map(t=>e.find(e=>e.id===t.id)??t);return 0===a.length?n:[...n,...a].sort((e,t)=>e.timestamp-t.timestamp)})}}}catch{}},[]);(0,t.useEffect)(()=>{let e=p.filter(e=>"queued"===e.status||"running"===e.status),t=new Set(e.map(e=>e.chatRunId));for(let[e,r]of g.current.entries())t.has(e)||(r.close(),g.current.delete(e),I.current.delete(e));for(let t of e){if(g.current.has(t.chatRunId))continue;let e=new EventSource(`/api/chat-runs/${encodeURIComponent(t.chatRunId)}/events`);g.current.set(t.chatRunId,e);let r=new Map;I.current.set(t.chatRunId,r);let a=new Set;e.addEventListener("chat",n=>{let s;try{s=JSON.parse(n.data)}catch{return}switch(s.type){case"participant-start":case"participant-thinking":a.add(s.participantId),r.has(s.participantId)||r.set(s.participantId,{text:"",thoughts:[]}),d(e=>e[s.participantId]?e:{...e,[s.participantId]:{content:"",rootMessageId:t.rootMessageId??null}});break;case"text-delta":{r.has(s.participantId)||r.set(s.participantId,{text:"",thoughts:[]});let e=r.get(s.participantId);e&&(e.text+=s.delta,d(r=>{let a={...r},n=t.rootMessageId??null;return a[s.participantId]={content:e.text,rootMessageId:n},a}));break}case"participant-thought":{let e=r.get(s.participantId);e&&(e.thoughts.push(s.content),d(t=>{let r=t[s.participantId];return r?{...t,[s.participantId]:{...r,thoughts:[...e.thoughts]}}:t}));break}case"participant-end":a.delete(s.participantId),k().then(()=>{d(e=>{let t={...e};return delete t[s.participantId],t})});break;case"participant-error":a.delete(s.participantId),k().then(()=>{d(e=>{let t={...e};return delete t[s.participantId],t})});break;case"done":e.close(),g.current.delete(t.chatRunId),I.current.delete(t.chatRunId)}}),e.onerror=()=>{e.close(),g.current.delete(t.chatRunId),I.current.delete(t.chatRunId)}}},[p]);let x=e?.threadId||e?.workspaceId||null,v=p.some(e=>"queued"===e.status||"running"===e.status),w=c.some(e=>s.has(e.state)),b=v||w?a:n;return(0,t.useEffect)(()=>{if(!x){l(new Set),o([]),d({}),h([]);return}k();let e=setInterval(k,b);return()=>clearInterval(e)},[x,b,k]),{activeAgents:i,processes:c,streaming:u,chatRuns:p,poll:k}}e.s(["useProcessPolling",()=>i],490011);var l=e.i(762281);function c({isOpen:e,title:r,message:a,preview:n,confirmLabel:s="Confirm",cancelLabel:i="Cancel",variant:c="default",onConfirm:o,onCancel:u}){let d=(0,t.useRef)(null),p=(0,t.useRef)(null);(0,t.useEffect)(()=>{if(e){let e=setTimeout(()=>d.current?.focus(),50);return()=>clearTimeout(e)}},[e]);let h=(0,t.useCallback)(e=>{"Escape"===e.key&&u()},[u]);if(!e)return null;let f="danger"===c;return(0,l.jsxs)("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/50 backdrop-blur-md",style:{animation:"confirm-overlay-in 200ms ease-out"},onClick:e=>e.target===e.currentTarget&&u(),onKeyDown:h,children:[(0,l.jsxs)("div",{ref:p,className:"w-full max-w-md mx-4 bg-[var(--card-bg)] rounded-2xl border border-[var(--card-border)] shadow-2xl overflow-hidden",style:{animation:"confirm-dialog-in 250ms cubic-bezier(0.34, 1.56, 0.64, 1)"},children:[(0,l.jsx)("div",{className:"px-6 pt-6 pb-3",children:(0,l.jsxs)("div",{className:"flex items-start gap-4",children:[f&&(0,l.jsx)("div",{className:"flex-shrink-0 w-11 h-11 rounded-full bg-red-500/10 border border-red-500/20 flex items-center justify-center",children:(0,l.jsx)("svg",{className:"w-5 h-5 text-red-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0"})})}),(0,l.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,l.jsx)("h3",{className:"text-[15px] font-semibold text-[var(--foreground)]",children:r}),(0,l.jsx)("p",{className:"mt-1 text-[13px] text-[var(--muted-foreground)] leading-relaxed",children:a})]})]})}),n&&(0,l.jsx)("div",{className:"mx-6 mb-3 px-3 py-2.5 rounded-lg bg-[var(--muted)]/40 border border-[var(--card-border)]",children:(0,l.jsxs)("p",{className:"text-[12px] text-[var(--muted-foreground)] line-clamp-3 leading-relaxed italic",children:["“",n,"”"]})}),(0,l.jsx)("div",{className:"mx-6 border-t border-[var(--card-border)]"}),(0,l.jsxs)("div",{className:"px-6 py-4 flex items-center justify-end gap-2.5",children:[(0,l.jsx)("button",{onClick:u,className:"px-4 py-2 rounded-lg text-[13px] font-medium text-[var(--muted-foreground)] hover:text-[var(--foreground)] hover:bg-[var(--muted)]/60 transition-all duration-150",children:i}),(0,l.jsx)("button",{ref:d,onClick:o,className:`px-4 py-2 rounded-lg text-[13px] font-medium transition-all duration-150 ${f?"bg-red-500 text-white hover:bg-red-600 active:scale-[0.97]":"btn-primary active:scale-[0.97]"}`,children:s})]})]}),(0,l.jsx)("style",{children:`
2
- @keyframes confirm-overlay-in {
3
- from { opacity: 0; }
4
- to { opacity: 1; }
5
- }
6
- @keyframes confirm-dialog-in {
7
- from {
8
- opacity: 0;
9
- transform: scale(0.9) translateY(10px);
10
- }
11
- to {
12
- opacity: 1;
13
- transform: scale(1) translateY(0);
14
- }
15
- }
16
- `})]})}e.s(["default",()=>c],352687)},367859,e=>{"use strict";let t=(0,e.i(363732).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",()=>t],367859)},580873,e=>{"use strict";let t=(0,e.i(363732).default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);e.s(["Clock",()=>t],580873)},203096,e=>{"use strict";let t=(0,e.i(363732).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",()=>t],203096)},629155,e=>{"use strict";let t=(0,e.i(363732).default)("hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);e.s(["Hash",()=>t],629155)},878001,507193,493141,e=>{"use strict";var t=e.i(363732);let r=(0,t.default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);e.s(["ArrowDown",()=>r],878001);let a=(0,t.default)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);e.s(["ArrowUp",()=>a],507193);let n=(0,t.default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",()=>n],493141)}]);
@@ -1,16 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,640481,e=>{"use strict";let t=(0,e.i(363732).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",()=>t],640481)},794731,e=>{"use strict";let t=(0,e.i(363732).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",()=>t],794731)},558201,e=>{"use strict";let t=(0,e.i(363732).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",()=>t],558201)},66386,e=>{"use strict";var t=e.i(935851),r=e.i(506420);function a(e){return"string"!=typeof e?null:e.trim()||null}function n(e,t){return(e.get(t)?.trim()??"")||null}function s(){let e=(0,r.useRouter)(),s=(0,r.usePathname)(),i=(0,r.useSearchParams)(),l=(0,t.useCallback)(e=>n(i,e),[i]),c=(0,t.useCallback)((e,t)=>(function(e,t,r){let s=function(e,t){let r={...t},s=e=>Object.prototype.hasOwnProperty.call(t,e);if(s("issue")&&!s("run")){let s=n(e,"issue");a(t.issue)!==s&&(r.run=null)}if(s("job")&&!s("run")){let s=n(e,"job");a(t.job)!==s&&(r.run=null)}if(s("open")&&!s("message")){let s=n(e,"open");a(t.open)!==s&&(r.message=null)}if(s("group")&&!s("issue")){let s=n(e,"group");a(t.group)!==s&&(r.issue=null,r.run=null)}if(s("issue")&&!s("group")){let s=n(e,"issue");a(t.issue)!==s&&(r.group=null)}return r}(t,r),i=new URLSearchParams(t.toString());for(let[e,t]of Object.entries(s)){let r=a(t);r?i.set(e,r):i.delete(e)}let l=i.toString();return l?`${e}?${l}`:e})(t??s,i,e),[s,i]),o=(0,t.useCallback)((t,r)=>{e.push(c(t,r))},[c,e]),u=(0,t.useCallback)((t,r)=>{e.replace(c(t,r))},[c,e]);return{pathname:s,searchParams:i,getSelection:l,buildHref:c,pushSelection:o,replaceSelection:u}}e.s(["useUrlSelection",()=>s])},580873,e=>{"use strict";let t=(0,e.i(363732).default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);e.s(["Clock",()=>t],580873)},203096,e=>{"use strict";let t=(0,e.i(363732).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",()=>t],203096)},990933,e=>{"use strict";function t(e){if("string"==typeof e)return e.trim()||void 0}function r(e,r){let a=new Set,n=new Set;!function e(t,r){if(t)for(let a of t)r(a),e(a.content,r)}(e.content,e=>{if("participantMention"!==e.type)return;let t=e.attrs??{},r="string"==typeof t.id?t.id.trim():"",s="string"==typeof t.kind?t.kind:"agent";r&&"agent"===s&&(a.add(r),"parallel"===t.mode&&n.add(r))});let s=t(r);return{...s?{pinnedParticipantId:s}:{},mentionedParticipantIds:Array.from(a),parallelParticipantIds:Array.from(n)}}function a(e,r){let a=function(e){if(!Array.isArray(e))return[];let t=new Set,r=[];for(let a of e){if("string"!=typeof a)continue;let e=a.trim();!e||t.has(e)||(t.add(e),r.push(e))}return r}(e),n=t(r);return n&&a.includes(n)?[n,...a.filter(e=>e!==n)]:a}e.s(["extractComposerRouting",()=>r,"orderParticipantIds",()=>a])},945028,490011,352687,e=>{"use strict";var t=e.i(935851);function r(e){return`threadId=${encodeURIComponent(e)}`}function a(e){return`workspaceId=${encodeURIComponent(e)}`}function n(e){let[n,s]=(0,t.useState)([]),[i,l]=(0,t.useState)([]),[c,o]=(0,t.useState)([]),u=(0,t.useRef)(e),d=(0,t.useRef)(e);u.current=e,d.current!==e&&(d.current=e,s([]),l([]),o([]));let p=(0,t.useCallback)(async e=>{let t=e?.trim()||u.current?.trim();if(!t){s([]),l([]);return}let n=r(t);try{let[e,r]=await Promise.all([fetch(`/api/history?${n}`),fetch(`/api/logs?${a(t)}`)]);if(u.current!==t)return;e.ok&&s(await e.json()),r.ok&&l(await r.json())}catch{}},[]),h=(0,t.useCallback)(async e=>{let t=e?.trim()||u.current?.trim();if(!t){s([]),l([]);return}let n=r(t);await Promise.all([fetch(`/api/history?${n}`,{method:"DELETE"}),fetch(`/api/logs?${a(t)}`,{method:"DELETE"})]),u.current===t&&(s([]),l([]))},[]),f=(0,t.useCallback)(async(e,t=10,r,a,n,i,l,c,d,p)=>{let h=r?.trim()||u.current?.trim();if(!h)return;let f=Date.now(),m=crypto.randomUUID(),g={id:m,role:"user",participantId:null,content:e,timestamp:f,rootMessageId:a||null,parentMessageId:a||null,depth:+!!a,...i&&i.length>0?{attachments:i}:{}};s(e=>[...e,g]);try{let r=await fetch("/api/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({threadId:h,prompt:e,promptPrefix:d||void 0,maxRounds:t,userMessageId:m,rootMessageId:a||void 0,attachmentIds:n?.length?n:void 0,activeParticipantIds:Array.isArray(l)?l:void 0,projectSlug:c?.trim()||void 0,routing:p})}),i=await r.json().catch(e=>(console.warn("[useGroupChat] failed to parse run response:",e),null));r.ok&&i?.chatRunId?o(e=>[{chatRunId:i.chatRunId,threadId:h,rootMessageId:a||m,status:"queued",optimistic:!0,enqueuedAt:Date.now()},...e.filter(e=>e.chatRunId!==i.chatRunId)]):r.ok||(console.error(`[useGroupChat] POST /api/chat failed (${r.status}):`,i?.error||r.statusText),s(e=>e.map(e=>e.id===m?{...e,sendFailed:!0}:e)))}catch(e){console.error("[useGroupChat] network error sending message:",e),s(e=>e.map(e=>e.id===m?{...e,sendFailed:!0}:e))}return m},[]),m=(0,t.useCallback)(async()=>{let e=u.current?.trim();if(e)try{await fetch(`/api/processes?workspaceId=${encodeURIComponent(e)}`,{method:"DELETE"})}catch{}},[]),g=(0,t.useCallback)(async e=>{let t=u.current?.trim();if(t)try{await fetch(`/api/processes?workspaceId=${encodeURIComponent(t)}&threadId=${encodeURIComponent(e)}`,{method:"DELETE"})}catch{}},[]);return{messages:n,setMessages:s,logs:i,sendMessage:f,loadHistory:p,clearHistory:h,clearLogs:(0,t.useCallback)(async e=>{let t=e?.trim()||u.current?.trim();t?(await fetch(`/api/logs?${a(t)}`,{method:"DELETE"}).catch(e=>console.warn("[useGroupChat] delete logs failed:",e)),u.current===t&&l([])):l([])},[]),chatRuns:c,setChatRuns:o,stop:m,stopThread:g}}e.s(["useGroupChat",()=>n],945028);let s=new Set(["spawning","running"]);function i(e,r){let a=r?.intervalMs??1500,n=r?.idleIntervalMs??1e4,[i,l]=(0,t.useState)(new Set),[c,o]=(0,t.useState)([]),[u,d]=(0,t.useState)({}),[p,h]=(0,t.useState)([]),f=(0,t.useRef)(e);f.current=e,(0,t.useRef)(r?.messages??[]).current=r?.messages??[];let m=(0,t.useRef)(r?.setMessages);m.current=r?.setMessages;let g=(0,t.useRef)(0),I=(0,t.useRef)(new Map),y=(0,t.useRef)(new Map);(0,t.useEffect)(()=>{let e=r?.messages??[];if(e.length>0){let t=Math.max(...e.map(e=>e.timestamp));t>g.current&&(g.current=t)}},[r?.messages]),(0,t.useEffect)(()=>()=>{for(let e of I.current.values())e.close();I.current.clear()},[]);let x=(0,t.useCallback)(async()=>{let e=f.current;if(!e){l(new Set),o([]),d({}),h([]);return}let t=null;if(e.threadId?t=`/api/processes?threadId=${encodeURIComponent(e.threadId)}`:e.workspaceId&&(t=`/api/processes?workspaceId=${encodeURIComponent(e.workspaceId)}`),!t){l(new Set),o([]),d({}),h([]);return}try{let a=e.workspaceId||e.threadId,n=a?`/api/history?threadId=${encodeURIComponent(a)}&since=${g.current}`:null,i=a?`/api/chat-runs?threadId=${encodeURIComponent(a)}&limit=20`:null,c=[fetch(t)];n&&c.push(fetch(n)),i&&c.push(fetch(i));let[u,d,p]=await Promise.all(c),I=f.current;if(I?.threadId!==e.threadId||I?.workspaceId!==e.workspaceId)return;if(u.ok){let e=await u.json();o(e);let t=new Set(e.filter(e=>s.has(e.state)).map(e=>e.agentId));l(t)}if(p?.ok){var r;let e=(r=await p.json(),Array.isArray(r)?r.map(e=>{if(!e||"object"!=typeof e)return null;let t="string"==typeof e.chatRunId?e.chatRunId:"string"==typeof e.id?e.id:null,r="string"==typeof e.threadId?e.threadId:null,a="string"==typeof e.status?e.status:null,n="string"==typeof e.rootMessageId?e.rootMessageId:(e.rootMessageId,null);return t&&r&&a&&("queued"===a||"running"===a||"awaiting_user"===a||"blocked"===a||"completed"===a||"failed"===a||"cancelled"===a)?{chatRunId:t,threadId:r,rootMessageId:n,status:a,optimistic:!1}:null}).filter(e=>!!e):[]);h(e)}if(d?.ok&&m.current){let e=await d.json();if(e.length>0){let t=Math.max(...e.map(e=>e.timestamp));t>g.current&&(g.current=t),m.current(t=>{let r=new Set(t.map(e=>e.id)),a=e.filter(e=>!r.has(e.id)),n=t.map(t=>e.find(e=>e.id===t.id)??t);return 0===a.length?n:[...n,...a].sort((e,t)=>e.timestamp-t.timestamp)})}}}catch{}},[]);(0,t.useEffect)(()=>{let e=p.filter(e=>"queued"===e.status||"running"===e.status),t=new Set(e.map(e=>e.chatRunId));for(let[e,r]of I.current.entries())t.has(e)||(r.close(),I.current.delete(e),y.current.delete(e));for(let t of e){if(I.current.has(t.chatRunId))continue;let e=new EventSource(`/api/chat-runs/${encodeURIComponent(t.chatRunId)}/events`);I.current.set(t.chatRunId,e);let r=new Map;y.current.set(t.chatRunId,r);let a=new Set;e.addEventListener("chat",n=>{let s;try{s=JSON.parse(n.data)}catch{return}switch(s.type){case"participant-start":case"participant-thinking":a.add(s.participantId),r.has(s.participantId)||r.set(s.participantId,{text:"",thoughts:[]}),d(e=>e[s.participantId]?e:{...e,[s.participantId]:{content:"",rootMessageId:t.rootMessageId??null}});break;case"text-delta":{r.has(s.participantId)||r.set(s.participantId,{text:"",thoughts:[]});let e=r.get(s.participantId);e&&(e.text+=s.delta,d(r=>{let a={...r},n=t.rootMessageId??null;return a[s.participantId]={content:e.text,rootMessageId:n},a}));break}case"participant-thought":{let e=r.get(s.participantId);e&&(e.thoughts.push(s.content),d(t=>{let r=t[s.participantId];return r?{...t,[s.participantId]:{...r,thoughts:[...e.thoughts]}}:t}));break}case"participant-end":a.delete(s.participantId),x().then(()=>{d(e=>{let t={...e};return delete t[s.participantId],t})});break;case"participant-error":a.delete(s.participantId),x().then(()=>{d(e=>{let t={...e};return delete t[s.participantId],t})});break;case"done":e.close(),I.current.delete(t.chatRunId),y.current.delete(t.chatRunId)}}),e.onerror=()=>{e.close(),I.current.delete(t.chatRunId),y.current.delete(t.chatRunId)}}},[p]);let k=e?.threadId||e?.workspaceId||null,v=p.some(e=>"queued"===e.status||"running"===e.status),b=c.some(e=>s.has(e.state)),w=v||b?a:n;return(0,t.useEffect)(()=>{if(!k){l(new Set),o([]),d({}),h([]);return}x();let e=setInterval(x,w);return()=>clearInterval(e)},[k,w,x]),{activeAgents:i,processes:c,streaming:u,chatRuns:p,poll:x}}e.s(["useProcessPolling",()=>i],490011);var l=e.i(762281);function c({isOpen:e,title:r,message:a,preview:n,confirmLabel:s="Confirm",cancelLabel:i="Cancel",variant:c="default",onConfirm:o,onCancel:u}){let d=(0,t.useRef)(null),p=(0,t.useRef)(null);(0,t.useEffect)(()=>{if(e){let e=setTimeout(()=>d.current?.focus(),50);return()=>clearTimeout(e)}},[e]);let h=(0,t.useCallback)(e=>{"Escape"===e.key&&u()},[u]);if(!e)return null;let f="danger"===c;return(0,l.jsxs)("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/50 backdrop-blur-md",style:{animation:"confirm-overlay-in 200ms ease-out"},onClick:e=>e.target===e.currentTarget&&u(),onKeyDown:h,children:[(0,l.jsxs)("div",{ref:p,className:"w-full max-w-md mx-4 bg-[var(--card-bg)] rounded-2xl border border-[var(--card-border)] shadow-2xl overflow-hidden",style:{animation:"confirm-dialog-in 250ms cubic-bezier(0.34, 1.56, 0.64, 1)"},children:[(0,l.jsx)("div",{className:"px-6 pt-6 pb-3",children:(0,l.jsxs)("div",{className:"flex items-start gap-4",children:[f&&(0,l.jsx)("div",{className:"flex-shrink-0 w-11 h-11 rounded-full bg-red-500/10 border border-red-500/20 flex items-center justify-center",children:(0,l.jsx)("svg",{className:"w-5 h-5 text-red-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0"})})}),(0,l.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,l.jsx)("h3",{className:"text-[15px] font-semibold text-[var(--foreground)]",children:r}),(0,l.jsx)("p",{className:"mt-1 text-[13px] text-[var(--muted-foreground)] leading-relaxed",children:a})]})]})}),n&&(0,l.jsx)("div",{className:"mx-6 mb-3 px-3 py-2.5 rounded-lg bg-[var(--muted)]/40 border border-[var(--card-border)]",children:(0,l.jsxs)("p",{className:"text-[12px] text-[var(--muted-foreground)] line-clamp-3 leading-relaxed italic",children:["“",n,"”"]})}),(0,l.jsx)("div",{className:"mx-6 border-t border-[var(--card-border)]"}),(0,l.jsxs)("div",{className:"px-6 py-4 flex items-center justify-end gap-2.5",children:[(0,l.jsx)("button",{onClick:u,className:"px-4 py-2 rounded-lg text-[13px] font-medium text-[var(--muted-foreground)] hover:text-[var(--foreground)] hover:bg-[var(--muted)]/60 transition-all duration-150",children:i}),(0,l.jsx)("button",{ref:d,onClick:o,className:`px-4 py-2 rounded-lg text-[13px] font-medium transition-all duration-150 ${f?"bg-red-500 text-white hover:bg-red-600 active:scale-[0.97]":"btn-primary active:scale-[0.97]"}`,children:s})]})]}),(0,l.jsx)("style",{children:`
2
- @keyframes confirm-overlay-in {
3
- from { opacity: 0; }
4
- to { opacity: 1; }
5
- }
6
- @keyframes confirm-dialog-in {
7
- from {
8
- opacity: 0;
9
- transform: scale(0.9) translateY(10px);
10
- }
11
- to {
12
- opacity: 1;
13
- transform: scale(1) translateY(0);
14
- }
15
- }
16
- `})]})}e.s(["default",()=>c],352687)},544832,e=>{"use strict";var t=e.i(762281),r=e.i(935851),a=e.i(524123),n=e.i(827430);function s({params:e}){let{slug:s}=(0,r.use)(e),{projects:i,isLoading:l}=(0,a.useProjects)(),c=i.find(e=>e.slug===s);return l?(0,t.jsx)("div",{className:"px-6 py-6 text-sm text-[var(--muted-foreground)]",children:"Loading automations..."}):c?(0,t.jsx)(n.default,{projectId:c.id,requireProjectId:!0}):(0,t.jsx)("div",{className:"px-6 py-6 text-sm text-[var(--muted-foreground)]",children:"Project not found."})}e.s(["default",()=>s])},501223,e=>{e.v(t=>Promise.all(["static/chunks/d5607ac80145f3b7.js","static/chunks/42a62b80b32a97f7.js","static/chunks/94f26a112344ab1b.css"].map(t=>e.l(t))).then(()=>t(844118)))},469612,e=>{e.v(t=>Promise.all(["static/chunks/256961ed1522219b.js"].map(t=>e.l(t))).then(()=>t(668610)))}]);