@mndrk/agx 2.0.42 → 2.0.45

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 (1207) hide show
  1. package/cloud-runtime/standalone/.linear-token.json +4 -0
  2. package/cloud-runtime/standalone/.next/BUILD_ID +1 -1
  3. package/cloud-runtime/standalone/.next/app-path-routes-manifest.json +12 -2
  4. package/cloud-runtime/standalone/.next/build-manifest.json +8 -8
  5. package/cloud-runtime/standalone/.next/prerender-manifest.json +3 -3
  6. package/cloud-runtime/standalone/.next/routes-manifest.json +77 -17
  7. package/cloud-runtime/standalone/.next/server/app/_global-error/page/build-manifest.json +6 -6
  8. package/cloud-runtime/standalone/.next/server/app/_global-error/page.js +2 -2
  9. package/cloud-runtime/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  10. package/cloud-runtime/standalone/.next/server/app/_global-error.html +2 -2
  11. package/cloud-runtime/standalone/.next/server/app/_global-error.rsc +7 -7
  12. package/cloud-runtime/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
  13. package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
  14. package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +3 -3
  15. package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
  16. package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  17. package/cloud-runtime/standalone/.next/server/app/_not-found/page/build-manifest.json +6 -6
  18. package/cloud-runtime/standalone/.next/server/app/_not-found/page.js +2 -2
  19. package/cloud-runtime/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  20. package/cloud-runtime/standalone/.next/server/app/_not-found.html +2 -2
  21. package/cloud-runtime/standalone/.next/server/app/_not-found.rsc +12 -12
  22. package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +12 -12
  23. package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +3 -3
  24. package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +8 -8
  25. package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  26. package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  27. package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  28. package/cloud-runtime/standalone/.next/server/app/agents/[id]/page/build-manifest.json +6 -6
  29. package/cloud-runtime/standalone/.next/server/app/agents/[id]/page.js +2 -2
  30. package/cloud-runtime/standalone/.next/server/app/agents/[id]/page.js.nft.json +1 -1
  31. package/cloud-runtime/standalone/.next/server/app/agents/[id]/page_client-reference-manifest.js +1 -1
  32. package/cloud-runtime/standalone/.next/server/app/agents/page/build-manifest.json +6 -6
  33. package/cloud-runtime/standalone/.next/server/app/agents/page.js +2 -2
  34. package/cloud-runtime/standalone/.next/server/app/agents/page.js.nft.json +1 -1
  35. package/cloud-runtime/standalone/.next/server/app/agents/page_client-reference-manifest.js +1 -1
  36. package/cloud-runtime/standalone/.next/server/app/agents.html +2 -2
  37. package/cloud-runtime/standalone/.next/server/app/agents.rsc +14 -14
  38. package/cloud-runtime/standalone/.next/server/app/agents.segments/_full.segment.rsc +14 -14
  39. package/cloud-runtime/standalone/.next/server/app/agents.segments/_head.segment.rsc +3 -3
  40. package/cloud-runtime/standalone/.next/server/app/agents.segments/_index.segment.rsc +8 -8
  41. package/cloud-runtime/standalone/.next/server/app/agents.segments/_tree.segment.rsc +2 -2
  42. package/cloud-runtime/standalone/.next/server/app/agents.segments/agents/__PAGE__.segment.rsc +4 -4
  43. package/cloud-runtime/standalone/.next/server/app/agents.segments/agents.segment.rsc +3 -3
  44. package/cloud-runtime/standalone/.next/server/app/api/agent-specs/pull/route.js +2 -2
  45. package/cloud-runtime/standalone/.next/server/app/api/agent-specs/route.js +6 -4
  46. package/cloud-runtime/standalone/.next/server/app/api/agent-specs/route.js.nft.json +1 -1
  47. package/cloud-runtime/standalone/.next/server/app/api/agents/[id]/messages/route.js +2 -2
  48. package/cloud-runtime/standalone/.next/server/app/api/agents/[id]/profile/route.js +7 -5
  49. package/cloud-runtime/standalone/.next/server/app/api/agents/[id]/profile/route.js.nft.json +1 -1
  50. package/cloud-runtime/standalone/.next/server/app/api/agents/export/route.js +6 -4
  51. package/cloud-runtime/standalone/.next/server/app/api/agents/export/route.js.nft.json +1 -1
  52. package/cloud-runtime/standalone/.next/server/app/api/attachments/[id]/route.js +2 -2
  53. package/cloud-runtime/standalone/.next/server/app/api/audit/route.js +2 -2
  54. package/cloud-runtime/standalone/.next/server/app/api/automations/create/route.js +9 -6
  55. package/cloud-runtime/standalone/.next/server/app/api/automations/create/route.js.nft.json +1 -1
  56. package/cloud-runtime/standalone/.next/server/app/api/automations/route.js +5 -3
  57. package/cloud-runtime/standalone/.next/server/app/api/automations/route.js.nft.json +1 -1
  58. package/cloud-runtime/standalone/.next/server/app/api/chat/route.js +10 -7
  59. package/cloud-runtime/standalone/.next/server/app/api/chat/route.js.nft.json +1 -1
  60. package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/route.js +2 -2
  61. package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/signal/route.js +3 -3
  62. package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/signal/route.js.nft.json +1 -1
  63. package/cloud-runtime/standalone/.next/server/app/api/chat-runs/route.js +2 -2
  64. package/cloud-runtime/standalone/.next/server/app/api/daemon/route.js +2 -2
  65. package/cloud-runtime/standalone/.next/server/app/api/domains/[id]/route.js +2 -2
  66. package/cloud-runtime/standalone/.next/server/app/api/file-read/route.js +2 -2
  67. package/cloud-runtime/standalone/.next/server/app/api/file-search/route.js +2 -2
  68. package/cloud-runtime/standalone/.next/server/app/api/file-search/route.js.nft.json +1 -1
  69. package/cloud-runtime/standalone/.next/server/app/api/filesystem/browse/route.js +2 -2
  70. package/cloud-runtime/standalone/.next/server/app/api/filesystem/pick-folder/route.js +3 -3
  71. package/cloud-runtime/standalone/.next/server/app/api/filesystem/pick-folder/route.js.nft.json +1 -1
  72. package/cloud-runtime/standalone/.next/server/app/api/graphs/[graphId]/nodes/[nodeId]/route.js +5 -2
  73. package/cloud-runtime/standalone/.next/server/app/api/graphs/[graphId]/nodes/[nodeId]/route.js.nft.json +1 -1
  74. package/cloud-runtime/standalone/.next/server/app/api/health/route.js +7 -5
  75. package/cloud-runtime/standalone/.next/server/app/api/health/route.js.nft.json +1 -1
  76. package/cloud-runtime/standalone/.next/server/app/api/history/route.js +2 -2
  77. package/cloud-runtime/standalone/.next/server/app/api/history/status/route.js +2 -2
  78. package/cloud-runtime/standalone/.next/server/app/api/knowledge-notes/route.js +6 -4
  79. package/cloud-runtime/standalone/.next/server/app/api/knowledge-notes/route.js.nft.json +1 -1
  80. package/cloud-runtime/standalone/.next/server/app/api/learnings/route.js +7 -5
  81. package/cloud-runtime/standalone/.next/server/app/api/learnings/route.js.nft.json +1 -1
  82. package/cloud-runtime/standalone/.next/server/app/api/linear/auth/route/app-paths-manifest.json +3 -0
  83. package/cloud-runtime/standalone/.next/server/app/api/linear/auth/route.js +7 -0
  84. package/cloud-runtime/standalone/.next/server/app/api/linear/auth/route.js.nft.json +1 -0
  85. package/cloud-runtime/standalone/.next/server/app/api/linear/auth/route_client-reference-manifest.js +2 -0
  86. package/cloud-runtime/standalone/.next/server/app/api/linear/callback/route/app-paths-manifest.json +3 -0
  87. package/cloud-runtime/standalone/.next/server/app/api/linear/callback/route.js +7 -0
  88. package/cloud-runtime/standalone/.next/server/app/api/linear/callback/route.js.nft.json +1 -0
  89. package/cloud-runtime/standalone/.next/server/app/api/linear/callback/route_client-reference-manifest.js +2 -0
  90. package/cloud-runtime/standalone/.next/server/app/api/linear/cycles/route/app-paths-manifest.json +3 -0
  91. package/cloud-runtime/standalone/.next/server/app/api/linear/cycles/route/build-manifest.json +11 -0
  92. package/cloud-runtime/standalone/.next/server/app/api/linear/cycles/route/server-reference-manifest.json +4 -0
  93. package/cloud-runtime/standalone/.next/server/app/api/linear/cycles/route.js +7 -0
  94. package/cloud-runtime/standalone/.next/server/app/api/linear/cycles/route.js.map +5 -0
  95. package/cloud-runtime/standalone/.next/server/app/api/linear/cycles/route.js.nft.json +1 -0
  96. package/cloud-runtime/standalone/.next/server/app/api/linear/cycles/route_client-reference-manifest.js +2 -0
  97. package/cloud-runtime/standalone/.next/server/app/api/linear/issues/context/route/app-paths-manifest.json +3 -0
  98. package/cloud-runtime/standalone/.next/server/app/api/linear/issues/context/route/build-manifest.json +11 -0
  99. package/cloud-runtime/standalone/.next/server/app/api/linear/issues/context/route/server-reference-manifest.json +4 -0
  100. package/cloud-runtime/standalone/.next/server/app/api/linear/issues/context/route.js +10 -0
  101. package/cloud-runtime/standalone/.next/server/app/api/linear/issues/context/route.js.map +5 -0
  102. package/cloud-runtime/standalone/.next/server/app/api/linear/issues/context/route.js.nft.json +1 -0
  103. package/cloud-runtime/standalone/.next/server/app/api/linear/issues/context/route_client-reference-manifest.js +2 -0
  104. package/cloud-runtime/standalone/.next/server/app/api/linear/issues/route/app-paths-manifest.json +3 -0
  105. package/cloud-runtime/standalone/.next/server/app/api/linear/issues/route/build-manifest.json +11 -0
  106. package/cloud-runtime/standalone/.next/server/app/api/linear/issues/route/server-reference-manifest.json +4 -0
  107. package/cloud-runtime/standalone/.next/server/app/api/linear/issues/route.js +10 -0
  108. package/cloud-runtime/standalone/.next/server/app/api/linear/issues/route.js.map +5 -0
  109. package/cloud-runtime/standalone/.next/server/app/api/linear/issues/route.js.nft.json +1 -0
  110. package/cloud-runtime/standalone/.next/server/app/api/linear/issues/route_client-reference-manifest.js +2 -0
  111. package/cloud-runtime/standalone/.next/server/app/api/linear/mcp-setup/route/app-paths-manifest.json +3 -0
  112. package/cloud-runtime/standalone/.next/server/app/api/linear/mcp-setup/route/build-manifest.json +11 -0
  113. package/cloud-runtime/standalone/.next/server/app/api/linear/mcp-setup/route/server-reference-manifest.json +4 -0
  114. package/cloud-runtime/standalone/.next/server/app/api/linear/mcp-setup/route.js +8 -0
  115. package/cloud-runtime/standalone/.next/server/app/api/linear/mcp-setup/route.js.map +5 -0
  116. package/cloud-runtime/standalone/.next/server/app/api/linear/mcp-setup/route.js.nft.json +1 -0
  117. package/cloud-runtime/standalone/.next/server/app/api/linear/mcp-setup/route_client-reference-manifest.js +2 -0
  118. package/cloud-runtime/standalone/.next/server/app/api/linear/options/route/app-paths-manifest.json +3 -0
  119. package/cloud-runtime/standalone/.next/server/app/api/linear/options/route/build-manifest.json +11 -0
  120. package/cloud-runtime/standalone/.next/server/app/api/linear/options/route/server-reference-manifest.json +4 -0
  121. package/cloud-runtime/standalone/.next/server/app/api/linear/options/route.js +7 -0
  122. package/cloud-runtime/standalone/.next/server/app/api/linear/options/route.js.map +5 -0
  123. package/cloud-runtime/standalone/.next/server/app/api/linear/options/route.js.nft.json +1 -0
  124. package/cloud-runtime/standalone/.next/server/app/api/linear/options/route_client-reference-manifest.js +2 -0
  125. package/cloud-runtime/standalone/.next/server/app/api/linear/runs/[id]/route/app-paths-manifest.json +3 -0
  126. package/cloud-runtime/standalone/.next/server/app/api/linear/runs/[id]/route/build-manifest.json +11 -0
  127. package/cloud-runtime/standalone/.next/server/app/api/linear/runs/[id]/route/server-reference-manifest.json +4 -0
  128. package/cloud-runtime/standalone/.next/server/app/api/linear/runs/[id]/route.js +7 -0
  129. package/cloud-runtime/standalone/.next/server/app/api/linear/runs/[id]/route.js.map +5 -0
  130. package/cloud-runtime/standalone/.next/server/app/api/linear/runs/[id]/route.js.nft.json +1 -0
  131. package/cloud-runtime/standalone/.next/server/app/api/linear/runs/[id]/route_client-reference-manifest.js +2 -0
  132. package/cloud-runtime/standalone/.next/server/app/api/linear/runs/route/app-paths-manifest.json +3 -0
  133. package/cloud-runtime/standalone/.next/server/app/api/linear/runs/route/build-manifest.json +11 -0
  134. package/cloud-runtime/standalone/.next/server/app/api/linear/runs/route/server-reference-manifest.json +4 -0
  135. package/cloud-runtime/standalone/.next/server/app/api/linear/runs/route.js +7 -0
  136. package/cloud-runtime/standalone/.next/server/app/api/linear/runs/route.js.map +5 -0
  137. package/cloud-runtime/standalone/.next/server/app/api/linear/runs/route.js.nft.json +1 -0
  138. package/cloud-runtime/standalone/.next/server/app/api/linear/runs/route_client-reference-manifest.js +2 -0
  139. package/cloud-runtime/standalone/.next/server/app/api/linear/status/route/app-paths-manifest.json +3 -0
  140. package/cloud-runtime/standalone/.next/server/app/api/linear/status/route/build-manifest.json +11 -0
  141. package/cloud-runtime/standalone/.next/server/app/api/linear/status/route/server-reference-manifest.json +4 -0
  142. package/cloud-runtime/standalone/.next/server/app/api/linear/status/route.js +7 -0
  143. package/cloud-runtime/standalone/.next/server/app/api/linear/status/route.js.map +5 -0
  144. package/cloud-runtime/standalone/.next/server/app/api/linear/status/route.js.nft.json +1 -0
  145. package/cloud-runtime/standalone/.next/server/app/api/linear/status/route_client-reference-manifest.js +2 -0
  146. package/cloud-runtime/standalone/.next/server/app/api/linear/token/route/app-paths-manifest.json +3 -0
  147. package/cloud-runtime/standalone/.next/server/app/api/linear/token/route/build-manifest.json +11 -0
  148. package/cloud-runtime/standalone/.next/server/app/api/linear/token/route/server-reference-manifest.json +4 -0
  149. package/cloud-runtime/standalone/.next/server/app/api/linear/token/route.js +7 -0
  150. package/cloud-runtime/standalone/.next/server/app/api/linear/token/route.js.map +5 -0
  151. package/cloud-runtime/standalone/.next/server/app/api/linear/token/route.js.nft.json +1 -0
  152. package/cloud-runtime/standalone/.next/server/app/api/linear/token/route_client-reference-manifest.js +2 -0
  153. package/cloud-runtime/standalone/.next/server/app/api/logs/route.js +2 -2
  154. package/cloud-runtime/standalone/.next/server/app/api/logs/stream/route.js +2 -2
  155. package/cloud-runtime/standalone/.next/server/app/api/memories/route.js +2 -2
  156. package/cloud-runtime/standalone/.next/server/app/api/messages/[id]/route.js +2 -2
  157. package/cloud-runtime/standalone/.next/server/app/api/migrate/teams-to-projects/route.js +2 -2
  158. package/cloud-runtime/standalone/.next/server/app/api/migrate/workspaces-to-projects/route.js +2 -2
  159. package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/cancel/route.js +3 -3
  160. package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/cancel/route.js.nft.json +1 -1
  161. package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/signal/route.js +3 -3
  162. package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/signal/route.js.nft.json +1 -1
  163. package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/start/route.js +7 -5
  164. package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/start/route.js.nft.json +1 -1
  165. package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/status/route.js +7 -5
  166. package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/status/route.js.nft.json +1 -1
  167. package/cloud-runtime/standalone/.next/server/app/api/participants/route.js +7 -5
  168. package/cloud-runtime/standalone/.next/server/app/api/participants/route.js.nft.json +1 -1
  169. package/cloud-runtime/standalone/.next/server/app/api/processes/route.js +2 -2
  170. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/agents/route.js +7 -5
  171. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/agents/route.js.nft.json +1 -1
  172. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/migrate-v1/route.js +7 -5
  173. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/migrate-v1/route.js.nft.json +1 -1
  174. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/migrate-v2/route.js +7 -5
  175. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/migrate-v2/route.js.nft.json +1 -1
  176. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/route.js +5 -3
  177. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/route.js.nft.json +1 -1
  178. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/skills/route.js +7 -5
  179. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/skills/route.js.nft.json +1 -1
  180. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/threads/route.js +7 -5
  181. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/threads/route.js.nft.json +1 -1
  182. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/variables/route.js +7 -5
  183. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/variables/route.js.nft.json +1 -1
  184. package/cloud-runtime/standalone/.next/server/app/api/projects/route.js +7 -5
  185. package/cloud-runtime/standalone/.next/server/app/api/projects/route.js.nft.json +1 -1
  186. package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/cancel/route.js +7 -5
  187. package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/cancel/route.js.nft.json +1 -1
  188. package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/route.js +8 -6
  189. package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/route.js.nft.json +1 -1
  190. package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/runs/route.js +7 -5
  191. package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/runs/route.js.nft.json +1 -1
  192. package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/agents/route.js +7 -5
  193. package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/agents/route.js.nft.json +1 -1
  194. package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/poll/route.js +9 -6
  195. package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/poll/route.js.nft.json +1 -1
  196. package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/route.js +8 -6
  197. package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/route.js.nft.json +1 -1
  198. package/cloud-runtime/standalone/.next/server/app/api/providers/route.js +3 -3
  199. package/cloud-runtime/standalone/.next/server/app/api/providers/route.js.nft.json +1 -1
  200. package/cloud-runtime/standalone/.next/server/app/api/queue/complete/route.js +7 -5
  201. package/cloud-runtime/standalone/.next/server/app/api/queue/complete/route.js.nft.json +1 -1
  202. package/cloud-runtime/standalone/.next/server/app/api/queue/route.js +10 -8
  203. package/cloud-runtime/standalone/.next/server/app/api/queue/route.js.nft.json +1 -1
  204. package/cloud-runtime/standalone/.next/server/app/api/reactions/route.js +2 -2
  205. package/cloud-runtime/standalone/.next/server/app/api/schedules/debug/route.js +6 -4
  206. package/cloud-runtime/standalone/.next/server/app/api/schedules/debug/route.js.nft.json +1 -1
  207. package/cloud-runtime/standalone/.next/server/app/api/schedules/poll/route.js +8 -6
  208. package/cloud-runtime/standalone/.next/server/app/api/schedules/poll/route.js.nft.json +1 -1
  209. package/cloud-runtime/standalone/.next/server/app/api/schedules/route.js +9 -6
  210. package/cloud-runtime/standalone/.next/server/app/api/schedules/route.js.nft.json +1 -1
  211. package/cloud-runtime/standalone/.next/server/app/api/search/route.js +2 -2
  212. package/cloud-runtime/standalone/.next/server/app/api/skills/assign/route.js +1 -1
  213. package/cloud-runtime/standalone/.next/server/app/api/skills/assign/route.js.nft.json +1 -1
  214. package/cloud-runtime/standalone/.next/server/app/api/skills/available/route.js +3 -3
  215. package/cloud-runtime/standalone/.next/server/app/api/skills/available/route.js.nft.json +1 -1
  216. package/cloud-runtime/standalone/.next/server/app/api/skills/detail/route.js +3 -3
  217. package/cloud-runtime/standalone/.next/server/app/api/skills/detail/route.js.nft.json +1 -1
  218. package/cloud-runtime/standalone/.next/server/app/api/skills/history/route.js +3 -3
  219. package/cloud-runtime/standalone/.next/server/app/api/skills/history/route.js.nft.json +1 -1
  220. package/cloud-runtime/standalone/.next/server/app/api/skills/learn/route.js +3 -3
  221. package/cloud-runtime/standalone/.next/server/app/api/skills/learn/route.js.nft.json +1 -1
  222. package/cloud-runtime/standalone/.next/server/app/api/skills/route.js +3 -3
  223. package/cloud-runtime/standalone/.next/server/app/api/skills/route.js.nft.json +1 -1
  224. package/cloud-runtime/standalone/.next/server/app/api/skills/unlearn/route.js +1 -1
  225. package/cloud-runtime/standalone/.next/server/app/api/skills/unlearn/route.js.nft.json +1 -1
  226. package/cloud-runtime/standalone/.next/server/app/api/status/route.js +3 -3
  227. package/cloud-runtime/standalone/.next/server/app/api/status/route.js.nft.json +1 -1
  228. package/cloud-runtime/standalone/.next/server/app/api/summarize/route.js +7 -5
  229. package/cloud-runtime/standalone/.next/server/app/api/summarize/route.js.nft.json +1 -1
  230. package/cloud-runtime/standalone/.next/server/app/api/system/db-status/route.js +2 -2
  231. package/cloud-runtime/standalone/.next/server/app/api/task-drafts/route.js +2 -2
  232. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/[commentId]/route.js +6 -4
  233. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/[commentId]/route.js.nft.json +1 -1
  234. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/route.js +8 -6
  235. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/route.js.nft.json +1 -1
  236. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/costs/route.js +7 -5
  237. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/costs/route.js.nft.json +1 -1
  238. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/dependencies/route.js +8 -6
  239. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/dependencies/route.js.nft.json +1 -1
  240. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/events/route.js +8 -5
  241. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/events/route.js.nft.json +1 -1
  242. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/history/route.js +9 -6
  243. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/history/route.js.nft.json +1 -1
  244. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/metrics/route.js +9 -6
  245. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/metrics/route.js.nft.json +1 -1
  246. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/pause/route.js +2 -2
  247. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/replan/route.js +12 -8
  248. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/replan/route.js.nft.json +1 -1
  249. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/restart/route.js +7 -5
  250. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/restart/route.js.nft.json +1 -1
  251. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/resume/route.js +7 -5
  252. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/resume/route.js.nft.json +1 -1
  253. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/rollback/route.js +11 -7
  254. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/rollback/route.js.nft.json +1 -1
  255. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/route.js +13 -9
  256. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/route.js.nft.json +1 -1
  257. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/schedule/route.js +11 -8
  258. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/schedule/route.js.nft.json +1 -1
  259. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/start/route.js +7 -5
  260. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/start/route.js.nft.json +1 -1
  261. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/stop/route.js +3 -1
  262. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/stop/route.js.nft.json +1 -1
  263. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/heartbeat/route.js +2 -2
  264. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/history/route.js +7 -5
  265. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/history/route.js.nft.json +1 -1
  266. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/logs/route.js +9 -6
  267. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/logs/route.js.nft.json +1 -1
  268. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/logs/stream/route.js +2 -2
  269. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/comments/route.js +5 -3
  270. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/comments/route.js.nft.json +1 -1
  271. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/complete/route.js +11 -8
  272. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/complete/route.js.nft.json +1 -1
  273. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/fail/route.js +11 -8
  274. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/fail/route.js.nft.json +1 -1
  275. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/resume/route.js +11 -8
  276. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/resume/route.js.nft.json +1 -1
  277. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/start/route.js +11 -8
  278. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/start/route.js.nft.json +1 -1
  279. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/stop/route.js +11 -8
  280. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/stop/route.js.nft.json +1 -1
  281. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/verify/route.js +12 -9
  282. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/verify/route.js.nft.json +1 -1
  283. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/route.js +9 -6
  284. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/route.js.nft.json +1 -1
  285. package/cloud-runtime/standalone/.next/server/app/api/tasks/assign-orphans/route.js +7 -5
  286. package/cloud-runtime/standalone/.next/server/app/api/tasks/assign-orphans/route.js.nft.json +1 -1
  287. package/cloud-runtime/standalone/.next/server/app/api/tasks/extract/route.js +7 -5
  288. package/cloud-runtime/standalone/.next/server/app/api/tasks/extract/route.js.nft.json +1 -1
  289. package/cloud-runtime/standalone/.next/server/app/api/tasks/route.js +11 -8
  290. package/cloud-runtime/standalone/.next/server/app/api/tasks/route.js.nft.json +1 -1
  291. package/cloud-runtime/standalone/.next/server/app/api/tasks/stream/route.js +2 -2
  292. package/cloud-runtime/standalone/.next/server/app/api/thread-export/route.js +2 -2
  293. package/cloud-runtime/standalone/.next/server/app/api/threads/knowledge/route.js +6 -5
  294. package/cloud-runtime/standalone/.next/server/app/api/threads/knowledge/route.js.nft.json +1 -1
  295. package/cloud-runtime/standalone/.next/server/app/api/threads/route.js +6 -5
  296. package/cloud-runtime/standalone/.next/server/app/api/threads/route.js.nft.json +1 -1
  297. package/cloud-runtime/standalone/.next/server/app/api/upload/[id]/route.js +2 -2
  298. package/cloud-runtime/standalone/.next/server/app/api/upload/route.js +2 -2
  299. package/cloud-runtime/standalone/.next/server/app/api/user-settings/route.js +7 -5
  300. package/cloud-runtime/standalone/.next/server/app/api/user-settings/route.js.nft.json +1 -1
  301. package/cloud-runtime/standalone/.next/server/app/api/userPreferences/route.js +2 -2
  302. package/cloud-runtime/standalone/.next/server/app/automations/page/build-manifest.json +6 -6
  303. package/cloud-runtime/standalone/.next/server/app/automations/page/react-loadable-manifest.json +11 -3
  304. package/cloud-runtime/standalone/.next/server/app/automations/page.js +2 -2
  305. package/cloud-runtime/standalone/.next/server/app/automations/page.js.nft.json +1 -1
  306. package/cloud-runtime/standalone/.next/server/app/automations/page_client-reference-manifest.js +1 -1
  307. package/cloud-runtime/standalone/.next/server/app/automations.html +2 -2
  308. package/cloud-runtime/standalone/.next/server/app/automations.rsc +15 -15
  309. package/cloud-runtime/standalone/.next/server/app/automations.segments/_full.segment.rsc +15 -15
  310. package/cloud-runtime/standalone/.next/server/app/automations.segments/_head.segment.rsc +3 -3
  311. package/cloud-runtime/standalone/.next/server/app/automations.segments/_index.segment.rsc +8 -8
  312. package/cloud-runtime/standalone/.next/server/app/automations.segments/_tree.segment.rsc +3 -3
  313. package/cloud-runtime/standalone/.next/server/app/automations.segments/automations/__PAGE__.segment.rsc +5 -5
  314. package/cloud-runtime/standalone/.next/server/app/automations.segments/automations.segment.rsc +3 -3
  315. package/cloud-runtime/standalone/.next/server/app/board/page/build-manifest.json +6 -6
  316. package/cloud-runtime/standalone/.next/server/app/board/page.js +2 -2
  317. package/cloud-runtime/standalone/.next/server/app/board/page_client-reference-manifest.js +1 -1
  318. package/cloud-runtime/standalone/.next/server/app/board.html +2 -2
  319. package/cloud-runtime/standalone/.next/server/app/board.rsc +12 -12
  320. package/cloud-runtime/standalone/.next/server/app/board.segments/_full.segment.rsc +12 -12
  321. package/cloud-runtime/standalone/.next/server/app/board.segments/_head.segment.rsc +3 -3
  322. package/cloud-runtime/standalone/.next/server/app/board.segments/_index.segment.rsc +8 -8
  323. package/cloud-runtime/standalone/.next/server/app/board.segments/_tree.segment.rsc +2 -2
  324. package/cloud-runtime/standalone/.next/server/app/board.segments/board/__PAGE__.segment.rsc +2 -2
  325. package/cloud-runtime/standalone/.next/server/app/board.segments/board.segment.rsc +3 -3
  326. package/cloud-runtime/standalone/.next/server/app/execution-graph/page/build-manifest.json +6 -6
  327. package/cloud-runtime/standalone/.next/server/app/execution-graph/page.js +2 -2
  328. package/cloud-runtime/standalone/.next/server/app/execution-graph/page.js.nft.json +1 -1
  329. package/cloud-runtime/standalone/.next/server/app/execution-graph/page_client-reference-manifest.js +1 -1
  330. package/cloud-runtime/standalone/.next/server/app/execution-graph.html +2 -2
  331. package/cloud-runtime/standalone/.next/server/app/execution-graph.rsc +14 -14
  332. package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_full.segment.rsc +14 -14
  333. package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_head.segment.rsc +3 -3
  334. package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_index.segment.rsc +8 -8
  335. package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_tree.segment.rsc +2 -2
  336. package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/execution-graph/__PAGE__.segment.rsc +4 -4
  337. package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/execution-graph.segment.rsc +3 -3
  338. package/cloud-runtime/standalone/.next/server/app/index.html +2 -2
  339. package/cloud-runtime/standalone/.next/server/app/index.rsc +15 -15
  340. package/cloud-runtime/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +5 -5
  341. package/cloud-runtime/standalone/.next/server/app/index.segments/_full.segment.rsc +15 -15
  342. package/cloud-runtime/standalone/.next/server/app/index.segments/_head.segment.rsc +3 -3
  343. package/cloud-runtime/standalone/.next/server/app/index.segments/_index.segment.rsc +8 -8
  344. package/cloud-runtime/standalone/.next/server/app/index.segments/_tree.segment.rsc +4 -4
  345. package/cloud-runtime/standalone/.next/server/app/page/build-manifest.json +6 -6
  346. package/cloud-runtime/standalone/.next/server/app/page.js +2 -2
  347. package/cloud-runtime/standalone/.next/server/app/page.js.nft.json +1 -1
  348. package/cloud-runtime/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  349. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/automations/page/build-manifest.json +6 -6
  350. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/automations/page/react-loadable-manifest.json +11 -3
  351. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/automations/page.js +2 -2
  352. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/automations/page.js.nft.json +1 -1
  353. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/automations/page_client-reference-manifest.js +1 -1
  354. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/graph/[taskId]/page/build-manifest.json +6 -6
  355. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/graph/[taskId]/page.js +2 -2
  356. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/graph/[taskId]/page.js.nft.json +1 -1
  357. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/graph/[taskId]/page_client-reference-manifest.js +1 -1
  358. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/knowledge/page/build-manifest.json +6 -6
  359. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/knowledge/page.js +2 -2
  360. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/knowledge/page.js.nft.json +1 -1
  361. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/knowledge/page_client-reference-manifest.js +1 -1
  362. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/linear/page/app-paths-manifest.json +3 -0
  363. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/linear/page/build-manifest.json +18 -0
  364. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/linear/page/next-font-manifest.json +11 -0
  365. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/linear/page/react-loadable-manifest.json +10 -0
  366. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/linear/page/server-reference-manifest.json +4 -0
  367. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/linear/page.js +16 -0
  368. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/linear/page.js.map +5 -0
  369. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/linear/page.js.nft.json +1 -0
  370. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/linear/page_client-reference-manifest.js +2 -0
  371. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/page/build-manifest.json +6 -6
  372. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/page.js +2 -2
  373. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/page.js.nft.json +1 -1
  374. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/page_client-reference-manifest.js +1 -1
  375. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/thread/[threadId]/page/build-manifest.json +6 -6
  376. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/thread/[threadId]/page.js +2 -2
  377. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/thread/[threadId]/page.js.nft.json +1 -1
  378. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/thread/[threadId]/page_client-reference-manifest.js +1 -1
  379. package/cloud-runtime/standalone/.next/server/app/projects/orphans/page/build-manifest.json +6 -6
  380. package/cloud-runtime/standalone/.next/server/app/projects/orphans/page.js +2 -2
  381. package/cloud-runtime/standalone/.next/server/app/projects/orphans/page_client-reference-manifest.js +1 -1
  382. package/cloud-runtime/standalone/.next/server/app/projects/orphans.html +2 -2
  383. package/cloud-runtime/standalone/.next/server/app/projects/orphans.rsc +14 -14
  384. package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_full.segment.rsc +14 -14
  385. package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_head.segment.rsc +3 -3
  386. package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_index.segment.rsc +8 -8
  387. package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_tree.segment.rsc +2 -2
  388. package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/projects/orphans/__PAGE__.segment.rsc +4 -4
  389. package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/projects/orphans.segment.rsc +3 -3
  390. package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/projects.segment.rsc +3 -3
  391. package/cloud-runtime/standalone/.next/server/app/projects/page/build-manifest.json +6 -6
  392. package/cloud-runtime/standalone/.next/server/app/projects/page.js +2 -2
  393. package/cloud-runtime/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  394. package/cloud-runtime/standalone/.next/server/app/projects.html +2 -2
  395. package/cloud-runtime/standalone/.next/server/app/projects.rsc +14 -14
  396. package/cloud-runtime/standalone/.next/server/app/projects.segments/_full.segment.rsc +14 -14
  397. package/cloud-runtime/standalone/.next/server/app/projects.segments/_head.segment.rsc +3 -3
  398. package/cloud-runtime/standalone/.next/server/app/projects.segments/_index.segment.rsc +8 -8
  399. package/cloud-runtime/standalone/.next/server/app/projects.segments/_tree.segment.rsc +2 -2
  400. package/cloud-runtime/standalone/.next/server/app/projects.segments/projects/__PAGE__.segment.rsc +4 -4
  401. package/cloud-runtime/standalone/.next/server/app/projects.segments/projects.segment.rsc +3 -3
  402. package/cloud-runtime/standalone/.next/server/app/settings/page/build-manifest.json +6 -6
  403. package/cloud-runtime/standalone/.next/server/app/settings/page.js +2 -2
  404. package/cloud-runtime/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  405. package/cloud-runtime/standalone/.next/server/app/settings.html +2 -2
  406. package/cloud-runtime/standalone/.next/server/app/settings.rsc +14 -14
  407. package/cloud-runtime/standalone/.next/server/app/settings.segments/_full.segment.rsc +14 -14
  408. package/cloud-runtime/standalone/.next/server/app/settings.segments/_head.segment.rsc +3 -3
  409. package/cloud-runtime/standalone/.next/server/app/settings.segments/_index.segment.rsc +8 -8
  410. package/cloud-runtime/standalone/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  411. package/cloud-runtime/standalone/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +4 -4
  412. package/cloud-runtime/standalone/.next/server/app/settings.segments/settings.segment.rsc +3 -3
  413. package/cloud-runtime/standalone/.next/server/app/skills/page/build-manifest.json +6 -6
  414. package/cloud-runtime/standalone/.next/server/app/skills/page.js +2 -2
  415. package/cloud-runtime/standalone/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  416. package/cloud-runtime/standalone/.next/server/app/skills.html +2 -2
  417. package/cloud-runtime/standalone/.next/server/app/skills.rsc +14 -14
  418. package/cloud-runtime/standalone/.next/server/app/skills.segments/_full.segment.rsc +14 -14
  419. package/cloud-runtime/standalone/.next/server/app/skills.segments/_head.segment.rsc +3 -3
  420. package/cloud-runtime/standalone/.next/server/app/skills.segments/_index.segment.rsc +8 -8
  421. package/cloud-runtime/standalone/.next/server/app/skills.segments/_tree.segment.rsc +2 -2
  422. package/cloud-runtime/standalone/.next/server/app/skills.segments/skills/__PAGE__.segment.rsc +4 -4
  423. package/cloud-runtime/standalone/.next/server/app/skills.segments/skills.segment.rsc +3 -3
  424. package/cloud-runtime/standalone/.next/server/app/status/page/build-manifest.json +6 -6
  425. package/cloud-runtime/standalone/.next/server/app/status/page.js +2 -2
  426. package/cloud-runtime/standalone/.next/server/app/status/page_client-reference-manifest.js +1 -1
  427. package/cloud-runtime/standalone/.next/server/app/status.html +2 -2
  428. package/cloud-runtime/standalone/.next/server/app/status.rsc +14 -14
  429. package/cloud-runtime/standalone/.next/server/app/status.segments/_full.segment.rsc +14 -14
  430. package/cloud-runtime/standalone/.next/server/app/status.segments/_head.segment.rsc +3 -3
  431. package/cloud-runtime/standalone/.next/server/app/status.segments/_index.segment.rsc +8 -8
  432. package/cloud-runtime/standalone/.next/server/app/status.segments/_tree.segment.rsc +2 -2
  433. package/cloud-runtime/standalone/.next/server/app/status.segments/status/__PAGE__.segment.rsc +4 -4
  434. package/cloud-runtime/standalone/.next/server/app/status.segments/status.segment.rsc +3 -3
  435. package/cloud-runtime/standalone/.next/server/app/thread/[id]/page/build-manifest.json +6 -6
  436. package/cloud-runtime/standalone/.next/server/app/thread/[id]/page.js +2 -2
  437. package/cloud-runtime/standalone/.next/server/app/thread/[id]/page.js.nft.json +1 -1
  438. package/cloud-runtime/standalone/.next/server/app/thread/[id]/page_client-reference-manifest.js +1 -1
  439. package/cloud-runtime/standalone/.next/server/app/welcome/page/build-manifest.json +6 -6
  440. package/cloud-runtime/standalone/.next/server/app/welcome/page.js +2 -2
  441. package/cloud-runtime/standalone/.next/server/app/welcome/page.js.nft.json +1 -1
  442. package/cloud-runtime/standalone/.next/server/app/welcome/page_client-reference-manifest.js +1 -1
  443. package/cloud-runtime/standalone/.next/server/app/welcome.html +2 -2
  444. package/cloud-runtime/standalone/.next/server/app/welcome.rsc +14 -14
  445. package/cloud-runtime/standalone/.next/server/app/welcome.segments/_full.segment.rsc +14 -14
  446. package/cloud-runtime/standalone/.next/server/app/welcome.segments/_head.segment.rsc +3 -3
  447. package/cloud-runtime/standalone/.next/server/app/welcome.segments/_index.segment.rsc +8 -8
  448. package/cloud-runtime/standalone/.next/server/app/welcome.segments/_tree.segment.rsc +2 -2
  449. package/cloud-runtime/standalone/.next/server/app/welcome.segments/welcome/__PAGE__.segment.rsc +4 -4
  450. package/cloud-runtime/standalone/.next/server/app/welcome.segments/welcome.segment.rsc +3 -3
  451. package/cloud-runtime/standalone/.next/server/app-paths-manifest.json +12 -2
  452. package/cloud-runtime/standalone/.next/server/chunks/[externals]__31e26905._.js +3 -0
  453. package/cloud-runtime/standalone/.next/server/chunks/[externals]__64355ed1._.js +1 -1
  454. package/cloud-runtime/standalone/.next/server/chunks/[externals]__d6ed3021._.js +3 -0
  455. package/cloud-runtime/standalone/.next/server/chunks/[externals]_node:child_process_261e8bca._.js +1 -1
  456. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__00fd30c8._.js +39 -0
  457. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0284ea89._.js +13 -0
  458. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__04c806f4._.js +3 -0
  459. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0c3dd73b._.js +2 -2
  460. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0c4807d1._.js +49 -0
  461. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0cc3f3b7._.js +2 -2
  462. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0e98af48._.js +97 -0
  463. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0f6532d7._.js +93 -0
  464. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1154e5b3._.js +67 -0
  465. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__11c1214e._.js +49 -0
  466. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__152b2000._.js +61 -0
  467. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__15f3bb96._.js +39 -0
  468. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1b96352c._.js +1 -1
  469. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1dce6c15._.js +1 -1
  470. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1f53e82e._.js +6 -0
  471. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__20533a2c._.js +8 -0
  472. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__255b11f2._.js +1 -1
  473. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__26817611._.js +1 -1
  474. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__294fceef._.js +1 -1
  475. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__2d776aa6._.js +3 -0
  476. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__314d5c41._.js +1 -1
  477. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__352dad6d._.js +1 -1
  478. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3b1431b6._.js +3 -0
  479. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3b83b657._.js +147 -0
  480. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3bf516b6._.js +15 -0
  481. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3fd3c5b1._.js +3 -0
  482. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__42804c1d._.js +110 -0
  483. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__42e713f5._.js +3 -0
  484. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4559476d._.js +49 -0
  485. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__46947325._.js +1 -1
  486. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__46ad8e50._.js +49 -0
  487. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4700e1b3._.js +80 -0
  488. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__49c04b15._.js +49 -0
  489. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4a4265e0._.js +2 -2
  490. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4b0b5fe1._.js +3 -0
  491. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4c2d07e0._.js +3 -0
  492. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4c5c536d._.js +2 -2
  493. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4c89c60a._.js +93 -0
  494. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__509b1dd2._.js +13 -0
  495. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__50ddd3ce._.js +1 -1
  496. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__529a6e1c._.js +2 -2
  497. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__558389f7._.js +3 -0
  498. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__5650bac3._.js +1 -1
  499. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__5a1fd688._.js +1 -1
  500. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__5aaf8c25._.js +15 -0
  501. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__5b13e7a5._.js +3 -0
  502. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__5d359afa._.js +21 -18
  503. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__621dcb4a._.js +1 -1
  504. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__628d686b._.js +1 -1
  505. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__635fe0f9._.js +15 -0
  506. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__68da2825._.js +39 -0
  507. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__6921fe3f._.js +44 -0
  508. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__6988985c._.js +15 -0
  509. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__6db132e9._.js +1 -1
  510. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__6dbe939c._.js +49 -0
  511. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__6fe5a96f._.js +80 -0
  512. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__7012e83d._.js +66 -0
  513. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__70327010._.js +134 -0
  514. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__748c718f._.js +147 -0
  515. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__74a37ca4._.js +13 -0
  516. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__76290829._.js +67 -0
  517. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__76658fd6._.js +15 -0
  518. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__79fa35e4._.js +101 -0
  519. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__7c94b104._.js +2 -2
  520. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__889996dd._.js +49 -0
  521. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__8a35d73b._.js +80 -0
  522. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__8b5fd676._.js +3 -0
  523. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__8c7d1318._.js +13 -0
  524. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__8d205f82._.js +48 -0
  525. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__92924218._.js +2 -2
  526. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__94bd7f65._.js +1 -1
  527. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__9746d1f5._.js +2 -2
  528. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__9b69f93e._.js +2 -2
  529. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__9ffa67b7._.js +49 -0
  530. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__a300f072._.js +49 -0
  531. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__a7e0ac67._.js +25 -0
  532. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__aad349b4._.js +8 -0
  533. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ad6d6402._.js +67 -0
  534. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__af7a73fd._.js +1 -1
  535. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__b133856b._.js +61 -0
  536. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__b8f4e4a3._.js +1 -1
  537. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__bd11b2ad._.js +1 -1
  538. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c029daab._.js +3 -0
  539. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c4ea4921._.js +1 -1
  540. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c4ed5d83._.js +2 -2
  541. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c695a5f2._.js +2 -2
  542. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c8195768._.js +3 -0
  543. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__cb5c7680._.js +1 -1
  544. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ce2a1672._.js +67 -0
  545. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__cf6082be._.js +49 -0
  546. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__d2ac93f2._.js +13 -0
  547. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__d4f42f49._.js +3 -0
  548. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__d57e800e._.js +2 -2
  549. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__d8b615bf._.js +2 -2
  550. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__d9bd6334._.js +1 -1
  551. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__d9f2041b._.js +72 -0
  552. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__db469f1b._.js +1 -1
  553. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__dca6026a._.js +3 -0
  554. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ddb3aa76._.js +7 -0
  555. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__de295ef3._.js +3 -0
  556. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__de2a1e43._.js +1 -1
  557. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__e20922e8._.js +13 -0
  558. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__e3ecfd17._.js +2 -2
  559. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__e7be56ba._.js +3 -0
  560. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ebece93b._.js +3 -0
  561. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ef27f8cd._.js +49 -0
  562. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f13c29c6._.js +39 -0
  563. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f168c6dc._.js +14 -14
  564. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f536cd2f._.js +1 -1
  565. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f9f7f2df._.js +2 -2
  566. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fcdaf6d8._.js +3 -0
  567. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fdb21d1b._.js +1 -1
  568. package/cloud-runtime/standalone/.next/server/chunks/_0a767dfe._.js +1 -1
  569. package/cloud-runtime/standalone/.next/server/chunks/_2a5aeb76._.js +3 -0
  570. package/cloud-runtime/standalone/.next/server/chunks/_2f3e5ac1._.js +1 -1
  571. package/cloud-runtime/standalone/.next/server/chunks/_4689976f._.js +6 -0
  572. package/cloud-runtime/standalone/.next/server/chunks/_5462a047._.js +1 -1
  573. package/cloud-runtime/standalone/.next/server/chunks/_65fd2525._.js +10 -0
  574. package/cloud-runtime/standalone/.next/server/chunks/_682c9d81._.js +6 -0
  575. package/cloud-runtime/standalone/.next/server/chunks/_6e7f0ae4._.js +6 -0
  576. package/cloud-runtime/standalone/.next/server/chunks/_7011db4f._.js +1 -1
  577. package/cloud-runtime/standalone/.next/server/chunks/_9b10087f._.js +8 -0
  578. package/cloud-runtime/standalone/.next/server/chunks/_9dea7192._.js +10 -0
  579. package/cloud-runtime/standalone/.next/server/chunks/_a32a5cdd._.js +6 -0
  580. package/cloud-runtime/standalone/.next/server/chunks/_a877d34f._.js +1 -1
  581. package/cloud-runtime/standalone/.next/server/chunks/_a93e80e8._.js +3 -0
  582. package/cloud-runtime/standalone/.next/server/chunks/_af7bd752._.js +3 -0
  583. package/cloud-runtime/standalone/.next/server/chunks/_b0524599._.js +3 -0
  584. package/cloud-runtime/standalone/.next/server/chunks/_c31ca6ab._.js +1 -1
  585. package/cloud-runtime/standalone/.next/server/chunks/_c3c28282._.js +3 -0
  586. package/cloud-runtime/standalone/.next/server/chunks/_c965f7b3._.js +1 -1
  587. package/cloud-runtime/standalone/.next/server/chunks/_d2ea7d84._.js +3 -0
  588. package/cloud-runtime/standalone/.next/server/chunks/_e469c080._.js +10 -0
  589. package/cloud-runtime/standalone/.next/server/chunks/_ee99a36b._.js +1 -1
  590. package/cloud-runtime/standalone/.next/server/chunks/_fe32a267._.js +3 -0
  591. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_agent-specs_pull_route_actions_33fd1f01.js +1 -1
  592. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_agent-specs_route_actions_3c4fd7d4.js +1 -1
  593. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_agents_[id]_profile_route_actions_e8d70dac.js +1 -1
  594. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_agents_export_route_actions_cc761823.js +1 -1
  595. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_attachments_[id]_route_actions_28040395.js +1 -1
  596. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_audit_route_actions_9d92fa80.js +1 -1
  597. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_automations_create_route_actions_ffb767ae.js +1 -1
  598. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_automations_route_actions_0112e2f7.js +1 -1
  599. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_chat-runs_[id]_route_actions_033ac330.js +1 -1
  600. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_chat-runs_route_actions_0c8cd01c.js +1 -1
  601. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_chat_route_actions_ac0c75e3.js +1 -1
  602. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_daemon_route_actions_89f9619f.js +1 -1
  603. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_domains_[id]_route_actions_36310215.js +1 -1
  604. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_domains_route_actions_8d8cc0aa.js +1 -1
  605. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_file-read_route_actions_a562d24d.js +1 -1
  606. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_file-search_route_actions_8af77a20.js +1 -1
  607. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_filesystem_browse_route_actions_8e268170.js +1 -1
  608. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_filesystem_pick-folder_route_actions_162664ff.js +1 -1
  609. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_health_route_actions_da3433c4.js +1 -1
  610. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_history_route_actions_f1813cd2.js +1 -1
  611. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_knowledge-notes_route_actions_0ddf6109.js +1 -1
  612. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_learnings_route_actions_c32db009.js +1 -1
  613. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_linear_auth_route_actions_6bba0ae0.js +3 -0
  614. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_linear_callback_route_actions_0fc8695c.js +3 -0
  615. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_linear_cycles_route_actions_9cbb85fe.js +3 -0
  616. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_linear_issues_context_route_actions_0b2c282c.js +3 -0
  617. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_linear_issues_route_actions_8f12f3b7.js +3 -0
  618. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_linear_mcp-setup_route_actions_a11b04f4.js +3 -0
  619. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_linear_options_route_actions_29764947.js +3 -0
  620. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_linear_runs_[id]_route_actions_5c46cc4e.js +3 -0
  621. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_linear_runs_route_actions_a99753a8.js +3 -0
  622. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_linear_status_route_actions_e43f376f.js +3 -0
  623. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_linear_token_route_actions_510583b8.js +3 -0
  624. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_logs_route_actions_30a87f47.js +1 -1
  625. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_logs_stream_route_actions_92bf6397.js +1 -1
  626. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_memories_route_actions_f0712914.js +1 -1
  627. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_messages_[id]_route_actions_3ca634d2.js +1 -1
  628. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_participants_route_actions_2bae2919.js +1 -1
  629. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_processes_route_actions_93e6bd01.js +1 -1
  630. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_projects_[id]_agents_route_actions_62a7e8e5.js +1 -1
  631. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_projects_[id]_migrate-v1_route_actions_e28a058d.js +1 -1
  632. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_projects_[id]_migrate-v2_route_actions_0cfff9eb.js +1 -1
  633. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_projects_[id]_route_actions_6fd2e5a5.js +1 -1
  634. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_projects_[id]_skills_route_actions_90fdd1e6.js +1 -1
  635. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_projects_[id]_threads_route_actions_88ac9ddb.js +1 -1
  636. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_projects_[id]_variables_route_actions_e646c8d9.js +1 -1
  637. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_prompt-jobs_[id]_cancel_route_actions_fbd5be89.js +1 -1
  638. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_prompt-jobs_[id]_route_actions_774a2e21.js +1 -1
  639. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_prompt-jobs_[id]_runs_route_actions_6e59ee83.js +1 -1
  640. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_prompt-jobs_agents_route_actions_399e1f19.js +1 -1
  641. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_prompt-jobs_poll_route_actions_23fbbfa1.js +1 -1
  642. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_prompt-jobs_route_actions_acf03860.js +1 -1
  643. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_providers_route_actions_5388b373.js +1 -1
  644. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_queue_complete_route_actions_1350a2ac.js +1 -1
  645. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_queue_route_actions_1e9c9b6f.js +1 -1
  646. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_reactions_route_actions_e075d50e.js +1 -1
  647. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_schedules_debug_route_actions_61c03e5e.js +1 -1
  648. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_schedules_poll_route_actions_dfc6ace4.js +1 -1
  649. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_schedules_route_actions_f5db3d09.js +1 -1
  650. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_search_route_actions_4244da48.js +1 -1
  651. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_skills_assign_route_actions_15267be8.js +1 -1
  652. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_skills_available_route_actions_24023111.js +1 -1
  653. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_skills_detail_route_actions_1148baef.js +1 -1
  654. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_skills_history_route_actions_5e5c4757.js +1 -1
  655. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_skills_learn_route_actions_d3a37d25.js +1 -1
  656. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_skills_route_actions_780e175f.js +1 -1
  657. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_skills_unlearn_route_actions_3dfee433.js +1 -1
  658. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_status_route_actions_d551bce0.js +1 -1
  659. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_summarize_route_actions_3e77989a.js +1 -1
  660. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_system_db-status_route_actions_0f864710.js +1 -1
  661. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_task-drafts_route_actions_3b90bec5.js +1 -1
  662. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_comments_route_actions_71745d03.js +1 -1
  663. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_costs_route_actions_e20adc3f.js +1 -1
  664. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_dependencies_route_actions_b85eaa7f.js +1 -1
  665. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_graph_events_route_actions_3e2c7edc.js +1 -1
  666. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_graph_history_route_actions_debb26dc.js +1 -1
  667. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_graph_metrics_route_actions_a82052ba.js +1 -1
  668. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_graph_pause_route_actions_1341b4e1.js +1 -1
  669. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_graph_replan_route_actions_0d67ebea.js +1 -1
  670. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_graph_restart_route_actions_bbd1883b.js +1 -1
  671. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_graph_resume_route_actions_745fbaa8.js +1 -1
  672. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_graph_rollback_route_actions_77968f37.js +1 -1
  673. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_graph_route_actions_766df5f7.js +1 -1
  674. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_graph_schedule_route_actions_943bcc22.js +1 -1
  675. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_graph_start_route_actions_1d7e784a.js +1 -1
  676. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_graph_stop_route_actions_5f5d6ff0.js +1 -1
  677. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_heartbeat_route_actions_28915a39.js +1 -1
  678. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_history_route_actions_7ecd517e.js +1 -1
  679. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_logs_route_actions_e1a486bd.js +1 -1
  680. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_logs_stream_route_actions_ed381b79.js +1 -1
  681. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_route_actions_8de83605.js +1 -1
  682. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_extract_route_actions_2651c393.js +1 -1
  683. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_route_actions_84c37746.js +1 -1
  684. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_stream_route_actions_37a289da.js +1 -1
  685. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_thread-export_route_actions_26354edd.js +1 -1
  686. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_thread-repos_route_actions_e95d24ee.js +1 -1
  687. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_threads_knowledge_route_actions_c139bcf7.js +1 -1
  688. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_threads_route_actions_f9ea97f2.js +1 -1
  689. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_upload_[id]_route_actions_d9c30458.js +1 -1
  690. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_upload_route_actions_f15ed185.js +1 -1
  691. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_user-settings_route_actions_553a1208.js +1 -1
  692. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_userPreferences_route_actions_178deeb3.js +1 -1
  693. package/cloud-runtime/standalone/.next/server/chunks/ce889_server_app_api_migrate_workspaces-to-projects_route_actions_cb1e42e0.js +1 -1
  694. package/cloud-runtime/standalone/.next/server/chunks/ce889_server_app_api_orchestrator_tasks_[taskId]_cancel_route_actions_8b9cd080.js +1 -1
  695. package/cloud-runtime/standalone/.next/server/chunks/ce889_server_app_api_orchestrator_tasks_[taskId]_signal_route_actions_5a3d8250.js +1 -1
  696. package/cloud-runtime/standalone/.next/server/chunks/ce889_server_app_api_orchestrator_tasks_[taskId]_start_route_actions_08f1c94e.js +1 -1
  697. package/cloud-runtime/standalone/.next/server/chunks/ce889_server_app_api_orchestrator_tasks_[taskId]_status_route_actions_4062630f.js +1 -1
  698. package/cloud-runtime/standalone/.next/server/chunks/ce889_server_app_api_tasks_[id]_nodes_[nodeId]_complete_route_actions_c44e3cb4.js +1 -1
  699. package/cloud-runtime/standalone/.next/server/chunks/ce889_server_app_api_tasks_[id]_nodes_[nodeId]_fail_route_actions_7ff931bc.js +1 -1
  700. package/cloud-runtime/standalone/.next/server/chunks/ce889_server_app_api_tasks_[id]_nodes_[nodeId]_resume_route_actions_a9f01d21.js +1 -1
  701. package/cloud-runtime/standalone/.next/server/chunks/ce889_server_app_api_tasks_[id]_nodes_[nodeId]_stop_route_actions_dbea30a3.js +1 -1
  702. package/cloud-runtime/standalone/.next/server/chunks/ce889_server_app_api_tasks_[id]_nodes_[nodeId]_verify_route_actions_ff371970.js +1 -1
  703. package/cloud-runtime/standalone/.next/server/chunks/lib_2492d514._.js +11 -37
  704. package/cloud-runtime/standalone/.next/server/chunks/lib_3c080873._.js +34 -0
  705. package/cloud-runtime/standalone/.next/server/chunks/lib_70cd6b4a._.js +80 -0
  706. package/cloud-runtime/standalone/.next/server/chunks/lib_7f7835f1._.js +68 -0
  707. package/cloud-runtime/standalone/.next/server/chunks/lib_88726721._.js +79 -0
  708. package/cloud-runtime/standalone/.next/server/chunks/lib_98ae187c._.js +34 -0
  709. package/cloud-runtime/standalone/.next/server/chunks/lib_9f439b27._.js +25 -0
  710. package/cloud-runtime/standalone/.next/server/chunks/lib_app-config_ts_7f2f30ad._.js +3 -0
  711. package/cloud-runtime/standalone/.next/server/chunks/lib_check-node-version_ts_ef89bf83._.js +1 -1
  712. package/cloud-runtime/standalone/.next/server/chunks/lib_db_ts_e06c6085._.js +1 -1
  713. package/cloud-runtime/standalone/.next/server/chunks/lib_history-store_ts_2e721df2._.js +3 -3
  714. package/cloud-runtime/standalone/.next/server/chunks/lib_history-store_ts_74d1c060._.js +3 -3
  715. package/cloud-runtime/standalone/.next/server/chunks/lib_orchestrator_chat-processor_ts_4c335719._.js +4 -4
  716. package/cloud-runtime/standalone/.next/server/chunks/lib_sqlite-query-adapter_ts_3ea4d849._.js +5 -5
  717. package/cloud-runtime/standalone/.next/server/chunks/lib_sqlite-query-adapter_ts_b0b1a9b2._.js +5 -5
  718. package/cloud-runtime/standalone/.next/server/chunks/lib_vault-store_ts_3718ff79._.js +34 -0
  719. package/cloud-runtime/standalone/.next/server/chunks/node_modules_18a495c8._.js +3 -0
  720. package/cloud-runtime/standalone/.next/server/chunks/node_modules_4223ed10._.js +3 -0
  721. package/cloud-runtime/standalone/.next/server/chunks/node_modules_ccc242ec._.js +4 -0
  722. package/cloud-runtime/standalone/.next/server/chunks/node_modules_d2858615._.js +3 -0
  723. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_1402a1da._.js +3 -3
  724. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0f808fa3.js +1 -1
  725. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_19315704.js +2 -2
  726. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_2aaf71c8.js +1 -1
  727. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_2bdede98.js +1 -1
  728. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_371d0bff.js +15 -15
  729. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_3d31fed0.js +1 -1
  730. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_57a073eb.js +1 -1
  731. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_63e89275.js +1 -1
  732. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_84e28f38.js +1 -1
  733. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_9aff0990.js +3 -0
  734. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_cc6c687d.js +1 -1
  735. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_dcaa7800.js +3 -0
  736. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_def8bfbe.js +2 -2
  737. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_e0cc2bbf.js +1 -1
  738. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_fce9bc95.js +3 -0
  739. package/cloud-runtime/standalone/.next/server/chunks/node_modules_zod_v4_classic_external_fa90cebf.js +3 -3
  740. package/cloud-runtime/standalone/.next/server/chunks/src_graph_12d46a92._.js +3 -0
  741. package/cloud-runtime/standalone/.next/server/chunks/src_graph_138dc200._.js +59 -0
  742. package/cloud-runtime/standalone/.next/server/chunks/src_graph_914bb19c._.js +59 -0
  743. package/cloud-runtime/standalone/.next/server/chunks/src_graph_api-route-utils_ts_b7225a0e._.js +1 -1
  744. package/cloud-runtime/standalone/.next/server/chunks/src_graph_executor_ts_55c06268._.js +3 -3
  745. package/cloud-runtime/standalone/.next/server/chunks/src_graph_executor_ts_a8bc8d58._.js +3 -3
  746. package/cloud-runtime/standalone/.next/server/chunks/src_graph_scheduler_ts_d7b7497d._.js +57 -0
  747. package/cloud-runtime/standalone/.next/server/chunks/src_graph_state-machine_ts_ae1de66e._.js +1 -1
  748. package/cloud-runtime/standalone/.next/server/chunks/src_graph_store_ts_d6588a77._.js +56 -0
  749. package/cloud-runtime/standalone/.next/server/chunks/src_graph_validate_ts_a06b9fab._.js +1 -1
  750. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__0497a547._.js +2 -2
  751. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__056cdf7d._.js +1 -1
  752. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__11e33b9b._.js +1 -1
  753. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__139838ab._.js +3 -0
  754. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__19cd257e._.js +1 -1
  755. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__1c4256ce._.js +3 -0
  756. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__26d669c2._.js +1 -1
  757. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__351b2cc6._.js +1 -1
  758. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__38071250._.js +1 -1
  759. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__4c9d0778._.js +3 -0
  760. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__4ebf5947._.js +1 -1
  761. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__5ffa2883._.js +1 -1
  762. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__67d5f883._.js +1 -1
  763. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__69887882._.js +3 -0
  764. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__6e83bf83._.js +1 -1
  765. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__71b6d8a9._.js +3 -0
  766. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__7d279e62._.js +3 -0
  767. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__8fe8b9dd._.js +1 -1
  768. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__a0a1cb74._.js +1 -1
  769. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__a42e4555._.js +3 -0
  770. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__a667191a._.js +1 -1
  771. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__aa28d46f._.js +1 -1
  772. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__ba4308c3._.js +3 -0
  773. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__bb149a22._.js +3 -0
  774. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__bd4d5430._.js +1 -1
  775. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__bde5bc78._.js +1 -1
  776. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__cde88183._.js +1 -1
  777. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__d36dd8bc._.js +1 -1
  778. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__dac5ab29._.js +1 -1
  779. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__e0c64529._.js +1 -1
  780. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__e87ba2b0._.js +1 -1
  781. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__f2c3b7ab._.js +3 -0
  782. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__f59f0dc7._.js +3 -0
  783. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__f62d412e._.js +1 -1
  784. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__f63d6594._.js +1 -1
  785. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__fbd1aaff._.js +1 -1
  786. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__febbd0b8._.js +1 -1
  787. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__ff22a10e._.js +1 -1
  788. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__ffbc2e98._.js +2 -2
  789. package/cloud-runtime/standalone/.next/server/chunks/ssr/_02c78cac._.js +2 -2
  790. package/cloud-runtime/standalone/.next/server/chunks/ssr/_05c8a494._.js +1 -1
  791. package/cloud-runtime/standalone/.next/server/chunks/ssr/_0b36c9d6._.js +2 -2
  792. package/cloud-runtime/standalone/.next/server/chunks/ssr/_0ff7c687._.js +3 -3
  793. package/cloud-runtime/standalone/.next/server/chunks/ssr/_0ffd2660._.js +2 -2
  794. package/cloud-runtime/standalone/.next/server/chunks/ssr/_11ce4c04._.js +95 -0
  795. package/cloud-runtime/standalone/.next/server/chunks/ssr/_173da79d._.js +2 -2
  796. package/cloud-runtime/standalone/.next/server/chunks/ssr/_1c58ab2d._.js +2 -2
  797. package/cloud-runtime/standalone/.next/server/chunks/ssr/_1d26be78._.js +3 -0
  798. package/cloud-runtime/standalone/.next/server/chunks/ssr/_222af282._.js +2 -2
  799. package/cloud-runtime/standalone/.next/server/chunks/ssr/_22e99a52._.js +3 -0
  800. package/cloud-runtime/standalone/.next/server/chunks/ssr/_23f5fddc._.js +1 -1
  801. package/cloud-runtime/standalone/.next/server/chunks/ssr/_24feb541._.js +2 -2
  802. package/cloud-runtime/standalone/.next/server/chunks/ssr/_260b10ce._.js +3 -0
  803. package/cloud-runtime/standalone/.next/server/chunks/ssr/_32c878b9._.js +3 -0
  804. package/cloud-runtime/standalone/.next/server/chunks/ssr/_3aa32c11._.js +2 -2
  805. package/cloud-runtime/standalone/.next/server/chunks/ssr/_43472af3._.js +1 -1
  806. package/cloud-runtime/standalone/.next/server/chunks/ssr/_47e9a061._.js +3 -3
  807. package/cloud-runtime/standalone/.next/server/chunks/ssr/_4bfdfb14._.js +1 -1
  808. package/cloud-runtime/standalone/.next/server/chunks/ssr/_4d4ba84b._.js +2 -2
  809. package/cloud-runtime/standalone/.next/server/chunks/ssr/_50d04b8f._.js +2 -2
  810. package/cloud-runtime/standalone/.next/server/chunks/ssr/_52fe115d._.js +1 -1
  811. package/cloud-runtime/standalone/.next/server/chunks/ssr/_547b6462._.js +2 -2
  812. package/cloud-runtime/standalone/.next/server/chunks/ssr/_60d0bae4._.js +3 -0
  813. package/cloud-runtime/standalone/.next/server/chunks/ssr/_629dc55c._.js +2 -2
  814. package/cloud-runtime/standalone/.next/server/chunks/ssr/_69164b06._.js +95 -0
  815. package/cloud-runtime/standalone/.next/server/chunks/ssr/_77e1407a._.js +3 -0
  816. package/cloud-runtime/standalone/.next/server/chunks/ssr/_7f7a828a._.js +3 -0
  817. package/cloud-runtime/standalone/.next/server/chunks/ssr/_84a166cb._.js +3 -0
  818. package/cloud-runtime/standalone/.next/server/chunks/ssr/_93914ecd._.js +2 -2
  819. package/cloud-runtime/standalone/.next/server/chunks/ssr/_a10eb951._.js +2 -2
  820. package/cloud-runtime/standalone/.next/server/chunks/ssr/_a1b966f7._.js +1 -1
  821. package/cloud-runtime/standalone/.next/server/chunks/ssr/_aa5b4886._.js +8 -0
  822. package/cloud-runtime/standalone/.next/server/chunks/ssr/_ae20456d._.js +2 -2
  823. package/cloud-runtime/standalone/.next/server/chunks/ssr/_ba5903a7._.js +3 -0
  824. package/cloud-runtime/standalone/.next/server/chunks/ssr/_cb4d8a23._.js +2 -2
  825. package/cloud-runtime/standalone/.next/server/chunks/ssr/_cee3cf86._.js +95 -0
  826. package/cloud-runtime/standalone/.next/server/chunks/ssr/_dc2072e7._.js +4 -0
  827. package/cloud-runtime/standalone/.next/server/chunks/ssr/_e04b4053._.js +2 -2
  828. package/cloud-runtime/standalone/.next/server/chunks/ssr/_e1769638._.js +3 -3
  829. package/cloud-runtime/standalone/.next/server/chunks/ssr/_ed4fece9._.js +3 -0
  830. package/cloud-runtime/standalone/.next/server/chunks/ssr/_f1465cc8._.js +2 -2
  831. package/cloud-runtime/standalone/.next/server/chunks/ssr/_f2a7beb1._.js +2 -2
  832. package/cloud-runtime/standalone/.next/server/chunks/ssr/_f51a3112._.js +3 -0
  833. package/cloud-runtime/standalone/.next/server/chunks/ssr/_fc1aaf9e._.js +2 -2
  834. package/cloud-runtime/standalone/.next/server/chunks/ssr/_fd0dda03._.js +2 -2
  835. package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_75761787.js +1 -1
  836. package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_554ec2bf.js +1 -1
  837. package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_agents_[id]_page_actions_45703105.js +1 -1
  838. package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_agents_page_actions_2bceb931.js +1 -1
  839. package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_automations_page_actions_415dbaa9.js +1 -1
  840. package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_board_page_actions_469e0e61.js +1 -1
  841. package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_execution-graph_page_actions_3eceb5c1.js +1 -1
  842. package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_page_actions_39d4fc33.js +1 -1
  843. package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_projects_[slug]_automations_page_actions_9371bc66.js +1 -1
  844. package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_projects_[slug]_graph_[taskId]_page_actions_c1473d77.js +1 -1
  845. package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_projects_[slug]_knowledge_page_actions_1037c40a.js +1 -1
  846. package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_projects_[slug]_linear_page_actions_0a8dc487.js +3 -0
  847. package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_projects_orphans_page_actions_6f398ff8.js +1 -1
  848. package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_projects_page_actions_42ca3f3e.js +1 -1
  849. package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_settings_page_actions_840229cd.js +1 -1
  850. package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_status_page_actions_39bbdbbf.js +1 -1
  851. package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_thread_[id]_page_actions_94774546.js +1 -1
  852. package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_welcome_page_actions_e32fb27e.js +1 -1
  853. package/cloud-runtime/standalone/.next/server/chunks/ssr/app_agents_[id]_page_tsx_9c49d8c8._.js +1 -1
  854. package/cloud-runtime/standalone/.next/server/chunks/ssr/app_agents_layout_tsx_b9360330._.js +1 -1
  855. package/cloud-runtime/standalone/.next/server/chunks/ssr/app_agents_page_tsx_f5f08ed8._.js +1 -1
  856. package/cloud-runtime/standalone/.next/server/chunks/ssr/app_execution-graph_page_tsx_f854185a._.js +2 -2
  857. package/cloud-runtime/standalone/.next/server/chunks/ssr/app_global-error_tsx_9170b7a0._.js +1 -1
  858. package/cloud-runtime/standalone/.next/server/chunks/ssr/app_projects_[slug]_graph_[taskId]_page_tsx_d8b1d582._.js +2 -2
  859. package/cloud-runtime/standalone/.next/server/chunks/ssr/app_projects_[slug]_knowledge_page_tsx_e2a55cbd._.js +1 -1
  860. package/cloud-runtime/standalone/.next/server/chunks/ssr/app_projects_[slug]_layout_tsx_67c9550a._.js +1 -1
  861. package/cloud-runtime/standalone/.next/server/chunks/ssr/app_projects_[slug]_linear_page_tsx_971a6ba7._.js +39 -0
  862. package/cloud-runtime/standalone/.next/server/chunks/ssr/ce889_server_app_projects_[slug]_thread_[threadId]_page_actions_660a8857.js +1 -1
  863. package/cloud-runtime/standalone/.next/server/chunks/ssr/components_PromptJobBoard_tsx_f83f722f._.js +8 -0
  864. package/cloud-runtime/standalone/.next/server/chunks/ssr/components_chat-ui_bfeda794._.js +10 -6
  865. package/cloud-runtime/standalone/.next/server/chunks/ssr/components_graph_graph-derived_ts_2b94148f._.js +1 -1
  866. package/cloud-runtime/standalone/.next/server/chunks/ssr/components_thread_WorkspaceSidebar_tsx_e660301b._.js +1 -1
  867. package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_@dnd-kit_core_dist_core_esm_57071f37.js +1 -1
  868. package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_f76a24fb._.js +1 -1
  869. package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_e8bdedc5._.js +3 -0
  870. package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_next_dist_03ec2107._.js +2 -2
  871. package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_next_dist_174ae28d._.js +3 -3
  872. package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_next_dist_4b63a0e1._.js +1 -1
  873. package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_next_dist_61a87db9._.js +1 -1
  874. package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_next_dist_client_components_9774470f._.js +1 -1
  875. package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_45780354.js +1 -1
  876. package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_15817684.js +1 -1
  877. package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_61c49327.js +2 -2
  878. package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_eedfc1fd._.js +2 -2
  879. package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_next_f2865b38._.js +2 -2
  880. package/cloud-runtime/standalone/.next/server/edge/chunks/[root-of-the-server]__9491d0b8._.js +2 -2
  881. package/cloud-runtime/standalone/.next/server/edge/chunks/_52aa5b93._.js +1 -1
  882. package/cloud-runtime/standalone/.next/server/edge/chunks/node_modules_next_dist_esm_build_templates_edge-wrapper_3b93bb62.js +1 -1
  883. package/cloud-runtime/standalone/.next/server/edge/chunks/turbopack-node_modules_next_dist_esm_build_templates_edge-wrapper_405b82a5.js +1 -1
  884. package/cloud-runtime/standalone/.next/server/edge/chunks/turbopack-node_modules_next_dist_esm_build_templates_edge-wrapper_cd32efca.js +1 -1
  885. package/cloud-runtime/standalone/.next/server/functions-config-manifest.json +11 -2
  886. package/cloud-runtime/standalone/.next/server/instrumentation.js +3 -3
  887. package/cloud-runtime/standalone/.next/server/middleware-build-manifest.js +6 -6
  888. package/cloud-runtime/standalone/.next/server/middleware-manifest.json +5 -5
  889. package/cloud-runtime/standalone/.next/server/next-font-manifest.js +1 -1
  890. package/cloud-runtime/standalone/.next/server/next-font-manifest.json +4 -0
  891. package/cloud-runtime/standalone/.next/server/pages/404.html +2 -2
  892. package/cloud-runtime/standalone/.next/server/pages/500.html +2 -2
  893. package/cloud-runtime/standalone/.next/server/server-reference-manifest.js +1 -1
  894. package/cloud-runtime/standalone/.next/server/server-reference-manifest.json +1 -1
  895. package/cloud-runtime/standalone/.next/static/chunks/00716478a3ee55a2.js +37 -0
  896. package/cloud-runtime/standalone/.next/static/chunks/012b9216c9932478.js +1 -0
  897. package/cloud-runtime/standalone/.next/static/chunks/02add5a8d35c53fe.js +1 -0
  898. package/cloud-runtime/standalone/.next/static/chunks/{8304e8487aa74059.css → 06003b84da346995.css} +0 -1
  899. package/cloud-runtime/standalone/.next/static/chunks/081fcf3ea160ca2d.js +1 -0
  900. package/cloud-runtime/standalone/.next/static/chunks/0c5b9fe15dda4972.js +1 -0
  901. package/cloud-runtime/standalone/.next/static/chunks/14922fd23cdc223b.js +1 -0
  902. package/cloud-runtime/standalone/.next/static/chunks/1d8496cecfe9a523.js +1 -0
  903. package/cloud-runtime/standalone/.next/static/chunks/1fa91c34c99502bf.js +1 -0
  904. package/cloud-runtime/standalone/.next/static/chunks/2362d5c0dcaa5d64.js +1 -0
  905. package/cloud-runtime/standalone/.next/static/chunks/2375e3fd2a9b8844.js +2 -0
  906. package/cloud-runtime/standalone/.next/static/chunks/2618f9566e3788e4.js +1 -0
  907. package/cloud-runtime/standalone/.next/static/chunks/2730394502dd3664.js +1 -0
  908. package/cloud-runtime/standalone/.next/static/chunks/2a9c83f8211196e0.js +1 -0
  909. package/cloud-runtime/standalone/.next/static/chunks/2ac8e643e539b81e.js +1 -0
  910. package/cloud-runtime/standalone/.next/static/chunks/2e471cd7ac5cd8fb.js +6 -0
  911. package/cloud-runtime/standalone/.next/static/chunks/3091043e8c282dce.css +1 -0
  912. package/cloud-runtime/standalone/.next/static/chunks/335f551791affdd1.js +1 -0
  913. package/cloud-runtime/standalone/.next/static/chunks/34dd491bc4ce9561.js +1 -0
  914. package/cloud-runtime/standalone/.next/static/chunks/3dc50de1c86e1ce9.js +1 -0
  915. package/cloud-runtime/standalone/.next/static/chunks/4ea8f08087116055.js +1 -0
  916. package/cloud-runtime/standalone/.next/static/chunks/5607ad702ebb8a4b.js +9 -0
  917. package/cloud-runtime/standalone/.next/static/chunks/6103b9b5538bba4d.css +2 -0
  918. package/cloud-runtime/standalone/.next/static/chunks/657c261f623752de.js +1 -0
  919. package/cloud-runtime/standalone/.next/static/chunks/68586017f55137e8.js +1 -0
  920. package/cloud-runtime/standalone/.next/static/chunks/73e3194f06db260e.js +1 -0
  921. package/cloud-runtime/standalone/.next/static/chunks/797fcb0710da3be2.js +4 -0
  922. package/cloud-runtime/standalone/.next/static/chunks/818fb0f154cee2c5.js +1 -0
  923. package/cloud-runtime/standalone/.next/static/chunks/8b40d0636a2ba3b0.js +28 -0
  924. package/cloud-runtime/standalone/.next/static/chunks/8fc3ed1915e0659b.js +88 -0
  925. package/cloud-runtime/standalone/.next/static/chunks/961311cbebbffb6d.js +1 -0
  926. package/cloud-runtime/standalone/.next/static/chunks/963060cf6e72339b.js +6 -0
  927. package/cloud-runtime/standalone/.next/static/chunks/98c20da4973991f0.js +1 -0
  928. package/cloud-runtime/standalone/.next/static/chunks/a2a98ae5d4a3e5e3.js +2 -0
  929. package/cloud-runtime/standalone/.next/static/chunks/a72fbac84e32f665.js +1 -0
  930. package/cloud-runtime/standalone/.next/static/chunks/a9da98f883ac833b.js +1 -0
  931. package/cloud-runtime/standalone/.next/static/chunks/aa4d86855d0a3a55.js +1 -0
  932. package/cloud-runtime/standalone/.next/static/chunks/b2127dc67c5ade9f.js +1 -0
  933. package/cloud-runtime/standalone/.next/static/chunks/b3377e39d47c71cf.js +3 -0
  934. package/cloud-runtime/standalone/.next/static/chunks/b553dba1f51e709b.js +16 -0
  935. package/cloud-runtime/standalone/.next/static/chunks/b93f49b29a473a1d.js +6 -0
  936. package/cloud-runtime/standalone/.next/static/chunks/bf2a2fafb710e63c.js +1 -0
  937. package/cloud-runtime/standalone/.next/static/chunks/c0d17e0c37ba8e7a.js +1 -0
  938. package/cloud-runtime/standalone/.next/static/chunks/c3784233f00e1ff5.js +12 -0
  939. package/cloud-runtime/standalone/.next/static/chunks/c48afb0a7fd0423c.js +28 -0
  940. package/cloud-runtime/standalone/.next/static/chunks/cb6301624094c91e.js +1 -0
  941. package/cloud-runtime/standalone/.next/static/chunks/{787436fad75f5bc6.js → ccaf68956da192f8.js} +2 -2
  942. package/cloud-runtime/standalone/.next/static/chunks/d96012bcfc98706a.js +1 -0
  943. package/cloud-runtime/standalone/.next/static/chunks/db131a0b6350e416.js +1 -0
  944. package/cloud-runtime/standalone/.next/static/chunks/de271f8f22d293b4.js +1 -0
  945. package/cloud-runtime/standalone/.next/static/chunks/e51fddf53a6dc1e4.js +9 -0
  946. package/cloud-runtime/standalone/.next/static/chunks/f4360c3e4089263f.js +1 -0
  947. package/cloud-runtime/standalone/.next/static/chunks/f8cfa030ea3cb3c3.js +1 -0
  948. package/cloud-runtime/standalone/.next/static/chunks/turbopack-0ace1f53f3e3cf46.js +4 -0
  949. package/cloud-runtime/standalone/Dockerfile +5 -5
  950. package/cloud-runtime/standalone/README.md +37 -5
  951. package/cloud-runtime/standalone/app/api/automations/route.ts +64 -17
  952. package/cloud-runtime/standalone/app/api/chat/route.ts +29 -3
  953. package/cloud-runtime/standalone/app/api/linear/auth/route.ts +14 -0
  954. package/cloud-runtime/standalone/app/api/linear/callback/route.ts +44 -0
  955. package/cloud-runtime/standalone/app/api/linear/cycles/route.ts +22 -0
  956. package/cloud-runtime/standalone/app/api/linear/issues/context/route.ts +26 -0
  957. package/cloud-runtime/standalone/app/api/linear/issues/route.ts +61 -0
  958. package/cloud-runtime/standalone/app/api/linear/mcp-setup/route.ts +181 -0
  959. package/cloud-runtime/standalone/app/api/linear/options/route.ts +31 -0
  960. package/cloud-runtime/standalone/app/api/linear/runs/[id]/route.ts +81 -0
  961. package/cloud-runtime/standalone/app/api/linear/runs/route.ts +91 -0
  962. package/cloud-runtime/standalone/app/api/linear/status/route.ts +38 -0
  963. package/cloud-runtime/standalone/app/api/linear/token/route.ts +59 -0
  964. package/cloud-runtime/standalone/app/api/prompt-jobs/route.ts +1 -1
  965. package/cloud-runtime/standalone/app/api/providers/route.ts +1 -14
  966. package/cloud-runtime/standalone/app/api/status/route.ts +8 -16
  967. package/cloud-runtime/standalone/app/projects/[slug]/knowledge/page.tsx +3 -181
  968. package/cloud-runtime/standalone/app/projects/[slug]/layout.tsx +2 -1
  969. package/cloud-runtime/standalone/app/projects/[slug]/linear/page.tsx +26 -0
  970. package/cloud-runtime/standalone/components/LinearBoard.tsx +1369 -0
  971. package/cloud-runtime/standalone/components/LinearSetup.tsx +239 -0
  972. package/cloud-runtime/standalone/components/ProjectModal.tsx +15 -3
  973. package/cloud-runtime/standalone/components/PromptJobBoard.tsx +367 -87
  974. package/cloud-runtime/standalone/components/chat-ui/ChatContainer.tsx +30 -15
  975. package/cloud-runtime/standalone/components/chat-ui/Composer.tsx +77 -7
  976. package/cloud-runtime/standalone/components/chat-ui/MentionPopover.tsx +43 -2
  977. package/cloud-runtime/standalone/components/thread/WorkspaceSidebar.tsx +53 -48
  978. package/cloud-runtime/standalone/docs/superpowers/plans/2026-04-07-linear-integration.md +1352 -0
  979. package/cloud-runtime/standalone/hooks/useGroupChat.ts +4 -1
  980. package/cloud-runtime/standalone/hooks/useLinearConnection.ts +128 -0
  981. package/cloud-runtime/standalone/hooks/useLinearIssueMentions.ts +64 -0
  982. package/cloud-runtime/standalone/hooks/useLinearIssues.ts +98 -0
  983. package/cloud-runtime/standalone/hooks/useLinearRuns.ts +137 -0
  984. package/cloud-runtime/standalone/hooks/useMentionAutocomplete.ts +54 -6
  985. package/cloud-runtime/standalone/hooks/useProjectResources.ts +0 -50
  986. package/cloud-runtime/standalone/instrumentation.ts +2 -1
  987. package/cloud-runtime/standalone/lib/app-config.ts +55 -0
  988. package/cloud-runtime/standalone/lib/chat/composer-routing.ts +128 -0
  989. package/cloud-runtime/standalone/lib/chat/linear-issue-context.ts +79 -0
  990. package/cloud-runtime/standalone/lib/cli-runner.ts +15 -15
  991. package/cloud-runtime/standalone/lib/db.ts +32 -46
  992. package/cloud-runtime/standalone/lib/knowledge-notes.ts +6 -242
  993. package/cloud-runtime/standalone/lib/knowledge-store.ts +8 -211
  994. package/cloud-runtime/standalone/lib/linear-client.ts +427 -0
  995. package/cloud-runtime/standalone/lib/linear-execution-prompt.ts +153 -0
  996. package/cloud-runtime/standalone/lib/linear-issue-store.ts +427 -0
  997. package/cloud-runtime/standalone/lib/linear-issues.ts +360 -0
  998. package/cloud-runtime/standalone/lib/linear-run-store.ts +374 -0
  999. package/cloud-runtime/standalone/lib/repo-knowledge.ts +46 -125
  1000. package/cloud-runtime/standalone/lib/security.ts +2 -2
  1001. package/cloud-runtime/standalone/lib/shell-env.ts +71 -0
  1002. package/cloud-runtime/standalone/lib/task-context.ts +3 -13
  1003. package/cloud-runtime/standalone/lib/thread-knowledge.ts +2 -11
  1004. package/cloud-runtime/standalone/lib/tiptap/composer-mentions.ts +38 -0
  1005. package/cloud-runtime/standalone/lib/tiptap/editor-utils.ts +11 -0
  1006. package/cloud-runtime/standalone/lib/tiptap/serialize-composer.ts +10 -0
  1007. package/cloud-runtime/standalone/lib/vault-store.ts +2067 -0
  1008. package/cloud-runtime/standalone/mcp/README.md +22 -11
  1009. package/cloud-runtime/standalone/next.config.ts +2 -1
  1010. package/cloud-runtime/standalone/package-lock.json +7 -0
  1011. package/cloud-runtime/standalone/package.json +3 -0
  1012. package/cloud-runtime/standalone/planning/automation-frontmatter-migration-spec.md +710 -0
  1013. package/cloud-runtime/standalone/scripts/backfill-automations-frontmatter.ts +145 -0
  1014. package/cloud-runtime/standalone/scripts/migrate-vault.ts +13 -0
  1015. package/cloud-runtime/standalone/src/automations/adapters.ts +219 -0
  1016. package/cloud-runtime/standalone/src/automations/index.ts +7 -0
  1017. package/cloud-runtime/standalone/src/automations/parser.ts +33 -0
  1018. package/cloud-runtime/standalone/src/automations/repository.ts +440 -0
  1019. package/cloud-runtime/standalone/src/automations/serializer.ts +94 -0
  1020. package/cloud-runtime/standalone/src/automations/state.ts +166 -0
  1021. package/cloud-runtime/standalone/src/automations/types.ts +134 -0
  1022. package/cloud-runtime/standalone/src/automations/validation.ts +337 -0
  1023. package/cloud-runtime/standalone/src/graph/internal-function-dispatcher.ts +2 -5
  1024. package/cloud-runtime/standalone/src/graph/schedule-runner.ts +45 -7
  1025. package/cloud-runtime/standalone/src/graph/store.ts +174 -5
  1026. package/cloud-runtime/standalone/src/prompt-scheduler/store.ts +522 -162
  1027. package/cloud-runtime/standalone/src/prompt-scheduler/types.ts +1 -0
  1028. package/cloud-runtime/standalone/state/automations/.state/24a6a5db-3b14-49c4-841f-29f10f015fbb.json +8 -0
  1029. package/cloud-runtime/standalone/state/automations/active/24a6a5db-3b14-49c4-841f-29f10f015fbb.md +17 -0
  1030. package/cloud-runtime/standalone/styles/composer-pills.css +13 -0
  1031. package/cloud-runtime/standalone/tsconfig.tsbuildinfo +1 -1
  1032. package/cloud-runtime/standalone/worker/index.js +4547 -366
  1033. package/package.json +1 -1
  1034. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/memory/route/app-paths-manifest.json +0 -3
  1035. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/memory/route.js +0 -9
  1036. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/memory/route.js.nft.json +0 -1
  1037. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/memory/route_client-reference-manifest.js +0 -2
  1038. package/cloud-runtime/standalone/.next/server/app/api/repos/[id]/knowledge/route/app-paths-manifest.json +0 -3
  1039. package/cloud-runtime/standalone/.next/server/app/api/repos/[id]/knowledge/route.js +0 -8
  1040. package/cloud-runtime/standalone/.next/server/app/api/repos/[id]/knowledge/route.js.nft.json +0 -1
  1041. package/cloud-runtime/standalone/.next/server/app/api/repos/[id]/knowledge/route_client-reference-manifest.js +0 -2
  1042. package/cloud-runtime/standalone/.next/server/chunks/[externals]__bc6c7111._.js +0 -3
  1043. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__01cd082e._.js +0 -13
  1044. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0936925d._.js +0 -3
  1045. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__09ca81e1._.js +0 -101
  1046. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1017e012._.js +0 -3
  1047. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1ac3236d._.js +0 -25
  1048. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1b0bb735._.js +0 -15
  1049. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1c86bf6e._.js +0 -48
  1050. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__20c58b41._.js +0 -46
  1051. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__2126c763._.js +0 -42
  1052. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__236c35bb._.js +0 -51
  1053. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__277ed37d._.js +0 -3
  1054. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__2f06f568._.js +0 -46
  1055. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__30bd0c87._.js +0 -13
  1056. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__374cd94c._.js +0 -42
  1057. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3785024c._.js +0 -80
  1058. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__379604d4._.js +0 -13
  1059. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3c8f1de6._.js +0 -15
  1060. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3d0df5a8._.js +0 -8
  1061. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4014ed70._.js +0 -51
  1062. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__42fcb81c._.js +0 -52
  1063. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4a3cd6ac._.js +0 -13
  1064. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4e522535._.js +0 -6
  1065. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__50c24784._.js +0 -3
  1066. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__59d1cdd8._.js +0 -3
  1067. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__644e6285._.js +0 -112
  1068. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__65755104._.js +0 -7
  1069. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__73c20995._.js +0 -15
  1070. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__8125bbc3._.js +0 -63
  1071. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__85275b88._.js +0 -3
  1072. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__89666394._.js +0 -8
  1073. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__8c0fb154._.js +0 -13
  1074. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__8f5cac13._.js +0 -46
  1075. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__91b22098._.js +0 -8
  1076. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__96ae701e._.js +0 -3
  1077. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__98ce983b._.js +0 -3
  1078. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__9a9fd39f._.js +0 -44
  1079. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__9ad4e385._.js +0 -3
  1080. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__a01ddd0b._.js +0 -46
  1081. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__a099c992._.js +0 -58
  1082. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__a1e62918._.js +0 -3
  1083. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__a9b949c3._.js +0 -7
  1084. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__bd43017b._.js +0 -3
  1085. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__bf6fb108._.js +0 -80
  1086. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c0a18648._.js +0 -80
  1087. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c122c54a._.js +0 -75
  1088. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c5b8ceb7._.js +0 -3
  1089. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c8b49077._.js +0 -79
  1090. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__dc542063._.js +0 -15
  1091. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__dec3e1b7._.js +0 -30
  1092. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f1147a4a._.js +0 -15
  1093. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f5597fea._.js +0 -13
  1094. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f8c94cb3._.js +0 -8
  1095. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fa79d53f._.js +0 -46
  1096. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fb14cd4a._.js +0 -3
  1097. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fc27a898._.js +0 -158
  1098. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fce2cdce._.js +0 -3
  1099. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fcf0b40a._.js +0 -3
  1100. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ffb21023._.js +0 -80
  1101. package/cloud-runtime/standalone/.next/server/chunks/_05fa3b89._.js +0 -46
  1102. package/cloud-runtime/standalone/.next/server/chunks/_22fe5fd2._.js +0 -3
  1103. package/cloud-runtime/standalone/.next/server/chunks/_4190f170._.js +0 -46
  1104. package/cloud-runtime/standalone/.next/server/chunks/_42e9c8d5._.js +0 -46
  1105. package/cloud-runtime/standalone/.next/server/chunks/_5ca51127._.js +0 -54
  1106. package/cloud-runtime/standalone/.next/server/chunks/_5fd6af5d._.js +0 -57
  1107. package/cloud-runtime/standalone/.next/server/chunks/_6519418b._.js +0 -59
  1108. package/cloud-runtime/standalone/.next/server/chunks/_6bb93816._.js +0 -6
  1109. package/cloud-runtime/standalone/.next/server/chunks/_6bc1b3e1._.js +0 -59
  1110. package/cloud-runtime/standalone/.next/server/chunks/_862895c0._.js +0 -57
  1111. package/cloud-runtime/standalone/.next/server/chunks/_8b9fde82._.js +0 -97
  1112. package/cloud-runtime/standalone/.next/server/chunks/_95ac98db._.js +0 -49
  1113. package/cloud-runtime/standalone/.next/server/chunks/_994414cd._.js +0 -54
  1114. package/cloud-runtime/standalone/.next/server/chunks/_99b78daf._.js +0 -46
  1115. package/cloud-runtime/standalone/.next/server/chunks/_affbdbb0._.js +0 -46
  1116. package/cloud-runtime/standalone/.next/server/chunks/_d22934ab._.js +0 -97
  1117. package/cloud-runtime/standalone/.next/server/chunks/_efc73784._.js +0 -46
  1118. package/cloud-runtime/standalone/.next/server/chunks/_fba13a4a._.js +0 -6
  1119. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_projects_[id]_memory_route_actions_f0c255ef.js +0 -3
  1120. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_repos_[id]_knowledge_route_actions_993fe4e5.js +0 -3
  1121. package/cloud-runtime/standalone/.next/server/chunks/lib_281e5787._.js +0 -16
  1122. package/cloud-runtime/standalone/.next/server/chunks/lib_63067e21._.js +0 -16
  1123. package/cloud-runtime/standalone/.next/server/chunks/lib_87c06aeb._.js +0 -25
  1124. package/cloud-runtime/standalone/.next/server/chunks/lib_a5adca60._.js +0 -64
  1125. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_7f8022ab.js +0 -3
  1126. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_8ec90680.js +0 -3
  1127. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_a590fcd6.js +0 -3
  1128. package/cloud-runtime/standalone/.next/server/chunks/src_graph_14067235._.js +0 -46
  1129. package/cloud-runtime/standalone/.next/server/chunks/src_graph_b63e2d39._.js +0 -46
  1130. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__096c39a3._.js +0 -3
  1131. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__47caef59._.js +0 -3
  1132. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__8b4e7816._.js +0 -3
  1133. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__a37fb1c3._.js +0 -3
  1134. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__a456581d._.js +0 -3
  1135. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__d74022f1._.js +0 -3
  1136. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__ea035cd9._.js +0 -3
  1137. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__fca7df40._.js +0 -3
  1138. package/cloud-runtime/standalone/.next/server/chunks/ssr/_0c5c111f._.js +0 -3
  1139. package/cloud-runtime/standalone/.next/server/chunks/ssr/_23656a95._.js +0 -3
  1140. package/cloud-runtime/standalone/.next/server/chunks/ssr/_27a789b3._.js +0 -3
  1141. package/cloud-runtime/standalone/.next/server/chunks/ssr/_36b413cc._.js +0 -3
  1142. package/cloud-runtime/standalone/.next/server/chunks/ssr/_46e00a9b._.js +0 -95
  1143. package/cloud-runtime/standalone/.next/server/chunks/ssr/_478f4991._.js +0 -3
  1144. package/cloud-runtime/standalone/.next/server/chunks/ssr/_547f19ec._.js +0 -3
  1145. package/cloud-runtime/standalone/.next/server/chunks/ssr/_85ca101b._.js +0 -8
  1146. package/cloud-runtime/standalone/.next/server/chunks/ssr/_9e07dcac._.js +0 -95
  1147. package/cloud-runtime/standalone/.next/server/chunks/ssr/_a68d8f62._.js +0 -3
  1148. package/cloud-runtime/standalone/.next/server/chunks/ssr/_a80e12c8._.js +0 -3
  1149. package/cloud-runtime/standalone/.next/server/chunks/ssr/_b1e1ef71._.js +0 -95
  1150. package/cloud-runtime/standalone/.next/server/chunks/ssr/_e1349560._.js +0 -3
  1151. package/cloud-runtime/standalone/.next/server/chunks/ssr/app_welcome_page_tsx_6c79bc59._.js +0 -3
  1152. package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_b82e03da._.js +0 -3
  1153. package/cloud-runtime/standalone/.next/static/chunks/01428247f94115a6.js +0 -1
  1154. package/cloud-runtime/standalone/.next/static/chunks/06cf0ed16bf8aa70.js +0 -28
  1155. package/cloud-runtime/standalone/.next/static/chunks/0bd6498bda341889.js +0 -1
  1156. package/cloud-runtime/standalone/.next/static/chunks/0ec92a111fe969fd.css +0 -1
  1157. package/cloud-runtime/standalone/.next/static/chunks/19dd745b663fdffa.js +0 -1
  1158. package/cloud-runtime/standalone/.next/static/chunks/1a3298f21d1040e9.js +0 -4
  1159. package/cloud-runtime/standalone/.next/static/chunks/1c8583feefee0765.js +0 -1
  1160. package/cloud-runtime/standalone/.next/static/chunks/1e3dede69b464364.js +0 -1
  1161. package/cloud-runtime/standalone/.next/static/chunks/238a28856e739dc9.js +0 -2
  1162. package/cloud-runtime/standalone/.next/static/chunks/24772e179852c73e.js +0 -1
  1163. package/cloud-runtime/standalone/.next/static/chunks/2d1d138d8ea3234c.css +0 -1
  1164. package/cloud-runtime/standalone/.next/static/chunks/2deeba875ec50761.js +0 -1
  1165. package/cloud-runtime/standalone/.next/static/chunks/2e011469003993e9.js +0 -28
  1166. package/cloud-runtime/standalone/.next/static/chunks/31a4164e40ca71e5.js +0 -6
  1167. package/cloud-runtime/standalone/.next/static/chunks/3a55441b018d52e4.js +0 -1
  1168. package/cloud-runtime/standalone/.next/static/chunks/3c202e89da05d9b9.js +0 -1
  1169. package/cloud-runtime/standalone/.next/static/chunks/3c72becf6dff5597.js +0 -1
  1170. package/cloud-runtime/standalone/.next/static/chunks/44dafb5e85578e12.js +0 -16
  1171. package/cloud-runtime/standalone/.next/static/chunks/48e332ac3e9ed56c.js +0 -1
  1172. package/cloud-runtime/standalone/.next/static/chunks/5c0819dcc4bfec85.js +0 -1
  1173. package/cloud-runtime/standalone/.next/static/chunks/5d52c79d9812d06e.js +0 -1
  1174. package/cloud-runtime/standalone/.next/static/chunks/617db51b7444f818.js +0 -1
  1175. package/cloud-runtime/standalone/.next/static/chunks/673bb6094cea9ded.js +0 -1
  1176. package/cloud-runtime/standalone/.next/static/chunks/687d09973325dcf8.js +0 -1
  1177. package/cloud-runtime/standalone/.next/static/chunks/76a50c4abceb3362.js +0 -12
  1178. package/cloud-runtime/standalone/.next/static/chunks/8a4684388ca0f6de.js +0 -7
  1179. package/cloud-runtime/standalone/.next/static/chunks/9f236cc9572783b9.js +0 -93
  1180. package/cloud-runtime/standalone/.next/static/chunks/a9aaec85125f69b1.js +0 -1
  1181. package/cloud-runtime/standalone/.next/static/chunks/ac9a7d8cf17b5d75.js +0 -1
  1182. package/cloud-runtime/standalone/.next/static/chunks/b4c29a62f9255268.js +0 -1
  1183. package/cloud-runtime/standalone/.next/static/chunks/b6bbe747d2b0dddb.js +0 -1
  1184. package/cloud-runtime/standalone/.next/static/chunks/badc6258750e247d.js +0 -1
  1185. package/cloud-runtime/standalone/.next/static/chunks/bc3cad3c821b169b.js +0 -2
  1186. package/cloud-runtime/standalone/.next/static/chunks/bf2bb1662353aff5.js +0 -1
  1187. package/cloud-runtime/standalone/.next/static/chunks/c1fb885eed94aa8c.js +0 -1
  1188. package/cloud-runtime/standalone/.next/static/chunks/c653186036e56204.js +0 -1
  1189. package/cloud-runtime/standalone/.next/static/chunks/cb5581d868e78205.js +0 -1
  1190. package/cloud-runtime/standalone/.next/static/chunks/cbdeb17a36b99000.js +0 -1
  1191. package/cloud-runtime/standalone/.next/static/chunks/d5cc62984dc4205c.js +0 -1
  1192. package/cloud-runtime/standalone/.next/static/chunks/d78cc7d749043fef.js +0 -1
  1193. package/cloud-runtime/standalone/.next/static/chunks/da2b00558cf32f37.js +0 -1
  1194. package/cloud-runtime/standalone/.next/static/chunks/ee5f1457fbc593e1.js +0 -1
  1195. package/cloud-runtime/standalone/.next/static/chunks/ff1a16fafef87110.js +0 -1
  1196. package/cloud-runtime/standalone/.next/static/chunks/turbopack-e1d640f2fbe4fa5e.js +0 -4
  1197. package/cloud-runtime/standalone/app/api/projects/[id]/memory/route.ts +0 -81
  1198. package/cloud-runtime/standalone/app/api/repos/[id]/knowledge/route.ts +0 -98
  1199. /package/cloud-runtime/standalone/.next/server/app/api/{projects/[id]/memory → linear/auth}/route/build-manifest.json +0 -0
  1200. /package/cloud-runtime/standalone/.next/server/app/api/{projects/[id]/memory → linear/auth}/route/server-reference-manifest.json +0 -0
  1201. /package/cloud-runtime/standalone/.next/server/app/api/{projects/[id]/memory → linear/auth}/route.js.map +0 -0
  1202. /package/cloud-runtime/standalone/.next/server/app/api/{repos/[id]/knowledge → linear/callback}/route/build-manifest.json +0 -0
  1203. /package/cloud-runtime/standalone/.next/server/app/api/{repos/[id]/knowledge → linear/callback}/route/server-reference-manifest.json +0 -0
  1204. /package/cloud-runtime/standalone/.next/server/app/api/{repos/[id]/knowledge → linear/callback}/route.js.map +0 -0
  1205. /package/cloud-runtime/standalone/.next/static/{PH4cjH9B7XiWyHWYdevbx → Y8QdDdLJI3yzNjkyPjuJ-}/_buildManifest.js +0 -0
  1206. /package/cloud-runtime/standalone/.next/static/{PH4cjH9B7XiWyHWYdevbx → Y8QdDdLJI3yzNjkyPjuJ-}/_clientMiddlewareManifest.json +0 -0
  1207. /package/cloud-runtime/standalone/.next/static/{PH4cjH9B7XiWyHWYdevbx → Y8QdDdLJI3yzNjkyPjuJ-}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
