commandmate 0.21.5 → 0.22.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 (546) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +240 -233
  3. package/.next/app-path-routes-manifest.json +29 -28
  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/server/app/_not-found/page_client-reference-manifest.js +1 -1
  8. package/.next/server/app/api/app/update/route_client-reference-manifest.js +1 -1
  9. package/.next/server/app/api/app/update-check/route.js +1 -1
  10. package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
  11. package/.next/server/app/api/assistant/conversation/route.js +1 -1
  12. package/.next/server/app/api/assistant/conversation/route.js.nft.json +1 -1
  13. package/.next/server/app/api/assistant/conversation/route_client-reference-manifest.js +1 -1
  14. package/.next/server/app/api/assistant/current-output/route.js +1 -1
  15. package/.next/server/app/api/assistant/current-output/route.js.nft.json +1 -1
  16. package/.next/server/app/api/assistant/current-output/route_client-reference-manifest.js +1 -1
  17. package/.next/server/app/api/assistant/messages/route.js +1 -1
  18. package/.next/server/app/api/assistant/messages/route.js.nft.json +1 -1
  19. package/.next/server/app/api/assistant/messages/route_client-reference-manifest.js +1 -1
  20. package/.next/server/app/api/assistant/session/route.js +1 -1
  21. package/.next/server/app/api/assistant/session/route.js.nft.json +1 -1
  22. package/.next/server/app/api/assistant/session/route_client-reference-manifest.js +1 -1
  23. package/.next/server/app/api/assistant/start/route.js +1 -1
  24. package/.next/server/app/api/assistant/start/route.js.nft.json +1 -1
  25. package/.next/server/app/api/assistant/start/route_client-reference-manifest.js +1 -1
  26. package/.next/server/app/api/assistant/terminal/route.js +1 -1
  27. package/.next/server/app/api/assistant/terminal/route.js.nft.json +1 -1
  28. package/.next/server/app/api/assistant/terminal/route_client-reference-manifest.js +1 -1
  29. package/.next/server/app/api/assistant/tools/route.js +1 -1
  30. package/.next/server/app/api/assistant/tools/route.js.nft.json +1 -1
  31. package/.next/server/app/api/assistant/tools/route_client-reference-manifest.js +1 -1
  32. package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  33. package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  34. package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  35. package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +1 -1
  36. package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
  37. package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
  38. package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
  39. package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
  40. package/.next/server/app/api/fs/browse/route.js +2 -2
  41. package/.next/server/app/api/fs/browse/route.js.nft.json +1 -1
  42. package/.next/server/app/api/fs/browse/route_client-reference-manifest.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 -1
  45. package/.next/server/app/api/hooks/agent-event/route.js.nft.json +1 -1
  46. package/.next/server/app/api/hooks/agent-event/route_client-reference-manifest.js +1 -1
  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/hooks/permission-request/route.js +1 -0
  51. package/.next/server/app/api/hooks/permission-request/route.js.nft.json +1 -0
  52. package/.next/server/app/api/hooks/permission-request/route_client-reference-manifest.js +1 -0
  53. package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -1
  54. package/.next/server/app/api/ollama/models/route_client-reference-manifest.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.js +1 -1
  57. package/.next/server/app/api/push/vapid/route.js.nft.json +1 -1
  58. package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
  59. package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
  60. package/.next/server/app/api/repositories/[id]/todos/[todoId]/route_client-reference-manifest.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.js +1 -1
  82. package/.next/server/app/api/repositories/validate-path/route.js.nft.json +1 -1
  83. package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
  84. package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
  85. package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
  86. package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
  87. package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
  88. package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
  89. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  90. package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
  91. package/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
  92. package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
  93. package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
  94. package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
  95. package/.next/server/app/api/todos/route_client-reference-manifest.js +1 -1
  96. package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -1
  97. package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -1
  98. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
  99. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js.nft.json +1 -1
  100. package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
  101. package/.next/server/app/api/worktrees/[id]/capture/route.js +1 -1
  102. package/.next/server/app/api/worktrees/[id]/capture/route.js.nft.json +1 -1
  103. package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
  104. package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
  105. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js +1 -1
  106. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js.nft.json +1 -1
  107. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
  108. package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
  109. package/.next/server/app/api/worktrees/[id]/current-output/route.js.nft.json +1 -1
  110. package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
  111. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
  112. package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
  113. package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
  114. package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
  115. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
  116. package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
  117. package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
  118. package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
  119. package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
  120. package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
  121. package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
  122. package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
  123. package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
  124. package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
  125. package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
  126. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
  127. package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
  128. package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
  129. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
  130. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
  131. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
  132. package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
  133. package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
  134. package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
  135. package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
  136. package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
  137. package/.next/server/app/api/worktrees/[id]/interrupt/route.js +1 -1
  138. package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
  139. package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
  140. package/.next/server/app/api/worktrees/[id]/kill-session/route.js +1 -1
  141. package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -1
  142. package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
  143. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
  144. package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
  145. package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
  146. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
  147. package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
  148. package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
  149. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
  150. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -1
  151. package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
  152. package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -1
  153. package/.next/server/app/api/worktrees/[id]/respond/route.js.nft.json +1 -1
  154. package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
  155. package/.next/server/app/api/worktrees/[id]/route.js +1 -1
  156. package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
  157. package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
  158. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
  159. package/.next/server/app/api/worktrees/[id]/schedules/active/route.js +1 -1
  160. package/.next/server/app/api/worktrees/[id]/schedules/active/route.js.nft.json +1 -1
  161. package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
  162. package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
  163. package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
  164. package/.next/server/app/api/worktrees/[id]/send/route.js +1 -1
  165. package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
  166. package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
  167. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +1 -1
  168. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -1
  169. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
  170. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
  171. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
  172. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
  173. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
  174. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route_client-reference-manifest.js +1 -1
  175. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route_client-reference-manifest.js +1 -1
  176. package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
  177. package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
  178. package/.next/server/app/api/worktrees/[id]/special-keys/route.js +1 -1
  179. package/.next/server/app/api/worktrees/[id]/special-keys/route.js.nft.json +1 -1
  180. package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
  181. package/.next/server/app/api/worktrees/[id]/start-polling/route.js +1 -1
  182. package/.next/server/app/api/worktrees/[id]/start-polling/route.js.nft.json +1 -1
  183. package/.next/server/app/api/worktrees/[id]/start-polling/route_client-reference-manifest.js +1 -1
  184. package/.next/server/app/api/worktrees/[id]/tasks/route.js +2 -6
  185. package/.next/server/app/api/worktrees/[id]/tasks/route.js.nft.json +1 -1
  186. package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -1
  187. package/.next/server/app/api/worktrees/[id]/terminal/route.js +1 -1
  188. package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
  189. package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
  190. package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
  191. package/.next/server/app/api/worktrees/[id]/timers/route.js +1 -1
  192. package/.next/server/app/api/worktrees/[id]/timers/route.js.nft.json +1 -1
  193. package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
  194. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  195. package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
  196. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
  197. package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
  198. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
  199. package/.next/server/app/api/worktrees/[id]/verify/route.js +1 -1
  200. package/.next/server/app/api/worktrees/[id]/verify/route.js.nft.json +1 -1
  201. package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -1
  202. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -1
  203. package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -1
  204. package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
  205. package/.next/server/app/api/worktrees/route.js +1 -1
  206. package/.next/server/app/api/worktrees/route.js.nft.json +1 -1
  207. package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
  208. package/.next/server/app/chat/page_client-reference-manifest.js +1 -1
  209. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  210. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  211. package/.next/server/app/more/page_client-reference-manifest.js +1 -1
  212. package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  213. package/.next/server/app/page_client-reference-manifest.js +1 -1
  214. package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
  215. package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
  216. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  217. package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  218. package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
  219. package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
  220. package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  221. package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
  222. package/.next/server/app/worktrees/[id]/page.js +9 -9
  223. package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
  224. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
  225. package/.next/server/app-paths-manifest.json +29 -28
  226. package/.next/server/chunks/1068.js +1 -1
  227. package/.next/server/chunks/1356.js +4 -0
  228. package/.next/server/chunks/1841.js +1 -0
  229. package/.next/server/chunks/2404.js +1 -1
  230. package/.next/server/chunks/2816.js +1 -1
  231. package/.next/server/chunks/3022.js +1 -0
  232. package/.next/server/chunks/3736.js +1 -1
  233. package/.next/server/chunks/5959.js +5 -4
  234. package/.next/server/chunks/6130.js +1 -1
  235. package/.next/server/chunks/6274.js +8 -12
  236. package/.next/server/chunks/6919.js +1 -0
  237. package/.next/server/chunks/7685.js +1 -1
  238. package/.next/server/chunks/8856.js +1 -1
  239. package/.next/server/chunks/9067.js +1 -1
  240. package/.next/server/chunks/9373.js +8 -0
  241. package/.next/server/chunks/9687.js +2 -2
  242. package/.next/server/middleware-manifest.json +5 -5
  243. package/.next/server/pages/500.html +1 -1
  244. package/.next/server/server-reference-manifest.json +1 -1
  245. package/.next/server/src/middleware.js.map +1 -1
  246. package/.next/static/b69eWhjC1rRrFTa-g3lMS/_buildManifest.js +1 -0
  247. package/.next/static/chunks/{6488-572dbfd9986e8a92.js → 6488-2ad4f67779f8d00a.js} +1 -1
  248. package/.next/static/chunks/app/api/app/update/route-973ec48531555712.js +1 -0
  249. package/.next/static/chunks/app/api/app/update-check/route-973ec48531555712.js +1 -0
  250. package/.next/static/chunks/app/api/assistant/conversation/route-973ec48531555712.js +1 -0
  251. package/.next/static/chunks/app/api/assistant/current-output/route-973ec48531555712.js +1 -0
  252. package/.next/static/chunks/app/api/assistant/messages/route-973ec48531555712.js +1 -0
  253. package/.next/static/chunks/app/api/assistant/session/route-973ec48531555712.js +1 -0
  254. package/.next/static/chunks/app/api/assistant/start/route-973ec48531555712.js +1 -0
  255. package/.next/static/chunks/app/api/assistant/terminal/route-973ec48531555712.js +1 -0
  256. package/.next/static/chunks/app/api/assistant/tools/route-973ec48531555712.js +1 -0
  257. package/.next/static/chunks/app/api/auth/login/route-973ec48531555712.js +1 -0
  258. package/.next/static/chunks/app/api/auth/logout/route-973ec48531555712.js +1 -0
  259. package/.next/static/chunks/app/api/auth/status/route-973ec48531555712.js +1 -0
  260. package/.next/static/chunks/app/api/daily-summary/route-973ec48531555712.js +1 -0
  261. package/.next/static/chunks/app/api/daily-summary/status/route-973ec48531555712.js +1 -0
  262. package/.next/static/chunks/app/api/external-apps/[id]/health/route-973ec48531555712.js +1 -0
  263. package/.next/static/chunks/app/api/external-apps/[id]/route-973ec48531555712.js +1 -0
  264. package/.next/static/chunks/app/api/external-apps/route-973ec48531555712.js +1 -0
  265. package/.next/static/chunks/app/api/fs/browse/route-973ec48531555712.js +1 -0
  266. package/.next/static/chunks/app/api/fs/recent-paths/route-973ec48531555712.js +1 -0
  267. package/.next/static/chunks/app/api/hooks/agent-event/route-973ec48531555712.js +1 -0
  268. package/.next/static/chunks/app/api/hooks/claude-done/route-973ec48531555712.js +1 -0
  269. package/.next/static/chunks/app/api/hooks/permission-request/route-973ec48531555712.js +1 -0
  270. package/.next/static/chunks/app/api/metrics/vibe/route-973ec48531555712.js +1 -0
  271. package/.next/static/chunks/app/api/ollama/models/route-973ec48531555712.js +1 -0
  272. package/.next/static/chunks/app/api/push/subscriptions/route-973ec48531555712.js +1 -0
  273. package/.next/static/chunks/app/api/push/vapid/route-973ec48531555712.js +1 -0
  274. package/.next/static/chunks/app/api/repositories/[id]/route-973ec48531555712.js +1 -0
  275. package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-973ec48531555712.js +1 -0
  276. package/.next/static/chunks/app/api/repositories/[id]/todos/route-973ec48531555712.js +1 -0
  277. package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-973ec48531555712.js +1 -0
  278. package/.next/static/chunks/app/api/repositories/clone/route-973ec48531555712.js +1 -0
  279. package/.next/static/chunks/app/api/repositories/excluded/route-973ec48531555712.js +1 -0
  280. package/.next/static/chunks/app/api/repositories/restore/route-973ec48531555712.js +1 -0
  281. package/.next/static/chunks/app/api/repositories/route-973ec48531555712.js +1 -0
  282. package/.next/static/chunks/app/api/repositories/scan/route-973ec48531555712.js +1 -0
  283. package/.next/static/chunks/app/api/repositories/sync/route-973ec48531555712.js +1 -0
  284. package/.next/static/chunks/app/api/repositories/validate-path/route-973ec48531555712.js +1 -0
  285. package/.next/static/chunks/app/api/sidebar/group-order/route-973ec48531555712.js +1 -0
  286. package/.next/static/chunks/app/api/skills/[id]/route-973ec48531555712.js +1 -0
  287. package/.next/static/chunks/app/api/skills/installations/route-973ec48531555712.js +1 -0
  288. package/.next/static/chunks/app/api/skills/operations/route-973ec48531555712.js +1 -0
  289. package/.next/static/chunks/app/api/skills/reindex/route-973ec48531555712.js +1 -0
  290. package/.next/static/chunks/app/api/skills/route-973ec48531555712.js +1 -0
  291. package/.next/static/chunks/app/api/slash-commands/route-973ec48531555712.js +1 -0
  292. package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-973ec48531555712.js +1 -0
  293. package/.next/static/chunks/app/api/tasks/[taskId]/route-973ec48531555712.js +1 -0
  294. package/.next/static/chunks/app/api/templates/[id]/route-973ec48531555712.js +1 -0
  295. package/.next/static/chunks/app/api/templates/route-973ec48531555712.js +1 -0
  296. package/.next/static/chunks/app/api/todos/route-973ec48531555712.js +1 -0
  297. package/.next/static/chunks/app/api/verification/runs/[runId]/route-973ec48531555712.js +1 -0
  298. package/.next/static/chunks/app/api/verification/runs/route-973ec48531555712.js +1 -0
  299. package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-973ec48531555712.js +1 -0
  300. package/.next/static/chunks/app/api/worktrees/[id]/capture/route-973ec48531555712.js +1 -0
  301. package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-973ec48531555712.js +1 -0
  302. package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-973ec48531555712.js +1 -0
  303. package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-973ec48531555712.js +1 -0
  304. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-973ec48531555712.js +1 -0
  305. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-973ec48531555712.js +1 -0
  306. package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-973ec48531555712.js +1 -0
  307. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-973ec48531555712.js +1 -0
  308. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-973ec48531555712.js +1 -0
  309. package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-973ec48531555712.js +1 -0
  310. package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-973ec48531555712.js +1 -0
  311. package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-973ec48531555712.js +1 -0
  312. package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-973ec48531555712.js +1 -0
  313. package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-973ec48531555712.js +1 -0
  314. package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-973ec48531555712.js +1 -0
  315. package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-973ec48531555712.js +1 -0
  316. package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-973ec48531555712.js +1 -0
  317. package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-973ec48531555712.js +1 -0
  318. package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-973ec48531555712.js +1 -0
  319. package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-973ec48531555712.js +1 -0
  320. package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-973ec48531555712.js +1 -0
  321. package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-973ec48531555712.js +1 -0
  322. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-973ec48531555712.js +1 -0
  323. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-973ec48531555712.js +1 -0
  324. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-973ec48531555712.js +1 -0
  325. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-973ec48531555712.js +1 -0
  326. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-973ec48531555712.js +1 -0
  327. package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-973ec48531555712.js +1 -0
  328. package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-973ec48531555712.js +1 -0
  329. package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-973ec48531555712.js +1 -0
  330. package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-973ec48531555712.js +1 -0
  331. package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-973ec48531555712.js +1 -0
  332. package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-973ec48531555712.js +1 -0
  333. package/.next/static/chunks/app/api/worktrees/[id]/logs/route-973ec48531555712.js +1 -0
  334. package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-973ec48531555712.js +1 -0
  335. package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-973ec48531555712.js +1 -0
  336. package/.next/static/chunks/app/api/worktrees/[id]/memos/route-973ec48531555712.js +1 -0
  337. package/.next/static/chunks/app/api/worktrees/[id]/messages/route-973ec48531555712.js +1 -0
  338. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-973ec48531555712.js +1 -0
  339. package/.next/static/chunks/app/api/worktrees/[id]/respond/route-973ec48531555712.js +1 -0
  340. package/.next/static/chunks/app/api/worktrees/[id]/route-973ec48531555712.js +1 -0
  341. package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-973ec48531555712.js +1 -0
  342. package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-973ec48531555712.js +1 -0
  343. package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-973ec48531555712.js +1 -0
  344. package/.next/static/chunks/app/api/worktrees/[id]/search/route-973ec48531555712.js +1 -0
  345. package/.next/static/chunks/app/api/worktrees/[id]/send/route-973ec48531555712.js +1 -0
  346. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-973ec48531555712.js +1 -0
  347. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-973ec48531555712.js +1 -0
  348. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-973ec48531555712.js +1 -0
  349. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-973ec48531555712.js +1 -0
  350. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-973ec48531555712.js +1 -0
  351. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-973ec48531555712.js +1 -0
  352. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-973ec48531555712.js +1 -0
  353. package/.next/static/chunks/app/api/worktrees/[id]/skills/route-973ec48531555712.js +1 -0
  354. package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-973ec48531555712.js +1 -0
  355. package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-973ec48531555712.js +1 -0
  356. package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-973ec48531555712.js +1 -0
  357. package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-973ec48531555712.js +1 -0
  358. package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-973ec48531555712.js +1 -0
  359. package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-973ec48531555712.js +1 -0
  360. package/.next/static/chunks/app/api/worktrees/[id]/timers/route-973ec48531555712.js +1 -0
  361. package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-973ec48531555712.js +1 -0
  362. package/.next/static/chunks/app/api/worktrees/[id]/todos/route-973ec48531555712.js +1 -0
  363. package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-973ec48531555712.js +1 -0
  364. package/.next/static/chunks/app/api/worktrees/[id]/tree/route-973ec48531555712.js +1 -0
  365. package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-973ec48531555712.js +1 -0
  366. package/.next/static/chunks/app/api/worktrees/[id]/verify/route-973ec48531555712.js +1 -0
  367. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-973ec48531555712.js +1 -0
  368. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-973ec48531555712.js +1 -0
  369. package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-973ec48531555712.js +1 -0
  370. package/.next/static/chunks/app/api/worktrees/route-973ec48531555712.js +1 -0
  371. package/.next/static/chunks/app/manifest.webmanifest/route-973ec48531555712.js +1 -0
  372. package/.next/static/chunks/app/proxy/[...path]/route-973ec48531555712.js +1 -0
  373. package/.next/static/chunks/app/worktrees/[id]/layout-973ec48531555712.js +1 -0
  374. package/.next/static/chunks/app/worktrees/[id]/page-70704fe257e0cccc.js +1 -0
  375. package/.next/trace +12 -12
  376. package/.next/types/app/api/hooks/permission-request/route.ts +347 -0
  377. package/.next/types/routes.d.ts +2 -1
  378. package/.next/types/validator.ts +9 -0
  379. package/dist/cli/commands/capture.d.ts.map +1 -1
  380. package/dist/cli/commands/capture.js +27 -1
  381. package/dist/cli/commands/respond.d.ts.map +1 -1
  382. package/dist/cli/commands/respond.js +9 -3
  383. package/dist/cli/commands/send.d.ts.map +1 -1
  384. package/dist/cli/commands/send.js +35 -0
  385. package/dist/cli/commands/wait.d.ts +4 -1
  386. package/dist/cli/commands/wait.d.ts.map +1 -1
  387. package/dist/cli/commands/wait.js +109 -2
  388. package/dist/cli/docs/agent-operations.d.ts +1 -1
  389. package/dist/cli/docs/agent-operations.d.ts.map +1 -1
  390. package/dist/cli/docs/agent-operations.js +39 -0
  391. package/dist/cli/types/api-responses.d.ts +69 -4
  392. package/dist/cli/types/api-responses.d.ts.map +1 -1
  393. package/dist/cli/types/index.d.ts +6 -0
  394. package/dist/cli/types/index.d.ts.map +1 -1
  395. package/dist/server/src/lib/detection/prompt-detect-multiple-choice.js +105 -1
  396. package/dist/server/src/lib/detection/unclassified-frame-tracker.js +96 -0
  397. package/dist/server/src/lib/env.js +27 -1
  398. package/dist/server/src/lib/hooks/agent-event-types.js +131 -0
  399. package/dist/server/src/lib/hooks/ask-user-question-payload.js +156 -0
  400. package/dist/server/src/lib/hooks/hook-settings-generator.js +411 -0
  401. package/dist/server/src/lib/hooks/permission-request-payload.js +144 -0
  402. package/dist/server/src/lib/polling/auto-yes-resolver.js +25 -10
  403. package/dist/server/src/lib/polling/auto-yes-suppression-state.js +2 -1
  404. package/dist/server/src/lib/session/agent-event-state.js +612 -11
  405. package/dist/server/src/lib/session/ask-user-question-prompt.js +295 -0
  406. package/dist/server/src/lib/session/claude-session.js +41 -2
  407. package/dist/server/src/lib/session/current-output-builder.js +375 -8
  408. package/dist/server/src/lib/session/prompt-waiting-composition.js +178 -0
  409. package/dist/server/src/lib/session/prompt-waiting-guard.js +147 -0
  410. package/dist/server/src/lib/session/send-user-message.js +35 -0
  411. package/dist/server/src/lib/session/status-mapping.js +121 -0
  412. package/dist/server/src/lib/session/structured-prompt.js +109 -0
  413. package/dist/server/src/types/models.js +30 -0
  414. package/package.json +3 -2
  415. package/scripts/hooks/cmate-agent-event.sh +44 -3
  416. package/.next/server/chunks/1355.js +0 -1
  417. package/.next/server/chunks/1598.js +0 -4
  418. package/.next/server/chunks/2366.js +0 -1
  419. package/.next/static/-A6IRK1c_KvFlxiDrsyVc/_buildManifest.js +0 -1
  420. package/.next/static/chunks/app/api/app/update/route-be21650964d61b1d.js +0 -1
  421. package/.next/static/chunks/app/api/app/update-check/route-be21650964d61b1d.js +0 -1
  422. package/.next/static/chunks/app/api/assistant/conversation/route-be21650964d61b1d.js +0 -1
  423. package/.next/static/chunks/app/api/assistant/current-output/route-be21650964d61b1d.js +0 -1
  424. package/.next/static/chunks/app/api/assistant/messages/route-be21650964d61b1d.js +0 -1
  425. package/.next/static/chunks/app/api/assistant/session/route-be21650964d61b1d.js +0 -1
  426. package/.next/static/chunks/app/api/assistant/start/route-be21650964d61b1d.js +0 -1
  427. package/.next/static/chunks/app/api/assistant/terminal/route-be21650964d61b1d.js +0 -1
  428. package/.next/static/chunks/app/api/assistant/tools/route-be21650964d61b1d.js +0 -1
  429. package/.next/static/chunks/app/api/auth/login/route-be21650964d61b1d.js +0 -1
  430. package/.next/static/chunks/app/api/auth/logout/route-be21650964d61b1d.js +0 -1
  431. package/.next/static/chunks/app/api/auth/status/route-be21650964d61b1d.js +0 -1
  432. package/.next/static/chunks/app/api/daily-summary/route-be21650964d61b1d.js +0 -1
  433. package/.next/static/chunks/app/api/daily-summary/status/route-be21650964d61b1d.js +0 -1
  434. package/.next/static/chunks/app/api/external-apps/[id]/health/route-be21650964d61b1d.js +0 -1
  435. package/.next/static/chunks/app/api/external-apps/[id]/route-be21650964d61b1d.js +0 -1
  436. package/.next/static/chunks/app/api/external-apps/route-be21650964d61b1d.js +0 -1
  437. package/.next/static/chunks/app/api/fs/browse/route-be21650964d61b1d.js +0 -1
  438. package/.next/static/chunks/app/api/fs/recent-paths/route-be21650964d61b1d.js +0 -1
  439. package/.next/static/chunks/app/api/hooks/agent-event/route-be21650964d61b1d.js +0 -1
  440. package/.next/static/chunks/app/api/hooks/claude-done/route-be21650964d61b1d.js +0 -1
  441. package/.next/static/chunks/app/api/metrics/vibe/route-be21650964d61b1d.js +0 -1
  442. package/.next/static/chunks/app/api/ollama/models/route-be21650964d61b1d.js +0 -1
  443. package/.next/static/chunks/app/api/push/subscriptions/route-be21650964d61b1d.js +0 -1
  444. package/.next/static/chunks/app/api/push/vapid/route-be21650964d61b1d.js +0 -1
  445. package/.next/static/chunks/app/api/repositories/[id]/route-be21650964d61b1d.js +0 -1
  446. package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-be21650964d61b1d.js +0 -1
  447. package/.next/static/chunks/app/api/repositories/[id]/todos/route-be21650964d61b1d.js +0 -1
  448. package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-be21650964d61b1d.js +0 -1
  449. package/.next/static/chunks/app/api/repositories/clone/route-be21650964d61b1d.js +0 -1
  450. package/.next/static/chunks/app/api/repositories/excluded/route-be21650964d61b1d.js +0 -1
  451. package/.next/static/chunks/app/api/repositories/restore/route-be21650964d61b1d.js +0 -1
  452. package/.next/static/chunks/app/api/repositories/route-be21650964d61b1d.js +0 -1
  453. package/.next/static/chunks/app/api/repositories/scan/route-be21650964d61b1d.js +0 -1
  454. package/.next/static/chunks/app/api/repositories/sync/route-be21650964d61b1d.js +0 -1
  455. package/.next/static/chunks/app/api/repositories/validate-path/route-be21650964d61b1d.js +0 -1
  456. package/.next/static/chunks/app/api/sidebar/group-order/route-be21650964d61b1d.js +0 -1
  457. package/.next/static/chunks/app/api/skills/[id]/route-be21650964d61b1d.js +0 -1
  458. package/.next/static/chunks/app/api/skills/installations/route-be21650964d61b1d.js +0 -1
  459. package/.next/static/chunks/app/api/skills/operations/route-be21650964d61b1d.js +0 -1
  460. package/.next/static/chunks/app/api/skills/reindex/route-be21650964d61b1d.js +0 -1
  461. package/.next/static/chunks/app/api/skills/route-be21650964d61b1d.js +0 -1
  462. package/.next/static/chunks/app/api/slash-commands/route-be21650964d61b1d.js +0 -1
  463. package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-be21650964d61b1d.js +0 -1
  464. package/.next/static/chunks/app/api/tasks/[taskId]/route-be21650964d61b1d.js +0 -1
  465. package/.next/static/chunks/app/api/templates/[id]/route-be21650964d61b1d.js +0 -1
  466. package/.next/static/chunks/app/api/templates/route-be21650964d61b1d.js +0 -1
  467. package/.next/static/chunks/app/api/todos/route-be21650964d61b1d.js +0 -1
  468. package/.next/static/chunks/app/api/verification/runs/[runId]/route-be21650964d61b1d.js +0 -1
  469. package/.next/static/chunks/app/api/verification/runs/route-be21650964d61b1d.js +0 -1
  470. package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-be21650964d61b1d.js +0 -1
  471. package/.next/static/chunks/app/api/worktrees/[id]/capture/route-be21650964d61b1d.js +0 -1
  472. package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-be21650964d61b1d.js +0 -1
  473. package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-be21650964d61b1d.js +0 -1
  474. package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-be21650964d61b1d.js +0 -1
  475. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-be21650964d61b1d.js +0 -1
  476. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-be21650964d61b1d.js +0 -1
  477. package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-be21650964d61b1d.js +0 -1
  478. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-be21650964d61b1d.js +0 -1
  479. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-be21650964d61b1d.js +0 -1
  480. package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-be21650964d61b1d.js +0 -1
  481. package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-be21650964d61b1d.js +0 -1
  482. package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-be21650964d61b1d.js +0 -1
  483. package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-be21650964d61b1d.js +0 -1
  484. package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-be21650964d61b1d.js +0 -1
  485. package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-be21650964d61b1d.js +0 -1
  486. package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-be21650964d61b1d.js +0 -1
  487. package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-be21650964d61b1d.js +0 -1
  488. package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-be21650964d61b1d.js +0 -1
  489. package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-be21650964d61b1d.js +0 -1
  490. package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-be21650964d61b1d.js +0 -1
  491. package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-be21650964d61b1d.js +0 -1
  492. package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-be21650964d61b1d.js +0 -1
  493. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-be21650964d61b1d.js +0 -1
  494. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-be21650964d61b1d.js +0 -1
  495. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-be21650964d61b1d.js +0 -1
  496. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-be21650964d61b1d.js +0 -1
  497. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-be21650964d61b1d.js +0 -1
  498. package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-be21650964d61b1d.js +0 -1
  499. package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-be21650964d61b1d.js +0 -1
  500. package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-be21650964d61b1d.js +0 -1
  501. package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-be21650964d61b1d.js +0 -1
  502. package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-be21650964d61b1d.js +0 -1
  503. package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-be21650964d61b1d.js +0 -1
  504. package/.next/static/chunks/app/api/worktrees/[id]/logs/route-be21650964d61b1d.js +0 -1
  505. package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-be21650964d61b1d.js +0 -1
  506. package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-be21650964d61b1d.js +0 -1
  507. package/.next/static/chunks/app/api/worktrees/[id]/memos/route-be21650964d61b1d.js +0 -1
  508. package/.next/static/chunks/app/api/worktrees/[id]/messages/route-be21650964d61b1d.js +0 -1
  509. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-be21650964d61b1d.js +0 -1
  510. package/.next/static/chunks/app/api/worktrees/[id]/respond/route-be21650964d61b1d.js +0 -1
  511. package/.next/static/chunks/app/api/worktrees/[id]/route-be21650964d61b1d.js +0 -1
  512. package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-be21650964d61b1d.js +0 -1
  513. package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-be21650964d61b1d.js +0 -1
  514. package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-be21650964d61b1d.js +0 -1
  515. package/.next/static/chunks/app/api/worktrees/[id]/search/route-be21650964d61b1d.js +0 -1
  516. package/.next/static/chunks/app/api/worktrees/[id]/send/route-be21650964d61b1d.js +0 -1
  517. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-be21650964d61b1d.js +0 -1
  518. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-be21650964d61b1d.js +0 -1
  519. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-be21650964d61b1d.js +0 -1
  520. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-be21650964d61b1d.js +0 -1
  521. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-be21650964d61b1d.js +0 -1
  522. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-be21650964d61b1d.js +0 -1
  523. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-be21650964d61b1d.js +0 -1
  524. package/.next/static/chunks/app/api/worktrees/[id]/skills/route-be21650964d61b1d.js +0 -1
  525. package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-be21650964d61b1d.js +0 -1
  526. package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-be21650964d61b1d.js +0 -1
  527. package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-be21650964d61b1d.js +0 -1
  528. package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-be21650964d61b1d.js +0 -1
  529. package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-be21650964d61b1d.js +0 -1
  530. package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-be21650964d61b1d.js +0 -1
  531. package/.next/static/chunks/app/api/worktrees/[id]/timers/route-be21650964d61b1d.js +0 -1
  532. package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-be21650964d61b1d.js +0 -1
  533. package/.next/static/chunks/app/api/worktrees/[id]/todos/route-be21650964d61b1d.js +0 -1
  534. package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-be21650964d61b1d.js +0 -1
  535. package/.next/static/chunks/app/api/worktrees/[id]/tree/route-be21650964d61b1d.js +0 -1
  536. package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-be21650964d61b1d.js +0 -1
  537. package/.next/static/chunks/app/api/worktrees/[id]/verify/route-be21650964d61b1d.js +0 -1
  538. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-be21650964d61b1d.js +0 -1
  539. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-be21650964d61b1d.js +0 -1
  540. package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-be21650964d61b1d.js +0 -1
  541. package/.next/static/chunks/app/api/worktrees/route-be21650964d61b1d.js +0 -1
  542. package/.next/static/chunks/app/manifest.webmanifest/route-be21650964d61b1d.js +0 -1
  543. package/.next/static/chunks/app/proxy/[...path]/route-be21650964d61b1d.js +0 -1
  544. package/.next/static/chunks/app/worktrees/[id]/layout-be21650964d61b1d.js +0 -1
  545. package/.next/static/chunks/app/worktrees/[id]/page-de42fed52de80834.js +0 -1
  546. /package/.next/static/{-A6IRK1c_KvFlxiDrsyVc → b69eWhjC1rRrFTa-g3lMS}/_ssgManifest.js +0 -0
