commandmate 0.16.0 → 0.18.0

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 (616) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +298 -228
  3. package/.next/app-path-routes-manifest.json +39 -29
  4. package/.next/build-manifest.json +2 -2
  5. package/.next/prerender-manifest.json +12 -12
  6. package/.next/required-server-files.json +1 -1
  7. package/.next/routes-manifest.json +57 -0
  8. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  9. package/.next/server/app/api/app/update/route_client-reference-manifest.js +1 -1
  10. package/.next/server/app/api/app/update-check/route.js +1 -1
  11. package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
  12. package/.next/server/app/api/assistant/conversation/route.js +1 -1
  13. package/.next/server/app/api/assistant/conversation/route.js.nft.json +1 -1
  14. package/.next/server/app/api/assistant/conversation/route_client-reference-manifest.js +1 -1
  15. package/.next/server/app/api/assistant/current-output/route.js +1 -1
  16. package/.next/server/app/api/assistant/current-output/route.js.nft.json +1 -1
  17. package/.next/server/app/api/assistant/current-output/route_client-reference-manifest.js +1 -1
  18. package/.next/server/app/api/assistant/messages/route.js +1 -1
  19. package/.next/server/app/api/assistant/messages/route.js.nft.json +1 -1
  20. package/.next/server/app/api/assistant/messages/route_client-reference-manifest.js +1 -1
  21. package/.next/server/app/api/assistant/session/route.js +1 -1
  22. package/.next/server/app/api/assistant/session/route.js.nft.json +1 -1
  23. package/.next/server/app/api/assistant/session/route_client-reference-manifest.js +1 -1
  24. package/.next/server/app/api/assistant/start/route.js +1 -1
  25. package/.next/server/app/api/assistant/start/route.js.nft.json +1 -1
  26. package/.next/server/app/api/assistant/start/route_client-reference-manifest.js +1 -1
  27. package/.next/server/app/api/assistant/terminal/route.js +3 -3
  28. package/.next/server/app/api/assistant/terminal/route.js.nft.json +1 -1
  29. package/.next/server/app/api/assistant/terminal/route_client-reference-manifest.js +1 -1
  30. package/.next/server/app/api/assistant/tools/route.js +1 -1
  31. package/.next/server/app/api/assistant/tools/route.js.nft.json +1 -1
  32. package/.next/server/app/api/assistant/tools/route_client-reference-manifest.js +1 -1
  33. package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  34. package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  35. package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  36. package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +1 -1
  37. package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
  38. package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
  39. package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
  40. package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
  41. package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -1
  42. package/.next/server/app/api/fs/recent-paths/route.js +1 -1
  43. package/.next/server/app/api/fs/recent-paths/route_client-reference-manifest.js +1 -1
  44. package/.next/server/app/api/hooks/agent-event/route.js +1 -0
  45. package/.next/server/app/api/hooks/agent-event/route.js.nft.json +1 -0
  46. package/.next/server/app/api/hooks/agent-event/route_client-reference-manifest.js +1 -0
  47. package/.next/server/app/api/hooks/claude-done/route.js +1 -1
  48. package/.next/server/app/api/hooks/claude-done/route.js.nft.json +1 -1
  49. package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
  50. package/.next/server/app/api/metrics/vibe/route.js +37 -0
  51. package/.next/server/app/api/metrics/vibe/route.js.nft.json +1 -0
  52. package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -0
  53. package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
  54. package/.next/server/app/api/push/subscriptions/route.js +1 -1
  55. package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
  56. package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
  57. package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
  58. package/.next/server/app/api/repositories/[id]/todos/[todoId]/route.js +1 -1
  59. package/.next/server/app/api/repositories/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  60. package/.next/server/app/api/repositories/[id]/todos/route.js +1 -1
  61. package/.next/server/app/api/repositories/[id]/todos/route_client-reference-manifest.js +1 -1
  62. package/.next/server/app/api/repositories/clone/[jobId]/route.js +1 -1
  63. package/.next/server/app/api/repositories/clone/[jobId]/route.js.nft.json +1 -1
  64. package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
  65. package/.next/server/app/api/repositories/clone/route.js +1 -1
  66. package/.next/server/app/api/repositories/clone/route.js.nft.json +1 -1
  67. package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
  68. package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
  69. package/.next/server/app/api/repositories/restore/route.js +1 -1
  70. package/.next/server/app/api/repositories/restore/route.js.nft.json +1 -1
  71. package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
  72. package/.next/server/app/api/repositories/route.js +1 -1
  73. package/.next/server/app/api/repositories/route.js.nft.json +1 -1
  74. package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
  75. package/.next/server/app/api/repositories/scan/route.js +1 -1
  76. package/.next/server/app/api/repositories/scan/route.js.nft.json +1 -1
  77. package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
  78. package/.next/server/app/api/repositories/sync/route.js +1 -1
  79. package/.next/server/app/api/repositories/sync/route.js.nft.json +1 -1
  80. package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
  81. package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
  82. package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
  83. package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
  84. package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
  85. package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
  86. package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
  87. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  88. package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
  89. package/.next/server/app/api/tasks/[taskId]/cancel/route.js +4 -0
  90. package/.next/server/app/api/tasks/[taskId]/cancel/route.js.nft.json +1 -0
  91. package/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -0
  92. package/.next/server/app/api/tasks/[taskId]/route.js +4 -0
  93. package/.next/server/app/api/tasks/[taskId]/route.js.nft.json +1 -0
  94. package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -0
  95. package/.next/server/app/api/templates/[id]/route.js +1 -1
  96. package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
  97. package/.next/server/app/api/templates/route.js +1 -1
  98. package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
  99. package/.next/server/app/api/todos/route.js +1 -1
  100. package/.next/server/app/api/todos/route_client-reference-manifest.js +1 -1
  101. package/.next/server/app/api/verification/runs/[runId]/route.js +1 -0
  102. package/.next/server/app/api/verification/runs/[runId]/route.js.nft.json +1 -0
  103. package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -0
  104. package/.next/server/app/api/verification/runs/route.js +1 -0
  105. package/.next/server/app/api/verification/runs/route.js.nft.json +1 -0
  106. package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -0
  107. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
  108. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js.nft.json +1 -1
  109. package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
  110. package/.next/server/app/api/worktrees/[id]/capture/route.js +1 -1
  111. package/.next/server/app/api/worktrees/[id]/capture/route.js.nft.json +1 -1
  112. package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
  113. package/.next/server/app/api/worktrees/[id]/cli-tool/route.js +1 -1
  114. package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
  115. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js +1 -1
  116. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
  117. package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
  118. package/.next/server/app/api/worktrees/[id]/current-output/route.js.nft.json +1 -1
  119. package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
  120. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route.js +1 -1
  121. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
  122. package/.next/server/app/api/worktrees/[id]/execution-logs/route.js +2 -2
  123. package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
  124. package/.next/server/app/api/worktrees/[id]/files/[...path]/route.js +1 -1
  125. package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
  126. package/.next/server/app/api/worktrees/[id]/git/branch/create/route.js +1 -1
  127. package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
  128. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route.js +1 -1
  129. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
  130. package/.next/server/app/api/worktrees/[id]/git/branches/route.js +1 -1
  131. package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
  132. package/.next/server/app/api/worktrees/[id]/git/checkout/route.js +1 -1
  133. package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
  134. package/.next/server/app/api/worktrees/[id]/git/commit/route.js +1 -1
  135. package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
  136. package/.next/server/app/api/worktrees/[id]/git/diff/route.js +1 -1
  137. package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
  138. package/.next/server/app/api/worktrees/[id]/git/fetch/route.js +1 -1
  139. package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
  140. package/.next/server/app/api/worktrees/[id]/git/log/route.js +1 -1
  141. package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
  142. package/.next/server/app/api/worktrees/[id]/git/pull/route.js +1 -1
  143. package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
  144. package/.next/server/app/api/worktrees/[id]/git/push/route.js +1 -1
  145. package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
  146. package/.next/server/app/api/worktrees/[id]/git/reset/route.js +1 -1
  147. package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
  148. package/.next/server/app/api/worktrees/[id]/git/revert/route.js +1 -1
  149. package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
  150. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route.js +1 -1
  151. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
  152. package/.next/server/app/api/worktrees/[id]/git/stage/route.js +1 -1
  153. package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
  154. package/.next/server/app/api/worktrees/[id]/git/staged/route.js +1 -1
  155. package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
  156. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route.js +1 -1
  157. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
  158. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route.js +1 -1
  159. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
  160. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route.js +1 -1
  161. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
  162. package/.next/server/app/api/worktrees/[id]/git/stash/push/route.js +1 -1
  163. package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
  164. package/.next/server/app/api/worktrees/[id]/git/stash/route.js +1 -1
  165. package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
  166. package/.next/server/app/api/worktrees/[id]/git/status/route.js +1 -1
  167. package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
  168. package/.next/server/app/api/worktrees/[id]/git/unstage/route.js +1 -1
  169. package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
  170. package/.next/server/app/api/worktrees/[id]/git/working-diff/route.js +1 -1
  171. package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
  172. package/.next/server/app/api/worktrees/[id]/interrupt/route.js +1 -1
  173. package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
  174. package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
  175. package/.next/server/app/api/worktrees/[id]/kill-session/route.js +1 -1
  176. package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -1
  177. package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
  178. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route.js +1 -1
  179. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
  180. package/.next/server/app/api/worktrees/[id]/logs/route.js +1 -1
  181. package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
  182. package/.next/server/app/api/worktrees/[id]/marp-render/route.js +1 -1
  183. package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
  184. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route.js +1 -1
  185. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
  186. package/.next/server/app/api/worktrees/[id]/memos/route.js +1 -1
  187. package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
  188. package/.next/server/app/api/worktrees/[id]/messages/route.js +1 -1
  189. package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
  190. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
  191. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -1
  192. package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
  193. package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -1
  194. package/.next/server/app/api/worktrees/[id]/respond/route.js.nft.json +1 -1
  195. package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
  196. package/.next/server/app/api/worktrees/[id]/route.js +1 -1
  197. package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
  198. package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
  199. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js +1 -1
  200. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
  201. package/.next/server/app/api/worktrees/[id]/schedules/active/route.js +1 -1
  202. package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
  203. package/.next/server/app/api/worktrees/[id]/schedules/route.js +2 -2
  204. package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
  205. package/.next/server/app/api/worktrees/[id]/search/route.js +1 -1
  206. package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
  207. package/.next/server/app/api/worktrees/[id]/send/route.js +1 -1
  208. package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
  209. package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
  210. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +1 -1
  211. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -1
  212. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
  213. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
  214. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
  215. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
  216. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
  217. package/.next/server/app/api/worktrees/[id]/skills/route.js +2 -2
  218. package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
  219. package/.next/server/app/api/worktrees/[id]/slash-commands/route.js +1 -1
  220. package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
  221. package/.next/server/app/api/worktrees/[id]/special-keys/route.js +1 -1
  222. package/.next/server/app/api/worktrees/[id]/special-keys/route.js.nft.json +1 -1
  223. package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
  224. package/.next/server/app/api/worktrees/[id]/start-polling/route.js +1 -1
  225. package/.next/server/app/api/worktrees/[id]/start-polling/route.js.nft.json +1 -1
  226. package/.next/server/app/api/worktrees/[id]/start-polling/route_client-reference-manifest.js +1 -1
  227. package/.next/server/app/api/worktrees/[id]/tasks/route.js +6 -0
  228. package/.next/server/app/api/worktrees/[id]/tasks/route.js.nft.json +1 -0
  229. package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -0
  230. package/.next/server/app/api/worktrees/[id]/terminal/route.js +1 -1
  231. package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
  232. package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
  233. package/.next/server/app/api/worktrees/[id]/timers/history/route.js +1 -1
  234. package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
  235. package/.next/server/app/api/worktrees/[id]/timers/route.js +1 -1
  236. package/.next/server/app/api/worktrees/[id]/timers/route.js.nft.json +1 -1
  237. package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
  238. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route.js +1 -1
  239. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  240. package/.next/server/app/api/worktrees/[id]/todos/route.js +1 -1
  241. package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
  242. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route.js +1 -1
  243. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
  244. package/.next/server/app/api/worktrees/[id]/tree/route.js +1 -1
  245. package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
  246. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route.js +1 -1
  247. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
  248. package/.next/server/app/api/worktrees/[id]/verify/route.js +4 -0
  249. package/.next/server/app/api/worktrees/[id]/verify/route.js.nft.json +1 -0
  250. package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -0
  251. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route.js +1 -0
  252. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route.js.nft.json +1 -0
  253. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -0
  254. package/.next/server/app/api/worktrees/[id]/verify/runs/route.js +1 -0
  255. package/.next/server/app/api/worktrees/[id]/verify/runs/route.js.nft.json +1 -0
  256. package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -0
  257. package/.next/server/app/api/worktrees/[id]/viewed/route.js +1 -1
  258. package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
  259. package/.next/server/app/api/worktrees/route.js +1 -1
  260. package/.next/server/app/api/worktrees/route.js.nft.json +1 -1
  261. package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
  262. package/.next/server/app/chat/page_client-reference-manifest.js +1 -1
  263. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  264. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  265. package/.next/server/app/more/page_client-reference-manifest.js +1 -1
  266. package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  267. package/.next/server/app/page_client-reference-manifest.js +1 -1
  268. package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
  269. package/.next/server/app/repositories/page.js +1 -1
  270. package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
  271. package/.next/server/app/review/page.js +1 -1
  272. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  273. package/.next/server/app/sessions/page.js +1 -1
  274. package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  275. package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
  276. package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
  277. package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  278. package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
  279. package/.next/server/app/worktrees/[id]/page.js +2 -2
  280. package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
  281. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
  282. package/.next/server/app-paths-manifest.json +39 -29
  283. package/.next/server/chunks/1068.js +1 -1
  284. package/.next/server/chunks/1117.js +1 -1
  285. package/.next/server/chunks/1503.js +2 -0
  286. package/.next/server/chunks/2366.js +1 -0
  287. package/.next/server/chunks/3042.js +1 -1
  288. package/.next/server/chunks/3736.js +1 -1
  289. package/.next/server/chunks/4444.js +1 -1
  290. package/.next/server/chunks/4689.js +25 -0
  291. package/.next/server/chunks/5381.js +50 -10
  292. package/.next/server/chunks/5959.js +3 -3
  293. package/.next/server/chunks/6130.js +1 -1
  294. package/.next/server/chunks/6274.js +13 -0
  295. package/.next/server/chunks/646.js +1 -1
  296. package/.next/server/chunks/8681.js +1 -1
  297. package/.next/server/chunks/8807.js +194 -51
  298. package/.next/server/chunks/8856.js +4 -0
  299. package/.next/server/chunks/9687.js +2 -2
  300. package/.next/server/middleware-manifest.json +5 -5
  301. package/.next/server/pages/500.html +1 -1
  302. package/.next/server/server-reference-manifest.json +1 -1
  303. package/.next/static/-BSmW0Ae2YsxyCl_ue7_d/_buildManifest.js +1 -0
  304. package/.next/static/chunks/{4560-8ffb0bb19f2ba998.js → 4560-0917ae2e6a0e5400.js} +1 -1
  305. package/.next/static/chunks/{6488-c2a968ec806975c2.js → 6488-109e3825c7249e47.js} +1 -1
  306. package/.next/static/chunks/app/api/app/update/route-8440b6c72bed83a1.js +1 -0
  307. package/.next/static/chunks/app/api/app/update-check/route-8440b6c72bed83a1.js +1 -0
  308. package/.next/static/chunks/app/api/assistant/conversation/route-8440b6c72bed83a1.js +1 -0
  309. package/.next/static/chunks/app/api/assistant/current-output/route-8440b6c72bed83a1.js +1 -0
  310. package/.next/static/chunks/app/api/assistant/messages/route-8440b6c72bed83a1.js +1 -0
  311. package/.next/static/chunks/app/api/assistant/session/route-8440b6c72bed83a1.js +1 -0
  312. package/.next/static/chunks/app/api/assistant/start/route-8440b6c72bed83a1.js +1 -0
  313. package/.next/static/chunks/app/api/assistant/terminal/route-8440b6c72bed83a1.js +1 -0
  314. package/.next/static/chunks/app/api/assistant/tools/route-8440b6c72bed83a1.js +1 -0
  315. package/.next/static/chunks/app/api/auth/login/route-8440b6c72bed83a1.js +1 -0
  316. package/.next/static/chunks/app/api/auth/logout/route-8440b6c72bed83a1.js +1 -0
  317. package/.next/static/chunks/app/api/auth/status/route-8440b6c72bed83a1.js +1 -0
  318. package/.next/static/chunks/app/api/daily-summary/route-8440b6c72bed83a1.js +1 -0
  319. package/.next/static/chunks/app/api/daily-summary/status/route-8440b6c72bed83a1.js +1 -0
  320. package/.next/static/chunks/app/api/external-apps/[id]/health/route-8440b6c72bed83a1.js +1 -0
  321. package/.next/static/chunks/app/api/external-apps/[id]/route-8440b6c72bed83a1.js +1 -0
  322. package/.next/static/chunks/app/api/external-apps/route-8440b6c72bed83a1.js +1 -0
  323. package/.next/static/chunks/app/api/fs/browse/route-8440b6c72bed83a1.js +1 -0
  324. package/.next/static/chunks/app/api/fs/recent-paths/route-8440b6c72bed83a1.js +1 -0
  325. package/.next/static/chunks/app/api/hooks/agent-event/route-8440b6c72bed83a1.js +1 -0
  326. package/.next/static/chunks/app/api/hooks/claude-done/route-8440b6c72bed83a1.js +1 -0
  327. package/.next/static/chunks/app/api/metrics/vibe/route-8440b6c72bed83a1.js +1 -0
  328. package/.next/static/chunks/app/api/ollama/models/route-8440b6c72bed83a1.js +1 -0
  329. package/.next/static/chunks/app/api/push/subscriptions/route-8440b6c72bed83a1.js +1 -0
  330. package/.next/static/chunks/app/api/push/vapid/route-8440b6c72bed83a1.js +1 -0
  331. package/.next/static/chunks/app/api/repositories/[id]/route-8440b6c72bed83a1.js +1 -0
  332. package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-8440b6c72bed83a1.js +1 -0
  333. package/.next/static/chunks/app/api/repositories/[id]/todos/route-8440b6c72bed83a1.js +1 -0
  334. package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-8440b6c72bed83a1.js +1 -0
  335. package/.next/static/chunks/app/api/repositories/clone/route-8440b6c72bed83a1.js +1 -0
  336. package/.next/static/chunks/app/api/repositories/excluded/route-8440b6c72bed83a1.js +1 -0
  337. package/.next/static/chunks/app/api/repositories/restore/route-8440b6c72bed83a1.js +1 -0
  338. package/.next/static/chunks/app/api/repositories/route-8440b6c72bed83a1.js +1 -0
  339. package/.next/static/chunks/app/api/repositories/scan/route-8440b6c72bed83a1.js +1 -0
  340. package/.next/static/chunks/app/api/repositories/sync/route-8440b6c72bed83a1.js +1 -0
  341. package/.next/static/chunks/app/api/repositories/validate-path/route-8440b6c72bed83a1.js +1 -0
  342. package/.next/static/chunks/app/api/sidebar/group-order/route-8440b6c72bed83a1.js +1 -0
  343. package/.next/static/chunks/app/api/skills/[id]/route-8440b6c72bed83a1.js +1 -0
  344. package/.next/static/chunks/app/api/skills/installations/route-8440b6c72bed83a1.js +1 -0
  345. package/.next/static/chunks/app/api/skills/operations/route-8440b6c72bed83a1.js +1 -0
  346. package/.next/static/chunks/app/api/skills/reindex/route-8440b6c72bed83a1.js +1 -0
  347. package/.next/static/chunks/app/api/skills/route-8440b6c72bed83a1.js +1 -0
  348. package/.next/static/chunks/app/api/slash-commands/route-8440b6c72bed83a1.js +1 -0
  349. package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-8440b6c72bed83a1.js +1 -0
  350. package/.next/static/chunks/app/api/tasks/[taskId]/route-8440b6c72bed83a1.js +1 -0
  351. package/.next/static/chunks/app/api/templates/[id]/route-8440b6c72bed83a1.js +1 -0
  352. package/.next/static/chunks/app/api/templates/route-8440b6c72bed83a1.js +1 -0
  353. package/.next/static/chunks/app/api/todos/route-8440b6c72bed83a1.js +1 -0
  354. package/.next/static/chunks/app/api/verification/runs/[runId]/route-8440b6c72bed83a1.js +1 -0
  355. package/.next/static/chunks/app/api/verification/runs/route-8440b6c72bed83a1.js +1 -0
  356. package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-8440b6c72bed83a1.js +1 -0
  357. package/.next/static/chunks/app/api/worktrees/[id]/capture/route-8440b6c72bed83a1.js +1 -0
  358. package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-8440b6c72bed83a1.js +1 -0
  359. package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-8440b6c72bed83a1.js +1 -0
  360. package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-8440b6c72bed83a1.js +1 -0
  361. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-8440b6c72bed83a1.js +1 -0
  362. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-8440b6c72bed83a1.js +1 -0
  363. package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-8440b6c72bed83a1.js +1 -0
  364. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-8440b6c72bed83a1.js +1 -0
  365. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-8440b6c72bed83a1.js +1 -0
  366. package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-8440b6c72bed83a1.js +1 -0
  367. package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-8440b6c72bed83a1.js +1 -0
  368. package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-8440b6c72bed83a1.js +1 -0
  369. package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-8440b6c72bed83a1.js +1 -0
  370. package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-8440b6c72bed83a1.js +1 -0
  371. package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-8440b6c72bed83a1.js +1 -0
  372. package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-8440b6c72bed83a1.js +1 -0
  373. package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-8440b6c72bed83a1.js +1 -0
  374. package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-8440b6c72bed83a1.js +1 -0
  375. package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-8440b6c72bed83a1.js +1 -0
  376. package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-8440b6c72bed83a1.js +1 -0
  377. package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-8440b6c72bed83a1.js +1 -0
  378. package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-8440b6c72bed83a1.js +1 -0
  379. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-8440b6c72bed83a1.js +1 -0
  380. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-8440b6c72bed83a1.js +1 -0
  381. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-8440b6c72bed83a1.js +1 -0
  382. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-8440b6c72bed83a1.js +1 -0
  383. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-8440b6c72bed83a1.js +1 -0
  384. package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-8440b6c72bed83a1.js +1 -0
  385. package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-8440b6c72bed83a1.js +1 -0
  386. package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-8440b6c72bed83a1.js +1 -0
  387. package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-8440b6c72bed83a1.js +1 -0
  388. package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-8440b6c72bed83a1.js +1 -0
  389. package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-8440b6c72bed83a1.js +1 -0
  390. package/.next/static/chunks/app/api/worktrees/[id]/logs/route-8440b6c72bed83a1.js +1 -0
  391. package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-8440b6c72bed83a1.js +1 -0
  392. package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-8440b6c72bed83a1.js +1 -0
  393. package/.next/static/chunks/app/api/worktrees/[id]/memos/route-8440b6c72bed83a1.js +1 -0
  394. package/.next/static/chunks/app/api/worktrees/[id]/messages/route-8440b6c72bed83a1.js +1 -0
  395. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-8440b6c72bed83a1.js +1 -0
  396. package/.next/static/chunks/app/api/worktrees/[id]/respond/route-8440b6c72bed83a1.js +1 -0
  397. package/.next/static/chunks/app/api/worktrees/[id]/route-8440b6c72bed83a1.js +1 -0
  398. package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-8440b6c72bed83a1.js +1 -0
  399. package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-8440b6c72bed83a1.js +1 -0
  400. package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-8440b6c72bed83a1.js +1 -0
  401. package/.next/static/chunks/app/api/worktrees/[id]/search/route-8440b6c72bed83a1.js +1 -0
  402. package/.next/static/chunks/app/api/worktrees/[id]/send/route-8440b6c72bed83a1.js +1 -0
  403. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-8440b6c72bed83a1.js +1 -0
  404. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-8440b6c72bed83a1.js +1 -0
  405. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-8440b6c72bed83a1.js +1 -0
  406. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-8440b6c72bed83a1.js +1 -0
  407. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-8440b6c72bed83a1.js +1 -0
  408. package/.next/static/chunks/app/api/worktrees/[id]/skills/route-8440b6c72bed83a1.js +1 -0
  409. package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-8440b6c72bed83a1.js +1 -0
  410. package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-8440b6c72bed83a1.js +1 -0
  411. package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-8440b6c72bed83a1.js +1 -0
  412. package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-8440b6c72bed83a1.js +1 -0
  413. package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-8440b6c72bed83a1.js +1 -0
  414. package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-8440b6c72bed83a1.js +1 -0
  415. package/.next/static/chunks/app/api/worktrees/[id]/timers/route-8440b6c72bed83a1.js +1 -0
  416. package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-8440b6c72bed83a1.js +1 -0
  417. package/.next/static/chunks/app/api/worktrees/[id]/todos/route-8440b6c72bed83a1.js +1 -0
  418. package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-8440b6c72bed83a1.js +1 -0
  419. package/.next/static/chunks/app/api/worktrees/[id]/tree/route-8440b6c72bed83a1.js +1 -0
  420. package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-8440b6c72bed83a1.js +1 -0
  421. package/.next/static/chunks/app/api/worktrees/[id]/verify/route-8440b6c72bed83a1.js +1 -0
  422. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-8440b6c72bed83a1.js +1 -0
  423. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-8440b6c72bed83a1.js +1 -0
  424. package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-8440b6c72bed83a1.js +1 -0
  425. package/.next/static/chunks/app/api/worktrees/route-8440b6c72bed83a1.js +1 -0
  426. package/.next/static/chunks/app/manifest.webmanifest/route-8440b6c72bed83a1.js +1 -0
  427. package/.next/static/chunks/app/proxy/[...path]/route-8440b6c72bed83a1.js +1 -0
  428. package/.next/static/chunks/app/repositories/page-1ed1e5a542ecc168.js +1 -0
  429. package/.next/static/chunks/app/review/{page-f431d630097c2e85.js → page-b559bfb11c46931b.js} +1 -1
  430. package/.next/static/chunks/app/sessions/{page-20f07a99db64d2ca.js → page-3fa7e767d0ab3889.js} +1 -1
  431. package/.next/static/chunks/app/worktrees/[id]/page-12b3c5f32fc6094e.js +1 -0
  432. package/.next/trace +12 -11
  433. package/.next/types/app/api/hooks/agent-event/route.ts +347 -0
  434. package/.next/types/app/api/metrics/vibe/route.ts +347 -0
  435. package/.next/types/app/api/tasks/[taskId]/cancel/route.ts +347 -0
  436. package/.next/types/app/api/tasks/[taskId]/route.ts +347 -0
  437. package/.next/types/app/api/verification/runs/[runId]/route.ts +347 -0
  438. package/.next/types/app/api/verification/runs/route.ts +347 -0
  439. package/.next/types/app/api/worktrees/[id]/tasks/route.ts +347 -0
  440. package/.next/types/app/api/worktrees/[id]/verify/route.ts +347 -0
  441. package/.next/types/app/api/worktrees/[id]/verify/runs/[runId]/route.ts +347 -0
  442. package/.next/types/app/api/worktrees/[id]/verify/runs/route.ts +347 -0
  443. package/.next/types/routes.d.ts +11 -1
  444. package/.next/types/validator.ts +90 -0
  445. package/dist/cli/commands/report.d.ts +1 -0
  446. package/dist/cli/commands/report.d.ts.map +1 -1
  447. package/dist/cli/commands/report.js +54 -0
  448. package/dist/cli/commands/send.d.ts.map +1 -1
  449. package/dist/cli/commands/send.js +116 -14
  450. package/dist/cli/commands/task.d.ts +11 -0
  451. package/dist/cli/commands/task.d.ts.map +1 -0
  452. package/dist/cli/commands/task.js +126 -0
  453. package/dist/cli/commands/verify.d.ts +19 -0
  454. package/dist/cli/commands/verify.d.ts.map +1 -0
  455. package/dist/cli/commands/verify.js +229 -0
  456. package/dist/cli/commands/wait.d.ts +2 -0
  457. package/dist/cli/commands/wait.d.ts.map +1 -1
  458. package/dist/cli/commands/wait.js +128 -13
  459. package/dist/cli/docs/agent-operations.d.ts +2 -2
  460. package/dist/cli/docs/agent-operations.d.ts.map +1 -1
  461. package/dist/cli/docs/agent-operations.js +92 -3
  462. package/dist/cli/program.d.ts.map +1 -1
  463. package/dist/cli/program.js +6 -0
  464. package/dist/cli/types/api-responses.d.ts +180 -0
  465. package/dist/cli/types/api-responses.d.ts.map +1 -1
  466. package/dist/cli/types/index.d.ts +82 -0
  467. package/dist/cli/types/index.d.ts.map +1 -1
  468. package/dist/cli/types/index.js +30 -1
  469. package/dist/cli/utils/api-client.d.ts +8 -0
  470. package/dist/cli/utils/api-client.d.ts.map +1 -1
  471. package/dist/cli/utils/verify-runner.d.ts +63 -0
  472. package/dist/cli/utils/verify-runner.d.ts.map +1 -0
  473. package/dist/cli/utils/verify-runner.js +175 -0
  474. package/dist/server/server.js +15 -0
  475. package/dist/server/src/config/auto-yes-config.js +22 -0
  476. package/dist/server/src/lib/auto-yes-poller.js +34 -2
  477. package/dist/server/src/lib/auto-yes-state.js +6 -19
  478. package/dist/server/src/lib/db/db.js +34 -1
  479. package/dist/server/src/lib/db/migrations/index.js +6 -0
  480. package/dist/server/src/lib/db/migrations/runner.js +1 -1
  481. package/dist/server/src/lib/db/migrations/v49-verification-runs.js +86 -0
  482. package/dist/server/src/lib/db/migrations/v50-tasks.js +68 -0
  483. package/dist/server/src/lib/db/migrations/v51-task-events.js +58 -0
  484. package/dist/server/src/lib/db/task-events-db.js +59 -0
  485. package/dist/server/src/lib/db/tasks-db.js +263 -0
  486. package/dist/server/src/lib/db/verification-db.js +290 -0
  487. package/dist/server/src/lib/polling/auto-yes-policy.js +117 -0
  488. package/dist/server/src/lib/polling/auto-yes-resolver.js +144 -4
  489. package/dist/server/src/lib/polling/response-checker.js +8 -0
  490. package/dist/server/src/lib/session/agent-event-state.js +46 -0
  491. package/dist/server/src/lib/session/current-output-builder.js +4 -0
  492. package/dist/server/src/lib/session/status-mapping.js +146 -0
  493. package/dist/server/src/lib/tasks/contract-parser.js +385 -0
  494. package/dist/server/src/lib/tasks/task-state-machine.js +183 -0
  495. package/dist/server/src/lib/tasks/task-transition-service.js +106 -0
  496. package/dist/server/src/lib/verification/verification-reconciler.js +49 -0
  497. package/dist/server/src/types/sidebar.js +7 -20
  498. package/package.json +5 -2
  499. package/scripts/hooks/cmate-agent-event.sh +175 -0
  500. package/.next/server/chunks/2064.js +0 -2
  501. package/.next/static/AKqbAyuzbFfg05qpbCI_K/_buildManifest.js +0 -1
  502. package/.next/static/chunks/app/api/app/update/route-55e398bd20e2d7a9.js +0 -1
  503. package/.next/static/chunks/app/api/app/update-check/route-55e398bd20e2d7a9.js +0 -1
  504. package/.next/static/chunks/app/api/assistant/conversation/route-55e398bd20e2d7a9.js +0 -1
  505. package/.next/static/chunks/app/api/assistant/current-output/route-55e398bd20e2d7a9.js +0 -1
  506. package/.next/static/chunks/app/api/assistant/messages/route-55e398bd20e2d7a9.js +0 -1
  507. package/.next/static/chunks/app/api/assistant/session/route-55e398bd20e2d7a9.js +0 -1
  508. package/.next/static/chunks/app/api/assistant/start/route-55e398bd20e2d7a9.js +0 -1
  509. package/.next/static/chunks/app/api/assistant/terminal/route-55e398bd20e2d7a9.js +0 -1
  510. package/.next/static/chunks/app/api/assistant/tools/route-55e398bd20e2d7a9.js +0 -1
  511. package/.next/static/chunks/app/api/auth/login/route-55e398bd20e2d7a9.js +0 -1
  512. package/.next/static/chunks/app/api/auth/logout/route-55e398bd20e2d7a9.js +0 -1
  513. package/.next/static/chunks/app/api/auth/status/route-55e398bd20e2d7a9.js +0 -1
  514. package/.next/static/chunks/app/api/daily-summary/route-55e398bd20e2d7a9.js +0 -1
  515. package/.next/static/chunks/app/api/daily-summary/status/route-55e398bd20e2d7a9.js +0 -1
  516. package/.next/static/chunks/app/api/external-apps/[id]/health/route-55e398bd20e2d7a9.js +0 -1
  517. package/.next/static/chunks/app/api/external-apps/[id]/route-55e398bd20e2d7a9.js +0 -1
  518. package/.next/static/chunks/app/api/external-apps/route-55e398bd20e2d7a9.js +0 -1
  519. package/.next/static/chunks/app/api/fs/browse/route-55e398bd20e2d7a9.js +0 -1
  520. package/.next/static/chunks/app/api/fs/recent-paths/route-55e398bd20e2d7a9.js +0 -1
  521. package/.next/static/chunks/app/api/hooks/claude-done/route-55e398bd20e2d7a9.js +0 -1
  522. package/.next/static/chunks/app/api/ollama/models/route-55e398bd20e2d7a9.js +0 -1
  523. package/.next/static/chunks/app/api/push/subscriptions/route-55e398bd20e2d7a9.js +0 -1
  524. package/.next/static/chunks/app/api/push/vapid/route-55e398bd20e2d7a9.js +0 -1
  525. package/.next/static/chunks/app/api/repositories/[id]/route-55e398bd20e2d7a9.js +0 -1
  526. package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-55e398bd20e2d7a9.js +0 -1
  527. package/.next/static/chunks/app/api/repositories/[id]/todos/route-55e398bd20e2d7a9.js +0 -1
  528. package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-55e398bd20e2d7a9.js +0 -1
  529. package/.next/static/chunks/app/api/repositories/clone/route-55e398bd20e2d7a9.js +0 -1
  530. package/.next/static/chunks/app/api/repositories/excluded/route-55e398bd20e2d7a9.js +0 -1
  531. package/.next/static/chunks/app/api/repositories/restore/route-55e398bd20e2d7a9.js +0 -1
  532. package/.next/static/chunks/app/api/repositories/route-55e398bd20e2d7a9.js +0 -1
  533. package/.next/static/chunks/app/api/repositories/scan/route-55e398bd20e2d7a9.js +0 -1
  534. package/.next/static/chunks/app/api/repositories/sync/route-55e398bd20e2d7a9.js +0 -1
  535. package/.next/static/chunks/app/api/repositories/validate-path/route-55e398bd20e2d7a9.js +0 -1
  536. package/.next/static/chunks/app/api/sidebar/group-order/route-55e398bd20e2d7a9.js +0 -1
  537. package/.next/static/chunks/app/api/skills/[id]/route-55e398bd20e2d7a9.js +0 -1
  538. package/.next/static/chunks/app/api/skills/installations/route-55e398bd20e2d7a9.js +0 -1
  539. package/.next/static/chunks/app/api/skills/operations/route-55e398bd20e2d7a9.js +0 -1
  540. package/.next/static/chunks/app/api/skills/reindex/route-55e398bd20e2d7a9.js +0 -1
  541. package/.next/static/chunks/app/api/skills/route-55e398bd20e2d7a9.js +0 -1
  542. package/.next/static/chunks/app/api/slash-commands/route-55e398bd20e2d7a9.js +0 -1
  543. package/.next/static/chunks/app/api/templates/[id]/route-55e398bd20e2d7a9.js +0 -1
  544. package/.next/static/chunks/app/api/templates/route-55e398bd20e2d7a9.js +0 -1
  545. package/.next/static/chunks/app/api/todos/route-55e398bd20e2d7a9.js +0 -1
  546. package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-55e398bd20e2d7a9.js +0 -1
  547. package/.next/static/chunks/app/api/worktrees/[id]/capture/route-55e398bd20e2d7a9.js +0 -1
  548. package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-55e398bd20e2d7a9.js +0 -1
  549. package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-55e398bd20e2d7a9.js +0 -1
  550. package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-55e398bd20e2d7a9.js +0 -1
  551. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-55e398bd20e2d7a9.js +0 -1
  552. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-55e398bd20e2d7a9.js +0 -1
  553. package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-55e398bd20e2d7a9.js +0 -1
  554. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-55e398bd20e2d7a9.js +0 -1
  555. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-55e398bd20e2d7a9.js +0 -1
  556. package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-55e398bd20e2d7a9.js +0 -1
  557. package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-55e398bd20e2d7a9.js +0 -1
  558. package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-55e398bd20e2d7a9.js +0 -1
  559. package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-55e398bd20e2d7a9.js +0 -1
  560. package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-55e398bd20e2d7a9.js +0 -1
  561. package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-55e398bd20e2d7a9.js +0 -1
  562. package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-55e398bd20e2d7a9.js +0 -1
  563. package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-55e398bd20e2d7a9.js +0 -1
  564. package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-55e398bd20e2d7a9.js +0 -1
  565. package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-55e398bd20e2d7a9.js +0 -1
  566. package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-55e398bd20e2d7a9.js +0 -1
  567. package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-55e398bd20e2d7a9.js +0 -1
  568. package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-55e398bd20e2d7a9.js +0 -1
  569. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-55e398bd20e2d7a9.js +0 -1
  570. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-55e398bd20e2d7a9.js +0 -1
  571. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-55e398bd20e2d7a9.js +0 -1
  572. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-55e398bd20e2d7a9.js +0 -1
  573. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-55e398bd20e2d7a9.js +0 -1
  574. package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-55e398bd20e2d7a9.js +0 -1
  575. package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-55e398bd20e2d7a9.js +0 -1
  576. package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-55e398bd20e2d7a9.js +0 -1
  577. package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-55e398bd20e2d7a9.js +0 -1
  578. package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-55e398bd20e2d7a9.js +0 -1
  579. package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-55e398bd20e2d7a9.js +0 -1
  580. package/.next/static/chunks/app/api/worktrees/[id]/logs/route-55e398bd20e2d7a9.js +0 -1
  581. package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-55e398bd20e2d7a9.js +0 -1
  582. package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-55e398bd20e2d7a9.js +0 -1
  583. package/.next/static/chunks/app/api/worktrees/[id]/memos/route-55e398bd20e2d7a9.js +0 -1
  584. package/.next/static/chunks/app/api/worktrees/[id]/messages/route-55e398bd20e2d7a9.js +0 -1
  585. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-55e398bd20e2d7a9.js +0 -1
  586. package/.next/static/chunks/app/api/worktrees/[id]/respond/route-55e398bd20e2d7a9.js +0 -1
  587. package/.next/static/chunks/app/api/worktrees/[id]/route-55e398bd20e2d7a9.js +0 -1
  588. package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-55e398bd20e2d7a9.js +0 -1
  589. package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-55e398bd20e2d7a9.js +0 -1
  590. package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-55e398bd20e2d7a9.js +0 -1
  591. package/.next/static/chunks/app/api/worktrees/[id]/search/route-55e398bd20e2d7a9.js +0 -1
  592. package/.next/static/chunks/app/api/worktrees/[id]/send/route-55e398bd20e2d7a9.js +0 -1
  593. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-55e398bd20e2d7a9.js +0 -1
  594. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-55e398bd20e2d7a9.js +0 -1
  595. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-55e398bd20e2d7a9.js +0 -1
  596. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-55e398bd20e2d7a9.js +0 -1
  597. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-55e398bd20e2d7a9.js +0 -1
  598. package/.next/static/chunks/app/api/worktrees/[id]/skills/route-55e398bd20e2d7a9.js +0 -1
  599. package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-55e398bd20e2d7a9.js +0 -1
  600. package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-55e398bd20e2d7a9.js +0 -1
  601. package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-55e398bd20e2d7a9.js +0 -1
  602. package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-55e398bd20e2d7a9.js +0 -1
  603. package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-55e398bd20e2d7a9.js +0 -1
  604. package/.next/static/chunks/app/api/worktrees/[id]/timers/route-55e398bd20e2d7a9.js +0 -1
  605. package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-55e398bd20e2d7a9.js +0 -1
  606. package/.next/static/chunks/app/api/worktrees/[id]/todos/route-55e398bd20e2d7a9.js +0 -1
  607. package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-55e398bd20e2d7a9.js +0 -1
  608. package/.next/static/chunks/app/api/worktrees/[id]/tree/route-55e398bd20e2d7a9.js +0 -1
  609. package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-55e398bd20e2d7a9.js +0 -1
  610. package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-55e398bd20e2d7a9.js +0 -1
  611. package/.next/static/chunks/app/api/worktrees/route-55e398bd20e2d7a9.js +0 -1
  612. package/.next/static/chunks/app/manifest.webmanifest/route-55e398bd20e2d7a9.js +0 -1
  613. package/.next/static/chunks/app/proxy/[...path]/route-55e398bd20e2d7a9.js +0 -1
  614. package/.next/static/chunks/app/repositories/page-3c4fb889da48ce24.js +0 -1
  615. package/.next/static/chunks/app/worktrees/[id]/page-59a63a2c013ec1eb.js +0 -1
  616. /package/.next/static/{AKqbAyuzbFfg05qpbCI_K → -BSmW0Ae2YsxyCl_ue7_d}/_ssgManifest.js +0 -0
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Verification run driver shared by `commandmate verify` and `wait --verify`
3
+ * (Issue #1544).
4
+ *
5
+ * The server answers a verify request with 202 and a run id rather than a
6
+ * verdict — gates are whole test suites and builds — so every caller has to
7
+ * start a run, poll it to a terminal status, and translate that status into an
8
+ * exit code. That sequence lives here once so `verify` and `wait` cannot drift
9
+ * apart on what "passed" means.
10
+ *
11
+ * @module cli/utils/verify-runner
12
+ */
13
+ import type { VerificationRunStatus, VerificationRunView } from '../types/api-responses';
14
+ import { ApiClient } from './api-client';
15
+ /** Matches the wait command's cadence; runs are minutes long, not seconds. */
16
+ export declare const VERIFY_POLL_INTERVAL_MS = 5000;
17
+ /** Built-in gate id; mirrors WORK_EVIDENCE_GATE_ID in lib/verification/gate-runner.ts. */
18
+ export declare const WORK_EVIDENCE_GATE_ID = "work-evidence";
19
+ export interface VerificationRequest {
20
+ worktreeId: string;
21
+ /** 'manual' for the verify command, 'wait' when chained after wait. */
22
+ trigger: 'manual' | 'wait';
23
+ instanceId?: string;
24
+ /**
25
+ * Task the run judges. Omitted lets the server resolve the worktree's own
26
+ * task, which is enough while that task is still open — `wait` names one
27
+ * because the agent may close it before the run starts (#1620).
28
+ */
29
+ taskId?: string;
30
+ /** Omitted means work-evidence plus every gate declared in verify.yaml. */
31
+ gateIds?: string[];
32
+ /** Seconds before the CLI stops polling and reports TIMEOUT. */
33
+ timeoutSec?: number;
34
+ /** Stream the final `RESULT <status>` line goes to. Defaults to stdout. */
35
+ resultStream?: 'stdout' | 'stderr';
36
+ /** Suppress the RESULT line because the caller prints JSON on stdout instead. */
37
+ suppressResultLine?: boolean;
38
+ }
39
+ export interface VerificationOutcome {
40
+ exitCode: number;
41
+ /** Last observed run; on timeout this is still `running`. */
42
+ run?: VerificationRunView;
43
+ }
44
+ /**
45
+ * Translate a terminal run status into a process exit code.
46
+ *
47
+ * `error` and `cancelled` mean no verdict was reached, so they take the generic
48
+ * UNEXPECTED_ERROR code rather than VERIFY_FAILED — a caller branching on 20
49
+ * must be able to trust that gates actually ran and judged the work.
50
+ */
51
+ export declare function exitCodeForRunStatus(status: VerificationRunStatus): number;
52
+ /**
53
+ * Parse `--gates a,b` into a gate id list.
54
+ * @returns The ids, or null when the value names no gate at all.
55
+ */
56
+ export declare function parseGateIds(value: string | undefined): string[] | null | undefined;
57
+ /**
58
+ * Start a verification run and poll it to a verdict.
59
+ *
60
+ * @throws ApiError when the run cannot be started or the server stops answering
61
+ */
62
+ export declare function runVerification(client: ApiClient, request: VerificationRequest): Promise<VerificationOutcome>;
63
+ //# sourceMappingURL=verify-runner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verify-runner.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/verify-runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,KAAK,EAEV,qBAAqB,EACrB,mBAAmB,EAGpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,SAAS,EAAiC,MAAM,cAAc,CAAC;AAExE,8EAA8E;AAC9E,eAAO,MAAM,uBAAuB,OAAO,CAAC;AAE5C,0FAA0F;AAC1F,eAAO,MAAM,qBAAqB,kBAAkB,CAAC;AAErD,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2EAA2E;IAC3E,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,gEAAgE;IAChE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2EAA2E;IAC3E,YAAY,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IACnC,iFAAiF;IACjF,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,6DAA6D;IAC7D,GAAG,CAAC,EAAE,mBAAmB,CAAC;CAC3B;AAUD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,qBAAqB,GAAG,MAAM,CAW1E;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,EAAE,GAAG,IAAI,GAAG,SAAS,CAOnF;AAqED;;;;GAIG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,mBAAmB,CAAC,CAyD9B"}
@@ -0,0 +1,175 @@
1
+ "use strict";
2
+ /**
3
+ * Verification run driver shared by `commandmate verify` and `wait --verify`
4
+ * (Issue #1544).
5
+ *
6
+ * The server answers a verify request with 202 and a run id rather than a
7
+ * verdict — gates are whole test suites and builds — so every caller has to
8
+ * start a run, poll it to a terminal status, and translate that status into an
9
+ * exit code. That sequence lives here once so `verify` and `wait` cannot drift
10
+ * apart on what "passed" means.
11
+ *
12
+ * @module cli/utils/verify-runner
13
+ */
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.WORK_EVIDENCE_GATE_ID = exports.VERIFY_POLL_INTERVAL_MS = void 0;
16
+ exports.exitCodeForRunStatus = exitCodeForRunStatus;
17
+ exports.parseGateIds = parseGateIds;
18
+ exports.runVerification = runVerification;
19
+ const types_1 = require("../types");
20
+ const api_client_1 = require("./api-client");
21
+ /** Matches the wait command's cadence; runs are minutes long, not seconds. */
22
+ exports.VERIFY_POLL_INTERVAL_MS = 5000;
23
+ /** Built-in gate id; mirrors WORK_EVIDENCE_GATE_ID in lib/verification/gate-runner.ts. */
24
+ exports.WORK_EVIDENCE_GATE_ID = 'work-evidence';
25
+ const GATE_LABELS = {
26
+ passed: 'PASS',
27
+ failed: 'FAIL',
28
+ timeout: 'TIMEOUT',
29
+ skipped: 'SKIP',
30
+ error: 'ERROR',
31
+ };
32
+ /**
33
+ * Translate a terminal run status into a process exit code.
34
+ *
35
+ * `error` and `cancelled` mean no verdict was reached, so they take the generic
36
+ * UNEXPECTED_ERROR code rather than VERIFY_FAILED — a caller branching on 20
37
+ * must be able to trust that gates actually ran and judged the work.
38
+ */
39
+ function exitCodeForRunStatus(status) {
40
+ switch (status) {
41
+ case 'passed':
42
+ return types_1.VerifyExitCode.SUCCESS;
43
+ case 'failed':
44
+ return types_1.VerifyExitCode.VERIFY_FAILED;
45
+ case 'not_started':
46
+ return types_1.VerifyExitCode.NOT_STARTED;
47
+ default:
48
+ return types_1.ExitCode.UNEXPECTED_ERROR;
49
+ }
50
+ }
51
+ /**
52
+ * Parse `--gates a,b` into a gate id list.
53
+ * @returns The ids, or null when the value names no gate at all.
54
+ */
55
+ function parseGateIds(value) {
56
+ if (value === undefined)
57
+ return undefined;
58
+ const ids = value
59
+ .split(',')
60
+ .map((id) => id.trim())
61
+ .filter((id) => id !== '');
62
+ return ids.length > 0 ? ids : null;
63
+ }
64
+ function formatDetail(gate) {
65
+ // The work-evidence gate's verdict is a count, not an exit status; surfacing
66
+ // the counts is what tells a caller *why* a run came back not_started.
67
+ if (gate.gateId === exports.WORK_EVIDENCE_GATE_ID && gate.logTail) {
68
+ const match = /commits=(\d+)\s+uncommitted=(\d+)/.exec(gate.logTail);
69
+ if (match)
70
+ return `commits=${match[1]}, uncommitted=${match[2]}`;
71
+ }
72
+ if (gate.status === 'skipped') {
73
+ const reason = gate.logTail?.split('\n')[0]?.trim();
74
+ return reason ? reason.slice(0, 160) : 'not run';
75
+ }
76
+ const parts = [];
77
+ if (gate.exitCode !== null && gate.exitCode !== undefined)
78
+ parts.push(`exit=${gate.exitCode}`);
79
+ if (gate.durationMs !== null && gate.durationMs !== undefined) {
80
+ parts.push(`${(gate.durationMs / 1000).toFixed(1)}s`);
81
+ }
82
+ return parts.join(', ');
83
+ }
84
+ function formatGateLine(gate) {
85
+ const label = GATE_LABELS[gate.status] ?? gate.status.toUpperCase();
86
+ const detail = formatDetail(gate);
87
+ return detail ? `GATE ${gate.gateId} ${label} (${detail})` : `GATE ${gate.gateId} ${label}`;
88
+ }
89
+ /**
90
+ * Print each gate exactly once, when it reaches a terminal status.
91
+ * @param reported - Gate row ids already printed; mutated in place.
92
+ */
93
+ function reportGates(gates, reported) {
94
+ for (const gate of gates) {
95
+ if (gate.status === 'running' || reported.has(gate.id))
96
+ continue;
97
+ reported.add(gate.id);
98
+ console.error(formatGateLine(gate));
99
+ // A failing gate without its log forces the caller back to the API to learn
100
+ // anything actionable, which defeats the point of a CLI verdict.
101
+ if (gate.status !== 'passed' && gate.logTail) {
102
+ console.error(gate.logTail.replace(/\n+$/, ''));
103
+ }
104
+ }
105
+ }
106
+ function sleep(ms) {
107
+ return new Promise((resolve) => setTimeout(resolve, ms));
108
+ }
109
+ /**
110
+ * Turn the verify route's 409 into an error that names the blocking run.
111
+ *
112
+ * handleApiError() maps 409 through its default branch to "Unexpected HTTP
113
+ * status: 409", which tells the caller nothing about what to do next.
114
+ */
115
+ function withConflictMessage(error, worktreeId) {
116
+ if (!(error instanceof api_client_1.ApiError) || error.statusCode !== 409)
117
+ return error;
118
+ const running = error.payload?.runningRunId;
119
+ const which = typeof running === 'number' ? ` (run ${running})` : '';
120
+ return new api_client_1.ApiError(`A verification run is already in progress for '${worktreeId}'${which}. ` +
121
+ 'Wait for it to finish, then retry.', error.exitCode, error.statusCode, error.payload);
122
+ }
123
+ /**
124
+ * Start a verification run and poll it to a verdict.
125
+ *
126
+ * @throws ApiError when the run cannot be started or the server stops answering
127
+ */
128
+ async function runVerification(client, request) {
129
+ const { worktreeId } = request;
130
+ let runId;
131
+ try {
132
+ const started = await client.post(`/api/worktrees/${worktreeId}/verify`, {
133
+ trigger: request.trigger,
134
+ instanceId: request.instanceId,
135
+ gateIds: request.gateIds,
136
+ taskId: request.taskId,
137
+ });
138
+ runId = (0, api_client_1.assertResponseShape)(started, ['runId'], `POST /api/worktrees/${worktreeId}/verify`).runId;
139
+ }
140
+ catch (error) {
141
+ throw withConflictMessage(error, worktreeId);
142
+ }
143
+ console.error(`Verifying: ${worktreeId} (run ${runId})`);
144
+ const startedAt = Date.now();
145
+ const reported = new Set();
146
+ const runPath = `/api/worktrees/${worktreeId}/verify/runs/${runId}`;
147
+ let lastRun;
148
+ while (true) {
149
+ const body = await client.get(runPath);
150
+ const run = (0, api_client_1.assertResponseShape)(body, ['run'], `GET ${runPath}`).run;
151
+ lastRun = run;
152
+ reportGates(run.gates ?? [], reported);
153
+ if (run.status !== 'running') {
154
+ if (!request.suppressResultLine) {
155
+ const line = `RESULT ${run.status}`;
156
+ if (request.resultStream === 'stderr')
157
+ console.error(line);
158
+ else
159
+ console.log(line);
160
+ }
161
+ return { exitCode: exitCodeForRunStatus(run.status), run };
162
+ }
163
+ // Checked after the terminal-status branch so a run that finishes exactly on
164
+ // the deadline still reports its verdict instead of a timeout.
165
+ if (request.timeoutSec) {
166
+ const elapsed = (Date.now() - startedAt) / 1000;
167
+ if (elapsed >= request.timeoutSec) {
168
+ console.error(`Timeout: verification of ${worktreeId} exceeded ${request.timeoutSec}s ` +
169
+ `(run ${runId} is still running server-side)`);
170
+ return { exitCode: types_1.VerifyExitCode.TIMEOUT, run: lastRun };
171
+ }
172
+ }
173
+ await sleep(exports.VERIFY_POLL_INTERVAL_MS);
174
+ }
175
+ }
@@ -226,6 +226,21 @@ app.prepare().then(() => {
226
226
  catch (error) {
227
227
  console.error('Error reconciling Skill operations:', error);
228
228
  }
229
+ // Issue #1543: close verification runs that a crash left in `running`.
230
+ // Gate execution lives in process memory, so none of them survived the
231
+ // restart; leaving the rows open would keep their worktrees permanently
232
+ // 409-locked against a new run. Dynamic import for the same reason as the
233
+ // Skill reconciler above — do not hoist to a static import.
234
+ try {
235
+ const { reconcileOrphanVerificationRuns } = await Promise.resolve().then(() => __importStar(require('./src/lib/verification/verification-reconciler')));
236
+ const verifyReport = reconcileOrphanVerificationRuns(db);
237
+ if (verifyReport.runs > 0) {
238
+ console.log(`Verification runs reconciled: runs=${verifyReport.runs} gates=${verifyReport.gates}`);
239
+ }
240
+ }
241
+ catch (error) {
242
+ console.error('Error reconciling verification runs:', error);
243
+ }
229
244
  // Get repository paths from environment variables
230
245
  const repositoryPaths = (0, worktrees_1.getRepositoryPaths)();
231
246
  // Issue #490: Also include DB-registered repositories (e.g. cloned repos)
@@ -16,6 +16,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.MAX_STOP_PATTERN_LENGTH = exports.AUTO_STOP_ERROR_THRESHOLD = exports.AUTO_YES_COUNTDOWN_INTERVAL_MS = exports.FULL_CAPTURE_LINES = exports.REDUCED_CAPTURE_LINES = exports.THINKING_POLLING_INTERVAL_MS = exports.DURATION_LABELS = exports.DEFAULT_AUTO_YES_DURATION = exports.ALLOWED_DURATIONS = void 0;
17
17
  exports.isAllowedDuration = isAllowedDuration;
18
18
  exports.validateStopPattern = validateStopPattern;
19
+ exports.executeRegexWithTimeout = executeRegexWithTimeout;
19
20
  exports.formatTimeRemaining = formatTimeRemaining;
20
21
  const safe_regex2_1 = __importDefault(require("safe-regex2"));
21
22
  const tmux_pane_config_1 = require("../config/tmux-pane-config");
@@ -92,6 +93,27 @@ function validateStopPattern(pattern) {
92
93
  return { valid: false, error: 'Invalid regular expression syntax' };
93
94
  }
94
95
  }
96
+ /**
97
+ * Execute a regex test with timeout protection.
98
+ * Uses synchronous execution with safe-regex2 pre-validation as the primary defense.
99
+ *
100
+ * Lives here rather than in auto-yes-state.ts (Issue #1547) so the auto-yes
101
+ * resolver can use it: the resolver is imported by a 'use client' hook, and
102
+ * auto-yes-state pulls in path-validator, which imports `fs`.
103
+ *
104
+ * @param regex - Pre-compiled RegExp to test
105
+ * @param text - Text to test against
106
+ * @param _timeoutMs - Reserved for future timeout implementation (default: 100ms)
107
+ * @returns true/false for match result, null if execution failed
108
+ */
109
+ function executeRegexWithTimeout(regex, text, _timeoutMs = 100) {
110
+ try {
111
+ return regex.test(text);
112
+ }
113
+ catch {
114
+ return null;
115
+ }
116
+ }
95
117
  // =============================================================================
96
118
  // Time Formatting
97
119
  // =============================================================================
@@ -61,6 +61,9 @@ exports.isAnyPollerActiveForWorktree = isAnyPollerActiveForWorktree;
61
61
  const cli_session_1 = require("./session/cli-session");
62
62
  const prompt_detector_1 = require("./detection/prompt-detector");
63
63
  const auto_yes_resolver_1 = require("./polling/auto-yes-resolver");
64
+ const auto_yes_policy_1 = require("./polling/auto-yes-policy");
65
+ const task_transition_service_1 = require("./tasks/task-transition-service");
66
+ const db_instance_1 = require("./db/db-instance");
64
67
  const prompt_answer_sender_1 = require("./prompt-answer-sender");
65
68
  const manager_1 = require("./cli-tools/manager");
66
69
  const cli_patterns_1 = require("./detection/cli-patterns");
@@ -291,8 +294,26 @@ async function detectAndRespondToPrompt(worktreeId, pollerState, cliToolId, clea
291
294
  if (isDuplicatePrompt(pollerState, promptKey)) {
292
295
  return 'duplicate';
293
296
  }
294
- // 3. Resolve auto answer
295
- const answer = (0, auto_yes_resolver_1.resolveAutoAnswer)(promptDetection.promptData);
297
+ // 3. Resolve auto answer under the execution contract's policy (Issue #1547).
298
+ // Auto-Yes calls detectPrompt directly instead of going through
299
+ // status-detector, so this is the only place the policy can gate an
300
+ // auto-answer: a prompt the policy withholds is left for a human, and the
301
+ // response poller's prompt path (WS broadcast + Web Push, see
302
+ // polling/response-checker.ts) is what tells them it is waiting.
303
+ const policy = (0, auto_yes_policy_1.getSessionAutoYesPolicy)(worktreeId, cliToolId, instanceId);
304
+ const resolution = (0, auto_yes_resolver_1.resolveAutoAnswerWithPolicy)(promptDetection.promptData, policy);
305
+ if (resolution.suppressedBy) {
306
+ logger.warn('poller:auto-yes-suppressed-by-policy', {
307
+ worktreeId,
308
+ cliToolId,
309
+ instanceId,
310
+ reason: resolution.suppressedBy,
311
+ mode: policy?.mode ?? null,
312
+ pattern: resolution.pattern,
313
+ promptType: promptDetection.promptData.type,
314
+ });
315
+ }
316
+ const answer = resolution.answer;
296
317
  if (answer === null) {
297
318
  return 'no_answer';
298
319
  }
@@ -318,6 +339,13 @@ async function detectAndRespondToPrompt(worktreeId, pollerState, cliToolId, clea
318
339
  pollerState.lastAnsweredPromptKey = promptKey;
319
340
  pollerState.lastAnsweredAt = Date.now();
320
341
  logger.info('poller:response-sent', { worktreeId, cliToolId, instanceId });
342
+ // Issue #1548: the prompt was answered without a human. Raised only after
343
+ // the keys actually reached tmux, so a send that threw is not logged as an
344
+ // answer. No-ops when this instance is not running a contract.
345
+ (0, task_transition_service_1.applyEventToActiveTask)((0, db_instance_1.getDbInstance)(), worktreeId, cliToolId,
346
+ // Undefined means the primary instance, which the task lookup identifies
347
+ // by the tool id itself (see getActiveTaskForInstance).
348
+ instanceId ?? cliToolId, 'prompt_answered_auto', { promptType: promptDetection.promptData.type });
321
349
  // Dynamic imports avoid a module cycle through terminal-broadcast ->
322
350
  // current-output-builder -> auto-yes-manager -> this poller.
323
351
  const [{ startPolling: startResponsePolling }, { broadcastTerminalSnapshotAfterInteraction }] = await Promise.all([
@@ -455,6 +483,8 @@ function startAutoYesPolling(worktreeId, cliToolId, instanceId) {
455
483
  stopCheckBaselineLength: -1,
456
484
  };
457
485
  autoYesPollerStates.set(compositeKey, pollerState);
486
+ // A task may have been recorded moments ago; start from a fresh policy read.
487
+ (0, auto_yes_policy_1.invalidateSessionAutoYesPolicy)(compositeKey);
458
488
  // Start polling immediately
459
489
  pollerState.timerId = setTimeout(() => {
460
490
  pollAutoYes(worktreeId, cliToolId, effectiveInstanceId);
@@ -477,6 +507,7 @@ function stopAutoYesPolling(compositeKey) {
477
507
  clearTimeout(pollerState.timerId);
478
508
  }
479
509
  autoYesPollerStates.delete(compositeKey);
510
+ (0, auto_yes_policy_1.invalidateSessionAutoYesPolicy)(compositeKey);
480
511
  logger.info('poller:stopped', { compositeKey });
481
512
  }
482
513
  /**
@@ -487,6 +518,7 @@ function stopAllAutoYesPolling() {
487
518
  if (pollerState.timerId) {
488
519
  clearTimeout(pollerState.timerId);
489
520
  }
521
+ (0, auto_yes_policy_1.invalidateSessionAutoYesPolicy)(key);
490
522
  logger.info('poller:stopped', { compositeKey: key, reason: 'shutdown' });
491
523
  }
492
524
  autoYesPollerStates.clear();
@@ -11,7 +11,7 @@
11
11
  * auto-yes-poller.ts -> auto-yes-state.ts -> path-validator.ts
12
12
  */
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.THINKING_CHECK_LINE_COUNT = exports.MAX_CONCURRENT_POLLERS = exports.MAX_CONSECUTIVE_ERRORS = exports.MAX_BACKOFF_MS = exports.DUPLICATE_RETRY_EXPIRY_MS = exports.COOLDOWN_INTERVAL_MS = exports.POLLING_INTERVAL_MS = exports.COMPOSITE_KEY_SEPARATOR = void 0;
14
+ exports.THINKING_CHECK_LINE_COUNT = exports.MAX_CONCURRENT_POLLERS = exports.MAX_CONSECUTIVE_ERRORS = exports.MAX_BACKOFF_MS = exports.DUPLICATE_RETRY_EXPIRY_MS = exports.COOLDOWN_INTERVAL_MS = exports.POLLING_INTERVAL_MS = exports.executeRegexWithTimeout = exports.COMPOSITE_KEY_SEPARATOR = void 0;
15
15
  exports.buildCompositeKey = buildCompositeKey;
16
16
  exports.extractWorktreeId = extractWorktreeId;
17
17
  exports.extractCliToolId = extractCliToolId;
@@ -21,7 +21,6 @@ exports.getAutoYesState = getAutoYesState;
21
21
  exports.setAutoYesEnabled = setAutoYesEnabled;
22
22
  exports.disableAutoYes = disableAutoYes;
23
23
  exports.clearAllAutoYesStates = clearAllAutoYesStates;
24
- exports.executeRegexWithTimeout = executeRegexWithTimeout;
25
24
  exports.checkStopCondition = checkStopCondition;
26
25
  exports.deleteAutoYesState = deleteAutoYesState;
27
26
  exports.getAutoYesStateCompositeKeys = getAutoYesStateCompositeKeys;
@@ -230,23 +229,11 @@ function clearAllAutoYesStates() {
230
229
  // Stop Condition (Issue #314)
231
230
  // =============================================================================
232
231
  /**
233
- * Execute a regex test with timeout protection.
234
- * Uses synchronous execution with safe-regex2 pre-validation as the primary defense.
235
- *
236
- * @internal Exported for testing purposes only.
237
- * @param regex - Pre-compiled RegExp to test
238
- * @param text - Text to test against
239
- * @param _timeoutMs - Reserved for future timeout implementation (default: 100ms)
240
- * @returns true/false for match result, null if execution failed
232
+ * Re-exported from the shared auto-yes config (Issue #1547 moved it there so the
233
+ * client-safe auto-yes resolver can share the same guarded execution path).
241
234
  */
242
- function executeRegexWithTimeout(regex, text, _timeoutMs = 100) {
243
- try {
244
- return regex.test(text);
245
- }
246
- catch {
247
- return null;
248
- }
249
- }
235
+ var auto_yes_config_2 = require("../config/auto-yes-config");
236
+ Object.defineProperty(exports, "executeRegexWithTimeout", { enumerable: true, get: function () { return auto_yes_config_2.executeRegexWithTimeout; } });
250
237
  /**
251
238
  * Check if the terminal output matches the stop condition pattern.
252
239
  * If matched, disables auto-yes for the worktree/agent.
@@ -279,7 +266,7 @@ function checkStopCondition(compositeKey, cleanOutput, onStopMatched) {
279
266
  }
280
267
  try {
281
268
  const regex = new RegExp(autoYesState.stopPattern);
282
- const matched = executeRegexWithTimeout(regex, cleanOutput);
269
+ const matched = (0, auto_yes_config_1.executeRegexWithTimeout)(regex, cleanOutput);
283
270
  if (matched === null) {
284
271
  // Execution failed - disable to prevent future errors
285
272
  logger.warn('stop-condition-check', { detail: String({ compositeKey }) });
@@ -12,7 +12,7 @@
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  exports.removeAgentInstance = exports.addAgentInstance = exports.setAgentInstances = exports.countAgentInstances = exports.getAgentInstance = exports.getAgentInstances = exports.deleteSessionState = exports.clearInProgressMessageId = exports.setInProgressMessageId = exports.updateSessionState = exports.getSessionState = exports.getMessagesByDateRange = exports.ACTIVE_FILTER = exports.markPendingPromptsAsAnswered = exports.updatePromptData = exports.getMessageById = exports.recomputeLastUserMessage = exports.clearLastUserMessage = exports.updateLastUserMessage = exports.deleteMessagesByInstance = exports.deleteMessagesByCliTool = exports.deleteMessageById = exports.deleteAllMessages = exports.getLastMessage = exports.getLastUserMessage = exports.getMessages = exports.updateMessageContent = exports.createMessage = exports.getLastAssistantMessageAt = exports.deleteWorktreesByIds = exports.deleteRepositoryWorktrees = exports.migrateWorktreeIdPreservingChildren = exports.getWorktreesByRepository = exports.getWorktreeIdsByRepository = exports.getInitialBranch = exports.saveInitialBranch = exports.updateVibeLocalContextWindow = exports.updateVibeLocalModel = exports.updateSelectedAgents = exports.updateCliToolId = exports.updateStatus = exports.updateFavorite = exports.updateLastViewedAt = exports.updateWorktreeLink = exports.updateWorktreeDescription = exports.upsertWorktree = exports.getWorktreeById = exports.getRepositories = exports.getWorktrees = exports.initDatabase = void 0;
14
14
  exports.getAssistantExecutionById = exports.updateAssistantExecution = exports.createAssistantExecution = exports.archiveAssistantMessagesFrom = exports.archiveAllAssistantMessages = exports.getAssistantMessageById = exports.getAssistantMessages = exports.updateAssistantMessageStatus = exports.createAssistantMessage = exports.updateAssistantConversation = exports.createAssistantConversation = exports.getAssistantConversationByRepositoryAndCliTool = exports.getAssistantConversationById = exports.updateDailyReportContent = exports.saveDailyReport = exports.getDailyReport = exports.recoverStuckSendingTimers = exports.clearTimerHistory = exports.cleanupOldTimers = exports.getPendingTimerCountByWorktree = exports.cancelTimersByWorktree = exports.cancelTimer = exports.updateTimerStatus = exports.getPendingTimers = exports.getTimerById = exports.getTimersByWorktree = exports.createTimer = exports.WORKTREE_TODO_STATUSES = exports.isWorktreeTodoStatus = exports.reorderWorktreeTodos = exports.deleteWorktreeTodo = exports.updateWorktreeTodo = exports.createWorktreeTodo = exports.getWorktreeTodoById = exports.getTodosByWorktreeId = exports.deleteTodo = exports.updateTodo = exports.createTodo = exports.getTodoById = exports.getAllTodos = exports.getTodosByRepositoryId = exports.MemoDbError = exports.reorderMemos = exports.deleteMemo = exports.updateMemo = exports.createMemo = exports.getMemoById = exports.getMemosByWorktreeId = exports.InvalidAgentInstanceError = exports.AgentInstanceLimitError = void 0;
15
- exports.deletePushSubscriptionByEndpoint = exports.updatePushSubscriptionPreferences = exports.getPushSubscriptionsForKind = exports.getAllPushSubscriptions = exports.getPushSubscriptionByEndpoint = exports.upsertPushSubscription = exports.deleteAssistantSessionState = exports.updateAssistantSessionState = exports.getAssistantSessionState = exports.listRunningAssistantExecutions = exports.getRunningAssistantExecutionByConversation = exports.getLatestAssistantExecutionByConversation = void 0;
15
+ exports.listTaskEvents = exports.ACTIVE_TASK_STATUSES = exports.TERMINAL_TASK_STATUSES = exports.TASK_STATUSES = exports.isTerminalTaskStatus = exports.getActiveTaskForInstance = exports.getActiveTask = exports.listTasks = exports.getTask = exports.createTask = exports.VERIFICATION_TRIGGERS = exports.MAX_RUN_HISTORY_DAYS = exports.MAX_RUN_HISTORY_LIMIT = exports.DEFAULT_RUN_HISTORY_LIMIT = exports.listVerificationRunsForPeriod = exports.listRunningVerificationRuns = exports.getRunningVerificationRun = exports.listVerificationRuns = exports.getVerificationRun = exports.finishGateResult = exports.createGateResult = exports.finishVerificationRun = exports.createVerificationRun = exports.deletePushSubscriptionByEndpoint = exports.updatePushSubscriptionPreferences = exports.getPushSubscriptionsForKind = exports.getAllPushSubscriptions = exports.getPushSubscriptionByEndpoint = exports.upsertPushSubscription = exports.deleteAssistantSessionState = exports.updateAssistantSessionState = exports.getAssistantSessionState = exports.listRunningAssistantExecutions = exports.getRunningAssistantExecutionByConversation = exports.getLatestAssistantExecutionByConversation = void 0;
16
16
  // init-db
17
17
  var init_db_1 = require("./init-db");
18
18
  Object.defineProperty(exports, "initDatabase", { enumerable: true, get: function () { return init_db_1.initDatabase; } });
@@ -150,3 +150,36 @@ Object.defineProperty(exports, "getAllPushSubscriptions", { enumerable: true, ge
150
150
  Object.defineProperty(exports, "getPushSubscriptionsForKind", { enumerable: true, get: function () { return push_subscriptions_db_1.getPushSubscriptionsForKind; } });
151
151
  Object.defineProperty(exports, "updatePushSubscriptionPreferences", { enumerable: true, get: function () { return push_subscriptions_db_1.updatePushSubscriptionPreferences; } });
152
152
  Object.defineProperty(exports, "deletePushSubscriptionByEndpoint", { enumerable: true, get: function () { return push_subscriptions_db_1.deletePushSubscriptionByEndpoint; } });
153
+ // verification-db (verification gate runs, Issue #1542)
154
+ var verification_db_1 = require("./verification-db");
155
+ Object.defineProperty(exports, "createVerificationRun", { enumerable: true, get: function () { return verification_db_1.createVerificationRun; } });
156
+ Object.defineProperty(exports, "finishVerificationRun", { enumerable: true, get: function () { return verification_db_1.finishVerificationRun; } });
157
+ Object.defineProperty(exports, "createGateResult", { enumerable: true, get: function () { return verification_db_1.createGateResult; } });
158
+ Object.defineProperty(exports, "finishGateResult", { enumerable: true, get: function () { return verification_db_1.finishGateResult; } });
159
+ Object.defineProperty(exports, "getVerificationRun", { enumerable: true, get: function () { return verification_db_1.getVerificationRun; } });
160
+ Object.defineProperty(exports, "listVerificationRuns", { enumerable: true, get: function () { return verification_db_1.listVerificationRuns; } });
161
+ Object.defineProperty(exports, "getRunningVerificationRun", { enumerable: true, get: function () { return verification_db_1.getRunningVerificationRun; } });
162
+ Object.defineProperty(exports, "listRunningVerificationRuns", { enumerable: true, get: function () { return verification_db_1.listRunningVerificationRuns; } });
163
+ Object.defineProperty(exports, "listVerificationRunsForPeriod", { enumerable: true, get: function () { return verification_db_1.listVerificationRunsForPeriod; } });
164
+ Object.defineProperty(exports, "DEFAULT_RUN_HISTORY_LIMIT", { enumerable: true, get: function () { return verification_db_1.DEFAULT_RUN_HISTORY_LIMIT; } });
165
+ Object.defineProperty(exports, "MAX_RUN_HISTORY_LIMIT", { enumerable: true, get: function () { return verification_db_1.MAX_RUN_HISTORY_LIMIT; } });
166
+ Object.defineProperty(exports, "MAX_RUN_HISTORY_DAYS", { enumerable: true, get: function () { return verification_db_1.MAX_RUN_HISTORY_DAYS; } });
167
+ Object.defineProperty(exports, "VERIFICATION_TRIGGERS", { enumerable: true, get: function () { return verification_db_1.VERIFICATION_TRIGGERS; } });
168
+ // tasks-db (execution contracts, Issue #1545)
169
+ var tasks_db_1 = require("./tasks-db");
170
+ Object.defineProperty(exports, "createTask", { enumerable: true, get: function () { return tasks_db_1.createTask; } });
171
+ Object.defineProperty(exports, "getTask", { enumerable: true, get: function () { return tasks_db_1.getTask; } });
172
+ Object.defineProperty(exports, "listTasks", { enumerable: true, get: function () { return tasks_db_1.listTasks; } });
173
+ Object.defineProperty(exports, "getActiveTask", { enumerable: true, get: function () { return tasks_db_1.getActiveTask; } });
174
+ Object.defineProperty(exports, "getActiveTaskForInstance", { enumerable: true, get: function () { return tasks_db_1.getActiveTaskForInstance; } });
175
+ Object.defineProperty(exports, "isTerminalTaskStatus", { enumerable: true, get: function () { return tasks_db_1.isTerminalTaskStatus; } });
176
+ Object.defineProperty(exports, "TASK_STATUSES", { enumerable: true, get: function () { return tasks_db_1.TASK_STATUSES; } });
177
+ Object.defineProperty(exports, "TERMINAL_TASK_STATUSES", { enumerable: true, get: function () { return tasks_db_1.TERMINAL_TASK_STATUSES; } });
178
+ Object.defineProperty(exports, "ACTIVE_TASK_STATUSES", { enumerable: true, get: function () { return tasks_db_1.ACTIVE_TASK_STATUSES; } });
179
+ // task-events-db (task state machine log, Issue #1548).
180
+ // `updateTaskStatus` and `insertTaskEvent` are intentionally absent from this
181
+ // barrel: `applyTaskEvent` (@/lib/tasks/task-transition-service) is the only
182
+ // writer of either, and reaching around it would put a status in the table with
183
+ // no event explaining it.
184
+ var task_events_db_1 = require("./task-events-db");
185
+ Object.defineProperty(exports, "listTaskEvents", { enumerable: true, get: function () { return task_events_db_1.listTaskEvents; } });
@@ -32,6 +32,9 @@ const v45_skill_installations_1 = require("./v45-skill-installations");
32
32
  const v46_skill_installations_cascade_1 = require("./v46-skill-installations-cascade");
33
33
  const v47_skill_installations_roots_1 = require("./v47-skill-installations-roots");
34
34
  const v48_skill_operations_audit_index_1 = require("./v48-skill-operations-audit-index");
35
+ const v49_verification_runs_1 = require("./v49-verification-runs");
36
+ const v50_tasks_1 = require("./v50-tasks");
37
+ const v51_task_events_1 = require("./v51-task-events");
35
38
  /**
36
39
  * Complete ordered list of all migrations.
37
40
  * Used internally by the barrel file (db-migrations.ts); NOT exported from the barrel (DR2-004).
@@ -67,4 +70,7 @@ exports.migrations = [
67
70
  ...v46_skill_installations_cascade_1.v46_migrations,
68
71
  ...v47_skill_installations_roots_1.v47_migrations,
69
72
  ...v48_skill_operations_audit_index_1.v48_migrations,
73
+ ...v49_verification_runs_1.v49_migrations,
74
+ ...v50_tasks_1.v50_migrations,
75
+ ...v51_task_events_1.v51_migrations,
70
76
  ];
@@ -17,7 +17,7 @@ const path_1 = __importDefault(require("path"));
17
17
  * Current schema version
18
18
  * Increment this when adding new migrations
19
19
  */
20
- exports.CURRENT_SCHEMA_VERSION = 48;
20
+ exports.CURRENT_SCHEMA_VERSION = 51;
21
21
  /**
22
22
  * Get current schema version from database
23
23
  */
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ /**
3
+ * Migration v49: verification_runs / verification_gate_results (Issue #1542).
4
+ *
5
+ * The first place an *interactive* agent's work gets a recorded verdict.
6
+ * `execution_logs` already stores status + exit_code + result, but only for
7
+ * scheduled executions; interactive sessions leave nothing behind but
8
+ * `chat_messages`, so "the agent finished" has never been distinguishable from
9
+ * "the agent produced something that passes".
10
+ *
11
+ * One run per verification attempt, one gate result per command inside it.
12
+ * Gate results cascade with their run: a run is the only thing that gives a
13
+ * gate result meaning, so an orphan row is not a record, it is noise.
14
+ *
15
+ * Both status vocabularies are CHECK-constrained rather than validated in the
16
+ * writer alone. The distinctions they encode are the point of the table and a
17
+ * typo that lands as a new status value would silently create a bucket nothing
18
+ * queries:
19
+ * run.not_started — the work-evidence gate failed (no commits, no diff);
20
+ * distinct from `failed`, which means the work was judged.
21
+ * run.error — the runner broke before any gate ran (bad config, spawn
22
+ * failure); no verdict was reached about the work at all.
23
+ * gate.skipped — deliberately not run (e.g. skipInPrimaryCheckout); the
24
+ * reason belongs in log_tail so a skip is never mistaken
25
+ * for a pass.
26
+ *
27
+ * `task_id` is a free column, not a foreign key: the `tasks` table arrives in
28
+ * Phase 2 (#1545). Declaring a REFERENCES clause against a table that does not
29
+ * exist yet would make every insert fail once foreign_keys is ON.
30
+ *
31
+ * Timestamps are epoch milliseconds (INTEGER), matching v44 onward.
32
+ */
33
+ Object.defineProperty(exports, "__esModule", { value: true });
34
+ exports.v49_migrations = void 0;
35
+ exports.v49_migrations = [
36
+ {
37
+ version: 49,
38
+ name: 'add-verification-runs',
39
+ up: (db) => {
40
+ db.exec(`
41
+ CREATE TABLE IF NOT EXISTS verification_runs (
42
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
43
+ worktree_id TEXT NOT NULL,
44
+ instance_id TEXT,
45
+ task_id TEXT,
46
+ trigger TEXT NOT NULL CHECK (trigger IN ('manual','wait','api','task')),
47
+ status TEXT NOT NULL CHECK (status IN ('running','passed','failed','not_started','error','cancelled')),
48
+ base_ref TEXT,
49
+ started_at INTEGER NOT NULL,
50
+ finished_at INTEGER
51
+ );
52
+ `);
53
+ db.exec(`
54
+ CREATE TABLE IF NOT EXISTS verification_gate_results (
55
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
56
+ run_id INTEGER NOT NULL REFERENCES verification_runs(id) ON DELETE CASCADE,
57
+ gate_id TEXT NOT NULL,
58
+ command TEXT NOT NULL,
59
+ status TEXT NOT NULL CHECK (status IN ('running','passed','failed','timeout','skipped','error')),
60
+ exit_code INTEGER,
61
+ duration_ms INTEGER,
62
+ log_tail TEXT,
63
+ started_at INTEGER NOT NULL,
64
+ finished_at INTEGER
65
+ );
66
+ `);
67
+ db.exec(`
68
+ CREATE INDEX IF NOT EXISTS idx_verification_runs_worktree
69
+ ON verification_runs(worktree_id, started_at DESC);
70
+ `);
71
+ db.exec(`
72
+ CREATE INDEX IF NOT EXISTS idx_verification_gate_results_run
73
+ ON verification_gate_results(run_id);
74
+ `);
75
+ },
76
+ down: (db) => {
77
+ // Child first, mirroring the dependency direction. Under
78
+ // PRAGMA foreign_keys = ON (how db-instance.ts opens the database) the
79
+ // reverse order also works today, but only because the cascade absorbs
80
+ // the parent's implicit DELETE — that is a property of the cascade, not
81
+ // of DROP TABLE.
82
+ db.exec('DROP TABLE IF EXISTS verification_gate_results;');
83
+ db.exec('DROP TABLE IF EXISTS verification_runs;');
84
+ },
85
+ },
86
+ ];