commandmate 0.47.2 → 0.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (396) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +215 -215
  3. package/.next/app-path-routes-manifest.json +41 -41
  4. package/.next/build-manifest.json +2 -2
  5. package/.next/prerender-manifest.json +9 -9
  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/release-notes/route_client-reference-manifest.js +1 -1
  11. package/.next/server/app/api/app/update/route.js +3 -3
  12. package/.next/server/app/api/app/update/route_client-reference-manifest.js +1 -1
  13. package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
  14. package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  15. package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  16. package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  17. package/.next/server/app/api/capabilities/route.js +1 -1
  18. package/.next/server/app/api/capabilities/route_client-reference-manifest.js +1 -1
  19. package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +1 -1
  20. package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
  21. package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
  22. package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
  23. package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
  24. package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -1
  25. package/.next/server/app/api/fs/recent-paths/route_client-reference-manifest.js +1 -1
  26. package/.next/server/app/api/hooks/agent-event/route.js +2 -2
  27. package/.next/server/app/api/hooks/agent-event/route.js.nft.json +1 -1
  28. package/.next/server/app/api/hooks/agent-event/route_client-reference-manifest.js +1 -1
  29. package/.next/server/app/api/hooks/claude-done/route.js +2 -2
  30. package/.next/server/app/api/hooks/claude-done/route.js.nft.json +1 -1
  31. package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
  32. package/.next/server/app/api/hooks/permission-request/route.js +1 -1
  33. package/.next/server/app/api/hooks/permission-request/route.js.nft.json +1 -1
  34. package/.next/server/app/api/hooks/permission-request/route_client-reference-manifest.js +1 -1
  35. package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -1
  36. package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
  37. package/.next/server/app/api/push/escalation/route.js +1 -1
  38. package/.next/server/app/api/push/escalation/route_client-reference-manifest.js +1 -1
  39. package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
  40. package/.next/server/app/api/push/vapid/route.js +1 -1
  41. package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
  42. package/.next/server/app/api/relays/[relayId]/cancel/route.js +1 -1
  43. package/.next/server/app/api/relays/[relayId]/cancel/route.js.nft.json +1 -1
  44. package/.next/server/app/api/relays/[relayId]/cancel/route_client-reference-manifest.js +1 -1
  45. package/.next/server/app/api/relays/route.js +1 -1
  46. package/.next/server/app/api/relays/route.js.nft.json +1 -1
  47. package/.next/server/app/api/relays/route_client-reference-manifest.js +1 -1
  48. package/.next/server/app/api/remote/pair/route_client-reference-manifest.js +1 -1
  49. package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
  50. package/.next/server/app/api/repositories/clone/[jobId]/route.js +1 -1
  51. package/.next/server/app/api/repositories/clone/[jobId]/route.js.nft.json +1 -1
  52. package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
  53. package/.next/server/app/api/repositories/clone/route.js +1 -1
  54. package/.next/server/app/api/repositories/clone/route.js.nft.json +1 -1
  55. package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
  56. package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
  57. package/.next/server/app/api/repositories/restore/route.js +1 -1
  58. package/.next/server/app/api/repositories/restore/route.js.nft.json +1 -1
  59. package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
  60. package/.next/server/app/api/repositories/route.js +1 -1
  61. package/.next/server/app/api/repositories/route.js.nft.json +1 -1
  62. package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
  63. package/.next/server/app/api/repositories/scan/route.js +1 -1
  64. package/.next/server/app/api/repositories/scan/route.js.nft.json +1 -1
  65. package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
  66. package/.next/server/app/api/repositories/sync/route.js +1 -1
  67. package/.next/server/app/api/repositories/sync/route.js.nft.json +1 -1
  68. package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
  69. package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
  70. package/.next/server/app/api/settings/default-agents/route.js +1 -1
  71. package/.next/server/app/api/settings/default-agents/route.js.nft.json +1 -1
  72. package/.next/server/app/api/settings/default-agents/route_client-reference-manifest.js +1 -1
  73. package/.next/server/app/api/settings/default-surface-mode/route_client-reference-manifest.js +1 -1
  74. package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
  75. package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
  76. package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
  77. package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
  78. package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
  79. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  80. package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
  81. package/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
  82. package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
  83. package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
  84. package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
  85. package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -1
  86. package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -1
  87. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
  88. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js.nft.json +1 -1
  89. package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
  90. package/.next/server/app/api/worktrees/[id]/capture/route.js +1 -1
  91. package/.next/server/app/api/worktrees/[id]/capture/route.js.nft.json +1 -1
  92. package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
  93. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js +1 -1
  94. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js.nft.json +1 -1
  95. package/.next/server/app/api/worktrees/[id]/clear-composer/route_client-reference-manifest.js +1 -1
  96. package/.next/server/app/api/worktrees/[id]/cli-reference/route_client-reference-manifest.js +1 -1
  97. package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
  98. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
  99. package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
  100. package/.next/server/app/api/worktrees/[id]/current-output/route.js.nft.json +1 -1
  101. package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
  102. package/.next/server/app/api/worktrees/[id]/direct-input/route.js +1 -1
  103. package/.next/server/app/api/worktrees/[id]/direct-input/route.js.nft.json +1 -1
  104. package/.next/server/app/api/worktrees/[id]/direct-input/route_client-reference-manifest.js +1 -1
  105. package/.next/server/app/api/worktrees/[id]/env/route_client-reference-manifest.js +1 -1
  106. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
  107. package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
  108. package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
  109. package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
  110. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
  111. package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
  112. package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
  113. package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
  114. package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
  115. package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
  116. package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
  117. package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
  118. package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
  119. package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
  120. package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
  121. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
  122. package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
  123. package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
  124. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
  125. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
  126. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
  127. package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
  128. package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
  129. package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
  130. package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
  131. package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
  132. package/.next/server/app/api/worktrees/[id]/instances/notes/route_client-reference-manifest.js +1 -1
  133. package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js +1 -1
  134. package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js.nft.json +1 -1
  135. package/.next/server/app/api/worktrees/[id]/instances/opencode/route_client-reference-manifest.js +1 -1
  136. package/.next/server/app/api/worktrees/[id]/interrupt/route.js +1 -1
  137. package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
  138. package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
  139. package/.next/server/app/api/worktrees/[id]/kill-session/route.js +1 -1
  140. package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -1
  141. package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
  142. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
  143. package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
  144. package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
  145. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
  146. package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
  147. package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
  148. package/.next/server/app/api/worktrees/[id]/opencode/diff/route_client-reference-manifest.js +1 -1
  149. package/.next/server/app/api/worktrees/[id]/opencode/session/route.js +1 -1
  150. package/.next/server/app/api/worktrees/[id]/opencode/session/route.js.nft.json +1 -1
  151. package/.next/server/app/api/worktrees/[id]/opencode/session/route_client-reference-manifest.js +1 -1
  152. package/.next/server/app/api/worktrees/[id]/opencode/share/route.js +1 -1
  153. package/.next/server/app/api/worktrees/[id]/opencode/share/route.js.nft.json +1 -1
  154. package/.next/server/app/api/worktrees/[id]/opencode/share/route_client-reference-manifest.js +1 -1
  155. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
  156. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -1
  157. package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
  158. package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route.js +1 -1
  159. package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route.js.nft.json +1 -1
  160. package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route_client-reference-manifest.js +1 -1
  161. package/.next/server/app/api/worktrees/[id]/resolve-target/route_client-reference-manifest.js +1 -1
  162. package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -1
  163. package/.next/server/app/api/worktrees/[id]/respond/route.js.nft.json +1 -1
  164. package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
  165. package/.next/server/app/api/worktrees/[id]/route.js +1 -1
  166. package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
  167. package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
  168. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
  169. package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
  170. package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
  171. package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
  172. package/.next/server/app/api/worktrees/[id]/send/route.js +1 -1
  173. package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
  174. package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
  175. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +3 -3
  176. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -1
  177. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
  178. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
  179. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
  180. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
  181. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
  182. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route_client-reference-manifest.js +1 -1
  183. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route_client-reference-manifest.js +1 -1
  184. package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
  185. package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
  186. package/.next/server/app/api/worktrees/[id]/special-keys/route.js +1 -1
  187. package/.next/server/app/api/worktrees/[id]/special-keys/route.js.nft.json +1 -1
  188. package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
  189. package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -1
  190. package/.next/server/app/api/worktrees/[id]/terminal/route.js +1 -103
  191. package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
  192. package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
  193. package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
  194. package/.next/server/app/api/worktrees/[id]/timers/route.js +1 -1
  195. package/.next/server/app/api/worktrees/[id]/timers/route.js.nft.json +1 -1
  196. package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
  197. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  198. package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
  199. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
  200. package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
  201. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
  202. package/.next/server/app/api/worktrees/[id]/verify/config/route_client-reference-manifest.js +1 -1
  203. package/.next/server/app/api/worktrees/[id]/verify/route.js +1 -1
  204. package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -1
  205. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route.js +1 -1
  206. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route_client-reference-manifest.js +1 -1
  207. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -1
  208. package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -1
  209. package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
  210. package/.next/server/app/api/worktrees/apply-default-agents/route_client-reference-manifest.js +1 -1
  211. package/.next/server/app/api/worktrees/route.js +1 -1
  212. package/.next/server/app/api/worktrees/route.js.nft.json +1 -1
  213. package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
  214. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  215. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  216. package/.next/server/app/more/page_client-reference-manifest.js +1 -1
  217. package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  218. package/.next/server/app/page_client-reference-manifest.js +1 -1
  219. package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
  220. package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
  221. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  222. package/.next/server/app/sessions/page.js +1 -1
  223. package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  224. package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
  225. package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
  226. package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  227. package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
  228. package/.next/server/app/worktrees/[id]/page.js +12 -12
  229. package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
  230. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
  231. package/.next/server/app-paths-manifest.json +41 -41
  232. package/.next/server/chunks/1191.js +11 -4
  233. package/.next/server/chunks/1501.js +1 -1
  234. package/.next/server/chunks/1601.js +2 -2
  235. package/.next/server/chunks/1656.js +2 -2
  236. package/.next/server/chunks/1945.js +3 -3
  237. package/.next/server/chunks/1990.js +103 -0
  238. package/.next/server/chunks/2119.js +1 -1
  239. package/.next/server/chunks/2404.js +1 -1
  240. package/.next/server/chunks/2422.js +1 -1
  241. package/.next/server/chunks/2445.js +1 -1
  242. package/.next/server/chunks/2534.js +1 -1
  243. package/.next/server/chunks/255.js +1 -1
  244. package/.next/server/chunks/3241.js +1 -1
  245. package/.next/server/chunks/3505.js +2 -2
  246. package/.next/server/chunks/4248.js +1 -1
  247. package/.next/server/chunks/4280.js +1 -0
  248. package/.next/server/chunks/5209.js +1 -1
  249. package/.next/server/chunks/6119.js +1 -1
  250. package/.next/server/chunks/6130.js +1 -1
  251. package/.next/server/chunks/6401.js +1 -1
  252. package/.next/server/chunks/6486.js +9 -8
  253. package/.next/server/chunks/6781.js +1 -1
  254. package/.next/server/chunks/720.js +103 -0
  255. package/.next/server/chunks/7604.js +2 -0
  256. package/.next/server/chunks/7905.js +1 -1
  257. package/.next/server/chunks/8581.js +7 -7
  258. package/.next/server/chunks/8728.js +3 -3
  259. package/.next/server/chunks/8791.js +1 -1
  260. package/.next/server/chunks/8807.js +19 -18
  261. package/.next/server/chunks/8918.js +2 -104
  262. package/.next/server/chunks/936.js +1 -1
  263. package/.next/server/chunks/9390.js +1 -1
  264. package/.next/server/chunks/9540.js +1 -1
  265. package/.next/server/chunks/9627.js +3 -3
  266. package/.next/server/chunks/9731.js +2 -2
  267. package/.next/server/middleware-manifest.json +5 -5
  268. package/.next/server/pages/500.html +1 -1
  269. package/.next/server/server-reference-manifest.json +1 -1
  270. package/.next/static/chunks/2099-c3e0ab70a1b95dd3.js +1 -0
  271. package/.next/static/chunks/{2407-a6533805a86d05bd.js → 2407-26139a8a2f1adbe8.js} +1 -1
  272. package/.next/static/chunks/{2619-04bc32f026a0d946.js → 2619-a305ad4810f1393a.js} +1 -1
  273. package/.next/static/chunks/{2863-6a07ec82fb52f4dd.js → 2863-f0121af1cbbedb3b.js} +1 -1
  274. package/.next/static/chunks/{8165-263172c17ae8e8c3.js → 8165-c68b3dc844210e6a.js} +1 -1
  275. package/.next/static/chunks/8407-35bbfc84793d7004.js +1 -0
  276. package/.next/static/chunks/9079-406b84d3cc891a87.js +1 -0
  277. package/.next/static/chunks/app/{layout-538d8d2746ad1588.js → layout-46b4cbf07520d9b6.js} +1 -1
  278. package/.next/static/chunks/app/sessions/page-fb241bed579c67aa.js +1 -0
  279. package/.next/static/chunks/app/worktrees/[id]/page-cbc7749a33450cc5.js +1 -0
  280. package/.next/static/chunks/app/worktrees/[id]/terminal/{page-373ea37b16d930c7.js → page-c601f3b3ece6557e.js} +1 -1
  281. package/.next/trace +13 -13
  282. package/dist/cli/commands/auto-yes.d.ts +24 -0
  283. package/dist/cli/commands/auto-yes.d.ts.map +1 -1
  284. package/dist/cli/commands/auto-yes.js +73 -3
  285. package/dist/cli/commands/instances.d.ts.map +1 -1
  286. package/dist/cli/commands/instances.js +10 -1
  287. package/dist/cli/commands/prompt.d.ts.map +1 -1
  288. package/dist/cli/commands/prompt.js +5 -3
  289. package/dist/cli/commands/send.d.ts.map +1 -1
  290. package/dist/cli/commands/send.js +15 -0
  291. package/dist/cli/commands/wait.d.ts.map +1 -1
  292. package/dist/cli/commands/wait.js +101 -13
  293. package/dist/cli/docs/agent-operations.d.ts +2 -2
  294. package/dist/cli/docs/agent-operations.d.ts.map +1 -1
  295. package/dist/cli/docs/agent-operations.js +27 -0
  296. package/dist/cli/types/api-responses.d.ts +116 -2
  297. package/dist/cli/types/api-responses.d.ts.map +1 -1
  298. package/dist/cli/types/index.d.ts +4 -0
  299. package/dist/cli/types/index.d.ts.map +1 -1
  300. package/dist/cli/utils/resource-resolvers.d.ts +0 -18
  301. package/dist/cli/utils/resource-resolvers.d.ts.map +1 -1
  302. package/dist/cli/utils/resource-resolvers.js +1 -51
  303. package/dist/lib/polling/auto-yes-suppression-reason.d.ts +54 -2
  304. package/dist/lib/polling/auto-yes-suppression-reason.d.ts.map +1 -1
  305. package/dist/lib/polling/auto-yes-suppression-reason.js +33 -2
  306. package/dist/lib/prompt-observation/types.d.ts +13 -0
  307. package/dist/lib/prompt-observation/types.d.ts.map +1 -1
  308. package/dist/server/locales/en/worktree.json +2 -1
  309. package/dist/server/locales/ja/worktree.json +2 -1
  310. package/dist/server/src/lib/auto-yes-poller-answer-target.js +38 -0
  311. package/dist/server/src/lib/auto-yes-poller-keys.js +35 -0
  312. package/dist/server/src/lib/auto-yes-poller-session-presence.js +26 -0
  313. package/dist/server/src/lib/auto-yes-poller-tick.js +233 -0
  314. package/dist/server/src/lib/auto-yes-poller.js +337 -376
  315. package/dist/server/src/lib/auto-yes-state.js +50 -2
  316. package/dist/server/src/lib/cli-tools/submit-verified-sender.js +107 -14
  317. package/dist/server/src/lib/db/chat-db.js +5 -1
  318. package/dist/server/src/lib/db/verification-db.js +23 -2
  319. package/dist/server/src/lib/detection/option-recommendation.js +120 -0
  320. package/dist/server/src/lib/detection/prompt-detect-multiple-choice-approval-context.js +290 -0
  321. package/dist/server/src/lib/detection/prompt-detect-multiple-choice.js +396 -350
  322. package/dist/server/src/lib/detection/prompt-detector.js +92 -21
  323. package/dist/server/src/lib/detection/prompt-screen-key.js +60 -0
  324. package/dist/server/src/lib/detection/tools/antigravity/dialog.js +158 -35
  325. package/dist/server/src/lib/detection/tools/claude/detect.js +111 -10
  326. package/dist/server/src/lib/detection/tools/command-code/dialog.js +67 -0
  327. package/dist/server/src/lib/detection/tools/dialog-block.js +16 -0
  328. package/dist/server/src/lib/detection/waiting-screen-reading.js +98 -0
  329. package/dist/server/src/lib/hooks/permission-decision-service.js +7 -0
  330. package/dist/server/src/lib/polling/auto-yes-confirm-page.js +2 -2
  331. package/dist/server/src/lib/polling/auto-yes-confirmation-ledger-types.js +3 -0
  332. package/dist/server/src/lib/polling/auto-yes-confirmation-ledger.js +34 -3
  333. package/dist/server/src/lib/polling/auto-yes-decision-state.js +195 -0
  334. package/dist/server/src/lib/polling/auto-yes-dialog-gate.js +139 -10
  335. package/dist/server/src/lib/polling/auto-yes-enter-fallback.js +14 -0
  336. package/dist/server/src/lib/polling/auto-yes-manual-answer.js +122 -0
  337. package/dist/server/src/lib/polling/auto-yes-option-effect.js +157 -0
  338. package/dist/server/src/lib/polling/auto-yes-policy.js +11 -5
  339. package/dist/server/src/lib/polling/auto-yes-poller-capture.js +15 -2
  340. package/dist/server/src/lib/polling/auto-yes-poller-generation.js +42 -1
  341. package/dist/server/src/lib/polling/auto-yes-poller-receipt-log.js +42 -5
  342. package/dist/server/src/lib/polling/auto-yes-poller-state.js +147 -49
  343. package/dist/server/src/lib/polling/auto-yes-poller-steps.js +172 -2
  344. package/dist/server/src/lib/polling/auto-yes-prompt-suppression.js +2 -2
  345. package/dist/server/src/lib/polling/auto-yes-question-choice.js +57 -0
  346. package/dist/server/src/lib/polling/auto-yes-resolver.js +96 -21
  347. package/dist/server/src/lib/polling/auto-yes-suppression-reason.js +33 -2
  348. package/dist/server/src/lib/polling/auto-yes-suppression-state.js +25 -1
  349. package/dist/server/src/lib/polling/prompt-screen-reading.js +232 -0
  350. package/dist/server/src/lib/polling/response-checker-dialog-gate.js +39 -0
  351. package/dist/server/src/lib/polling/response-checker.js +133 -43
  352. package/dist/server/src/lib/prompt-answer-sender.js +104 -10
  353. package/dist/server/src/lib/push/notification-dedup.js +15 -2
  354. package/dist/server/src/lib/push/prompt-card-state.js +140 -19
  355. package/dist/server/src/lib/push/prompt-push-gate.js +158 -12
  356. package/dist/server/src/lib/push/push-sender.js +23 -3
  357. package/dist/server/src/lib/push/resolution-push-notifier.js +14 -0
  358. package/dist/server/src/lib/push/waiting-push-notifier.js +139 -17
  359. package/dist/server/src/lib/realtime/terminal-broadcast.js +16 -0
  360. package/dist/server/src/lib/session/agent-event-state.js +25 -5
  361. package/dist/server/src/lib/session/agent-event-turn.js +140 -46
  362. package/dist/server/src/lib/session/cli-session.js +21 -2
  363. package/dist/server/src/lib/session/current-output-builder.js +64 -11
  364. package/dist/server/src/lib/session/send-attempt-state.js +23 -7
  365. package/dist/server/src/lib/session/waiting-episode-binding-observation.js +289 -0
  366. package/dist/server/src/lib/session/waiting-episode-binding-resolve.js +38 -0
  367. package/dist/server/src/lib/session/waiting-episode-binding.js +276 -0
  368. package/dist/server/src/lib/session/waiting-episode-state.js +307 -17
  369. package/dist/server/src/lib/session/waiting-episode-verdict.js +174 -0
  370. package/dist/server/src/lib/tmux/tmux-capture-cache.js +76 -11
  371. package/dist/server/src/lib/tmux/tmux.js +54 -9
  372. package/dist/server/src/lib/verification/gate-runner.js +162 -13
  373. package/dist/server/src/lib/verification/machine-lock.js +5 -0
  374. package/dist/server/src/lib/ws-server.js +18 -3
  375. package/dist/server/src/types/auto-yes-answer-mode.js +38 -0
  376. package/dist/server/src/types/auto-yes-decision.js +61 -0
  377. package/dist/server/src/types/auto-yes.js +6 -0
  378. package/dist/server/src/types/prompt-reading.js +32 -0
  379. package/dist/types/auto-yes-answer-mode.d.ts +35 -0
  380. package/dist/types/auto-yes-answer-mode.d.ts.map +1 -0
  381. package/dist/types/auto-yes-answer-mode.js +38 -0
  382. package/docs/en/user-guide/webapp-guide.md +33 -4
  383. package/package.json +1 -1
  384. package/public/sw.js +76 -4
  385. package/release-notes/0.48.0.json +57 -0
  386. package/.next/server/chunks/1559.js +0 -2
  387. package/.next/server/chunks/2460.js +0 -1
  388. package/.next/server/chunks/5595.js +0 -1
  389. package/.next/server/chunks/610.js +0 -1
  390. package/.next/static/chunks/602-1c1488959215e140.js +0 -1
  391. package/.next/static/chunks/8407-155f84e5ba05f1d5.js +0 -1
  392. package/.next/static/chunks/9079-24f9fa549ed298f1.js +0 -1
  393. package/.next/static/chunks/app/sessions/page-e02f1adb1d1c1ccc.js +0 -1
  394. package/.next/static/chunks/app/worktrees/[id]/page-46aced20b2b1c010.js +0 -1
  395. /package/.next/static/{etorRtpxbQqqOzdUeXdw2 → PTlAswXLq8PAe2vUJ8dVP}/_buildManifest.js +0 -0
  396. /package/.next/static/{etorRtpxbQqqOzdUeXdw2 → PTlAswXLq8PAe2vUJ8dVP}/_ssgManifest.js +0 -0