@@ -0,0 +1,147 @@
1
+ "use strict";
2
+ /**
3
+ * "Is this session blocked on a prompt right now?" — the guard `send` consults
4
+ * before typing into a session (Issue #1708).
5
+ *
6
+ * A Claude/Codex prompt dialog does not forward keystrokes to the agent: text
7
+ * typed while one is open lands in the composer and sits there. Issue #1708's
8
+ * dispatch runner did exactly that — it read "no progress", sent a nudge, and
9
+ * left the session with a half-typed message queued underneath the dialog. The
10
+ * next `respond` then had to answer a prompt whose input line already contained
11
+ * someone else's text, which is how an "answer" can be delivered as a message.
12
+ *
13
+ * Refusing the send is the only thing that keeps `respond` well defined.
14
+ *
15
+ * Consulted from {@link sendUserMessage}, which is the choke point for every
16
+ * path that types a message at an agent — the send API and the timer manager.
17
+ * Putting it in the route instead would have left scheduled timer sends firing
18
+ * into open dialogs. The answer paths (`respond`, `special-keys`,
19
+ * `prompt-response`) do not go through that function, which is what keeps them
20
+ * open by construction rather than by remembering to exempt them.
21
+ */
22
+ Object.defineProperty(exports, "__esModule", { value: true });
23
+ exports.PROMPT_WAITING_CODE = void 0;
24
+ exports.isPromptWaiting = isPromptWaiting;
25
+ exports.promptWaitingMessage = promptWaitingMessage;
26
+ const manager_1 = require("../../lib/cli-tools/manager");
27
+ const cli_session_1 = require("../../lib/session/cli-session");
28
+ const status_detector_1 = require("../../lib/detection/status-detector");
29
+ const status_capture_config_1 = require("../../config/status-capture-config");
30
+ const logger_1 = require("../../lib/logger");
31
+ const prompt_waiting_composition_1 = require("../../lib/session/prompt-waiting-composition");
32
+ const logger = (0, logger_1.createLogger)('prompt-waiting-guard');
33
+ /** Stable machine-readable code for the refusal (HTTP body + CLI branching). */
34
+ exports.PROMPT_WAITING_CODE = 'PROMPT_WAITING';
35
+ /**
36
+ * Whether a send to this session would land in a prompt dialog's input line.
37
+ *
38
+ * Both layers are consulted, through the shared composition (Issue #1737). This
39
+ * function used to call `detectSessionStatus` and answer from it alone, which
40
+ * meant the OR rule #1725 established in `buildCurrentOutput` did not apply
41
+ * here: a dialog only the agent's own events could see — the #1708 shape
42
+ * exactly — was published as `isPromptWaiting: true` and still accepted sends.
43
+ * The composition now lives in one module and both callers read it, so there is
44
+ * no second answer to drift.
45
+ *
46
+ * The scraper's half is keyed off `hasActivePrompt` alone — the same signal the
47
+ * UI uses to render PromptPanel and `wait` uses to raise exit 10 — and
48
+ * deliberately NOT off `isSelectionListActive`. Arrow-key menus swallow text
49
+ * too, but they are also what Codex's pager and `/model` overlay look like, and
50
+ * refusing sends for those would block a legitimate message far more often than
51
+ * it would prevent a lost one. The asymmetry is the point: this guard only
52
+ * fires where the system already knows there is something to answer.
53
+ *
54
+ * Fail-open, in three places now rather than one. A capture that throws must
55
+ * not make the session unwritable — the cost of a missed guard is the pre-#1708
56
+ * behaviour, while the cost of a false refusal is a session nobody can talk to
57
+ * — and the structured layer is held to the same standard: its veto expires
58
+ * ({@link STRUCTURED_SEND_BLOCK_MAX_AGE_MS}), can be switched off for the server
59
+ * ({@link STRUCTURED_SEND_GUARD_ENV}), and can be waived for one send
60
+ * ({@link PromptWaitingOptions.ignoreStructured}). Note this makes the guard a
61
+ * best-effort narrowing, not a barrier: it is not, and must not be relied on as,
62
+ * a correctness guarantee that no text ever reaches an open dialog.
63
+ *
64
+ * @param worktreeId - Worktree whose session is being written to
65
+ * @param cliToolId - CLI tool driving that session
66
+ * @param instanceId - Agent instance, when not the primary one
67
+ * @param options - Per-call overrides; see {@link PromptWaitingOptions}
68
+ */
69
+ async function isPromptWaiting(worktreeId, cliToolId, instanceId, options) {
70
+ try {
71
+ const cliTool = manager_1.CLIToolManager.getInstance().getTool(cliToolId);
72
+ if (!(await cliTool.isRunning(worktreeId, instanceId))) {
73
+ return { waiting: false };
74
+ }
75
+ const output = await (0, cli_session_1.captureSessionOutput)(worktreeId, cliToolId, status_capture_config_1.STATUS_CAPTURE_LINES, instanceId);
76
+ const status = (0, status_detector_1.detectSessionStatus)(output, cliToolId);
77
+ const resolution = (0, prompt_waiting_composition_1.resolvePromptWaiting)({
78
+ worktreeId,
79
+ cliToolId,
80
+ instanceId,
81
+ scraper: {
82
+ status: status.status,
83
+ reason: status.reason,
84
+ hasActivePrompt: status.hasActivePrompt,
85
+ },
86
+ ignoreStructured: options?.ignoreStructured,
87
+ });
88
+ if (!resolution.blocksSend) {
89
+ // A record that saw a dialog and was not allowed to act on it is the
90
+ // fail-open path this Issue added, so it says so out loud. Silence here
91
+ // would make "the guard did not fire" indistinguishable from "there was
92
+ // nothing to fire on", which is the pair an operator needs to tell apart.
93
+ if (resolution.structuredSendBlockSuppressed !== null) {
94
+ logger.info('structured-send-guard-not-applied', {
95
+ worktreeId,
96
+ cliToolId,
97
+ instanceId,
98
+ suppressed: resolution.structuredSendBlockSuppressed,
99
+ promptWaitingSince: resolution.structured?.at ?? null,
100
+ });
101
+ }
102
+ return { waiting: false };
103
+ }
104
+ return {
105
+ waiting: true,
106
+ reason: resolution.blockReason ?? undefined,
107
+ blockedBy: resolution.blockedBy ?? undefined,
108
+ };
109
+ }
110
+ catch (error) {
111
+ logger.warn('prompt-waiting-check-failed', {
112
+ worktreeId,
113
+ cliToolId,
114
+ error: error instanceof Error ? error.message : String(error),
115
+ });
116
+ return { waiting: false };
117
+ }
118
+ }
119
+ /**
120
+ * The refusal message. Shared so the HTTP body and the CLI's stderr say the same
121
+ * thing — an operator who hits this in one surface should recognise it in the other.
122
+ *
123
+ * A structured-only refusal gets an extra sentence (Issue #1737), because the
124
+ * two refusals put the operator in different places. When the scraper saw the
125
+ * dialog, it is on screen and `respond` answers it. When only the agent's
126
+ * events saw it, the pane may look perfectly ordinary — and the instruction
127
+ * "answer the prompt" is then advice about a prompt the operator cannot find.
128
+ * That is precisely the state where a guard turns into an outage, so the message
129
+ * has to name the way past it and how long it lasts if they do nothing.
130
+ *
131
+ * @param blockedBy - Which layer refused; omitted callers get the plain message
132
+ */
133
+ function promptWaitingMessage(worktreeId, blockedBy) {
134
+ const base = `${worktreeId} is waiting on a prompt. Sending now would type into the ` +
135
+ `prompt's input line instead of reaching the agent, and would leave that ` +
136
+ `text in place for the next answer. Answer the prompt first: ` +
137
+ `\`commandmate respond ${worktreeId} <answer>\`.`;
138
+ if (blockedBy !== 'structured')
139
+ return base;
140
+ const ttlMinutes = Math.round(prompt_waiting_composition_1.STRUCTURED_SEND_BLOCK_MAX_AGE_MS / 60_000);
141
+ return (`${base} This dialog was reported by the agent's own hooks and is not ` +
142
+ `visible to the terminal scraper, so if the pane looks idle the record has ` +
143
+ `outlived its dialog: it stops blocking sends ${ttlMinutes} minutes after ` +
144
+ `it was reported, or immediately with ` +
145
+ `\`commandmate send ${worktreeId} <message> --ignore-structured-prompt\` ` +
146
+ `(server-wide: ${prompt_waiting_composition_1.STRUCTURED_SEND_GUARD_ENV}=off).`);
147
+ }
@@ -33,6 +33,7 @@ const assistant_response_saver_1 = require("../../lib/assistant-response-saver")
33
33
  const tmux_1 = require("../../lib/tmux/tmux");
