@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
@@ -86,20 +86,20 @@ var require_file_uri_to_path = __commonJS({
86
86
  var rest = decodeURI(uri.substring(7));
87
87
  var firstSlash = rest.indexOf("/");
88
88
  var host = rest.substring(0, firstSlash);
89
- var path8 = rest.substring(firstSlash + 1);
89
+ var path10 = rest.substring(firstSlash + 1);
90
90
  if ("localhost" == host) host = "";
91
91
  if (host) {
92
92
  host = sep + sep + host;
93
93
  }
94
- path8 = path8.replace(/^(.+)\|/, "$1:");
94
+ path10 = path10.replace(/^(.+)\|/, "$1:");
95
95
  if (sep == "\\") {
96
- path8 = path8.replace(/\//g, "\\");
96
+ path10 = path10.replace(/\//g, "\\");
97
97
  }
98
- if (/^.+\:/.test(path8)) {
98
+ if (/^.+\:/.test(path10)) {
99
99
  } else {
100
- path8 = sep + path8;
100
+ path10 = sep + path10;
101
101
  }
102
- return host + path8;
102
+ return host + path10;
103
103
  }
104
104
  }
105
105
  });
@@ -107,19 +107,19 @@ var require_file_uri_to_path = __commonJS({
107
107
  // ../agx-cloud/node_modules/bindings/bindings.js
108
108
  var require_bindings = __commonJS({
109
109
  "../agx-cloud/node_modules/bindings/bindings.js"(exports2, module2) {
110
- var fs5 = require("fs");
111
- var path8 = require("path");
110
+ var fs7 = require("fs");
111
+ var path10 = require("path");
112
112
  var fileURLToPath = require_file_uri_to_path();
113
- var join6 = path8.join;
114
- var dirname = path8.dirname;
115
- var exists = fs5.accessSync && function(path9) {
113
+ var join6 = path10.join;
114
+ var dirname = path10.dirname;
115
+ var exists = fs7.accessSync && function(path11) {
116
116
  try {
117
- fs5.accessSync(path9);
117
+ fs7.accessSync(path11);
118
118
  } catch (e) {
119
119
  return false;
120
120
  }
121
121
  return true;
122
- } || fs5.existsSync || path8.existsSync;
122
+ } || fs7.existsSync || path10.existsSync;
123
123
  var defaults = {
124
124
  arrow: process.env.NODE_BINDINGS_ARROW || " \u2192 ",
125
125
  compiled: process.env.NODE_BINDINGS_COMPILED_DIR || "compiled",
@@ -164,7 +164,7 @@ var require_bindings = __commonJS({
164
164
  if (!opts.module_root) {
165
165
  opts.module_root = exports2.getRoot(exports2.getFileName());
166
166
  }
167
- if (path8.extname(opts.bindings) != ".node") {
167
+ if (path10.extname(opts.bindings) != ".node") {
168
168
  opts.bindings += ".node";
169
169
  }
170
170
  var requireFunc = typeof __webpack_require__ === "function" ? __non_webpack_require__ : require;
@@ -402,11 +402,11 @@ var require_pragma = __commonJS({
402
402
  var require_backup = __commonJS({
403
403
  "../agx-cloud/node_modules/better-sqlite3/lib/methods/backup.js"(exports2, module2) {
404
404
  "use strict";
405
- var fs5 = require("fs");
406
- var path8 = require("path");
405
+ var fs7 = require("fs");
406
+ var path10 = require("path");
407
407
  var { promisify } = require("util");
408
408
  var { cppdb } = require_util();
409
- var fsAccess = promisify(fs5.access);
409
+ var fsAccess = promisify(fs7.access);
410
410
  module2.exports = async function backup(filename, options) {
411
411
  if (options == null) options = {};
412
412
  if (typeof filename !== "string") throw new TypeError("Expected first argument to be a string");
@@ -419,7 +419,7 @@ var require_backup = __commonJS({
419
419
  if (typeof attachedName !== "string") throw new TypeError('Expected the "attached" option to be a string');
420
420
  if (!attachedName) throw new TypeError('The "attached" option cannot be an empty string');
421
421
  if (handler != null && typeof handler !== "function") throw new TypeError('Expected the "progress" option to be a function');
422
- await fsAccess(path8.dirname(filename)).catch(() => {
422
+ await fsAccess(path10.dirname(filename)).catch(() => {
423
423
  throw new TypeError("Cannot save backup because the directory does not exist");
424
424
  });
425
425
  const isNewFile = await fsAccess(filename).then(() => false, () => true);
@@ -724,8 +724,8 @@ var require_inspect = __commonJS({
724
724
  var require_database = __commonJS({
725
725
  "../agx-cloud/node_modules/better-sqlite3/lib/database.js"(exports2, module2) {
726
726
  "use strict";
727
- var fs5 = require("fs");
728
- var path8 = require("path");
727
+ var fs7 = require("fs");
728
+ var path10 = require("path");
729
729
  var util = require_util();
730
730
  var SqliteError = require_sqlite_error();
731
731
  var DEFAULT_ADDON;
@@ -761,7 +761,7 @@ var require_database = __commonJS({
761
761
  addon = DEFAULT_ADDON || (DEFAULT_ADDON = require_bindings()("better_sqlite3.node"));
762
762
  } else if (typeof nativeBinding === "string") {
763
763
  const requireFunc = typeof __non_webpack_require__ === "function" ? __non_webpack_require__ : require;
764
- addon = requireFunc(path8.resolve(nativeBinding).replace(/(\.node)?$/, ".node"));
764
+ addon = requireFunc(path10.resolve(nativeBinding).replace(/(\.node)?$/, ".node"));
765
765
  } else {
766
766
  addon = nativeBinding;
767
767
  }
@@ -769,7 +769,7 @@ var require_database = __commonJS({
769
769
  addon.setErrorConstructor(SqliteError);
770
770
  addon.isInitialized = true;
771
771
  }
772
- if (!anonymous && !filename.startsWith("file:") && !fs5.existsSync(path8.dirname(filename))) {
772
+ if (!anonymous && !filename.startsWith("file:") && !fs7.existsSync(path10.dirname(filename))) {
773
773
  throw new TypeError("Cannot open database because the directory does not exist");
774
774
  }
775
775
  Object.defineProperties(this, {
@@ -977,11 +977,11 @@ var init_auth_mode = __esm({
977
977
 
978
978
  // ../agx-cloud/lib/mesh-core/activity.ts
979
979
  function activityPath(agentId) {
980
- return (0, import_path3.join)(AGENTS_DIR, agentId, "activity.jsonl");
980
+ return (0, import_path4.join)(AGENTS_DIR, agentId, "activity.jsonl");
981
981
  }
982
982
  function ensureDir(agentId) {
983
- const dir = (0, import_path3.join)(AGENTS_DIR, agentId);
984
- if (!(0, import_fs3.existsSync)(dir)) (0, import_fs3.mkdirSync)(dir, { recursive: true });
983
+ const dir = (0, import_path4.join)(AGENTS_DIR, agentId);
984
+ if (!(0, import_fs4.existsSync)(dir)) (0, import_fs4.mkdirSync)(dir, { recursive: true });
985
985
  }
986
986
  function logActivity(agentId, action, data) {
987
987
  try {
@@ -992,32 +992,32 @@ function logActivity(agentId, action, data) {
992
992
  action,
993
993
  ...data
994
994
  };
995
- (0, import_fs3.appendFileSync)(activityPath(agentId), JSON.stringify(event) + "\n", "utf-8");
995
+ (0, import_fs4.appendFileSync)(activityPath(agentId), JSON.stringify(event) + "\n", "utf-8");
996
996
  } catch {
997
997
  }
998
998
  }
999
- var import_fs3, import_path3, import_os3, AGENTS_DIR;
999
+ var import_fs4, import_path4, import_os4, AGENTS_DIR;
1000
1000
  var init_activity = __esm({
1001
1001
  "../agx-cloud/lib/mesh-core/activity.ts"() {
1002
1002
  "use strict";
1003
- import_fs3 = require("fs");
1004
- import_path3 = require("path");
1005
- import_os3 = require("os");
1006
- AGENTS_DIR = (0, import_path3.join)((0, import_os3.homedir)(), ".agx", "agents");
1003
+ import_fs4 = require("fs");
1004
+ import_path4 = require("path");
1005
+ import_os4 = require("os");
1006
+ AGENTS_DIR = (0, import_path4.join)((0, import_os4.homedir)(), ".agx", "agents");
1007
1007
  }
1008
1008
  });
1009
1009
 
1010
1010
  // ../agx-cloud/lib/mesh-core/self.ts
1011
1011
  function selfPath(agentId) {
1012
- return (0, import_path4.join)(AGENTS_DIR2, agentId, "self.md");
1012
+ return (0, import_path5.join)(AGENTS_DIR2, agentId, "self.md");
1013
1013
  }
1014
1014
  function reflectionStatePath(agentId) {
1015
- return (0, import_path4.join)(AGENTS_DIR2, agentId, "reflection-state.json");
1015
+ return (0, import_path5.join)(AGENTS_DIR2, agentId, "reflection-state.json");
1016
1016
  }
1017
1017
  function readSelf(agentId) {
1018
- const path8 = selfPath(agentId);
1019
- if (!(0, import_fs4.existsSync)(path8)) return null;
1020
- const raw = (0, import_fs4.readFileSync)(path8, "utf-8");
1018
+ const path10 = selfPath(agentId);
1019
+ if (!(0, import_fs5.existsSync)(path10)) return null;
1020
+ const raw = (0, import_fs5.readFileSync)(path10, "utf-8");
1021
1021
  if (!raw.trim()) return null;
1022
1022
  const lines = raw.split("\n");
1023
1023
  let version = 0;
@@ -1043,8 +1043,8 @@ function readSelf(agentId) {
1043
1043
  };
1044
1044
  }
1045
1045
  function writeSelf(agentId, content, version) {
1046
- const dir = (0, import_path4.join)(AGENTS_DIR2, agentId);
1047
- if (!(0, import_fs4.existsSync)(dir)) (0, import_fs4.mkdirSync)(dir, { recursive: true });
1046
+ const dir = (0, import_path5.join)(AGENTS_DIR2, agentId);
1047
+ if (!(0, import_fs5.existsSync)(dir)) (0, import_fs5.mkdirSync)(dir, { recursive: true });
1048
1048
  const derivedAt = (/* @__PURE__ */ new Date()).toISOString();
1049
1049
  const full = `---
1050
1050
  version: ${version}
@@ -1053,15 +1053,15 @@ derivedAt: ${derivedAt}
1053
1053
  ${content}
1054
1054
  `;
1055
1055
  const tmp = selfPath(agentId) + ".tmp";
1056
- (0, import_fs4.writeFileSync)(tmp, full, "utf-8");
1057
- (0, import_fs4.renameSync)(tmp, selfPath(agentId));
1056
+ (0, import_fs5.writeFileSync)(tmp, full, "utf-8");
1057
+ (0, import_fs5.renameSync)(tmp, selfPath(agentId));
1058
1058
  logActivity(agentId, "self-updated", { meta: { version } });
1059
1059
  }
1060
1060
  function readReflectionState(agentId) {
1061
- const path8 = reflectionStatePath(agentId);
1062
- if (!(0, import_fs4.existsSync)(path8)) return null;
1061
+ const path10 = reflectionStatePath(agentId);
1062
+ if (!(0, import_fs5.existsSync)(path10)) return null;
1063
1063
  try {
1064
- const parsed = JSON.parse((0, import_fs4.readFileSync)(path8, "utf-8"));
1064
+ const parsed = JSON.parse((0, import_fs5.readFileSync)(path10, "utf-8"));
1065
1065
  const lastProcessedJournalId = typeof parsed?.lastProcessedJournalId === "string" && parsed.lastProcessedJournalId.trim() ? parsed.lastProcessedJournalId.trim() : null;
1066
1066
  const updatedAt = typeof parsed?.updatedAt === "string" && parsed.updatedAt.trim() ? parsed.updatedAt : (/* @__PURE__ */ new Date()).toISOString();
1067
1067
  return { lastProcessedJournalId, updatedAt };
@@ -1070,11 +1070,11 @@ function readReflectionState(agentId) {
1070
1070
  }
1071
1071
  }
1072
1072
  function writeReflectionState(agentId, state) {
1073
- const dir = (0, import_path4.join)(AGENTS_DIR2, agentId);
1074
- if (!(0, import_fs4.existsSync)(dir)) (0, import_fs4.mkdirSync)(dir, { recursive: true });
1073
+ const dir = (0, import_path5.join)(AGENTS_DIR2, agentId);
1074
+ if (!(0, import_fs5.existsSync)(dir)) (0, import_fs5.mkdirSync)(dir, { recursive: true });
1075
1075
  const tmp = reflectionStatePath(agentId) + ".tmp";
1076
- (0, import_fs4.writeFileSync)(tmp, JSON.stringify(state, null, 2), "utf-8");
1077
- (0, import_fs4.renameSync)(tmp, reflectionStatePath(agentId));
1076
+ (0, import_fs5.writeFileSync)(tmp, JSON.stringify(state, null, 2), "utf-8");
1077
+ (0, import_fs5.renameSync)(tmp, reflectionStatePath(agentId));
1078
1078
  }
1079
1079
  function buildReflectionPrompt(identity, currentSelf, recentJournal, teamSelves) {
1080
1080
  const selfText = currentSelf?.content || `I am ${identity.name}. ${identity.seed}`;
@@ -1153,35 +1153,35 @@ Rules:
1153
1153
  - If nothing genuinely new was learned, return an empty memories array.
1154
1154
  - Do not wrap the JSON in markdown fences.`;
1155
1155
  }
1156
- var import_fs4, import_path4, import_os4, AGENTS_DIR2;
1156
+ var import_fs5, import_path5, import_os5, AGENTS_DIR2;
1157
1157
  var init_self = __esm({
1158
1158
  "../agx-cloud/lib/mesh-core/self.ts"() {
1159
1159
  "use strict";
1160
- import_fs4 = require("fs");
1161
- import_path4 = require("path");
1162
- import_os4 = require("os");
1160
+ import_fs5 = require("fs");
1161
+ import_path5 = require("path");
1162
+ import_os5 = require("os");
1163
1163
  init_activity();
1164
- AGENTS_DIR2 = (0, import_path4.join)((0, import_os4.homedir)(), ".agx", "agents");
1164
+ AGENTS_DIR2 = (0, import_path5.join)((0, import_os5.homedir)(), ".agx", "agents");
1165
1165
  }
1166
1166
  });
1167
1167
 
1168
1168
  // ../agx-cloud/lib/mesh-core/journal.ts
1169
1169
  function agentDir(agentId) {
1170
- return (0, import_path5.join)(AGENTS_DIR3, agentId);
1170
+ return (0, import_path6.join)(AGENTS_DIR3, agentId);
1171
1171
  }
1172
1172
  function journalPath(agentId) {
1173
- return (0, import_path5.join)(agentDir(agentId), "journal.jsonl");
1173
+ return (0, import_path6.join)(agentDir(agentId), "journal.jsonl");
1174
1174
  }
1175
1175
  function ensureAgentDir(agentId) {
1176
1176
  const dir = agentDir(agentId);
1177
- if (!(0, import_fs5.existsSync)(dir)) {
1178
- (0, import_fs5.mkdirSync)(dir, { recursive: true });
1177
+ if (!(0, import_fs6.existsSync)(dir)) {
1178
+ (0, import_fs6.mkdirSync)(dir, { recursive: true });
1179
1179
  }
1180
1180
  }
1181
1181
  function readJournalLines(agentId) {
1182
- const path8 = journalPath(agentId);
1183
- if (!(0, import_fs5.existsSync)(path8)) return [];
1184
- return (0, import_fs5.readFileSync)(path8, "utf-8").split("\n").filter((l) => l.trim());
1182
+ const path10 = journalPath(agentId);
1183
+ if (!(0, import_fs6.existsSync)(path10)) return [];
1184
+ return (0, import_fs6.readFileSync)(path10, "utf-8").split("\n").filter((l) => l.trim());
1185
1185
  }
1186
1186
  function parseMaxSeq(agentId, lines) {
1187
1187
  let maxSeq = 0;
@@ -1210,7 +1210,7 @@ function appendJournal(agentId, entry) {
1210
1210
  const nextId = `${agentId}:${maxSeq + 1}`;
1211
1211
  const normalized = { ...entry, id: entry.id?.trim() || nextId };
1212
1212
  const line = JSON.stringify(normalized) + "\n";
1213
- (0, import_fs5.appendFileSync)(journalPath(agentId), line, "utf-8");
1213
+ (0, import_fs6.appendFileSync)(journalPath(agentId), line, "utf-8");
1214
1214
  logActivity(agentId, entry.type === "reflection" ? "reflection" : "journal-post", {
1215
1215
  thread: normalized.thread,
1216
1216
  meta: { entryId: normalized.id }
@@ -1244,42 +1244,42 @@ function readJournalSince(agentId, afterEntryId) {
1244
1244
  }
1245
1245
  return entries;
1246
1246
  }
1247
- var import_fs5, import_path5, import_os5, AGENTS_DIR3;
1247
+ var import_fs6, import_path6, import_os6, AGENTS_DIR3;
1248
1248
  var init_journal = __esm({
1249
1249
  "../agx-cloud/lib/mesh-core/journal.ts"() {
1250
1250
  "use strict";
1251
- import_fs5 = require("fs");
1252
- import_path5 = require("path");
1253
- import_os5 = require("os");
1251
+ import_fs6 = require("fs");
1252
+ import_path6 = require("path");
1253
+ import_os6 = require("os");
1254
1254
  init_activity();
1255
- AGENTS_DIR3 = (0, import_path5.join)((0, import_os5.homedir)(), ".agx", "agents");
1255
+ AGENTS_DIR3 = (0, import_path6.join)((0, import_os6.homedir)(), ".agx", "agents");
1256
1256
  }
1257
1257
  });
1258
1258
 
1259
1259
  // ../agx-cloud/lib/mesh-core/agent.ts
1260
1260
  function ensureAgent(agentId, options) {
1261
- const dir = (0, import_path6.join)(AGENTS_DIR4, agentId);
1262
- if (!(0, import_fs6.existsSync)(dir)) {
1263
- (0, import_fs6.mkdirSync)(dir, { recursive: true });
1261
+ const dir = (0, import_path7.join)(AGENTS_DIR4, agentId);
1262
+ if (!(0, import_fs7.existsSync)(dir)) {
1263
+ (0, import_fs7.mkdirSync)(dir, { recursive: true });
1264
1264
  }
1265
1265
  const voice = options?.voice?.trim() || DEFAULT_VOICE;
1266
1266
  const seed = options?.seed?.trim() || DEFAULT_SEED;
1267
- const identityPath = (0, import_path6.join)(dir, "identity.json");
1268
- if (!(0, import_fs6.existsSync)(identityPath)) {
1267
+ const identityPath = (0, import_path7.join)(dir, "identity.json");
1268
+ if (!(0, import_fs7.existsSync)(identityPath)) {
1269
1269
  const identity = { name: agentId, voice, seed };
1270
- (0, import_fs6.writeFileSync)(identityPath, JSON.stringify(identity, null, 2) + "\n", "utf-8");
1271
- }
1272
- const journal = (0, import_path6.join)(dir, "journal.jsonl");
1273
- const reactions = (0, import_path6.join)(dir, "reactions.jsonl");
1274
- const comments = (0, import_path6.join)(dir, "comments.jsonl");
1275
- const activity = (0, import_path6.join)(dir, "activity.jsonl");
1276
- const self = (0, import_path6.join)(dir, "self.md");
1277
- if (!(0, import_fs6.existsSync)(journal)) (0, import_fs6.writeFileSync)(journal, "", "utf-8");
1278
- if (!(0, import_fs6.existsSync)(reactions)) (0, import_fs6.writeFileSync)(reactions, "", "utf-8");
1279
- if (!(0, import_fs6.existsSync)(comments)) (0, import_fs6.writeFileSync)(comments, "", "utf-8");
1280
- if (!(0, import_fs6.existsSync)(activity)) (0, import_fs6.writeFileSync)(activity, "", "utf-8");
1281
- if (!(0, import_fs6.existsSync)(self)) {
1282
- (0, import_fs6.writeFileSync)(
1270
+ (0, import_fs7.writeFileSync)(identityPath, JSON.stringify(identity, null, 2) + "\n", "utf-8");
1271
+ }
1272
+ const journal = (0, import_path7.join)(dir, "journal.jsonl");
1273
+ const reactions = (0, import_path7.join)(dir, "reactions.jsonl");
1274
+ const comments = (0, import_path7.join)(dir, "comments.jsonl");
1275
+ const activity = (0, import_path7.join)(dir, "activity.jsonl");
1276
+ const self = (0, import_path7.join)(dir, "self.md");
1277
+ if (!(0, import_fs7.existsSync)(journal)) (0, import_fs7.writeFileSync)(journal, "", "utf-8");
1278
+ if (!(0, import_fs7.existsSync)(reactions)) (0, import_fs7.writeFileSync)(reactions, "", "utf-8");
1279
+ if (!(0, import_fs7.existsSync)(comments)) (0, import_fs7.writeFileSync)(comments, "", "utf-8");
1280
+ if (!(0, import_fs7.existsSync)(activity)) (0, import_fs7.writeFileSync)(activity, "", "utf-8");
1281
+ if (!(0, import_fs7.existsSync)(self)) {
1282
+ (0, import_fs7.writeFileSync)(
1283
1283
  self,
1284
1284
  `---
1285
1285
  version: 0
@@ -1292,31 +1292,31 @@ I am ${agentId}. ${seed}
1292
1292
  }
1293
1293
  }
1294
1294
  function readIdentity(agentId) {
1295
- const path8 = (0, import_path6.join)(AGENTS_DIR4, agentId, "identity.json");
1296
- if (!(0, import_fs6.existsSync)(path8)) return null;
1295
+ const path10 = (0, import_path7.join)(AGENTS_DIR4, agentId, "identity.json");
1296
+ if (!(0, import_fs7.existsSync)(path10)) return null;
1297
1297
  try {
1298
- return JSON.parse((0, import_fs6.readFileSync)(path8, "utf-8"));
1298
+ return JSON.parse((0, import_fs7.readFileSync)(path10, "utf-8"));
1299
1299
  } catch {
1300
1300
  return null;
1301
1301
  }
1302
1302
  }
1303
1303
  function listAgents() {
1304
- if (!(0, import_fs6.existsSync)(AGENTS_DIR4)) return [];
1305
- return (0, import_fs6.readdirSync)(AGENTS_DIR4, { withFileTypes: true }).filter((d) => d.isDirectory()).map((d) => d.name);
1304
+ if (!(0, import_fs7.existsSync)(AGENTS_DIR4)) return [];
1305
+ return (0, import_fs7.readdirSync)(AGENTS_DIR4, { withFileTypes: true }).filter((d) => d.isDirectory()).map((d) => d.name);
1306
1306
  }
1307
1307
  function getTeamSelves(excludeAgent) {
1308
1308
  return listAgents().filter((id) => id !== excludeAgent).map((id) => readSelf(id)).filter((s) => s !== null);
1309
1309
  }
1310
- var import_fs6, import_path6, import_os6, AGENTS_DIR4, DEFAULT_VOICE, DEFAULT_SEED;
1310
+ var import_fs7, import_path7, import_os7, AGENTS_DIR4, DEFAULT_VOICE, DEFAULT_SEED;
1311
1311
  var init_agent = __esm({
1312
1312
  "../agx-cloud/lib/mesh-core/agent.ts"() {
1313
1313
  "use strict";
1314
- import_fs6 = require("fs");
1315
- import_path6 = require("path");
1316
- import_os6 = require("os");
1314
+ import_fs7 = require("fs");
1315
+ import_path7 = require("path");
1316
+ import_os7 = require("os");
1317
1317
  init_self();
1318
1318
  init_journal();
1319
- AGENTS_DIR4 = (0, import_path6.join)((0, import_os6.homedir)(), ".agx", "agents");
1319
+ AGENTS_DIR4 = (0, import_path7.join)((0, import_os7.homedir)(), ".agx", "agents");
1320
1320
  DEFAULT_VOICE = "conversational, concise, practical";
1321
1321
  DEFAULT_SEED = "I evolve through experience and collaboration.";
1322
1322
  }
@@ -1338,20 +1338,20 @@ function nextUniqueId(base, used) {
1338
1338
  }
1339
1339
  function migrateAgentDirectory(oldId, newId, displayName) {
1340
1340
  if (!oldId || !newId || oldId === newId) return;
1341
- const oldDir = import_path7.default.join(AGENTS_DIR5, oldId);
1342
- const newDir = import_path7.default.join(AGENTS_DIR5, newId);
1343
- if (!(0, import_fs7.existsSync)(oldDir) || (0, import_fs7.existsSync)(newDir)) return;
1344
- (0, import_fs7.mkdirSync)(AGENTS_DIR5, { recursive: true });
1345
- (0, import_fs7.renameSync)(oldDir, newDir);
1346
- const identityPath = import_path7.default.join(newDir, "identity.json");
1347
- if (!(0, import_fs7.existsSync)(identityPath)) return;
1341
+ const oldDir = import_path8.default.join(AGENTS_DIR5, oldId);
1342
+ const newDir = import_path8.default.join(AGENTS_DIR5, newId);
1343
+ if (!(0, import_fs8.existsSync)(oldDir) || (0, import_fs8.existsSync)(newDir)) return;
1344
+ (0, import_fs8.mkdirSync)(AGENTS_DIR5, { recursive: true });
1345
+ (0, import_fs8.renameSync)(oldDir, newDir);
1346
+ const identityPath = import_path8.default.join(newDir, "identity.json");
1347
+ if (!(0, import_fs8.existsSync)(identityPath)) return;
1348
1348
  try {
1349
- const parsed = JSON.parse((0, import_fs7.readFileSync)(identityPath, "utf8"));
1349
+ const parsed = JSON.parse((0, import_fs8.readFileSync)(identityPath, "utf8"));
1350
1350
  const updated = {
1351
1351
  ...parsed,
1352
1352
  name: typeof displayName === "string" && displayName.trim() ? displayName.trim() : newId
1353
1353
  };
1354
- (0, import_fs7.writeFileSync)(identityPath, `${JSON.stringify(updated, null, 2)}
1354
+ (0, import_fs8.writeFileSync)(identityPath, `${JSON.stringify(updated, null, 2)}
1355
1355
  `, "utf8");
1356
1356
  } catch {
1357
1357
  }
@@ -1429,7 +1429,7 @@ function migrateLegacyParticipantIds(db2) {
1429
1429
  }
1430
1430
  }
1431
1431
  function getDb() {
1432
- (0, import_fs7.mkdirSync)(STORE_DIR, { recursive: true });
1432
+ (0, import_fs8.mkdirSync)(STORE_DIR, { recursive: true });
1433
1433
  const db2 = new import_better_sqlite32.default(DB_PATH);
1434
1434
  db2.pragma("journal_mode = WAL");
1435
1435
  db2.exec(`
@@ -1507,17 +1507,17 @@ function loadParticipants() {
1507
1507
  db2.close();
1508
1508
  }
1509
1509
  }
1510
- var import_better_sqlite32, import_fs7, import_path7, import_os7, STORE_DIR, DB_PATH, AGENTS_DIR5;
1510
+ var import_better_sqlite32, import_fs8, import_path8, import_os8, STORE_DIR, DB_PATH, AGENTS_DIR5;
1511
1511
  var init_participants_store = __esm({
1512
1512
  "../agx-cloud/lib/participants-store.ts"() {
1513
1513
  "use strict";
1514
1514
  import_better_sqlite32 = __toESM(require_lib());
1515
- import_fs7 = require("fs");
1516
- import_path7 = __toESM(require("path"));
1517
- import_os7 = __toESM(require("os"));
1518
- STORE_DIR = process.env.AGX_GROUP_CHAT_DIR?.trim() || import_path7.default.join(import_os7.default.homedir(), ".agx", "group-chat");
1519
- DB_PATH = import_path7.default.join(STORE_DIR, "history.sqlite");
1520
- AGENTS_DIR5 = process.env.AGX_AGENTS_DIR?.trim() || import_path7.default.join(import_os7.default.homedir(), ".agx", "agents");
1515
+ import_fs8 = require("fs");
1516
+ import_path8 = __toESM(require("path"));
1517
+ import_os8 = __toESM(require("os"));
1518
+ STORE_DIR = process.env.AGX_GROUP_CHAT_DIR?.trim() || import_path8.default.join(import_os8.default.homedir(), ".agx", "group-chat");
1519
+ DB_PATH = import_path8.default.join(STORE_DIR, "history.sqlite");
1520
+ AGENTS_DIR5 = process.env.AGX_AGENTS_DIR?.trim() || import_path8.default.join(import_os8.default.homedir(), ".agx", "agents");
1521
1521
  }
1522
1522
  });
1523
1523
 
@@ -1811,7 +1811,7 @@ function sqlExpr(expr) {
1811
1811
  }
1812
1812
  function getSQLiteDb() {
1813
1813
  if (_db) return _db;
1814
- const dbPath = process.env.SQLITE_DB_PATH || import_path8.default.join(AGX_DATA_DIR2, "agx-board.db");
1814
+ const dbPath = process.env.SQLITE_DB_PATH || import_path9.default.join(AGX_DATA_DIR3, "agx-board.db");
1815
1815
  _db = new import_better_sqlite33.default(dbPath);
1816
1816
  const errors = validateSQLiteEnvironment(_db, dbPath);
1817
1817
  if (errors.length > 0) {
@@ -1837,12 +1837,12 @@ ${msgs.join("\n")}`);
1837
1837
  return _db;
1838
1838
  }
1839
1839
  function initSQLiteSchema(db2) {
1840
- const ddlPath = import_path8.default.join(process.cwd(), "db", "sqlite", "001_agx_board_schema.sql");
1841
- if (!import_fs8.default.existsSync(ddlPath)) {
1840
+ const ddlPath = import_path9.default.join(process.cwd(), "db", "sqlite", "001_agx_board_schema.sql");
1841
+ if (!import_fs9.default.existsSync(ddlPath)) {
1842
1842
  console.warn(`[sqlite] DDL not found at ${ddlPath}, skipping schema init`);
1843
1843
  return;
1844
1844
  }
1845
- const ddl = import_fs8.default.readFileSync(ddlPath, "utf-8");
1845
+ const ddl = import_fs9.default.readFileSync(ddlPath, "utf-8");
1846
1846
  db2.exec(ddl);
1847
1847
  }
1848
1848
  function dropLegacyTeamsTables(db2) {
@@ -2244,20 +2244,20 @@ function createAdminDbClientSQLite() {
2244
2244
  }
2245
2245
  };
2246
2246
  }
2247
- var import_better_sqlite33, import_fs8, import_path8, import_os8, AGX_DATA_DIR2, SqlExpression, _db, JSON_COLUMNS, SQLiteQueryBuilder, KNOWN_JSON_COLUMNS;
2247
+ var import_better_sqlite33, import_fs9, import_path9, import_os9, AGX_DATA_DIR3, SqlExpression, _db, JSON_COLUMNS, SQLiteQueryBuilder, KNOWN_JSON_COLUMNS;
2248
2248
  var init_sqlite_query_adapter = __esm({
2249
2249
  "../agx-cloud/lib/sqlite-query-adapter.ts"() {
2250
2250
  "use strict";
2251
2251
  import_better_sqlite33 = __toESM(require_lib());
2252
- import_fs8 = __toESM(require("fs"));
2253
- import_path8 = __toESM(require("path"));
2254
- import_os8 = __toESM(require("os"));
2252
+ import_fs9 = __toESM(require("fs"));
2253
+ import_path9 = __toESM(require("path"));
2254
+ import_os9 = __toESM(require("os"));
2255
2255
  init_auth_mode();
2256
2256
  init_agent();
2257
2257
  init_participants_store();
2258
2258
  init_startup();
2259
2259
  init_workspaces_to_projects_migration();
2260
- AGX_DATA_DIR2 = process.env.AGX_DATA_DIR || import_path8.default.join(import_os8.default.homedir(), ".agx");
2260
+ AGX_DATA_DIR3 = process.env.AGX_DATA_DIR || import_path9.default.join(import_os9.default.homedir(), ".agx");
2261
2261
  SqlExpression = class {
2262
2262
  constructor(expr) {
2263
2263
  this.expr = expr;
@@ -4061,7 +4061,7 @@ async function deleteProjectMemory(memoryId) {
4061
4061
  }
4062
4062
  async function getProjectThreads(projectId) {
4063
4063
  const db2 = createAdminDbClient();
4064
- const { data, error } = await db2.from("project_threads").select("*").eq("project_id", projectId).order("created_at", { ascending: false });
4064
+ const { data, error } = await db2.from("project_threads").select("*").eq("project_id", projectId).order("created_at", { ascending: true });
4065
4065
  if (error) {
4066
4066
  if (isMissingRelationError2(error, "project_threads")) return [];
4067
4067
  throw error;
@@ -4527,9 +4527,9 @@ function v4(options, buf, offset) {
4527
4527
  var v4_default = v4;
4528
4528
 
4529
4529
  // ../agx-cloud/lib/queue/sqlite-adapter.ts
4530
- var import_path2 = __toESM(require("path"));
4531
- var import_fs2 = __toESM(require("fs"));
4532
- var import_os2 = __toESM(require("os"));
4530
+ var import_path3 = __toESM(require("path"));
4531
+ var import_fs3 = __toESM(require("fs"));
4532
+ var import_os3 = __toESM(require("os"));
4533
4533
  init_startup();
4534
4534
 
4535
4535
  // ../agx-cloud/lib/limits.ts
@@ -4570,8 +4570,53 @@ var WriteRateMonitor = class {
4570
4570
  }
4571
4571
  };
4572
4572
 
4573
- // ../agx-cloud/lib/queue/sqlite-adapter.ts
4573
+ // ../agx-cloud/lib/debug-log.ts
4574
+ var import_fs2 = __toESM(require("fs"));
4575
+ var import_os2 = __toESM(require("os"));
4576
+ var import_path2 = __toESM(require("path"));
4574
4577
  var AGX_DATA_DIR = process.env.AGX_DATA_DIR || import_path2.default.join(import_os2.default.homedir(), ".agx");
4578
+ var DEBUG_LOG_PATH = process.env.AGX_DEBUG_LOG_PATH || import_path2.default.join(AGX_DATA_DIR, "logs", "desktop-chat-debug.log");
4579
+ function ensureLogDir() {
4580
+ import_fs2.default.mkdirSync(import_path2.default.dirname(DEBUG_LOG_PATH), { recursive: true });
4581
+ }
4582
+ function safeReplacer(_key, value) {
4583
+ if (value instanceof Error) {
4584
+ return {
4585
+ name: value.name,
4586
+ message: value.message,
4587
+ stack: value.stack
4588
+ };
4589
+ }
4590
+ if (typeof value === "string" && value.length > 2e3) {
4591
+ return `${value.slice(0, 2e3)}...<truncated>`;
4592
+ }
4593
+ return value;
4594
+ }
4595
+ function writeDebugLog(event, payload) {
4596
+ try {
4597
+ ensureLogDir();
4598
+ const line = JSON.stringify(
4599
+ {
4600
+ ts: (/* @__PURE__ */ new Date()).toISOString(),
4601
+ pid: process.pid,
4602
+ event,
4603
+ ...payload ? { payload } : {}
4604
+ },
4605
+ safeReplacer
4606
+ );
4607
+ import_fs2.default.appendFileSync(DEBUG_LOG_PATH, `${line}
4608
+ `, "utf8");
4609
+ } catch {
4610
+ }
4611
+ }
4612
+
4613
+ // ../agx-cloud/lib/queue/sqlite-adapter.ts
4614
+ var AGX_DATA_DIR2 = process.env.AGX_DATA_DIR || import_path3.default.join(import_os3.default.homedir(), ".agx");
4615
+ var DEFAULT_STALE_JOB_TIMEOUT_MS = 10 * 60 * 1e3;
4616
+ function getStaleJobTimeoutMs() {
4617
+ const raw = Number(process.env.AGX_QUEUE_STALE_MS);
4618
+ return Number.isFinite(raw) && raw > 0 ? raw : DEFAULT_STALE_JOB_TIMEOUT_MS;
4619
+ }
4575
4620
  var SQLiteQueueAdapter = class {
4576
4621
  constructor(dbPath) {
4577
4622
  this.workers = /* @__PURE__ */ new Map();
@@ -4579,10 +4624,10 @@ var SQLiteQueueAdapter = class {
4579
4624
  this.writeRateInterval = null;
4580
4625
  this.writeMonitor = new WriteRateMonitor();
4581
4626
  this.workerId = v4_default();
4582
- const finalPath = dbPath || process.env.SQLITE_QUEUE_PATH || import_path2.default.join(AGX_DATA_DIR, "agx-queue.db");
4583
- const dir = import_path2.default.dirname(finalPath);
4584
- if (!import_fs2.default.existsSync(dir)) {
4585
- import_fs2.default.mkdirSync(dir, { recursive: true });
4627
+ const finalPath = dbPath || process.env.SQLITE_QUEUE_PATH || import_path3.default.join(AGX_DATA_DIR2, "agx-queue.db");
4628
+ const dir = import_path3.default.dirname(finalPath);
4629
+ if (!import_fs3.default.existsSync(dir)) {
4630
+ import_fs3.default.mkdirSync(dir, { recursive: true });
4586
4631
  }
4587
4632
  this.db = new import_better_sqlite3.default(finalPath);
4588
4633
  const errors = validateSQLiteEnvironment(this.db, finalPath);
@@ -4647,9 +4692,23 @@ var SQLiteQueueAdapter = class {
4647
4692
  options?.priority ?? 0
4648
4693
  );
4649
4694
  this.writeMonitor.record();
4695
+ writeDebugLog("queue.send", {
4696
+ queue: queue2,
4697
+ jobId: id,
4698
+ startAfter,
4699
+ retryLimit: options?.retryLimit ?? 3,
4700
+ priority: options?.priority ?? 0,
4701
+ data
4702
+ });
4650
4703
  return id;
4651
4704
  }
4652
4705
  async work(queue2, handler, options) {
4706
+ writeDebugLog("queue.worker.register", {
4707
+ queue: queue2,
4708
+ batchSize: options?.batchSize ?? 1,
4709
+ pollInterval: options?.pollInterval ?? null,
4710
+ workerId: this.workerId
4711
+ });
4653
4712
  this.workers.set(queue2, {
4654
4713
  handler,
4655
4714
  options: options || {},
@@ -4680,7 +4739,17 @@ var SQLiteQueueAdapter = class {
4680
4739
  processQueue(queue2, worker) {
4681
4740
  const batchSize = worker.options.batchSize || 1;
4682
4741
  const now = Date.now();
4742
+ const staleBefore = now - getStaleJobTimeoutMs();
4683
4743
  const jobs = this.db.transaction(() => {
4744
+ const reapedJobs = this.reapStaleJobs(queue2, now, staleBefore);
4745
+ if (reapedJobs.length > 0) {
4746
+ writeDebugLog("queue.reap_stale", {
4747
+ queue: queue2,
4748
+ workerId: this.workerId,
4749
+ staleBefore,
4750
+ jobs: reapedJobs
4751
+ });
4752
+ }
4684
4753
  const candidates = this.db.prepare(`
4685
4754
  SELECT id, data FROM agx_jobs
4686
4755
  WHERE queue = ?
@@ -4706,6 +4775,11 @@ var SQLiteQueueAdapter = class {
4706
4775
  }));
4707
4776
  })();
4708
4777
  if (jobs.length > 0) {
4778
+ writeDebugLog("queue.claim", {
4779
+ queue: queue2,
4780
+ workerId: this.workerId,
4781
+ jobIds: jobs.map((job) => job.id)
4782
+ });
4709
4783
  this.executeJobs(jobs, worker.handler);
4710
4784
  }
4711
4785
  }
@@ -4713,15 +4787,22 @@ var SQLiteQueueAdapter = class {
4713
4787
  try {
4714
4788
  await handler(jobs);
4715
4789
  this.completeJobs(jobs.map((j) => j.id));
4790
+ writeDebugLog("queue.complete", {
4791
+ jobIds: jobs.map((job) => job.id)
4792
+ });
4716
4793
  } catch (err) {
4717
4794
  this.failJobs(jobs.map((j) => j.id), err.message || String(err));
4795
+ writeDebugLog("queue.fail", {
4796
+ jobIds: jobs.map((job) => job.id),
4797
+ error: err
4798
+ });
4718
4799
  }
4719
4800
  }
4720
4801
  completeJobs(ids) {
4721
4802
  const now = Date.now();
4722
4803
  const stmt = this.db.prepare(`
4723
4804
  UPDATE agx_jobs
4724
- SET status = 'completed', completed_at = ?
4805
+ SET status = 'completed', completed_at = ?, worker_id = NULL
4725
4806
  WHERE id = ?
4726
4807
  `);
4727
4808
  this.db.transaction(() => {
@@ -4737,12 +4818,14 @@ var SQLiteQueueAdapter = class {
4737
4818
  UPDATE agx_jobs
4738
4819
  SET status = 'retry', retry_count = retry_count + 1,
4739
4820
  start_after = ? + (retry_count * 1000 * 2), -- Exponential backoff (kinda)
4821
+ started_at = NULL,
4822
+ worker_id = NULL,
4740
4823
  error = ?
4741
4824
  WHERE id = ?
4742
4825
  `);
4743
4826
  const updateFailed = this.db.prepare(`
4744
4827
  UPDATE agx_jobs
4745
- SET status = 'failed', failed_at = ?, error = ?
4828
+ SET status = 'failed', failed_at = ?, started_at = NULL, worker_id = NULL, error = ?
4746
4829
  WHERE id = ?
4747
4830
  `);
4748
4831
  this.db.transaction(() => {
@@ -4757,6 +4840,59 @@ var SQLiteQueueAdapter = class {
4757
4840
  }
4758
4841
  })();
4759
4842
  }
4843
+ reapStaleJobs(queue2, now, staleBefore) {
4844
+ const staleJobs = this.db.prepare(`
4845
+ SELECT id, retry_count, retry_limit
4846
+ FROM agx_jobs
4847
+ WHERE queue = ?
4848
+ AND status = 'active'
4849
+ AND started_at IS NOT NULL
4850
+ AND started_at <= ?
4851
+ ORDER BY started_at ASC
4852
+ `).all(queue2, staleBefore);
4853
+ if (staleJobs.length === 0) return [];
4854
+ const updateRetry = this.db.prepare(`
4855
+ UPDATE agx_jobs
4856
+ SET status = 'retry',
4857
+ retry_count = retry_count + 1,
4858
+ start_after = ?,
4859
+ started_at = NULL,
4860
+ worker_id = NULL,
4861
+ error = ?
4862
+ WHERE id = ?
4863
+ `);
4864
+ const updateFailed = this.db.prepare(`
4865
+ UPDATE agx_jobs
4866
+ SET status = 'failed',
4867
+ failed_at = ?,
4868
+ started_at = NULL,
4869
+ worker_id = NULL,
4870
+ error = ?
4871
+ WHERE id = ?
4872
+ `);
4873
+ const reaped = [];
4874
+ for (const job of staleJobs) {
4875
+ const error = `Job exceeded active timeout of ${getStaleJobTimeoutMs()}ms`;
4876
+ if (job.retry_count < job.retry_limit) {
4877
+ updateRetry.run(now, error, job.id);
4878
+ reaped.push({
4879
+ id: job.id,
4880
+ fromStatus: "active",
4881
+ toStatus: "retry",
4882
+ retryCount: job.retry_count + 1
4883
+ });
4884
+ } else {
4885
+ updateFailed.run(now, error, job.id);
4886
+ reaped.push({
4887
+ id: job.id,
4888
+ fromStatus: "active",
4889
+ toStatus: "failed",
4890
+ retryCount: job.retry_count
4891
+ });
4892
+ }
4893
+ }
4894
+ return reaped;
4895
+ }
4760
4896
  };
4761
4897
 
4762
4898
  // ../agx-cloud/lib/queue/boss.ts
@@ -5018,6 +5154,8 @@ var import_crypto4 = require("crypto");
5018
5154
 
5019
5155
  // ../agx-cloud/lib/cli-runner.ts
5020
5156
  var import_child_process = require("child_process");
5157
+ var import_fs10 = __toESM(require("fs"));
5158
+ var import_path10 = __toESM(require("path"));
5021
5159
 
5022
5160
  // ../agx-cloud/lib/sanitize.ts
5023
5161
  function createCliChunkSanitizer() {
@@ -5296,15 +5434,177 @@ var createThoughtFilterParser = (inner) => {
5296
5434
  }
5297
5435
  };
5298
5436
  };
5437
+ var AGX_WRAPPED_PROVIDERS = /* @__PURE__ */ new Set([
5438
+ "claude",
5439
+ "gemini",
5440
+ "ollama",
5441
+ "codex"
5442
+ ]);
5443
+ function providerNativeCommand({
5444
+ provider,
5445
+ model,
5446
+ prompt,
5447
+ systemPrompt
5448
+ }) {
5449
+ switch (provider) {
5450
+ case "claude": {
5451
+ const args = [
5452
+ "-p",
5453
+ "--verbose",
5454
+ "--output-format",
5455
+ "stream-json",
5456
+ "--include-partial-messages"
5457
+ ];
5458
+ if (model) args.push("--model", model);
5459
+ if (systemPrompt) args.push("--system-prompt", systemPrompt);
5460
+ args.push(prompt);
5461
+ return { command: "claude", args, parser: "claude-stream-json" };
5462
+ }
5463
+ case "gemini":
5464
+ return {
5465
+ command: "gemini",
5466
+ args: ["--yolo", "-p", systemPrompt ? `${systemPrompt}
5467
+
5468
+ ${prompt}` : prompt, "-o", "stream-json"],
5469
+ parser: "gemini-stream-json"
5470
+ };
5471
+ case "ollama":
5472
+ return {
5473
+ command: "ollama",
5474
+ args: ["run", model || "llama3.2", systemPrompt ? `${systemPrompt}
5475
+
5476
+ ${prompt}` : prompt],
5477
+ parser: "raw"
5478
+ };
5479
+ case "codex": {
5480
+ const codexArgs = ["exec", "--json"];
5481
+ if (model) codexArgs.push("--model", model);
5482
+ codexArgs.push(systemPrompt ? `${systemPrompt}
5483
+
5484
+ ${prompt}` : prompt);
5485
+ return {
5486
+ command: "codex",
5487
+ args: codexArgs,
5488
+ parser: "codex-json"
5489
+ };
5490
+ }
5491
+ case "zai": {
5492
+ const zaiApiKey = process.env.ZAI_API_KEY?.trim();
5493
+ const zaiArgs = [
5494
+ "-p",
5495
+ "--verbose",
5496
+ "--output-format",
5497
+ "stream-json",
5498
+ "--include-partial-messages"
5499
+ ];
5500
+ if (model) zaiArgs.push("--model", model);
5501
+ if (systemPrompt) zaiArgs.push("--system-prompt", systemPrompt);
5502
+ zaiArgs.push(prompt);
5503
+ return {
5504
+ command: "claude",
5505
+ args: zaiArgs,
5506
+ parser: "claude-stream-json",
5507
+ env: {
5508
+ ANTHROPIC_BASE_URL: "https://api.z.ai/api/anthropic",
5509
+ ...zaiApiKey ? { ANTHROPIC_AUTH_TOKEN: zaiApiKey } : {}
5510
+ }
5511
+ };
5512
+ }
5513
+ default:
5514
+ return null;
5515
+ }
5516
+ }
5299
5517
  function agxCommandForProvider({
5300
5518
  provider,
5301
5519
  model,
5302
- prompt
5520
+ prompt,
5521
+ passthroughArgs
5303
5522
  }) {
5304
5523
  const args = [provider, "-y", "--print", "--prompt", prompt];
5305
5524
  if (model) args.push("--model", model);
5525
+ if (passthroughArgs && passthroughArgs.length > 0) {
5526
+ args.push("--", ...passthroughArgs);
5527
+ }
5306
5528
  return { command: "agx", args, parser: "raw" };
5307
5529
  }
5530
+ function resolveBundledCliPath() {
5531
+ const explicit = process.env.AGX_CLI_PATH?.trim();
5532
+ if (explicit && import_fs10.default.existsSync(explicit)) return explicit;
5533
+ const candidates = [
5534
+ import_path10.default.resolve(process.cwd(), "..", "cli", "index.js"),
5535
+ import_path10.default.resolve(__dirname, "..", "cli", "index.js"),
5536
+ import_path10.default.resolve(process.execPath, "..", "..", "Resources", "cli", "index.js")
5537
+ ];
5538
+ for (const candidate of candidates) {
5539
+ if (import_fs10.default.existsSync(candidate)) {
5540
+ return candidate;
5541
+ }
5542
+ }
5543
+ return null;
5544
+ }
5545
+ function buildCliAttempts({
5546
+ provider,
5547
+ model,
5548
+ prompt,
5549
+ systemPrompt,
5550
+ passthroughArgs
5551
+ }, deps = {}) {
5552
+ const exists = deps.commandExists ?? commandExists;
5553
+ const bundledCliPath = deps.bundledCliPath === void 0 ? resolveBundledCliPath() : deps.bundledCliPath;
5554
+ const attempts = [];
5555
+ const agxPrompt = systemPrompt ? `${systemPrompt}
5556
+
5557
+ ${prompt}` : prompt;
5558
+ if (AGX_WRAPPED_PROVIDERS.has(provider)) {
5559
+ const bundledAgx = bundledAgxCommandForProvider({
5560
+ provider,
5561
+ model,
5562
+ prompt: agxPrompt,
5563
+ cliPath: bundledCliPath,
5564
+ passthroughArgs
5565
+ });
5566
+ if (bundledAgx) {
5567
+ attempts.push(bundledAgx);
5568
+ }
5569
+ if (exists("agx")) {
5570
+ attempts.push(
5571
+ agxCommandForProvider({
5572
+ provider,
5573
+ model,
5574
+ prompt: agxPrompt,
5575
+ passthroughArgs
5576
+ })
5577
+ );
5578
+ }
5579
+ return attempts;
5580
+ }
5581
+ const nativeAttempt = providerNativeCommand({
5582
+ provider,
5583
+ model,
5584
+ prompt,
5585
+ systemPrompt
5586
+ });
5587
+ if (nativeAttempt && exists(nativeAttempt.command)) {
5588
+ attempts.push(nativeAttempt);
5589
+ }
5590
+ return attempts;
5591
+ }
5592
+ function bundledAgxCommandForProvider({
5593
+ provider,
5594
+ model,
5595
+ prompt,
5596
+ cliPath,
5597
+ passthroughArgs
5598
+ }) {
5599
+ const resolvedCliPath = cliPath === void 0 ? resolveBundledCliPath() : cliPath;
5600
+ if (!resolvedCliPath) return null;
5601
+ const args = [resolvedCliPath, provider, "-y", "--print", "--prompt", prompt];
5602
+ if (model) args.push("--model", model);
5603
+ if (passthroughArgs && passthroughArgs.length > 0) {
5604
+ args.push("--", ...passthroughArgs);
5605
+ }
5606
+ return { command: process.execPath, args, parser: "raw" };
5607
+ }
5308
5608
  async function runCommandStreamed({
5309
5609
  command,
5310
5610
  args,
@@ -5316,6 +5616,13 @@ async function runCommandStreamed({
5316
5616
  env: extraEnv
5317
5617
  }) {
5318
5618
  await new Promise((resolve, reject) => {
5619
+ writeDebugLog("cli-runner.spawn", {
5620
+ command,
5621
+ args,
5622
+ timeoutMs,
5623
+ bundledCliPath: resolveBundledCliPath(),
5624
+ isElectron: process.env.AGX_ELECTRON || null
5625
+ });
5319
5626
  if (onLog) onLog("stderr", `$ ${command} ${args.map((a) => a.length > 80 ? a.slice(0, 80) + "\u2026" : a).join(" ")}
5320
5627
  `);
5321
5628
  const child = (0, import_child_process.spawn)(command, args, {
@@ -5334,13 +5641,29 @@ async function runCommandStreamed({
5334
5641
  else resolve();
5335
5642
  };
5336
5643
  const onAbort = () => {
5644
+ writeDebugLog("cli-runner.abort", {
5645
+ command,
5646
+ args,
5647
+ pid: child.pid ?? null
5648
+ });
5337
5649
  child.kill("SIGTERM");
5338
5650
  finalize(new Error("Chat request aborted."));
5339
5651
  };
5340
5652
  if (signal) signal.addEventListener("abort", onAbort, { once: true });
5341
5653
  if (onSpawn && child.pid) onSpawn(child.pid);
5654
+ writeDebugLog("cli-runner.spawned", {
5655
+ command,
5656
+ args,
5657
+ pid: child.pid ?? null
5658
+ });
5342
5659
  const timer = setTimeout(() => {
5343
5660
  timedOut = true;
5661
+ writeDebugLog("cli-runner.timeout", {
5662
+ command,
5663
+ args,
5664
+ pid: child.pid ?? null,
5665
+ timeoutMs
5666
+ });
5344
5667
  child.kill("SIGKILL");
5345
5668
  finalize(new Error(`CLI request timed out after ${timeoutMs}ms.`));
5346
5669
  }, timeoutMs);
@@ -5355,9 +5678,24 @@ async function runCommandStreamed({
5355
5678
  combinedOutput += str;
5356
5679
  if (onLog) onLog("stderr", str);
5357
5680
  });
5358
- child.on("error", (error) => finalize(error));
5681
+ child.on("error", (error) => {
5682
+ writeDebugLog("cli-runner.process_error", {
5683
+ command,
5684
+ args,
5685
+ pid: child.pid ?? null,
5686
+ error
5687
+ });
5688
+ finalize(error);
5689
+ });
5359
5690
  child.on("close", (code, childSignal) => {
5360
5691
  if (done || timedOut) return;
5692
+ writeDebugLog("cli-runner.close", {
5693
+ command,
5694
+ args,
5695
+ pid: child.pid ?? null,
5696
+ code: code ?? null,
5697
+ signal: childSignal ?? null
5698
+ });
5361
5699
  if (code === 0) {
5362
5700
  finalize();
5363
5701
  return;
@@ -5378,6 +5716,7 @@ async function runCliResponse({
5378
5716
  self,
5379
5717
  skills,
5380
5718
  systemContext,
5719
+ passthroughArgs,
5381
5720
  signal,
5382
5721
  onDelta,
5383
5722
  onLog,
@@ -5389,7 +5728,6 @@ async function runCliResponse({
5389
5728
  const cleaned = sanitize(chunk);
5390
5729
  if (cleaned) onDelta(cleaned);
5391
5730
  };
5392
- const attempts = [];
5393
5731
  const systemParts = [];
5394
5732
  if (systemContext) systemParts.push(systemContext);
5395
5733
  if (identity) systemParts.push(`<identity>
@@ -5402,19 +5740,33 @@ ${self}
5402
5740
  ${skills}
5403
5741
  </skills>`);
5404
5742
  const systemPrompt = systemParts.length > 0 ? systemParts.join("\n\n") : void 0;
5405
- if (commandExists("agx")) {
5406
- const agxPrompt = systemPrompt ? `${systemPrompt}
5407
-
5408
- ${prompt}` : prompt;
5409
- attempts.push(agxCommandForProvider({ provider, model, prompt: agxPrompt }));
5410
- }
5743
+ const attempts = buildCliAttempts({
5744
+ provider,
5745
+ model,
5746
+ prompt,
5747
+ systemPrompt,
5748
+ passthroughArgs
5749
+ });
5411
5750
  if (attempts.length === 0) {
5751
+ writeDebugLog("cli-runner.no_attempts", {
5752
+ provider,
5753
+ model,
5754
+ bundledCliPath: resolveBundledCliPath(),
5755
+ isElectron: process.env.AGX_ELECTRON || null
5756
+ });
5412
5757
  throw new Error(
5413
5758
  `No CLI runner available for provider "${provider}". Install agx or provider CLI.`
5414
5759
  );
5415
5760
  }
5416
5761
  let lastError = null;
5417
5762
  for (const attempt of attempts) {
5763
+ writeDebugLog("cli-runner.attempt", {
5764
+ provider,
5765
+ model,
5766
+ command: attempt.command,
5767
+ args: attempt.args,
5768
+ parser: attempt.parser
5769
+ });
5418
5770
  const baseParser = attempt.parser === "claude-stream-json" ? createClaudeStreamJsonParser(wrappedOnDelta) : attempt.parser === "codex-json" ? createCodexJsonParser(wrappedOnDelta) : attempt.parser === "gemini-stream-json" ? createGeminiStreamJsonParser(wrappedOnDelta) : createRawParser(wrappedOnDelta);
5419
5771
  const parser = attempt.filterThoughts ? createThoughtFilterParser(baseParser) : baseParser;
5420
5772
  try {
@@ -5429,9 +5781,20 @@ ${prompt}` : prompt;
5429
5781
  env: attempt.env
5430
5782
  });
5431
5783
  parser.flush();
5784
+ writeDebugLog("cli-runner.success", {
5785
+ provider,
5786
+ model,
5787
+ command: attempt.command
5788
+ });
5432
5789
  return;
5433
5790
  } catch (error) {
5434
5791
  lastError = error instanceof Error ? error : new Error(String(error));
5792
+ writeDebugLog("cli-runner.failure", {
5793
+ provider,
5794
+ model,
5795
+ command: attempt.command,
5796
+ error: lastError
5797
+ });
5435
5798
  }
5436
5799
  }
5437
5800
  throw lastError || new Error("CLI execution failed.");
@@ -6497,11 +6860,11 @@ var import_promises = require("fs/promises");
6497
6860
 
6498
6861
  // ../agx-cloud/lib/agent-process-registry.ts
6499
6862
  var import_better_sqlite34 = __toESM(require_lib());
6500
- var import_path9 = __toESM(require("path"));
6501
- var import_os9 = __toESM(require("os"));
6502
- var import_fs9 = require("fs");
6503
- var HISTORY_DIR = process.env.AGX_GROUP_CHAT_DIR?.trim() || import_path9.default.join(import_os9.default.homedir(), ".agx", "group-chat");
6504
- var DB_PATH2 = import_path9.default.join(HISTORY_DIR, "history.sqlite");
6863
+ var import_path11 = __toESM(require("path"));
6864
+ var import_os10 = __toESM(require("os"));
6865
+ var import_fs11 = require("fs");
6866
+ var HISTORY_DIR = process.env.AGX_GROUP_CHAT_DIR?.trim() || import_path11.default.join(import_os10.default.homedir(), ".agx", "group-chat");
6867
+ var DB_PATH2 = import_path11.default.join(HISTORY_DIR, "history.sqlite");
6505
6868
  function toEntry(row) {
6506
6869
  return {
6507
6870
  id: row.id,
@@ -6518,7 +6881,7 @@ function toEntry(row) {
6518
6881
  };
6519
6882
  }
6520
6883
  function getDb2() {
6521
- (0, import_fs9.mkdirSync)(HISTORY_DIR, { recursive: true });
6884
+ (0, import_fs11.mkdirSync)(HISTORY_DIR, { recursive: true });
6522
6885
  const db2 = new import_better_sqlite34.default(DB_PATH2);
6523
6886
  db2.pragma("journal_mode = WAL");
6524
6887
  db2.exec(`
@@ -6673,11 +7036,11 @@ function killByWorkspace(workspaceId) {
6673
7036
 
6674
7037
  // ../agx-cloud/lib/history-store.ts
6675
7038
  var import_better_sqlite35 = __toESM(require_lib());
6676
- var import_fs10 = require("fs");
6677
- var import_path10 = __toESM(require("path"));
6678
- var import_os10 = __toESM(require("os"));
6679
- var HISTORY_DIR2 = process.env.AGX_GROUP_CHAT_DIR?.trim() || import_path10.default.join(import_os10.default.homedir(), ".agx", "group-chat");
6680
- var DB_PATH3 = import_path10.default.join(HISTORY_DIR2, "history.sqlite");
7039
+ var import_fs12 = require("fs");
7040
+ var import_path12 = __toESM(require("path"));
7041
+ var import_os11 = __toESM(require("os"));
7042
+ var HISTORY_DIR2 = process.env.AGX_GROUP_CHAT_DIR?.trim() || import_path12.default.join(import_os11.default.homedir(), ".agx", "group-chat");
7043
+ var DB_PATH3 = import_path12.default.join(HISTORY_DIR2, "history.sqlite");
6681
7044
  var LEGACY_THREAD_ID = "global";
6682
7045
  var REACTION_TYPES = /* @__PURE__ */ new Set([
6683
7046
  "ack",
@@ -6686,6 +7049,8 @@ var REACTION_TYPES = /* @__PURE__ */ new Set([
6686
7049
  "clarify",
6687
7050
  "blocked"
6688
7051
  ]);
7052
+ var ACTIVE_AGENT_PROCESS_STALE_MS = 10 * 60 * 1e3;
7053
+ var ACTIVE_CHAT_RUN_STALE_MS = 10 * 60 * 1e3;
6689
7054
  var ALLOWED_TRANSITIONS = {
6690
7055
  ack: /* @__PURE__ */ new Set(["ack", "working"]),
6691
7056
  working: /* @__PURE__ */ new Set(["ack", "working", "done", "clarify", "blocked"]),
@@ -6906,7 +7271,7 @@ function migrateLegacyTables(db2) {
6906
7271
  migrateLogsToAgentProcessId(db2);
6907
7272
  }
6908
7273
  var withDatabase = async (run) => {
6909
- await import_fs10.promises.mkdir(HISTORY_DIR2, { recursive: true });
7274
+ await import_fs12.promises.mkdir(HISTORY_DIR2, { recursive: true });
6910
7275
  const db2 = new import_better_sqlite35.default(DB_PATH3);
6911
7276
  db2.pragma("journal_mode = WAL");
6912
7277
  try {
@@ -7088,7 +7453,31 @@ async function saveMessages(threadId, messages) {
7088
7453
  insertMany(messages);
7089
7454
  });
7090
7455
  }
7456
+ async function sweepStaleChatRuns(input) {
7457
+ const normalizedThreadId = normalizeOptionalText(input?.threadId ?? null);
7458
+ const thresholdMs = Number.isFinite(input?.olderThanMs) ? Math.max(input.olderThanMs, 1) : ACTIVE_CHAT_RUN_STALE_MS;
7459
+ const now = Date.now();
7460
+ const cutoff = now - thresholdMs;
7461
+ return withDatabase((db2) => {
7462
+ const clauses = ["status = 'running'", "updated_at <= ?"];
7463
+ const params = [cutoff];
7464
+ if (normalizedThreadId) {
7465
+ clauses.push("thread_id = ?");
7466
+ params.push(normalizedThreadId);
7467
+ }
7468
+ const result = db2.prepare(
7469
+ `UPDATE chat_runs
7470
+ SET status = 'failed',
7471
+ last_error = COALESCE(NULLIF(last_error, ''), 'Worker process died mid-execution'),
7472
+ updated_at = ?,
7473
+ completed_at = COALESCE(completed_at, ?)
7474
+ WHERE ${clauses.join(" AND ")}`
7475
+ ).run(now, now, ...params);
7476
+ return result.changes;
7477
+ });
7478
+ }
7091
7479
  async function getChatRun(chatRunId) {
7480
+ await sweepStaleChatRuns();
7092
7481
  return withDatabase((db2) => {
7093
7482
  const row = db2.prepare("SELECT * FROM chat_runs WHERE id = ? LIMIT 1").get(chatRunId);
7094
7483
  return row ? toChatRunRecord(row) : null;
@@ -7336,11 +7725,11 @@ function parseReactionSignals(content) {
7336
7725
 
7337
7726
  // ../agx-cloud/lib/attachment-store.ts
7338
7727
  var import_better_sqlite36 = __toESM(require_lib());
7339
- var import_path11 = __toESM(require("path"));
7340
- var import_os11 = __toESM(require("os"));
7341
- var HISTORY_DIR3 = process.env.AGX_GROUP_CHAT_DIR?.trim() || import_path11.default.join(import_os11.default.homedir(), ".agx", "group-chat");
7342
- var DB_PATH4 = import_path11.default.join(HISTORY_DIR3, "history.sqlite");
7343
- var UPLOADS_DIR = import_path11.default.join(HISTORY_DIR3, "uploads");
7728
+ var import_path13 = __toESM(require("path"));
7729
+ var import_os12 = __toESM(require("os"));
7730
+ var HISTORY_DIR3 = process.env.AGX_GROUP_CHAT_DIR?.trim() || import_path13.default.join(import_os12.default.homedir(), ".agx", "group-chat");
7731
+ var DB_PATH4 = import_path13.default.join(HISTORY_DIR3, "history.sqlite");
7732
+ var UPLOADS_DIR = import_path13.default.join(HISTORY_DIR3, "uploads");
7344
7733
  function getDb3() {
7345
7734
  const db2 = new import_better_sqlite36.default(DB_PATH4);
7346
7735
  db2.pragma("journal_mode = WAL");
@@ -7380,7 +7769,7 @@ async function getAttachmentMeta(id) {
7380
7769
  ).get(id);
7381
7770
  if (!row) return null;
7382
7771
  const diskName = row.disk_name || id;
7383
- return { filename: row.filename, mimeType: row.mime_type, size: row.size, diskPath: import_path11.default.join(UPLOADS_DIR, diskName) };
7772
+ return { filename: row.filename, mimeType: row.mime_type, size: row.size, diskPath: import_path13.default.join(UPLOADS_DIR, diskName) };
7384
7773
  } finally {
7385
7774
  db2.close();
7386
7775
  }
@@ -7393,18 +7782,18 @@ init_journal();
7393
7782
  init_agent();
7394
7783
 
7395
7784
  // ../agx-cloud/lib/mesh-core/reactions.ts
7396
- var import_fs11 = require("fs");
7397
- var import_path12 = require("path");
7398
- var import_os12 = require("os");
7785
+ var import_fs13 = require("fs");
7786
+ var import_path14 = require("path");
7787
+ var import_os13 = require("os");
7399
7788
  init_journal();
7400
7789
  init_activity();
7401
- var AGENTS_DIR6 = (0, import_path12.join)((0, import_os12.homedir)(), ".agx", "agents");
7790
+ var AGENTS_DIR6 = (0, import_path14.join)((0, import_os13.homedir)(), ".agx", "agents");
7402
7791
  function reactionsPath(agentId) {
7403
- return (0, import_path12.join)(AGENTS_DIR6, agentId, "reactions.jsonl");
7792
+ return (0, import_path14.join)(AGENTS_DIR6, agentId, "reactions.jsonl");
7404
7793
  }
7405
7794
  function ensureDir2(agentId) {
7406
- const dir = (0, import_path12.join)(AGENTS_DIR6, agentId);
7407
- if (!(0, import_fs11.existsSync)(dir)) (0, import_fs11.mkdirSync)(dir, { recursive: true });
7795
+ const dir = (0, import_path14.join)(AGENTS_DIR6, agentId);
7796
+ if (!(0, import_fs13.existsSync)(dir)) (0, import_fs13.mkdirSync)(dir, { recursive: true });
7408
7797
  }
7409
7798
  function targetEntryExists(targetEntry) {
7410
7799
  const [targetAgent] = targetEntry.split(":");
@@ -7423,7 +7812,7 @@ function appendReaction(agentId, targetEntry, type) {
7423
7812
  targetEntry,
7424
7813
  type
7425
7814
  };
7426
- (0, import_fs11.appendFileSync)(reactionsPath(agentId), JSON.stringify(reaction) + "\n", "utf-8");
7815
+ (0, import_fs13.appendFileSync)(reactionsPath(agentId), JSON.stringify(reaction) + "\n", "utf-8");
7427
7816
  logActivity(agentId, "mesh-reaction", { meta: { target: targetEntry, type } });
7428
7817
  }
7429
7818
 
@@ -8501,15 +8890,31 @@ function isChatRunPayload(value) {
8501
8890
  );
8502
8891
  }
8503
8892
  async function handleStart2(job) {
8893
+ writeDebugLog("chat-processor.start.received", {
8894
+ jobId: job.id,
8895
+ chatRunId: job.data.chatRunId,
8896
+ signal: job.data.signal
8897
+ });
8504
8898
  const chatRun = await loadChatRunActivity(job.data.chatRunId);
8505
8899
  if (!chatRun) {
8900
+ writeDebugLog("chat-processor.start.missing", {
8901
+ chatRunId: job.data.chatRunId,
8902
+ jobId: job.id
8903
+ });
8506
8904
  console.warn(`[chat-processor] Chat run ${job.data.chatRunId} not found, skipping`);
8507
8905
  return;
8508
8906
  }
8509
8907
  if (chatRun.status === "completed" || chatRun.status === "failed" || chatRun.status === "cancelled") {
8908
+ writeDebugLog("chat-processor.start.skip_terminal", {
8909
+ chatRunId: chatRun.id,
8910
+ status: chatRun.status
8911
+ });
8510
8912
  return;
8511
8913
  }
8512
8914
  if (!isChatRunPayload(chatRun.payload)) {
8915
+ writeDebugLog("chat-processor.start.invalid_payload", {
8916
+ chatRunId: chatRun.id
8917
+ });
8513
8918
  await updateChatRunActivity({
8514
8919
  id: chatRun.id,
8515
8920
  status: "failed",
@@ -8536,10 +8941,20 @@ async function handleStart2(job) {
8536
8941
  lastError: null
8537
8942
  });
8538
8943
  try {
8944
+ writeDebugLog("chat-processor.start.running", {
8945
+ chatRunId: chatRun.id,
8946
+ threadId: chatRun.threadId,
8947
+ rootMessageId: chatRun.rootMessageId,
8948
+ participantIds: chatRun.payload.participantIds
8949
+ });
8539
8950
  const library = await loadDbParticipants();
8540
8951
  const participantIdSet = new Set(chatRun.payload.participantIds);
8541
8952
  const participants = chatRun.payload.participantIds.map((participantId) => library.find((participant) => participant.id === participantId)).filter((participant) => Boolean(participant));
8542
8953
  if (participants.length === 0) {
8954
+ writeDebugLog("chat-processor.start.no_participants_resolved", {
8955
+ chatRunId: chatRun.id,
8956
+ participantIds: chatRun.payload.participantIds
8957
+ });
8543
8958
  throw new Error("No participants resolved for chat run");
8544
8959
  }
8545
8960
  const mentioned = new Set(
@@ -8561,10 +8976,17 @@ async function handleStart2(job) {
8561
8976
  rootMessageId: chatRun.payload.rootMessageId
8562
8977
  });
8563
8978
  const reader = stream.getReader();
8979
+ writeDebugLog("chat-processor.stream.open", {
8980
+ chatRunId: chatRun.id,
8981
+ participantCount: participants.length
8982
+ });
8564
8983
  while (true) {
8565
8984
  const { done } = await reader.read();
8566
8985
  if (done) break;
8567
8986
  }
8987
+ writeDebugLog("chat-processor.stream.complete", {
8988
+ chatRunId: chatRun.id
8989
+ });
8568
8990
  await completeChatRunStepActivity({
8569
8991
  stepId: step.id,
8570
8992
  status: "completed",
@@ -8582,8 +9004,17 @@ async function handleStart2(job) {
8582
9004
  rootMessageId: chatRun.payload.rootMessageId
8583
9005
  }
8584
9006
  });
9007
+ writeDebugLog("chat-processor.complete", {
9008
+ chatRunId: chatRun.id,
9009
+ rootMessageId: chatRun.payload.rootMessageId
9010
+ });
8585
9011
  } catch (error) {
8586
9012
  const message = error instanceof Error ? error.message : String(error);
9013
+ writeDebugLog("chat-processor.error", {
9014
+ chatRunId: chatRun.id,
9015
+ error,
9016
+ message
9017
+ });
8587
9018
  await completeChatRunStepActivity({
8588
9019
  stepId: step.id,
8589
9020
  status: "failed",
@@ -8599,6 +9030,10 @@ async function handleStart2(job) {
8599
9030
  }
8600
9031
  }
8601
9032
  async function handleCancel2(job) {
9033
+ writeDebugLog("chat-processor.cancel.received", {
9034
+ jobId: job.id,
9035
+ chatRunId: job.data.chatRunId
9036
+ });
8602
9037
  const chatRun = await loadChatRunActivity(job.data.chatRunId);
8603
9038
  if (!chatRun) return;
8604
9039
  if (chatRun.rootMessageId) {
@@ -8613,6 +9048,10 @@ async function handleCancel2(job) {
8613
9048
  completedAt: Date.now(),
8614
9049
  result: { cancelled: true }
8615
9050
  });
9051
+ writeDebugLog("chat-processor.cancel.complete", {
9052
+ chatRunId: chatRun.id,
9053
+ threadId: chatRun.threadId
9054
+ });
8616
9055
  }
8617
9056
  async function processSingleJob2(job) {
8618
9057
  switch (job.data.signal) {