commandmate 0.37.0 → 0.38.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 (331) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +176 -176
  3. package/.next/app-path-routes-manifest.json +33 -33
  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/agents/update/route_client-reference-manifest.js +1 -1
  9. package/.next/server/app/api/agents/versions/route_client-reference-manifest.js +1 -1
  10. package/.next/server/app/api/app/update/route_client-reference-manifest.js +1 -1
  11. package/.next/server/app/api/app/update-check/route.js +1 -1
  12. package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
  13. package/.next/server/app/api/assistant/conversation/route.js.nft.json +1 -1
  14. package/.next/server/app/api/assistant/conversation/route_client-reference-manifest.js +1 -1
  15. package/.next/server/app/api/assistant/current-output/route.js.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.nft.json +1 -1
  30. package/.next/server/app/api/assistant/tools/route_client-reference-manifest.js +1 -1
  31. package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  32. package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  33. package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  34. package/.next/server/app/api/capabilities/route.js +1 -1
  35. package/.next/server/app/api/capabilities/route_client-reference-manifest.js +1 -1
  36. package/.next/server/app/api/daily-summary/route.js +1 -1
  37. package/.next/server/app/api/daily-summary/route.js.nft.json +1 -1
  38. package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +1 -1
  39. package/.next/server/app/api/daily-summary/status/route.js +1 -1
  40. package/.next/server/app/api/daily-summary/status/route.js.nft.json +1 -1
  41. package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
  42. package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
  43. package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
  44. package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
  45. package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -1
  46. package/.next/server/app/api/fs/recent-paths/route_client-reference-manifest.js +1 -1
  47. package/.next/server/app/api/hooks/agent-event/route.js +1 -1
  48. package/.next/server/app/api/hooks/agent-event/route.js.nft.json +1 -1
  49. package/.next/server/app/api/hooks/agent-event/route_client-reference-manifest.js +1 -1
  50. package/.next/server/app/api/hooks/claude-done/route.js +1 -1
  51. package/.next/server/app/api/hooks/claude-done/route.js.nft.json +1 -1
  52. package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
  53. package/.next/server/app/api/hooks/permission-request/route.js +1 -1
  54. package/.next/server/app/api/hooks/permission-request/route.js.nft.json +1 -1
  55. package/.next/server/app/api/hooks/permission-request/route_client-reference-manifest.js +1 -1
  56. package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -1
  57. package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
  58. package/.next/server/app/api/push/escalation/route.js +1 -1
  59. package/.next/server/app/api/push/escalation/route.js.nft.json +1 -1
  60. package/.next/server/app/api/push/escalation/route_client-reference-manifest.js +1 -1
  61. package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
  62. package/.next/server/app/api/push/vapid/route.js +1 -1
  63. package/.next/server/app/api/push/vapid/route.js.nft.json +1 -1
  64. package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
  65. package/.next/server/app/api/relays/[relayId]/cancel/route.js.nft.json +1 -1
  66. package/.next/server/app/api/relays/[relayId]/cancel/route_client-reference-manifest.js +1 -1
  67. package/.next/server/app/api/relays/route.js.nft.json +1 -1
  68. package/.next/server/app/api/relays/route_client-reference-manifest.js +1 -1
  69. package/.next/server/app/api/remote/pair/route_client-reference-manifest.js +1 -1
  70. package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
  71. package/.next/server/app/api/repositories/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  72. package/.next/server/app/api/repositories/[id]/todos/route_client-reference-manifest.js +1 -1
  73. package/.next/server/app/api/repositories/clone/[jobId]/route.js +1 -1
  74. package/.next/server/app/api/repositories/clone/[jobId]/route.js.nft.json +1 -1
  75. package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
  76. package/.next/server/app/api/repositories/clone/route.js +1 -1
  77. package/.next/server/app/api/repositories/clone/route.js.nft.json +1 -1
  78. package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
  79. package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
  80. package/.next/server/app/api/repositories/restore/route.js +1 -1
  81. package/.next/server/app/api/repositories/restore/route.js.nft.json +1 -1
  82. package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
  83. package/.next/server/app/api/repositories/route.js +1 -1
  84. package/.next/server/app/api/repositories/route.js.nft.json +1 -1
  85. package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
  86. package/.next/server/app/api/repositories/scan/route.js +1 -1
  87. package/.next/server/app/api/repositories/scan/route.js.nft.json +1 -1
  88. package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
  89. package/.next/server/app/api/repositories/sync/route.js +1 -1
  90. package/.next/server/app/api/repositories/sync/route.js.nft.json +1 -1
  91. package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
  92. package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
  93. package/.next/server/app/api/settings/default-agents/route.js.nft.json +1 -1
  94. package/.next/server/app/api/settings/default-agents/route_client-reference-manifest.js +1 -1
  95. package/.next/server/app/api/settings/default-surface-mode/route_client-reference-manifest.js +1 -1
  96. package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
  97. package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
  98. package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
  99. package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
  100. package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
  101. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  102. package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
  103. package/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
  104. package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
  105. package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
  106. package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
  107. package/.next/server/app/api/todos/route_client-reference-manifest.js +1 -1
  108. package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -1
  109. package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -1
  110. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
  111. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js.nft.json +1 -1
  112. package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
  113. package/.next/server/app/api/worktrees/[id]/capture/route.js.nft.json +1 -1
  114. package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
  115. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js +1 -1
  116. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js.nft.json +1 -1
  117. package/.next/server/app/api/worktrees/[id]/clear-composer/route_client-reference-manifest.js +1 -1
  118. package/.next/server/app/api/worktrees/[id]/cli-reference/route_client-reference-manifest.js +1 -1
  119. package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
  120. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js +1 -1
  121. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js.nft.json +1 -1
  122. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
  123. package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
  124. package/.next/server/app/api/worktrees/[id]/current-output/route.js.nft.json +1 -1
  125. package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
  126. package/.next/server/app/api/worktrees/[id]/env/route_client-reference-manifest.js +1 -1
  127. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
  128. package/.next/server/app/api/worktrees/[id]/execution-logs/route.js +4 -3
  129. package/.next/server/app/api/worktrees/[id]/execution-logs/route.js.nft.json +1 -1
  130. package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
  131. package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
  132. package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
  133. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
  134. package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
  135. package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
  136. package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
  137. package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
  138. package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
  139. package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
  140. package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
  141. package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
  142. package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
  143. package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
  144. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
  145. package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
  146. package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
  147. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
  148. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
  149. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
  150. package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
  151. package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
  152. package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
  153. package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
  154. package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
  155. package/.next/server/app/api/worktrees/[id]/instances/notes/route_client-reference-manifest.js +1 -1
  156. package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js.nft.json +1 -1
  157. package/.next/server/app/api/worktrees/[id]/instances/opencode/route_client-reference-manifest.js +1 -1
  158. package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
  159. package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
  160. package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -1
  161. package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
  162. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
  163. package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
  164. package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
  165. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
  166. package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
  167. package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
  168. package/.next/server/app/api/worktrees/[id]/opencode/diff/route_client-reference-manifest.js +1 -1
  169. package/.next/server/app/api/worktrees/[id]/opencode/session/route_client-reference-manifest.js +1 -1
  170. package/.next/server/app/api/worktrees/[id]/opencode/share/route_client-reference-manifest.js +1 -1
  171. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
  172. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -1
  173. package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
  174. package/.next/server/app/api/worktrees/[id]/resolve-target/route_client-reference-manifest.js +1 -1
  175. package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -1
  176. package/.next/server/app/api/worktrees/[id]/respond/route.js.nft.json +1 -1
  177. package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
  178. package/.next/server/app/api/worktrees/[id]/route.js +1 -1
  179. package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
  180. package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
  181. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js +1 -6
  182. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js.nft.json +1 -1
  183. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
  184. package/.next/server/app/api/worktrees/[id]/schedules/active/route.js +1 -1
  185. package/.next/server/app/api/worktrees/[id]/schedules/active/route.js.nft.json +1 -1
  186. package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
  187. package/.next/server/app/api/worktrees/[id]/schedules/route.js +2 -7
  188. package/.next/server/app/api/worktrees/[id]/schedules/route.js.nft.json +1 -1
  189. package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
  190. package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
  191. package/.next/server/app/api/worktrees/[id]/send/route.js +1 -1
  192. package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
  193. package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
  194. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -1
  195. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
  196. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
  197. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
  198. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
  199. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
  200. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route_client-reference-manifest.js +1 -1
  201. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route_client-reference-manifest.js +1 -1
  202. package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
  203. package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
  204. package/.next/server/app/api/worktrees/[id]/special-keys/route.js +1 -1
  205. package/.next/server/app/api/worktrees/[id]/special-keys/route.js.nft.json +1 -1
  206. package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
  207. package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -1
  208. package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
  209. package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
  210. package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
  211. package/.next/server/app/api/worktrees/[id]/timers/route.js +1 -1
  212. package/.next/server/app/api/worktrees/[id]/timers/route.js.nft.json +1 -1
  213. package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
  214. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  215. package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
  216. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
  217. package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
  218. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
  219. package/.next/server/app/api/worktrees/[id]/verify/config/route_client-reference-manifest.js +1 -1
  220. package/.next/server/app/api/worktrees/[id]/verify/route.js +1 -1
  221. package/.next/server/app/api/worktrees/[id]/verify/route.js.nft.json +1 -1
  222. package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -1
  223. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route.js +1 -1
  224. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route.js.nft.json +1 -1
  225. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route_client-reference-manifest.js +1 -1
  226. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -1
  227. package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -1
  228. package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
  229. package/.next/server/app/api/worktrees/apply-default-agents/route_client-reference-manifest.js +1 -1
  230. package/.next/server/app/api/worktrees/route.js +1 -1
  231. package/.next/server/app/api/worktrees/route.js.nft.json +1 -1
  232. package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
  233. package/.next/server/app/chat/page_client-reference-manifest.js +1 -1
  234. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  235. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  236. package/.next/server/app/more/page_client-reference-manifest.js +1 -1
  237. package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  238. package/.next/server/app/page_client-reference-manifest.js +1 -1
  239. package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
  240. package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
  241. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  242. package/.next/server/app/sessions/page.js +1 -1
  243. package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  244. package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
  245. package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
  246. package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  247. package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
  248. package/.next/server/app/worktrees/[id]/page.js +11 -9
  249. package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
  250. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
  251. package/.next/server/app-paths-manifest.json +33 -33
  252. package/.next/server/chunks/1467.js +1 -1
  253. package/.next/server/chunks/1707.js +1 -1
  254. package/.next/server/chunks/1886.js +2 -2
  255. package/.next/server/chunks/2119.js +1 -1
  256. package/.next/server/chunks/2445.js +1 -1
  257. package/.next/server/chunks/3480.js +1 -18
  258. package/.next/server/chunks/3730.js +1 -1
  259. package/.next/server/chunks/4207.js +5 -0
  260. package/.next/server/chunks/4443.js +1 -1
  261. package/.next/server/chunks/5164.js +1 -1
  262. package/.next/server/chunks/6130.js +1 -1
  263. package/.next/server/chunks/650.js +1 -1
  264. package/.next/server/chunks/6661.js +1 -1
  265. package/.next/server/chunks/6677.js +2 -2
  266. package/.next/server/chunks/6793.js +13 -0
  267. package/.next/server/chunks/7075.js +1 -1
  268. package/.next/server/chunks/8052.js +74 -0
  269. package/.next/server/chunks/8728.js +2 -2
  270. package/.next/server/chunks/9080.js +1 -1
  271. package/.next/server/middleware-manifest.json +5 -5
  272. package/.next/server/pages/500.html +1 -1
  273. package/.next/server/server-reference-manifest.json +1 -1
  274. package/.next/static/chunks/{2407-c4b1d2aae7e3f59b.js → 2407-be448eda70bc19b6.js} +1 -1
  275. package/.next/static/chunks/4388-a778968d9c4e9327.js +1 -0
  276. package/.next/static/chunks/4949-fa93029d6e05db0d.js +1 -0
  277. package/.next/static/chunks/998-292ebcd30f329eb1.js +1 -0
  278. package/.next/static/chunks/app/sessions/page-fe42c8f6fd59b9e7.js +1 -0
  279. package/.next/static/chunks/app/worktrees/[id]/page-1eb4297af22afac8.js +1 -0
  280. package/.next/static/css/ed092b853e52b5eb.css +1 -0
  281. package/.next/trace +14 -14
  282. package/dist/cli/commands/ls.d.ts +64 -0
  283. package/dist/cli/commands/ls.d.ts.map +1 -1
  284. package/dist/cli/commands/ls.js +238 -30
  285. package/dist/cli/commands/respond.d.ts.map +1 -1
  286. package/dist/cli/commands/respond.js +14 -0
  287. package/dist/cli/commands/status.d.ts.map +1 -1
  288. package/dist/cli/commands/status.js +154 -15
  289. package/dist/cli/docs/agent-operations.d.ts +1 -1
  290. package/dist/cli/docs/agent-operations.d.ts.map +1 -1
  291. package/dist/cli/docs/agent-operations.js +37 -1
  292. package/dist/cli/types/api-responses.d.ts.map +1 -1
  293. package/dist/cli/utils/server-url.d.ts +27 -0
  294. package/dist/cli/utils/server-url.d.ts.map +1 -1
  295. package/dist/cli/utils/server-url.js +48 -6
  296. package/dist/lib/cli-tools/types.d.ts +22 -1
  297. package/dist/lib/cli-tools/types.d.ts.map +1 -1
  298. package/dist/lib/detection/tools/verified-against.d.ts +8 -0
  299. package/dist/lib/detection/tools/verified-against.d.ts.map +1 -1
  300. package/dist/lib/detection/tools/verified-against.js +8 -0
  301. package/dist/server/locales/en/worktree.json +23 -1
  302. package/dist/server/locales/ja/worktree.json +23 -1
  303. package/dist/server/src/lib/cli-tools/agent-mode-spec.js +327 -0
  304. package/dist/server/src/lib/cli-tools/base.js +22 -0
  305. package/dist/server/src/lib/cmate-parser.js +26 -6
  306. package/dist/server/src/lib/cmate-validator.js +354 -0
  307. package/dist/server/src/lib/detection/cli-patterns.js +40 -2
  308. package/dist/server/src/lib/detection/model-info-extractor.js +40 -3
  309. package/dist/server/src/lib/detection/prompt-detect-multiple-choice.js +44 -0
  310. package/dist/server/src/lib/detection/tools/antigravity/detect.js +9 -0
  311. package/dist/server/src/lib/detection/tools/command-code/detect.js +14 -3
  312. package/dist/server/src/lib/detection/tools/command-code/permission.js +104 -0
  313. package/dist/server/src/lib/detection/tools/verified-against.js +8 -0
  314. package/dist/server/src/lib/polling/auto-yes-dialog-gate.js +20 -2
  315. package/dist/server/src/lib/prompt-answer-sender.js +339 -16
  316. package/dist/server/src/lib/session/claude-executor.js +190 -17
  317. package/dist/server/src/types/cli-tool-contracts.js +75 -1
  318. package/dist/types/cli-tool-contracts.d.ts +162 -0
  319. package/dist/types/cli-tool-contracts.d.ts.map +1 -1
  320. package/dist/types/cli-tool-contracts.js +75 -1
  321. package/package.json +1 -1
  322. package/.next/server/chunks/6337.js +0 -1
  323. package/.next/server/chunks/663.js +0 -79
  324. package/.next/static/chunks/4388-410b1d8ed0d8d98b.js +0 -1
  325. package/.next/static/chunks/4949-5b97d1eb769482d2.js +0 -1
  326. package/.next/static/chunks/998-ac0ded6d5eeb4dc0.js +0 -1
  327. package/.next/static/chunks/app/sessions/page-b8651c3f17c36800.js +0 -1
  328. package/.next/static/chunks/app/worktrees/[id]/page-f993ca88fe758599.js +0 -1
  329. package/.next/static/css/c511ecdf1e7f18a0.css +0 -1
  330. /package/.next/static/{0WNCXbrakAsDUEgDarN8N → DryXJ1-iHfWxfrHkkWVy8}/_buildManifest.js +0 -0
  331. /package/.next/static/{0WNCXbrakAsDUEgDarN8N → DryXJ1-iHfWxfrHkkWVy8}/_ssgManifest.js +0 -0
