commandmate 0.21.5 → 0.22.1

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 (549) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +181 -174
  3. package/.next/app-path-routes-manifest.json +19 -18
  4. package/.next/build-manifest.json +2 -2
  5. package/.next/prerender-manifest.json +3 -3
  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.js +1 -1
  176. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route_client-reference-manifest.js +1 -1
  177. package/.next/server/app/api/worktrees/[id]/skills/route.js +1 -1
  178. package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
  179. package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
  180. package/.next/server/app/api/worktrees/[id]/special-keys/route.js +1 -1
  181. package/.next/server/app/api/worktrees/[id]/special-keys/route.js.nft.json +1 -1
  182. package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
  183. package/.next/server/app/api/worktrees/[id]/start-polling/route.js +1 -1
  184. package/.next/server/app/api/worktrees/[id]/start-polling/route.js.nft.json +1 -1
  185. package/.next/server/app/api/worktrees/[id]/start-polling/route_client-reference-manifest.js +1 -1
  186. package/.next/server/app/api/worktrees/[id]/tasks/route.js +2 -6
  187. package/.next/server/app/api/worktrees/[id]/tasks/route.js.nft.json +1 -1
  188. package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -1
  189. package/.next/server/app/api/worktrees/[id]/terminal/route.js +1 -1
  190. package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
  191. package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
  192. package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
  193. package/.next/server/app/api/worktrees/[id]/timers/route.js +1 -1
  194. package/.next/server/app/api/worktrees/[id]/timers/route.js.nft.json +1 -1
  195. package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
  196. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  197. package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
  198. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
  199. package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
  200. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
  201. package/.next/server/app/api/worktrees/[id]/verify/route.js +1 -1
  202. package/.next/server/app/api/worktrees/[id]/verify/route.js.nft.json +1 -1
  203. package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -1
  204. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -1
  205. package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -1
  206. package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
  207. package/.next/server/app/api/worktrees/route.js +1 -1
  208. package/.next/server/app/api/worktrees/route.js.nft.json +1 -1
  209. package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
  210. package/.next/server/app/chat/page_client-reference-manifest.js +1 -1
  211. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  212. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  213. package/.next/server/app/more/page_client-reference-manifest.js +1 -1
  214. package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  215. package/.next/server/app/page_client-reference-manifest.js +1 -1
  216. package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
  217. package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
  218. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  219. package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  220. package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
  221. package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
  222. package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  223. package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
  224. package/.next/server/app/worktrees/[id]/page.js +9 -9
  225. package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
  226. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
  227. package/.next/server/app-paths-manifest.json +19 -18
  228. package/.next/server/chunks/1068.js +1 -1
  229. package/.next/server/chunks/1356.js +4 -0
  230. package/.next/server/chunks/1841.js +1 -0
  231. package/.next/server/chunks/2404.js +1 -1
  232. package/.next/server/chunks/2515.js +1 -1
  233. package/.next/server/chunks/2816.js +1 -1
  234. package/.next/server/chunks/3022.js +1 -0
  235. package/.next/server/chunks/3736.js +1 -1
  236. package/.next/server/chunks/5959.js +5 -4
  237. package/.next/server/chunks/6130.js +1 -1
  238. package/.next/server/chunks/6274.js +8 -12
  239. package/.next/server/chunks/6919.js +1 -0
  240. package/.next/server/chunks/7685.js +1 -1
  241. package/.next/server/chunks/8856.js +1 -1
  242. package/.next/server/chunks/9067.js +1 -1
  243. package/.next/server/chunks/9373.js +8 -0
  244. package/.next/server/chunks/9687.js +2 -2
  245. package/.next/server/middleware-manifest.json +5 -5
  246. package/.next/server/pages/500.html +1 -1
  247. package/.next/server/server-reference-manifest.json +1 -1
  248. package/.next/server/src/middleware.js.map +1 -1
  249. package/.next/static/chunks/{6488-572dbfd9986e8a92.js → 6488-63dacfbab082ca8d.js} +1 -1
  250. package/.next/static/chunks/app/api/app/update/route-973ec48531555712.js +1 -0
  251. package/.next/static/chunks/app/api/app/update-check/route-973ec48531555712.js +1 -0
  252. package/.next/static/chunks/app/api/assistant/conversation/route-973ec48531555712.js +1 -0
  253. package/.next/static/chunks/app/api/assistant/current-output/route-973ec48531555712.js +1 -0
  254. package/.next/static/chunks/app/api/assistant/messages/route-973ec48531555712.js +1 -0
  255. package/.next/static/chunks/app/api/assistant/session/route-973ec48531555712.js +1 -0
  256. package/.next/static/chunks/app/api/assistant/start/route-973ec48531555712.js +1 -0
  257. package/.next/static/chunks/app/api/assistant/terminal/route-973ec48531555712.js +1 -0
  258. package/.next/static/chunks/app/api/assistant/tools/route-973ec48531555712.js +1 -0
  259. package/.next/static/chunks/app/api/auth/login/route-973ec48531555712.js +1 -0
  260. package/.next/static/chunks/app/api/auth/logout/route-973ec48531555712.js +1 -0
  261. package/.next/static/chunks/app/api/auth/status/route-973ec48531555712.js +1 -0
  262. package/.next/static/chunks/app/api/daily-summary/route-973ec48531555712.js +1 -0
  263. package/.next/static/chunks/app/api/daily-summary/status/route-973ec48531555712.js +1 -0
  264. package/.next/static/chunks/app/api/external-apps/[id]/health/route-973ec48531555712.js +1 -0
  265. package/.next/static/chunks/app/api/external-apps/[id]/route-973ec48531555712.js +1 -0
  266. package/.next/static/chunks/app/api/external-apps/route-973ec48531555712.js +1 -0
  267. package/.next/static/chunks/app/api/fs/browse/route-973ec48531555712.js +1 -0
  268. package/.next/static/chunks/app/api/fs/recent-paths/route-973ec48531555712.js +1 -0
  269. package/.next/static/chunks/app/api/hooks/agent-event/route-973ec48531555712.js +1 -0
  270. package/.next/static/chunks/app/api/hooks/claude-done/route-973ec48531555712.js +1 -0
  271. package/.next/static/chunks/app/api/hooks/permission-request/route-973ec48531555712.js +1 -0
  272. package/.next/static/chunks/app/api/metrics/vibe/route-973ec48531555712.js +1 -0
  273. package/.next/static/chunks/app/api/ollama/models/route-973ec48531555712.js +1 -0
  274. package/.next/static/chunks/app/api/push/subscriptions/route-973ec48531555712.js +1 -0
  275. package/.next/static/chunks/app/api/push/vapid/route-973ec48531555712.js +1 -0
  276. package/.next/static/chunks/app/api/repositories/[id]/route-973ec48531555712.js +1 -0
  277. package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-973ec48531555712.js +1 -0
  278. package/.next/static/chunks/app/api/repositories/[id]/todos/route-973ec48531555712.js +1 -0
  279. package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-973ec48531555712.js +1 -0
  280. package/.next/static/chunks/app/api/repositories/clone/route-973ec48531555712.js +1 -0
  281. package/.next/static/chunks/app/api/repositories/excluded/route-973ec48531555712.js +1 -0
  282. package/.next/static/chunks/app/api/repositories/restore/route-973ec48531555712.js +1 -0
  283. package/.next/static/chunks/app/api/repositories/route-973ec48531555712.js +1 -0
  284. package/.next/static/chunks/app/api/repositories/scan/route-973ec48531555712.js +1 -0
  285. package/.next/static/chunks/app/api/repositories/sync/route-973ec48531555712.js +1 -0
  286. package/.next/static/chunks/app/api/repositories/validate-path/route-973ec48531555712.js +1 -0
  287. package/.next/static/chunks/app/api/sidebar/group-order/route-973ec48531555712.js +1 -0
  288. package/.next/static/chunks/app/api/skills/[id]/route-973ec48531555712.js +1 -0
  289. package/.next/static/chunks/app/api/skills/installations/route-973ec48531555712.js +1 -0
  290. package/.next/static/chunks/app/api/skills/operations/route-973ec48531555712.js +1 -0
  291. package/.next/static/chunks/app/api/skills/reindex/route-973ec48531555712.js +1 -0
  292. package/.next/static/chunks/app/api/skills/route-973ec48531555712.js +1 -0
  293. package/.next/static/chunks/app/api/slash-commands/route-973ec48531555712.js +1 -0
  294. package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-973ec48531555712.js +1 -0
  295. package/.next/static/chunks/app/api/tasks/[taskId]/route-973ec48531555712.js +1 -0
  296. package/.next/static/chunks/app/api/templates/[id]/route-973ec48531555712.js +1 -0
  297. package/.next/static/chunks/app/api/templates/route-973ec48531555712.js +1 -0
  298. package/.next/static/chunks/app/api/todos/route-973ec48531555712.js +1 -0
  299. package/.next/static/chunks/app/api/verification/runs/[runId]/route-973ec48531555712.js +1 -0
  300. package/.next/static/chunks/app/api/verification/runs/route-973ec48531555712.js +1 -0
  301. package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-973ec48531555712.js +1 -0
  302. package/.next/static/chunks/app/api/worktrees/[id]/capture/route-973ec48531555712.js +1 -0
  303. package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-973ec48531555712.js +1 -0
  304. package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-973ec48531555712.js +1 -0
  305. package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-973ec48531555712.js +1 -0
  306. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-973ec48531555712.js +1 -0
  307. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-973ec48531555712.js +1 -0
  308. package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-973ec48531555712.js +1 -0
  309. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-973ec48531555712.js +1 -0
  310. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-973ec48531555712.js +1 -0
  311. package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-973ec48531555712.js +1 -0
  312. package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-973ec48531555712.js +1 -0
  313. package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-973ec48531555712.js +1 -0
  314. package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-973ec48531555712.js +1 -0
  315. package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-973ec48531555712.js +1 -0
  316. package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-973ec48531555712.js +1 -0
  317. package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-973ec48531555712.js +1 -0
  318. package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-973ec48531555712.js +1 -0
  319. package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-973ec48531555712.js +1 -0
  320. package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-973ec48531555712.js +1 -0
  321. package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-973ec48531555712.js +1 -0
  322. package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-973ec48531555712.js +1 -0
  323. package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-973ec48531555712.js +1 -0
  324. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-973ec48531555712.js +1 -0
  325. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-973ec48531555712.js +1 -0
  326. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-973ec48531555712.js +1 -0
  327. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-973ec48531555712.js +1 -0
  328. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-973ec48531555712.js +1 -0
  329. package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-973ec48531555712.js +1 -0
  330. package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-973ec48531555712.js +1 -0
  331. package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-973ec48531555712.js +1 -0
  332. package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-973ec48531555712.js +1 -0
  333. package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-973ec48531555712.js +1 -0
  334. package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-973ec48531555712.js +1 -0
  335. package/.next/static/chunks/app/api/worktrees/[id]/logs/route-973ec48531555712.js +1 -0
  336. package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-973ec48531555712.js +1 -0
  337. package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-973ec48531555712.js +1 -0
  338. package/.next/static/chunks/app/api/worktrees/[id]/memos/route-973ec48531555712.js +1 -0
  339. package/.next/static/chunks/app/api/worktrees/[id]/messages/route-973ec48531555712.js +1 -0
  340. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-973ec48531555712.js +1 -0
  341. package/.next/static/chunks/app/api/worktrees/[id]/respond/route-973ec48531555712.js +1 -0
  342. package/.next/static/chunks/app/api/worktrees/[id]/route-973ec48531555712.js +1 -0
  343. package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-973ec48531555712.js +1 -0
  344. package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-973ec48531555712.js +1 -0
  345. package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-973ec48531555712.js +1 -0
  346. package/.next/static/chunks/app/api/worktrees/[id]/search/route-973ec48531555712.js +1 -0
  347. package/.next/static/chunks/app/api/worktrees/[id]/send/route-973ec48531555712.js +1 -0
  348. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-973ec48531555712.js +1 -0
  349. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-973ec48531555712.js +1 -0
  350. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-973ec48531555712.js +1 -0
  351. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-973ec48531555712.js +1 -0
  352. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-973ec48531555712.js +1 -0
  353. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-973ec48531555712.js +1 -0
  354. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-973ec48531555712.js +1 -0
  355. package/.next/static/chunks/app/api/worktrees/[id]/skills/route-973ec48531555712.js +1 -0
  356. package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-973ec48531555712.js +1 -0
  357. package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-973ec48531555712.js +1 -0
  358. package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-973ec48531555712.js +1 -0
  359. package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-973ec48531555712.js +1 -0
  360. package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-973ec48531555712.js +1 -0
  361. package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-973ec48531555712.js +1 -0
  362. package/.next/static/chunks/app/api/worktrees/[id]/timers/route-973ec48531555712.js +1 -0
  363. package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-973ec48531555712.js +1 -0
  364. package/.next/static/chunks/app/api/worktrees/[id]/todos/route-973ec48531555712.js +1 -0
  365. package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-973ec48531555712.js +1 -0
  366. package/.next/static/chunks/app/api/worktrees/[id]/tree/route-973ec48531555712.js +1 -0
  367. package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-973ec48531555712.js +1 -0
  368. package/.next/static/chunks/app/api/worktrees/[id]/verify/route-973ec48531555712.js +1 -0
  369. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-973ec48531555712.js +1 -0
  370. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-973ec48531555712.js +1 -0
  371. package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-973ec48531555712.js +1 -0
  372. package/.next/static/chunks/app/api/worktrees/route-973ec48531555712.js +1 -0
  373. package/.next/static/chunks/app/manifest.webmanifest/route-973ec48531555712.js +1 -0
  374. package/.next/static/chunks/app/proxy/[...path]/route-973ec48531555712.js +1 -0
  375. package/.next/static/chunks/app/worktrees/[id]/layout-973ec48531555712.js +1 -0
  376. package/.next/static/chunks/app/worktrees/[id]/page-c1be93f2595d0803.js +1 -0
  377. package/.next/static/d4vh4O18WEhXs4WbdShIs/_buildManifest.js +1 -0
  378. package/.next/trace +12 -12
  379. package/.next/types/app/api/hooks/permission-request/route.ts +347 -0
  380. package/.next/types/routes.d.ts +2 -1
  381. package/.next/types/validator.ts +9 -0
  382. package/dist/cli/commands/capture.d.ts.map +1 -1
  383. package/dist/cli/commands/capture.js +27 -1
  384. package/dist/cli/commands/respond.d.ts.map +1 -1
  385. package/dist/cli/commands/respond.js +9 -3
  386. package/dist/cli/commands/send.d.ts.map +1 -1
  387. package/dist/cli/commands/send.js +35 -0
  388. package/dist/cli/commands/wait.d.ts +4 -1
  389. package/dist/cli/commands/wait.d.ts.map +1 -1
  390. package/dist/cli/commands/wait.js +109 -2
  391. package/dist/cli/docs/agent-operations.d.ts +1 -1
  392. package/dist/cli/docs/agent-operations.d.ts.map +1 -1
  393. package/dist/cli/docs/agent-operations.js +39 -0
  394. package/dist/cli/types/api-responses.d.ts +69 -4
  395. package/dist/cli/types/api-responses.d.ts.map +1 -1
  396. package/dist/cli/types/index.d.ts +6 -0
  397. package/dist/cli/types/index.d.ts.map +1 -1
  398. package/dist/server/src/lib/detection/prompt-detect-multiple-choice.js +105 -1
  399. package/dist/server/src/lib/detection/unclassified-frame-tracker.js +96 -0
  400. package/dist/server/src/lib/env.js +27 -1
  401. package/dist/server/src/lib/hooks/agent-event-types.js +131 -0
  402. package/dist/server/src/lib/hooks/ask-user-question-payload.js +156 -0
  403. package/dist/server/src/lib/hooks/hook-settings-generator.js +411 -0
  404. package/dist/server/src/lib/hooks/permission-request-payload.js +144 -0
  405. package/dist/server/src/lib/polling/auto-yes-resolver.js +25 -10
  406. package/dist/server/src/lib/polling/auto-yes-suppression-state.js +2 -1
  407. package/dist/server/src/lib/session/agent-event-state.js +612 -11
  408. package/dist/server/src/lib/session/ask-user-question-prompt.js +295 -0
  409. package/dist/server/src/lib/session/claude-session.js +41 -2
  410. package/dist/server/src/lib/session/current-output-builder.js +375 -8
  411. package/dist/server/src/lib/session/prompt-waiting-composition.js +178 -0
  412. package/dist/server/src/lib/session/prompt-waiting-guard.js +147 -0
  413. package/dist/server/src/lib/session/send-user-message.js +35 -0
  414. package/dist/server/src/lib/session/status-mapping.js +121 -0
  415. package/dist/server/src/lib/session/structured-prompt.js +109 -0
  416. package/dist/server/src/types/models.js +30 -0
  417. package/package.json +3 -2
  418. package/scripts/hooks/cmate-agent-event.sh +44 -3
  419. package/.next/server/chunks/1355.js +0 -1
  420. package/.next/server/chunks/1598.js +0 -4
  421. package/.next/server/chunks/2366.js +0 -1
  422. package/.next/static/-A6IRK1c_KvFlxiDrsyVc/_buildManifest.js +0 -1
  423. package/.next/static/chunks/app/api/app/update/route-be21650964d61b1d.js +0 -1
  424. package/.next/static/chunks/app/api/app/update-check/route-be21650964d61b1d.js +0 -1
  425. package/.next/static/chunks/app/api/assistant/conversation/route-be21650964d61b1d.js +0 -1
  426. package/.next/static/chunks/app/api/assistant/current-output/route-be21650964d61b1d.js +0 -1
  427. package/.next/static/chunks/app/api/assistant/messages/route-be21650964d61b1d.js +0 -1
  428. package/.next/static/chunks/app/api/assistant/session/route-be21650964d61b1d.js +0 -1
  429. package/.next/static/chunks/app/api/assistant/start/route-be21650964d61b1d.js +0 -1
  430. package/.next/static/chunks/app/api/assistant/terminal/route-be21650964d61b1d.js +0 -1
  431. package/.next/static/chunks/app/api/assistant/tools/route-be21650964d61b1d.js +0 -1
  432. package/.next/static/chunks/app/api/auth/login/route-be21650964d61b1d.js +0 -1
  433. package/.next/static/chunks/app/api/auth/logout/route-be21650964d61b1d.js +0 -1
  434. package/.next/static/chunks/app/api/auth/status/route-be21650964d61b1d.js +0 -1
  435. package/.next/static/chunks/app/api/daily-summary/route-be21650964d61b1d.js +0 -1
  436. package/.next/static/chunks/app/api/daily-summary/status/route-be21650964d61b1d.js +0 -1
  437. package/.next/static/chunks/app/api/external-apps/[id]/health/route-be21650964d61b1d.js +0 -1
  438. package/.next/static/chunks/app/api/external-apps/[id]/route-be21650964d61b1d.js +0 -1
  439. package/.next/static/chunks/app/api/external-apps/route-be21650964d61b1d.js +0 -1
  440. package/.next/static/chunks/app/api/fs/browse/route-be21650964d61b1d.js +0 -1
  441. package/.next/static/chunks/app/api/fs/recent-paths/route-be21650964d61b1d.js +0 -1
  442. package/.next/static/chunks/app/api/hooks/agent-event/route-be21650964d61b1d.js +0 -1
  443. package/.next/static/chunks/app/api/hooks/claude-done/route-be21650964d61b1d.js +0 -1
  444. package/.next/static/chunks/app/api/metrics/vibe/route-be21650964d61b1d.js +0 -1
  445. package/.next/static/chunks/app/api/ollama/models/route-be21650964d61b1d.js +0 -1
  446. package/.next/static/chunks/app/api/push/subscriptions/route-be21650964d61b1d.js +0 -1
  447. package/.next/static/chunks/app/api/push/vapid/route-be21650964d61b1d.js +0 -1
  448. package/.next/static/chunks/app/api/repositories/[id]/route-be21650964d61b1d.js +0 -1
  449. package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-be21650964d61b1d.js +0 -1
  450. package/.next/static/chunks/app/api/repositories/[id]/todos/route-be21650964d61b1d.js +0 -1
  451. package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-be21650964d61b1d.js +0 -1
  452. package/.next/static/chunks/app/api/repositories/clone/route-be21650964d61b1d.js +0 -1
  453. package/.next/static/chunks/app/api/repositories/excluded/route-be21650964d61b1d.js +0 -1
  454. package/.next/static/chunks/app/api/repositories/restore/route-be21650964d61b1d.js +0 -1
  455. package/.next/static/chunks/app/api/repositories/route-be21650964d61b1d.js +0 -1
  456. package/.next/static/chunks/app/api/repositories/scan/route-be21650964d61b1d.js +0 -1
  457. package/.next/static/chunks/app/api/repositories/sync/route-be21650964d61b1d.js +0 -1
  458. package/.next/static/chunks/app/api/repositories/validate-path/route-be21650964d61b1d.js +0 -1
  459. package/.next/static/chunks/app/api/sidebar/group-order/route-be21650964d61b1d.js +0 -1
  460. package/.next/static/chunks/app/api/skills/[id]/route-be21650964d61b1d.js +0 -1
  461. package/.next/static/chunks/app/api/skills/installations/route-be21650964d61b1d.js +0 -1
  462. package/.next/static/chunks/app/api/skills/operations/route-be21650964d61b1d.js +0 -1
  463. package/.next/static/chunks/app/api/skills/reindex/route-be21650964d61b1d.js +0 -1
  464. package/.next/static/chunks/app/api/skills/route-be21650964d61b1d.js +0 -1
  465. package/.next/static/chunks/app/api/slash-commands/route-be21650964d61b1d.js +0 -1
  466. package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-be21650964d61b1d.js +0 -1
  467. package/.next/static/chunks/app/api/tasks/[taskId]/route-be21650964d61b1d.js +0 -1
  468. package/.next/static/chunks/app/api/templates/[id]/route-be21650964d61b1d.js +0 -1
  469. package/.next/static/chunks/app/api/templates/route-be21650964d61b1d.js +0 -1
  470. package/.next/static/chunks/app/api/todos/route-be21650964d61b1d.js +0 -1
  471. package/.next/static/chunks/app/api/verification/runs/[runId]/route-be21650964d61b1d.js +0 -1
  472. package/.next/static/chunks/app/api/verification/runs/route-be21650964d61b1d.js +0 -1
  473. package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-be21650964d61b1d.js +0 -1
  474. package/.next/static/chunks/app/api/worktrees/[id]/capture/route-be21650964d61b1d.js +0 -1
  475. package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-be21650964d61b1d.js +0 -1
  476. package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-be21650964d61b1d.js +0 -1
  477. package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-be21650964d61b1d.js +0 -1
  478. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-be21650964d61b1d.js +0 -1
  479. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-be21650964d61b1d.js +0 -1
  480. package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-be21650964d61b1d.js +0 -1
  481. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-be21650964d61b1d.js +0 -1
  482. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-be21650964d61b1d.js +0 -1
  483. package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-be21650964d61b1d.js +0 -1
  484. package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-be21650964d61b1d.js +0 -1
  485. package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-be21650964d61b1d.js +0 -1
  486. package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-be21650964d61b1d.js +0 -1
  487. package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-be21650964d61b1d.js +0 -1
  488. package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-be21650964d61b1d.js +0 -1
  489. package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-be21650964d61b1d.js +0 -1
  490. package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-be21650964d61b1d.js +0 -1
  491. package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-be21650964d61b1d.js +0 -1
  492. package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-be21650964d61b1d.js +0 -1
  493. package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-be21650964d61b1d.js +0 -1
  494. package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-be21650964d61b1d.js +0 -1
  495. package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-be21650964d61b1d.js +0 -1
  496. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-be21650964d61b1d.js +0 -1
  497. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-be21650964d61b1d.js +0 -1
  498. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-be21650964d61b1d.js +0 -1
  499. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-be21650964d61b1d.js +0 -1
  500. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-be21650964d61b1d.js +0 -1
  501. package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-be21650964d61b1d.js +0 -1
  502. package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-be21650964d61b1d.js +0 -1
  503. package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-be21650964d61b1d.js +0 -1
  504. package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-be21650964d61b1d.js +0 -1
  505. package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-be21650964d61b1d.js +0 -1
  506. package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-be21650964d61b1d.js +0 -1
  507. package/.next/static/chunks/app/api/worktrees/[id]/logs/route-be21650964d61b1d.js +0 -1
  508. package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-be21650964d61b1d.js +0 -1
  509. package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-be21650964d61b1d.js +0 -1
  510. package/.next/static/chunks/app/api/worktrees/[id]/memos/route-be21650964d61b1d.js +0 -1
  511. package/.next/static/chunks/app/api/worktrees/[id]/messages/route-be21650964d61b1d.js +0 -1
  512. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-be21650964d61b1d.js +0 -1
  513. package/.next/static/chunks/app/api/worktrees/[id]/respond/route-be21650964d61b1d.js +0 -1
  514. package/.next/static/chunks/app/api/worktrees/[id]/route-be21650964d61b1d.js +0 -1
  515. package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-be21650964d61b1d.js +0 -1
  516. package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-be21650964d61b1d.js +0 -1
  517. package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-be21650964d61b1d.js +0 -1
  518. package/.next/static/chunks/app/api/worktrees/[id]/search/route-be21650964d61b1d.js +0 -1
  519. package/.next/static/chunks/app/api/worktrees/[id]/send/route-be21650964d61b1d.js +0 -1
  520. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-be21650964d61b1d.js +0 -1
  521. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-be21650964d61b1d.js +0 -1
  522. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-be21650964d61b1d.js +0 -1
  523. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-be21650964d61b1d.js +0 -1
  524. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-be21650964d61b1d.js +0 -1
  525. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-be21650964d61b1d.js +0 -1
  526. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-be21650964d61b1d.js +0 -1
  527. package/.next/static/chunks/app/api/worktrees/[id]/skills/route-be21650964d61b1d.js +0 -1
  528. package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-be21650964d61b1d.js +0 -1
  529. package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-be21650964d61b1d.js +0 -1
  530. package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-be21650964d61b1d.js +0 -1
  531. package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-be21650964d61b1d.js +0 -1
  532. package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-be21650964d61b1d.js +0 -1
  533. package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-be21650964d61b1d.js +0 -1
  534. package/.next/static/chunks/app/api/worktrees/[id]/timers/route-be21650964d61b1d.js +0 -1
  535. package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-be21650964d61b1d.js +0 -1
  536. package/.next/static/chunks/app/api/worktrees/[id]/todos/route-be21650964d61b1d.js +0 -1
  537. package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-be21650964d61b1d.js +0 -1
  538. package/.next/static/chunks/app/api/worktrees/[id]/tree/route-be21650964d61b1d.js +0 -1
  539. package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-be21650964d61b1d.js +0 -1
  540. package/.next/static/chunks/app/api/worktrees/[id]/verify/route-be21650964d61b1d.js +0 -1
  541. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-be21650964d61b1d.js +0 -1
  542. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-be21650964d61b1d.js +0 -1
  543. package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-be21650964d61b1d.js +0 -1
  544. package/.next/static/chunks/app/api/worktrees/route-be21650964d61b1d.js +0 -1
  545. package/.next/static/chunks/app/manifest.webmanifest/route-be21650964d61b1d.js +0 -1
  546. package/.next/static/chunks/app/proxy/[...path]/route-be21650964d61b1d.js +0 -1
  547. package/.next/static/chunks/app/worktrees/[id]/layout-be21650964d61b1d.js +0 -1
  548. package/.next/static/chunks/app/worktrees/[id]/page-de42fed52de80834.js +0 -1
  549. /package/.next/static/{-A6IRK1c_KvFlxiDrsyVc → d4vh4O18WEhXs4WbdShIs}/_ssgManifest.js +0 -0
