@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,5 +1,5 @@
1
- module.exports=[739515,a=>{"use strict";var b=a.i(308316),c=a.i(850985),d=a.i(516909),e=a.i(786220),f=a.i(599086),g=a.i(285320),h=a.i(549429),i=a.i(831709);let j=(0,i.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 k=a.i(627421),l=a.i(820859),m=a.i(552605),n=a.i(667597),o=a.i(353532),p=a.i(542341),q=a.i(697183),r=a.i(252197),s=a.i(985339),t=a.i(724938),u=a.i(824179),v=a.i(830284),w=a.i(155829),x=a.i(496368),y=a.i(689882),z=a.i(86007),A=a.i(8e4),B=a.i(86466),C=a.i(766412);let D=(0,i.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 E=a.i(73948),F=a.i(999076),G=a.i(296037),H=a.i(736303),I=a.i(393041),J=a.i(734709),K=a.i(201485);function L(a){let b=a.cadence||a.cronExpr;return b?(0,H.cronToHuman)(a.cronExpr||b)??b:"No frequency"}function M(a){return"active"===a.state&&(null!==a.nextRunAt&&a.nextRunAt-Date.now()<0?!a.lastRunAt||!(a.lastRunAt>=a.nextRunAt):!!a.prevScheduledAt&&!!a.lastRunAt&&a.lastRunAt>a.prevScheduledAt+3e5)}function N(a,b){if("paused"===b)return"Paused";if("stopped"===b)return"Stopped";if(null===a)return"Pending";let c=a-Date.now();return c<0?"Overdue":c<6e4?`in ${Math.round(c/1e3)}s`:c<36e5?`in ${Math.round(c/6e4)}m`:c<864e5?`in ${Math.round(c/36e5)}h`:`in ${Math.round(c/864e5)}d`}function O(a){return new Date(a).toLocaleString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function P({job:a,onClose:c,onUpdate:d}){let[f,g]=(0,e.useState)({cadence:a.cronExpr||a.cadence||"",condition:a.condition||""}),[h,i]=(0,e.useState)(!0),[j,k]=(0,e.useState)(!1),m=async()=>{h&&(k(!0),await d({cadence:f.cadence,condition:f.condition}),k(!1),c())};return(0,b.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 px-4 py-6",children:(0,b.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,b.jsxs)("div",{className:"flex shrink-0 items-center justify-between border-b border-[var(--border)] px-6 py-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,b.jsx)(l.Clock,{className:"h-4 w-4 text-[var(--muted-foreground)]"}),(0,b.jsx)("p",{className:"text-sm font-semibold text-[var(--foreground)]",children:a.name})]}),(0,b.jsx)("button",{type:"button",onClick:c,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,b.jsx)(u.X,{className:"h-4 w-4"})})]}),(0,b.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto px-6 py-5",children:(0,b.jsx)(K.ScheduleConditionPicker,{value:f,onChange:(a,b)=>{g(a),i(b.isScheduleValid)},scheduleLabel:"Schedule",conditionLabel:"Condition",conditionHelpText:"Scheduled runs and Run now will check this condition before executing."})}),(0,b.jsxs)("div",{className:"flex shrink-0 items-center justify-end gap-3 border-t border-[var(--border)] px-6 py-4",children:[(0,b.jsx)("button",{type:"button",onClick:c,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,b.jsx)("button",{type:"button",onClick:()=>void m(),disabled:j||!h,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:j?"Saving...":"Save"})]})]})})}function Q({job:a,onClose:c,onUpdate:d}){let[f,g]=(0,e.useState)(a.prompt||""),[h,i]=(0,e.useState)(!1),j=async()=>{f===a.prompt||(i(!0),await d({prompt:f}),i(!1)),c()};return(0,b.jsx)("div",{className:"fixed inset-0 z-40 flex items-center justify-center bg-black/50 px-4 py-6",children:(0,b.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,b.jsxs)("div",{className:"flex shrink-0 items-start justify-between gap-4 border-b border-[var(--border)] px-6 py-5",children:[(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-2.5",children:[(0,b.jsx)("p",{className:"truncate text-lg font-semibold text-[var(--foreground)]",children:a.name}),(0,b.jsx)("span",{className:`rounded-full border px-2 py-0.5 text-[10px] font-semibold uppercase tracking-[0.16em] ${S(a.state)}`,children:R(a.state)}),a.condition?(0,b.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,b.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-3 text-xs text-[var(--muted-foreground)]",children:[(0,b.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,b.jsx)(l.Clock,{className:"h-3.5 w-3.5"}),L(a)]}),(0,b.jsxs)("span",{children:["Next run ",N(a.nextRunAt,a.state)]}),(0,b.jsxs)("span",{children:["Updated ",O(a.updatedAt)]})]})]}),(0,b.jsx)("button",{type:"button",onClick:c,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,b.jsx)(u.X,{className:"h-4 w-4"})})]}),(0,b.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto px-6 py-6 space-y-5",children:(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"mb-2 text-xs font-semibold uppercase tracking-[0.18em] text-[var(--muted-foreground)]",children:"Instructions"}),(0,b.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,b.jsx)(B.default,{content:f,editable:!0,onChange:g,placeholder:"Write instructions in markdown…"})})]})}),(0,b.jsxs)("div",{className:"flex shrink-0 items-center justify-end gap-3 border-t border-[var(--border)] px-6 py-4",children:[(0,b.jsx)("button",{type:"button",onClick:c,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,b.jsx)("button",{type:"button",onClick:()=>void j(),disabled:h,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:h?"Saving...":"Save"})]})]})})}function R(a){return"active"===a?"Active":"paused"===a?"Paused":"Stopped"}function S(a){return"active"===a?"border-[var(--status-completed-border)] bg-[var(--status-completed-bg)] text-[var(--status-completed)]":"paused"===a?"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 T({projectId:a,objectiveId:c,objectiveKey:d,createDefaults:f,onCreateTask:g}){let{jobs:h,loading:i,refresh:j,deleteJob:m,toggleJob:n,updateJob:p,fetchRuns:r,runNow:s}=(0,G.usePromptJobs)(a,{requireProjectId:!0,includeObjectiveJobs:!0,objectiveId:c}),[t,u]=(0,e.useState)(!1),[v,w]=(0,e.useState)(null),[x,y]=(0,e.useState)(null),[z,A]=(0,e.useState)(null),[B,C]=(0,e.useState)(null),[H,K]=(0,e.useState)(null),[T,U]=(0,e.useState)([]),V=(0,e.useMemo)(()=>h.filter(a=>a.objectiveId===c).sort((a,b)=>!a.name.toLowerCase().includes("objective worker")-!b.name.toLowerCase().includes("objective worker")),[h,c]),W=(0,e.useMemo)(()=>V.find(a=>a.id===z)??null,[z,V]),X=(0,e.useCallback)(async()=>{if(0===V.length)return void U([]);let a=[];await Promise.all(V.map(async b=>{for(let c of(await r(b.id)))a.push({...c,jobName:b.name})})),a.sort((a,b)=>new Date(b.startedAt??b.createdAt).getTime()-new Date(a.startedAt??a.createdAt).getTime()),U(a.slice(0,10))},[V,r]);(0,e.useEffect)(()=>{X()},[X]);let Y=async a=>{w(a.id),y(null);let b=await m(a.id);(w(null),b)?(z===a.id&&A(null),await j()):y(`Failed to hide "${a.name}".`)},Z=async a=>{y(null);let b=await g(a);return b&&await j(),b},$=(0,e.useMemo)(()=>V.find(a=>a.id===H)??null,[H,V]);return(0,b.jsxs)(b.Fragment,{children:[t?(0,b.jsx)(I.CreateJobModal,{onClose:()=>u(!1),onSubmit:async a=>{await Z(a)},createDefaults:f,contextLabel:d}):null,W?(0,b.jsx)(Q,{job:W,onClose:()=>A(null),onUpdate:async a=>{let b=await p(W.id,a);return b&&await j(),b}}):null,$?(0,b.jsx)(P,{job:$,onClose:()=>K(null),onUpdate:async a=>{let b=await p($.id,a);return b&&await j(),b}}):null,(0,b.jsxs)("div",{className:"px-1",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-semibold text-[var(--foreground)]",children:"Scheduled Jobs"}),(0,b.jsxs)("p",{className:"mt-1 text-sm text-[var(--muted-foreground)]",children:["Shared scheduled-task list filtered to objective label"," ",(0,b.jsx)("span",{className:"font-mono text-[var(--foreground)]",children:d}),"."]})]}),(0,b.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:(0,b.jsxs)("button",{type:"button",onClick:()=>u(!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,b.jsx)(o.Plus,{className:"h-4 w-4"}),"New task"]})})]}),x?(0,b.jsx)("p",{className:"mt-4 text-sm text-[var(--destructive)]",children:x}):null,(0,b.jsx)("div",{className:"mt-5 space-y-3",children:i&&0===V.length?(0,b.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===V.length?(0,b.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."}):V.map(a=>(0,b.jsx)("div",{onClick:()=>A(a.id),onKeyDown:b=>{("Enter"===b.key||" "===b.key)&&(b.preventDefault(),A(a.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)] ${M(a)?"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,b.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-2.5",children:[(0,b.jsx)("span",{className:`inline-block size-2 shrink-0 rounded-full ${"active"===a.state?"bg-emerald-400":"paused"===a.state?"bg-amber-400":"bg-[var(--tone-neutral)]"}`}),(0,b.jsx)("p",{className:"truncate text-sm font-semibold text-[var(--foreground)]",children:a.name}),(0,b.jsx)("span",{className:`rounded-full border px-2 py-0.5 text-[10px] font-semibold uppercase tracking-[0.16em] ${S(a.state)}`,children:R(a.state)}),M(a)&&(0,b.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,b.jsx)(l.Clock,{className:"h-3 w-3"}),"overdue"]})]}),(0,b.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-3 text-xs text-[var(--muted-foreground)]",children:[(0,b.jsxs)("span",{className:`inline-flex items-center gap-1.5 ${M(a)?"text-amber-400 font-medium":""}`,children:[(0,b.jsx)(l.Clock,{className:"h-3.5 w-3.5"}),"Next run ",N(a.nextRunAt,a.state)]}),(0,b.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,b.jsx)(l.Clock,{className:"h-3.5 w-3.5"}),L(a)]}),a.condition?(0,b.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,b.jsx)("p",{className:"mt-3 line-clamp-2 text-sm leading-6 text-[var(--muted-foreground)]",children:a.prompt.split("\n").map(a=>a.trim()).find(Boolean)||"No instructions yet"}),a.condition?(0,b.jsxs)("p",{className:"mt-2 text-xs text-[var(--muted-foreground)]",children:["Condition: ",a.condition]}):null]}),(0,b.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",children:[(0,b.jsx)("button",{type:"button",title:"Run now",onClick:async b=>{b.stopPropagation(),w(a.id),await s(a.id),w(null),await j(),await X()},disabled:v===a.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,b.jsx)(E.Play,{className:"h-3.5 w-3.5 fill-current"})}),(0,b.jsx)("button",{type:"button",title:"Edit schedule",onClick:b=>{b.stopPropagation(),K(a.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,b.jsx)(l.Clock,{className:"h-3.5 w-3.5"})}),(0,b.jsx)("button",{type:"button",title:"active"===a.state?"Pause":"Resume",onClick:async b=>{b.stopPropagation(),w(a.id),await n(a),w(null)},disabled:v===a.id,className:`rounded-lg border p-2 transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${"active"===a.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"===a.state?(0,b.jsx)(D,{className:"h-3.5 w-3.5"}):(0,b.jsx)(E.Play,{className:"h-3.5 w-3.5 fill-current"})}),(0,b.jsx)("button",{type:"button",title:"Delete",onClick:b=>{b.stopPropagation(),C(a)},disabled:v===a.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,b.jsx)(q.Trash2,{className:"h-3.5 w-3.5"})})]})]})},a.id))}),T.length>0&&(0,b.jsxs)("div",{className:"mt-8",children:[(0,b.jsx)("p",{className:"text-[11px] font-medium uppercase tracking-[0.18em] text-[var(--muted-foreground)] mb-3",children:"Recent executions"}),(0,b.jsx)("div",{className:"space-y-0.5",children:T.map(a=>{let c=a.startedAt??a.createdAt,d="success"===a.status,e="failed"===a.status,f="running"===a.status;return(0,b.jsxs)("div",{className:"py-2 px-2 rounded-md text-xs",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)("span",{className:`flex size-5 shrink-0 items-center justify-center rounded-full border ${d?"border-emerald-500/40 text-emerald-400":e?"border-[var(--status-failed-border)] text-[var(--destructive)]":f?"border-sky-500/40 text-sky-400":"border-[var(--border)] text-[var(--muted-foreground)]"}`,children:d?(0,b.jsx)(k.Check,{className:"h-3 w-3"}):e?(0,b.jsx)(F.XCircle,{className:"h-3 w-3"}):(0,b.jsx)("span",{className:`block size-1.5 rounded-full ${f?"bg-sky-400 animate-pulse":"bg-current"}`})}),(0,b.jsx)("span",{className:"truncate text-[var(--muted-foreground)]",children:a.jobName}),(0,b.jsx)("span",{className:"ml-auto shrink-0 text-[11px] text-[var(--muted-foreground)]",children:O(c)}),null!=a.durationMs&&(0,b.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-[var(--muted-foreground)]",children:a.durationMs<1e3?`${a.durationMs}ms`:`${Math.round(a.durationMs/1e3)}s`})]}),e&&a.error&&(0,b.jsxs)("p",{className:"mt-1 ml-8 text-[11px] leading-snug text-[var(--destructive)] opacity-80 line-clamp-2",children:[a.error,null!=a.exitCode&&` (exit ${a.exitCode})`]}),e&&a.logs&&(0,b.jsxs)("details",{className:"mt-1 ml-8 group",children:[(0,b.jsx)("summary",{className:"cursor-pointer text-[10px] text-[var(--muted-foreground)] hover:text-[var(--foreground)] select-none",children:"Show tail logs"}),(0,b.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:a.logs})]})]},a.id)})})]})]}),(0,b.jsx)(J.default,{isOpen:!!B,title:"Delete scheduled task?",message:"This permanently removes the task and all its run history. This cannot be undone.",preview:B?.name,confirmLabel:"Delete",variant:"danger",onConfirm:()=>{B&&Y(B),C(null)},onCancel:()=>C(null)})]})}var U=a.i(811760),V=a.i(756490);let W=(0,i.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)]"}},Y=["metric-check","status-update","milestone","note"];function Z({activity:a}){let[c,d]=(0,e.useState)(!1),f=X[a.type]??X.note,g=a.body.length>200;return(0,b.jsxs)("div",{className:"relative pl-6 pb-6 last:pb-0",children:[(0,b.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,b.jsx)("div",{className:"absolute bottom-0 left-[5px] top-4 w-px bg-[var(--timeline-track)] last:hidden"}),(0,b.jsxs)("div",{className:"mb-1.5 flex items-center gap-2",children:[(0,b.jsx)("span",{className:`rounded-full border px-2 py-0.5 text-[10px] font-semibold uppercase tracking-[0.14em] ${f.className}`,children:f.label}),(0,b.jsx)("span",{className:"text-[11px] text-[var(--muted-foreground)]",children:function(a){let b=Date.now(),c=Date.parse(a);if(Number.isNaN(c))return a;let d=Math.floor((b-c)/6e4);if(d<1)return"just now";if(d<60)return`${d}m ago`;let e=Math.floor(d/60);if(e<24)return`${e}h ago`;let f=Math.floor(e/24);return f<30?`${f}d ago`:new Date(c).toLocaleDateString("en-US",{month:"short",day:"numeric",year:f>365?"numeric":void 0})}(a.createdAt)}),"manual"!==a.source&&(0,b.jsx)("span",{className:"max-w-[180px] truncate font-mono text-[11px] text-[var(--app-shell-soft-text)]",children:a.source})]}),c?(0,b.jsx)("div",{className:"prose prose-sm max-w-none text-sm text-[var(--foreground)] prose-neutral dark:prose-invert",children:(0,b.jsx)(z.Markdown,{content:a.body})}):(0,b.jsx)("div",{className:`text-sm leading-relaxed text-[var(--muted-foreground)] ${g?"max-h-24 overflow-hidden [mask-image:linear-gradient(to_bottom,black_72%,transparent)]":""}`,children:(0,b.jsx)(z.Markdown,{content:a.body})}),g&&(0,b.jsxs)("button",{type:"button",onClick:()=>d(!c),className:"mt-1.5 flex items-center gap-1 text-xs text-[var(--muted-foreground)] transition-colors hover:text-[var(--foreground)]",children:[c?(0,b.jsx)(U.ChevronDown,{size:12}):(0,b.jsx)(V.ChevronRight,{size:12}),c?"Show less":"Show more"]})]})}function $({projectId:a,objectiveId:c,onCreated:d,onCancel:f}){let[g,h]=(0,e.useState)("note"),[i,j]=(0,e.useState)(""),[k,l]=(0,e.useState)(!1),m=(0,e.useRef)(null);(0,e.useEffect)(()=>{m.current?.focus()},[]);let n=async()=>{let b=i.trim();if(b&&!k){l(!0);try{let e=await fetch(`/api/projects/${a}/objectives/${c}/activities`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:g,body:b})});if(!e.ok)throw Error("Failed to create activity");let f=await e.json();d(f)}catch(a){console.error("Failed to create activity:",a)}finally{l(!1)}}};return(0,b.jsxs)("div",{className:"mb-4 rounded-lg border border-[var(--border)] bg-[var(--overlay-panel-muted)] p-3",children:[(0,b.jsx)("div",{className:"mb-3 flex flex-wrap gap-1.5",children:Y.map(a=>{let c=X[a],d=g===a;return(0,b.jsx)("button",{type:"button",onClick:()=>h(a),className:`rounded-full border px-2.5 py-0.5 text-[10px] font-semibold uppercase tracking-[0.14em] transition-colors ${d?"border-[var(--foreground)] bg-[var(--foreground)] text-[var(--background)]":`${c.className} hover:opacity-80`}`,children:c.label},a)})}),(0,b.jsx)("textarea",{ref:m,value:i,onChange:a=>j(a.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,b.jsxs)("div",{className:"mt-2 flex items-center justify-end gap-2",children:[(0,b.jsx)("button",{type:"button",onClick:f,className:"px-3 py-1.5 text-xs text-[var(--muted-foreground)] transition-colors hover:text-[var(--foreground)]",children:"Cancel"}),(0,b.jsx)("button",{type:"button",onClick:n,disabled:!i.trim()||k,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:k?"Saving...":"Log activity"})]})]})}function _({projectId:a,objectiveId:c,onTotalChange:d}){let[f,g]=(0,e.useState)([]),[h,i]=(0,e.useState)(0),[j,k]=(0,e.useState)(!1),[l,m]=(0,e.useState)(1),[n,p]=(0,e.useState)(!0),[q,r]=(0,e.useState)("all"),[s,t]=(0,e.useState)(!1),[v,w]=(0,e.useState)(!1),x=(0,e.useCallback)(async(b,e,f)=>{p(!0);try{let h=new URLSearchParams({page:String(b),limit:"25"});"all"!==e&&h.set("type",e);let j=await fetch(`/api/projects/${a}/objectives/${c}/activities?${h}`);if(!j.ok)throw Error("Failed to load activities");let l=await j.json(),m=Array.isArray(l.activities)?l.activities:[],n="number"==typeof l.total?l.total:m.length,o=!!l.hasMore;g(a=>f?[...a,...m]:m),i(n),d?.(n),k(o)}catch(a){console.error("Failed to fetch activities:",a)}finally{p(!1)}},[a,c]);return(0,e.useEffect)(()=>{m(1),x(1,q,!1)},[x,q]),(0,b.jsxs)("section",{children:[(0,b.jsxs)("div",{className:"mb-3 flex items-center justify-between",children:[(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"Time-ordered log of outputs from scheduled tasks and manual entries."}),(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsxs)("button",{type:"button",onClick:()=>w(!v),className:`flex items-center gap-1 px-2.5 py-1 rounded-md text-xs font-medium transition-colors ${v?"text-sky-400 bg-sky-500/10":"text-[var(--muted-foreground)] hover:bg-[var(--muted)] hover:text-[var(--foreground)]"}`,children:[v?(0,b.jsx)(u.X,{size:12}):(0,b.jsx)(o.Plus,{size:12}),"Log activity"]}),(0,b.jsx)("button",{type:"button",onClick:()=>t(!s),className:`p-1.5 rounded-md transition-colors ${s||"all"!==q?"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,b.jsx)(W,{size:14})})]})]}),s&&(0,b.jsxs)("div",{className:"flex flex-wrap gap-1.5 mb-4",children:[(0,b.jsx)("button",{type:"button",onClick:()=>r("all"),className:`rounded-full border px-2.5 py-0.5 text-[10px] font-semibold uppercase tracking-[0.14em] transition-colors ${"all"===q?"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"}),Y.map(a=>{let c=X[a],d=q===a;return(0,b.jsx)("button",{type:"button",onClick:()=>r(a),className:`rounded-full border px-2.5 py-0.5 text-[10px] font-semibold uppercase tracking-[0.14em] transition-colors ${d?"border-[var(--foreground)] bg-[var(--foreground)] text-[var(--background)]":`${c.className} hover:opacity-80`}`,children:c.label},a)})]}),v&&(0,b.jsx)($,{projectId:a,objectiveId:c,onCreated:a=>{g(b=>[a,...b]),i(a=>{let b=a+1;return d?.(b),b}),w(!1)},onCancel:()=>w(!1)}),n&&0===f.length?(0,b.jsx)("div",{className:"py-6 text-center text-sm text-[var(--muted-foreground)]",children:"Loading activities..."}):0===f.length?(0,b.jsxs)("div",{className:"rounded-xl border border-dashed border-[var(--border)] bg-[var(--overlay-panel-muted)] p-6 text-center",children:[(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"No activities yet."}),(0,b.jsx)("p",{className:"mt-1 text-xs text-[var(--app-shell-soft-text)]",children:"Activities are created by scheduled tasks and agent actions."})]}):(0,b.jsxs)("div",{children:[f.map(a=>(0,b.jsx)(Z,{activity:a},a.id)),j&&(0,b.jsx)("div",{className:"pt-2 pl-6",children:(0,b.jsx)("button",{type:"button",onClick:()=>{let a=l+1;m(a),x(a,q,!0)},disabled:n,className:"text-xs text-sky-400 hover:text-sky-300 transition-colors disabled:opacity-50",children:n?"Loading...":"Load more"})})]})]})}let aa=/(?:^|\n)Objective health:\s*(\d{1,3})%\s*(On track|At risk|Off track|Done)\b/im,ab={"on track":"on_track","at risk":"at_risk","off track":"off_track",done:"done"};function ac(a){return!!a&&"object"==typeof a&&!Array.isArray(a)}function ad(a){return"number"==typeof a&&Number.isFinite(a)?Math.max(0,Math.min(100,Math.round(a))):0}function ae(a){if("string"!=typeof a)return null;let b=a.trim().toLowerCase();return"on_track"===b||"at_risk"===b||"off_track"===b||"done"===b?b:ab[b]??null}function af(a){if("string"!=typeof a)return null;let b=Date.parse(a);return Number.isNaN(b)?null:new Date(b).toISOString()}function ag(a){return"string"==typeof a&&a.trim()?a.trim():void 0}function ah(...a){let b=a.flatMap(a=>a??[]),c=[];for(let a of[...b].sort((a,b)=>Date.parse(a.recordedAt)-Date.parse(b.recordedAt))){let b=c[c.length-1]??null;b&&b.progress===a.progress&&b.status===a.status&&(!b.source||!a.source||b.source===a.source)&&5e3>=Math.abs(Date.parse(a.recordedAt)-Date.parse(b.recordedAt))||c.push(a)}return c}let ai={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 aj(a){let{projectId:c,objectiveId:d,objectiveKey:f,metadata:g,currentProgress:h,currentStatus:i,objectiveUpdatedAt:j}=a,k=(0,e.useMemo)(()=>(function(a,b){if(!ac(a)||!b.trim())return[];let c=a.project_objective_health_history;if(!ac(c))return[];let d=c[b.trim()];return Array.isArray(d)?ah(d.map(a=>(function(a){if(!ac(a))return null;let b=ae(a.status),c=af(a.recordedAt);return b&&c?{progress:ad(a.progress),status:b,recordedAt:c,source:ag(a.source),note:ag(a.note),objectiveId:ag(a.objectiveId)??null,objectiveKey:ag(a.objectiveKey)??null}:null})(a)).filter(a=>!!a)):[]})(g,d),[g,d]),[l,m]=(0,e.useState)(k),n=(0,e.useMemo)(()=>({progress:h,status:i,recordedAt:j,objectiveId:d,objectiveKey:f}),[h,i,d,f,j]);(0,e.useEffect)(()=>{m(k)},[k]),(0,e.useEffect)(()=>{let a=!1;return async function(){try{let b=await fetch(`/api/projects/${c}/objectives/${d}/activities?type=status-update&limit=100`);if(!b.ok)throw Error("Failed to load objective activity history");let e=await b.json(),g=Array.isArray(e.activities)?e.activities:[],h=ah(k,ah(g.map(a=>(function(a){if("status-update"!==a.type)return null;let b=a.body.match(aa);if(!b)return null;let c=ad(Number(b[1])),d=ae(b[2]),e=af(a.createdAt);return d&&e?{progress:c,status:d,recordedAt:e,source:ag(a.source),objectiveKey:ag(a.objectiveLabel)??null}:null})(a)).filter(a=>!!a&&(!f||a.objectiveKey===f))));a||m(h)}catch{a||m(k)}}(),()=>{a=!0}},[k,d,f,c]);let[o,p]=(0,e.useState)(!1);(0,e.useEffect)(()=>{let a=requestAnimationFrame(()=>p(!0));return()=>cancelAnimationFrame(a)},[]);let q=ah(l,[n]),r=q[q.length-1],s=ai[r.status];return 0===l.length||1===q.length||q.length,(0,b.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,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-[10px] font-semibold uppercase tracking-[0.16em] text-[var(--muted-foreground)]",children:"Objective health"}),(0,b.jsxs)("div",{className:"mt-0.5 text-[20px] font-semibold leading-none text-[var(--foreground)]",children:[r.progress,"%"]}),(0,b.jsx)("div",{className:"mt-0.5 text-[10px] font-medium",style:{color:s.stroke},children:s.label})]}),(0,b.jsx)("div",{className:"h-[40px] w-[14px] overflow-hidden rounded-sm",style:{background:"var(--muted)"},role:"progressbar","aria-valuenow":r.progress,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Objective health",title:`${r.progress}%`,children:(0,b.jsx)("div",{className:"flex h-full flex-col justify-end",children:(0,b.jsx)("div",{className:"relative w-full overflow-hidden rounded-sm transition-[height] duration-700 ease-out",style:{height:o?`${r.progress}%`:"0%",backgroundColor:s.stroke},children:(0,b.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 ak=a.i(392045),al=a.i(529889),am=a.i(870630),an=a.i(427411),ao=a.i(837929),ap=a.i(769677);let aq={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 ar({onResize:a}){let{isTouchLayout:c}=(0,al.useInputCapabilities)();return c?null:(0,b.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:b=>{b.preventDefault();let c=b.clientX;document.body.style.cursor="col-resize",document.body.style.userSelect="none";let d=b=>{let d=c-b.clientX;c=b.clientX,a(d)},e=()=>{document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",e)};window.addEventListener("mousemove",d),window.addEventListener("mouseup",e)},children:(0,b.jsx)("div",{className:"absolute inset-y-0 -left-0.5 w-1 transition-colors group-hover:bg-[var(--primary)]/40"})})}function as(a){return new Date(a).toLocaleString([],{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function at(){return{title:"",teamId:"",summary:""}}function au(a){let{projects:b,isLoading:c,refetch:d,updateProject:f}=(0,v.useProjects)(),[g,h]=(0,e.useState)([]),i=(0,e.useMemo)(()=>b.find(b=>b.slug===a)??null,[a,b]),j=(0,e.useMemo)(()=>(0,ap.readProjectObjectivesWorkspace)(i?.metadata),[i?.metadata]),k=(0,e.useCallback)(async a=>{if(!i)throw Error("Project not found.");await f(i.id,{metadata:(0,ap.writeProjectObjectivesWorkspace)(i.metadata??{},a)})},[i,f]);return(0,e.useEffect)(()=>{let a=!0;return async function(){if(!i?.id)return h([]);try{let b=await fetch(`/api/projects/${i.id}/teams`);if(!b.ok)throw Error("Failed to fetch teams");let c=await b.json();if(!a)return;h((c.teams??[]).map(a=>({id:"string"==typeof a.id?a.id:"",name:"string"==typeof a.name?a.name:"Untitled team"})).filter(a=>a.id))}catch{if(!a)return;h([])}}(),()=>{a=!1}},[i?.id]),{isLoading:c,project:i,workspace:j,teams:g,persistWorkspace:k,refetchProject:d}}function av(a){return"user"===a.role&&!a.rootMessageId}function aw({projectId:a,projectSlug:c,objective:d,teamName:f,trackerConnections:i,availableTrackers:j,defaultTrackerType:k,onThreadLinked:l,onObjectiveUpdated:m}){let[n,o]=(0,e.useState)(()=>(0,an.loadObjectiveChatPanelWidth)()||800),[p,q]=(0,e.useState)(d.threadId??(d.id?`objective-chat:${d.id}`:null)),[s,t]=(0,e.useState)("list"),[u,v]=(0,e.useState)(null),[B,C]=(0,e.useState)(!1),[D,E]=(0,e.useState)(d.chatSessionVersion),[F,G]=(0,e.useState)([]),[H,I]=(0,e.useState)(null),J=(0,e.useRef)(!1),K=(0,e.useRef)(!1),{messages:L,setMessages:M,sendMessage:N,loadHistory:O,setChatRuns:P,stop:Q,chatRuns:R}=(0,w.useGroupChat)(p),{processes:S,streaming:T,chatRuns:U,poll:V}=(0,x.useProcessPolling)(p?{workspaceId:p}:null,{messages:L,setMessages:M});(0,e.useEffect)(()=>{d.threadId&&d.threadId!==p&&q(d.threadId)},[d.threadId,p]),(0,e.useEffect)(()=>{t("list"),v(null),C(!1),K.current=!1},[d.id]),(0,e.useEffect)(()=>{E(d.chatSessionVersion),d.chatSessionVersion>=ap.CURRENT_OBJECTIVE_CHAT_SESSION_VERSION&&(K.current=!0)},[d.chatSessionVersion]);let W=(0,e.useCallback)(async b=>{let c=b.trim();if(c&&!(await fetch(`/api/projects/${a}/threads`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({threadId:c})})).ok)throw Error("Failed to link objective chat to the project.")},[a]);(0,e.useEffect)(()=>{let a=!1;return p?(C(!1),(async()=>{await O(p),a||C(!0)})(),()=>{a=!0}):void C(!0)},[O,p]),(0,e.useEffect)(()=>{let b=!1;return async function(){try{let c=d.teamId?`/api/projects/${a}/teams/${d.teamId}/agents`:`/api/projects/${a}/agents`,[e,f]=await Promise.all([fetch("/api/participants"),fetch(c)]),g=e.ok?await e.json():[],h=Array.isArray(g)?g:[],i=f.ok?await f.json():{agents:[]};if(b)return;let j=((i&&"object"==typeof i?i:{agents:[]}).agents??[]).slice().sort((a,b)=>a.routing_order-b.routing_order).map(a=>a.agent_id);if(0===j.length)return void G(h);let k=new Map(h.map(a=>[a.id,a]));G(j.map(a=>k.get(a)).filter(a=>!!a))}catch(a){if(b)return;console.error("Failed to load objective chat participants",a),G([])}}(),()=>{b=!0}},[a,d.teamId]),(0,e.useEffect)(()=>{d.threadId&&W(d.threadId).catch(a=>{console.warn("Failed to re-link objective chat thread to project",a)})},[W,d.threadId]),(0,e.useEffect)(()=>{if(!d.threadId||!p||!B||D>=ap.CURRENT_OBJECTIVE_CHAT_SESSION_VERSION||K.current)return;K.current=!0;let b=function(a){let b=a.filter(av).sort((a,b)=>a.timestamp-b.timestamp);if(b.length<=1)return null;let c=b[0]?.id;if(!c)return null;let d=b.slice(1).map(a=>a.id),e=new Set(d);return{messages:[...a].map(a=>{let b=e.has(a.id)&&av(a),d="string"==typeof a.rootMessageId&&e.has(a.rootMessageId);return b||d?{...a,rootMessageId:c,parentMessageId:c,depth:1}:a}).sort((a,b)=>a.timestamp-b.timestamp),primaryRootMessageId:c,mergedRootMessageIds:d}}(L),c=!1;return(async()=>{I(null);try{if(b){if(!(await fetch("/api/history",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({threadId:p,messages:b.messages})})).ok)throw Error("Failed to migrate the objective chat history.");if(c)return;M(b.messages),v(a=>a&&b.mergedRootMessageIds.includes(a)?b.primaryRootMessageId:a)}if(!(await fetch(`/api/projects/${a}/objectives/${d.id}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({chatSessionVersion:ap.CURRENT_OBJECTIVE_CHAT_SESSION_VERSION})})).ok)throw Error("Failed to update the objective chat session version.");if(c)return;E(ap.CURRENT_OBJECTIVE_CHAT_SESSION_VERSION),m().catch(a=>{console.warn("Failed to refresh objective after objective chat migration",a)})}catch(a){if(c)return;console.warn("Failed to migrate legacy objective chat sessions",a),I(a instanceof Error?a.message:"Failed to migrate the objective chat history.")}})(),()=>{c=!0}},[D,B,L,d.id,d.threadId,m,a,M,p]);let X=(0,e.useCallback)(async()=>{if(d.threadId)return d.threadId;let b=p??(d.id?`objective-chat:${d.id}`:null);if(!b)return null;I(null);try{let e=await am.threadService.createThread({id:b,title:d.title,metadata:{scope:"objective",objectiveId:d.id,projectId:a,projectSlug:c}});return q(e.id),await W(e.id),await l(e.id),e.id}catch(a){return I(a instanceof Error?a.message:"Failed to create the objective chat."),null}},[W,d.id,d.threadId,d.title,l,a,c,p]),Y=(0,e.useMemo)(()=>new Map(F.map(a=>[a.id,a])),[F]);(0,e.useEffect)(()=>{P(a=>{let b=Date.now(),c=new Map(a.filter(a=>"string"==typeof a.chatRunId&&a.chatRunId.length>0).map(a=>[a.chatRunId,a]));for(let a of U)a?.chatRunId&&c.set(a.chatRunId,a);return Array.from(c.values()).filter(a=>!!(!a.optimistic||U.some(b=>b.chatRunId===a.chatRunId))||b-(a.enqueuedAt??0)<=5e3).sort((a,b)=>String(a.chatRunId||"").localeCompare(String(b.chatRunId||"")))})},[U,P]);let Z=(0,e.useMemo)(()=>{let a=Date.now(),b=new Map(U.map(a=>[a.chatRunId,a]));for(let c of R)!(!c.optimistic||b.has(c.chatRunId))&&(a-(c.enqueuedAt??0)>5e3||b.set(c.chatRunId,c));return Array.from(b.values()).filter(a=>"queued"===a.status||"running"===a.status||"awaiting_user"===a.status||"blocked"===a.status)},[R,U]),$=(0,e.useMemo)(()=>L.filter(av).sort((a,b)=>b.timestamp-a.timestamp).map(a=>{let b,c=L.filter(b=>b.rootMessageId===a.id).sort((a,b)=>a.timestamp-b.timestamp),d=[a,...c],e=d[d.length-1]??a;return{rootMessageId:a.id,title:(b=a.content.replace(/\s+/g," ").trim())?b.length>56?`${b.slice(0,56).trim()}...`:b:"Untitled session",updatedAt:e.timestamp,messageCount:d.length,messages:d}}),[L]),_=(0,e.useMemo)(()=>u?$.find(a=>a.rootMessageId===u)??null:null,[u,$]),aa="detail"===s&&!!u,ab=new Set(["queued","running","awaiting_user","blocked"]),ac=Z.length>0||S.some(a=>"spawning"===a.state||"running"===a.state),ad=(0,e.useMemo)(()=>{let a=new Map;for(let b of Z){if(!b.rootMessageId||!ab.has(b.status))continue;let c="queued"===b.status?"queued":"working";"working"!==a.get(b.rootMessageId)&&a.set(b.rootMessageId,c)}for(let b of S)b.threadId&&("spawning"===b.state||"running"===b.state)&&a.set(b.threadId,"working");return a},[Z,S]),ae=(0,e.useMemo)(()=>S.some(a=>"spawning"===a.state||"running"===a.state)||Z.some(a=>ab.has(a.status)&&"queued"!==a.status)?"working":Z.some(a=>"queued"===a.status)?"queued":"ready",[Z,ab,S]);(0,e.useEffect)(()=>{J.current&&!ac&&m().catch(a=>{console.warn("Failed to refresh objective after objective chat activity",a)}),J.current=ac},[ac,m]),(0,e.useEffect)(()=>{u&&(0,ao.persistLastSessionForEntity)(d.id,u)},[d.id,u]),(0,e.useEffect)(()=>{if(u||0===$.length)return;let a=(0,ao.loadLastSessionForEntity)(d.id);a&&$.some(b=>b.rootMessageId===a)&&v(a)},[d.id,u,$,v]);let af=(0,e.useCallback)(async a=>{await fetch(`/api/chat-runs/${encodeURIComponent(a)}/signal`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({signal:"cancel",reason:"Interrupted by a new objective chat message"})}).catch(a=>{console.warn("Failed to cancel objective chat run",a)})},[]),ag=(0,e.useCallback)(async()=>{let a=Array.from(new Set(Z.map(a=>a.chatRunId).filter(a=>!!a)));await Promise.all(a.map(a=>af(a))),await Q(),await V()},[Z,af,V,Q]),ah=(0,e.useCallback)(async(b,e,g,h,l,m,n)=>{var o;let p,q,r,s,w,x,y;ac&&await ag(),I(null);let z=await X();if(!z)return;let A=F.map(a=>a.id),B=aa?u:null,C=[(o={available:j,configured:i.filter(a=>a.connected).map(a=>({type:a.type,displayName:a.displayName})),defaultType:k},p=`/api/projects/${a}/objectives/${d.id}`,q=`${p}/scheduled-tasks`,r=`${p}/notes`,s=`~/.agx/projects/${c}/objectives/${d.key}.md`,w=`~/.agx/projects/${c}/objectives/${d.key}/notes/`,x=`${p}/validate`,y=d.notes?.length?d.notes.map(a=>`- **${a.title}**: ${a.body.slice(0,120)}${a.body.length>120?"...":""}`).join("\n"):null,["You are working inside a strategy session for this project objective.",`Project slug: ${c}`,`Objective: ${d.title}`,`Objective label: ${d.key}`,f?`Owning team: ${f}`:"",y?`Current notes:
2
- ${y}`:"Current notes: none yet.","Wake schedule: managed by the built-in objective worker job.",`## Objective file (source of truth)
1
+ module.exports=[739515,a=>{"use strict";var b=a.i(308316),c=a.i(850985),d=a.i(516909),e=a.i(786220),f=a.i(599086),g=a.i(285320),h=a.i(549429),i=a.i(831709);let j=(0,i.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 k=a.i(627421),l=a.i(820859),m=a.i(552605),n=a.i(667597),o=a.i(353532),p=a.i(542341),q=a.i(697183),r=a.i(252197),s=a.i(985339),t=a.i(724938),u=a.i(824179),v=a.i(830284),w=a.i(155829),x=a.i(496368),y=a.i(689882),z=a.i(86007),A=a.i(698573),B=a.i(8e4),C=a.i(475632),D=a.i(86466),E=a.i(766412);let F=(0,i.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 G=a.i(73948),H=a.i(356239),I=a.i(999076),J=a.i(296037),K=a.i(736303),L=a.i(393041),M=a.i(734709);function N(a){return"active"===a.state&&(null!==a.nextRunAt&&a.nextRunAt-Date.now()<0?!a.lastRunAt||!(a.lastRunAt>=a.nextRunAt):!!a.prevScheduledAt&&!!a.lastRunAt&&a.lastRunAt>a.prevScheduledAt+3e5)}function O({projectId:a,objectiveId:c,objectiveKey:d,createDefaults:f,onCreateTask:g}){let{jobs:h,loading:i,refresh:j,deleteJob:m,toggleJob:p,updateJob:r,fetchRuns:s,runNow:t}=(0,J.usePromptJobs)(a,{requireProjectId:!0,includeObjectiveJobs:!0,objectiveId:c}),[u,v]=(0,e.useState)(!1),[w,x]=(0,e.useState)(null),[y,z]=(0,e.useState)(null),[A,B]=(0,e.useState)(null),[C,D]=(0,e.useState)(null),[E,O]=(0,e.useState)([]),[P,Q]=(0,e.useState)({});(0,e.useEffect)(()=>{fetch("/api/prompt-jobs/agents").then(a=>a.json()).then(a=>{let b={};for(let c of a.agents??[])b[c.id]=c;Q(b)}).catch(a=>console.warn("[ObjectiveScheduledTasksPanel] fetch agents failed:",a))},[]);let R=(0,e.useMemo)(()=>h.filter(a=>a.objectiveId===c).sort((a,b)=>!a.name.toLowerCase().includes("objective worker")-!b.name.toLowerCase().includes("objective worker")),[h,c]),S=(0,e.useMemo)(()=>R.find(a=>a.id===A)??null,[A,R]),T=(0,e.useCallback)(async()=>{if(0===R.length)return void O([]);let a=[];await Promise.all(R.map(async b=>{for(let c of(await s(b.id)))a.push({...c,jobName:b.name})})),a.sort((a,b)=>new Date(b.startedAt??b.createdAt).getTime()-new Date(a.startedAt??a.createdAt).getTime()),O(a.slice(0,10))},[R,s]);(0,e.useEffect)(()=>{T()},[T]);let U=async a=>{x(a.id),z(null);let b=await m(a.id);(x(null),b.ok)?await j():z(b.error??`Failed to hide "${a.name}".`)},V=async a=>{z(null);let b=await g(a);return b&&await j(),b},W=(0,e.useCallback)(async(a,b)=>{let c=await r(a,b);return c&&await j(),c},[j,r]);return(0,b.jsxs)(b.Fragment,{children:[u?(0,b.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 px-4 py-6",children:(0,b.jsx)("div",{className:"w-full max-w-5xl h-[85vh] overflow-hidden rounded-[28px] border border-[var(--border)] bg-[var(--card-bg)] shadow-2xl",children:(0,b.jsx)(L.CreateJobModal,{onClose:()=>v(!1),onSubmit:async a=>{await V(a)},createDefaults:f,contextLabel:d})})}):null,S?(0,b.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 px-4 py-6",children:(0,b.jsx)("div",{className:"w-full max-w-5xl h-[85vh] overflow-hidden rounded-[28px] border border-[var(--border)] bg-[var(--card-bg)] shadow-2xl",children:(0,b.jsx)(L.CreateJobModal,{onClose:()=>B(null),onSubmit:async a=>{await W(S.id,a)},editingJob:S,contextLabel:d})})}):null,(0,b.jsxs)("div",{className:"px-1",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-semibold text-[var(--foreground)]",children:"Scheduled Jobs"}),(0,b.jsxs)("p",{className:"mt-1 text-sm text-[var(--muted-foreground)]",children:["Shared scheduled-task list filtered to objective label"," ",(0,b.jsx)("span",{className:"font-mono text-[var(--foreground)]",children:d}),"."]})]}),(0,b.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:(0,b.jsxs)("button",{type:"button",onClick:()=>v(!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,b.jsx)(o.Plus,{className:"h-4 w-4"}),"New task"]})})]}),y?(0,b.jsx)("p",{className:"mt-4 text-sm text-[var(--destructive)]",children:y}):null,(0,b.jsx)("div",{className:"mt-5 space-y-3",children:i&&0===R.length?(0,b.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===R.length?(0,b.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."}):R.map(a=>{var c,d;let e;return(0,b.jsx)("div",{onClick:()=>B(a.id),onKeyDown:b=>{("Enter"===b.key||" "===b.key)&&(b.preventDefault(),B(a.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)] ${N(a)?"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,b.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-2.5",children:[(0,b.jsx)("span",{className:`inline-block size-2 shrink-0 rounded-full ${"active"===a.state?"bg-emerald-400":"paused"===a.state?"bg-amber-400":"bg-[var(--tone-neutral)]"}`}),(0,b.jsx)("p",{className:"truncate text-sm font-semibold text-[var(--foreground)]",children:a.name}),(0,b.jsx)("span",{className:`rounded-full border px-2 py-0.5 text-[10px] font-semibold uppercase tracking-[0.16em] ${"active"===(c=a.state)?"border-[var(--status-completed-border)] bg-[var(--status-completed-bg)] text-[var(--status-completed)]":"paused"===c?"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)]"}`,children:"active"===(d=a.state)?"Active":"paused"===d?"Paused":"Stopped"}),N(a)&&(0,b.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,b.jsx)(l.Clock,{className:"h-3 w-3"}),"overdue"]})]}),(0,b.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-3 text-xs text-[var(--muted-foreground)]",children:[(0,b.jsxs)("span",{className:`inline-flex items-center gap-1.5 ${N(a)?"text-amber-400 font-medium":""}`,children:[(0,b.jsx)(l.Clock,{className:"h-3.5 w-3.5"}),"Next run ",function(a,b){if("paused"===b)return"Paused";if("stopped"===b)return"Stopped";if(null===a)return"Pending";let c=a-Date.now();return c<0?"Overdue":c<6e4?`in ${Math.round(c/1e3)}s`:c<36e5?`in ${Math.round(c/6e4)}m`:c<864e5?`in ${Math.round(c/36e5)}h`:`in ${Math.round(c/864e5)}d`}(a.nextRunAt,a.state)]}),(0,b.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,b.jsx)(l.Clock,{className:"h-3.5 w-3.5"}),(e=a.cadence||a.cronExpr)?(0,K.cronToHuman)(a.cronExpr||e)??e:"No frequency"]}),a.condition?(0,b.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,b.jsxs)("div",{className:"mt-3 flex items-center gap-2 min-w-0 text-xs text-[var(--muted-foreground)]",children:[a.agentId&&P[a.agentId]?(0,b.jsx)("img",{src:(0,L.agentAvatar)(a.agentId,P[a.agentId].color,20),alt:"",className:"size-5 rounded-full shrink-0"}):(0,b.jsx)(H.Terminal,{className:"h-3.5 w-3.5 shrink-0"}),(0,b.jsx)("span",{className:"truncate font-medium text-[var(--foreground)]",children:a.agentId&&P[a.agentId]?P[a.agentId].name:a.provider}),a.model?(0,b.jsx)("span",{className:"truncate font-mono text-[11px]",children:a.model}):null]}),a.condition?(0,b.jsxs)("p",{className:"mt-2 text-xs text-[var(--muted-foreground)]",children:["Condition: ",a.condition]}):null]}),(0,b.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",children:[(0,b.jsx)("button",{type:"button",title:"Run now",onClick:async b=>{b.stopPropagation(),x(a.id),await t(a.id),x(null),await j(),await T()},disabled:w===a.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,b.jsx)(G.Play,{className:"h-3.5 w-3.5 fill-current"})}),(0,b.jsx)("button",{type:"button",title:"Edit",onClick:b=>{b.stopPropagation(),B(a.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,b.jsx)(n.Pencil,{className:"h-3.5 w-3.5"})}),(0,b.jsx)("button",{type:"button",title:"active"===a.state?"Pause":"Resume",onClick:async b=>{b.stopPropagation(),x(a.id),await p(a),x(null)},disabled:w===a.id,className:`rounded-lg border p-2 transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${"active"===a.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"===a.state?(0,b.jsx)(F,{className:"h-3.5 w-3.5"}):(0,b.jsx)(G.Play,{className:"h-3.5 w-3.5 fill-current"})}),(0,b.jsx)("button",{type:"button",title:"Delete",onClick:b=>{b.stopPropagation(),D(a)},disabled:w===a.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,b.jsx)(q.Trash2,{className:"h-3.5 w-3.5"})})]})]})},a.id)})}),E.length>0&&(0,b.jsxs)("div",{className:"mt-8",children:[(0,b.jsx)("p",{className:"text-[11px] font-medium uppercase tracking-[0.18em] text-[var(--muted-foreground)] mb-3",children:"Recent executions"}),(0,b.jsx)("div",{className:"space-y-0.5",children:E.map(a=>{let c=a.startedAt??a.createdAt,d="success"===a.status,e="failed"===a.status,f="running"===a.status;return(0,b.jsxs)("div",{className:"py-2 px-2 rounded-md text-xs",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)("span",{className:`flex size-5 shrink-0 items-center justify-center rounded-full border ${d?"border-emerald-500/40 text-emerald-400":e?"border-[var(--status-failed-border)] text-[var(--destructive)]":f?"border-sky-500/40 text-sky-400":"border-[var(--border)] text-[var(--muted-foreground)]"}`,children:d?(0,b.jsx)(k.Check,{className:"h-3 w-3"}):e?(0,b.jsx)(I.XCircle,{className:"h-3 w-3"}):(0,b.jsx)("span",{className:`block size-1.5 rounded-full ${f?"bg-sky-400 animate-pulse":"bg-current"}`})}),(0,b.jsx)("span",{className:"truncate text-[var(--muted-foreground)]",children:a.jobName}),(0,b.jsx)("span",{className:"ml-auto shrink-0 text-[11px] text-[var(--muted-foreground)]",children:new Date(c).toLocaleString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}),null!=a.durationMs&&(0,b.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-[var(--muted-foreground)]",children:a.durationMs<1e3?`${a.durationMs}ms`:`${Math.round(a.durationMs/1e3)}s`})]}),e&&a.error&&(0,b.jsxs)("p",{className:"mt-1 ml-8 text-[11px] leading-snug text-[var(--destructive)] opacity-80 line-clamp-2",children:[a.error,null!=a.exitCode&&` (exit ${a.exitCode})`]}),e&&a.logs&&(0,b.jsxs)("details",{className:"mt-1 ml-8 group",children:[(0,b.jsx)("summary",{className:"cursor-pointer text-[10px] text-[var(--muted-foreground)] hover:text-[var(--foreground)] select-none",children:"Show tail logs"}),(0,b.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:a.logs})]})]},a.id)})})]})]}),(0,b.jsx)(M.default,{isOpen:!!C,title:"Delete scheduled task?",message:"This permanently removes the task and all its run history. This cannot be undone.",preview:C?.name,confirmLabel:"Delete",variant:"danger",onConfirm:()=>{C&&U(C),D(null)},onCancel:()=>D(null)})]})}var P=a.i(811760),Q=a.i(756490);let R=(0,i.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"}]]),S={"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)]"}},T=["metric-check","status-update","milestone","note"];function U({activity:a}){let[c,d]=(0,e.useState)(!1),f=S[a.type]??S.note,g=a.body.length>200;return(0,b.jsxs)("div",{className:"relative pl-6 pb-6 last:pb-0",children:[(0,b.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,b.jsx)("div",{className:"absolute bottom-0 left-[5px] top-4 w-px bg-[var(--timeline-track)] last:hidden"}),(0,b.jsxs)("div",{className:"mb-1.5 flex items-center gap-2",children:[(0,b.jsx)("span",{className:`rounded-full border px-2 py-0.5 text-[10px] font-semibold uppercase tracking-[0.14em] ${f.className}`,children:f.label}),(0,b.jsx)("span",{className:"text-[11px] text-[var(--muted-foreground)]",children:function(a){let b=Date.now(),c=Date.parse(a);if(Number.isNaN(c))return a;let d=Math.floor((b-c)/6e4);if(d<1)return"just now";if(d<60)return`${d}m ago`;let e=Math.floor(d/60);if(e<24)return`${e}h ago`;let f=Math.floor(e/24);return f<30?`${f}d ago`:new Date(c).toLocaleDateString("en-US",{month:"short",day:"numeric",year:f>365?"numeric":void 0})}(a.createdAt)}),"manual"!==a.source&&(0,b.jsx)("span",{className:"max-w-[180px] truncate font-mono text-[11px] text-[var(--app-shell-soft-text)]",children:a.source})]}),c?(0,b.jsx)("div",{className:"prose prose-sm max-w-none text-sm text-[var(--foreground)] prose-neutral dark:prose-invert",children:(0,b.jsx)(z.Markdown,{content:a.body})}):(0,b.jsx)("div",{className:`text-sm leading-relaxed text-[var(--muted-foreground)] ${g?"max-h-24 overflow-hidden [mask-image:linear-gradient(to_bottom,black_72%,transparent)]":""}`,children:(0,b.jsx)(z.Markdown,{content:a.body})}),g&&(0,b.jsxs)("button",{type:"button",onClick:()=>d(!c),className:"mt-1.5 flex items-center gap-1 text-xs text-[var(--muted-foreground)] transition-colors hover:text-[var(--foreground)]",children:[c?(0,b.jsx)(P.ChevronDown,{size:12}):(0,b.jsx)(Q.ChevronRight,{size:12}),c?"Show less":"Show more"]})]})}function V({projectId:a,objectiveId:c,onCreated:d,onCancel:f}){let[g,h]=(0,e.useState)("note"),[i,j]=(0,e.useState)(""),[k,l]=(0,e.useState)(!1),m=(0,e.useRef)(null);(0,e.useEffect)(()=>{m.current?.focus()},[]);let n=async()=>{let b=i.trim();if(b&&!k){l(!0);try{let e=await fetch(`/api/projects/${a}/objectives/${c}/activities`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:g,body:b})});if(!e.ok)throw Error("Failed to create activity");let f=await e.json();d(f)}catch(a){console.error("Failed to create activity:",a)}finally{l(!1)}}};return(0,b.jsxs)("div",{className:"mb-4 rounded-lg border border-[var(--border)] bg-[var(--overlay-panel-muted)] p-3",children:[(0,b.jsx)("div",{className:"mb-3 flex flex-wrap gap-1.5",children:T.map(a=>{let c=S[a],d=g===a;return(0,b.jsx)("button",{type:"button",onClick:()=>h(a),className:`rounded-full border px-2.5 py-0.5 text-[10px] font-semibold uppercase tracking-[0.14em] transition-colors ${d?"border-[var(--foreground)] bg-[var(--foreground)] text-[var(--background)]":`${c.className} hover:opacity-80`}`,children:c.label},a)})}),(0,b.jsx)("textarea",{ref:m,value:i,onChange:a=>j(a.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,b.jsxs)("div",{className:"mt-2 flex items-center justify-end gap-2",children:[(0,b.jsx)("button",{type:"button",onClick:f,className:"px-3 py-1.5 text-xs text-[var(--muted-foreground)] transition-colors hover:text-[var(--foreground)]",children:"Cancel"}),(0,b.jsx)("button",{type:"button",onClick:n,disabled:!i.trim()||k,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:k?"Saving...":"Log activity"})]})]})}function W({projectId:a,objectiveId:c,onTotalChange:d}){let[f,g]=(0,e.useState)([]),[h,i]=(0,e.useState)(0),[j,k]=(0,e.useState)(!1),[l,m]=(0,e.useState)(1),[n,p]=(0,e.useState)(!0),[q,r]=(0,e.useState)("all"),[s,t]=(0,e.useState)(!1),[v,w]=(0,e.useState)(!1),x=(0,e.useCallback)(async(b,e,f)=>{p(!0);try{let h=new URLSearchParams({page:String(b),limit:"25"});"all"!==e&&h.set("type",e);let j=await fetch(`/api/projects/${a}/objectives/${c}/activities?${h}`);if(!j.ok)throw Error("Failed to load activities");let l=await j.json(),m=Array.isArray(l.activities)?l.activities:[],n="number"==typeof l.total?l.total:m.length,o=!!l.hasMore;g(a=>f?[...a,...m]:m),i(n),d?.(n),k(o)}catch(a){console.error("Failed to fetch activities:",a)}finally{p(!1)}},[a,c]);return(0,e.useEffect)(()=>{m(1),x(1,q,!1)},[x,q]),(0,b.jsxs)("section",{children:[(0,b.jsxs)("div",{className:"mb-3 flex items-center justify-between",children:[(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"Time-ordered log of outputs from scheduled tasks and manual entries."}),(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsxs)("button",{type:"button",onClick:()=>w(!v),className:`flex items-center gap-1 px-2.5 py-1 rounded-md text-xs font-medium transition-colors ${v?"text-sky-400 bg-sky-500/10":"text-[var(--muted-foreground)] hover:bg-[var(--muted)] hover:text-[var(--foreground)]"}`,children:[v?(0,b.jsx)(u.X,{size:12}):(0,b.jsx)(o.Plus,{size:12}),"Log activity"]}),(0,b.jsx)("button",{type:"button",onClick:()=>t(!s),className:`p-1.5 rounded-md transition-colors ${s||"all"!==q?"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,b.jsx)(R,{size:14})})]})]}),s&&(0,b.jsxs)("div",{className:"flex flex-wrap gap-1.5 mb-4",children:[(0,b.jsx)("button",{type:"button",onClick:()=>r("all"),className:`rounded-full border px-2.5 py-0.5 text-[10px] font-semibold uppercase tracking-[0.14em] transition-colors ${"all"===q?"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"}),T.map(a=>{let c=S[a],d=q===a;return(0,b.jsx)("button",{type:"button",onClick:()=>r(a),className:`rounded-full border px-2.5 py-0.5 text-[10px] font-semibold uppercase tracking-[0.14em] transition-colors ${d?"border-[var(--foreground)] bg-[var(--foreground)] text-[var(--background)]":`${c.className} hover:opacity-80`}`,children:c.label},a)})]}),v&&(0,b.jsx)(V,{projectId:a,objectiveId:c,onCreated:a=>{g(b=>[a,...b]),i(a=>{let b=a+1;return d?.(b),b}),w(!1)},onCancel:()=>w(!1)}),n&&0===f.length?(0,b.jsx)("div",{className:"py-6 text-center text-sm text-[var(--muted-foreground)]",children:"Loading activities..."}):0===f.length?(0,b.jsxs)("div",{className:"rounded-xl border border-dashed border-[var(--border)] bg-[var(--overlay-panel-muted)] p-6 text-center",children:[(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"No activities yet."}),(0,b.jsx)("p",{className:"mt-1 text-xs text-[var(--app-shell-soft-text)]",children:"Activities are created by scheduled tasks and agent actions."})]}):(0,b.jsxs)("div",{children:[f.map(a=>(0,b.jsx)(U,{activity:a},a.id)),j&&(0,b.jsx)("div",{className:"pt-2 pl-6",children:(0,b.jsx)("button",{type:"button",onClick:()=>{let a=l+1;m(a),x(a,q,!0)},disabled:n,className:"text-xs text-sky-400 hover:text-sky-300 transition-colors disabled:opacity-50",children:n?"Loading...":"Load more"})})]})]})}let X=/(?:^|\n)Objective health:\s*(\d{1,3})%\s*(On track|At risk|Off track|Done)\b/im,Y={"on track":"on_track","at risk":"at_risk","off track":"off_track",done:"done"};function Z(a){return!!a&&"object"==typeof a&&!Array.isArray(a)}function $(a){return"number"==typeof a&&Number.isFinite(a)?Math.max(0,Math.min(100,Math.round(a))):0}function _(a){if("string"!=typeof a)return null;let b=a.trim().toLowerCase();return"on_track"===b||"at_risk"===b||"off_track"===b||"done"===b?b:Y[b]??null}function aa(a){if("string"!=typeof a)return null;let b=Date.parse(a);return Number.isNaN(b)?null:new Date(b).toISOString()}function ab(a){return"string"==typeof a&&a.trim()?a.trim():void 0}function ac(...a){let b=a.flatMap(a=>a??[]),c=[];for(let a of[...b].sort((a,b)=>Date.parse(a.recordedAt)-Date.parse(b.recordedAt))){let b=c[c.length-1]??null;b&&b.progress===a.progress&&b.status===a.status&&(!b.source||!a.source||b.source===a.source)&&5e3>=Math.abs(Date.parse(a.recordedAt)-Date.parse(b.recordedAt))||c.push(a)}return c}let ad={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 ae(a){let{projectId:c,objectiveId:d,objectiveKey:f,metadata:g,currentProgress:h,currentStatus:i,objectiveUpdatedAt:j}=a,k=(0,e.useMemo)(()=>(function(a,b){if(!Z(a)||!b.trim())return[];let c=a.project_objective_health_history;if(!Z(c))return[];let d=c[b.trim()];return Array.isArray(d)?ac(d.map(a=>(function(a){if(!Z(a))return null;let b=_(a.status),c=aa(a.recordedAt);return b&&c?{progress:$(a.progress),status:b,recordedAt:c,source:ab(a.source),note:ab(a.note),objectiveId:ab(a.objectiveId)??null,objectiveKey:ab(a.objectiveKey)??null}:null})(a)).filter(a=>!!a)):[]})(g,d),[g,d]),[l,m]=(0,e.useState)(k),n=(0,e.useMemo)(()=>({progress:h,status:i,recordedAt:j,objectiveId:d,objectiveKey:f}),[h,i,d,f,j]);(0,e.useEffect)(()=>{m(k)},[k]),(0,e.useEffect)(()=>{let a=!1;return async function(){try{let b=await fetch(`/api/projects/${c}/objectives/${d}/activities?type=status-update&limit=100`);if(!b.ok)throw Error("Failed to load objective activity history");let e=await b.json(),g=Array.isArray(e.activities)?e.activities:[],h=ac(k,ac(g.map(a=>(function(a){if("status-update"!==a.type)return null;let b=a.body.match(X);if(!b)return null;let c=$(Number(b[1])),d=_(b[2]),e=aa(a.createdAt);return d&&e?{progress:c,status:d,recordedAt:e,source:ab(a.source),objectiveKey:ab(a.objectiveLabel)??null}:null})(a)).filter(a=>!!a&&(!f||a.objectiveKey===f))));a||m(h)}catch{a||m(k)}}(),()=>{a=!0}},[k,d,f,c]);let[o,p]=(0,e.useState)(!1);(0,e.useEffect)(()=>{let a=requestAnimationFrame(()=>p(!0));return()=>cancelAnimationFrame(a)},[]);let q=ac(l,[n]),r=q[q.length-1],s=ad[r.status];return 0===l.length||1===q.length||q.length,(0,b.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,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-[10px] font-semibold uppercase tracking-[0.16em] text-[var(--muted-foreground)]",children:"Objective health"}),(0,b.jsxs)("div",{className:"mt-0.5 text-[20px] font-semibold leading-none text-[var(--foreground)]",children:[r.progress,"%"]}),(0,b.jsx)("div",{className:"mt-0.5 text-[10px] font-medium",style:{color:s.stroke},children:s.label})]}),(0,b.jsx)("div",{className:"h-[40px] w-[14px] overflow-hidden rounded-sm",style:{background:"var(--muted)"},role:"progressbar","aria-valuenow":r.progress,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Objective health",title:`${r.progress}%`,children:(0,b.jsx)("div",{className:"flex h-full flex-col justify-end",children:(0,b.jsx)("div",{className:"relative w-full overflow-hidden rounded-sm transition-[height] duration-700 ease-out",style:{height:o?`${r.progress}%`:"0%",backgroundColor:s.stroke},children:(0,b.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 af=a.i(392045),ag=a.i(908225),ah=a.i(249603),ai=a.i(529889),aj=a.i(870630),ak=a.i(427411),al=a.i(837929),am=a.i(769677);let an={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 ao({onResize:a}){let{isTouchLayout:c}=(0,ai.useInputCapabilities)();return c?null:(0,b.jsx)(ah.ResizeHandle,{onResize:a,className:"hidden xl:block",ariaLabel:"Resize objective chat panel"})}function ap(a){return new Date(a).toLocaleString([],{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function aq(){return{title:"",teamId:"",summary:""}}function ar(a){let{projects:b,isLoading:c,refetch:d,updateProject:f}=(0,v.useProjects)(),[g,h]=(0,e.useState)([]),i=(0,e.useMemo)(()=>b.find(b=>b.slug===a)??null,[a,b]),j=(0,e.useMemo)(()=>(0,am.readProjectObjectivesWorkspace)(i?.metadata),[i?.metadata]),k=(0,e.useCallback)(async a=>{if(!i)throw Error("Project not found.");await f(i.id,{metadata:(0,am.writeProjectObjectivesWorkspace)(i.metadata??{},a)})},[i,f]);return(0,e.useEffect)(()=>{let a=!0;return async function(){if(!i?.id)return h([]);try{let b=await fetch(`/api/projects/${i.id}/teams`);if(!b.ok)throw Error("Failed to fetch teams");let c=await b.json();if(!a)return;h((c.teams??[]).map(a=>({id:"string"==typeof a.id?a.id:"",name:"string"==typeof a.name?a.name:"Untitled team"})).filter(a=>a.id))}catch{if(!a)return;h([])}}(),()=>{a=!1}},[i?.id]),{isLoading:c,project:i,workspace:j,teams:g,persistWorkspace:k,refetchProject:d}}function as(a){return"user"===a.role&&!a.rootMessageId}function at({projectId:a,projectSlug:c,objective:f,teamName:i,trackerConnections:j,availableTrackers:k,defaultTrackerType:l,onThreadLinked:m,onObjectiveUpdated:n}){let[o,p]=(0,e.useState)(()=>(0,ak.loadObjectiveChatPanelWidth)()||800),[q,s]=(0,e.useState)(f.threadId??(f.id?`objective-chat:${f.id}`:null)),t=(0,d.useSearchParams)(),u=t?.get("session")??null,v=t?.get("message")??null,[D,E]=(0,e.useState)(u?"detail":"list"),[F,G]=(0,e.useState)(u),[H,I]=(0,e.useState)(v),[J,K]=(0,e.useState)(!1),[L,M]=(0,e.useState)(f.chatSessionVersion),[N,O]=(0,e.useState)([]),[P,Q]=(0,e.useState)(null),R=(0,e.useRef)(!1),S=(0,e.useRef)(!1),T=(0,e.useRef)(null),U=(0,e.useRef)(null),[V,W]=(0,e.useState)(!1),{messages:X,setMessages:Y,sendMessage:Z,loadHistory:$,setChatRuns:_,stop:aa,chatRuns:ab}=(0,w.useGroupChat)(q),{processes:ac,streaming:ad,chatRuns:ae,poll:af}=(0,x.useProcessPolling)(q?{workspaceId:q}:null,{messages:X,setMessages:Y});(0,e.useEffect)(()=>{f.threadId&&f.threadId!==q&&s(f.threadId)},[f.threadId,q]),(0,e.useEffect)(()=>{let a=T.current;if(!a)return;let b=()=>{W(a.scrollHeight-a.scrollTop-a.clientHeight>200)};return b(),a.addEventListener("scroll",b,{passive:!0}),()=>a.removeEventListener("scroll",b)},[D,F]);let ah=(0,e.useCallback)(()=>{U.current?.scrollIntoView({behavior:"smooth"})},[]);(0,e.useEffect)(()=>{E("list"),G(null),K(!1),S.current=!1},[f.id]),(0,e.useEffect)(()=>{M(f.chatSessionVersion),f.chatSessionVersion>=am.CURRENT_OBJECTIVE_CHAT_SESSION_VERSION&&(S.current=!0)},[f.chatSessionVersion]);let ai=(0,e.useCallback)(async b=>{let c=b.trim();if(c&&!(await fetch(`/api/projects/${a}/threads`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({threadId:c})})).ok)throw Error("Failed to link objective chat to the project.")},[a]);(0,e.useEffect)(()=>{let a=!1;return q?(K(!1),(async()=>{await $(q),a||K(!0)})(),()=>{a=!0}):void K(!0)},[$,q]),(0,e.useEffect)(()=>{let b=!1;return async function(){try{let c=f.teamId?`/api/projects/${a}/teams/${f.teamId}/agents`:`/api/projects/${a}/agents`,[d,e]=await Promise.all([fetch("/api/participants"),fetch(c)]),g=d.ok?await d.json():[],h=Array.isArray(g)?g:[],i=e.ok?await e.json():{agents:[]};if(b)return;let j=((i&&"object"==typeof i?i:{agents:[]}).agents??[]).slice().sort((a,b)=>a.routing_order-b.routing_order).map(a=>a.agent_id);if(0===j.length)return void O(h);let k=new Map(h.map(a=>[a.id,a]));O(j.map(a=>k.get(a)).filter(a=>!!a))}catch(a){if(b)return;console.error("Failed to load objective chat participants",a),O([])}}(),()=>{b=!0}},[a,f.teamId]),(0,e.useEffect)(()=>{f.threadId&&ai(f.threadId).catch(a=>{console.warn("Failed to re-link objective chat thread to project",a)})},[ai,f.threadId]),(0,e.useEffect)(()=>{if(!f.threadId||!q||!J||L>=am.CURRENT_OBJECTIVE_CHAT_SESSION_VERSION||S.current)return;S.current=!0;let b=function(a){let b=a.filter(as).sort((a,b)=>a.timestamp-b.timestamp);if(b.length<=1)return null;let c=b[0]?.id;if(!c)return null;let d=b.slice(1).map(a=>a.id),e=new Set(d);return{messages:[...a].map(a=>{let b=e.has(a.id)&&as(a),d="string"==typeof a.rootMessageId&&e.has(a.rootMessageId);return b||d?{...a,rootMessageId:c,parentMessageId:c,depth:1}:a}).sort((a,b)=>a.timestamp-b.timestamp),primaryRootMessageId:c,mergedRootMessageIds:d}}(X),c=!1;return(async()=>{Q(null);try{if(b){if(!(await fetch("/api/history",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({threadId:q,messages:b.messages})})).ok)throw Error("Failed to migrate the objective chat history.");if(c)return;Y(b.messages),G(a=>a&&b.mergedRootMessageIds.includes(a)?b.primaryRootMessageId:a)}if(!(await fetch(`/api/projects/${a}/objectives/${f.id}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({chatSessionVersion:am.CURRENT_OBJECTIVE_CHAT_SESSION_VERSION})})).ok)throw Error("Failed to update the objective chat session version.");if(c)return;M(am.CURRENT_OBJECTIVE_CHAT_SESSION_VERSION),n().catch(a=>{console.warn("Failed to refresh objective after objective chat migration",a)})}catch(a){if(c)return;console.warn("Failed to migrate legacy objective chat sessions",a),Q(a instanceof Error?a.message:"Failed to migrate the objective chat history.")}})(),()=>{c=!0}},[L,J,X,f.id,f.threadId,n,a,Y,q]);let an=(0,e.useCallback)(async()=>{if(f.threadId)return f.threadId;let b=q??(f.id?`objective-chat:${f.id}`:null);if(!b)return null;Q(null);try{let d=await aj.threadService.createThread({id:b,title:f.title,metadata:{scope:"objective",objectiveId:f.id,projectId:a,projectSlug:c}});return s(d.id),await ai(d.id),await m(d.id),d.id}catch(a){return Q(a instanceof Error?a.message:"Failed to create the objective chat."),null}},[ai,f.id,f.threadId,f.title,m,a,c,q]),aq=(0,e.useMemo)(()=>new Map(N.map(a=>[a.id,a])),[N]);(0,e.useEffect)(()=>{_(a=>{let b=Date.now(),c=new Map(a.filter(a=>"string"==typeof a.chatRunId&&a.chatRunId.length>0).map(a=>[a.chatRunId,a]));for(let a of ae)a?.chatRunId&&c.set(a.chatRunId,a);return Array.from(c.values()).filter(a=>!!(!a.optimistic||ae.some(b=>b.chatRunId===a.chatRunId))||b-(a.enqueuedAt??0)<=5e3).sort((a,b)=>String(a.chatRunId||"").localeCompare(String(b.chatRunId||"")))})},[ae,_]);let ar=(0,e.useMemo)(()=>{let a=Date.now(),b=new Map(ae.map(a=>[a.chatRunId,a]));for(let c of ab)!(!c.optimistic||b.has(c.chatRunId))&&(a-(c.enqueuedAt??0)>5e3||b.set(c.chatRunId,c));return Array.from(b.values()).filter(a=>"queued"===a.status||"running"===a.status||"awaiting_user"===a.status||"blocked"===a.status)},[ab,ae]),at=(0,e.useMemo)(()=>X.filter(as).sort((a,b)=>b.timestamp-a.timestamp).map(a=>{let b,c=X.filter(b=>b.rootMessageId===a.id).sort((a,b)=>a.timestamp-b.timestamp),d=[a,...c],e=d[d.length-1]??a;return{rootMessageId:a.id,title:(b=a.content.replace(/\s+/g," ").trim())?b.length>56?`${b.slice(0,56).trim()}...`:b:"Untitled session",updatedAt:e.timestamp,messageCount:d.length,messages:d}}),[X]),au=(0,e.useMemo)(()=>F?at.find(a=>a.rootMessageId===F)??null:null,[F,at]),aw="detail"===D&&!!F,ax=new Set(["queued","running","awaiting_user","blocked"]),ay=ar.length>0||ac.some(a=>"spawning"===a.state||"running"===a.state),az=(0,e.useMemo)(()=>{let a=new Map;for(let b of ar){if(!b.rootMessageId||!ax.has(b.status))continue;let c="queued"===b.status?"queued":"working";"working"!==a.get(b.rootMessageId)&&a.set(b.rootMessageId,c)}for(let b of ac)b.threadId&&("spawning"===b.state||"running"===b.state)&&a.set(b.threadId,"working");return a},[ar,ac]),aA=(0,e.useMemo)(()=>ac.some(a=>"spawning"===a.state||"running"===a.state)||ar.some(a=>ax.has(a.status)&&"queued"!==a.status)?"working":ar.some(a=>"queued"===a.status)?"queued":"ready",[ar,ax,ac]);(0,e.useEffect)(()=>{R.current&&!ay&&n().catch(a=>{console.warn("Failed to refresh objective after objective chat activity",a)}),R.current=ay},[ay,n]),(0,e.useEffect)(()=>{F&&(0,al.persistLastSessionForEntity)(f.id,F)},[f.id,F]),(0,e.useEffect)(()=>{u&&(G(u),E("detail"))},[u]),(0,e.useEffect)(()=>{v&&I(v)},[v]),(0,e.useEffect)(()=>{if(!H)return;let a=requestAnimationFrame(()=>{let a=document.querySelector(`[data-objective-message-id="${CSS.escape(H)}"]`);a&&a.scrollIntoView({behavior:"smooth",block:"center"})});return()=>cancelAnimationFrame(a)},[H,J,F]),(0,e.useEffect)(()=>{if(F||0===at.length)return;let a=(0,al.loadLastSessionForEntity)(f.id);a&&at.some(b=>b.rootMessageId===a)&&G(a)},[f.id,F,at,G]);let aB=(0,e.useCallback)(async a=>{await fetch(`/api/chat-runs/${encodeURIComponent(a)}/signal`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({signal:"cancel",reason:"Interrupted by a new objective chat message"})}).catch(a=>{console.warn("Failed to cancel objective chat run",a)})},[]),aC=(0,e.useCallback)(async()=>{let a=Array.from(new Set(ar.map(a=>a.chatRunId).filter(a=>!!a)));await Promise.all(a.map(a=>aB(a))),await aa(),await af()},[ar,aB,af,aa]),aD=(0,e.useCallback)(async(b,d,e,g,h,m,n)=>{var o;let p,q,r,s,t,u,v;ay&&await aC(),Q(null);let w=await an();if(!w)return;let x=N.map(a=>a.id),y=aw?F:null,z=[(o={available:k,configured:j.filter(a=>a.connected).map(a=>({type:a.type,displayName:a.displayName})),defaultType:l},p=`/api/projects/${a}/objectives/${f.id}`,q=`${p}/scheduled-tasks`,r=`${p}/notes`,s=`~/.agx/projects/${c}/objectives/${f.key}.md`,t=`~/.agx/projects/${c}/objectives/${f.key}/notes/`,u=`${p}/validate`,v=f.notes?.length?f.notes.map(a=>`- **${a.title}**: ${a.body.slice(0,120)}${a.body.length>120?"...":""}`).join("\n"):null,["You are working inside a strategy session for this project objective.",`Project slug: ${c}`,`Objective: ${f.title}`,`Objective label: ${f.key}`,i?`Owning team: ${i}`:"",v?`Current notes:
2
+ ${v}`:"Current notes: none yet.","Wake schedule: managed by the built-in objective worker job.",`## Objective file (source of truth)
3
3
 
4
4
  This objective is stored as a frontmatter markdown file at:
5
5
  \`${s}\`
@@ -8,15 +8,15 @@ File format:
8
8
  - YAML frontmatter between \`---\` delimiters contains all metadata (title, teamId, key, status, progress, scheduledTaskIds, threadId, chatSessionVersion, createdAt, updatedAt).
9
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
10
 
11
- Notes are stored as separate files in \`${w}\`. Each note is a markdown file with YAML frontmatter (id, title, objectiveId, createdAt, updatedAt) and a markdown body.
11
+ Notes are stored as separate files in \`${t}\`. Each note is a markdown file with YAML frontmatter (id, title, objectiveId, createdAt, updatedAt) and a markdown body.
12
12
 
13
13
  When updating the objective, you can edit this file directly. Rules:
14
14
  - NEVER remove or break the \`---\` frontmatter delimiters.
15
15
  - NEVER change the \`id\` or \`createdAt\` fields.
16
16
  - Always update \`updatedAt\` to the current ISO timestamp when making changes.
17
- - After any edit, call \`GET ${x}\` 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 ${p} with JSON fields such as {"title","teamId","key"} to update the objective itself.`,`- GET ${r} to list all notes for this objective. Returns {"notes":[...],"total","page","limit","hasMore"}.`,`- POST ${r} with {"title","body"} to create a new note.`,`- GET ${r}/{noteId} to read a single note.`,`- PATCH ${r}/{noteId} with {"title","body"} to update a note.`,`- DELETE ${r}/{noteId} to delete a note.`,`- GET ${q} to inspect the scheduled tasks already tracked for this objective.`,`- POST ${q} with {"name","prompt","cadence","agentId"} to create a scheduled task for this objective.`,`- GET ${x} to validate the objective file on disk. Returns {"valid":true} or {"valid":false,"errors":[...]}.`,"Tracker integrations:",`- Available tracker types: ${o.available.length>0?o.available.map(a=>`${a.displayName} (${a.type})`).join(", "):"none registered"}.`,`- Configured for this project: ${o.configured.length>0?o.configured.map(a=>{let b=o.defaultType===a.type;return`${a.displayName} (${a.type})${b?" — default":""}`}).join(", "):"none — ask the user to connect a tracker in project settings if they want ticket workflows"}.`,o.defaultType?`- Default tracker for ticket workflows: ${o.defaultType}. Prefer this tracker when creating or referencing tickets for this objective unless the user asks otherwise.`:o.configured.length>1?"- No default tracker has been selected; ask the user which connected tracker to use before creating tickets.":"",...o.configured.map(b=>`- GET /api/trackers/${b.type}/items?projectId=${a} to list ${b.displayName} items. Filter client-side by label "${d.key}" to find tickets tied to this objective.`)].filter(Boolean).join("\n\n")),m].filter(Boolean).join("\n\n"),D=await N(b,e,z,B,g,h,l?[l]:A,c,C,n);!B&&D&&(v(D),t("detail"))},[null,X,ac,ag,aa,d,F,a,c,u,N,f]),ai=(0,e.useMemo)(()=>aa?_?.messages??[]:[],[aa,_]),aj=(0,e.useMemo)(()=>aa&&u?Object.entries(T).filter(([,a])=>a.rootMessageId===u):[],[aa,u,T]),ak=(0,e.useCallback)(a=>{o(b=>{let c=Math.max(320,Math.min(1200,b+a));return(0,an.persistObjectiveChatPanelWidth)(c),c})},[]);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(ar,{onResize:ak}),(0,b.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":`${n}px`},children:[(0,b.jsx)(ay,{message:H}),aa?(0,b.jsx)("div",{className:"border-b border-[var(--border)] px-4 py-4",children:(0,b.jsxs)("button",{type:"button",onClick:()=>t("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,b.jsx)(g.ArrowLeft,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{className:"truncate",children:_?.title??"Loading session..."})]})}):(0,b.jsx)("div",{className:"border-b border-[var(--border)] px-4 py-4",children:(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("p",{className:"text-xs font-semibold uppercase tracking-[0.18em] text-[var(--muted-foreground)]",children:"Strategy Sessions"}),(0,b.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,b.jsx)("div",{className:`min-h-0 flex-1 overflow-y-auto pb-[calc(15rem+env(safe-area-inset-bottom))] ${aa?"px-4 py-4":"px-0 py-0"}`,children:aa?0===ai.length?(0,b.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2 px-4 text-center text-[var(--muted-foreground)]",children:[(0,b.jsx)("p",{className:"text-sm font-medium text-[var(--foreground)]",children:"Loading strategy session"}),(0,b.jsx)("p",{className:"max-w-sm text-xs",children:"The conversation will appear here once the session history is ready."})]}):(0,b.jsxs)("div",{className:"space-y-5",children:[ai.map(a=>{let c=a.participantId?Y.get(a.participantId):null;return(0,b.jsxs)("div",{className:"flex gap-3",children:["user"===a.role?(0,b.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,b.jsx)(r.User,{className:"h-4 w-4"})}):(0,b.jsx)("img",{src:(0,A.agentAvatarUrl)(a.participantId??"assistant",32,c?.color),alt:c?.name??"Agent",className:"h-8 w-8 shrink-0 rounded-full border border-[var(--border)] object-cover"}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-sm font-medium text-[var(--foreground)]",children:"user"===a.role?"You":c?.name??"Agent"}),(0,b.jsx)("span",{className:"text-[11px] text-[var(--muted-foreground)]",children:new Date(a.timestamp).toLocaleString([],{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})})]}),(0,b.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,b.jsx)(z.Markdown,{content:a.content,isUser:"user"===a.role})})]})]},a.id)}),aj.map(([a])=>{let c=Y.get(a);return(0,b.jsxs)("div",{className:"flex items-center gap-3 text-sm text-[var(--muted-foreground)]",children:[(0,b.jsx)("img",{src:(0,A.agentAvatarUrl)(a,32,c?.color),alt:c?.name??"Agent",className:"h-8 w-8 shrink-0 rounded-full border border-[var(--border)] object-cover"}),(0,b.jsxs)("span",{children:[c?.name??"Agent"," is thinking..."]})]},`stream-${a}`)})]}):0===$.length?(0,b.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2 px-4 text-center text-[var(--muted-foreground)]",children:[(0,b.jsx)("p",{className:"text-sm font-medium text-[var(--foreground)]",children:"No strategy sessions yet"}),(0,b.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,b.jsx)("div",{className:"divide-y divide-[var(--border)]",children:$.map(a=>{var c;let d=ad.get(a.rootMessageId)??null;return(0,b.jsxs)("button",{type:"button",onClick:()=>{v(a.rootMessageId),t("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,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)("p",{className:"truncate text-sm font-medium text-[var(--foreground)]",children:a.title}),(0,b.jsxs)("p",{className:"mt-1 text-[11px] text-[var(--muted-foreground)]",children:[1===(c=a.messageCount)?"1 message":`${c} messages`," · Last"," ",as(a.updatedAt)]})]}),(0,b.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[d?(0,b.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"===d?"Queued":"Working"}):null,(0,b.jsx)(h.ArrowRight,{className:"mt-0.5 h-4 w-4 text-[var(--muted-foreground)]"})]})]},a.rootMessageId)})})}),(0,b.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,b.jsx)(y.Composer,{onSend:ah,onStop:ag,participants:F,commands:[],projectId:a,projectSlug:c,loading:"ready"!==ae,activityStatus:ae,sendInterruptsBusy:!0,placeholder:aa?`Continue strategy for "${d.title}"...`:`Start a new strategy session for "${d.title}"...`,initialPinnedParticipantId:F[0]?.id})})]})]})}function ax({label:a}){return(0,b.jsx)("div",{className:"flex h-full items-center justify-center text-sm text-[var(--muted-foreground)]",children:a})}function ay({message:a}){return a?(0,b.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,b.jsx)(f.AlertTriangle,{className:"h-4 w-4"}),(0,b.jsx)("span",{children:a})]}):null}function az({content:a,editable:c=!1,onChange:d,placeholder:e}){let f=a.trim().length>0;return c||f?(0,b.jsx)("div",{className:"overflow-hidden border-l-2 border-[var(--border)]/60 pl-4 transition-all focus-within:border-indigo-500/60",children:c||f?(0,b.jsx)(B.default,{content:a,editable:c,onChange:d,placeholder:e}):null}):null}function aA({onResize:a}){let{isTouchLayout:c}=(0,al.useInputCapabilities)();return c?null:(0,b.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:b=>{b.preventDefault();let c=b.clientX;document.body.style.cursor="col-resize",document.body.style.userSelect="none";let d=b=>{let d=b.clientX-c;c=b.clientX,a(d)},e=()=>{document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",e)};window.addEventListener("mousemove",d),window.addEventListener("mouseup",e)},children:(0,b.jsx)("div",{className:"absolute inset-y-0 -left-0.5 w-1 transition-colors group-hover:bg-[var(--primary)]/40"})})}function aB({objective:a,activityCount:c,lastActivityAt:d,activeAgentIds:e,participants:f,isSelected:g,onSelect:h}){let i,j=(i=1===c?"1 activity":`${c} activities`,d?`${i} \xb7 Last ${as(d)}`:`${i} \xb7 No activity yet`);return(0,b.jsx)("article",{className:"px-2",children:(0,b.jsxs)("button",{type:"button",onClick:h,"aria-label":`Open details for ${a.title}`,className:`group flex w-full items-center gap-3 rounded-xl px-2 py-2 text-left transition-colors ${g?"bg-[var(--primary)]/10 border border-[var(--primary)]/20":"border border-transparent hover:bg-[var(--secondary)]"}`,children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1 py-0.5",children:[(0,b.jsx)("div",{className:"flex min-w-0 items-center gap-2",children:(0,b.jsx)("span",{className:`rounded-full border px-1.5 py-0 text-[9px] font-semibold uppercase tracking-[0.12em] ${aq[a.status].chipClass}`,children:aq[a.status].label})}),(0,b.jsx)("p",{className:"mt-1 truncate text-sm font-medium text-[var(--foreground)]",children:a.title}),(0,b.jsx)("p",{className:"mt-0.5 text-[11px] text-[var(--muted-foreground)]",children:j})]}),e&&e.length>0&&(0,b.jsx)("span",{className:"inline-flex items-center -space-x-1 shrink-0",children:e.slice(0,3).map(a=>{let c=f?.find(b=>b.id===a);return(0,b.jsxs)("span",{className:"relative inline-block",title:c?.name??a,children:[(0,b.jsx)("img",{src:(0,A.agentAvatarUrl)(a,16,c?.color??void 0),alt:c?.name??a,className:"h-3 w-3 rounded-full ring-[1.5px] ring-[var(--background)]"}),(0,b.jsx)("span",{className:"absolute -bottom-px -right-px h-1.5 w-1.5 rounded-full bg-green-500 ring-[1px] ring-[var(--background)]"})]},a)})})]})})}function aC({projectSlug:a,initialObjectiveId:c}){let{isLoading:d,project:f,workspace:g,teams:h,persistWorkspace:i}=au(a),j=g.objectives,[k,l]=(0,e.useState)(c??null),[m,n]=(0,e.useState)(()=>(0,an.loadObjectiveListPanelWidth)()||320),[p,q]=(0,e.useState)(null),[r,s]=(0,e.useState)(!1),[t,u]=(0,e.useState)(null),[v,w]=(0,e.useState)(new Map),[x,y]=(0,e.useState)([]);(0,e.useEffect)(()=>{!k&&j.length>0&&l(j[0].id)},[k,j]),(0,e.useEffect)(()=>{k&&j.length>0&&!j.some(a=>a.id===k)&&l(j[0]?.id??null)},[k,j]),(0,e.useEffect)(()=>{let a=!1;return async function(){try{let b=await fetch("/api/participants");b.ok&&!a&&y(await b.json())}catch{}}(),()=>{a=!0}},[]),(0,e.useEffect)(()=>{let a=new Map;for(let b of j)b.threadId&&a.set(b.threadId,b.id);if(0===a.size)return;let b=!1;async function c(){try{let c=Array.from(a.keys()).join(","),d=await fetch(`/api/chat-runs/active-agents?threadIds=${encodeURIComponent(c)}`);if(!d.ok||b)return;let e=await d.json(),f=new Map;for(let[b,c]of Object.entries(e.activeAgents??{})){let d=a.get(b);d&&Array.isArray(c)&&c.length>0&&f.set(d,c)}b||w(f)}catch{}}c();let d=setInterval(()=>void c(),5e3);return()=>{b=!0,clearInterval(d)}},[j]);let z=async()=>{if(!p)return;let a=p.title.trim();if(!a)return void u("Objective statement is required.");let b=p.teamId.trim();if(!b)return void u("Team is required.");let c=new Date().toISOString(),d=(0,ap.createProjectObjective)({title:a,teamId:b,key:(0,ap.generateProjectObjectiveKey)(a,g.objectives),summary:p.summary,now:c});s(!0),u(null);try{await i((0,ap.upsertProjectObjective)(g,d));try{await fetch(`/api/projects/${f?.id}/objectives/${d.id}/worker`,{method:"POST",headers:{"Content-Type":"application/json"}})}catch{}q(null),l(d.id)}catch(a){u(a instanceof Error?a.message:"Failed to save objective updates.")}finally{s(!1)}},A=(0,e.useCallback)(a=>{n(b=>{let c=Math.max(240,Math.min(480,b+a));return(0,an.persistObjectiveListPanelWidth)(c),c})},[]);return d&&!f?(0,b.jsx)(ax,{label:"Loading objectives..."}):f?(0,b.jsxs)("div",{className:"flex h-full min-h-0 overflow-hidden bg-[var(--background)] text-[var(--foreground)]",children:[(0,b.jsxs)("div",{className:"flex flex-shrink-0 flex-col border-r border-[var(--border)] bg-[var(--background)]",style:{width:m},children:[(0,b.jsxs)("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-4 py-3",children:[(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)("p",{className:"text-xs font-semibold uppercase tracking-[0.12em] text-[var(--muted-foreground)]",children:"Objectives"}),(0,b.jsx)("p",{className:"mt-0.5 text-[11px] text-[var(--muted-foreground)]",children:0===j.length?"None yet":`${j.length} total`})]}),(0,b.jsx)("button",{type:"button",onClick:()=>q(at()),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,b.jsx)(o.Plus,{className:"h-4 w-4"})})]}),(0,b.jsx)(ay,{message:t}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto py-1",children:0===j.length?(0,b.jsxs)("div",{className:"px-4 py-8 text-center",children:[(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"No objectives yet."}),(0,b.jsx)("button",{type:"button",onClick:()=>q(at()),className:"mt-2 text-sm text-[var(--primary)] hover:underline",children:"Create one"})]}):(0,b.jsx)("div",{className:"space-y-0.5",children:j.map(a=>{let c=(0,ap.buildObjectiveTimelineActivities)({objective:a,workspace:g});return(0,b.jsx)(aB,{objective:a,activityCount:c.length,lastActivityAt:c[0]?.createdAt??null,activeAgentIds:v.get(a.id),participants:x,isSelected:k===a.id,onSelect:()=>l(a.id)},a.id)})})})]}),(0,b.jsx)(aA,{onResize:A}),(0,b.jsx)("div",{className:"flex-1 min-w-0 min-h-0 overflow-hidden",children:k?(0,b.jsx)(aD,{projectSlug:a,objectiveId:k,onObjectiveDeleted:()=>l(null)}):(0,b.jsx)("div",{className:"flex h-full items-center justify-center text-sm text-[var(--muted-foreground)]",children:0===j.length?"Create an objective to get started.":"Select an objective from the list."})}),p?(0,b.jsx)(aF,{mode:"create",draft:p,teams:h,isSaving:r,onChange:q,onClose:()=>q(null),onSave:()=>void z()}):null]}):(0,b.jsx)(ax,{label:"Project not found."})}function aD({projectSlug:a,objectiveId:f,onObjectiveDeleted:g}){var h;let i,r,v,w,x,y,A,B,D,E=(0,d.useRouter)(),{isLoading:F,project:H,workspace:I,teams:J,persistWorkspace:K,refetchProject:L}=au(a),M=(0,e.useMemo)(()=>I.objectives.find(a=>a.id===f)??null,[f,I.objectives]),N=M?(h=M.teamId,J.find(a=>a.id===h)?.name??null):null,[O,P]=(0,e.useState)(null),[Q,R]=(0,e.useState)(null),[S,U]=(0,e.useState)("activity"),[V,W]=(0,e.useState)(0),[X,Y]=(0,e.useState)(!1),[Z,$]=(0,e.useState)(null),[aa,ab]=(0,e.useState)([]),[ac,ad]=(0,e.useState)(!1),[ae,af]=(0,e.useState)(null),[ag,ah]=(0,e.useState)({}),[ai,al]=(0,e.useState)({}),[am,an]=(0,e.useState)(new Set),[ao,ar]=(0,e.useState)(!1),[at,av]=(0,e.useState)(""),[aA,aB]=(0,e.useState)([]),[aC,aD]=(0,e.useState)([]),[aF,aG]=(0,e.useState)([]),[aH,aI]=(0,e.useState)(null),[aJ,aK]=(0,e.useState)(!1),{jobs:aL}=(0,G.usePromptJobs)(H?.id??null,{requireProjectId:!0,includeObjectiveJobs:!0,objectiveId:f}),aM=(0,e.useMemo)(()=>aL.filter(a=>a.objectiveId===f).length,[aL,f]),aN=async a=>{Y(!0),$(null);try{await K(a)}catch(a){throw $(a instanceof Error?a.message:"Failed to save objective updates."),a}finally{Y(!1)}},aO=async()=>{if(!O||!M)return;let a=O.title.trim();if(!a)return void $("Objective statement is required.");let b={...M,title:a,updatedAt:new Date().toISOString()};await aN((0,ap.upsertProjectObjective)(I,b)),P(null)},aP=(0,e.useCallback)(async()=>{if(H?.id&&M?.id){ad(!0);try{let a=await fetch(`/api/projects/${H.id}/objectives/${M.id}/notes?limit=100`);if(a.ok){let b=await a.json();ab(b.notes??[])}}catch{}finally{ad(!1)}}},[H?.id,M?.id]);(0,e.useEffect)(()=>{aP()},[aP]),(0,e.useEffect)(()=>{"notes"===S&&aP()},[S,aP]),(0,e.useEffect)(()=>{if(!H?.id||!M?.id)return;let a=new Set;for(let[b,c]of Object.entries(ag)){let d=aa.find(a=>a.id===b);d&&d.body!==c&&a.add(b)}for(let[b,c]of Object.entries(ai)){let d=aa.find(a=>a.id===b);d&&d.title!==c&&a.add(b)}if(0===a.size)return;let b=[];for(let c of a){let a={},d=ag[c],e=ai[c],f=aa.find(a=>a.id===c);if(!f||(void 0!==d&&d!==f.body&&(a.body=d),void 0!==e&&e!==f.title&&e.trim()&&(a.title=e.trim()),0===Object.keys(a).length))continue;let g=window.setTimeout(async()=>{an(a=>new Set(a).add(c));try{let b=await fetch(`/api/projects/${H.id}/objectives/${M.id}/notes/${c}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(b.ok){let a=await b.json();ab(b=>b.map(b=>b.id===c?a.note:b))}}catch{$("Failed to save note.")}finally{an(a=>{let b=new Set(a);return b.delete(c),b})}},700);b.push(g)}return()=>{for(let a of b)window.clearTimeout(a)}},[ag,ai,aa,H?.id,M?.id]);let aQ=async()=>{if(H?.id&&M?.id){ar(!0);try{let a=await fetch(`/api/projects/${H.id}/objectives/${M.id}/notes`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:"Untitled",body:""})});if(a.ok){let b=await a.json();ab(a=>[b.note,...a]),af(b.note.id)}}catch{$("Failed to create note.")}finally{ar(!1)}}},aR=async a=>{if(H?.id&&M?.id)try{let b=await fetch(`/api/projects/${H.id}/objectives/${M.id}/notes/${a}`,{method:"DELETE"});(b.ok||204===b.status)&&(ab(b=>b.filter(b=>b.id!==a)),ae===a&&af(null))}catch{$("Failed to delete note.")}},aS=async()=>{!M||window.confirm(`Delete "${M.title}"?`)&&(await aN((0,ap.removeProjectObjective)(I,M.id)),g?g():E.push(`/projects/${a}`))},aT=(0,e.useCallback)(async a=>{M&&M.threadId!==a&&await aN((0,ap.upsertProjectObjective)(I,{...M,threadId:a,updatedAt:new Date().toISOString()}))},[M,aN,I]),aU=(0,e.useCallback)(async a=>{if(!H?.id||!M?.id)return $("Objective not found."),!1;$(null);try{let b=await fetch(`/api/projects/${H.id}/objectives/${M.id}/scheduled-tasks`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...a,prompt:function(a,b){let c=b.trim();if(!c)return c;let d=`Objective label: ${a.key}`;return c.toLowerCase().includes(d.toLowerCase())?c:[d,`Write your output as an activity file at ~/.agx/projects/<project>/objectives/${a.key}/activities/<timestamp>-<slug>.md
17
+ - After any edit, call \`GET ${u}\` 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 ${p} with JSON fields such as {"title","teamId","key"} to update the objective itself.`,`- GET ${r} to list all notes for this objective. Returns {"notes":[...],"total","page","limit","hasMore"}.`,`- POST ${r} with {"title","body"} to create a new note.`,`- GET ${r}/{noteId} to read a single note.`,`- PATCH ${r}/{noteId} with {"title","body"} to update a note.`,`- DELETE ${r}/{noteId} to delete a note.`,`- GET ${q} to inspect the scheduled tasks already tracked for this objective.`,`- POST ${q} with {"name","prompt","cadence","agentId"} to create a scheduled task for this objective.`,`- GET ${u} to validate the objective file on disk. Returns {"valid":true} or {"valid":false,"errors":[...]}.`,"Tracker integrations:",`- Available tracker types: ${o.available.length>0?o.available.map(a=>`${a.displayName} (${a.type})`).join(", "):"none registered"}.`,`- Configured for this project: ${o.configured.length>0?o.configured.map(a=>{let b=o.defaultType===a.type;return`${a.displayName} (${a.type})${b?" — default":""}`}).join(", "):"none — ask the user to connect a tracker in project settings if they want ticket workflows"}.`,o.defaultType?`- Default tracker for ticket workflows: ${o.defaultType}. Prefer this tracker when creating or referencing tickets for this objective unless the user asks otherwise.`:o.configured.length>1?"- No default tracker has been selected; ask the user which connected tracker to use before creating tickets.":"",...o.configured.map(b=>`- GET /api/trackers/${b.type}/items?projectId=${a} to list ${b.displayName} items. Filter client-side by label "${f.key}" to find tickets tied to this objective.`)].filter(Boolean).join("\n\n")),m].filter(Boolean).join("\n\n"),A=await Z(b,d,w,y,e,g,h?[h]:x,c,z,n);!y&&A&&(G(A),E("detail"))},[null,an,ay,aC,aw,f,N,a,c,F,Z,i]),aE=(0,e.useMemo)(()=>aw?au?.messages??[]:[],[aw,au]),aF=(0,e.useMemo)(()=>aw&&F?Object.entries(ad).filter(([,a])=>a.rootMessageId===F):[],[aw,F,ad]),aG=(0,e.useCallback)(a=>{p(b=>{let c=Math.max(320,Math.min(1200,b-a));return(0,ak.persistObjectiveChatPanelWidth)(c),c})},[]);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(ao,{onResize:aG}),(0,b.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":`${o}px`},children:[(0,b.jsx)(av,{message:P}),aw?(0,b.jsx)("div",{className:"border-b border-[var(--border)] px-4 py-4",children:(0,b.jsxs)("button",{type:"button",onClick:()=>E("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,b.jsx)(g.ArrowLeft,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{className:"truncate",children:au?.title??"Loading session..."})]})}):(0,b.jsx)("div",{className:"border-b border-[var(--border)] px-4 py-4",children:(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("p",{className:"text-xs font-semibold uppercase tracking-[0.18em] text-[var(--muted-foreground)]",children:"Strategy Sessions"}),(0,b.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,b.jsx)("div",{ref:T,className:`min-h-0 flex-1 overflow-y-auto pb-[calc(15rem+env(safe-area-inset-bottom))] ${aw?"px-4 py-4":"px-0 py-0"}`,children:aw?0===aE.length?(0,b.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2 px-4 text-center text-[var(--muted-foreground)]",children:[(0,b.jsx)("p",{className:"text-sm font-medium text-[var(--foreground)]",children:"Loading strategy session"}),(0,b.jsx)("p",{className:"max-w-sm text-xs",children:"The conversation will appear here once the session history is ready."})]}):(0,b.jsxs)("div",{className:"space-y-5",children:[aE.map(a=>{let c=a.participantId?aq.get(a.participantId):null,d=H===a.id;return(0,b.jsxs)("div",{"data-objective-message-id":a.id,className:`flex gap-3 rounded-2xl transition-colors ${d?"bg-[var(--status-in-progress-bg)] p-2 -m-2":""}`,children:["user"===a.role?(0,b.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,b.jsx)(r.User,{className:"h-4 w-4"})}):(0,b.jsx)("img",{src:(0,B.agentAvatarUrl)(a.participantId??"assistant",32,c?.color),alt:c?.name??"Agent",className:"h-8 w-8 shrink-0 rounded-full border border-[var(--border)] object-cover"}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-sm font-medium text-[var(--foreground)]",children:"user"===a.role?"You":c?.name??"Agent"}),(0,b.jsx)("span",{className:"text-[11px] text-[var(--muted-foreground)]",children:new Date(a.timestamp).toLocaleString([],{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})})]}),(0,b.jsx)("div",{className:"mt-2 rounded-2xl border border-[var(--border)] bg-[var(--overlay-panel-muted)] px-4 py-3 text-[15px] leading-relaxed text-[var(--foreground)]",children:"user"===a.role?(0,b.jsx)(z.Markdown,{content:(0,C.stripMarkers)(a.content),isUser:!0}):(0,b.jsx)(A.StreamingSegments,{content:(0,C.stripMarkers)(a.content)})})]})]},a.id)}),aF.map(([a])=>{let c=aq.get(a);return(0,b.jsxs)("div",{className:"flex items-center gap-3 text-sm text-[var(--muted-foreground)]",children:[(0,b.jsx)("img",{src:(0,B.agentAvatarUrl)(a,32,c?.color),alt:c?.name??"Agent",className:"h-8 w-8 shrink-0 rounded-full border border-[var(--border)] object-cover"}),(0,b.jsxs)("span",{children:[c?.name??"Agent"," is thinking..."]})]},`stream-${a}`)}),(0,b.jsx)("div",{ref:U})]}):0===at.length?(0,b.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2 px-4 text-center text-[var(--muted-foreground)]",children:[(0,b.jsx)("p",{className:"text-sm font-medium text-[var(--foreground)]",children:"No strategy sessions yet"}),(0,b.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,b.jsx)("div",{className:"divide-y divide-[var(--border)]",children:at.map(a=>{var c;let d=az.get(a.rootMessageId)??null;return(0,b.jsxs)("button",{type:"button",onClick:()=>{G(a.rootMessageId),E("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,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)("p",{className:"truncate text-sm font-medium text-[var(--foreground)]",children:a.title}),(0,b.jsxs)("p",{className:"mt-1 text-[11px] text-[var(--muted-foreground)]",children:[1===(c=a.messageCount)?"1 message":`${c} messages`," · Last"," ",ap(a.updatedAt)]})]}),(0,b.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[d?(0,b.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"===d?"Queued":"Working"}):null,(0,b.jsx)(h.ArrowRight,{className:"mt-0.5 h-4 w-4 text-[var(--muted-foreground)]"})]})]},a.rootMessageId)})})}),(0,b.jsx)(ag.JumpToLatestButton,{visible:aw&&V&&aE.length>10,onClick:ah,direction:"bottom",offsetClassName:"bottom-[calc(15rem+env(safe-area-inset-bottom))]"}),(0,b.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,b.jsx)(y.Composer,{onSend:aD,onStop:aC,participants:N,commands:[],projectId:a,projectSlug:c,loading:"ready"!==aA,activityStatus:aA,sendInterruptsBusy:!0,placeholder:aw?`Continue strategy for "${f.title}"...`:`Start a new strategy session for "${f.title}"...`,initialPinnedParticipantId:N[0]?.id})})]})]})}function au({label:a}){return(0,b.jsx)("div",{className:"flex h-full items-center justify-center text-sm text-[var(--muted-foreground)]",children:a})}function av({message:a}){return a?(0,b.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,b.jsx)(f.AlertTriangle,{className:"h-4 w-4"}),(0,b.jsx)("span",{children:a})]}):null}function aw({content:a,editable:c=!1,onChange:d,placeholder:e}){let f=a.trim().length>0;return c||f?(0,b.jsx)("div",{className:"overflow-hidden border-l-2 border-[var(--border)]/60 pl-4 transition-all focus-within:border-indigo-500/60",children:c||f?(0,b.jsx)(D.default,{content:a,editable:c,onChange:d,placeholder:e}):null}):null}function ax({onResize:a}){let{isTouchLayout:c}=(0,ai.useInputCapabilities)();return c?null:(0,b.jsx)(ah.ResizeHandle,{onResize:a,ariaLabel:"Resize objective list panel"})}function ay({objective:a,activityCount:c,lastActivityAt:d,activeAgentIds:e,participants:f,isSelected:g,onSelect:h}){let i,j=(i=1===c?"1 activity":`${c} activities`,d?`${i} \xb7 Last ${ap(d)}`:`${i} \xb7 No activity yet`);return(0,b.jsx)("article",{className:"px-2",children:(0,b.jsxs)("button",{type:"button",onClick:h,"aria-label":`Open details for ${a.title}`,className:`group flex w-full items-center gap-3 rounded-xl px-2 py-2 text-left transition-colors ${g?"bg-[var(--primary)]/10 border border-[var(--primary)]/20":"border border-transparent hover:bg-[var(--secondary)]"}`,children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1 py-0.5",children:[(0,b.jsx)("div",{className:"flex min-w-0 items-center gap-2",children:(0,b.jsx)("span",{className:`rounded-full border px-1.5 py-0 text-[9px] font-semibold uppercase tracking-[0.12em] ${an[a.status].chipClass}`,children:an[a.status].label})}),(0,b.jsx)("p",{className:"mt-1 truncate text-sm font-medium text-[var(--foreground)]",children:a.title}),(0,b.jsx)("p",{className:"mt-0.5 text-[11px] text-[var(--muted-foreground)]",children:j})]}),e&&e.length>0&&(0,b.jsx)("span",{className:"inline-flex items-center -space-x-1 shrink-0",children:e.slice(0,3).map(a=>{let c=f?.find(b=>b.id===a);return(0,b.jsxs)("span",{className:"relative inline-block",title:c?.name??a,children:[(0,b.jsx)("img",{src:(0,B.agentAvatarUrl)(a,16,c?.color??void 0),alt:c?.name??a,className:"h-3 w-3 rounded-full ring-[1.5px] ring-[var(--background)]"}),(0,b.jsx)("span",{className:"absolute -bottom-px -right-px h-1.5 w-1.5 rounded-full bg-green-500 ring-[1px] ring-[var(--background)]"})]},a)})})]})})}function az({projectSlug:a,initialObjectiveId:c}){let{isLoading:d,project:f,workspace:g,teams:h,persistWorkspace:i}=ar(a),j=g.objectives,[k,l]=(0,e.useState)(c??null),[m,n]=(0,e.useState)(()=>(0,ak.loadObjectiveListPanelWidth)()||320),[p,q]=(0,e.useState)(null),[r,s]=(0,e.useState)(!1),[t,u]=(0,e.useState)(null),[v,w]=(0,e.useState)(new Map),[x,y]=(0,e.useState)([]);(0,e.useEffect)(()=>{!k&&j.length>0&&l(j[0].id)},[k,j]),(0,e.useEffect)(()=>{k&&j.length>0&&!j.some(a=>a.id===k)&&l(j[0]?.id??null)},[k,j]),(0,e.useEffect)(()=>{let a=!1;return async function(){try{let b=await fetch("/api/participants");b.ok&&!a&&y(await b.json())}catch{}}(),()=>{a=!0}},[]),(0,e.useEffect)(()=>{let a=new Map;for(let b of j)b.threadId&&a.set(b.threadId,b.id);if(0===a.size)return;let b=!1;async function c(){try{let c=Array.from(a.keys()).join(","),d=await fetch(`/api/chat-runs/active-agents?threadIds=${encodeURIComponent(c)}`);if(!d.ok||b)return;let e=await d.json(),f=new Map;for(let[b,c]of Object.entries(e.activeAgents??{})){let d=a.get(b);d&&Array.isArray(c)&&c.length>0&&f.set(d,c)}b||w(f)}catch{}}c();let d=setInterval(()=>void c(),5e3);return()=>{b=!0,clearInterval(d)}},[j]);let z=async()=>{if(!p)return;let a=p.title.trim();if(!a)return void u("Objective statement is required.");let b=p.teamId.trim();if(!b)return void u("Team is required.");let c=new Date().toISOString(),d=(0,am.createProjectObjective)({title:a,teamId:b,key:(0,am.generateProjectObjectiveKey)(a,g.objectives),summary:p.summary,now:c});s(!0),u(null);try{await i((0,am.upsertProjectObjective)(g,d));try{await fetch(`/api/projects/${f?.id}/objectives/${d.id}/worker`,{method:"POST",headers:{"Content-Type":"application/json"}})}catch{}q(null),l(d.id)}catch(a){u(a instanceof Error?a.message:"Failed to save objective updates.")}finally{s(!1)}},A=(0,e.useCallback)(a=>{n(b=>{let c=Math.max(240,Math.min(480,b+a));return(0,ak.persistObjectiveListPanelWidth)(c),c})},[]);return d&&!f?(0,b.jsx)(au,{label:"Loading objectives..."}):f?(0,b.jsxs)("div",{className:"flex h-full min-h-0 overflow-hidden bg-[var(--background)] text-[var(--foreground)]",children:[(0,b.jsxs)("div",{className:"flex flex-shrink-0 flex-col border-r border-[var(--border)] bg-[var(--background)]",style:{width:m},children:[(0,b.jsxs)("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-4 py-3",children:[(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)("p",{className:"text-xs font-semibold uppercase tracking-[0.12em] text-[var(--muted-foreground)]",children:"Objectives"}),(0,b.jsx)("p",{className:"mt-0.5 text-[11px] text-[var(--muted-foreground)]",children:0===j.length?"None yet":`${j.length} total`})]}),(0,b.jsx)("button",{type:"button",onClick:()=>q(aq()),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,b.jsx)(o.Plus,{className:"h-4 w-4"})})]}),(0,b.jsx)(av,{message:t}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto py-1",children:0===j.length?(0,b.jsxs)("div",{className:"px-4 py-8 text-center",children:[(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"No objectives yet."}),(0,b.jsx)("button",{type:"button",onClick:()=>q(aq()),className:"mt-2 text-sm text-[var(--primary)] hover:underline",children:"Create one"})]}):(0,b.jsx)("div",{className:"space-y-0.5",children:j.map(a=>{let c=(0,am.buildObjectiveTimelineActivities)({objective:a,workspace:g});return(0,b.jsx)(ay,{objective:a,activityCount:c.length,lastActivityAt:c[0]?.createdAt??null,activeAgentIds:v.get(a.id),participants:x,isSelected:k===a.id,onSelect:()=>l(a.id)},a.id)})})})]}),(0,b.jsx)(ax,{onResize:A}),(0,b.jsx)("div",{className:"flex-1 min-w-0 min-h-0 overflow-hidden",children:k?(0,b.jsx)(aA,{projectSlug:a,objectiveId:k,onObjectiveDeleted:()=>l(null)}):(0,b.jsx)("div",{className:"flex h-full items-center justify-center text-sm text-[var(--muted-foreground)]",children:0===j.length?"Create an objective to get started.":"Select an objective from the list."})}),p?(0,b.jsx)(aC,{mode:"create",draft:p,teams:h,isSaving:r,onChange:q,onClose:()=>q(null),onSave:()=>void z()}):null]}):(0,b.jsx)(au,{label:"Project not found."})}function aA({projectSlug:a,objectiveId:f,onObjectiveDeleted:g}){var h;let i,r,v,w,x,y,A,B,C,D=(0,d.useRouter)(),{isLoading:F,project:G,workspace:H,teams:I,persistWorkspace:K,refetchProject:L}=ar(a),M=(0,e.useMemo)(()=>H.objectives.find(a=>a.id===f)??null,[f,H.objectives]),N=M?(h=M.teamId,I.find(a=>a.id===h)?.name??null):null,[P,Q]=(0,e.useState)(null),[R,S]=(0,e.useState)(null),[T,U]=(0,e.useState)("activity"),[V,X]=(0,e.useState)(0),[Y,Z]=(0,e.useState)(!1),[$,_]=(0,e.useState)(null),[aa,ab]=(0,e.useState)([]),[ac,ad]=(0,e.useState)(!1),[ah,ai]=(0,e.useState)(null),[aj,ak]=(0,e.useState)({}),[al,ao]=(0,e.useState)({}),[aq,as]=(0,e.useState)(new Set),[ax,ay]=(0,e.useState)(!1),[az,aA]=(0,e.useState)(""),[aC,aD]=(0,e.useState)([]),[aE,aF]=(0,e.useState)([]),[aG,aH]=(0,e.useState)([]),[aI,aJ]=(0,e.useState)(null),[aK,aL]=(0,e.useState)(!1),aM=(0,e.useRef)(null),[aN,aO]=(0,e.useState)(!1);(0,e.useEffect)(()=>{let a=aM.current;if(!a)return;let b=()=>aO(a.scrollTop>400);return a.addEventListener("scroll",b,{passive:!0}),()=>a.removeEventListener("scroll",b)},[f]);let aP=(0,e.useCallback)(()=>{aM.current?.scrollTo({top:0,behavior:"smooth"})},[]),{jobs:aQ}=(0,J.usePromptJobs)(G?.id??null,{requireProjectId:!0,includeObjectiveJobs:!0,objectiveId:f}),aR=(0,e.useMemo)(()=>aQ.filter(a=>a.objectiveId===f).length,[aQ,f]),aS=async a=>{Z(!0),_(null);try{await K(a)}catch(a){throw _(a instanceof Error?a.message:"Failed to save objective updates."),a}finally{Z(!1)}},aT=async()=>{if(!P||!M)return;let a=P.title.trim();if(!a)return void _("Objective statement is required.");let b={...M,title:a,updatedAt:new Date().toISOString()};await aS((0,am.upsertProjectObjective)(H,b)),Q(null)},aU=(0,e.useCallback)(async()=>{if(G?.id&&M?.id){ad(!0);try{let a=await fetch(`/api/projects/${G.id}/objectives/${M.id}/notes?limit=100`);if(a.ok){let b=await a.json();ab(b.notes??[])}}catch{}finally{ad(!1)}}},[G?.id,M?.id]);(0,e.useEffect)(()=>{aU()},[aU]),(0,e.useEffect)(()=>{"notes"===T&&aU()},[T,aU]),(0,e.useEffect)(()=>{if(!G?.id||!M?.id)return;let a=new Set;for(let[b,c]of Object.entries(aj)){let d=aa.find(a=>a.id===b);d&&d.body!==c&&a.add(b)}for(let[b,c]of Object.entries(al)){let d=aa.find(a=>a.id===b);d&&d.title!==c&&a.add(b)}if(0===a.size)return;let b=[];for(let c of a){let a={},d=aj[c],e=al[c],f=aa.find(a=>a.id===c);if(!f||(void 0!==d&&d!==f.body&&(a.body=d),void 0!==e&&e!==f.title&&e.trim()&&(a.title=e.trim()),0===Object.keys(a).length))continue;let g=window.setTimeout(async()=>{as(a=>new Set(a).add(c));try{let b=await fetch(`/api/projects/${G.id}/objectives/${M.id}/notes/${c}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(b.ok){let a=await b.json();ab(b=>b.map(b=>b.id===c?a.note:b))}}catch{_("Failed to save note.")}finally{as(a=>{let b=new Set(a);return b.delete(c),b})}},700);b.push(g)}return()=>{for(let a of b)window.clearTimeout(a)}},[aj,al,aa,G?.id,M?.id]);let aV=async()=>{if(G?.id&&M?.id){ay(!0);try{let a=await fetch(`/api/projects/${G.id}/objectives/${M.id}/notes`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:"Untitled",body:""})});if(a.ok){let b=await a.json();ab(a=>[b.note,...a]),ai(b.note.id)}}catch{_("Failed to create note.")}finally{ay(!1)}}},aW=async a=>{if(G?.id&&M?.id)try{let b=await fetch(`/api/projects/${G.id}/objectives/${M.id}/notes/${a}`,{method:"DELETE"});(b.ok||204===b.status)&&(ab(b=>b.filter(b=>b.id!==a)),ah===a&&ai(null))}catch{_("Failed to delete note.")}},aX=async()=>{!M||window.confirm(`Delete "${M.title}"?`)&&(await aS((0,am.removeProjectObjective)(H,M.id)),g?g():D.push(`/projects/${a}`))},aY=(0,e.useCallback)(async a=>{M&&M.threadId!==a&&await aS((0,am.upsertProjectObjective)(H,{...M,threadId:a,updatedAt:new Date().toISOString()}))},[M,aS,H]),aZ=(0,e.useCallback)(async a=>{if(!G?.id||!M?.id)return _("Objective not found."),!1;_(null);try{let b=await fetch(`/api/projects/${G.id}/objectives/${M.id}/scheduled-tasks`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...a,prompt:function(a,b){let c=b.trim();if(!c)return c;let d=`Objective label: ${a.key}`;return c.toLowerCase().includes(d.toLowerCase())?c:[d,`Write your output as an activity file at ~/.agx/projects/<project>/objectives/${a.key}/activities/<timestamp>-<slug>.md
19
19
  The file must have YAML frontmatter with: id (unique), source (your task ID), objectiveLabel: "${a.key}", createdAt (ISO), type (one of: metric-check, status-update, milestone, note).
20
- The markdown body below the frontmatter contains your output.`,c].join("\n\n")}(M,a.prompt)})}),c=await b.json().catch(()=>({}));if(!b.ok)throw Error(c.error||"Failed to create scheduled task.");return await L(),!0}catch(a){return $(a instanceof Error?a.message:"Failed to create scheduled task."),!1}},[M,H?.id,L]),aV=(0,e.useCallback)(async()=>{if(!H?.id||!M?.id)return $("Objective not found."),!1;if(!M.teamId)return $("Assign a team to this objective before creating a worker."),!1;$(null);try{let a=await fetch(`/api/projects/${H.id}/objectives/${M.id}/worker`,{method:"PUT"}),b=await a.json().catch(()=>({}));if(!a.ok)throw Error(b.error||"Failed to trigger objective worker.");return await L(),!0}catch(a){return $(a instanceof Error?a.message:"Failed to trigger objective worker."),!1}},[M,H?.id,L]);return((0,e.useEffect)(()=>{if(!H?.id||!M?.id||!M?.key){aB([]),aD([]),aG([]);return}let a=H.id,b=M.key,c=!1;return async function(){try{let d=await fetch(`/api/trackers/connections?projectId=${encodeURIComponent(a)}`);if(!d.ok){c||(aB([]),aD([]),aG([]));return}let e=await d.json();if(c)return;let f=Array.isArray(e.available)?e.available:[],g=(e.connections??[]).map(a=>({type:a.type,displayName:f.find(b=>b.type===a.type)?.displayName??a.type,connected:!1!==a.connected})),h="string"==typeof e.defaultTracker&&e.defaultTracker?e.defaultTracker:null;aG(f),aD(g),aI(h);let i=g.filter(a=>a.connected),j=h&&i.some(a=>a.type===h)?i.filter(a=>a.type===h):i;if(0===j.length)return void aB([]);let k=b.trim().toLowerCase(),l=await Promise.all(j.map(async b=>{try{let c=await fetch(`/api/trackers/${encodeURIComponent(b.type)}/items?projectId=${encodeURIComponent(a)}&limit=500`);if(!c.ok)return[];let d=await c.json();return(Array.isArray(d.items)?d.items:[]).filter(a=>(a.labels??[]).some(a=>a.trim().toLowerCase()===k)).map(a=>({id:a.id,trackerType:a.trackerType??b.type,identifier:a.identifier,title:a.title,url:a.url??null,status:a.status,assignee:a.assignee?.name??null,updatedAt:a.updatedAt,labels:a.labels}))}catch{return[]}}));if(c)return;aB(l.flat())}catch(a){if(c)return;console.warn("Failed to load objective tracker resources",a),aB([]),aD([]),aG([])}}(),()=>{c=!0}},[M?.id,M?.key,H?.id]),F&&!H)?(0,b.jsx)(ax,{label:"Loading objective..."}):H?M?(0,b.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,b.jsx)("div",{className:"flex-1 min-h-0 overflow-hidden",children:(0,b.jsxs)("div",{className:"flex h-full min-h-0 flex-col xl:flex-row",children:[(0,b.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto",children:(0,b.jsxs)("div",{className:"max-w-5xl mx-auto pt-16 px-8 pb-20",children:[(0,b.jsx)(ay,{message:Z}),(0,b.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,b.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:M.key}),(0,b.jsx)("span",{className:`rounded-full border px-2.5 py-0.5 text-[10px] font-semibold uppercase tracking-[0.18em] ${aq[M.status].chipClass}`,children:aq[M.status].label})]}),(0,b.jsx)("div",{className:"mb-6",children:O?(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("input",{autoFocus:!0,value:O.title,onChange:a=>P({...O,title:a.target.value}),onKeyDown:a=>{"Enter"===a.key&&aO(),"Escape"===a.key&&P(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,b.jsx)("button",{type:"button",onClick:()=>void aO(),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,b.jsx)(k.Check,{size:18})}),(0,b.jsx)("button",{type:"button",onClick:()=>P(null),className:"rounded-md p-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)]","aria-label":"Cancel editing",children:(0,b.jsx)(u.X,{size:18})})]}):(0,b.jsxs)("button",{type:"button","aria-label":`Edit objective ${M.title}`,className:"flex items-center gap-3 group cursor-pointer text-left",onClick:()=>P({id:M.id,title:M.title,teamId:M.teamId,summary:M.summary}),children:[(0,b.jsx)("h1",{className:"text-[28px] leading-tight font-semibold text-[var(--foreground)]",children:M.title}),(0,b.jsx)(n.Pencil,{size:16,className:"shrink-0 text-[var(--muted-foreground)] opacity-0 transition-opacity group-hover:opacity-100"})]})}),(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-x-6 gap-y-3 mb-10",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsxs)("span",{className:"flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-[var(--muted-foreground)]",children:[(0,b.jsx)(s.Users,{size:12})," Team"]}),(0,b.jsx)("span",{className:"text-[var(--app-shell-soft-text)]",children:"·"}),Q?(0,b.jsx)("div",{className:"min-w-[180px]",children:(0,b.jsx)(C.default,{options:J.map(a=>({id:a.id,label:a.name})),value:Q.teamId,onChange:a=>{R({teamId:a});let b=a.trim();b&&M&&(aN((0,ap.upsertProjectObjective)(I,{...M,teamId:b,updatedAt:new Date().toISOString()})),R(null))},placeholder:"Select a team…"})}):(0,b.jsxs)("button",{type:"button","aria-label":`Edit team for ${M.title}`,onClick:()=>R({teamId:M.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,b.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:(N??"?").charAt(0).toUpperCase()}),(0,b.jsx)("span",{className:"text-sm text-[var(--foreground)] transition-colors group-hover:text-[var(--primary)]",children:N??"Not assigned"})]})]}),H.id&&M.id?(0,b.jsx)(aj,{projectId:H.id,objectiveId:M.id,objectiveKey:M.key,metadata:H.metadata,currentProgress:M.progress,currentStatus:M.status,objectiveUpdatedAt:M.updatedAt}):null]}),(0,b.jsx)("div",{className:"mb-6",children:(0,b.jsxs)("button",{type:"button",onClick:async()=>{aK(!0),await aV(),aK(!1)},disabled:aJ,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,b.jsx)(t.Sparkles,{className:"h-4 w-4"}),aJ?"Working...":"Work on objective"]})}),(0,b.jsx)("div",{className:"mb-8 border-b border-[var(--border)]",children:(0,b.jsx)("nav",{className:"flex gap-1 -mb-px","aria-label":"Objective sections",children:[{id:"activity",label:"Activity",icon:l.Clock},{id:"notes",label:"Notes",icon:m.FileText},{id:"tasks",label:"Tasks",icon:a=>{let c=aC.filter(a=>a.connected),d=(aH&&c.some(a=>a.type===aH)?aH:c[0]?.type)??"tracker";return(0,b.jsx)(ak.TrackerIcon,{trackerType:d,className:"h-3.5 w-3.5"})}},{id:"scheduled-tasks",label:"Scheduled Jobs",icon:j}].map(a=>{let c,d;return(0,b.jsxs)("button",{type:"button",onClick:()=>U(a.id),className:`flex items-center gap-2 px-3 py-2.5 text-sm font-medium border-b-2 transition-colors ${S===a.id?"border-[var(--primary)] text-[var(--foreground)]":"border-transparent text-[var(--muted-foreground)] hover:border-[var(--border)] hover:text-[var(--foreground)]"}`,children:[(0,b.jsx)(a.icon,{size:14}),a.label,"activity"===a.id&&V>0&&(0,b.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:V}),"notes"===a.id&&aa.length>0&&(0,b.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:aa.length}),"tasks"===a.id&&(c=["done","canceled","cancelled","completed","duplicate"],(d=aA.filter((a,b,d)=>d.findIndex(b=>b.id===a.id)===b&&!c.includes(a.status.toLowerCase()))).length>0?(0,b.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:d.length}):null),"scheduled-tasks"===a.id&&aM>0&&(0,b.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:aM})]},a.id)})})}),(0,b.jsxs)("div",{className:"space-y-10",children:["notes"===S&&(0,b.jsxs)("section",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,b.jsxs)("div",{className:"relative flex-1",children:[(0,b.jsx)(p.Search,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--muted-foreground)]"}),(0,b.jsx)("input",{type:"text",value:at,onChange:a=>av(a.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,b.jsxs)("button",{type:"button",onClick:aQ,disabled:ao,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,b.jsx)(o.Plus,{size:14}),"New note"]})]}),ac?(0,b.jsx)("p",{className:"py-4 text-sm text-[var(--muted-foreground)]",children:"Loading notes..."}):0===aa.length?(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)] py-4",children:"No notes yet. Add one above."}):0===(r=(i=at.toLowerCase())?aa.filter(a=>a.title.toLowerCase().includes(i)||a.body.toLowerCase().includes(i)):aa).length?(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)] py-4",children:"No notes match your search."}):(0,b.jsx)("div",{className:"columns-1 gap-3 sm:columns-2 lg:columns-3",style:{columnFill:"balance"},children:r.map(a=>(0,b.jsxs)("button",{type:"button",onClick:()=>af(a.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,b.jsx)("div",{className:"px-3 pt-3 pb-1",children:(0,b.jsx)("h4",{className:"text-sm font-medium text-[var(--foreground)] leading-snug",children:a.title})}),a.body.trim()&&(0,b.jsx)("div",{className:"px-3 pb-2 text-xs text-[var(--muted-foreground)] line-clamp-4",children:(0,b.jsx)(z.Markdown,{content:a.body})}),(0,b.jsx)("div",{className:"flex items-center justify-between px-3 pb-2",children:(0,b.jsx)("span",{className:"text-[10px] text-[var(--muted-foreground)]",children:new Date(a.updatedAt).toLocaleDateString()})})]},a.id))}),ae&&(()=>{let a=aa.find(a=>a.id===ae);if(!a)return null;let c=ag[a.id]??a.body,d=ai[a.id]??a.title,e=am.has(a.id);return(0,b.jsx)("div",{className:"fixed inset-0 z-50 flex items-start justify-center bg-black/50 pt-[5vh]",onClick:a=>{a.target===a.currentTarget&&af(null)},children:(0,b.jsxs)("div",{className:"mx-6 w-full max-w-7xl rounded-xl border border-[var(--border)] bg-[var(--background)] shadow-xl",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[(0,b.jsx)("input",{type:"text",autoFocus:!0,value:d,onFocus:a=>{"Untitled"===d&&a.target.select()},onChange:b=>al(c=>({...c,[a.id]:b.target.value})),className:"flex-1 bg-transparent text-base font-semibold text-[var(--foreground)] focus:outline-none"}),(0,b.jsxs)("div",{className:"flex items-center gap-2 ml-3",children:[(0,b.jsx)("span",{className:"text-[11px] text-[var(--muted-foreground)]",children:e?"Saving...":new Date(a.updatedAt).toLocaleDateString()}),(0,b.jsx)("button",{type:"button",onClick:()=>aR(a.id),className:"p-1 text-[var(--muted-foreground)] transition-colors hover:text-[var(--destructive)]",children:(0,b.jsx)(q.Trash2,{size:14})}),(0,b.jsx)("button",{type:"button",onClick:()=>af(null),className:"p-1 text-[var(--muted-foreground)] transition-colors hover:text-[var(--foreground)]",children:(0,b.jsx)(u.X,{size:14})})]})]}),(0,b.jsx)("div",{className:"max-h-[75vh] overflow-y-auto px-5 py-4",children:(0,b.jsx)(az,{content:c,editable:!0,onChange:b=>ah(c=>({...c,[a.id]:b})),placeholder:"Write your note..."})})]})})})()]}),"activity"===S&&H.id&&M.id&&(0,b.jsx)(_,{projectId:H.id,objectiveId:M.id,onTotalChange:W}),"tasks"===S&&(v=aA.filter((a,b,c)=>c.findIndex(b=>b.id===a.id)===b),w=["done","canceled","cancelled","completed","duplicate"],x=v.filter(a=>!w.includes(a.status.toLowerCase())),y=v.filter(a=>w.includes(a.status.toLowerCase())).slice(-5),A=aC.filter(a=>a.connected),D=0===(B=aH&&A.some(a=>a.type===aH)?A.filter(a=>a.type===aH):A).length?null:B.map(a=>a.displayName).join(", "),(0,b.jsxs)("section",{children:[(0,b.jsx)("div",{className:"flex flex-wrap items-start justify-between gap-3 mb-4",children:(0,b.jsxs)("p",{className:"text-sm text-[var(--muted-foreground)]",children:["Tickets tracked by the objective label"," ",(0,b.jsx)("code",{className:"rounded bg-[var(--tone-neutral-bg)] px-1.5 py-0.5 font-mono text-[11px] text-[var(--foreground)]",children:M.key}),D?(0,b.jsxs)(b.Fragment,{children:[" across ",D,"."]}):"."]})}),0===B.length?(0,b.jsx)(aE,{label:0===aF.length?"No tracker integrations registered.":`Connect a tracker (${aF.map(a=>a.displayName).join(", ")}) to create and track tickets for this objective.`}):0===v.length?(0,b.jsx)(aE,{label:`No tracker tickets with label ${M.key} yet.`}):(0,b.jsxs)(b.Fragment,{children:[x.length>0&&(0,b.jsx)("div",{className:"space-y-3",children:x.map(c=>(0,b.jsxs)("div",{className:"rounded-xl border border-[var(--border)] bg-[var(--overlay-panel-muted)] p-4",children:[(0,b.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5 text-xs font-semibold uppercase tracking-[0.18em] text-[var(--muted-foreground)]",children:[(0,b.jsx)(ak.TrackerIcon,{trackerType:c.trackerType,className:"h-3 w-3"}),(0,b.jsx)("span",{children:c.identifier})]}),(0,b.jsx)("a",{href:c.url??`/projects/${a}/${c.trackerType}?issue=${c.id}`,target:c.url?"_blank":void 0,rel:c.url?"noreferrer":void 0,className:"mt-1 block text-sm font-medium text-[var(--foreground)] transition-colors hover:text-[var(--primary)]",children:c.title})]}),(0,b.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:c.status})]}),(0,b.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-2 text-[11px] text-[var(--muted-foreground)]",children:[(0,b.jsxs)("span",{children:["Updated ",as(c.updatedAt)]}),(0,b.jsx)("span",{children:c.assignee?`Assigned to ${c.assignee}`:"Unassigned"})]})]},c.id))}),y.length>0&&(0,b.jsxs)("div",{className:x.length>0?"mt-6":"",children:[(0,b.jsx)("p",{className:"text-[11px] font-medium uppercase tracking-[0.18em] text-[var(--muted-foreground)] mb-2",children:"Completed"}),(0,b.jsx)("div",{className:"space-y-0.5",children:y.map(c=>(0,b.jsxs)("a",{href:c.url??`/projects/${a}/${c.trackerType}?issue=${c.id}`,target:c.url?"_blank":void 0,rel:c.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,b.jsx)(ak.TrackerIcon,{trackerType:c.trackerType,className:"h-3 w-3 shrink-0"}),(0,b.jsx)("span",{className:"text-[11px] font-mono shrink-0",children:c.identifier}),(0,b.jsx)("span",{className:"text-[12px] truncate",children:c.title}),(0,b.jsx)("span",{className:"ml-auto shrink-0 text-[10px] text-[var(--app-shell-soft-text)] group-hover:text-[var(--muted-foreground)]",children:c.status})]},c.id))})]})]})]})),"scheduled-tasks"===S&&(0,b.jsx)("section",{children:(0,b.jsx)(T,{projectId:H.id,objectiveId:M.id,objectiveKey:M.key,createDefaults:{name:`Work on ${M.title}`},onCreateTask:aU})}),(0,b.jsxs)("section",{className:"pt-10",children:[(0,b.jsx)("div",{className:"mb-4",children:(0,b.jsx)("h2",{className:"text-sm font-semibold text-[var(--destructive)]",children:"Danger Zone"})}),(0,b.jsxs)("div",{className:"flex items-center justify-between rounded-xl border border-[var(--destructive-border)] bg-[var(--destructive-bg)] p-5",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-medium text-[var(--foreground)]",children:"Delete Objective"}),(0,b.jsx)("p",{className:"mt-1 text-sm text-[var(--muted-foreground)]",children:"Once you delete an objective, there is no going back."})]}),(0,b.jsxs)("button",{type:"button",onClick:()=>void aS(),"aria-label":`Delete objective ${M.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,b.jsx)(q.Trash2,{size:14})," Delete"]})]})]})]})]})}),(0,b.jsx)(aw,{projectId:H.id,projectSlug:a,objective:M,teamName:N,trackerConnections:aC,availableTrackers:aF,defaultTrackerType:aH,onThreadLinked:aT,onObjectiveUpdated:L})]})})}):(0,b.jsx)("div",{className:"flex h-full items-center justify-center px-4 bg-[var(--background)]",children:(0,b.jsxs)("div",{className:"rounded-xl border border-[var(--border)] bg-[var(--card-bg)] p-8 text-center",children:[(0,b.jsx)("p",{className:"text-lg font-semibold text-[var(--foreground)]",children:"Objective not found"}),(0,b.jsx)("p",{className:"mt-2 text-sm text-[var(--muted-foreground)]",children:"It may have been deleted or the link is stale."}),(0,b.jsx)(c.default,{href:`/projects/${a}`,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,b.jsx)(ax,{label:"Project not found."})}function aE({label:a}){return(0,b.jsx)("div",{className:"flex items-center rounded-xl border border-dashed border-[var(--border)] bg-[var(--overlay-panel-muted)] p-6",children:(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:a})})}function aF({mode:a,draft:c,teams:d=[],isSaving:e,onChange:f,onClose:g,onSave:h}){return(0,b.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/45 p-4",children:(0,b.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"edit"===a?"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,b.jsxs)("div",{className:"border-b border-[var(--border)] px-5 py-4",children:[(0,b.jsx)("h3",{className:"text-lg font-semibold text-[var(--foreground)]",children:"edit"===a?"Edit objective":"New objective"}),(0,b.jsx)("p",{className:"mt-1 text-sm text-[var(--muted-foreground)]",children:"edit"===a?"Update the tracking details for this objective.":"Keep the statement measurable and use notes only for context that matters."})]}),(0,b.jsxs)("div",{className:"space-y-4 px-5 py-5",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)(aG,{label:"Objective statement"}),(0,b.jsx)("input",{value:c.title,onChange:a=>f({...c,title:a.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"===a?(0,b.jsxs)("div",{children:[(0,b.jsx)(aG,{label:"Team"}),(0,b.jsxs)("select",{value:c.teamId,onChange:a=>f({...c,teamId:a.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,b.jsx)("option",{value:"",children:"Select a team"}),d.map(a=>(0,b.jsx)("option",{value:a.id,children:a.name},a.id))]}),(0,b.jsx)("p",{className:"mt-2 text-xs text-[var(--muted-foreground)]",children:"Teams can only own one objective at a time."})]}):null]}),(0,b.jsxs)("div",{className:"flex items-center justify-end gap-2 border-t border-[var(--border)] px-5 py-4",children:[(0,b.jsx)("button",{type:"button",onClick:g,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,b.jsx)("button",{type:"button",onClick:h,disabled:e,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:e?"Saving...":"edit"===a?"Save objective":"Create objective"})]})]})})}function aG({label:a}){return(0,b.jsx)("label",{className:"mb-2 block text-[11px] font-semibold uppercase tracking-[0.18em] text-[var(--muted-foreground)]",children:a})}a.s(["ProjectObjectivesOverview",()=>aC],739515)}];
20
+ The markdown body below the frontmatter contains your output.`,c].join("\n\n")}(M,a.prompt)})}),c=await b.json().catch(()=>({}));if(!b.ok)throw Error(c.error||"Failed to create scheduled task.");return await L(),!0}catch(a){return _(a instanceof Error?a.message:"Failed to create scheduled task."),!1}},[M,G?.id,L]),a$=(0,e.useCallback)(async()=>{if(!G?.id||!M?.id)return _("Objective not found."),!1;if(!M.teamId)return _("Assign a team to this objective before creating a worker."),!1;_(null);try{let a=await fetch(`/api/projects/${G.id}/objectives/${M.id}/worker`,{method:"PUT"}),b=await a.json().catch(()=>({}));if(!a.ok)throw Error(b.error||"Failed to trigger objective worker.");return await L(),!0}catch(a){return _(a instanceof Error?a.message:"Failed to trigger objective worker."),!1}},[M,G?.id,L]);return((0,e.useEffect)(()=>{if(!G?.id||!M?.id||!M?.key){aD([]),aF([]),aH([]);return}let a=G.id,b=M.key,c=!1;return async function(){try{let d=await fetch(`/api/trackers/connections?projectId=${encodeURIComponent(a)}`);if(!d.ok){c||(aD([]),aF([]),aH([]));return}let e=await d.json();if(c)return;let f=Array.isArray(e.available)?e.available:[],g=(e.connections??[]).map(a=>({type:a.type,displayName:f.find(b=>b.type===a.type)?.displayName??a.type,connected:!1!==a.connected})),h="string"==typeof e.defaultTracker&&e.defaultTracker?e.defaultTracker:null;aH(f),aF(g),aJ(h);let i=g.filter(a=>a.connected),j=h&&i.some(a=>a.type===h)?i.filter(a=>a.type===h):i;if(0===j.length)return void aD([]);let k=b.trim().toLowerCase(),l=await Promise.all(j.map(async b=>{try{let c=await fetch(`/api/trackers/${encodeURIComponent(b.type)}/items?projectId=${encodeURIComponent(a)}&limit=500`);if(!c.ok)return[];let d=await c.json();return(Array.isArray(d.items)?d.items:[]).filter(a=>(a.labels??[]).some(a=>a.trim().toLowerCase()===k)).map(a=>({id:a.id,trackerType:a.trackerType??b.type,identifier:a.identifier,title:a.title,url:a.url??null,status:a.status,assignee:a.assignee?.name??null,updatedAt:a.updatedAt,labels:a.labels}))}catch{return[]}}));if(c)return;aD(l.flat())}catch(a){if(c)return;console.warn("Failed to load objective tracker resources",a),aD([]),aF([]),aH([])}}(),()=>{c=!0}},[M?.id,M?.key,G?.id]),F&&!G)?(0,b.jsx)(au,{label:"Loading objective..."}):G?M?(0,b.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,b.jsx)("div",{className:"flex-1 min-h-0 overflow-hidden",children:(0,b.jsxs)("div",{className:"flex h-full min-h-0 flex-col xl:flex-row",children:[(0,b.jsxs)("div",{className:"relative min-h-0 flex-1 flex flex-col",children:[(0,b.jsx)("div",{ref:aM,className:"min-h-0 flex-1 overflow-y-auto",children:(0,b.jsxs)("div",{className:"max-w-5xl mx-auto pt-16 px-8 pb-20",children:[(0,b.jsx)(av,{message:$}),(0,b.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,b.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:M.key}),(0,b.jsx)("span",{className:`rounded-full border px-2.5 py-0.5 text-[10px] font-semibold uppercase tracking-[0.18em] ${an[M.status].chipClass}`,children:an[M.status].label})]}),(0,b.jsx)("div",{className:"mb-6",children:P?(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("input",{autoFocus:!0,value:P.title,onChange:a=>Q({...P,title:a.target.value}),onKeyDown:a=>{"Enter"===a.key&&aT(),"Escape"===a.key&&Q(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,b.jsx)("button",{type:"button",onClick:()=>void aT(),disabled:Y,className:"rounded-md p-1.5 text-[var(--primary)] transition-colors hover:bg-[var(--status-in-progress-bg)]","aria-label":"Save objective",children:(0,b.jsx)(k.Check,{size:18})}),(0,b.jsx)("button",{type:"button",onClick:()=>Q(null),className:"rounded-md p-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)]","aria-label":"Cancel editing",children:(0,b.jsx)(u.X,{size:18})})]}):(0,b.jsxs)("button",{type:"button","aria-label":`Edit objective ${M.title}`,className:"flex items-center gap-3 group cursor-pointer text-left",onClick:()=>Q({id:M.id,title:M.title,teamId:M.teamId,summary:M.summary}),children:[(0,b.jsx)("h1",{className:"text-[28px] leading-tight font-semibold text-[var(--foreground)]",children:M.title}),(0,b.jsx)(n.Pencil,{size:16,className:"shrink-0 text-[var(--muted-foreground)] opacity-0 transition-opacity group-hover:opacity-100"})]})}),(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-x-6 gap-y-3 mb-10",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsxs)("span",{className:"flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-[var(--muted-foreground)]",children:[(0,b.jsx)(s.Users,{size:12})," Team"]}),(0,b.jsx)("span",{className:"text-[var(--app-shell-soft-text)]",children:"·"}),R?(0,b.jsx)("div",{className:"min-w-[180px]",children:(0,b.jsx)(E.default,{options:I.map(a=>({id:a.id,label:a.name})),value:R.teamId,onChange:a=>{S({teamId:a});let b=a.trim();b&&M&&(aS((0,am.upsertProjectObjective)(H,{...M,teamId:b,updatedAt:new Date().toISOString()})),S(null))},placeholder:"Select a team…"})}):(0,b.jsxs)("button",{type:"button","aria-label":`Edit team for ${M.title}`,onClick:()=>S({teamId:M.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,b.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:(N??"?").charAt(0).toUpperCase()}),(0,b.jsx)("span",{className:"text-sm text-[var(--foreground)] transition-colors group-hover:text-[var(--primary)]",children:N??"Not assigned"})]})]}),G.id&&M.id?(0,b.jsx)(ae,{projectId:G.id,objectiveId:M.id,objectiveKey:M.key,metadata:G.metadata,currentProgress:M.progress,currentStatus:M.status,objectiveUpdatedAt:M.updatedAt}):null]}),(0,b.jsx)("div",{className:"mb-6",children:(0,b.jsxs)("button",{type:"button",onClick:async()=>{aL(!0),await a$(),aL(!1)},disabled:aK,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,b.jsx)(t.Sparkles,{className:"h-4 w-4"}),aK?"Working...":"Work on objective"]})}),(0,b.jsx)("div",{className:"mb-8 border-b border-[var(--border)]",children:(0,b.jsx)("nav",{className:"flex gap-1 -mb-px","aria-label":"Objective sections",children:[{id:"activity",label:"Activity",icon:l.Clock},{id:"notes",label:"Notes",icon:m.FileText},{id:"tasks",label:"Tasks",icon:a=>{let c=aE.filter(a=>a.connected),d=(aI&&c.some(a=>a.type===aI)?aI:c[0]?.type)??"tracker";return(0,b.jsx)(af.TrackerIcon,{trackerType:d,className:"h-3.5 w-3.5"})}},{id:"scheduled-tasks",label:"Scheduled Jobs",icon:j}].map(a=>{let c,d;return(0,b.jsxs)("button",{type:"button",onClick:()=>U(a.id),className:`flex items-center gap-2 px-3 py-2.5 text-sm font-medium border-b-2 transition-colors ${T===a.id?"border-[var(--primary)] text-[var(--foreground)]":"border-transparent text-[var(--muted-foreground)] hover:border-[var(--border)] hover:text-[var(--foreground)]"}`,children:[(0,b.jsx)(a.icon,{size:14}),a.label,"activity"===a.id&&V>0&&(0,b.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:V}),"notes"===a.id&&aa.length>0&&(0,b.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:aa.length}),"tasks"===a.id&&(c=["done","canceled","cancelled","completed","duplicate"],(d=aC.filter((a,b,d)=>d.findIndex(b=>b.id===a.id)===b&&!c.includes(a.status.toLowerCase()))).length>0?(0,b.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:d.length}):null),"scheduled-tasks"===a.id&&aR>0&&(0,b.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:aR})]},a.id)})})}),(0,b.jsxs)("div",{className:"space-y-10",children:["notes"===T&&(0,b.jsxs)("section",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,b.jsxs)("div",{className:"relative flex-1",children:[(0,b.jsx)(p.Search,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--muted-foreground)]"}),(0,b.jsx)("input",{type:"text",value:az,onChange:a=>aA(a.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,b.jsxs)("button",{type:"button",onClick:aV,disabled:ax,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,b.jsx)(o.Plus,{size:14}),"New note"]})]}),ac?(0,b.jsx)("p",{className:"py-4 text-sm text-[var(--muted-foreground)]",children:"Loading notes..."}):0===aa.length?(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)] py-4",children:"No notes yet. Add one above."}):0===(r=(i=az.toLowerCase())?aa.filter(a=>a.title.toLowerCase().includes(i)||a.body.toLowerCase().includes(i)):aa).length?(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)] py-4",children:"No notes match your search."}):(0,b.jsx)("div",{className:"columns-1 gap-3 sm:columns-2 lg:columns-3",style:{columnFill:"balance"},children:r.map(a=>(0,b.jsxs)("button",{type:"button",onClick:()=>ai(a.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,b.jsx)("div",{className:"px-3 pt-3 pb-1",children:(0,b.jsx)("h4",{className:"text-sm font-medium text-[var(--foreground)] leading-snug",children:a.title})}),a.body.trim()&&(0,b.jsx)("div",{className:"px-3 pb-2 text-xs text-[var(--muted-foreground)] line-clamp-4",children:(0,b.jsx)(z.Markdown,{content:a.body})}),(0,b.jsx)("div",{className:"flex items-center justify-between px-3 pb-2",children:(0,b.jsx)("span",{className:"text-[10px] text-[var(--muted-foreground)]",children:new Date(a.updatedAt).toLocaleDateString()})})]},a.id))}),ah&&(()=>{let a=aa.find(a=>a.id===ah);if(!a)return null;let c=aj[a.id]??a.body,d=al[a.id]??a.title,e=aq.has(a.id);return(0,b.jsx)("div",{className:"fixed inset-0 z-50 flex items-start justify-center bg-black/50 pt-[5vh]",onClick:a=>{a.target===a.currentTarget&&ai(null)},children:(0,b.jsxs)("div",{className:"mx-6 w-full max-w-7xl rounded-xl border border-[var(--border)] bg-[var(--background)] shadow-xl",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[(0,b.jsx)("input",{type:"text",autoFocus:!0,value:d,onFocus:a=>{"Untitled"===d&&a.target.select()},onChange:b=>ao(c=>({...c,[a.id]:b.target.value})),className:"flex-1 bg-transparent text-base font-semibold text-[var(--foreground)] focus:outline-none"}),(0,b.jsxs)("div",{className:"flex items-center gap-2 ml-3",children:[(0,b.jsx)("span",{className:"text-[11px] text-[var(--muted-foreground)]",children:e?"Saving...":new Date(a.updatedAt).toLocaleDateString()}),(0,b.jsx)("button",{type:"button",onClick:()=>aW(a.id),className:"p-1 text-[var(--muted-foreground)] transition-colors hover:text-[var(--destructive)]",children:(0,b.jsx)(q.Trash2,{size:14})}),(0,b.jsx)("button",{type:"button",onClick:()=>ai(null),className:"p-1 text-[var(--muted-foreground)] transition-colors hover:text-[var(--foreground)]",children:(0,b.jsx)(u.X,{size:14})})]})]}),(0,b.jsx)("div",{className:"max-h-[75vh] overflow-y-auto px-5 py-4",children:(0,b.jsx)(aw,{content:c,editable:!0,onChange:b=>ak(c=>({...c,[a.id]:b})),placeholder:"Write your note..."})})]})})})()]}),"activity"===T&&G.id&&M.id&&(0,b.jsx)(W,{projectId:G.id,objectiveId:M.id,onTotalChange:X}),"tasks"===T&&(v=aC.filter((a,b,c)=>c.findIndex(b=>b.id===a.id)===b),w=["done","canceled","cancelled","completed","duplicate"],x=v.filter(a=>!w.includes(a.status.toLowerCase())),y=v.filter(a=>w.includes(a.status.toLowerCase())).slice(-5),A=aE.filter(a=>a.connected),C=0===(B=aI&&A.some(a=>a.type===aI)?A.filter(a=>a.type===aI):A).length?null:B.map(a=>a.displayName).join(", "),(0,b.jsxs)("section",{children:[(0,b.jsx)("div",{className:"flex flex-wrap items-start justify-between gap-3 mb-4",children:(0,b.jsxs)("p",{className:"text-sm text-[var(--muted-foreground)]",children:["Tickets tracked by the objective label"," ",(0,b.jsx)("code",{className:"rounded bg-[var(--tone-neutral-bg)] px-1.5 py-0.5 font-mono text-[11px] text-[var(--foreground)]",children:M.key}),C?(0,b.jsxs)(b.Fragment,{children:[" across ",C,"."]}):"."]})}),0===B.length?(0,b.jsx)(aB,{label:0===aG.length?"No tracker integrations registered.":`Connect a tracker (${aG.map(a=>a.displayName).join(", ")}) to create and track tickets for this objective.`}):0===v.length?(0,b.jsx)(aB,{label:`No tracker tickets with label ${M.key} yet.`}):(0,b.jsxs)(b.Fragment,{children:[x.length>0&&(0,b.jsx)("div",{className:"space-y-3",children:x.map(c=>(0,b.jsxs)("div",{className:"rounded-xl border border-[var(--border)] bg-[var(--overlay-panel-muted)] p-4",children:[(0,b.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5 text-xs font-semibold uppercase tracking-[0.18em] text-[var(--muted-foreground)]",children:[(0,b.jsx)(af.TrackerIcon,{trackerType:c.trackerType,className:"h-3 w-3"}),(0,b.jsx)("span",{children:c.identifier})]}),(0,b.jsx)("a",{href:c.url??`/projects/${a}/tracking/${c.trackerType}?issue=${c.id}`,target:c.url?"_blank":void 0,rel:c.url?"noreferrer":void 0,className:"mt-1 block text-sm font-medium text-[var(--foreground)] transition-colors hover:text-[var(--primary)]",children:c.title})]}),(0,b.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:c.status})]}),(0,b.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-2 text-[11px] text-[var(--muted-foreground)]",children:[(0,b.jsxs)("span",{children:["Updated ",ap(c.updatedAt)]}),(0,b.jsx)("span",{children:c.assignee?`Assigned to ${c.assignee}`:"Unassigned"})]})]},c.id))}),y.length>0&&(0,b.jsxs)("div",{className:x.length>0?"mt-6":"",children:[(0,b.jsx)("p",{className:"text-[11px] font-medium uppercase tracking-[0.18em] text-[var(--muted-foreground)] mb-2",children:"Completed"}),(0,b.jsx)("div",{className:"space-y-0.5",children:y.map(c=>(0,b.jsxs)("a",{href:c.url??`/projects/${a}/tracking/${c.trackerType}?issue=${c.id}`,target:c.url?"_blank":void 0,rel:c.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,b.jsx)(af.TrackerIcon,{trackerType:c.trackerType,className:"h-3 w-3 shrink-0"}),(0,b.jsx)("span",{className:"text-[11px] font-mono shrink-0",children:c.identifier}),(0,b.jsx)("span",{className:"text-[12px] truncate",children:c.title}),(0,b.jsx)("span",{className:"ml-auto shrink-0 text-[10px] text-[var(--app-shell-soft-text)] group-hover:text-[var(--muted-foreground)]",children:c.status})]},c.id))})]})]})]})),"scheduled-tasks"===T&&(0,b.jsx)("section",{children:(0,b.jsx)(O,{projectId:G.id,objectiveId:M.id,objectiveKey:M.key,createDefaults:{name:`Work on ${M.title}`},onCreateTask:aZ})}),(0,b.jsxs)("section",{className:"pt-10",children:[(0,b.jsx)("div",{className:"mb-4",children:(0,b.jsx)("h2",{className:"text-sm font-semibold text-[var(--destructive)]",children:"Danger Zone"})}),(0,b.jsxs)("div",{className:"flex items-center justify-between rounded-xl border border-[var(--destructive-border)] bg-[var(--destructive-bg)] p-5",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-medium text-[var(--foreground)]",children:"Delete Objective"}),(0,b.jsx)("p",{className:"mt-1 text-sm text-[var(--muted-foreground)]",children:"Once you delete an objective, there is no going back."})]}),(0,b.jsxs)("button",{type:"button",onClick:()=>void aX(),"aria-label":`Delete objective ${M.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,b.jsx)(q.Trash2,{size:14})," Delete"]})]})]})]})]})}),(0,b.jsx)(ag.JumpToLatestButton,{visible:aN,direction:"top",onClick:aP})]}),(0,b.jsx)(at,{projectId:G.id,projectSlug:a,objective:M,teamName:N,trackerConnections:aE,availableTrackers:aG,defaultTrackerType:aI,onThreadLinked:aY,onObjectiveUpdated:L})]})})}):(0,b.jsx)("div",{className:"flex h-full items-center justify-center px-4 bg-[var(--background)]",children:(0,b.jsxs)("div",{className:"rounded-xl border border-[var(--border)] bg-[var(--card-bg)] p-8 text-center",children:[(0,b.jsx)("p",{className:"text-lg font-semibold text-[var(--foreground)]",children:"Objective not found"}),(0,b.jsx)("p",{className:"mt-2 text-sm text-[var(--muted-foreground)]",children:"It may have been deleted or the link is stale."}),(0,b.jsx)(c.default,{href:`/projects/${a}`,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,b.jsx)(au,{label:"Project not found."})}function aB({label:a}){return(0,b.jsx)("div",{className:"flex items-center rounded-xl border border-dashed border-[var(--border)] bg-[var(--overlay-panel-muted)] p-6",children:(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:a})})}function aC({mode:a,draft:c,teams:d=[],isSaving:e,onChange:f,onClose:g,onSave:h}){return(0,b.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/45 p-4",children:(0,b.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"edit"===a?"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,b.jsxs)("div",{className:"border-b border-[var(--border)] px-5 py-4",children:[(0,b.jsx)("h3",{className:"text-lg font-semibold text-[var(--foreground)]",children:"edit"===a?"Edit objective":"New objective"}),(0,b.jsx)("p",{className:"mt-1 text-sm text-[var(--muted-foreground)]",children:"edit"===a?"Update the tracking details for this objective.":"Keep the statement measurable and use notes only for context that matters."})]}),(0,b.jsxs)("div",{className:"space-y-4 px-5 py-5",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)(aD,{label:"Objective statement"}),(0,b.jsx)("input",{value:c.title,onChange:a=>f({...c,title:a.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"===a?(0,b.jsxs)("div",{children:[(0,b.jsx)(aD,{label:"Team"}),(0,b.jsxs)("select",{value:c.teamId,onChange:a=>f({...c,teamId:a.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,b.jsx)("option",{value:"",children:"Select a team"}),d.map(a=>(0,b.jsx)("option",{value:a.id,children:a.name},a.id))]}),(0,b.jsx)("p",{className:"mt-2 text-xs text-[var(--muted-foreground)]",children:"Teams can only own one objective at a time."})]}):null]}),(0,b.jsxs)("div",{className:"flex items-center justify-end gap-2 border-t border-[var(--border)] px-5 py-4",children:[(0,b.jsx)("button",{type:"button",onClick:g,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,b.jsx)("button",{type:"button",onClick:h,disabled:e,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:e?"Saving...":"edit"===a?"Save objective":"Create objective"})]})]})})}function aD({label:a}){return(0,b.jsx)("label",{className:"mb-2 block text-[11px] font-semibold uppercase tracking-[0.18em] text-[var(--muted-foreground)]",children:a})}a.s(["ProjectObjectivesOverview",()=>az],739515)}];
21
21
 
22
22
  //# sourceMappingURL=apps_local_components_projects_ProjectObjectivesWorkspace_tsx_751ab3d3._.js.map
@@ -0,0 +1,18 @@
1
+ module.exports=[908225,a=>{"use strict";var b=a.i(308316),c=a.i(811760);let d=(0,a.i(831709).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);function e({visible:a,onClick:e,direction:f="bottom",label:g,offsetClassName:h}){if(!a)return null;let i="top"===f?d:c.ChevronDown;return(0,b.jsx)("div",{className:`pointer-events-none absolute inset-x-0 ${h??("top"===f?"top-3":"bottom-3")} z-10 flex justify-center`,children:(0,b.jsxs)("button",{type:"button",onClick:e,className:`pointer-events-auto inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full border border-[var(--app-shell-border)] bg-[var(--app-shell-surface)] text-[var(--foreground)] text-xs font-medium shadow-md hover:bg-[var(--app-shell-elevated)] transition-colors animate-in fade-in ${"top"===f?"slide-in-from-top-1":"slide-in-from-bottom-1"} duration-200`,children:[(0,b.jsx)(i,{className:"w-3.5 h-3.5"}),g??("top"===f?"Back to top":"Jump to latest")]})})}a.s(["JumpToLatestButton",()=>e],908225)},60985,a=>{"use strict";let b=(0,a.i(831709).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"}]]);a.s(["Tag",()=>b],60985)},693896,a=>{"use strict";let b=(0,a.i(831709).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"}]]);a.s(["AlertCircle",()=>b],693896)},734709,a=>{"use strict";var b=a.i(308316),c=a.i(786220);function d({isOpen:a,title:d,message:e,preview:f,confirmLabel:g="Confirm",cancelLabel:h="Cancel",variant:i="default",onConfirm:j,onCancel:k}){let l=(0,c.useRef)(null),m=(0,c.useRef)(null);(0,c.useEffect)(()=>{if(a){let a=setTimeout(()=>l.current?.focus(),50);return()=>clearTimeout(a)}},[a]);let n=(0,c.useCallback)(a=>{"Escape"===a.key&&k()},[k]);if(!a)return null;let o="danger"===i;return(0,b.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:a=>a.target===a.currentTarget&&k(),onKeyDown:n,children:[(0,b.jsxs)("div",{ref:m,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,b.jsx)("div",{className:"px-6 pt-6 pb-3",children:(0,b.jsxs)("div",{className:"flex items-start gap-4",children:[o&&(0,b.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,b.jsx)("svg",{className:"w-5 h-5 text-red-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,b.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,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("h3",{className:"text-[15px] font-semibold text-[var(--foreground)]",children:d}),(0,b.jsx)("p",{className:"mt-1 text-[13px] text-[var(--muted-foreground)] leading-relaxed",children:e})]})]})}),f&&(0,b.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,b.jsxs)("p",{className:"text-[12px] text-[var(--muted-foreground)] line-clamp-3 leading-relaxed italic",children:["“",f,"”"]})}),(0,b.jsx)("div",{className:"mx-6 border-t border-[var(--card-border)]"}),(0,b.jsxs)("div",{className:"px-6 py-4 flex items-center justify-end gap-2.5",children:[(0,b.jsx)("button",{onClick:k,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:h}),(0,b.jsx)("button",{ref:l,onClick:j,className:`px-4 py-2 rounded-lg text-[13px] font-medium transition-all duration-150 ${o?"bg-red-500 text-white hover:bg-red-600 active:scale-[0.97]":"btn-primary active:scale-[0.97]"}`,children:g})]})]}),(0,b.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
+ `})]})}a.s(["default",()=>d])},697183,a=>{"use strict";let b=(0,a.i(831709).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"}]]);a.s(["Trash2",()=>b],697183)},864061,a=>{"use strict";let b=(0,a.i(831709).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"}]]);a.s(["RefreshCw",()=>b],864061)},820859,a=>{"use strict";let b=(0,a.i(831709).default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);a.s(["Clock",()=>b],820859)},785061,a=>{"use strict";function b(a){if("string"==typeof a)return a.trim()||void 0}function c(a,c){let d=new Set,e=new Set;!function a(b,c){if(b)for(let d of b)c(d),a(d.content,c)}(a.content,a=>{if("participantMention"!==a.type)return;let b=a.attrs??{},c="string"==typeof b.id?b.id.trim():"",f="string"==typeof b.kind?b.kind:"agent";c&&"agent"===f&&(d.add(c),"parallel"===b.mode&&e.add(c))});let f=b(c);return{...f?{pinnedParticipantId:f}:{},mentionedParticipantIds:Array.from(d),parallelParticipantIds:Array.from(e)}}function d(a,c){let d=function(a){if(!Array.isArray(a))return[];let b=new Set,c=[];for(let d of a){if("string"!=typeof d)continue;let a=d.trim();!a||b.has(a)||(b.add(a),c.push(a))}return c}(a),e=b(c);return e&&d.includes(e)?[e,...d.filter(a=>a!==e)]:d}a.s(["extractComposerRouting",()=>c,"orderParticipantIds",()=>d])},520612,a=>{"use strict";var b=a.i(786220),c=a.i(516909);function d(a){return"string"!=typeof a?null:a.trim()||null}function e(a,b){return(a.get(b)?.trim()??"")||null}function f(){let a=(0,c.useRouter)(),f=(0,c.usePathname)(),g=(0,c.useSearchParams)(),h=(0,b.useCallback)(a=>e(g,a),[g]),i=(0,b.useCallback)((a,b)=>(function(a,b,c){let f=function(a,b){let c={...b},f=a=>Object.prototype.hasOwnProperty.call(b,a);if(f("issue")&&!f("run")){let f=e(a,"issue");d(b.issue)!==f&&(c.run=null)}if(f("job")&&!f("run")){let f=e(a,"job");d(b.job)!==f&&(c.run=null)}if(f("open")&&!f("message")){let f=e(a,"open");d(b.open)!==f&&(c.message=null)}if(f("group")&&!f("issue")){let f=e(a,"group");d(b.group)!==f&&(c.issue=null,c.run=null)}if(f("issue")&&!f("group")){let f=e(a,"issue");d(b.issue)!==f&&(c.group=null)}return c}(b,c),g=new URLSearchParams(b.toString());for(let[a,b]of Object.entries(f)){let c=d(b);c?g.set(a,c):g.delete(a)}let h=g.toString();return h?`${a}?${h}`:a})(b??f,g,a),[f,g]),j=(0,b.useCallback)((b,c)=>{a.push(i(b,c))},[i,a]),k=(0,b.useCallback)((b,c)=>{a.replace(i(b,c))},[i,a]);return{pathname:f,searchParams:g,getSelection:h,buildHref:i,pushSelection:j,replaceSelection:k}}a.s(["useUrlSelection",()=>f])},155829,496368,a=>{"use strict";var b=a.i(786220);function c(a){return`threadId=${encodeURIComponent(a)}`}function d(a){return`workspaceId=${encodeURIComponent(a)}`}function e(a){let[e,f]=(0,b.useState)([]),[g,h]=(0,b.useState)([]),[i,j]=(0,b.useState)([]),k=(0,b.useRef)(a),l=(0,b.useRef)(a);k.current=a,l.current!==a&&(l.current=a,f([]),h([]),j([]));let m=(0,b.useCallback)(async a=>{let b=a?.trim()||k.current?.trim();if(!b){f([]),h([]);return}let e=c(b);try{let[a,c]=await Promise.all([fetch(`/api/history?${e}`),fetch(`/api/logs?${d(b)}`)]);if(k.current!==b)return;a.ok&&f(await a.json()),c.ok&&h(await c.json())}catch{}},[]),n=(0,b.useCallback)(async a=>{let b=a?.trim()||k.current?.trim();if(!b){f([]),h([]);return}let e=c(b);await Promise.all([fetch(`/api/history?${e}`,{method:"DELETE"}),fetch(`/api/logs?${d(b)}`,{method:"DELETE"})]),k.current===b&&(f([]),h([]))},[]),o=(0,b.useCallback)(async(a,b=10,c,d,e,g,h,i,l,m)=>{let n=c?.trim()||k.current?.trim();if(!n)return;let o=Date.now(),p=crypto.randomUUID(),q={id:p,role:"user",participantId:null,content:a,timestamp:o,rootMessageId:d||null,parentMessageId:d||null,depth:+!!d,...g&&g.length>0?{attachments:g}:{}};f(a=>[...a,q]);try{let c=await fetch("/api/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({threadId:n,prompt:a,promptPrefix:l||void 0,maxRounds:b,userMessageId:p,rootMessageId:d||void 0,attachmentIds:e?.length?e:void 0,activeParticipantIds:Array.isArray(h)?h:void 0,projectSlug:i?.trim()||void 0,routing:m})}),g=await c.json().catch(a=>(console.warn("[useGroupChat] failed to parse run response:",a),null));c.ok&&g?.chatRunId?j(a=>[{chatRunId:g.chatRunId,threadId:n,rootMessageId:d||p,status:"queued",optimistic:!0,enqueuedAt:Date.now()},...a.filter(a=>a.chatRunId!==g.chatRunId)]):c.ok||(console.error(`[useGroupChat] POST /api/chat failed (${c.status}):`,g?.error||c.statusText),f(a=>a.map(a=>a.id===p?{...a,sendFailed:!0}:a)))}catch(a){console.error("[useGroupChat] network error sending message:",a),f(a=>a.map(a=>a.id===p?{...a,sendFailed:!0}:a))}return p},[]),p=(0,b.useCallback)(async()=>{let a=k.current?.trim();if(a)try{await fetch(`/api/processes?workspaceId=${encodeURIComponent(a)}`,{method:"DELETE"})}catch{}},[]),q=(0,b.useCallback)(async a=>{let b=k.current?.trim();if(b)try{await fetch(`/api/processes?workspaceId=${encodeURIComponent(b)}&threadId=${encodeURIComponent(a)}`,{method:"DELETE"})}catch{}},[]);return{messages:e,setMessages:f,logs:g,sendMessage:o,loadHistory:m,clearHistory:n,clearLogs:(0,b.useCallback)(async a=>{let b=a?.trim()||k.current?.trim();b?(await fetch(`/api/logs?${d(b)}`,{method:"DELETE"}).catch(a=>console.warn("[useGroupChat] delete logs failed:",a)),k.current===b&&h([])):h([])},[]),chatRuns:i,setChatRuns:j,stop:p,stopThread:q}}a.s(["useGroupChat",()=>e],155829);let f=new Set(["spawning","running"]);function g(a,c){let d=c?.intervalMs??1500,e=c?.idleIntervalMs??1e4,[g,h]=(0,b.useState)(new Set),[i,j]=(0,b.useState)([]),[k,l]=(0,b.useState)({}),[m,n]=(0,b.useState)([]),o=(0,b.useRef)(a);o.current=a,(0,b.useRef)(c?.messages??[]).current=c?.messages??[];let p=(0,b.useRef)(c?.setMessages);p.current=c?.setMessages;let q=(0,b.useRef)(0),r=(0,b.useRef)(new Map),s=(0,b.useRef)(new Map);(0,b.useEffect)(()=>{let a=c?.messages??[];if(a.length>0){let b=Math.max(...a.map(a=>a.timestamp));b>q.current&&(q.current=b)}},[c?.messages]),(0,b.useEffect)(()=>()=>{for(let a of r.current.values())a.close();r.current.clear()},[]);let t=(0,b.useCallback)(async()=>{let a=o.current;if(!a){h(new Set),j([]),l({}),n([]);return}let b=null;if(a.threadId?b=`/api/processes?threadId=${encodeURIComponent(a.threadId)}`:a.workspaceId&&(b=`/api/processes?workspaceId=${encodeURIComponent(a.workspaceId)}`),!b){h(new Set),j([]),l({}),n([]);return}try{let d=a.workspaceId||a.threadId,e=d?`/api/history?threadId=${encodeURIComponent(d)}&since=${q.current}`:null,g=d?`/api/chat-runs?threadId=${encodeURIComponent(d)}&limit=20`:null,i=[fetch(b)];e&&i.push(fetch(e)),g&&i.push(fetch(g));let[k,l,m]=await Promise.all(i),r=o.current;if(r?.threadId!==a.threadId||r?.workspaceId!==a.workspaceId)return;if(k.ok){let a=await k.json();j(a);let b=new Set(a.filter(a=>f.has(a.state)).map(a=>a.agentId));h(b)}if(m?.ok){var c;let a=(c=await m.json(),Array.isArray(c)?c.map(a=>{if(!a||"object"!=typeof a)return null;let b="string"==typeof a.chatRunId?a.chatRunId:"string"==typeof a.id?a.id:null,c="string"==typeof a.threadId?a.threadId:null,d="string"==typeof a.status?a.status:null,e="string"==typeof a.rootMessageId?a.rootMessageId:(a.rootMessageId,null);return b&&c&&d&&("queued"===d||"running"===d||"awaiting_user"===d||"blocked"===d||"completed"===d||"failed"===d||"cancelled"===d)?{chatRunId:b,threadId:c,rootMessageId:e,status:d,optimistic:!1}:null}).filter(a=>!!a):[]);n(a)}if(l?.ok&&p.current){let a=await l.json();if(a.length>0){let b=Math.max(...a.map(a=>a.timestamp));b>q.current&&(q.current=b),p.current(b=>{let c=new Set(b.map(a=>a.id)),d=a.filter(a=>!c.has(a.id)),e=b.map(b=>a.find(a=>a.id===b.id)??b);return 0===d.length?e:[...e,...d].sort((a,b)=>a.timestamp-b.timestamp)})}}}catch{}},[]);(0,b.useEffect)(()=>{let a=m.filter(a=>"queued"===a.status||"running"===a.status),b=new Set(a.map(a=>a.chatRunId));for(let[a,c]of r.current.entries())b.has(a)||(c.close(),r.current.delete(a),s.current.delete(a));for(let b of a){if(r.current.has(b.chatRunId))continue;let a=new EventSource(`/api/chat-runs/${encodeURIComponent(b.chatRunId)}/events`);r.current.set(b.chatRunId,a);let c=new Map;s.current.set(b.chatRunId,c);let d=new Set;a.addEventListener("chat",e=>{let f;try{f=JSON.parse(e.data)}catch{return}switch(f.type){case"participant-start":case"participant-thinking":d.add(f.participantId),c.has(f.participantId)||c.set(f.participantId,{text:"",thoughts:[]}),l(a=>a[f.participantId]?a:{...a,[f.participantId]:{content:"",rootMessageId:b.rootMessageId??null}});break;case"text-delta":{c.has(f.participantId)||c.set(f.participantId,{text:"",thoughts:[]});let a=c.get(f.participantId);a&&(a.text+=f.delta,l(c=>{let d={...c},e=b.rootMessageId??null;return d[f.participantId]={content:a.text,rootMessageId:e},d}));break}case"participant-thought":{let a=c.get(f.participantId);a&&(a.thoughts.push(f.content),l(b=>{let c=b[f.participantId];return c?{...b,[f.participantId]:{...c,thoughts:[...a.thoughts]}}:b}));break}case"participant-end":d.delete(f.participantId),t().then(()=>{l(a=>{let b={...a};return delete b[f.participantId],b})});break;case"participant-error":d.delete(f.participantId),t().then(()=>{l(a=>{let b={...a};return delete b[f.participantId],b})});break;case"done":a.close(),r.current.delete(b.chatRunId),s.current.delete(b.chatRunId)}}),a.onerror=()=>{a.close(),r.current.delete(b.chatRunId),s.current.delete(b.chatRunId)}}},[m]);let u=a?.threadId||a?.workspaceId||null,v=m.some(a=>"queued"===a.status||"running"===a.status),w=i.some(a=>f.has(a.state)),x=v||w?d:e;return(0,b.useEffect)(()=>{if(!u){h(new Set),j([]),l({}),n([]);return}t();let a=setInterval(t,x);return()=>clearInterval(a)},[u,x,t]),{activeAgents:g,processes:i,streaming:k,chatRuns:m,poll:t}}a.s(["useProcessPolling",()=>g],496368)}];
17
+
18
+ //# sourceMappingURL=apps_local_e322e178._.js.map
@@ -0,0 +1,3 @@
1
+ module.exports=[663504,235992,a=>{"use strict";var b=a.i(831709);let c=(0,b.default)("key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);a.s(["Key",()=>c],663504);let d=(0,b.default)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);a.s(["Globe",()=>d],235992)},500650,a=>{"use strict";let b=(0,a.i(831709).default)("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]);a.s(["LogOut",()=>b],500650)},778784,451844,a=>{"use strict";var b=a.i(308316),c=a.i(786220),d=a.i(44668),e=a.i(663504),f=a.i(235992),g=a.i(349692),h=a.i(693896),i=a.i(356239),j=a.i(500650),k=a.i(392045),l=a.i(353532),m=a.i(824179),n=a.i(864061);let o=(0,a.i(831709).default)("pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]);function p({projectId:a}){let[d,e]=(0,c.useState)([]),[f,h]=(0,c.useState)(!0),[i,j]=(0,c.useState)(null),[k,p]=(0,c.useState)(null),[q,r]=(0,c.useState)(!1),[s,t]=(0,c.useState)([]),[u,v]=(0,c.useState)(!1),[w,x]=(0,c.useState)(null),[y,z]=(0,c.useState)(""),[A,B]=(0,c.useState)("all"),[C,D]=(0,c.useState)(new Set),[E,F]=(0,c.useState)(!1),G=(0,c.useCallback)(async()=>{try{let a=await fetch("/api/github/repos",{cache:"no-store"});if(!a.ok)throw Error("Failed to load repos");let b=await a.json();e(b.repos??[]),j(null)}catch{j("Failed to load repositories")}finally{h(!1)}},[]);(0,c.useEffect)(()=>{G()},[G]);let H=(0,c.useCallback)((a,b)=>`${a}/${b}`.toLowerCase(),[]),I=(0,c.useMemo)(()=>new Set(d.map(a=>H(a.owner,a.name))),[d,H]),J=(0,c.useCallback)(async()=>{if(r(!0),D(new Set),z(""),B("all"),!(s.length>0)){v(!0),x(null);try{let b=await fetch(`/api/github/user-repos?projectId=${encodeURIComponent(a)}`,{cache:"no-store"});if(!b.ok){let a=await b.json().catch(()=>({}));throw Error(a?.error??"Failed to fetch repos")}let c=await b.json();t(c.repos??[])}catch(a){x(a instanceof Error?a.message:"Failed to fetch repos")}finally{v(!1)}}},[a,s.length]),K=()=>{r(!1)};(0,c.useEffect)(()=>{if(!q)return;let a=a=>{"Escape"===a.key&&K()};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[q]);let L=(0,c.useMemo)(()=>{let a=[],b=[];for(let c of s)I.has(H(c.owner,c.name))?a.push(c):b.push(c);return[...a,...b]},[s,I,H]),M=(0,c.useMemo)(()=>{let a=y.trim().toLowerCase();return L.filter(b=>("public"!==A||!b.private)&&("private"!==A||!!b.private)&&(!a||b.fullName.toLowerCase().includes(a)||(b.description??"").toLowerCase().includes(a)))},[L,y,A]),N=(0,c.useMemo)(()=>M.filter(a=>!I.has(H(a.owner,a.name))),[M,I,H]),O=N.length>0&&N.every(a=>C.has(a.id)),P=async()=>{if(0!==C.size){F(!0);try{let a=s.filter(a=>C.has(a.id));await Promise.all(a.map(a=>fetch("/api/github/repos",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({owner:a.owner,name:a.name,defaultBranch:a.defaultBranch,private:a.private})}))),await G(),K()}finally{F(!1)}}},Q=(0,c.useCallback)(async a=>{p(a);try{await fetch("/api/github/repos",{method:"DELETE",headers:{"content-type":"application/json"},body:JSON.stringify({id:a})}),await G()}finally{p(null)}},[G]);return(0,b.jsxs)("div",{className:"w-full max-w-md space-y-4",children:[(0,b.jsxs)("div",{className:"border rounded-xl p-5 flex flex-col gap-4",children:[(0,b.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h4",{className:"text-sm font-medium",children:"Attached repositories"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Repos the local agent watches for PRs, reviews, and comments."})]}),(0,b.jsxs)("button",{type:"button",onClick:J,className:"text-xs px-2.5 py-1.5 rounded border hover:bg-accent inline-flex items-center gap-1",children:[(0,b.jsx)(l.Plus,{className:"w-3.5 h-3.5"}),"Add"]})]}),f?(0,b.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,b.jsx)(g.Loader2,{className:"w-4 h-4 animate-spin"}),"Loading repositories…"]}):i?(0,b.jsx)("p",{className:"text-sm text-destructive",children:i}):0===d.length?(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:"No repositories attached yet."}):(0,b.jsx)("ul",{className:"divide-y",children:d.map(a=>(0,b.jsxs)("li",{className:"flex items-center justify-between py-2",children:[(0,b.jsxs)("div",{className:"flex flex-col",children:[(0,b.jsxs)("span",{className:"text-sm font-mono",children:[a.owner,"/",a.name]}),(0,b.jsxs)("span",{className:"text-xs text-muted-foreground",children:[a.defaultBranch??"no default branch",a.private?" · private":" · public",a.accessRevoked?" · access revoked":""]})]}),(0,b.jsx)("button",{type:"button",onClick:()=>Q(a.id),disabled:k===a.id,className:"p-1.5 rounded hover:bg-accent disabled:opacity-50",title:"Remove",children:(0,b.jsx)(m.X,{className:"w-3.5 h-3.5"})})]},a.id))})]}),(0,b.jsxs)("div",{className:"border rounded-xl p-5 flex items-center justify-between gap-3",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h4",{className:"text-sm font-medium",children:"Sync"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Pull the latest PRs, reviews, and comments for attached repos."})]}),(0,b.jsxs)("button",{type:"button",onClick:()=>alert("Sync will run when worker is scheduled"),className:"text-xs px-3 py-1.5 rounded border hover:bg-accent inline-flex items-center gap-1.5",children:[(0,b.jsx)(n.RefreshCw,{className:"w-3.5 h-3.5"}),"Sync now"]})]}),q&&(0,b.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/50 backdrop-blur-sm",onClick:K,children:(0,b.jsxs)("div",{className:"w-full max-w-3xl max-h-[90vh] flex flex-col rounded-xl border border-[var(--border)] bg-[var(--background)] text-[var(--foreground)] shadow-2xl",onClick:a=>a.stopPropagation(),children:[(0,b.jsxs)("header",{className:"px-6 py-5 border-b border-[var(--border)] flex items-start justify-between gap-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 text-xs text-[var(--muted-foreground)] mb-1",children:[(0,b.jsx)("span",{children:"GitHub"}),(0,b.jsx)("span",{children:"·"}),(0,b.jsx)("span",{children:"Attach repositories"})]}),(0,b.jsx)("h1",{className:"text-xl font-semibold tracking-tight",children:"Select repositories"}),(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)] mt-1",children:"Pick the repos you want agx to track. Already-attached repos are pinned at the top."})]}),(0,b.jsx)("button",{onClick:K,className:"p-1.5 rounded hover:bg-[var(--item-hover-bg)] text-[var(--muted-foreground)]","aria-label":"Close",children:(0,b.jsx)(m.X,{className:"w-4 h-4"})})]}),(0,b.jsx)("div",{className:"px-6 py-4 flex-1 overflow-hidden flex flex-col",children:w?(0,b.jsx)("div",{className:"rounded-lg border border-[var(--status-failed-border)] bg-[var(--status-failed-bg)] text-[var(--status-failed)] px-4 py-3 text-sm",children:w}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 mb-3",children:[(0,b.jsxs)("div",{className:"relative flex-1",children:[(0,b.jsxs)("svg",{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-[var(--muted-foreground)]",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,b.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,b.jsx)("path",{d:"m21 21-4.3-4.3"})]}),(0,b.jsx)("input",{type:"text",value:y,onChange:a=>z(a.target.value),placeholder:"Search repositories...",className:"w-full pl-9 pr-3 py-2 rounded-lg border border-[var(--border)] bg-[var(--input)] text-sm focus:outline-none focus:border-[var(--primary)] focus:bg-[var(--input-focus)] transition-colors"})]}),(0,b.jsx)("div",{className:"flex gap-1 rounded-lg border border-[var(--border)] p-1",children:["all","public","private"].map(a=>(0,b.jsx)("button",{onClick:()=>B(a),className:`px-3 py-1 text-xs rounded-md capitalize transition-colors ${A===a?"bg-[var(--primary)] text-[var(--primary-foreground)]":"text-[var(--muted-foreground)] hover:text-[var(--foreground)]"}`,children:a},a))})]}),(0,b.jsxs)("div",{className:"flex items-center justify-between mb-2 text-xs text-[var(--muted-foreground)]",children:[(0,b.jsxs)("button",{onClick:()=>{D(a=>{let b=new Set(a);return O?N.forEach(a=>b.delete(a.id)):N.forEach(a=>b.add(a.id)),b})},disabled:0===N.length,className:"hover:text-[var(--foreground)] transition-colors disabled:opacity-50",children:[O?"Deselect all":"Select all",y||"all"!==A?` (${N.length} shown)`:""]}),C.size>0&&(0,b.jsx)("button",{onClick:()=>D(new Set),className:"hover:text-[var(--foreground)] transition-colors",children:"Clear selection"})]}),(0,b.jsx)("div",{className:"rounded-lg border border-[var(--border)] bg-[var(--card-bg)] overflow-hidden flex-1 min-h-0",children:(0,b.jsx)("div",{className:"h-full overflow-y-auto",children:u?(0,b.jsx)("div",{className:"divide-y divide-[var(--border)]",children:Array.from({length:6}).map((a,c)=>(0,b.jsxs)("div",{className:"px-4 py-3 flex items-center gap-3 animate-pulse",children:[(0,b.jsx)("div",{className:"w-4 h-4 rounded bg-[var(--muted)]"}),(0,b.jsx)("div",{className:"w-6 h-6 rounded-full bg-[var(--muted)]"}),(0,b.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,b.jsx)("div",{className:"h-3 w-1/3 rounded bg-[var(--muted)]"}),(0,b.jsx)("div",{className:"h-2 w-2/3 rounded bg-[var(--muted)]"})]})]},c))}):0===M.length?(0,b.jsx)("div",{className:"px-4 py-10 text-center text-sm text-[var(--muted-foreground)]",children:0===s.length?"No repositories found on your account.":"No repos match your search."}):(0,b.jsx)("ul",{className:"divide-y divide-[var(--border)]",children:M.map(a=>{let c=I.has(H(a.owner,a.name)),d=C.has(a.id);return(0,b.jsx)("li",{children:(0,b.jsxs)("label",{className:`flex items-start gap-3 px-4 py-3 transition-colors ${c?"bg-[var(--primary-muted)]/40 cursor-default":d?"bg-[var(--primary-muted)] cursor-pointer":"hover:bg-[var(--item-hover-bg)] cursor-pointer"}`,children:[c?(0,b.jsx)("div",{className:"mt-1 w-4 h-4 rounded-sm bg-[var(--primary)]/20 text-[var(--primary)] flex items-center justify-center",title:"Already attached",children:(0,b.jsx)(o,{className:"w-2.5 h-2.5"})}):(0,b.jsx)("input",{type:"checkbox",checked:d,onChange:()=>{!I.has(H(a.owner,a.name))&&D(b=>{let c=new Set(b);return c.has(a.id)?c.delete(a.id):c.add(a.id),c})},className:"mt-1 accent-[var(--primary)]"}),(0,b.jsx)("img",{src:a.avatarUrl,alt:"",className:"w-6 h-6 rounded-full mt-0.5 flex-shrink-0"}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,b.jsx)("span",{className:"text-sm font-medium truncate",children:a.fullName}),c&&(0,b.jsxs)("span",{className:"text-[10px] uppercase tracking-wide px-1.5 py-0.5 rounded bg-[var(--primary)]/15 text-[var(--primary)] flex items-center gap-1",children:[(0,b.jsx)(o,{className:"w-2.5 h-2.5"}),"Attached"]}),a.private&&(0,b.jsx)("span",{className:"text-[10px] uppercase tracking-wide px-1.5 py-0.5 rounded bg-[var(--muted)] text-[var(--muted-foreground)]",children:"Private"})]}),a.description&&(0,b.jsx)("p",{className:"text-xs text-[var(--muted-foreground)] mt-0.5 line-clamp-1",children:a.description}),(0,b.jsxs)("div",{className:"text-[11px] text-[var(--muted-foreground)] mt-0.5",children:["Updated ",function(a){let b=Math.floor((Date.now()-new Date(a).getTime())/1e3);if(b<60)return"just now";let c=Math.floor(b/60);if(c<60)return`${c}m ago`;let d=Math.floor(c/60);if(d<24)return`${d}h ago`;let e=Math.floor(d/24);if(e<30)return`${e}d ago`;let f=Math.floor(e/30);return f<12?`${f}mo ago`:`${Math.floor(f/12)}y ago`}(a.updatedAt)]})]})]})},a.id)})})})})]})}),(0,b.jsxs)("footer",{className:"px-6 py-4 border-t border-[var(--border)] flex items-center justify-between gap-3",children:[(0,b.jsxs)("span",{className:"text-sm text-[var(--muted-foreground)]",children:[C.size," selected"]}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)("button",{onClick:K,className:"px-4 py-2 rounded-lg border border-[var(--border)] hover:bg-[var(--item-hover-bg)] text-sm font-medium transition-colors",children:"Cancel"}),(0,b.jsx)("button",{onClick:P,disabled:0===C.size||E,className:"px-4 py-2 rounded-lg bg-[var(--primary)] hover:bg-[var(--primary-hover)] text-[var(--primary-foreground)] text-sm font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:E?"Attaching...":`Attach ${C.size} ${1===C.size?"repo":"repos"}`})]})]})]})})]})}a.s(["Pin",()=>o],451844);var q=a.i(734709);let r={claude:{name:"Claude Code",configPath:"~/.claude/settings.json"},codex:{name:"Codex CLI",configPath:"~/.codex/config.toml"},gemini:{name:"Gemini CLI",configPath:"~/.gemini/settings.json"}};function s({trackerType:a,projectId:l,connected:m,onConnect:n,onConnectWithKey:o,onDisconnect:s,loading:t=!1,clis:u,mcpConfigured:v,onConfigureMcp:w}){let[x,y]=c.default.useState(""),[z,A]=c.default.useState(null),[B,C]=c.default.useState(!1),[D,E]=c.default.useState(!1),[F,G]=c.default.useState(null),[H,I]=c.default.useState({}),[J,K]=c.default.useState(!1),L=async a=>{if(!w)return;G(a),I(b=>({...b,[a]:""}));let b=await w(a);b.ok||I(c=>({...c,[a]:b.error??"Failed to install MCP"})),G(null)},M=u?["claude","codex","gemini"].filter(a=>u[a]):["claude"];if(t)return(0,b.jsx)("div",{className:"flex items-center justify-center p-12",children:(0,b.jsx)(g.Loader2,{className:"animate-spin h-8 w-8 text-muted-foreground"})});if(m)return(0,b.jsxs)("div",{className:"p-8 flex flex-col items-center gap-6",children:[(0,b.jsxs)("div",{className:"w-full max-w-md p-8 border border-green-500/20 bg-green-500/5 rounded-2xl flex flex-col items-center gap-4 text-center",children:[(0,b.jsx)("div",{className:"h-16 w-16 rounded-full bg-green-500/10 flex items-center justify-center text-green-600 shadow-inner",children:(0,b.jsx)(d.CheckCircle2,{className:"h-8 w-8"})}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)("h3",{className:"text-xl font-bold text-foreground capitalize",children:[a," Connected"]}),(0,b.jsxs)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:["Your ",a," workspace is successfully connected. The agent can now sync issues and manage your backlog."]})]}),(0,b.jsxs)("div",{className:"mt-2 px-4 py-1.5 rounded-full bg-background border text-xs font-medium text-muted-foreground flex items-center gap-2",children:[(0,b.jsx)("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse"}),"Active Connection"]}),s&&(0,b.jsxs)("button",{onClick:()=>K(!0),className:"flex items-center gap-1.5 text-xs text-muted-foreground hover:text-destructive transition-colors mt-1",children:[(0,b.jsx)(j.LogOut,{className:"h-3.5 w-3.5"}),"Disconnect"]})]}),"github"===a&&(0,b.jsx)(p,{projectId:l}),s&&(0,b.jsx)(q.default,{isOpen:J,title:`Disconnect ${a}?`,message:"github"===a?"This revokes the stored credentials. Your attached repositories and synced history stay — reconnecting will resume where you left off.":`This revokes the stored credentials for ${a}. Project settings and synced history stay.`,confirmLabel:"Disconnect",cancelLabel:"Cancel",variant:"danger",onConfirm:()=>{K(!1),s()},onCancel:()=>K(!1)}),"github"!==a&&M.length>0&&(0,b.jsx)("div",{className:"w-full max-w-md",children:(0,b.jsxs)("div",{className:"border rounded-xl p-5 flex flex-col gap-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(i.Terminal,{className:"h-4 w-4 text-muted-foreground"}),(0,b.jsx)("span",{className:"text-sm font-medium",children:"MCP Server"})]}),(0,b.jsxs)("p",{className:"text-xs text-muted-foreground leading-relaxed -mt-2",children:["Install the ",a," MCP server so agents can access ",a," directly."]}),M.map(a=>{let c=r[a],e=v?.[a]??!1,f=F===a,i=H[a];return(0,b.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,b.jsx)("span",{className:"text-xs font-medium text-foreground",children:c.name}),e?(0,b.jsxs)("span",{className:"text-xs font-medium text-green-600 flex items-center gap-1",children:[(0,b.jsx)(d.CheckCircle2,{className:"h-3.5 w-3.5"}),"Installed"]}):(0,b.jsx)("button",{onClick:()=>L(a),disabled:f||!w,className:"flex items-center gap-1.5 px-3 py-1 bg-secondary text-secondary-foreground rounded-md text-xs font-semibold hover:bg-secondary/90 disabled:opacity-50 transition-all active:scale-[0.98]",children:f?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(g.Loader2,{className:"h-3 w-3 animate-spin"}),"Installing…"]}):(0,b.jsx)(b.Fragment,{children:"Install"})})]}),e&&(0,b.jsxs)("p",{className:"text-[10px] text-muted-foreground",children:["Configured in ",(0,b.jsx)("code",{className:"font-mono",children:c.configPath})]}),i&&(0,b.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-destructive bg-destructive/10 p-2 rounded-md",children:[(0,b.jsx)(h.AlertCircle,{className:"h-3.5 w-3.5 shrink-0"}),i]})]},a)})]})})]});let N=async()=>{if(x.trim()){E(!0),A(null);try{let a=await o(x.trim());a.ok?(y(""),C(!1)):A(a.error??"Failed to connect")}catch(a){A("An unexpected error occurred")}finally{E(!1)}}};return(0,b.jsxs)("div",{className:"flex flex-col items-center gap-6 p-8",children:[(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(k.TrackerIcon,{trackerType:a,className:"h-16 w-16"}),(0,b.jsx)("div",{className:"absolute -bottom-1 -right-1 h-6 w-6 rounded-full bg-background border flex items-center justify-center shadow-sm",children:(0,b.jsx)(f.Globe,{className:"h-3 w-3 text-muted-foreground"})})]}),(0,b.jsxs)("div",{className:"text-center space-y-2",children:[(0,b.jsxs)("h3",{className:"text-lg font-semibold capitalize",children:["Connect to ",a]}),(0,b.jsxs)("p",{className:"text-sm text-muted-foreground text-center max-w-sm leading-relaxed",children:["Link your ",a," account to import issues, track progress, and automate your workflow."]})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-3 w-full max-w-xs pt-2",children:[(0,b.jsxs)("button",{onClick:n,className:"flex items-center justify-center gap-2 w-full px-4 py-2.5 bg-primary text-primary-foreground rounded-lg text-sm font-semibold hover:bg-primary/90 transition-all active:scale-[0.98] shadow-sm",children:[(0,b.jsx)(f.Globe,{className:"h-4 w-4"}),"Connect with OAuth"]}),"github"!==a&&(0,b.jsxs)("button",{onClick:()=>{C(!B),A(null)},className:"flex items-center justify-center gap-2 w-full px-4 py-2 text-sm text-muted-foreground hover:text-foreground transition-colors font-medium",children:[(0,b.jsx)(e.Key,{className:"h-3.5 w-3.5"}),B?"Use OAuth instead":"Connect with API key"]}),(0,b.jsx)("div",{className:`grid transition-all duration-300 ease-in-out ${B?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0 pointer-events-none"}`,children:(0,b.jsx)("div",{className:"overflow-hidden",children:(0,b.jsxs)("div",{className:"flex flex-col gap-3 pt-2",children:[(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)("input",{type:"password",value:x,onChange:a=>{y(a.target.value),z&&A(null)},placeholder:"Paste your API key here",className:`w-full px-3 py-2 border rounded-lg text-sm bg-background transition-colors focus:outline-none focus:ring-2 focus:ring-primary/20 ${z?"border-destructive":"focus:border-primary"}`,onKeyDown:a=>"Enter"===a.key&&N()}),(0,b.jsx)(e.Key,{className:"absolute right-3 top-2.5 h-4 w-4 text-muted-foreground/50"})]}),z&&(0,b.jsxs)("div",{className:"flex items-center gap-2 text-xs text-destructive bg-destructive/10 p-2 rounded-md",children:[(0,b.jsx)(h.AlertCircle,{className:"h-3.5 w-3.5 shrink-0"}),(0,b.jsx)("p",{children:z})]}),(0,b.jsx)("button",{onClick:N,disabled:D||!x.trim(),className:"flex items-center justify-center gap-2 w-full px-4 py-2 bg-secondary text-secondary-foreground rounded-lg text-sm font-semibold hover:bg-secondary/90 disabled:opacity-50 transition-all active:scale-[0.98]",children:D?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(g.Loader2,{className:"h-4 w-4 animate-spin"}),"Connecting..."]}):"Verify & Connect"}),(0,b.jsxs)("p",{className:"text-[10px] text-muted-foreground text-center px-2",children:["Your API key is stored securely and only used for ",a," integration."]})]})})})]})]})}a.s(["default",()=>s],778784)}];
2
+
3
+ //# sourceMappingURL=apps_local_eec36ab6._.js.map