@@ -14,12 +14,15 @@
14
14
  * - Validates cliToolId against ALLOWED_CLI_TOOLS whitelist [SEC-001]
15
15
  */
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.COMMAND_CODE_EXIT_REASONS = exports.ALLOWED_CLI_TOOLS = exports.MAX_MESSAGE_LENGTH = exports.EXECUTION_TIMEOUT_MS = exports.MAX_STORED_OUTPUT_SIZE = exports.MAX_OUTPUT_SIZE = void 0;
17
+ exports.EXECUTION_LOG_WARNING_HEAD_LENGTH = exports.COMMAND_CODE_BLOCKED_WARNING_PREFIX = exports.COMMAND_CODE_EXIT_REASONS = exports.ALLOWED_CLI_TOOLS = exports.MAX_MESSAGE_LENGTH = exports.EXECUTION_TIMEOUT_MS = exports.MAX_STORED_OUTPUT_SIZE = exports.MAX_OUTPUT_SIZE = void 0;
18
18
  exports.getCommandForTool = getCommandForTool;
19
19
  exports.truncateOutput = truncateOutput;
20
20
  exports.buildCliArgs = buildCliArgs;
21
21
  exports.extractOpencodeFinalText = extractOpencodeFinalText;
22
22
  exports.extractCommandCodeResult = extractCommandCodeResult;