34
34
  const tmux_capture_cache_1 = require("../../lib/tmux/tmux-capture-cache");
35
35
  const logger_1 = require("../../lib/logger");
36
+ const prompt_waiting_guard_1 = require("../../lib/session/prompt-waiting-guard");
36
37
  const copilot_constants_1 = require("../../config/copilot-constants");
37
38
  const logger = (0, logger_1.createLogger)('session/send-user-message');
38
39
  function getErrorMessage(error) {
@@ -49,6 +50,40 @@ async function sendUserMessage(db, params) {
49
50
  const { worktreeId, content, cliToolId, instanceId, absoluteImagePath, copilotModel } = params;
50
51
  const messageType = params.messageType ?? 'normal';
51
52
  const cliTool = manager_1.CLIToolManager.getInstance().getTool(cliToolId);
53
+ // Issue #1708: refuse before the first side effect. A prompt dialog does not
54
+ // forward keystrokes to the agent — they accumulate in its own input line — so
55
+ // the message is lost AND the next `respond` has to answer a prompt whose
56
+ // input already holds someone else's text, which is how an answer gets
57
+ // delivered as a message.
58
+ //
59
+ // The guard lives HERE rather than in the send route because this function is
60
+ // the choke point for every path that types a message at an agent: the route
61
+ // and the timer manager (src/lib/timer-manager.ts, which calls it directly and
62
+ // would otherwise fire straight into an open dialog on schedule). The answer
63
+ // paths — `respond`, `special-keys`, `prompt-response` — do not go through
64
+ // here at all, which is what keeps them open; they are the only way out of
65
+ // this state and blocking them would strand the session.
66
+ //
67
+ // Issue #1737: the check consults the structured layer as well, through the
68
+ // same composition the current-output payload publishes. Before that it asked
69
+ // the scraper alone, so a dialog only the agent's hooks could see — the exact
70
+ // gap #1725 closed for the payload — was still sent into.
71
+ const promptGuard = await (0, prompt_waiting_guard_1.isPromptWaiting)(worktreeId, cliToolId, instanceId, {
72
+ ignoreStructured: params.ignoreStructuredPromptGuard,
73
+ });
74
+ if (promptGuard.waiting) {
75
+ logger.info('send-refused-prompt-waiting', {
76
+ worktreeId,
77
+ cliToolId,
78
+ reason: promptGuard.reason,
79
+ blockedBy: promptGuard.blockedBy,
80
+ });
81
+ return {
82
+ ok: false,
83
+ stage: 'prompt_waiting',
84
+ error: (0, prompt_waiting_guard_1.promptWaitingMessage)(worktreeId, promptGuard.blockedBy),
85
+ };
86
+ }
52
87
  // Generate the user-message timestamp BEFORE saving the pending response so
53
88
  // ordering holds: assistantResponse < userMessage.
54
89
  const userMessageTimestamp = new Date();
@@ -10,6 +10,7 @@
10
10
  * | `BranchStatus` | `types/sidebar.ts` | idle / ready / running / waiting / generating |
11
11
  * | boolean triple | `lib/session/worktree-status-helper.ts` | isRunning / isWaitingForResponse / isProcessing |
12
12
  * | `UIPhase` | `types/ui-state.ts` | idle / waiting / receiving / prompt / complete |
13
+ * | `AgentEventType` | `lib/hooks/agent-event-types.ts` | stop / notification / session_start / … |
13
14
  *
14
15
  * This module is the single place where those vocabularies are converted into
15
16
  * one another, so the correspondence cannot drift between call sites. It is a
@@ -21,6 +22,8 @@
21
22
  * terminal output
22
23
  * -> detectSessionStatus() (status-detector, NOT touched here)
23
24
  * -> SessionStatus
25
+ * -> [merged with agentEventToSessionStatus() in current-output-builder]
26
+ *
24
27
  * -> sessionStatusToActivityFlags() (this module)
25
28
  * -> boolean triple (+ isRunning from tmux session existence)
26
29
  * -> deriveCliStatus() (this module)
@@ -41,10 +44,128 @@
41
44
  * with no second call site, so the reducer stays the single owner.
42
45
  */
43
46
  Object.defineProperty(exports, "__esModule", { value: true });
47
+ exports.HOOK_STATUS_REASON = void 0;
48
+ exports.agentEventToSessionStatus = agentEventToSessionStatus;
44
49
  exports.sessionStatusToActivityFlags = sessionStatusToActivityFlags;
45
50
  exports.deriveCliStatus = deriveCliStatus;
46
51
  exports.deriveSessionStatus = deriveSessionStatus;
47
52
  exports.deriveBranchStatus = deriveBranchStatus;
53
+ /**
54
+ * `sessionStatusReason` values produced by the structured-event layer
55
+ * (Issue #1723), as opposed to `STATUS_REASON` which is the scraper's.
56
+ *
57
+ * They are deliberately prefixed: a reader of a payload, a log line or a
58
+ * `commandmate capture --json` must be able to tell at a glance which of the two
59
+ * detection layers decided, because the whole point of the two-layer split is
60
+ * being able to measure how often they disagree.
61
+ */
62
+ exports.HOOK_STATUS_REASON = {
63
+ /** The agent reported it began a turn (`UserPromptSubmit`). */
64
+ PROMPT_SUBMIT: 'hook_prompt_submit',
65
+ /** The agent reported the turn ended (`Stop` / `SubagentStop`). */
66
+ STOP: 'hook_stop',
67
+ /** `Notification(permission_prompt)` — the agent says a dialog is on screen. */
68
+ PERMISSION_PROMPT: 'hook_permission_prompt',
69
+ /**
70
+ * A `PermissionRequest` this server declined to decide (Issue #1725).
71
+ *
72
+ * Distinct from {@link PERMISSION_PROMPT} because the two are different kinds
73
+ * of evidence, and an operator reading a payload or a log has to be able to
74
+ * tell them apart: the notification is proof a dialog exists, this one is the
75
+ * prediction that one is about to. Only the prediction expires unaided.
76
+ */
77
+ PERMISSION_REQUEST: 'hook_permission_request',
78
+ /** `Notification(idle_prompt)` — the agent says it is sitting at the composer. */
79
+ IDLE_PROMPT: 'hook_idle_prompt',
80
+ /**
81
+ * `PreToolUse` — the agent reported it is invoking a tool (Issue #1726).
82
+ *
83
+ * A turn in progress, and nothing more. It is deliberately NOT `waiting` even
84
+ * though the only matcher injected for it is `AskUserQuestion`: whether that
85
+ * picker is on screen is the scraper's question (§5.6 measured that Claude
86
+ * emits nothing at all while it is up), and asserting `waiting` from a
87
+ * pre-invocation event would keep asserting it long after a human answered in
88
+ * the terminal, because no event marks that.
89
+ */
90
+ PRE_TOOL_USE: 'hook_pre_tool_use',
91
+ /**
92
+ * `PostToolUse` — the agent reported a tool call finished (Issue #1726).
93
+ *
94
+ * `running` like its `PreToolUse` counterpart, and for the same reason: a tool
95
+ * finishing is not a turn finishing. `Stop` is what says the turn ended, and
96
+ * it followed this by 1.3 s in the live capture.
97
+ */
98
+ POST_TOOL_USE: 'hook_post_tool_use',
99
+ };
100
+ /**
101
+ * The structured state machine: last lifecycle event -> `SessionStatus`
102
+ * (Issue #1723).
103
+ *
104
+ * Pure and total, so the whole table can be read in one place:
105
+ *
106
+ * | event | verdict |
107
+ * |----------------------------------|--------------------|
108
+ * | `user_prompt_submit` | `running` |
109
+ * | `stop` | `ready` |
110
+ * | `pre_tool_use` | `running` |
111
+ * | `post_tool_use` | `running` |
112
+ * | `notification(permission_prompt)`| `waiting` |
113
+ * | `notification(idle_prompt)` | `ready` |
114
+ * | `notification(other/none)` | none (scraper) |
115
+ * | `session_start` | none (scraper) |
116
+ * | `session_end` | none (scraper) |
117
+ *
118
+ * `pre_tool_use` answers `running` for the same reason `user_prompt_submit`
119
+ * does: the agent is mid-turn. It has to answer *something*, because this table
120
+ * reads only the newest event — answering "none" would mean an `AskUserQuestion`
121
+ * invocation erased the `running` its own turn's `user_prompt_submit` had
122
+ * established, and a scraper that reads the picker as `ready`/`no_recent_output`
123
+ * (which is exactly the #1708 failure) would then let `commandmate wait` exit 0
124
+ * on a session with a dialog in front of it. `running` never overrides a scraper
125
+ * `waiting`, so promoting it costs nothing where the screen can be read.
126
+ *
127
+ * `session_start` answering "none" is not an oversight, it is a requirement.
128
+ * A folder that has not been trusted yet shows its trust dialog *before* any
129
+ * hook fires — 25.3 seconds of complete silence in the live capture
130
+ * (`docs/design/agent-hooks-live-verification.md` §5.6) — so the arrival of
131
+ * `SessionStart` cannot be used as "the session is up", and its absence cannot
132
+ * be used as "it is not". What `session_start` does do is start a new
133
+ * generation; that belongs to `agent-event-state`, not to this table.
134
+ *
135
+ * `session_end` answers none because the state is discarded, not because the
136
+ * session is idle: `/clear` emits `SessionEnd(reason=clear)` on a session that
137
+ * is alive and about to keep going (§1.1).
138
+ *
139
+ * @param detail - The event's subtype, for the events that have one
140
+ */
141
+ function agentEventToSessionStatus(event, detail) {
142
+ switch (event) {
143
+ case 'user_prompt_submit':
144
+ return { status: 'running', reason: exports.HOOK_STATUS_REASON.PROMPT_SUBMIT };
145
+ case 'pre_tool_use':
146
+ return { status: 'running', reason: exports.HOOK_STATUS_REASON.PRE_TOOL_USE };
147
+ case 'post_tool_use':
148
+ return { status: 'running', reason: exports.HOOK_STATUS_REASON.POST_TOOL_USE };
149
+ case 'stop':
150
+ return { status: 'ready', reason: exports.HOOK_STATUS_REASON.STOP };
151
+ case 'notification':
152
+ // Matched on `notification_type`, never on the human-facing `message` (D3).
153
+ if (detail === 'permission_prompt') {
154
+ return { status: 'waiting', reason: exports.HOOK_STATUS_REASON.PERMISSION_PROMPT };
155
+ }
156
+ if (detail === 'idle_prompt') {
157
+ return { status: 'ready', reason: exports.HOOK_STATUS_REASON.IDLE_PROMPT };
158
+ }
159
+ return null;
160
+ case 'session_start':
161
+ case 'session_end':
162
+ return null;
163
+ default:
164
+ // exhaustive check: AgentEventType extensions cause a compile error
165
+ event;
166
+ return null;
167
+ }
168
+ }
48
169
  /**
49
170
  * Project a detected `SessionStatus` onto the activity flags.
50
171
  *
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+ /**
3
+ * The prompt the structured layer publishes for a dialog nobody could parse
4
+ * (Issue #1725).
5
+ *
6
+ * `Notification(notification_type=permission_prompt)` tells us a dialog is on
7
+ * screen; it does not tell us what is in it. The live capture (#1721 §5.5)
8
+ * measured the whole payload: a `message` written for a human
9
+ * (`"Claude needs your permission to use Bash"`), a `notification_type`, and
10
+ * nothing resembling the options the dialog is offering. So the fact the
11
+ * structured layer can contribute is "a human has to act", and the shape below
12
+ * is that fact and no more — a question, no options, and the agent's own line
13
+ * kept verbatim for display.
14
+ *
15
+ * ## Why `type` is `unclassified` rather than a new prompt type
16
+ *
17
+ * `UNCLASSIFIED_PROMPT_TYPE` already means exactly this to every reader that
18
+ * matters: `commandmate wait` reports it as the kind of exit 10 that nobody can
19
+ * answer programmatically (#1708), `capture --prompts` renders it as its own
20
+ * state instead of a pending prompt, and PromptPanel now degrades on it. Adding
21
+ * a second word for "we know it is there, we cannot read it" would oblige each
22
+ * of them to learn both. It is deliberately NOT a member of `PromptType` —
23
+ * widening that union would force every exhaustive map over it (the contract
24
+ * parser's promptType allowlist among them) to grow a case for a value no
25
+ * prompt-answering path may accept. See the note on `UNCLASSIFIED_PROMPT_TYPE`
26
+ * in `types/models.ts`.
27
+ *
28
+ * ## Pure on purpose
29
+ *
30
+ * Type-only imports and string building, exactly like `status-mapping`, so a
31
+ * client component can import it: `PromptPanel`'s prop type widens to include
32
+ * {@link StructuredPromptWaitingData} and it must be able to name the type.
33
+ *
34
+ * @module lib/session/structured-prompt
35
+ */
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.MAX_STRUCTURED_PROMPT_MESSAGE_LENGTH = void 0;
38
+ exports.buildStructuredPromptQuestion = buildStructuredPromptQuestion;
39
+ exports.buildStructuredPromptData = buildStructuredPromptData;
40
+ exports.buildStructuredPromptHistoryRecord = buildStructuredPromptHistoryRecord;
41
+ exports.isStructuredPromptWaitingData = isStructuredPromptWaitingData;
42
+ const models_1 = require("../../types/models");
43
+ /** Bound on the agent's `message`, which is prose and only ever displayed. */
44
+ exports.MAX_STRUCTURED_PROMPT_MESSAGE_LENGTH = 500;
45
+ /** How each source reads in the one-line question. */
46
+ const SOURCE_LABEL = {
47
+ notification: 'Notification(permission_prompt)',
48
+ 'permission-request': 'PermissionRequest (no decision)',
49
+ };
50
+ /**
51
+ * The one line every surface shows for a structured prompt.
52
+ *
53
+ * It names the option NUMBER on purpose. `respond <id> yes` is not resolved
54
+ * semantically on a numbered dialog — Enter takes the highlighted default
55
+ * instead, so a "no" can be delivered as an approval (Issue #1681). This text
56
+ * is the only guidance a caller of `wait` gets, so it has to say which form
57
+ * actually works.
58
+ */
59
+ function buildStructuredPromptQuestion(worktreeId, facts) {
60
+ const parts = [
61
+ `A dialog is open in ${worktreeId}: the agent reported it via ${SOURCE_LABEL[facts.source]}` +
62
+ `${facts.toolName ? ` for ${facts.toolName}` : ''}, but the detection layer published no ` +
63
+ `options for it.`,
64
+ `Answer it in the terminal, or send the option NUMBER with ` +
65
+ `\`commandmate respond ${worktreeId} <number>\` — yes/no is not resolved on a numbered ` +
66
+ `dialog (Issue #1681).`,
67
+ ];
68
+ if (facts.message) {
69
+ parts.push(`Agent message: "${facts.message}"`);
70
+ }
71
+ if (facts.askUserQuestion) {
72
+ const { question, labels, questionCount } = facts.askUserQuestion;
73
+ parts.push(`The agent asked${questionCount > 1 ? ` ${questionCount} questions, the first being` : ''}: ` +
74
+ `"${question}" — offering: ${labels.join(' / ')}. ` +
75
+ `The picker renumbers and adds its own entries, so read the option NUMBER off the ` +
76
+ `terminal rather than counting this list.`);
77
+ }
78
+ return parts.join(' ');
79
+ }
80
+ /** The live `promptData` for a structured prompt. */
81
+ function buildStructuredPromptData(worktreeId, facts) {
82
+ return {
83
+ type: models_1.UNCLASSIFIED_PROMPT_TYPE,
84
+ status: 'pending',
85
+ question: buildStructuredPromptQuestion(worktreeId, facts),
86
+ options: [],
87
+ source: facts.source,
88
+ ...(facts.message ? { message: facts.message } : {}),
89
+ ...(facts.toolName ? { toolName: facts.toolName } : {}),
90
+ ...(facts.askUserQuestion ? { askUserQuestion: facts.askUserQuestion } : {}),
91
+ };
92
+ }
93
+ /** The prompt-history row for a structured prompt the scraper never saw. */
94
+ function buildStructuredPromptHistoryRecord(worktreeId, facts) {
95
+ return {
96
+ type: models_1.UNCLASSIFIED_PROMPT_TYPE,
97
+ status: 'unclassified',
98
+ question: buildStructuredPromptQuestion(worktreeId, facts),
99
+ options: [],
100
+ source: facts.source,
101
+ ...(facts.message ? { message: facts.message } : {}),
102
+ ...(facts.toolName ? { toolName: facts.toolName } : {}),
103
+ ...(facts.askUserQuestion ? { askUserQuestion: facts.askUserQuestion } : {}),
104
+ };
105
+ }
106
+ /** Whether this prompt payload is the degraded structured form. */
107
+ function isStructuredPromptWaitingData(value) {
108
+ return value?.type === models_1.UNCLASSIFIED_PROMPT_TYPE;
109
+ }
@@ -3,7 +3,9 @@
3
3
  * Data models for myCodeBranchDesk
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.UNCLASSIFIED_PROMPT_TYPE = void 0;
6
7
  exports.isValidSubmitMode = isValidSubmitMode;
8
+ exports.isAnswerablePromptData = isAnswerablePromptData;
7
9
  /**
8
10
  * Type guard for SubmitMode values.
9
11
  * Validates that a string is a valid SubmitMode ('answer_only' or 'answer_then_enter').
@@ -13,3 +15,31 @@ exports.isValidSubmitMode = isValidSubmitMode;
13
15
  function isValidSubmitMode(value) {
14
16
  return value === 'answer_only' || value === 'answer_then_enter';
15
17
  }
18
+ /**
19
+ * `promptData.type` written for an interactive frame nothing could classify.
20
+ *
21
+ * Deliberately NOT a member of {@link PromptType}: the detectors can never
22
+ * produce it, and widening that union would oblige every exhaustive map over it
23
+ * (the contract parser's promptType allowlist among them) to grow a case for a
24
+ * value no prompt-answering path is allowed to accept. Readers compare against
25
+ * this constant instead.
26
+ */
27
+ exports.UNCLASSIFIED_PROMPT_TYPE = 'unclassified';
28
+ /**
29
+ * Narrow a prompt payload to the answerable {@link PromptData} union.
30
+ *
31
+ * The one branch every reader of {@link LivePromptData} / {@link
32
+ * StoredPromptData} needs, defined once: `true` means the options, the default
33
+ * and `answer` are meaningful and the value may be answered by option number;
34
+ * `false` narrows to the degraded form, which by construction carries none of
35
+ * them. Both directions come out of this single predicate so no call site has
36
+ * to re-derive "is `type` the unclassified sentinel?" for itself.
37
+ *
38
+ * Deliberately not `isStructuredPromptWaitingData` from
39
+ * `lib/session/structured-prompt`: that one asserts the *live* degraded shape,
40
+ * which would be unsound over {@link StoredPromptData}, whose degraded members
41
+ * share its `type` but not its `status`/`source`.
42
+ */
43
+ function isAnswerablePromptData(value) {
44
+ return value != null && value.type !== exports.UNCLASSIFIED_PROMPT_TYPE;
45
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commandmate",
3
- "version": "0.21.5",
3
+ "version": "0.22.0",
4
4
  "description": "A local control plane for agent CLIs — orchestration and visibility for Claude Code, Codex, Gemini CLI, and more across Git worktrees",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -54,7 +54,8 @@
54
54
  "test:watch": "NODE_ENV=test vitest --watch",
55
55
  "db:init": "tsx scripts/init-db.ts",
56
56
  "db:reset": "rm -f db.sqlite && npm run db:init",
57
- "catalog:refresh": "tsx scripts/refresh-slash-command-catalog.ts"
57
+ "catalog:refresh": "tsx scripts/refresh-slash-command-catalog.ts",
58
+ "canary": "tsx scripts/canary/index.ts"
58
59
  },
59
60
  "dependencies": {
60
61
  "@dnd-kit/core": "^6.3.1",
@@ -23,9 +23,12 @@ Usage: cmate-agent-event.sh [options] [JSON]
23
23
 
24
24
  Options:
25
25
  --tool ID Agent CLI id (default: $CM_AGENT_TOOL, else "claude")
26
- --event EVENT stop | notification | session_start (default: "stop")
26
+ --event EVENT stop | notification | session_start | user_prompt_submit |
27
+ session_end (default: "stop")
27
28
  --cwd PATH Agent working directory (default: $CLAUDE_PROJECT_DIR, else $PWD)
28
29
  --session-id ID Opaque agent session id
30
+ --worktree-id ID CommandMate worktree id; skips cwd-based resolution
31
+ --instance-id ID Agent instance id; without it the event lands on the primary
29
32
  --json JSON Hook payload to read cwd/session/event from
30
33
  --stdin-json Read that payload from stdin instead
31
34
  --url URL Endpoint (default: http://$CM_HOST:$CM_PORT/api/hooks/agent-event)
@@ -63,6 +66,20 @@ map_event_name() {
63
66
  Stop|SubagentStop|agent-turn-complete) printf 'stop' ;;
64
67
  Notification) printf 'notification' ;;
65
68
  SessionStart) printf 'session_start' ;;
69
+ SessionEnd) printf 'session_end' ;;
70
+ UserPromptSubmit) printf 'user_prompt_submit' ;;
71
+ *) printf '' ;;
72
+ esac
73
+ }
74
+
75
+ # The event's subtype, where it has one. Each event spells it differently and
76
+ # none of them share a field. Notification is judged on notification_type, never
77
+ # on the human-facing "message" (Issue #1721, D3).
78
+ detail_field_for_event() {
79
+ case "$1" in
80
+ notification) printf 'notification_type' ;;
81
+ session_end) printf 'reason' ;;
82
+ session_start) printf 'source' ;;
66
83
  *) printf '' ;;
