commandmate 0.44.1 → 0.44.3

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 (604) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +169 -169
  3. package/.next/app-path-routes-manifest.json +35 -35
  4. package/.next/build-manifest.json +2 -2
  5. package/.next/prerender-manifest.json +3 -3
  6. package/.next/react-loadable-manifest.json +0 -6
  7. package/.next/required-server-files.json +1 -1
  8. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  9. package/.next/server/app/api/agents/update/route.js +1 -1
  10. package/.next/server/app/api/agents/update/route_client-reference-manifest.js +1 -1
  11. package/.next/server/app/api/agents/versions/route.js +1 -1
  12. package/.next/server/app/api/agents/versions/route_client-reference-manifest.js +1 -1
  13. package/.next/server/app/api/app/release-notes/route_client-reference-manifest.js +1 -1
  14. package/.next/server/app/api/app/update/route.js +2 -2
  15. package/.next/server/app/api/app/update/route_client-reference-manifest.js +1 -1
  16. package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
  17. package/.next/server/app/api/auth/login/route.js +1 -1
  18. package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  19. package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  20. package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  21. package/.next/server/app/api/capabilities/route.js +1 -1
  22. package/.next/server/app/api/capabilities/route_client-reference-manifest.js +1 -1
  23. package/.next/server/app/api/daily-summary/route.js +1 -1
  24. package/.next/server/app/api/daily-summary/route.js.nft.json +1 -1
  25. package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +1 -1
  26. package/.next/server/app/api/daily-summary/status/route.js +1 -1
  27. package/.next/server/app/api/daily-summary/status/route.js.nft.json +1 -1
  28. package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
  29. package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
  30. package/.next/server/app/api/external-apps/[id]/route.js +1 -1
  31. package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
  32. package/.next/server/app/api/external-apps/route.js +1 -1
  33. package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
  34. package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -1
  35. package/.next/server/app/api/fs/recent-paths/route_client-reference-manifest.js +1 -1
  36. package/.next/server/app/api/hooks/agent-event/route.js +2 -2
  37. package/.next/server/app/api/hooks/agent-event/route.js.nft.json +1 -1
  38. package/.next/server/app/api/hooks/agent-event/route_client-reference-manifest.js +1 -1
  39. package/.next/server/app/api/hooks/claude-done/route.js +2 -2
  40. package/.next/server/app/api/hooks/claude-done/route.js.nft.json +1 -1
  41. package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
  42. package/.next/server/app/api/hooks/permission-request/route.js +1 -1
  43. package/.next/server/app/api/hooks/permission-request/route.js.nft.json +1 -1
  44. package/.next/server/app/api/hooks/permission-request/route_client-reference-manifest.js +1 -1
  45. package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -1
  46. package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
  47. package/.next/server/app/api/push/escalation/route.js +1 -1
  48. package/.next/server/app/api/push/escalation/route_client-reference-manifest.js +1 -1
  49. package/.next/server/app/api/push/subscriptions/route.js +2 -2
  50. package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
  51. package/.next/server/app/api/push/vapid/route.js +1 -1
  52. package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
  53. package/.next/server/app/api/relays/[relayId]/cancel/route.js +1 -1
  54. package/.next/server/app/api/relays/[relayId]/cancel/route.js.nft.json +1 -1
  55. package/.next/server/app/api/relays/[relayId]/cancel/route_client-reference-manifest.js +1 -1
  56. package/.next/server/app/api/relays/route.js +1 -1
  57. package/.next/server/app/api/relays/route.js.nft.json +1 -1
  58. package/.next/server/app/api/relays/route_client-reference-manifest.js +1 -1
  59. package/.next/server/app/api/remote/pair/route_client-reference-manifest.js +1 -1
  60. package/.next/server/app/api/repositories/[id]/route.js +1 -1
  61. package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
  62. package/.next/server/app/api/repositories/clone/[jobId]/route.js +1 -1
  63. package/.next/server/app/api/repositories/clone/[jobId]/route.js.nft.json +1 -1
  64. package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
  65. package/.next/server/app/api/repositories/clone/route.js +1 -1
  66. package/.next/server/app/api/repositories/clone/route.js.nft.json +1 -1
  67. package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
  68. package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
  69. package/.next/server/app/api/repositories/restore/route.js +1 -1
  70. package/.next/server/app/api/repositories/restore/route.js.nft.json +1 -1
  71. package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
  72. package/.next/server/app/api/repositories/route.js +1 -1
  73. package/.next/server/app/api/repositories/route.js.nft.json +1 -1
  74. package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
  75. package/.next/server/app/api/repositories/scan/route.js +1 -1
  76. package/.next/server/app/api/repositories/scan/route.js.nft.json +1 -1
  77. package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
  78. package/.next/server/app/api/repositories/sync/route.js +1 -1
  79. package/.next/server/app/api/repositories/sync/route.js.nft.json +1 -1
  80. package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
  81. package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
  82. package/.next/server/app/api/settings/default-agents/route.js +1 -1
  83. package/.next/server/app/api/settings/default-agents/route.js.nft.json +1 -1
  84. package/.next/server/app/api/settings/default-agents/route_client-reference-manifest.js +1 -1
  85. package/.next/server/app/api/settings/default-surface-mode/route_client-reference-manifest.js +1 -1
  86. package/.next/server/app/api/sidebar/group-order/route.js +1 -1
  87. package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
  88. package/.next/server/app/api/skills/[id]/route.js +1 -1
  89. package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
  90. package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
  91. package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
  92. package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
  93. package/.next/server/app/api/skills/route.js +1 -1
  94. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  95. package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
  96. package/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
  97. package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
  98. package/.next/server/app/api/templates/[id]/route.js +2 -2
  99. package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
  100. package/.next/server/app/api/templates/route.js +2 -2
  101. package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
  102. package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -1
  103. package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -1
  104. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
  105. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js.nft.json +1 -1
  106. package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
  107. package/.next/server/app/api/worktrees/[id]/capture/route.js +1 -1
  108. package/.next/server/app/api/worktrees/[id]/capture/route.js.nft.json +1 -1
  109. package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
  110. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js +1 -1
  111. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js.nft.json +1 -1
  112. package/.next/server/app/api/worktrees/[id]/clear-composer/route_client-reference-manifest.js +1 -1
  113. package/.next/server/app/api/worktrees/[id]/cli-reference/route_client-reference-manifest.js +1 -1
  114. package/.next/server/app/api/worktrees/[id]/cli-tool/route.js +1 -1
  115. package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
  116. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js +3 -3
  117. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js.nft.json +1 -1
  118. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
  119. package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
  120. package/.next/server/app/api/worktrees/[id]/current-output/route.js.nft.json +1 -1
  121. package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
  122. package/.next/server/app/api/worktrees/[id]/direct-input/route.js +1 -1
  123. package/.next/server/app/api/worktrees/[id]/direct-input/route.js.nft.json +1 -1
  124. package/.next/server/app/api/worktrees/[id]/direct-input/route_client-reference-manifest.js +1 -1
  125. package/.next/server/app/api/worktrees/[id]/env/route_client-reference-manifest.js +1 -1
  126. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
  127. package/.next/server/app/api/worktrees/[id]/execution-logs/route.js +2 -2
  128. package/.next/server/app/api/worktrees/[id]/execution-logs/route.js.nft.json +1 -1
  129. package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
  130. package/.next/server/app/api/worktrees/[id]/files/[...path]/route.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.js +1 -1
  133. package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
  134. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route.js +1 -1
  135. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
  136. package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
  137. package/.next/server/app/api/worktrees/[id]/git/checkout/route.js +1 -1
  138. package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
  139. package/.next/server/app/api/worktrees/[id]/git/commit/route.js +1 -1
  140. package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
  141. package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
  142. package/.next/server/app/api/worktrees/[id]/git/fetch/route.js +1 -1
  143. package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
  144. package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
  145. package/.next/server/app/api/worktrees/[id]/git/pull/route.js +1 -1
  146. package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
  147. package/.next/server/app/api/worktrees/[id]/git/push/route.js +1 -1
  148. package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
  149. package/.next/server/app/api/worktrees/[id]/git/reset/route.js +1 -1
  150. package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
  151. package/.next/server/app/api/worktrees/[id]/git/revert/route.js +1 -1
  152. package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
  153. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
  154. package/.next/server/app/api/worktrees/[id]/git/stage/route.js +1 -1
  155. package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
  156. package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
  157. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
  158. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route.js +1 -1
  159. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
  160. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route.js +1 -1
  161. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
  162. package/.next/server/app/api/worktrees/[id]/git/stash/push/route.js +1 -1
  163. package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
  164. package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
  165. package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
  166. package/.next/server/app/api/worktrees/[id]/git/unstage/route.js +1 -1
  167. package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
  168. package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
  169. package/.next/server/app/api/worktrees/[id]/instances/notes/route.js +1 -1
  170. package/.next/server/app/api/worktrees/[id]/instances/notes/route_client-reference-manifest.js +1 -1
  171. package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js +1 -1
  172. package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js.nft.json +1 -1
  173. package/.next/server/app/api/worktrees/[id]/instances/opencode/route_client-reference-manifest.js +1 -1
  174. package/.next/server/app/api/worktrees/[id]/interrupt/route.js +1 -1
  175. package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
  176. package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
  177. package/.next/server/app/api/worktrees/[id]/kill-session/route.js +1 -1
  178. package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -1
  179. package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
  180. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
  181. package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
  182. package/.next/server/app/api/worktrees/[id]/marp-render/route.js +1 -1
  183. package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
  184. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route.js +1 -1
  185. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
  186. package/.next/server/app/api/worktrees/[id]/memos/route.js +1 -1
  187. package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
  188. package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
  189. package/.next/server/app/api/worktrees/[id]/opencode/diff/route.js +1 -1
  190. package/.next/server/app/api/worktrees/[id]/opencode/diff/route_client-reference-manifest.js +1 -1
  191. package/.next/server/app/api/worktrees/[id]/opencode/session/route.js +1 -2
  192. package/.next/server/app/api/worktrees/[id]/opencode/session/route.js.nft.json +1 -1
  193. package/.next/server/app/api/worktrees/[id]/opencode/session/route_client-reference-manifest.js +1 -1
  194. package/.next/server/app/api/worktrees/[id]/opencode/share/route.js +1 -2
  195. package/.next/server/app/api/worktrees/[id]/opencode/share/route.js.nft.json +1 -1
  196. package/.next/server/app/api/worktrees/[id]/opencode/share/route_client-reference-manifest.js +1 -1
  197. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
  198. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -1
  199. package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
  200. package/.next/server/app/api/worktrees/[id]/resolve-target/route_client-reference-manifest.js +1 -1
  201. package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -1
  202. package/.next/server/app/api/worktrees/[id]/respond/route.js.nft.json +1 -1
  203. package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
  204. package/.next/server/app/api/worktrees/[id]/route.js +1 -1
  205. package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
  206. package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
  207. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js +2 -2
  208. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js.nft.json +1 -1
  209. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
  210. package/.next/server/app/api/worktrees/[id]/schedules/active/route.js +2 -2
  211. package/.next/server/app/api/worktrees/[id]/schedules/active/route.js.nft.json +1 -1
  212. package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
  213. package/.next/server/app/api/worktrees/[id]/schedules/route.js +3 -3
  214. package/.next/server/app/api/worktrees/[id]/schedules/route.js.nft.json +1 -1
  215. package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
  216. package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
  217. package/.next/server/app/api/worktrees/[id]/send/route.js +1 -1
  218. package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
  219. package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
  220. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +3 -3
  221. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -1
  222. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
  223. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
  224. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route.js +1 -1
  225. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
  226. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
  227. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
  228. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route_client-reference-manifest.js +1 -1
  229. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route.js +1 -1
  230. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route_client-reference-manifest.js +1 -1
  231. package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
  232. package/.next/server/app/api/worktrees/[id]/slash-commands/route.js +1 -1
  233. package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
  234. package/.next/server/app/api/worktrees/[id]/special-keys/route.js +1 -1
  235. package/.next/server/app/api/worktrees/[id]/special-keys/route.js.nft.json +1 -1
  236. package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
  237. package/.next/server/app/api/worktrees/[id]/tasks/route.js +1 -1
  238. package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -1
  239. package/.next/server/app/api/worktrees/[id]/terminal/route.js +2 -2
  240. package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
  241. package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
  242. package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
  243. package/.next/server/app/api/worktrees/[id]/timers/route.js +1 -1
  244. package/.next/server/app/api/worktrees/[id]/timers/route.js.nft.json +1 -1
  245. package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
  246. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route.js +1 -1
  247. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  248. package/.next/server/app/api/worktrees/[id]/todos/route.js +1 -1
  249. package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
  250. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
  251. package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
  252. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
  253. package/.next/server/app/api/worktrees/[id]/verify/config/route.js +1 -1
  254. package/.next/server/app/api/worktrees/[id]/verify/config/route_client-reference-manifest.js +1 -1
  255. package/.next/server/app/api/worktrees/[id]/verify/route.js +1 -1
  256. package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -1
  257. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route.js +1 -1
  258. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route_client-reference-manifest.js +1 -1
  259. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -1
  260. package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -1
  261. package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
  262. package/.next/server/app/api/worktrees/apply-default-agents/route_client-reference-manifest.js +1 -1
  263. package/.next/server/app/api/worktrees/route.js +1 -1
  264. package/.next/server/app/api/worktrees/route.js.nft.json +1 -1
  265. package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
  266. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  267. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  268. package/.next/server/app/more/page_client-reference-manifest.js +1 -1
  269. package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  270. package/.next/server/app/page_client-reference-manifest.js +1 -1
  271. package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
  272. package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
  273. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  274. package/.next/server/app/sessions/page.js +1 -1
  275. package/.next/server/app/sessions/page.js.nft.json +1 -1
  276. package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  277. package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
  278. package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
  279. package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  280. package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
  281. package/.next/server/app/worktrees/[id]/page.js +11 -11
  282. package/.next/server/app/worktrees/[id]/page.js.nft.json +1 -1
  283. package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
  284. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
  285. package/.next/server/app-paths-manifest.json +35 -35
  286. package/.next/server/chunks/1191.js +2 -2
  287. package/.next/server/chunks/1210.js +1 -1
  288. package/.next/server/chunks/1559.js +2 -0
  289. package/.next/server/chunks/1789.js +1 -0
  290. package/.next/server/chunks/2119.js +1 -1
  291. package/.next/server/chunks/2404.js +1 -1
  292. package/.next/server/chunks/2445.js +1 -1
  293. package/.next/server/chunks/2460.js +1 -0
  294. package/.next/server/chunks/2710.js +1 -1
  295. package/.next/server/chunks/2908.js +1 -0
  296. package/.next/server/chunks/2980.js +1 -1
  297. package/.next/server/chunks/3241.js +1 -1
  298. package/.next/server/chunks/3480.js +1 -1
  299. package/.next/server/chunks/3718.js +1 -1
  300. package/.next/server/chunks/4207.js +2 -2
  301. package/.next/server/chunks/450.js +1 -1
  302. package/.next/server/chunks/4672.js +5 -0
  303. package/.next/server/chunks/{9353.js → 4718.js} +2 -2
  304. package/.next/server/chunks/4837.js +14 -0
  305. package/.next/server/chunks/5048.js +1 -1
  306. package/.next/server/chunks/5209.js +1 -0
  307. package/.next/server/chunks/5595.js +1 -0
  308. package/.next/server/chunks/5625.js +25 -0
  309. package/.next/server/chunks/5845.js +1 -0
  310. package/.next/server/chunks/611.js +1 -1
  311. package/.next/server/chunks/6130.js +1 -1
  312. package/.next/server/chunks/6401.js +1 -1
  313. package/.next/server/chunks/6781.js +1 -1
  314. package/.next/server/chunks/6793.js +3 -3
  315. package/.next/server/chunks/7491.js +2 -2
  316. package/.next/server/chunks/7905.js +1 -1
  317. package/.next/server/chunks/850.js +1 -0
  318. package/.next/server/chunks/8543.js +1 -1
  319. package/.next/server/chunks/8728.js +3 -3
  320. package/.next/server/chunks/8791.js +1 -1
  321. package/.next/server/chunks/8800.js +1 -1
  322. package/.next/server/chunks/8918.js +7 -7
  323. package/.next/server/chunks/9130.js +1 -5
  324. package/.next/server/chunks/9390.js +2 -3
  325. package/.next/server/chunks/9584.js +1 -1
  326. package/.next/server/chunks/9627.js +6 -6
  327. package/.next/server/chunks/9731.js +3 -3
  328. package/.next/server/middleware-manifest.json +5 -5
  329. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  330. package/.next/server/pages/500.html +1 -1
  331. package/.next/server/server-reference-manifest.json +1 -1
  332. package/.next/static/chunks/{1642-fb2e176aaadbd137.js → 1642-767aed8e7c61ef7f.js} +1 -1
  333. package/.next/static/chunks/{2407-f1f258d4a1d92620.js → 2407-06d35bb1aa02de80.js} +1 -1
  334. package/.next/static/chunks/{2619-04bc32f026a0d946.js → 2619-a305ad4810f1393a.js} +1 -1
  335. package/.next/static/chunks/4727-5d695d71e3fdf97b.js +1 -0
  336. package/.next/static/chunks/{8165-3853772f6ae1299b.js → 8165-3525fb42f1b4976e.js} +1 -1
  337. package/.next/static/chunks/app/{layout-da66300cc20244ed.js → layout-0d1750b833f5cc3e.js} +1 -1
  338. package/.next/static/chunks/app/sessions/page-2af68c63211c751f.js +1 -0
  339. package/.next/static/chunks/app/worktrees/[id]/page-e36898c3a80e7302.js +1 -0
  340. package/.next/static/chunks/app/worktrees/[id]/terminal/{page-373ea37b16d930c7.js → page-c601f3b3ece6557e.js} +1 -1
  341. package/.next/static/css/057f64a65726c439.css +1 -0
  342. package/.next/trace +13 -13
  343. package/dist/cli/commands/ask.d.ts.map +1 -1
  344. package/dist/cli/commands/ask.js +120 -119
  345. package/dist/cli/commands/attach.d.ts +94 -0
  346. package/dist/cli/commands/attach.d.ts.map +1 -1
  347. package/dist/cli/commands/attach.js +145 -7
  348. package/dist/cli/commands/auto-yes.js +1 -1
  349. package/dist/cli/commands/capture.d.ts.map +1 -1
  350. package/dist/cli/commands/capture.js +10 -13
  351. package/dist/cli/commands/command-target.d.ts +23 -0
  352. package/dist/cli/commands/command-target.d.ts.map +1 -0
  353. package/dist/cli/commands/command-target.js +25 -0
  354. package/dist/cli/commands/instances.d.ts.map +1 -1
  355. package/dist/cli/commands/instances.js +41 -2
  356. package/dist/cli/commands/message-dispatch.d.ts +36 -0
  357. package/dist/cli/commands/message-dispatch.d.ts.map +1 -0
  358. package/dist/cli/commands/message-dispatch.js +63 -0
  359. package/dist/cli/commands/reply.d.ts.map +1 -1
  360. package/dist/cli/commands/reply.js +2 -5
  361. package/dist/cli/commands/respond.d.ts.map +1 -1
  362. package/dist/cli/commands/respond.js +3 -6
  363. package/dist/cli/commands/send.d.ts.map +1 -1
  364. package/dist/cli/commands/send.js +149 -146
  365. package/dist/cli/commands/wait.d.ts.map +1 -1
  366. package/dist/cli/commands/wait.js +608 -416
  367. package/dist/cli/types/api-responses.d.ts +174 -27
  368. package/dist/cli/types/api-responses.d.ts.map +1 -1
  369. package/dist/cli/types/api-responses.js +4 -2
  370. package/dist/cli/utils/api-client.d.ts +25 -5
  371. package/dist/cli/utils/api-client.d.ts.map +1 -1
  372. package/dist/cli/utils/api-client.js +87 -55
  373. package/dist/cli/utils/server-url.d.ts +1 -0
  374. package/dist/cli/utils/server-url.d.ts.map +1 -1
  375. package/dist/cli/utils/server-url.js +7 -0
  376. package/dist/config/uat-isolation.d.ts +140 -0
  377. package/dist/config/uat-isolation.d.ts.map +1 -0
  378. package/dist/config/uat-isolation.js +246 -0
  379. package/dist/lib/global-state.d.ts +12 -0
  380. package/dist/lib/global-state.d.ts.map +1 -0
  381. package/dist/lib/global-state.js +16 -0
  382. package/dist/lib/polling/auto-yes-suppression-reason.d.ts +33 -0
  383. package/dist/lib/polling/auto-yes-suppression-reason.d.ts.map +1 -0
  384. package/dist/lib/polling/auto-yes-suppression-reason.js +2 -0
  385. package/dist/lib/session/prompt-view.d.ts +228 -0
  386. package/dist/lib/session/prompt-view.d.ts.map +1 -0
  387. package/dist/lib/session/prompt-view.js +290 -0
  388. package/dist/lib/session/status-evidence-type.d.ts +16 -0
  389. package/dist/lib/session/status-evidence-type.d.ts.map +1 -0
  390. package/dist/lib/session/status-evidence-type.js +2 -0
  391. package/dist/lib/tmux/legacy-session-alias.d.ts.map +1 -1
  392. package/dist/lib/tmux/legacy-session-alias.js +2 -1
  393. package/dist/server/locales/en/worktree.json +3 -1
  394. package/dist/server/locales/ja/worktree.json +3 -1
  395. package/dist/server/server.js +5 -3
  396. package/dist/server/src/cli/types/api-responses.js +4 -2
  397. package/dist/server/src/config/cli-tool-timing-config.js +1 -6
  398. package/dist/server/src/config/uat-isolation.js +246 -0
  399. package/dist/server/src/lib/assistant-response-saver.js +62 -3
  400. package/dist/server/src/lib/auto-yes-lifecycle.js +139 -0
  401. package/dist/server/src/lib/auto-yes-poller.js +465 -160
  402. package/dist/server/src/lib/auto-yes-state.js +2 -2
  403. package/dist/server/src/lib/cli-tools/antigravity.js +39 -80
  404. package/dist/server/src/lib/cli-tools/base.js +151 -0
  405. package/dist/server/src/lib/cli-tools/codex.js +44 -80
  406. package/dist/server/src/lib/cli-tools/command-code.js +24 -56
  407. package/dist/server/src/lib/cli-tools/copilot.js +25 -67
  408. package/dist/server/src/lib/cli-tools/direct-input.js +8 -0
  409. package/dist/server/src/lib/cli-tools/gemini.js +23 -73
  410. package/dist/server/src/lib/cli-tools/opencode-pane-width.js +53 -0
  411. package/dist/server/src/lib/cli-tools/opencode-v2.js +9 -7
  412. package/dist/server/src/lib/cli-tools/opencode.js +21 -85
  413. package/dist/server/src/lib/cli-tools/submit-verified-sender.js +127 -4
  414. package/dist/server/src/lib/cli-tools/vibe-local.js +21 -66
  415. package/dist/server/src/lib/detection/cli-patterns.js +374 -3047
  416. package/dist/server/src/lib/detection/idle-evidence-observation.js +2 -2
  417. package/dist/server/src/lib/detection/prompt-detect-multiple-choice.js +7 -32
  418. package/dist/server/src/lib/detection/prompt-detector.js +2 -35
  419. package/dist/server/src/lib/detection/selection-shape-patterns.js +69 -0
  420. package/dist/server/src/lib/detection/selection-shape.js +32 -520
  421. package/dist/server/src/lib/detection/shared/pasted-text.js +41 -0
  422. package/dist/server/src/lib/detection/shared/shell-pane-command.js +16 -0
  423. package/dist/server/src/lib/detection/shared/strip-box-drawing.js +25 -0
  424. package/dist/server/src/lib/detection/status-detector.js +1 -1
  425. package/dist/server/src/lib/detection/tools/antigravity/detect.js +12 -60
  426. package/dist/server/src/lib/detection/tools/antigravity/dialog.js +2 -15
  427. package/dist/server/src/lib/detection/tools/antigravity/live-region.js +39 -0
  428. package/dist/server/src/lib/detection/tools/antigravity/patterns.js +286 -0
  429. package/dist/server/src/lib/detection/tools/claude/detect.js +11 -17
  430. package/dist/server/src/lib/detection/tools/claude/live-region.js +26 -0
  431. package/dist/server/src/lib/detection/tools/claude/patterns.js +264 -4
  432. package/dist/server/src/lib/detection/tools/claude/prompt.js +2 -10
  433. package/dist/server/src/lib/detection/tools/codex/cli-patterns.js +1 -1
  434. package/dist/server/src/lib/detection/tools/codex/detect.js +71 -130
  435. package/dist/server/src/lib/detection/tools/codex/live-region.js +104 -0
  436. package/dist/server/src/lib/detection/tools/codex/patterns.js +855 -0
  437. package/dist/server/src/lib/detection/tools/codex/prompt.js +2 -10
  438. package/dist/server/src/lib/detection/tools/command-code/detect.js +19 -50
  439. package/dist/server/src/lib/detection/tools/command-code/dialog.js +2 -18
  440. package/dist/server/src/lib/detection/tools/command-code/live-region.js +36 -0
  441. package/dist/server/src/lib/detection/tools/command-code/patterns.js +234 -0
  442. package/dist/server/src/lib/detection/tools/command-code/selection-shape.js +461 -0
  443. package/dist/server/src/lib/detection/tools/context-above.js +20 -0
  444. package/dist/server/src/lib/detection/tools/copilot/detect.js +13 -35
  445. package/dist/server/src/lib/detection/tools/copilot/live-region.js +52 -0
  446. package/dist/server/src/lib/detection/tools/copilot/patterns.js +640 -0
  447. package/dist/server/src/lib/detection/tools/copilot/prompt.js +2 -10
  448. package/dist/server/src/lib/detection/tools/frame.js +36 -2
  449. package/dist/server/src/lib/detection/tools/gemini/patterns.js +29 -0
  450. package/dist/server/src/lib/detection/tools/live-region-specs.js +31 -0
  451. package/dist/server/src/lib/detection/tools/live-region.js +204 -0
  452. package/dist/server/src/lib/detection/tools/opencode/detect.js +11 -49
  453. package/dist/server/src/lib/detection/tools/opencode/live-region.js +24 -0
  454. package/dist/server/src/lib/detection/tools/opencode/patterns.js +508 -0
  455. package/dist/server/src/lib/detection/tools/opencode-gutter-live-region.js +72 -0
  456. package/dist/server/src/lib/detection/tools/opencode-v2/detect.js +10 -42
  457. package/dist/server/src/lib/detection/tools/opencode-v2/live-region.js +24 -0
  458. package/dist/server/src/lib/detection/tools/opencode-v2/patterns.js +63 -0
  459. package/dist/server/src/lib/detection/tools/run-detection.js +31 -50
  460. package/dist/server/src/lib/detection/tools/verdicts.js +59 -0
  461. package/dist/server/src/lib/detection/tools/vibe-local/patterns.js +20 -0
  462. package/dist/server/src/lib/detection/truncate-raw-content.js +38 -0
  463. package/dist/server/src/lib/detection/turn-abandoned.js +66 -0
  464. package/dist/server/src/lib/detection/unclassified-frame-tracker.js +2 -2
  465. package/dist/server/src/lib/global-state.js +16 -0
  466. package/dist/server/src/lib/hooks/agent-session-telemetry.js +4 -6
  467. package/dist/server/src/lib/hooks/permission-decision-state.js +2 -2
  468. package/dist/server/src/lib/hooks/sources/antigravity/history.js +11 -76
  469. package/dist/server/src/lib/hooks/sources/antigravity/hooks-config.js +63 -1
  470. package/dist/server/src/lib/hooks/sources/antigravity/source.js +16 -0
  471. package/dist/server/src/lib/hooks/sources/antigravity/transcript.js +3 -12
  472. package/dist/server/src/lib/hooks/sources/claude/history.js +17 -156
  473. package/dist/server/src/lib/hooks/sources/claude/queued-notice.js +53 -0
  474. package/dist/server/src/lib/hooks/sources/claude/source.js +33 -3
  475. package/dist/server/src/lib/hooks/sources/claude/transcript.js +3 -13
  476. package/dist/server/src/lib/hooks/sources/codex/history.js +11 -74
  477. package/dist/server/src/lib/hooks/sources/codex/hooks-config.js +147 -11
  478. package/dist/server/src/lib/hooks/sources/codex/relay-install.js +64 -21
  479. package/dist/server/src/lib/hooks/sources/codex/transcript.js +5 -15
  480. package/dist/server/src/lib/hooks/sources/command-code/history.js +20 -121
  481. package/dist/server/src/lib/hooks/sources/command-code/transcript.js +3 -13
  482. package/dist/server/src/lib/hooks/sources/copilot/hook-settings.js +161 -31
  483. package/dist/server/src/lib/hooks/sources/define-source.js +40 -55
  484. package/dist/server/src/lib/hooks/sources/event-mapper.js +2 -1
  485. package/dist/server/src/lib/hooks/sources/opencode/diff.js +3 -4
  486. package/dist/server/src/lib/hooks/sources/opencode/history.js +2 -1
  487. package/dist/server/src/lib/hooks/sources/opencode/launch-settings.js +2 -1
  488. package/dist/server/src/lib/hooks/sources/opencode/payloads.js +2 -1
  489. package/dist/server/src/lib/hooks/sources/opencode/ports.js +2 -1
  490. package/dist/server/src/lib/hooks/sources/opencode/subscription.js +4 -3
  491. package/dist/server/src/lib/hooks/sources/opencode/transcript.js +3 -16
  492. package/dist/server/src/lib/hooks/sources/opencode-v2/history.js +2 -1
  493. package/dist/server/src/lib/hooks/sources/opencode-v2/mappers.js +5 -4
  494. package/dist/server/src/lib/hooks/sources/opencode-v2/ports.js +2 -1
  495. package/dist/server/src/lib/hooks/sources/opencode-v2/subscription.js +3 -7
  496. package/dist/server/src/lib/hooks/sources/opencode-v2/usage.js +2 -1
  497. package/dist/server/src/lib/hooks/sources/pending-decisions.js +2 -1
  498. package/dist/server/src/lib/hooks/sources/registry.js +3 -2
  499. package/dist/server/src/lib/hooks/sources/transcript-history.js +262 -0
  500. package/dist/server/src/lib/hooks/sources/turn-body.js +31 -0
  501. package/dist/server/src/lib/hooks/tool-input-normalization-state.js +2 -2
  502. package/dist/server/src/lib/polling/antigravity-permission-receipts.js +2 -2
  503. package/dist/server/src/lib/polling/auto-yes-dialog-gate.js +16 -4
  504. package/dist/server/src/lib/polling/auto-yes-enter-fallback-state.js +142 -0
  505. package/dist/server/src/lib/polling/auto-yes-enter-fallback.js +187 -0
  506. package/dist/server/src/lib/polling/auto-yes-resolver.js +9 -3
  507. package/dist/server/src/lib/polling/auto-yes-suppression-reason.js +2 -0
  508. package/dist/server/src/lib/polling/auto-yes-suppression-state.js +2 -2
  509. package/dist/server/src/lib/polling/pending-scraped-response.js +190 -0
  510. package/dist/server/src/lib/polling/prompt-dedup-state.js +2 -2
  511. package/dist/server/src/lib/polling/prompt-dedup.js +2 -2
  512. package/dist/server/src/lib/polling/response-checker-dialog-gate.js +95 -0
  513. package/dist/server/src/lib/polling/response-checker-extraction-result.js +50 -0
  514. package/dist/server/src/lib/polling/response-checker-extraction-steps.js +670 -0
  515. package/dist/server/src/lib/polling/response-checker.js +666 -1162
  516. package/dist/server/src/lib/polling/response-dedup.js +3 -4
  517. package/dist/server/src/lib/polling/response-poller-constants.js +17 -0
  518. package/dist/server/src/lib/polling/response-poller-core.js +54 -20
  519. package/dist/server/src/lib/polling/startup-screen.js +142 -0
  520. package/dist/server/src/lib/polling/structured-history-gate.js +3 -2
  521. package/dist/server/src/lib/prompt-answer-semantic.js +178 -0
  522. package/dist/server/src/lib/prompt-answer-sender.js +6 -5
  523. package/dist/server/src/lib/push/failure-episode-state.js +2 -2
  524. package/dist/server/src/lib/push/notification-dedup.js +3 -4
  525. package/dist/server/src/lib/push/prompt-card-state.js +2 -2
  526. package/dist/server/src/lib/push/waiting-push-notifier.js +3 -4
  527. package/dist/server/src/lib/realtime/publisher-registry.js +3 -2
  528. package/dist/server/src/lib/realtime/terminal-broadcast.js +38 -2
  529. package/dist/server/src/lib/realtime/terminal-session-ownership.js +45 -0
  530. package/dist/server/src/lib/relay/relay-delivery.js +6 -2
  531. package/dist/server/src/lib/relay/relay-readiness.js +38 -1
  532. package/dist/server/src/lib/relay/relay-triggers.js +9 -0
  533. package/dist/server/src/lib/resource-cleanup.js +6 -4
  534. package/dist/server/src/lib/response-cleaner.js +24 -1
  535. package/dist/server/src/lib/response-extractor.js +16 -0
  536. package/dist/server/src/lib/schedule-manager.js +8 -10
  537. package/dist/server/src/lib/session/agent-event-ask-user-question.js +168 -0
  538. package/dist/server/src/lib/session/agent-event-awaiting-instruction.js +104 -0
  539. package/dist/server/src/lib/session/agent-event-dedup.js +539 -0
  540. package/dist/server/src/lib/session/agent-event-model.js +562 -0
  541. package/dist/server/src/lib/session/agent-event-record.js +10 -0
  542. package/dist/server/src/lib/session/agent-event-state.js +106 -1854
  543. package/dist/server/src/lib/session/agent-event-structured-state.js +109 -0
  544. package/dist/server/src/lib/session/agent-event-turn.js +811 -0
  545. package/dist/server/src/lib/session/agent-session-lifecycle.js +11 -2
  546. package/dist/server/src/lib/session/chat-turn-progress.js +322 -0
  547. package/dist/server/src/lib/session/claude-executor.js +45 -5
  548. package/dist/server/src/lib/session/claude-session.js +21 -65
  549. package/dist/server/src/lib/session/cli-session.js +17 -0
  550. package/dist/server/src/lib/session/current-output-builder.js +454 -1103
  551. package/dist/server/src/lib/session/current-output-history-writers.js +255 -0
  552. package/dist/server/src/lib/session/current-output-types.js +9 -0
  553. package/dist/server/src/lib/session/detection-divergence.js +55 -0
  554. package/dist/server/src/lib/session/global-session-constants.js +2 -13
  555. package/dist/server/src/lib/session/hook-turn-hold.js +102 -0
  556. package/dist/server/src/lib/session/layer-disagreement.js +2 -2
  557. package/dist/server/src/lib/session/opencode-session-store.js +2 -1
  558. package/dist/server/src/lib/session/prompt-view.js +290 -0
  559. package/dist/server/src/lib/session/prompt-waiting-composition.js +35 -0
  560. package/dist/server/src/lib/session/provisional-turn.js +3 -1
  561. package/dist/server/src/lib/session/send-user-message.js +1 -1
  562. package/dist/server/src/lib/session/session-starting-state.js +4 -6
  563. package/dist/server/src/lib/session/status-evidence-type.js +2 -0
  564. package/dist/server/src/lib/session/status-evidence.js +2 -2
  565. package/dist/server/src/lib/session/structured-status-merge.js +335 -0
  566. package/dist/server/src/lib/session/waiting-episode-state.js +3 -4
  567. package/dist/server/src/lib/session/waiting-kind.js +3 -0
  568. package/dist/server/src/lib/session-cleanup.js +6 -8
  569. package/dist/server/src/lib/skills/install-plan.js +2 -1
  570. package/dist/server/src/lib/skills/snapshot-store.js +2 -2
  571. package/dist/server/src/lib/skills/uninstall-plan.js +2 -2
  572. package/dist/server/src/lib/timer-manager.js +6 -8
  573. package/dist/server/src/lib/tmux/geometry-delegation.js +3 -4
  574. package/dist/server/src/lib/tmux/legacy-session-alias.js +2 -1
  575. package/dist/server/src/lib/tmux/session-hooks.js +2 -1
  576. package/dist/server/src/lib/tmux/session-status-options.js +3 -3
  577. package/dist/server/src/lib/tmux/tmux-capture-cache.js +3 -2
  578. package/dist/server/src/lib/tmux/tmux.js +33 -59
  579. package/dist/server/src/lib/tui-accumulator.js +2 -2
  580. package/dist/server/src/lib/version-checker.js +6 -6
  581. package/dist/server/src/lib/ws-server.js +47 -11
  582. package/docs/en/user-guide/webapp-guide.md +27 -3
  583. package/package.json +1 -1
  584. package/release-notes/0.44.2.json +33 -0
  585. package/release-notes/0.44.3.json +82 -0
  586. package/scripts/hooks/cmate-agent-event.sh +18 -0
  587. package/.next/server/chunks/1068.js +0 -1
  588. package/.next/server/chunks/434.js +0 -1
  589. package/.next/server/chunks/5775.js +0 -1
  590. package/.next/server/chunks/6474.js +0 -14
  591. package/.next/server/chunks/650.js +0 -1
  592. package/.next/server/chunks/6661.js +0 -1
  593. package/.next/server/chunks/8583.js +0 -1
  594. package/.next/server/chunks/964.js +0 -1
  595. package/.next/server/chunks/967.js +0 -1
  596. package/.next/server/chunks/9882.js +0 -25
  597. package/.next/static/chunks/591-308072f285c34787.js +0 -1
  598. package/.next/static/chunks/app/sessions/page-049e06335187aa91.js +0 -1
  599. package/.next/static/chunks/app/worktrees/[id]/page-040c5f0f585e6812.js +0 -1
  600. package/.next/static/css/38070d879efa1371.css +0 -1
  601. package/dist/server/src/lib/cli-tools/index.js +0 -41
  602. package/dist/server/src/lib/polling/global-session-poller.js +0 -140
  603. /package/.next/static/{57lOiz8zSEHdw97XIm0af → tWwHQzmvc-rv9KKUtDWfQ}/_buildManifest.js +0 -0
  604. /package/.next/static/{57lOiz8zSEHdw97XIm0af → tWwHQzmvc-rv9KKUtDWfQ}/_ssgManifest.js +0 -0