23
+ exports.readCommandCodeStream = readCommandCodeStream;
24
+ exports.describeCommandCodeBlockedToolCalls = describeCommandCodeBlockedToolCalls;
25
+ exports.readExecutionLogWarning = readExecutionLogWarning;
23
26
  exports.describeCommandCodeFailure = describeCommandCodeFailure;
24
27
  exports.executeClaudeCommand = executeClaudeCommand;
25
28
  exports.getActiveProcesses = getActiveProcesses;
@@ -210,7 +213,9 @@ function buildCliArgs(message, cliToolId, permission, options) {
210
213
  // `shell_command` / `monitor_command` / `kill_shell` with `block: true`;
211
214
  // the mode flag never reaches it. A blocked call does not fail the run —
212
215
  // it ends exit 0 with `subtype: "success"` — so a schedule that asked for
213
- // `default` looked successful and changed nothing.
216
+ // `default` looked successful and changed nothing. (Issue #2577 now
217
+ // records those blocks as a warning beside the status; see
218
+ // {@link readCommandCodeStream}.)
214
219
  //
215
220
  // So the column now spells `--yolo` as the value `yolo`
216
221
  // ({@link COMMAND_CODE_SCHEDULE_PERMISSIONS}, copilot's shape), and the
@@ -444,7 +449,44 @@ exports.COMMAND_CODE_EXIT_REASONS = {
444
449
  * @returns The decoded result line, or null when stdout carried none
445
450
  */
446
451
  function extractCommandCodeResult(stdout) {
447
- let found = null;
452
+ return readCommandCodeStream(stdout).result;
453
+ }
454
+ /**
455
+ * The result line *and* the blocked tool calls of one command-code stream.
456
+ *
457
+ * ## Why the blocks are read here, before the result line wins
458
+ *
459
+ * Issue #2577: `commandcode -p` without `--yolo` gets the `print-permission-gate`
460
+ * mod, which blocks `edit_file` / `write_file` / `shell_command` /
461
+ * `monitor_command` / `kill_shell`. A blocked call does not fail the run — it
462
+ * ends exit 0 with `subtype: "success"` — and the only trace of the refusal is
463
+ * an event in the middle of the stream. Keeping just the result line threw that
464
+ * event away, so a run whose every write was refused was stored as the model's
465
+ * `finalText`, which need not mention the refusal at all.
466
+ *
467
+ * The measured event (1.53.1, fixtures under
468
+ * `tests/unit/session/fixtures/command-code-tool-hook-blocked-2577/`) is
469
+ *
470
+ * ```text
471
+ * {"type":"event","event":{"type":"tool_hook_blocked","toolCallId":"call_…",
472
+ * "toolName":"write_file","hookOutput":"Error: Tool \"write_file\" requires permissions. …"}}
473
+ * ```
474
+ *
475
+ * and `executeOne` returns straight after emitting it, so a blocked call has no
476
+ * `tool_running` / `tool_completed`. That is why the blocks are counted off this
477
+ * event and not inferred from tool results or from `finalText`.
478
+ *
479
+ * Every block is kept, whichever mod raised it: the gate's five tools are the
480
+ * case that prompted this, but a call a user's own hook refused is equally a
481
+ * call that did not happen.
482
+ *
483
+ * @param stdout - Raw stdout from `commandcode -p … --output-format json`
484
+ * @returns The decoded stream; never throws
485
+ */
486
+ function readCommandCodeStream(stdout) {
487
+ let result = null;
488
+ const blockedToolCalls = [];
489
+ let startedToolCalls = 0;
448
490
  for (const line of stdout.split('\n')) {
449
491
  const trimmed = line.trim();
450
492
  if (!trimmed.startsWith('{'))
@@ -459,17 +501,127 @@ function extractCommandCodeResult(stdout) {
459
501
  if (typeof frame !== 'object' || frame === null)
460
502
  continue;
461
503
  const record = frame;
462
- if (record.type !== 'result')
504
+ if (record.type === 'result') {
505
+ if (typeof record.subtype !== 'string')
506
+ continue;
507
+ result = {
508
+ subtype: record.subtype,
509
+ finalText: typeof record.finalText === 'string' ? record.finalText : '',
510
+ ...(typeof record.error === 'string' ? { error: record.error } : {}),
511
+ };
512
+ continue;
513
+ }
514
+ if (record.type !== 'event')
463
515
  continue;
464
- if (typeof record.subtype !== 'string')
516
+ if (typeof record.event !== 'object' || record.event === null)
465
517
  continue;
466
- found = {
467
- subtype: record.subtype,
468
- finalText: typeof record.finalText === 'string' ? record.finalText : '',
469
- ...(typeof record.error === 'string' ? { error: record.error } : {}),
470
- };
518
+ const event = record.event;
519
+ if (event.type === 'tool_running') {
520
+ startedToolCalls += 1;
521
+ continue;
522
+ }
523
+ if (event.type === 'tool_hook_blocked') {
524
+ blockedToolCalls.push({
525
+ toolCallId: typeof event.toolCallId === 'string' ? event.toolCallId : null,
526
+ // A block with no name is still a block; counting it matters more than
527
+ // naming it.
528
+ toolName: typeof event.toolName === 'string' && event.toolName !== ''
529
+ ? event.toolName
530
+ : '(unnamed tool)',
531
+ hookOutput: typeof event.hookOutput === 'string' ? event.hookOutput : '',
532
+ });
533
+ }
534
+ }
535
+ return { result, blockedToolCalls, startedToolCalls };
536
+ }
537
+ /**
538
+ * How a stored execution-log result starts when the run had blocked tool calls.
539
+ *
540
+ * The list API matches this against the head of `execution_logs.result` without
541
+ * reading the rest of the column, which is why the warning is always the first
542
+ * line of the output rather than wherever it would read best.
543
+ */
544
+ exports.COMMAND_CODE_BLOCKED_WARNING_PREFIX = 'Warning: command-code blocked ';
545
+ /**
546
+ * How many characters of `execution_logs.result` the list API reads to recover
547
+ * the warning line. The summary line is bounded well below this (tool names are
548
+ * capped in count and length), so the line is never cut by the read.
549
+ */
550
+ exports.EXECUTION_LOG_WARNING_HEAD_LENGTH = 1024;
551
+ const MAX_WARNING_TOOL_NAMES = 5;
552
+ const MAX_WARNING_TOOL_NAME_LENGTH = 80;
553
+ const MAX_WARNING_DETAIL_LINES = 5;
554
+ const MAX_WARNING_HOOK_OUTPUT_LENGTH = 300;
555
+ /** The summary line's exact shape, so an answer that merely quotes the prefix is not read as one. */
556
+ const BLOCKED_WARNING_LINE = /^Warning: command-code blocked \d+ tool call\(s\) \(tool_hook_blocked\): /;
557
+ /** Text from the stream, flattened to one bounded line. */
558
+ function toWarningField(text, maxLength) {
559
+ const flattened = (0, cli_patterns_1.stripAnsi)(text).replace(/[\x00-\x1f\x7f\s]+/g, ' ').trim();
560
+ return flattened.length > maxLength ? `${flattened.slice(0, maxLength)}…` : flattened;
561
+ }
562
+ /**
563
+ * The warning block for a stream that carried blocked tool calls, or null.
564
+ *
565
+ * The first line is the summary — how many calls were blocked, which tools, and
566
+ * how many tool calls did run — and is what the execution-log list shows. The
567
+ * lines after it carry each distinct `hookOutput`, so the detail view says *why*
568
+ * without the operator digging through the event dump that is no longer stored.
569
+ *
570
+ * It does not judge whether the run produced anything. "Were calls blocked" and
571
+ * "how did the CLI exit" are recorded as two facts; whether a report was written
572
+ * or a mail went out is not something this layer can see (Issue #2577 対応内容 3).
573
+ *
574
+ * @param stream - A decoded stream from {@link readCommandCodeStream}
575
+ * @returns `[summary, ...details]`, or null when nothing was blocked
576
+ */
577
+ function describeCommandCodeBlockedToolCalls(stream) {
578
+ const { blockedToolCalls, startedToolCalls } = stream;
579
+ if (blockedToolCalls.length === 0)
580
+ return null;
581
+ const countsByTool = new Map();
582
+ const detailLines = new Map();
583
+ for (const call of blockedToolCalls) {
584
+ const toolName = toWarningField(call.toolName, MAX_WARNING_TOOL_NAME_LENGTH);
585
+ countsByTool.set(toolName, (countsByTool.get(toolName) ?? 0) + 1);
586
+ const hookOutput = toWarningField(call.hookOutput, MAX_WARNING_HOOK_OUTPUT_LENGTH)
587
+ || '(no hook output)';
588
+ const key = JSON.stringify([toolName, hookOutput]);
589
+ if (!detailLines.has(key))
590
+ detailLines.set(key, `Blocked ${toolName}: ${hookOutput}`);
591
+ }
592
+ const tools = [...countsByTool]
593
+ .slice(0, MAX_WARNING_TOOL_NAMES)
594
+ .map(([toolName, count]) => `${toolName} (${count})`);
595
+ if (countsByTool.size > MAX_WARNING_TOOL_NAMES) {
596
+ tools.push(`+${countsByTool.size - MAX_WARNING_TOOL_NAMES} more`);
597
+ }
598
+ const summary = `${exports.COMMAND_CODE_BLOCKED_WARNING_PREFIX}${blockedToolCalls.length} tool call(s)`
599
+ + ` (tool_hook_blocked): ${tools.join(', ')}; ${startedToolCalls} tool call(s) ran`;
600
+ const details = [...detailLines.values()].slice(0, MAX_WARNING_DETAIL_LINES);
601
+ if (detailLines.size > MAX_WARNING_DETAIL_LINES) {
602
+ details.push(`Blocked: +${detailLines.size - MAX_WARNING_DETAIL_LINES} more distinct reason(s)`);
471
603
  }
472
- return found;
604
+ return [summary, ...details];
605
+ }
606
+ /**
607
+ * The blocked-tool-call warning at the head of a stored execution-log result,
608
+ * or null.
609
+ *
610
+ * Only the first line is considered, and only in the exact summary shape
611
+ * {@link describeCommandCodeBlockedToolCalls} writes, so an answer that happens
612
+ * to contain the words further down — or a row written before Issue #2577 — is
613
+ * not flagged.
614
+ *
615
+ * @param result - `execution_logs.result`, or any prefix of it at least
616
+ * {@link EXECUTION_LOG_WARNING_HEAD_LENGTH} characters long
617
+ * @returns The summary line, or null
618
+ */
619
+ function readExecutionLogWarning(result) {
620
+ if (typeof result !== 'string')
621
+ return null;
622
+ const newline = result.indexOf('\n');
623
+ const firstLine = newline === -1 ? result : result.slice(0, newline);
624
+ return BLOCKED_WARNING_LINE.test(firstLine) ? firstLine : null;
473
625
  }
474
626
  /**
475
627
  * One line naming why a Command Code run failed, or null when it did not.
@@ -548,11 +700,21 @@ async function executeClaudeCommand(message, cwd, cliToolId = 'claude', permissi
548
700
  // line — so the answer and the CLI's own reason are on stdout even
549
701
  // here. Decoding them turns a log that said "Error: Command failed"
550
702
  // over a 4KB event dump into the reason plus the text.
551
- const commandCodeResult = cliToolId === 'command-code'
552
- ? extractCommandCodeResult(stdout || '')
703
+ //
704
+ // Issue #2577: the same stream says which tool calls were blocked. A
705
+ // failed or timed-out run stays failed or timed out — the warning is
706
+ // recorded next to that verdict, never instead of it — and it goes
707
+ // first because the list API only reads the head of the stored result.
708
+ const commandCodeStream = cliToolId === 'command-code'
709
+ ? readCommandCodeStream(stdout || '')
710
+ : null;
711
+ const commandCodeResult = commandCodeStream ? commandCodeStream.result : null;
712
+ const blockedWarning = commandCodeStream
713
+ ? describeCommandCodeBlockedToolCalls(commandCodeStream)
553
714
  : null;
554
715
  const exitCodeNumber = typeof errCode === 'number' ? errCode : null;
555
716
  const errorSummary = [
717
+ ...(blockedWarning ?? []),
556
718
  `Error: ${error.message}`,
557
719
  `Code: ${errCode ?? 'unknown'}`,
558
720
  `Signal: ${error.signal ?? 'none'}`,
@@ -581,6 +743,7 @@ async function executeClaudeCommand(message, cwd, cliToolId = 'claude', permissi
581
743
  exitCode: exitCodeNumber,
582
744
  status: isTimeout ? 'timeout' : 'failed',
583
745
  error: error.message,
746
+ ...(blockedWarning ? { warning: blockedWarning[0] } : {}),
584
747
  });
585
748
  return;
586
749
  }
@@ -596,15 +759,25 @@ async function executeClaudeCommand(message, cwd, cliToolId = 'claude', permissi
596
759
  // practice — but the subtype is read rather than assumed, because
597
760
  // "the process exited 0" and "the agent answered" are two facts and
598
761
  // this layer is the only one that can still see the second.
762
+ //
763
+ // Issue #2577: and exit 0 with `subtype: "success"` is also what a run
764
+ // whose every write was refused by `print-permission-gate` looks like.
765
+ // Failing it would also fail the run that was refused once and got its
766
+ // work done another way, so the status stays the CLI's verdict and the
767
+ // blocks are recorded beside it: a warning line at the head of the
768
+ // output (where the list API finds it) and `warning` on the result.
599
769
  if (cliToolId === 'command-code') {
600
- const result = extractCommandCodeResult(stdout || '');
601
- const failure = describeCommandCodeFailure(0, result);
602
- const body = result ? result.finalText : (stdout || '');
770
+ const stream = readCommandCodeStream(stdout || '');
771
+ const failure = describeCommandCodeFailure(0, stream.result);
772
+ const blockedWarning = describeCommandCodeBlockedToolCalls(stream);
773
+ const body = stream.result ? stream.result.finalText : (stdout || '');
774
+ const head = [...(blockedWarning ?? []), ...(failure ? [failure] : [])];
603
775
  resolve({
604
- output: truncateOutput((0, cli_patterns_1.stripAnsi)(failure ? `${failure}\n${body}` : body)),
776
+ output: truncateOutput((0, cli_patterns_1.stripAnsi)([...head, body].join('\n'))),
605
777
  exitCode: 0,
606
778
  status: failure ? 'failed' : 'completed',
607
779
  ...(failure ? { error: failure } : {}),
780
+ ...(blockedWarning ? { warning: blockedWarning[0] } : {}),
608
781
  });
609
782
  return;
610
783
  }
@@ -15,12 +15,13 @@
15
15
  * and types only — nothing here touches a process.
16
16
  */
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.GRACEFUL_EXIT_FAILURE_REASONS = exports.KEY_SEQUENCE_KEY_NAMES = void 0;
18
+ exports.AGENT_MODE_NOTE_IDS = exports.AGENT_MODE_UNKNOWN = exports.AGENT_MODE_IDS = exports.GRACEFUL_EXIT_FAILURE_REASONS = exports.KEY_SEQUENCE_KEY_NAMES = void 0;
19
19
  exports.keyStep = keyStep;
20
20
  exports.literalStep = literalStep;
21
21
  exports.isLiteralStep = isLiteralStep;
22
22
  exports.isKeyStep = isKeyStep;
23
23
  exports.isKeySequenceKeyName = isKeySequenceKeyName;
24
+ exports.isAgentModeId = isAgentModeId;
24
25
  // ---------------------------------------------------------------------------
25
26
  // Key sequences (受入条件 S9)
26
27
  // ---------------------------------------------------------------------------
@@ -73,3 +74,76 @@ function isKeySequenceKeyName(name) {
73
74
  * worktree, silently. The number must not be reused until it goes quiet.
74
75
  */
75
76
  exports.GRACEFUL_EXIT_FAILURE_REASONS = ['graceful_exit_timeout', 'port_orphaned'];
77
+ // ---------------------------------------------------------------------------
78
+ // Permission / approval mode cycling (Issue #2592)
79
+ // ---------------------------------------------------------------------------
80
+ /**
81
+ * Every permission-mode name CommandMate can name, across every tool.
82
+ *
83
+ * A **union of measured vocabularies**, not a model of one tool's state machine.
84
+ * Six of the eight supported CLIs put a mode on `shift+tab`, and no two spell
85
+ * their modes the same way or cycle the same members — claude has four and no
86
+ * "default", codex has two, Command Code cycles three but can *sit* in two more
87
+ * that its cycle skips. So the ids here are the superset, and which of them a
88
+ * given tool can be in is that tool's own {@link AgentModeSpec.cycle}.
89
+ *
90
+ * Measured 2026-09-16 across all eight tools at the production 200x60 geometry
91
+ * (Issue #2592), plus the footer tables #1927 (claude 2.1.240) and #2250
92
+ * (Command Code 1.40.1 / 1.49.0) already carried:
93
+ *
94
+ * | id | who prints it | spelling on the pane |
95
+ * |-----------------|----------------------------------|---------------------------------|
96
+ * | `manual` | claude | `⏸ manual mode on` |
97
+ * | `auto` | claude | `⏵⏵ auto mode on` |
98
+ * | `accept-edits` | claude / Command Code / agy | `⏵⏵ accept edits on`, `» accept edits on`, `accept-edits ·` |
99
+ * | `plan` | all five | `⏸ plan mode on`, `plan mode`, `Plan mode (shift+tab to cycle)`, `plan` |
100
+ * | `autopilot` | copilot | `autopilot` in the hint bar |
101
+ * | `bypass` | Command Code (NOT in its cycle) | `» permission bypass on` |
102
+ * | `dont-ask` | Command Code (NOT in its cycle) | `» don't-ask on` |
103
+ * | `default` | Command Code | `? for shortcuts` (its own row) |
104
+ *
105
+ * `bypass` and `dont-ask` are declared even though `shift+tab` cannot REACH
106
+ * them, and that is the point: a user who put Command Code in one of those from
107
+ * the terminal is in a state the pane can be read for, and leaving them out
108
+ * would make the reader fall through to whichever indicator matched next — on
109
+ * 1.53.1, where `? for shortcuts` is drawn in every mode, that fall-through is
110
+ * a chip that says `default` while the agent bypasses permissions.
111
+ */
112
+ exports.AGENT_MODE_IDS = [
113
+ 'default',
114
+ 'manual',
115
+ 'accept-edits',
116
+ 'plan',
117
+ 'auto',
118
+ 'autopilot',
119
+ 'bypass',
120
+ 'dont-ask',
121
+ ];
122
+ /**
123
+ * The verdict for a frame nothing in {@link AgentModeSpec.indicators} matched.
124
+ *
125
+ * **Not a mode.** It is the reader declining to answer, and every consumer must
126
+ * treat it that way: the chip is not drawn, `capture --json` publishes the
127
+ * string rather than a guess, and nothing anywhere maps it to `default`.
128
+ *
129
+ * The distinction is load-bearing because four of the five tools draw NOTHING in
130
+ * their base mode (Issue #2592 §「設計に効く事実」3). If "no row" meant `default`
131
+ * then every frame captured mid-repaint, every frame whose footer scrolled out
132
+ * of the read window, and every future build that renames a row would publish a
133
+ * confident `default` for a pane that might be in `plan`. A missing chip is a
134
+ * question the operator can answer by looking at the terminal; a wrong chip is
135
+ * one they have no reason to ask.
136
+ */
137
+ exports.AGENT_MODE_UNKNOWN = 'unknown';
138
+ /** Whether `value` is a mode id (as opposed to {@link AGENT_MODE_UNKNOWN}). */
139
+ function isAgentModeId(value) {
140
+ return exports.AGENT_MODE_IDS.includes(value);
141
+ }
142
+ /**
143
+ * A translator key for a caution the UI must print next to the mode button.
144
+ *
145
+ * A token rather than prose because the sentence is user-facing and has to be
146
+ * translated (`.eslintrc.json`'s i18n rule, Issue #1271), and because the tool
147
+ * declaring it has no way to call `useTranslations()`.
148
+ */
149
+ exports.AGENT_MODE_NOTE_IDS = ['codexModelCoupled'];
@@ -399,4 +399,166 @@ export type ToolLivenessVerdict = {
399
399
  readonly alive: false;
400
400
  readonly reason: string;
401
401
  };
402
+ /**
403
+ * Every permission-mode name CommandMate can name, across every tool.
404
+ *
405
+ * A **union of measured vocabularies**, not a model of one tool's state machine.
406
+ * Six of the eight supported CLIs put a mode on `shift+tab`, and no two spell
407
+ * their modes the same way or cycle the same members — claude has four and no
408
+ * "default", codex has two, Command Code cycles three but can *sit* in two more
409
+ * that its cycle skips. So the ids here are the superset, and which of them a
410
+ * given tool can be in is that tool's own {@link AgentModeSpec.cycle}.
411
+ *
412
+ * Measured 2026-09-16 across all eight tools at the production 200x60 geometry
413
+ * (Issue #2592), plus the footer tables #1927 (claude 2.1.240) and #2250
414
+ * (Command Code 1.40.1 / 1.49.0) already carried:
415
+ *
416
+ * | id | who prints it | spelling on the pane |
417
+ * |-----------------|----------------------------------|---------------------------------|
418
+ * | `manual` | claude | `⏸ manual mode on` |
419
+ * | `auto` | claude | `⏵⏵ auto mode on` |
420
+ * | `accept-edits` | claude / Command Code / agy | `⏵⏵ accept edits on`, `» accept edits on`, `accept-edits ·` |
421
+ * | `plan` | all five | `⏸ plan mode on`, `plan mode`, `Plan mode (shift+tab to cycle)`, `plan` |
422
+ * | `autopilot` | copilot | `autopilot` in the hint bar |
423
+ * | `bypass` | Command Code (NOT in its cycle) | `» permission bypass on` |
424
+ * | `dont-ask` | Command Code (NOT in its cycle) | `» don't-ask on` |
425
+ * | `default` | Command Code | `? for shortcuts` (its own row) |
426
+ *
427
+ * `bypass` and `dont-ask` are declared even though `shift+tab` cannot REACH
428
+ * them, and that is the point: a user who put Command Code in one of those from
429
+ * the terminal is in a state the pane can be read for, and leaving them out
430
+ * would make the reader fall through to whichever indicator matched next — on
431
+ * 1.53.1, where `? for shortcuts` is drawn in every mode, that fall-through is
432
+ * a chip that says `default` while the agent bypasses permissions.
433
+ */
434
+ export declare const AGENT_MODE_IDS: readonly ["default", "manual", "accept-edits", "plan", "auto", "autopilot", "bypass", "dont-ask"];
435
+ /** One permission mode a supported CLI can be in. */
436
+ export type AgentModeId = typeof AGENT_MODE_IDS[number];
437
+ /**
438
+ * The verdict for a frame nothing in {@link AgentModeSpec.indicators} matched.
439
+ *
440
+ * **Not a mode.** It is the reader declining to answer, and every consumer must
441
+ * treat it that way: the chip is not drawn, `capture --json` publishes the
442
+ * string rather than a guess, and nothing anywhere maps it to `default`.
443
+ *
444
+ * The distinction is load-bearing because four of the five tools draw NOTHING in
445
+ * their base mode (Issue #2592 §「設計に効く事実」3). If "no row" meant `default`
446
+ * then every frame captured mid-repaint, every frame whose footer scrolled out
447
+ * of the read window, and every future build that renames a row would publish a
448
+ * confident `default` for a pane that might be in `plan`. A missing chip is a
449
+ * question the operator can answer by looking at the terminal; a wrong chip is
450
+ * one they have no reason to ask.
451
+ */
452
+ export declare const AGENT_MODE_UNKNOWN = "unknown";
453
+ /** What {@link AgentModeSpec.indicators} can be read to say about a frame. */
454
+ export type AgentMode = AgentModeId | typeof AGENT_MODE_UNKNOWN;
455
+ /** Whether `value` is a mode id (as opposed to {@link AGENT_MODE_UNKNOWN}). */
456
+ export declare function isAgentModeId(value: string): value is AgentModeId;
457
+ /**
458
+ * One "this frame is in mode X" reading.
459
+ *
460
+ * `pattern` is applied to a **stripAnsi-ed** row. Every measured indicator lives
461
+ * inside SGR sequences on the wire — claude's footer arrives as
462
+ * `\x1b[38;5;220m⏵⏵ auto mode on\x1b[38;5;246m (shift+tab to cycle)` — so a
463
+ * pattern run against raw bytes matches nothing at all. `tests/fixtures/
464
+ * agent-mode-2592/` keeps ANSI-bearing frames so that regression fails a test
465
+ * rather than a user's screen.
466
+ */
467
+ export interface AgentModeIndicator {
468
+ /** The mode this row proves the tool is in. */
469
+ readonly mode: AgentModeId;
470
+ /**
471
+ * Whole-row pattern, matched against the stripped row.
472
+ *
473
+ * No `/g` (keeps `.test()` stateless) and no nested quantifiers (ReDoS-safe),
474
+ * the same rule `cli-patterns.ts` documents for every pattern in this repo.
475
+ */
476
+ readonly pattern: RegExp;
477
+ }
478
+ /**
479
+ * A translator key for a caution the UI must print next to the mode button.
480
+ *
481
+ * A token rather than prose because the sentence is user-facing and has to be
482
+ * translated (`.eslintrc.json`'s i18n rule, Issue #1271), and because the tool
483
+ * declaring it has no way to call `useTranslations()`.
484
+ */
485
+ export declare const AGENT_MODE_NOTE_IDS: readonly ["codexModelCoupled"];
486
+ /** Which caution one tool's mode button carries, if any. */
487
+ export type AgentModeNoteId = typeof AGENT_MODE_NOTE_IDS[number];
488
+ /**
489
+ * How one tool cycles permission modes, and how its current mode is read
490
+ * (Issue #2592).
491
+ *
492
+ * Returned by `ICLITool.agentModeSpec()`, `null` for a tool that has no mode on
493
+ * `shift+tab`. The §4 D4 shape {@link ComposerSpec} / {@link CaptureSpec} /
494
+ * {@link ToolLivenessSpec} / {@link NavigationKeySpec} already take: the tool
495
+ * answers for itself and nothing outside `src/lib/cli-tools/**` branches on a
496
+ * `CLIToolType`.
497
+ *
498
+ * ## Why the mode is READ and not remembered
499
+ *
500
+ * CommandMate is not the only thing pressing this key. `commandmate attach`
501
+ * puts the operator in the same pane, the agent's own `/permissions` command
502
+ * moves the mode, and a restart of the CommandMate server forgets everything.
503
+ * A counter incremented per button press would be wrong after any of those and
504
+ * would stay wrong silently, which is exactly the failure #2592's B half exists
505
+ * to prevent ("B 無しの A は盲打ちになって使えない"). So the tool's own footer is
506
+ * the only source, and when it cannot be read the answer is
507
+ * {@link AGENT_MODE_UNKNOWN}.
508
+ *
509
+ * ## The #2032 invariant, restated
510
+ *
511
+ * {@link key} must be a key `sendSpecialKeys()` will actually deliver AND one
512
+ * this tool's {@link NavigationKeySpec} publishes, or the button draws a request
513
+ * the route answers 400 for (or, worse, validates and then throws mid-send —
514
+ * Issue #2032's exact shape). `tests/unit/lib/cli-tools/agent-mode-declaration-2592.test.ts`
515
+ * pins both halves against the real registry.
516
+ */
517
+ export interface AgentModeSpec {
518
+ /**
519
+ * The key that advances the cycle — `BTab` for all five declaring tools.
520
+ *
521
+ * Declared rather than hard-coded so the invariant above is checkable, and so
522
+ * a tool that moves its binding changes one line.
523
+ */
524
+ readonly key: TerminalKey;
525
+ /**
526
+ * The cycle, in the order measured by pressing {@link key} repeatedly.
527
+ *
528
+ * The first element is where the measurement started, not a "default": claude
529
+ * has no default mode at all. A mode this tool can SIT in but cannot reach
530
+ * with {@link key} (Command Code's `bypass` / `dont-ask`) is deliberately
531
+ * absent here and present in {@link indicators} — the cycle is what the button
532
+ * does, the indicators are what the pane can say.
533
+ */
534
+ readonly cycle: readonly AgentModeId[];
535
+ /**
536
+ * How a mode is recognised, most specific FIRST.
537
+ *
538
+ * The reader returns the first match, so an indicator that is drawn in every
539
+ * mode (Command Code's `? for shortcuts` on 1.53.1) must come last or it wins
540
+ * over the row that actually names the mode.
541
+ */
542
+ readonly indicators: readonly AgentModeIndicator[];
543
+ /**
544
+ * How many non-blank rows from the bottom of the frame {@link indicators} may
545
+ * look at.
546
+ *
547
+ * A window, not the frame, for the reason `ToolLivenessSpec.aliveTailLines`
548
+ * is one: a mode row does not disappear when the mode changes, it scrolls up.
549
+ * Command Code renders INLINE (#2250 measured `alternate_on` 0), so a 1000-row
550
+ * capture of its pane holds every footer it has ever drawn, and a whole-frame
551
+ * test would answer with the oldest one forever.
552
+ */
553
+ readonly tailRows: number;
554
+ /**
555
+ * A caution this tool's button must carry, or `null`.
556
+ *
557
+ * codex alone today: its modes are coupled to the model and reasoning effort
558
+ * (`xhigh` ⇄ `medium`, measured 2026-09-16), so one press of a button labelled
559
+ * "mode" also moves the model tier. Issue #2592 §「設計に効く事実」4 requires
560
+ * that be visible rather than discovered.
561
+ */
562
+ readonly noteId: AgentModeNoteId | null;
563
+ }
402
564
  //# sourceMappingURL=cli-tool-contracts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cli-tool-contracts.d.ts","sourceRoot":"","sources":["../../src/types/cli-tool-contracts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,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
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.GRACEFUL_EXIT_FAILURE_REASONS = exports.KEY_SEQUENCE_KEY_NAMES = void 0;
18
+ exports.AGENT_MODE_NOTE_IDS = exports.AGENT_MODE_UNKNOWN = exports.AGENT_MODE_IDS = exports.GRACEFUL_EXIT_FAILURE_REASONS = exports.KEY_SEQUENCE_KEY_NAMES = void 0;
19
19
  exports.keyStep = keyStep;
20
20
  exports.literalStep = literalStep;
21
21
  exports.isLiteralStep = isLiteralStep;
22
22
  exports.isKeyStep = isKeyStep;
23
23
  exports.isKeySequenceKeyName = isKeySequenceKeyName;
24
+ exports.isAgentModeId = isAgentModeId;
24
25
  // ---------------------------------------------------------------------------
25
26
  // Key sequences (受入条件 S9)
26
27
  // ---------------------------------------------------------------------------
@@ -73,3 +74,76 @@ function isKeySequenceKeyName(name) {
73
74
  * worktree, silently. The number must not be reused until it goes quiet.
74
75
  */
75
76
  exports.GRACEFUL_EXIT_FAILURE_REASONS = ['graceful_exit_timeout', 'port_orphaned'];
77
+ // ---------------------------------------------------------------------------
78
+ // Permission / approval mode cycling (Issue #2592)
79
+ // ---------------------------------------------------------------------------
80
+ /**
81
+ * Every permission-mode name CommandMate can name, across every tool.
82
+ *
83
+ * A **union of measured vocabularies**, not a model of one tool's state machine.
84
+ * Six of the eight supported CLIs put a mode on `shift+tab`, and no two spell
85
+ * their modes the same way or cycle the same members — claude has four and no
86
+ * "default", codex has two, Command Code cycles three but can *sit* in two more
87
+ * that its cycle skips. So the ids here are the superset, and which of them a
88
+ * given tool can be in is that tool's own {@link AgentModeSpec.cycle}.
89
+ *
90
+ * Measured 2026-09-16 across all eight tools at the production 200x60 geometry
91
+ * (Issue #2592), plus the footer tables #1927 (claude 2.1.240) and #2250
92
+ * (Command Code 1.40.1 / 1.49.0) already carried:
93
+ *
94
+ * | id | who prints it | spelling on the pane |
95
+ * |-----------------|----------------------------------|---------------------------------|
96
+ * | `manual` | claude | `⏸ manual mode on` |
97
+ * | `auto` | claude | `⏵⏵ auto mode on` |
98
+ * | `accept-edits` | claude / Command Code / agy | `⏵⏵ accept edits on`, `» accept edits on`, `accept-edits ·` |
99
+ * | `plan` | all five | `⏸ plan mode on`, `plan mode`, `Plan mode (shift+tab to cycle)`, `plan` |
100
+ * | `autopilot` | copilot | `autopilot` in the hint bar |
101
+ * | `bypass` | Command Code (NOT in its cycle) | `» permission bypass on` |
102
+ * | `dont-ask` | Command Code (NOT in its cycle) | `» don't-ask on` |
103
+ * | `default` | Command Code | `? for shortcuts` (its own row) |
104
+ *
105
+ * `bypass` and `dont-ask` are declared even though `shift+tab` cannot REACH
106
+ * them, and that is the point: a user who put Command Code in one of those from
107
+ * the terminal is in a state the pane can be read for, and leaving them out
108
+ * would make the reader fall through to whichever indicator matched next — on
109
+ * 1.53.1, where `? for shortcuts` is drawn in every mode, that fall-through is
110
+ * a chip that says `default` while the agent bypasses permissions.
111
+ */
112
+ exports.AGENT_MODE_IDS = [
113
+ 'default',
114
+ 'manual',
115
+ 'accept-edits',
116
+ 'plan',
117
+ 'auto',
118
+ 'autopilot',
119
+ 'bypass',
120
+ 'dont-ask',
121
+ ];
122
+ /**
123
+ * The verdict for a frame nothing in {@link AgentModeSpec.indicators} matched.
124
+ *
125
+ * **Not a mode.** It is the reader declining to answer, and every consumer must
126
+ * treat it that way: the chip is not drawn, `capture --json` publishes the
127
+ * string rather than a guess, and nothing anywhere maps it to `default`.
128
+ *
129
+ * The distinction is load-bearing because four of the five tools draw NOTHING in
130
+ * their base mode (Issue #2592 §「設計に効く事実」3). If "no row" meant `default`
131
+ * then every frame captured mid-repaint, every frame whose footer scrolled out
132
+ * of the read window, and every future build that renames a row would publish a
133
+ * confident `default` for a pane that might be in `plan`. A missing chip is a
134
+ * question the operator can answer by looking at the terminal; a wrong chip is
135
+ * one they have no reason to ask.
136
+ */
137
+ exports.AGENT_MODE_UNKNOWN = 'unknown';
138
+ /** Whether `value` is a mode id (as opposed to {@link AGENT_MODE_UNKNOWN}). */
139
+ function isAgentModeId(value) {
140
+ return exports.AGENT_MODE_IDS.includes(value);
141
+ }
142
+ /**
143
+ * A translator key for a caution the UI must print next to the mode button.
144
+ *
145
+ * A token rather than prose because the sentence is user-facing and has to be
146
+ * translated (`.eslintrc.json`'s i18n rule, Issue #1271), and because the tool
147
+ * declaring it has no way to call `useTranslations()`.
148
+ */
149
+ exports.AGENT_MODE_NOTE_IDS = ['codexModelCoupled'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commandmate",
3
- "version": "0.37.0",
3
+ "version": "0.38.1",
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",