- module.exports=[58843,a=>{"use strict";var b=a.i(90944),c=a.i(72131),d=a.i(15682),e=a.i(85552),f=a.i(4720),g=a.i(34531),h=a.i(63588),i=a.i(15618),j=a.i(87532);let k=(0,a.i(60137).default)("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);var l=a.i(81560),m=a.i(33508),n=a.i(56196);function o(a){return a?{id:a.id,content:a.content,created_at:a.createdAt,updated_at:a.updatedAt,source:a.sourceType}:null}function p({params:a}){let{slug:d}=(0,c.use)(a),{projects:k}=(0,n.useProjects)(),m=k.find(a=>a.slug===d),p=m?.id??null,{skills:v,addSkill:w,removeSkill:x}=function(a){let[b,d]=(0,c.useState)([]),[e,f]=(0,c.useState)(!0),g=(0,c.useCallback)(async()=>{if(!a){d([]),f(!1);return}try{let b=await fetch(`/api/projects/${a}/skills`);if(!b.ok)return;let c=await b.json();d(c.skills??[])}catch{}finally{f(!1)}},[a]);return(0,c.useEffect)(()=>{g()},[g]),{skills:b,isLoading:e,addSkill:(0,c.useCallback)(async(b,c)=>{if(a)try{(await fetch(`/api/projects/${a}/skills`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:b,condition:c})})).ok&&await g()}catch{}},[a,g]),removeSkill:(0,c.useCallback)(async b=>{if(a)try{(await fetch(`/api/projects/${a}/skills?skillId=${b}`,{method:"DELETE"})).ok&&d(a=>a.filter(a=>a.id!==b))}catch{}},[a]),refresh:g}}(p),{memory:y,addMemory:z,deleteMemory:A}=function(a){let[b,d]=(0,c.useState)([]),[e,f]=(0,c.useState)(!0),g=(0,c.useCallback)(async()=>{if(!a){d([]),f(!1);return}try{let b=await fetch(`/api/projects/${a}/memory?producer=human`);if(!b.ok)return;let c=await b.json();d(c.memory??[])}catch{}finally{f(!1)}},[a]);return(0,c.useEffect)(()=>{g()},[g]),{memory:b,isLoading:e,addMemory:(0,c.useCallback)(async(b,c)=>{if(a)try{(await fetch(`/api/projects/${a}/memory`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:b,source:c,producer:"human"})})).ok&&await g()}catch{}},[a,g]),deleteMemory:(0,c.useCallback)(async b=>{if(a)try{(await fetch(`/api/projects/${a}/memory?memoryId=${b}`,{method:"DELETE"})).ok&&d(a=>a.filter(a=>a.id!==b))}catch{}},[a]),refresh:g}}(p),[B,C]=(0,c.useState)("project"),[D,E]=(0,c.useState)(""),[F,G]=(0,c.useState)(!1),[H,I]=(0,c.useState)(""),[J,K]=(0,c.useState)(""),[L,M]=(0,c.useState)(""),[N,O]=(0,c.useState)(null),[P,Q]=(0,c.useState)({}),[R,S]=(0,c.useState)({});(0,c.useEffect)(()=>{m?.repos&&Q(a=>{let b={};for(let c of m.repos)b[c.id]=a[c.id]??c.notes??"";return b})},[m?.repos]),(0,c.useEffect)(()=>{let a=!1;return async function(){let b=m?.repos??[];if(0!==b.length)try{let c=await Promise.all(b.map(async a=>{let b=await fetch(`/api/repos/${a.id}/knowledge?producer=human`),c=((b.ok?await b.json():{knowledge:[]}).knowledge??[]).map(a=>String(a.content??"").trim()).filter(Boolean).join("\n\n");return[a.id,c]}));a||Q(a=>{let b={...a};for(let[a,d]of c)d&&(b[a]=d);return b})}catch{}}(),()=>{a=!0}},[m?.repos]),(0,c.useEffect)(()=>{let a=!1;return async function(){if(!p)return O(null);try{let b=await fetch(`/api/knowledge-notes?scope=project&subjectId=${encodeURIComponent(p)}`),c=b.ok?await b.json():{note:null};a||O(o(c.note))}catch{a||O(null)}}(),()=>{a=!0}},[p]),(0,c.useEffect)(()=>{let a=!1;return async function(){let b=m?.repos??[];if(0===b.length)return S({});try{let c=await Promise.all(b.map(async a=>{let b=await fetch(`/api/knowledge-notes?scope=repo&subjectId=${encodeURIComponent(a.id)}`),c=b.ok?await b.json():{note:null};return[a.id,o(c.note)]}));a||S(Object.fromEntries(c))}catch{a||S({})}}(),()=>{a=!0}},[m?.repos]);let T=v.filter(a=>!D||a.file.toLowerCase().includes(D.toLowerCase())||(a.condition??"").toLowerCase().includes(D.toLowerCase())),U=y.filter(a=>!D||a.content.toLowerCase().includes(D.toLowerCase())),V=!D||N?.content.toLowerCase().includes(D.toLowerCase()),W=(m?.repos??[]).filter(a=>{if(!D)return!0;let b=D.toLowerCase(),c=(P[a.id]??"").toLowerCase(),d=(R[a.id]?.content??"").toLowerCase();return a.name.toLowerCase().includes(b)||(a.path??"").toLowerCase().includes(b)||c.includes(b)||d.includes(b)});return m?(0,b.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,b.jsx)("div",{className:"flex-shrink-0 border-b border-[var(--border)] bg-[var(--card-bg)] px-3 py-2 backdrop-blur-md sm:h-14 sm:px-6 sm:py-0",children:(0,b.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between sm:gap-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,b.jsx)("span",{className:"font-semibold text-[var(--foreground)]",children:m.name}),(0,b.jsx)("span",{className:"text-[var(--muted-foreground)]",children:"/"}),(0,b.jsx)("span",{className:"text-[var(--muted-foreground)]",children:"Knowledge"})]}),(0,b.jsxs)("div",{className:"relative w-full sm:max-w-xs",children:[(0,b.jsx)(j.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--app-shell-soft-text)]",size:14}),(0,b.jsx)("input",{type:"text",placeholder:"Search notes...",value:D,onChange:a=>E(a.target.value),className:"w-full rounded-full border border-[var(--border)] bg-[var(--secondary)] py-1.5 pl-9 pr-4 text-xs focus:outline-none focus:ring-2 focus:ring-[var(--ring)] focus:border-[var(--primary)]"})]})]})}),(0,b.jsx)("div",{className:"flex-shrink-0 px-3 pb-2 pt-4 sm:px-6",children:(0,b.jsxs)("div",{className:"flex w-fit gap-1 rounded-xl border border-[var(--border)] bg-[var(--secondary)] p-1",children:[(0,b.jsx)(q,{active:"project"===B,onClick:()=>C("project"),icon:(0,b.jsx)(e.BrainCircuit,{size:14}),label:"Project"}),(0,b.jsx)(q,{active:"repos"===B,onClick:()=>C("repos"),icon:(0,b.jsx)(g.FolderGit2,{size:14}),label:"Repositories"})]})}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto px-3 pb-8 sm:px-6",children:"project"===B?(0,b.jsxs)("div",{className:"mt-2 grid grid-cols-12 gap-4 sm:gap-6",children:[(0,b.jsx)("div",{className:"col-span-12 lg:col-span-4 space-y-4",children:(0,b.jsxs)("div",{className:"rounded-2xl border border-[var(--border)] bg-[var(--card-bg)] p-5 shadow-[var(--shadow-sm)]",children:[(0,b.jsx)("h3",{className:"mb-4 text-[10px] font-black uppercase tracking-[0.2em] text-[var(--app-shell-soft-text)]",children:"Overview"}),(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,b.jsx)(r,{label:"References",value:T.length,sub:"File-backed"}),(0,b.jsx)(r,{label:"Notes",value:U.length,sub:"Human-authored"})]}),(0,b.jsx)("div",{className:"mt-3",children:(0,b.jsx)(r,{label:"System Note",value:+!!N?.content,sub:"Living doc"})})]})}),(0,b.jsxs)("div",{className:"col-span-12 lg:col-span-8 space-y-4",children:[(0,b.jsxs)("section",{className:"rounded-2xl border border-[var(--border)] bg-[var(--card-bg)] p-5 shadow-[var(--shadow-sm)]",children:[(0,b.jsxs)("div",{className:"mb-4",children:[(0,b.jsxs)("h2",{className:"flex items-center gap-2 text-sm font-semibold text-[var(--foreground)]",children:[(0,b.jsx)(e.BrainCircuit,{size:16,className:"text-[var(--primary)]"}),"Living Project Note"]}),(0,b.jsx)("p",{className:"mt-1 text-xs text-[var(--muted-foreground)]",children:"Auto-maintained project knowledge. It updates in place instead of creating review candidates."})]}),(0,b.jsx)(s,{note:V?N:N?.content?{...N,content:""}:null,emptyLabel:D?"No matching project note content.":"No project note yet.",scope:"project",subjectId:p??"",onSaved:O})]}),(0,b.jsxs)("section",{className:"rounded-2xl border border-[var(--border)] bg-[var(--card-bg)] p-5 shadow-[var(--shadow-sm)]",children:[(0,b.jsxs)("div",{className:"mb-4",children:[(0,b.jsxs)("h2",{className:"flex items-center gap-2 text-sm font-semibold text-[var(--foreground)]",children:[(0,b.jsx)(f.FileText,{size:16,className:"text-[var(--primary)]"}),"Human-Authored References"]}),(0,b.jsx)("p",{className:"mt-1 text-xs text-[var(--muted-foreground)]",children:"File-backed project knowledge for project-specific instructions."})]}),T.length>0&&(0,b.jsx)("div",{className:"mb-4 grid grid-cols-1 gap-2 md:grid-cols-2",children:T.map(a=>(0,b.jsxs)("div",{className:"group flex items-start gap-3 rounded-xl border border-[var(--border)] bg-[var(--secondary)] p-3",children:[(0,b.jsx)("div",{className:"flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-lg bg-[var(--primary-muted)]",children:(0,b.jsx)(f.FileText,{size:14,className:"text-[var(--primary)]"})}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)("div",{className:"truncate break-all font-mono text-xs text-[var(--secondary-foreground)]",children:a.file}),a.condition&&(0,b.jsx)("div",{className:"mt-0.5 text-[11px] text-[var(--muted-foreground)]",children:a.condition})]}),(0,b.jsx)("button",{type:"button",onClick:()=>void x(a.id),className:"rounded-lg p-1.5 text-[var(--app-shell-soft-text)] opacity-0 transition-all group-hover:opacity-100 hover:bg-[var(--card-bg)] hover:text-red-500","aria-label":"Remove reference",children:(0,b.jsx)(l.Trash2,{className:"h-3.5 w-3.5"})})]},a.id))}),F?(0,b.jsxs)("div",{className:"space-y-2 rounded-xl border border-[var(--border)] bg-[var(--secondary)] p-3",children:[(0,b.jsx)("input",{type:"text",value:H,onChange:a=>I(a.target.value),placeholder:"path/to/project-knowledge.md",className:"w-full rounded-lg border border-[var(--border)] bg-[var(--card-bg)] px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-[var(--ring)] focus:border-[var(--primary)]",autoFocus:!0}),(0,b.jsx)("input",{type:"text",value:J,onChange:a=>K(a.target.value),placeholder:"Optional condition",className:"w-full rounded-lg border border-[var(--border)] bg-[var(--card-bg)] px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-[var(--ring)] focus:border-[var(--primary)]"}),(0,b.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,b.jsx)("button",{type:"button",onClick:()=>{G(!1),I(""),K("")},className:"px-3 py-1.5 text-xs text-[var(--muted-foreground)]",children:"Cancel"}),(0,b.jsxs)("button",{type:"button",onClick:async()=>{let a=H.trim();a&&(await w(a,J.trim()||void 0),I(""),K(""),G(!1))},className:"inline-flex items-center gap-1.5 rounded-lg bg-[var(--primary)] px-3 py-1.5 text-xs font-medium text-[var(--primary-foreground)]",children:[(0,b.jsx)(i.Plus,{className:"h-3.5 w-3.5"}),"Add"]})]})]}):(0,b.jsxs)("button",{type:"button",onClick:()=>G(!0),className:"group flex w-full items-center justify-center gap-2 rounded-xl border-2 border-dashed border-[var(--border)] py-3 text-sm text-[var(--muted-foreground)] transition-all hover:bg-[var(--secondary)] hover:text-[var(--foreground)]",children:[(0,b.jsx)(i.Plus,{size:16,className:"transition-transform group-hover:scale-110"}),"Add Reference"]})]}),(0,b.jsxs)("section",{className:"rounded-2xl border border-[var(--border)] bg-[var(--card-bg)] p-5 shadow-[var(--shadow-sm)]",children:[(0,b.jsxs)("div",{className:"mb-4",children:[(0,b.jsxs)("h2",{className:"flex items-center gap-2 text-sm font-semibold text-[var(--foreground)]",children:[(0,b.jsx)(h.MessageSquare,{size:16,className:"text-[var(--primary)]"}),"Project Notes"]}),(0,b.jsx)("p",{className:"mt-1 text-xs text-[var(--muted-foreground)]",children:"Human-authored coordination notes."})]}),U.length>0&&(0,b.jsx)("div",{className:"mb-4 space-y-2",children:U.map(a=>(0,b.jsx)(t,{content:a.content,source:a.source||"project",time:new Date(a.created_at).toLocaleString(),onDelete:()=>void A(a.id)},a.id))}),(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)("textarea",{value:L,onChange:a=>M(a.target.value),placeholder:"Add a new project note...",rows:3,className:"w-full resize-none rounded-xl border border-[var(--border)] bg-[var(--secondary)] px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-[var(--ring)] focus:border-[var(--primary)]"}),L.trim()&&(0,b.jsx)("button",{type:"button",onClick:async()=>{let a=L.trim();a&&(await z(a,"human-authored"),M(""))},className:"absolute bottom-3 right-3 rounded-lg bg-[var(--primary)] px-3 py-1.5 text-xs font-medium text-[var(--primary-foreground)]",children:"Save Note"})]})]})]})]}):(0,b.jsx)("div",{className:"mt-2 space-y-4",children:0===W.length?(0,b.jsxs)("div",{className:"rounded-2xl border border-dashed border-[var(--border)] px-6 py-12 text-center",children:[(0,b.jsx)(g.FolderGit2,{size:32,className:"mx-auto mb-3 text-[var(--app-shell-soft-text)]"}),(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:0===m.repos.length?"This project has no repos attached yet.":"No matching repositories."})]}):(0,b.jsx)("div",{className:"grid grid-cols-1 gap-4 xl:grid-cols-2",children:W.map(a=>(0,b.jsx)(u,{repo:a,draft:P[a.id]??"",systemNote:R[a.id]??null,systemNoteMatches:!D||(R[a.id]?.content??"").toLowerCase().includes(D.toLowerCase()),onDraftChange:b=>Q(c=>({...c,[a.id]:b})),onSave:async()=>{await fetch(`/api/repos/${a.id}/knowledge`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({producer:"human",content:P[a.id]??""})}).then(async a=>{if(!a.ok)throw Error((await a.json().catch(()=>({}))).error||"Failed to save")})},onSystemNoteSaved:b=>S(c=>({...c,[a.id]:b}))},a.id))})})})]}):(0,b.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"Loading..."})})}function q({active:a,onClick:c,icon:d,label:e}){return(0,b.jsxs)("button",{onClick:c,className:`flex items-center gap-2 rounded-lg px-4 py-1.5 text-xs font-semibold transition-all ${a?"bg-[var(--card-bg)] text-[var(--foreground)] shadow-[var(--shadow-sm)] ring-1 ring-[var(--border)]":"text-[var(--muted-foreground)] hover:text-[var(--foreground)]"}`,children:[d,e]})}function r({label:a,value:c,sub:d}){return(0,b.jsxs)("div",{className:"flex flex-col rounded-xl border border-[var(--border)] bg-[var(--secondary)] p-4",children:[(0,b.jsx)("span",{className:"text-[10px] font-black uppercase tracking-[0.2em] text-[var(--app-shell-soft-text)]",children:a}),(0,b.jsx)("span",{className:"mt-1 text-2xl font-bold text-[var(--foreground)]",children:c}),(0,b.jsx)("span",{className:"mt-1 text-[10px] text-[var(--app-shell-soft-text)]",children:d})]})}function s({note:a,emptyLabel:e,scope:f,subjectId:g,onSaved:h}){let[i,j]=(0,c.useState)(!1),[l,n]=(0,c.useState)(a?.content??""),[p,q]=(0,c.useState)(!1),[r,s]=(0,c.useState)(null);(0,c.useEffect)(()=>{n(a?.content??"")},[a?.id,a?.content]);let t=!!a?.content.trim(),u=a?.updated_at??a?.created_at,v=a?.source;async function w(){if(g){q(!0),s(null);try{let a=await fetch("/api/knowledge-notes",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({scope:f,subjectId:g,content:l})}),b=await a.json().catch(()=>({}));if(!a.ok)throw Error(b.error||"Failed to save knowledge note");let c=o(b.note);h(c),n(c?.content??""),j(!1)}catch(a){s(a instanceof Error?a.message:"Failed to save knowledge note")}finally{q(!1)}}}return t?(0,b.jsxs)("div",{className:"rounded-xl border border-[var(--border)] bg-[var(--secondary)] p-4",children:[(0,b.jsxs)("div",{className:"mb-3 flex items-start justify-between gap-3",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-[11px] text-[var(--app-shell-soft-text)]",children:[u?(0,b.jsxs)("span",{children:["Updated ",new Date(u).toLocaleString()]}):null,v?(0,b.jsx)("span",{children:v}):null]}),i?null:(0,b.jsxs)("button",{type:"button",onClick:()=>{n(a?.content??""),s(null),j(!0)},className:"inline-flex items-center gap-1.5 rounded-lg border border-[var(--border)] bg-[var(--card-bg)] px-3 py-1.5 text-xs font-medium text-[var(--foreground)]",children:[(0,b.jsx)(k,{className:"h-3.5 w-3.5"}),"Edit"]})]}),i?(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsx)("textarea",{value:l,onChange:a=>n(a.target.value),rows:12,className:"w-full resize-y rounded-xl border border-[var(--border)] bg-[var(--card-bg)] px-4 py-3 text-sm text-[var(--foreground)] focus:border-[var(--primary)] focus:outline-none focus:ring-2 focus:ring-[var(--ring)]",placeholder:"Write the living knowledge note in markdown..."}),r?(0,b.jsx)("p",{className:"text-xs text-red-500",children:r}):null,(0,b.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,b.jsxs)("button",{type:"button",onClick:()=>{n(a?.content??""),s(null),j(!1)},className:"inline-flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-xs font-medium text-[var(--muted-foreground)]",disabled:p,children:[(0,b.jsx)(m.X,{className:"h-3.5 w-3.5"}),"Cancel"]}),(0,b.jsx)("button",{type:"button",onClick:()=>void w(),disabled:p,className:"inline-flex items-center gap-1.5 rounded-lg bg-[var(--primary)] px-3 py-1.5 text-xs font-medium text-[var(--primary-foreground)] disabled:opacity-60",children:p?"Saving...":"Save"})]})]}):(0,b.jsx)("div",{className:"text-sm leading-relaxed text-[var(--secondary-foreground)]",children:(0,b.jsx)(d.Markdown,{content:a?.content??""})})]}):(0,b.jsxs)("div",{className:"rounded-xl border border-dashed border-[var(--border)] px-4 py-6 text-sm text-[var(--muted-foreground)]",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,b.jsx)("span",{children:e}),(0,b.jsxs)("button",{type:"button",onClick:()=>{n(a?.content??""),s(null),j(!0)},className:"inline-flex items-center gap-1.5 rounded-lg border border-[var(--border)] bg-[var(--secondary)] px-3 py-1.5 text-xs font-medium text-[var(--foreground)]",children:[(0,b.jsx)(k,{className:"h-3.5 w-3.5"}),"Edit"]})]}),i?(0,b.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,b.jsx)("textarea",{value:l,onChange:a=>n(a.target.value),rows:10,className:"w-full resize-y rounded-xl border border-[var(--border)] bg-[var(--secondary)] px-4 py-3 text-sm text-[var(--foreground)] focus:border-[var(--primary)] focus:outline-none focus:ring-2 focus:ring-[var(--ring)]",placeholder:"Write the living knowledge note in markdown..."}),r?(0,b.jsx)("p",{className:"text-xs text-red-500",children:r}):null,(0,b.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,b.jsxs)("button",{type:"button",onClick:()=>{n(a?.content??""),s(null),j(!1)},className:"inline-flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-xs font-medium text-[var(--muted-foreground)]",disabled:p,children:[(0,b.jsx)(m.X,{className:"h-3.5 w-3.5"}),"Cancel"]}),(0,b.jsx)("button",{type:"button",onClick:()=>void w(),disabled:p,className:"inline-flex items-center gap-1.5 rounded-lg bg-[var(--primary)] px-3 py-1.5 text-xs font-medium text-[var(--primary-foreground)] disabled:opacity-60",children:p?"Saving...":"Save"})]})]}):null]})}function t({content:a,source:c,time:d,onDelete:e}){return(0,b.jsxs)("div",{className:"group rounded-xl border border-[var(--border)] bg-[var(--secondary)] p-3",children:[(0,b.jsxs)("div",{className:"mb-1.5 flex items-center justify-between",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-[11px] font-semibold text-[var(--foreground)]",children:c}),(0,b.jsx)("span",{className:"text-[10px] text-[var(--app-shell-soft-text)]",children:d})]}),(0,b.jsx)("button",{type:"button",onClick:e,className:"rounded p-1 text-[var(--app-shell-soft-text)] opacity-0 transition-all group-hover:opacity-100 hover:text-red-500",children:(0,b.jsx)(l.Trash2,{size:12})})]}),(0,b.jsx)("p",{className:"text-sm leading-relaxed text-[var(--secondary-foreground)]",children:a})]})}function u({repo:a,draft:c,systemNote:d,systemNoteMatches:e,onDraftChange:f,onSave:h,onSystemNoteSaved:i}){return(0,b.jsxs)("div",{className:"group flex flex-col rounded-2xl border border-[var(--border)] bg-[var(--card-bg)] p-5 shadow-[var(--shadow-sm)] transition-colors hover:border-[var(--card-hover-border)]",children:[(0,b.jsxs)("div",{className:"mb-3 flex items-start justify-between",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)("div",{className:"flex h-9 w-9 items-center justify-center rounded-xl bg-[var(--secondary)] text-[var(--muted-foreground)]",children:(0,b.jsx)(g.FolderGit2,{size:20})}),(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold text-[var(--foreground)]",children:a.name}),(0,b.jsx)("p",{className:"text-[11px] text-[var(--muted-foreground)]",children:a.path||"No path set"})]})]}),(0,b.jsx)("button",{type:"button",onClick:h,className:"rounded-lg border border-[var(--border)] bg-[var(--secondary)] px-3 py-1.5 text-xs font-medium",children:"Save"})]}),(0,b.jsxs)("div",{className:"mb-3",children:[(0,b.jsx)("p",{className:"mb-2 text-[10px] font-black uppercase tracking-[0.16em] text-[var(--app-shell-soft-text)]",children:"Living Repo Note"}),(0,b.jsx)(s,{note:e?d:d?.content?{...d,content:""}:null,emptyLabel:"No repo note yet.",scope:"repo",subjectId:a.id,onSaved:i})]}),(0,b.jsx)("p",{className:"mb-2 text-[10px] font-black uppercase tracking-[0.16em] text-[var(--app-shell-soft-text)]",children:"Human Notes"}),(0,b.jsx)("textarea",{value:c,onChange:a=>f(a.target.value),rows:4,placeholder:"Architecture facts, repo conventions, commands...",className:"w-full resize-none rounded-xl border border-[var(--border)] bg-[var(--secondary)] px-3 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-[var(--ring)] focus:border-[var(--primary)]"})]})}a.s(["default",()=>p],58843)}];
1
+ module.exports=[858843,a=>{"use strict";var b=a.i(187924),c=a.i(572131),d=a.i(815682),e=a.i(485552),f=a.i(104720),g=a.i(734531),h=a.i(915618),i=a.i(587532);let j=(0,a.i(883706).default)("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);var k=a.i(781560),l=a.i(633508),m=a.i(56196);function n(a){return a?{id:a.id,content:a.content,created_at:a.createdAt,updated_at:a.updatedAt,source:a.sourceType}:null}function o({params:a}){let{slug:d}=(0,c.use)(a),{projects:j}=(0,m.useProjects)(),l=j.find(a=>a.slug===d),o=l?.id??null,{skills:t,addSkill:u,removeSkill:v}=function(a){let[b,d]=(0,c.useState)([]),[e,f]=(0,c.useState)(!0),g=(0,c.useCallback)(async()=>{if(!a){d([]),f(!1);return}try{let b=await fetch(`/api/projects/${a}/skills`);if(!b.ok)return;let c=await b.json();d(c.skills??[])}catch{}finally{f(!1)}},[a]);return(0,c.useEffect)(()=>{g()},[g]),{skills:b,isLoading:e,addSkill:(0,c.useCallback)(async(b,c)=>{if(a)try{(await fetch(`/api/projects/${a}/skills`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:b,condition:c})})).ok&&await g()}catch{}},[a,g]),removeSkill:(0,c.useCallback)(async b=>{if(a)try{(await fetch(`/api/projects/${a}/skills?skillId=${b}`,{method:"DELETE"})).ok&&d(a=>a.filter(a=>a.id!==b))}catch{}},[a]),refresh:g}}(o),[w,x]=(0,c.useState)("project"),[y,z]=(0,c.useState)(""),[A,B]=(0,c.useState)(!1),[C,D]=(0,c.useState)(""),[E,F]=(0,c.useState)(""),[G,H]=(0,c.useState)(null),[I,J]=(0,c.useState)({});(0,c.useEffect)(()=>{let a=!1;return async function(){if(!o)return H(null);try{let b=await fetch(`/api/knowledge-notes?scope=project&subjectId=${encodeURIComponent(o)}`),c=b.ok?await b.json():{note:null};a||H(n(c.note))}catch{a||H(null)}}(),()=>{a=!0}},[o]),(0,c.useEffect)(()=>{let a=!1;return async function(){let b=l?.repos??[];if(0===b.length)return J({});try{let c=await Promise.all(b.map(async a=>{let b=await fetch(`/api/knowledge-notes?scope=repo&subjectId=${encodeURIComponent(a.id)}`),c=b.ok?await b.json():{note:null};return[a.id,n(c.note)]}));a||J(Object.fromEntries(c))}catch{a||J({})}}(),()=>{a=!0}},[l?.repos]);let K=t.filter(a=>!y||a.file.toLowerCase().includes(y.toLowerCase())||(a.condition??"").toLowerCase().includes(y.toLowerCase())),L=!y||G?.content.toLowerCase().includes(y.toLowerCase()),M=(l?.repos??[]).filter(a=>{if(!y)return!0;let b=y.toLowerCase(),c=(I[a.id]?.content??"").toLowerCase();return a.name.toLowerCase().includes(b)||(a.path??"").toLowerCase().includes(b)||c.includes(b)});return l?(0,b.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,b.jsx)("div",{className:"flex-shrink-0 border-b border-[var(--border)] bg-[var(--card-bg)] px-3 py-2 backdrop-blur-md sm:h-14 sm:px-6 sm:py-0",children:(0,b.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between sm:gap-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,b.jsx)("span",{className:"font-semibold text-[var(--foreground)]",children:l.name}),(0,b.jsx)("span",{className:"text-[var(--muted-foreground)]",children:"/"}),(0,b.jsx)("span",{className:"text-[var(--muted-foreground)]",children:"Knowledge"})]}),(0,b.jsxs)("div",{className:"relative w-full sm:max-w-xs",children:[(0,b.jsx)(i.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--app-shell-soft-text)]",size:14}),(0,b.jsx)("input",{type:"text",placeholder:"Search notes...",value:y,onChange:a=>z(a.target.value),className:"w-full rounded-full border border-[var(--border)] bg-[var(--secondary)] py-1.5 pl-9 pr-4 text-xs focus:outline-none focus:ring-2 focus:ring-[var(--ring)] focus:border-[var(--primary)]"})]})]})}),(0,b.jsx)("div",{className:"flex-shrink-0 px-3 pb-2 pt-4 sm:px-6",children:(0,b.jsxs)("div",{className:"flex w-fit gap-1 rounded-xl border border-[var(--border)] bg-[var(--secondary)] p-1",children:[(0,b.jsx)(p,{active:"project"===w,onClick:()=>x("project"),icon:(0,b.jsx)(e.BrainCircuit,{size:14}),label:"Project"}),(0,b.jsx)(p,{active:"repos"===w,onClick:()=>x("repos"),icon:(0,b.jsx)(g.FolderGit2,{size:14}),label:"Repositories"})]})}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto px-3 pb-8 sm:px-6",children:"project"===w?(0,b.jsxs)("div",{className:"mt-2 grid grid-cols-12 gap-4 sm:gap-6",children:[(0,b.jsx)("div",{className:"col-span-12 lg:col-span-4 space-y-4",children:(0,b.jsxs)("div",{className:"rounded-2xl border border-[var(--border)] bg-[var(--card-bg)] p-5 shadow-[var(--shadow-sm)]",children:[(0,b.jsx)("h3",{className:"mb-4 text-[10px] font-black uppercase tracking-[0.2em] text-[var(--app-shell-soft-text)]",children:"Overview"}),(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,b.jsx)(q,{label:"References",value:K.length,sub:"File-backed"}),(0,b.jsx)(q,{label:"Repos",value:l.repos.length,sub:"Attached folders"})]}),(0,b.jsx)("div",{className:"mt-3",children:(0,b.jsx)(q,{label:"System Note",value:+!!G?.content,sub:"Living doc"})})]})}),(0,b.jsxs)("div",{className:"col-span-12 lg:col-span-8 space-y-4",children:[(0,b.jsxs)("section",{className:"rounded-2xl border border-[var(--border)] bg-[var(--card-bg)] p-5 shadow-[var(--shadow-sm)]",children:[(0,b.jsxs)("div",{className:"mb-4",children:[(0,b.jsxs)("h2",{className:"flex items-center gap-2 text-sm font-semibold text-[var(--foreground)]",children:[(0,b.jsx)(e.BrainCircuit,{size:16,className:"text-[var(--primary)]"}),"Living Project Note"]}),(0,b.jsx)("p",{className:"mt-1 text-xs text-[var(--muted-foreground)]",children:"Auto-maintained project knowledge. It updates in place instead of creating review candidates."})]}),(0,b.jsx)(r,{note:L?G:G?.content?{...G,content:""}:null,emptyLabel:y?"No matching project note content.":"No project note yet.",scope:"project",subjectId:o??"",onSaved:H})]}),(0,b.jsxs)("section",{className:"rounded-2xl border border-[var(--border)] bg-[var(--card-bg)] p-5 shadow-[var(--shadow-sm)]",children:[(0,b.jsxs)("div",{className:"mb-4",children:[(0,b.jsxs)("h2",{className:"flex items-center gap-2 text-sm font-semibold text-[var(--foreground)]",children:[(0,b.jsx)(f.FileText,{size:16,className:"text-[var(--primary)]"}),"Project References"]}),(0,b.jsx)("p",{className:"mt-1 text-xs text-[var(--muted-foreground)]",children:"File-backed project knowledge for project-specific instructions."})]}),K.length>0&&(0,b.jsx)("div",{className:"mb-4 grid grid-cols-1 gap-2 md:grid-cols-2",children:K.map(a=>(0,b.jsxs)("div",{className:"group flex items-start gap-3 rounded-xl border border-[var(--border)] bg-[var(--secondary)] p-3",children:[(0,b.jsx)("div",{className:"flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-lg bg-[var(--primary-muted)]",children:(0,b.jsx)(f.FileText,{size:14,className:"text-[var(--primary)]"})}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)("div",{className:"truncate break-all font-mono text-xs text-[var(--secondary-foreground)]",children:a.file}),a.condition&&(0,b.jsx)("div",{className:"mt-0.5 text-[11px] text-[var(--muted-foreground)]",children:a.condition})]}),(0,b.jsx)("button",{type:"button",onClick:()=>void v(a.id),className:"rounded-lg p-1.5 text-[var(--app-shell-soft-text)] opacity-0 transition-all group-hover:opacity-100 hover:bg-[var(--card-bg)] hover:text-red-500","aria-label":"Remove reference",children:(0,b.jsx)(k.Trash2,{className:"h-3.5 w-3.5"})})]},a.id))}),A?(0,b.jsxs)("div",{className:"space-y-2 rounded-xl border border-[var(--border)] bg-[var(--secondary)] p-3",children:[(0,b.jsx)("input",{type:"text",value:C,onChange:a=>D(a.target.value),placeholder:"path/to/project-knowledge.md",className:"w-full rounded-lg border border-[var(--border)] bg-[var(--card-bg)] px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-[var(--ring)] focus:border-[var(--primary)]",autoFocus:!0}),(0,b.jsx)("input",{type:"text",value:E,onChange:a=>F(a.target.value),placeholder:"Optional condition",className:"w-full rounded-lg border border-[var(--border)] bg-[var(--card-bg)] px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-[var(--ring)] focus:border-[var(--primary)]"}),(0,b.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,b.jsx)("button",{type:"button",onClick:()=>{B(!1),D(""),F("")},className:"px-3 py-1.5 text-xs text-[var(--muted-foreground)]",children:"Cancel"}),(0,b.jsxs)("button",{type:"button",onClick:async()=>{let a=C.trim();a&&(await u(a,E.trim()||void 0),D(""),F(""),B(!1))},className:"inline-flex items-center gap-1.5 rounded-lg bg-[var(--primary)] px-3 py-1.5 text-xs font-medium text-[var(--primary-foreground)]",children:[(0,b.jsx)(h.Plus,{className:"h-3.5 w-3.5"}),"Add"]})]})]}):(0,b.jsxs)("button",{type:"button",onClick:()=>B(!0),className:"group flex w-full items-center justify-center gap-2 rounded-xl border-2 border-dashed border-[var(--border)] py-3 text-sm text-[var(--muted-foreground)] transition-all hover:bg-[var(--secondary)] hover:text-[var(--foreground)]",children:[(0,b.jsx)(h.Plus,{size:16,className:"transition-transform group-hover:scale-110"}),"Add Reference"]})]})]})]}):(0,b.jsx)("div",{className:"mt-2 space-y-4",children:0===M.length?(0,b.jsxs)("div",{className:"rounded-2xl border border-dashed border-[var(--border)] px-6 py-12 text-center",children:[(0,b.jsx)(g.FolderGit2,{size:32,className:"mx-auto mb-3 text-[var(--app-shell-soft-text)]"}),(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:0===l.repos.length?"This project has no repos attached yet.":"No matching repositories."})]}):(0,b.jsx)("div",{className:"grid grid-cols-1 gap-4 xl:grid-cols-2",children:M.map(a=>(0,b.jsx)(s,{repo:a,systemNote:I[a.id]??null,systemNoteMatches:!y||(I[a.id]?.content??"").toLowerCase().includes(y.toLowerCase()),onSystemNoteSaved:b=>J(c=>({...c,[a.id]:b}))},a.id))})})})]}):(0,b.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"Loading..."})})}function p({active:a,onClick:c,icon:d,label:e}){return(0,b.jsxs)("button",{onClick:c,className:`flex items-center gap-2 rounded-lg px-4 py-1.5 text-xs font-semibold transition-all ${a?"bg-[var(--card-bg)] text-[var(--foreground)] shadow-[var(--shadow-sm)] ring-1 ring-[var(--border)]":"text-[var(--muted-foreground)] hover:text-[var(--foreground)]"}`,children:[d,e]})}function q({label:a,value:c,sub:d}){return(0,b.jsxs)("div",{className:"flex flex-col rounded-xl border border-[var(--border)] bg-[var(--secondary)] p-4",children:[(0,b.jsx)("span",{className:"text-[10px] font-black uppercase tracking-[0.2em] text-[var(--app-shell-soft-text)]",children:a}),(0,b.jsx)("span",{className:"mt-1 text-2xl font-bold text-[var(--foreground)]",children:c}),(0,b.jsx)("span",{className:"mt-1 text-[10px] text-[var(--app-shell-soft-text)]",children:d})]})}function r({note:a,emptyLabel:e,scope:f,subjectId:g,onSaved:h}){let[i,k]=(0,c.useState)(!1),[m,o]=(0,c.useState)(a?.content??""),[p,q]=(0,c.useState)(!1),[r,s]=(0,c.useState)(null);(0,c.useEffect)(()=>{o(a?.content??"")},[a?.id,a?.content]);let t=!!a?.content.trim(),u=a?.updated_at??a?.created_at,v=a?.source;async function w(){if(g){q(!0),s(null);try{let a=await fetch("/api/knowledge-notes",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({scope:f,subjectId:g,content:m})}),b=await a.json().catch(()=>({}));if(!a.ok)throw Error(b.error||"Failed to save knowledge note");let c=n(b.note);h(c),o(c?.content??""),k(!1)}catch(a){s(a instanceof Error?a.message:"Failed to save knowledge note")}finally{q(!1)}}}return t?(0,b.jsxs)("div",{className:"rounded-xl border border-[var(--border)] bg-[var(--secondary)] p-4",children:[(0,b.jsxs)("div",{className:"mb-3 flex items-start justify-between gap-3",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-[11px] text-[var(--app-shell-soft-text)]",children:[u?(0,b.jsxs)("span",{children:["Updated ",new Date(u).toLocaleString()]}):null,v?(0,b.jsx)("span",{children:v}):null]}),i?null:(0,b.jsxs)("button",{type:"button",onClick:()=>{o(a?.content??""),s(null),k(!0)},className:"inline-flex items-center gap-1.5 rounded-lg border border-[var(--border)] bg-[var(--card-bg)] px-3 py-1.5 text-xs font-medium text-[var(--foreground)]",children:[(0,b.jsx)(j,{className:"h-3.5 w-3.5"}),"Edit"]})]}),i?(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsx)("textarea",{value:m,onChange:a=>o(a.target.value),rows:12,className:"w-full resize-y rounded-xl border border-[var(--border)] bg-[var(--card-bg)] px-4 py-3 text-sm text-[var(--foreground)] focus:border-[var(--primary)] focus:outline-none focus:ring-2 focus:ring-[var(--ring)]",placeholder:"Write the living knowledge note in markdown..."}),r?(0,b.jsx)("p",{className:"text-xs text-red-500",children:r}):null,(0,b.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,b.jsxs)("button",{type:"button",onClick:()=>{o(a?.content??""),s(null),k(!1)},className:"inline-flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-xs font-medium text-[var(--muted-foreground)]",disabled:p,children:[(0,b.jsx)(l.X,{className:"h-3.5 w-3.5"}),"Cancel"]}),(0,b.jsx)("button",{type:"button",onClick:()=>void w(),disabled:p,className:"inline-flex items-center gap-1.5 rounded-lg bg-[var(--primary)] px-3 py-1.5 text-xs font-medium text-[var(--primary-foreground)] disabled:opacity-60",children:p?"Saving...":"Save"})]})]}):(0,b.jsx)("div",{className:"text-sm leading-relaxed text-[var(--secondary-foreground)]",children:(0,b.jsx)(d.Markdown,{content:a?.content??""})})]}):(0,b.jsxs)("div",{className:"rounded-xl border border-dashed border-[var(--border)] px-4 py-6 text-sm text-[var(--muted-foreground)]",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,b.jsx)("span",{children:e}),(0,b.jsxs)("button",{type:"button",onClick:()=>{o(a?.content??""),s(null),k(!0)},className:"inline-flex items-center gap-1.5 rounded-lg border border-[var(--border)] bg-[var(--secondary)] px-3 py-1.5 text-xs font-medium text-[var(--foreground)]",children:[(0,b.jsx)(j,{className:"h-3.5 w-3.5"}),"Edit"]})]}),i?(0,b.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,b.jsx)("textarea",{value:m,onChange:a=>o(a.target.value),rows:10,className:"w-full resize-y rounded-xl border border-[var(--border)] bg-[var(--secondary)] px-4 py-3 text-sm text-[var(--foreground)] focus:border-[var(--primary)] focus:outline-none focus:ring-2 focus:ring-[var(--ring)]",placeholder:"Write the living knowledge note in markdown..."}),r?(0,b.jsx)("p",{className:"text-xs text-red-500",children:r}):null,(0,b.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,b.jsxs)("button",{type:"button",onClick:()=>{o(a?.content??""),s(null),k(!1)},className:"inline-flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-xs font-medium text-[var(--muted-foreground)]",disabled:p,children:[(0,b.jsx)(l.X,{className:"h-3.5 w-3.5"}),"Cancel"]}),(0,b.jsx)("button",{type:"button",onClick:()=>void w(),disabled:p,className:"inline-flex items-center gap-1.5 rounded-lg bg-[var(--primary)] px-3 py-1.5 text-xs font-medium text-[var(--primary-foreground)] disabled:opacity-60",children:p?"Saving...":"Save"})]})]}):null]})}function s({repo:a,systemNote:c,systemNoteMatches:d,onSystemNoteSaved:e}){return(0,b.jsxs)("div",{className:"group flex flex-col rounded-2xl border border-[var(--border)] bg-[var(--card-bg)] p-5 shadow-[var(--shadow-sm)] transition-colors hover:border-[var(--card-hover-border)]",children:[(0,b.jsx)("div",{className:"mb-3 flex items-start justify-between",children:(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)("div",{className:"flex h-9 w-9 items-center justify-center rounded-xl bg-[var(--secondary)] text-[var(--muted-foreground)]",children:(0,b.jsx)(g.FolderGit2,{size:20})}),(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold text-[var(--foreground)]",children:a.name}),(0,b.jsx)("p",{className:"text-[11px] text-[var(--muted-foreground)]",children:a.path||"No path set"})]})]})}),(0,b.jsxs)("div",{className:"mb-3",children:[(0,b.jsx)("p",{className:"mb-2 text-[10px] font-black uppercase tracking-[0.16em] text-[var(--app-shell-soft-text)]",children:"Living Repo Note"}),(0,b.jsx)(r,{note:d?c:c?.content?{...c,content:""}:null,emptyLabel:"No repo note yet.",scope:"repo",subjectId:a.id,onSaved:e})]})]})}a.s(["default",()=>o],858843)}];
2
2
 
3
3
  //# sourceMappingURL=app_projects_%5Bslug%5D_knowledge_page_tsx_e2a55cbd._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[90068,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/app/projects/[slug]/layout.tsx <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/app/projects/[slug]/layout.tsx <module evaluation>","default")},39675,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/app/projects/[slug]/layout.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/app/projects/[slug]/layout.tsx","default")},70611,a=>{"use strict";a.i(90068);var b=a.i(39675);a.n(b)}];
1
+ module.exports=[690068,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(211857).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/app/projects/[slug]/layout.tsx <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/app/projects/[slug]/layout.tsx <module evaluation>","default")},39675,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(211857).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/app/projects/[slug]/layout.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/app/projects/[slug]/layout.tsx","default")},70611,a=>{"use strict";a.i(690068);var b=a.i(39675);a.n(b)}];
2
2
 
3
3
  //# sourceMappingURL=app_projects_%5Bslug%5D_layout_tsx_67c9550a._.js.map
@@ -0,0 +1,39 @@
1
+ module.exports=[323860,a=>{"use strict";var b=a.i(187924),c=a.i(572131),d=a.i(50944),e=a.i(56196),f=a.i(819721),g=a.i(533441),h=a.i(405784),i=a.i(641710);let j=(0,a.i(883706).default)("link-2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);var k=a.i(325015),l=a.i(669520),m=a.i(587532),n=a.i(321161),o=a.i(546842),p=a.i(331748),q=a.i(204301),r=a.i(815682),s=a.i(194125),t=a.i(356283);function u(a,b){return a.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||b}function v(a){var b,c;let d,e,f=a.issue.identifier.trim()||"TICKET-ID",g=a.issue.title.trim()||"Untitled ticket",h=String(a.issue.status??"").trim()||"Unknown",i=String(a.issue.assignee??"").trim()||"Unassigned",j=function(a){let b=String(a?.slug??"").trim();if(b)return u(b,"project");let c=String(a?.name??"").trim();return c?u(c,"project"):"project"}(a.project),k=String(a.runtime?.knowledgeBaseRoot??"").trim()||`~/.agx/vault/${j}`,l=String(a.runtime?.issueKnowledgePath??"").trim()||`${k}/issues/${f}/`,m=String(a.runtime?.isolatedWorktreePath??"").trim()||`/tmp/agx-${u(f,"ticket")}`,n=`LINEAR TASK EXECUTION
2
+
3
+ You are an engineer working through a single Linear ticket. Work like a careful teammate: continue existing work when present, investigate before coding, present a plan before implementation, ask clarifying questions when requirements are ambiguous, and stop cleanly when blocked instead of guessing.
4
+
5
+ INJECTED CONTEXT
6
+ - Ticket: ${f}
7
+ - Title: ${g}
8
+ - Current status: ${h}
9
+ - Current assignee: ${i}
10
+ - Project: ${(b=a.project,d=String(b?.name??"").trim(),e=String(b?.slug??"").trim(),d&&e?`${d} (${e})`:d||e||"current project")}
11
+ - Knowledge base root: ${k}
12
+ - Issue knowledge path: ${l}
13
+ - Suggested isolated worktree: ${m}
14
+ - Additional project resources such as repo knowledge, project memory, and project variables are injected separately by the active project context.
15
+
16
+ SOURCE REPOSITORIES
17
+ ${!(c=a.project?.repos)||0===c.length?"- Use the active project context to discover the right repository or workspace; do not hardcode paths.":c.map(a=>{let b=[a.name.trim()||"repository"],c=String(a.path??"").trim(),d=String(a.notes??"").trim();return c&&b.push(`path: ${c}`),d&&b.push(`notes: ${d}`),`- ${b.join(" | ")}`}).join("\n")}
18
+
19
+ WORKFLOW
20
+ 1. Read the full Linear issue and comment thread before acting. Use Linear MCP for issue details, comments, state changes, and follow-up.
21
+ 2. Prefer resuming existing work: existing knowledge-base notes, branches, PRs, or prior discussion.
22
+ 3. If requirements are unclear, ask specific clarifying questions in Linear and stop.
23
+ 4. If the ticket is fresh, investigate first, capture findings in the knowledge base, write a plan, and share the plan before implementation.
24
+ 5. If a reviewed plan already exists or the ticket is explicitly ready for implementation, implement in an isolated worktree or equivalent isolated workspace rather than a shared checkout.
25
+ 6. Validate with the appropriate tests, linting, type checks, and manual verification for the change.
26
+ 7. Keep Linear accurate: comments, links, statuses, blockers, and PR references should match reality.
27
+ 8. Keep the knowledge base current with what you learned, what changed, and what remains.
28
+ 9. Work on exactly this ticket during this session.
29
+
30
+ RULES
31
+ - Use the injected project context instead of hardcoded repo-specific paths or conventions.
32
+ - Use knowledge base terminology; the filesystem path above is the storage location.
33
+ - If a PR already exists, focus on CI failures, reviewer feedback, merge status, or ticket follow-up instead of starting over.
34
+ - Leave the ticket and the knowledge base in a resumable state at the end of the session. Clean up temporary worktrees or session claims if your workflow created them.
35
+
36
+ `;return{prompt:`Work on this Linear ticket: ${f} - ${g}`,promptPrefix:n}}var w=a.i(860614),x=a.i(596221);let y=[{id:"claude",label:"Claude Code",icon:"🟣"},{id:"codex",label:"Codex",icon:"⚫"},{id:"gemini",label:"Gemini CLI",icon:"🔵"}];function z({connected:a,user:d,clis:e,mcpConfigured:f,onConnect:h,onConnectWithKey:i,onDisconnect:j,onConfigureMcp:k,onContinue:l}){let[m,n]=(0,c.useState)(""),[o,p]=(0,c.useState)(null),[q,r]=(0,c.useState)(!1),[s,t]=(0,c.useState)(null),[u,v]=(0,c.useState)(null),z=async()=>{if(!m.trim())return;r(!0),p(null);let a=await i(m.trim());r(!1),a.ok||p(a.error||"Failed to connect")},A=async a=>{t(a),v(null);let b=await k(a);t(null),b.ok||v(b.error||"Failed to configure")},B=y.filter(a=>e[a.id]).some(a=>f[a.id]);return(0,b.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,b.jsxs)("div",{className:"w-full max-w-md space-y-6 px-6",children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[a&&(0,b.jsx)("div",{className:"flex h-4 w-4 items-center justify-center rounded-full bg-green-500/20",children:(0,b.jsx)(g.Check,{size:10,className:"text-green-500"})}),(0,b.jsx)("h2",{className:"text-sm font-semibold text-[var(--foreground)]",children:"Connect to Linear"})]}),(0,b.jsx)("p",{className:"mt-1 text-xs text-[var(--muted-foreground)]",children:"Connect your workspace to browse tickets and execute them with agents."}),(0,b.jsx)("div",{className:"mt-3 space-y-3",children:a?(0,b.jsxs)("div",{className:"flex items-center justify-between rounded-md border border-[var(--card-border)] px-3 py-2",children:[(0,b.jsxs)("div",{className:"text-xs text-[var(--foreground)]",children:["Connected as"," ",(0,b.jsx)("span",{className:"font-medium",children:d?.name})]}),(0,b.jsx)("button",{type:"button",onClick:j,className:"text-[10px] text-[var(--muted-foreground)] hover:text-[var(--foreground)] transition-colors",children:"Disconnect"})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("button",{type:"button",onClick:h,className:"w-full rounded-md bg-[var(--foreground)] px-4 py-2 text-xs font-medium text-[var(--card-bg)] transition-opacity hover:opacity-90",children:"Connect with Linear"}),(0,b.jsxs)("div",{className:"flex items-center gap-2 text-[10px] text-[var(--muted-foreground)]",children:[(0,b.jsx)("div",{className:"flex-1 border-t border-[var(--card-border)]"}),"or",(0,b.jsx)("div",{className:"flex-1 border-t border-[var(--card-border)]"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-[10px] text-[var(--muted-foreground)] block mb-1",children:"Personal API key"}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)("input",{type:"password",value:m,onChange:a=>{n(a.target.value),p(null)},onKeyDown:a=>{"Enter"===a.key&&z()},placeholder:"lin_api_...",className:"flex-1 rounded-md border border-[var(--card-border)] bg-transparent px-3 py-1.5 text-xs text-[var(--foreground)] placeholder:text-[var(--muted-foreground)] focus:outline-none focus:ring-1 focus:ring-[var(--foreground)]"}),(0,b.jsx)("button",{type:"button",onClick:z,disabled:!m.trim()||q,className:"rounded-md border border-[var(--card-border)] px-3 py-1.5 text-xs text-[var(--foreground)] transition-colors hover:bg-[var(--card-border)] disabled:opacity-40",children:q?"...":"Save"})]}),o&&(0,b.jsx)("p",{className:"mt-1 text-[10px] text-red-400",children:o}),(0,b.jsxs)("a",{href:"https://linear.app/settings/api",target:"_blank",rel:"noopener noreferrer",className:"mt-1 inline-flex items-center gap-1 text-[10px] text-[var(--muted-foreground)] hover:text-[var(--foreground)] transition-colors",children:["Generate at linear.app/settings/api",(0,b.jsx)(w.ExternalLink,{size:8})]})]})]})})]}),a&&(0,b.jsxs)("div",{children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-[var(--foreground)]",children:"Configure MCP"}),(0,b.jsx)("p",{className:"mt-1 text-xs text-[var(--muted-foreground)]",children:"Add the Linear MCP server to your AI tools so agents can read and update tickets during execution."}),(0,b.jsxs)("div",{className:"mt-3 space-y-1",children:[y.map(a=>{let c=e[a.id],d=f[a.id],h=s===a.id;return(0,b.jsxs)("div",{className:`flex items-center justify-between rounded-md border border-[var(--card-border)] px-3 py-2 ${!c?"opacity-40":""}`,children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,b.jsx)("span",{children:a.icon}),(0,b.jsx)("span",{className:"text-[var(--foreground)]",children:a.label})]}),c?d?(0,b.jsxs)("span",{className:"flex items-center gap-1 text-[10px] text-green-500",children:[(0,b.jsx)(g.Check,{size:10}),"Configured"]}):(0,b.jsx)("button",{type:"button",onClick:()=>A(a.id),disabled:h,className:"flex items-center gap-1 rounded px-2 py-0.5 text-[10px] text-[var(--foreground)] border border-[var(--card-border)] hover:bg-[var(--card-border)] transition-colors disabled:opacity-50",children:h?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(x.Loader2,{size:10,className:"animate-spin"}),"Configuring..."]}):"Configure"}):(0,b.jsx)("span",{className:"text-[10px] text-[var(--muted-foreground)]",children:"Not installed"})]},a.id)}),u&&(0,b.jsx)("p",{className:"mt-1 text-[10px] text-red-400",children:u})]}),(0,b.jsx)("button",{type:"button",onClick:l,className:"mt-4 w-full rounded-md bg-[var(--foreground)] px-4 py-2 text-xs font-medium text-[var(--card-bg)] transition-opacity hover:opacity-90",children:B?"Continue":"Skip for now"})]})]})})}let A=(0,f.default)(async()=>{},{loadableGenerated:{modules:[895214]},ssr:!1});function B({onResize:a}){let d=(0,c.useRef)(!1),e=(0,c.useRef)(0);return(0,c.useEffect)(()=>{if(!d.current)return;let b=b=>{let c=b.clientX-e.current;e.current=b.clientX,a(c)},c=()=>{d.current=!1,document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("mousemove",b),window.removeEventListener("mouseup",c)};return window.addEventListener("mousemove",b),window.addEventListener("mouseup",c),()=>{window.removeEventListener("mousemove",b),window.removeEventListener("mouseup",c)}}),(0,b.jsx)("div",{className:"group relative z-10 w-0 shrink-0 cursor-col-resize",onMouseDown:a=>{a.preventDefault(),d.current=!0,e.current=a.clientX,document.body.style.cursor="col-resize",document.body.style.userSelect="none"},children:(0,b.jsx)("div",{className:"absolute inset-y-0 -left-0.5 w-1 transition-colors group-hover:bg-[var(--primary)]/40"})})}function C(a,b,c=20){let d=b?b.replace("#",""):"e2e8f0";return`https://api.dicebear.com/9.x/bottts-neutral/svg?seed=${encodeURIComponent(a)}&size=${c}&backgroundColor=${d}`}function D(a){switch(a){case"queued":return"queued";case"running":return"running";case"success":return"success";case"failed":return"failed";case"cancelled":return"cancelled";default:return a}}let E={"In Progress":"In Prog","In Review":"Review",Backlog:"Backlog",Todo:"Todo",Done:"Done",Cancelled:"Cancl."},F={queued:"bg-amber-500/10 border-amber-500/20 text-amber-400",running:"bg-yellow-500/10 border-yellow-500/20 text-yellow-400",success:"bg-emerald-500/10 border-emerald-500/20 text-emerald-400",failed:"bg-red-500/10 border-red-500/20 text-red-400",cancelled:"bg-zinc-500/10 border-zinc-500/20 text-zinc-400"},G={queued:"bg-amber-400",running:"bg-yellow-400",success:"bg-emerald-400",failed:"bg-red-400",cancelled:"bg-zinc-400"};function H({label:a,value:c,options:d,activeClasses:e,onChange:f}){let g=c.trim().length>0;return(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)("select",{"aria-label":a,className:`max-w-[160px] appearance-none rounded-full border bg-transparent px-2.5 py-0.5 pr-6 text-[11px] font-medium outline-none transition-colors ${g?e:"border-[var(--card-border)] text-[var(--muted-foreground)] hover:bg-[var(--card-bg)]"}`,value:c,onChange:a=>f(a.target.value),children:d.map(c=>(0,b.jsx)("option",{value:c.value,children:c.label},`${a}-${c.value||"all"}`))}),(0,b.jsx)(h.ChevronDown,{size:12,className:"pointer-events-none absolute right-2 top-1/2 -translate-y-1/2 text-current"})]})}function I({issue:a,participants:d,projectId:e,projectSlug:f,createRun:g,updateRun:h,onRunCreated:i}){let j=d[0],k=(0,c.useRef)(crypto.randomUUID()),{messages:l,setMessages:m,sendMessage:n,chatRuns:t}=(0,p.useGroupChat)(k.current),{processes:u,streaming:w}=(0,q.useProcessPolling)({workspaceId:k.current},{messages:l,setMessages:m}),x=new Set(["queued","running","awaiting_user","blocked"]),y=t.some(a=>x.has(a.status))||u.some(a=>"spawning"===a.state||"running"===a.state)?t.some(a=>"queued"===a.status)?"queued":"working":"ready",z=(0,c.useMemo)(()=>new Map(d.map(a=>[a.id,a])),[d]),B=(0,c.useRef)(!1),D=(0,c.useCallback)(async(b,c,k,l,m,n,o)=>{if(B.current)return;B.current=!0;let p=(m?d.find(a=>a.id===m):null)??j;if(p)try{let{promptPrefix:c}=v({issue:{identifier:a.identifier,title:a.title,status:a.status,assignee:a.assignee},project:f?{slug:f}:null}),d=c+(n?`
37
+ ${n}`:""),j=await g({projectId:e??null,projectSlug:f??null,issueId:a.id,issueIdentifier:a.identifier,issueTitle:a.title,issueStatus:a.status,issueAssignee:a.assignee??null,agentId:p.id,agentName:p.name}),k=await fetch("/api/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:b,promptPrefix:d,threadId:j.threadId,activeParticipantIds:[p.id],projectSlug:f??void 0,routing:o})}),l=await k.json().catch(()=>({}));if(!k.ok||!l.chatRunId||!l.userMessageId)throw Error(l.error||"Failed to start chat session");await h(j.id,{chatRunId:l.chatRunId,rootMessageId:l.userMessageId}),i(j.id)}catch(a){console.error("Failed to create chat session:",a),B.current=!1,a instanceof Error&&window.alert(a.message)}},[a,d,j,e,f,g,h,i]);return(0,b.jsxs)("div",{className:"relative flex min-w-0 flex-1 flex-col overflow-hidden",children:[(0,b.jsxs)("header",{className:"flex h-12 shrink-0 items-center justify-between border-b border-[var(--card-border)] px-6",children:[(0,b.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,b.jsx)("span",{className:"shrink-0 font-mono text-sm text-[var(--muted-foreground)]",children:a.identifier}),(0,b.jsx)("div",{className:"h-1 w-1 shrink-0 rounded-full bg-[var(--card-border)]"}),(0,b.jsx)("span",{className:"truncate text-sm font-medium text-[var(--foreground)]",children:a.title})]}),(0,b.jsx)("span",{className:"shrink-0 rounded-md border border-[var(--card-border)] px-2 py-0.5 text-xs text-[var(--muted-foreground)]",children:a.status})]}),(0,b.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto px-6 py-6 pb-64",children:0===l.length?(0,b.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2 text-[var(--muted-foreground)]",children:[(0,b.jsx)("span",{className:"text-sm",children:"Chat about this ticket"}),(0,b.jsx)("span",{className:"text-xs",children:"Your message will start a new session"})]}):(0,b.jsxs)("div",{className:"mx-auto max-w-4xl space-y-8",children:[l.map(a=>{let c=a.participantId?z.get(a.participantId):null,d=(0,s.stripMarkers)(a.content);return d.trim()?(0,b.jsxs)("div",{className:"flex gap-3",children:["user"===a.role?(0,b.jsx)("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-[var(--app-shell-subtle,var(--card-bg))]",children:(0,b.jsx)(o.User,{className:"h-3.5 w-3.5 text-[var(--muted-foreground)]"})}):(0,b.jsx)("img",{src:C(a.participantId??"",c?.color),alt:c?.name??"Agent",className:"h-7 w-7 shrink-0 rounded-full object-cover"}),(0,b.jsxs)("div",{className:"min-w-0 flex-1 flex flex-col gap-1.5",children:[(0,b.jsx)("span",{className:"text-sm font-semibold text-[var(--foreground)]",children:"user"===a.role?"You":c?.name??"Agent"}),(0,b.jsx)("div",{className:"text-sm text-[var(--foreground)]",children:(0,b.jsx)(r.Markdown,{content:d,isUser:"user"===a.role})})]})]},a.id):null}),Object.entries(w).map(([a])=>{let c=z.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:C(a,c?.color),alt:c?.name??"Agent",className:"h-7 w-7 shrink-0 rounded-full object-cover"}),c?.name??"Agent"," is thinking..."]},`stream-${a}`)})]})}),(0,b.jsx)("div",{className:"absolute bottom-3 left-3 right-3 p-2",children:(0,b.jsx)(A,{onSend:D,onStop:()=>{},participants:d,projectSlug:f??void 0,loading:"ready"!==y,commands:[],activityStatus:y,placeholder:`Ask about ${a.identifier}...`,initialPinnedParticipantId:j?.id})})]})}function J({run:a,participants:d}){let{messages:e,setMessages:f,sendMessage:g,loadHistory:h,stop:j}=(0,p.useGroupChat)(a.threadId),{processes:k,streaming:l,chatRuns:m}=(0,q.useProcessPolling)(a.rootMessageId?{workspaceId:a.threadId,threadId:a.rootMessageId}:{workspaceId:a.threadId},{messages:e,setMessages:f});(0,c.useEffect)(()=>{h()},[h,a.threadId]);let n=(0,c.useMemo)(()=>new Map(d.map(a=>[a.id,a])),[d]),u=new Set(["queued","running","awaiting_user","blocked"]),v=m.some(a=>u.has(a.status))||k.some(a=>"spawning"===a.state||"running"===a.state)?m.some(a=>"queued"===a.status)?"queued":"working":"ready",w=(0,c.useCallback)((b,c,e,f,h,i,j)=>{a.rootMessageId&&g(b,c,void 0,a.rootMessageId,e,void 0,(0,t.orderParticipantIds)(d.map(a=>a.id),h),a.projectSlug??void 0,i,j)},[d,a.projectSlug,a.rootMessageId,g]);return(0,b.jsxs)("div",{className:"relative flex min-w-0 flex-1 flex-col overflow-hidden",children:[(0,b.jsxs)("header",{className:"flex h-12 shrink-0 items-center justify-between border-b border-[var(--card-border)] px-6",children:[(0,b.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,b.jsx)("span",{className:"shrink-0 font-mono text-sm text-[var(--muted-foreground)]",children:a.issueIdentifier}),(0,b.jsx)("div",{className:"h-1 w-1 shrink-0 rounded-full bg-[var(--card-border)]"}),(0,b.jsx)("span",{className:"truncate text-sm font-medium text-[var(--foreground)]",children:a.issueTitle??""})]}),(0,b.jsxs)("div",{className:"flex shrink-0 items-center gap-4",children:[(0,b.jsxs)("div",{className:`flex items-center gap-2 rounded-md border px-2.5 py-1 ${F[a.status]}`,children:[(0,b.jsx)("div",{className:`h-1.5 w-1.5 rounded-full ${G[a.status]}`}),(0,b.jsx)("span",{className:"text-xs font-semibold uppercase tracking-wider",children:D(a.status)})]}),null!=a.durationMs&&(0,b.jsxs)("div",{className:"flex items-center gap-1.5 text-sm text-[var(--muted-foreground)]",children:[(0,b.jsx)(i.Clock,{size:14}),(0,b.jsxs)("span",{children:[(a.durationMs/1e3).toFixed(1),"s"]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2 rounded-full border border-[var(--card-border)] bg-[var(--card-bg)] px-2 py-1",children:[(0,b.jsx)("img",{src:C(a.agentId,n.get(a.agentId)?.color),alt:a.agentName,className:"h-5 w-5 rounded-full object-cover"}),(0,b.jsx)("span",{className:"pr-1 text-xs font-medium",children:a.agentName})]})]})]}),(0,b.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto px-6 py-6 pb-64",children:0===e.length?(0,b.jsx)("div",{className:"py-8 text-center text-xs text-[var(--muted-foreground)]",children:"queued"===a.status||"running"===a.status?"Starting run...":"No thread messages yet."}):(0,b.jsxs)("div",{className:"mx-auto max-w-4xl space-y-8",children:[e.map(c=>{let d=c.participantId?n.get(c.participantId):null,e=(0,s.stripMarkers)(c.content);if(!e.trim())return null;let f=c.participantId??a.agentId;return(0,b.jsxs)("div",{className:"flex gap-3",children:["user"===c.role?(0,b.jsx)("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-[var(--app-shell-subtle,var(--card-bg))]",children:(0,b.jsx)(o.User,{className:"h-3.5 w-3.5 text-[var(--muted-foreground)]"})}):(0,b.jsx)("img",{src:C(f,d?.color),alt:d?.name??a.agentName,className:"h-7 w-7 shrink-0 rounded-full object-cover"}),(0,b.jsxs)("div",{className:"min-w-0 flex-1 flex flex-col gap-1.5",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("div",{className:"flex items-center gap-2",children:"user"===c.role?(0,b.jsx)("span",{className:"text-sm font-semibold text-[var(--foreground)]",children:"You"}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"text-sm font-semibold",style:{color:d?.color??"var(--foreground)"},children:d?.name??a.agentName}),(0,b.jsx)("span",{className:"rounded bg-[var(--card-bg)] px-1.5 py-0.5 text-[10px] font-bold uppercase tracking-wider text-[var(--muted-foreground)]",children:"Agent"})]})}),(0,b.jsx)("span",{className:"text-xs text-[var(--muted-foreground)]",children:new Date(c.timestamp).toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})})]}),"user"===c.role?(0,b.jsx)("div",{className:"w-fit max-w-[85%] rounded-xl rounded-tl-sm border border-[var(--card-border)] bg-[var(--card-bg)] px-4 py-3 text-sm text-[var(--foreground)]",children:(0,b.jsx)(r.Markdown,{content:e,isUser:!0})}):(0,b.jsx)("div",{className:"text-sm text-[var(--foreground)]",children:(0,b.jsx)(r.Markdown,{content:e,isUser:!1})})]})]},c.id)}),Object.entries(l).filter(([,b])=>!a.rootMessageId||b.rootMessageId===a.rootMessageId).map(([c])=>{let d=n.get(c);return(0,b.jsxs)("div",{className:"flex items-center gap-3 text-sm text-[var(--muted-foreground)]",children:[(0,b.jsx)("img",{src:C(c,d?.color),alt:d?.name??a.agentName,className:"h-7 w-7 shrink-0 rounded-full object-cover"}),d?.name??a.agentName," is thinking..."]},`stream-${c}`)})]})}),(0,b.jsx)("div",{className:"absolute bottom-3 left-3 right-3 p-2",children:a.rootMessageId?(0,b.jsx)(A,{onSend:w,onStop:j,participants:d,projectSlug:a.projectSlug??void 0,loading:"ready"!==v,commands:[],activityStatus:v,placeholder:"Steer this run...",initialPinnedParticipantId:a.agentId}):(0,b.jsx)("div",{className:"px-2 py-1 text-xs text-[var(--muted-foreground)]",children:"Waiting for the run to start..."})})]})}function K({issue:a,selected:d,onSelect:e,onExecute:f}){let[h,i]=(0,c.useState)(!1),l=(0,c.useRef)(null);(0,c.useEffect)(()=>()=>{l.current&&window.clearTimeout(l.current)},[]);let m=(0,c.useCallback)(async b=>{if(b.stopPropagation(),a.url)try{await navigator.clipboard.writeText(a.url),i(!0),l.current&&window.clearTimeout(l.current),l.current=window.setTimeout(()=>{i(!1)},1500)}catch(a){console.error("Failed to copy Linear issue URL:",a),i(!1)}},[a.url]),n=E[a.status]??a.status.slice(0,6);return(0,b.jsxs)("div",{className:`group relative flex items-center gap-3 px-4 py-2.5 text-sm transition-colors ${d?"bg-[var(--card-bg)]":"hover:bg-[var(--card-bg)]/50"}`,onClick:e,role:"button",tabIndex:0,onKeyDown:a=>{("Enter"===a.key||" "===a.key)&&(a.preventDefault(),e())},children:[d&&(0,b.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-[3px] rounded-r-full bg-blue-500"}),(0,b.jsx)("span",{className:"w-24 shrink-0 whitespace-nowrap font-mono text-xs text-[var(--muted-foreground)]",children:a.identifier}),(0,b.jsx)("span",{className:`min-w-0 flex-1 truncate text-xs ${d?"font-medium text-[var(--foreground)]":"text-[var(--muted-foreground)]"}`,children:a.title}),(0,b.jsx)("span",{className:"shrink-0 text-xs text-[var(--muted-foreground)]",children:n}),(0,b.jsx)("button",{type:"button",className:`flex h-6 w-6 shrink-0 items-center justify-center rounded text-[var(--muted-foreground)] transition-all hover:bg-zinc-700 hover:text-[var(--foreground)] ${d?"opacity-100":"opacity-0 group-hover:opacity-100"} ${a.url?"":"cursor-not-allowed opacity-40 hover:bg-transparent hover:text-[var(--muted-foreground)]"}`,onClick:a=>{m(a)},title:h?"Copied ticket URL":"Copy ticket URL","aria-label":h?"Copied ticket URL":"Copy ticket URL",disabled:!a.url,children:h?(0,b.jsx)(g.Check,{size:10,className:"text-emerald-400"}):(0,b.jsx)(j,{size:10})}),(0,b.jsx)("button",{type:"button",className:`flex h-6 w-6 shrink-0 items-center justify-center rounded text-[var(--muted-foreground)] transition-all hover:bg-zinc-700 hover:text-[var(--foreground)] ${d?"opacity-100":"opacity-0 group-hover:opacity-100"}`,onClick:b=>{b.stopPropagation(),f(a,b)},title:"Execute with agent",children:(0,b.jsx)(k.Play,{size:10,className:"ml-0.5"})})]})}function L({projectId:a,projectSlug:d,initialShowSettings:e}){let{connected:f,loading:g,user:h,clis:i,mcpConfigured:j,connect:o,connectWithKey:p,disconnect:q,configureMcp:r}=function(){let[a,b]=(0,c.useState)(!1),[d,e]=(0,c.useState)(!0),[f,g]=(0,c.useState)(null),[h,i]=(0,c.useState)({claude:!1,codex:!1,gemini:!1}),[j,k]=(0,c.useState)({}),l=(0,c.useRef)(null),m=(0,c.useCallback)(async()=>{try{let a=await fetch("/api/linear/mcp-setup"),b=await a.json();k(b.configured??{})}catch{}},[]),n=(0,c.useCallback)(async()=>{try{let[a,c]=await Promise.all([fetch("/api/linear/status"),fetch("/api/linear/mcp-setup")]),d=await a.json(),e=await c.json();return b(d.connected),g(d.user??null),i(d.clis??{claude:!1,codex:!1,gemini:!1}),k(e.configured??{}),d.connected}catch{return b(!1),!1}finally{e(!1)}},[]);(0,c.useEffect)(()=>(n(),()=>{l.current&&clearInterval(l.current)}),[n]);let o=(0,c.useCallback)(()=>{window.open("/api/linear/auth","_blank","noopener"),l.current&&clearInterval(l.current),l.current=setInterval(async()=>{await n()&&l.current&&(clearInterval(l.current),l.current=null)},2e3)},[n]),p=(0,c.useCallback)(async a=>{try{let b=await fetch("/api/linear/token",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accessToken:a})});if(!b.ok){let a=await b.json().catch(()=>({}));return{ok:!1,error:a.error||"Failed to save token"}}return await n(),{ok:!0}}catch{return{ok:!1,error:"Failed to connect"}}},[n]);return{connected:a,loading:d,user:f,clis:h,mcpConfigured:j,connect:o,connectWithKey:p,disconnect:(0,c.useCallback)(async()=>{await fetch("/api/linear/status",{method:"DELETE"}),b(!1),g(null)},[]),configureMcp:(0,c.useCallback)(async a=>{try{let b=await fetch("/api/linear/mcp-setup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cli:a})});if(!b.ok){let a=await b.json().catch(()=>({}));return{ok:!1,error:a.error||"Failed to configure MCP"}}return await m(),{ok:!0}}catch{return{ok:!1,error:"Failed to configure MCP"}}},[m]),refresh:n}}(),[s,t]=(0,c.useState)(!1),[u,w]=(0,c.useState)(e??!1),[x,y]=(0,c.useState)(576),[A,E]=(0,c.useState)(224),[F,G]=(0,c.useState)(""),[L,M]=(0,c.useState)(""),[N,O]=(0,c.useState)([]),[P,Q]=(0,c.useState)([]),[R,S]=(0,c.useState)(""),[T,U]=(0,c.useState)([]),[V,W]=(0,c.useState)(""),[X,Y]=(0,c.useState)(""),[Z,$]=(0,c.useState)(null),[_,aa]=(0,c.useState)(null),[ab,ac]=(0,c.useState)([]),[ad,ae]=(0,c.useState)(null),[af,ag]=(0,c.useState)(null),ah=(0,c.useRef)(null),ai=(0,c.useCallback)(a=>{G(a),ah.current&&clearTimeout(ah.current),ah.current=setTimeout(()=>M(a),300)},[]);(0,c.useEffect)(()=>()=>{ah.current&&clearTimeout(ah.current)},[]),(0,c.useEffect)(()=>{if(!f)return;let a=!1;return fetch("/api/linear/options").then(a=>a.json()).then(b=>{a||(O(Array.isArray(b.assignees)?b.assignees:[]),Q(Array.isArray(b.teams)?b.teams:[]),U(Array.isArray(b.cycles)?b.cycles:[]))}).catch(()=>{a||(O([]),Q([]),U([]))}),()=>{a=!0}},[f]),(0,c.useEffect)(()=>{R&&!N.some(a=>a.id===R)&&S("")},[N,R]),(0,c.useEffect)(()=>{P.length<=1&&X?Y(""):X&&!P.some(a=>a.id===X)&&Y("")},[X,P]),(0,c.useEffect)(()=>{V&&!T.some(a=>a.id===V)&&W("")},[T,V]);let{issues:aj,loading:ak,hasMore:al,loadMore:am,refresh:an}=function(a,b=!0,d={}){let[e,f]=(0,c.useState)([]),[g,h]=(0,c.useState)(!0),[i,j]=(0,c.useState)(null),[k,l]=(0,c.useState)(!1),m=(0,c.useRef)(i),n=(0,c.useRef)(!1);m.current=i,(0,c.useEffect)(()=>{n.current=!1},[d.projectSlug]);let o=(0,c.useCallback)(async(c,e=!1)=>{if(b){h(!0);try{let b=new URLSearchParams;a.teamId&&b.set("teamId",a.teamId),a.status&&b.set("status",a.status),a.search&&b.set("search",a.search),a.assigneeId?b.set("assigneeId",a.assigneeId):a.assignedToMe&&b.set("assignedToMe","true"),a.cycleId&&b.set("cycleId",a.cycleId),c&&m.current&&b.set("cursor",m.current),d.projectSlug&&b.set("projectSlug",d.projectSlug),d.limit&&b.set("limit",String(d.limit)),e&&b.set("refresh","true");let g=await fetch(`/api/linear/issues?${b.toString()}`),h=await g.json(),i=h.issues??[];f(a=>c?[...a,...i]:i),j(h.pageInfo?.endCursor??null),l(h.pageInfo?.hasNextPage??!1),n.current=!0}catch{c||f([])}finally{h(!1)}}},[a.teamId,a.status,a.search,a.assigneeId,a.assignedToMe,a.cycleId,b,d.projectSlug,d.limit]);return(0,c.useEffect)(()=>{j(null),o(!1,!n.current)},[o]),{issues:e,loading:g,hasMore:k,loadMore:(0,c.useCallback)(()=>o(!0),[o]),refresh:(0,c.useCallback)(()=>(j(null),o(!1,!0)),[o])}}((0,c.useMemo)(()=>({search:L||void 0,assigneeId:R||void 0,teamId:X||void 0,cycleId:V||void 0}),[L,R,V,X]),f,{projectSlug:d}),{runs:ao,loading:ap,createRun:aq,updateRun:ar}=function(a,b){let[d,e]=(0,c.useState)([]),[f,g]=(0,c.useState)(!1),h=(0,c.useRef)(a??null);h.current=a??null;let i=(0,c.useCallback)(async()=>{let a=h.current?.trim();if(!a)return e([]),[];g(!0);try{let c=new URLSearchParams({issueId:a});b&&c.set("projectId",b);let d=await fetch(`/api/linear/runs?${c.toString()}`);if(!d.ok)throw Error(`Failed to fetch Linear runs: ${d.status}`);let f=await d.json(),g=Array.isArray(f.runs)?f.runs:[];return e(g),g}finally{g(!1)}},[b]);return(0,c.useEffect)(()=>{e([]),i()},[i,a]),(0,c.useEffect)(()=>{if(!a)return;let b=window.setInterval(()=>{i()},3e3);return()=>window.clearInterval(b)},[a,i]),{runs:d,loading:f,refresh:i,createRun:(0,c.useCallback)(async a=>{let b=await fetch("/api/linear/runs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!b.ok)throw Error((await b.json().catch(()=>({}))).error||`Failed to create Linear run: ${b.status}`);let c=(await b.json()).run;return e(a=>[c,...a.filter(a=>a.id!==c.id)]),c},[]),updateRun:(0,c.useCallback)(async(a,b)=>{let c=await fetch(`/api/linear/runs/${encodeURIComponent(a)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(b)});if(!c.ok)throw Error((await c.json().catch(()=>({}))).error||`Failed to update Linear run: ${c.status}`);let d=(await c.json()).run;return e(a=>a.map(a=>a.id===d.id?d:a)),d},[])}}(Z?.id,a??null),as=ao.find(a=>a.id===_)??null,at=(0,c.useMemo)(()=>[{value:"",label:"Assignee"},...N.map(a=>({value:a.id,label:a.name}))],[N]),au=(0,c.useMemo)(()=>[{value:"",label:"Workspace"},...P.map(a=>({value:a.id,label:a.name}))],[P]),av=(0,c.useMemo)(()=>[{value:"",label:"Cycle"},...T.map(a=>({value:a.id,label:a.name||`Cycle ${a.number}`}))],[T]),aw=av.length>1,ax=au.length>2;(0,c.useEffect)(()=>{0===aj.length?$(null):$(a=>a&&aj.some(b=>b.id===a.id)?aj.find(b=>b.id===a.id)??a:aj[0]??null)},[aj]),(0,c.useEffect)(()=>{0===ao.length?aa(null):_&&ao.some(a=>a.id===_)||aa(ao[0]?.id??null)},[ao,_]),(0,c.useEffect)(()=>{let b=!1;return async function(){try{let c=await fetch("/api/participants"),d=c.ok?await c.json():[];if(!a){b||ac(d);return}let e=await fetch(`/api/projects/${encodeURIComponent(a)}/agents`);if(!e.ok){b||ac(d);return}let f=await e.json(),g=Array.isArray(f.agents)?f.agents.map(a=>a.agent_id).filter(a=>"string"==typeof a&&a.trim().length>0):[],h=new Map(g.map((a,b)=>[a,b])),i=d.filter(a=>h.has(a.id)).sort((a,b)=>(h.get(a.id)??Number.MAX_SAFE_INTEGER)-(h.get(b.id)??Number.MAX_SAFE_INTEGER));b||ac(i)}catch{b||ac([])}}(),()=>{b=!0}},[a]);let ay=(0,c.useCallback)((a,b)=>{if(0===ab.length)return void window.alert("Add at least one agent to this project before running a Linear ticket.");if(1===ab.length)return void az(a,ab[0]);let c=b?.currentTarget?.getBoundingClientRect();ae(a),ag(c?{top:c.bottom+4,left:c.left}:{top:200,left:200})},[ab]),az=(0,c.useCallback)(async(b,c)=>{ae(null),ag(null);let e=null;try{$(b),e=await aq({projectId:a??null,projectSlug:d??null,issueId:b.id,issueIdentifier:b.identifier,issueTitle:b.title,issueStatus:b.status,issueAssignee:b.assignee,agentId:c.id,agentName:c.name}),aa(e.id);let{prompt:f,promptPrefix:g}=v({issue:{identifier:b.identifier,title:b.title,status:b.status,assignee:b.assignee},project:d?{slug:d}:null}),h=await fetch("/api/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:f,promptPrefix:g,threadId:e.threadId,activeParticipantIds:[c.id],projectSlug:d??void 0})}),i=await h.json().catch(()=>({}));if(!h.ok||!i.chatRunId||!i.userMessageId)throw Error(i.error||"Failed to start Linear run");await ar(e.id,{chatRunId:i.chatRunId,rootMessageId:i.userMessageId})}catch(a){console.error("Failed to execute Linear ticket:",a),e&&await ar(e.id,{status:"failed",error:a instanceof Error?a.message:String(a)}),a instanceof Error&&window.alert(a.message)}},[aq,a,d,ar]),aA=(0,c.useRef)(null);if((0,c.useEffect)(()=>{let a=aA.current;if(!a||!al)return;let b=new IntersectionObserver(a=>{a[0]?.isIntersecting&&am()},{threshold:.1});return b.observe(a),()=>b.disconnect()},[al,am]),g)return(0,b.jsx)("div",{className:"flex h-full items-center justify-center text-xs text-[var(--muted-foreground)]",children:"Loading..."});let aB=f&&!s&&!Object.values(j).some(Boolean);return!f||aB?(0,b.jsx)(z,{connected:f,user:h,clis:i,mcpConfigured:j,onConnect:o,onConnectWithKey:p,onDisconnect:q,onConfigureMcp:r,onContinue:()=>t(!0)}):(0,b.jsxs)("div",{className:"relative flex h-full overflow-hidden",children:[(0,b.jsxs)("div",{className:"flex shrink-0 flex-col border-r border-[var(--card-border)]",style:{width:x},children:[(0,b.jsxs)("div",{className:"shrink-0 border-b border-[var(--card-border)]",children:[(0,b.jsxs)("div",{className:"flex h-12 items-center gap-2 px-3",children:[(0,b.jsxs)("div",{className:"flex flex-1 items-center gap-2 rounded-md border border-[var(--card-border)] bg-[var(--background)] px-2.5 py-1.5 transition-all focus-within:border-[var(--muted-foreground)] focus-within:ring-1 focus-within:ring-[var(--muted-foreground)]",children:[(0,b.jsx)(m.Search,{size:14,className:"shrink-0 text-[var(--muted-foreground)]"}),(0,b.jsx)("input",{type:"text",className:"flex-1 bg-transparent text-sm outline-none placeholder:text-[var(--muted-foreground)]",placeholder:"Search tickets...",value:F,onChange:a=>ai(a.target.value)})]}),(0,b.jsx)("button",{type:"button",className:"shrink-0 rounded p-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--card-bg)] hover:text-[var(--foreground)] disabled:cursor-not-allowed disabled:opacity-50",onClick:()=>void an(),title:"Refresh tickets","aria-label":"Refresh tickets",disabled:ak,children:(0,b.jsx)(l.RefreshCw,{size:16,className:ak?"animate-spin":void 0})}),(0,b.jsx)("button",{type:"button",className:"shrink-0 rounded p-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--card-bg)] hover:text-[var(--foreground)]",onClick:()=>w(!0),title:"Linear settings",children:(0,b.jsx)(n.Settings,{size:16})})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1.5 px-3 pb-2",children:[(0,b.jsx)(H,{label:"Assignee",value:R,options:at,activeClasses:"border-blue-500/30 bg-blue-500/10 text-blue-400",onChange:S}),ax?(0,b.jsx)(H,{label:"Workspace",value:X,options:au,activeClasses:"border-emerald-500/30 bg-emerald-500/10 text-emerald-400",onChange:Y}):null,aw?(0,b.jsx)(H,{label:"Cycle",value:V,options:av,activeClasses:"border-purple-500/30 bg-purple-500/10 text-purple-400",onChange:W}):null]})]}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto",children:ak&&0===aj.length?(0,b.jsx)("div",{className:"px-3 py-4 text-xs text-[var(--muted-foreground)]",children:"Loading tickets..."}):0===aj.length?(0,b.jsx)("div",{className:"px-3 py-4 text-xs text-[var(--muted-foreground)]",children:"No tickets found."}):(0,b.jsxs)(b.Fragment,{children:[aj.map(a=>(0,b.jsx)(K,{issue:a,selected:Z?.id===a.id,onSelect:()=>$(a),onExecute:ay},a.id)),al?(0,b.jsx)("div",{ref:aA,className:"py-2 text-center text-xs text-[var(--muted-foreground)]",children:ak?"Loading...":"Load more"}):null]})})]}),(0,b.jsx)(B,{onResize:a=>y(b=>Math.max(180,Math.min(600,b+a)))}),(0,b.jsxs)("div",{className:"flex shrink-0 flex-col border-r border-[var(--card-border)]",style:{width:A},children:[(0,b.jsxs)("div",{className:"flex items-center justify-between border-b border-[var(--card-border)] px-3 py-2",children:[(0,b.jsx)("h3",{className:"text-xs font-semibold text-[var(--foreground)]",children:"Runs"}),Z&&(0,b.jsxs)("button",{type:"button",className:"flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium text-[var(--muted-foreground)] transition-colors hover:bg-[var(--card-bg)] hover:text-[var(--foreground)]",onClick:a=>ay(Z,a),title:"Run agent on selected ticket",children:[(0,b.jsx)(k.Play,{size:10}),(0,b.jsx)("span",{children:"Run now"})]})]}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto",children:Z?ap&&0===ao.length?(0,b.jsx)("div",{className:"px-3 py-4 text-xs text-[var(--muted-foreground)]",children:"Loading runs..."}):0===ao.length?(0,b.jsxs)("div",{className:"px-3 py-4 text-xs text-[var(--muted-foreground)]",children:["No runs yet. Click ",(0,b.jsx)(k.Play,{size:10,className:"inline"})," to execute."]}):ao.map(a=>(0,b.jsxs)("button",{type:"button",className:`w-full px-3 py-2 text-left text-xs transition-colors ${as?.id===a.id?"bg-[var(--card-bg)]":"hover:bg-[var(--card-bg)]"}`,onClick:()=>aa(a.id),children:[(0,b.jsxs)("div",{className:"flex items-center justify-between gap-1",children:[(0,b.jsx)("span",{className:`font-medium ${{queued:"text-amber-500",running:"text-yellow-500",success:"text-green-500",failed:"text-red-500",cancelled:"text-[var(--muted-foreground)]"}[a.status]}`,children:D(a.status)}),(0,b.jsx)("span",{className:"text-[10px] text-[var(--muted-foreground)]",children:new Date(a.startedAt).toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})})]}),(0,b.jsx)("div",{className:"mt-0.5 truncate text-[10px] text-[var(--muted-foreground)]",children:a.agentName}),null!=a.durationMs?(0,b.jsxs)("div",{className:"text-[10px] text-[var(--muted-foreground)]",children:[(a.durationMs/1e3).toFixed(1),"s"]}):null]},a.id)):(0,b.jsx)("div",{className:"px-3 py-4 text-xs text-[var(--muted-foreground)]",children:"Select a ticket to see runs."})})]}),(0,b.jsx)(B,{onResize:a=>E(b=>Math.max(140,Math.min(500,b+a)))}),(0,b.jsx)("div",{className:"flex min-w-0 flex-1 flex-col overflow-hidden",children:as?(0,b.jsx)(J,{run:as,participants:ab}):Z&&ab.length>0?(0,b.jsx)(I,{issue:Z,participants:ab,projectId:a,projectSlug:d,createRun:aq,updateRun:ar,onRunCreated:a=>aa(a)},Z.id):(0,b.jsx)("div",{className:"flex h-full items-center justify-center text-xs text-[var(--muted-foreground)]",children:Z?"Add at least one agent to this project to chat.":"Select a ticket from the list."})}),u&&(0,b.jsx)("div",{className:"absolute inset-0 z-30 flex items-center justify-center bg-black/50",children:(0,b.jsxs)("div",{className:"relative w-full max-w-lg rounded-lg border border-[var(--card-border)] bg-[var(--background)] shadow-xl",children:[(0,b.jsx)("button",{type:"button",className:"absolute right-3 top-3 rounded p-1 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--card-bg)] hover:text-[var(--foreground)]",onClick:()=>w(!1),children:"×"}),(0,b.jsx)("div",{className:"p-6",children:(0,b.jsx)(z,{connected:f,user:h,clis:i,mcpConfigured:j,onConnect:o,onConnectWithKey:p,onDisconnect:q,onConfigureMcp:r,onContinue:()=>w(!1)})})]})}),ad&&af&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"fixed inset-0 z-40",onClick:()=>{ae(null),ag(null)}}),(0,b.jsxs)("div",{className:"fixed z-50 min-w-[180px] rounded border border-[var(--card-border)] bg-[var(--card-bg)] py-1 shadow-lg",style:{top:af.top,left:af.left},children:[(0,b.jsx)("div",{className:"px-3 py-1.5 text-[10px] font-semibold uppercase tracking-wider text-[var(--muted-foreground)]",children:"Pick an agent"}),ab.map(a=>(0,b.jsxs)("button",{type:"button",className:"flex w-full items-center gap-2 px-3 py-1.5 text-left text-xs transition-colors hover:bg-[var(--card-bg)]",onClick:()=>void az(ad,a),children:[(0,b.jsx)("img",{src:C(a.id,a.color,20),alt:"",className:"h-5 w-5 shrink-0 rounded-full"}),(0,b.jsxs)("span",{className:"flex flex-col",children:[(0,b.jsx)("span",{className:"font-medium text-[var(--foreground)]",children:a.name}),a.title?(0,b.jsx)("span",{className:"text-[10px] text-[var(--muted-foreground)]",children:a.title}):null]})]},a.id))]})]})]})}function M({params:a}){let{slug:f}=(0,c.use)(a),g=(0,d.useSearchParams)(),{projects:h}=(0,e.useProjects)(),i=h.find(a=>a.slug===f),j="true"===g.get("settings");return(0,b.jsx)(L,{projectId:i?.id,projectSlug:i?.slug??f,initialShowSettings:j})}a.s(["default",()=>M],323860)}];
38
+
39
+ //# sourceMappingURL=app_projects_%5Bslug%5D_linear_page_tsx_971a6ba7._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[27346,(a,b,c)=>{}];
1
+ module.exports=[227346,(a,b,c)=>{}];
2
2
 