@@ -2,6 +2,7 @@
2
2
  /** Multiple choice prompt detection logic extracted from prompt-detector.ts (Issue #575). */
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.APPROVAL_TARGET_MAX_LOOKBACK = void 0;
5
+ exports.findClaudeTaskPanelLines = findClaudeTaskPanelLines;
5
6
  exports.findApprovalContextStart = findApprovalContextStart;
6
7
  exports.joinApprovalTarget = joinApprovalTarget;
7
8
  exports.buildMultipleChoiceResult = buildMultipleChoiceResult;
@@ -52,6 +53,93 @@ const DEFAULT_OPTION_PATTERN = /^\s*[\u276F\u25CF\u203A][^\d]*(\d+)(?:\.(?!\d)|\
52
53
  * Layer 4 (2+ options), and Layer 5 (SEC-001 question line validation).
53
54
  */
54
55
  const NORMAL_OPTION_PATTERN = /^\s*[^\d]{0,3}(\d+)(?:\.(?!\d)|\s+)\s*(.+)$/;
56
+ /**
57
+ * [Issue #1708] Header row of Claude Code's bottom-anchored task panel, e.g.
58
+ * " 7 tasks (0 done, 1 in progress, 6 open)"
59
+ *
60
+ * The panel is an overlay pinned to the LAST rows of the pane, structurally
61
+ * unrelated to whatever the agent is currently blocked on. In a production pane
62
+ * (200x1000, alternate screen) a prompt dialog therefore renders near the top and
63
+ * the panel ~880 blank rows below it — rows `compactBlankRows` collapses to one,
64
+ * putting the panel squarely inside Pass 2's 50-line reverse-scan window.
65
+ *
66
+ * That is only harmless while something trims it away. #704/#807 trim at a
67
+ * footer, but the AskUserQuestion *confirmation* step ("Ready to submit your
68
+ * answers?") renders NEITHER footer, so nothing trims and the panel is the first
69
+ * thing the reverse scan meets. Measured on the live capture in
70
+ * fixtures/claude-live-1708/askuserquestion-submit-taskpanel.txt, two of its rows
71
+ * match NORMAL_OPTION_PATTERN independently:
72
+ * - this header → option 7, label "tasks (2 done, 1 in progress, 4 open)"
73
+ * - "… +2 completed" → option 2, label "completed"
74
+ * Either one alone is enough to make isValidPrecedingOption() reject the real
75
+ * `❯ 1. Submit answers` / `2. Cancel` above it, so collectedOptions never reaches
76
+ * 2 and the frame is published as "no prompt" — Issue #1708's silent timeout.
77
+ *
78
+ * Anchored at line start and requires the literal `tasks (` + `<n> done`, which
79
+ * no option label produced by any supported CLI carries. ReDoS safe (S4-001):
80
+ * bounded repetition, no nesting.
81
+ */
82
+ const CLAUDE_TASK_PANEL_HEADER_PATTERN = /^\s*\d{1,3}\s+tasks?\s+\(\d+\s+done\b/i;
83
+ /**
84
+ * [Issue #1708] A single task row of the panel described above, e.g. " ◼ Phase 3".
85
+ *
86
+ * Today these rows are inert — `isContinuationLine()` already absorbs them — but
87
+ * only because none of the observed titles begins with a digit. A title like
88
+ * "2. Fix the parser" would render as " ◻ 2. Fix the parser" and be collected as
89
+ * option 2, reintroducing the same poisoning from a direction no single-line
90
+ * guard anticipates. Skipping the whole panel block closes that off structurally
91
+ * instead of one wording at a time.
92
+ *
93
+ * The glyph set is exactly the two forms measured on a live pane — ◼ (in
94
+ * progress) and ◻ (open) — and nothing else. Every extra glyph is a line this
95
+ * guard can delete from the frame, so the set is an allowlist of things seen,
96
+ * not a guess at what the family might contain:
97
+ *
98
+ * - ❯ ● › are DEFAULT_OPTION_PATTERN's cursor indicators.
99
+ * - ⏺ ⎿ ✔ ✗ are the transcript markers TURN_BOUNDARY_PATTERN reads.
100
+ * - ☐ ☑ ☒ are the natural rendering of a MULTI-SELECT choice, and
101
+ * AskUserQuestion has a multiSelect mode. Measured: with those in the set,
102
+ * `☐ 1. Blue / ☑ 2. Green / ☐ 3. Red` under a panel header is claimed as
103
+ * panel content and the prompt above it disappears entirely
104
+ * (isPrompt=false, zero options) — Issue #1708's own failure, recreated by
105
+ * its fix. See the regression test.
106
+ *
107
+ * A completed row never appears (the panel collapses those into `… +N
108
+ * completed`, which SUMMARY_LINE_PATTERN handles), so no done-marker is needed.
109
+ * An unmatched glyph simply ends the block, which is the safe direction: those
110
+ * rows go back to being handled exactly as they were before this guard existed.
111
+ *
112
+ * To widen this, capture a live pane that actually renders the new glyph and add
113
+ * it as a fixture. Do not widen it from the shape of the character.
114
+ */
115
+ const CLAUDE_TASK_PANEL_ROW_PATTERN = /^\s*[◼◻]\s/;
116
+ /**
117
+ * Line indices belonging to a Claude task panel within [start, end).
118
+ *
119
+ * Walks down from each header row for as long as rows keep looking like panel
120
+ * content (task rows or the collapsed `… +N …` summary). The first line that is
121
+ * neither ends the block, so a panel that abuts other content cannot swallow it.
122
+ *
123
+ * @param lines - Full frame, already ANSI/box stripped
124
+ * @param start - First index to consider (inclusive)
125
+ * @param end - Last index to consider (exclusive)
126
+ * @returns Indices Pass 2 must treat as metadata rather than options
127
+ */
128
+ function findClaudeTaskPanelLines(lines, start, end) {
129
+ const panelLines = new Set();
130
+ for (let i = Math.max(0, start); i < Math.min(end, lines.length); i++) {
131
+ if (!CLAUDE_TASK_PANEL_HEADER_PATTERN.test(lines[i]))
132
+ continue;
133
+ panelLines.add(i);
134
+ for (let j = i + 1; j < Math.min(end, lines.length); j++) {
135
+ const row = lines[j];
136
+ if (!CLAUDE_TASK_PANEL_ROW_PATTERN.test(row) && !SUMMARY_LINE_PATTERN.test(row))
137
+ break;
138
+ panelLines.add(j);
139
+ }
140
+ }
141
+ return panelLines;
142
+ }
55
143
  /**
56
144
  * Pattern for separator lines (horizontal rules).
57
145
  * Matches lines consisting only of dash (-) or em-dash (─) characters.
@@ -95,12 +183,17 @@ const COLLAPSED_OUTPUT_PATTERN = /^\s*\[[^\]]*\d+\s+lines?\]/i;
95
183
  * `3. Show me more`) — those still flow through NORMAL_OPTION_PATTERN.
96
184
  * - Optional leading ellipsis (… U+2026) and optional collapse direction
97
185
  * marker (+ - ↑ ↓ ⏵ ⏷) accept the variants observed in the wild.
186
+ * - [Issue #1708] `completed` joined `pending`/`more` after a live capture
187
+ * (fixtures/claude-live-1708) showed the task panel collapsing FINISHED
188
+ * rows as `… +2 completed`. That wording was outside the #704 guard, so it
189
+ * reached Pass 2 and was collected as `option 2 / label='completed'` —
190
+ * poisoning isValidPrecedingOption() exactly as `… +1 pending` used to.
98
191
  * - The pattern deliberately omits any free `(.+)` capture — it must
99
192
  * short-circuit, not extract data.
100
193
  *
101
194
  * Pattern shape: linear regex with no nested quantifiers — ReDoS safe (S4-001).
102
195
  */
103
- const SUMMARY_LINE_PATTERN = /^\s*[…]?\s*[+\-↑↓⏵⏷]?\s*\d+\s+(?:pending|more)\b/i;
196
+ const SUMMARY_LINE_PATTERN = /^\s*[…]?\s*[+\-↑↓⏵⏷]?\s*\d+\s+(?:pending|more|completed)\b/i;
104
197
  /**
105
198
  * [Issue #704] Pattern for the Claude Code v2.1.142 prompt footer line.
106
199
  * Example: " Esc to cancel · Tab to amend → · Herding…"
@@ -763,8 +856,19 @@ function detectMultipleChoicePrompt(output, options, truncateRawContentFn) {
763
856
  const collectedOptions = [];
764
857
  let questionEndIndex = -1;
765
858
  let continuationLineCount = 0;
859
+ // [Issue #1708] Claude's bottom-anchored task panel is an overlay, not part of
860
+ // the prompt frame. Resolved as a block up front because the reverse scan meets
861
+ // its rows before its header and so cannot recognise them one at a time.
862
+ const taskPanelLines = findClaudeTaskPanelLines(lines, scanStart, effectiveEnd);
766
863
  for (let i = effectiveEnd - 1; i >= scanStart; i--) {
767
864
  const line = lines[i].trim();
865
+ // [Issue #1708] Task-panel rows are metadata. Same handling as the
866
+ // COLLAPSED_OUTPUT / SUMMARY guards below: skip without ending the scan, so
867
+ // the options rendered ABOVE the panel are still reachable.
868
+ if (taskPanelLines.has(i)) {
869
+ continuationLineCount++;
870
+ continue;
871
+ }
768
872
  // Collapsed preview markers like "[… 12 lines] ctrl + a view all" are
769
873
  // metadata, not selectable options. Skip them before option parsing to
770
874
  // avoid misclassifying "12" as an option number.
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+ /**
3
+ * Dwell tracking for interactive frames the detection layer could not classify
4
+ * (Issue #1708).
5
+ *
6
+ * `isUnclassifiedActive` is a per-poll observation: the frame looked interactive
7
+ * and nothing parsed it. A single true reading proves nothing — a capture taken
8
+ * mid-repaint produces one routinely — so the signal only becomes actionable
9
+ * once it has held for a while. This module owns that "for a while", and owns
10
+ * the once-per-run guard that keeps a stalled session from writing a history row
11
+ * on every poll.
12
+ *
13
+ * Deliberately free of I/O: the caller decides what to do with the verdict. The
14
+ * state is in-memory and per-process, matching the Auto-Yes prompt dedup it sits
15
+ * beside — a server restart re-arms the tracker, which costs at most one
16
+ * duplicate record and never a missed one.
17
+ */
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.UNCLASSIFIED_RECORD_DWELL_MS = void 0;
20
+ exports.observeUnclassifiedFrame = observeUnclassifiedFrame;
21
+ exports.resetUnclassifiedFrameTracking = resetUnclassifiedFrameTracking;
22
+ exports.unclassifiedFrameRunCount = unclassifiedFrameRunCount;
23
+ /**
24
+ * How long a frame must stay unclassified before it is worth recording.
25
+ *
26
+ * Matches UNCLASSIFIED_DWELL_MS in src/cli/commands/wait.ts on purpose: the row
27
+ * this produces is the audit trail for exactly the state `wait` reports as
28
+ * exit 10, and two different thresholds would leave one of them explaining a
29
+ * stall the other never saw.
30
+ */
31
+ exports.UNCLASSIFIED_RECORD_DWELL_MS = 60_000;
32
+ const runs = globalThis.__unclassifiedFrameRuns ??
33
+ (globalThis.__unclassifiedFrameRuns = new Map());
34
+ /**
35
+ * How long an unobserved run survives before it is dropped.
36
+ *
37
+ * A run normally ends when its session reports a classified frame. It can also
38
+ * end by nobody ever asking again — the worktree was removed, the session was
39
+ * killed, the browser tab was closed. Nothing calls back to say so, so entries
40
+ * are aged out instead. Generous on purpose: it only has to be longer than any
41
+ * real polling gap, and an entry that is dropped early merely restarts the dwell
42
+ * for a session nobody is watching.
43
+ */
44
+ const RUN_IDLE_TTL_MS = 60 * 60 * 1000;
45
+ /** Drop runs nothing has reported on for {@link RUN_IDLE_TTL_MS}. */
46
+ function pruneExpiredRuns(now) {
47
+ for (const [key, run] of runs) {
48
+ if (now - run.lastSeen > RUN_IDLE_TTL_MS)
49
+ runs.delete(key);
50
+ }
51
+ }
52
+ /**
53
+ * Fold one poll's `isUnclassifiedActive` reading into the run for `key`.
54
+ *
55
+ * @param key - Session identity; use the same composite key the pollers use
56
+ * (worktree:cliTool:instance) so instances of one agent track separately
57
+ * @param isUnclassifiedActive - This poll's reading
58
+ * @param now - Epoch ms, injectable for tests
59
+ */
60
+ function observeUnclassifiedFrame(key, isUnclassifiedActive, now = Date.now()) {
61
+ pruneExpiredRuns(now);
62
+ if (!isUnclassifiedActive) {
63
+ runs.delete(key);
64
+ return { dwellMs: 0, shouldRecord: false };
65
+ }
66
+ const run = runs.get(key);
67
+ if (!run) {
68
+ runs.set(key, { since: now, lastSeen: now, recorded: false });
69
+ return { dwellMs: 0, shouldRecord: false };
70
+ }
71
+ run.lastSeen = now;
72
+ // A clock that went backwards (NTP step) must not park the run at a dwell it
73
+ // can never work off; treat it as a fresh start instead.
74
+ const dwellMs = Math.max(0, now - run.since);
75
+ if (run.recorded || dwellMs < exports.UNCLASSIFIED_RECORD_DWELL_MS) {
76
+ return { dwellMs, shouldRecord: false };
77
+ }
78
+ run.recorded = true;
79
+ return { dwellMs, shouldRecord: true };
80
+ }
81
+ /**
82
+ * Forget tracking state.
83
+ *
84
+ * @param key - Session to forget; omit to clear every session (tests)
85
+ */
86
+ function resetUnclassifiedFrameTracking(key) {
87
+ if (key === undefined) {
88
+ runs.clear();
89
+ return;
90
+ }
91
+ runs.delete(key);
92
+ }
93
+ /** Number of sessions currently being tracked. Test-only. @internal */
94
+ function unclassifiedFrameRunCount() {
95
+ return runs.size;
96
+ }
@@ -20,6 +20,7 @@ exports.getEnvByKey = getEnvByKey;
20
20
  exports.resetDatabasePathWarning = resetDatabasePathWarning;
21
21
  exports.getDatabasePathWithDeprecationWarning = getDatabasePathWithDeprecationWarning;
22
22
  exports.getLogConfig = getLogConfig;
23
+ exports.getServerPort = getServerPort;
23
24
  exports.getEnv = getEnv;
24
25
  exports.validateEnv = validateEnv;
25
26
  const path_1 = __importDefault(require("path"));
@@ -141,6 +142,31 @@ function getLogConfig() {
141
142
  format: formatEnv === 'json' ? 'json' : 'text',
142
143
  };
143
144
  }
145
+ /** Fallback port, shared by {@link getServerPort} and {@link getEnv}. */
146
+ const DEFAULT_PORT = 3000;
147
+ /**
148
+ * The port this server listens on, for callers that only need the port.
149
+ *
150
+ * Distinct from {@link getEnv} in two ways that matter to its users: it does no
151
+ * database-path resolution, and it never throws. Issue #1722 builds the hook
152
+ * endpoint URL baked into every injected Claude settings file from this, on the
153
+ * session-start path — where an unrelated `CM_DB_PATH` problem must not be able
154
+ * to prevent an agent from starting, and a nonsense `CM_PORT` should degrade to
155
+ * hooks pointing at the default port rather than to no session at all.
156
+ *
157
+ * @returns A port in [1, 65535]; {@link DEFAULT_PORT} when CM_PORT is unset or
158
+ * unusable
159
+ */
160
+ function getServerPort() {
161
+ const raw = getEnvByKey('CM_PORT');
162
+ if (!raw)
163
+ return DEFAULT_PORT;
164
+ const port = parseInt(raw, 10);
165
+ if (isNaN(port) || port < 1 || port > 65535) {
166
+ return DEFAULT_PORT;
167
+ }
168
+ return port;
169
+ }
144
170
  /**
145
171
  * Get and validate environment variables (with fallback support)
146
172
  *
@@ -156,7 +182,7 @@ function getLogConfig() {
156
182
  function getEnv() {
157
183
  // Get raw values with defaults (using fallback support)
158
184
  const rootDir = getEnvByKey('CM_ROOT_DIR') || process.cwd();
159
- const port = parseInt(getEnvByKey('CM_PORT') || '3000', 10);
185
+ const port = parseInt(getEnvByKey('CM_PORT') || String(DEFAULT_PORT), 10);
160
186
  const bind = getEnvByKey('CM_BIND') || '127.0.0.1';
161
187
  // Issue #135: DB path resolution with proper fallback chain
162
188
  // Priority: CM_DB_PATH > DATABASE_PATH (deprecated) > getDefaultDbPath()
@@ -0,0 +1,131 @@
1
+ "use strict";
2
+ /**
3
+ * The vocabulary shared by the hook receiver, the injected settings generator
4
+ * and the in-memory session state (Issue #1722).
5
+ *
6
+ * Split out of `agent-event-service` so the pieces that only need the words —
7
+ * the settings generator, `lib/session/agent-event-state` — can have them
8
+ * without pulling in SQLite, the task state machine and the verification
9
+ * runner. `agent-event-service` re-exports everything here, so existing
10
+ * importers are unaffected.
11
+ *
12
+ * The mapping below is not derived from Claude Code's documentation. It is
13
+ * derived from the payloads in `tests/fixtures/hooks/claude/`, captured from a
14
+ * live v2.1.223 session in Issue #1721 and written up in
15
+ * `docs/design/agent-hooks-live-verification.md`. Where the two disagree, the
16
+ * fixtures win.
17
+ *
18
+ * @module lib/hooks/agent-event-types
19
+ */
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ exports.MAX_EVENT_DETAIL_LENGTH = exports.CLAUDE_HOOK_EVENT_NAMES = exports.AGENT_EVENT_TYPES = void 0;
22
+ exports.isAgentEventType = isAgentEventType;
23
+ exports.mapClaudeHookEventName = mapClaudeHookEventName;
24
+ exports.extractClaudeEventDetail = extractClaudeEventDetail;
25
+ /**
26
+ * Event kinds accepted by `POST /api/hooks/agent-event`.
27
+ *
28
+ * `stop` is the only one that moves anything. The rest are accepted, recorded
29
+ * and exposed for observation; wiring them into `sessionStatus` / `wait` /
30
+ * Auto-Yes is Issue #1723's job, deliberately kept separate so a change to the
31
+ * completion verdict is never a side effect of adding a receiver (#1549).
32
+ *
33
+ * `pre_tool_use` / `post_tool_use` (Issue #1726) are the two events received for
34
+ * a *specific* tool rather than for the session: the injected hooks carry
35
+ * `matcher: "AskUserQuestion"`, so they bracket the agent asking the human a
36
+ * question — the first carries the question and its options in `tool_input`, the
37
+ * second says the call is over. Both are observations; this receiver never
38
+ * answers either with a decision.
39
+ */
40
+ exports.AGENT_EVENT_TYPES = [
41
+ 'stop',
42
+ 'notification',
43
+ 'session_start',
44
+ 'user_prompt_submit',
45
+ 'session_end',
46
+ 'pre_tool_use',
47
+ 'post_tool_use',
48
+ ];
49
+ function isAgentEventType(value) {
50
+ return typeof value === 'string' && exports.AGENT_EVENT_TYPES.includes(value);
51
+ }
52
+ /**
53
+ * Claude Code's own `hook_event_name` values, mapped onto the vocabulary above.
54
+ *
55
+ * An injected `type: "http"` hook posts Claude's payload verbatim — there is no
56
+ * way to shape the body — so the receiver has to read Claude's spelling. Only
57
+ * the events CommandMate injects are listed, and an unmapped name is refused
58
+ * rather than silently filed under something else.
59
+ *
60
+ * `PermissionRequest` is absent because it has its own receiver: its response
61
+ * body is a decision the agent obeys, which is the opposite contract to this
62
+ * fire-and-forget route (#1724).
63
+ *
64
+ * `PostToolUse` **is** mapped, on the strength of a measurement taken for Issue
65
+ * #1726 rather than of the #1721 spike, which recorded it as unobserved. Driving
66
+ * a live v2.1.223 session on 2026-08-06 with a `PostToolUse` hook registered:
67
+ *
68
+ * ```
69
+ * 15:36:04.112 PreToolUse AskUserQuestion (picker drawn)
70
+ * 15:36:10.127 Notification permission_prompt (picker still up)
71
+ * 15:36:28.643 PostToolUse AskUserQuestion (the human answered)
72
+ * 15:36:29.992 Stop
73
+ * ```
74
+ *
75
+ * It fires, and it is the precise signal — "this tool call is over" — where
76
+ * `Stop` is "the turn is over" and can be minutes later if the agent keeps
77
+ * working after the answer. Both are wired up; see `agent-event-state`.
78
+ */
79
+ exports.CLAUDE_HOOK_EVENT_NAMES = {
80
+ Stop: 'stop',
81
+ SubagentStop: 'stop',
82
+ Notification: 'notification',
83
+ SessionStart: 'session_start',
84
+ SessionEnd: 'session_end',
85
+ UserPromptSubmit: 'user_prompt_submit',
86
+ // Issue #1726. Injected with matcher `AskUserQuestion`, so in practice these
87
+ // only ever arrive for that tool — but the receiver re-reads `tool_name`
88
+ // rather than trusting the matcher, because a user's own settings.json is
89
+ // concatenated with the injected one and may register a wider matcher.
90
+ PreToolUse: 'pre_tool_use',
91
+ PostToolUse: 'post_tool_use',
92
+ };
93
+ /** @returns The event this `hook_event_name` maps to, or null when unmapped. */
94
+ function mapClaudeHookEventName(value) {
95
+ if (typeof value !== 'string')
96
+ return null;
97
+ return exports.CLAUDE_HOOK_EVENT_NAMES[value] ?? null;
98
+ }
99
+ /** Bound on the stored `detail`; every observed value is a short enum-ish word. */
100
+ exports.MAX_EVENT_DETAIL_LENGTH = 128;
101
+ /**
102
+ * The event's subtype, as a single short string, or null when it has none.
103
+ *
104
+ * Each event spells this differently and none of them share a field:
105
+ *
106
+ * - `Notification` → `notification_type` (`permission_prompt` / `idle_prompt`).
107
+ * This is also what a `Notification` matcher is tested against — **not**
108
+ * `message`, which is English prose for a human (D3).
109
+ * - `SessionEnd` → `reason` (`clear` / `prompt_input_exit` / …)
110
+ * - `SessionStart` → `source` (`startup` / `clear` / …)
111
+ * - `PreToolUse` / `PostToolUse` → `tool_name` (`AskUserQuestion`), Issue #1726
112
+ *
113
+ * `Stop` and `UserPromptSubmit` have no subtype, so they answer null.
114
+ */
115
+ function extractClaudeEventDetail(event, payload) {
116
+ const field = event === 'notification'
117
+ ? 'notification_type'
118
+ : event === 'session_end'
119
+ ? 'reason'
120
+ : event === 'session_start'
121
+ ? 'source'
122
+ : event === 'pre_tool_use' || event === 'post_tool_use'
123
+ ? 'tool_name'
124
+ : null;
125
+ if (field === null)
126
+ return null;
127
+ const value = payload[field];
128
+ if (typeof value !== 'string' || value === '')
129
+ return null;
130
+ return value.slice(0, exports.MAX_EVENT_DETAIL_LENGTH);
131
+ }
@@ -0,0 +1,156 @@
1
+ "use strict";
2
+ /**
3
+ * Reading Claude Code's `AskUserQuestion` tool input (Issue #1726).
4
+ *
5
+ * The shape here is taken from the payloads the Issue #1721 spike captured from
6
+ * a live v2.1.223 session — `tests/fixtures/hooks/claude/`
7
+ * `pre-tool-use-ask-user-question.json` and
8
+ * `permission-request-ask-user-question.json` — not from documentation. Where
9
+ * the two disagree the fixtures win, and the fixtures are asserted against in
10
+ * `tests/unit/hooks/ask-user-question-payload.test.ts` so a Claude-side shape
11
+ * change fails a test instead of silently emptying the options.
12
+ *
13
+ * ```json
14
+ * { "hook_event_name": "PreToolUse", "tool_name": "AskUserQuestion",
15
+ * "tool_input": { "questions": [
16
+ * { "question": "…", "header": "Color", "multiSelect": false,
17
+ * "options": [ { "label": "Blue", "description": "…" } ] } ] } }
18
+ * ```
19
+ *
20
+ * Two facts about the payload decide everything downstream:
21
+ *
22
+ * - **`tool_use_id` is not a correlation key.** It is present on `PreToolUse`
23
+ * and absent from `PermissionRequest` (D2), so nothing here reads it.
24
+ * Correlation is (worktree, tool, instance) from the injected hook URL, which
25
+ * is what every other structured state in this codebase is keyed by.
26
+ * - **The payload describes the *questions*, not the *screen*.** The picker
27
+ * renders these options and then appends its own ("Type something." / "Chat
28
+ * about this"), and the final step replaces them entirely with "1. Submit
29
+ * answers / 2. Cancel". Turning a payload into a set of answerable options is
30
+ * therefore `lib/session/ask-user-question-prompt`'s job, not this module's.
31
+ *
32
+ * Parsing is strict, and every rejection degrades to the behaviour of a machine
33
+ * without this feature: `null` means "no structured options", which leaves the
34
+ * scraper's parsed prompt exactly as it was.
35
+ *
36
+ * @module lib/hooks/ask-user-question-payload
37
+ */
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.MAX_ASK_USER_QUESTION_HEADER_LENGTH = exports.MAX_ASK_USER_QUESTION_DESCRIPTION_LENGTH = exports.MAX_ASK_USER_QUESTION_LABEL_LENGTH = exports.MAX_ASK_USER_QUESTION_TEXT_LENGTH = exports.MAX_ASK_USER_QUESTION_OPTIONS = exports.MAX_ASK_USER_QUESTIONS = void 0;
40
+ exports.parseAskUserQuestionToolInput = parseAskUserQuestionToolInput;
41
+ exports.parseAskUserQuestionPayload = parseAskUserQuestionPayload;
42
+ const permission_request_payload_1 = require("./permission-request-payload");
43
+ /** Cap on questions in one tool call. The observed payloads carry 1–3. */
44
+ exports.MAX_ASK_USER_QUESTIONS = 20;
45
+ /**
46
+ * Cap on options in one question.
47
+ *
48
+ * 20 is the same ceiling `prompt-detect-multiple-choice` puts on an option
49
+ * number, so a payload this module accepts can always be lined up against a
50
+ * screen the detector accepted.
51
+ */
52
+ exports.MAX_ASK_USER_QUESTION_OPTIONS = 20;
53
+ /** Bound on the question text; it is displayed and stored, never matched on. */
54
+ exports.MAX_ASK_USER_QUESTION_TEXT_LENGTH = 1000;
55
+ /** Bound on an option label. Labels are compared against screen text. */
56
+ exports.MAX_ASK_USER_QUESTION_LABEL_LENGTH = 200;
57
+ /** Bound on an option description — prose, shown under the label. */
58
+ exports.MAX_ASK_USER_QUESTION_DESCRIPTION_LENGTH = 500;
59
+ /** Bound on the tab header Claude renders for each question. */
60
+ exports.MAX_ASK_USER_QUESTION_HEADER_LENGTH = 64;
61
+ function isPlainObject(value) {
62
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
63
+ }
64
+ function readBoundedString(value, max) {
65
+ if (typeof value !== 'string')
66
+ return null;
67
+ const trimmed = value.trim();
68
+ if (trimmed === '')
69
+ return null;
70
+ return trimmed.slice(0, max);
71
+ }
72
+ function parseChoice(value) {
73
+ if (!isPlainObject(value))
74
+ return null;
75
+ const label = readBoundedString(value.label, exports.MAX_ASK_USER_QUESTION_LABEL_LENGTH);
76
+ if (label === null)
77
+ return null;
78
+ return {
79
+ label,
80
+ description: readBoundedString(value.description, exports.MAX_ASK_USER_QUESTION_DESCRIPTION_LENGTH),
81
+ };
82
+ }
83
+ function parseEntry(value) {
84
+ if (!isPlainObject(value))
85
+ return null;
86
+ const question = readBoundedString(value.question, exports.MAX_ASK_USER_QUESTION_TEXT_LENGTH);
87
+ if (question === null)
88
+ return null;
89
+ if (!Array.isArray(value.options) || value.options.length === 0)
90
+ return null;
91
+ if (value.options.length > exports.MAX_ASK_USER_QUESTION_OPTIONS)
92
+ return null;
93
+ const choices = [];
94
+ for (const option of value.options) {
95
+ const choice = parseChoice(option);
96
+ // A question with an unreadable option is a question this server cannot
97
+ // line up against the screen by position, and position is the whole of the
98
+ // correspondence rule. Refuse the payload rather than shift the numbering.
99
+ if (choice === null)
100
+ return null;
101
+ choices.push(choice);
102
+ }
103
+ return {
104
+ question,
105
+ header: readBoundedString(value.header, exports.MAX_ASK_USER_QUESTION_HEADER_LENGTH),
106
+ multiSelect: value.multiSelect === true,
107
+ choices,
108
+ };
109
+ }
110
+ /**
111
+ * Parse the `questions` array out of an `AskUserQuestion` `tool_input`.
112
+ *
113
+ * @returns The questions, or null when the input is not one this server can
114
+ * vouch for — which every caller must treat as "no structured options".
115
+ */
116
+ function parseAskUserQuestionToolInput(toolInput) {
117
+ if (!isPlainObject(toolInput))
118
+ return null;
119
+ if (!Array.isArray(toolInput.questions) || toolInput.questions.length === 0)
120
+ return null;
121
+ if (toolInput.questions.length > exports.MAX_ASK_USER_QUESTIONS)
122
+ return null;
123
+ const questions = [];
124
+ for (const raw of toolInput.questions) {
125
+ const entry = parseEntry(raw);
126
+ if (entry === null)
127
+ return null;
128
+ questions.push(entry);
129
+ }
130
+ return questions;
131
+ }
132
+ /**
133
+ * Parse a hook body that may be an `AskUserQuestion` tool call.
134
+ *
135
+ * Accepts any `hook_event_name` — `PreToolUse` is what Issue #1726 injects, and
136
+ * `PermissionRequest` carries a byte-identical `tool_input` (§5.6), so both are
137
+ * usable evidence of the same call. What is checked is `tool_name`: a payload
138
+ * for any other tool answers null.
139
+ *
140
+ * @param body - Whatever was posted to a hook receiver
141
+ * @returns The spec, or null when this is not an `AskUserQuestion` call this
142
+ * server can read.
143
+ */
144
+ function parseAskUserQuestionPayload(body) {
145
+ if (!isPlainObject(body))
146
+ return null;
147
+ if (body.tool_name !== permission_request_payload_1.ASK_USER_QUESTION_TOOL)
148
+ return null;
149
+ const questions = parseAskUserQuestionToolInput(body.tool_input);
150
+ if (questions === null)
151
+ return null;
152
+ return {
153
+ questions,
154
+ promptId: readBoundedString(body.prompt_id, 256),
155
+ };
156
+ }