@@ -49,8 +49,8 @@ exports.claimStructuredHistoryRecheck = claimStructuredHistoryRecheck;
49
49
  exports.clearResponseHashCache = clearResponseHashCache;
50
50
  exports.renameResponseHashCacheKey = renameResponseHashCacheKey;
51
51
  const crypto_1 = require("crypto");
52
- const responseHashCache = globalThis.__responseHashCache ??
53
- (globalThis.__responseHashCache = new Map());
52
+ const global_state_1 = require("../global-state");
53
+ const responseHashCache = (0, global_state_1.getOrInitGlobal)('__responseHashCache', () => new Map());
54
54
  /**
55
55
  * In-memory cache: pollerKey -> ticks still to wait before the transcript reader
56
56
  * is asked again (Issue #2399). Absence means nothing is owed.
@@ -58,8 +58,7 @@ const responseHashCache = globalThis.__responseHashCache ??
58
58
  * On `globalThis` for the same reason `responseHashCache` is, and populated and
59
59
  * cleared at exactly the same moments — see the module comment.
60
60
  */
61
- const structuredHistoryRecheckCache = globalThis.__structuredHistoryRecheckCache ??
62
- (globalThis.__structuredHistoryRecheckCache = new Map());
61
+ const structuredHistoryRecheckCache = (0, global_state_1.getOrInitGlobal)('__structuredHistoryRecheckCache', () => new Map());
63
62
  /**
64
63
  * How many duplicate ticks separate two asks of the transcript reader (#2399).
65
64
  *
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ /**
3
+ * Constants of the response poller that import nothing (Issue #3374 split from
4
+ * response-poller-core.ts, so the modules split out of response-checker.ts can
5
+ * read them without importing response-poller-core).
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.GEMINI_LOADING_INDICATORS = void 0;
9
+ /**
10
+ * Gemini auth/loading state indicators that should not be treated as complete responses.
11
+ * Braille spinner characters are shared with CLAUDE_SPINNER_CHARS in cli-patterns.ts.
12
+ * Extracted to module level for clarity and to avoid re-creation on each call.
13
+ */
14
+ exports.GEMINI_LOADING_INDICATORS = [
15
+ 'Waiting for auth',
16
+ '\u280b', '\u2819', '\u2839', '\u2838', '\u283c', '\u2834', '\u2826', '\u2827', '\u2807', '\u280f',
17
+ ];
@@ -17,6 +17,9 @@ const response_dedup_1 = require("./response-dedup");
17
17
  const prompt_dedup_state_1 = require("./prompt-dedup-state");