3
3
  //# sourceMappingURL=ce889_server_app_projects_%5Bslug%5D_thread_%5BthreadId%5D_page_actions_660a8857.js.map
@@ -0,0 +1,8 @@
1
+ module.exports=[877214,a=>{"use strict";var b=a.i(187924),c=a.i(572131),d=a.i(819721),e=a.i(325015),f=a.i(781560),g=a.i(915618),h=a.i(633508),i=a.i(641710),j=a.i(80386),k=a.i(669520),l=a.i(405784),m=a.i(165385),n=a.i(501027),o=a.i(883706);let p=(0,o.default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),q=(0,o.default)("calendar-days",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]),r=(0,o.default)("repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]]);var s=a.i(699464),t=a.i(400210),u=a.i(546842),v=a.i(808406),w=a.i(331748),x=a.i(204301),y=a.i(815682),z=a.i(194125),A=a.i(356283);let B=(0,d.default)(async()=>{},{loadableGenerated:{modules:[895214]},ssr:!1}),C=(0,d.default)(async()=>{},{loadableGenerated:{modules:[632077]},ssr:!1});function D(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 E(a){if(!a)return"—";let b=new Date(a);return b.toLocaleDateString("en-US",{month:"short",day:"numeric"})+", "+b.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"})}function F({state:a}){let c={active:"text-green-400 bg-green-400/10 border-green-400/20",paused:"text-amber-400 bg-amber-400/10 border-amber-400/20",stopped:"text-[var(--muted-foreground)] bg-[var(--muted)] border-[var(--card-border)]"};return(0,b.jsx)("span",{className:`text-[10px] font-semibold uppercase tracking-wider px-2 py-0.5 rounded-md border ${c[a]??c.stopped}`,children:a})}let G={active:"bg-emerald-400",paused:"bg-amber-400",stopped:"bg-zinc-500"},H={success:"bg-emerald-400",failed:"bg-red-400",cancelled:"bg-zinc-500",running:"bg-sky-400",queued:"bg-amber-400"},I=[{label:"Sun",short:"S",value:0},{label:"Mon",short:"M",value:1},{label:"Tue",short:"T",value:2},{label:"Wed",short:"W",value:3},{label:"Thu",short:"T",value:4},{label:"Fri",short:"F",value:5},{label:"Sat",short:"S",value:6}];function J(a,b,c,d,e){switch(a){case"hourly":return`${c} * * * *`;case"daily":default:return`${c} ${b} * * *`;case"weekly":return`${c} ${b} * * ${d.sort().join(",")}`;case"monthly":return`${c} ${b} ${e} * *`}}function K(a,b,c,d,e){let f=parseInt(b),g=`${f%12||12}:${c} ${f>=12?"PM":"AM"}`;switch(a){case"hourly":return`Every hour at :${c}`;case"daily":default:return`Every day at ${g}`;case"weekly":{let a=d.sort().map(a=>I.find(b=>b.value===a).label);return`${g} on ${a.join(", ")}`}case"monthly":let h,i;return`${e}${(h=["th","st","nd","rd"])[((i=e%100)-20)%10]||h[i]||h[0]} of every month at ${g}`}}function L({value:a,onChange:d}){let[e,f]=(0,c.useState)("daily"),[g,h]=(0,c.useState)("09"),[j,k]=(0,c.useState)("00"),[l,m]=(0,c.useState)([1,2,3,4,5]),[n,o]=(0,c.useState)(1);(0,c.useEffect)(()=>{d(J(e,g,j,l,n),K(e,g,j,l,n))},[e,g,j,l,n]);let s=(a,c,d)=>(0,b.jsxs)("button",{type:"button",onClick:()=>f(a),className:`flex flex-col items-center justify-center p-2.5 rounded-xl border transition-all text-[11px] font-medium ${e===a?"border-[var(--foreground)] bg-[var(--foreground)]/5 text-[var(--foreground)]":"border-[var(--card-border)] bg-[var(--muted)] text-[var(--muted-foreground)] hover:border-[var(--muted-foreground)]"}`,children:[(0,b.jsx)(d,{size:16}),(0,b.jsx)("span",{className:"mt-1",children:c})]},a),t="bg-[var(--muted)] border border-[var(--card-border)] rounded-lg px-2 py-1.5 text-sm font-medium text-[var(--foreground)] focus:outline-none focus:border-[var(--foreground)] transition-colors";return(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"grid grid-cols-4 gap-2",children:[s("hourly","Hourly",r),s("daily","Daily",i.Clock),s("weekly","Weekly",q),s("monthly","Monthly",p)]}),"hourly"!==e?(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-[10px] font-semibold text-[var(--muted-foreground)] uppercase tracking-widest mb-1.5",children:"Time"}),(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsx)("select",{value:g,onChange:a=>h(a.target.value),className:t,children:Array.from({length:24}).map((a,c)=>{let d=c.toString().padStart(2,"0");return(0,b.jsx)("option",{value:d,children:d},d)})}),(0,b.jsx)("span",{className:"text-sm font-bold text-[var(--muted-foreground)]",children:":"}),(0,b.jsx)("select",{value:j,onChange:a=>k(a.target.value),className:t,children:["00","05","10","15","20","25","30","35","40","45","50","55"].map(a=>(0,b.jsx)("option",{value:a,children:a},a))}),(0,b.jsx)("span",{className:"ml-1.5 text-[10px] text-[var(--muted-foreground)]",children:parseInt(g)>=12?"PM":"AM"})]})]}):(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-[10px] font-semibold text-[var(--muted-foreground)] uppercase tracking-widest mb-1.5",children:"At minute"}),(0,b.jsx)("select",{value:j,onChange:a=>k(a.target.value),className:t,children:["00","05","10","15","20","25","30","35","40","45","50","55"].map(a=>(0,b.jsxs)("option",{value:a,children:[":",a]},a))})]}),"weekly"===e&&(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-[10px] font-semibold text-[var(--muted-foreground)] uppercase tracking-widest mb-1.5",children:"Repeat on"}),(0,b.jsx)("div",{className:"flex gap-1.5",children:I.map(a=>(0,b.jsx)("button",{type:"button",onClick:()=>{let b;return b=a.value,m(a=>a.includes(b)?a.filter(a=>a!==b):[...a,b])},className:`size-8 rounded-full flex items-center justify-center text-[10px] font-bold transition-all ${l.includes(a.value)?"bg-[var(--foreground)] text-[var(--background)]":"bg-[var(--muted)] text-[var(--muted-foreground)] hover:bg-[var(--card-border)]"}`,children:a.label[0]},a.value))})]}),"monthly"===e&&(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-[10px] font-semibold text-[var(--muted-foreground)] uppercase tracking-widest mb-1.5",children:"On day"}),(0,b.jsx)("div",{className:"grid grid-cols-7 gap-1",children:Array.from({length:31}).map((a,c)=>{let d=c+1;return(0,b.jsx)("button",{type:"button",onClick:()=>o(d),className:`size-7 rounded-lg flex items-center justify-center text-[10px] font-medium transition-all ${n===d?"bg-[var(--foreground)] text-[var(--background)]":"bg-[var(--muted)] text-[var(--muted-foreground)] hover:bg-[var(--card-border)]"}`,children:d},d)})})]}),(0,b.jsxs)("div",{className:"px-3 py-2 rounded-lg bg-[var(--muted)] border border-[var(--card-border)]",children:[(0,b.jsx)("div",{className:"text-[10px] text-[var(--muted-foreground)] mb-0.5",children:"Schedule"}),(0,b.jsx)("div",{className:"text-xs font-medium text-[var(--foreground)]",children:K(e,g,j,l,n)}),(0,b.jsx)("div",{className:"text-[10px] font-mono text-[var(--muted-foreground)] mt-0.5",children:J(e,g,j,l,n)})]})]})}let M=[{label:"1 min",ms:6e4},{label:"5 min",ms:3e5},{label:"15 min",ms:9e5},{label:"30 min",ms:18e5},{label:"1 hour",ms:36e5}];function N({children:a}){return(0,b.jsx)("label",{className:"block text-[10px] font-semibold text-[var(--muted-foreground)] uppercase tracking-widest mb-2",children:a})}function O(a,b,c=24){let d=b?b.replace("#",""):"e2e8f0";return`https://api.dicebear.com/9.x/bottts-neutral/svg?seed=${encodeURIComponent(a)}&size=${c}&backgroundColor=${d}`}function P({agents:a,value:d,onChange:e}){let[f,g]=(0,c.useState)(!1),h=a.find(a=>a.id===d);return(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(N,{children:"Agent"}),(0,b.jsxs)("button",{type:"button",onClick:()=>g(!f),className:"w-full flex items-center gap-2.5 px-3 py-2.5 rounded-lg border border-[var(--card-border)] bg-[var(--muted)] text-left transition-colors hover:border-[var(--muted-foreground)]",children:[h?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("img",{src:O(h.id,h.color),alt:"",className:"size-6 rounded-full shrink-0"}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)("div",{className:"text-xs font-medium text-[var(--foreground)] truncate",children:h.name}),(0,b.jsxs)("div",{className:"text-[10px] text-[var(--muted-foreground)]",children:[h.provider,h.model?` / ${h.model}`:""]})]})]}):(0,b.jsx)("span",{className:"text-xs text-[var(--muted-foreground)]",children:"Select an agent..."}),(0,b.jsx)(l.ChevronDown,{size:14,className:`ml-auto text-[var(--muted-foreground)] transition-transform ${f?"rotate-180":""}`})]}),f&&(0,b.jsx)("div",{className:"absolute z-20 mt-1 w-full rounded-lg border border-[var(--card-border)] bg-[var(--card-bg)] shadow-lg max-h-[280px] overflow-y-auto",children:a.map(a=>(0,b.jsxs)("button",{type:"button",onClick:()=>{e(a.id),g(!1)},className:`w-full flex items-center gap-2.5 px-3 py-2.5 text-left transition-colors hover:bg-[var(--muted)] ${d===a.id?"bg-[var(--muted)]":""}`,children:[(0,b.jsx)("img",{src:O(a.id,a.color),alt:"",className:"size-6 rounded-full shrink-0"}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)("div",{className:"text-xs font-medium text-[var(--foreground)] truncate",children:a.name}),(0,b.jsxs)("div",{className:"text-[10px] text-[var(--muted-foreground)]",children:[a.provider,a.model?` / ${a.model}`:""]})]}),d===a.id&&(0,b.jsx)("span",{className:"text-xs text-[var(--foreground)]",children:"✓"})]},a.id))})]})}function Q({onClose:a,onSubmit:d,editingJob:e}){let[f,g]=(0,c.useState)([]),[i,j]=(0,c.useState)(e?.name??""),[k,o]=(0,c.useState)(e?.prompt??""),[q,r]=(0,c.useState)(e?.agentId??""),[s,t]=(0,c.useState)(e?.provider??"claude"),[u,v]=(0,c.useState)(e?.model??"");(0,c.useEffect)(()=>{fetch("/api/prompt-jobs/agents").then(a=>a.json()).then(a=>g(a.agents??[])).catch(()=>{})},[]);let[w,x]=(0,c.useState)(e?.cliArgs??""),[y,z]=(0,c.useState)(e?.cadence??""),[A,B]=(0,c.useState)(e?.cadence??""),[D,E]=(0,c.useState)(e?.triggerType??"scheduled"),[F,G]=(0,c.useState)(e?.condition??""),[H,I]=(0,c.useState)(e?.checkEveryMs??3e5),[J,K]=(0,c.useState)(e?.catchUpPolicy??"fire_once"),[O,Q]=(0,c.useState)(!!e?.cliArgs||e?.catchUpPolicy!=null&&"fire_once"!==e.catchUpPolicy),[R,S]=(0,c.useState)(!1),T=async b=>{b.preventDefault(),!i.trim()||!k.trim()||"scheduled"===D&&!y.trim()||("condition"!==D||F.trim())&&(S(!0),await d({name:i.trim(),prompt:k.trim(),agentId:q,provider:s,model:u.trim(),cliArgs:w.trim(),catchUpPolicy:J,cadence:"scheduled"===D?y.trim():"",triggerType:D,condition:F.trim(),checkEveryMs:H}),S(!1),a())},U="w-full bg-[var(--muted)] border border-[var(--card-border)] rounded-lg px-3 py-2 text-sm text-[var(--foreground)] placeholder:text-[var(--muted-foreground)] focus:outline-none focus:border-[var(--foreground)] transition-colors";return(0,b.jsxs)("div",{className:"h-full flex flex-col text-[var(--foreground)]",children:[(0,b.jsxs)("div",{className:"h-14 shrink-0 border-b border-[var(--card-border)] flex items-center justify-between px-6",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)("button",{onClick:a,className:"p-1.5 rounded-md text-[var(--muted-foreground)] hover:text-[var(--foreground)] hover:bg-[var(--muted)] transition-colors",children:(0,b.jsx)(h.X,{size:18})}),(0,b.jsx)("h2",{className:"text-sm font-semibold",children:e?"Edit Prompt Job":"New Prompt Job"})]}),(0,b.jsx)("button",{onClick:T,disabled:R||!i.trim()||!k.trim(),className:"px-5 py-2 rounded-lg text-sm font-medium bg-[var(--foreground)] text-[var(--background)] hover:opacity-90 disabled:opacity-40 transition-opacity",children:R?"Saving...":e?"Save Changes":"Create Job"})]}),(0,b.jsxs)("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[(0,b.jsxs)("div",{className:"flex-1 border-r border-[var(--card-border)] flex flex-col min-w-0",children:[(0,b.jsx)("div",{className:"px-8 pt-8 pb-4",children:(0,b.jsx)("input",{type:"text",value:i,onChange:a=>j(a.target.value),placeholder:"Untitled job",className:"w-full text-2xl font-bold bg-transparent border-none outline-none placeholder:text-[var(--muted-foreground)]/40 text-[var(--foreground)]",autoFocus:!0})}),(0,b.jsxs)("div",{className:"flex-1 px-8 pb-8 overflow-y-auto",children:[(0,b.jsx)(N,{children:"Instructions"}),(0,b.jsx)("div",{className:"bg-[var(--card-bg)] border border-[var(--card-border)] rounded-xl overflow-hidden min-h-[300px]",children:(0,b.jsx)(C,{content:k,onChange:a=>o(a),placeholder:"Describe what this prompt should do..."})})]})]}),(0,b.jsxs)("div",{className:"w-[380px] shrink-0 overflow-y-auto p-6 space-y-6",children:[(0,b.jsx)(P,{agents:f,value:q,onChange:a=>{r(a);let b=f.find(b=>b.id===a);b?(t(b.provider),v(b.model??"")):(t("claude"),v(""))}}),(0,b.jsxs)("div",{children:[(0,b.jsx)(N,{children:"Trigger"}),(0,b.jsxs)("div",{className:"flex rounded-lg border border-[var(--card-border)] overflow-hidden",children:[(0,b.jsxs)("button",{type:"button",onClick:()=>E("scheduled"),className:`flex-1 py-2.5 text-xs font-medium flex items-center justify-center gap-1.5 transition-colors ${"scheduled"===D?"bg-[var(--foreground)] text-[var(--background)]":"bg-[var(--muted)] text-[var(--muted-foreground)] hover:text-[var(--foreground)]"}`,children:[(0,b.jsx)(p,{size:13})," Schedule"]}),(0,b.jsxs)("button",{type:"button",onClick:()=>E("condition"),className:`flex-1 py-2.5 text-xs font-medium flex items-center justify-center gap-1.5 transition-colors ${"condition"===D?"bg-[var(--foreground)] text-[var(--background)]":"bg-[var(--muted)] text-[var(--muted-foreground)] hover:text-[var(--foreground)]"}`,children:[(0,b.jsx)(n.Zap,{size:13})," Condition"]})]})]}),"scheduled"===D?(0,b.jsx)(L,{value:y,onChange:(a,b)=>{z(a),B(b)}}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{children:[(0,b.jsx)(N,{children:"Condition"}),(0,b.jsx)("textarea",{value:F,onChange:a=>G(a.target.value),placeholder:"there are unread emails in my inbox",rows:3,className:`${U} resize-none`}),(0,b.jsx)("p",{className:"text-[10px] text-[var(--muted-foreground)] mt-1.5",children:"The LLM evaluates this as a gate. If true, the prompt runs."})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)(N,{children:"Check frequency"}),(0,b.jsx)("div",{className:"flex flex-wrap gap-1.5",children:M.map(a=>{let c;return(0,b.jsx)("button",{type:"button",onClick:()=>I(a.ms),className:(c=H===a.ms,`px-3 py-1.5 rounded-lg text-xs font-medium border transition-all cursor-pointer ${c?"bg-[var(--foreground)] text-[var(--background)] border-[var(--foreground)]":"bg-[var(--muted)] text-[var(--muted-foreground)] border-[var(--card-border)] hover:border-[var(--muted-foreground)] hover:text-[var(--foreground)]"}`),children:a.label},a.ms)})})]})]}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("button",{type:"button",onClick:()=>Q(!O),className:"flex items-center gap-1.5 text-[11px] text-[var(--muted-foreground)] hover:text-[var(--foreground)] transition-colors",children:[(0,b.jsx)(m.Settings2,{size:12})," ",O?"Hide":"Show"," advanced",(0,b.jsx)(l.ChevronDown,{size:12,className:`transition-transform ${O?"rotate-180":""}`})]}),O&&(0,b.jsxs)("div",{className:"mt-3 space-y-3 pt-3 border-t border-[var(--card-border)]",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)(N,{children:"CLI Arguments"}),(0,b.jsx)("input",{type:"text",value:w,onChange:a=>x(a.target.value),placeholder:"--dangerously-skip-permissions",className:U}),(0,b.jsx)("p",{className:"text-[10px] text-[var(--muted-foreground)] mt-1",children:"Extra flags passed to the CLI command."})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)(N,{children:"When missed"}),(0,b.jsx)("div",{className:"space-y-1.5",children:[{id:"fire_once",label:"Run once on recovery",desc:"Execute a single run regardless of how many were missed"},{id:"replay_all",label:"Run all missed",desc:"Queue one run per missed occurrence (use with caution)"},{id:"skip",label:"Skip and wait for next",desc:"Discard missed runs, wait for the next scheduled time"}].map(a=>(0,b.jsxs)("button",{type:"button",onClick:()=>K(a.id),className:`w-full text-left px-3 py-2 rounded-lg border transition-all ${J===a.id?"border-[var(--foreground)] bg-[var(--foreground)]/5":"border-[var(--card-border)] bg-[var(--muted)] hover:border-[var(--muted-foreground)]"}`,children:[(0,b.jsx)("div",{className:"text-xs font-medium text-[var(--foreground)]",children:a.label}),(0,b.jsx)("div",{className:"text-[10px] text-[var(--muted-foreground)]",children:a.desc})]},a.id))})]})]})]})]})]})]})}function R({run:a,job:d,agentMap:e}){let f=`prompt-run:${a.id}`,g=d.agentId&&e[d.agentId]?e[d.agentId].name:null,h=d.agentId?e[d.agentId]:null,[i,k]=(0,c.useState)(new Set);(0,c.useEffect)(()=>{d.projectId&&fetch(`/api/projects/${encodeURIComponent(d.projectId)}/agents`).then(a=>a.json()).then(a=>{k(new Set((a.agents??[]).map(a=>a.agent_id)))}).catch(()=>{})},[d.projectId]);let l=(0,c.useMemo)(()=>Object.values(e).filter(a=>i.has(a.id)).map(a=>({id:a.id,name:a.name,title:a.title??void 0,provider:a.provider??"claude",model:a.model,color:a.color})),[e,i]),m=(0,c.useMemo)(()=>`run-root:${a.id}`,[a.id]),{messages:n,setMessages:o,sendMessage:p,loadHistory:q,chatRuns:r,stop:s}=(0,w.useGroupChat)(f),{processes:t,streaming:C,chatRuns:D}=(0,x.useProcessPolling)({workspaceId:f,threadId:m},{messages:n,setMessages:o}),E=(0,c.useMemo)(()=>{let a=[...r];for(let b of D)a.some(a=>a.chatRunId===b.chatRunId)||a.push(b);return a},[r,D]),F=E.some(a=>"queued"===a.status||"running"===a.status)||t.some(a=>"spawning"===a.state||"running"===a.state),G=F?E.some(a=>"queued"===a.status)?"queued":"working":"ready",H=(0,c.useRef)(!1);(0,c.useEffect)(()=>{q().then(()=>{if(!H.current){H.current=!0;let b=a.output?`[Automation run output]
2
+
3
+ ${a.output}${a.error?`
4
+
5
+ [Error]
6
+ ${a.error}`:""}`:"[Automation run — no output]";fetch("/api/history",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({threadId:f,messages:[{id:m,role:"assistant",participantId:d.agentId||null,content:b,timestamp:new Date(a.startedAt??a.createdAt).getTime(),rootMessageId:null,parentMessageId:null,depth:0}]})}).catch(()=>{})}})},[q,f,m,a,d.agentId]);let I=(0,c.useRef)(null),J=(0,c.useRef)(null),K=(0,c.useRef)(n.length);(0,c.useEffect)(()=>{n.length>K.current&&J.current?.scrollIntoView({behavior:"smooth"}),K.current=n.length},[n.length]);let L=(0,c.useCallback)((a,b,c,d,e,f,g)=>{let h=(0,A.orderParticipantIds)(Array.from(i),e);p(a,b,void 0,m,c,void 0,h.length>0?h:void 0,void 0,f,g)},[p,i,m]);return(0,b.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col overflow-hidden",children:[(0,b.jsx)("div",{className:"flex items-center justify-between border-b border-[var(--card-border)] px-4 py-2",children:(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsxs)("div",{className:"text-[12px] font-semibold text-[var(--foreground)] truncate",children:["Run ",a.id.slice(0,8)]}),(0,b.jsxs)("div",{className:"text-[10px] text-[var(--muted-foreground)]",children:[a.status," ",null!=a.durationMs&&`\xb7 ${(a.durationMs/1e3).toFixed(1)}s`]})]})}),(0,b.jsx)("div",{ref:I,className:"min-h-0 flex-1 overflow-y-auto px-4 py-3",children:(0,b.jsxs)("div",{className:"space-y-4 max-w-none",children:[a.output&&(0,b.jsxs)("div",{className:"flex gap-2.5",children:[(0,b.jsx)("div",{className:"shrink-0 mt-0.5",children:h?(0,b.jsx)("img",{src:O(d.agentId,h.color,28),alt:"",className:"size-7 rounded-full"}):(0,b.jsx)("div",{className:"flex size-7 items-center justify-center rounded-full bg-[var(--muted)] text-[10px] text-[var(--muted-foreground)]",children:(0,b.jsx)(j.Terminal,{size:12})})}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("div",{className:"mb-1 flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-[11px] font-semibold text-[var(--foreground)]",children:g??d.provider}),(0,b.jsx)("span",{className:"text-[9px] px-1.5 py-0.5 rounded bg-[var(--muted)] text-[var(--muted-foreground)] font-medium uppercase tracking-wider",children:"Run output"})]}),(0,b.jsx)("div",{className:"rounded-lg px-3 py-2 text-[12px] leading-[1.55] bg-[var(--muted)] text-[var(--foreground)]",children:(0,b.jsx)(y.Markdown,{content:a.output})})]})]}),a.error&&(0,b.jsxs)("div",{className:"flex gap-2.5",children:[(0,b.jsx)("div",{className:"shrink-0 mt-0.5",children:(0,b.jsx)("div",{className:"flex size-7 items-center justify-center rounded-full bg-red-500/10 text-[10px] text-red-400",children:"!"})}),(0,b.jsx)("div",{className:"min-w-0 flex-1",children:(0,b.jsx)("div",{className:"rounded-lg px-3 py-2 text-[12px] leading-[1.55] bg-red-500/10 text-red-400",children:(0,b.jsx)("div",{className:"whitespace-pre-wrap break-words",children:a.error})})})]}),!a.output&&!a.error&&(0,b.jsx)("div",{className:"text-center py-12 text-[var(--muted-foreground)] text-sm",children:"queued"===a.status?"Waiting to start...":"running"===a.status?"Running...":"No output captured"}),n.filter(a=>a.id!==m).map(a=>{let c="user"===a.role,f=a.participantId?e[a.participantId]:null,i=f?.name??g??d.provider;return(0,b.jsxs)("div",{className:"flex gap-2.5",children:[(0,b.jsx)("div",{className:"shrink-0 mt-0.5",children:c?(0,b.jsx)("div",{className:"flex size-7 items-center justify-center rounded-full bg-[var(--muted)] text-[var(--muted-foreground)]",children:(0,b.jsx)(u.User,{size:12})}):f?(0,b.jsx)("img",{src:O(f.id,f.color,28),alt:"",className:"size-7 rounded-full"}):h?(0,b.jsx)("img",{src:O(d.agentId,h.color,28),alt:"",className:"size-7 rounded-full"}):(0,b.jsx)("div",{className:"flex size-7 items-center justify-center rounded-full bg-[var(--muted)] text-[10px] text-[var(--muted-foreground)]",children:(0,b.jsx)(j.Terminal,{size:12})})}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)("div",{className:"mb-1",children:(0,b.jsx)("span",{className:"text-[11px] font-semibold text-[var(--foreground)]",children:c?"You":i})}),(0,b.jsx)("div",{className:`rounded-lg px-3 py-2 text-[12px] leading-[1.55] ${c?"bg-blue-500/10 text-[var(--foreground)]":"bg-[var(--muted)] text-[var(--foreground)]"}`,children:(0,b.jsx)(y.Markdown,{content:(0,z.stripMarkers)(a.content),isUser:c})})]})]},a.id)}),Object.entries(C).filter(([,a])=>a.rootMessageId===m).map(([a])=>{let c=e[a]??h;return(0,b.jsxs)("div",{className:"flex gap-2.5 animate-in fade-in duration-300",children:[(0,b.jsx)("div",{className:"shrink-0 mt-0.5",children:c?(0,b.jsx)("img",{src:O(c.id,c.color,28),alt:"",className:"size-7 rounded-full"}):(0,b.jsx)("div",{className:"flex size-7 items-center justify-center rounded-full bg-[var(--muted)] text-[10px] text-[var(--muted-foreground)]",children:(0,b.jsx)(v.Sparkles,{size:12})})}),(0,b.jsx)("div",{className:"min-w-0 flex-1",children:(0,b.jsxs)("div",{className:"flex items-center gap-2 py-1",children:[(0,b.jsx)("span",{className:"text-[11px] text-[var(--muted-foreground)]",children:c?.name??"Thinking"}),(0,b.jsxs)("span",{className:"inline-flex items-center gap-[3px]",children:[(0,b.jsx)("span",{className:"w-1 h-1 rounded-full bg-[var(--muted-foreground)]/50 animate-[pulse-dot_1.4s_ease-in-out_infinite]"}),(0,b.jsx)("span",{className:"w-1 h-1 rounded-full bg-[var(--muted-foreground)]/50 animate-[pulse-dot_1.4s_ease-in-out_0.2s_infinite]"}),(0,b.jsx)("span",{className:"w-1 h-1 rounded-full bg-[var(--muted-foreground)]/50 animate-[pulse-dot_1.4s_ease-in-out_0.4s_infinite]"})]})]})})]},`streaming-${a}`)}),(0,b.jsx)("div",{ref:J})]})}),(0,b.jsx)("div",{className:"px-3 py-2",children:(0,b.jsx)(B,{onSend:L,onStop:s,loading:F,activityStatus:G,participants:l,commands:[],placeholder:"Follow up on this run...",initialPinnedParticipantId:d.agentId||void 0})})]})}function S({job:a,agentMap:d,onBack:g,onEdit:h,onToggle:i,onDelete:j,onRunNow:k,onCancelRun:l,onUpdateAgent:m,fetchRuns:n}){let[o,p]=(0,c.useState)([]),[q,r]=(0,c.useState)(null),u=Object.values(d);a.agentId&&d[a.agentId]&&d[a.agentId].name;let v=(0,c.useCallback)(async()=>{let b=await n(a.id);p(b),b.length>0&&!q&&r(b[0].id)},[a.id,n,q]);(0,c.useEffect)(()=>{v()},[v]),(0,c.useEffect)(()=>{let a=setInterval(v,5e3);return()=>clearInterval(a)},[v]);let w=o.find(a=>a.id===q)??null,x="running"===a.lastOutcome;return(0,b.jsxs)("div",{className:"h-full flex flex-col text-[var(--foreground)]",children:[(0,b.jsxs)("div",{className:"shrink-0 flex items-center gap-3 border-b border-[var(--card-border)] px-4 py-3.5 pt-4",children:[(0,b.jsxs)("button",{onClick:g,className:"inline-flex items-center gap-1.5 rounded-md border border-[var(--card-border)] px-2.5 py-1 text-[11px] text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)]",children:[(0,b.jsx)(t.ArrowLeft,{size:12})," Back"]}),(0,b.jsx)("h2",{className:"text-[13px] font-semibold truncate",children:a.name}),(0,b.jsx)("span",{className:`inline-block size-2 shrink-0 rounded-full ${G[a.state]??"bg-zinc-500"}`})]}),(0,b.jsxs)("div",{className:"flex min-h-0 flex-1",children:[(0,b.jsx)("div",{className:"flex w-[260px] shrink-0 flex-col border-r border-[var(--card-border)] overflow-y-auto",children:(0,b.jsxs)("div",{className:"p-4 space-y-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsxs)("button",{onClick:k,disabled:x,className:"inline-flex items-center gap-1.5 rounded-md border border-[var(--card-border)] px-2.5 py-1 text-[10px] font-bold uppercase tracking-[0.05em] text-[var(--muted-foreground)] transition-colors hover:text-[var(--foreground)] hover:border-[var(--foreground)] disabled:opacity-50",children:[(0,b.jsx)(e.Play,{size:11})," Run now"]}),(0,b.jsx)("button",{onClick:i,type:"button",role:"switch","aria-checked":"active"===a.state,title:"active"===a.state?"Pause":"Resume",className:`relative inline-flex h-[16px] w-[28px] shrink-0 cursor-pointer rounded-full border transition-colors ${"active"===a.state?"border-emerald-400/30 bg-emerald-500/40":"border-[var(--card-border)] bg-[var(--muted)]"}`,children:(0,b.jsx)("span",{className:`pointer-events-none absolute top-[2px] size-[10px] rounded-full bg-white/90 shadow-sm transition-transform ${"active"===a.state?"translate-x-[14px]":"translate-x-[2px]"}`})}),x&&(0,b.jsx)("button",{onClick:l,className:"inline-flex items-center gap-1.5 rounded-md border border-[var(--card-border)] px-2.5 py-1 text-[10px] font-bold uppercase tracking-[0.05em] text-[var(--muted-foreground)] hover:text-red-400 hover:border-red-400/30 transition-colors",children:"Cancel"}),(0,b.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[(0,b.jsx)("button",{onClick:h,title:"Edit",className:"p-1.5 rounded-md border border-[var(--card-border)] text-[var(--muted-foreground)] hover:text-[var(--foreground)] hover:border-[var(--foreground)] transition-colors",children:(0,b.jsx)(s.Pencil,{size:12})}),(0,b.jsx)("button",{onClick:j,title:"Delete",className:"p-1.5 rounded-md border border-[var(--card-border)] text-[var(--muted-foreground)] hover:text-red-400 hover:border-red-400/30 transition-colors",children:(0,b.jsx)(f.Trash2,{size:12})})]})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-[10px] font-bold uppercase tracking-[0.12em] text-[var(--muted-foreground)] mb-1.5",children:"Status"}),(0,b.jsx)("div",{className:`text-[12px] font-semibold ${"active"===a.state?"text-emerald-400":"paused"===a.state?"text-amber-400":"text-[var(--muted-foreground)]"}`,children:a.state.charAt(0).toUpperCase()+a.state.slice(1)})]}),(0,b.jsx)(P,{agents:u,value:a.agentId,onChange:m}),(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-[10px] font-bold uppercase tracking-[0.12em] text-[var(--muted-foreground)] mb-1.5",children:"Trigger"}),(0,b.jsx)("div",{className:"text-[12px] text-[var(--foreground)]",children:"condition"===a.triggerType?`Condition (every ${Math.round(a.checkEveryMs/6e4)}m)`:a.cadence||a.cronExpr})]}),a.condition&&(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-[10px] font-bold uppercase tracking-[0.12em] text-[var(--muted-foreground)] mb-1.5",children:"Condition"}),(0,b.jsx)("div",{className:"text-[12px] text-[var(--foreground)]",children:a.condition})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-[10px] font-bold uppercase tracking-[0.12em] text-[var(--muted-foreground)] mb-1.5",children:"Instructions"}),(0,b.jsx)("div",{className:"text-[11px] leading-[1.5] text-[var(--muted-foreground)] whitespace-pre-wrap break-words",children:a.prompt.length>200?a.prompt.slice(0,200)+"...":a.prompt})]}),(0,b.jsx)("div",{className:"space-y-1.5",children:[..."skip"!==a.overlapPolicy?[{l:"Overlap",v:a.overlapPolicy}]:[],...a.cliArgs?[{l:"CLI args",v:a.cliArgs}]:[],{l:"Next run",v:D(a.nextRunAt,a.state)},{l:"Last run",v:a.lastRunAt?E(new Date(a.lastRunAt).toISOString())+` (${a.lastOutcome??"—"})`:"Never"}].map(a=>(0,b.jsxs)("div",{className:"flex items-center justify-between rounded-md border border-[var(--card-border)] bg-[var(--muted)]/50 px-2.5 py-1.5 text-[11px]",children:[(0,b.jsx)("span",{className:"text-[var(--muted-foreground)]",children:a.l}),(0,b.jsx)("span",{className:"font-medium text-[var(--foreground)]",children:a.v})]},a.l))})]})}),(0,b.jsxs)("div",{className:"flex w-[240px] shrink-0 flex-col border-r border-[var(--card-border)] overflow-hidden",children:[(0,b.jsx)("div",{className:"border-b border-[var(--card-border)] px-3 py-2",children:(0,b.jsxs)("div",{className:"text-[10px] font-bold uppercase tracking-[0.12em] text-[var(--muted-foreground)]",children:["Run History"," ",(0,b.jsx)("span",{className:"text-[var(--muted-foreground)]/50",children:o.length})]})}),(0,b.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto",children:0===o.length?(0,b.jsx)("div",{className:"p-4 text-center text-[11px] text-[var(--muted-foreground)]",children:"No runs yet"}):(0,b.jsx)("div",{className:"flex flex-col",children:o.map(a=>{let c=q===a.id;return(0,b.jsxs)("button",{type:"button",onClick:()=>r(a.id),className:`flex items-start gap-2.5 px-3 py-2.5 text-left transition-colors border-l-2 ${c?"bg-[var(--foreground)]/5 border-l-[var(--foreground)]":"border-l-transparent hover:bg-[var(--muted)]/30"}`,children:[(0,b.jsx)("span",{className:`mt-1 inline-block size-2 shrink-0 rounded-full ${H[a.status]??"bg-zinc-500"}`}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("div",{className:"text-[11px] font-medium text-[var(--foreground)] truncate",children:["running"===a.status?"Running...":a.status.charAt(0).toUpperCase()+a.status.slice(1),null!=a.durationMs&&` \xb7 ${(a.durationMs/1e3).toFixed(1)}s`]}),(0,b.jsx)("div",{className:"mt-0.5 flex items-center gap-2 text-[10px] text-[var(--muted-foreground)]",children:(0,b.jsx)("span",{children:E(a.startedAt??a.createdAt)})})]})]},a.id)})})})]}),w?(0,b.jsx)(R,{run:w,job:a,agentMap:d},w.id):(0,b.jsx)("div",{className:"flex min-w-0 flex-1 items-center justify-center text-[var(--muted-foreground)] text-sm",children:0===o.length?'No runs yet. Click "Run now" to trigger one.':"Select a run to view its output"})]})]})}function T({projectId:a}={}){let{jobs:d,loading:h,refresh:l,createJob:m,updateJob:n,deleteJob:o,toggleJob:p,runNow:q,cancelRun:r,fetchRuns:t}=function(a){let[b,d]=(0,c.useState)([]),[e,f]=(0,c.useState)(!0),[g,h]=(0,c.useState)(null),i=(0,c.useRef)(!1),j=(0,c.useCallback)(async()=>{try{i.current||f(!0);let b=a?`?projectId=${encodeURIComponent(a)}`:"",c=await fetch(`/api/prompt-jobs${b}`);if(!c.ok)throw Error(`Failed to fetch: ${c.status}`);let e=await c.json();d(e.jobs??[]),h(null)}catch(a){h(a instanceof Error?a.message:String(a))}finally{f(!1),i.current=!0}},[a]);(0,c.useEffect)(()=>{i.current=!1,j();let a=setInterval(j,1e4);return()=>clearInterval(a)},[j]);let k=(0,c.useCallback)(async a=>{let b=await fetch("/api/prompt-jobs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});return b.ok&&await j(),b.ok},[j]),l=(0,c.useCallback)(async(a,b)=>{let c=await fetch(`/api/prompt-jobs/${a}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(b)});return c.ok&&await j(),c.ok},[j]),m=(0,c.useCallback)(async a=>{let b=await fetch(`/api/prompt-jobs/${a}`,{method:"DELETE"});return b.ok&&await j(),b.ok},[j]),n=(0,c.useCallback)(async a=>{let b="active"===a.state?"paused":"active",c=await fetch(`/api/prompt-jobs/${a.id}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({state:b})});return c.ok&&await j(),c.ok},[j]),o=(0,c.useCallback)(async a=>{let b=await fetch("/api/prompt-jobs/poll",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jobId:a})});return b.ok&&await j(),b.ok},[j]),p=(0,c.useCallback)(async a=>{let b=await fetch(`/api/prompt-jobs/${a}/cancel`,{method:"POST"});return b.ok&&await j(),b.ok},[j]);return{jobs:b,loading:e,error:g,refresh:j,createJob:k,updateJob:l,deleteJob:m,toggleJob:n,runNow:o,cancelRun:p,fetchRuns:(0,c.useCallback)(async a=>{let b=await fetch(`/api/prompt-jobs/${a}/runs`);return b.ok?(await b.json()).runs??[]:[]},[])}}(a),[u,v]=(0,c.useState)("all"),[w,x]=(0,c.useState)(null),[y,z]=(0,c.useState)(!1),[A,B]=(0,c.useState)(null),[C,E]=(0,c.useState)({}),[G,H]=(0,c.useState)(null),[I,J]=(0,c.useState)({});(0,c.useEffect)(()=>{fetch("/api/prompt-jobs/agents").then(a=>a.json()).then(a=>{let b={};for(let c of a.agents??[])b[c.id]=c;J(b)}).catch(()=>{})},[]);let K=a=>{H(a),setTimeout(()=>H(null),2500)},L=d.filter(a=>"all"===u||a.state===u),M=d.find(a=>a.id===w)??null,N={all:d.length,active:d.filter(a=>"active"===a.state).length,paused:d.filter(a=>"paused"===a.state).length,stopped:d.filter(a=>"stopped"===a.state).length},P=async a=>{await p(a)&&K(`${a.name} ${"active"===a.state?"paused":"resumed"}`)},R=async(a,b)=>{if(b?.stopPropagation(),C[a])return;E(b=>({...b,[a]:!0}));let c=await q(a);E(b=>{let c={...b};return delete c[a],c}),c&&K("Run triggered")},U=async a=>{await o(a)&&(w===a&&x(null),K("Job deleted"))},V=async a=>{await r(a)&&K("Run cancelled")},W=async b=>{A?await n(A.id,b)&&K(`Job "${b.name}" updated`):await m({...b,projectId:a??""})&&K(`Job "${b.name}" created`)},X=G&&(0,b.jsx)("div",{className:"fixed bottom-8 left-1/2 -translate-x-1/2 z-50 animate-in fade-in slide-in-from-bottom-2 duration-200",children:(0,b.jsx)("div",{className:"bg-[var(--card-bg)] border border-[var(--card-border)] px-4 py-2.5 rounded-xl shadow-lg flex items-center gap-2.5 text-sm font-medium",children:G})});return y?(0,b.jsxs)(b.Fragment,{children:[X,(0,b.jsx)(Q,{onClose:()=>{z(!1),B(null)},onSubmit:W,editingJob:A})]}):M?(0,b.jsxs)(b.Fragment,{children:[X,(0,b.jsx)(S,{job:M,agentMap:I,onBack:()=>x(null),onEdit:()=>{B(M),z(!0)},onToggle:()=>P(M),onDelete:()=>U(M.id),onRunNow:()=>R(M.id),onCancelRun:()=>V(M.id),onUpdateAgent:async a=>{let b=I[a];await n(M.id,{agentId:a,provider:b?.provider??"claude",model:b?.model??""})},fetchRuns:t})]}):(0,b.jsxs)("div",{className:"h-full flex flex-col text-[var(--foreground)]",children:[X,(0,b.jsxs)("div",{className:"px-6 md:px-10 pt-6 pb-0",children:[(0,b.jsxs)("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-end gap-4 mb-6",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-2xl font-bold tracking-tight mb-1",children:"Scheduled Tasks"}),(0,b.jsxs)("p",{className:"text-sm text-[var(--muted-foreground)]",children:[N.active," active job",1!==N.active?"s":""," ","· ",d.length," total"]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("button",{onClick:()=>l(),className:"p-2 rounded-lg border border-[var(--card-border)] text-[var(--muted-foreground)] hover:text-[var(--foreground)] hover:border-[var(--foreground)] transition-colors",children:(0,b.jsx)(k.RefreshCw,{size:16})}),(0,b.jsxs)("button",{onClick:()=>{B(null),z(!0)},className:"bg-[var(--foreground)] text-[var(--background)] px-4 py-2 rounded-lg text-sm font-medium flex items-center gap-2 hover:opacity-90 transition-opacity",children:[(0,b.jsx)(g.Plus,{size:16})," New Job"]})]})]}),(0,b.jsx)("div",{className:"flex gap-4 border-b border-[var(--card-border)] pb-3",children:["all","active","paused","stopped"].map(a=>(0,b.jsxs)("button",{onClick:()=>v(a),className:`text-xs font-medium pb-1 transition-colors border-b-2 capitalize ${u===a?"border-[var(--foreground)] text-[var(--foreground)]":"border-transparent text-[var(--muted-foreground)] hover:text-[var(--foreground)]"}`,children:[a,(0,b.jsx)("span",{className:"ml-1.5 text-[10px] text-[var(--muted-foreground)] font-mono",children:N[a]})]},a))})]}),(0,b.jsx)("div",{className:"flex-1 min-h-0 px-6 md:px-10 py-6 overflow-y-auto",children:h&&0===d.length?(0,b.jsx)("div",{className:"text-center py-12 text-[var(--muted-foreground)] text-sm",children:"Loading jobs..."}):(0,b.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-3",children:[L.map(a=>{let c=C[a.id];return(0,b.jsxs)("div",{onClick:()=>x(a.id),className:"p-5 rounded-xl border border-[var(--card-border)] bg-[var(--card-bg)] hover:border-[var(--muted-foreground)] transition-all cursor-pointer",children:[(0,b.jsxs)("div",{className:"flex justify-between items-start gap-3 mb-3",children:[(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)("h3",{className:"text-sm font-semibold truncate mb-1",children:a.name}),(0,b.jsx)(F,{state:a.state})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",onClick:a=>a.stopPropagation(),children:[(0,b.jsx)("button",{onClick:b=>{b.stopPropagation(),P(a)},type:"button",role:"switch","aria-checked":"active"===a.state,title:"active"===a.state?"Pause":"Resume",className:`relative inline-flex h-[14px] w-[24px] shrink-0 cursor-pointer rounded-full border transition-colors ${"active"===a.state?"border-emerald-400/30 bg-emerald-500/40":"border-[var(--card-border)] bg-[var(--muted)]"}`,children:(0,b.jsx)("span",{className:`pointer-events-none absolute top-[1.5px] size-[9px] rounded-full bg-white/90 shadow-sm transition-transform ${"active"===a.state?"translate-x-[11px]":"translate-x-[1.5px]"}`})}),(0,b.jsx)("button",{onClick:b=>{b.stopPropagation(),B(a),z(!0)},title:"Edit",className:"p-1.5 rounded-md border border-[var(--card-border)] text-[var(--muted-foreground)] hover:text-[var(--foreground)] hover:border-[var(--muted-foreground)] transition-colors",children:(0,b.jsx)(s.Pencil,{size:12})}),(0,b.jsx)("button",{onClick:b=>R(a.id,b),disabled:c,title:"Run now",className:`p-1.5 rounded-md border text-[var(--muted-foreground)] transition-colors ${c?"border-[var(--card-border)] opacity-50 cursor-wait":"border-[var(--card-border)] hover:text-[var(--foreground)] hover:border-[var(--muted-foreground)]"}`,children:(0,b.jsx)(e.Play,{size:12,className:c?"animate-pulse":"fill-current"})}),(0,b.jsx)("button",{onClick:b=>{b.stopPropagation(),U(a.id)},title:"Delete",className:"p-1.5 rounded-md border border-[var(--card-border)] text-[var(--muted-foreground)] hover:text-red-500 hover:border-red-500/30 transition-colors",children:(0,b.jsx)(f.Trash2,{size:12})})]})]}),(0,b.jsx)("p",{className:"text-[12px] text-[var(--muted-foreground)] leading-relaxed line-clamp-2 mb-3",children:a.prompt}),(0,b.jsxs)("div",{className:"pt-3 border-t border-[var(--card-border)]/50 flex items-center gap-4 text-[11px] text-[var(--muted-foreground)]",children:[(0,b.jsx)("span",{className:"flex items-center gap-1",children:a.agentId&&I[a.agentId]?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("img",{src:O(a.agentId,I[a.agentId].color,16),alt:"",className:"size-4 rounded-full"}),I[a.agentId].name]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(j.Terminal,{size:11}),a.provider]})}),"condition"===a.triggerType&&(0,b.jsx)("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-purple-500/10 text-purple-400 border border-purple-400/20",children:"condition"}),(0,b.jsxs)("span",{className:"flex items-center gap-1",children:[(0,b.jsx)(i.Clock,{size:11}),D(a.nextRunAt,a.state)]}),(0,b.jsx)("span",{className:"ml-auto font-mono truncate max-w-[120px]",title:a.cadence||a.cronExpr,children:"condition"===a.triggerType?`every ${Math.round(a.checkEveryMs/6e4)}m`:a.cadence||a.cronExpr})]})]},a.id)}),0===L.length&&(0,b.jsx)("div",{className:"md:col-span-2 xl:col-span-3 text-center py-12 text-[var(--muted-foreground)] text-sm border border-dashed border-[var(--card-border)] rounded-xl",children:0===d.length?"No prompt jobs yet. Create one to get started.":"No jobs match the selected filter."})]})})]})}a.s(["default",()=>T],877214)}];
7
+
8
+ //# sourceMappingURL=components_PromptJobBoard_tsx_f83f722f._.js.map