67
84
  esac
68
85
  }
@@ -71,6 +88,9 @@ TOOL="${CM_AGENT_TOOL:-claude}"
71
88
  EVENT=""
72
89
  CWD=""
73
90
  SESSION_ID=""
91
+ WORKTREE_ID=""
92
+ INSTANCE_ID=""
93
+ DETAIL=""
74
94
  HOOK_JSON=""
75
95
  READ_STDIN=0
76
96
  URL="${CM_HOOK_URL:-}"
@@ -82,6 +102,8 @@ while [ $# -gt 0 ]; do
82
102
  --event) [ $# -ge 2 ] || die "--event requires a value"; EVENT="$2"; shift 2 ;;
83
103
  --cwd) [ $# -ge 2 ] || die "--cwd requires a value"; CWD="$2"; shift 2 ;;
84
104
  --session-id) [ $# -ge 2 ] || die "--session-id requires a value"; SESSION_ID="$2"; shift 2 ;;
105
+ --worktree-id) [ $# -ge 2 ] || die "--worktree-id requires a value"; WORKTREE_ID="$2"; shift 2 ;;
106
+ --instance-id) [ $# -ge 2 ] || die "--instance-id requires a value"; INSTANCE_ID="$2"; shift 2 ;;
85
107
  --json) [ $# -ge 2 ] || die "--json requires a value"; HOOK_JSON="$2"; shift 2 ;;
86
108
  --url) [ $# -ge 2 ] || die "--url requires a value"; URL="$2"; shift 2 ;;
87
109
  --stdin-json) READ_STDIN=1; shift ;;