18
18
  const response_checker_1 = require("./response-checker");
19
19
  const terminal_broadcast_1 = require("../../lib/realtime/terminal-broadcast");
20
+ const terminal_session_ownership_1 = require("../../lib/realtime/terminal-session-ownership");
21
+ const session_name_1 = require("../../lib/cli-tools/session-name");
22
+ const global_state_1 = require("../global-state");
20
23
  const logger = (0, logger_1.createLogger)('response-poller');
21
24
  // ============================================================================
22
25
  // Constants
@@ -43,26 +46,22 @@ exports.MAX_POLLING_DURATION = 30 * 60 * 1000;
43
46
  * goes ahead without it.
44
47
  */
45
48
  exports.STALLED_TICK_TIMEOUT = 60 * 1000;
46
- /**
47
- * Gemini auth/loading state indicators that should not be treated as complete responses.
48
- * Braille spinner characters are shared with CLAUDE_SPINNER_CHARS in cli-patterns.ts.
49
- * Extracted to module level for clarity and to avoid re-creation on each call.
50
- */
51
- exports.GEMINI_LOADING_INDICATORS = [
52
- 'Waiting for auth',
53
- '\u280b', '\u2819', '\u2839', '\u2838', '\u283c', '\u2834', '\u2826', '\u2827', '\u2807', '\u280f',
54
- ];
55
- const coordinator = globalThis.__responsePollerCoordinator ??
56
- (globalThis.__responsePollerCoordinator = {
57
- activePollers: new Map(),
58
- pollingStartTimes: new Map(),
59
- owners: new Map(),
60
- running: new Map(),
61
- pendingRestart: new Map(),
62
- ownerStorage: new async_hooks_1.AsyncLocalStorage(),
63
- generationCounter: 0,
64
- pausedOnPrompt: new Set(),
65
- });
49
+ // Issue #3374: lives in `./response-poller-constants`, a module that imports
50
+ // nothing, so `response-checker-extraction-steps` can read it without entering
51
+ // the response-poller-core ⇄ response-checker cycle. Re-exported under the name
52
+ // it had here, so no import site has to change.
53
+ var response_poller_constants_1 = require("./response-poller-constants");
54
+ Object.defineProperty(exports, "GEMINI_LOADING_INDICATORS", { enumerable: true, get: function () { return response_poller_constants_1.GEMINI_LOADING_INDICATORS; } });
55
+ const coordinator = (0, global_state_1.getOrInitGlobal)('__responsePollerCoordinator', () => ({
56
+ activePollers: new Map(),
57
+ pollingStartTimes: new Map(),
58
+ owners: new Map(),
59
+ running: new Map(),
60
+ pendingRestart: new Map(),
61
+ ownerStorage: new async_hooks_1.AsyncLocalStorage(),
62
+ generationCounter: 0,
63
+ pausedOnPrompt: new Set(),
64
+ }));
66
65
  // The coordinator object outlives a module reload (that is the point of putting
