commandmate 0.44.1 → 0.44.2

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 (313) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +159 -159
  3. package/.next/app-path-routes-manifest.json +32 -32
  4. package/.next/build-manifest.json +2 -2
  5. package/.next/prerender-manifest.json +12 -12
  6. package/.next/required-server-files.json +1 -1
  7. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  8. package/.next/server/app/api/agents/update/route_client-reference-manifest.js +1 -1
  9. package/.next/server/app/api/agents/versions/route_client-reference-manifest.js +1 -1
  10. package/.next/server/app/api/app/release-notes/route_client-reference-manifest.js +1 -1
  11. package/.next/server/app/api/app/update/route_client-reference-manifest.js +1 -1
  12. package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
  13. package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  14. package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  15. package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  16. package/.next/server/app/api/capabilities/route.js +1 -1
  17. package/.next/server/app/api/capabilities/route_client-reference-manifest.js +1 -1
  18. package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +1 -1
  19. package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
  20. package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
  21. package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
  22. package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
  23. package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -1
  24. package/.next/server/app/api/fs/recent-paths/route_client-reference-manifest.js +1 -1
  25. package/.next/server/app/api/hooks/agent-event/route.js +2 -2
  26. package/.next/server/app/api/hooks/agent-event/route.js.nft.json +1 -1
  27. package/.next/server/app/api/hooks/agent-event/route_client-reference-manifest.js +1 -1
  28. package/.next/server/app/api/hooks/claude-done/route.js +2 -2
  29. package/.next/server/app/api/hooks/claude-done/route.js.nft.json +1 -1
  30. package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
  31. package/.next/server/app/api/hooks/permission-request/route.js +1 -1
  32. package/.next/server/app/api/hooks/permission-request/route.js.nft.json +1 -1
  33. package/.next/server/app/api/hooks/permission-request/route_client-reference-manifest.js +1 -1
  34. package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -1
  35. package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
  36. package/.next/server/app/api/push/escalation/route_client-reference-manifest.js +1 -1
  37. package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
  38. package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
  39. package/.next/server/app/api/relays/[relayId]/cancel/route.js +1 -1
  40. package/.next/server/app/api/relays/[relayId]/cancel/route.js.nft.json +1 -1
  41. package/.next/server/app/api/relays/[relayId]/cancel/route_client-reference-manifest.js +1 -1
  42. package/.next/server/app/api/relays/route.js +1 -1
  43. package/.next/server/app/api/relays/route.js.nft.json +1 -1
  44. package/.next/server/app/api/relays/route_client-reference-manifest.js +1 -1
  45. package/.next/server/app/api/remote/pair/route_client-reference-manifest.js +1 -1
  46. package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
  47. package/.next/server/app/api/repositories/clone/[jobId]/route.js +1 -1
  48. package/.next/server/app/api/repositories/clone/[jobId]/route.js.nft.json +1 -1
  49. package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
  50. package/.next/server/app/api/repositories/clone/route.js +1 -1
  51. package/.next/server/app/api/repositories/clone/route.js.nft.json +1 -1
  52. package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
  53. package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
  54. package/.next/server/app/api/repositories/restore/route.js +1 -1
  55. package/.next/server/app/api/repositories/restore/route.js.nft.json +1 -1
  56. package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
  57. package/.next/server/app/api/repositories/route.js +1 -1
  58. package/.next/server/app/api/repositories/route.js.nft.json +1 -1
  59. package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
  60. package/.next/server/app/api/repositories/scan/route.js +1 -1
  61. package/.next/server/app/api/repositories/scan/route.js.nft.json +1 -1
  62. package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
  63. package/.next/server/app/api/repositories/sync/route.js +1 -1
  64. package/.next/server/app/api/repositories/sync/route.js.nft.json +1 -1
  65. package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
  66. package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
  67. package/.next/server/app/api/settings/default-agents/route.js +1 -1
  68. package/.next/server/app/api/settings/default-agents/route.js.nft.json +1 -1
  69. package/.next/server/app/api/settings/default-agents/route_client-reference-manifest.js +1 -1
  70. package/.next/server/app/api/settings/default-surface-mode/route_client-reference-manifest.js +1 -1
  71. package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
  72. package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
  73. package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
  74. package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
  75. package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
  76. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  77. package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
  78. package/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
  79. package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
  80. package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
  81. package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
  82. package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -1
  83. package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -1
  84. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
  85. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js.nft.json +1 -1
  86. package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
  87. package/.next/server/app/api/worktrees/[id]/capture/route.js +1 -1
  88. package/.next/server/app/api/worktrees/[id]/capture/route.js.nft.json +1 -1
  89. package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
  90. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js +1 -1
  91. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js.nft.json +1 -1
  92. package/.next/server/app/api/worktrees/[id]/clear-composer/route_client-reference-manifest.js +1 -1
  93. package/.next/server/app/api/worktrees/[id]/cli-reference/route_client-reference-manifest.js +1 -1
  94. package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
  95. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
  96. package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
  97. package/.next/server/app/api/worktrees/[id]/current-output/route.js.nft.json +1 -1
  98. package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
  99. package/.next/server/app/api/worktrees/[id]/direct-input/route.js +1 -1
  100. package/.next/server/app/api/worktrees/[id]/direct-input/route.js.nft.json +1 -1
  101. package/.next/server/app/api/worktrees/[id]/direct-input/route_client-reference-manifest.js +1 -1
  102. package/.next/server/app/api/worktrees/[id]/env/route_client-reference-manifest.js +1 -1
  103. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
  104. package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
  105. package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
  106. package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
  107. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
  108. package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
  109. package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
  110. package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
  111. package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
  112. package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
  113. package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
  114. package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
  115. package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
  116. package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
  117. package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
  118. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
  119. package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
  120. package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
  121. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
  122. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
  123. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
  124. package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
  125. package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
  126. package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
  127. package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
  128. package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
  129. package/.next/server/app/api/worktrees/[id]/instances/notes/route_client-reference-manifest.js +1 -1
  130. package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js +1 -1
  131. package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js.nft.json +1 -1
  132. package/.next/server/app/api/worktrees/[id]/instances/opencode/route_client-reference-manifest.js +1 -1
  133. package/.next/server/app/api/worktrees/[id]/interrupt/route.js +1 -1
  134. package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
  135. package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
  136. package/.next/server/app/api/worktrees/[id]/kill-session/route.js +1 -1
  137. package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -1
  138. package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
  139. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
  140. package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
  141. package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
  142. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
  143. package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
  144. package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
  145. package/.next/server/app/api/worktrees/[id]/opencode/diff/route_client-reference-manifest.js +1 -1
  146. package/.next/server/app/api/worktrees/[id]/opencode/session/route.js +1 -2
  147. package/.next/server/app/api/worktrees/[id]/opencode/session/route.js.nft.json +1 -1
  148. package/.next/server/app/api/worktrees/[id]/opencode/session/route_client-reference-manifest.js +1 -1
  149. package/.next/server/app/api/worktrees/[id]/opencode/share/route.js +1 -2
  150. package/.next/server/app/api/worktrees/[id]/opencode/share/route.js.nft.json +1 -1
  151. package/.next/server/app/api/worktrees/[id]/opencode/share/route_client-reference-manifest.js +1 -1
  152. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
  153. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -1
  154. package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
  155. package/.next/server/app/api/worktrees/[id]/resolve-target/route_client-reference-manifest.js +1 -1
  156. package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -1
  157. package/.next/server/app/api/worktrees/[id]/respond/route.js.nft.json +1 -1
  158. package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
  159. package/.next/server/app/api/worktrees/[id]/route.js +1 -1
  160. package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
  161. package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
  162. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
  163. package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
  164. package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
  165. package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
  166. package/.next/server/app/api/worktrees/[id]/send/route.js +1 -1
  167. package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
  168. package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
  169. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +3 -3
  170. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -1
  171. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
  172. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
  173. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
  174. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
  175. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
  176. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route_client-reference-manifest.js +1 -1
  177. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route_client-reference-manifest.js +1 -1
  178. package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
  179. package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
  180. package/.next/server/app/api/worktrees/[id]/special-keys/route.js +1 -1
  181. package/.next/server/app/api/worktrees/[id]/special-keys/route.js.nft.json +1 -1
  182. package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
  183. package/.next/server/app/api/worktrees/[id]/tasks/route.js +1 -1
  184. package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -1
  185. package/.next/server/app/api/worktrees/[id]/terminal/route.js +2 -2
  186. package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
  187. package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
  188. package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
  189. package/.next/server/app/api/worktrees/[id]/timers/route.js +1 -1
  190. package/.next/server/app/api/worktrees/[id]/timers/route.js.nft.json +1 -1
  191. package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
  192. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  193. package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
  194. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
  195. package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
  196. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
  197. package/.next/server/app/api/worktrees/[id]/verify/config/route.js +1 -1
  198. package/.next/server/app/api/worktrees/[id]/verify/config/route_client-reference-manifest.js +1 -1
  199. package/.next/server/app/api/worktrees/[id]/verify/route.js +1 -1
  200. package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -1
  201. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route.js +1 -1
  202. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route_client-reference-manifest.js +1 -1
  203. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -1
  204. package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -1
  205. package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
  206. package/.next/server/app/api/worktrees/apply-default-agents/route_client-reference-manifest.js +1 -1
  207. package/.next/server/app/api/worktrees/route.js +1 -1
  208. package/.next/server/app/api/worktrees/route.js.nft.json +1 -1
  209. package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
  210. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  211. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  212. package/.next/server/app/more/page_client-reference-manifest.js +1 -1
  213. package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  214. package/.next/server/app/page_client-reference-manifest.js +1 -1
  215. package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
  216. package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
  217. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  218. package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  219. package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
  220. package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
  221. package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  222. package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
  223. package/.next/server/app/worktrees/[id]/page.js +9 -9
  224. package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
  225. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
  226. package/.next/server/app-paths-manifest.json +32 -32
  227. package/.next/server/chunks/1068.js +1 -1
  228. package/.next/server/chunks/1210.js +1 -1
  229. package/.next/server/chunks/2460.js +1 -0
  230. package/.next/server/chunks/2908.js +1 -0
  231. package/.next/server/chunks/4372.js +5 -0
  232. package/.next/server/chunks/5595.js +1 -0
  233. package/.next/server/chunks/5845.js +1 -0
  234. package/.next/server/chunks/6130.js +1 -1
  235. package/.next/server/chunks/6401.js +1 -1
  236. package/.next/server/chunks/6474.js +2 -2
  237. package/.next/server/chunks/850.js +1 -0
  238. package/.next/server/chunks/8543.js +1 -1
  239. package/.next/server/chunks/8728.js +2 -2
  240. package/.next/server/chunks/9130.js +1 -5
  241. package/.next/server/chunks/9390.js +1 -2
  242. package/.next/server/chunks/9627.js +1 -1
  243. package/.next/server/chunks/967.js +1 -1
  244. package/.next/server/chunks/9731.js +2 -2
  245. package/.next/server/chunks/9798.js +2 -0
  246. package/.next/server/chunks/9882.js +3 -3
  247. package/.next/server/middleware-manifest.json +5 -5
  248. package/.next/server/pages/500.html +1 -1
  249. package/.next/server/server-reference-manifest.json +1 -1
  250. package/.next/static/chunks/{2407-f1f258d4a1d92620.js → 2407-051f6f84226a9f2c.js} +1 -1
  251. package/.next/static/chunks/591-539fec878c9dec5e.js +1 -0
  252. package/.next/static/chunks/app/{layout-da66300cc20244ed.js → layout-9da1ab602bcb3051.js} +1 -1
  253. package/.next/static/chunks/app/worktrees/[id]/page-2a81397e60f17e63.js +1 -0
  254. package/.next/trace +13 -13
  255. package/dist/cli/commands/capture.d.ts.map +1 -1
  256. package/dist/cli/commands/capture.js +7 -8
  257. package/dist/cli/commands/wait.d.ts.map +1 -1
  258. package/dist/cli/commands/wait.js +36 -2
  259. package/dist/cli/types/api-responses.d.ts +15 -0
  260. package/dist/cli/types/api-responses.d.ts.map +1 -1
  261. package/dist/lib/session/prompt-view.d.ts +205 -0
  262. package/dist/lib/session/prompt-view.d.ts.map +1 -0
  263. package/dist/lib/session/prompt-view.js +267 -0
  264. package/dist/server/server.js +5 -3
  265. package/dist/server/src/lib/auto-yes-lifecycle.js +133 -0
  266. package/dist/server/src/lib/auto-yes-poller.js +19 -4
  267. package/dist/server/src/lib/cli-tools/antigravity.js +1 -1
  268. package/dist/server/src/lib/detection/cli-patterns.js +38 -20
  269. package/dist/server/src/lib/detection/status-detector.js +1 -1
  270. package/dist/server/src/lib/detection/tools/antigravity/detect.js +7 -31
  271. package/dist/server/src/lib/detection/tools/antigravity/live-region.js +39 -0
  272. package/dist/server/src/lib/detection/tools/claude/detect.js +8 -3
  273. package/dist/server/src/lib/detection/tools/claude/live-region.js +26 -0
  274. package/dist/server/src/lib/detection/tools/codex/cli-patterns.js +1 -1
  275. package/dist/server/src/lib/detection/tools/codex/detect.js +26 -46
  276. package/dist/server/src/lib/detection/tools/codex/live-region.js +73 -0
  277. package/dist/server/src/lib/detection/tools/command-code/detect.js +11 -0
  278. package/dist/server/src/lib/detection/tools/command-code/live-region.js +36 -0
  279. package/dist/server/src/lib/detection/tools/copilot/detect.js +3 -0
  280. package/dist/server/src/lib/detection/tools/copilot/live-region.js +52 -0
  281. package/dist/server/src/lib/detection/tools/frame.js +36 -2
  282. package/dist/server/src/lib/detection/tools/live-region-specs.js +31 -0
  283. package/dist/server/src/lib/detection/tools/live-region.js +204 -0
  284. package/dist/server/src/lib/detection/tools/opencode/detect.js +3 -0
  285. package/dist/server/src/lib/detection/tools/opencode/live-region.js +24 -0
  286. package/dist/server/src/lib/detection/tools/opencode-gutter-live-region.js +72 -0
  287. package/dist/server/src/lib/detection/tools/opencode-v2/detect.js +3 -0
  288. package/dist/server/src/lib/detection/tools/opencode-v2/live-region.js +24 -0
  289. package/dist/server/src/lib/detection/tools/run-detection.js +25 -3
  290. package/dist/server/src/lib/polling/auto-yes-dialog-gate.js +16 -4
  291. package/dist/server/src/lib/polling/response-checker.js +25 -20
  292. package/dist/server/src/lib/prompt-answer-sender.js +1 -1
  293. package/dist/server/src/lib/realtime/terminal-broadcast.js +3 -0
  294. package/dist/server/src/lib/relay/relay-delivery.js +3 -0
  295. package/dist/server/src/lib/relay/relay-triggers.js +9 -0
  296. package/dist/server/src/lib/resource-cleanup.js +6 -4
  297. package/dist/server/src/lib/session/current-output-builder.js +4 -0
  298. package/dist/server/src/lib/session/prompt-view.js +267 -0
  299. package/dist/server/src/lib/session/prompt-waiting-composition.js +34 -0
  300. package/dist/server/src/lib/session/waiting-kind.js +3 -0
  301. package/dist/server/src/lib/session-cleanup.js +5 -3
  302. package/package.json +1 -1
  303. package/release-notes/0.44.2.json +33 -0
  304. package/.next/server/chunks/434.js +0 -1
  305. package/.next/server/chunks/5775.js +0 -1
  306. package/.next/server/chunks/650.js +0 -1
  307. package/.next/server/chunks/6661.js +0 -1
  308. package/.next/server/chunks/8583.js +0 -1
  309. package/.next/server/chunks/964.js +0 -1
  310. package/.next/static/chunks/591-308072f285c34787.js +0 -1
  311. package/.next/static/chunks/app/worktrees/[id]/page-040c5f0f585e6812.js +0 -1
  312. /package/.next/static/{57lOiz8zSEHdw97XIm0af → QlCqLjorauDDBXPa-C7TK}/_buildManifest.js +0 -0
  313. /package/.next/static/{57lOiz8zSEHdw97XIm0af → QlCqLjorauDDBXPa-C7TK}/_ssgManifest.js +0 -0
