@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
package/lib/cli/runCli.js CHANGED
@@ -3506,103 +3506,6 @@ async function checkOnboarding() {
3506
3506
 
3507
3507
  // agx security - Manage daemon security settings
3508
3508
  // ============================================================
3509
- // agx update - Self-update and auto-update management
3510
- // ============================================================
3511
- if (cmd === 'update') {
3512
- const subCmd = args[1];
3513
- const CRON_MARKER = '# agx-auto-update';
3514
- const CRON_SCHEDULE = '0 3 * * *'; // Daily at 3am
3515
- const CRON_CMD = 'npm update -g @mndrk/agx';
3516
-
3517
- // Helper to get current crontab
3518
- const getCrontab = () => {
3519
- try {
3520
- return execa.commandSync('crontab -l 2>/dev/null', { shell: true, encoding: 'utf8', reject: false }).stdout || '';
3521
- } catch {
3522
- return '';
3523
- }
3524
- };
3525
-
3526
- // Helper to set crontab
3527
- const setCrontab = (content) => {
3528
- const tmp = path.join(os.tmpdir(), `agx-crontab-${Date.now()}`);
3529
- fs.writeFileSync(tmp, content);
3530
- try {
3531
- execa.commandSync(`crontab ${tmp}`, { shell: true, timeout: 5000, reject: false });
3532
- } finally {
3533
- try { fs.unlinkSync(tmp); } catch { }
3534
- }
3535
- };
3536
-
3537
- // Check if auto-update is enabled
3538
- const isAutoEnabled = () => getCrontab().includes(CRON_MARKER);
3539
-
3540
- if (subCmd === 'status' || subCmd === '--status') {
3541
- const pkg = require('../../package.json');
3542
- console.log(`${c.bold}agx update status${c.reset}\n`);
3543
- console.log(` Current version: ${c.cyan}${pkg.version}${c.reset}`);
3544
- console.log(` Auto-update: ${isAutoEnabled() ? `${c.green}enabled${c.reset} (daily at 3am)` : `${c.dim}disabled${c.reset}`}`);
3545
- process.exit(0);
3546
- }
3547
-
3548
- if (subCmd === '--auto' || subCmd === 'auto' || subCmd === 'enable') {
3549
- if (isAutoEnabled()) {
3550
- console.log(`${c.yellow}⚠${c.reset} Auto-update already enabled`);
3551
- process.exit(0);
3552
- }
3553
- const crontab = getCrontab();
3554
- const newLine = `${CRON_SCHEDULE} ${CRON_CMD} ${CRON_MARKER}\n`;
3555
- try {
3556
- setCrontab(crontab + newLine);
3557
- console.log(`${c.green}✓${c.reset} Auto-update enabled (daily at 3am)`);
3558
- console.log(` ${c.dim}To disable: agx update --off${c.reset}`);
3559
- } catch (err) {
3560
- console.log(`${c.yellow}⚠${c.reset} Could not modify crontab automatically.`);
3561
- console.log(`\n Add this line to your crontab (${c.cyan}crontab -e${c.reset}):\n`);
3562
- console.log(` ${c.dim}${CRON_SCHEDULE} ${CRON_CMD}${c.reset}\n`);
3563
- }
3564
- process.exit(0);
3565
- }
3566
-
3567
- if (subCmd === '--off' || subCmd === 'off' || subCmd === 'disable') {
3568
- const crontab = getCrontab();
3569
- if (!isAutoEnabled()) {
3570
- console.log(`${c.dim}Auto-update not enabled${c.reset}`);
3571
- process.exit(0);
3572
- }
3573
- const lines = crontab.split('\n').filter(l => !l.includes(CRON_MARKER));
3574
- try {
3575
- setCrontab(lines.join('\n'));
3576
- console.log(`${c.green}✓${c.reset} Auto-update disabled`);
3577
- } catch (err) {
3578
- console.log(`${c.yellow}⚠${c.reset} Could not modify crontab automatically.`);
3579
- console.log(`\n Remove the agx-auto-update line from your crontab (${c.cyan}crontab -e${c.reset})\n`);
3580
- }
3581
- process.exit(0);
3582
- }
3583
-
3584
- // Default: update now
3585
- console.log(`${c.cyan}→${c.reset} Checking for updates...`);
3586
- try {
3587
- const child = execa('npm', ['update', '-g', '@mndrk/agx'], {
3588
- stdio: 'inherit',
3589
- shell: false,
3590
- reject: false,
3591
- });
3592
- const result = await child;
3593
- if (result.exitCode === 0) {
3594
- console.log(`${c.green}✓${c.reset} Update complete`);
3595
- } else {
3596
- console.log(`${c.red}✗${c.reset} Update failed`);
3597
- process.exit(1);
3598
- }
3599
- } catch (err) {
3600
- console.error(`${c.red}✗${c.reset} Update failed: ${err.message}`);
3601
- process.exit(1);
3602
- }
3603
- process.exit(0);
3604
- }
3605
-
3606
3509
  if (cmd === 'security') {
3607
3510
  const securityCmd = args[1];
3608
3511
  const { loadSecurityConfig, setupDaemonSecret, SECURITY_CONFIG_FILE } = require('../security');
@@ -1,13 +1,142 @@
1
- const { execSync } = require('child_process');
1
+ const fs = require('fs');
2
+ const os = require('os');
3
+ const path = require('path');
4
+ const { execFileSync, execSync } = require('child_process');
5
+
6
+ const DESKTOP_APP_BUNDLE_ID = 'com.agx.desktop';
7
+ const DESKTOP_APP_UPDATE_ARG = '--agx-update-now';
8
+
9
+ function getCliEntryPath() {
10
+ try {
11
+ return fs.realpathSync(path.resolve(__dirname, '..', '..', 'index.js'));
12
+ } catch {
13
+ return path.resolve(__dirname, '..', '..', 'index.js');
14
+ }
15
+ }
16
+
17
+ function getBundledDesktopAppPath(cliEntryPath = getCliEntryPath()) {
18
+ const normalized = path.resolve(cliEntryPath);
19
+ const marker = `${path.sep}Contents${path.sep}Resources${path.sep}cli${path.sep}`;
20
+ const markerIndex = normalized.indexOf(marker);
21
+ if (markerIndex === -1) return null;
22
+ return normalized.slice(0, markerIndex);
23
+ }
24
+
25
+ function isBundledDesktopCli(cliEntryPath = getCliEntryPath()) {
26
+ return Boolean(getBundledDesktopAppPath(cliEntryPath));
27
+ }
28
+
29
+ function findInstalledDesktopApp() {
30
+ const bundledPath = getBundledDesktopAppPath();
31
+ if (bundledPath && fs.existsSync(bundledPath)) {
32
+ return bundledPath;
33
+ }
34
+
35
+ const directCandidates = [
36
+ '/Applications/agx.app',
37
+ '/Applications/AGX.app',
38
+ path.join(os.homedir(), 'Applications', 'agx.app'),
39
+ path.join(os.homedir(), 'Applications', 'AGX.app'),
40
+ ];
41
+
42
+ for (const candidate of directCandidates) {
43
+ if (fs.existsSync(candidate)) return candidate;
44
+ }
45
+
46
+ if (process.platform === 'darwin') {
47
+ try {
48
+ const matches = execFileSync('mdfind', [`kMDItemCFBundleIdentifier == "${DESKTOP_APP_BUNDLE_ID}"`], {
49
+ encoding: 'utf8',
50
+ stdio: ['ignore', 'pipe', 'ignore'],
51
+ })
52
+ .split('\n')
53
+ .map((line) => line.trim())
54
+ .filter(Boolean);
55
+ const firstApp = matches.find((match) => match.endsWith('.app'));
56
+ if (firstApp && fs.existsSync(firstApp)) return firstApp;
57
+ } catch {}
58
+ }
59
+
60
+ return null;
61
+ }
62
+
63
+ function launchDesktopAppUpdate(appPath) {
64
+ if (!appPath) {
65
+ return { launched: false, reason: 'not-installed' };
66
+ }
67
+
68
+ try {
69
+ if (process.platform === 'darwin') {
70
+ execFileSync('open', ['-a', appPath, '--args', DESKTOP_APP_UPDATE_ARG], {
71
+ stdio: 'ignore',
72
+ });
73
+ return { launched: true, appPath };
74
+ }
75
+
76
+ return { launched: false, reason: `unsupported-platform:${process.platform}` };
77
+ } catch (err) {
78
+ return { launched: false, reason: err.message || 'launch-failed', appPath };
79
+ }
80
+ }
81
+
82
+ function printDesktopUpdateResult({ c, result, bundledCli }) {
83
+ if (result.launched) {
84
+ console.log(`${c.green}✓${c.reset} Desktop app update started`);
85
+ console.log(` ${c.dim}${result.appPath}${c.reset}`);
86
+ console.log(` ${c.dim}The app will download and install any newer release.${c.reset}`);
87
+ return;
88
+ }
89
+
90
+ if (result.reason === 'not-installed') {
91
+ const detail = bundledCli
92
+ ? 'Bundled desktop app path could not be resolved.'
93
+ : 'Desktop app not found; skipping app update.';
94
+ console.log(`${c.dim}${detail}${c.reset}`);
95
+ return;
96
+ }
97
+
98
+ if (result.reason && result.reason.startsWith('unsupported-platform:')) {
99
+ console.log(`${c.dim}Desktop app updates are only wired for macOS right now.${c.reset}`);
100
+ return;
101
+ }
102
+
103
+ console.log(`${c.yellow}Warning:${c.reset} Failed to launch desktop app updater`);
104
+ if (result.appPath) {
105
+ console.log(` ${c.dim}${result.appPath}${c.reset}`);
106
+ }
107
+ if (result.reason) {
108
+ console.log(` ${c.dim}${result.reason}${c.reset}`);
109
+ }
110
+ }
2
111
 
3
112
  async function maybeHandleUpdateCommand({ cmd, args, ctx }) {
4
113
  if (cmd !== 'update') return false;
5
114
 
6
115
  const { c, stopDaemon } = ctx;
116
+ const subCmd = args[1];
117
+ const bundledCli = isBundledDesktopCli();
118
+
119
+ if (subCmd === 'status' || subCmd === '--status') {
120
+ const pkg = require('../../package.json');
121
+ const appPath = findInstalledDesktopApp();
122
+ console.log(`${c.bold}agx update status${c.reset}\n`);
123
+ console.log(` CLI version: ${c.cyan}${pkg.version}${c.reset}`);
124
+ console.log(` CLI source: ${bundledCli ? `${c.green}desktop bundle${c.reset}` : `${c.cyan}npm/global${c.reset}`}`);
125
+ console.log(` Desktop app: ${appPath ? `${c.green}installed${c.reset}` : `${c.dim}not found${c.reset}`}`);
126
+ if (appPath) {
127
+ console.log(` ${c.dim}${appPath}${c.reset}`);
128
+ }
129
+ process.exit(0);
130
+ }
7
131
 
8
132
  console.log(`${c.cyan}Updating agx...${c.reset}\n`);
9
133
 
10
- // 1. Stop daemon (includes board)
134
+ if (subCmd === '--auto' || subCmd === 'auto' || subCmd === 'enable' || subCmd === '--off' || subCmd === 'off' || subCmd === 'disable') {
135
+ console.log(`${c.yellow}Auto-update scheduling is no longer managed by agx.${c.reset}`);
136
+ console.log(` ${c.dim}Use your system scheduler to run \`agx update\` if you still want periodic updates.${c.reset}`);
137
+ process.exit(0);
138
+ }
139
+
11
140
  console.log(`${c.dim}Stopping daemon and board...${c.reset}`);
12
141
  try {
13
142
  await stopDaemon();
@@ -15,7 +144,6 @@ async function maybeHandleUpdateCommand({ cmd, args, ctx }) {
15
144
  console.log(`${c.yellow}Warning:${c.reset} ${err.message}`);
16
145
  }
17
146
 
18
- // 2. Kill any processes on port 41741
19
147
  console.log(`${c.dim}Killing processes on port 41741...${c.reset}`);
20
148
  try {
21
149
  if (process.platform === 'darwin' || process.platform === 'linux') {
@@ -28,24 +156,38 @@ async function maybeHandleUpdateCommand({ cmd, args, ctx }) {
28
156
  console.log(`${c.green}✓${c.reset} Port 41741 already free`);
29
157
  }
30
158
 
31
- // 3. Reinstall without cache
32
- console.log(`\n${c.dim}Reinstalling @mndrk/agx...${c.reset}`);
33
- try {
34
- execSync('npm install -g @mndrk/agx --force', { stdio: 'inherit' });
35
- console.log(`\n${c.green}✓${c.reset} agx updated successfully`);
36
- } catch (err) {
37
- console.error(`\n${c.red}Failed to reinstall:${c.reset} ${err.message}`);
38
- process.exit(1);
159
+ if (bundledCli) {
160
+ console.log(`\n${c.dim}CLI is running from agx.app, so updating the app will update the bundled CLI.${c.reset}`);
161
+ } else {
162
+ console.log(`\n${c.dim}Updating npm CLI package...${c.reset}`);
163
+ try {
164
+ execSync('npm install -g @mndrk/agx --force', { stdio: 'inherit' });
165
+ console.log(`\n${c.green}✓${c.reset} CLI updated successfully`);
166
+ } catch (err) {
167
+ console.error(`\n${c.red}Failed to reinstall CLI:${c.reset} ${err.message}`);
168
+ process.exit(1);
169
+ }
170
+
171
+ try {
172
+ const version = execSync('agx --version', { encoding: 'utf8' }).trim();
173
+ console.log(`${c.green}✓${c.reset} Now running ${c.cyan}${version}${c.reset}`);
174
+ } catch {}
39
175
  }
40
176
 
41
- // 4. Show new version
42
- try {
43
- const version = execSync('agx --version', { encoding: 'utf8' }).trim();
44
- console.log(`${c.green}✓${c.reset} Now running ${c.cyan}${version}${c.reset}`);
45
- } catch {}
177
+ console.log(`\n${c.dim}Checking desktop app updates...${c.reset}`);
178
+ const desktopResult = launchDesktopAppUpdate(findInstalledDesktopApp());
179
+ printDesktopUpdateResult({ c, result: desktopResult, bundledCli });
46
180
 
47
181
  process.exit(0);
48
182
  return true;
49
183
  }
50
184
 
51
- module.exports = { maybeHandleUpdateCommand };
185
+ module.exports = {
186
+ DESKTOP_APP_BUNDLE_ID,
187
+ DESKTOP_APP_UPDATE_ARG,
188
+ getBundledDesktopAppPath,
189
+ isBundledDesktopCli,
190
+ findInstalledDesktopApp,
191
+ launchDesktopAppUpdate,
192
+ maybeHandleUpdateCommand,
193
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mndrk/agx",
3
- "version": "2.0.32",
3
+ "version": "2.0.33",
4
4
  "description": "Autonomous AI Agent Orchestrator for Claude, Gemini, and Ollama",
5
5
  "main": "lib/index.js",
6
6
  "exports": {
@@ -1,46 +0,0 @@
1
- module.exports=[18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},85148,(e,t,r)=>{t.exports=e.x("better-sqlite3-90e2652d1716b047",()=>require("better-sqlite3-90e2652d1716b047"))},22734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},46786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},33405,(e,t,r)=>{t.exports=e.x("child_process",()=>require("child_process"))},49041,e=>{"use strict";let t={id:"2c3cc1ca-956d-4b62-b295-4d2d3374103f",email:process.env.AGX_BOARD_USER_EMAIL||"local@agx.board",name:process.env.AGX_BOARD_USER_NAME||"Local Board User"};e.s(["LOCAL_USER",0,t])},21729,e=>{"use strict";var t=e.i(22734),r=e.i(46786),a=e.i(14747);let s="3.35.0",i=["json1"],n=["fts5"],o=["nfs","smb","cifs","efs","fuse.sshfs"];function d(e,t){try{if("json1"===t)return e.prepare("SELECT json('{}')").get(),!0;if("fts5"===t)return e.exec("CREATE VIRTUAL TABLE IF NOT EXISTS _fts5_check USING fts5(x)"),e.exec("DROP TABLE IF EXISTS _fts5_check"),!0;return!1}catch{return!1}}function u(u,p){let l=[],c=u.prepare("SELECT sqlite_version() as v").get();for(let e of(0>function(e,t){let r=e.split(".").map(Number),a=t.split(".").map(Number);for(let e=0;e<3;e++){let t=(r[e]||0)-(a[e]||0);if(0!==t)return t}return 0}(c.v,s)&&l.push({kind:"version_mismatch",message:`SQLite version ${c.v} is below minimum ${s}`,found:c.v,required:`>= ${s}`,fix:"darwin"===r.default.platform()?"TURBOPACK unreachable":"apt-get install -y libsqlite3-dev && npm rebuild better-sqlite3"}),i))d(u,e)||l.push({kind:"missing_extension",message:`Required SQLite extension '${e}' is not available`,required:e,fix:`Rebuild SQLite with -DSQLITE_ENABLE_${e.toUpperCase()}=1, or use a system SQLite that includes it`});for(let e of n)d(u,e)||console.warn(`[startup] Recommended SQLite extension '${e}' is not available. Full-text search will be disabled.`);let h=function(s){"linux"!==r.default.platform()&&r.default.platform();try{let i=a.default.resolve(s),{execSync:n}=e.r(33405);if("darwin"===r.default.platform());else{let e=t.default.readFileSync("/proc/mounts","utf-8"),r="",a="unknown";for(let t of e.split("\n")){let[,e,s]=t.split(/\s+/);e&&i.startsWith(e)&&e.length>r.length&&(r=e,a=s||"unknown")}return a}}catch{}return null}(p);h&&o.some(e=>h.toLowerCase().includes(e))&&l.push({kind:"filesystem_error",message:`Database path '${p}' is on a network filesystem (${h})`,path:p,found:h,fix:"Move the database file to a local SSD. WAL mode requires local filesystem with reliable fsync."});try{u.pragma("journal_mode = wal"),u.pragma("foreign_keys = 1"),u.pragma("busy_timeout = 5000"),u.pragma("synchronous = 1"),u.pragma("cache_size = -64000");let e=u.pragma("journal_mode",{simple:!0}).toLowerCase(),t=new Set(["wal","delete"]);if(!t.has(e)){u.pragma("journal_mode = DELETE");let e=u.pragma("journal_mode",{simple:!0}).toLowerCase();t.has(e)?(u.pragma("synchronous = FULL"),console.warn(`[startup] WAL unavailable, using journal_mode=${e} with synchronous=FULL`)):l.push({kind:"pragma_error",message:`Failed to set journal_mode (got '${e}', tried WAL then DELETE)`,found:e,required:"wal or delete",fix:"Ensure the database file is on a local filesystem and no other process holds an exclusive lock."})}}catch(e){l.push({kind:"pragma_error",message:`Failed to apply required PRAGMAs: ${e.message}`,fix:"Check file permissions and ensure the database is not read-only."})}return l}e.s(["validateSQLiteEnvironment",()=>u])},97812,e=>{"use strict";var t=e.i(60447);let r=new Set(["replan","rollback"]);class a extends Error{expectedVersion;actualVersion;constructor(e,t){super(`Execution graph version conflict: expected ${e}, found ${t}.`),this.name="GraphVersionConflictError",this.expectedVersion=e,this.actualVersion=t}}class s extends Error{constructor(e){super(`Execution graph not found: ${e}`),this.name="GraphNotFoundError"}}class i extends Error{nodeIds;constructor(e,t){super(`Execution graph ${e} is missing node(s): ${t.join(", ")}`),this.name="GraphNodeNotFoundError",this.nodeIds=t}}class n extends Error{taskId;existingGraphId;constructor(e,t){super(`Task ${e} is already bound to execution graph ${t}.`),this.name="GraphTaskAlreadyBoundError",this.taskId=e,this.existingGraphId=t}}function o(e){return null==e?null:JSON.stringify(e)}function d(e){if(null==e)return null;if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}function u(e){let t=Date.parse(e);return Number.isNaN(t)?e:new Date(t).toISOString()}function p(e){return!e||"object"!=typeof e||Array.isArray(e)?{}:e}function l(e){let{type:t,status:r,metrics:a,output:s,...i}=e;return{type:t,status:r,config:i,output:s??null,metrics:a??null}}function c(e){let t={...p(d(e.payload))};return"eventType"in t||(t.eventType=e.event_type),"timestamp"in t||(t.timestamp=u(e.timestamp)),t}function h(e){return{query(t,r){let a=e.prepare(t);return/^\s*(INSERT|UPDATE|DELETE)/i.test(t)&&!/RETURNING/i.test(t)?(a.run(...r??[]),{rows:[]}):{rows:a.all(...r??[])}}}}class E{getDb(){return(0,t.getSQLiteDb)()}createGraph(e,t){let r=this.getDb(),a=h(r);t?.skipTaskBinding&&r.pragma("foreign_keys = OFF");try{return r.transaction(()=>{let r=a.query("SELECT id FROM execution_graphs WHERE task_id = ? LIMIT 1",[e.taskId]).rows[0];if(r&&r.id!==e.id)throw new n(e.taskId,r.id);for(let[t,r]of(a.query(`INSERT INTO execution_graphs
2
- (id, task_id, graph_version, mode, policy, done_criteria, schedule, created_at, updated_at)
3
- VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
4
- ON CONFLICT (id) DO UPDATE SET
5
- task_id = excluded.task_id,
6
- graph_version = excluded.graph_version,
7
- mode = excluded.mode,
8
- policy = excluded.policy,
9
- done_criteria = excluded.done_criteria,
10
- schedule = excluded.schedule,
11
- created_at = excluded.created_at,
12
- updated_at = excluded.updated_at`,[e.id,e.taskId,e.graphVersion,e.mode,o(e.policy),o(e.doneCriteria),o(e.schedule??null),e.createdAt,e.updatedAt]),a.query("DELETE FROM graph_nodes WHERE graph_id = ?",[e.id]),a.query("DELETE FROM graph_edges WHERE graph_id = ?",[e.id]),Object.entries(e.nodes))){let s=l(r);a.query(`INSERT INTO graph_nodes (graph_id, node_id, type, status, config, output, metrics)
13
- VALUES (?, ?, ?, ?, ?, ?, ?)`,[e.id,t,s.type,s.status,o(s.config),o(s.output),o(s.metrics)])}for(let t of e.edges)a.query(`INSERT INTO graph_edges (graph_id, from_id, to_id, type, condition, data_mapping)
14
- VALUES (?, ?, ?, ?, ?, ?)`,[e.id,t.from,t.to,t.type,t.condition??null,o(t.dataMapping??null)]);for(let t of e.versionHistory)this.appendEventInternal(a,e.id,t);for(let t of e.runtimeEvents??[])this.appendEventInternal(a,e.id,t);t?.skipTaskBinding||a.query("UPDATE tasks SET graph_id = ? WHERE id = ?",[e.id,e.taskId]);let i=this.getGraphForTask(a,e.taskId);if(!i)throw new s(e.id);return i})()}finally{t?.skipTaskBinding&&r.pragma("foreign_keys = ON")}}getGraph(e){let t=this.getDb();return this.getGraphForTask(h(t),e)}updateNodeRuntime(e,t,r){let a=this.getDb(),n=h(a);return a.transaction(()=>{if(!n.query("SELECT id, graph_version FROM execution_graphs WHERE id = ?",[e]).rows[0])throw new s(e);let r=Object.keys(t);if(0===r.length){let t=n.query("SELECT graph_version, updated_at FROM execution_graphs WHERE id = ?",[e]);return{graphVersion:t.rows[0].graph_version,updatedAt:u(t.rows[0].updated_at)}}let a=r.map(()=>"?").join(", "),l=n.query(`SELECT node_id, type, status, config, output, metrics
15
- FROM graph_nodes WHERE graph_id = ? AND node_id IN (${a})`,[e,...r]),c=new Map;for(let e of l.rows)c.set(e.node_id,e);let h=r.filter(e=>!c.has(e));if(h.length>0)throw new i(e,h);for(let a of r){let r=t[a],s=c.get(a);if(!s||!r)continue;let i={...p(d(s.config)),...p(r.configPatch)};void 0!==r.startedAt&&(i.startedAt=r.startedAt),void 0!==r.completedAt&&(i.completedAt=r.completedAt),void 0!==r.actualMinutes&&(i.actualMinutes=r.actualMinutes),n.query(`UPDATE graph_nodes SET status = ?, metrics = ?, output = ?, config = ?
16
- WHERE graph_id = ? AND node_id = ?`,[r.status??s.status,o(r.metrics??d(s.metrics)),o(r.output??d(s.output)),o(i),e,a])}let E=n.query("UPDATE execution_graphs SET updated_at = datetime('now') WHERE id = ? RETURNING graph_version, updated_at",[e]);return{graphVersion:E.rows[0].graph_version,updatedAt:u(E.rows[0].updated_at)}})()}updateGraphStructure(e,t,r){let a=this.getDb(),i=h(a);return a.transaction(()=>{let r=i.query("SELECT id, graph_version, mode, policy, done_criteria, schedule FROM execution_graphs WHERE id = ?",[e]).rows[0];if(!r)throw new s(e);if(t.nodes)for(let[r,a]of(i.query("DELETE FROM graph_nodes WHERE graph_id = ?",[e]),Object.entries(t.nodes))){let t=l(a);i.query(`INSERT INTO graph_nodes (graph_id, node_id, type, status, config, output, metrics)
17
- VALUES (?, ?, ?, ?, ?, ?, ?)`,[e,r,t.type,t.status,o(t.config),o(t.output),o(t.metrics)])}if(t.edges)for(let r of(i.query("DELETE FROM graph_edges WHERE graph_id = ?",[e]),t.edges))i.query(`INSERT INTO graph_edges (graph_id, from_id, to_id, type, condition, data_mapping)
18
- VALUES (?, ?, ?, ?, ?, ?)`,[e,r.from,r.to,r.type,r.condition??null,o(r.dataMapping??null)]);let a=i.query(`UPDATE execution_graphs
19
- SET mode = ?, policy = ?, done_criteria = ?, schedule = ?, updated_at = datetime('now')
20
- WHERE id = ?
21
- RETURNING graph_version, updated_at`,[t.mode??r.mode,o(t.policy??d(r.policy)??{}),o(t.doneCriteria??d(r.done_criteria)??{}),o(t.schedule??d(r.schedule)??null),e]);return{graphVersion:a.rows[0].graph_version,updatedAt:u(a.rows[0].updated_at)}})()}appendEvent(e,t){let r=this.getDb();this.appendEventInternal(h(r),e,t)}getGraphForTask(e,t){let a=e.query(`SELECT id, task_id, graph_version, mode, policy, done_criteria, schedule, created_at, updated_at
22
- FROM execution_graphs WHERE task_id = ? ORDER BY updated_at DESC LIMIT 1`,[t]).rows[0];if(!a)return null;let s=e.query(`SELECT node_id, type, status, config, output, metrics
23
- FROM graph_nodes WHERE graph_id = ? ORDER BY node_id ASC`,[a.id]),i=e.query(`SELECT from_id, to_id, type, condition, data_mapping
24
- FROM graph_edges WHERE graph_id = ? ORDER BY from_id ASC, to_id ASC`,[a.id]),n=e.query(`SELECT event_type, payload, timestamp
25
- FROM graph_events WHERE graph_id = ? ORDER BY timestamp ASC, event_type ASC`,[a.id]),o={};for(let e of s.rows)o[e.node_id]=function(e){let t={...p(d(e.config)),type:e.type,status:e.status},r=d(e.metrics);null!==r&&(t.metrics=r);let a=d(e.output);return null!==a&&(t.output=a),t}(e);let l=i.rows.map(e=>({from:e.from_id,to:e.to_id,type:e.type,...e.condition?{condition:d(e.condition)}:{},...e.data_mapping?{dataMapping:d(e.data_mapping)}:{}})),h=[],E=[];for(let e of n.rows){let t=c(e);r.has(t.eventType)?h.push(t):E.push(t)}return{id:a.id,taskId:a.task_id,graphVersion:a.graph_version,mode:a.mode,nodes:o,edges:l,policy:d(a.policy)??{},doneCriteria:d(a.done_criteria)??{},schedule:d(a.schedule)??void 0,versionHistory:h,runtimeEvents:E,createdAt:u(a.created_at),updatedAt:u(a.updated_at)}}appendEventInternal(e,t,r){e.query(`INSERT INTO graph_events (graph_id, event_type, payload, timestamp)
26
- VALUES (?, ?, ?, ?)`,[t,r.eventType,o(r),r.timestamp])}}function g(){return new E}let _=new E;function m(e,t){return _.createGraph(e,t)}function f(e){return _.getGraph(e)}function y(e,t,r){return _.updateNodeRuntime(e,t,r)}function S(e,t,r){return _.updateGraphStructure(e,t,r)}function T(e,t){return _.appendEvent(e,t)}function x(e,r={}){let a=["graph_id = ?"],s=[e];r.eventType&&(a.push("event_type = ?"),s.push(r.eventType)),r.since&&(a.push("timestamp >= ?"),s.push(r.since));let i=r.limit??1e3,n=`SELECT event_type, payload, timestamp
27
- FROM graph_events
28
- WHERE ${a.join(" AND ")}
29
- ORDER BY timestamp ASC, event_type ASC
30
- LIMIT ?`;return s.push(i),h((0,t.getSQLiteDb)()).query(n,s).rows.map(e=>c(e))}function R(e){let r=e.trim();return r?(0,t.getSQLiteDb)().prepare(`SELECT id AS graphId, task_id AS taskId
31
- FROM execution_graphs
32
- WHERE schedule IS NOT NULL
33
- AND json_extract(schedule, '$.rootMessageId') = ?
34
- AND json_extract(schedule, '$.state') = 'active'
35
- ORDER BY updated_at DESC
36
- LIMIT 1`).get(r)??null:null}function v(){return(0,t.getSQLiteDb)().prepare(`SELECT json_extract(schedule, '$.rootMessageId') AS rootMessageId
37
- FROM execution_graphs
38
- WHERE schedule IS NOT NULL
39
- AND json_extract(schedule, '$.state') = 'active'`).all().map(e=>e.rootMessageId).filter(Boolean)}function A(e){let r=e.trim();return r?Number((0,t.getSQLiteDb)().prepare(`UPDATE execution_graphs
40
- SET schedule = json_set(schedule, '$.state', 'stopped', '$.tickInProgress', json('false')),
41
- updated_at = strftime('%Y-%m-%dT%H:%M:%fZ','now')
42
- WHERE schedule IS NOT NULL
43
- AND json_extract(schedule, '$.rootMessageId') = ?
44
- AND json_extract(schedule, '$.state') = 'active'`).run(r).changes??0):0}e.s(["GraphNodeNotFoundError",()=>i,"GraphNotFoundError",()=>s,"GraphStore",()=>E,"GraphTaskAlreadyBoundError",()=>n,"GraphVersionConflictError",()=>a,"appendEvent",()=>T,"createGraph",()=>m,"createGraphStore",()=>g,"deactivateSchedulesByRootMessageId",()=>A,"getActiveScheduleForRootMessageId",()=>R,"getActiveScheduleRootMessageIds",()=>v,"getGraph",()=>f,"getGraphEvents",()=>x,"updateGraphStructure",()=>S,"updateNodeRuntime",()=>y])},79042,e=>{"use strict";e.s(["DEFAULT_EXECUTION_POLICY",0,{replanBudgetRemaining:3,replanBudgetInitial:3,verifyBudgetRemaining:5,verifyBudgetInitial:5,maxConcurrentAutoChecks:1,immutableRequiredGates:!0,maxConcurrent:3,priorityMode:"fifo",nodeTimeoutMs:18e5,graphTimeoutMs:864e5},"FAILURE_NODE_STATUSES",0,["failed"],"INCOMPLETE_FOR_DONE_STATUSES",0,["pending","running","awaiting_human","blocked"],"SOFT_DEP_SATISFIED_STATUSES",0,["done","passed","failed","skipped","blocked"],"SUCCESS_NODE_STATUSES",0,["done","passed"],"TERMINAL_NODE_STATUSES",0,["done","passed","failed","skipped"]])}];
45
-
46
- //# sourceMappingURL=%5Broot-of-the-server%5D__0925dd01._.js.map
@@ -1,29 +0,0 @@
1
- module.exports=[18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},85148,(e,t,r)=>{t.exports=e.x("better-sqlite3-90e2652d1716b047",()=>require("better-sqlite3-90e2652d1716b047"))},22734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},46786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},33405,(e,t,r)=>{t.exports=e.x("child_process",()=>require("child_process"))},49041,e=>{"use strict";let t={id:"2c3cc1ca-956d-4b62-b295-4d2d3374103f",email:process.env.AGX_BOARD_USER_EMAIL||"local@agx.board",name:process.env.AGX_BOARD_USER_NAME||"Local Board User"};e.s(["LOCAL_USER",0,t])},21729,e=>{"use strict";var t=e.i(22734),r=e.i(46786),n=e.i(14747);let a="3.35.0",s=["json1"],i=["fts5"],o=["nfs","smb","cifs","efs","fuse.sshfs"];function l(e,t){try{if("json1"===t)return e.prepare("SELECT json('{}')").get(),!0;if("fts5"===t)return e.exec("CREATE VIRTUAL TABLE IF NOT EXISTS _fts5_check USING fts5(x)"),e.exec("DROP TABLE IF EXISTS _fts5_check"),!0;return!1}catch{return!1}}function d(d,u){let c=[],p=d.prepare("SELECT sqlite_version() as v").get();for(let e of(0>function(e,t){let r=e.split(".").map(Number),n=t.split(".").map(Number);for(let e=0;e<3;e++){let t=(r[e]||0)-(n[e]||0);if(0!==t)return t}return 0}(p.v,a)&&c.push({kind:"version_mismatch",message:`SQLite version ${p.v} is below minimum ${a}`,found:p.v,required:`>= ${a}`,fix:"darwin"===r.default.platform()?"TURBOPACK unreachable":"apt-get install -y libsqlite3-dev && npm rebuild better-sqlite3"}),s))l(d,e)||c.push({kind:"missing_extension",message:`Required SQLite extension '${e}' is not available`,required:e,fix:`Rebuild SQLite with -DSQLITE_ENABLE_${e.toUpperCase()}=1, or use a system SQLite that includes it`});for(let e of i)l(d,e)||console.warn(`[startup] Recommended SQLite extension '${e}' is not available. Full-text search will be disabled.`);let f=function(a){"linux"!==r.default.platform()&&r.default.platform();try{let s=n.default.resolve(a),{execSync:i}=e.r(33405);if("darwin"===r.default.platform());else{let e=t.default.readFileSync("/proc/mounts","utf-8"),r="",n="unknown";for(let t of e.split("\n")){let[,e,a]=t.split(/\s+/);e&&s.startsWith(e)&&e.length>r.length&&(r=e,n=a||"unknown")}return n}}catch{}return null}(u);f&&o.some(e=>f.toLowerCase().includes(e))&&c.push({kind:"filesystem_error",message:`Database path '${u}' is on a network filesystem (${f})`,path:u,found:f,fix:"Move the database file to a local SSD. WAL mode requires local filesystem with reliable fsync."});try{d.pragma("journal_mode = wal"),d.pragma("foreign_keys = 1"),d.pragma("busy_timeout = 5000"),d.pragma("synchronous = 1"),d.pragma("cache_size = -64000");let e=d.pragma("journal_mode",{simple:!0}).toLowerCase(),t=new Set(["wal","delete"]);if(!t.has(e)){d.pragma("journal_mode = DELETE");let e=d.pragma("journal_mode",{simple:!0}).toLowerCase();t.has(e)?(d.pragma("synchronous = FULL"),console.warn(`[startup] WAL unavailable, using journal_mode=${e} with synchronous=FULL`)):c.push({kind:"pragma_error",message:`Failed to set journal_mode (got '${e}', tried WAL then DELETE)`,found:e,required:"wal or delete",fix:"Ensure the database file is on a local filesystem and no other process holds an exclusive lock."})}}catch(e){c.push({kind:"pragma_error",message:`Failed to apply required PRAGMAs: ${e.message}`,fix:"Check file permissions and ensure the database is not read-only."})}return c}e.s(["validateSQLiteEnvironment",()=>d])},57431,e=>{"use strict";function t(){let{createAdminDbClientSQLite:t}=e.r(60447);return t()}e.i(49041),e.s(["createAdminDbClient",()=>t])},54799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},14350,e=>{"use strict";var t=e.i(33405);let r=e=>"string"==typeof e&&e.trim().length>0,n=e=>({push:e,flush:()=>{}}),a=e=>{let t="",n=0,a=!1,s=t=>{let s=t.trim();if(s)try{let t=JSON.parse(s);a=!0;let i=(e=>{if(!e||"object"!=typeof e)return"";if("assistant"===e.type)return(Array.isArray(e?.message?.content)?e.message.content:[]).flatMap(e=>e?.type==="text"&&r(e.text)?[e.text]:[]).join("");let t=e?.event;return"stream_event"===e.type&&t?.type==="content_block_delta"&&t?.delta?.type==="text_delta"&&r(t?.delta?.text)?t.delta.text:""})(t);if(!i||t?.type==="assistant"&&n>0)return;n+=i.length,e(i)}catch{a||e(`${t}
2
- `)}};return{push:e=>{for(t+=e;;){let e=t.indexOf("\n");if(-1===e)break;s(t.slice(0,e)),t=t.slice(e+1)}},flush:()=>{t.trim()&&s(t),t=""}}},s=e=>{let t="",n=!1,a="",s=t=>{let s=t.trim();if(s)try{let t=JSON.parse(s);n=!0,t?.type==="message"&&t?.role==="assistant"&&r(t?.content)&&((t,r)=>{if(t){if(r){if(a&&t.startsWith(a)){let r=t.slice(a.length);r&&e(r),a=t;return}e(t),a+=t;return}if(a&&t.startsWith(a)){let r=t.slice(a.length);r&&e(r),a=t;return}a||(e(t),a=t)}})(t.content,t?.delta===!0)}catch{n||e(`${t}
3
- `)}};return{push:e=>{for(t+=e;;){let e=t.indexOf("\n");if(-1===e)break;s(t.slice(0,e)),t=t.slice(e+1)}},flush:()=>{t.trim()&&s(t),t=""}}},i=e=>{let t="",n=!1,a=new Set,s=t=>{let s=t.trim();if(s)try{let t=JSON.parse(s);if(n=!0,t?.type==="item.completed"&&r(t?.item?.id)){if(a.has(t.item.id))return;a.add(t.item.id)}let i=t&&"object"==typeof t?"item.completed"===t.type&&t.item?.type==="agent_message"&&r(t.item?.text)?t.item.text:"item.delta"===t.type&&t.item?.type==="agent_message"&&r(t.delta?.text)?t.delta.text:"":"";i&&e(i)}catch{n||e(`${t}
4
- `)}};return{push:e=>{for(t+=e;;){let e=t.indexOf("\n");if(-1===e)break;s(t.slice(0,e)),t=t.slice(e+1)}},flush:()=>{t.trim()&&s(t),t=""}}},o=e=>{let t="",r=!1,n=[/^Thinking\.\.\./,/^<think>/i],a=[/\.\.\.done thinking\.?\s*/,/<\/think>/i];return{push:s=>{t+=s,(()=>{for(;t.length>0;){if(r){let e=-1,n=0;for(let r of a){let a=t.match(r);a&&void 0!==a.index&&(a.index,a[0].length,(-1===e||a.index<e)&&(e=a.index,n=a[0].length))}if(-1!==e){t=t.slice(e+n),r=!1,t=t.replace(/^\s*\n*/,"");continue}return}for(let a of n){let n=t.match(a);if(n&&void 0!==n.index){let a=t.slice(0,n.index);a&&e.push(a),t=t.slice(n.index+n[0].length),r=!0;break}}if(r)continue;let s=Math.max(0,t.length-30);s>0&&(e.push(t.slice(0,s)),t=t.slice(s));return}})()},flush:()=>{!r&&t&&e.push(t),t="",e.flush()}}};async function l({command:e,args:r,timeoutMs:n,signal:a,onDelta:s,onLog:i,onSpawn:o,env:l}){await new Promise((d,u)=>{i&&i("stderr",`$ ${e} ${r.map(e=>e.length>80?e.slice(0,80)+"…":e).join(" ")}
5
- `);let c=(0,t.spawn)(e,r,{stdio:["ignore","pipe","pipe"],env:{...process.env,CLAUDECODE:void 0,...l}}),p=!1,f="",h=!1,m=e=>{p||(p=!0,clearTimeout(x),a&&a.removeEventListener("abort",g),e?u(e):d())},g=()=>{c.kill("SIGTERM"),m(Error("Chat request aborted."))};a&&a.addEventListener("abort",g,{once:!0}),o&&c.pid&&o(c.pid);let x=setTimeout(()=>{h=!0,c.kill("SIGKILL"),m(Error(`CLI request timed out after ${n}ms.`))},n);c.stdout.on("data",e=>{let t=e.toString();f+=t,s(t),i&&i("stdout",t)}),c.stderr.on("data",e=>{let t=e.toString();f+=t,i&&i("stderr",t)}),c.on("error",e=>m(e)),c.on("close",(e,t)=>{if(!p&&!h){if(0===e)return void m();m(Error(`CLI command failed (exit=${e??"unknown"} signal=${t??"none"}).${f.trim()?` ${f.trim()}`:""}`))}})})}async function d({provider:e,model:r,prompt:d,identity:u,self:c,skills:p,systemContext:f,signal:h,onDelta:m,onLog:g,onSpawn:x}){let v,y,E,w,R=(v=!1,y=!1,E="",w=/^(?:```|~~~|#{1,6}\s|>\s|[-*+]\s|\d+\.\s)/,e=>{let t=e.replace(/\u001B\[[0-9;]*[A-Za-z]/g,"").replace(/\r\n/g,"\n").replace(/\r/g,"\n").replace(/[ \t]+\n/g,"\n").replace(/\n{3,}/g,"\n\n");if(!t.trim())return t.includes("\n")&&!v?(v=!0,"\n"):"";let r=v?t.replace(/^\n+/,"\n"):t,n=r.trimStart(),a=w.test(n),s=y&&a&&!v,i=y&&!v&&!s&&!/^\s/.test(r)&&/[.!?)]/.test(E)&&/^[A-Z0-9`(]/.test(r),o=s?`
6
-
7
- ${r}`:i?`
8
- ${r}`:r;v=o.endsWith("\n"),y=y||o.trim().length>0;let l=o.replace(/\s+$/g,"");return l.length>0&&(E=l[l.length-1]??E),o}),b=e=>{let t=R(e);t&&m(t)},A=[],k=[];f&&k.push(f),u&&k.push(`<identity>
9
- ${u}
10
- </identity>`),c&&k.push(`<self>
11
- ${c}
12
- </self>`),p&&k.push(`<skills>
13
- ${p}
14
- </skills>`);let _=k.length>0?k.join("\n\n"):void 0;if((e=>{try{return 0===(0,t.spawnSync)("bash",["-lc","command -v agx >/dev/null 2>&1"],{encoding:"utf8"}).status}catch{return!1}})(0)){let t=_?`${_}
15
-
16
- ${d}`:d;A.push(function({provider:e,model:t,prompt:r}){let n=[e,"-y","--print","--prompt",r];return t&&n.push("--model",t),{command:"agx",args:n,parser:"raw"}}({provider:e,model:r,prompt:t}))}if(0===A.length)throw Error(`No CLI runner available for provider "${e}". Install agx or provider CLI.`);let S=null;for(let e of A){let t="claude-stream-json"===e.parser?a(b):"codex-json"===e.parser?i(b):"gemini-stream-json"===e.parser?s(b):n(b),r=e.filterThoughts?o(t):t;try{await l({command:e.command,args:e.args,timeoutMs:6e5,signal:h,onDelta:r.push,onLog:g,onSpawn:x,env:e.env}),r.flush();return}catch(e){S=e instanceof Error?e:Error(String(e))}}throw S||Error("CLI execution failed.")}e.s(["runCliResponse",()=>d],14350)},84776,e=>{"use strict";var t=e.i(62294),r=e.i(49041);async function n(){let e=await (0,t.getAgents)(r.LOCAL_USER.id),n=new Map;return await Promise.all(e.map(async e=>{n.set(e.id,await (0,t.getAgentSkills)(e.id))})),e.map(e=>({id:e.id,name:e.name,provider:e.provider||"claude",model:e.model||null,color:e.color||"#6B7280",...e.description?{identity:e.description}:{},...n.get(e.id)?.length?{skills:n.get(e.id).map(e=>({file:e.file,condition:e.condition??""}))}:{}}))}function a(e,t){if(!Array.isArray(t))return e;let r=new Set,n=[];for(let e of t){if("string"!=typeof e)continue;let t=e.trim();!t||r.has(t)||(r.add(t),n.push(t))}let a=new Set(n),s=e.filter(e=>a.has(e.id));if(n.length>0&&0===s.length)return e;let i=new Map(n.map((e,t)=>[e,t]));return s.sort((e,t)=>(i.get(e.id)??Number.MAX_SAFE_INTEGER)-(i.get(t.id)??Number.MAX_SAFE_INTEGER))}e.s(["filterActiveParticipants",()=>a,"loadDbParticipants",()=>n])},96658,e=>{"use strict";var t=e.i(47909),r=e.i(74017),n=e.i(96250),a=e.i(59756),s=e.i(61916),i=e.i(74677),o=e.i(69741),l=e.i(16795),d=e.i(87718),u=e.i(95169),c=e.i(47587),p=e.i(66012),f=e.i(70101),h=e.i(74838),m=e.i(10372),g=e.i(93695);e.i(52474);var x=e.i(220),v=e.i(94028),y=e.i(42639),E=e.i(84776),w=e.i(14350);async function R(e){try{let t,{threadId:r,rootMessageId:n,activeParticipantIds:a}=await e.json();if(!r||!n)return v.NextResponse.json({error:"threadId and rootMessageId are required"},{status:400});let s=await (0,y.loadHistory)(r),i=s.find(e=>e.id===n);if(!i)return v.NextResponse.json({error:"Root message not found"},{status:404});let o=s.filter(e=>e.rootMessageId===n).sort((e,t)=>e.timestamp-t.timestamp),l=[i,...o],d=await (0,E.loadDbParticipants)(),u=(0,E.filterActiveParticipants)(d,a)[0];if(!u)return v.NextResponse.json({error:"No active agents configured for this project"},{status:400});let c=Object.fromEntries(d.map(e=>[e.id,e])),p=l.map(e=>{let t="user"===e.role?"User":e.participantId?c[e.participantId]?.name||e.participantId:"Assistant";return`${t}: ${e.content}`}).join("\n\n"),f=`Read the following conversation and extract a list of actionable tasks that were discussed. Order them by execution sequence — tasks that others depend on should come first.
17
-
18
- For each task, provide:
19
- - "title": a concise title (under 80 characters)
20
- - "description": a detailed description including all relevant context, requirements, constraints, and acceptance criteria discussed in the thread
21
- - "depends_on": an array of zero-based indices of other tasks in this list that must be completed before this one can start (e.g. [0, 2] means this task depends on tasks at index 0 and 2). Use an empty array [] if the task has no dependencies.
22
-
23
- Return ONLY a valid JSON array of objects with "title", "description", and "depends_on" fields. No other text.
24
-
25
- ---
26
- ${p}
27
- ---`,h="";await (0,w.runCliResponse)({provider:u.provider,model:u.model,prompt:f,identity:u.identity,onDelta:e=>{h+=e}});let m=h=h.trim(),g=h.match(/```(?:json)?\s*([\s\S]*?)```/);g&&(m=g[1].trim());try{if(t=JSON.parse(m),!Array.isArray(t))throw Error("Not an array")}catch{return v.NextResponse.json({error:"Failed to parse tasks from LLM response",raw:h},{status:500})}let x=t.filter(e=>e.title&&e.description).slice(0,20),R=x.map(()=>crypto.randomUUID()),b=x.map((e,t)=>({id:R[t],title:e.title.slice(0,200),description:e.description,dependsOn:(e.depends_on||[]).filter(e=>e>=0&&e<x.length&&e!==t).map(e=>R[e])}));return v.NextResponse.json({ok:!0,tasks:b})}catch(e){return console.error("Task extraction error:",e),v.NextResponse.json({error:e instanceof Error?e.message:"Unknown error"},{status:500})}}e.s(["POST",()=>R],42405);var b=e.i(42405);let A=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/tasks/extract/route",pathname:"/api/tasks/extract",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/tasks/extract/route.ts",nextConfigOutput:"standalone",userland:b}),{workAsyncStorage:k,workUnitAsyncStorage:_,serverHooks:S}=A;function C(){return(0,n.patchFetch)({workAsyncStorage:k,workUnitAsyncStorage:_})}async function L(e,t,n){A.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let v="/api/tasks/extract/route";v=v.replace(/\/index$/,"")||"/";let y=await A.prepare(e,t,{srcPage:v,multiZoneDraftMode:!1});if(!y)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:E,params:w,nextConfig:R,parsedUrl:b,isDraftMode:k,prerenderManifest:_,routerServerContext:S,isOnDemandRevalidate:C,revalidateOnlyGenerated:L,resolvedPathname:N,clientReferenceManifest:j,serverActionsManifest:T}=y,$=(0,o.normalizeAppPath)(v),O=!!(_.dynamicRoutes[$]||_.routes[N]),q=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,b,!1):t.end("This page could not be found"),null);if(O&&!k){let e=!!_.routes[N],t=_.dynamicRoutes[$];if(t&&!1===t.fallback&&!e){if(R.experimental.adapterPath)return await q();throw new g.NoFallbackError}}let I=null;!O||A.isDev||k||(I="/index"===(I=N)?"/":I);let P=!0===A.isDev||!O,U=O&&!P;T&&j&&(0,i.setManifestsSingleton)({page:v,clientReferenceManifest:j,serverActionsManifest:T});let D=e.method||"GET",M=(0,s.getTracer)(),F=M.getActiveScopeSpan(),H={params:w,prerenderManifest:_,renderOpts:{experimental:{authInterrupts:!!R.experimental.authInterrupts},cacheComponents:!!R.cacheComponents,supportsDynamicResponse:P,incrementalCache:(0,a.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:R.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,a)=>A.onRequestError(e,t,n,a,S)},sharedContext:{buildId:E}},B=new l.NodeNextRequest(e),G=new l.NodeNextResponse(t),K=d.NextRequestAdapter.fromNodeNextRequest(B,(0,d.signalFromNodeResponse)(t));try{let i=async e=>A.handle(K,H).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=M.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${D} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t)}else e.updateName(`${D} ${v}`)}),o=!!(0,a.getRequestMeta)(e,"minimalMode"),l=async a=>{var s,l;let d=async({previousCacheEntry:r})=>{try{if(!o&&C&&L&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await i(a);e.fetchMetrics=H.renderOpts.fetchMetrics;let l=H.renderOpts.pendingWaitUntil;l&&n.waitUntil&&(n.waitUntil(l),l=void 0);let d=H.renderOpts.collectedTags;if(!O)return await (0,p.sendResponse)(B,G,s,H.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(s.headers);d&&(t[m.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==H.renderOpts.collectedRevalidate&&!(H.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&H.renderOpts.collectedRevalidate,n=void 0===H.renderOpts.collectedExpire||H.renderOpts.collectedExpire>=m.INFINITE_CACHE?void 0:H.renderOpts.collectedExpire;return{value:{kind:x.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await A.onRequestError(e,t,{routerKind:"App Router",routePath:v,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:C})},!1,S),t}},u=await A.handleResponse({req:e,nextConfig:R,cacheKey:I,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:_,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:L,responseGenerator:d,waitUntil:n.waitUntil,isMinimalMode:o});if(!O)return null;if((null==u||null==(s=u.value)?void 0:s.kind)!==x.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(l=u.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});o||t.setHeader("x-nextjs-cache",C?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),k&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let g=(0,f.fromNodeOutgoingHttpHeaders)(u.value.headers);return o&&O||g.delete(m.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||g.get("Cache-Control")||g.set("Cache-Control",(0,h.getCacheControlHeader)(u.cacheControl)),await (0,p.sendResponse)(B,G,new Response(u.value.body,{headers:g,status:u.value.status||200})),null};F?await l(F):await M.withPropagatedContext(e.headers,()=>M.trace(u.BaseServerSpan.handleRequest,{spanName:`${D} ${v}`,kind:s.SpanKind.SERVER,attributes:{"http.method":D,"http.target":e.url}},l))}catch(t){if(t instanceof g.NoFallbackError||await A.onRequestError(e,t,{routerKind:"App Router",routePath:$,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:C})},!1,S),O)throw t;return await (0,p.sendResponse)(B,G,new Response(null,{status:500})),null}}e.s(["handler",()=>L,"patchFetch",()=>C,"routeModule",()=>A,"serverHooks",()=>S,"workAsyncStorage",()=>k,"workUnitAsyncStorage",()=>_],96658)},18801,e=>{e.v(e=>Promise.resolve().then(()=>e(60447)))}];
28
-
29
- //# sourceMappingURL=%5Broot-of-the-server%5D__12c7e188._.js.map
@@ -1,52 +0,0 @@
1
- module.exports=[18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},85148,(e,t,r)=>{t.exports=e.x("better-sqlite3-90e2652d1716b047",()=>require("better-sqlite3-90e2652d1716b047"))},22734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},46786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},33405,(e,t,r)=>{t.exports=e.x("child_process",()=>require("child_process"))},21729,e=>{"use strict";var t=e.i(22734),r=e.i(46786),a=e.i(14747);let s="3.35.0",n=["json1"],i=["fts5"],o=["nfs","smb","cifs","efs","fuse.sshfs"];function l(e,t){try{if("json1"===t)return e.prepare("SELECT json('{}')").get(),!0;if("fts5"===t)return e.exec("CREATE VIRTUAL TABLE IF NOT EXISTS _fts5_check USING fts5(x)"),e.exec("DROP TABLE IF EXISTS _fts5_check"),!0;return!1}catch{return!1}}function d(d,u){let c=[],p=d.prepare("SELECT sqlite_version() as v").get();for(let e of(0>function(e,t){let r=e.split(".").map(Number),a=t.split(".").map(Number);for(let e=0;e<3;e++){let t=(r[e]||0)-(a[e]||0);if(0!==t)return t}return 0}(p.v,s)&&c.push({kind:"version_mismatch",message:`SQLite version ${p.v} is below minimum ${s}`,found:p.v,required:`>= ${s}`,fix:"darwin"===r.default.platform()?"TURBOPACK unreachable":"apt-get install -y libsqlite3-dev && npm rebuild better-sqlite3"}),n))l(d,e)||c.push({kind:"missing_extension",message:`Required SQLite extension '${e}' is not available`,required:e,fix:`Rebuild SQLite with -DSQLITE_ENABLE_${e.toUpperCase()}=1, or use a system SQLite that includes it`});for(let e of i)l(d,e)||console.warn(`[startup] Recommended SQLite extension '${e}' is not available. Full-text search will be disabled.`);let h=function(s){"linux"!==r.default.platform()&&r.default.platform();try{let n=a.default.resolve(s),{execSync:i}=e.r(33405);if("darwin"===r.default.platform());else{let e=t.default.readFileSync("/proc/mounts","utf-8"),r="",a="unknown";for(let t of e.split("\n")){let[,e,s]=t.split(/\s+/);e&&n.startsWith(e)&&e.length>r.length&&(r=e,a=s||"unknown")}return a}}catch{}return null}(u);h&&o.some(e=>h.toLowerCase().includes(e))&&c.push({kind:"filesystem_error",message:`Database path '${u}' is on a network filesystem (${h})`,path:u,found:h,fix:"Move the database file to a local SSD. WAL mode requires local filesystem with reliable fsync."});try{d.pragma("journal_mode = wal"),d.pragma("foreign_keys = 1"),d.pragma("busy_timeout = 5000"),d.pragma("synchronous = 1"),d.pragma("cache_size = -64000");let e=d.pragma("journal_mode",{simple:!0}).toLowerCase(),t=new Set(["wal","delete"]);if(!t.has(e)){d.pragma("journal_mode = DELETE");let e=d.pragma("journal_mode",{simple:!0}).toLowerCase();t.has(e)?(d.pragma("synchronous = FULL"),console.warn(`[startup] WAL unavailable, using journal_mode=${e} with synchronous=FULL`)):c.push({kind:"pragma_error",message:`Failed to set journal_mode (got '${e}', tried WAL then DELETE)`,found:e,required:"wal or delete",fix:"Ensure the database file is on a local filesystem and no other process holds an exclusive lock."})}}catch(e){c.push({kind:"pragma_error",message:`Failed to apply required PRAGMAs: ${e.message}`,fix:"Check file permissions and ensure the database is not read-only."})}return c}e.s(["validateSQLiteEnvironment",()=>d])},49041,e=>{"use strict";let t={id:"2c3cc1ca-956d-4b62-b295-4d2d3374103f",email:process.env.AGX_BOARD_USER_EMAIL||"local@agx.board",name:process.env.AGX_BOARD_USER_NAME||"Local Board User"};e.s(["LOCAL_USER",0,t])},66680,(e,t,r)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},14499,e=>{"use strict";let t=Number(process.env.AGX_MAX_WORKERS)||10;function r(e){if(e>t)throw Error(`[limits] Requested ${e} workers exceeds MAX_WORKERS (${t}). See docs/LIMITS.md — exceeding this limit risks SQLITE_BUSY errors. Set AGX_MAX_WORKERS to override (requires architecture review).`);if(e<1)throw Error(`[limits] Worker count must be at least 1, got ${e}.`)}class a{timestamps=[];lastWarning=0;WARNING_COOLDOWN_MS=6e4;record(){this.timestamps.push(Date.now())}check(){let e=Date.now(),t=e-1e4;this.timestamps=this.timestamps.filter(e=>e>=t);let r=this.timestamps.length/10,a=r>=40;return a&&e-this.lastWarning>this.WARNING_COOLDOWN_MS&&(this.lastWarning=e,console.warn(`[limits] Write QPS at ${r.toFixed(1)} — approaching ceiling of 50. See docs/LIMITS.md for mitigation steps.`)),{qps:r,warning:a}}}e.s(["MAX_WORKERS",0,t,"WRITE_QPS_CEILING",0,50,"WRITE_RATE_SAMPLE_WINDOW_MS",0,1e4,"WriteRateMonitor",()=>a,"assertWorkerCount",()=>r])},68638,e=>{"use strict";var t=e.i(85148),r=e.i(66680);let a={randomUUID:r.randomUUID},s=new Uint8Array(256),n=s.length,i=[];for(let e=0;e<256;++e)i.push((e+256).toString(16).slice(1));let o=function(e,t,o){if(a.randomUUID&&!t&&!e)return a.randomUUID();var l=e,d=o;let u=(l=l||{}).random??l.rng?.()??(n>s.length-16&&((0,r.randomFillSync)(s),n=0),s.slice(n,n+=16));if(u.length<16)throw Error("Random bytes length must be >= 16");if(u[6]=15&u[6]|64,u[8]=63&u[8]|128,t){if((d=d||0)<0||d+16>t.length)throw RangeError(`UUID byte range ${d}:${d+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[d+e]=u[e];return t}return function(e,t=0){return(i[e[t+0]]+i[e[t+1]]+i[e[t+2]]+i[e[t+3]]+"-"+i[e[t+4]]+i[e[t+5]]+"-"+i[e[t+6]]+i[e[t+7]]+"-"+i[e[t+8]]+i[e[t+9]]+"-"+i[e[t+10]]+i[e[t+11]]+i[e[t+12]]+i[e[t+13]]+i[e[t+14]]+i[e[t+15]]).toLowerCase()}(u)};var l=e.i(14747),d=e.i(22734),u=e.i(46786),c=e.i(21729),p=e.i(14499);let h=process.env.AGX_DATA_DIR||l.default.join(u.default.homedir(),".agx");class E{db;workers=new Map;pollingInterval=null;writeRateInterval=null;writeMonitor=new p.WriteRateMonitor;workerId;constructor(e){this.workerId=o();const r=e||process.env.SQLITE_QUEUE_PATH||l.default.join(h,"agx-queue.db"),a=l.default.dirname(r);d.default.existsSync(a)||d.default.mkdirSync(a,{recursive:!0}),this.db=new t.default(r);const s=(0,c.validateSQLiteEnvironment)(this.db,r);if(s.length>0){const e=s.map(e=>e.message).join("; ");console.error(`[SQLiteQueueAdapter] Startup validation failed: ${e}`)}}async start(){this.initSchema(),this.startPolling()}async stop(){this.stopPolling(),this.db.close()}initSchema(){this.db.exec(`
2
- CREATE TABLE IF NOT EXISTS agx_jobs (
3
- id TEXT PRIMARY KEY,
4
- queue TEXT NOT NULL,
5
- data TEXT NOT NULL,
6
- status TEXT NOT NULL CHECK(status IN ('pending', 'active', 'completed', 'failed', 'retry')),
7
- created_at INTEGER NOT NULL,
8
- start_after INTEGER NOT NULL DEFAULT 0,
9
- started_at INTEGER,
10
- completed_at INTEGER,
11
- failed_at INTEGER,
12
- worker_id TEXT,
13
- retry_count INTEGER DEFAULT 0,
14
- retry_limit INTEGER DEFAULT 0,
15
- priority INTEGER DEFAULT 0,
16
- error TEXT
17
- );
18
- CREATE INDEX IF NOT EXISTS idx_jobs_fetch ON agx_jobs (queue, status, start_after, priority DESC, created_at ASC);
19
- `);let e=new Set(this.db.pragma("table_info(agx_jobs)").map(e=>e.name));e.has("failed_at")||this.db.exec("ALTER TABLE agx_jobs ADD COLUMN failed_at INTEGER"),e.has("error")||this.db.exec("ALTER TABLE agx_jobs ADD COLUMN error TEXT")}async send(e,t,r){let a=o(),s=Date.now(),n=r?.startAfter?r.startAfter instanceof Date?r.startAfter.getTime():r.startAfter:s;return this.db.prepare(`
20
- INSERT INTO agx_jobs (
21
- id, queue, data, status, created_at, start_after, retry_limit, priority
22
- ) VALUES (?, ?, ?, 'pending', ?, ?, ?, ?)
23
- `).run(a,e,JSON.stringify(t),s,n,r?.retryLimit??3,r?.priority??0),this.writeMonitor.record(),a}async work(e,t,r){this.workers.set(e,{handler:t,options:r||{},running:!0})}startPolling(){this.pollingInterval||(this.pollingInterval=setInterval(()=>this.poll(),1e3),this.writeRateInterval=setInterval(()=>this.writeMonitor.check(),p.WRITE_RATE_SAMPLE_WINDOW_MS))}stopPolling(){this.pollingInterval&&(clearInterval(this.pollingInterval),this.pollingInterval=null),this.writeRateInterval&&(clearInterval(this.writeRateInterval),this.writeRateInterval=null)}poll(){for(let[e,t]of this.workers)t.running&&this.processQueue(e,t)}processQueue(e,t){let r=t.options.batchSize||1,a=Date.now(),s=this.db.transaction(()=>{let t=this.db.prepare(`
24
- SELECT id, data FROM agx_jobs
25
- WHERE queue = ?
26
- AND (status = 'pending' OR status = 'retry')
27
- AND start_after <= ?
28
- ORDER BY priority DESC, created_at ASC
29
- LIMIT ?
30
- `).all(e,a,r);if(0===t.length)return[];let s=t.map(e=>e.id),n=this.db.prepare(`
31
- UPDATE agx_jobs
32
- SET status = 'active', started_at = ?, worker_id = ?
33
- WHERE id = ?
34
- `);for(let e of s)n.run(a,this.workerId,e);return t.map(t=>({id:t.id,name:e,data:JSON.parse(t.data)}))})();s.length>0&&this.executeJobs(s,t.handler)}async executeJobs(e,t){try{await t(e),this.completeJobs(e.map(e=>e.id))}catch(t){this.failJobs(e.map(e=>e.id),t.message||String(t))}}completeJobs(e){let t=Date.now(),r=this.db.prepare(`
35
- UPDATE agx_jobs
36
- SET status = 'completed', completed_at = ?
37
- WHERE id = ?
38
- `);this.db.transaction(()=>{for(let a of e)r.run(t,a)})()}failJobs(e,t){let r=Date.now(),a=this.db.prepare(`
39
- SELECT id, retry_count, retry_limit FROM agx_jobs WHERE id = ?
40
- `),s=this.db.prepare(`
41
- UPDATE agx_jobs
42
- SET status = 'retry', retry_count = retry_count + 1,
43
- start_after = ? + (retry_count * 1000 * 2), -- Exponential backoff (kinda)
44
- error = ?
45
- WHERE id = ?
46
- `),n=this.db.prepare(`
47
- UPDATE agx_jobs
48
- SET status = 'failed', failed_at = ?, error = ?
49
- WHERE id = ?
50
- `);this.db.transaction(()=>{for(let i of e){let e=a.get(i);if(e&&e.retry_count<e.retry_limit){let a=(e.retry_count+1)*2e3;s.run(r+a,t,i)}else n.run(r,t,i)}})()}}let f=null;async function m(){return f||(f=new E,await f.start()),f}e.s(["QUEUE_NAMES",0,{TASK_PROCESS:"agx.task.process",CHAT_RUN_PROCESS:"agx.chat.process",TASK_CLEANUP:"agx.task.cleanup"},"getQueue",()=>m],68638)},11808,e=>{"use strict";var t=e.i(47909),r=e.i(74017),a=e.i(96250),s=e.i(59756),n=e.i(61916),i=e.i(74677),o=e.i(69741),l=e.i(16795),d=e.i(87718),u=e.i(95169),c=e.i(47587),p=e.i(66012),h=e.i(70101),E=e.i(74838),f=e.i(10372),m=e.i(93695);e.i(52474);var g=e.i(220),R=e.i(94028),_=e.i(68638),x=e.i(49041);async function T(e,{params:t}){let{id:r}=await t,a=await e.json().catch(()=>({}));if("cancel"!==("string"==typeof a?.signal?a.signal.trim():""))return R.NextResponse.json({error:"Unsupported signal"},{status:400});let s=await (0,_.getQueue)(),n=await s.send(_.QUEUE_NAMES.CHAT_RUN_PROCESS,{chatRunId:r,userId:x.LOCAL_USER.id,signal:"cancel",payload:{reason:"string"==typeof a?.reason?a.reason.trim():void 0}});return R.NextResponse.json({ok:!0,jobId:n})}e.s(["POST",()=>T,"dynamic",0,"force-dynamic","runtime",0,"nodejs"],75575);var b=e.i(75575);let v=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/chat-runs/[id]/signal/route",pathname:"/api/chat-runs/[id]/signal",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/chat-runs/[id]/signal/route.ts",nextConfigOutput:"standalone",userland:b}),{workAsyncStorage:w,workUnitAsyncStorage:S,serverHooks:A}=v;function y(){return(0,a.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:S})}async function I(e,t,a){v.isDev&&(0,s.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let R="/api/chat-runs/[id]/signal/route";R=R.replace(/\/index$/,"")||"/";let _=await v.prepare(e,t,{srcPage:R,multiZoneDraftMode:!1});if(!_)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:x,params:T,nextConfig:b,parsedUrl:w,isDraftMode:S,prerenderManifest:A,routerServerContext:y,isOnDemandRevalidate:I,revalidateOnlyGenerated:N,resolvedPathname:L,clientReferenceManifest:C,serverActionsManifest:U}=_,O=(0,o.normalizeAppPath)(R),D=!!(A.dynamicRoutes[O]||A.routes[L]),k=async()=>((null==y?void 0:y.render404)?await y.render404(e,t,w,!1):t.end("This page could not be found"),null);if(D&&!S){let e=!!A.routes[L],t=A.dynamicRoutes[O];if(t&&!1===t.fallback&&!e){if(b.experimental.adapterPath)return await k();throw new m.NoFallbackError}}let j=null;!D||v.isDev||S||(j="/index"===(j=L)?"/":j);let P=!0===v.isDev||!D,q=D&&!P;U&&C&&(0,i.setManifestsSingleton)({page:R,clientReferenceManifest:C,serverActionsManifest:U});let M=e.method||"GET",W=(0,n.getTracer)(),H=W.getActiveScopeSpan(),$={params:T,prerenderManifest:A,renderOpts:{experimental:{authInterrupts:!!b.experimental.authInterrupts},cacheComponents:!!b.cacheComponents,supportsDynamicResponse:P,incrementalCache:(0,s.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:b.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,s)=>v.onRequestError(e,t,a,s,y)},sharedContext:{buildId:x}},F=new l.NodeNextRequest(e),X=new l.NodeNextResponse(t),G=d.NextRequestAdapter.fromNodeNextRequest(F,(0,d.signalFromNodeResponse)(t));try{let i=async e=>v.handle(G,$).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=W.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${M} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t)}else e.updateName(`${M} ${R}`)}),o=!!(0,s.getRequestMeta)(e,"minimalMode"),l=async s=>{var n,l;let d=async({previousCacheEntry:r})=>{try{if(!o&&I&&N&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await i(s);e.fetchMetrics=$.renderOpts.fetchMetrics;let l=$.renderOpts.pendingWaitUntil;l&&a.waitUntil&&(a.waitUntil(l),l=void 0);let d=$.renderOpts.collectedTags;if(!D)return await (0,p.sendResponse)(F,X,n,$.renderOpts.pendingWaitUntil),null;{let e=await n.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(n.headers);d&&(t[f.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==$.renderOpts.collectedRevalidate&&!($.renderOpts.collectedRevalidate>=f.INFINITE_CACHE)&&$.renderOpts.collectedRevalidate,a=void 0===$.renderOpts.collectedExpire||$.renderOpts.collectedExpire>=f.INFINITE_CACHE?void 0:$.renderOpts.collectedExpire;return{value:{kind:g.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await v.onRequestError(e,t,{routerKind:"App Router",routePath:R,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:q,isOnDemandRevalidate:I})},!1,y),t}},u=await v.handleResponse({req:e,nextConfig:b,cacheKey:j,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:I,revalidateOnlyGenerated:N,responseGenerator:d,waitUntil:a.waitUntil,isMinimalMode:o});if(!D)return null;if((null==u||null==(n=u.value)?void 0:n.kind)!==g.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(l=u.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});o||t.setHeader("x-nextjs-cache",I?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),S&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let m=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return o&&D||m.delete(f.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||m.get("Cache-Control")||m.set("Cache-Control",(0,E.getCacheControlHeader)(u.cacheControl)),await (0,p.sendResponse)(F,X,new Response(u.value.body,{headers:m,status:u.value.status||200})),null};H?await l(H):await W.withPropagatedContext(e.headers,()=>W.trace(u.BaseServerSpan.handleRequest,{spanName:`${M} ${R}`,kind:n.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},l))}catch(t){if(t instanceof m.NoFallbackError||await v.onRequestError(e,t,{routerKind:"App Router",routePath:O,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:q,isOnDemandRevalidate:I})},!1,y),D)throw t;return await (0,p.sendResponse)(F,X,new Response(null,{status:500})),null}}e.s(["handler",()=>I,"patchFetch",()=>y,"routeModule",()=>v,"serverHooks",()=>A,"workAsyncStorage",()=>w,"workUnitAsyncStorage",()=>S],11808)}];
51
-
52
- //# sourceMappingURL=%5Broot-of-the-server%5D__17c2d68f._.js.map