commandmate 0.47.2 → 0.49.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (434) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +180 -180
  3. package/.next/app-path-routes-manifest.json +30 -30
  4. package/.next/build-manifest.json +2 -2
  5. package/.next/prerender-manifest.json +9 -9
  6. package/.next/required-server-files.json +1 -1
  7. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  8. package/.next/server/app/api/agents/update/route_client-reference-manifest.js +1 -1
  9. package/.next/server/app/api/agents/versions/route_client-reference-manifest.js +1 -1
  10. package/.next/server/app/api/app/release-notes/route_client-reference-manifest.js +1 -1
  11. package/.next/server/app/api/app/update/route.js +3 -3
  12. package/.next/server/app/api/app/update/route_client-reference-manifest.js +1 -1
  13. package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
  14. package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  15. package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  16. package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  17. package/.next/server/app/api/capabilities/route.js +1 -1
  18. package/.next/server/app/api/capabilities/route_client-reference-manifest.js +1 -1
  19. package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +1 -1
  20. package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
  21. package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
  22. package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
  23. package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
  24. package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -1
  25. package/.next/server/app/api/fs/recent-paths/route_client-reference-manifest.js +1 -1
  26. package/.next/server/app/api/hooks/agent-event/route.js +2 -2
  27. package/.next/server/app/api/hooks/agent-event/route.js.nft.json +1 -1
  28. package/.next/server/app/api/hooks/agent-event/route_client-reference-manifest.js +1 -1
  29. package/.next/server/app/api/hooks/claude-done/route.js +2 -2
  30. package/.next/server/app/api/hooks/claude-done/route.js.nft.json +1 -1
  31. package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
  32. package/.next/server/app/api/hooks/permission-request/route.js +1 -1
  33. package/.next/server/app/api/hooks/permission-request/route.js.nft.json +1 -1
  34. package/.next/server/app/api/hooks/permission-request/route_client-reference-manifest.js +1 -1
  35. package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -1
  36. package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
  37. package/.next/server/app/api/push/escalation/route.js +1 -1
  38. package/.next/server/app/api/push/escalation/route_client-reference-manifest.js +1 -1
  39. package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
  40. package/.next/server/app/api/push/vapid/route.js +1 -1
  41. package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
  42. package/.next/server/app/api/relays/[relayId]/cancel/route.js +1 -1
  43. package/.next/server/app/api/relays/[relayId]/cancel/route.js.nft.json +1 -1
  44. package/.next/server/app/api/relays/[relayId]/cancel/route_client-reference-manifest.js +1 -1
  45. package/.next/server/app/api/relays/route.js +1 -1
  46. package/.next/server/app/api/relays/route.js.nft.json +1 -1
  47. package/.next/server/app/api/relays/route_client-reference-manifest.js +1 -1
  48. package/.next/server/app/api/remote/pair/route_client-reference-manifest.js +1 -1
  49. package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
  50. package/.next/server/app/api/repositories/clone/[jobId]/route.js +1 -1
  51. package/.next/server/app/api/repositories/clone/[jobId]/route.js.nft.json +1 -1
  52. package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
  53. package/.next/server/app/api/repositories/clone/route.js +1 -1
  54. package/.next/server/app/api/repositories/clone/route.js.nft.json +1 -1
  55. package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
  56. package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
  57. package/.next/server/app/api/repositories/restore/route.js +1 -1
  58. package/.next/server/app/api/repositories/restore/route.js.nft.json +1 -1
  59. package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
  60. package/.next/server/app/api/repositories/route.js +1 -1
  61. package/.next/server/app/api/repositories/route.js.nft.json +1 -1
  62. package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
  63. package/.next/server/app/api/repositories/scan/route.js +1 -1
  64. package/.next/server/app/api/repositories/scan/route.js.nft.json +1 -1
  65. package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
  66. package/.next/server/app/api/repositories/sync/route.js +1 -1
  67. package/.next/server/app/api/repositories/sync/route.js.nft.json +1 -1
  68. package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
  69. package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
  70. package/.next/server/app/api/settings/default-agents/route.js +1 -1
  71. package/.next/server/app/api/settings/default-agents/route.js.nft.json +1 -1
  72. package/.next/server/app/api/settings/default-agents/route_client-reference-manifest.js +1 -1
  73. package/.next/server/app/api/settings/default-surface-mode/route_client-reference-manifest.js +1 -1
  74. package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
  75. package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
  76. package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
  77. package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
  78. package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
  79. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  80. package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
  81. package/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
  82. package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
  83. package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
  84. package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
  85. package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -1
  86. package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -1
  87. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
  88. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js.nft.json +1 -1
  89. package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
  90. package/.next/server/app/api/worktrees/[id]/capture/route.js +1 -1
  91. package/.next/server/app/api/worktrees/[id]/capture/route.js.nft.json +1 -1
  92. package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
  93. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js +1 -1
  94. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js.nft.json +1 -1
  95. package/.next/server/app/api/worktrees/[id]/clear-composer/route_client-reference-manifest.js +1 -1
  96. package/.next/server/app/api/worktrees/[id]/cli-reference/route_client-reference-manifest.js +1 -1
  97. package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
  98. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
  99. package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
  100. package/.next/server/app/api/worktrees/[id]/current-output/route.js.nft.json +1 -1
  101. package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
  102. package/.next/server/app/api/worktrees/[id]/direct-input/route.js +1 -1
  103. package/.next/server/app/api/worktrees/[id]/direct-input/route.js.nft.json +1 -1
  104. package/.next/server/app/api/worktrees/[id]/direct-input/route_client-reference-manifest.js +1 -1
  105. package/.next/server/app/api/worktrees/[id]/env/route_client-reference-manifest.js +1 -1
  106. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
  107. package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
  108. package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
  109. package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
  110. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
  111. package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
  112. package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
  113. package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
  114. package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
  115. package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
  116. package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
  117. package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
  118. package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
  119. package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
  120. package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
  121. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
  122. package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
  123. package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
  124. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
  125. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
  126. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
  127. package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
  128. package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
  129. package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
  130. package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
  131. package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
  132. package/.next/server/app/api/worktrees/[id]/instances/notes/route_client-reference-manifest.js +1 -1
  133. package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js +1 -1
  134. package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js.nft.json +1 -1
  135. package/.next/server/app/api/worktrees/[id]/instances/opencode/route_client-reference-manifest.js +1 -1
  136. package/.next/server/app/api/worktrees/[id]/interrupt/route.js +1 -1
  137. package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
  138. package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
  139. package/.next/server/app/api/worktrees/[id]/kill-session/route.js +1 -1
  140. package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -1
  141. package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
  142. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
  143. package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
  144. package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
  145. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
  146. package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
  147. package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
  148. package/.next/server/app/api/worktrees/[id]/opencode/diff/route_client-reference-manifest.js +1 -1
  149. package/.next/server/app/api/worktrees/[id]/opencode/session/route.js +1 -1
  150. package/.next/server/app/api/worktrees/[id]/opencode/session/route.js.nft.json +1 -1
  151. package/.next/server/app/api/worktrees/[id]/opencode/session/route_client-reference-manifest.js +1 -1
  152. package/.next/server/app/api/worktrees/[id]/opencode/share/route.js +1 -1
  153. package/.next/server/app/api/worktrees/[id]/opencode/share/route.js.nft.json +1 -1
  154. package/.next/server/app/api/worktrees/[id]/opencode/share/route_client-reference-manifest.js +1 -1
  155. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
  156. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -1
  157. package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
  158. package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route.js +1 -1
  159. package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route.js.nft.json +1 -1
  160. package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route_client-reference-manifest.js +1 -1
  161. package/.next/server/app/api/worktrees/[id]/resolve-target/route_client-reference-manifest.js +1 -1
  162. package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -1
  163. package/.next/server/app/api/worktrees/[id]/respond/route.js.nft.json +1 -1
  164. package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
  165. package/.next/server/app/api/worktrees/[id]/route.js +1 -1
  166. package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
  167. package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
  168. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
  169. package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
  170. package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
  171. package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
  172. package/.next/server/app/api/worktrees/[id]/send/route.js +1 -1
  173. package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
  174. package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
  175. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +3 -3
  176. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -1
  177. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
  178. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
  179. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
  180. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
  181. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
  182. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route_client-reference-manifest.js +1 -1
  183. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route_client-reference-manifest.js +1 -1
  184. package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
  185. package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
  186. package/.next/server/app/api/worktrees/[id]/special-keys/route.js +1 -1
  187. package/.next/server/app/api/worktrees/[id]/special-keys/route.js.nft.json +1 -1
  188. package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
  189. package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -1
  190. package/.next/server/app/api/worktrees/[id]/terminal/route.js +1 -103
  191. package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
  192. package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
  193. package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
  194. package/.next/server/app/api/worktrees/[id]/timers/route.js +1 -1
  195. package/.next/server/app/api/worktrees/[id]/timers/route.js.nft.json +1 -1
  196. package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
  197. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  198. package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
  199. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
  200. package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
  201. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
  202. package/.next/server/app/api/worktrees/[id]/verify/config/route_client-reference-manifest.js +1 -1
  203. package/.next/server/app/api/worktrees/[id]/verify/route.js +1 -1
  204. package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -1
  205. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route.js +1 -1
  206. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route_client-reference-manifest.js +1 -1
  207. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -1
  208. package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -1
  209. package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
  210. package/.next/server/app/api/worktrees/apply-default-agents/route_client-reference-manifest.js +1 -1
  211. package/.next/server/app/api/worktrees/route.js +1 -1
  212. package/.next/server/app/api/worktrees/route.js.nft.json +1 -1
  213. package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
  214. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  215. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  216. package/.next/server/app/more/page_client-reference-manifest.js +1 -1
  217. package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  218. package/.next/server/app/page_client-reference-manifest.js +1 -1
  219. package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
  220. package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
  221. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  222. package/.next/server/app/sessions/page.js +1 -1
  223. package/.next/server/app/sessions/page.js.nft.json +1 -1
  224. package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  225. package/.next/server/app/skills/[skillId]/page.js +1 -1
  226. package/.next/server/app/skills/[skillId]/page.js.nft.json +1 -1
  227. package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
  228. package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
  229. package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  230. package/.next/server/app/worktrees/[id]/files/[...path]/page.js +2 -2
  231. package/.next/server/app/worktrees/[id]/files/[...path]/page.js.nft.json +1 -1
  232. package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
  233. package/.next/server/app/worktrees/[id]/page.js +12 -12
  234. package/.next/server/app/worktrees/[id]/page.js.nft.json +1 -1
  235. package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
  236. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
  237. package/.next/server/app-paths-manifest.json +30 -30
  238. package/.next/server/chunks/1191.js +11 -4
  239. package/.next/server/chunks/1501.js +1 -1
  240. package/.next/server/chunks/1601.js +2 -2
  241. package/.next/server/chunks/1656.js +2 -2
  242. package/.next/server/chunks/1945.js +3 -3
  243. package/.next/server/chunks/1990.js +103 -0
  244. package/.next/server/chunks/2069.js +1 -0
  245. package/.next/server/chunks/2119.js +1 -1
  246. package/.next/server/chunks/2404.js +1 -1
  247. package/.next/server/chunks/2422.js +1 -1
  248. package/.next/server/chunks/2445.js +1 -1
  249. package/.next/server/chunks/2534.js +1 -1
  250. package/.next/server/chunks/255.js +1 -1
  251. package/.next/server/chunks/3241.js +1 -1
  252. package/.next/server/chunks/3505.js +2 -2
  253. package/.next/server/chunks/4243.js +1 -1
  254. package/.next/server/chunks/4248.js +1 -1
  255. package/.next/server/chunks/4280.js +1 -0
  256. package/.next/server/chunks/5209.js +1 -1
  257. package/.next/server/chunks/6119.js +1 -1
  258. package/.next/server/chunks/6130.js +1 -1
  259. package/.next/server/chunks/6401.js +1 -1
  260. package/.next/server/chunks/6486.js +9 -8
  261. package/.next/server/chunks/6781.js +1 -1
  262. package/.next/server/chunks/720.js +103 -0
  263. package/.next/server/chunks/7604.js +2 -0
  264. package/.next/server/chunks/7905.js +1 -1
  265. package/.next/server/chunks/8581.js +8 -8
  266. package/.next/server/chunks/8728.js +3 -3
  267. package/.next/server/chunks/8791.js +1 -1
  268. package/.next/server/chunks/8807.js +19 -18
  269. package/.next/server/chunks/8918.js +2 -104
  270. package/.next/server/chunks/936.js +1 -1
  271. package/.next/server/chunks/9390.js +1 -1
  272. package/.next/server/chunks/9540.js +1 -1
  273. package/.next/server/chunks/9627.js +5 -5
  274. package/.next/server/chunks/9731.js +2 -2
  275. package/.next/server/middleware-manifest.json +5 -5
  276. package/.next/server/pages/500.html +1 -1
  277. package/.next/server/server-reference-manifest.json +1 -1
  278. package/.next/static/chunks/1128-914c559913546bbc.js +1 -0
  279. package/.next/static/chunks/{2407-a6533805a86d05bd.js → 2407-ab92ae9837c39dce.js} +1 -1
  280. package/.next/static/chunks/{2863-6a07ec82fb52f4dd.js → 2863-7173dc305dffc4f6.js} +1 -1
  281. package/.next/static/chunks/6288-6fadbba6e84393b2.js +1 -0
  282. package/.next/static/chunks/7665-e9ef6e0a85b9fa49.js +1 -0
  283. package/.next/static/chunks/8407-35bbfc84793d7004.js +1 -0
  284. package/.next/static/chunks/9079-987939d231704218.js +1 -0
  285. package/.next/static/chunks/app/{layout-538d8d2746ad1588.js → layout-aa8e66164a4367af.js} +1 -1
  286. package/.next/static/chunks/app/sessions/page-cfd645305e25fd33.js +1 -0
  287. package/.next/static/chunks/app/skills/[skillId]/{page-52ba58712faf3378.js → page-cb6e74fd9a6a571d.js} +1 -1
  288. package/.next/static/chunks/app/worktrees/[id]/files/[...path]/page-704086656fb45699.js +1 -0
  289. package/.next/static/chunks/app/worktrees/[id]/page-a8d7886703ffc7b4.js +1 -0
  290. package/.next/static/css/{743f79ff19ab91e9.css → db8959555c3d9c96.css} +1 -1
  291. package/.next/trace +13 -13
  292. package/dist/cli/commands/auto-yes.d.ts +24 -0
  293. package/dist/cli/commands/auto-yes.d.ts.map +1 -1
  294. package/dist/cli/commands/auto-yes.js +76 -8
  295. package/dist/cli/commands/capture.d.ts.map +1 -1
  296. package/dist/cli/commands/capture.js +5 -0
  297. package/dist/cli/commands/instances.d.ts.map +1 -1
  298. package/dist/cli/commands/instances.js +10 -1
  299. package/dist/cli/commands/prompt.d.ts.map +1 -1
  300. package/dist/cli/commands/prompt.js +5 -3
  301. package/dist/cli/commands/send.d.ts.map +1 -1
  302. package/dist/cli/commands/send.js +19 -6
  303. package/dist/cli/commands/verify.d.ts.map +1 -1
  304. package/dist/cli/commands/verify.js +8 -1
  305. package/dist/cli/commands/wait.d.ts.map +1 -1
  306. package/dist/cli/commands/wait.js +101 -13
  307. package/dist/cli/config/duration-constants.d.ts +16 -13
  308. package/dist/cli/config/duration-constants.d.ts.map +1 -1
  309. package/dist/cli/config/duration-constants.js +21 -21
  310. package/dist/cli/docs/agent-operations.d.ts +2 -2
  311. package/dist/cli/docs/agent-operations.d.ts.map +1 -1
  312. package/dist/cli/docs/agent-operations.js +29 -1
  313. package/dist/cli/types/api-responses.d.ts +145 -3
  314. package/dist/cli/types/api-responses.d.ts.map +1 -1
  315. package/dist/cli/types/index.d.ts +4 -0
  316. package/dist/cli/types/index.d.ts.map +1 -1
  317. package/dist/cli/utils/resource-resolvers.d.ts +0 -18
  318. package/dist/cli/utils/resource-resolvers.d.ts.map +1 -1
  319. package/dist/cli/utils/resource-resolvers.js +1 -51
  320. package/dist/cli/utils/verify-runner.d.ts +24 -1
  321. package/dist/cli/utils/verify-runner.d.ts.map +1 -1
  322. package/dist/cli/utils/verify-runner.js +54 -1
  323. package/dist/config/auto-yes-duration.d.ts +56 -0
  324. package/dist/config/auto-yes-duration.d.ts.map +1 -0
  325. package/dist/config/auto-yes-duration.js +76 -0
  326. package/dist/lib/polling/auto-yes-suppression-reason.d.ts +54 -2
  327. package/dist/lib/polling/auto-yes-suppression-reason.d.ts.map +1 -1
  328. package/dist/lib/polling/auto-yes-suppression-reason.js +33 -2
  329. package/dist/lib/prompt-observation/types.d.ts +13 -0
  330. package/dist/lib/prompt-observation/types.d.ts.map +1 -1
  331. package/dist/server/locales/en/worktree.json +2 -1
  332. package/dist/server/locales/ja/worktree.json +2 -1
  333. package/dist/server/src/config/auto-yes-config.js +14 -19
  334. package/dist/server/src/config/auto-yes-duration.js +76 -0
  335. package/dist/server/src/lib/auto-yes-poller-answer-target.js +38 -0
  336. package/dist/server/src/lib/auto-yes-poller-keys.js +35 -0
  337. package/dist/server/src/lib/auto-yes-poller-session-presence.js +26 -0
  338. package/dist/server/src/lib/auto-yes-poller-tick.js +233 -0
  339. package/dist/server/src/lib/auto-yes-poller.js +337 -376
  340. package/dist/server/src/lib/auto-yes-state.js +59 -4
  341. package/dist/server/src/lib/cli-tools/submit-verified-sender.js +235 -19
  342. package/dist/server/src/lib/db/chat-db.js +5 -1
  343. package/dist/server/src/lib/db/verification-db.js +23 -2
  344. package/dist/server/src/lib/detection/composer-text.js +215 -11
  345. package/dist/server/src/lib/detection/option-recommendation.js +120 -0
  346. package/dist/server/src/lib/detection/prompt-detect-multiple-choice-approval-context.js +290 -0
  347. package/dist/server/src/lib/detection/prompt-detect-multiple-choice-chrome.js +193 -0
  348. package/dist/server/src/lib/detection/prompt-detect-multiple-choice.js +402 -539
  349. package/dist/server/src/lib/detection/prompt-detector.js +92 -21
  350. package/dist/server/src/lib/detection/prompt-screen-key.js +60 -0
  351. package/dist/server/src/lib/detection/tools/antigravity/dialog.js +158 -35
  352. package/dist/server/src/lib/detection/tools/claude/detect.js +111 -10
  353. package/dist/server/src/lib/detection/tools/command-code/dialog.js +67 -0
  354. package/dist/server/src/lib/detection/tools/dialog-block.js +16 -0
  355. package/dist/server/src/lib/detection/upstream-faults.js +19 -2
  356. package/dist/server/src/lib/detection/waiting-screen-reading.js +98 -0
  357. package/dist/server/src/lib/hooks/permission-decision-service.js +7 -0
  358. package/dist/server/src/lib/hooks/structured-decision-response.js +1 -1
  359. package/dist/server/src/lib/polling/auto-yes-confirm-page.js +2 -2
  360. package/dist/server/src/lib/polling/auto-yes-confirmation-ledger-types.js +3 -0
  361. package/dist/server/src/lib/polling/auto-yes-confirmation-ledger.js +34 -3
  362. package/dist/server/src/lib/polling/auto-yes-decision-state.js +195 -0
  363. package/dist/server/src/lib/polling/auto-yes-dialog-gate.js +139 -10
  364. package/dist/server/src/lib/polling/auto-yes-enter-fallback.js +14 -0
  365. package/dist/server/src/lib/polling/auto-yes-manual-answer.js +124 -0
  366. package/dist/server/src/lib/polling/auto-yes-option-effect.js +157 -0
  367. package/dist/server/src/lib/polling/auto-yes-policy.js +11 -5
  368. package/dist/server/src/lib/polling/auto-yes-poller-capture.js +15 -2
  369. package/dist/server/src/lib/polling/auto-yes-poller-generation.js +42 -1
  370. package/dist/server/src/lib/polling/auto-yes-poller-receipt-log.js +42 -5
  371. package/dist/server/src/lib/polling/auto-yes-poller-state.js +147 -49
  372. package/dist/server/src/lib/polling/auto-yes-poller-steps.js +172 -2
  373. package/dist/server/src/lib/polling/auto-yes-prompt-suppression.js +2 -2
  374. package/dist/server/src/lib/polling/auto-yes-question-choice.js +57 -0
  375. package/dist/server/src/lib/polling/auto-yes-resolver.js +96 -21
  376. package/dist/server/src/lib/polling/auto-yes-suppression-reason.js +33 -2
  377. package/dist/server/src/lib/polling/auto-yes-suppression-state.js +25 -1
  378. package/dist/server/src/lib/polling/prompt-screen-reading.js +232 -0
  379. package/dist/server/src/lib/polling/response-checker-dialog-gate.js +39 -0
  380. package/dist/server/src/lib/polling/response-checker.js +145 -58
  381. package/dist/server/src/lib/prompt-answer-sender.js +104 -10
  382. package/dist/server/src/lib/push/notification-dedup.js +15 -2
  383. package/dist/server/src/lib/push/prompt-card-state.js +140 -19
  384. package/dist/server/src/lib/push/prompt-push-gate.js +158 -12
  385. package/dist/server/src/lib/push/push-sender.js +23 -3
  386. package/dist/server/src/lib/push/resolution-push-notifier.js +14 -0
  387. package/dist/server/src/lib/push/waiting-push-notifier.js +139 -17
  388. package/dist/server/src/lib/realtime/terminal-broadcast.js +16 -0
  389. package/dist/server/src/lib/session/agent-event-state.js +25 -5
  390. package/dist/server/src/lib/session/agent-event-turn.js +140 -46
  391. package/dist/server/src/lib/session/cli-session.js +21 -2
  392. package/dist/server/src/lib/session/composer-clear.js +56 -4
  393. package/dist/server/src/lib/session/current-output-builder.js +66 -12
  394. package/dist/server/src/lib/session/send-attempt-state.js +24 -7
  395. package/dist/server/src/lib/session/waiting-episode-binding-observation.js +289 -0
  396. package/dist/server/src/lib/session/waiting-episode-binding-resolve.js +38 -0
  397. package/dist/server/src/lib/session/waiting-episode-binding.js +276 -0
  398. package/dist/server/src/lib/session/waiting-episode-state-ops.js +152 -0
  399. package/dist/server/src/lib/session/waiting-episode-state-store.js +202 -0
  400. package/dist/server/src/lib/session/waiting-episode-state-types.js +6 -0
  401. package/dist/server/src/lib/session/waiting-episode-state.js +68 -91
  402. package/dist/server/src/lib/session/waiting-episode-verdict.js +174 -0
  403. package/dist/server/src/lib/tmux/tmux-capture-cache.js +76 -11
  404. package/dist/server/src/lib/tmux/tmux.js +79 -9
  405. package/dist/server/src/lib/verification/gate-runner.js +172 -16
  406. package/dist/server/src/lib/verification/machine-lock.js +5 -0
  407. package/dist/server/src/lib/ws-server.js +18 -3
  408. package/dist/server/src/types/auto-yes-answer-mode.js +38 -0
  409. package/dist/server/src/types/auto-yes-decision.js +61 -0
  410. package/dist/server/src/types/auto-yes.js +6 -0
  411. package/dist/server/src/types/prompt-reading.js +32 -0
  412. package/dist/types/auto-yes-answer-mode.d.ts +35 -0
  413. package/dist/types/auto-yes-answer-mode.d.ts.map +1 -0
  414. package/dist/types/auto-yes-answer-mode.js +38 -0
  415. package/docs/en/user-guide/webapp-guide.md +47 -13
  416. package/package.json +1 -1
  417. package/public/sw.js +76 -4
  418. package/release-notes/0.48.0.json +57 -0
  419. package/release-notes/0.49.0.json +45 -0
  420. package/.next/server/chunks/1559.js +0 -2
  421. package/.next/server/chunks/2460.js +0 -1
  422. package/.next/server/chunks/5595.js +0 -1
  423. package/.next/server/chunks/610.js +0 -1
  424. package/.next/server/chunks/6722.js +0 -1
  425. package/.next/static/chunks/5371-a549a0d2c2044d41.js +0 -1
  426. package/.next/static/chunks/602-1c1488959215e140.js +0 -1
  427. package/.next/static/chunks/6288-09feba367cc2c65e.js +0 -1
  428. package/.next/static/chunks/8407-155f84e5ba05f1d5.js +0 -1
  429. package/.next/static/chunks/9079-24f9fa549ed298f1.js +0 -1
  430. package/.next/static/chunks/app/sessions/page-e02f1adb1d1c1ccc.js +0 -1
  431. package/.next/static/chunks/app/worktrees/[id]/files/[...path]/page-9cf1ecc59e36a004.js +0 -1
  432. package/.next/static/chunks/app/worktrees/[id]/page-46aced20b2b1c010.js +0 -1
  433. /package/.next/static/{etorRtpxbQqqOzdUeXdw2 → 3_JtAZaKMJEDFIIfkHv4n}/_buildManifest.js +0 -0
  434. /package/.next/static/{etorRtpxbQqqOzdUeXdw2 → 3_JtAZaKMJEDFIIfkHv4n}/_ssgManifest.js +0 -0
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ /**
3
+ * What a prompt screen was READ as, kept beside the prompt (Issue #3881).
4
+ *
5
+ * The detectors hand on `PromptData` — a question, options, and the deny
6
+ * surface — and drop what they knew about the screen while reading it: which
7
+ * kind of dialog it was, which rows were live, whether the approval target is
8
+ * the whole of what the panel asks about. Each later path then decided those
9
+ * again from the cut-down strings, and they disagreed: the chat transcript drew
10
+ * Claude's 16-column `Ready to submit your answers?` page — which the Auto-Yes
11
+ * poller leaves to a human as `question-confirm-page` — as a tool approval,
12
+ * because the stored options read `Submit` / `Cancel` and the review list was
13
+ * cut off the stored question.
14
+ *
15
+ * So the reading is decided once, where the frame is still in hand (the
16
+ * response poller's save, `polling/prompt-screen-reading`), and stored with
17
+ * the row. Readers take it as stated and never derive it again from the text;
18
+ * a row without one (written before #3881, or by a producer that has no frame)
19
+ * goes through each reader's own compatibility rules, explicitly.
20
+ *
21
+ * Types only: imported by `types/models` and by client code.
22
+ *
23
+ * @module types/prompt-reading
24
+ */
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.PROMPT_READING_VERSION = void 0;
27
+ /**
28
+ * The version of {@link PromptReading} a row carries. A reader that meets
29
+ * another version treats the row as having no reading (its compatibility
30
+ * rules), rather than guess at fields it does not know.
31
+ */
32
+ exports.PROMPT_READING_VERSION = 1;
@@ -0,0 +1,35 @@
1
+ /**
2
+ * How Auto-Yes answers a question the agent asks (Issue #3863).
3
+ *
4
+ * - `recommended` (おまかせ, the default) — a single-select question on the
5
+ * screen is answered too: the option whose title ends in a recommendation
6
+ * marker (`(Recommended)` / `(推奨)` / `(推奨)`), or the default (the
7
+ * cursor, else option 1) when none does. A question it cannot read that far
8
+ * (two markers, a marker on a free-text or multi-select row, a title it
9
+ * cannot tell from its description) is left to a human.
10
+ * - `careful` (慎重) — a question is never answered; it is left to a human
11
+ * (`question-left-to-human`).
12
+ *
13
+ * The two differ only there. Permissions are answered alike (the one "allow
14
+ * this call once" row, #3822), and what a contract's `autoYes` block withholds
15
+ * stays withheld under either (the contract is the ceiling; the answer mode is
16
+ * below it).
17
+ *
18
+ * Set each time Auto-Yes is turned on (worktree × instance). Turning it on
19
+ * from off — or after it ran out — starts at `recommended` unless a mode is
20
+ * given; turning it on again while it is on keeps the mode it has.
21
+ *
22
+ * Dependency-free so the CLI build (`tsconfig.cli.json`, no path aliases) can
23
+ * import it by a relative path.
24
+ *
25
+ * @module types/auto-yes-answer-mode
26
+ */
27
+ /** Auto-Yes's answer mode (Issue #3863). */
28
+ export type AutoYesAnswerMode = 'recommended' | 'careful';
29
+ /** Every {@link AutoYesAnswerMode}, the default first. */
30
+ export declare const AUTO_YES_ANSWER_MODES: readonly AutoYesAnswerMode[];
31
+ /** The mode of a grant that names none: one turned on without a mode, or kept from before the field. */
32
+ export declare const DEFAULT_AUTO_YES_ANSWER_MODE: AutoYesAnswerMode;
33
+ /** Type guard for a value read off a request body or the wire. */
34
+ export declare function isAutoYesAnswerMode(value: unknown): value is AutoYesAnswerMode;
35
+ //# sourceMappingURL=auto-yes-answer-mode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auto-yes-answer-mode.d.ts","sourceRoot":"","sources":["../../src/types/auto-yes-answer-mode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,4CAA4C;AAC5C,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG,SAAS,CAAC;AAE1D,0DAA0D;AAC1D,eAAO,MAAM,qBAAqB,EAAE,SAAS,iBAAiB,EAA+B,CAAC;AAE9F,wGAAwG;AACxG,eAAO,MAAM,4BAA4B,EAAE,iBAAiC,CAAC;AAE7E,kEAAkE;AAClE,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,iBAAiB,CAE9E"}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ /**
3
+ * How Auto-Yes answers a question the agent asks (Issue #3863).
4
+ *
5
+ * - `recommended` (おまかせ, the default) — a single-select question on the
6
+ * screen is answered too: the option whose title ends in a recommendation
7
+ * marker (`(Recommended)` / `(推奨)` / `(推奨)`), or the default (the
8
+ * cursor, else option 1) when none does. A question it cannot read that far
9
+ * (two markers, a marker on a free-text or multi-select row, a title it
10
+ * cannot tell from its description) is left to a human.
11
+ * - `careful` (慎重) — a question is never answered; it is left to a human
12
+ * (`question-left-to-human`).
13
+ *
14
+ * The two differ only there. Permissions are answered alike (the one "allow
15
+ * this call once" row, #3822), and what a contract's `autoYes` block withholds
16
+ * stays withheld under either (the contract is the ceiling; the answer mode is
17
+ * below it).
18
+ *
19
+ * Set each time Auto-Yes is turned on (worktree × instance). Turning it on
20
+ * from off — or after it ran out — starts at `recommended` unless a mode is
21
+ * given; turning it on again while it is on keeps the mode it has.
22
+ *
23
+ * Dependency-free so the CLI build (`tsconfig.cli.json`, no path aliases) can
24
+ * import it by a relative path.
25
+ *
26
+ * @module types/auto-yes-answer-mode
27
+ */
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.DEFAULT_AUTO_YES_ANSWER_MODE = exports.AUTO_YES_ANSWER_MODES = void 0;
30
+ exports.isAutoYesAnswerMode = isAutoYesAnswerMode;
31
+ /** Every {@link AutoYesAnswerMode}, the default first. */
32
+ exports.AUTO_YES_ANSWER_MODES = ['recommended', 'careful'];
33
+ /** The mode of a grant that names none: one turned on without a mode, or kept from before the field. */
34
+ exports.DEFAULT_AUTO_YES_ANSWER_MODE = 'recommended';
35
+ /** Type guard for a value read off a request body or the wire. */
36
+ function isAutoYesAnswerMode(value) {
37
+ return value === 'recommended' || value === 'careful';
38
+ }
@@ -196,23 +196,45 @@ Useful when you want to run continuous processes without interruption.
196
196
  1. Open the worktree detail view
197
197
  2. Turn on the **"Auto Yes"** toggle at the top of the screen
198
198
  3. A confirmation dialog appears
199
- 4. **Select the active duration** (1 hour / 3 hours / 8 hours)
200
- - Default is **1 hour**
199
+ 4. **Select the active duration** (1-24 hours, in whole hours)
200
+ - The common **1 hour / 3 hours / 8 hours** are buttons; for anything else press **Other** and pick from the 1-24 hour list
201
+ - Every time the dialog opens it starts at **1 hour** (the previous choice is not remembered, so 24 hours and the like are chosen explicitly each time)
202
+ - A longer duration also means more permission checks answered automatically (careful mode answers permission checks too)
201
203
  - Select the minimum time needed for your work
202
- 5. The description text changes dynamically based on your selection (e.g., "Will automatically turn OFF after 3 hours.")
203
- 6. Click **"Agree and Enable"**
204
+ 5. The description text changes dynamically based on your selection (e.g., "Will automatically turn OFF after 5 hours.")
205
+ 6. **Choose how questions are answered** ("Answer questions with the recommended option (Recommended)" / "Answer questions yourself (Careful)"; see "Answer Modes" below)
206
+ 7. Click **"Agree and Enable"**
207
+
208
+ ### Answer Modes (Issue #3863)
209
+
210
+ The dialog that turns Auto Yes on asks how a question from the agent (one that picks a single option) is answered. You choose each time you turn it on, and the dialog always opens with **Recommended** selected.
211
+
212
+ | Option | Questions | Permission confirmations |
213
+ |--------|-----------|--------------------------|
214
+ | **Answer questions with the recommended option (Recommended)** (default) | Answered with the option marked as recommended (a title ending in `(Recommended)` / `(推奨)`), or the default option (the cursor, else option 1) when none is. A question with two or more recommended options, or one it cannot read that far, is left for you to answer from the answer panel | Answered automatically ("allow this once" is chosen) |
215
+ | **Answer questions yourself (Careful)** | Not answered. Auto Yes stays ON and you answer from the answer panel | Answered automatically ("allow this once" is chosen) |
216
+
217
+ - While ON, the mode (**Recommended** / **Careful**; 「おまかせ」 / 「慎重」 in the Japanese UI) is shown beside the toggle — in each PC split, under the phone's composer, and after a change made from another tab, which the periodic re-read picks up
218
+ - Connected to an older server that does not report the mode, no mode is shown (it is not assumed to be Recommended)
219
+ - A tile on the Sessions screen offers the same dialog and, while ON, shows the mode beside its toggle (a reload or a change from another tab shows up on the next list read)
220
+ - In the new-task dialog, picking an Auto Yes duration brings up the same two options (Recommended by default); Auto Yes is turned on in the chosen mode before the message is sent
221
+ - A question's Submit / Cancel page and OpenCode's API questions are answered by you in either mode. Copilot's and codex's questions carry no question marker on screen, so under Careful a copilot / codex numbered list whose options do not read as permission wording (`Yes` / `Allow` and so on) is left to you as possibly a question (under Recommended it is answered as before)
222
+ - The CLI and the API can choose it too ([CLI Operations Guide](./cli-operations-guide.md#answer-modes-recommended-and-careful-issue-3863))
204
223
 
205
224
  ### Active Duration
206
225
 
207
- | Option | Milliseconds | Intended Use Case |
226
+ | Option (examples) | Milliseconds | Intended Use Case |
208
227
  |--------|-------------|-------------------|
209
- | **1 hour** (default) | 3,600,000 | Normal development work, short tasks |
210
- | **3 hours** | 10,800,000 | Medium-scale implementation work |
211
- | **8 hours** | 28,800,000 | Long batch-processing tasks (regular progress checks recommended) |
228
+ | **1 hour** (default, button) | 3,600,000 | Normal development work, short tasks |
229
+ | **3 hours** (button) | 10,800,000 | Medium-scale implementation work |
230
+ | **8 hours** (button) | 28,800,000 | Long batch-processing tasks (regular progress checks recommended) |
231
+ | **24 hours** (Other, the maximum) | 86,400,000 | Overnight work. It keeps answering while you are away, so narrowing it with a stop pattern or the contract's `autoYes` is recommended |
232
+
233
+ Any whole number of hours from 1 to 24 can be chosen (Issue #3913); the rows above are examples, and the millisecond value is hours × 3,600,000. The Auto Yes field of the New task dialog offers the same 1-24 hours ("Leave off" is unchanged).
212
234
 
213
235
  A countdown timer always shows the remaining time.
214
236
  - **Under 1 hour**: `MM:SS` format (e.g., `45:30`)
215
- - **1 hour or more**: `H:MM:SS` format (e.g., `2:15:30`)
237
+ - **1 hour or more**: `H:MM:SS` format (e.g., `2:15:30`; a 24-hour grant starts at `24:00:00`)
216
238
 
217
239
  ### API Specification (for developers)
218
240
 
@@ -223,12 +245,13 @@ POST /api/worktrees/:id/auto-yes
223
245
 
224
246
  {
225
247
  "enabled": true,
226
- "duration": 3600000 | 10800000 | 28800000 // Optional (default: 3600000)
248
+ "duration": 3600000, // Optional. 1-24 hours (a multiple of 3600000, 3600000-86400000; default: 3600000)
249
+ "answerMode": "recommended" | "careful" // Optional (Issue #3863; recommended for a new grant, the current mode for one that is on)
227
250
  }
228
251
  ```
229
252
 
230
253
  - **When duration is omitted**: Defaults to 1 hour (3,600,000 ms) for backward compatibility
231
- - **Invalid duration value**: Returns 400 error
254
+ - **Invalid duration value**: Out of range, fractional or non-number values return a 400 error (checked only when enabling; `enabled: false` ignores duration)
232
255
  - **Security**: 5-layer defense with worktreeId format validation -> JSON parse validation -> type validation -> whitelist validation
233
256
 
234
257
  ### Approval Routes Differ by Agent
@@ -262,10 +285,21 @@ looks and what it depends on.
262
285
 
263
286
  See [Agent event hooks](./agent-event-hooks.md) for the per-route technical detail.
264
287
 
288
+ ### Confirmations Auto Yes Does Not Answer Are Yours to Answer (Issue #3821)
289
+
290
+ Only the **server** answers automatically (the poller that reads the screen, hooks approval, and the API adjudication). **The browser sends no automatic answers.**
291
+
292
+ - With Auto Yes on, a confirmation the server is not answering **shows its answer panel**: one the execution contract withholds, a screen CommandMate cannot read, a question from the agent, or a screen of an agent whose poller is not running (the concurrent poller limit was reached, for one). The panel stays hidden only while the server is answering that confirmation
293
+ - A question OpenCode asks over its API always shows its panel, Auto Yes or not. Command Code's Review page is still answered from its manual-action card
294
+ - Answering from the panel by hand leaves Auto Yes on. Once you start answering by hand, an automatic answer the server was in the middle of sends no further key, and for about 10 seconds after that the server does not answer that agent's confirmations (so your keys and its keys do not mix)
295
+ - Auto Yes does not answer the screen of an agent with no poller running (hooks approval and the API adjudication run apart from the poller)
296
+ - The single Enter Auto Yes used to send to an unreadable choice screen, and the "Auto responded" notice next to the toggle, are gone
297
+ - A tab opened before this release that still sends an automatic answer is refused by the server with 409. A tab on a bundle from before Auto Yes marked its answers with their origin (before Issue #3820), however, cannot be told from a person answering; reload old tabs
298
+
265
299
  ### Important Notes
266
300
 
267
- - While Auto Yes is active, all confirmations are automatically answered with "Yes"
268
- - Important changes (file deletions, etc.) are also auto-approved, so use with caution
301
+ - While Auto Yes is active, the server answers the agent's requests for permission to run a tool (editing, creating or deleting files, running commands, …). Important changes (file deletions, etc.) are also auto-approved, so use with caution
302
+ - It does not answer these, and leaves them to you (their answer panel shows): a confirmation the execution contract (`autoYes`) withholds, a question from the agent under the Careful mode (or one whose recommended option cannot be told under Recommended) and its Submit / Cancel page, a screen CommandMate cannot read, a confirmation that needs checkboxes or typed text, a CLI's launch confirmations, any confirmation of an agent whose poller is not running, and the few seconds after you answer from the panel by hand (see "Confirmations Auto Yes Does Not Answer Are Yours to Answer" above)
269
303
  - You can disable it by turning off the toggle
270
304
  - Auto Yes automatically turns OFF after the selected duration
271
305
  - **When the server restarts (`/rebuild`, `commandmate stop`, etc.), an active Auto Yes is turned OFF and does not come back.** The affected instance shows **"Released by restart"** (「再起動で解除」 in the Japanese UI). The label stays until the original grant's deadline, and disappears when you turn the toggle on again or turn it off manually (it is not shown after SIGKILL or a crash). A manual OFF or an expiry does not show it
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commandmate",
3
- "version": "0.47.2",
3
+ "version": "0.49.0",
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",
package/public/sw.js CHANGED
@@ -181,30 +181,92 @@ self.addEventListener('message', function (event) {
181
181
  // This is also why there is no "close and show nothing" branch: a resolution
182
182
  // with nothing to close still shows its card. That is the contract, not an
183
183
  // oversight.
184
- function replaceStaleNotifications(title, options) {
184
+ //
185
+ // --- Issue #3798 (the resolution names its episode) -------------------------
186
+ // A resolution may carry `resolvedEpisodeId`: the waiting episode whose card it
187
+ // clears. It can arrive after the card of a NEWER wait in the same worktree
188
+ // (same tag) — the next prompt's push overtook it — and closing that card would
189
+ // hide a wait that is still open.
190
+ //
191
+ // A different id alone does NOT make a card newer. Delivery fails per device,
192
+ // and the server sends a resolution only once nothing in the worktree is still
193
+ // waiting, so a device that missed wait B's card can still be showing wait A's
194
+ // when B's resolution arrives — A is over too, and nothing would ever close it
195
+ // again (the server's mark is spent). Nor does the wait's start (`since`): a
196
+ // structured since is reused by the next wait and can be older than the
197
+ // observation, and two waits can start and end in one millisecond.
198
+ //
199
+ // Newer is proved by `order`: a per-worktree counter the server advances, in
200
+ // one database statement, for every episode-named card it sends and for every
201
+ // resolution it decides (`nextPromptOrder`). A wait open when the resolution
202
+ // was decided would have stopped it, so a card whose order is greater than the
203
+ // resolution's can only be a wait that opened later.
204
+ //
205
+ // So: a card of another episode with a greater order is closed and shown again
206
+ // with the same content, silently (`silent: true`, `renotify: false`), INSTEAD
207
+ // of the resolution; every other card — the resolved episode's, one naming no
208
+ // episode or carrying no order, one sent before the resolution — is closed and
209
+ // the resolution shown in its place, as before. Every branch still calls
210
+ // `showNotification` exactly once, so the `userVisibleOnly` contract above
211
+ // holds. A resolution without the id or the order (a server before #3798)
212
+ // clears the tag as it always has.
213
+ function isNewerThanResolution(card, resolvedEpisodeId, resolvedOrder) {
214
+ var data = card.data || {};
215
+ return (
216
+ typeof resolvedEpisodeId === 'string' &&
217
+ typeof resolvedOrder === 'number' &&
218
+ typeof data.episodeId === 'string' &&
219
+ data.episodeId !== resolvedEpisodeId &&
220
+ typeof data.order === 'number' &&
221
+ data.order > resolvedOrder
222
+ );
223
+ }
224
+
225
+ function replaceStaleNotifications(title, options, resolvedEpisodeId, resolvedOrder) {
185
226
  var registration = self.registration;
186
227
  var tag = options.tag;
187
228
  var closing;
188
229
 
189
230
  if (!tag || typeof registration.getNotifications !== 'function') {
190
- closing = Promise.resolve();
231
+ closing = Promise.resolve(null);
191
232
  } else {
192
233
  closing = registration
193
234
  // Correct either way: whether an engine hands back every card carrying the tag or only the newest one, the loop closes exactly what it was handed (iOS is still unmeasured on this point — Issue #2155).
194
235
  .getNotifications({ tag: tag })
195
236
  .then(function (stale) {
237
+ var newer = null;
196
238
  for (var i = 0; i < stale.length; i++) {
239
+ if (
240
+ isNewerThanResolution(stale[i], resolvedEpisodeId, resolvedOrder) &&
241
+ // Of several, the card the server sent last.
242
+ (newer === null || stale[i].data.order > newer.data.order)
243
+ ) {
244
+ newer = stale[i];
245
+ }
197
246
  stale[i].close();
198
247
  }
248
+ return newer;
199
249
  })
200
250
  .catch(function (_err) {
201
251
  // A registration that cannot enumerate its notifications still has to
202
252
  // show one. Showing the replacement below is what keeps the promise;
203
253
  // on this path the tag alone collapses the stale card on most engines.
254
+ return null;
204
255
  });
205
256
  }
206
257
 
207
- return closing.then(function () {
258
+ return closing.then(function (newer) {
259
+ if (newer) {
260
+ return registration.showNotification(newer.title, {
261
+ body: newer.body,
262
+ tag: tag,
263
+ renotify: false,
264
+ silent: true,
265
+ icon: newer.icon || options.icon,
266
+ badge: newer.badge || options.badge,
267
+ data: newer.data,
268
+ });
269
+ }
208
270
  return registration.showNotification(title, options);
209
271
  });
210
272
  }
@@ -243,6 +305,16 @@ self.addEventListener('push', function (event) {
243
305
  // different, louder instruction.
244
306
  if (resolved) options.silent = true;
245
307
 
308
+ // Issue #3798: a waiting card remembers its episode, so a later resolution
309
+ // can tell it from the card it is clearing. Absent from older payloads.
310
+ if (typeof payload.episodeId === 'string') options.data.episodeId = payload.episodeId;
311
+ // ...and its place in the worktree's order, so a later resolution can tell
312
+ // whether the card was sent after the resolution was decided.
313
+ if (typeof payload.order === 'number') options.data.order = payload.order;
314
+ var resolvedEpisodeId =
315
+ resolved && typeof payload.resolvedEpisodeId === 'string' ? payload.resolvedEpisodeId : null;
316
+ var resolvedOrder = resolved && typeof payload.order === 'number' ? payload.order : null;
317
+
246
318
  // --- Issue #2155 ---------------------------------------------------------
247
319
  // Every TAGGED push takes the close-then-show path, not just resolutions.
248
320
  // Safari/iOS does not collapse same-tag cards on a plain `showNotification`,
@@ -253,7 +325,7 @@ self.addEventListener('push', function (event) {
253
325
  // nothing to replace and goes straight to `showNotification`.
254
326
  event.waitUntil(
255
327
  options.tag
256
- ? replaceStaleNotifications(title, options)
328
+ ? replaceStaleNotifications(title, options, resolvedEpisodeId, resolvedOrder)
257
329
  : self.registration.showNotification(title, options)
258
330
  );
259
331
  });
@@ -0,0 +1,57 @@
1
+ {
2
+ "version": "0.48.0",
3
+ "date": "2026-10-25",
4
+ "highlight": {
5
+ "ja": "Auto-Yes の答え方を見直しました。質問への答え方を「おまかせ」と「慎重」から選べ、判断できない確認には答えず人に返します。",
6
+ "en": "Auto-Yes now lets you choose how it answers (Recommended or Careful), and leaves confirmations it cannot judge to you."
7
+ },
8
+ "added": [
9
+ {
10
+ "ja": "Auto-Yes に答え方のモードを追加しました。おまかせは質問に推奨の選択肢で答え、慎重は質問を人に任せます。",
11
+ "en": "Added answer modes to Auto-Yes: Recommended answers questions with the recommended option, Careful leaves questions to you."
12
+ }
13
+ ],
14
+ "improved": [],
15
+ "fixed": [
16
+ {
17
+ "ja": "Auto-Yes が許可の確認で、常に許可やモード変更ではなく「今回だけ許可」を選ぶようにしました。",
18
+ "en": "Auto-Yes now picks only the allow-this-time option on permission prompts, never permanent permission or mode changes."
19
+ },
20
+ {
21
+ "ja": "Auto-Yes が根拠の無い y/n や読めない選択画面に答えないようにし、ブラウザからの自動回答をやめました。",
22
+ "en": "Auto-Yes no longer answers unverified y/n prompts or unreadable choice screens, and the browser no longer answers automatically."
23
+ },
24
+ {
25
+ "ja": "送信に失敗した、または届いたか分からない回答を、Auto-Yes が同じ確認へ打ち直す問題を直しました。",
26
+ "en": "Fixed Auto-Yes re-sending an answer to the same prompt after a failed or uncertain send."
27
+ },
28
+ {
29
+ "ja": "確認画面の種類を一度で判定し、Auto-Yes とチャットの表示が食い違わないようにしました。",
30
+ "en": "Confirmation screens are now classified once, so Auto-Yes and the chat view no longer disagree about them."
31
+ },
32
+ {
33
+ "ja": "Antigravity の番号付きの画面に、Auto-Yes が既定で答えないようにしました。",
34
+ "en": "Auto-Yes no longer answers numbered Antigravity screens by default."
35
+ },
36
+ {
37
+ "ja": "Auto-Yes が答えた後に、答えていないという誤った通知が出る問題を直しました。",
38
+ "en": "Fixed false notifications saying Auto-Yes had not answered after it did."
39
+ },
40
+ {
41
+ "ja": "狭い・低いペインで Claude の確認画面を見落とす問題を直しました。",
42
+ "en": "Fixed Claude confirmation screens being missed in narrow or short panes."
43
+ },
44
+ {
45
+ "ja": "ターミナルの表示が、購読の切り替えで止まったり切断と表示されたりする問題を直しました。",
46
+ "en": "Fixed the terminal view stopping or showing as disconnected when switching subscriptions."
47
+ },
48
+ {
49
+ "ja": "サーバーと更新のログファイルの権限を本人だけが読める設定にそろえ、大きくなったら切り替えるようにしました。",
50
+ "en": "Server and update log files are now readable only by you and are rotated when they grow large."
51
+ },
52
+ {
53
+ "ja": "依存パッケージを更新し、高リスクの脆弱性を直しました。",
54
+ "en": "Updated a dependency to fix a high-severity vulnerability."
55
+ }
56
+ ]
57
+ }
@@ -0,0 +1,45 @@
1
+ {
2
+ "version": "0.49.0",
3
+ "date": "2026-10-27",
4
+ "highlight": {
5
+ "ja": "Auto-Yes の有効時間を 1〜24 時間から選べるようになり、チャットのコードブロックをワンクリックでコピーできるようになりました。",
6
+ "en": "You can now choose any Auto-Yes duration from 1 to 24 hours, and copy chat code blocks with one click."
7
+ },
8
+ "added": [
9
+ {
10
+ "ja": "Auto-Yes の有効時間を 1〜24 時間の 1 時間刻みで選べるようになりました。",
11
+ "en": "Auto-Yes can now stay on for any whole number of hours from 1 to 24."
12
+ },
13
+ {
14
+ "ja": "チャットのコードブロックにコピーボタンが付きました。",
15
+ "en": "Code blocks in chat now have a copy button."
16
+ }
17
+ ],
18
+ "improved": [],
19
+ "fixed": [
20
+ {
21
+ "ja": "codex の入力欄に貼り付けの印が残り、次の送信ができなくなる問題を直しました。",
22
+ "en": "Fixed a leftover paste marker in the Codex input box that blocked the next message."
23
+ },
24
+ {
25
+ "ja": "codex のモデルが混雑しているとき、それを検出せずに長く待ち続ける問題を直しました。",
26
+ "en": "Fixed long waits when the Codex model was at capacity; this is now detected as an upstream failure."
27
+ },
28
+ {
29
+ "ja": "codex の長い入力の送信が、届いたかどうかを誤って判定することがある問題を直しました。",
30
+ "en": "Fixed Codex sends with long input sometimes being misjudged as delivered or not."
31
+ },
32
+ {
33
+ "ja": "確認ダイアログの下に隠れた codex の古い入力が、未送信バーに出続ける問題を直しました。",
34
+ "en": "Fixed old Codex input hidden under a dialog staying in the unsent message bar."
35
+ },
36
+ {
37
+ "ja": "入力欄から確認に答えたとき、Auto-Yes に手動の回答として伝わらない問題を直しました。",
38
+ "en": "Fixed answers given from the input panel not being reported to Auto-Yes as manual answers."
39
+ },
40
+ {
41
+ "ja": "CLI の確認画面の一覧と回答で、一部の情報が落ちたり Auto-Yes に伝わらなかったりする問題を直しました。",
42
+ "en": "Fixed the CLI prompt listing dropping some details, and some CLI answers not being reported to Auto-Yes."
43
+ }
44
+ ]
45
+ }
@@ -1,2 +0,0 @@
1
- "use strict";exports.id=1559,exports.ids=[1559],exports.modules={24581:(a,b,c)=>{c.d(b,{Cb:()=>f,Mu:()=>g,RY:()=>j,Tt:()=>i,Ui:()=>q,Xq:()=>m,ZV:()=>t,h_:()=>h,jF:()=>r,kT:()=>p,nY:()=>l,qX:()=>s,wt:()=>o});var d=c(62887),e=c(27870);let f=new Set(["user_prompt_submit","pre_tool_use","post_tool_use"]),g=18e5,h={predicted:2e4,confirmed:18e5},i=3,j=16,k={turnId:null,openedAt:null,closedAt:null,closedBy:null};function l(a){return null===a?k:{turnId:a.turnId,openedAt:a.openedAt,closedAt:a.closedAt,closedBy:a.closedBy}}function m(a){if("string"!=typeof a||0===a.length||a.length>128)return null;for(let b=0;b<a.length;b++){let c=a.charCodeAt(b);if(c<32||127===c)return null}return a}function n(a,b){return"string"!=typeof a||""===a?null:a.slice(0,b)}function o(a){return n(a,e.lY)}function p(a){return n(a,d.h9)}function q(a){if(!Array.isArray(a))return null;let b=[];for(let c of a)if("string"==typeof c&&""!==c&&(b.push(c.slice(0,200)),b.length>=8))break;return b.length>0?b:null}function r(a,b){let c=null===a.confirmedAt?h.predicted:h.confirmed;return b-a.at<c}function s(a,b,c){return null!==b&&c-a.at>=1e3*b}function t(a,b){return null===a.sessionId||null===b||a.sessionId===b}},26547:(a,b,c)=>{c.d(b,{Yz:()=>L,jw:()=>J});var d=c(51297),e=c(42422);let f=["minimal","low","medium","high","xhigh","max","ultra","persistent"];function g(){return{model:null,effort:null}}let h=/^[A-Za-z0-9][A-Za-z0-9._:@/-]*$/,i=/^[A-Za-z0-9][A-Za-z0-9 .()[\]_:@/-]*$/;function j(a){return a.length>0&&a.length<=64&&h.test(a)}function k(a){return a.length>0&&a.length<=64&&i.test(a)}function l(a,b={}){let c=a.trim().toLowerCase();if(""===c)return null;if(f.includes(c))return c;if(!b.allowTruncated||c.length<2)return null;let d=f.filter(a=>a.length===c.length+1&&a.startsWith(c));return 1===d.length?d[0]:null}let m=/^\s*([^\s·]+)(?:\s+(minimal|low|medium|high|xhigh|max|ultra|persistent)\b)?/i,n=/^\s*[^\s·]+\s+[A-Za-z][A-Za-z_-]*(?=\s|$)/,o=/^\s*\S[^·]*·\s*~?\/\S*(?:\s*·[^\n]*|[^\S\n]{2,}\S[^\n]*)$/;function p(a){if(!e.aW.test(a)&&!o.test(a))return null;let b=a.indexOf("\xb7");if(b<0)return null;let c=a.slice(0,b),d=m.exec(c);if(!d)return null;let f=d[1];if(!j(f))return null;let g=d[2]?l(d[2]):null;return null!==g||/\d/.test(f)?null===g&&n.test(c)?{model:f,effort:null,effortUnreadable:!0}:{model:f,effort:g}:null}let q=/^\s*[\u2500-\u259F][\s\u2500-\u259F]*(\S[^\u2500-\u259F]*?)\s+with\s+(minimal|low|medium|high|xhigh)\s+effort\b/i,r=/^\s*[\u2500-\u259F][\s\u2500-\u259F]*(\S[^\u2500-\u259F·]*?)\s+·\s+Claude\s+[A-Za-z]+\b/,s=/^\s*\S\s+([A-Za-z]+)\s+·\s+\/effort\s*$/;function t(a){let b=q.exec(a);if(b){let a=b[1].trim();return k(a)?{model:a,effort:l(b[2])}:null}let c=r.exec(a);if(!c)return null;let d=c[1].trim();return/\swith\s/i.test(d)||!k(d)?null:{model:d,effort:null}}function u(a){let b=s.exec(a);if(!b)return null;let c=l(b[1]);return null===c?null:{model:null,effort:c}}let v=/^\s*⎿\s+(?:Set model to|Kept model as)\s+(?!(?:and saved as your default|for this session only)\b)([A-Za-z0-9][A-Za-z0-9 .()[\]_:@/-]*?)(?:\s+(?:and saved as your default for new sessions|for this session only))?(?:\s+with\s+([A-Za-z]+)\s+effort\b[^·]*)?\s*(?:·.*)?$/;function w(a){let b=v.exec(a);if(!b)return null;let c=b[1].trim();return k(c)?{model:c,effort:b[2]?l(b[2]):null}:null}let x=/^\s*(?:\?\s+for\s+shortcuts|esc\s+to\s+cancel)\b/i,y=/^\s*[\u2500-\u259F][\s\u2500-\u259F]*(\S[^\u2500-\u259F]*?)\s+\((minimal|low|medium|high|xhigh)\)\s*$/i;function z(a){if(!x.test(a))return null;let b=a.lastIndexOf("\xb7");if(b<0)return null;let c=l(a.slice(b+1),{allowTruncated:!0});if(!c)return null;let d=a.slice(0,b).trimEnd().split(/\s{2,}/),e=(d[d.length-1]??"").trim();return{model:k(e)?e:null,effort:c}}function A(a){let b=y.exec(a);if(!b)return null;let c=b[1].trim();return k(c)?{model:c,effort:l(b[2])}:null}let B=/^\s*[●◉◎○]\s+Model\s+changed\s+from\s+\S+(?:\s+\([^)]*\))?\s+to\s+(\S+)(?:\s+\((minimal|low|medium|high|xhigh)\))?\s+for\s+this\s+session\b/i;function C(a){let b=B.exec(a);if(!b)return null;let c=b[1];return j(c)?{model:c,effort:b[2]?l(b[2]):null}:null}let D=/^\s*▣\s+[A-Za-z][A-Za-z0-9-]*\s+·\s+([^·]+?)(?:\s+·\s+[\d.]+\s?m?s)?\s*$/,E=/^\s*[A-Za-z][A-Za-z0-9-]*\s+·\s+([^·]+?)\s+·\s+[\d.]+\s?m?s\s*$/,F=/^\s*[┃╹]/,G=/^\s*#\s+models:\s*([^·]+?)(?:\s+with\s+([A-Za-z]+)\s+effort)?\s*(?:·|$)/i;function H(a){let b=G.exec(a);if(!b)return null;let c=b[1].trim();return k(c)?{model:c,effort:b[2]?l(b[2]):null}:null}function I(a,b){let c=a.split("\n");for(let a=c.length-1;a>=0;a--){let e=b((0,d.aJ)(c[a]));if(e)return e}return null}function J(a,b){if(!b)return g();switch(a){case"codex":return I(b,p)??g();case"claude":return function(a){let b=I(a,t);if(!b||null!==b.effort)return b;let c=I(a,u);return c?{model:b.model,effort:c.effort}:b}(b)??I(b,w)??g();case"antigravity":return I(b,z)??I(b,A)??g();case"copilot":{let a=function(a){let b=a.split("\n");for(let a=b.length-1;a>=0;a--){let c=(0,d.aJ)(b[a]);if(""!==c.trim()){if(!e.Ub.test(c)&&!e.tJ.test(c))return null;let a=c.trim().split(/\s{2,}/);if(a.length<2)return null;let b=a[a.length-1].split("\xb7").map(a=>a.trim());if(b.length>2)return null;let d=b[0];if(!k(d))return null;if(1===b.length)return{model:d,effort:null};let f=l(b[1]);return null===f?null:{model:d,effort:f}}}return null}(b),c=I(b,C);if(!a)return c??g();if(null!==a.effort||null===c||null===c.effort)return a;return!function(a,b){let c=a=>a.toLowerCase().replace(/[^a-z0-9]/g,"");return c(a)===c(b)}(a.model,c.model)?a:{model:a.model,effort:c.effort}}case"opencode":case"opencode-v2":return function(a){let b=a.split("\n").map(a=>(0,d.aJ)(a));for(let a=b.length-1;a>=0;a--){let c=function(a){let b=D.exec(a);if(!b)return null;let c=b[1].trim();return k(c)?{model:c,effort:null}:null}(b[a])??function(a,b){let c=E.exec(a[b]);if(!c)return null;let d=c[1].trim();if(!k(d))return null;for(let c=b+1;c<a.length;c++)if(""!==a[c].trim())return F.test(a[c])?{model:d,effort:null}:null;return null}(b,a);if(c)return c}return null}(b)??g();case"command-code":return I(b,H)??g();default:return g()}}let K=/-(low|medium|high)$/i;function L(a,b,c,d){let e=(b||null)??c?.model??null,f=c?.effort??null,g="antigravity"===a?function(a){if(!a)return null;let b=K.exec(a);return b?b[1].toLowerCase():null}(e)??f:f;return{model:e,effort:(d||null)??g}}},27675:(a,b,c)=>{c.d(b,{GR:()=>g,MR:()=>m,NR:()=>o,Wl:()=>i,YN:()=>l,cr:()=>r,eZ:()=>q,gq:()=>j,li:()=>k,vR:()=>n});var d=c(85726),e=c(24455),f=c(36925);function g(a){let b="multiple_choice"===a.type?a.options.map(a=>`${a.number}.${a.label}`):a.options;return[(0,d.J)(a),...b].join("\0")}let h=(0,f.v)("__autoYesEnterFallbacks",()=>new Map);function i(a,b,c,d,f=Date.now()){let g=(0,e.v7)(a,b,c),j=r(g),{epoch:k=j,...l}=d;return k===j&&(h.set(g,{outcome:"sent",...l,sentAt:f,at:f,epoch:k}),!0)}function j(a,b,c,d,f=Date.now()){let g=(0,e.v7)(a,b,c),i=h.get(g);i&&i.screenKey===d&&h.set(g,{...i,outcome:"no-effect",at:f})}function k(a,b,c){let d=(0,e.v7)(a,b,c),f=h.get(d);return f&&f.epoch===r(d)?f:null}function l(a,b){return null===a?null:{outcome:a.outcome,promptType:a.promptType,refusalReason:a.refusalReason,sentAt:a.sentAt,at:a.at,currentPrompt:null!=b&&g(b)===a.screenKey}}function m(a){h.delete(a)}function n(a){for(let b of(0,e._9)([...h.keys()],a))h.delete(b)}function o(){h.clear()}let p=(0,f.v)("__autoYesEnterFallbackEpochs",()=>new Map);function q(a,b,c){let d=(0,e.v7)(a,b,c);h.delete(d),p.set(d,(p.get(d)??0)+1)}function r(a){return p.get(a)??0}},27870:(a,b,c)=>{c.d(b,{lY:()=>h,QB:()=>e,Yo:()=>m,fO:()=>n,LF:()=>j,PP:()=>i,T5:()=>g});var d=c(81254);let e=[{number:1,label:"Allow once",reply:"once"},{number:2,label:"Allow always",reply:"always"},{number:3,label:"Reject",reply:"reject"}],f={"opencode-v2":{once:"Allow once",always:"Always allow",reject:"Reject"}};function g(a){let b=f[a];return b?e.map(a=>b[a.reply]?{...a,label:b[a.reply]}:a):e}let h=500;function i(a){return"string"==typeof a&&""!==a}function j(a,b){return"permission-id"===a&&b.some(a=>i(a.id)&&!a.deliveryExpired)}let k={notification:"Notification(permission_prompt)","permission-request":"PermissionRequest (no decision)"};function l(a,b){let c=[`A dialog is open in ${a}: the agent reported it via ${k[b.source]}${b.toolName?` for ${b.toolName}`:""}, but the detection layer published no options for it.`];if(b.decisionOptions&&b.decisionOptions.length>0?c.push(`Answer it with \`commandmate respond ${a} <number>\`: `+b.decisionOptions.map(a=>`${a.number} = ${a.label} (${a.reply})`).join(", ")+". The reply goes to the agent's own API, so no keys are sent to the terminal "+`and the label works too (\`respond ${a} "Allow once"\`).`):c.push(`Answer it in the terminal, or send the option NUMBER with \`commandmate respond ${a} <number>\` — yes/no is not resolved on a numbered dialog (Issue #1681).`),b.message&&c.push(`Agent message: "${b.message}"`),b.askUserQuestion){let{question:d,labels:e,questionCount:f}=b.askUserQuestion,g=i(b.decisionId)&&1===f&&!(b.decisionOptions&&b.decisionOptions.length>0);c.push(`The agent asked${f>1?` ${f} questions, the first being`:""}: "${d}" — offering: ${e.join(" / ")}. `+(g?`Answer it with \`commandmate respond ${a} <number>\`: `+e.map((a,b)=>`${b+1} = ${a}`).join(", ")+". The number is this list's own position and the reply goes to the agent's own API, so no keys are sent to the terminal (the label works too).":"The picker renumbers and adds its own entries, so read the option NUMBER off the terminal rather than counting this list."))}return c.join(" ")}function m(a,b){return{type:d.LT,status:"pending",question:l(a,b),options:[],source:b.source,...b.message?{message:b.message}:{},...b.toolName?{toolName:b.toolName}:{},...b.askUserQuestion?{askUserQuestion:b.askUserQuestion}:{},...b.decisionOptions&&b.decisionOptions.length>0?{decisionOptions:b.decisionOptions}:{},decisionId:i(b.decisionId)?b.decisionId:null,...b.patterns&&b.patterns.length>0?{patterns:[...b.patterns]}:{}}}function n(a,b){return{type:d.LT,status:"unclassified",question:l(a,b),options:[],source:b.source,...b.message?{message:b.message}:{},...b.toolName?{toolName:b.toolName}:{},...b.askUserQuestion?{askUserQuestion:b.askUserQuestion}:{}}}},27939:(a,b,c)=>{c.d(b,{F_:()=>t,KA:()=>u,XO:()=>x,Y2:()=>n,jp:()=>m,lr:()=>v,pr:()=>w});var d=c(29021),e=c(21820),f=c(33873),g=c(8004),h=c(24455),i=c(72626),j=c(36925);let k=(0,i.h)("lib/session/opencode-session-store"),l=/^ses[A-Za-z0-9_-]{1,128}$/;function m(a){return"string"==typeof a&&l.test(a)}let n=200,o=(0,j.v)("__opencodeSessionMemories",()=>new Map);function p(a){return(0,h.v7)(a.worktreeId,a.cliToolId,a.instanceId)}function q(){let a=(0,f.join)((0,e.homedir)(),".commandmate","opencode-sessions.json");return(0,g.T)(process.env.CM_OPENCODE_SESSION_FILE,a,"CM_OPENCODE_SESSION_FILE")}function r(){try{let a=JSON.parse((0,d.readFileSync)(q(),"utf8"));if("object"!=typeof a||null===a||Array.isArray(a))return{};let b={};for(let[c,d]of Object.entries(a))!("object"!=typeof d||null===d||Array.isArray(d))&&m(d.sessionId)&&"string"==typeof d.worktreePath&&d.worktreePath.length>0&&(b[c]={sessionId:d.sessionId,title:"string"==typeof d.title?d.title:null,worktreePath:d.worktreePath,updatedAt:"number"==typeof d.updatedAt?d.updatedAt:0});return b}catch{return{}}}function s(a){let b=q();try{(0,d.mkdirSync)((0,f.dirname)(b),{recursive:!0}),(0,d.writeFileSync)(b,`${JSON.stringify(a,null,2)}
2
- `,{mode:384})}catch(a){k.warn("opencode-session-file-write-failed",{path:b,error:a instanceof Error?a.message:String(a)})}}function t(a,b,c=Date.now()){if(!m(b.sessionId))return k.warn("opencode-session-id-rejected",{worktreeId:a.worktreeId,instanceId:a.instanceId??a.cliToolId}),!1;if(0===b.worktreePath.length)return!1;let d={sessionId:b.sessionId,title:"string"==typeof b.title?b.title.slice(0,n):null,worktreePath:b.worktreePath,updatedAt:c},e=p(a);o.set(e,d);let f=r();return f[e]=d,s(f),!0}function u(a){let b=p(a),c=o.get(b);if(c)return c;let d=r()[b];return d?(o.set(b,d),d):null}function v(a){let b=p(a);o.delete(b);let c=r();b in c&&(delete c[b],s(c))}function w(a,b){let c=u(a);return c?c.worktreePath!==b?(k.info("opencode-session-recovery-path-mismatch",{worktreeId:a.worktreeId,instanceId:a.instanceId??a.cliToolId,recorded:c.worktreePath}),null):m(c.sessionId)?c.sessionId:null:null}function x(a,b){return m(b)?`${a} -s ${b}`:a}},33294:(a,b,c)=>{c.r(b),c.d(b,{AGENT_EVENT_DEDUP_WINDOW_MS:()=>l,AGENT_MODEL_EFFORT_SUFFIX_PATTERN:()=>H,LIFECYCLE_AGENT_EVENT_TYPES:()=>v,STRUCTURED_PROMPT_PROVISIONAL_MAX_AGE_MS:()=>aQ,STRUCTURED_STATE_MAX_AGE_MS:()=>aw,agentEventKeyClaimedAt:()=>r,beginAgentEventGeneration:()=>aN,classifyAgentEventDelivery:()=>w,clearAgentStopEvents:()=>aX,clearAskUserQuestion:()=>aF,clearStructuredPromptWaiting:()=>aW,closeAgentTurn:()=>aj,corroborateStructuredPromptWaiting:()=>aU,discardAgentEventState:()=>aP,getAgentEventDropCounts:()=>o,getAgentEventGenerationStartedAt:()=>aO,getAgentModelBaseline:()=>M,getAgentTurn:()=>ah,getAskUserQuestion:()=>aE,getAwaitingInstruction:()=>az,getLastAgentEvent:()=>aM,getLastCapturedModelInfo:()=>S,getLastKnownAgentEffort:()=>Y,getLastKnownAgentModel:()=>P,getLastReportedAgentEffort:()=>X,getLastStopEventAt:()=>aJ,getPendingDecisions:()=>ag,getPublishedAgentTurn:()=>ai,getRecentEventIdentityCount:()=>y,getRecentEventKeyCount:()=>u,getResolvedAgentModelInfo:()=>T,getStructuredPromptWaiting:()=>aT,getStructuredSessionState:()=>ax,isAwaitingInstruction:()=>aA,isDuplicateAgentEvent:()=>p,isPreToolUseOutsideTurn:()=>an,isSameAgentModelName:()=>K,joinOpenTurnFromDuplicate:()=>aq,markStructuredPromptRecorded:()=>aV,observeScraperCompletionEvidence:()=>ak,onAgentModelChange:()=>L,recordAgentEvent:()=>aL,recordAgentReportedEffort:()=>W,recordAgentReportedModel:()=>Q,recordAgentStopEvent:()=>aI,recordAskUserQuestion:()=>aD,recordCapturedModelInfo:()=>R,reportPermissionRequestPending:()=>aR,reportQuestionPending:()=>aS,shortSessionTag:()=>s});var d=c(24455),e=c(27675),f=c(55511),g=c(24581),h=c(36925);let i=(0,h.v)("__agentEventDrops",()=>new Map),j=(0,h.v)("__agentEventRecentKeys",()=>new Map),k=(0,h.v)("__agentEventRecentIdentities",()=>new Map),l=3e3;function m(){return{dedupDropped:{identity:0,timeWindow:0},decisionEvicted:0,idsDiscarded:0,dialogTimedOut:0,decisionOverflow:0}}function n(a){let b=i.get(a);return b||(b=m(),i.set(a,b),x(i,512)),b}function o(a,b,c){let e=i.get((0,d.v7)(a,b,c));return e?{...e,dedupDropped:{...e.dedupDropped}}:m()}function p(a,b,c,e,f,h=Date.now(),i=null){var k,m;if(!f)return!1;let n=(0,d.v7)(a,b,c),o=q(n,e,i,f),r=j.get(o);return void 0!==r&&h-r<l||(j.set(o,h),g.Cb.has(e)?t(n,["stop"],f):"stop"===e&&(k=n,m=f,t(k,g.Cb,m)),function(a){for(let[b,c]of j)a-c>=l&&j.delete(b);for(;j.size>512;){let a=j.keys().next();if(a.done)break;j.delete(a.value)}}(h),!1)}function q(a,b,c,d){return[a,b,c??"",d].join(" ")}function r(a,b,c,e,f,g=null){if(!f)return null;let h=(0,d.v7)(a,b,c);return j.get(q(h,e,g,f))??null}function s(a){return(0,f.createHash)("sha256").update(a).digest("hex").slice(0,8)}function t(a,b,c){let d=Array.from(b,b=>`${a} ${b} `),e=` ${c}`,f=(a,b)=>a.length>=b.length+e.length&&a.startsWith(b);for(let a of j.keys())a.endsWith(e)&&d.some(b=>f(a,b))&&j.delete(a)}function u(){return j.size}let v=["stop","session_end"];function w(a){let b=(0,d.v7)(a.worktreeId,a.cliToolId,a.instanceId);if(null!==a.identityKind){let e=null===a.identity?null:(0,g.Xq)(a.identity);if(null!==a.identity&&null===e&&(n(b).idsDiscarded+=1),null!==e)return!function(a,b){let c=(0,d.v7)(a.worktreeId,a.cliToolId,a.instanceId),e=k.get(c);e||(e=new Map,k.set(c,e),x(k,512));let f=[a.event,a.detail??"",b].join(" ");return!!e.has(f)||(e.set(f,a.at),x(e,512),!1)}(a,e)?{duplicate:!1}:(n(b).dedupDropped.identity+=1,{duplicate:!0,by:"identity"});if(v.includes(a.event)){var c;return"stop"===a.event&&a.sessionId&&(c=a.sessionId,t(b,g.Cb,c)),{duplicate:!1}}}return p(a.worktreeId,a.cliToolId,a.instanceId,a.event,a.sessionId,a.at,a.detail)?(n(b).dedupDropped.timeWindow+=1,{duplicate:!0,by:"time-window"}):{duplicate:!1}}function x(a,b){for(;a.size>b;){let b=a.keys().next();if(b.done)break;a.delete(b.value)}}function y(a,b,c){if(void 0===a||void 0===b){let a=0;for(let b of k.values())a+=b.size;return a}return k.get((0,d.v7)(a,b,c))?.size??0}var z=c(62887),A=c(26547);let B=(0,h.v)("__agentEventLastModel",()=>new Map),C=(0,h.v)("__agentEventLastModelAt",()=>new Map),D=(0,h.v)("__agentCapturedModelInfo",()=>new Map),E=(0,h.v)("__agentEventLastEffort",()=>new Map),F=(0,h.v)("__agentModelBaseline",()=>new Map),G=(0,h.v)("__agentModelChangeListeners",()=>new Set),H=/[-_ ](?:minimal|low|medium|high|xhigh)$/i,I=/\bcontext\b/gi;function J(a){return a.replace(H,"").replace(I,"").toLowerCase().replace(/[^a-z0-9]/g,"")}function K(a,b,c={}){let d=J(a),e=J(b);return d===e||!!c.crossSource&&0!==d.length&&0!==e.length&&(d.includes(e)||e.includes(d))}function L(a){return G.add(a),()=>{G.delete(a)}}function M(a,b,c){return F.get((0,d.v7)(a,b,c))??null}function N(a,b,c,e,f){let g=(0,d.v7)(a,b,c),{info:h,source:i}=V(g,b),j=h.model;if(null===j||null===i)return;let k=F.get(g),l={model:j,source:i};if(void 0===k){F.set(g,l),x(F,512);return}if(K(k.model,j,{crossSource:k.source!==i}))return void F.set(g,l);F.set(g,l);var m={worktreeId:a,cliToolId:b,instanceId:c??b,from:k.model,to:j,source:e,at:f};for(let a of G)try{a(m)}catch{}}function O(a,b){"string"==typeof b.model&&""!==b.model&&(B.set(a,b.model.slice(0,z.h9)),C.set(a,b.at))}function P(a,b,c){return B.get((0,d.v7)(a,b,c))??null}function Q(a,b,c,e,f=Date.now()){if("string"!=typeof e||""===e)return;let g=(0,d.v7)(a,b,c);B.set(g,e.slice(0,z.h9)),C.set(g,f),N(a,b,c,"hook",f)}function R(a,b,c,e,f=Date.now()){if(!e.model&&!e.effort)return;let g=(0,d.v7)(a,b,c),h=D.get(g),i=e.model?e.model.slice(0,z.h9):h?.model??null;D.set(g,{model:i,effort:e.effortUnreadable?null:e.effort??h?.effort??null,modelChangedAt:null===i?null:i===(h?.model??null)?h?.modelChangedAt??f:f}),e.model&&N(a,b,c,"frame",f)}function S(a,b,c){let e=D.get((0,d.v7)(a,b,c));return{model:e?.model??null,effort:e?.effort??null}}function T(a,b,c){return V((0,d.v7)(a,b,c),b).info}let U=new Set(["claude"]);function V(a,b){let c=B.get(a)??null,d=D.get(a),e={model:d?.model??null,effort:d?.effort??null},f=E.get(a)??null,g=d?.modelChangedAt??null,h=null!==c&&null!==e.model&&null!==g&&U.has(b)&&g>(C.get(a)??0)&&!K(c,e.model,{crossSource:!0}),i=(0,A.Yz)(b,h?null:c,e,f);return null===i.model?{info:i,source:null}:{info:i,source:null===c||h?"frame":"hook"}}function W(a,b,c,e){"string"==typeof e&&""!==e&&E.set((0,d.v7)(a,b,c),e.slice(0,z.h9))}function X(a,b,c){return E.get((0,d.v7)(a,b,c))??null}function Y(a,b,c){return T(a,b,c).effort}let Z=(0,h.v)("__agentEventGenerationStartedAt",()=>new Map),$=(0,h.v)("__agentEventTurns",()=>new Map),_=(0,h.v)("__agentEventReopenedTurns",()=>new Map),aa=(0,h.v)("__agentEventTurnSeq",()=>({value:0}));function ab(a){return Z.get(a)??null}function ac(a){let b=$.get(a);return b&&b.generationAt===ab(a)?b:null}function ad(a,b){let c=ac(a);return null===c?null:(null===c.closedAt&&b-c.displayEvent.at>=g.Mu&&(c.closedAt=c.displayEvent.at+g.Mu,c.closedBy="stale"),c)}function ae(a){return aa.value+=1,`turn-${a}-${aa.value}`}function af(a,b,c){let d=b.pendingDecisions.filter(a=>(0,g.jF)(a,c)),e=b.pendingDecisions.length-d.length;return e>0&&(n(a).dialogTimedOut+=e,b.pendingDecisions=d),d}function ag(a,b,c,e=Date.now()){let f=(0,d.v7)(a,b,c),g=ad(f,e);return null===g?[]:af(f,g,e)}function ah(a,b,c,e=Date.now()){return ad((0,d.v7)(a,b,c),e)}function ai(a,b,c,d=Date.now()){return(0,g.nY)(ah(a,b,c,d))}function aj(a,b,c,e,f=Date.now()){let g=ac((0,d.v7)(a,b,c));return null!==g&&null===g.closedAt&&(g.closedAt=f,g.closedBy=e,!0)}function ak(a,b,c,e,f=Date.now(),h=!0){let i=ac((0,d.v7)(a,b,c));return null!==i&&null===i.closedAt&&(e?(i.scraperCompletionPolls+=1,!(i.scraperCompletionPolls<g.Tt)&&!!h&&(i.closedAt=f,i.closedBy="scraper_evidence",!0)):(i.scraperCompletionPolls=0,!1))}function al(a,b){let c=$.get(a);c&&(0!==c.pendingDecisions.length&&(n(a).decisionEvicted+=c.pendingDecisions.length,c.pendingDecisions=[]),null===c.closedAt&&(c.closedAt=b,c.closedBy="generation",c.generationAt=b))}function am(a){let b=ac(a);return null!==b&&null!==b.closedAt&&"stop"===b.closedBy}function an(a,b,c,e){return e&&am((0,d.v7)(a,b,c))}function ao(a){return{event:a.event,at:a.at,detail:a.detail}}function ap(a,b,c,{continueOpen:d}){let e=ac(a),f=null!==e&&null===e.closedAt&&null!==e.openedAt&&(0,g.ZV)(e,b.sessionId);if(d&&f){e.displayEvent=ao(b),e.sessionId??=b.sessionId,e.scraperCompletionPolls=0;return}let h=null!==e&&null===e.openedAt&&null===e.closedAt?e.pendingDecisions:[],i={turnId:ae(b.at),sessionId:b.sessionId,openedAt:b.at,closedAt:null,closedBy:null,generationAt:c,displayEvent:ao(b),pendingDecisions:h,scraperCompletionPolls:0};$.set(a,i),au(),"user_prompt_submit"===b.event&&f&&(_.set(a,{turnId:i.turnId,replaced:e}),x(_,512))}function aq(a,b,c,e){if("user_prompt_submit"!==e.event||!0!==e.joinsOpenTurn)return!1;let f=(0,d.v7)(a,b,c),h=_.get(f),i=ac(f);if(!h||null===i||i.turnId!==h.turnId||null!==i.closedAt||!(0,g.ZV)(i,e.sessionId))return!1;let{replaced:j}=h;return j.generationAt===i.generationAt&&($.set(f,{...j,closedAt:null,closedBy:null,displayEvent:i.displayEvent,pendingDecisions:i.pendingDecisions,scraperCompletionPolls:0}),_.delete(f),!0)}function ar(a,b,c){let d=ac(a);null===d?(d={turnId:ae(c.at),sessionId:null,openedAt:null,closedAt:null,closedBy:null,generationAt:b,displayEvent:c.bootstrapDisplay,pendingDecisions:[],scraperCompletionPolls:0},$.set(a,d),au()):null!==d.closedAt&&(d={turnId:ae(c.at),sessionId:null,openedAt:null,closedAt:null,closedBy:null,generationAt:b,displayEvent:c.bootstrapDisplay,pendingDecisions:[],scraperCompletionPolls:0},$.set(a,d),au());let e=null===c.decisionId?null:(0,g.Xq)(c.decisionId);null!==c.decisionId&&null===e&&(n(a).idsDiscarded+=1);let f="notification"===c.source,h=null!==e?d.pendingDecisions.find(a=>a.decisionId===e)??d.pendingDecisions.find(a=>null===a.decisionId&&"permission-request"===a.source):d.pendingDecisions.find(a=>null===a.decisionId);if(h){h.message=(0,g.wt)(c.message)??h.message,h.toolName=(0,g.kT)(c.toolName)??h.toolName,h.patterns=(0,g.Ui)(c.patterns)??h.patterns,h.decisionId??=e,f&&(h.source="notification",h.confirmedAt??=c.at);return}if(d.pendingDecisions.length>=g.RY){n(a).decisionOverflow+=1;return}d.pendingDecisions.push({decisionId:e,at:c.at,source:c.source,message:(0,g.wt)(c.message),toolName:(0,g.kT)(c.toolName),patterns:(0,g.Ui)(c.patterns),confirmedAt:f?c.at:null,scraperCorroborated:!1,recorded:!1})}function as(a){let b=ac(a);null!==b&&(b.pendingDecisions=[])}function at(a,b){let c=ac(a);if(null===c||0===c.pendingDecisions.length)return;let d=null===b.decisionId||void 0===b.decisionId?null:(0,g.Xq)(b.decisionId);if(null===d){c.pendingDecisions=[];return}c.pendingDecisions=c.pendingDecisions.filter(a=>null!==a.decisionId&&a.decisionId!==d)}function au(){x($,512)}var av=c(67882);let aw=g.Mu;function ax(a,b,c,e=Date.now()){let f=(0,d.v7)(a,b,c),g=ad(f,e);if(null===g)return null;let h=g.displayEvent;if(e-h.at>=aw)return null;let i={event:h.event,at:h.at,detail:h.detail},j=af(f,g,e);if(j.length>0)return{status:"waiting",reason:"notification"===j[0].source?av.Oh.PERMISSION_PROMPT:av.Oh.PERMISSION_REQUEST,...i};if(null!==g.closedAt)return"stop"===g.closedBy?{status:"ready",reason:av.Oh.STOP,...i}:null;let k=(0,av.DA)(h.event,h.detail);return null===k||"waiting"===k.status?null===g.openedAt?null:{status:"running",reason:av.Oh.PROMPT_SUBMIT,...i}:{...k,...i}}let ay=(0,h.v)("__agentEventAwaitingInstruction",()=>new Map);function az(a,b,c){let e=(0,d.v7)(a,b,c),f=ay.get(e);if(!f)return null;let g=Z.get(e);return void 0!==g&&f.at<g?null:f}function aA(a,b,c){return null!==az(a,b,c)}var aB=c(49154);let aC=(0,h.v)("__agentEventAskUserQuestion",()=>new Map);function aD(a,b,c,e,f=Date.now()){aC.set((0,d.v7)(a,b,c),{at:f,spec:e})}function aE(a,b,c,e=Date.now()){let f=(0,d.v7)(a,b,c),g=aC.get(f);if(!g)return null;let h=Z.get(f);return void 0!==h&&g.at<h||e-g.at>=aw?null:g}function aF(a,b,c){aC.delete((0,d.v7)(a,b,c))}let aG=(0,h.v)("__agentEventLastStopAt",()=>new Map),aH=(0,h.v)("__agentEventLast",()=>new Map);function aI(a,b,c,e=Date.now()){aG.set((0,d.v7)(a,b,c),e)}function aJ(a,b,c){return aG.get((0,d.v7)(a,b,c))??null}let aK=["running","waiting"];function aL(a,b,c,f,h={}){let i=(0,d.v7)(a,b,c);return!function(a,b,c,e,f){if("session_start"!==e.event||!0!==f.sessionStartMayArriveLate)return!1;let g=ax(a,b,c,e.at);if(null===g||!aK.includes(g.status))return!1;let h=aH.get((0,d.v7)(a,b,c))?.sessionId??null;return null===h||null==e.sessionId||e.sessionId===h}(a,b,c,f,h)?(aH.set(i,f),"session_start"===f.event&&F.delete(i),O(i,f),N(a,b,c,"hook",f.at),!function(a,b){switch(b.event){case"pre_tool_use":aB.mW.includes(b.detail??"")||aC.delete(a);return;case"notification":"idle_prompt"===b.detail&&aC.delete(a);return;case"post_tool_use":case"stop":case"user_prompt_submit":case"session_start":case"session_end":aC.delete(a);return;default:b.event;return}}(i,f),"session_start"===f.event&&(Z.set(i,f.at),(0,e.eZ)(a,b,c),al(i,f.at)),!function(a,b){let c=ab(a);if(null===c||!(b.at<c))switch(b.event){case"user_prompt_submit":ap(a,b,c,{continueOpen:!0===b.joinsOpenTurn}),as(a);return;case"post_tool_use":ap(a,b,c,{continueOpen:!0}),as(a);return;case"pre_tool_use":if(!0===b.promptOpensTurns&&am(a))return;ap(a,b,c,{continueOpen:!0});return;case"stop":!function(a,b,c){let d=ac(a);if(null!==d&&null===d.closedAt&&null!==d.openedAt){if(!(0,g.ZV)(d,b.sessionId))return;d.closedAt=b.at,d.closedBy="stop",d.displayEvent=ao(b),as(a);return}$.set(a,{turnId:ae(b.at),sessionId:b.sessionId,openedAt:null,closedAt:b.at,closedBy:"stop",generationAt:c,displayEvent:ao(b),pendingDecisions:[],scraperCompletionPolls:0}),au()}(a,b,c);return;case"session_end":(function(a,b){let c=ac(a);null!==c&&(0,g.ZV)(c,b.sessionId)&&(c.closedAt=b.at,c.closedBy="session_end")})(a,b),as(a);return;case"session_start":return;case"notification":!function(a,b,c){if("permission_prompt"===b.detail)return!0===b.promptSettled?at(a,b):ar(a,c,{source:"notification",at:b.at,message:b.message??null,toolName:b.toolName??null,patterns:b.decisionPatterns??null,decisionId:b.decisionId??null,bootstrapDisplay:ao(b)});if(b.detail===z.KC){!0===b.promptSettled&&at(a,b);return}if("idle_prompt"===b.detail){as(a);let d=ac(a);if(null!==d&&null===d.closedAt){d.displayEvent=ao(b);return}if(null!==d)return;$.set(a,{turnId:ae(b.at),sessionId:b.sessionId,openedAt:null,closedAt:null,closedBy:null,generationAt:c,displayEvent:ao(b),pendingDecisions:[],scraperCompletionPolls:0}),au()}}(a,b,c);return;default:b.event;return}}(i,f),!function(a,b){switch(b.event){case"notification":"idle_prompt"===b.detail&&ay.set(a,{at:b.at,message:b.message??null});return;case"user_prompt_submit":case"session_start":case"session_end":ay.delete(a);return;case"stop":case"pre_tool_use":case"post_tool_use":return;default:b.event;return}}(i,f),{recorded:!0}):(O(i,f),N(a,b,c,"hook",f.at),{recorded:!1,skipped:"late-session-start"})}function aM(a,b,c){return aH.get((0,d.v7)(a,b,c))??null}function aN(a,b,c,e=Date.now()){let f=(0,d.v7)(a,b,c);Z.set(f,e),al(f,e),aC.delete(f),ay.delete(f),B.delete(f),C.delete(f),D.delete(f),E.delete(f),F.delete(f),k.delete(f)}function aO(a,b,c){return Z.get((0,d.v7)(a,b,c))??null}function aP(a,b,c){let e=(0,d.v7)(a,b,c);aH.delete(e),Z.delete(e),$.delete(e),i.delete(e),aC.delete(e),ay.delete(e),B.delete(e),C.delete(e),D.delete(e),E.delete(e),F.delete(e),k.delete(e)}let aQ=g.h_.predicted;function aR(a,b,c,e,f=Date.now()){let g=(0,d.v7)(a,b,c);ar(g,ab(g),{source:"permission-request",at:f,message:null,toolName:e,patterns:null,decisionId:null,bootstrapDisplay:{event:"notification",at:f,detail:"permission_prompt"}})}function aS(a,b,c,e,f=Date.now()){let g=(0,d.v7)(a,b,c);ar(g,ab(g),{source:"notification",at:f,message:null,toolName:e.toolName,patterns:null,decisionId:e.decisionId,bootstrapDisplay:{event:"notification",at:f,detail:e.detail}})}function aT(a,b,c,d=Date.now()){return ag(a,b,c,d)[0]??null}function aU(a,b,c,d=Date.now()){let e=aT(a,b,c,d);e&&(e.scraperCorroborated=!0,e.confirmedAt??=d)}function aV(a,b,c){let d=aT(a,b,c);d&&(d.recorded=!0)}function aW(a,b,c){as((0,d.v7)(a,b,c))}function aX(){aG.clear(),aH.clear(),j.clear(),k.clear(),Z.clear(),$.clear(),_.clear(),i.clear(),aC.clear(),ay.clear(),B.clear(),C.clear(),D.clear(),E.clear(),F.clear()}},49154:(a,b,c)=>{c.d(b,{GF:()=>e,Wk:()=>g,mW:()=>f});var d=c(13287);let e="question",f=[d.k$,e];function g(a){return null!==a&&f.includes(a)?"question":"permission"}},56791:(a,b,c)=>{c.r(b),c.d(b,{ACTIVE_FILTER:()=>d.ks,ACTIVE_TASK_STATUSES:()=>d.EL,AgentInstanceLimitError:()=>d.AC,CURRENT_SCHEMA_VERSION:()=>f.FT,DEFAULT_RUN_HISTORY_LIMIT:()=>d.Tu,InvalidAgentInstanceError:()=>d.ug,MAX_DISABLED_REPOSITORIES:()=>h.nc,MAX_RUN_HISTORY_DAYS:()=>d.eP,MAX_RUN_HISTORY_LIMIT:()=>d.mg,MemoDbError:()=>d.lm,NEW_SUBSCRIPTION_DEFAULTS:()=>d.s6,PUSH_DEFAULTS_VERSION:()=>d.VP,RepositoryDbError:()=>h.j8,TASK_STATUSES:()=>d.Hi,TERMINAL_TASK_STATUSES:()=>d.sA,VERIFICATION_GATE_SOURCES:()=>d.Dx,VERIFICATION_TRIGGERS:()=>d.af,WORKTREE_TODO_STATUSES:()=>d.KG,addAgentInstance:()=>d.Uq,cancelTimer:()=>d.Ud,cancelTimersByWorktree:()=>d.$$,cleanupOldTimers:()=>d.ul,clearInProgressMessageId:()=>d.YX,clearLastUserMessage:()=>d.cf,clearTimerHistory:()=>d.jf,closeDbInstance:()=>e.closeDbInstance,countAgentInstances:()=>d.fs,countDisabledRepositories:()=>h.QJ,countPushSubscriptionsForKind:()=>d.rC,countWorktreesByRepositoryPath:()=>h.kp,createCloneJob:()=>h.tw,createGateResult:()=>d.hl,createMemo:()=>d.To,createMessage:()=>d.oH,createRepository:()=>h.vB,createTask:()=>d.UT,createTimer:()=>d.CR,createVerificationRun:()=>d.rY,createWorktreeTodo:()=>d.yy,deleteAllMessages:()=>d.pE,deleteMemo:()=>d.cP,deleteMessageById:()=>d.DF,deleteMessagesByCliTool:()=>d.lA,deleteMessagesByInstance:()=>d.Qp,deletePushSubscriptionByEndpoint:()=>d.th,deleteRepository:()=>h.oG,deleteRepositoryWorktrees:()=>d.oZ,deleteSessionState:()=>d.ZP,deleteWorktreeTodo:()=>d.vg,deleteWorktreesByIds:()=>d.Rm,disableExistingRepository:()=>h.eP,disableRepository:()=>h.l$,ensureEnvRepositoriesRegistered:()=>h.ES,filterExcludedPaths:()=>h.Ho,findMessageByRequestId:()=>d.Ow,finishGateResult:()=>d.C8,finishVerificationRun:()=>d.u$,getActiveCloneJobByUrl:()=>h.fD,getActiveTask:()=>d.__,getActiveTaskForInstance:()=>d.MH,getAgentInstance:()=>d.BN,getAgentInstances:()=>d.m0,getAliasedWorktreeIds:()=>d.r3,getAllPushSubscriptions:()=>d.Se,getAllRepositories:()=>h.Yg,getAllRepositoriesWithWorktreeCount:()=>h._D,getAllWorktreeAliases:()=>d.fX,getAllWorktreeIds:()=>d.nO,getAllWorktreePathIds:()=>d.Sj,getCloneJob:()=>h.bM,getCloneJobsByStatus:()=>h.n_,getCurrentVersion:()=>f.Mj,getDailyReport:()=>d.ap,getDbInstance:()=>e.getDbInstance,getDefaultDbPath:()=>g.$b,getExcludedRepositories:()=>h.lS,getExcludedRepositoryPaths:()=>h.pr,getInitialBranch:()=>d.p4,getIssueDbPath:()=>g.zm,getLastAssistantMessageAt:()=>d.nP,getLastMessage:()=>d.sy,getLastUserMessage:()=>d.r8,getLegacyDbPaths:()=>q,getMemoById:()=>d.DN,getMemosByWorktreeId:()=>d.pZ,getMessageById:()=>d.kA,getMessages:()=>d.VL,getMessagesByDateRange:()=>d.lr,getMigrationHistory:()=>f.PS,getPendingTimerCountByWorktree:()=>d.GF,getPendingTimers:()=>d._O,getPushSubscriptionByEndpoint:()=>d.CF,getPushSubscriptionsForKind:()=>d.gn,getRepositories:()=>d.NV,getRepositoryById:()=>h.r,getRepositoryByNormalizedUrl:()=>h.Uj,getRepositoryByPath:()=>h.Dp,getRunningVerificationRun:()=>d.WZ,getSessionState:()=>d.y1,getTask:()=>d.gg,getTimerById:()=>d.kx,getTimersByWorktree:()=>d.DP,getTodosByWorktreeId:()=>d.fr,getVerificationRun:()=>d.J6,getWorktreeAliases:()=>d.Q2,getWorktreeById:()=>d.Ui,getWorktreeIdsByRepository:()=>d.P9,getWorktreeTodoById:()=>d.eN,getWorktrees:()=>d.vi,getWorktreesByRepository:()=>d.uJ,initDatabase:()=>d.s4,isTerminalTaskStatus:()=>d.uB,isWorktreeTodoStatus:()=>d.yT,listRunningVerificationRuns:()=>d.Fi,listTaskEvents:()=>d.HB,listTasks:()=>d.Vk,listVerificationRuns:()=>d.Mt,listVerificationRunsForPeriod:()=>d.UE,markPendingPromptsAsAnswered:()=>d.PL,migrateDbIfNeeded:()=>r,migrateWorktreeIdPreservingChildren:()=>d._h,pushSubscriptionNeedsDefaultsNotice:()=>d.Zj,recomputeLastUserMessage:()=>d.jp,recordAnsweredPrompt:()=>d.pG,recordWorktreeAlias:()=>d.xJ,recoverStuckSendingTimers:()=>d.Xm,registerAndFilterRepositories:()=>h.$G,removeAgentInstance:()=>d.NU,reorderMemos:()=>d.nQ,reorderWorktreeTodos:()=>d.yb,resolveAndValidatePath:()=>p,resolveRepositoryPath:()=>h.mE,resolveWorktreeIdWithAlias:()=>d.l0,restoreRepository:()=>h.RS,rollbackMigrations:()=>f.Wy,runMigrations:()=>f.vI,saveDailyReport:()=>d.tt,saveInitialBranch:()=>d.GA,setAgentInstances:()=>d.Cs,setInProgressMessageId:()=>d.OF,setRepositoryEnabled:()=>h.iQ,updateCliToolId:()=>d.WU,updateCloneJob:()=>h.k5,updateDailyReportContent:()=>d.IF,updateFavorite:()=>d.O,updateLastUserMessage:()=>d.EU,updateLastViewedAt:()=>d.HZ,updateMemo:()=>d.UY,updateMessageContent:()=>d.e8,updatePromptData:()=>d.cw,updatePushSubscriptionPreferences:()=>d.jJ,updateRepository:()=>h.Ir,updateSelectedAgents:()=>d.DC,updateSessionState:()=>d.PP,updateStatus:()=>d.yB,updateTimerStatus:()=>d.j2,updateVibeLocalContextWindow:()=>d.s,updateVibeLocalModel:()=>d.iu,updateWorktreeDescription:()=>d.hq,updateWorktreeLink:()=>d.z1,updateWorktreeTodo:()=>d.bl,upsertPushSubscription:()=>d.jA,upsertWorktree:()=>d.ZL,validateDbPath:()=>g.Sv,validateRepositoryPath:()=>h.Ux,validateSchema:()=>f.i6});var d=c(683),e=c(88807),f=c(67469),g=c(20416),h=c(10406),i=c(29021),j=c.n(i),k=c(33873),l=c.n(k),m=c(21820),n=c(7956);let o=(0,c(72626).h)("db-migration-path");function p(a,b){try{if(!j().existsSync(a))return null;let c=j().realpathSync(a);if((0,n.fW)(c))return o.warn(`[Security] ${b} points to system directory, skipping: ${c}`),null;return c}catch{return o.warn(`[Security] Failed to resolve ${b}: ${a}`),null}}function q(){let a=[];a.push(l().join(process.cwd(),"data","db.sqlite")),a.push(l().join(process.cwd(),"data","cm.db")),a.push(l().join((0,m.homedir)(),".commandmate","data","db.sqlite"));let b=process.env.DATABASE_PATH;if(b)try{let c=l().resolve(b);(0,n.fW)(c)?o.warn(`[Security] Skipping DATABASE_PATH in system directory: ${c}`):a.push(b)}catch{o.warn(`[Security] Invalid DATABASE_PATH: ${b}`)}return a}function r(a){let b=l().resolve(a);if((0,n.fW)(b))throw Error(`Security error: Target path cannot be in system directory: ${b}`);if(j().existsSync(a)){let b=p(a,"target path");if(b)return{migrated:!1,targetPath:b}}for(let a of q()){let c=p(a,"legacy path");if(!c)continue;let d=`${c}.bak`;j().copyFileSync(c,d),j().chmodSync(d,384);let e=l().dirname(b);return j().existsSync(e)||j().mkdirSync(e,{recursive:!0,mode:448}),j().copyFileSync(c,b),o.info(`[Migration] Database migrated from ${c} to ${b}`),o.info(`[Migration] Backup created at ${d}`),{migrated:!0,sourcePath:c,targetPath:b,backupPath:d}}return{migrated:!1,targetPath:b}}},67882:(a,b,c)=>{c.d(b,{DA:()=>e,O_:()=>f,Oh:()=>d,_K:()=>i,kA:()=>g,px:()=>h});let d={PROMPT_SUBMIT:"hook_prompt_submit",STOP:"hook_stop",PERMISSION_PROMPT:"hook_permission_prompt",PERMISSION_REQUEST:"hook_permission_request",IDLE_PROMPT:"hook_idle_prompt",PRE_TOOL_USE:"hook_pre_tool_use",POST_TOOL_USE:"hook_post_tool_use"};function e(a,b){switch(a){case"user_prompt_submit":return{status:"running",reason:d.PROMPT_SUBMIT};case"pre_tool_use":return{status:"running",reason:d.PRE_TOOL_USE};case"post_tool_use":return{status:"running",reason:d.POST_TOOL_USE};case"stop":return{status:"ready",reason:d.STOP};case"notification":if("permission_prompt"===b)return{status:"waiting",reason:d.PERMISSION_PROMPT};if("idle_prompt"===b)return{status:"ready",reason:d.IDLE_PROMPT};return null;default:return null}}function f(a,b=!1){switch(a){case"waiting":return{isWaitingForResponse:!0,isProcessing:!1};case"running":return{isWaitingForResponse:!1,isProcessing:!b};default:return{isWaitingForResponse:!1,isProcessing:!1}}}function g(a){return a?a.isWaitingForResponse?"waiting":a.isProcessing?"running":a.isRunning?"ready":"idle":"idle"}function h(a){return a?.isUnclassified===!0&&"ready"===g(a)}function i(a){return a.isSessionRunning?a.isWaitingForResponse?"waiting":a.isProcessing?"running":"ready":null}},81254:(a,b,c)=>{function d(a){return"answer_only"===a||"answer_then_enter"===a}c.d(b,{LT:()=>e,MI:()=>d,XF:()=>f});let e="unclassified";function f(a){return null!=a&&a.type!==e}},85322:(a,b,c)=>{c.d(b,{k:()=>d});let d="opencode"},85726:(a,b,c)=>{c.d(b,{J:()=>d});function d(a){return`${a.type}:${a.question}`}}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=2460,exports.ids=[2460,9130],exports.modules={2669:(a,b,c)=>{c.d(b,{JI:()=>n,M7:()=>d,Sr:()=>h,Zf:()=>f,c7:()=>e,lU:()=>k,mR:()=>j,qO:()=>i,su:()=>m,wQ:()=>l});let d="SESSION_STARTING",e="SESSION_START_FAILED",f="SESSION_START_UNAVAILABLE",g=[d,e];class h extends Error{constructor(a,b,c){super(`${a} did not reach its input prompt within ${Math.round(c/1e3)}s (initialization timeout). The tmux session '${b}' and its process are still running, so this is a slow start, not a failed one — the message was not delivered, but nothing needs repairing. Retry the send in a few seconds, or run \`commandmate capture <worktree-id>\` to see what it is waiting on.`),this.toolName=a,this.sessionName=b,this.timeoutMs=c,this.code=d,this.name="SessionStartTimeoutError"}}function i(a,b){return`${a} exited before reaching its input prompt: the tmux session '${b}' is back at a shell, so this is not a slow start and waiting will not help. The message was not delivered. Run \`commandmate capture <worktree-id>\` to see why it exited (for example a startup dialog answered with exit, or a missing login), fix that, then send again.`}class j extends Error{constructor(a,b,c){super(`${a} reported an error while starting in tmux session '${b}': "${c}". Retrying will not help until that is resolved; run \`commandmate capture <worktree-id>\` to see the session output.`),this.toolName=a,this.sessionName=b,this.detectedPattern=c,this.code=e,this.name="SessionStartFailedError"}}class k extends Error{constructor(a,b=`${a} is not installed. Please install it first.`){super(b),this.toolName=a,this.code=f,this.name="SessionStartUnavailableError"}}function l(a){return o(a)===d}function m(a){let b=o(a);return void 0!==b&&g.includes(b)}function n(a){return o(a)===f}function o(a){if("object"!=typeof a||null===a)return;let b=a.code;return"string"==typeof b?b:void 0}},22354:(a,b,c)=>{c.d(b,{F0:()=>j.F,K9:()=>e.K9,VM:()=>d.VM,_0:()=>f._0,c1:()=>k.c,o:()=>i.o,vm:()=>h.v,y_:()=>g.y_});var d=c(70096);c(66101);var e=c(45567);c(57510),c(38367);var f=c(25071),g=c(50474),h=c(70997),i=c(77904),j=c(76835),k=c(2734)},23197:(a,b,c)=>{c.d(b,{H:()=>d});let d="__global__"},32002:(a,b,c)=>{c.d(b,{e:()=>h});var d=c(56791),e=c(26923),f=c(52201),g=c(15194);function h(a,b,c){let h=(0,d.getAgentInstances)(a,b);return h.length>0?h:(0,g.lu)((0,f.eG)({worktree:c,appSettings:(0,e.Ds)(a)}))}},50474:(a,b,c)=>{c.d(b,{y_:()=>d});function d(a){var b=a.noDecision;switch(b.kind){case"proceeds":return{safe:!0,blocksForMs:0,summary:"the agent continues with its own approval flow"};case"blocks":return{safe:!1,blocksForMs:null,summary:"the agent waits indefinitely; nothing else will unblock it"};case"blocksUntil":return{safe:!1,blocksForMs:b.timeoutMs,summary:`the agent waits up to ${b.timeoutMs}ms before continuing`}}}},89398:(a,b,c)=>{c.d(b,{z:()=>y,B:()=>B});var d=c(8360),e=c(15194),f=c(31990),g=c(95595),h=c(37717),i=c(35583),j=c(67882),k=c(64501),l=c(70594),m=c(23365),n=c(50945),o=c(22995),p=c(23197),q=c(30008),r=c(40043),s=c(57836),t=c(33294),u=c(26547),v=c(70096),w=c(66101);let x=(0,c(72626).h)("lib/session/worktree-status-helper");function y(){return{probeCount:0,captureCount:0,healthCheckCount:0}}let z={prompt:3,menu:2,unclassified:1};async function A(a,b,d,e,p,y,z,A,B){let C=p.has(e),D=C,E=null,F=(0,i.Bk)(a,b,d);if(D&&null===F){B&&B.healthCheckCount++;let a=await (0,n.S)(e,b);a.alive||(D=!1,E=a.reason)}let G={startingSince:F,isWaitingForResponse:!1,isProcessing:!1,waitingKind:null,structuredWaitingSince:null,statusEvidence:null,sessionStatusReason:null,isUnclassified:!1};if(D)try{var H;let e=(0,m.y)(b).statusLines;B&&B.captureCount++;let h=await (0,f.Wh)(a,b,e,d),n={db:y,worktreeId:a,cliToolId:b,instanceId:d},{compositeKey:p,statusResult:s}=function(a,b,c){let{worktreeId:d,cliToolId:e,instanceId:f}=b,h=(0,o.v7)(d,e,f),k=(0,o.xU)(h),l=k?new Date(k):void 0,m=(0,g.WC)(c,e,l);a.startingSince=(0,i.a3)(d,e,f,"waiting"===m.status||m.hasActivePrompt);let n=null===a.startingSince?m:(0,i.Gz)(m);return(0,t.recordCapturedModelInfo)(d,e,f,(0,u.jw)(e,c)),a.isUnclassified=(0,r.Q4)(n.status,n.reason),{isWaitingForResponse:a.isWaitingForResponse,isProcessing:a.isProcessing}=(0,j.O_)(n.status,a.isUnclassified),a.sessionStatusReason=n.reason,a.statusEvidence=n.evidence,{compositeKey:h,statusResult:n}}(G,n,h),{db:w,worktreeId:C,cliToolId:D,instanceId:E}=n,F=(0,q.xF)({worktreeId:C,cliToolId:D,instanceId:E,scraper:{status:s.status,reason:s.reason,hasActivePrompt:s.hasActivePrompt}});G.isWaitingForResponse=G.isWaitingForResponse||null===G.startingSince&&F.waiting;let I=null!==G.startingSince||G.isWaitingForResponse?null:function(a){let{worktreeId:b,cliToolId:c,instanceId:d,output:e,statusResult:f}=a;if(!a.isProcessing&&!(0,k.NV)(b,c,d,e))return null;let h=(0,k.$K)(b,c,d,(0,k.$x)(b,c,d),e);if(null===h)return null;let i={status:f.status,reason:f.reason,thinking:(0,g.f8)(f),evidence:f.evidence,isUnclassifiedActive:a.isUnclassified},j=(0,t.getPublishedAgentTurn)(b,c,d),m=(0,l.wG)(i,h,j)?(0,l.mi)(a.db,b,c,d):null;return(0,l.aT)(i,h,null,j,m)}({db:w,worktreeId:C,cliToolId:D,instanceId:E,output:h,statusResult:s,isUnclassified:G.isUnclassified,isProcessing:G.isProcessing});null!==I&&(G.isProcessing="running"===I.status),(0,r.ox)(p,I??{status:s.status,reason:s.reason,evidence:s.evidence}),G.structuredWaitingSince=null===G.startingSince?F.structured?.at??null:null,G.waitingKind=(H={waiting:G.isWaitingForResponse,hasActivePrompt:s.hasActivePrompt,scraperStatus:s.status,scraperReason:s.reason,apiAnswerable:null===G.startingSince&&(0,q.$G)(F.structured,(0,v.VM)(D).capabilities.eventIdentity)}).waiting?H.hasActivePrompt||!0===H.apiAnswerable?"prompt":"waiting"===H.scraperStatus&&g.ug.has(H.scraperReason)?"menu":"unclassified":null;let{db:J,worktreeId:K,cliToolId:L,instanceId:M}=n;!s.hasActivePrompt&&z(J,K,{limit:10,cliToolId:L,instanceId:M}).some(a=>"prompt"===a.messageType&&a.promptData?.status!=="answered")&&A(J,K,L,M,a=>{Promise.resolve().then(c.bind(c,43015)).then(({broadcastMessage:b})=>{b("message_updated",{worktreeId:K,message:a})}).catch(a=>{x.warn("prompt-sweep-broadcast-failed",{worktreeId:K,error:a instanceof Error?a.message:String(a)})})})}catch{G.isProcessing=!0}let I=(0,s.hd)({worktreeId:a,cliToolId:b,instanceId:d,waiting:G.isWaitingForResponse,kind:G.waitingKind,structuredSince:G.structuredWaitingSince}),{model:J,effort:K}=(0,t.getResolvedAgentModelInfo)(a,b,d),L=(0,o.v7)(a,b,d);D||(0,r.xG)(L);let M=D?(0,r.AD)(L):null,N=D?function(a,b,c){try{let d=(0,v.VM)(b),e=(0,w.Kf)(d,d.liveness({worktreeId:a,cliToolId:b,instanceId:c}),Date.now());if(void 0===e.degradedReason&&void 0===e.liveness)return null;return e}catch{return null}}(a,b,d):null;try{C?await (0,f.N5)({sessionName:e,worktreeId:a,cliToolId:b,instanceId:d,status:(0,j.kA)({isRunning:D,isWaitingForResponse:G.isWaitingForResponse,isProcessing:G.isProcessing})}):(0,f.Lw)(e)}catch(a){x.debug("tmux-surface:publish-failed",{sessionName:e,error:a instanceof Error?a.message:String(a)})}var O={worktreeId:a,cliToolId:b,instanceId:d,isRunning:D,exitedReason:E,waitingSince:I,model:J,effort:K,lastKnown:M,eventSource:N};let{worktreeId:P,cliToolId:Q,instanceId:R,isRunning:S,exitedReason:T,model:U,effort:V,lastKnown:W,eventSource:X}=O,{isWaitingForResponse:Y,isProcessing:Z,waitingKind:$,statusEvidence:_,sessionStatusReason:aa,isUnclassified:ab,startingSince:ac}=G;return{isRunning:S,isWaitingForResponse:Y,isProcessing:Z,waitingKind:$,waitingSince:O.waitingSince,awaitingInstruction:S&&(0,t.isAwaitingInstruction)(P,Q,R),...null!==U?{model:U}:{},...null!==V?{reasoningEffort:V}:{},...null!==_?{statusEvidence:_}:{},...null!==aa?{sessionStatusReason:aa}:{},...ab?{isUnclassified:!0}:{},...null!==T?{sessionStatusReason:h.g.EXITED,statusEvidence:"positive"}:{},...null!==W?{lastKnownStatus:W.status,lastKnownStatusAt:W.at}:{},...null!==X?{eventSource:X}:{},...null!==ac?{startingSince:ac}:{}}}async function B(a,b,c,f,g,h,i){if(a===p.H)return{sessionStatusByCli:{},sessionStatusByInstance:{},isSessionRunning:!1,isWaitingForResponse:!1,isProcessing:!1};let j=d.CLIToolManager.getInstance(),k=e.XH,l=h(c,a).filter(a=>a.id!==a.cliTool),m=k.map(b=>({cliToolId:b,instanceId:b,sessionName:j.getTool(b).getSessionName(a,b)}));for(let b of l)m.push({cliToolId:b.cliTool,instanceId:b.id,sessionName:j.getTool(b.cliTool).getSessionName(a,b.id)});i&&(i.probeCount+=m.length);let n=await Promise.all(m.map(async d=>{let e=await A(a,d.cliToolId,d.instanceId,d.sessionName,b,c,f,g,i);return{...d,status:e}})),o={},q={};for(let{cliToolId:a,instanceId:b,status:c}of n){q[b]=c;let d=o[a];o[a]=d?function(a,b){var c,d,e,f;return{isRunning:a.isRunning||b.isRunning,isWaitingForResponse:a.isWaitingForResponse||b.isWaitingForResponse,isProcessing:a.isProcessing||b.isProcessing,waitingKind:(c=a.waitingKind,d=b.waitingKind,null===c?d:null===d||z[c]>=z[d]?c:d),waitingSince:(e=a.waitingSince,f=b.waitingSince,null===e?f:null===f?e:Math.min(e,f)),awaitingInstruction:a.awaitingInstruction||b.awaitingInstruction,...a.isUnclassified||b.isUnclassified?{isUnclassified:!0}:{}}}(d,c):c}let r=!1,s=!1,t=!1;for(let a of Object.values(o))a&&(a.isRunning&&(r=!0),a.isWaitingForResponse&&(s=!0),a.isProcessing&&(t=!0));return{sessionStatusByCli:o,sessionStatusByInstance:q,isSessionRunning:r,isWaitingForResponse:s,isProcessing:t}}}};