67
66
  // it on `globalThis`), so a field added after the object was first built has to
68
67
  // be filled in on an object an older evaluation created — `next dev` keeps
@@ -256,6 +255,41 @@ async function runPollTick(target, owner) {
256
255
  stopPollingByKey(pollerKey);
257
256
  return;
258
257
  }
258
+ // Issue #3334: whose session is it, asked before anything reads it. The
259
+ // chain was started by a send the route had checked, but it keeps reading
260
+ // by NAME: if the session ends mid-poll and another CommandMate server
261
+ // starts one under the same name (#2865), `checkForResponse` would capture
262
+ // that server's pane and save its reply / prompt into this worktree's chat
263
+ // and history, and the push below would show it. Such a tick reads,
264
+ // records and pushes nothing, and the chain ends — the same way
265
+ // `checkForResponse` ends it when the session is not running (or the
266
+ // worktree row is gone), since from this server's side the session it
267
+ // was watching is gone.
268
+ let refusal;
269
+ try {
270
+ refusal = await (0, terminal_session_ownership_1.findTerminalSessionRefusal)(target.worktreeId, (0, session_name_1.resolveSessionName)(target.cliToolId, target.worktreeId, target.instanceId));
271
+ }
272
+ catch (error) {
273
+ // Could not tell whose it is: this tick reads nothing, and the chain
274
+ // tries again on the next one rather than ending a turn over a hiccup.
275
+ logger.error('poller:ownership-check-failed', {
276
+ pollerKey,
277
+ error: error instanceof Error ? error.message : String(error),
278
+ });
279
+ if (!owner.superseded && !owner.stopped) {
280
+ scheduleTick(target, owner);
281
+ }
282
+ return;
283
+ }
284
+ if (refusal !== null) {
285
+ logger.warn('poller:session-refused', { pollerKey, generation: owner.generation, refusal });
286
+ // A chain retired while this check was in flight must not stop the one
287
+ // that replaced it (Issue #2223).
288
+ if (!owner.superseded && !owner.stopped) {
289
+ stopPollingByKey(pollerKey);
290
+ }
291
+ return;
292
+ }
259
293
  // Check for response