@@ -120,10 +142,17 @@ fi
120
142
  [ -n "$EVENT" ] || EVENT="stop"
121
143
 
122
144
  case "$EVENT" in
123
- stop|notification|session_start) ;;
124
- *) die "--event must be one of: stop, notification, session_start (got \"$EVENT\")" ;;
145
+ stop|notification|session_start|user_prompt_submit|session_end) ;;
146
+ *) die "--event must be one of: stop, notification, session_start, user_prompt_submit, session_end (got \"$EVENT\")" ;;
125
147
  esac
126
148
 
149
+ if [ -z "$DETAIL" ] && [ -n "$HOOK_JSON" ]; then
150
+ DETAIL_FIELD="$(detail_field_for_event "$EVENT")"
151
+ if [ -n "$DETAIL_FIELD" ]; then
152
+ DETAIL="$(json_string_field "$HOOK_JSON" "$DETAIL_FIELD")"
153
+ fi
154
+ fi
155
+
127
156
  [ -n "$TOOL" ] || die "--tool must not be empty"
128
157
 
129
158
  if [ -z "$CWD" ]; then
@@ -154,6 +183,18 @@ BODY="$BODY,\"cwd\":\"$(json_escape "$CWD")\""
154
183
  if [ -n "$SESSION_ID" ]; then
155
184
  BODY="$BODY,\"sessionId\":\"$(json_escape "$SESSION_ID")\""
156
185
  fi
186
+ # Correlation keys are omitted when unset rather than sent empty: the receiver
187
+ # falls back to resolving the worktree from cwd and to the primary instance,
188
+ # which is exactly what a hand-configured hook from Issue #1549 wants.
189
+ if [ -n "$WORKTREE_ID" ]; then
190
+ BODY="$BODY,\"worktreeId\":\"$(json_escape "$WORKTREE_ID")\""
191
+ fi
192
+ if [ -n "$INSTANCE_ID" ]; then
193
+ BODY="$BODY,\"instanceId\":\"$(json_escape "$INSTANCE_ID")\""
194
+ fi
195
+ if [ -n "$DETAIL" ]; then
196
+ BODY="$BODY,\"detail\":\"$(json_escape "$DETAIL")\""
197
+ fi
157
198
  BODY="$BODY}"
158
199
 
159
200
  # Token via --header rather than the command line of a subprocess: argv is world