@@ -10,6 +10,7 @@ exports.detectPrompt = detectPrompt;
10
10
  exports.resetDetectPromptCache = resetDetectPromptCache;
11
11
  const logger_1 = require("../../lib/logger");
12
12
  const prompt_detect_multiple_choice_1 = require("./prompt-detect-multiple-choice");
13
+ const prompt_detect_multiple_choice_approval_context_1 = require("./prompt-detect-multiple-choice-approval-context");
13
14
  const tui_detection_frame_1 = require("./tui-detection-frame");
14
15
  const truncate_raw_content_1 = require("./truncate-raw-content");
15
16
  const logger = (0, logger_1.createLogger)('prompt-detector');
@@ -29,7 +30,13 @@ let lastOutputTail = null;
29
30
  /**
30
31
  * Yes/no pattern definitions for data-driven matching.
31
32
  * Each entry defines a regex pattern and its associated default option.
32
- * Patterns are evaluated in order; the first match wins.
33
+ *
34
+ * Issue #3881 (H-4): every pattern's every match in the tail window is a
35
+ * candidate, and the LATEST one (the lowest on the pane) is the prompt — see
36
+ * {@link findYesNoCandidates}. Before, the patterns were tried in this order
37
+ * and the first match of the first pattern won, so an older `(y/n)` quoted in
38
+ * the transcript beat the live `[y/N]` under it, and the deny patterns were
39
+ * judged against the old prompt's rows.
33
40
  *
34
41
  * Pattern format:
35
42
  * - regex: Must have a capture group (1) for the question text
@@ -59,6 +66,49 @@ function locateMatchLines(tailText, tailStart, match) {
59
66
  const startLine = tailStart + countNewlines(tailText.slice(0, offset));
60
67
  return { startLine, endLine: startLine + countNewlines(match[0]) };
61
68
  }
69
+ /**
70
+ * Pattern 5: `Approve?` on its own line or at the end of one. A candidate on
71
+ * the same terms as {@link YES_NO_PATTERNS} (Issue #3881, review N1), after
72
+ * them in the tie-break order.
73
+ */
74
+ const APPROVE_PATTERN = /^(.*?)Approve\?\s*$/m;
75
+ /**
76
+ * Every yes/no match in the tail window, oldest first (Issue #3881, H-4).
77
+ *
78
+ * Matched against the same joined window with the same patterns as before, so
79
+ * a line reads as a candidate exactly when it read as a prompt before; only
80
+ * which candidate wins changed. Sorted by the row the match ends on, then by
81
+ * where it starts, then by pattern order (a row cannot end in two spellings,
82
+ * so the last key only keeps the order deterministic).
83
+ *
84
+ * Review N1: `Approve?` is one of the five spellings, not a fallback tried
85
+ * only when the four found nothing — that let an older `Old? (y/n)` beat the
86
+ * live `Approve?` under it, and left `Approve?`s in one block uncompared.
87
+ */
88
+ function findYesNoCandidates(lastLines, tailStart) {
89
+ const candidates = [];
90
+ const spellings = [
91
+ ...YES_NO_PATTERNS.map(p => ({ regex: p.regex, defaultOption: p.defaultOption, approve: false })),
92
+ { regex: APPROVE_PATTERN, defaultOption: undefined, approve: true },
93
+ ];
94
+ spellings.forEach((pattern, order) => {
95
+ const global = new RegExp(pattern.regex.source, `${pattern.regex.flags}g`);
96
+ for (const match of lastLines.matchAll(global)) {
97
+ const { startLine, endLine } = locateMatchLines(lastLines, tailStart, match);
98
+ candidates.push({
99
+ match,
100
+ defaultOption: pattern.defaultOption,
101
+ approve: pattern.approve,
102
+ startLine,
103
+ endLine,
104
+ offset: match.index ?? 0,
105
+ order,
106
+ });
107
+ }
108
+ });
109
+ candidates.sort((a, b) => a.endLine - b.endLine || a.offset - b.offset || a.order - b.order);
110
+ return candidates;
111
+ }
62
112
  /**
63
113
  * What a yes/no prompt is asking approval for (Issue #1699).
64
114
  *
@@ -68,9 +118,24 @@ function locateMatchLines(tailText, tailStart, match) {
68
118
  * directly above its `(y/n)` — the case the deny patterns were written for —
69
119
  * still lands inside; a command approved in an earlier turn does not.
70
120
  */
