@mndrk/agx 2.0.32 → 2.0.33

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 (434) hide show
  1. package/cloud-runtime/standalone/.next/BUILD_ID +1 -1
  2. package/cloud-runtime/standalone/.next/app-path-routes-manifest.json +1 -0
  3. package/cloud-runtime/standalone/.next/build-manifest.json +2 -2
  4. package/cloud-runtime/standalone/.next/prerender-manifest.json +3 -3
  5. package/cloud-runtime/standalone/.next/routes-manifest.json +6 -0
  6. package/cloud-runtime/standalone/.next/server/app/_global-error.html +2 -2
  7. package/cloud-runtime/standalone/.next/server/app/_global-error.rsc +1 -1
  8. package/cloud-runtime/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  9. package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  10. package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  11. package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  12. package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  13. package/cloud-runtime/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  14. package/cloud-runtime/standalone/.next/server/app/_not-found.html +2 -2
  15. package/cloud-runtime/standalone/.next/server/app/_not-found.rsc +2 -2
  16. package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  17. package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  18. package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  19. package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  20. package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  21. package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  22. package/cloud-runtime/standalone/.next/server/app/agents/[id]/page.js.nft.json +1 -1
  23. package/cloud-runtime/standalone/.next/server/app/agents/[id]/page_client-reference-manifest.js +1 -1
  24. package/cloud-runtime/standalone/.next/server/app/agents/page.js.nft.json +1 -1
  25. package/cloud-runtime/standalone/.next/server/app/agents/page_client-reference-manifest.js +1 -1
  26. package/cloud-runtime/standalone/.next/server/app/agents.html +2 -2
  27. package/cloud-runtime/standalone/.next/server/app/agents.rsc +3 -3
  28. package/cloud-runtime/standalone/.next/server/app/agents.segments/_full.segment.rsc +3 -3
  29. package/cloud-runtime/standalone/.next/server/app/agents.segments/_head.segment.rsc +1 -1
  30. package/cloud-runtime/standalone/.next/server/app/agents.segments/_index.segment.rsc +2 -2
  31. package/cloud-runtime/standalone/.next/server/app/agents.segments/_tree.segment.rsc +2 -2
  32. package/cloud-runtime/standalone/.next/server/app/agents.segments/agents/__PAGE__.segment.rsc +2 -2
  33. package/cloud-runtime/standalone/.next/server/app/agents.segments/agents.segment.rsc +1 -1
  34. package/cloud-runtime/standalone/.next/server/app/api/automations/create/route.js +3 -4
  35. package/cloud-runtime/standalone/.next/server/app/api/automations/create/route.js.nft.json +1 -1
  36. package/cloud-runtime/standalone/.next/server/app/api/automations/route.js +1 -1
  37. package/cloud-runtime/standalone/.next/server/app/api/automations/route.js.nft.json +1 -1
  38. package/cloud-runtime/standalone/.next/server/app/api/chat/route.js +3 -3
  39. package/cloud-runtime/standalone/.next/server/app/api/chat/route.js.nft.json +1 -1
  40. package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/route.js +1 -1
  41. package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/route.js.nft.json +1 -1
  42. package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/signal/route.js +1 -1
  43. package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/signal/route.js.nft.json +1 -1
  44. package/cloud-runtime/standalone/.next/server/app/api/chat-runs/route.js +1 -1
  45. package/cloud-runtime/standalone/.next/server/app/api/chat-runs/route.js.nft.json +1 -1
  46. package/cloud-runtime/standalone/.next/server/app/api/daemon/route.js +1 -1
  47. package/cloud-runtime/standalone/.next/server/app/api/daemon/route.js.nft.json +1 -1
  48. package/cloud-runtime/standalone/.next/server/app/api/file-search/route.js.nft.json +1 -1
  49. package/cloud-runtime/standalone/.next/server/app/api/graphs/[graphId]/nodes/[nodeId]/route.js +1 -1
  50. package/cloud-runtime/standalone/.next/server/app/api/graphs/[graphId]/nodes/[nodeId]/route.js.nft.json +1 -1
  51. package/cloud-runtime/standalone/.next/server/app/api/health/route.js +1 -1
  52. package/cloud-runtime/standalone/.next/server/app/api/health/route.js.nft.json +1 -1
  53. package/cloud-runtime/standalone/.next/server/app/api/knowledge-notes/route/app-paths-manifest.json +3 -0
  54. package/cloud-runtime/standalone/.next/server/app/api/knowledge-notes/route/build-manifest.json +11 -0
  55. package/cloud-runtime/standalone/.next/server/app/api/knowledge-notes/route/server-reference-manifest.json +4 -0
  56. package/cloud-runtime/standalone/.next/server/app/api/knowledge-notes/route.js +8 -0
  57. package/cloud-runtime/standalone/.next/server/app/api/knowledge-notes/route.js.map +5 -0
  58. package/cloud-runtime/standalone/.next/server/app/api/knowledge-notes/route.js.nft.json +1 -0
  59. package/cloud-runtime/standalone/.next/server/app/api/knowledge-notes/route_client-reference-manifest.js +2 -0
  60. package/cloud-runtime/standalone/.next/server/app/api/learnings/route.js +1 -1
  61. package/cloud-runtime/standalone/.next/server/app/api/learnings/route.js.nft.json +1 -1
  62. package/cloud-runtime/standalone/.next/server/app/api/memories/route.js +1 -1
  63. package/cloud-runtime/standalone/.next/server/app/api/memories/route.js.nft.json +1 -1
  64. package/cloud-runtime/standalone/.next/server/app/api/messages/[id]/route.js +1 -1
  65. package/cloud-runtime/standalone/.next/server/app/api/messages/[id]/route.js.nft.json +1 -1
  66. package/cloud-runtime/standalone/.next/server/app/api/migrate/teams-to-projects/route.js +1 -1
  67. package/cloud-runtime/standalone/.next/server/app/api/migrate/teams-to-projects/route.js.nft.json +1 -1
  68. package/cloud-runtime/standalone/.next/server/app/api/migrate/workspaces-to-projects/route.js +1 -1
  69. package/cloud-runtime/standalone/.next/server/app/api/migrate/workspaces-to-projects/route.js.nft.json +1 -1
  70. package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/cancel/route.js +2 -2
  71. package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/cancel/route.js.nft.json +1 -1
  72. package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/signal/route.js +1 -1
  73. package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/signal/route.js.nft.json +1 -1
  74. package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/start/route.js +3 -2
  75. package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/start/route.js.nft.json +1 -1
  76. package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/status/route.js +1 -1
  77. package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/status/route.js.nft.json +1 -1
  78. package/cloud-runtime/standalone/.next/server/app/api/processes/route.js +1 -1
  79. package/cloud-runtime/standalone/.next/server/app/api/processes/route.js.nft.json +1 -1
  80. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/agents/route.js +1 -1
  81. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/agents/route.js.nft.json +1 -1
  82. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/memory/route.js +1 -1
  83. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/memory/route.js.nft.json +1 -1
  84. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/migrate-v1/route.js +1 -1
  85. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/migrate-v1/route.js.nft.json +1 -1
  86. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/migrate-v2/route.js +1 -1
  87. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/migrate-v2/route.js.nft.json +1 -1
  88. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/route.js +1 -1
  89. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/route.js.nft.json +1 -1
  90. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/skills/route.js +1 -1
  91. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/skills/route.js.nft.json +1 -1
  92. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/threads/route.js +1 -1
  93. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/threads/route.js.nft.json +1 -1
  94. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/variables/route.js +1 -1
  95. package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/variables/route.js.nft.json +1 -1
  96. package/cloud-runtime/standalone/.next/server/app/api/projects/route.js +1 -1
  97. package/cloud-runtime/standalone/.next/server/app/api/projects/route.js.nft.json +1 -1
  98. package/cloud-runtime/standalone/.next/server/app/api/queue/complete/route.js +4 -3
  99. package/cloud-runtime/standalone/.next/server/app/api/queue/complete/route.js.nft.json +1 -1
  100. package/cloud-runtime/standalone/.next/server/app/api/queue/route.js +6 -6
  101. package/cloud-runtime/standalone/.next/server/app/api/queue/route.js.nft.json +1 -1
  102. package/cloud-runtime/standalone/.next/server/app/api/repos/[id]/knowledge/route.js +1 -1
  103. package/cloud-runtime/standalone/.next/server/app/api/repos/[id]/knowledge/route.js.nft.json +1 -1
  104. package/cloud-runtime/standalone/.next/server/app/api/schedules/debug/route.js +2 -3
  105. package/cloud-runtime/standalone/.next/server/app/api/schedules/debug/route.js.nft.json +1 -1
  106. package/cloud-runtime/standalone/.next/server/app/api/schedules/poll/route.js +2 -3
  107. package/cloud-runtime/standalone/.next/server/app/api/schedules/poll/route.js.nft.json +1 -1
  108. package/cloud-runtime/standalone/.next/server/app/api/schedules/route.js +3 -4
  109. package/cloud-runtime/standalone/.next/server/app/api/schedules/route.js.nft.json +1 -1
  110. package/cloud-runtime/standalone/.next/server/app/api/summarize/route.js +3 -3
  111. package/cloud-runtime/standalone/.next/server/app/api/summarize/route.js.nft.json +1 -1
  112. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/[commentId]/route.js +4 -4
  113. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/[commentId]/route.js.nft.json +1 -1
  114. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/route.js +2 -2
  115. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/route.js.nft.json +1 -1
  116. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/costs/route.js +1 -1
  117. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/costs/route.js.nft.json +1 -1
  118. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/dependencies/route.js +5 -5
  119. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/dependencies/route.js.nft.json +1 -1
  120. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/events/route.js +1 -1
  121. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/events/route.js.nft.json +1 -1
  122. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/history/route.js +1 -1
  123. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/history/route.js.nft.json +1 -1
  124. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/metrics/route.js +1 -1
  125. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/metrics/route.js.nft.json +1 -1
  126. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/pause/route.js +1 -1
  127. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/pause/route.js.nft.json +1 -1
  128. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/replan/route.js +1 -1
  129. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/replan/route.js.nft.json +1 -1
  130. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/restart/route.js +1 -1
  131. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/restart/route.js.nft.json +1 -1
  132. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/resume/route.js +1 -1
  133. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/resume/route.js.nft.json +1 -1
  134. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/rollback/route.js +1 -1
  135. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/rollback/route.js.nft.json +1 -1
  136. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/route.js +1 -1
  137. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/route.js.nft.json +1 -1
  138. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/schedule/route.js +1 -1
  139. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/schedule/route.js.nft.json +1 -1
  140. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/start/route.js +1 -1
  141. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/start/route.js.nft.json +1 -1
  142. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/stop/route.js +1 -1
  143. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/stop/route.js.nft.json +1 -1
  144. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/heartbeat/route.js +1 -1
  145. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/heartbeat/route.js.nft.json +1 -1
  146. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/history/route.js +1 -1
  147. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/history/route.js.nft.json +1 -1
  148. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/logs/route.js +1 -1
  149. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/logs/route.js.nft.json +1 -1
  150. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/comments/route.js +1 -1
  151. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/comments/route.js.nft.json +1 -1
  152. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/complete/route.js +1 -1
  153. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/complete/route.js.nft.json +1 -1
  154. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/fail/route.js +1 -1
  155. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/fail/route.js.nft.json +1 -1
  156. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/resume/route.js +1 -1
  157. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/resume/route.js.nft.json +1 -1
  158. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/start/route.js +1 -1
  159. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/start/route.js.nft.json +1 -1
  160. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/stop/route.js +1 -1
  161. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/stop/route.js.nft.json +1 -1
  162. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/verify/route.js +6 -6
  163. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/verify/route.js.nft.json +1 -1
  164. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/route.js +4 -4
  165. package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/route.js.nft.json +1 -1
  166. package/cloud-runtime/standalone/.next/server/app/api/tasks/assign-orphans/route.js +1 -1
  167. package/cloud-runtime/standalone/.next/server/app/api/tasks/assign-orphans/route.js.nft.json +1 -1
  168. package/cloud-runtime/standalone/.next/server/app/api/tasks/extract/route.js +3 -3
  169. package/cloud-runtime/standalone/.next/server/app/api/tasks/extract/route.js.nft.json +1 -1
  170. package/cloud-runtime/standalone/.next/server/app/api/tasks/route.js +6 -6
  171. package/cloud-runtime/standalone/.next/server/app/api/tasks/route.js.nft.json +1 -1
  172. package/cloud-runtime/standalone/.next/server/app/api/threads/knowledge/route.js +3 -3
  173. package/cloud-runtime/standalone/.next/server/app/api/threads/knowledge/route.js.nft.json +1 -1
  174. package/cloud-runtime/standalone/.next/server/app/api/threads/route.js +3 -3
  175. package/cloud-runtime/standalone/.next/server/app/api/threads/route.js.nft.json +1 -1
  176. package/cloud-runtime/standalone/.next/server/app/api/user-settings/route.js +1 -1
  177. package/cloud-runtime/standalone/.next/server/app/api/user-settings/route.js.nft.json +1 -1
  178. package/cloud-runtime/standalone/.next/server/app/automations/page.js.nft.json +1 -1
  179. package/cloud-runtime/standalone/.next/server/app/automations/page_client-reference-manifest.js +1 -1
  180. package/cloud-runtime/standalone/.next/server/app/automations.html +2 -2
  181. package/cloud-runtime/standalone/.next/server/app/automations.rsc +3 -3
  182. package/cloud-runtime/standalone/.next/server/app/automations.segments/_full.segment.rsc +3 -3
  183. package/cloud-runtime/standalone/.next/server/app/automations.segments/_head.segment.rsc +1 -1
  184. package/cloud-runtime/standalone/.next/server/app/automations.segments/_index.segment.rsc +2 -2
  185. package/cloud-runtime/standalone/.next/server/app/automations.segments/_tree.segment.rsc +2 -2
  186. package/cloud-runtime/standalone/.next/server/app/automations.segments/automations/__PAGE__.segment.rsc +2 -2
  187. package/cloud-runtime/standalone/.next/server/app/automations.segments/automations.segment.rsc +1 -1
  188. package/cloud-runtime/standalone/.next/server/app/board/page_client-reference-manifest.js +1 -1
  189. package/cloud-runtime/standalone/.next/server/app/board.html +2 -2
  190. package/cloud-runtime/standalone/.next/server/app/board.rsc +2 -2
  191. package/cloud-runtime/standalone/.next/server/app/board.segments/_full.segment.rsc +2 -2
  192. package/cloud-runtime/standalone/.next/server/app/board.segments/_head.segment.rsc +1 -1
  193. package/cloud-runtime/standalone/.next/server/app/board.segments/_index.segment.rsc +2 -2
  194. package/cloud-runtime/standalone/.next/server/app/board.segments/_tree.segment.rsc +2 -2
  195. package/cloud-runtime/standalone/.next/server/app/board.segments/board/__PAGE__.segment.rsc +1 -1
  196. package/cloud-runtime/standalone/.next/server/app/board.segments/board.segment.rsc +1 -1
  197. package/cloud-runtime/standalone/.next/server/app/execution-graph/page_client-reference-manifest.js +1 -1
  198. package/cloud-runtime/standalone/.next/server/app/execution-graph.html +2 -2
  199. package/cloud-runtime/standalone/.next/server/app/execution-graph.rsc +2 -2
  200. package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_full.segment.rsc +2 -2
  201. package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_head.segment.rsc +1 -1
  202. package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_index.segment.rsc +2 -2
  203. package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_tree.segment.rsc +2 -2
  204. package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/execution-graph/__PAGE__.segment.rsc +1 -1
  205. package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/execution-graph.segment.rsc +1 -1
  206. package/cloud-runtime/standalone/.next/server/app/index.html +2 -2
  207. package/cloud-runtime/standalone/.next/server/app/index.rsc +3 -3
  208. package/cloud-runtime/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  209. package/cloud-runtime/standalone/.next/server/app/index.segments/_full.segment.rsc +3 -3
  210. package/cloud-runtime/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
  211. package/cloud-runtime/standalone/.next/server/app/index.segments/_index.segment.rsc +2 -2
  212. package/cloud-runtime/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  213. package/cloud-runtime/standalone/.next/server/app/page.js.nft.json +1 -1
  214. package/cloud-runtime/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  215. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/graph/[taskId]/page.js.nft.json +1 -1
  216. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/graph/[taskId]/page_client-reference-manifest.js +1 -1
  217. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/knowledge/page.js.nft.json +1 -1
  218. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/knowledge/page_client-reference-manifest.js +1 -1
  219. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/page.js.nft.json +1 -1
  220. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/page_client-reference-manifest.js +1 -1
  221. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/thread/[threadId]/page.js.nft.json +1 -1
  222. package/cloud-runtime/standalone/.next/server/app/projects/[slug]/thread/[threadId]/page_client-reference-manifest.js +1 -1
  223. package/cloud-runtime/standalone/.next/server/app/projects/orphans/page_client-reference-manifest.js +1 -1
  224. package/cloud-runtime/standalone/.next/server/app/projects/orphans.html +2 -2
  225. package/cloud-runtime/standalone/.next/server/app/projects/orphans.rsc +2 -2
  226. package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_full.segment.rsc +2 -2
  227. package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_head.segment.rsc +1 -1
  228. package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_index.segment.rsc +2 -2
  229. package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_tree.segment.rsc +2 -2
  230. package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/projects/orphans/__PAGE__.segment.rsc +1 -1
  231. package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/projects/orphans.segment.rsc +1 -1
  232. package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/projects.segment.rsc +1 -1
  233. package/cloud-runtime/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  234. package/cloud-runtime/standalone/.next/server/app/projects.html +2 -2
  235. package/cloud-runtime/standalone/.next/server/app/projects.rsc +2 -2
  236. package/cloud-runtime/standalone/.next/server/app/projects.segments/_full.segment.rsc +2 -2
  237. package/cloud-runtime/standalone/.next/server/app/projects.segments/_head.segment.rsc +1 -1
  238. package/cloud-runtime/standalone/.next/server/app/projects.segments/_index.segment.rsc +2 -2
  239. package/cloud-runtime/standalone/.next/server/app/projects.segments/_tree.segment.rsc +2 -2
  240. package/cloud-runtime/standalone/.next/server/app/projects.segments/projects/__PAGE__.segment.rsc +1 -1
  241. package/cloud-runtime/standalone/.next/server/app/projects.segments/projects.segment.rsc +1 -1
  242. package/cloud-runtime/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  243. package/cloud-runtime/standalone/.next/server/app/settings.html +2 -2
  244. package/cloud-runtime/standalone/.next/server/app/settings.rsc +2 -2
  245. package/cloud-runtime/standalone/.next/server/app/settings.segments/_full.segment.rsc +2 -2
  246. package/cloud-runtime/standalone/.next/server/app/settings.segments/_head.segment.rsc +1 -1
  247. package/cloud-runtime/standalone/.next/server/app/settings.segments/_index.segment.rsc +2 -2
  248. package/cloud-runtime/standalone/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  249. package/cloud-runtime/standalone/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +1 -1
  250. package/cloud-runtime/standalone/.next/server/app/settings.segments/settings.segment.rsc +1 -1
  251. package/cloud-runtime/standalone/.next/server/app/status/page_client-reference-manifest.js +1 -1
  252. package/cloud-runtime/standalone/.next/server/app/status.html +2 -2
  253. package/cloud-runtime/standalone/.next/server/app/status.rsc +2 -2
  254. package/cloud-runtime/standalone/.next/server/app/status.segments/_full.segment.rsc +2 -2
  255. package/cloud-runtime/standalone/.next/server/app/status.segments/_head.segment.rsc +1 -1
  256. package/cloud-runtime/standalone/.next/server/app/status.segments/_index.segment.rsc +2 -2
  257. package/cloud-runtime/standalone/.next/server/app/status.segments/_tree.segment.rsc +2 -2
  258. package/cloud-runtime/standalone/.next/server/app/status.segments/status/__PAGE__.segment.rsc +1 -1
  259. package/cloud-runtime/standalone/.next/server/app/status.segments/status.segment.rsc +1 -1
  260. package/cloud-runtime/standalone/.next/server/app/thread/[id]/page.js.nft.json +1 -1
  261. package/cloud-runtime/standalone/.next/server/app/thread/[id]/page_client-reference-manifest.js +1 -1
  262. package/cloud-runtime/standalone/.next/server/app/welcome/page.js.nft.json +1 -1
  263. package/cloud-runtime/standalone/.next/server/app/welcome/page_client-reference-manifest.js +1 -1
  264. package/cloud-runtime/standalone/.next/server/app/welcome.html +2 -2
  265. package/cloud-runtime/standalone/.next/server/app/welcome.rsc +3 -3
  266. package/cloud-runtime/standalone/.next/server/app/welcome.segments/_full.segment.rsc +3 -3
  267. package/cloud-runtime/standalone/.next/server/app/welcome.segments/_head.segment.rsc +1 -1
  268. package/cloud-runtime/standalone/.next/server/app/welcome.segments/_index.segment.rsc +2 -2
  269. package/cloud-runtime/standalone/.next/server/app/welcome.segments/_tree.segment.rsc +2 -2
  270. package/cloud-runtime/standalone/.next/server/app/welcome.segments/welcome/__PAGE__.segment.rsc +2 -2
  271. package/cloud-runtime/standalone/.next/server/app/welcome.segments/welcome.segment.rsc +1 -1
  272. package/cloud-runtime/standalone/.next/server/app-paths-manifest.json +1 -0
  273. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__06634853._.js +80 -0
  274. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0b3b6a47._.js +51 -0
  275. package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__86f7d27b._.js → [root-of-the-server]__18423486._.js} +2 -2
  276. package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__dede3dcd._.js → [root-of-the-server]__19520d85._.js} +1 -1
  277. package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__399b2ca9._.js → [root-of-the-server]__1c18c0d1._.js} +2 -2
  278. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1cc2fe7f._.js +3 -0
  279. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__29419d66._.js +42 -0
  280. package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__6e59b27c._.js → [root-of-the-server]__32b13ba9._.js} +2 -2
  281. package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__1dd062c1._.js → [root-of-the-server]__3c1567b6._.js} +2 -2
  282. package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__29ce9c60._.js → [root-of-the-server]__3c37453e._.js} +2 -2
  283. package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__507a4363._.js → [root-of-the-server]__3faa64cd._.js} +2 -2
  284. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__42497c7b._.js +80 -0
  285. package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__e446cb39._.js → [root-of-the-server]__4837d72a._.js} +2 -2
  286. package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__10940c29._.js → [root-of-the-server]__49c03d66._.js} +2 -2
  287. package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__b40c7aab._.js → [root-of-the-server]__4a8d14c1._.js} +2 -2
  288. package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__75bff965._.js → [root-of-the-server]__4c861686._.js} +2 -2
  289. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4d8c6e3d._.js +58 -0
  290. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__543ba6c4._.js +1 -1
  291. package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__94fa1edc._.js → [root-of-the-server]__588b6ab0._.js} +2 -2
  292. package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__ccfcbcd5._.js → [root-of-the-server]__5a348fba._.js} +2 -2
  293. package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__9dfaaf72._.js → [root-of-the-server]__61c99680._.js} +2 -2
  294. package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__c08bef05._.js → [root-of-the-server]__6acb940d._.js} +2 -2
  295. package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__98535eb3._.js → [root-of-the-server]__7e79d86a._.js} +2 -2
  296. package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__6c187704._.js → [root-of-the-server]__7ffcc20c._.js} +2 -2
  297. package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__c5634f17._.js → [root-of-the-server]__875279cb._.js} +1 -1
  298. package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__13677d96._.js → [root-of-the-server]__8b0ab82f._.js} +2 -2
  299. package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__f5b93200._.js → [root-of-the-server]__8b461158._.js} +2 -2
  300. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__918f0106._.js +80 -0
  301. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__922eb7cd._.js +80 -0
  302. package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__e6ad07c3._.js → [root-of-the-server]__a67cd108._.js} +2 -2
  303. package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__d8cedc8a._.js → [root-of-the-server]__abb032c1._.js} +2 -2
  304. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__b3ed0a00._.js +46 -0
  305. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__b63cb741._.js +63 -0
  306. package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__2388b2b3._.js → [root-of-the-server]__b9b3fde6._.js} +2 -2
  307. package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__f4b70b67._.js → [root-of-the-server]__be4ad4b5._.js} +2 -2
  308. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c0a18648._.js +80 -0
  309. package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__5ca87ba0._.js → [root-of-the-server]__c480c9c2._.js} +2 -2
  310. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c8b49077._.js +79 -0
  311. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c99509c2._.js +101 -0
  312. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ceb02db8._.js +1 -1
  313. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__d6e1ee6e._.js +32 -0
  314. package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__80655727._.js → [root-of-the-server]__e069c0a3._.js} +2 -2
  315. package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__f5a2358a._.js → [root-of-the-server]__e1e51c02._.js} +2 -2
  316. package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__12afd8a3._.js → [root-of-the-server]__ef82dda1._.js} +2 -2
  317. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f168c6dc._.js +25 -0
  318. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f1b7932f._.js +36 -0
  319. package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__4d318eb0._.js → [root-of-the-server]__f701b208._.js} +24 -24
  320. package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__2e596cc8._.js → [root-of-the-server]__fee58db1._.js} +2 -2
  321. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ffffceac._.js +6 -0
  322. package/cloud-runtime/standalone/.next/server/chunks/_5462a047._.js +3 -0
  323. package/cloud-runtime/standalone/.next/server/chunks/_5fd6af5d._.js +57 -0
  324. package/cloud-runtime/standalone/.next/server/chunks/_c965f7b3._.js +3 -0
  325. package/cloud-runtime/standalone/.next/server/chunks/_d225c04f._.js +1 -1
  326. package/cloud-runtime/standalone/.next/server/chunks/{_3e0d34cc._.js → _d22934ab._.js} +24 -24
  327. package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_knowledge-notes_route_actions_0ddf6109.js +3 -0
  328. package/cloud-runtime/standalone/.next/server/chunks/lib_7cad5c77._.js +64 -0
  329. package/cloud-runtime/standalone/.next/server/chunks/lib_87c06aeb._.js +25 -0
  330. package/cloud-runtime/standalone/.next/server/chunks/lib_db_ts_e06c6085._.js +1 -1
  331. package/cloud-runtime/standalone/.next/server/chunks/lib_ea45fe73._.js +1 -1
  332. package/cloud-runtime/standalone/.next/server/chunks/lib_history-store_ts_2e721df2._.js +45 -37
  333. package/cloud-runtime/standalone/.next/server/chunks/lib_history-store_ts_74d1c060._.js +45 -37
  334. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_371d0bff.js +12 -12
  335. package/cloud-runtime/standalone/.next/server/chunks/ssr/{[root-of-the-server]__a8a8afdc._.js → [root-of-the-server]__04d1aa70._.js} +2 -2
  336. package/cloud-runtime/standalone/.next/server/chunks/ssr/{[root-of-the-server]__9166c1d6._.js → [root-of-the-server]__2d80540b._.js} +2 -2
  337. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__5ffa2883._.js +1 -1
  338. package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__8973b16a._.js +1 -1
  339. package/cloud-runtime/standalone/.next/server/chunks/ssr/{[root-of-the-server]__1322ced8._.js → [root-of-the-server]__a416df95._.js} +2 -2
  340. package/cloud-runtime/standalone/.next/server/chunks/ssr/{[root-of-the-server]__783669c3._.js → [root-of-the-server]__c108f06c._.js} +2 -2
  341. package/cloud-runtime/standalone/.next/server/chunks/ssr/_064370bc._.js +1 -1
  342. package/cloud-runtime/standalone/.next/server/chunks/ssr/{_0f4e70b1._.js → _41f60c52._.js} +2 -2
  343. package/cloud-runtime/standalone/.next/server/chunks/ssr/_6b14826d._.js +3 -0
  344. package/cloud-runtime/standalone/.next/server/chunks/ssr/{_6fc3736e._.js → _84879a01._.js} +2 -2
  345. package/cloud-runtime/standalone/.next/server/chunks/ssr/_85ca101b._.js +1 -1
  346. package/cloud-runtime/standalone/.next/server/chunks/ssr/{_ff5799d6._.js → _9eeb2fa0._.js} +2 -2
  347. package/cloud-runtime/standalone/.next/server/chunks/ssr/{_68ac991e._.js → _a1d30b20._.js} +2 -2
  348. package/cloud-runtime/standalone/.next/server/chunks/ssr/{_5b2b8a85._.js → _c87c359c._.js} +2 -2
  349. package/cloud-runtime/standalone/.next/server/chunks/ssr/{_fb292eed._.js → _dd31b6e0._.js} +2 -2
  350. package/cloud-runtime/standalone/.next/server/chunks/ssr/{_6de3f1de._.js → _f0ce6183._.js} +2 -2
  351. package/cloud-runtime/standalone/.next/server/chunks/ssr/app_projects_[slug]_knowledge_page_tsx_e2a55cbd._.js +1 -1
  352. package/cloud-runtime/standalone/.next/server/chunks/ssr/components_chat-ui_bfeda794._.js +1 -1
  353. package/cloud-runtime/standalone/.next/server/chunks/ssr/components_thread_WorkspaceSidebar_tsx_e660301b._.js +1 -1
  354. package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_bf855424._.js +3 -0
  355. package/cloud-runtime/standalone/.next/server/functions-config-manifest.json +1 -0
  356. package/cloud-runtime/standalone/.next/server/middleware-manifest.json +5 -5
  357. package/cloud-runtime/standalone/.next/server/pages/404.html +2 -2
  358. package/cloud-runtime/standalone/.next/server/pages/500.html +2 -2
  359. package/cloud-runtime/standalone/.next/server/server-reference-manifest.js +1 -1
  360. package/cloud-runtime/standalone/.next/server/server-reference-manifest.json +1 -1
  361. package/cloud-runtime/standalone/.next/static/chunks/{a66e1891e808a664.js → 012e3e9699415997.js} +1 -1
  362. package/cloud-runtime/standalone/.next/static/chunks/031d99fbe758545a.js +1 -0
  363. package/cloud-runtime/standalone/.next/static/chunks/{87f099ea02aa419d.js → 116985039c24f1f8.js} +9 -9
  364. package/cloud-runtime/standalone/.next/static/chunks/2ee8d24314eec47c.js +1 -0
  365. package/cloud-runtime/standalone/.next/static/chunks/3a55441b018d52e4.js +1 -0
  366. package/cloud-runtime/standalone/.next/static/chunks/{cd308f61797939cd.js → 43f6157bc3db9c52.js} +2 -2
  367. package/cloud-runtime/standalone/.next/static/chunks/{58025a80caa3629d.js → 56a01238098d495d.js} +9 -9
  368. package/cloud-runtime/standalone/.next/static/chunks/{6fbe08eab578c7d3.js → 601996727991149e.js} +9 -9
  369. package/cloud-runtime/standalone/.next/static/chunks/851b1d97179bd39b.css +1 -0
  370. package/cloud-runtime/standalone/.next/static/chunks/90b581e9631d8cea.js +1 -0
  371. package/cloud-runtime/standalone/.next/static/chunks/b22947e6df238fd5.js +1 -0
  372. package/cloud-runtime/standalone/.next/static/chunks/{4200b512bdc226bc.js → b2dcd19ebe3af3f6.js} +9 -9
  373. package/cloud-runtime/standalone/.next/static/chunks/{e62d5fa120fdf21f.js → bc06988336ffd261.js} +1 -1
  374. package/cloud-runtime/standalone/.next/static/chunks/{1f415d0ce7ebbd08.js → c93b9643c81c134e.js} +1 -1
  375. package/cloud-runtime/standalone/.next/static/chunks/{88e24940a5d5d386.js → d78cc7d749043fef.js} +1 -1
  376. package/cloud-runtime/standalone/.next/static/chunks/ebaf4e8f04bae7b6.js +1 -0
  377. package/cloud-runtime/standalone/.next/static/chunks/f4909e7ae8229b1c.js +1 -0
  378. package/cloud-runtime/standalone/.next/static/chunks/fd221a50082e5128.js +1 -0
  379. package/cloud-runtime/standalone/app/api/chat/route.ts +36 -0
  380. package/cloud-runtime/standalone/app/api/knowledge-notes/route.ts +53 -0
  381. package/cloud-runtime/standalone/app/projects/[slug]/knowledge/page.tsx +210 -26
  382. package/cloud-runtime/standalone/components/chat-ui/ChatContainer.tsx +62 -41
  383. package/cloud-runtime/standalone/components/chat-ui/Markdown.tsx +19 -9
  384. package/cloud-runtime/standalone/components/thread/WorkspaceSidebar.tsx +33 -28
  385. package/cloud-runtime/standalone/hooks/useGroupChat.ts +4 -0
  386. package/cloud-runtime/standalone/hooks/useProcessPolling.ts +4 -3
  387. package/cloud-runtime/standalone/hooks/useThreadState.ts +10 -2
  388. package/cloud-runtime/standalone/lib/cli-runner.ts +212 -14
  389. package/cloud-runtime/standalone/lib/db.ts +1 -1
  390. package/cloud-runtime/standalone/lib/debug-log.ts +48 -0
  391. package/cloud-runtime/standalone/lib/history-store.ts +78 -2
  392. package/cloud-runtime/standalone/lib/orchestrator/chat-processor.ts +51 -0
  393. package/cloud-runtime/standalone/lib/orchestrator/runtime.ts +6 -0
  394. package/cloud-runtime/standalone/lib/queue/sqlite-adapter.ts +117 -2
  395. package/cloud-runtime/standalone/transcri +0 -0
  396. package/cloud-runtime/standalone/worker/index.js +604 -165
  397. package/lib/cli/runCli.js +0 -97
  398. package/lib/commands/update.js +159 -17
  399. package/package.json +1 -1
  400. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0925dd01._.js +0 -46
  401. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__12c7e188._.js +0 -29
  402. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__17c2d68f._.js +0 -52
  403. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__20b3baea._.js +0 -55
  404. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__254e942f._.js +0 -20
  405. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3198c5c8._.js +0 -52
  406. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__36d9edbd._.js +0 -67
  407. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4761dc17._.js +0 -8
  408. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4b1a512c._.js +0 -52
  409. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4dc25d71._.js +0 -18
  410. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__7be8f159._.js +0 -52
  411. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ac3c2f7f._.js +0 -52
  412. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__bfcedb7c._.js +0 -52
  413. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__e1e7dd1e._.js +0 -25
  414. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__e45a2a1d._.js +0 -3
  415. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fcd3e3b8._.js +0 -15
  416. package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ff9c61da._.js +0 -3
  417. package/cloud-runtime/standalone/.next/server/chunks/_66e1ddec._.js +0 -57
  418. package/cloud-runtime/standalone/.next/server/chunks/lib_09aac4e7._.js +0 -57
  419. package/cloud-runtime/standalone/.next/server/chunks/lib_cli-runner_ts_dfcf3fda._.js +0 -18
  420. package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_69b6b2e1.js +0 -3
  421. package/cloud-runtime/standalone/.next/server/chunks/ssr/_16c45024._.js +0 -3
  422. package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_678fa868._.js +0 -3
  423. package/cloud-runtime/standalone/.next/static/chunks/24a6ee21f430da93.js +0 -1
  424. package/cloud-runtime/standalone/.next/static/chunks/27129bea5b512ce8.js +0 -1
  425. package/cloud-runtime/standalone/.next/static/chunks/463edf3533d27a56.js +0 -1
  426. package/cloud-runtime/standalone/.next/static/chunks/5cb0c885b085ea6c.js +0 -1
  427. package/cloud-runtime/standalone/.next/static/chunks/60c054bb8b2cffa6.css +0 -1
  428. package/cloud-runtime/standalone/.next/static/chunks/7e2edf97bd6c0874.js +0 -1
  429. package/cloud-runtime/standalone/.next/static/chunks/8249f202d33d0d95.js +0 -1
  430. package/cloud-runtime/standalone/.next/static/chunks/9f8f719c4aa25e3d.js +0 -1
  431. package/cloud-runtime/standalone/.next/static/chunks/bc727d3d9993e9be.js +0 -1
  432. /package/cloud-runtime/standalone/.next/static/{i_9nSHyb52FGkCbRgv7EJ → 68nLQxEpwR_feFvB8T4tR}/_buildManifest.js +0 -0
  433. /package/cloud-runtime/standalone/.next/static/{i_9nSHyb52FGkCbRgv7EJ → 68nLQxEpwR_feFvB8T4tR}/_clientMiddlewareManifest.json +0 -0
  434. /package/cloud-runtime/standalone/.next/static/{i_9nSHyb52FGkCbRgv7EJ → 68nLQxEpwR_feFvB8T4tR}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,2651,e=>{"use strict";let t={threadSidebarVisible:!1,workspaceRoots:[],homeSearchConsent:!1,hasCompletedFirstRun:!1,fileIgnorePatterns:[]};function r(e){return e&&"object"==typeof e?{threadSidebarVisible:"boolean"==typeof e.threadSidebarVisible?e.threadSidebarVisible:t.threadSidebarVisible,workspaceRoots:Array.isArray(e.workspaceRoots)?e.workspaceRoots.filter(e=>"string"==typeof e):t.workspaceRoots,homeSearchConsent:"boolean"==typeof e.homeSearchConsent?e.homeSearchConsent:t.homeSearchConsent,hasCompletedFirstRun:"boolean"==typeof e.hasCompletedFirstRun?e.hasCompletedFirstRun:t.hasCompletedFirstRun,fileIgnorePatterns:Array.isArray(e.fileIgnorePatterns)?e.fileIgnorePatterns.filter(e=>"string"==typeof e):t.fileIgnorePatterns}:t}let n="/api/userPreferences";function a(e){return e.json().then(e=>e&&"object"==typeof e?r(e.preferences??e):r(e)).catch(()=>r(null))}function o(e){return e.statusText||`Failed to reach ${n} (${e.status})`}async function s(){let e=await fetch(n,{cache:"no-store"});if(!e.ok)throw Error(o(e));return a(e)}async function i(e){let t=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},cache:"no-store",body:JSON.stringify({preferences:e})});if(!t.ok)throw Error(o(t));return a(t)}e.s(["fetchUserPreferences",()=>s,"updateUserPreferences",()=>i],2651)},18566,(e,t,r)=>{t.exports=e.r(76562)},75254,e=>{"use strict";var t=e.i(71645);let r=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim(),n=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)};var a={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let o=(0,t.forwardRef)(({color:e="currentColor",size:n=24,strokeWidth:o=2,absoluteStrokeWidth:s,className:i="",children:l,iconNode:c,...d},u)=>(0,t.createElement)("svg",{ref:u,...a,width:n,height:n,stroke:e,strokeWidth:s?24*Number(o)/Number(n):o,className:r("lucide",i),...!l&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(d)&&{"aria-hidden":"true"},...d},[...c.map(([e,r])=>(0,t.createElement)(e,r)),...Array.isArray(l)?l:[l]])),s=(e,a)=>{let s=(0,t.forwardRef)(({className:s,...i},l)=>(0,t.createElement)(o,{ref:l,iconNode:a,className:r(`lucide-${n(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,s),...i}));return s.displayName=n(e),s};e.s(["default",()=>s],75254)},33525,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},98183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return l},searchParamsToUrlQuery:function(){return o},urlQueryToSearchParams:function(){return i}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});function o(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function s(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function i(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,s(e));else t.set(r,s(n));return t}function l(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},61746,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return i},formatWithValidation:function(){return c},urlObjectKeys:function(){return l}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=e.r(90809)._(e.r(98183)),s=/https?|ftp|gopher|file/;function i(e){let{auth:t,hostname:r}=e,n=e.protocol||"",a=e.pathname||"",i=e.hash||"",l=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),l&&"object"==typeof l&&(l=String(o.urlQueryToSearchParams(l)));let d=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||s.test(n))&&!1!==c?(c="//"+(c||""),a&&"/"!==a[0]&&(a="/"+a)):c||(c=""),i&&"#"!==i[0]&&(i="#"+i),d&&"?"!==d[0]&&(d="?"+d),a=a.replace(/[?#]/g,encodeURIComponent),d=d.replace("#","%23"),`${n}${c}${a}${d}${i}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return i(e)}},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return a}});let n=e.r(71645);function a(e,t){let r=(0,n.useRef)(null),a=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=a.current;t&&(a.current=null,t())}else e&&(r.current=o(e,n)),t&&(a.current=o(t,n))},[e,t])}function o(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18967,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return g},MiddlewareNotFoundError:function(){return j},MissingStaticPage:function(){return b},NormalizeError:function(){return y},PageNotFoundError:function(){return v},SP:function(){return h},ST:function(){return x},WEB_VITALS:function(){return o},execOnce:function(){return s},getDisplayName:function(){return u},getLocationOrigin:function(){return c},getURL:function(){return d},isAbsoluteUrl:function(){return l},isResSent:function(){return f},loadGetInitialProps:function(){return m},normalizeRepeatedSlashes:function(){return p},stringifyError:function(){return w}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=["CLS","FCP","FID","INP","LCP","TTFB"];function s(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let i=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>i.test(e);function c(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function d(){let{href:e}=window.location,t=c();return e.substring(t.length)}function u(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function p(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function m(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await m(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&f(r))return n;if(!n)throw Object.defineProperty(Error(`"${u(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return n}let h="u">typeof performance,x=h&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class g extends Error{}class y extends Error{}class v extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class b extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class j extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function w(e){return JSON.stringify({message:e.message,stack:e.stack})}},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return o}});let n=e.r(18967),a=e.r(52817);function o(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,a.hasBasePath)(r.pathname)}catch(e){return!1}}},84508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},22016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return g},useLinkStatus:function(){return v}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=e.r(90809),s=e.r(18050),i=o._(e.r(71645)),l=e.r(61746),c=e.r(8372),d=e.r(18581),u=e.r(18967),f=e.r(5550);e.r(33525);let p=e.r(91949),m=e.r(73668),h=e.r(9396);function x(e){return"string"==typeof e?e:(0,l.formatUrl)(e)}function g(t){var r;let n,a,o,[l,g]=(0,i.useOptimistic)(p.IDLE_LINK_STATUS),v=(0,i.useRef)(null),{href:b,as:j,children:w,prefetch:k=null,passHref:N,replace:C,shallow:S,scroll:P,onClick:E,onMouseEnter:I,onTouchStart:O,legacyBehavior:A=!1,onNavigate:R,ref:_,unstable_dynamicOnHover:T,...L}=t;n=w,A&&("string"==typeof n||"number"==typeof n)&&(n=(0,s.jsx)("a",{children:n}));let U=i.default.useContext(c.AppRouterContext),M=!1!==k,$=!1!==k?null===(r=k)||"auto"===r?h.FetchStrategy.PPR:h.FetchStrategy.Full:h.FetchStrategy.PPR,{href:F,as:D}=i.default.useMemo(()=>{let e=x(b);return{href:e,as:j?x(j):e}},[b,j]);if(A){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});a=i.default.Children.only(n)}let G=A?a&&"object"==typeof a&&a.ref:_,V=i.default.useCallback(e=>(null!==U&&(v.current=(0,p.mountLinkInstance)(e,F,U,$,M,g)),()=>{v.current&&((0,p.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,p.unmountPrefetchableInstance)(e)}),[M,F,U,$,g]),z={ref:(0,d.useMergedRef)(V,G),onClick(t){A||"function"!=typeof E||E(t),A&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!U||t.defaultPrevented||function(t,r,n,a,o,s,l){if("u">typeof window){let c,{nodeName:d}=t.currentTarget;if("A"===d.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(r)){o&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),l){let e=!1;if(l({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:u}=e.r(99781);i.default.startTransition(()=>{u(n||r,o?"replace":"push",s??!0,a.current)})}}(t,F,D,v,C,P,R)},onMouseEnter(e){A||"function"!=typeof I||I(e),A&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),U&&M&&(0,p.onNavigationIntent)(e.currentTarget,!0===T)},onTouchStart:function(e){A||"function"!=typeof O||O(e),A&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),U&&M&&(0,p.onNavigationIntent)(e.currentTarget,!0===T)}};return(0,u.isAbsoluteUrl)(D)?z.href=D:A&&!N&&("a"!==a.type||"href"in a.props)||(z.href=(0,f.addBasePath)(D)),o=A?i.default.cloneElement(a,z):(0,s.jsx)("a",{...L,...z,children:n}),(0,s.jsx)(y.Provider,{value:l,children:o})}e.r(84508);let y=(0,i.createContext)(p.IDLE_LINK_STATUS),v=()=>(0,i.useContext)(y);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},7233,e=>{"use strict";let t=(0,e.i(75254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",()=>t],7233)},37727,e=>{"use strict";let t=(0,e.i(75254).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["X",()=>t],37727)},55838,(e,t,r)=>{"use strict";var n=e.r(71645),a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useState,s=n.useEffect,i=n.useLayoutEffect,l=n.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!a(e,r)}catch(e){return!0}}var d="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=o({inst:{value:r,getSnapshot:t}}),a=n[0].inst,d=n[1];return i(function(){a.value=r,a.getSnapshot=t,c(a)&&d({inst:a})},[e,r,t]),s(function(){return c(a)&&d({inst:a}),e(function(){c(a)&&d({inst:a})})},[e]),l(r),r};r.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:d},2239,(e,t,r)=>{"use strict";t.exports=e.r(55838)},52822,(e,t,r)=>{"use strict";var n=e.r(71645),a=e.r(2239),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=a.useSyncExternalStore,i=n.useRef,l=n.useEffect,c=n.useMemo,d=n.useDebugValue;r.useSyncExternalStoreWithSelector=function(e,t,r,n,a){var u=i(null);if(null===u.current){var f={hasValue:!1,value:null};u.current=f}else f=u.current;var p=s(e,(u=c(function(){function e(e){if(!l){if(l=!0,s=e,e=n(e),void 0!==a&&f.hasValue){var t=f.value;if(a(t,e))return i=t}return i=e}if(t=i,o(s,e))return t;var r=n(e);return void 0!==a&&a(t,r)?(s=e,t):(s=e,i=r)}var s,i,l=!1,c=void 0===r?null:r;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]},[t,r,n,a]))[0],u[1]);return l(function(){f.hasValue=!0,f.value=p},[p]),d(p),p}},30224,(e,t,r)=>{"use strict";t.exports=e.r(52822)},14683,e=>{"use strict";let t=(0,e.i(75254).default)("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["Circle",()=>t],14683)},63209,e=>{"use strict";let t=(0,e.i(75254).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["AlertCircle",()=>t],63209)},68054,e=>{"use strict";let t=(0,e.i(75254).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",()=>t],68054)},61073,e=>{"use strict";var t=e.i(18050),r=e.i(71645),n=e.i(18566),a=e.i(22016);let o=[{id:"jane",name:"Jane",provider:"claude",model:"claude-opus-4-6",color:"#6366f1"},{id:"cody",name:"Cody",provider:"claude",model:"gpt-5.3",color:"#f59e0b"},{id:"flint",name:"Flint",provider:"ollama",model:"gemini-3.1-pro",color:"#10b981"},{id:"jewel",name:"Jewel",provider:"claude",model:"glm-5",color:"#ec4899"}],s=Date.now(),i=[{id:"demo-0",role:"user",participantId:null,content:"We're losing 40% of users at the onboarding config screen. How should we fix this?",timestamp:s-9e3},{id:"demo-1",role:"assistant",participantId:"jane",content:"The core problem is we're asking for setup before showing value. Users don't know *why* they need an API key yet. Flip the order — let them see the product working first, then ask for config when they actually need it.",timestamp:s-8e3},{id:"demo-2",role:"assistant",participantId:"cody",content:"We can prove that with a zero-config starter task: detect `package.json` or `.git` on load, run a local project analysis. No API key needed, instant result. That alone should cut the drop-off significantly.",timestamp:s-7e3},{id:"demo-3",role:"assistant",participantId:"flint",content:"Risk: if we defer config entirely, the *second* interaction fails when there's no provider configured. We'd just move the drop-off from step 1 to step 2. Need to handle that transition carefully.",timestamp:s-6e3},{id:"demo-4",role:"assistant",participantId:"jewel",content:"Graduated fidelity solves this. First task is local-only and always succeeds. When they trigger something that needs an LLM, prompt for the key *inline* — right where they need it, not on a separate page. Context-sensitive setup.",timestamp:s-5e3},{id:"demo-5",role:"assistant",participantId:"jane",content:"Exactly. Setup instructions are only useful at the moment you need them. Front-loading them is just anxiety. I'd also suggest we track `welcome_view → first_action → first_result` to measure the actual impact.",timestamp:s-4e3},{id:"demo-6",role:"assistant",participantId:"cody",content:'Here\'s a concrete implementation plan:\n1. Add framework detection on page load\n2. Show "Map this project" as default starter task\n3. Run it client-side with zero dependencies\n4. Persist the result so they land in a live session, not a blank page',timestamp:s-3e3},{id:"demo-7",role:"assistant",participantId:"flint",content:"One more thing — keep state from that first task. When they transition to the real workspace, they should land mid-session. Starting over after the demo kills momentum and trust.",timestamp:s-2e3},{id:"demo-8",role:"assistant",participantId:"jewel",content:"Summary: land → see agents working → join with one click → first task runs instantly → setup happens only when needed. Every step earns the next. Shall I draft the implementation spec?",timestamp:s-1e3}];var l=e.i(25459),c=e.i(14065),d=e.i(84614);function u(){let[e,n]=(0,r.useState)(0),s=(0,r.useRef)(null);(0,r.useEffect)(()=>{if(e>=i.length)return;let t=setTimeout(()=>{n(e=>e+1)},0===e?300:400);return()=>clearTimeout(t)},[e]),(0,r.useEffect)(()=>{s.current?.scrollTo({top:s.current.scrollHeight,behavior:"smooth"})},[e]);let u=Object.fromEntries(o.map(e=>[e.id,e]));return(0,t.jsx)("div",{ref:s,className:"flex-1 overflow-y-auto px-4 py-6",children:(0,t.jsx)("div",{className:"max-w-2xl mx-auto space-y-4",children:i.slice(0,e).map((e,r)=>{let n="user"===e.role,o=e.participantId?u[e.participantId]:null;return(0,t.jsxs)("div",{className:"flex gap-3 animate-in fade-in slide-in-from-bottom-2 duration-300",style:{animationDelay:`${50*r}ms`},children:[(0,t.jsx)("div",{className:"w-8 h-8 rounded-full overflow-hidden border border-[var(--border)] shadow-sm shrink-0 mt-0.5 flex items-center justify-center bg-[var(--muted)]",children:n?(0,t.jsx)(d.User,{className:"w-4 h-4 text-[var(--muted-foreground)]"}):o?(0,t.jsx)(a.default,{href:`/agents/${o.id}`,className:"w-full h-full hover:ring-2 hover:ring-blue-300 rounded-full transition-shadow",children:(0,t.jsx)("img",{src:(0,l.agentAvatarUrl)(o.id,32,o.color),alt:o.name,className:"w-full h-full object-cover"})}):null}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-baseline gap-2",children:[!n&&o?(0,t.jsx)(a.default,{href:`/agents/${o.id}`,className:"text-[12px] font-bold tracking-wide uppercase hover:underline",style:{color:o.color||"#64748b"},children:o.name}):(0,t.jsx)("span",{className:"text-[12px] font-bold tracking-wide uppercase",style:{color:n?"#334155":"#64748b"},children:n?"You":"Agent"}),!n&&o?.model&&(0,t.jsx)("span",{className:"text-[10px] text-[var(--muted-foreground)] font-medium",children:o.model})]}),(0,t.jsx)("div",{className:"text-[14px] text-[var(--foreground)] leading-relaxed mt-0.5",children:(0,t.jsx)(c.Markdown,{content:e.content,isUser:n})})]})]},e.id)})})})}var f=e.i(2651),p=e.i(43531),m=e.i(14683),h=e.i(74886),x=e.i(64659);let g=(0,e.i(75254).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);var y=e.i(68054),v=e.i(63209);let b=[{id:"claude",label:"Claude Code",bin:"claude",description:"Recommended for the fastest AGX setup.",installCmd:"npm install -g @anthropic-ai/claude-code",docsUrl:"https://docs.anthropic.com/en/docs/claude-code/quickstart",recommended:!0,statusLabel:"Installed"},{id:"codex",label:"Codex",bin:"codex",description:"OpenAI's terminal coding agent.",installCmd:"npm install -g @openai/codex",docsUrl:"https://github.com/openai/codex",statusLabel:"Installed"},{id:"gemini",label:"Gemini CLI",bin:"gemini",description:"Google's CLI for Gemini workflows.",installCmd:"npm install -g @google/gemini-cli",docsUrl:"https://github.com/google-gemini/gemini-cli",statusLabel:"Installed"},{id:"ollama",label:"Ollama",bin:"ollama",description:"Run local models on your machine.",installCmd:"curl -fsSL https://ollama.com/install.sh | sh",docsUrl:"https://ollama.com/download",statusLabel:"Installed"},{id:"zai",label:"Z.AI",bin:"claude",description:"Use the Claude CLI with your Z.AI API key.",installCmd:"npm install -g @anthropic-ai/claude-code",docsUrl:"https://z.ai/",installNote:"Requires Claude Code plus a configured Z.AI API key.",statusLabel:"Via Claude CLI"}].map(e=>({id:e.id,name:e.label,description:e.description,installCmd:e.installCmd,docsUrl:e.docsUrl,installNote:e.installNote,recommended:e.recommended}));function j({text:e}){let[n,a]=(0,r.useState)(!1),o=(0,r.useCallback)(()=>{navigator.clipboard.writeText(e).then(()=>{a(!0),setTimeout(()=>a(!1),2e3)})},[e]);return(0,t.jsx)("button",{type:"button",onClick:o,className:"p-1.5 rounded-md hover:bg-[var(--muted)] transition-colors text-[var(--muted-foreground)] hover:text-[var(--foreground)]",title:"Copy command",children:n?(0,t.jsx)(p.Check,{className:"w-3.5 h-3.5 text-emerald-500"}):(0,t.jsx)(h.Copy,{className:"w-3.5 h-3.5"})})}function w({cli:e}){let[n,a]=(0,r.useState)(!1);return(0,t.jsxs)("div",{className:"border border-[var(--card-border)] rounded-lg overflow-hidden",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>a(!n),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-[var(--item-hover-bg)] transition-colors text-left",children:[(0,t.jsx)("div",{className:"shrink-0",children:null===e.installed?(0,t.jsx)(m.Circle,{className:"w-4 h-4 text-[var(--muted-foreground)] animate-pulse"}):e.installed?(0,t.jsx)("div",{className:"w-5 h-5 rounded-full bg-emerald-100 dark:bg-emerald-900/30 flex items-center justify-center",children:(0,t.jsx)(p.Check,{className:"w-3 h-3 text-emerald-600 dark:text-emerald-400"})}):(0,t.jsx)(m.Circle,{className:"w-4 h-4 text-[var(--muted-foreground)]"})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-[14px] font-semibold text-[var(--foreground)]",children:e.name}),e.recommended&&!e.installed&&(0,t.jsx)("span",{className:"text-[11px] font-medium text-[var(--foreground)] bg-[var(--secondary)] px-1.5 py-0.5 rounded",children:"Recommended"}),e.installed&&(0,t.jsx)("span",{className:"text-[11px] font-medium text-emerald-600 dark:text-emerald-400 bg-emerald-50 dark:bg-emerald-900/20 px-1.5 py-0.5 rounded",children:"Installed"})]}),(0,t.jsx)("p",{className:"text-[12px] text-[var(--muted-foreground)]",children:e.description})]}),!e.installed&&(0,t.jsx)(x.ChevronDown,{className:`w-4 h-4 text-[var(--muted-foreground)] transition-transform ${n?"rotate-180":""}`})]}),n&&!e.installed&&(0,t.jsxs)("div",{className:"px-4 pb-3 border-t border-[var(--card-border)]",children:[(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-2 bg-[var(--secondary)] rounded-md px-3 py-2 font-mono text-[13px] text-[var(--foreground)]",children:[(0,t.jsx)(y.Terminal,{className:"w-3.5 h-3.5 text-[var(--muted-foreground)] shrink-0"}),(0,t.jsx)("code",{className:"flex-1 overflow-x-auto whitespace-nowrap",children:e.installCmd}),(0,t.jsx)(j,{text:e.installCmd})]}),(0,t.jsxs)("a",{href:e.docsUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 mt-2 text-[12px] text-[var(--primary)] hover:underline",children:["Documentation",(0,t.jsx)(g,{className:"w-3 h-3"})]}),e.installNote?(0,t.jsx)("p",{className:"mt-2 text-[12px] text-[var(--muted-foreground)]",children:e.installNote}):null]})]})}function k(){let e=(0,n.useRouter)(),[a,o]=(0,r.useState)("checking"),[s,i]=(0,r.useState)(b.map(e=>({...e,installed:null}))),[l,c]=(0,r.useState)(!1),[d,p]=(0,r.useState)(!1),[m,h]=(0,r.useState)(null);(0,r.useEffect)(()=>{let e=!1;return(async()=>{try{let t=await fetch("/api/providers",{cache:"no-store"});if(e)return;if(!t.ok)return void o("error");let r=await t.json(),n=new Set(Array.isArray(r?.providers)?r.providers.filter(e=>e&&"string"==typeof e.id).map(e=>e.id):[]),a=b.map(e=>({...e,installed:n.has(e.id)}));!e&&(i(a),a.some(e=>e.installed)?e||o("ready"):e||(o("needs-setup"),c(!0)))}catch{e||o("error")}})(),()=>{e=!0}},[]);let g=(0,r.useCallback)(async()=>{p(!0),h(null);try{await (0,f.updateUserPreferences)({hasCompletedFirstRun:!0});let t=await fetch("/api/daemon");if(!t.ok)throw Error(`Could not read daemon status (${t.status})`);if(!(await t.json()).running){let e=await fetch("/api/daemon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workers:1})});if(!e.ok)throw Error(`Could not start AGX (${e.status})`)}e.push("/")}catch(e){console.error("Failed to finalize onboarding",e),h(e instanceof Error?e.message:"Could not complete setup. Try again.")}finally{p(!1)}},[e]),y=s.filter(e=>e.installed).length,j=s.length,k=s.find(e=>e.recommended)??s[0]??null,N=s.filter(e=>!e.recommended);return(0,t.jsxs)("div",{className:"h-screen w-full flex flex-col bg-[var(--secondary)]",children:[(0,t.jsx)("div",{className:"text-center pt-10 pb-2 px-4",children:(0,t.jsx)("h1",{className:"text-[15px] font-medium text-[var(--app-shell-soft-text)] tracking-wide",children:"Chat with a team of AI agents across Claude, Gemini, Codex, Ollama, and Z.AI"})}),(0,t.jsx)(u,{}),(0,t.jsxs)("div",{className:"pb-8 pt-4 flex flex-col items-center gap-3 px-4",children:["ready"===a&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",onClick:g,disabled:d,className:"inline-flex items-center gap-2 px-8 py-3.5 bg-[var(--foreground)] text-[var(--background)] text-[15px] font-semibold rounded-xl hover:opacity-90 transition-all duration-200 shadow-lg shadow-[var(--foreground)]/10 hover:-translate-y-0.5 disabled:opacity-60 disabled:hover:translate-y-0",children:d?"Starting AGX...":"Launch AGX"}),(0,t.jsxs)("button",{type:"button",onClick:()=>c(e=>!e),className:"text-[13px] text-[var(--muted-foreground)] hover:text-[var(--foreground)] transition-colors flex items-center gap-1",children:[(0,t.jsxs)("span",{className:"text-emerald-600",children:[y,"/",j," providers"]}),(0,t.jsx)(x.ChevronDown,{className:`w-3.5 h-3.5 transition-transform ${l?"rotate-180":""}`})]})]}),"checking"===a&&(0,t.jsx)("span",{className:"text-[13px] text-[var(--app-shell-soft-text)]",children:"Detecting installed providers..."}),"needs-setup"===a&&(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("p",{className:"text-[14px] font-medium text-amber-600 dark:text-amber-400",children:"No providers found"}),(0,t.jsx)("p",{className:"text-[13px] text-[var(--muted-foreground)] mt-1",children:"Start with Claude Code, then come back to launch AGX"})]}),"error"===a&&(0,t.jsx)("span",{className:"text-[13px] text-[var(--app-shell-soft-text)]",children:"Could not check installed providers"}),m?(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-[12px] text-amber-800",children:[(0,t.jsx)(v.AlertCircle,{className:"h-3.5 w-3.5 shrink-0"}),m]}):null]}),l&&(0,t.jsx)("div",{className:"border-t border-[var(--card-border)] bg-[var(--background)] overflow-y-auto",children:(0,t.jsxs)("div",{className:"max-w-lg mx-auto px-4 py-6",children:[(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)("h2",{className:"text-[14px] font-semibold text-[var(--foreground)]",children:"Provider CLIs"}),(0,t.jsx)("p",{className:"mt-1 text-[12px] text-[var(--muted-foreground)]",children:"Install one provider to finish setup. Claude Code is the best first path."})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[k?(0,t.jsxs)("div",{className:"rounded-xl border border-[var(--card-border)] bg-[var(--secondary)] p-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-[var(--muted-foreground)]",children:"Start Here"}),(0,t.jsx)("span",{className:"rounded bg-[var(--background)] px-2 py-0.5 text-[11px] font-medium text-[var(--foreground)]",children:k.name})]}),(0,t.jsx)("p",{className:"mt-2 text-[13px] text-[var(--foreground)]",children:"Install Claude Code first if you want the shortest path into AGX."}),(0,t.jsx)("p",{className:"mt-1 text-[12px] text-[var(--muted-foreground)]",children:"Codex, Gemini CLI, Ollama, and Z.AI are available if they fit your stack better."})]}):null,k?(0,t.jsx)(w,{cli:k},k.id):null]}),N.length>0?(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("h3",{className:"mb-2 text-[12px] font-semibold uppercase tracking-wide text-[var(--muted-foreground)]",children:"Other Options"}),(0,t.jsx)("div",{className:"space-y-2",children:N.map(e=>(0,t.jsx)(w,{cli:e},e.id))})]}):null,"ready"===a?(0,t.jsx)("p",{className:"text-[12px] text-[var(--muted-foreground)] mt-4 text-center",children:"Setup is complete. Launch AGX when you're ready."}):null,"needs-setup"===a?(0,t.jsx)("p",{className:"text-[12px] text-[var(--muted-foreground)] mt-4 text-center",children:"After installing a CLI, restart AGX so it can detect the new provider."}):null]})})]})}e.s(["default",()=>k],61073)}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,86311,e=>{"use strict";let t=(0,e.i(75254).default)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);e.s(["MessageSquare",()=>t],86311)},78583,e=>{"use strict";let t=(0,e.i(75254).default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);e.s(["FileText",()=>t],78583)},61090,e=>{"use strict";var t=e.i(18050),r=e.i(71645),a=e.i(14065),s=e.i(23385),o=e.i(78583),n=e.i(90272),l=e.i(86311),d=e.i(7233),i=e.i(55436);let c=(0,e.i(75254).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 u=e.i(27612),x=e.i(37727),m=e.i(74049);function p(e){return e?{id:e.id,content:e.content,created_at:e.createdAt,updated_at:e.updatedAt,source:e.sourceType}:null}function f({params:e}){let{slug:a}=(0,r.use)(e),{projects:c}=(0,m.useProjects)(),x=c.find(e=>e.slug===a),f=x?.id??null,{skills:y,addSkill:N,removeSkill:w}=function(e){let[t,a]=(0,r.useState)([]),[s,o]=(0,r.useState)(!0),n=(0,r.useCallback)(async()=>{if(!e){a([]),o(!1);return}try{let t=await fetch(`/api/projects/${e}/skills`);if(!t.ok)return;let r=await t.json();a(r.skills??[])}catch{}finally{o(!1)}},[e]);return(0,r.useEffect)(()=>{n()},[n]),{skills:t,isLoading:s,addSkill:(0,r.useCallback)(async(t,r)=>{if(e)try{(await fetch(`/api/projects/${e}/skills`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:t,condition:r})})).ok&&await n()}catch{}},[e,n]),removeSkill:(0,r.useCallback)(async t=>{if(e)try{(await fetch(`/api/projects/${e}/skills?skillId=${t}`,{method:"DELETE"})).ok&&a(e=>e.filter(e=>e.id!==t))}catch{}},[e]),refresh:n}}(f),{memory:k,addMemory:C,deleteMemory:S}=function(e){let[t,a]=(0,r.useState)([]),[s,o]=(0,r.useState)(!0),n=(0,r.useCallback)(async()=>{if(!e){a([]),o(!1);return}try{let t=await fetch(`/api/projects/${e}/memory?producer=human`);if(!t.ok)return;let r=await t.json();a(r.memory??[])}catch{}finally{o(!1)}},[e]);return(0,r.useEffect)(()=>{n()},[n]),{memory:t,isLoading:s,addMemory:(0,r.useCallback)(async(t,r)=>{if(e)try{(await fetch(`/api/projects/${e}/memory`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t,source:r,producer:"human"})})).ok&&await n()}catch{}},[e,n]),deleteMemory:(0,r.useCallback)(async t=>{if(e)try{(await fetch(`/api/projects/${e}/memory?memoryId=${t}`,{method:"DELETE"})).ok&&a(e=>e.filter(e=>e.id!==t))}catch{}},[e]),refresh:n}}(f),[L,T]=(0,r.useState)("project"),[z,E]=(0,r.useState)(""),[M,P]=(0,r.useState)(!1),[$,A]=(0,r.useState)(""),[F,O]=(0,r.useState)(""),[R,H]=(0,r.useState)(""),[I,U]=(0,r.useState)(null),[D,B]=(0,r.useState)({}),[_,q]=(0,r.useState)({});(0,r.useEffect)(()=>{x?.repos&&B(e=>{let t={};for(let r of x.repos)t[r.id]=e[r.id]??r.notes??"";return t})},[x?.repos]),(0,r.useEffect)(()=>{let e=!1;return async function(){let t=x?.repos??[];if(0!==t.length)try{let r=await Promise.all(t.map(async e=>{let t=await fetch(`/api/repos/${e.id}/knowledge?producer=human`),r=((t.ok?await t.json():{knowledge:[]}).knowledge??[]).map(e=>String(e.content??"").trim()).filter(Boolean).join("\n\n");return[e.id,r]}));e||B(e=>{let t={...e};for(let[e,a]of r)a&&(t[e]=a);return t})}catch{}}(),()=>{e=!0}},[x?.repos]),(0,r.useEffect)(()=>{let e=!1;return async function(){if(!f)return U(null);try{let t=await fetch(`/api/knowledge-notes?scope=project&subjectId=${encodeURIComponent(f)}`),r=t.ok?await t.json():{note:null};e||U(p(r.note))}catch{e||U(null)}}(),()=>{e=!0}},[f]),(0,r.useEffect)(()=>{let e=!1;return async function(){let t=x?.repos??[];if(0===t.length)return q({});try{let r=await Promise.all(t.map(async e=>{let t=await fetch(`/api/knowledge-notes?scope=repo&subjectId=${encodeURIComponent(e.id)}`),r=t.ok?await t.json():{note:null};return[e.id,p(r.note)]}));e||q(Object.fromEntries(r))}catch{e||q({})}}(),()=>{e=!0}},[x?.repos]);let J=y.filter(e=>!z||e.file.toLowerCase().includes(z.toLowerCase())||(e.condition??"").toLowerCase().includes(z.toLowerCase())),G=k.filter(e=>!z||e.content.toLowerCase().includes(z.toLowerCase())),K=!z||I?.content.toLowerCase().includes(z.toLowerCase()),V=(x?.repos??[]).filter(e=>{if(!z)return!0;let t=z.toLowerCase(),r=(D[e.id]??"").toLowerCase(),a=(_[e.id]?.content??"").toLowerCase();return e.name.toLowerCase().includes(t)||(e.path??"").toLowerCase().includes(t)||r.includes(t)||a.includes(t)});return x?(0,t.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,t.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,t.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between sm:gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,t.jsx)("span",{className:"font-semibold text-[var(--foreground)]",children:x.name}),(0,t.jsx)("span",{className:"text-[var(--muted-foreground)]",children:"/"}),(0,t.jsx)("span",{className:"text-[var(--muted-foreground)]",children:"Knowledge"})]}),(0,t.jsxs)("div",{className:"relative w-full sm:max-w-xs",children:[(0,t.jsx)(i.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--app-shell-soft-text)]",size:14}),(0,t.jsx)("input",{type:"text",placeholder:"Search notes...",value:z,onChange:e=>E(e.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,t.jsx)("div",{className:"flex-shrink-0 px-3 pb-2 pt-4 sm:px-6",children:(0,t.jsxs)("div",{className:"flex w-fit gap-1 rounded-xl border border-[var(--border)] bg-[var(--secondary)] p-1",children:[(0,t.jsx)(h,{active:"project"===L,onClick:()=>T("project"),icon:(0,t.jsx)(s.BrainCircuit,{size:14}),label:"Project"}),(0,t.jsx)(h,{active:"repos"===L,onClick:()=>T("repos"),icon:(0,t.jsx)(n.FolderGit2,{size:14}),label:"Repositories"})]})}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto px-3 pb-8 sm:px-6",children:"project"===L?(0,t.jsxs)("div",{className:"mt-2 grid grid-cols-12 gap-4 sm:gap-6",children:[(0,t.jsx)("div",{className:"col-span-12 lg:col-span-4 space-y-4",children:(0,t.jsxs)("div",{className:"rounded-2xl border border-[var(--border)] bg-[var(--card-bg)] p-5 shadow-[var(--shadow-sm)]",children:[(0,t.jsx)("h3",{className:"mb-4 text-[10px] font-black uppercase tracking-[0.2em] text-[var(--app-shell-soft-text)]",children:"Overview"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsx)(v,{label:"References",value:J.length,sub:"File-backed"}),(0,t.jsx)(v,{label:"Notes",value:G.length,sub:"Human-authored"})]}),(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(v,{label:"System Note",value:+!!I?.content,sub:"Living doc"})})]})}),(0,t.jsxs)("div",{className:"col-span-12 lg:col-span-8 space-y-4",children:[(0,t.jsxs)("section",{className:"rounded-2xl border border-[var(--border)] bg-[var(--card-bg)] p-5 shadow-[var(--shadow-sm)]",children:[(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsxs)("h2",{className:"flex items-center gap-2 text-sm font-semibold text-[var(--foreground)]",children:[(0,t.jsx)(s.BrainCircuit,{size:16,className:"text-[var(--primary)]"}),"Living Project Note"]}),(0,t.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,t.jsx)(g,{note:K?I:I?.content?{...I,content:""}:null,emptyLabel:z?"No matching project note content.":"No project note yet.",scope:"project",subjectId:f??"",onSaved:U})]}),(0,t.jsxs)("section",{className:"rounded-2xl border border-[var(--border)] bg-[var(--card-bg)] p-5 shadow-[var(--shadow-sm)]",children:[(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsxs)("h2",{className:"flex items-center gap-2 text-sm font-semibold text-[var(--foreground)]",children:[(0,t.jsx)(o.FileText,{size:16,className:"text-[var(--primary)]"}),"Human-Authored References"]}),(0,t.jsx)("p",{className:"mt-1 text-xs text-[var(--muted-foreground)]",children:"File-backed project knowledge for project-specific instructions."})]}),J.length>0&&(0,t.jsx)("div",{className:"mb-4 grid grid-cols-1 gap-2 md:grid-cols-2",children:J.map(e=>(0,t.jsxs)("div",{className:"group flex items-start gap-3 rounded-xl border border-[var(--border)] bg-[var(--secondary)] p-3",children:[(0,t.jsx)("div",{className:"flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-lg bg-[var(--primary-muted)]",children:(0,t.jsx)(o.FileText,{size:14,className:"text-[var(--primary)]"})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("div",{className:"truncate break-all font-mono text-xs text-[var(--secondary-foreground)]",children:e.file}),e.condition&&(0,t.jsx)("div",{className:"mt-0.5 text-[11px] text-[var(--muted-foreground)]",children:e.condition})]}),(0,t.jsx)("button",{type:"button",onClick:()=>void w(e.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,t.jsx)(u.Trash2,{className:"h-3.5 w-3.5"})})]},e.id))}),M?(0,t.jsxs)("div",{className:"space-y-2 rounded-xl border border-[var(--border)] bg-[var(--secondary)] p-3",children:[(0,t.jsx)("input",{type:"text",value:$,onChange:e=>A(e.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,t.jsx)("input",{type:"text",value:F,onChange:e=>O(e.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,t.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{P(!1),A(""),O("")},className:"px-3 py-1.5 text-xs text-[var(--muted-foreground)]",children:"Cancel"}),(0,t.jsxs)("button",{type:"button",onClick:async()=>{let e=$.trim();e&&(await N(e,F.trim()||void 0),A(""),O(""),P(!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,t.jsx)(d.Plus,{className:"h-3.5 w-3.5"}),"Add"]})]})]}):(0,t.jsxs)("button",{type:"button",onClick:()=>P(!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,t.jsx)(d.Plus,{size:16,className:"transition-transform group-hover:scale-110"}),"Add Reference"]})]}),(0,t.jsxs)("section",{className:"rounded-2xl border border-[var(--border)] bg-[var(--card-bg)] p-5 shadow-[var(--shadow-sm)]",children:[(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsxs)("h2",{className:"flex items-center gap-2 text-sm font-semibold text-[var(--foreground)]",children:[(0,t.jsx)(l.MessageSquare,{size:16,className:"text-[var(--primary)]"}),"Project Notes"]}),(0,t.jsx)("p",{className:"mt-1 text-xs text-[var(--muted-foreground)]",children:"Human-authored coordination notes."})]}),G.length>0&&(0,t.jsx)("div",{className:"mb-4 space-y-2",children:G.map(e=>(0,t.jsx)(b,{content:e.content,source:e.source||"project",time:new Date(e.created_at).toLocaleString(),onDelete:()=>void S(e.id)},e.id))}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("textarea",{value:R,onChange:e=>H(e.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)]"}),R.trim()&&(0,t.jsx)("button",{type:"button",onClick:async()=>{let e=R.trim();e&&(await C(e,"human-authored"),H(""))},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,t.jsx)("div",{className:"mt-2 space-y-4",children:0===V.length?(0,t.jsxs)("div",{className:"rounded-2xl border border-dashed border-[var(--border)] px-6 py-12 text-center",children:[(0,t.jsx)(n.FolderGit2,{size:32,className:"mx-auto mb-3 text-[var(--app-shell-soft-text)]"}),(0,t.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:0===x.repos.length?"This project has no repos attached yet.":"No matching repositories."})]}):(0,t.jsx)("div",{className:"grid grid-cols-1 gap-4 xl:grid-cols-2",children:V.map(e=>(0,t.jsx)(j,{repo:e,draft:D[e.id]??"",systemNote:_[e.id]??null,systemNoteMatches:!z||(_[e.id]?.content??"").toLowerCase().includes(z.toLowerCase()),onDraftChange:t=>B(r=>({...r,[e.id]:t})),onSave:async()=>{await fetch(`/api/repos/${e.id}/knowledge`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({producer:"human",content:D[e.id]??""})}).then(async e=>{if(!e.ok)throw Error((await e.json().catch(()=>({}))).error||"Failed to save")})},onSystemNoteSaved:t=>q(r=>({...r,[e.id]:t}))},e.id))})})})]}):(0,t.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,t.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"Loading..."})})}function h({active:e,onClick:r,icon:a,label:s}){return(0,t.jsxs)("button",{onClick:r,className:`flex items-center gap-2 rounded-lg px-4 py-1.5 text-xs font-semibold transition-all ${e?"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:[a,s]})}function v({label:e,value:r,sub:a}){return(0,t.jsxs)("div",{className:"flex flex-col rounded-xl border border-[var(--border)] bg-[var(--secondary)] p-4",children:[(0,t.jsx)("span",{className:"text-[10px] font-black uppercase tracking-[0.2em] text-[var(--app-shell-soft-text)]",children:e}),(0,t.jsx)("span",{className:"mt-1 text-2xl font-bold text-[var(--foreground)]",children:r}),(0,t.jsx)("span",{className:"mt-1 text-[10px] text-[var(--app-shell-soft-text)]",children:a})]})}function g({note:e,emptyLabel:s,scope:o,subjectId:n,onSaved:l}){let[d,i]=(0,r.useState)(!1),[u,m]=(0,r.useState)(e?.content??""),[f,h]=(0,r.useState)(!1),[v,g]=(0,r.useState)(null);(0,r.useEffect)(()=>{m(e?.content??"")},[e?.id,e?.content]);let b=!!e?.content.trim(),j=e?.updated_at??e?.created_at,y=e?.source;async function N(){if(n){h(!0),g(null);try{let e=await fetch("/api/knowledge-notes",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({scope:o,subjectId:n,content:u})}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Failed to save knowledge note");let r=p(t.note);l(r),m(r?.content??""),i(!1)}catch(e){g(e instanceof Error?e.message:"Failed to save knowledge note")}finally{h(!1)}}}return b?(0,t.jsxs)("div",{className:"rounded-xl border border-[var(--border)] bg-[var(--secondary)] p-4",children:[(0,t.jsxs)("div",{className:"mb-3 flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-[11px] text-[var(--app-shell-soft-text)]",children:[j?(0,t.jsxs)("span",{children:["Updated ",new Date(j).toLocaleString()]}):null,y?(0,t.jsx)("span",{children:y}):null]}),d?null:(0,t.jsxs)("button",{type:"button",onClick:()=>{m(e?.content??""),g(null),i(!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,t.jsx)(c,{className:"h-3.5 w-3.5"}),"Edit"]})]}),d?(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("textarea",{value:u,onChange:e=>m(e.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..."}),v?(0,t.jsx)("p",{className:"text-xs text-red-500",children:v}):null,(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>{m(e?.content??""),g(null),i(!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:f,children:[(0,t.jsx)(x.X,{className:"h-3.5 w-3.5"}),"Cancel"]}),(0,t.jsx)("button",{type:"button",onClick:()=>void N(),disabled:f,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:f?"Saving...":"Save"})]})]}):(0,t.jsx)("div",{className:"text-sm leading-relaxed text-[var(--secondary-foreground)]",children:(0,t.jsx)(a.Markdown,{content:e?.content??""})})]}):(0,t.jsxs)("div",{className:"rounded-xl border border-dashed border-[var(--border)] px-4 py-6 text-sm text-[var(--muted-foreground)]",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("span",{children:s}),(0,t.jsxs)("button",{type:"button",onClick:()=>{m(e?.content??""),g(null),i(!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,t.jsx)(c,{className:"h-3.5 w-3.5"}),"Edit"]})]}),d?(0,t.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,t.jsx)("textarea",{value:u,onChange:e=>m(e.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..."}),v?(0,t.jsx)("p",{className:"text-xs text-red-500",children:v}):null,(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>{m(e?.content??""),g(null),i(!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:f,children:[(0,t.jsx)(x.X,{className:"h-3.5 w-3.5"}),"Cancel"]}),(0,t.jsx)("button",{type:"button",onClick:()=>void N(),disabled:f,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:f?"Saving...":"Save"})]})]}):null]})}function b({content:e,source:r,time:a,onDelete:s}){return(0,t.jsxs)("div",{className:"group rounded-xl border border-[var(--border)] bg-[var(--secondary)] p-3",children:[(0,t.jsxs)("div",{className:"mb-1.5 flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-[11px] font-semibold text-[var(--foreground)]",children:r}),(0,t.jsx)("span",{className:"text-[10px] text-[var(--app-shell-soft-text)]",children:a})]}),(0,t.jsx)("button",{type:"button",onClick:s,className:"rounded p-1 text-[var(--app-shell-soft-text)] opacity-0 transition-all group-hover:opacity-100 hover:text-red-500",children:(0,t.jsx)(u.Trash2,{size:12})})]}),(0,t.jsx)("p",{className:"text-sm leading-relaxed text-[var(--secondary-foreground)]",children:e})]})}function j({repo:e,draft:r,systemNote:a,systemNoteMatches:s,onDraftChange:o,onSave:l,onSystemNoteSaved:d}){return(0,t.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,t.jsxs)("div",{className:"mb-3 flex items-start justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"flex h-9 w-9 items-center justify-center rounded-xl bg-[var(--secondary)] text-[var(--muted-foreground)]",children:(0,t.jsx)(n.FolderGit2,{size:20})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-[var(--foreground)]",children:e.name}),(0,t.jsx)("p",{className:"text-[11px] text-[var(--muted-foreground)]",children:e.path||"No path set"})]})]}),(0,t.jsx)("button",{type:"button",onClick:l,className:"rounded-lg border border-[var(--border)] bg-[var(--secondary)] px-3 py-1.5 text-xs font-medium",children:"Save"})]}),(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("p",{className:"mb-2 text-[10px] font-black uppercase tracking-[0.16em] text-[var(--app-shell-soft-text)]",children:"Living Repo Note"}),(0,t.jsx)(g,{note:s?a:a?.content?{...a,content:""}:null,emptyLabel:"No repo note yet.",scope:"repo",subjectId:e.id,onSaved:d})]}),(0,t.jsx)("p",{className:"mb-2 text-[10px] font-black uppercase tracking-[0.16em] text-[var(--app-shell-soft-text)]",children:"Human Notes"}),(0,t.jsx)("textarea",{value:r,onChange:e=>o(e.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)]"})]})}e.s(["default",()=>f],61090)}]);
@@ -1,6 +1,6 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,50030,e=>{"use strict";var t=e.i(71645);let s=new Set(["spawning","running"]);function r(e,r){let a=r?.intervalMs??1500,n=r?.idleIntervalMs??1e4,[i,l]=(0,t.useState)(new Set),[o,d]=(0,t.useState)([]),[u,c]=(0,t.useState)({}),[p,m]=(0,t.useState)([]),f=(0,t.useRef)(e);f.current=e;let h=(0,t.useRef)(r?.messages??[]);h.current=r?.messages??[];let g=(0,t.useRef)(r?.setMessages);g.current=r?.setMessages;let x=(0,t.useRef)(0);(0,t.useEffect)(()=>{let e=r?.messages??[];if(e.length>0){let t=Math.max(...e.map(e=>e.timestamp));t>x.current&&(x.current=t)}},[r?.messages]);let v=(0,t.useCallback)(async()=>{let e=f.current;if(!e){l(new Set),d([]),c({}),m([]);return}let t=null;if(e.threadId?t=`/api/processes?threadId=${encodeURIComponent(e.threadId)}`:e.workspaceId&&(t=`/api/processes?workspaceId=${encodeURIComponent(e.workspaceId)}`),!t){l(new Set),d([]),c({}),m([]);return}try{let a=e.workspaceId||e.threadId,n=a?`/api/history?threadId=${encodeURIComponent(a)}&since=${x.current}`:null,i=a?`/api/chat-runs?threadId=${encodeURIComponent(a)}&status=active&limit=20`:null,o=[fetch(t)];n&&o.push(fetch(n)),i&&o.push(fetch(i));let[u,p,v]=await Promise.all(o),b=f.current;if(b?.threadId!==e.threadId||b?.workspaceId!==e.workspaceId)return;if(u.ok){let e=await u.json();d(e);let t=new Set(e.filter(e=>s.has(e.state)).map(e=>e.agentId));l(t);let r={};for(let t of e){if(!s.has(t.state))continue;let e=h.current.find(e=>e.id===t.sinceMessageId),a=e?.rootMessageId??t.sinceMessageId;r[t.agentId]={content:"",rootMessageId:a}}c(r)}if(v?.ok){var r;let e=(r=await v.json(),Array.isArray(r)?r.map(e=>{if(!e||"object"!=typeof e)return null;let t="string"==typeof e.chatRunId?e.chatRunId:"string"==typeof e.id?e.id:null,s="string"==typeof e.threadId?e.threadId:null,r="string"==typeof e.status?e.status:null,a="string"==typeof e.rootMessageId?e.rootMessageId:(e.rootMessageId,null);return t&&s&&r&&("queued"===r||"running"===r||"awaiting_user"===r||"blocked"===r||"completed"===r||"failed"===r||"cancelled"===r)?{chatRunId:t,threadId:s,rootMessageId:a,status:r}:null}).filter(e=>!!e):[]);m(e)}if(p?.ok&&g.current){let e=await p.json();if(e.length>0){let t=Math.max(...e.map(e=>e.timestamp));t>x.current&&(x.current=t),g.current(t=>{let s=new Set(t.map(e=>e.id)),r=e.filter(e=>!s.has(e.id)),a=t.map(t=>e.find(e=>e.id===t.id)??t);return 0===r.length?a:[...a,...r].sort((e,t)=>e.timestamp-t.timestamp)})}}}catch{}},[]),b=e?.threadId||e?.workspaceId||null,y=p.some(e=>"queued"===e.status||"running"===e.status),w=o.some(e=>s.has(e.state)),k=y||w?a:n;return(0,t.useEffect)(()=>{if(!b){l(new Set),d([]),c({}),m([]);return}v();let e=setInterval(v,k);return()=>clearInterval(e)},[b,k,v]),{activeAgents:i,processes:o,streaming:u,chatRuns:p,poll:v}}e.s(["useProcessPolling",()=>r])},67581,e=>{"use strict";var t=e.i(18050),s=e.i(71645),r=e.i(18566),a=e.i(55436),n=e.i(19580),i=e.i(74049),l=e.i(40461),o=e.i(36797),d=e.i(67041),u=e.i(93237);function c(){let[e,r]=(0,s.useState)(null),[a,n]=(0,s.useState)(!1),i=(0,s.useCallback)(async()=>{try{let e=await fetch("/api/daemon");e.ok&&r(await e.json())}catch{}},[]);(0,s.useEffect)(()=>{i();let e=setInterval(i,1e4);return()=>clearInterval(e)},[i]);let l=async()=>{n(!0);try{e?.running?await fetch("/api/daemon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"stop"})}):await fetch("/api/daemon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workers:1})}),await i()}finally{n(!1)}},o=async t=>{if(!e)return;let s=Math.max(1,Math.min(e.maxWorkers,e.targetWorkers+t));if(s!==e.targetWorkers){n(!0);try{await fetch("/api/daemon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workers:s})}),await i()}finally{n(!1)}}};if(!e)return null;let d=e.running;return(0,t.jsxs)("div",{className:"flex items-center gap-3 py-2 text-xs text-[var(--muted-foreground)]",children:[(0,t.jsxs)("button",{type:"button",onClick:l,disabled:a,className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full border border-[var(--border)] hover:border-[var(--border)] transition-colors disabled:opacity-50",children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${d?"bg-emerald-500":"bg-[var(--app-shell-soft-text)]"}`}),(0,t.jsx)("span",{className:"font-medium text-[var(--muted-foreground)]",children:a?"...":d?"Daemon running":"Daemon stopped"})]}),d&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"inline-flex items-center rounded-full border border-[var(--border)] overflow-hidden",children:[(0,t.jsx)("button",{type:"button",onClick:()=>o(-1),disabled:a||e.targetWorkers<=1,className:"px-1.5 py-0.5 hover:bg-[var(--muted)] transition-colors disabled:opacity-30 text-[var(--muted-foreground)]",children:"-"}),(0,t.jsxs)("span",{className:"px-2 py-0.5 font-mono text-[var(--muted-foreground)] border-x border-[var(--border)]",children:[e.activeWorkers,"/",e.targetWorkers,"w"]}),(0,t.jsx)("button",{type:"button",onClick:()=>o(1),disabled:a||e.targetWorkers>=e.maxWorkers,className:"px-1.5 py-0.5 hover:bg-[var(--muted)] transition-colors disabled:opacity-30 text-[var(--muted-foreground)]",children:"+"})]}),e.startedAt&&(0,t.jsxs)("span",{className:"text-[var(--muted-foreground)]",children:["up since ",new Date(e.startedAt).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})]})]})]})}var p=e.i(50030);function m({params:e}){let{slug:m}=(0,s.use)(e),f=(0,r.useRouter)(),{tasks:h,isLoading:g,createTask:x,updateTask:v,deleteTask:b,completeTaskStage:y,cancelWorkflow:w,refetch:k,cancellingTaskId:j,fetchTask:I}=(0,n.useTasks)({realtime:!0,project:m}),{projects:S}=(0,i.useProjects)(),{workflow:N,stages:C,stageConfig:T,isValidTransition:M,isLoading:R}=(0,l.useWorkflows)(),[$,O]=(0,s.useState)(""),[P,A]=(0,s.useState)(!1),W=S.find(e=>e.slug===m),{processes:_}=(0,p.useProcessPolling)(W?{workspaceId:W.id}:null,{intervalMs:3e3}),E=(0,s.useMemo)(()=>{if(!$.trim())return h;let e=$.toLowerCase();return h.filter(t=>(t.title||"").toLowerCase().includes(e)||(t.content||"").toLowerCase().includes(e))},[h,$]),L=(0,s.useMemo)(()=>h.some(e=>!!e.graph_id),[h]),U=(0,s.useMemo)(()=>h.filter(e=>e.graph_id).map(e=>e.id),[h]),[q,D]=(0,s.useState)(!1);(0,s.useEffect)(()=>{if(0===U.length)return void D(!0);let e=!1;return(0,u.prefetchGraphSummaries)(U).then(()=>{e||D(!0)}),()=>{e=!0}},[U]);let K=(0,s.useCallback)(e=>{let t=(0,u.getCachedGraphSummary)(e.id);if(!t)return"done"===e.stage||"completed"===e.status?"DONE":"INTAKE"===e.stage||"ideation"===e.stage||"queued"===e.status?"INTAKE":"PROGRESS";return t.derivedStatus},[]),F=(0,s.useCallback)(e=>{f.push(`/projects/${m}/graph/${e.id}`)},[f,m]),G=(0,s.useCallback)(async(e,t)=>{await v(e,t)},[v]),J=async(e,t)=>{let s=[`status: ${"INTAKE"===t?"queued":"in_progress"}`,`stage: ${t}`];W&&(s.push(`project: ${W.slug}`),s.push(`project_id: ${W.id}`),s.push(`workflow_id: ${W.workflow_id||l.DEFAULT_WORKFLOW_ID}`));let r=`---
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,50030,e=>{"use strict";var t=e.i(71645);let s=new Set(["spawning","running"]);function r(e,r){let a=r?.intervalMs??1500,n=r?.idleIntervalMs??1e4,[i,o]=(0,t.useState)(new Set),[l,d]=(0,t.useState)([]),[u,c]=(0,t.useState)({}),[p,m]=(0,t.useState)([]),f=(0,t.useRef)(e);f.current=e;let h=(0,t.useRef)(r?.messages??[]);h.current=r?.messages??[];let g=(0,t.useRef)(r?.setMessages);g.current=r?.setMessages;let x=(0,t.useRef)(0);(0,t.useEffect)(()=>{let e=r?.messages??[];if(e.length>0){let t=Math.max(...e.map(e=>e.timestamp));t>x.current&&(x.current=t)}},[r?.messages]);let b=(0,t.useCallback)(async()=>{let e=f.current;if(!e){o(new Set),d([]),c({}),m([]);return}let t=null;if(e.threadId?t=`/api/processes?threadId=${encodeURIComponent(e.threadId)}`:e.workspaceId&&(t=`/api/processes?workspaceId=${encodeURIComponent(e.workspaceId)}`),!t){o(new Set),d([]),c({}),m([]);return}try{let a=e.workspaceId||e.threadId,n=a?`/api/history?threadId=${encodeURIComponent(a)}&since=${x.current}`:null,i=a?`/api/chat-runs?threadId=${encodeURIComponent(a)}&limit=20`:null,l=[fetch(t)];n&&l.push(fetch(n)),i&&l.push(fetch(i));let[u,p,b]=await Promise.all(l),v=f.current;if(v?.threadId!==e.threadId||v?.workspaceId!==e.workspaceId)return;if(u.ok){let e=await u.json();d(e);let t=new Set(e.filter(e=>s.has(e.state)).map(e=>e.agentId));o(t);let r={};for(let t of e){if(!s.has(t.state))continue;let e=h.current.find(e=>e.id===t.sinceMessageId),a=e?.rootMessageId??t.sinceMessageId;r[t.agentId]={content:"",rootMessageId:a}}c(r)}if(b?.ok){var r;let e=(r=await b.json(),Array.isArray(r)?r.map(e=>{if(!e||"object"!=typeof e)return null;let t="string"==typeof e.chatRunId?e.chatRunId:"string"==typeof e.id?e.id:null,s="string"==typeof e.threadId?e.threadId:null,r="string"==typeof e.status?e.status:null,a="string"==typeof e.rootMessageId?e.rootMessageId:(e.rootMessageId,null);return t&&s&&r&&("queued"===r||"running"===r||"awaiting_user"===r||"blocked"===r||"completed"===r||"failed"===r||"cancelled"===r)?{chatRunId:t,threadId:s,rootMessageId:a,status:r,optimistic:!1}:null}).filter(e=>!!e):[]);m(e)}if(p?.ok&&g.current){let e=await p.json();if(e.length>0){let t=Math.max(...e.map(e=>e.timestamp));t>x.current&&(x.current=t),g.current(t=>{let s=new Set(t.map(e=>e.id)),r=e.filter(e=>!s.has(e.id)),a=t.map(t=>e.find(e=>e.id===t.id)??t);return 0===r.length?a:[...a,...r].sort((e,t)=>e.timestamp-t.timestamp)})}}}catch{}},[]),v=e?.threadId||e?.workspaceId||null,y=p.some(e=>"queued"===e.status||"running"===e.status),w=l.some(e=>s.has(e.state)),k=y||w?a:n;return(0,t.useEffect)(()=>{if(!v){o(new Set),d([]),c({}),m([]);return}b();let e=setInterval(b,k);return()=>clearInterval(e)},[v,k,b]),{activeAgents:i,processes:l,streaming:u,chatRuns:p,poll:b}}e.s(["useProcessPolling",()=>r])},67581,e=>{"use strict";var t=e.i(18050),s=e.i(71645),r=e.i(18566),a=e.i(55436),n=e.i(19580),i=e.i(74049),o=e.i(40461),l=e.i(36797),d=e.i(67041),u=e.i(93237);function c(){let[e,r]=(0,s.useState)(null),[a,n]=(0,s.useState)(!1),i=(0,s.useCallback)(async()=>{try{let e=await fetch("/api/daemon");e.ok&&r(await e.json())}catch{}},[]);(0,s.useEffect)(()=>{i();let e=setInterval(i,1e4);return()=>clearInterval(e)},[i]);let o=async()=>{n(!0);try{e?.running?await fetch("/api/daemon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"stop"})}):await fetch("/api/daemon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workers:1})}),await i()}finally{n(!1)}},l=async t=>{if(!e)return;let s=Math.max(1,Math.min(e.maxWorkers,e.targetWorkers+t));if(s!==e.targetWorkers){n(!0);try{await fetch("/api/daemon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workers:s})}),await i()}finally{n(!1)}}};if(!e)return null;let d=e.running;return(0,t.jsxs)("div",{className:"flex items-center gap-3 py-2 text-xs text-[var(--muted-foreground)]",children:[(0,t.jsxs)("button",{type:"button",onClick:o,disabled:a,className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full border border-[var(--border)] hover:border-[var(--border)] transition-colors disabled:opacity-50",children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${d?"bg-emerald-500":"bg-[var(--app-shell-soft-text)]"}`}),(0,t.jsx)("span",{className:"font-medium text-[var(--muted-foreground)]",children:a?"...":d?"Daemon running":"Daemon stopped"})]}),d&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"inline-flex items-center rounded-full border border-[var(--border)] overflow-hidden",children:[(0,t.jsx)("button",{type:"button",onClick:()=>l(-1),disabled:a||e.targetWorkers<=1,className:"px-1.5 py-0.5 hover:bg-[var(--muted)] transition-colors disabled:opacity-30 text-[var(--muted-foreground)]",children:"-"}),(0,t.jsxs)("span",{className:"px-2 py-0.5 font-mono text-[var(--muted-foreground)] border-x border-[var(--border)]",children:[e.activeWorkers,"/",e.targetWorkers,"w"]}),(0,t.jsx)("button",{type:"button",onClick:()=>l(1),disabled:a||e.targetWorkers>=e.maxWorkers,className:"px-1.5 py-0.5 hover:bg-[var(--muted)] transition-colors disabled:opacity-30 text-[var(--muted-foreground)]",children:"+"})]}),e.startedAt&&(0,t.jsxs)("span",{className:"text-[var(--muted-foreground)]",children:["up since ",new Date(e.startedAt).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})]})]})]})}var p=e.i(50030);function m({params:e}){let{slug:m}=(0,s.use)(e),f=(0,r.useRouter)(),{tasks:h,isLoading:g,createTask:x,updateTask:b,deleteTask:v,completeTaskStage:y,cancelWorkflow:w,refetch:k,cancellingTaskId:j,fetchTask:I}=(0,n.useTasks)({realtime:!0,project:m}),{projects:S}=(0,i.useProjects)(),{workflow:N,stages:C,stageConfig:T,isValidTransition:M,isLoading:R}=(0,o.useWorkflows)(),[$,O]=(0,s.useState)(""),[P,A]=(0,s.useState)(!1),W=S.find(e=>e.slug===m),{processes:_}=(0,p.useProcessPolling)(W?{workspaceId:W.id}:null,{intervalMs:3e3}),E=(0,s.useMemo)(()=>{if(!$.trim())return h;let e=$.toLowerCase();return h.filter(t=>(t.title||"").toLowerCase().includes(e)||(t.content||"").toLowerCase().includes(e))},[h,$]),L=(0,s.useMemo)(()=>h.some(e=>!!e.graph_id),[h]),U=(0,s.useMemo)(()=>h.filter(e=>e.graph_id).map(e=>e.id),[h]),[q,D]=(0,s.useState)(!1);(0,s.useEffect)(()=>{if(0===U.length)return void D(!0);let e=!1;return(0,u.prefetchGraphSummaries)(U).then(()=>{e||D(!0)}),()=>{e=!0}},[U]);let K=(0,s.useCallback)(e=>{let t=(0,u.getCachedGraphSummary)(e.id);if(!t)return"done"===e.stage||"completed"===e.status?"DONE":"INTAKE"===e.stage||"ideation"===e.stage||"queued"===e.status?"INTAKE":"PROGRESS";return t.derivedStatus},[]),F=(0,s.useCallback)(e=>{f.push(`/projects/${m}/graph/${e.id}`)},[f,m]),G=(0,s.useCallback)(async(e,t)=>{await b(e,t)},[b]),J=async(e,t)=>{let s=[`status: ${"INTAKE"===t?"queued":"in_progress"}`,`stage: ${t}`];W&&(s.push(`project: ${W.slug}`),s.push(`project_id: ${W.id}`),s.push(`workflow_id: ${W.workflow_id||o.DEFAULT_WORKFLOW_ID}`));let r=`---
2
2
  ${s.join("\n")}
3
3
  ---
4
4
 
5
5
  # ${e}
6
- `;await x(r,null),A(!1)};return g||R?(0,t.jsx)("div",{className:"h-full flex items-center justify-center",children:(0,t.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,t.jsx)("span",{className:"spinner w-8 h-8 border-3 border-[var(--primary)] border-t-transparent rounded-full"}),(0,t.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"Loading board..."})]})}):(0,t.jsxs)("div",{className:"h-full flex flex-col",children:[(0,t.jsxs)("div",{className:"flex-shrink-0 border-b border-[var(--border)] bg-[var(--card-bg)] backdrop-blur-md px-3 sm:px-6 py-2 sm:py-0 sm:h-14 flex flex-col sm:flex-row sm:items-center justify-between gap-2 sm:gap-4",children:[(0,t.jsx)("div",{className:"flex items-center gap-3 sm:gap-4 text-sm text-[var(--app-shell-soft-text)] flex-shrink-0",children:(0,t.jsx)("span",{className:"font-semibold text-[var(--foreground)] truncate",children:W?.name||m})}),(0,t.jsx)("div",{className:"flex items-center gap-3 flex-1 sm:justify-end",children:(0,t.jsxs)("div",{className:"relative w-full sm:max-w-sm group",children:[(0,t.jsx)(a.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--app-shell-soft-text)] group-focus-within:text-indigo-500 transition-colors",size:14}),(0,t.jsx)("input",{type:"text",placeholder:"Search tasks...",value:$,onChange:e=>O(e.target.value),className:"w-full bg-[var(--secondary)] border border-[var(--border)] rounded-full py-1.5 pl-9 pr-4 text-xs focus:outline-none focus:ring-2 focus:ring-indigo-500/20 focus:border-indigo-500 transition-all"})]})})]}),(0,t.jsx)("div",{className:"flex-shrink-0 px-3 sm:px-6",children:(0,t.jsx)(c,{})}),(0,t.jsx)("div",{className:"flex-shrink-0 px-3 sm:px-6",children:(0,t.jsx)(d.default,{tasks:E,processes:_,onTaskClick:e=>f.push(`/projects/${m}/graph/${e.id}`),onStop:async e=>{await w({taskId:e}),await k()},onRetry:async e=>{await y({taskId:e,decision:"not_done",final_result:"Manual retry requested.",explanation:"Manual retry requested."})},cancellingTaskId:j})}),(0,t.jsx)("div",{className:"flex-1 min-h-0 relative",children:(0,t.jsx)("div",{className:"absolute inset-0 overflow-hidden",children:(0,t.jsx)(o.default,{tasks:E,onSelectTask:F,onTasksChange:()=>{},onTaskUpdate:G,onAddTask:(e,t)=>J(e,t),stages:C,stageConfig:T,isValidTransition:L?void 0:M,graphColumnFn:L?K:void 0})})})]})}e.s(["default",()=>m],67581)}]);
6
+ `;await x(r,null),A(!1)};return g||R?(0,t.jsx)("div",{className:"h-full flex items-center justify-center",children:(0,t.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,t.jsx)("span",{className:"spinner w-8 h-8 border-3 border-[var(--primary)] border-t-transparent rounded-full"}),(0,t.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"Loading board..."})]})}):(0,t.jsxs)("div",{className:"h-full flex flex-col",children:[(0,t.jsxs)("div",{className:"flex-shrink-0 border-b border-[var(--border)] bg-[var(--card-bg)] backdrop-blur-md px-3 sm:px-6 py-2 sm:py-0 sm:h-14 flex flex-col sm:flex-row sm:items-center justify-between gap-2 sm:gap-4",children:[(0,t.jsx)("div",{className:"flex items-center gap-3 sm:gap-4 text-sm text-[var(--app-shell-soft-text)] flex-shrink-0",children:(0,t.jsx)("span",{className:"font-semibold text-[var(--foreground)] truncate",children:W?.name||m})}),(0,t.jsx)("div",{className:"flex items-center gap-3 flex-1 sm:justify-end",children:(0,t.jsxs)("div",{className:"relative w-full sm:max-w-sm group",children:[(0,t.jsx)(a.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--app-shell-soft-text)] group-focus-within:text-indigo-500 transition-colors",size:14}),(0,t.jsx)("input",{type:"text",placeholder:"Search tasks...",value:$,onChange:e=>O(e.target.value),className:"w-full bg-[var(--secondary)] border border-[var(--border)] rounded-full py-1.5 pl-9 pr-4 text-xs focus:outline-none focus:ring-2 focus:ring-indigo-500/20 focus:border-indigo-500 transition-all"})]})})]}),(0,t.jsx)("div",{className:"flex-shrink-0 px-3 sm:px-6",children:(0,t.jsx)(c,{})}),(0,t.jsx)("div",{className:"flex-shrink-0 px-3 sm:px-6",children:(0,t.jsx)(d.default,{tasks:E,processes:_,onTaskClick:e=>f.push(`/projects/${m}/graph/${e.id}`),onStop:async e=>{await w({taskId:e}),await k()},onRetry:async e=>{await y({taskId:e,decision:"not_done",final_result:"Manual retry requested.",explanation:"Manual retry requested."})},cancellingTaskId:j})}),(0,t.jsx)("div",{className:"flex-1 min-h-0 relative",children:(0,t.jsx)("div",{className:"absolute inset-0 overflow-hidden",children:(0,t.jsx)(l.default,{tasks:E,onSelectTask:F,onTasksChange:()=>{},onTaskUpdate:G,onAddTask:(e,t)=>J(e,t),stages:C,stageConfig:T,isValidTransition:L?void 0:M,graphColumnFn:L?K:void 0})})})]})}e.s(["default",()=>m],67581)}]);