@@ -86,6 +86,7 @@ const prompt_waiting_composition_1 = require("../../lib/session/prompt-waiting-c
86
86
  const provisional_turn_1 = require("../../lib/session/provisional-turn");
87
87
  const status_evidence_1 = require("../../lib/session/status-evidence");
88
88
  const ask_user_question_prompt_1 = require("../../lib/session/ask-user-question-prompt");
89
+ const prompt_view_1 = require("../../lib/session/prompt-view");
89
90
  const auto_yes_dialog_gate_1 = require("../../lib/polling/auto-yes-dialog-gate");
90
91
  const layer_disagreement_1 = require("../../lib/session/layer-disagreement");
91
92
  const structured_prompt_1 = require("../../lib/session/structured-prompt");
@@ -1250,6 +1251,9 @@ async function buildPayload(db, worktreeId, cliToolId, instanceId) {
1250
1251
  isPromptWaiting,
1251
1252
  promptData,
1252
1253
  ...(promptAnswerable !== undefined ? { promptAnswerable } : {}),
1254
+ // Issue #3184: appended next to the value it is derived from, not at the end
1255
+ // — it is a reading of `promptData`, and only of it.
1256
+ promptView: (0, prompt_view_1.derivePromptView)(promptData),
1253
1257
  autoYes: {
1254
1258
  enabled: autoYesState?.enabled ?? false,
1255
1259
  expiresAt: autoYesState?.enabled ? autoYesState.expiresAt : null,
@@ -0,0 +1,267 @@
1
+ "use strict";
2
+ /**
3
+ * How a waiting prompt is shown and answered, decided once (Issue #3184).
4
+ *
5
+ * Before this module every reader of a prompt payload re-derived the same three
6
+ * facts for itself — "can it be answered?", "where are the choices?", "is the
7
+ * answer a keystroke or an API call?" — from `type`, `options`,
8
+ * `decisionOptions`, `decisionId` and `askUserQuestion`. The panel, the phone
9
+ * sheet, the chat surface, Auto-Yes and `wait` each combined them a little
10
+ * differently, and a fix to one surface kept missing the others (#2775 →
11
+ * #2810 → #2822, #3181). {@link derivePromptView} is the one combination; a
12
+ * reader takes its {@link PromptView} and does not look at the raw fields to
13
+ * decide what to show.
14
+ *
15
+ * ## No imports, on purpose
16
+ *
17
+ * The CLI (`tsconfig.cli.json`) compiles with `"paths": {}`, so it can reach a
18
+ * module under `src/lib` by a relative path only when nothing in that module's
19
+ * graph uses the `@/` alias. `types/models` and `session/structured-prompt` both
20
+ * do. The input is therefore a structural type ({@link PromptViewSource}) that
21
+ * every existing prompt shape — `LivePromptData`, `StoredPromptData`, the CLI's
22
+ * own `PromptData` mirror — satisfies without a cast, and this file stays
23
+ * importable from a client component, the server and the CLI alike.
24
+ *
25
+ * ## What it does not replace
26
+ *
27
+ * `isAnswerablePromptData()` (`types/models`) stays: it narrows to the closed
28
+ * `PromptData` union (#1725) for the code that builds an answer body. The two
29
+ * agree by construction — `derivePromptView(x)?.kind === 'screen-choices'`
30
+ * exactly when `isAnswerablePromptData(x)` — and
31
+ * `tests/unit/session/prompt-view-3184.test.ts` holds that over every fixture.
32
+ *
33
+ * @module lib/session/prompt-view
34
+ */
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.TYPED_TEXT_FIELD_LABEL_PATTERNS = exports.UNCLASSIFIED_PROMPT_VIEW_TYPE = void 0;
37
+ exports.promptHeadingMessage = promptHeadingMessage;
38
+ exports.optionTakesTypedText = optionTakesTypedText;
39
+ exports.readDecisionId = readDecisionId;
40
+ exports.readQuestionChoices = readQuestionChoices;
41
+ exports.readDecisionHeading = readDecisionHeading;
42
+ exports.derivePromptView = derivePromptView;
43
+ exports.readPromptView = readPromptView;
44
+ /**
45
+ * `promptData.type` for a frame nothing could classify. Same value as
46
+ * `UNCLASSIFIED_PROMPT_TYPE` in `types/models`, restated because this module may
47
+ * not import it (see the module note); the test asserts the two are equal.
48
+ */
49
+ exports.UNCLASSIFIED_PROMPT_VIEW_TYPE = 'unclassified';
50
+ function promptHeadingMessage(heading) {
51
+ switch (heading.kind) {
52
+ case 'question':
53
+ return { text: heading.text };
54
+ case 'approval':
55
+ return heading.toolName
56
+ ? { key: 'structuredApprovalTitle', values: { toolName: heading.toolName } }
57
+ : { key: 'structuredApprovalTitleNoTool' };
58
+ case 'agent-question':
59
+ return { key: 'structuredQuestionTitle' };
60
+ case 'unreadable':
61
+ return { key: 'unclassifiedTitle' };
62
+ }
63
+ }
64
+ // =============================================================================
65
+ // Field readers (moved from components/worktree/prompt-decision-id, #1932/#2039/#3181)
66
+ // =============================================================================
67
+ /**
68
+ * The option labels measured to be a text field on screen (Issue #2573).
69
+ * Restated from `TYPED_TEXT_FIELD_LABEL_PATTERNS` in
70
+ * `lib/detection/prompt-detect-multiple-choice`, whose graph reaches `fs`.
71
+ */
72
+ exports.TYPED_TEXT_FIELD_LABEL_PATTERNS = [
73
+ /^[^\S\n]*type\s+something\b/i,
74
+ ];
75
+ /**
76
+ * Whether an option is a text field on screen, so its answer is the typed TEXT
77
+ * rather than its number (Issue #2573). `requiresTextInput` alone is also true
78
+ * for a menu row such as `No, tell Command Code what to do differently`.
79
+ */
80
+ function optionTakesTypedText(option) {
81
+ return option.requiresTextInput === true
82
+ && exports.TYPED_TEXT_FIELD_LABEL_PATTERNS.some((pattern) => pattern.test(option.label));
83
+ }
84
+ /**
85
+ * The decision id a payload names, or null (Issue #1932). A validating read:
86
+ * absent, empty or not a string is "no addressable decision".
87
+ */
88
+ function readDecisionId(source) {
89
+ if (!source)
90
+ return null;
91
+ const candidate = source.decisionId;
92
+ return typeof candidate === 'string' && candidate !== '' ? candidate : null;
93
+ }
94
+ function hasDecisionOptions(source) {
95
+ return Array.isArray(source.decisionOptions) && source.decisionOptions.length > 0;
96
+ }
97
+ /**
98
+ * The choices a question offers when it may be answered over the API, or null
99
+ * (Issue #2039). All three must hold: a decision id, exactly one question with
100
+ * a complete label list, and NO approval verdicts on the same payload.
101
+ */
102
+ function readQuestionChoices(source) {
103
+ if (!source || readDecisionId(source) === null)
104
+ return null;
105
+ if (hasDecisionOptions(source))
106
+ return null;
107
+ const asked = source.askUserQuestion;
108
+ if (!asked || typeof asked.question !== 'string' || asked.question === '')
109
+ return null;
110
+ if (!Array.isArray(asked.labels) || asked.labels.length === 0)
111
+ return null;
112
+ const labels = asked.labels.filter((label) => typeof label === 'string' && label !== '');
113
+ // Partial is worse than none: the numbers are positions in this list.
114
+ if (labels.length !== asked.labels.length)
115
+ return null;
116
+ const questionCount = typeof asked.questionCount === 'number' ? asked.questionCount : 1;
117
+ if (questionCount !== 1)
118
+ return null;
119
+ return {
120
+ question: asked.question,
121
+ labels,
122
+ questionCount,
123
+ ...(asked.custom === true ? { custom: true } : {}),
124
+ };
125
+ }
126
+ /** The heading for addressable choices, or null when there is nothing to click (#3181). */
127
+ function readDecisionHeading(source) {
128
+ if (!source || readDecisionId(source) === null)
129
+ return null;
130
+ if (hasDecisionOptions(source)) {
131
+ return {
132
+ kind: 'approval',
133
+ toolName: typeof source.toolName === 'string' && source.toolName ? source.toolName : null,
134
+ };
135
+ }
136
+ return readQuestionChoices(source) ? { kind: 'question' } : null;
137
+ }
138
+ // =============================================================================
139
+ // The view
140
+ // =============================================================================
141
+ function screenChoices(source) {
142
+ const options = Array.isArray(source.options) ? source.options : [];
143
+ const choices = [];
144
+ for (const option of options) {
145
+ if (typeof option === 'string') {
146
+ // yes_no: `['yes', 'no']`, answered by the word itself.
147
+ choices.push({
148
+ answer: option,
149
+ label: option,
150
+ isDefault: source.defaultOption === option,
151
+ takesText: false,
152
+ });
153
+ continue;
154
+ }
155
+ if (!option || typeof option !== 'object')
156
+ continue;
157
+ const o = option;
158
+ if (typeof o.number !== 'number' || typeof o.label !== 'string')
159
+ continue;
160
+ choices.push({
161
+ answer: String(o.number),
162
+ label: o.label,
163
+ isDefault: o.isDefault === true,
164
+ takesText: optionTakesTypedText({ label: o.label, requiresTextInput: o.requiresTextInput === true }),
165
+ ...(typeof o.description === 'string' ? { description: o.description } : {}),
166
+ });
167
+ }
168
+ return choices;
169
+ }
170
+ function decisionChoices(decisionOptions) {
171
+ if (!Array.isArray(decisionOptions))
172
+ return [];
173
+ const choices = [];
174
+ for (const option of decisionOptions) {
175
+ const o = option;
176
+ if (!o || typeof o.number !== 'number' || typeof o.label !== 'string')
177
+ continue;
178
+ choices.push({ answer: String(o.number), label: o.label, isDefault: false, takesText: false });
179
+ }
180
+ return choices;
181
+ }
182
+ const UNREADABLE_VIEW = {
183
+ kind: 'unreadable',
184
+ heading: { kind: 'unreadable' },
185
+ choices: [],
186
+ multiSelect: false,
187
+ freeText: null,
188
+ decisionId: null,
189
+ apiTarget: null,
190
+ };
191
+ /**
192
+ * Decide how a prompt payload is shown and answered (Issue #3184).
193
+ *
194
+ * Evaluated in this order (design §2.3):
195
+ * 1. any `type` but the unclassified sentinel → `screen-choices`;
196
+ * 2. unclassified + decision id + approval verdicts → `api-choices` (approval);
197
+ * 3. unclassified + decision id + one complete question → `api-choices` (question);
198
+ * 4. every other unclassified payload — no id, #1932's options-without-id half
199
+ * state, and both stored history records — → `unreadable`.
200
+ *
201
+ * @param source - A live or stored prompt payload, or null
202
+ * @returns The view, or null when there is no prompt
203
+ */
204
+ function derivePromptView(source) {
205
+ if (source == null)
206
+ return null;
207
+ if (source.type !== exports.UNCLASSIFIED_PROMPT_VIEW_TYPE) {
208
+ const choices = screenChoices(source);
209
+ return {
210
+ kind: 'screen-choices',
211
+ heading: { kind: 'question', text: typeof source.question === 'string' ? source.question : '' },
212
+ choices,
213
+ multiSelect: source.multiSelect === true,
214
+ freeText: choices.some((choice) => choice.takesText) ? { via: 'screen' } : null,
215
+ decisionId: null,
216
+ apiTarget: null,
217
+ };
218
+ }
219
+ const decisionId = readDecisionId(source);
220
+ if (decisionId !== null && hasDecisionOptions(source)) {
221
+ const choices = decisionChoices(source.decisionOptions);
222
+ if (choices.length > 0) {
223
+ return {
224
+ kind: 'api-choices',
225
+ heading: {
226
+ kind: 'approval',
227
+ toolName: typeof source.toolName === 'string' && source.toolName ? source.toolName : null,
228
+ },
229
+ choices,
230
+ multiSelect: false,
231
+ freeText: null,
232
+ decisionId,
233
+ apiTarget: 'approval',
234
+ };
235
+ }
236
+ }
237
+ const question = readQuestionChoices(source);
238
+ if (decisionId !== null && question !== null) {
239
+ return {
240
+ kind: 'api-choices',
241
+ heading: { kind: 'agent-question', text: question.question },
242
+ choices: question.labels.map((label, index) => ({
243
+ answer: String(index + 1),
244
+ label,
245
+ isDefault: false,
246
+ takesText: false,
247
+ })),
248
+ multiSelect: false,
249
+ freeText: question.custom === true ? { via: 'api' } : null,
250
+ decisionId,
251
+ apiTarget: 'question',
252
+ };
253
+ }
254
+ return UNREADABLE_VIEW;
255
+ }
256
+ /**
257
+ * The view a `current-output` payload carries, falling back to deriving it.
258
+ *
259
+ * `??`, not `||`: a server from before #3184 sends no `promptView`, and its
260
+ * absence means "this daemon does not publish the field" — the same function
261
+ * then decides from `promptData`, so old and new servers reach the same answer.
262
+ */
263
+ function readPromptView(payload) {
264
+ if (!payload)
265
+ return null;
266
+ return payload.promptView ?? derivePromptView(payload.promptData);
267
+ }
@@ -33,11 +33,45 @@
33
33
  */
34
34
  Object.defineProperty(exports, "__esModule", { value: true });
35
35
  exports.STRUCTURED_SEND_GUARD_ENV = exports.STRUCTURED_SEND_BLOCK_MAX_AGE_MS = void 0;
36
+ exports.isApiAnswerableStructuredWait = isApiAnswerableStructuredWait;
37
+ exports.isApiAnswerableWaitNow = isApiAnswerableWaitNow;
36
38
  exports.structuredWaitingReason = structuredWaitingReason;
37
39
  exports.resolvePromptWaiting = resolvePromptWaiting;
38
40
  exports.peekPromptWaiting = peekPromptWaiting;
39
41
  const agent_event_state_1 = require("../../lib/session/agent-event-state");
40
42
  const status_mapping_1 = require("../../lib/session/status-mapping");
43
+ const structured_prompt_1 = require("../../lib/session/structured-prompt");
44
+ /**
45
+ * Whether a structured wait is one the app answers over the agent's own API
46
+ * (Issue #3184, design §6-2).
47
+ *
48
+ * The same three conjuncts `current-output-builder` requires before it
49
+ * publishes a `decisionId` on the live payload (its `addressableDecisionId`):
50
+ * the record came from `Notification(permission_prompt)` rather than being a
51
+ * `permission-request` forecast, the tool's event source names each decision
52
+ * by id (`eventIdentity: 'permission-id'`), and the record carries such an id.
53
+ * That is exactly when `derivePromptView` reads the payload as `api-choices` —
54
+ * an approval or a question the panel draws buttons for — so the waiting kind
55
+ * published beside it says `prompt` too, instead of the scraper's `menu` /
56
+ * `unclassified` and the push body's "check the terminal".
57
+ *
58
+ * @param structured - The structured record, or null
59
+ * @param eventIdentity - `capabilities.eventIdentity` of the tool's event source
60
+ */
61
+ function isApiAnswerableStructuredWait(structured, eventIdentity) {
62
+ return (structured !== null &&
63
+ structured.source === 'notification' &&
64
+ eventIdentity === 'permission-id' &&
65
+ (0, structured_prompt_1.isAddressableDecision)(structured.decisionId));
66
+ }
67
+ /**
68
+ * {@link isApiAnswerableStructuredWait} for the record as it stands now — a
69
+ * read, like {@link peekPromptWaiting}: nothing is released or corroborated.
70
+ * Kept here so the structured record is still read in this one module (#1737).
71
+ */
72
+ function isApiAnswerableWaitNow(worktreeId, cliToolId, instanceId, eventIdentity) {
73
+ return isApiAnswerableStructuredWait((0, agent_event_state_1.getStructuredPromptWaiting)(worktreeId, cliToolId, instanceId), eventIdentity);
74
+ }
41
75
  /**
42
76
  * How long a structured-only dialog may keep refusing sends (Issue #1737).
43
77
  *
@@ -33,6 +33,7 @@ const status_detector_1 = require("../../lib/detection/status-detector");
33
33
  * |--------------------------------------------------|------------------|
34
34
  * | not waiting | `null` |
35
35
  * | `hasActivePrompt` | `'prompt'` |
36
+ * | `apiAnswerable` (#3184: answered over the agent's API) | `'prompt'` |
36
37
  * | scraper `waiting` + a {@link SELECTION_LIST_REASONS} reason | `'menu'` |
37
38
  * | anything else that is still waiting | `'unclassified'` |
38
39
  *
@@ -52,6 +53,8 @@ function deriveWaitingKind(input) {
52
53
  return null;
53
54
  if (input.hasActivePrompt)
54
55
  return 'prompt';
56
+ if (input.apiAnswerable === true)
57
+ return 'prompt';
55
58
  if (input.scraperStatus === 'waiting' && status_detector_1.SELECTION_LIST_REASONS.has(input.scraperReason)) {
56
59
  return 'menu';
57
60
  }
@@ -16,7 +16,7 @@ exports.createOwnedSessionKiller = createOwnedSessionKiller;
16
16
  exports.cleanupGlobalSessions = cleanupGlobalSessions;
17
17
  exports.syncWorktreesAndCleanup = syncWorktreesAndCleanup;
18
18
  const response_poller_1 = require("./polling/response-poller");
19
- const auto_yes_manager_1 = require("./polling/auto-yes-manager");
19
+ const auto_yes_lifecycle_1 = require("./auto-yes-lifecycle");
20
20
  const schedule_manager_1 = require("./schedule-manager");
21
21
  const timer_manager_1 = require("./timer-manager");
22
22
  const global_session_poller_1 = require("./polling/global-session-poller");
@@ -87,7 +87,9 @@ async function cleanupWorktreeSessions(worktreeId, killSessionFn) {
87
87
  // 2. Stop auto-yes-poller for all agents (Issue #138, #525: byWorktree helper)
88
88
  // Order: stopAutoYesPollingByWorktree -> deleteAutoYesStateByWorktree -> stopScheduleForWorktree (Issue #404)
89
89
  try {
90
- (0, auto_yes_manager_1.stopAutoYesPollingByWorktree)(worktreeId);
90
+ // Issue #3184: the `worktree-deleted` row of the Auto-Yes lifecycle table,
91
+ // in its two halves so the two failures stay reported apart.
92
+ (0, auto_yes_lifecycle_1.stopAutoYesPollersFor)('worktree-deleted', { scope: 'worktree', worktreeId });
91
93
  result.pollersStopped.push('auto-yes-poller');
92
94
  }
93
95
  catch (error) {
@@ -97,7 +99,7 @@ async function cleanupWorktreeSessions(worktreeId, killSessionFn) {
97
99
  }
98
100
  // 3. Delete auto-yes state for all agents (Issue #404, #525: byWorktree helper)
99
101
  try {
100
- (0, auto_yes_manager_1.deleteAutoYesStateByWorktree)(worktreeId);
102
+ (0, auto_yes_lifecycle_1.applyAutoYesStateRule)('worktree-deleted', { scope: 'worktree', worktreeId });
101
103
  result.pollersStopped.push('auto-yes-state');
102
104
  }
103
105
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commandmate",
3
- "version": "0.44.1",
3
+ "version": "0.44.2",
4
4
  "description": "No long blocks of time? Run an AI team from your phone. Git worktree sessions, task contracts and verification gates for Claude Code, Codex, Gemini CLI, Copilot, OpenCode, Antigravity and Command Code.",
5
5
  "keywords": [
6
6
  "ai-agents",
@@ -0,0 +1,33 @@
1
+ {
2
+ "version": "0.44.2",
3
+ "date": "2026-10-04",
4
+ "highlight": {
5
+ "ja": "会話の中に引用されたダイアログの文字を、本物の確認画面と取り違えないようになりました。",
6
+ "en": "Dialog text quoted inside a conversation is no longer mistaken for a real prompt."
7
+ },
8
+ "added": [],
9
+ "improved": [
10
+ {
11
+ "ja": "承認ダイアログの見出しと選択肢が、PC・スマホ・チャット画面で同じ内容で表示されるようになりました。",
12
+ "en": "Approval dialogs now show the same heading and choices on the PC view, the phone view and the chat view."
13
+ },
14
+ {
15
+ "ja": "画面からではなく返答で答える質問は、「ターミナルで確認」ではなく返答待ちとして通知されるようになりました。",
16
+ "en": "Questions answered by reply rather than on screen are now notified as waiting for a reply, not as a terminal check."
17
+ }
18
+ ],
19
+ "fixed": [
20
+ {
21
+ "ja": "会話に引用されたダイアログを、状態表示や Auto Yes が本物の確認画面と読み違える問題を直しました。",
22
+ "en": "Fixed the status display and Auto Yes reading a dialog quoted in the conversation as a real prompt."
23
+ },
24
+ {
25
+ "ja": "チャット画面で、OpenCode V2 の承認が「選択肢を読み取れませんでした」と表示される問題を直しました。",
26
+ "en": "Fixed OpenCode V2 approvals in the chat view saying the options could not be read."
27
+ },
28
+ {
29
+ "ja": "インスタンスを削除すると、そのインスタンスの Auto Yes も消えるようにしました。",
30
+ "en": "Removing an instance now also clears its Auto Yes."
31
+ }
32
+ ]
33
+ }
@@ -1 +0,0 @@
1
- "use strict";exports.id=434,exports.ids=[434,964,8583],exports.modules={3421:(a,b,c)=>{Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(71237),e=c(55088),f=c(17679);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},7329:(a,b,c)=>{c.d(b,{Hv:()=>m,W3:()=>k,uK:()=>l});var d=c(90787),e=c(52660),f=c(18201),g=c(23854),h=c(49798),i=c(67164);let j=(0,c(72626).h)("relay-service");function k(a,b){for(let c of[b.from.worktreeId,b.to.worktreeId])if(!(0,h.r)(a,c))return{ok:!1,refusal:{code:"RELAY_WORKTREE_NOT_FOUND",message:`Worktree '${c}' not found`,worktreeId:c}};let c=(0,g.$G)({from:b.from,to:b.to,parentHops:function(a,b){try{let g=(0,h.S)(a,b),i=(0,e.getMessages)(a,b.worktreeId,{limit:5,limitUnit:"pairs",cliToolId:g.cliToolId,instanceId:b.instanceId,matchResolvedInstance:!0}).filter(a=>"user"===a.role),j=i.findIndex(a=>"relay"===a.messageType);if(-1===j)return null;let k=i[j];for(let a=0;a<j;a+=1){var c;if(c=i[a],c.timestamp.getTime()<k.timestamp.getTime()||(0,f.pk)(c.content)!==(0,f.pk)(k.content))return null}let l=(0,e.parseRelayRequestId)(k.requestId);if(!l)return null;return(0,d.Ip)(a,l)?.hops??null}catch(a){return j.warn("relay-parent-lookup-failed",{worktreeId:b.worktreeId,instanceId:b.instanceId,error:a instanceof Error?a.message:String(a)}),null}}(a,b.from),allowRelayChain:!0===b.allowRelayChain,openBetween:(0,d.Oz)(a,b.from,b.to)});if((0,g.Qe)(c))return{ok:!1,refusal:c};let k=b.now??Date.now(),l=(0,d.CR)(a,{from:b.from,to:b.to,hops:c.hops,expiresAt:k+(0,g.AL)(b.ttlMs),now:k});return j.info("relay-opened",{relayId:l.id,from:`${l.from.worktreeId}/${l.from.instanceId}`,to:`${l.to.worktreeId}/${l.to.instanceId}`,hops:l.hops}),(0,i._)(a,l.id,"requested",(0,h.S)(a,l.from),(0,h.S)(a,l.to),k),{ok:!0,relay:l}}function l(a,b,c=Date.now()){let e=(0,d.Ip)(a,b);return e?(0,d.m_)(a,b,c)?(j.info("relay-cancelled",{relayId:b}),{ok:!0,relay:(0,d.Ip)(a,b)??e}):{ok:!1,reason:"already_closed",relay:e}:{ok:!1,reason:"not_found",relay:null}}function m(a,b){return(0,d.M4)(a,b)}},15608:(a,b,c)=>{function d(){return globalThis.__cmLegacySessionAliases??=new Map}function e(a){return d().get(a)}function f(a){let b=d(),c=!1;for(let[d,e]of b)e===a&&(b.delete(d),c=!0);return c}c.d(b,{mc:()=>e,y:()=>f})},18201:(a,b,c)=>{c.d(b,{Ce:()=>g,pk:()=>e});let d=(0,c(72626).h)("lib/history/user-turn-recorder");function e(a){return a.replace(/\r\n?/g,"\n").split("\n").map(a=>a.replace(/[ \t ]+$/u,"")).join("\n").trim()}function f(a){return{worktreeId:a.worktreeId,cliToolId:a.cliToolId,instanceId:a.instanceId??a.cliToolId}}async function g(a,b,h,i,j={}){let k=a.instanceId??a.cliToolId,l=e(h);if(0===b.length||0===l.length)return{outcome:"skipped",messageId:null,timestampMs:null};try{let[{getDbInstance:g},m,{broadcastMessage:n}]=await Promise.all([Promise.resolve().then(c.bind(c,88807)),Promise.resolve().then(c.bind(c,52660)),Promise.resolve().then(c.bind(c,43015))]),o=g(),p=m.findMessageByRequestId(o,a.worktreeId,b);if(p)return{outcome:"already-recorded",messageId:p.id,timestampMs:p.timestamp.getTime()};let q=i>0?i:Date.now(),r=function(a,b,c,g,h,i,j,k){var l,m,n;let o=Math.min(j-12e4,k.adoptionFromMs??1/0),p=(l=a.findUnkeyedUserMessages(b,{worktreeId:c.worktreeId,cliToolId:c.cliToolId,instanceId:g,fromMs:o,toMs:j+12e4,includeRelayDelivered:!0}),m=i,n=j,l.filter(a=>e(a.content)===m).sort((a,b)=>Math.abs(a.timestamp.getTime()-n)-Math.abs(b.timestamp.getTime()-n)));for(let e of p)if(!e.requestId&&a.setMessageRequestId(b,e.id,h))return d.info("user-turn-adopted",{...f(c),requestId:h,messageId:e.id,driftMs:e.timestamp.getTime()-j}),{outcome:"adopted",messageId:e.id,timestampMs:e.timestamp.getTime()};let q=p.find(a=>a.requestId);return q?(d.info("user-turn-already-relayed",{...f(c),requestId:h,messageId:q.id,relayRequestId:q.requestId??null,driftMs:q.timestamp.getTime()-j}),{outcome:"already-recorded",messageId:q.id,timestampMs:q.timestamp.getTime()}):null}(m,o,a,k,b,l,q,j);if(r)return r;let s=m.createMessage(o,{worktreeId:a.worktreeId,role:"user",content:h,messageType:"normal",timestamp:new Date(q),cliToolId:a.cliToolId,instanceId:k,requestId:b});return n("message",{worktreeId:a.worktreeId,message:s}),d.info("user-turn-recorded",{...f(a),requestId:b,contentLength:h.length}),{outcome:"inserted",messageId:s.id,timestampMs:q}}catch(c){return d.error("user-turn-record-failed",{...f(a),requestId:b,error:c instanceof Error?c.message:String(c)}),{outcome:"failed",messageId:null,timestampMs:null}}}},40964:(a,b,c)=>{c.d(b,{s4:()=>k,NN:()=>n,Ze:()=>l,mf:()=>m});var d=c(15194);let e=/^[a-zA-Z0-9_-]+$/;function f(a){if(!e.test(a))throw Error(`Invalid session name format: ${a}`)}var g=c(15608);let h="mcbd-",i=/^[0-9a-f]{8}$/,j=[...d.XH].sort((a,b)=>b.length-a.length);function k(){return globalThis.__cmTmuxSessionNamespace??null}function l(a,b,c,e){var g=null===a?h:`${h}${a}-`;let i=`${g}${b}-${c}`;if(!e||e===b)return f(i),i;let j=(0,d.pL)(e,b),k=j?`${i}-${j}`:i;return f(k),k}function m(a,b,c){let d=k(),e=l(d,a,b,c);return null===d?e:(0,g.mc)(e)??e}function n(a){if(!a.startsWith(h))return null;let b=a.slice(h.length),c=null,d=b.indexOf("-");d>0&&i.test(b.slice(0,d))&&(c=b.slice(0,d),b=b.slice(d+1));let e=j.find(a=>b.startsWith(`${a}-`));if(!e)return null;let f=b.slice(e.length+1);return""===f?null:{namespace:c,cliToolId:e,rest:f}}},83530:(a,b,c)=>{c.d(b,{FH:()=>l,fV:()=>k,iK:()=>i,y4:()=>h});var d=c(73753),e=c(28274),f=c(15194);let g="claude",h="instance_tool_conflict";function i(a,b,c={}){let{instanceId:d,requestedCliTool:g}=c;if(!d)return g?{cliToolId:g,instanceId:g,resolvedBy:"explicit"}:j(a,b,void 0);let h=(0,e.BN)(a,b,d);if(h&&(0,f.hR)(h.cliTool)){let a={cliToolId:h.cliTool,instanceId:d,resolvedBy:"roster"};return g&&g!==h.cliTool&&(a.conflict={instanceId:d,rosterCliTool:h.cliTool,requestedCliTool:g}),a}return g?(0,f.hR)(d)&&g!==d?{cliToolId:d,instanceId:d,resolvedBy:"primary",conflict:{instanceId:d,rosterCliTool:d,requestedCliTool:g,primaryAnchor:!0}}:{cliToolId:g,instanceId:d,resolvedBy:"explicit"}:(0,f.hR)(d)?{cliToolId:d,instanceId:d,resolvedBy:"primary"}:j(a,b,d)}function j(a,b,c){let e=(0,d.getWorktreeById)(a,b),h=e?.cliToolId;return h&&(0,f.hR)(h)?{cliToolId:h,instanceId:c??h,resolvedBy:"worktree-default"}:{cliToolId:g,instanceId:c??g,resolvedBy:"fallback"}}function k(a,b,c={}){let d=i(a,b,c);return d.conflict?{ok:!1,error:h,conflict:d.conflict}:{ok:!0,target:d}}function l(a){return a.primaryAnchor?`Agent instance '${a.instanceId}' is the primary instance of ${a.rosterCliTool}, but ${a.requestedCliTool} was requested. Omit the agent, pass ${a.rosterCliTool}, or target a ${a.requestedCliTool} instance instead.`:`Agent instance '${a.instanceId}' is registered as ${a.rosterCliTool}, but ${a.requestedCliTool} was requested. Omit the agent, pass ${a.rosterCliTool}, or update the instance's roster entry.`}},95736:(a,b,c)=>{a.exports=c(44870)}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=5775,exports.ids=[964,2839,5220,5775,8583],exports.modules={15608:(a,b,c)=>{function d(){return globalThis.__cmLegacySessionAliases??=new Map}function e(a){return d().get(a)}function f(a){let b=d(),c=!1;for(let[d,e]of b)e===a&&(b.delete(d),c=!0);return c}c.d(b,{mc:()=>e,y:()=>f})},39687:(a,b,c)=>{c.d(b,{d:()=>t});var d=c(56791),e=c(8360),f=c(15194),g=c(95220),h=c(12462),i=c(43015),j=c(54325),k=c(72626),l=c(34331),m=c(40964),n=c(58707),o=c(2669),p=c(49319);let q=(0,k.h)("session/send-user-message");function r(a){return a instanceof Error?a.message:String(a)}async function s(a,b){let c=`${a}:${b}`,d=Date.now()+5e3;for(;(0,g.getActivePollers)().includes(c);){if(Date.now()>=d)return!1;await new Promise(a=>setTimeout(a,100))}return!0}async function t(a,b){let{worktreeId:c,content:k,cliToolId:t,instanceId:u,absoluteImagePath:v,copilotModel:w}=b,x=b.messageType??"normal",y=u??t,z=e.CLIToolManager.getInstance().getTool(t),A=(0,m.mf)(t,c,u),B=await (0,l.L)(c,A,a);if(null===B||"foreign"===B.verdict)return q.warn("send-refused-foreign-session",{worktreeId:c,cliToolId:t,instanceId:y,sessionName:A,sessionPath:B?.sessionPath??null,reason:B?"foreign":"worktree_not_found"}),{ok:!1,stage:"foreign_session",error:B?`tmux session "${A}" belongs to another CommandMate server`:`Worktree '${c}' not found; cannot confirm tmux session "${A}" is this server's`};let C=await (0,n.a3)(c,t,u,{ignoreStructured:b.ignoreStructuredPromptGuard});if(C.waiting)return q.info("send-refused-prompt-waiting",{worktreeId:c,cliToolId:t,reason:C.reason,blockedBy:C.blockedBy}),{ok:!1,stage:"prompt_waiting",error:(0,n.br)(c,C.blockedBy)};if(w&&"copilot"===t){try{await z.sendModelCommand(c,w,u),q.info("copilot-model-command-sent",{model:w})}catch(a){return q.error("failed-to-send-model-command:",{error:r(a)}),{ok:!1,stage:"model",error:r(a)}}await s(c,y)||q.warn("previous-turn-poller-still-running",{worktreeId:c,instanceId:y,waitedMs:5e3})}let D=new Date;try{await (0,h.o4)(a,c,t,D,u)}catch(a){q.error("failed-to-save-pending-assistant-response:",{error:r(a)})}let E=null;try{let b=(0,d.getMessages)(a,c,{limit:1,cliToolId:t,instanceId:y,matchResolvedInstance:!0});b.length>0&&"user"===b[0].role&&b[0].content===k&&(E=b[0].id)}catch(a){q.error("failed-to-detect-orphaned-messages:",{error:r(a)})}try{v?(0,f._J)(z)?await z.sendMessageWithImage(c,k,v,u):await z.sendMessage(c,(0,p.TZ)(k,v),u):await z.sendMessage(c,k,u)}catch(a){if(q.error("failed-to-send-message-to:",{error:r(a)}),(0,o.wQ)(a))return{ok:!1,stage:"send",error:a.message,code:o.M7};return{ok:!1,stage:"send",error:r(a)}}let F=(0,d.createMessage)(a,{worktreeId:c,role:"user",content:k,messageType:x,timestamp:D,cliToolId:t,instanceId:u,requestId:b.requestId});try{(0,i.broadcastMessage)("message",{worktreeId:c,message:{...F,cliToolId:t,instanceId:y}})}catch(a){q.warn("user-message-broadcast-failed",{error:r(a)})}if(E)try{if((0,d.deleteMessageById)(a,E)){q.info("cleaned-up-orphaned-user");try{(0,i.broadcastMessage)(j.dz,{worktreeId:c,cliToolId:t,instanceId:y,reason:"orphan_cleanup"})}catch(a){q.warn("orphan-cleanup-broadcast-failed",{error:r(a)})}}}catch(a){q.error("failed-to-clean-up-orphaned-message:",{error:r(a)})}return(0,d.updateLastUserMessage)(a,c,k,D),(0,d.clearInProgressMessageId)(a,c,t,u),q.info("cleared-in-progress-message-for"),(0,g.startPolling)(c,t,u),{ok:!0,message:F}}},40964:(a,b,c)=>{c.d(b,{s4:()=>k,NN:()=>n,Ze:()=>l,mf:()=>m});var d=c(15194);let e=/^[a-zA-Z0-9_-]+$/;function f(a){if(!e.test(a))throw Error(`Invalid session name format: ${a}`)}var g=c(15608);let h="mcbd-",i=/^[0-9a-f]{8}$/,j=[...d.XH].sort((a,b)=>b.length-a.length);function k(){return globalThis.__cmTmuxSessionNamespace??null}function l(a,b,c,e){var g=null===a?h:`${h}${a}-`;let i=`${g}${b}-${c}`;if(!e||e===b)return f(i),i;let j=(0,d.pL)(e,b),k=j?`${i}-${j}`:i;return f(k),k}function m(a,b,c){let d=k(),e=l(d,a,b,c);return null===d?e:(0,g.mc)(e)??e}function n(a){if(!a.startsWith(h))return null;let b=a.slice(h.length),c=null,d=b.indexOf("-");d>0&&i.test(b.slice(0,d))&&(c=b.slice(0,d),b=b.slice(d+1));let e=j.find(a=>b.startsWith(`${a}-`));if(!e)return null;let f=b.slice(e.length+1);return""===f?null:{namespace:c,cliToolId:e,rest:f}}},58707:(a,b,c)=>{c.d(b,{$n:()=>k,a3:()=>l,br:()=>m});var d=c(8360),e=c(31990),f=c(95595),g=c(34405),h=c(72626),i=c(30008);let j=(0,h.h)("prompt-waiting-guard"),k="PROMPT_WAITING";async function l(a,b,c,h){try{let k=d.CLIToolManager.getInstance().getTool(b);if(!await k.isRunning(a,c))return{waiting:!1};let l=await (0,e.Wh)(a,b,g._,c),m=(0,f.WC)(l,b),n=(0,i._G)({worktreeId:a,cliToolId:b,instanceId:c,scraper:{status:m.status,reason:m.reason,hasActivePrompt:m.hasActivePrompt},ignoreStructured:h?.ignoreStructured});if(!n.blocksSend)return null!==n.structuredSendBlockSuppressed&&j.info("structured-send-guard-not-applied",{worktreeId:a,cliToolId:b,instanceId:c,suppressed:n.structuredSendBlockSuppressed,promptWaitingSince:n.structured?.at??null}),{waiting:!1};return{waiting:!0,reason:n.blockReason??void 0,blockedBy:n.blockedBy??void 0}}catch(c){return j.warn("prompt-waiting-check-failed",{worktreeId:a,cliToolId:b,error:c instanceof Error?c.message:String(c)}),{waiting:!1}}}function m(a,b){let c=`${a} is waiting on a prompt. Sending now would type into the prompt's input line instead of reaching the agent, and would leave that text in place for the next answer. Answer the prompt first: \`commandmate respond ${a} <answer>\`.`;if("structured"!==b)return c;let d=Math.round(i.j0/6e4);return`${c} This dialog was reported by the agent's own hooks and is not visible to the terminal scraper, so if the pane looks idle the record has outlived its dialog: it stops blocking sends ${d} minutes after it was reported, or immediately with \`commandmate send ${a} <message> --ignore-structured-prompt\` (server-wide: ${i.F1}=off).`}},85775:(a,b,c)=>{c.d(b,{Tm:()=>o,x4:()=>m,xJ:()=>n});var d=c(34129),e=c(8360),f=c(88807),g=c(72626),h=c(87374),i=c(39687);let j=(0,g.h)("timer-manager");function k(){return globalThis.__timerManagerState||(globalThis.__timerManagerState={timers:new Map,timerWorktrees:new Map,initialized:!1}),globalThis.__timerManagerState}async function l(a){let b=k(),c=(0,f.getDbInstance)();try{let b=(0,d.kx)(c,a);if(!b||"pending"!==b.status)return;let f=e.CLIToolManager.getInstance().getTool(b.cliToolId),g=b.instanceId;if(!await f.isRunning(b.worktreeId,g)){j.warn("timer:no-session",{timerId:a,worktreeId:b.worktreeId,instanceId:g}),(0,d.j2)(c,a,h.HR.NO_SESSION);return}(0,d.j2)(c,a,"sending");let k=await (0,i.d)(c,{worktreeId:b.worktreeId,content:b.message,cliToolId:b.cliToolId,instanceId:g});if(!k.ok){let b=`[${k.stage}] ${k.error}`;(0,d.j2)(c,a,"failed",void 0,b),j.error("timer:send-failed",{timerId:a,stage:k.stage,error:k.error});return}(0,d.j2)(c,a,"sent",Date.now()),j.info("timer:sent",{timerId:a,worktreeId:b.worktreeId})}catch(e){let b=e instanceof Error?e.message:String(e);try{(0,d.j2)(c,a,"failed",void 0,b)}catch{}j.error("timer:send-failed",{timerId:a,error:b})}finally{b.timers.delete(a),b.timerWorktrees.delete(a)}}function m(a,b,c){let d=k(),e=setTimeout(()=>{l(a)},c);d.timers.set(a,e),d.timerWorktrees.set(a,b)}function n(a){let b=k(),c=b.timers.get(a);c&&(clearTimeout(c),b.timers.delete(a),b.timerWorktrees.delete(a));let e=(0,f.getDbInstance)();(0,d.Ud)(e,a)}function o(a){let b=k(),c=(0,f.getDbInstance)();for(let[c,d]of b.timerWorktrees)if(d===a){let a=b.timers.get(c);a&&clearTimeout(a),b.timers.delete(c),b.timerWorktrees.delete(c)}(0,d.$$)(c,a)}},95220:(a,b,c)=>{c.r(b),c.d(b,{accumulateTuiContent:()=>g.IZ,cleanClaudeResponse:()=>f.NN,cleanCopilotResponse:()=>f.LH,cleanGeminiResponse:()=>f.IS,cleanOpenCodeResponse:()=>f.aW,clearPromptHashCache:()=>h.iX,clearTuiAccumulator:()=>g.q1,extractCopilotContentLines:()=>g.o0,extractTuiContentLines:()=>g.K0,findOverlapIndex:()=>g.vQ,getAccumulatedContent:()=>g.Uz,getActivePollers:()=>d.KQ,initTuiAccumulator:()=>g.tb,isDuplicatePrompt:()=>h.gv,isOpenCodeComplete:()=>e.bE,migrateResponsePollerWorktreeIds:()=>d.sR,normalizeCopilotLine:()=>g.IW,normalizePromptForDedup:()=>h.zm,renamePromptHashCacheKey:()=>h.i2,resolveExtractionStartIndex:()=>e.QM,startPolling:()=>d.g8,stopAllPolling:()=>d.fq,stopPolling:()=>d.Et,truncateMessage:()=>f.Sj});var d=c(45146),e=c(60),f=c(82450),g=c(13033),h=c(72457)}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=650,exports.ids=[650],exports.modules={16402:(a,b,c)=>{c.d(b,{dd:()=>p,r_:()=>l,vm:()=>n});var d=c(74258),e=c(94814),f=c(26895),g=c(20967),h=c(28861),i=c(96742);let j=["enforce","legacy"],k={claude:"enforce",codex:"enforce",copilot:"enforce",opencode:"enforce",gemini:"legacy",antigravity:"legacy","vibe-local":"legacy","command-code":"legacy","opencode-v2":"enforce"};function l(a,b,c,d=process.env){let e=m(a,b,c,function(a,b=process.env){let c=b.CM_AUTOYES_DIALOG_GATE,d=null,e=null;if("string"==typeof c&&""!==c.trim())for(let b of c.split(",")){let[c,f]=b.split("=");if(void 0===f)continue;let g=c.trim(),h=f.trim();j.includes(h)&&("*"===g?d=h:g===a&&(e=h))}return e??d??k[a]??"legacy"}(a,d));return{allowed:!e.gated||null!==e.dialog&&"numbered"===e.dialog.answerMode,dialog:e.dialog,mode:e.mode,gated:e.gated}}function m(a,b,c,f){let g=(0,e.bN)(a);if("multiple_choice"!==b||!g.hasDialogRules||"legacy"===f)return{present:!0,dialog:null,mode:f,gated:!1};let h=g.detectDialog((0,d.z)(c));return{present:null!==h,dialog:h,mode:f,gated:!0}}function n(a,b,c){return m(a,b,c,k[a]??"legacy")}let o="unsupported_dialog_layout";function p(a,b){let c=(0,g._A)((0,g.aJ)(b)),d="antigravity"===a?(0,h.g)(c):null,e="command-code"===a?(0,i.nK)(b):{kind:"none"};if("unsupported"===e.kind)return{promptCheck:{isPrompt:!1,cleanContent:c},isCommandCodeQuestion:!1,refusal:{reason:o,message:"A Command Code question is on screen, but its option list could not be read, so no key was sent. Answer it in the terminal, or retry once the screen has settled."},presence:{present:!1,dialog:null,mode:k[a]??"legacy",gated:!1}};let j="prompt"===e.kind,l=("prompt"===e.kind?e.prompt:null)??d??(0,f.gF)(c,(0,g.KO)(a)),m=n(a,l.promptData?.type,b);return{promptCheck:l,isCommandCodeQuestion:j,refusal:function(a,b){if(a.isPrompt&&b.present)return null;let c=a.promptData;return a.isPrompt&&b.gated&&c?.type==="multiple_choice"&&!0===c.isAskUserQuestion?{reason:o,message:"An AskUserQuestion picker is on screen, but its layout could not be verified as one of the agent's dialogs, so no key was sent. Answer it in the terminal, or retry once the screen has settled."}:{reason:"prompt_no_longer_active"}}(l,m),presence:m}}},26895:(a,b,c)=>{c.d(b,{gF:()=>n,xn:()=>g});var d=c(72626),e=c(69119),f=c(68652);function g(a,b="yes_no"){let c=a.toLowerCase().trim();if("multiple_choice"===b){if(/^\d+$/.test(c))return c;throw Error("Invalid answer for multiple choice prompt. Expected a number.")}if("yes"===c||"y"===c)return"y";if("no"===c||"n"===c)return"n";throw Error("Invalid answer for yes/no prompt. Expected 'yes', 'no', 'y', or 'n'.")}let h=(0,d.h)("prompt-detector"),i=null;function j(a){let b=a.split("\n"),c=(b.length>200?b.slice(-200):b).join("\n");return c.length>5e3&&(c=c.slice(-5e3)),c}let k=[{regex:/^(.+)\s+\(y\/n\)\s*$/m},{regex:/^(.+)\s+\[y\/N\]\s*$/m,defaultOption:"no"},{regex:/^(.+)\s+\[Y\/n\]\s*$/m,defaultOption:"yes"},{regex:/^(.+)\s+\(yes\/no\)\s*$/m}];function l(a,b,c,d){let{startLine:f,endLine:g}=function(a,b,c){let d=c.index??0,e=a=>a.split("\n").length-1,f=b+e(a.slice(0,d));return{startLine:f,endLine:f+e(c[0])}}(b,c,d);return(0,e.ZH)(a,(0,e.wf)(a,f),g+1)}function m(a,b,c,d,e){return{isPrompt:!0,promptData:{type:"yes_no",question:a,options:["yes","no"],status:"pending",...void 0!==e&&{defaultOption:e},instructionText:c,...void 0!==d&&{approvalTarget:d}},cleanContent:b,rawContent:c}}function n(a,b){let c=(0,f.N)(a),d=c===a&&b?.precomputedLines?b.precomputedLines:c.split("\n"),g=d.slice(-50).join("\n"),n=g===i;n||h.debug("detectPrompt:start",{outputLength:c.length}),i=g;let o=d.slice(-20).join("\n"),p=Math.max(0,d.length-20),q=(0,e.rS)(c,b,j);if(q.isPrompt)return n||h.info("detectPrompt:multipleChoice",{isPrompt:!0,question:q.promptData?.question,optionsCount:q.promptData?.options?.length}),q;let r=o.trim();for(let a of k){let b=o.match(a.regex);if(b){let c=b[1].trim();return m(c,c,r,l(d,o,p,b),a.defaultOption)}}let s=o.match(/^(.*?)Approve\?\s*$/m);if(s){let a=s[1].trim();return m(a?`${a} Approve?`:"Approve?",a||"Approve?",r,l(d,o,p,s))}return n||h.debug("detectPrompt:complete",{isPrompt:!1}),{isPrompt:!1,cleanContent:c.trim()}}},28861:(a,b,c)=>{c.d(b,{g:()=>l});var d=c(20967),e=c(69119),f=c(68652),g=c(682);let h=/^\s*●\s/,i=/^\s*─{3,}\s*$/,j=/[??]\s*$/;function k(a){let b=a.split("\n"),c=(b.length>200?b.slice(-200):b).join("\n");return c.length>5e3?c.slice(-5e3):c}function l(a){let b=(0,f.N)(a),c=b.split("\n"),l=function(a){let b=(0,d.dx)(a);if(null===b)return null;let c=a.slice(b.start,b.footer);if(c.some(a=>d.d0.test(a)))return null;let e=(0,g.c)(c,c.length,12);if(null===e)return null;let f=[...e.options];if(""!==e.footer){let a=f.length-1;f[a]=[f[a],...e.footer.split("\n")].join(" ").trim()}let h=b.start+e.firstRow,k=-1,l=-1,m=0;for(let c=h-1;c>=b.start&&m<3;c--){let b=a[c];if(""!==b.trim()){if(d.OM.test(b)||i.test(b))break;if(m++,l<0&&(l=c),j.test(b)){k=c;break}}}return k<0&&(k=l),{question:k<0?"Please select an option:":a[k].trim(),options:f,selectedIndex:e.selectedIndex,questionRow:k<0?h:k,firstOptionRow:h,footerRow:b.footer}}(c);return null===l?null:(0,e.xe)(l.question,l.options.map((a,b)=>({number:b+1,label:a,isDefault:b===l.selectedIndex})),{instructionText:function(a,b){let c=(0,d.dx)(a),e=c?.start??b.questionRow,f=Math.max(0,b.questionRow-40);for(let c=b.questionRow-1;c>=f;c--)if(h.test(a[c])){e=c+1;break}let g=a.slice(e,b.footerRow+1).filter(a=>!i.test(a)).map(a=>a.trimEnd()).join("\n").trim();return g.length>0?g:void 0}(c,l),approvalTarget:(0,e.ZH)(c,(0,e.wf)(c,l.questionRow),l.footerRow)},b,k)}},30008:(a,b,c)=>{c.d(b,{F1:()=>g,_G:()=>i,j0:()=>f,rB:()=>h,xF:()=>j});var d=c(48083),e=c(67882);let f=3e5,g="CM_STRUCTURED_SEND_GUARD";function h(a){return"notification"===a.source?e.Oh.PERMISSION_PROMPT:e.Oh.PERMISSION_REQUEST}function i({worktreeId:a,cliToolId:b,instanceId:c,scraper:e,ignoreStructured:i=!1,now:j=Date.now()}){var k,l,m;let n=(0,d.getStructuredPromptWaiting)(a,b,c,j);null!==n&&("waiting"===e.status?(0,d.corroborateStructuredPromptWaiting)(a,b,c,j):n.scraperCorroborated&&((0,d.clearStructuredPromptWaiting)(a,b,c),n=null));let o=e.hasActivePrompt||null!==n;if(e.hasActivePrompt)return{waiting:o,scraperWaiting:!0,structured:n,blocksSend:!0,blockedBy:"scraper",blockReason:e.reason,structuredSendBlockSuppressed:null};if(null===n)return{waiting:o,scraperWaiting:!1,structured:null,blocksSend:!1,blockedBy:null,blockReason:null,structuredSendBlockSuppressed:null};let p=(k=n,l=i,m=j,l?"caller_opt_out":!function(){let a=process.env[g]?.trim().toLowerCase();return"off"===a||"0"===a||"false"===a}()?m-k.at>=f?"expired":null:"disabled");return{waiting:o,scraperWaiting:!1,structured:n,blocksSend:null===p,blockedBy:null===p?"structured":null,blockReason:null===p?h(n):null,structuredSendBlockSuppressed:p}}function j({worktreeId:a,cliToolId:b,instanceId:c,scraper:e,now:f=Date.now()}){let g=(0,d.getStructuredPromptWaiting)(a,b,c,f);return{waiting:e.hasActivePrompt||null!==g,scraperWaiting:e.hasActivePrompt,structured:g}}},32236:(a,b,c)=>{c.d(b,{q:()=>u,AD:()=>v});var d=c(20967),e=c(26895),f=c(37717),g=c(65912),h=c(682);let i={"hooks-review":"permission","hooks-list":"picker","hooks-detail":"picker",update:"update",trust:"trust"};var j=c(74258),k=c(91010),l=c(1804),m=c(46423);let n=l.jP,o=/press\s+(?:number|enter)\s+to\s+confirm/i,p=/^\s*[❯›●]?\s*\d{1,2}[.)]\s/;function q(a){for(let b=a.length-1;b>=Math.max(0,a.length-10);b--){let c=a[b];if(d.aW.test(c)||d.UO.test(c))return b}return -1}function r(a){let b=q(a),c=b>=0?b-1:a.length-1;for(;c>=0&&""===a[c].trim();)c--;return c+1}function s(a){let b=q(a),c=b>=0?b:a.length,e=-1,f=-1;for(let b=0;b<c;b++){let c=a[b],g=c.trim();""!==g&&((o.test(g)||p.test(g))&&(e=b),(0,d.ut)("codex",c)&&(f=b))}return e>=0&&f>e}function t(a){return(0,g.kp)(a)?.kind==="option"}let u=(0,k.b)({tool:"codex",verifiedAgainst:n,beforePrompt(a){let{contentLines:b}=a;if((0,g.Gs)(a.raw,b,r(b)))return null;if(d.pn.test(a.lastLines))return{status:"waiting",confidence:"high",reason:f.g.CODEX_PAGER,hasActivePrompt:!1,evidence:"positive",promptDetection:(0,e.gF)((0,d._A)(a.clean),(0,d.KO)("codex"))};let c=(0,d.E6)(a.clean);if("hooks-list"===c||"hooks-detail"===c)return{status:"waiting",confidence:"high",reason:f.g.CODEX_HOOKS_REVIEW,hasActivePrompt:!1,evidence:"positive",promptDetection:(0,e.gF)((0,d._A)(a.clean),(0,d.KO)("codex"))};let h=q(b),i=h>=0?h-1:b.length-1;for(;i>=0&&""===b[i].trim();)i--;if(i>=0){let c=b.slice(Math.max(0,i-j.h+1),i+1).join("\n"),g=b[i].trim();if(d.Jn.test(c)||d.ir.test(g)||d.bh.test(g)){let g=(0,e.gF)((0,d._A)(a.clean),(0,d.KO)("codex"));return g.isPrompt&&((g.promptData?.question?.trim()??"").endsWith("?")||d.Dd.test(c))&&!s(b)?{status:"waiting",confidence:"high",reason:f.g.PROMPT_DETECTED,hasActivePrompt:!0,evidence:"positive",promptDetection:g}:{status:"waiting",confidence:"high",reason:f.g.CODEX_SELECTION_LIST,hasActivePrompt:!1,evidence:"positive",promptDetection:g}}}let k=(0,g.t)(a.raw,b,r(b));if(k&&!s(b)){k.footerRecognised||(0,g.AT)(k.footer);let b=(0,e.gF)((0,d._A)(a.clean),(0,d.KO)("codex"));return b.isPrompt?{status:"waiting",confidence:"high",reason:f.g.PROMPT_DETECTED,hasActivePrompt:!0,evidence:"positive",promptDetection:b}:{status:"waiting",confidence:"high",reason:f.g.CODEX_SELECTION_LIST,hasActivePrompt:!1,evidence:"positive",promptDetection:b}}return null},isStalePrompt:a=>s(a.contentLines)||(0,g.Gs)(a.raw,a.contentLines,r(a.contentLines)),detectDialog(a){let b=r(a.contentLines);return(0,g.Gs)(a.raw,a.contentLines,b)?null:function(a,b){let c=(0,d._A)(a.clean).split("\n"),e=(0,h.c)(c,b.contentEnd);if(b.lifecycleDialog)return{kind:i[b.lifecycleDialog],options:e?.options??[],answerMode:"numbered"};if(!e||!d.Jn.test(e.footer)&&!d.$I.test(e.footer)&&!d.ir.test(e.footer)&&!d.bh.test(e.footer)||b.stalePrompt)return null;let f=function(a,b){let c=[];for(let d=b-1;d>=0&&c.length<4;d--){let b=a[d].trim();""!==b&&c.push(b)}return c.join("\n")}(c,e.firstRow);return{kind:d.Dd.test(e.footer)||f.split("\n")[0]?.endsWith("?")?"permission":"picker",options:e.options,answerMode:"numbered"}}(a,{contentEnd:b,stalePrompt:s(a.contentLines),lifecycleDialog:(0,d.E6)(a.clean)})},afterThinking(a){let{contentLines:b}=a,c=q(b);if(c>=0){let e=c-1;for(;e>=0&&""===b[e].trim();)e--;if(e>=0){let c=b.slice(Math.max(0,e-m.$+1),e+1).join("\n");return(0,d.ut)("codex",c)?{status:"running",confidence:"high",reason:f.g.THINKING_INDICATOR,hasActivePrompt:!1,evidence:"positive"}:d.gm.test(b[e].trim())&&!t(a.raw)?{status:"ready",confidence:"high",reason:f.g.INPUT_PROMPT,hasActivePrompt:!1,evidence:"positive"}:{status:"running",confidence:"high",reason:f.g.THINKING_INDICATOR,hasActivePrompt:!1,evidence:"positive"}}}else{let c=b.length-1;for(;c>=0&&""===b[c].trim();)c--;if(!(c>=0&&d.gm.test(b[c].trim())&&!t(a.raw))&&(0,d.ut)("codex",a.lastLines))return{status:"running",confidence:"high",reason:f.g.THINKING_INDICATOR,hasActivePrompt:!1,evidence:"positive"}}return null}});function v(a){let b=(0,j.z)(a);if(!u.detectDialog(b))return!1;let c=r(b.contentLines),e=(0,h.c)((0,d._A)(b.clean).split("\n"),c);return null!==e&&(d.ir.test(e.footer)||d.bh.test(e.footer))}},45150:(a,b,c)=>{c.d(b,{Lj:()=>k,VC:()=>l});var d=c(20967),e=c(37717),f=c(91010),g=c(1804),h=c(28861);let i=g.yh,j={status:"waiting",confidence:"high",reason:e.g.ANTIGRAVITY_SELECTION_LIST,hasActivePrompt:!1,evidence:"positive"};function k(a,b){if(b.promptData?.type!=="multiple_choice")return!1;let c=(0,d._A)(a.contentLines.join("\n")).split("\n"),{promptPattern:e}=(0,d._X)("antigravity"),f=-1;for(let a=c.length-1;a>=0;a--)if(e.test(c[a])){f=a;break}return!(f<0)&&!c.slice(f+1).some(a=>d.Ly.test(a))}let l=(0,f.b)({tool:"antigravity",verifiedAgainst:i,isStalePrompt:k,beforePrompt(a){if(function(a){let b=a.slice(-3),c=b.findIndex(a=>d.HR.test(a));if(c<0)return!1;let{promptPattern:e}=(0,d._X)("antigravity");return!b.slice(c+1).some(a=>e.test(a))}(a.contentLines))return j;if(!d.kT.test(a.lastLines)||!function(a){let b=a.split("\n"),c=-1;for(let a=b.length-1;a>=0;a--)if(d.kT.test(b[a])){c=a;break}if(c<0)return!1;let{promptPattern:e}=(0,d._X)("antigravity");return!b.slice(c+1).some(a=>e.test(a))}(a.lastLines))return null;let b=(0,d._A)(a.clean);if((0,d.bH)(b)){let a=(0,h.g)(b);return null!==a?{status:"waiting",confidence:"high",reason:e.g.PROMPT_DETECTED,hasActivePrompt:!0,evidence:"positive",promptDetection:a}:{status:"running",confidence:"low",reason:e.g.UNKNOWN_FRAME,hasActivePrompt:!1,evidence:"none"}}return j},afterThinking(a){if((0,d.ut)("antigravity",a.lastLines))return{status:"running",confidence:"high",reason:e.g.THINKING_INDICATOR,hasActivePrompt:!1,evidence:"positive"};let{promptPattern:b}=(0,d._X)("antigravity");return b.test(a.lastLines)?{status:"ready",confidence:"high",reason:e.g.INPUT_PROMPT,hasActivePrompt:!1,evidence:"positive"}:null}})},50524:(a,b,c)=>{c.d(b,{LQ:()=>g,Ml:()=>f,sh:()=>e});let d=/^\p{M}$/u;function e(a,b){if(a.length<=b)return a.length;let c=0,e=0;for(let f of a){let a=+!d.test(f);if(1===a&&c>=b)break;c+=a,e+=f.length}return e}function f(a,b,c){return a.slice(e(a,b),e(a,c))}function g(a){let b=0;for(let c of a)d.test(c)||(b+=1);return b}},61244:(a,b,c)=>{c.d(b,{$N:()=>h,Tq:()=>g,jW:()=>m});let d=String.raw`←\s*(?:[☐☒☑][^←→☐☒☑✔]*)+✔\s*Submit\s*→`;RegExp(`^${d}\\s*`);let e=RegExp(`^\\s?${d}$`),f=/^\s?[☐☒☑] [^\s\d←→☐☒☑✔][^←→☐☒☑✔]{0,40}$/,g=/Enter\s+to\s+select\b.*\bnavigate\b/i;function h(a,b,c){let d=Math.max(0,b-c);for(let c=b-1;c>=d;c--)if(function(a){let b=a.trimEnd();return e.test(b)||f.test(b)}(a[c]??""))return c;return -1}let i=/┌(─+)┐\s*$/,j=/^\s*(?:[❯›>]\s*)?1\.\s+\S/,k=/^( *)└(─+)┘\s*$/,l=/^\s*(?:[❯›>]\s*)?\d{1,2}\.\s+\S|^\s{2,}\S/;function m(a,b,c){let d=new Set,e=new Map,f=Math.min(c,a.length);for(let c=Math.max(0,b);c<f;c++){let b=a[c];if(!b.includes("┌"))continue;let h=i.exec(b);if(!h||!j.test(b.slice(0,h.index)))continue;let m=-1,n=0;for(let b=c+1;b<Math.min(f,c+80);b++){let c=k.exec(a[b]);if(c&&c[2].length===h[1].length){m=b,n=c[1].length;break}}if(m<0)continue;let o=[m],p=[[c,h.index]];for(let b=c+1;b<m;b++){let c=a[b].indexOf("│"),d=c>0?a[b].slice(0,c):"";""!==d.trim()&&l.test(d)?p.push([b,c]):o.push(b)}let q=m+1;for(;q<f;q++){let b=a[q];if(""!==b.trim()){if(b.length-b.trimStart().length!==n)break;o.push(q)}}if(function(a,b){let c=0;for(let d=b;d<a.length&&c<4;d++){let b=a[d];if(""!==b.trim()){if(g.test(b))return!0;c++}}return!1}(a,q)){for(let a of o)d.add(a);for(let[a,b]of p)e.set(a,b);c=q-1}}return{rows:d,cuts:e}}},69119:(a,b,c)=>{c.d(b,{J0:()=>y,N0:()=>m,QI:()=>l,ZH:()=>G,ie:()=>E,rS:()=>I,wf:()=>F,xe:()=>H});var d=c(68652),e=c(20967),f=c(61244);let g=/^\s*[\u276F\u25CF\u203A][^\d]*(\d+)(?:\.(?!\d)|\s{2,})\s*(.+)$/,h=/^\s*[^\d]{0,3}(\d+)(?:\.(?!\d)|\s+)\s*(.+)$/,i=/^\s*\d{1,3}\s+tasks?\s+\(\d+\s+done\b/i,j=/^\s*[◼◻]\s/,k=/^(?:No changes this session|\+\d+ files? edited before this session \(show\))$/;function l(a,b,c){let d=function(a,b,c){let d=new Set;for(let e=Math.max(0,b);e<Math.min(c,a.length);e++){if(k.test(a[e].trim())){d.add(e);continue}if(i.test(a[e])){d.add(e);for(let b=e+1;b<Math.min(c,a.length);b++){let c=a[b];if(!j.test(c)&&!q.test(c))break;d.add(b)}}}return d}(a,b,c),e=(0,f.jW)(a,b,c);for(let a of e.rows)d.add(a);return{rows:d,cuts:e.cuts}}function m(a,b){return a.map((a,c)=>{if(b.rows.has(c))return"";let d=b.cuts.get(c);return void 0===d?a:a.slice(0,d).trimEnd()})}let n=/^\s{3,}\S/,o=/^[-─]+$/,p=/^\s*\[[^\]]*\d+\s+lines?\]/i,q=/^\s*[…]?\s*[+\-↑↓⏵⏷]?\s*\d+\s+(?:pending|more|completed)\b/i,r=/Esc\s+to\s+cancel\s*[·•]\s*Tab\s+to\s+amend/i,s=f.Tq,t=/press\s+(?:enter|number)\s+to\s+confirm/i,u=/press\s+number\s+to\s+confirm/i,v=/(?:select|choose|pick|which|what|how|where|enter|type|specify|confirm|approve|accept|reject|decide|preference|option)/i,w=[/type\s+here/i,/tell\s+(me|claude)/i,/enter\s+/i,/custom/i,/differently/i],x=[/^[^\S\n]*type\s+something\b/i];function y(a){return!0===a.requiresTextInput&&x.some(b=>b.test(a.label))}function z(a,b){if(0===b.length)return!0;let c=b[0].number;return a<c&&a>=c-2}function A(a){return{isPrompt:!1,cleanContent:a.trim()}}function B(a){return 0!==a.length&&!!(a.includes("?")||a.includes("?")||v.test(a))}function C(a,b){let c=b.endsWith("?")||b.endsWith("?");return!!(!c&&/^\s{2,}[^\d]/.test(a)&&!/^\s*\d+\./.test(a)||!c&&/^\s{4,}/.test(a)&&!/^\s*\d+\.\s/.test(a)||b.length<5&&!c||/^[\/~]/.test(b)||b.length>=2&&/^[a-zA-Z0-9_-]+$/.test(b))}let D=/^[⏺⎿●○•✔✓✖✗✘›»❯└├>]/,E=12;function F(a,b){let c=Math.max(0,b-E);for(let d=b-1;d>=c;d--)if(function(a){if(void 0===a)return!1;let b=a.trim();return""!==b&&(D.test(b)||o.test(b))}(a[d]))return d+1;return c}function G(a,b,c){let d=a.slice(b,c).map(a=>a.trimEnd()).join("\n").trim();return d.length>0?d:void 0}function H(a,b,c,d,e,f,g){let{instructionText:h,approvalTarget:i}=c??{};return{isPrompt:!0,promptData:{type:"multiple_choice",question:a.trim(),options:b.map(a=>{let b=w.some(b=>b.test(a.label));return{number:a.number,label:a.label,isDefault:a.isDefault,requiresTextInput:b}}),status:"pending",instructionText:h,...void 0!==i?{approvalTarget:i}:{},...f?{submitMode:f}:{},...g?{isAskUserQuestion:!0}:{}},cleanContent:a.trim(),rawContent:e(d.trim())}}function I(a,b,c){if(a=(0,d.N)(a),b?.hasNumberedDialogs===!1)return A(a);let i=b?.requireDefaultIndicator??!0,j=a.split("\n"),k=j.length;for(;k>0&&""===j[k-1].trim();)k--;let m=Math.max(0,k-50),v=!1;for(let a=k-1;a>=m;a--){let b=s.test(j[a]);if(r.test(j[a])||b){k=a,v=b;break}}let w=j.slice(m,k);for(let b of w)if(e.l8.test(b))return A(a);let x=!1,y=!1;for(let a of w){let b=a.trim();if(!x&&t.test(b)){x=!0,u.test(b)&&(y=!0);break}}if(i){let b=!1;for(let a of w){let c=a.trim();if(g.test(c)){b=!0;break}}if(!b&&!x)return A(a)}let D=[],I=-1,J=0,K=l(j,m,k),L=[];for(let b=k-1;b>=m;b--){if(K.rows.has(b)){J++;continue}let c=K.cuts.get(b),d=void 0===c?j[b]:j[b].slice(0,c).trimEnd(),e=d.trim();if(void 0!==c&&n.test(d)){L.unshift(e),J++;continue}if(p.test(e)||q.test(e)){J++;continue}let f=e.match(g);if(f){let a=parseInt(f[1],10);if(a<=20&&z(a,D)){let b=[f[2].trim(),...L].join(" ");L=[],D.unshift({number:a,label:b,isDefault:!0}),J=0;continue}}let i=e.match(h);if(i){let a=parseInt(i[1],10);if(a>20);else if(z(a,D)){let b=[i[2].trim(),...L].join(" ");L=[],D.unshift({number:a,label:b,isDefault:!1}),J=0;continue}}if(0===D.length&&(e.startsWith("❯")||e.startsWith("●")||e.startsWith("›")))return A(a);if(D.length>0&&e&&!o.test(e)){if(/^\s{4,}/.test(d)&&C(d,e)){if(++J>25){I=b;break}continue}if(B(e)){I=b;break}if(C(d,e)){if(++J>(/^\s{4,}/.test(d)?25:5)){I=b;break}continue}I=b;break}}if(!function(a){if(0===a.length||1!==a[0])return!1;let b=0;for(let c=1;c<a.length;c++){let d=a[c]-a[c-1];if(d<1||d>2||(2===d&&b++,b>1))return!1}return!0}(D.map(a=>a.number)))return A(a);let M=D.some(a=>a.isDefault),N=i&&x;if(D.length<2||i&&!M&&!N||!i&&!M&&(-1===I||!B(j[I]?.trim()??"")&&!function(a,b,c,d){let e=Math.max(d,b-3);for(let c=b-1;c>=e;c--){let b=a[c]?.trim()??"";if(!(!b||o.test(b))&&B(b))return!0}return!1}(j,I,0,m)))return A(a);let O=I<0?0:(0,f.$N)(j,I,E)+1,P=function(a,b,c=0){if(b<0)return"Please select an option:";let d=[];for(let e=Math.max(c,b-5);e<=b;e++){let b=a[e].trim();b&&!o.test(b)&&d.push(b)}return d.join(" ")}(j,I,O),Q=function(a,b,c){if(b<0)return;let d=Math.max(0,b-19),e=a.slice(d,c).map(a=>a.trimEnd()).join("\n").trim();return e.length>0?e:void 0}(j,I,k);return H(P,D,{instructionText:Q,approvalTarget:function(a,b,c,d=0){if(!(b<0))return G(a,Math.max(d,F(a,b)),c)}(j,I,k,O)},a,c,x?y?"answer_only":"answer_then_enter":void 0,v)}},76777:(a,b,c)=>{c.d(b,{D:()=>d});function d(a,b,c){let d=new TextEncoder;if(d.encode(a).length<=b)return a;let e=b-d.encode(c).length,f=0,g="";for(let b of a){let a=d.encode(b).length;if(f+a>e)break;f+=a,g+=b}return`${g}${c}`}},91010:(a,b,c)=>{c.d(b,{b:()=>k});var d=c(20967),e=c(26895),f=c(37717);let g=["enforce","observe","legacy"],h={claude:"observe",copilot:"enforce",opencode:"enforce",codex:"legacy",gemini:"legacy",antigravity:"legacy","vibe-local":"legacy","command-code":"legacy","opencode-v2":"legacy"},i=globalThis.__idleEvidenceObservations??(globalThis.__idleEvidenceObservations=new Map),j=new Set(["opencode","codex","claude","copilot"]);function k(a){return{...a,detect:(b,c)=>(function(a,b,c={}){let k=a.beforePrompt?.(b)??null;if(k)return k;let l=(0,d.KO)(a.tool),m=j.has(a.tool)?(0,d._A)(b.clean):(0,d._A)(b.lastLines),n=(0,e.gF)(m,l);if(n.isPrompt)if(a.isStalePrompt?.(b,n))n={...n,isPrompt:!1,promptData:void 0};else{if(!a.requireVouchedPrompt||c.isPromptVouched?.(n)!==!1)return{status:"waiting",confidence:"high",reason:f.g.PROMPT_DETECTED,hasActivePrompt:!0,evidence:"positive",promptDetection:n};n={...n,isPrompt:!1,promptData:void 0}}let o=a.afterPrompt?.(b,n)??null;if(o)return{...o,promptDetection:o.promptDetection??n};if((0,d.ut)(a.tool,b.thinkingLines))return{status:"running",confidence:"high",reason:f.g.THINKING_INDICATOR,hasActivePrompt:!1,evidence:"positive",promptDetection:n};let p=a.afterThinking?.(b,n)??null;if(p)return{...p,promptDetection:p.promptDetection??n};if(!a.skipGenericInputPrompt){let{promptPattern:c}=(0,d._X)(a.tool);if(c.test(b.lastLines))return{status:"ready",confidence:"high",reason:f.g.INPUT_PROMPT,hasActivePrompt:!1,evidence:function(a,b){if(void 0===a.readIdleEvidence)return"positive";let c=function(a,b=process.env){let c=b.CM_DETECTION_IDLE_EVIDENCE,d=null,e=null;if("string"==typeof c&&""!==c.trim())for(let b of c.split(",")){let[c,f]=b.split("=");if(void 0===f)continue;let h=c.trim(),i=f.trim();g.includes(i)&&("*"===h?d=i:h===a&&(e=i))}return e??d??h[a]??"legacy"}(a.tool);if("legacy"===c)return"positive";let d=a.readIdleEvidence(b);var e=a.tool;let f=i.get(e)??{mode:c,positive:0,none:0};return f.mode=c,"positive"===d?f.positive+=1:f.none+=1,i.set(e,f),"observe"===c?"positive":d}(a,b),promptDetection:n}}return c.lastOutputTimestamp&&Date.now()-c.lastOutputTimestamp.getTime()>5e3?{status:"running",confidence:"low",reason:f.g.NO_RECENT_OUTPUT,hasActivePrompt:!1,evidence:"none",promptDetection:n}:{status:"running",confidence:"low",reason:a.unreadableReason??f.g.DEFAULT,hasActivePrompt:!1,evidence:"none",promptDetection:n}})(a,b,c),detectDialog:a.detectDialog??(()=>null),hasDialogRules:void 0!==a.detectDialog}}},94814:(a,b,c)=>{c.d(b,{bN:()=>ai});var d=c(45150),e=c(20967),f=c(94154),g=c(69119),h=c(37717),i=c(682),j=c(61244);let k=/esc\s+to\s+cancel|enter\s+to\s+(?:select|confirm|set\s+as\s+default)/i,l=new Set(["❯",">"]),m=/do you want to\b|allow\b.*\?$/i,n=/ready to submit your answers\?|review your answers/i,o=/set\s+as\s+default/i;var p=c(74258),q=c(91010),r=c(1804);let s=/^\s*[✻✽✶✢✳⦿◉●·⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏]\s+\S+\s+for\s+(?:\d+m\s*)?\d+(?:\.\d+)?s(?:\s|$|\s*·)/,t=/^\s*╭─+\s*Claude Code v/,u=/^\s*[>❯]\s+\S/,v=/·\s*\/effort\s*$/;function w(a){let b=(0,f.p4)(a),c=b?b.openingSeparator:a.length,d=(0,g.QI)(a,0,c).rows,e=c-1;for(;e>=0&&(""===a[e].trim()||d.has(e)||v.test(a[e]));)e--;return e}let x=(0,q.b)({tool:"claude",verifiedAgainst:r.iE,afterPrompt:a=>e.XY.test(function(a){let b=(0,f.p4)(a.contentLines);if(!b)return a.lastLines;let c=a.contentLines.length-p.h;return a.contentLines.slice(Math.max(b.openingSeparator,c)).join("\n")}(a))?{status:"waiting",confidence:"high",reason:h.g.CLAUDE_SELECTION_LIST,hasActivePrompt:!1,evidence:"positive"}:null,afterThinking:a=>e.aU.test(a.lastLines)?{status:"running",confidence:"high",reason:h.g.THINKING_INDICATOR,hasActivePrompt:!1,evidence:"positive"}:null,readIdleEvidence:function(a){let b=w(a.contentLines);if(b>=0&&s.test(a.contentLines[b]))return"positive";let c=(0,f.p4)(a.contentLines),d=a.contentLines.slice(0,c?c.openingSeparator:void 0),e=d.some(a=>t.test(a)),g=d.some(a=>u.test(a));return e&&!g?"positive":"none"},detectDialog:a=>(function(a,b){var c;if(b.transcriptTail<0)return null;let d=(0,e._A)(a.clean).split("\n"),f=b.transcriptTail+1,h=(0,g.QI)(a.contentLines,0,f),p=(0,g.N0)(d,h),q=(0,i.c)(p,f);if(!q||null===q.selectedGlyph||!l.has(q.selectedGlyph))return null;let r=function(a,b,c,d){let e=[];for(let f=c;f<Math.min(d,a.length);f++){let c=a[f].trim();""===c||b.has(f)||e.push(c)}return e.join("\n")}(p,h.rows,q.lastRow+1,f);return""===r||k.test(r)?{kind:(c=function(a,b){let c=(0,j.$N)(a,b,g.ie),d=[];for(let e=b-1;e>c&&d.length<4;e--){let b=a[e].trim();""!==b&&d.push(b)}return d.join("\n")}(p,q.firstRow),n.test(c)?"ask_user":o.test(r)?"picker":m.test(c)?"permission":"dialog"),options:q.options,answerMode:"numbered"}:null})(a,{transcriptTail:w(a.contentLines)})});var y=c(32236),z=c(91478),A=c(96742);let B=/^\s*↑\/↓\s+navigate\s+·\s+enter\s+select\s+·.*\bto\s+bypass\s+all\s+permissions\b/,C=r.ji,D=(0,q.b)({tool:"command-code",verifiedAgainst:C,beforePrompt(a){if((0,z.tH)(a.lastLines)||(0,z.a9)(a.lastLines))return{status:"waiting",confidence:"high",reason:h.g.COMMAND_CODE_PLAN_REVIEW,hasActivePrompt:!1,evidence:"positive"};let b=(0,A.nK)(a.raw);return"prompt"===b.kind?{status:"waiting",confidence:"high",reason:h.g.PROMPT_DETECTED,hasActivePrompt:!0,evidence:"positive",promptDetection:b.prompt}:"unsupported"===b.kind?{status:"waiting",confidence:"high",reason:h.g.COMMAND_CODE_SELECTION_LIST,hasActivePrompt:!1,evidence:"positive"}:null},afterPrompt:a=>(0,z.yt)(a.lastLines)?{status:"waiting",confidence:"high",reason:h.g.COMMAND_CODE_DISMISSABLE_PANEL,hasActivePrompt:!1,evidence:"positive"}:(0,z.sl)(a.lastLines)?{status:"waiting",confidence:"high",reason:h.g.COMMAND_CODE_SELECTION_LIST,hasActivePrompt:!1,evidence:"positive"}:null,detectDialog:a=>(function(a){let b=a.contentLines,c=b[b.length-1];if(void 0===c||!B.test(c))return null;let d=(0,i.c)(b,b.length,1);return null===d||d.footer!==c.trim()||"❯"!==d.selectedGlyph?null:{kind:"permission",options:d.options,answerMode:"numbered",submitMode:"answer_only"}})(a),afterThinking(a){if((0,e.ut)("command-code",a.lastLines))return{status:"running",confidence:"high",reason:h.g.THINKING_INDICATOR,hasActivePrompt:!1,evidence:"positive"};let{promptPattern:b}=(0,e._X)("command-code");return b.test(a.lastLines)?{status:"ready",confidence:"high",reason:h.g.INPUT_PROMPT,hasActivePrompt:!1,evidence:"positive"}:null}});var E=c(26895);let F=/do you want to\b/i,G=r.MJ,H=(0,q.b)({tool:"copilot",verifiedAgainst:G,beforePrompt(a){if((0,e.gT)(a.contentLines)){let b=(0,e.KO)("copilot"),c=(0,E.gF)((0,e._A)(a.clean),b);return c.isPrompt&&(c.promptData?.options?.length??0)<=3?{status:"waiting",confidence:"high",reason:h.g.PROMPT_DETECTED,hasActivePrompt:!0,evidence:"positive",promptDetection:c}:{status:"waiting",confidence:"high",reason:h.g.COPILOT_SELECTION_LIST,hasActivePrompt:!1,evidence:"positive",promptDetection:c}}if("working"===(0,e.Wn)(a.contentLines)){let b=(0,e.KO)("copilot"),c=(0,E.gF)((0,e._A)(a.clean),b);return{status:"running",confidence:"high",reason:h.g.THINKING_INDICATOR,hasActivePrompt:!1,evidence:"positive",promptDetection:c}}return null},afterThinking:a=>"idle"===(0,e.Wn)(a.contentLines)?{status:"ready",confidence:"high",reason:h.g.INPUT_PROMPT,hasActivePrompt:!1,evidence:"positive"}:null,skipGenericInputPrompt:!0,readIdleEvidence:function(a){return"idle"===(0,e.Wn)(a.contentLines)?"positive":"none"},detectDialog:a=>(function(a,b){if(null!==b.statusBar)return null;let c=(0,e._A)(a.clean).split("\n"),d=(0,i.c)(c,b.contentEnd);if(d&&e.V.test(d.footer)){let a=function(a,b){let c=[];for(let d=b-1;d>=0&&c.length<4;d--){let b=a[d].trim();""!==b&&c.push(b)}return c.join("\n")}(c,d.firstRow);return{kind:e.rX.some(b=>a.includes(b))?"trust":F.test(a)?"permission":"picker",options:d.options,answerMode:"numbered"}}return b.selectionFrame?{kind:"picker",options:[],answerMode:"keys"}:null})(a,{statusBar:(0,e.Wn)(a.contentLines),selectionFrame:(0,e.gT)(a.contentLines),contentEnd:a.contentLines.length}),unreadableReason:h.g.UNKNOWN_FRAME});var I=c(76777),J=c(50524);let K=/\x1b\[[0-9;]*[a-zA-Z]|\x1b\][^\x07\x1b]*(?:\x07|\x1b\\)|\[[0-9;]*m/g,L=/^(?:\x1b\[|\[)([0-9;]*)m$/,M=new Set([38,48,58]);function N(a){let b;K.lastIndex=0;let c=[],d="",e=null,f=0,g=0,h=0;for(;null!==(b=K.exec(a));){let i=a.slice(h,b.index);d+=i,f+=(0,J.LQ)(i),h=b.index+b[0].length;let j=L.exec(b[0]);if(null===j)continue;let k=function(a,b){let c=(""===b?"0":b).split(";"),d=a;for(let a=0;a<c.length;a++){let b=Number(""===c[a]?"0":c[a]);if(Number.isFinite(b)){if(M.has(b)){let e="2"===c[a+1]?4:2*("5"===c[a+1]);e>0&&48===b&&(d=c.slice(a,a+1+e).join(";")),a+=e;continue}0===b||49===b?d=null:(b>=40&&b<=47||b>=100&&b<=107)&&(d=c[a])}}return d}(e,j[1]);k!==e&&(f>g&&c.push({bg:e,start:g,end:f}),e=k,g=f)}let i=a.slice(h);d+=i,(f+=(0,J.LQ)(i))>g&&c.push({bg:e,start:g,end:f});let j=new Set(c.map(a=>a.start));return c.length>0&&j.add(c[c.length-1].end),{text:d,segments:c,edges:j,width:f}}function O(a,b){for(let c of a.segments)if(c.start<=b&&b<c.end)return c.bg;return null}let P=/\S[^\S\n]{2,}esc[^\S\n]*$/,Q=/^[│┃╹]/;function R(a,b,c){if(!a.edges.has(b)||!a.edges.has(c))return!1;for(let d of a.segments)if(!(d.end<=b)&&!(d.start>=c)&&null===d.bg)return!1;return!(O(a,b-1)===O(a,b)||c<a.width&&O(a,c)===O(a,c-1)||Q.test((0,J.Ml)(a.text,b-1,b)))&&!Q.test((0,J.Ml)(a.text,b,c))}function S(a){let b=function(a){let b=a.split("\n").map(N),c=new Set,d=null;for(let a of b){if(!a.text.includes("esc"))continue;let e=[...a.edges].sort((a,b)=>a-b);for(let f of e)if(!(f<1))for(let g of e){if(g-f<16)continue;let e=`${f}:${g}`;if(c.has(e)||!R(a,f,g))continue;let h=(0,J.Ml)(a.text,f,g);if(!P.test(h))continue;c.add(e);let i=b.filter(a=>R(a,f,g));if(i.length<3)continue;let j=i.indexOf(a);j<0||j>=3||(null===d||i.length>d.rows)&&(d={id:"opencode_modal_overlay",headerText:(0,I.D)(h.trim(),200,"…[truncated]"),left:f,right:g,rows:i.length,headerRow:j,frameRowStart:b.indexOf(i[0]),frameRowEnd:b.indexOf(i[i.length-1])})}}return d}(a);return null===b?null:{id:b.id,headerText:b.headerText,left:b.left,right:b.right,rows:b.rows,headerRow:b.headerRow}}let T=/\s{2,}/;var U=c(46423);let V=r.BG;function W(a){let b=(0,e._A)(a.clean).split("\n"),c=Math.max(0,b.length-7);for(let a=b.length-1;a>=Math.max(0,b.length-10);a--)if(/ctrl\+[tp]/.test(b[a])){c=Math.max(0,a-2);break}let d=b.slice(0,c),f=d.length-1;for(;f>=0&&""===d[f].trim();)f--;return{candidates:d,lastIndex:f}}let X=(0,q.b)({tool:"opencode",verifiedAgainst:V,afterThinking(a){if(e.Ty.test(a.lastLines))return{status:"waiting",confidence:"high",reason:h.g.OPENCODE_PERMISSION_PROMPT,hasActivePrompt:!1,evidence:"positive"};if(e.kD.test(a.lastLines))return{status:"running",confidence:"high",reason:h.g.OPENCODE_PROCESSING_INDICATOR,hasActivePrompt:!1,evidence:"positive"};let{candidates:b,lastIndex:c}=W(a);if(c<0)return null;let d=b.slice(Math.max(0,c-U.$+1),c+1).join("\n");if((0,e.ut)("opencode",d))return{status:"running",confidence:"high",reason:h.g.THINKING_INDICATOR,hasActivePrompt:!1,evidence:"positive"};let f=b.slice(Math.max(0,c-p.h+1),c+1).join("\n");if(e.LO.test(b.join("\n")))return{status:"waiting",confidence:"high",reason:h.g.OPENCODE_SELECTION_LIST,hasActivePrompt:!1,evidence:"positive"};if(null!==S(a.raw))return{status:"waiting",confidence:"high",reason:h.g.OPENCODE_MODAL_OVERLAY,hasActivePrompt:!1,evidence:"positive"};if(e.$t.test(f))return{status:"ready",confidence:"high",reason:h.g.OPENCODE_RESPONSE_COMPLETE,hasActivePrompt:!1,evidence:"positive"};let g=a.lines.slice(Math.max(0,c-p.h+1),c+1).join("\n");return e.vU.test(g)?{status:"ready",confidence:"high",reason:h.g.INPUT_PROMPT,hasActivePrompt:!1,evidence:"positive"}:null},skipGenericInputPrompt:!0,readIdleEvidence:function(a){let{candidates:b,lastIndex:c}=W(a);if(c<0)return"none";let d=b.slice(Math.max(0,c-p.h+1),c+1).join("\n");if(e.$t.test(d))return"positive";let f=a.lines.slice(Math.max(0,c-p.h+1),c+1).join("\n");return e.vU.test(f)?"positive":"none"},detectDialog(a){var b;let{candidates:c}=W(a);return b={contentWindow:c.join("\n")},e.Ty.test(a.lastLines)?{kind:"permission",options:function(a){for(let b of a.lines){let a=e.Ty.exec(b);if(a)return a[0].replace(/^[^\S\n]*[│┃][^\S\n]*/,"").trim().split(T).map(a=>a.trim()).filter(a=>""!==a)}return[]}(a),answerMode:"keys"}:e.LO.test(b.contentWindow)||null!==S(a.raw)?{kind:"picker",options:[],answerMode:"keys"}:null},unreadableReason:h.g.UNKNOWN_FRAME}),Y=r.u3,Z=/^[^\S\n]*[│┃][^\S\n]*Allow once[^\S\n]{2,}Always allow[^\S\n]{2,}Reject\b/m,$=/^[^\S\n]*[│┃][^\S\n]*↑↓ select[^\S\n]+enter submit[^\S\n]+esc dismiss\b/m,_=/^[^\S\n│┃]*[A-Za-z][\w-]*(?: [\w-]+)* · [^\n]+? · \d+(?:\.\d+)?(?:ms|s|m(?: \d+s)?)(?: · [\d.]+ tok\/s)?[^\S\n]*$/,aa=["Allow once","Always allow","Reject"],ab=/^[^\S\n]*[│┃]/,ac=/^[^\S\n]*[│┃][^\S\n]*(\d+)\.[^\S\n]+(\S.*?)[^\S\n]*$/,ad=(0,q.b)({tool:"opencode-v2",verifiedAgainst:Y,requireVouchedPrompt:!0,beforePrompt:a=>Z.test(a.lastLines)?{status:"waiting",confidence:"high",reason:h.g.OPENCODE_PERMISSION_PROMPT,hasActivePrompt:!1,evidence:"positive"}:$.test(a.lastLines)?{status:"waiting",confidence:"high",reason:h.g.OPENCODE_SELECTION_LIST,hasActivePrompt:!1,evidence:"positive"}:null!==(0,e.dF)((0,e.aJ)(a.raw))?{status:"waiting",confidence:"high",reason:h.g.OPENCODE_MODAL_OVERLAY,hasActivePrompt:!1,evidence:"positive"}:null,afterThinking:a=>(0,e.ut)("opencode-v2",a.lastLines)?{status:"running",confidence:"high",reason:h.g.THINKING_INDICATOR,hasActivePrompt:!1,evidence:"positive"}:!function(a){let b=a.contentLines;for(let a=b.length-1;a>=0;a--){var c;if(c=b[a],!(/^[\s│┃╹▀]*$/.test(c)||/^[^\S\n]*[│┃][^\S\n]*[A-Za-z][\w-]* · [^·\n]+$/.test(c)||e.c7.test(c)||/^\s*\d+\.\d+\.\d+\s*$/.test(c)))return _.test(b[a])}return!1}(a)?e.wK.test((0,e.aJ)(a.raw))||e.c7.test(a.lastLines)?{status:"ready",confidence:"high",reason:h.g.INPUT_PROMPT,hasActivePrompt:!1,evidence:"positive"}:null:{status:"ready",confidence:"high",reason:h.g.OPENCODE_RESPONSE_COMPLETE,hasActivePrompt:!1,evidence:"positive"},detectDialog(a){if(Z.test(a.lastLines))return{kind:"permission",options:aa,answerMode:"keys"};let b=function(a){if(!$.test(a.lastLines))return null;let b=a.contentLines,c=-1;for(let a=b.length-1;a>=0;a--)if($.test(b[a])){c=a;break}if(c<0)return null;let d=[];for(let a=c-1;a>=0&&ab.test(b[a]);a--){let c=ac.exec(b[a]);c&&d.unshift(`${c[1]}. ${c[2]}`)}return d.length<2||!d.every((a,b)=>a.startsWith(`${b+1}. `))?null:{kind:"question",options:d,answerMode:"numbered",submitMode:"answer_only"}}(a);return null!==b?b:null!==(0,e.dF)((0,e.aJ)(a.raw))?{kind:"picker",options:[],answerMode:"keys"}:null}});function ae(a){return(0,q.b)({tool:a,verifiedAgainst:r.hB})}let af=ae("gemini"),ag=ae("vibe-local"),ah={claude:x,codex:y.q,copilot:H,opencode:X,antigravity:d.VC,"command-code":D,"opencode-v2":ad,gemini:af,"vibe-local":ag};function ai(a){return ah[a]??ae(a)}Object.values(ah)},95595:(a,b,c)=>{c.d(b,{WC:()=>k,f8:()=>j,gv:()=>d.g,ug:()=>h});var d=c(37717),e=c(74258),f=c(94814),g=c(16402);let h=new Set([d.g.OPENCODE_SELECTION_LIST,d.g.OPENCODE_MODAL_OVERLAY,d.g.OPENCODE_PERMISSION_PROMPT,d.g.CLAUDE_SELECTION_LIST,d.g.COMMAND_CODE_SELECTION_LIST,d.g.COMMAND_CODE_PLAN_REVIEW,d.g.COPILOT_SELECTION_LIST,d.g.CODEX_SELECTION_LIST,d.g.CODEX_PAGER,d.g.CODEX_HOOKS_REVIEW,d.g.ANTIGRAVITY_SELECTION_LIST]),i=new Set([d.g.THINKING_INDICATOR,d.g.OPENCODE_PROCESSING_INDICATOR]);function j(a){return"running"===a.status&&i.has(a.reason)}function k(a,b,c){let d=(0,e.z)(a),h=(0,f.bN)(b).detect(d,{lastOutputTimestamp:c,isPromptVouched:c=>(0,g.vm)(b,c.promptData?.type,a).present});return{status:h.status,confidence:h.confidence,reason:h.reason,hasActivePrompt:h.hasActivePrompt,evidence:h.evidence,promptDetection:h.promptDetection??{isPrompt:!1,cleanContent:d.clean}}}},96742:(a,b,c)=>{c.d(b,{nK:()=>p});var d=c(51297),e=c(69119),f=c(91478),g=c(682);let h=/❯[^\S\n]*(\d{1,2})[.)]/,i=/^[^\S\n]*type\s+something\b/i,j=/^\[[ xX\u2714]\]\s/,k=/^\[[xX\u2714]\]\s/,l=/^[^\S\n]*(?:\u276F[^\S\n]*)?(?:Submit|Next)[^\S\n]*$/,m=/^[^\S\n]*Enter\s+to\s+select\b.*\|.*\bEsc\s+to\s+cancel[^\S\n]*$/i;function n(a){let b=a.split("\n"),c=(b.length>200?b.slice(-200):b).join("\n");return c.length>5e3?c.slice(-5e3):c}function o(a){return{kind:"unsupported",reason:a}}function p(a){if(!a)return{kind:"none"};if(null!==(0,f.uG)(a))return o("review-page");let b=(0,f.Dk)(a);if(null===b)return(0,f.f_)(a)?o("numbering-unreadable"):{kind:"none"};if(!b.cursorOnOptionRow)return o("cursor-outside-options");let c=a.replace(/\r\n/g,"\n").split("\n").map(d.aJ).slice(b.firstLineIndex,b.lastLineIndex+1);if(c.length>60)return o("region-too-tall");let p=b.tabLineIndex-b.firstLineIndex,q=(0,g.c)(c,c.length,12);if(null===q)return o("option-block-unreadable");let r=[...q.options],s=""===q.footer?[]:q.footer.split("\n"),t=s.some(a=>l.test(a)),u=s.filter(a=>!l.test(a)&&!m.test(a));if(u.length>0){let a=r.length-1;r[a]=[r[a],...u].join(" ").trim()}if(r.length!==b.optionCount)return o("option-count-mismatch");let v=r.some(a=>j.test(a));if(v&&!t)return o("multi-select");let w=c[b.cursorLineIndex-b.firstLineIndex]??"",x=h.exec(w);if(q.selectedIndex<0||"❯"!==q.selectedGlyph||null===x||Number(x[1])!==q.selectedIndex+1)return o("default-unresolved");let y=c.slice(p+1,q.firstRow).map(a=>a.trim()).filter(a=>""!==a);if(0===y.length)return o("question-missing");let z=y.join(" "),A=(0,e.ZH)(c,p+1,c.length),B=r.map((a,b)=>({number:b+1,label:v?a.replace(j,""):a,isDefault:b===q.selectedIndex,...v?{checked:k.test(a)}:{}})),C=(0,e.xe)(z,B,{instructionText:A,approvalTarget:A},c.join("\n"),n,"answer_only",!0),D=C.promptData;return void 0===D||"multiple_choice"!==D.type?o("option-block-unreadable"):{kind:"prompt",region:b,prompt:{...C,promptData:{...D,...v?{multiSelect:!0}:{},options:D.options.map((a,b)=>{let c=B[b]?.checked,d=void 0===c?a:{...a,checked:c};return!0===a.requiresTextInput||i.test(a.label)?{...d,requiresTextInput:!0}:d})}}}}}};