71
- function yesNoApprovalTarget(lines, tailText, tailStart, match) {
121
+ function yesNoApprovalTarget(lines, tailText, tailStart, match, olderCandidates = []) {
72
122
  const { startLine, endLine } = locateMatchLines(tailText, tailStart, match);
73
- return (0, prompt_detect_multiple_choice_1.joinApprovalTarget)(lines, (0, prompt_detect_multiple_choice_1.findApprovalContextStart)(lines, startLine, endLine + 1), endLine + 1);
123
+ // Issue #3881: a here-document's `> ` row at the prompt's column is not a
124
+ // known boundary (limit 3 of #3832) — `truncated`, not complete.
125
+ const range = (0, prompt_detect_multiple_choice_approval_context_1.findYesNoApprovalContextRange)(lines, startLine, endLine + 1);
126
+ // Issue #3881 (H-4): another yes/no prompt inside this prompt's own block
127
+ // means the block holds two questions, and which rows the live one asks
128
+ // about cannot be told from the screen — not the whole request either.
129
+ const contested = olderCandidates.some(c => c.endLine >= range.start && c.endLine < startLine);
130
+ return {
131
+ approvalTarget: (0, prompt_detect_multiple_choice_1.joinApprovalTarget)(lines, range.start, endLine + 1),
132
+ // Issue #3881 (H-3): whether the scan above stopped at a boundary.
133
+ approvalContext: {
134
+ startRow: range.start,
135
+ endRow: endLine + 1,
136
+ completeness: contested ? 'truncated' : range.completeness,
137
+ },
138
+ };
74
139
  }
75
140
  /**
76
141
  * Creates a yes/no prompt detection result.
@@ -80,11 +145,12 @@ function yesNoApprovalTarget(lines, tailText, tailStart, match) {
80
145
  * @param question - The question text
81
146
  * @param cleanContent - The clean content string
82
147
  * @param rawContent - The raw content string (last 20 lines, trimmed)
83
- * @param approvalTarget - Issue #1699 deny-match surface for this prompt
148
+ * @param approvalBlock - Issue #1699 deny-match surface for this prompt, and
149
+ * (Issue #3881) the rows it was cut from and whether its top is a boundary
84
150
  * @param defaultOption - Optional default option ('yes' or 'no')
85
151
  * @returns PromptDetectionResult with isPrompt: true and yes_no prompt data
86
152
  */
87
- function yesNoPromptResult(question, cleanContent, rawContent, approvalTarget, defaultOption) {
153
+ function yesNoPromptResult(question, cleanContent, rawContent, { approvalTarget, approvalContext }, defaultOption) {
88
154
  return {
89
155
  isPrompt: true,
90
156
  promptData: {
@@ -99,9 +165,15 @@ function yesNoPromptResult(question, cleanContent, rawContent, approvalTarget, d
99
165
  // apart is the whole fix — the wide window is a scrollback view and a
100
166
  // deny pattern matched against it fires on turns that are already done.
101
167
  ...(approvalTarget !== undefined && { approvalTarget }),
168
+ // Issue #3881 (H-3): a target the line cap cut short is not the whole
169
+ // request, and the resolver must not take a deny miss on it as a pass.
170
+ ...(approvalTarget !== undefined && approvalContext.completeness === 'truncated' && {
171
+ approvalTargetCompleteness: 'truncated',
172
+ }),
102
173
  },
103
174
  cleanContent,
104
175
  rawContent,
176
+ approvalContext,
105
177
  };
106
178
  }
107
179
  /**
@@ -169,24 +241,23 @@ function detectPrompt(output, options) {
169
241
  }
170
242
  return multipleChoiceResult;
171
243
  }
172
- // Patterns 1-4: Yes/no patterns (data-driven matching)
244
+ // Patterns 1-5: the yes/no spellings and `Approve?` (data-driven matching).
245
+ // Issue #3881 (H-4, review N1): the latest candidate in the window among all
246
+ // five, not the first pattern's first match, and the older ones are what its
247
+ // block is checked against.
173
248
  const trimmedLastLines = lastLines.trim();
174
- for (const pattern of YES_NO_PATTERNS) {
175
- const match = lastLines.match(pattern.regex);
176
- if (match) {
177
- const question = match[1].trim();
178
- return yesNoPromptResult(question, question, trimmedLastLines, yesNoApprovalTarget(lines, lastLines, tailStart, match), pattern.defaultOption);
249
+ const yesNoCandidates = findYesNoCandidates(lastLines, tailStart);
250
+ const live = yesNoCandidates[yesNoCandidates.length - 1];
251
+ if (live) {
252
+ const block = yesNoApprovalTarget(lines, lastLines, tailStart, live.match, yesNoCandidates.slice(0, -1));
253
+ if (live.approve) {
254
+ const content = live.match[1].trim();
255
+ // If there's content before "Approve?", include it in the question
256
+ const question = content ? `${content} Approve?` : 'Approve?';
257
+ return yesNoPromptResult(question, content || 'Approve?', trimmedLastLines, block);
179
258
  }
180
- }
181
- // Pattern 5: Approve?
182
- // Matches "Approve?" on its own line or at the end of a line
183
- const approvePattern = /^(.*?)Approve\?\s*$/m;
184
- const approveMatch = lastLines.match(approvePattern);
185
- if (approveMatch) {
186
- const content = approveMatch[1].trim();
187
- // If there's content before "Approve?", include it in the question
188
- const question = content ? `${content} Approve?` : 'Approve?';
189
- return yesNoPromptResult(question, content || 'Approve?', trimmedLastLines, yesNoApprovalTarget(lines, lastLines, tailStart, approveMatch));
259
+ const question = live.match[1].trim();
260
+ return yesNoPromptResult(question, question, trimmedLastLines, block, live.defaultOption);
190
261
  }
191
262
  // No prompt detected
192
263
  // D2-005: Suppress duplicate complete log
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ /**
3
+ * Which prompt a screen shows, as one string (Issue #3706, moved here by #3798).
4
+ *
5
+ * Written for the Auto-Yes poller's stopped answers (`partialAnswerScreenKey`,
6
+ * which `polling/auto-yes-poller-state` still re-exports under that name). The
7
+ * waiting episodes (Issue #3798) need the same question — "is this frame the
8
+ * confirmation that wait closed on, or another one?" — from the session layer,
9
+ * which must not reach into `polling/`, so the reading lives in the detection
10
+ * layer both can import.
11
+ *
12
+ * @module lib/detection/prompt-screen-key
13
+ */
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.promptScreenKey = promptScreenKey;
16
+ const prompt_key_1 = require("./prompt-key");
17
+ const appearance_1 = require("../prompt-observation/appearance");
18
+ /**
19
+ * Which prompt a stopped answer is about (Issue #3706): the type, the question,
20
+ * the option labels and `approvalTarget` — what `promptFrameKey` (auto-yes-poller-state) tells
21
+ * apart — but NOT where the cursor is. The keys that were sent may have moved
22
+ * the cursor themselves (a `Down` whose Enter was withheld), and that must not
23
+ * make the same list read as a new one; a different list or a different command
24
+ * under the same question is a new prompt and is answered.
25
+ */
26
+ function promptScreenKey(promptData) {
27
+ const options = promptData.type === 'multiple_choice'
28
+ ? promptData.options.map((o) => `${o.number}.${o.label}`).join('\n')
29
+ : promptData.options.join('\n');
30
+ return [(0, prompt_key_1.generatePromptKey)(promptData), options, withoutCursorMarks(promptData)].join('\u0000');
31
+ }
32
+ /**
33
+ * `approvalTarget` with the cursor taken out: the generic parser copies the
34
+ * option panel into it, `❯` row included, so a moved cursor would otherwise
35
+ * read as another prompt.
36
+ *
37
+ * [Issue #3817] Only the rows the block reader adopted as the options are
38
+ * aligned (`approvalTargetWithOptionRowsAligned`, the reading #3812 gives the
39
+ * strict respond), so two commands whose bodies differ by an indent or a `>`
40
+ * are two screens. A label the block reader read may run longer than the
41
+ * prompt's — it folds wrapped rows and the footer in — so it only has to start
42
+ * with it. A yes/no prompt has no cursor and is read as it is. A list whose
43
+ * rows cannot be told that way keeps the old reading below: two bodies then
44
+ * read as one screen, which holds the prompt for a human rather than typing
45
+ * the answer twice.
46
+ */
47
+ function withoutCursorMarks(promptData) {
48
+ const target = promptData.approvalTarget ?? '';
49
+ if (promptData.type !== 'multiple_choice')
50
+ return target;
51
+ const aligned = (0, appearance_1.approvalTargetWithOptionRowsAligned)(target, promptData.options.map((o) => o.label), (read, named) => read.startsWith(named));
52
+ return aligned ?? withoutLeadingMarks(target);
53
+ }
54
+ /** Every row's leading marks and indentation taken out (the reading before #3817). */
55
+ function withoutLeadingMarks(text) {
56
+ return text
57
+ .split('\n')
58
+ .map((line) => line.replace(/^[\s❯›>▶►●○◉→]+/u, ''))
59
+ .join('\n');
60
+ }
@@ -66,6 +66,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
66
66
  exports.readAntigravityNumberedDialog = readAntigravityNumberedDialog;
67
67
  exports.detectAntigravityNumberedDialogPrompt = detectAntigravityNumberedDialogPrompt;
68
68
  exports.isAntigravityUnvouchedNumberedScreen = isAntigravityUnvouchedNumberedScreen;
69
+ exports.isAntigravityUnansweredNumberedScreen = isAntigravityUnansweredNumberedScreen;
70
+ exports.isAntigravityFeedbackMenuScreen = isAntigravityFeedbackMenuScreen;
69
71
  const cli_patterns_1 = require("../../cli-patterns");
70
72
  const prompt_detect_multiple_choice_1 = require("../../prompt-detect-multiple-choice");
71
73
  const tui_detection_frame_1 = require("../../tui-detection-frame");
@@ -219,6 +221,7 @@ function detectAntigravityNumberedDialogPrompt(text) {
219
221
  const dialog = readAntigravityNumberedDialog(lines);
220
222
  if (dialog === null)
221
223
  return null;
224
+ const range = (0, prompt_detect_multiple_choice_1.findApprovalContextRange)(lines, dialog.questionRow, dialog.footerRow);
222
225
  return (0, prompt_detect_multiple_choice_1.buildMultipleChoiceResult)(dialog.question, dialog.options.map((label, index) => ({
223
226
  number: index + 1,
224
227
  label,
@@ -229,7 +232,9 @@ function detectAntigravityNumberedDialogPrompt(text) {
229
232
  // turn's boundary and below at the footer, so the command in the
230
233
  // `Requesting permission for:` block and in the labels is judged and
231
234
  // nothing from an earlier, already-answered approval is.
232
- approvalTarget: (0, prompt_detect_multiple_choice_1.joinApprovalTarget)(lines, (0, prompt_detect_multiple_choice_1.findApprovalContextStart)(lines, dialog.questionRow, dialog.footerRow), dialog.footerRow),
235
+ approvalTarget: (0, prompt_detect_multiple_choice_1.joinApprovalTarget)(lines, range.start, dialog.footerRow),
236
+ // Issue #3881: and whether its top is a boundary.
237
+ approvalContext: { startRow: range.start, endRow: dialog.footerRow, completeness: range.completeness },
233
238
  }, normalized, truncate_raw_content_1.truncateRawContent);
234
239
  }
235
240
  /**
@@ -247,8 +252,89 @@ const OPTION_ROW_PATTERN = /^\s*(>)?\s*(\d+)\.\s+\S/;
247
252
  * so the same words inside an option label or a quoted command never match.
248
253
  */
249
254
  const FEEDBACK_MENU_FOOTER_PATTERN = /^\s*esc Cancel\s*·\s*\d+-\d+\s+Select\b/;
255
+ /**
256
+ * Any piece of agy's `↑/↓ Navigate` footer (`↑/↓ Navigate · tab Amend`, a footer
257
+ * a narrow pane cut at `↑/↓ Nav`, another version's `↑/↓ Navigate · enter
258
+ * Select`). Only looked for UNDER the last option, so a footer left in the
259
+ * scrollback by an earlier, answered dialog does not count.
260
+ */
261
+ const NAVIGATE_FOOTER_PATTERN = /↑\/↓/;
250
262
  /** How far above the bottom option row the run down from `1.` may reach. */
251
263
  const OPTION_RUN_MAX_ROWS = 40;
264
+ /**
265
+ * agy's permission-panel heading rows (`Requesting permission for:`, `Do you
266
+ * want to proceed?` — `antigravity-live-2364/dialog-bash-*.txt`, agy 1.1.27).
267
+ * Whole-row matches, so the same words inside a reply's sentence do not count.
268
+ */
269
+ const PERMISSION_HEADING_PATTERN = /^\s*(?:Requesting permission for:|Do you want to proceed\?)\s*$/;
270
+ /**
271
+ * Read the bottom run of options, or null when the frame has none or a bare
272
+ * `>` composer is drawn under it — agy paints none while a screen replaces it,
273
+ * so those options are a quotation (the #3183 quotation veto judges them).
274
+ *
275
+ * The run is read upward while the numbers descend: a number that does not (a
276
+ * different list above) or a boundary row ends it.
277
+ */
278
+ function readBottomOptionRun(text) {
279
+ const lines = (0, tui_detection_frame_1.normalizeTuiFrameForDetection)(text).split('\n');
280
+ let last = -1;
281
+ for (let i = lines.length - 1; i >= 0; i--) {
282
+ if (patterns_1.ANTIGRAVITY_PROMPT_PATTERN.test(lines[i]))
283
+ return null;
284
+ if (OPTION_ROW_PATTERN.test(lines[i])) {
285
+ last = i;
286
+ break;
287
+ }
288
+ }
289
+ if (last < 0)
290
+ return null;
291
+ const bottomRow = OPTION_ROW_PATTERN.exec(lines[last]);
292
+ const bottom = Number(bottomRow[2]);
293
+ let lowest = bottom;
294
+ let highlighted = bottomRow[1] !== undefined;
295
+ let gap = false;
296
+ let top = last;
297
+ const floor = Math.max(0, last - OPTION_RUN_MAX_ROWS);
298
+ for (let i = last - 1; i >= floor && lowest > 1; i--) {
299
+ const match = OPTION_ROW_PATTERN.exec(lines[i]);
300
+ if (match === null) {
301
+ if (cli_patterns_1.ANTIGRAVITY_DIALOG_BOUNDARY_PATTERN.test(lines[i]))
302
+ break;
303
+ continue;
304
+ }
305
+ const number = Number(match[2]);
306
+ if (number >= lowest)
307
+ break;
308
+ if (number !== lowest - 1)
309
+ gap = true;
310
+ lowest = number;
311
+ top = i;
312
+ if (match[1] !== undefined)
313
+ highlighted = true;
314
+ }
315
+ // The panel above the run: up to the boundary row that opens it (the `●`
316
+ // tool-call row, a rule, the previous turn's `>`), or as far as the run may reach.
317
+ let permissionHeading = false;
318
+ for (let i = top - 1; i >= Math.max(0, top - OPTION_RUN_MAX_ROWS); i--) {
319
+ if (cli_patterns_1.ANTIGRAVITY_DIALOG_BOUNDARY_PATTERN.test(lines[i]))
320
+ break;
321
+ if (PERMISSION_HEADING_PATTERN.test(lines[i])) {
322
+ permissionHeading = true;
323
+ break;
324
+ }
325
+ }
326
+ const below = lines.slice(last + 1).filter(row => row.trim() !== '');
327
+ return {
328
+ lines,
329
+ bottom,
330
+ lowest,
331
+ gap,
332
+ highlighted,
333
+ feedbackFooter: below.length > 0 && FEEDBACK_MENU_FOOTER_PATTERN.test(below[0]),
334
+ navigateFooter: below.some(row => NAVIGATE_FOOTER_PATTERN.test(row)),
335
+ permissionHeading,
336
+ };
337
+ }
252
338
  /**
253
339
  * Is this an agy screen with numbered options that the permission reader does
254
340
  * NOT vouch for? (Issue #3808)
@@ -268,46 +354,83 @@ const OPTION_RUN_MAX_ROWS = 40;
268
354
  * False for the `/feedback` menu (its `esc Cancel · 1-6 Select` footer directly
269
355
  * under the last option), which keeps the generic reading #2364 left it.
270
356
  *
271
- * Callers treat true as "no prompt to answer": a human drives the screen.
357
+ * The STATUS verdict's rule (`antigravity/detect.ts`: such a frame is
358
+ * unclassified, not `prompt_detected`). Whether a frame may be ANSWERED is the
359
+ * wider {@link isAntigravityUnansweredNumberedScreen} (#3818): a screen this
360
+ * rule leaves to the generic parser can still be one a human is waiting on.
272
361
  *
273
362
  * @param text - ANSI-stripped capture, box drawing optional
274
363
  */
275
364
  function isAntigravityUnvouchedNumberedScreen(text) {
276
- const lines = (0, tui_detection_frame_1.normalizeTuiFrameForDetection)(text).split('\n');
277
- let last = -1;
278
- for (let i = lines.length - 1; i >= 0; i--) {
279
- if (patterns_1.ANTIGRAVITY_PROMPT_PATTERN.test(lines[i]))
280
- return false;
281
- if (OPTION_ROW_PATTERN.test(lines[i])) {
282
- last = i;
283
- break;
284
- }
285
- }
286
- if (last < 0)
365
+ const run = readBottomOptionRun(text);
366
+ if (run === null || run.bottom < 2)
287
367
  return false;
288
- // The run, read upward from the bottom option: N., N-1., … 1.
289
- let expected = Number(OPTION_ROW_PATTERN.exec(lines[last])[2]);
290
- if (expected < 2)
368
+ if (run.lowest !== 1 || run.gap || !run.highlighted)
291
369
  return false;
292
- let highlighted = OPTION_ROW_PATTERN.exec(lines[last])[1] !== undefined;
293
- const floor = Math.max(0, last - OPTION_RUN_MAX_ROWS);
294
- for (let i = last - 1; i >= floor && expected > 1; i--) {
295
- const match = OPTION_ROW_PATTERN.exec(lines[i]);
296
- if (match === null) {
297
- if (cli_patterns_1.ANTIGRAVITY_DIALOG_BOUNDARY_PATTERN.test(lines[i]))
298
- return false;
299
- continue;
300
- }
301
- if (Number(match[2]) !== expected - 1)
302
- return false;
303
- expected--;
304
- if (match[1] !== undefined)
305
- highlighted = true;
306
- }
307
- if (expected !== 1 || !highlighted)
370
+ if (run.feedbackFooter)
308
371
  return false;
309
- const footer = lines.slice(last + 1).find(row => row.trim() !== '');
310
- if (footer !== undefined && FEEDBACK_MENU_FOOTER_PATTERN.test(footer))
372
+ return readAntigravityNumberedDialog(run.lines) === null;
373
+ }
374
+ /**
375
+ * May CommandMate NOT answer this agy numbered screen? (Issue #3818)
376
+ *
377
+ * The rule of every surface that sends a key — the Auto-Yes entry
378
+ * (`detectPromptOnCleanFrame`), `/prompt-response`'s re-verification
379
+ * (`assessPromptAnswerability`) and agent-health's `readsAsAutoYesPrompt` —
380
+ * asked after {@link readAntigravityNumberedDialog} declined the frame. Not the
381
+ * status verdict's: that one says whether a human is waiting, and keeps
382
+ * {@link isAntigravityUnvouchedNumberedScreen}.
383
+ *
384
+ * On agy the generic multiple-choice parser's reading is answered only for the
385
+ * two shapes vouched for here:
386
+ *
387
+ * - the `/feedback` menu (its `esc Cancel · 1-6 Select` footer directly under
388
+ * the last option), which #2364 left to the generic parser;
389
+ * - a reply's numbered list (#1928's legacy reading): options `1.` … `N.`,
390
+ * consecutive with no number missing, none wearing agy's `>` cursor, no
391
+ * `↑/↓` footer under them, and no agy permission heading (`Requesting
392
+ * permission for:` / `Do you want to proceed?`) above them in the same panel.
393
+ *
394
+ * Every other run of options numbered up to `N.` (N ≥ 2) is declined — not by
395
+ * listing what is wrong with it, which is how #3808 left holes: a run with a
396
+ * number missing (`> 1.` / `3.`, which the generic parser's single-gap
397
+ * tolerance reads as a prompt), a run that does not reach `1.` (the cursor row
398
+ * pushed off the top of the pane), a run under a `↑/↓` footer the reader would
399
+ * not take (the login-method screen, a footer a narrow pane cut), a run
400
+ * wearing a cursor whose footer is below the pane, and a permission dialog
401
+ * whose footer AND `>` row (option 3 or 4) are below the pane — its `1.` / `2.`
402
+ * rows wear no cursor, so only the heading above them tells it from a reply.
403
+ *
404
+ * False when the bottom option row is `1.` (a single `> 1. …` row — a sent
405
+ * message echoed above the spinner — is not a run) or when a bare `>` composer
406
+ * is drawn under the options (a quotation, judged by the #3183 veto).
407
+ *
408
+ * @param text - ANSI-stripped capture, box drawing optional
409
+ */
410
+ function isAntigravityUnansweredNumberedScreen(text) {
411
+ const run = readBottomOptionRun(text);
412
+ if (run === null || run.bottom < 2)
413
+ return false;
414
+ if (run.feedbackFooter)
415
+ return false;
416
+ const replyList = run.lowest === 1 && !run.gap && !run.highlighted && !run.navigateFooter
417
+ && !run.permissionHeading;
418
+ if (replyList)
311
419
  return false;
312
- return readAntigravityNumberedDialog(lines) === null;
420
+ return readAntigravityNumberedDialog(run.lines) === null;
421
+ }
422
+ /**
423
+ * Is this agy frame the `/feedback` menu — its `esc Cancel · 1-6 Select`
424
+ * footer directly under the bottom run of options? (Issue #3881)
425
+ *
426
+ * The one numbered agy screen the generic multiple-choice parser is left to
427
+ * read (#2364) that is a known menu of agy's own rather than a list a reply
428
+ * drew. The answering entry asks it when a hook receipt is all that would
429
+ * otherwise vouch for a generic reading (`response-checker-dialog-gate`'s
430
+ * `isAntigravityGenericReadingOnScreen`).
431
+ *
432
+ * @param text - ANSI-stripped capture, box drawing optional
433
+ */
434
+ function isAntigravityFeedbackMenuScreen(text) {
435
+ return readBottomOptionRun(text)?.feedbackFooter === true;
313
436
  }
@@ -61,10 +61,19 @@ function findClaudeTranscriptTail(contentLines) {
61
61
  }
62
62
  return index;
63
63
  }
64
- /** The confirmation page's question, as the whole row (Issue #3748). */
65
- const CLAUDE_SUBMIT_CONFIRM_QUESTION_ROW = /^\s*Ready to submit your answers\?\s*$/;
64
+ /** The confirmation page's question (Issue #3748), the whole of its paragraph. */
65
+ const CLAUDE_SUBMIT_CONFIRM_QUESTION = 'Ready to submit your answers?';
66
+ /**
67
+ * How many rows the question may wrap onto (Issue #3791): two at 24 and at 16
68
+ * columns, measured; the bound keeps a long paragraph from being joined.
69
+ */
70
+ const CLAUDE_SUBMIT_CONFIRM_QUESTION_MAX_ROWS = 3;
66
71
  /** Its option 1, as the whole row, cursor or not. */
67
72
  const CLAUDE_SUBMIT_ANSWERS_OPTION_ROW = /^\s*(?:❯\s*)?1\.\s+Submit answers\s*$/;
73
+ /** Option 1 wrapped under its label (Issue #3791, measured at 16 columns): `❯ 1. Submit` … */
74
+ const CLAUDE_SUBMIT_ANSWERS_WRAPPED_HEAD_ROW = /^\s*(?:❯\s*)?1\.\s+Submit\s*$/;
75
+ /** … then `answers`, indented, on the next row. */
76
+ const CLAUDE_SUBMIT_ANSWERS_WRAPPED_TAIL_ROW = /^\s+answers\s*$/;
68
77
  /** Its option 2, as the whole row, cursor or not. */
69
78
  const CLAUDE_SUBMIT_CANCEL_OPTION_ROW = /^\s*(?:❯\s*)?2\.\s+Cancel\s*$/;
70
79
  /** The multi-question tab bar's `✔ Submit` tab — only that bar leads to this page. */
@@ -74,6 +83,24 @@ const CLAUDE_SUBMIT_TAB_PATTERN = /✔\s*Submit/;
74
83
  * question and answer (`● …` / `→ …`) between them, wrapped at the pane width.
75
84
  */
76
85
  const CLAUDE_SUBMIT_CONFIRM_TAB_LOOKBACK = 200;
86
+ /** The heading of the page's answer list (Issue #3791), the whole of its paragraph. */
87
+ const CLAUDE_SUBMIT_REVIEW_HEADING = 'Review your answers';
88
+ /** How many rows the heading may wrap onto: two at 16 columns, measured. */
89
+ const CLAUDE_SUBMIT_REVIEW_HEADING_MAX_ROWS = 2;
90
+ /**
91
+ * A row of the answer list between the heading and the question (Issue
92
+ * #3791), as measured at 16 to 200 columns: ` ● question`, ` │ ● question` and
93
+ * ` │ …` (a long question's gutter), and the question's continuation and its
94
+ * `→ answer` indented three columns.
95
+ */
96
+ const CLAUDE_SUBMIT_REVIEW_LIST_ROW = /^ (?:[●│] | {2,}\S)/;
97
+ /**
98
+ * The tab bar wrapped onto two rows (Issue #3791, measured at 16 columns):
99
+ * the arrow and the checkboxes on the first, `✔` closing it …
100
+ */
101
+ const CLAUDE_SUBMIT_TAB_WRAPPED_GLYPH_ROW = /^\s?←(?:\s*[☐☒☑])+\s*✔\s*$/;
102
+ /** … and the headings on the second, `Submit→` closing it. */
103
+ const CLAUDE_SUBMIT_TAB_WRAPPED_LABEL_ROW = /^[^←→☐☒☑✔]*\bSubmit\s*→\s*$/;
77
104
  /** The nearest non-blank row above `row`, or -1. */
78
105
  function previousNonBlankRow(lines, row) {
79
106
  for (let i = row - 1; i >= 0; i--) {
@@ -82,6 +109,63 @@ function previousNonBlankRow(lines, row) {
82
109
  }
83
110
  return -1;
84
111
  }
112
+ /**
113
+ * The paragraph whose last row is `lastRow`: its first row, and its rows
114
+ * trimmed and joined with one space — how a sentence wrapped at the pane width
115
+ * reads again. At most `maxRows` rows; a longer paragraph reads as null text.
116
+ */
117
+ function paragraphEndingAt(lines, lastRow, maxRows) {
118
+ let top = lastRow;
119
+ while (top > 0 && lines[top - 1].trim() !== '')
120
+ top--;
121
+ if (lastRow - top + 1 > maxRows)
122
+ return { top, text: null };
123
+ const text = lines.slice(top, lastRow + 1).map(row => row.trim()).join(' ');
124
+ return { top, text };
125
+ }
126
+ /** The first row of option 1 right above `cancelRow` (whole, or wrapped as measured), or -1. */
127
+ function submitOptionTopRow(lines, cancelRow) {
128
+ const row = cancelRow - 1;
129
+ if (row < 0)
130
+ return -1;
131
+ if (CLAUDE_SUBMIT_ANSWERS_OPTION_ROW.test(lines[row]))
132
+ return row;
133
+ if (row >= 1 &&
134
+ CLAUDE_SUBMIT_ANSWERS_WRAPPED_TAIL_ROW.test(lines[row]) &&
135
+ CLAUDE_SUBMIT_ANSWERS_WRAPPED_HEAD_ROW.test(lines[row - 1])) {
136
+ return row - 1;
137
+ }
138
+ return -1;
139
+ }
140
+ /** Whether `row` ends the tab bar: the whole bar, or its wrapped second row under its first. */
141
+ function endsSubmitTabBar(lines, row) {
142
+ if ((0, picker_chrome_1.isAskUserQuestionTabRow)(lines[row]) && CLAUDE_SUBMIT_TAB_PATTERN.test(lines[row]))
143
+ return true;
144
+ return (row >= 1 &&
145
+ CLAUDE_SUBMIT_TAB_WRAPPED_LABEL_ROW.test(lines[row]) &&
146
+ CLAUDE_SUBMIT_TAB_WRAPPED_GLYPH_ROW.test(lines[row - 1]));
147
+ }
148
+ /**
149
+ * The page read from the question up through its answer list (Issue #3791),
150
+ * where the tab bar is not within {@link CLAUDE_SUBMIT_CONFIRM_TAB_LOOKBACK}
151
+ * rows or not on screen at all. Every row between the question and the top of
152
+ * the list is a row of the list ({@link CLAUDE_SUBMIT_REVIEW_LIST_ROW}); above
153
+ * the list is the `Review your answers` heading with the tab bar right above
154
+ * it, or nothing: a pane shorter than the page shows its bottom only (measured
155
+ * at 40x30 and 200x12), so the list or the heading is then the frame's top.
156
+ */
157
+ function readsUpThroughReviewList(lines, questionTop) {
158
+ let row = questionTop - 1;
159
+ while (row >= 0 && (lines[row].trim() === '' || CLAUDE_SUBMIT_REVIEW_LIST_ROW.test(lines[row])))
160
+ row--;
161
+ if (row < 0)
162
+ return true;
163
+ const heading = paragraphEndingAt(lines, row, CLAUDE_SUBMIT_REVIEW_HEADING_MAX_ROWS);
164
+ if (heading.text !== CLAUDE_SUBMIT_REVIEW_HEADING)
165
+ return false;
166
+ const tabRow = previousNonBlankRow(lines, heading.top);
167
+ return tabRow < 0 || endsSubmitTabBar(lines, tabRow);
168
+ }
85
169
  /**
86
170
  * Is this frame Claude's `AskUserQuestion` confirmation page? (Issue #3748)
87
171
  *
@@ -90,10 +174,20 @@ function previousNonBlankRow(lines, row) {
90
174
  * 1. the transcript's last row ({@link findClaudeTranscriptTail}, which steps
91
175
  * over Claude's chrome) is `2. Cancel`, the row above it `1. Submit
92
176
  * answers`, and the cursor `❯` is on one of the two;
93
- * 2. the nearest non-blank row above the options IS `Ready to submit your
94
- * answers?` — the whole row, not a row that contains it;
177
+ * 2. the nearest paragraph above the options IS `Ready to submit your
178
+ * answers?` — the whole paragraph, not one that contains it;
95
179
  * 3. the multi-question tab bar (`← ☒ … ✔ Submit →`) sits above that.
96
180
  *
181
+ * Issue #3791 reads the shapes a live Claude 2.1.310 drew
182
+ * (`tests/fixtures/claude-confirm-live-3791/`), and only those: in a narrow
183
+ * pane the question, the heading and option 1 wrap at the pane width and the
184
+ * tab bar wraps onto two rows; long questions put the tab bar more than 200
185
+ * rows up; a pane shorter than the page cuts its head off, tab bar included.
186
+ * The last two are read up through the answer list
187
+ * ({@link readsUpThroughReviewList}) and only on a frame with no input box —
188
+ * the page replaces it. An unknown footer under `2. Cancel` was never drawn,
189
+ * so a frame with one is still not this page.
190
+ *
97
191
  * Deliberately NOT `detectClaudeDialog`'s `ask_user` kind: that classifies by a
98
192
  * substring of the four rows above the options, so a Bash approval whose command
99
193
  * is `grep -rn "review your answers" src`, an Edit approval whose diff holds
@@ -108,16 +202,23 @@ function isClaudeAskUserQuestionConfirmPage(frame) {
108
202
  const cancelRow = findClaudeTranscriptTail(lines);
109
203
  if (cancelRow < 0 || !CLAUDE_SUBMIT_CANCEL_OPTION_ROW.test(lines[cancelRow]))
110
204
  return false;
111
- const submitRow = cancelRow - 1;
112
- if (submitRow < 0 || !CLAUDE_SUBMIT_ANSWERS_OPTION_ROW.test(lines[submitRow]))
205
+ const submitRow = submitOptionTopRow(lines, cancelRow);
206
+ if (submitRow < 0)
113
207
  return false;
114
208
  if (!lines[submitRow].includes('❯') && !lines[cancelRow].includes('❯'))
115
209
  return false;
116
- const questionRow = previousNonBlankRow(lines, submitRow);
117
- if (questionRow < 0 || !CLAUDE_SUBMIT_CONFIRM_QUESTION_ROW.test(lines[questionRow]))
210
+ const questionEnd = previousNonBlankRow(lines, submitRow);
211
+ if (questionEnd < 0)
212
+ return false;
213
+ const question = paragraphEndingAt(lines, questionEnd, CLAUDE_SUBMIT_CONFIRM_QUESTION_MAX_ROWS);
214
+ if (question.text !== CLAUDE_SUBMIT_CONFIRM_QUESTION)
215
+ return false;
216
+ const tabRow = (0, picker_chrome_1.findAskUserQuestionTabRow)(lines, question.top, CLAUDE_SUBMIT_CONFIRM_TAB_LOOKBACK);
217
+ if (tabRow >= 0 && CLAUDE_SUBMIT_TAB_PATTERN.test(lines[tabRow]))
218
+ return true;
219
+ if ((0, composer_text_1.findClaudeInputBox)(lines) !== null)
118
220
  return false;
119
- const tabRow = (0, picker_chrome_1.findAskUserQuestionTabRow)(lines, questionRow, CLAUDE_SUBMIT_CONFIRM_TAB_LOOKBACK);
120
- return tabRow >= 0 && CLAUDE_SUBMIT_TAB_PATTERN.test(lines[tabRow]);
221
+ return readsUpThroughReviewList(lines, question.top);
121
222
  }
122
223
  /**
123
224
  * §4 D1 決定 1: does this frame positively show that Claude's turn is over?