260
294
  let recorded = false;
261
295
  try {
@@ -0,0 +1,142 @@
1
+ "use strict";
2
+ /**
3
+ * Is this pane still on its tool's startup screen? (Issue #3293)
4
+ *
5
+ * codex and vibe-local are the two tools whose saved reply is "the rows past the
6
+ * cursor": the response poller (`extractResponse`) and the pre-send flush
7
+ * (`savePendingAssistantResponse`) both start reading at `lastCapturedLine`,
8
+ * which is 0 for a new session. Their startup screen is a complete, idle frame —
9
+ * input box drawn, nothing working — so both paths read the banner as a finished
10
+ * reply and History opened with an assistant row holding the version, the cwd
11
+ * and the model, before the operator had said anything.
12
+ *
13
+ * The rule is the one #1897 (copilot), #2247 (claude) and #2250 (command-code)
14
+ * converged on: every prompt is echoed into the transcript, and the startup
15
+ * screen has none. It is asked of the WHOLE pane, never of the rows past the
16
+ * cursor — those legitimately hold a reply whose echo sits above the cursor.
17
+ *
18
+ * Both halves are required, and the answer is `false` when either is missing:
19
+ *
20
+ * - the tool's input box is on the pane. A frame it cannot be found on is not
21
+ * known to be an idle screen, and the reading the two paths had before stands;
22
+ * - no echoed user message is above it.
23
+ *
24
+ * One function for the two paths, so the poller and the flush cannot disagree
25
+ * about the same pane. Each tool keeps its own reader, as the chrome readers in
26
+ * `response-checker` do: the echo is a tool-specific measurement.
27
+ *
28
+ * ## An echo that is missing because it has left the pane
29
+ *
30
+ * "No echo" is only evidence of "no turn" while every echo since the session
31
+ * started is still in the capture. Two things break that, and each tool is
32
+ * covered for the one it can meet:
33
+ *
34
+ * - **the capture window clipped the scrollback** (#1670). Callers do not ask
35
+ * on such a capture: the echo of a turn longer than the window has scrolled
36
+ * out of it, and a startup screen is never that tall. This is all vibe-local
37
+ * needs — it draws inline and keeps its scrollback.
38
+ * - **the tool keeps no scrollback at all.** codex 0.160.0 draws in the
39
+ * alternate screen (`#{alternate_on}` 1, `#{history_size}` 0) with the
40
+ * composer pinned to row 996; the 0.157.1 captures have the same pinned
41
+ * composer. The capture is 1000 rows however long the transcript is, the
42
+ * window guard never fires, and a turn longer than the pane pushes its own
43
+ * echo off the top. Such a frame has the composer and no echo above it, and
44
+ * it is a finished reply. So codex is asked for a third thing, which only
45
+ * its startup screen has: the banner row (see {@link CODEX_BANNER_ROW_PATTERN}).
46
+ *
47
+ * @module lib/polling/startup-screen
48
+ */
49
+ Object.defineProperty(exports, "__esModule", { value: true });
50
+ exports.isStartupScreenWithoutUserEcho = isStartupScreenWithoutUserEcho;
51
+ const cli_patterns_1 = require("../detection/cli-patterns");
52
+ /**
53
+ * vibe-local's prompt row, `ctx:N% ❯`, at column 0.
54
+ *
55
+ * Measured on vibe-local 1.3.3 (`tests/fixtures/startup-screen-3293/`): the row
56
+ * is drawn once per prompt and stays in the scrollback with what was typed
57
+ * after it, so a submitted message and the input box share this shape.
58
+ */
59
+ const VIBE_LOCAL_PROMPT_ROW_PATTERN = /^ctx:\d+%\s*[>❯]/;
60
+ /** The same row with text after the glyph: an echoed message, or one being typed. */
61
+ const VIBE_LOCAL_PROMPT_ROW_WITH_TEXT_PATTERN = /^ctx:\d+%\s*[>❯]\s*\S/;
62
+ /**
63
+ * codex's banner row, `>_ OpenAI Codex (v0.160.0)`.
64
+ *
65
+ * The first thing codex draws and the top of its transcript: every echo is
66
+ * printed below it, so it leaves a pane whose transcript has outgrown it before
67
+ * the echo of that turn can. "Banner above the composer, no echo" is therefore
68
+ * a pane that has not had a turn, and "no banner, no echo" is one that has had
69
+ * a turn longer than itself — measured on 0.160.0, where the banner is not
70
+ * pinned and scrolls off with the transcript
71
+ * (`tests/fixtures/startup-screen-3293/codex-0.160.0-overflow-interrupted.txt`).
72
+ *
73
+ * The same text in every capture this repository holds, 0.146.0 to 0.160.0 —
74
+ * inside the box earlier versions drew around it
75
+ * (`│ >_ OpenAI Codex (v0.153.2) … │`) and on a row of its own on 0.160.0. A
76
+ * codex that words its banner differently is not read as a startup screen,
77
+ * which is the direction that saves the banner again rather than the one that
78
+ * drops a reply.
79
+ */
80
+ const CODEX_BANNER_ROW_PATTERN = />_ OpenAI Codex \(v\d/;
81
+ /**
82
+ * codex: the composer is located, no transcript echo is above it, and the
83
+ * banner is.
84
+ *
85
+ * `findCodexChromeStart` reads the composer by its SGR attributes (#2310), so a
86
+ * message typed into it and not yet sent is still the composer, not an echo.
87
+ */
88
+ function isCodexStartupScreen(lines) {
89
+ const chromeStart = (0, cli_patterns_1.findCodexChromeStart)(lines);
90
+ if (chromeStart < 0)
91
+ return false;
92
+ if ((0, cli_patterns_1.findCodexUserEchoIndex)(lines, chromeStart, lines.length, true) >= 0)
93
+ return false;
94
+ for (let i = 0; i < chromeStart; i++) {
95
+ if (CODEX_BANNER_ROW_PATTERN.test((0, cli_patterns_1.stripAnsi)(lines[i])))
96
+ return true;
97
+ }
98
+ return false;
99
+ }
100
+ /**
101
+ * vibe-local: a prompt row is on the pane, and none of them holds text.
102
+ *
103
+ * No banner test here. vibe-local draws inline (`#{alternate_on}` 0, the
104
+ * history grows with every turn — measured on 1.3.3), so its echoes stay in the
105
+ * capture until the window clips it, and the callers' guard covers that.
106
+ *
107
+ * A row with text is read as an echo even while it is still the input box. The
108
+ * row alone cannot tell the two apart: while a reply is being printed the newest
109
+ * prompt row IS the echo, and reading it as a message not yet sent would answer
110
+ * "no turn yet" and move the cursor past the reply under it.
111
+ */
112
+ function isVibeLocalStartupScreen(lines) {
113
+ let hasPromptRow = false;
114
+ for (const rawLine of lines) {
115
+ const line = (0, cli_patterns_1.stripAnsi)(rawLine);
116
+ if (!VIBE_LOCAL_PROMPT_ROW_PATTERN.test(line))
117
+ continue;
118
+ if (VIBE_LOCAL_PROMPT_ROW_WITH_TEXT_PATTERN.test(line))
119
+ return false;
120
+ hasPromptRow = true;
121
+ }
122
+ return hasPromptRow;
123
+ }
124
+ /**
125
+ * Does the pane show the tool's input box with no user message echoed yet?
126
+ *
127
+ * @param cliToolId - The tool the capture came from
128
+ * @param lines - The whole capture, ANSI intact (codex's reader needs the attributes)
129
+ * @returns True for a codex or vibe-local pane that has not had a turn; false for
130
+ * every other tool, whenever the input box cannot be located, and for a codex
131
+ * pane whose banner is not above it
132
+ */
133
+ function isStartupScreenWithoutUserEcho(cliToolId, lines) {
134
+ switch (cliToolId) {
135
+ case 'codex':
136
+ return isCodexStartupScreen(lines);
137
+ case 'vibe-local':
138
+ return isVibeLocalStartupScreen(lines);
139
+ default:
140
+ return false;
141
+ }
142
+ }
@@ -83,6 +83,7 @@ const tool_id_3 = require("../../lib/hooks/sources/antigravity/tool-id");
83
83
  const tool_id_4 = require("../../lib/hooks/sources/command-code/tool-id");
84
84
  const registry_1 = require("../../lib/hooks/sources/registry");
85
85
  const relay_triggers_1 = require("../../lib/relay/relay-triggers");
86
+ const global_state_1 = require("../global-state");
86
87
  const logger = (0, logger_1.createLogger)('lib/polling/structured-history-gate');
87
88
  /**
88
89
  * One in-flight capture per instance (Issue #2246).
@@ -118,7 +119,7 @@ const logger = (0, logger_1.createLogger)('lib/polling/structured-history-gate')
118
119
  * get a private copy of a module-scoped map, and a lock only one of two bundles
119
120
  * can see is not a lock.
120
121
  */
121
- const captureQueue = (globalThis.__structuredHistoryCaptureQueue ??= new Map());
122
+ const captureQueue = (0, global_state_1.getOrInitGlobal)('__structuredHistoryCaptureQueue', () => new Map());
122
123
  /**
123
124
  * The last completion each instance was announced for (Issue #2443).
124
125
  *
@@ -133,7 +134,7 @@ const captureQueue = (globalThis.__structuredHistoryCaptureQueue ??= new Map());
133
134
  * and a restart that forgets it costs at most one extra announcement into a
134
135
  * relay whose own stash guard already refuses a second payload.
135
136
  */
136
- const announcedCompletions = (globalThis.__structuredHistoryAnnouncedCompletions ??= new Map());
137
+ const announcedCompletions = (0, global_state_1.getOrInitGlobal)('__structuredHistoryAnnouncedCompletions', () => new Map());
137
138
  /** Forget every instance's in-flight capture and announced completion. Test seam. */
138
139
  function resetStructuredHistoryCaptureQueue() {
139
140
  captureQueue.clear();
@@ -0,0 +1,178 @@
1
+ "use strict";
2
+ /**
3
+ * Semantic yes/no answer resolution for detected prompts (Issue #1681).
4
+ *
5
+ * `respond <wt> yes|no` used to send the raw text + Enter. Cursor-navigated
6
+ * multiple-choice menus (claude / antigravity) ignore typed characters, so the
7
+ * Enter selected the highlighted default option — `respond no` on a
8
+ * "1. Yes / 2. Yes, allow all / 3. No" menu approved instead of denying.
9
+ *
10
+ * This module resolves a semantic yes/no answer (or an explicit "pick the
11
+ * default" request) to a concrete option number BEFORE anything is sent, and
12
+ * refuses with {@link PromptAnswerResolutionError} when no option label can be
13
+ * matched, so the caller sends nothing at all instead of a stray Enter.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.PromptAnswerResolutionError = void 0;
17
+ exports.hasCheckboxOptions = hasCheckboxOptions;
18
+ exports.isMultiSelectPrompt = isMultiSelectPrompt;
19
+ exports.parseSemanticAnswer = parseSemanticAnswer;
20
+ exports.resolvePromptAnswer = resolvePromptAnswer;
21
+ /**
22
+ * Checkbox-style multi-select options have no yes/no semantics.
23
+ *
24
+ * Issue #2755 made this the SECOND of two readings rather than the only one.
25
+ * Command Code's reader now strips the box off the label and reports the state
26
+ * as `multiSelect` / `checked`, so on that tool there is no bracket left to
27
+ * match and {@link isMultiSelectPrompt} is what refuses the answer. The pattern
28
+ * stays for every payload that still carries brackets — claude's and agy's
29
+ * checkbox menus reach the sender through the generic parser, which does not
30
+ * strip them — because dropping it here would silently reopen #1681's hole on
31
+ * those tools.
32
+ */
33
+ const CHECKBOX_OPTION_PATTERN = /^\[[ xX\u2714]\] /;
34
+ /**
35
+ * Whether any option still wears a checkbox (`[ ]`, `[x]`, `[X]`, `[✔]`).
36
+ *
37
+ * Issue #3397: the ONE reading of a checkbox label. `prompt-answer-sender`
38
+ * (Space→Next instead of a plain Enter) and Auto-Yes's Enter on an unreadable
39
+ * choice screen read it here, so the three paths agree on which lists are
40
+ * multi-select; the sender used to carry a narrower copy (`[ ]` / `[x]` only).
41
+ */
42
+ function hasCheckboxOptions(options) {
43
+ return options.some(o => CHECKBOX_OPTION_PATTERN.test(o.label));
44
+ }
45
+ /**
46
+ * Whether this prompt is a checkbox question (Issue #2755).
47
+ *
48
+ * Either reading counts: the payload saying so, or a label that still wears its
49
+ * box. See {@link CHECKBOX_OPTION_PATTERN} for why both are needed.
50
+ */
51
+ function isMultiSelectPrompt(promptData) {
52
+ return promptData.multiSelect === true || hasCheckboxOptions(promptData.options);
53
+ }
54
+ /** Labels that mean "approve" (e.g. "Yes", "Yes, allow all edits ..."). */
55
+ const AFFIRMATIVE_LABEL_PATTERN = /^yes\b/i;
56
+ /** Labels that mean "reject" (e.g. "No", "No, and tell Claude ...", "Deny"). */
57
+ const NEGATIVE_LABEL_PATTERNS = [/^no\b/i, /\bdeny\b/i];
58
+ /**
59
+ * Raised when an answer cannot be resolved to a concrete option. Messages are
60
+ * fixed strings (no user input) per SEC-003 and are safe to return to clients.
61
+ */
62
+ class PromptAnswerResolutionError extends Error {
63
+ constructor(message) {
64
+ super(message);
65
+ this.name = 'PromptAnswerResolutionError';
66
+ }
67
+ }
68
+ exports.PromptAnswerResolutionError = PromptAnswerResolutionError;
69
+ /**
70
+ * Parse an answer as a semantic yes/no token. Only exact tokens qualify —
71
+ * free text like "yes please" is NOT semantic and passes through unchanged.
72
+ */
73
+ function parseSemanticAnswer(answer) {
74
+ const normalized = answer.trim().toLowerCase();
75
+ if (normalized === 'yes' || normalized === 'y')
76
+ return 'yes';
77
+ if (normalized === 'no' || normalized === 'n')
78
+ return 'no';
79
+ return null;
80
+ }
81
+ function isNegativeLabel(label) {
82
+ return NEGATIVE_LABEL_PATTERNS.some(p => p.test(label));
83
+ }
84
+ function isAffirmativeLabel(label) {
85
+ // A label matching a negative pattern never counts as affirmative
86
+ // (guards against future pattern overlap).
87
+ return AFFIRMATIVE_LABEL_PATTERN.test(label) && !isNegativeLabel(label);
88
+ }
89
+ function resolveSemanticOption(promptData, semantic) {
90
+ const options = promptData.options;
91
+ if (isMultiSelectPrompt(promptData)) {
92
+ throw new PromptAnswerResolutionError('Multi-select (checkbox) prompts cannot be answered with yes/no. Answer with the option numbers you want ticked, comma-separated (for example "1,3").');
93
+ }
94
+ const matcher = semantic === 'yes' ? isAffirmativeLabel : isNegativeLabel;
95
+ const matches = options.filter(o => matcher(o.label));
96
+ if (matches.length === 0) {
97
+ throw new PromptAnswerResolutionError(`No option label matches "${semantic}". Answer with an option number.`);
98
+ }
99
+ // Multiple matches (e.g. "1. Yes" / "2. Yes, allow all edits ..."): pick the
100
+ // lowest-numbered one — in Claude-style permission menus that is the plain,
101
+ // narrowest-scope choice.
102
+ return matches.reduce((a, b) => (a.number <= b.number ? a : b));
103
+ }
104
+ function resolveDefaultOption(options) {
105
+ // Mirrors prompt-answer-sender: when no option carries the ❯ indicator the
106
+ // cursor rests on option 1.
107
+ const def = options.find(o => o.isDefault)
108
+ ?? options.find(o => o.number === 1)
109
+ ?? options[0];
110
+ if (!def) {
111
+ throw new PromptAnswerResolutionError('The prompt has no options to select a default from.');
112
+ }
113
+ return def;
114
+ }
115
+ /**
116
+ * Resolve the request to the concrete terminal input.
117
+ *
118
+ * - `useDefault`: resolves to the default option (multiple_choice) or the
119
+ * default answer (yes_no). Requires detected promptData.
120
+ * - semantic yes/no on a detected multiple_choice prompt: resolves the option
121
+ * number by label; unresolvable labels raise instead of degrading to Enter.
122
+ * - semantic yes/no when detection failed but the client claims
123
+ * multiple_choice: raises (option labels are unknown).
124
+ * - everything else (numbers, free text, yes/no on yes_no prompts) passes
125
+ * through unchanged.
126
+ *
127
+ * @throws PromptAnswerResolutionError when the answer must not be sent.
128
+ */
129
+ function resolvePromptAnswer(params) {
130
+ const { answer, useDefault, promptData, fallbackPromptType } = params;
131
+ if (useDefault) {
132
+ if (promptData?.type === 'multiple_choice') {
133
+ // Issue #2755: on a checkbox question the `❯` is a CURSOR, not a
134
+ // pre-selected answer — it says which row a key would toggle. Turning it
135
+ // into "the answer" ticked one box and stopped, and on a screen where the
136
+ // human had already ticked that box it UNticked it (`respond --default`
137
+ // on #2754's `multiselect-cursor-on-option-2`). Refused before anything
138
+ // is sent, like every other unresolvable answer here.
139
+ if (isMultiSelectPrompt(promptData)) {
140
+ throw new PromptAnswerResolutionError('Multi-select (checkbox) prompts have no default answer: the cursor marks the row a key would toggle, not a choice. Answer with the option numbers you want ticked, comma-separated (for example "1,3").');
141
+ }
142
+ const opt = resolveDefaultOption(promptData.options);
143
+ return {
144
+ input: String(opt.number),
145
+ resolved: { via: 'default', optionNumber: opt.number, optionLabel: opt.label },
146
+ };
147
+ }
148
+ if (promptData?.type === 'yes_no') {
149
+ if (promptData.defaultOption) {
150
+ return {
151
+ input: promptData.defaultOption,
152
+ resolved: { via: 'default', optionLabel: promptData.defaultOption },
153
+ };
154
+ }
155
+ throw new PromptAnswerResolutionError('The yes/no prompt declares no default option.');
156
+ }
157
+ throw new PromptAnswerResolutionError('Cannot select the default option: no active prompt was detected.');
158
+ }
159
+ const rawAnswer = answer ?? '';
160
+ const semantic = parseSemanticAnswer(rawAnswer);
161
+ if (semantic === null) {
162
+ return { input: rawAnswer };
163
+ }
164
+ if (promptData?.type === 'multiple_choice') {
165
+ const opt = resolveSemanticOption(promptData, semantic);
166
+ return {
167
+ input: String(opt.number),
168
+ resolved: { via: 'semantic', optionNumber: opt.number, optionLabel: opt.label },
169
+ };
170
+ }
171
+ // Fresh detection did not yield a multiple-choice prompt. If the client
172
+ // claims one, the option labels are unknown — refuse rather than let the
173
+ // text degrade into a bare Enter that picks the default.
174
+ if (!promptData && fallbackPromptType === 'multiple_choice') {
175
+ throw new PromptAnswerResolutionError('Cannot resolve yes/no: the prompt is multiple choice but its options could not be read.');
176
+ }
177
+ return { input: rawAnswer };
178
+ }
@@ -17,9 +17,10 @@ const dialog_1 = require("../lib/detection/tools/command-code/dialog");
17
17
  const selection_shape_1 = require("../lib/detection/selection-shape");
18
18
  const models_1 = require("../types/models");
19
19
  const tmux_capture_cache_1 = require("./tmux/tmux-capture-cache");
20
+ const prompt_answer_semantic_1 = require("../lib/prompt-answer-semantic");
20
21
  const cli_tool_timing_config_1 = require("../config/cli-tool-timing-config");
21
- /** Regex pattern to detect checkbox-style multi-select options */
22
- const CHECKBOX_OPTION_PATTERN = /^\[[ x]\] /;
22
+ // Issue #3397: the checkbox reading (`hasCheckboxOptions`) lives in
23
+ // `prompt-answer-semantic`, shared with the semantic resolver and Auto-Yes.
23
24
  /**
24
25
  * A validated SELECTION SET, as opposed to free text (Issue #2755).
25
26
  *
@@ -294,7 +295,7 @@ async function assertAnswerModeAcceptsNumber(params) {
294
295
  const frame = await readGuardFrame(params);
295
296
  if (frame === null)
296
297
  return null;
297
- const dialog = detector.detectDialog((0, frame_1.normalizeFrame)(frame));
298
+ const dialog = detector.detectDialog((0, frame_1.normalizeFrame)(frame, params.cliToolId));
298
299
  if (dialog === null)
299
300
  return null;
300
301
  if (dialog.answerMode === TEXT_ANSWERABLE_ANSWER_MODE)
@@ -815,10 +816,10 @@ async function sendPromptAnswer(params) {
815
816
  // Multi-select prompts require: Space to toggle checkbox -> navigate to "Next" -> Enter.
816
817
  // Single-select prompts require: navigate to option -> Enter.
817
818
  // Note: multi-select detection is only possible when promptData succeeded (mcOptions available).
818
- const isMultiSelect = mcOptions !== null && mcOptions.some(o => CHECKBOX_OPTION_PATTERN.test(o.label));
819
+ const isMultiSelect = mcOptions !== null && (0, prompt_answer_semantic_1.hasCheckboxOptions)(mcOptions);
819
820
  if (isMultiSelect && mcOptions !== null) {
820
821
  // Multi-select: toggle checkbox, then navigate to "Next" and submit
821
- const checkboxCount = mcOptions.filter(o => CHECKBOX_OPTION_PATTERN.test(o.label)).length;
822
+ const checkboxCount = mcOptions.filter(o => (0, prompt_answer_semantic_1.hasCheckboxOptions)([o])).length;
822
823
  const keys = [
823
824
  ...buildNavigationKeys(offset), // 1. Navigate to target option
824
825
  'Space', // 2. Toggle checkbox
@@ -56,6 +56,7 @@ exports.UPSTREAM_FAULT_COOLDOWN_MS = void 0;
56
56
  exports.observeUpstreamFaultEdge = observeUpstreamFaultEdge;
57
57
  exports.clearUpstreamFaultEpisodes = clearUpstreamFaultEpisodes;
58
58
  const auto_yes_state_1 = require("../../lib/auto-yes-state");
59
+ const global_state_1 = require("../global-state");
59
60
  /**
60
61
  * How long after notifying about an upstream fault this instance stays quiet
61
62
  * about upstream faults.
@@ -68,8 +69,7 @@ const auto_yes_state_1 = require("../../lib/auto-yes-state");
68
69
  * bound only governs how often the *phone* is used.
69
70
  */
70
71
  exports.UPSTREAM_FAULT_COOLDOWN_MS = 30 * 60_000;
71
- const states = globalThis.__upstreamFaultPushState ??
72
- (globalThis.__upstreamFaultPushState = new Map());
72
+ const states = (0, global_state_1.getOrInitGlobal)('__upstreamFaultPushState', () => new Map());
73
73
  /**
74
74
  * Record this frame's fault level and answer whether it is worth a phone.
75
75
  *
@@ -18,10 +18,10 @@ exports.resetNotificationDedup = resetNotificationDedup;
18
18
  exports.shouldSendWaitingPush = shouldSendWaitingPush;
19
19
  exports.resetWaitingPushDedup = resetWaitingPushDedup;
20
20
  const crypto_1 = require("crypto");
21
+ const global_state_1 = require("../global-state");
21
22
  /** Default suppression window: repeats of identical content within this are dropped. */
22
23
  exports.DEFAULT_DEDUP_WINDOW_MS = 30_000;
23
- const lastSent = globalThis.__notificationDedupLastSent ??
24
- (globalThis.__notificationDedupLastSent = new Map());
24
+ const lastSent = (0, global_state_1.getOrInitGlobal)('__notificationDedupLastSent', () => new Map());
25
25
  function contentHash(content) {
26
26
  return (0, crypto_1.createHash)('sha256').update(content).digest('hex');
27
27
  }
@@ -43,8 +43,7 @@ function shouldSendNotification(event, now = Date.now(), windowMs = exports.DEFA
43
43
  function resetNotificationDedup() {
44
44
  lastSent.clear();
45
45
  }
46
- const waitingSent = globalThis.__waitingPushDedup ??
47
- (globalThis.__waitingPushDedup = new Map());
46
+ const waitingSent = (0, global_state_1.getOrInitGlobal)('__waitingPushDedup', () => new Map());
48
47
  /**
49
48
  * Whether this waiting notification should be sent, recording it if so.
50
49
  *
@@ -100,6 +100,7 @@ exports.forgetPromptCardMemory = forgetPromptCardMemory;
100
100
  exports.promptCardCount = promptCardCount;
101
101
  const db_instance_1 = require("../../lib/db/db-instance");
102
102
  const logger_1 = require("../../lib/logger");
103
+ const global_state_1 = require("../global-state");
103
104
  const logger = (0, logger_1.createLogger)('push/prompt-card-state');
104
105
  /**
105
106
  * `app_settings.key` prefix for one worktree's outstanding card.
@@ -142,8 +143,7 @@ exports.PROMPT_CARD_KEY_PREFIX = 'push_prompt_card:';
142
143
  */
143
144
  exports.PROMPT_CARD_MAX_AGE_MS = 24 * 60 * 60 * 1000;
144
145
  /** worktreeId -> epoch ms the most recent prompt card was fanned out. */
145
- const cards = globalThis.__promptPushCards ??
146
- (globalThis.__promptPushCards = new Map());
146
+ const cards = (0, global_state_1.getOrInitGlobal)('__promptPushCards', () => new Map());
147
147
  function keyFor(worktreeId) {
148
148
  return `${exports.PROMPT_CARD_KEY_PREFIX}${worktreeId}`;
149
149
  }
@@ -74,6 +74,7 @@ const prompt_push_gate_1 = require("./prompt-push-gate");
74
74
  const push_sender_1 = require("./push-sender");
75
75
  const resolution_push_notifier_1 = require("./resolution-push-notifier");
76
76
  const vapid_1 = require("./vapid");
77
+ const global_state_1 = require("../global-state");
77
78
  const logger = (0, logger_1.createLogger)('push/waiting-notifier');
78
79
  /** How often outstanding waits are re-checked. Minute granularity is enough. */
79
80
  exports.ESCALATION_TICK_MS = 60_000;
@@ -99,11 +100,9 @@ exports.ESCALATION_TICK_MS = 60_000;
99
100
  * still notify on the edge itself.
100
101
  */
101
102
  exports.CLASSIFICATION_GRACE_MS = 8_000;
102
- const pending = globalThis.__waitingPushPending ??
103
- (globalThis.__waitingPushPending = new Map());
103
+ const pending = (0, global_state_1.getOrInitGlobal)('__waitingPushPending', () => new Map());
104
104
  /** Composite key -> the timer holding that wait's first notification (#2156). */
105
- const graceTimers = globalThis.__waitingPushGraceTimers ??
106
- (globalThis.__waitingPushGraceTimers = new Map());
105
+ const graceTimers = (0, global_state_1.getOrInitGlobal)('__waitingPushGraceTimers', () => new Map());
107
106
  /**
108
107
  * The worktree's display name, for the notification title.
109
108
  *
@@ -63,16 +63,17 @@ exports.recordUnroutedPublish = recordUnroutedPublish;
63
63
  exports.getUnroutedPublishStats = getUnroutedPublishStats;
64
64
  exports.__resetRoomPublisherRegistryForTest = __resetRoomPublisherRegistryForTest;
65
65
  const logger_1 = require("../../lib/logger");
66
+ const global_state_1 = require("../global-state");
66
67
  const logger = (0, logger_1.createLogger)('publisher-registry');
67
68
  /** At most one warning per minute; the rest are counted, not printed. */
68
69
  exports.UNROUTED_PUBLISH_WARN_INTERVAL_MS = 60_000;
69
70
  function unroutedState() {
70
- return (globalThis.__realtimeUnroutedPublish ??= {
71
+ return (0, global_state_1.getOrInitGlobal)('__realtimeUnroutedPublish', () => ({
71
72
  total: 0,
72
73
  suppressed: 0,
73
74
  lastWarnedAt: null,
74
75
  operations: {},
75
- });
76
+ }));
76
77
  }
77
78
  /**
78
79
  * Claim ownership of the process's rooms.