commandmate 0.31.2 → 0.32.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 (824) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +454 -440
  3. package/.next/app-path-routes-manifest.json +31 -29
  4. package/.next/build-manifest.json +5 -5
  5. package/.next/prerender-manifest.json +12 -12
  6. package/.next/react-loadable-manifest.json +2 -2
  7. package/.next/required-server-files.json +1 -1
  8. package/.next/routes-manifest.json +8 -0
  9. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  10. package/.next/server/app/api/agents/update/route_client-reference-manifest.js +1 -1
  11. package/.next/server/app/api/agents/versions/route_client-reference-manifest.js +1 -1
  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.js +1 -1
  14. package/.next/server/app/api/app/update-check/route.js.nft.json +1 -1
  15. package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
  16. package/.next/server/app/api/assistant/conversation/route.js +1 -1
  17. package/.next/server/app/api/assistant/conversation/route.js.nft.json +1 -1
  18. package/.next/server/app/api/assistant/conversation/route_client-reference-manifest.js +1 -1
  19. package/.next/server/app/api/assistant/current-output/route.js +1 -1
  20. package/.next/server/app/api/assistant/current-output/route.js.nft.json +1 -1
  21. package/.next/server/app/api/assistant/current-output/route_client-reference-manifest.js +1 -1
  22. package/.next/server/app/api/assistant/messages/route.js +1 -1
  23. package/.next/server/app/api/assistant/messages/route.js.nft.json +1 -1
  24. package/.next/server/app/api/assistant/messages/route_client-reference-manifest.js +1 -1
  25. package/.next/server/app/api/assistant/session/route.js +1 -1
  26. package/.next/server/app/api/assistant/session/route.js.nft.json +1 -1
  27. package/.next/server/app/api/assistant/session/route_client-reference-manifest.js +1 -1
  28. package/.next/server/app/api/assistant/start/route.js +1 -32
  29. package/.next/server/app/api/assistant/start/route.js.nft.json +1 -1
  30. package/.next/server/app/api/assistant/start/route_client-reference-manifest.js +1 -1
  31. package/.next/server/app/api/assistant/terminal/route.js +2 -33
  32. package/.next/server/app/api/assistant/terminal/route.js.nft.json +1 -1
  33. package/.next/server/app/api/assistant/terminal/route_client-reference-manifest.js +1 -1
  34. package/.next/server/app/api/assistant/tools/route.js +1 -1
  35. package/.next/server/app/api/assistant/tools/route.js.nft.json +1 -1
  36. package/.next/server/app/api/assistant/tools/route_client-reference-manifest.js +1 -1
  37. package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  38. package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  39. package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  40. package/.next/server/app/api/capabilities/route.js +1 -1
  41. package/.next/server/app/api/capabilities/route.js.nft.json +1 -1
  42. package/.next/server/app/api/capabilities/route_client-reference-manifest.js +1 -1
  43. package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +1 -1
  44. package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
  45. package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
  46. package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
  47. package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
  48. package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -1
  49. package/.next/server/app/api/fs/recent-paths/route_client-reference-manifest.js +1 -1
  50. package/.next/server/app/api/hooks/agent-event/route.js +1 -1
  51. package/.next/server/app/api/hooks/agent-event/route.js.nft.json +1 -1
  52. package/.next/server/app/api/hooks/agent-event/route_client-reference-manifest.js +1 -1
  53. package/.next/server/app/api/hooks/claude-done/route.js +2 -2
  54. package/.next/server/app/api/hooks/claude-done/route.js.nft.json +1 -1
  55. package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
  56. package/.next/server/app/api/hooks/permission-request/route.js +1 -1
  57. package/.next/server/app/api/hooks/permission-request/route.js.nft.json +1 -1
  58. package/.next/server/app/api/hooks/permission-request/route_client-reference-manifest.js +1 -1
  59. package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -1
  60. package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
  61. package/.next/server/app/api/push/escalation/route.js +2 -2
  62. package/.next/server/app/api/push/escalation/route.js.nft.json +1 -1
  63. package/.next/server/app/api/push/escalation/route_client-reference-manifest.js +1 -1
  64. package/.next/server/app/api/push/subscriptions/route.js +1 -1
  65. package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
  66. package/.next/server/app/api/push/vapid/route.js +2 -2
  67. package/.next/server/app/api/push/vapid/route.js.nft.json +1 -1
  68. package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
  69. package/.next/server/app/api/relays/[relayId]/cancel/route.js +1 -0
  70. package/.next/server/app/api/relays/[relayId]/cancel/route.js.nft.json +1 -0
  71. package/.next/server/app/api/relays/[relayId]/cancel/route_client-reference-manifest.js +1 -0
  72. package/.next/server/app/api/relays/route.js +1 -0
  73. package/.next/server/app/api/relays/route.js.nft.json +1 -0
  74. package/.next/server/app/api/relays/route_client-reference-manifest.js +1 -0
  75. package/.next/server/app/api/remote/pair/route_client-reference-manifest.js +1 -1
  76. package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
  77. package/.next/server/app/api/repositories/[id]/todos/[todoId]/route.js +1 -1
  78. package/.next/server/app/api/repositories/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  79. package/.next/server/app/api/repositories/[id]/todos/route.js +1 -1
  80. package/.next/server/app/api/repositories/[id]/todos/route_client-reference-manifest.js +1 -1
  81. package/.next/server/app/api/repositories/clone/[jobId]/route.js +1 -1
  82. package/.next/server/app/api/repositories/clone/[jobId]/route.js.nft.json +1 -1
  83. package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
  84. package/.next/server/app/api/repositories/clone/route.js +1 -1
  85. package/.next/server/app/api/repositories/clone/route.js.nft.json +1 -1
  86. package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
  87. package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
  88. package/.next/server/app/api/repositories/restore/route.js +1 -1
  89. package/.next/server/app/api/repositories/restore/route.js.nft.json +1 -1
  90. package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
  91. package/.next/server/app/api/repositories/route.js +1 -1
  92. package/.next/server/app/api/repositories/route.js.nft.json +1 -1
  93. package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
  94. package/.next/server/app/api/repositories/scan/route.js +1 -1
  95. package/.next/server/app/api/repositories/scan/route.js.nft.json +1 -1
  96. package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
  97. package/.next/server/app/api/repositories/sync/route.js +1 -1
  98. package/.next/server/app/api/repositories/sync/route.js.nft.json +1 -1
  99. package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
  100. package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
  101. package/.next/server/app/api/settings/default-agents/route.js +1 -1
  102. package/.next/server/app/api/settings/default-agents/route.js.nft.json +1 -1
  103. package/.next/server/app/api/settings/default-agents/route_client-reference-manifest.js +1 -1
  104. package/.next/server/app/api/settings/default-surface-mode/route_client-reference-manifest.js +1 -1
  105. package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
  106. package/.next/server/app/api/skills/[id]/route.js +1 -1
  107. package/.next/server/app/api/skills/[id]/route.js.nft.json +1 -1
  108. package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
  109. package/.next/server/app/api/skills/installations/route.js +1 -1
  110. package/.next/server/app/api/skills/installations/route.js.nft.json +1 -1
  111. package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
  112. package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
  113. package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
  114. package/.next/server/app/api/skills/route.js +1 -1
  115. package/.next/server/app/api/skills/route.js.nft.json +1 -1
  116. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  117. package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
  118. package/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
  119. package/.next/server/app/api/tasks/[taskId]/route.js +1 -1
  120. package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
  121. package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
  122. package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
  123. package/.next/server/app/api/todos/route.js +1 -1
  124. package/.next/server/app/api/todos/route_client-reference-manifest.js +1 -1
  125. package/.next/server/app/api/verification/runs/[runId]/route.js +1 -1
  126. package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -1
  127. package/.next/server/app/api/verification/runs/route.js +1 -1
  128. package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -1
  129. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
  130. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js.nft.json +1 -1
  131. package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
  132. package/.next/server/app/api/worktrees/[id]/capture/route.js +1 -1
  133. package/.next/server/app/api/worktrees/[id]/capture/route.js.nft.json +1 -1
  134. package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
  135. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js +1 -1
  136. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js.nft.json +1 -1
  137. package/.next/server/app/api/worktrees/[id]/clear-composer/route_client-reference-manifest.js +1 -1
  138. package/.next/server/app/api/worktrees/[id]/cli-reference/route.js +1 -1
  139. package/.next/server/app/api/worktrees/[id]/cli-reference/route_client-reference-manifest.js +1 -1
  140. package/.next/server/app/api/worktrees/[id]/cli-tool/route.js +1 -1
  141. package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
  142. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js +1 -1
  143. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
  144. package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
  145. package/.next/server/app/api/worktrees/[id]/current-output/route.js.nft.json +1 -1
  146. package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
  147. package/.next/server/app/api/worktrees/[id]/env/route.js +1 -1
  148. package/.next/server/app/api/worktrees/[id]/env/route_client-reference-manifest.js +1 -1
  149. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route.js +1 -1
  150. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
  151. package/.next/server/app/api/worktrees/[id]/execution-logs/route.js +1 -1
  152. package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
  153. package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
  154. package/.next/server/app/api/worktrees/[id]/git/branch/create/route.js +1 -1
  155. package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
  156. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route.js +1 -1
  157. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
  158. package/.next/server/app/api/worktrees/[id]/git/branches/route.js +1 -1
  159. package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
  160. package/.next/server/app/api/worktrees/[id]/git/checkout/route.js +1 -1
  161. package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
  162. package/.next/server/app/api/worktrees/[id]/git/commit/route.js +1 -1
  163. package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
  164. package/.next/server/app/api/worktrees/[id]/git/diff/route.js +1 -1
  165. package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
  166. package/.next/server/app/api/worktrees/[id]/git/fetch/route.js +1 -1
  167. package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
  168. package/.next/server/app/api/worktrees/[id]/git/log/route.js +1 -1
  169. package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
  170. package/.next/server/app/api/worktrees/[id]/git/pull/route.js +1 -1
  171. package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
  172. package/.next/server/app/api/worktrees/[id]/git/push/route.js +1 -1
  173. package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
  174. package/.next/server/app/api/worktrees/[id]/git/reset/route.js +1 -1
  175. package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
  176. package/.next/server/app/api/worktrees/[id]/git/revert/route.js +1 -1
  177. package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
  178. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route.js +1 -1
  179. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
  180. package/.next/server/app/api/worktrees/[id]/git/stage/route.js +1 -1
  181. package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
  182. package/.next/server/app/api/worktrees/[id]/git/staged/route.js +1 -1
  183. package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
  184. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route.js +1 -1
  185. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
  186. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route.js +1 -1
  187. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
  188. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route.js +1 -1
  189. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
  190. package/.next/server/app/api/worktrees/[id]/git/stash/push/route.js +1 -1
  191. package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
  192. package/.next/server/app/api/worktrees/[id]/git/stash/route.js +1 -1
  193. package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
  194. package/.next/server/app/api/worktrees/[id]/git/status/route.js +1 -1
  195. package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
  196. package/.next/server/app/api/worktrees/[id]/git/unstage/route.js +1 -1
  197. package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
  198. package/.next/server/app/api/worktrees/[id]/git/working-diff/route.js +1 -1
  199. package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
  200. package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js +1 -1
  201. package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js.nft.json +1 -1
  202. package/.next/server/app/api/worktrees/[id]/instances/opencode/route_client-reference-manifest.js +1 -1
  203. package/.next/server/app/api/worktrees/[id]/interrupt/route.js +1 -1
  204. package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
  205. package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
  206. package/.next/server/app/api/worktrees/[id]/kill-session/route.js +1 -1
  207. package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -1
  208. package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
  209. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route.js +1 -1
  210. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
  211. package/.next/server/app/api/worktrees/[id]/logs/route.js +1 -1
  212. package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
  213. package/.next/server/app/api/worktrees/[id]/marp-render/route.js +1 -1
  214. package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
  215. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route.js +1 -1
  216. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
  217. package/.next/server/app/api/worktrees/[id]/memos/route.js +1 -1
  218. package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
  219. package/.next/server/app/api/worktrees/[id]/messages/route.js +1 -1
  220. package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
  221. package/.next/server/app/api/worktrees/[id]/opencode/diff/route.js +1 -1
  222. package/.next/server/app/api/worktrees/[id]/opencode/diff/route_client-reference-manifest.js +1 -1
  223. package/.next/server/app/api/worktrees/[id]/opencode/session/route.js +2 -1
  224. package/.next/server/app/api/worktrees/[id]/opencode/session/route.js.nft.json +1 -1
  225. package/.next/server/app/api/worktrees/[id]/opencode/session/route_client-reference-manifest.js +1 -1
  226. package/.next/server/app/api/worktrees/[id]/opencode/share/route.js +2 -1
  227. package/.next/server/app/api/worktrees/[id]/opencode/share/route.js.nft.json +1 -1
  228. package/.next/server/app/api/worktrees/[id]/opencode/share/route_client-reference-manifest.js +1 -1
  229. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
  230. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -1
  231. package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
  232. package/.next/server/app/api/worktrees/[id]/resolve-target/route.js +1 -1
  233. package/.next/server/app/api/worktrees/[id]/resolve-target/route_client-reference-manifest.js +1 -1
  234. package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -1
  235. package/.next/server/app/api/worktrees/[id]/respond/route.js.nft.json +1 -1
  236. package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
  237. package/.next/server/app/api/worktrees/[id]/route.js +1 -1
  238. package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
  239. package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
  240. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js +1 -1
  241. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
  242. package/.next/server/app/api/worktrees/[id]/schedules/active/route.js +1 -1
  243. package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
  244. package/.next/server/app/api/worktrees/[id]/schedules/route.js +1 -1
  245. package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
  246. package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
  247. package/.next/server/app/api/worktrees/[id]/send/route.js +1 -1
  248. package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
  249. package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
  250. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +103 -1
  251. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -1
  252. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
  253. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
  254. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route.js +1 -1
  255. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route.js.nft.json +1 -1
  256. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
  257. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
  258. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
  259. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route_client-reference-manifest.js +1 -1
  260. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route.js +1 -1
  261. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route.js.nft.json +1 -1
  262. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route_client-reference-manifest.js +1 -1
  263. package/.next/server/app/api/worktrees/[id]/skills/route.js +1 -1
  264. package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
  265. package/.next/server/app/api/worktrees/[id]/slash-commands/route.js +1 -1
  266. package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
  267. package/.next/server/app/api/worktrees/[id]/special-keys/route.js +1 -1
  268. package/.next/server/app/api/worktrees/[id]/special-keys/route.js.nft.json +1 -1
  269. package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
  270. package/.next/server/app/api/worktrees/[id]/tasks/route.js +1 -1
  271. package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -1
  272. package/.next/server/app/api/worktrees/[id]/terminal/route.js +1 -1
  273. package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
  274. package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
  275. package/.next/server/app/api/worktrees/[id]/timers/history/route.js +1 -1
  276. package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
  277. package/.next/server/app/api/worktrees/[id]/timers/route.js +1 -1
  278. package/.next/server/app/api/worktrees/[id]/timers/route.js.nft.json +1 -1
  279. package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
  280. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route.js +1 -1
  281. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  282. package/.next/server/app/api/worktrees/[id]/todos/route.js +1 -1
  283. package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
  284. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
  285. package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
  286. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
  287. package/.next/server/app/api/worktrees/[id]/verify/config/route.js +1 -1
  288. package/.next/server/app/api/worktrees/[id]/verify/config/route_client-reference-manifest.js +1 -1
  289. package/.next/server/app/api/worktrees/[id]/verify/route.js +1 -1
  290. package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -1
  291. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route.js +1 -1
  292. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route_client-reference-manifest.js +1 -1
  293. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route.js +1 -1
  294. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -1
  295. package/.next/server/app/api/worktrees/[id]/verify/runs/route.js +1 -1
  296. package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -1
  297. package/.next/server/app/api/worktrees/[id]/viewed/route.js +1 -1
  298. package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
  299. package/.next/server/app/api/worktrees/apply-default-agents/route_client-reference-manifest.js +1 -1
  300. package/.next/server/app/api/worktrees/route.js +1 -1
  301. package/.next/server/app/api/worktrees/route.js.nft.json +1 -1
  302. package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
  303. package/.next/server/app/chat/page.js +2 -2
  304. package/.next/server/app/chat/page.js.nft.json +1 -1
  305. package/.next/server/app/chat/page_client-reference-manifest.js +1 -1
  306. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  307. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  308. package/.next/server/app/more/page.js +2 -2
  309. package/.next/server/app/more/page.js.nft.json +1 -1
  310. package/.next/server/app/more/page_client-reference-manifest.js +1 -1
  311. package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  312. package/.next/server/app/page.js +1 -1
  313. package/.next/server/app/page.js.nft.json +1 -1
  314. package/.next/server/app/page_client-reference-manifest.js +1 -1
  315. package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
  316. package/.next/server/app/repositories/page.js +2 -2
  317. package/.next/server/app/repositories/page.js.nft.json +1 -1
  318. package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
  319. package/.next/server/app/review/page.js +1 -1
  320. package/.next/server/app/review/page.js.nft.json +1 -1
  321. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  322. package/.next/server/app/sessions/page.js +1 -1
  323. package/.next/server/app/sessions/page.js.nft.json +1 -1
  324. package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  325. package/.next/server/app/skills/[skillId]/page.js +2 -2
  326. package/.next/server/app/skills/[skillId]/page.js.nft.json +1 -1
  327. package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
  328. package/.next/server/app/skills/installed/page.js +2 -2
  329. package/.next/server/app/skills/installed/page.js.nft.json +1 -1
  330. package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
  331. package/.next/server/app/skills/page.js +1 -1
  332. package/.next/server/app/skills/page.js.nft.json +1 -1
  333. package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  334. package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
  335. package/.next/server/app/worktrees/[id]/page.js +11 -11
  336. package/.next/server/app/worktrees/[id]/page.js.nft.json +1 -1
  337. package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
  338. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
  339. package/.next/server/app-paths-manifest.json +31 -29
  340. package/.next/server/chunks/1191.js +1 -1
  341. package/.next/server/chunks/1210.js +1 -0
  342. package/.next/server/chunks/153.js +1 -0
  343. package/.next/server/chunks/1886.js +1 -1
  344. package/.next/server/chunks/21.js +1 -0
  345. package/.next/server/chunks/2119.js +1 -1
  346. package/.next/server/chunks/2445.js +1 -1
  347. package/.next/server/chunks/3077.js +67 -0
  348. package/.next/server/chunks/3086.js +1 -0
  349. package/.next/server/chunks/3241.js +1 -1
  350. package/.next/server/chunks/3270.js +1 -0
  351. package/.next/server/chunks/3543.js +1 -1
  352. package/.next/server/chunks/3730.js +1 -0
  353. package/.next/server/chunks/3925.js +1 -0
  354. package/.next/server/chunks/3945.js +1 -1
  355. package/.next/server/chunks/4443.js +2 -1
  356. package/.next/server/chunks/5043.js +1 -1
  357. package/.next/server/chunks/5164.js +1 -1
  358. package/.next/server/chunks/5220.js +1 -1
  359. package/.next/server/chunks/5354.js +1 -1
  360. package/.next/server/chunks/595.js +8 -0
  361. package/.next/server/chunks/6286.js +48 -0
  362. package/.next/server/chunks/6306.js +1 -0
  363. package/.next/server/chunks/6363.js +1 -0
  364. package/.next/server/chunks/6401.js +1 -1
  365. package/.next/server/chunks/6491.js +103 -0
  366. package/.next/server/chunks/6661.js +1 -0
  367. package/.next/server/chunks/6838.js +1 -0
  368. package/.next/server/chunks/7875.js +25 -0
  369. package/.next/server/chunks/7890.js +1 -0
  370. package/.next/server/chunks/8063.js +32 -0
  371. package/.next/server/chunks/8118.js +1 -1
  372. package/.next/server/chunks/{7587.js → 8554.js} +1 -1
  373. package/.next/server/chunks/8687.js +1 -0
  374. package/.next/server/chunks/8800.js +1 -1
  375. package/.next/server/chunks/8807.js +37 -3
  376. package/.next/server/chunks/8918.js +6 -4
  377. package/.next/server/chunks/9123.js +2 -2
  378. package/.next/server/chunks/9130.js +2 -2
  379. package/.next/server/chunks/9584.js +1 -1
  380. package/.next/server/chunks/9627.js +22 -6
  381. package/.next/server/middleware-build-manifest.js +1 -1
  382. package/.next/server/middleware-manifest.json +5 -5
  383. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  384. package/.next/server/pages/500.html +1 -1
  385. package/.next/server/server-reference-manifest.json +1 -1
  386. package/.next/static/UIUPchtWvcEuQgcbGJv4g/_buildManifest.js +1 -0
  387. package/.next/static/chunks/{5694.dda65070757534df.js → 3313.53f7ff985c0c8852.js} +1 -1
  388. package/.next/static/chunks/4718-0053d42fb635e700.js +1 -0
  389. package/.next/static/chunks/{4974-35592ec312322124.js → 5694-498765336d0b8c2b.js} +1 -1
  390. package/.next/static/chunks/{7485.442b21101fca7257.js → 7485.52361bc061cc663a.js} +1 -1
  391. package/.next/static/chunks/8019-cbf130d0e6334d2d.js +1 -0
  392. package/.next/static/chunks/8361-9bb887203c456edb.js +1 -0
  393. package/.next/static/chunks/8772-9be53a530950d804.js +1 -0
  394. package/.next/static/chunks/998-ac0ded6d5eeb4dc0.js +1 -0
  395. package/.next/static/chunks/app/api/agents/update/route-8bc5b680c5f3eae4.js +1 -0
  396. package/.next/static/chunks/app/api/agents/versions/route-8bc5b680c5f3eae4.js +1 -0
  397. package/.next/static/chunks/app/api/app/update/route-8bc5b680c5f3eae4.js +1 -0
  398. package/.next/static/chunks/app/api/app/update-check/route-8bc5b680c5f3eae4.js +1 -0
  399. package/.next/static/chunks/app/api/assistant/conversation/route-8bc5b680c5f3eae4.js +1 -0
  400. package/.next/static/chunks/app/api/assistant/current-output/route-8bc5b680c5f3eae4.js +1 -0
  401. package/.next/static/chunks/app/api/assistant/messages/route-8bc5b680c5f3eae4.js +1 -0
  402. package/.next/static/chunks/app/api/assistant/session/route-8bc5b680c5f3eae4.js +1 -0
  403. package/.next/static/chunks/app/api/assistant/start/route-8bc5b680c5f3eae4.js +1 -0
  404. package/.next/static/chunks/app/api/assistant/terminal/route-8bc5b680c5f3eae4.js +1 -0
  405. package/.next/static/chunks/app/api/assistant/tools/route-8bc5b680c5f3eae4.js +1 -0
  406. package/.next/static/chunks/app/api/auth/login/route-8bc5b680c5f3eae4.js +1 -0
  407. package/.next/static/chunks/app/api/auth/logout/route-8bc5b680c5f3eae4.js +1 -0
  408. package/.next/static/chunks/app/api/auth/status/route-8bc5b680c5f3eae4.js +1 -0
  409. package/.next/static/chunks/app/api/capabilities/route-8bc5b680c5f3eae4.js +1 -0
  410. package/.next/static/chunks/app/api/daily-summary/route-8bc5b680c5f3eae4.js +1 -0
  411. package/.next/static/chunks/app/api/daily-summary/status/route-8bc5b680c5f3eae4.js +1 -0
  412. package/.next/static/chunks/app/api/external-apps/[id]/health/route-8bc5b680c5f3eae4.js +1 -0
  413. package/.next/static/chunks/app/api/external-apps/[id]/route-8bc5b680c5f3eae4.js +1 -0
  414. package/.next/static/chunks/app/api/external-apps/route-8bc5b680c5f3eae4.js +1 -0
  415. package/.next/static/chunks/app/api/fs/browse/route-8bc5b680c5f3eae4.js +1 -0
  416. package/.next/static/chunks/app/api/fs/recent-paths/route-8bc5b680c5f3eae4.js +1 -0
  417. package/.next/static/chunks/app/api/hooks/agent-event/route-8bc5b680c5f3eae4.js +1 -0
  418. package/.next/static/chunks/app/api/hooks/claude-done/route-8bc5b680c5f3eae4.js +1 -0
  419. package/.next/static/chunks/app/api/hooks/permission-request/route-8bc5b680c5f3eae4.js +1 -0
  420. package/.next/static/chunks/app/api/metrics/vibe/route-8bc5b680c5f3eae4.js +1 -0
  421. package/.next/static/chunks/app/api/ollama/models/route-8bc5b680c5f3eae4.js +1 -0
  422. package/.next/static/chunks/app/api/push/escalation/route-8bc5b680c5f3eae4.js +1 -0
  423. package/.next/static/chunks/app/api/push/subscriptions/route-8bc5b680c5f3eae4.js +1 -0
  424. package/.next/static/chunks/app/api/push/vapid/route-8bc5b680c5f3eae4.js +1 -0
  425. package/.next/static/chunks/app/api/relays/[relayId]/cancel/route-8bc5b680c5f3eae4.js +1 -0
  426. package/.next/static/chunks/app/api/relays/route-8bc5b680c5f3eae4.js +1 -0
  427. package/.next/static/chunks/app/api/remote/pair/route-8bc5b680c5f3eae4.js +1 -0
  428. package/.next/static/chunks/app/api/repositories/[id]/route-8bc5b680c5f3eae4.js +1 -0
  429. package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-8bc5b680c5f3eae4.js +1 -0
  430. package/.next/static/chunks/app/api/repositories/[id]/todos/route-8bc5b680c5f3eae4.js +1 -0
  431. package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-8bc5b680c5f3eae4.js +1 -0
  432. package/.next/static/chunks/app/api/repositories/clone/route-8bc5b680c5f3eae4.js +1 -0
  433. package/.next/static/chunks/app/api/repositories/excluded/route-8bc5b680c5f3eae4.js +1 -0
  434. package/.next/static/chunks/app/api/repositories/restore/route-8bc5b680c5f3eae4.js +1 -0
  435. package/.next/static/chunks/app/api/repositories/route-8bc5b680c5f3eae4.js +1 -0
  436. package/.next/static/chunks/app/api/repositories/scan/route-8bc5b680c5f3eae4.js +1 -0
  437. package/.next/static/chunks/app/api/repositories/sync/route-8bc5b680c5f3eae4.js +1 -0
  438. package/.next/static/chunks/app/api/repositories/validate-path/route-8bc5b680c5f3eae4.js +1 -0
  439. package/.next/static/chunks/app/api/settings/default-agents/route-8bc5b680c5f3eae4.js +1 -0
  440. package/.next/static/chunks/app/api/settings/default-surface-mode/route-8bc5b680c5f3eae4.js +1 -0
  441. package/.next/static/chunks/app/api/sidebar/group-order/route-8bc5b680c5f3eae4.js +1 -0
  442. package/.next/static/chunks/app/api/skills/[id]/route-8bc5b680c5f3eae4.js +1 -0
  443. package/.next/static/chunks/app/api/skills/installations/route-8bc5b680c5f3eae4.js +1 -0
  444. package/.next/static/chunks/app/api/skills/operations/route-8bc5b680c5f3eae4.js +1 -0
  445. package/.next/static/chunks/app/api/skills/reindex/route-8bc5b680c5f3eae4.js +1 -0
  446. package/.next/static/chunks/app/api/skills/route-8bc5b680c5f3eae4.js +1 -0
  447. package/.next/static/chunks/app/api/slash-commands/route-8bc5b680c5f3eae4.js +1 -0
  448. package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-8bc5b680c5f3eae4.js +1 -0
  449. package/.next/static/chunks/app/api/tasks/[taskId]/route-8bc5b680c5f3eae4.js +1 -0
  450. package/.next/static/chunks/app/api/templates/[id]/route-8bc5b680c5f3eae4.js +1 -0
  451. package/.next/static/chunks/app/api/templates/route-8bc5b680c5f3eae4.js +1 -0
  452. package/.next/static/chunks/app/api/todos/route-8bc5b680c5f3eae4.js +1 -0
  453. package/.next/static/chunks/app/api/verification/runs/[runId]/route-8bc5b680c5f3eae4.js +1 -0
  454. package/.next/static/chunks/app/api/verification/runs/route-8bc5b680c5f3eae4.js +1 -0
  455. package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-8bc5b680c5f3eae4.js +1 -0
  456. package/.next/static/chunks/app/api/worktrees/[id]/capture/route-8bc5b680c5f3eae4.js +1 -0
  457. package/.next/static/chunks/app/api/worktrees/[id]/clear-composer/route-8bc5b680c5f3eae4.js +1 -0
  458. package/.next/static/chunks/app/api/worktrees/[id]/cli-reference/route-8bc5b680c5f3eae4.js +1 -0
  459. package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-8bc5b680c5f3eae4.js +1 -0
  460. package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-8bc5b680c5f3eae4.js +1 -0
  461. package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-8bc5b680c5f3eae4.js +1 -0
  462. package/.next/static/chunks/app/api/worktrees/[id]/env/route-8bc5b680c5f3eae4.js +1 -0
  463. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-8bc5b680c5f3eae4.js +1 -0
  464. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-8bc5b680c5f3eae4.js +1 -0
  465. package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-8bc5b680c5f3eae4.js +1 -0
  466. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-8bc5b680c5f3eae4.js +1 -0
  467. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-8bc5b680c5f3eae4.js +1 -0
  468. package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-8bc5b680c5f3eae4.js +1 -0
  469. package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-8bc5b680c5f3eae4.js +1 -0
  470. package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-8bc5b680c5f3eae4.js +1 -0
  471. package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-8bc5b680c5f3eae4.js +1 -0
  472. package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-8bc5b680c5f3eae4.js +1 -0
  473. package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-8bc5b680c5f3eae4.js +1 -0
  474. package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-8bc5b680c5f3eae4.js +1 -0
  475. package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-8bc5b680c5f3eae4.js +1 -0
  476. package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-8bc5b680c5f3eae4.js +1 -0
  477. package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-8bc5b680c5f3eae4.js +1 -0
  478. package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-8bc5b680c5f3eae4.js +1 -0
  479. package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-8bc5b680c5f3eae4.js +1 -0
  480. package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-8bc5b680c5f3eae4.js +1 -0
  481. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-8bc5b680c5f3eae4.js +1 -0
  482. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-8bc5b680c5f3eae4.js +1 -0
  483. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-8bc5b680c5f3eae4.js +1 -0
  484. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-8bc5b680c5f3eae4.js +1 -0
  485. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-8bc5b680c5f3eae4.js +1 -0
  486. package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-8bc5b680c5f3eae4.js +1 -0
  487. package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-8bc5b680c5f3eae4.js +1 -0
  488. package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-8bc5b680c5f3eae4.js +1 -0
  489. package/.next/static/chunks/app/api/worktrees/[id]/instances/opencode/route-8bc5b680c5f3eae4.js +1 -0
  490. package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-8bc5b680c5f3eae4.js +1 -0
  491. package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-8bc5b680c5f3eae4.js +1 -0
  492. package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-8bc5b680c5f3eae4.js +1 -0
  493. package/.next/static/chunks/app/api/worktrees/[id]/logs/route-8bc5b680c5f3eae4.js +1 -0
  494. package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-8bc5b680c5f3eae4.js +1 -0
  495. package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-8bc5b680c5f3eae4.js +1 -0
  496. package/.next/static/chunks/app/api/worktrees/[id]/memos/route-8bc5b680c5f3eae4.js +1 -0
  497. package/.next/static/chunks/app/api/worktrees/[id]/messages/route-8bc5b680c5f3eae4.js +1 -0
  498. package/.next/static/chunks/app/api/worktrees/[id]/opencode/diff/route-8bc5b680c5f3eae4.js +1 -0
  499. package/.next/static/chunks/app/api/worktrees/[id]/opencode/session/route-8bc5b680c5f3eae4.js +1 -0
  500. package/.next/static/chunks/app/api/worktrees/[id]/opencode/share/route-8bc5b680c5f3eae4.js +1 -0
  501. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-8bc5b680c5f3eae4.js +1 -0
  502. package/.next/static/chunks/app/api/worktrees/[id]/resolve-target/route-8bc5b680c5f3eae4.js +1 -0
  503. package/.next/static/chunks/app/api/worktrees/[id]/respond/route-8bc5b680c5f3eae4.js +1 -0
  504. package/.next/static/chunks/app/api/worktrees/[id]/route-8bc5b680c5f3eae4.js +1 -0
  505. package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-8bc5b680c5f3eae4.js +1 -0
  506. package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-8bc5b680c5f3eae4.js +1 -0
  507. package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-8bc5b680c5f3eae4.js +1 -0
  508. package/.next/static/chunks/app/api/worktrees/[id]/search/route-8bc5b680c5f3eae4.js +1 -0
  509. package/.next/static/chunks/app/api/worktrees/[id]/send/route-8bc5b680c5f3eae4.js +1 -0
  510. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-8bc5b680c5f3eae4.js +1 -0
  511. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-8bc5b680c5f3eae4.js +1 -0
  512. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-8bc5b680c5f3eae4.js +1 -0
  513. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-8bc5b680c5f3eae4.js +1 -0
  514. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-8bc5b680c5f3eae4.js +1 -0
  515. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-8bc5b680c5f3eae4.js +1 -0
  516. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-8bc5b680c5f3eae4.js +1 -0
  517. package/.next/static/chunks/app/api/worktrees/[id]/skills/route-8bc5b680c5f3eae4.js +1 -0
  518. package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-8bc5b680c5f3eae4.js +1 -0
  519. package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-8bc5b680c5f3eae4.js +1 -0
  520. package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-8bc5b680c5f3eae4.js +1 -0
  521. package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-8bc5b680c5f3eae4.js +1 -0
  522. package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-8bc5b680c5f3eae4.js +1 -0
  523. package/.next/static/chunks/app/api/worktrees/[id]/timers/route-8bc5b680c5f3eae4.js +1 -0
  524. package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-8bc5b680c5f3eae4.js +1 -0
  525. package/.next/static/chunks/app/api/worktrees/[id]/todos/route-8bc5b680c5f3eae4.js +1 -0
  526. package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-8bc5b680c5f3eae4.js +1 -0
  527. package/.next/static/chunks/app/api/worktrees/[id]/tree/route-8bc5b680c5f3eae4.js +1 -0
  528. package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-8bc5b680c5f3eae4.js +1 -0
  529. package/.next/static/chunks/app/api/worktrees/[id]/verify/config/route-8bc5b680c5f3eae4.js +1 -0
  530. package/.next/static/chunks/app/api/worktrees/[id]/verify/route-8bc5b680c5f3eae4.js +1 -0
  531. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route-8bc5b680c5f3eae4.js +1 -0
  532. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-8bc5b680c5f3eae4.js +1 -0
  533. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-8bc5b680c5f3eae4.js +1 -0
  534. package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-8bc5b680c5f3eae4.js +1 -0
  535. package/.next/static/chunks/app/api/worktrees/apply-default-agents/route-8bc5b680c5f3eae4.js +1 -0
  536. package/.next/static/chunks/app/api/worktrees/route-8bc5b680c5f3eae4.js +1 -0
  537. package/.next/static/chunks/app/chat/{page-37d7615d17d7e2a0.js → page-e60d07c4c79602f0.js} +1 -1
  538. package/.next/static/chunks/app/manifest.webmanifest/route-8bc5b680c5f3eae4.js +1 -0
  539. package/.next/static/chunks/app/more/{page-353a3924e6d7968e.js → page-fc94f86aa881489e.js} +1 -1
  540. package/.next/static/chunks/app/{page-c2bf871d953a1d6f.js → page-6871cca022b24807.js} +1 -1
  541. package/.next/static/chunks/app/proxy/[...path]/route-8bc5b680c5f3eae4.js +1 -0
  542. package/.next/static/chunks/app/repositories/{page-7d0f26df0537254c.js → page-788ded1b72963d94.js} +1 -1
  543. package/.next/static/chunks/app/review/{page-e3f141b2829973e9.js → page-35b99baaf3c93b38.js} +1 -1
  544. package/.next/static/chunks/app/sessions/{page-53f188ed9ca49e5f.js → page-fa2d62f3e8436c69.js} +1 -1
  545. package/.next/static/chunks/app/skills/[skillId]/{page-80569b720aea59cc.js → page-06799157652e8fa9.js} +1 -1
  546. package/.next/static/chunks/app/skills/installed/{page-dbd2690ad72da95b.js → page-2f3987e3a131c8d0.js} +1 -1
  547. package/.next/static/chunks/app/skills/{page-dacd36f9c11aa7da.js → page-e70bfcf5ed4e4865.js} +1 -1
  548. package/.next/static/chunks/app/worktrees/[id]/layout-8bc5b680c5f3eae4.js +1 -0
  549. package/.next/static/chunks/app/worktrees/[id]/page-06e1ff5ce2d126fd.js +1 -0
  550. package/.next/static/chunks/webpack-1dc9eb5ebb4fa5ff.js +1 -0
  551. package/.next/static/css/96d94a4ba771efc3.css +1 -0
  552. package/.next/trace +13 -13
  553. package/.next/types/app/api/relays/[relayId]/cancel/route.ts +347 -0
  554. package/.next/types/app/api/relays/route.ts +347 -0
  555. package/.next/types/routes.d.ts +3 -1
  556. package/.next/types/validator.ts +18 -0
  557. package/dist/cli/commands/ask.d.ts +34 -0
  558. package/dist/cli/commands/ask.d.ts.map +1 -0
  559. package/dist/cli/commands/ask.js +494 -0
  560. package/dist/cli/commands/capture.d.ts +20 -0
  561. package/dist/cli/commands/capture.d.ts.map +1 -1
  562. package/dist/cli/commands/capture.js +80 -30
  563. package/dist/cli/commands/docs.d.ts.map +1 -1
  564. package/dist/cli/commands/docs.js +47 -4
  565. package/dist/cli/commands/instances.d.ts +67 -0
  566. package/dist/cli/commands/instances.d.ts.map +1 -1
  567. package/dist/cli/commands/instances.js +103 -7
  568. package/dist/cli/commands/peers.d.ts +64 -0
  569. package/dist/cli/commands/peers.d.ts.map +1 -0
  570. package/dist/cli/commands/peers.js +196 -0
  571. package/dist/cli/commands/relays.d.ts +92 -0
  572. package/dist/cli/commands/relays.d.ts.map +1 -0
  573. package/dist/cli/commands/relays.js +293 -0
  574. package/dist/cli/commands/report.d.ts +3 -0
  575. package/dist/cli/commands/report.d.ts.map +1 -1
  576. package/dist/cli/commands/report.js +29 -1
  577. package/dist/cli/commands/respond.d.ts.map +1 -1
  578. package/dist/cli/commands/respond.js +13 -10
  579. package/dist/cli/commands/send.d.ts.map +1 -1
  580. package/dist/cli/commands/send.js +66 -20
  581. package/dist/cli/commands/task.d.ts.map +1 -1
  582. package/dist/cli/commands/task.js +30 -0
  583. package/dist/cli/commands/wait.d.ts +20 -0
  584. package/dist/cli/commands/wait.d.ts.map +1 -1
  585. package/dist/cli/commands/wait.js +55 -6
  586. package/dist/cli/commands/whoami.d.ts +109 -0
  587. package/dist/cli/commands/whoami.d.ts.map +1 -0
  588. package/dist/cli/commands/whoami.js +271 -0
  589. package/dist/cli/docs/agent-operations.d.ts +25 -1
  590. package/dist/cli/docs/agent-operations.d.ts.map +1 -1
  591. package/dist/cli/docs/agent-operations.js +184 -1
  592. package/dist/cli/index.d.ts +13 -0
  593. package/dist/cli/index.d.ts.map +1 -1
  594. package/dist/cli/index.js +25 -1
  595. package/dist/cli/types/api-responses.d.ts +93 -0
  596. package/dist/cli/types/api-responses.d.ts.map +1 -1
  597. package/dist/cli/types/index.d.ts +16 -0
  598. package/dist/cli/types/index.d.ts.map +1 -1
  599. package/dist/lib/cli/command-reference.d.ts +179 -0
  600. package/dist/lib/cli/command-reference.d.ts.map +1 -0
  601. package/dist/lib/cli/command-reference.js +210 -0
  602. package/dist/lib/detection/ansi.d.ts +14 -1
  603. package/dist/lib/detection/ansi.d.ts.map +1 -1
  604. package/dist/lib/detection/ansi.js +40 -3
  605. package/dist/lib/detection/status-reason.d.ts +28 -0
  606. package/dist/lib/detection/status-reason.d.ts.map +1 -1
  607. package/dist/lib/detection/status-reason.js +28 -0
  608. package/dist/lib/detection/tools/verified-against.d.ts +24 -24
  609. package/dist/lib/detection/tools/verified-against.js +24 -24
  610. package/dist/server/locales/en/worktree.json +1425 -0
  611. package/dist/server/locales/ja/worktree.json +1425 -0
  612. package/dist/server/src/lib/auto-yes-poller.js +26 -11
  613. package/dist/server/src/lib/db/chat-db.js +204 -7
  614. package/dist/server/src/lib/db/migrations/index.js +2 -0
  615. package/dist/server/src/lib/db/migrations/runner.js +1 -1
  616. package/dist/server/src/lib/db/migrations/v60-session-relays.js +110 -0
  617. package/dist/server/src/lib/db/relay-db.js +343 -0
  618. package/dist/server/src/lib/detection/ansi.js +40 -3
  619. package/dist/server/src/lib/detection/cli-patterns.js +157 -23
  620. package/dist/server/src/lib/detection/model-info-extractor.js +185 -4
  621. package/dist/server/src/lib/detection/selection-shape.js +72 -1
  622. package/dist/server/src/lib/detection/status-reason.js +28 -0
  623. package/dist/server/src/lib/detection/tools/antigravity/detect.js +105 -25
  624. package/dist/server/src/lib/detection/tools/antigravity/dialog.js +239 -0
  625. package/dist/server/src/lib/detection/tools/command-code/detect.js +33 -0
  626. package/dist/server/src/lib/detection/tools/verified-against.js +24 -24
  627. package/dist/server/src/lib/history/user-turn-recorder.js +79 -16
  628. package/dist/server/src/lib/hooks/hook-settings-generator.js +16 -0
  629. package/dist/server/src/lib/hooks/sources/claude/model-switch.js +169 -0
  630. package/dist/server/src/lib/hooks/sources/claude/source.js +14 -1
  631. package/dist/server/src/lib/polling/response-checker.js +55 -2
  632. package/dist/server/src/lib/polling/structured-history-gate.js +14 -1
  633. package/dist/server/src/lib/push/index.js +13 -1
  634. package/dist/server/src/lib/push/model-change-push-notifier.js +174 -0
  635. package/dist/server/src/lib/push/push-sender.js +48 -20
  636. package/dist/server/src/lib/realtime/model-change-broadcast.js +171 -0
  637. package/dist/server/src/lib/realtime/terminal-broadcast.js +5 -0
  638. package/dist/server/src/lib/realtime/types.js +19 -1
  639. package/dist/server/src/lib/realtime/waiting-broadcast.js +25 -0
  640. package/dist/server/src/lib/relay/relay-delivery.js +400 -0
  641. package/dist/server/src/lib/relay/relay-messages.js +144 -0
  642. package/dist/server/src/lib/relay/relay-policy.js +127 -0
  643. package/dist/server/src/lib/relay/relay-readiness.js +63 -0
  644. package/dist/server/src/lib/relay/relay-session-ref.js +72 -0
  645. package/dist/server/src/lib/relay/relay-system-line.js +79 -0
  646. package/dist/server/src/lib/relay/relay-triggers.js +177 -0
  647. package/dist/server/src/lib/relay/types.js +25 -0
  648. package/dist/server/src/lib/session/agent-event-state.js +344 -12
  649. package/dist/server/src/lib/session/current-output-builder.js +18 -0
  650. package/dist/server/src/lib/session/send-user-message.js +1 -0
  651. package/package.json +1 -1
  652. package/.next/server/chunks/1058.js +0 -1
  653. package/.next/server/chunks/1068.js +0 -1
  654. package/.next/server/chunks/1990.js +0 -103
  655. package/.next/server/chunks/261.js +0 -1
  656. package/.next/server/chunks/2739.js +0 -1
  657. package/.next/server/chunks/2839.js +0 -1
  658. package/.next/server/chunks/3869.js +0 -1
  659. package/.next/server/chunks/4325.js +0 -1
  660. package/.next/server/chunks/4393.js +0 -1
  661. package/.next/server/chunks/5017.js +0 -1
  662. package/.next/server/chunks/5120.js +0 -1
  663. package/.next/server/chunks/552.js +0 -25
  664. package/.next/server/chunks/6130.js +0 -1
  665. package/.next/server/chunks/6894.js +0 -8
  666. package/.next/server/chunks/7187.js +0 -1
  667. package/.next/server/chunks/7472.js +0 -1
  668. package/.next/server/chunks/7836.js +0 -1
  669. package/.next/server/chunks/7859.js +0 -21
  670. package/.next/server/chunks/9696.js +0 -3
  671. package/.next/server/chunks/9798.js +0 -2
  672. package/.next/static/GiOqe8rfQGQ0NvzB5qr3q/_buildManifest.js +0 -1
  673. package/.next/static/chunks/1783-11c9b4d8a52ebd91.js +0 -1
  674. package/.next/static/chunks/4718-0d4d93c4c75f336e.js +0 -1
  675. package/.next/static/chunks/6170-951b9f5fe6b4b3b5.js +0 -1
  676. package/.next/static/chunks/8019-f8e73c1fb5f6f0d3.js +0 -1
  677. package/.next/static/chunks/8593-fa0eb2802e0ce68a.js +0 -1
  678. package/.next/static/chunks/app/api/agents/update/route-ee11f7b8a34cba8c.js +0 -1
  679. package/.next/static/chunks/app/api/agents/versions/route-ee11f7b8a34cba8c.js +0 -1
  680. package/.next/static/chunks/app/api/app/update/route-ee11f7b8a34cba8c.js +0 -1
  681. package/.next/static/chunks/app/api/app/update-check/route-ee11f7b8a34cba8c.js +0 -1
  682. package/.next/static/chunks/app/api/assistant/conversation/route-ee11f7b8a34cba8c.js +0 -1
  683. package/.next/static/chunks/app/api/assistant/current-output/route-ee11f7b8a34cba8c.js +0 -1
  684. package/.next/static/chunks/app/api/assistant/messages/route-ee11f7b8a34cba8c.js +0 -1
  685. package/.next/static/chunks/app/api/assistant/session/route-ee11f7b8a34cba8c.js +0 -1
  686. package/.next/static/chunks/app/api/assistant/start/route-ee11f7b8a34cba8c.js +0 -1
  687. package/.next/static/chunks/app/api/assistant/terminal/route-ee11f7b8a34cba8c.js +0 -1
  688. package/.next/static/chunks/app/api/assistant/tools/route-ee11f7b8a34cba8c.js +0 -1
  689. package/.next/static/chunks/app/api/auth/login/route-ee11f7b8a34cba8c.js +0 -1
  690. package/.next/static/chunks/app/api/auth/logout/route-ee11f7b8a34cba8c.js +0 -1
  691. package/.next/static/chunks/app/api/auth/status/route-ee11f7b8a34cba8c.js +0 -1
  692. package/.next/static/chunks/app/api/capabilities/route-ee11f7b8a34cba8c.js +0 -1
  693. package/.next/static/chunks/app/api/daily-summary/route-ee11f7b8a34cba8c.js +0 -1
  694. package/.next/static/chunks/app/api/daily-summary/status/route-ee11f7b8a34cba8c.js +0 -1
  695. package/.next/static/chunks/app/api/external-apps/[id]/health/route-ee11f7b8a34cba8c.js +0 -1
  696. package/.next/static/chunks/app/api/external-apps/[id]/route-ee11f7b8a34cba8c.js +0 -1
  697. package/.next/static/chunks/app/api/external-apps/route-ee11f7b8a34cba8c.js +0 -1
  698. package/.next/static/chunks/app/api/fs/browse/route-ee11f7b8a34cba8c.js +0 -1
  699. package/.next/static/chunks/app/api/fs/recent-paths/route-ee11f7b8a34cba8c.js +0 -1
  700. package/.next/static/chunks/app/api/hooks/agent-event/route-ee11f7b8a34cba8c.js +0 -1
  701. package/.next/static/chunks/app/api/hooks/claude-done/route-ee11f7b8a34cba8c.js +0 -1
  702. package/.next/static/chunks/app/api/hooks/permission-request/route-ee11f7b8a34cba8c.js +0 -1
  703. package/.next/static/chunks/app/api/metrics/vibe/route-ee11f7b8a34cba8c.js +0 -1
  704. package/.next/static/chunks/app/api/ollama/models/route-ee11f7b8a34cba8c.js +0 -1
  705. package/.next/static/chunks/app/api/push/escalation/route-ee11f7b8a34cba8c.js +0 -1
  706. package/.next/static/chunks/app/api/push/subscriptions/route-ee11f7b8a34cba8c.js +0 -1
  707. package/.next/static/chunks/app/api/push/vapid/route-ee11f7b8a34cba8c.js +0 -1
  708. package/.next/static/chunks/app/api/remote/pair/route-ee11f7b8a34cba8c.js +0 -1
  709. package/.next/static/chunks/app/api/repositories/[id]/route-ee11f7b8a34cba8c.js +0 -1
  710. package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-ee11f7b8a34cba8c.js +0 -1
  711. package/.next/static/chunks/app/api/repositories/[id]/todos/route-ee11f7b8a34cba8c.js +0 -1
  712. package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-ee11f7b8a34cba8c.js +0 -1
  713. package/.next/static/chunks/app/api/repositories/clone/route-ee11f7b8a34cba8c.js +0 -1
  714. package/.next/static/chunks/app/api/repositories/excluded/route-ee11f7b8a34cba8c.js +0 -1
  715. package/.next/static/chunks/app/api/repositories/restore/route-ee11f7b8a34cba8c.js +0 -1
  716. package/.next/static/chunks/app/api/repositories/route-ee11f7b8a34cba8c.js +0 -1
  717. package/.next/static/chunks/app/api/repositories/scan/route-ee11f7b8a34cba8c.js +0 -1
  718. package/.next/static/chunks/app/api/repositories/sync/route-ee11f7b8a34cba8c.js +0 -1
  719. package/.next/static/chunks/app/api/repositories/validate-path/route-ee11f7b8a34cba8c.js +0 -1
  720. package/.next/static/chunks/app/api/settings/default-agents/route-ee11f7b8a34cba8c.js +0 -1
  721. package/.next/static/chunks/app/api/settings/default-surface-mode/route-ee11f7b8a34cba8c.js +0 -1
  722. package/.next/static/chunks/app/api/sidebar/group-order/route-ee11f7b8a34cba8c.js +0 -1
  723. package/.next/static/chunks/app/api/skills/[id]/route-ee11f7b8a34cba8c.js +0 -1
  724. package/.next/static/chunks/app/api/skills/installations/route-ee11f7b8a34cba8c.js +0 -1
  725. package/.next/static/chunks/app/api/skills/operations/route-ee11f7b8a34cba8c.js +0 -1
  726. package/.next/static/chunks/app/api/skills/reindex/route-ee11f7b8a34cba8c.js +0 -1
  727. package/.next/static/chunks/app/api/skills/route-ee11f7b8a34cba8c.js +0 -1
  728. package/.next/static/chunks/app/api/slash-commands/route-ee11f7b8a34cba8c.js +0 -1
  729. package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-ee11f7b8a34cba8c.js +0 -1
  730. package/.next/static/chunks/app/api/tasks/[taskId]/route-ee11f7b8a34cba8c.js +0 -1
  731. package/.next/static/chunks/app/api/templates/[id]/route-ee11f7b8a34cba8c.js +0 -1
  732. package/.next/static/chunks/app/api/templates/route-ee11f7b8a34cba8c.js +0 -1
  733. package/.next/static/chunks/app/api/todos/route-ee11f7b8a34cba8c.js +0 -1
  734. package/.next/static/chunks/app/api/verification/runs/[runId]/route-ee11f7b8a34cba8c.js +0 -1
  735. package/.next/static/chunks/app/api/verification/runs/route-ee11f7b8a34cba8c.js +0 -1
  736. package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-ee11f7b8a34cba8c.js +0 -1
  737. package/.next/static/chunks/app/api/worktrees/[id]/capture/route-ee11f7b8a34cba8c.js +0 -1
  738. package/.next/static/chunks/app/api/worktrees/[id]/clear-composer/route-ee11f7b8a34cba8c.js +0 -1
  739. package/.next/static/chunks/app/api/worktrees/[id]/cli-reference/route-ee11f7b8a34cba8c.js +0 -1
  740. package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-ee11f7b8a34cba8c.js +0 -1
  741. package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-ee11f7b8a34cba8c.js +0 -1
  742. package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-ee11f7b8a34cba8c.js +0 -1
  743. package/.next/static/chunks/app/api/worktrees/[id]/env/route-ee11f7b8a34cba8c.js +0 -1
  744. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-ee11f7b8a34cba8c.js +0 -1
  745. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-ee11f7b8a34cba8c.js +0 -1
  746. package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-ee11f7b8a34cba8c.js +0 -1
  747. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-ee11f7b8a34cba8c.js +0 -1
  748. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-ee11f7b8a34cba8c.js +0 -1
  749. package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-ee11f7b8a34cba8c.js +0 -1
  750. package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-ee11f7b8a34cba8c.js +0 -1
  751. package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-ee11f7b8a34cba8c.js +0 -1
  752. package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-ee11f7b8a34cba8c.js +0 -1
  753. package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-ee11f7b8a34cba8c.js +0 -1
  754. package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-ee11f7b8a34cba8c.js +0 -1
  755. package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-ee11f7b8a34cba8c.js +0 -1
  756. package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-ee11f7b8a34cba8c.js +0 -1
  757. package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-ee11f7b8a34cba8c.js +0 -1
  758. package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-ee11f7b8a34cba8c.js +0 -1
  759. package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-ee11f7b8a34cba8c.js +0 -1
  760. package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-ee11f7b8a34cba8c.js +0 -1
  761. package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-ee11f7b8a34cba8c.js +0 -1
  762. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-ee11f7b8a34cba8c.js +0 -1
  763. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-ee11f7b8a34cba8c.js +0 -1
  764. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-ee11f7b8a34cba8c.js +0 -1
  765. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-ee11f7b8a34cba8c.js +0 -1
  766. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-ee11f7b8a34cba8c.js +0 -1
  767. package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-ee11f7b8a34cba8c.js +0 -1
  768. package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-ee11f7b8a34cba8c.js +0 -1
  769. package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-ee11f7b8a34cba8c.js +0 -1
  770. package/.next/static/chunks/app/api/worktrees/[id]/instances/opencode/route-ee11f7b8a34cba8c.js +0 -1
  771. package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-ee11f7b8a34cba8c.js +0 -1
  772. package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-ee11f7b8a34cba8c.js +0 -1
  773. package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-ee11f7b8a34cba8c.js +0 -1
  774. package/.next/static/chunks/app/api/worktrees/[id]/logs/route-ee11f7b8a34cba8c.js +0 -1
  775. package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-ee11f7b8a34cba8c.js +0 -1
  776. package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-ee11f7b8a34cba8c.js +0 -1
  777. package/.next/static/chunks/app/api/worktrees/[id]/memos/route-ee11f7b8a34cba8c.js +0 -1
  778. package/.next/static/chunks/app/api/worktrees/[id]/messages/route-ee11f7b8a34cba8c.js +0 -1
  779. package/.next/static/chunks/app/api/worktrees/[id]/opencode/diff/route-ee11f7b8a34cba8c.js +0 -1
  780. package/.next/static/chunks/app/api/worktrees/[id]/opencode/session/route-ee11f7b8a34cba8c.js +0 -1
  781. package/.next/static/chunks/app/api/worktrees/[id]/opencode/share/route-ee11f7b8a34cba8c.js +0 -1
  782. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-ee11f7b8a34cba8c.js +0 -1
  783. package/.next/static/chunks/app/api/worktrees/[id]/resolve-target/route-ee11f7b8a34cba8c.js +0 -1
  784. package/.next/static/chunks/app/api/worktrees/[id]/respond/route-ee11f7b8a34cba8c.js +0 -1
  785. package/.next/static/chunks/app/api/worktrees/[id]/route-ee11f7b8a34cba8c.js +0 -1
  786. package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-ee11f7b8a34cba8c.js +0 -1
  787. package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-ee11f7b8a34cba8c.js +0 -1
  788. package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-ee11f7b8a34cba8c.js +0 -1
  789. package/.next/static/chunks/app/api/worktrees/[id]/search/route-ee11f7b8a34cba8c.js +0 -1
  790. package/.next/static/chunks/app/api/worktrees/[id]/send/route-ee11f7b8a34cba8c.js +0 -1
  791. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-ee11f7b8a34cba8c.js +0 -1
  792. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-ee11f7b8a34cba8c.js +0 -1
  793. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-ee11f7b8a34cba8c.js +0 -1
  794. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-ee11f7b8a34cba8c.js +0 -1
  795. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-ee11f7b8a34cba8c.js +0 -1
  796. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-ee11f7b8a34cba8c.js +0 -1
  797. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-ee11f7b8a34cba8c.js +0 -1
  798. package/.next/static/chunks/app/api/worktrees/[id]/skills/route-ee11f7b8a34cba8c.js +0 -1
  799. package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-ee11f7b8a34cba8c.js +0 -1
  800. package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-ee11f7b8a34cba8c.js +0 -1
  801. package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-ee11f7b8a34cba8c.js +0 -1
  802. package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-ee11f7b8a34cba8c.js +0 -1
  803. package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-ee11f7b8a34cba8c.js +0 -1
  804. package/.next/static/chunks/app/api/worktrees/[id]/timers/route-ee11f7b8a34cba8c.js +0 -1
  805. package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-ee11f7b8a34cba8c.js +0 -1
  806. package/.next/static/chunks/app/api/worktrees/[id]/todos/route-ee11f7b8a34cba8c.js +0 -1
  807. package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-ee11f7b8a34cba8c.js +0 -1
  808. package/.next/static/chunks/app/api/worktrees/[id]/tree/route-ee11f7b8a34cba8c.js +0 -1
  809. package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-ee11f7b8a34cba8c.js +0 -1
  810. package/.next/static/chunks/app/api/worktrees/[id]/verify/config/route-ee11f7b8a34cba8c.js +0 -1
  811. package/.next/static/chunks/app/api/worktrees/[id]/verify/route-ee11f7b8a34cba8c.js +0 -1
  812. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route-ee11f7b8a34cba8c.js +0 -1
  813. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-ee11f7b8a34cba8c.js +0 -1
  814. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-ee11f7b8a34cba8c.js +0 -1
  815. package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-ee11f7b8a34cba8c.js +0 -1
  816. package/.next/static/chunks/app/api/worktrees/apply-default-agents/route-ee11f7b8a34cba8c.js +0 -1
  817. package/.next/static/chunks/app/api/worktrees/route-ee11f7b8a34cba8c.js +0 -1
  818. package/.next/static/chunks/app/manifest.webmanifest/route-ee11f7b8a34cba8c.js +0 -1
  819. package/.next/static/chunks/app/proxy/[...path]/route-ee11f7b8a34cba8c.js +0 -1
  820. package/.next/static/chunks/app/worktrees/[id]/layout-ee11f7b8a34cba8c.js +0 -1
  821. package/.next/static/chunks/app/worktrees/[id]/page-7a0915e32a2af4d3.js +0 -1
  822. package/.next/static/chunks/webpack-9f75198882fdaf08.js +0 -1
  823. package/.next/static/css/5c13ea243dfdcb66.css +0 -1
  824. /package/.next/static/{GiOqe8rfQGQ0NvzB5qr3q → UIUPchtWvcEuQgcbGJv4g}/_ssgManifest.js +0 -0
@@ -0,0 +1,103 @@
1
+ "use strict";exports.id=6491,exports.ids=[6491],exports.modules={682:(a,b,c)=>{c.d(b,{c:()=>f});let d=/^[^\S\n]*[│┃]?[^\S\n]*([❯›●>])?[^\S\n]*(\d{1,2})[.)][^\S\n]+(\S.*?)[^\S\n]*[│┃]?$/;function e(a){let b=d.exec(a);if(!b)return null;let c=Number(b[2]);return!Number.isInteger(c)||c<1?null:{glyph:b[1],number:c,label:b[3].trim()}}function f(a,b,c=8){let d=Math.min(b,a.length)-1,g=0,h=[],i=null;for(;d>=0&&g<=c;){let b=a[d];if(""===b.trim()){d--;continue}if(g++,i=e(b))break;h.unshift(b.trim()),d--}if(!i)return null;let j=d,k=[i],l=i.number-1,m=d-1,n=1,o=[];for(;l>=1&&m>=0&&n<=60;){let b=a[m];if(n++,""===b.trim()){m--;continue}let c=e(b);if(c&&c.number===l){k.unshift({...c,label:[c.label,...o].join(" ").trim()}),o=[],l--,m--;continue}if(c)break;o.unshift(b.trim()),m--}if(0!==l||k.length<2)return null;let p=k.findIndex(a=>void 0!==a.glyph);return{options:k.map(a=>a.label),selectedIndex:p,selectedGlyph:p<0?null:k[p].glyph??null,firstRow:m+1,lastRow:j,footer:h.join("\n")}}},26895:(a,b,c)=>{c.d(b,{gF:()=>n,xn:()=>g});var d=c(72626),e=c(69119),f=c(68652);function g(a,b="yes_no"){let c=a.toLowerCase().trim();if("multiple_choice"===b){if(/^\d+$/.test(c))return c;throw Error("Invalid answer for multiple choice prompt. Expected a number.")}if("yes"===c||"y"===c)return"y";if("no"===c||"n"===c)return"n";throw Error("Invalid answer for yes/no prompt. Expected 'yes', 'no', 'y', or 'n'.")}let h=(0,d.h)("prompt-detector"),i=null;function j(a){let b=a.split("\n"),c=(b.length>200?b.slice(-200):b).join("\n");return c.length>5e3&&(c=c.slice(-5e3)),c}let k=[{regex:/^(.+)\s+\(y\/n\)\s*$/m},{regex:/^(.+)\s+\[y\/N\]\s*$/m,defaultOption:"no"},{regex:/^(.+)\s+\[Y\/n\]\s*$/m,defaultOption:"yes"},{regex:/^(.+)\s+\(yes\/no\)\s*$/m}];function l(a,b,c,d){let{startLine:f,endLine:g}=function(a,b,c){let d=c.index??0,e=a=>a.split("\n").length-1,f=b+e(a.slice(0,d));return{startLine:f,endLine:f+e(c[0])}}(b,c,d);return(0,e.ZH)(a,(0,e.wf)(a,f),g+1)}function m(a,b,c,d,e){return{isPrompt:!0,promptData:{type:"yes_no",question:a,options:["yes","no"],status:"pending",...void 0!==e&&{defaultOption:e},instructionText:c,...void 0!==d&&{approvalTarget:d}},cleanContent:b,rawContent:c}}function n(a,b){let c=(0,f.N)(a),d=c===a&&b?.precomputedLines?b.precomputedLines:c.split("\n"),g=d.slice(-50).join("\n"),n=g===i;n||h.debug("detectPrompt:start",{outputLength:c.length}),i=g;let o=d.slice(-20).join("\n"),p=Math.max(0,d.length-20),q=(0,e.rS)(c,b,j);if(q.isPrompt)return n||h.info("detectPrompt:multipleChoice",{isPrompt:!0,question:q.promptData?.question,optionsCount:q.promptData?.options?.length}),q;let r=o.trim();for(let a of k){let b=o.match(a.regex);if(b){let c=b[1].trim();return m(c,c,r,l(d,o,p,b),a.defaultOption)}}let s=o.match(/^(.*?)Approve\?\s*$/m);if(s){let a=s[1].trim();return m(a?`${a} Approve?`:"Approve?",a||"Approve?",r,l(d,o,p,s))}return n||h.debug("detectPrompt:complete",{isPrompt:!1}),{isPrompt:!1,cleanContent:c.trim()}}},28861:(a,b,c)=>{c.d(b,{g:()=>l});var d=c(85164),e=c(69119),f=c(68652),g=c(682);let h=/^\s*●\s/,i=/^\s*─{3,}\s*$/,j=/[??]\s*$/;function k(a){let b=a.split("\n"),c=(b.length>200?b.slice(-200):b).join("\n");return c.length>5e3?c.slice(-5e3):c}function l(a){let b=(0,f.N)(a),c=b.split("\n"),l=function(a){let b=(0,d.dx)(a);if(null===b)return null;let c=a.slice(b.start,b.footer);if(c.some(a=>d.d0.test(a)))return null;let e=(0,g.c)(c,c.length,12);if(null===e)return null;let f=[...e.options];if(""!==e.footer){let a=f.length-1;f[a]=[f[a],...e.footer.split("\n")].join(" ").trim()}let h=b.start+e.firstRow,k=-1,l=-1,m=0;for(let c=h-1;c>=b.start&&m<3;c--){let b=a[c];if(""!==b.trim()){if(d.OM.test(b)||i.test(b))break;if(m++,l<0&&(l=c),j.test(b)){k=c;break}}}return k<0&&(k=l),{question:k<0?"Please select an option:":a[k].trim(),options:f,selectedIndex:e.selectedIndex,questionRow:k<0?h:k,firstOptionRow:h,footerRow:b.footer}}(c);return null===l?null:(0,e.xe)(l.question,l.options.map((a,b)=>({number:b+1,label:a,isDefault:b===l.selectedIndex})),{instructionText:function(a,b){let c=(0,d.dx)(a),e=c?.start??b.questionRow,f=Math.max(0,b.questionRow-40);for(let c=b.questionRow-1;c>=f;c--)if(h.test(a[c])){e=c+1;break}let g=a.slice(e,b.footerRow+1).filter(a=>!i.test(a)).map(a=>a.trimEnd()).join("\n").trim();return g.length>0?g:void 0}(c,l),approvalTarget:(0,e.ZH)(c,(0,e.wf)(c,l.questionRow),l.footerRow)},b,k)}},30008:(a,b,c)=>{c.d(b,{F1:()=>g,_G:()=>i,j0:()=>f,rB:()=>h,xF:()=>j});var d=c(48083),e=c(67882);let f=3e5,g="CM_STRUCTURED_SEND_GUARD";function h(a){return"notification"===a.source?e.Oh.PERMISSION_PROMPT:e.Oh.PERMISSION_REQUEST}function i({worktreeId:a,cliToolId:b,instanceId:c,scraper:e,ignoreStructured:i=!1,now:j=Date.now()}){var k,l,m;let n=(0,d.P5)(a,b,c,j);null!==n&&("waiting"===e.status?(0,d.zA)(a,b,c,j):n.scraperCorroborated&&((0,d.m5)(a,b,c),n=null));let o=e.hasActivePrompt||null!==n;if(e.hasActivePrompt)return{waiting:o,scraperWaiting:!0,structured:n,blocksSend:!0,blockedBy:"scraper",blockReason:e.reason,structuredSendBlockSuppressed:null};if(null===n)return{waiting:o,scraperWaiting:!1,structured:null,blocksSend:!1,blockedBy:null,blockReason:null,structuredSendBlockSuppressed:null};let p=(k=n,l=i,m=j,l?"caller_opt_out":!function(){let a=process.env[g]?.trim().toLowerCase();return"off"===a||"0"===a||"false"===a}()?m-k.at>=f?"expired":null:"disabled");return{waiting:o,scraperWaiting:!1,structured:n,blocksSend:null===p,blockedBy:null===p?"structured":null,blockReason:null===p?h(n):null,structuredSendBlockSuppressed:p}}function j({worktreeId:a,cliToolId:b,instanceId:c,scraper:e,now:f=Date.now()}){let g=(0,d.P5)(a,b,c,f);return{waiting:e.hasActivePrompt||null!==g,scraperWaiting:e.hasActivePrompt,structured:g}}},31990:(a,b,c)=>{c.d(b,{Wh:()=>Q,WD:()=>R,Lw:()=>T,K1:()=>P,N5:()=>S});var d=c(43234),e=c(72626),f=c(79892);let g={streamingOutput:!1,explicitResize:!1,snapshotFallback:!0};class h{async unsubscribe(){}}class i{async ensureSession(a,b){await (0,f.N)(a)||await (0,f.jw)(a,b)}async sessionExists(a){return(0,f.N)(a)}async sendInput(a,b){await (0,f.V1)(a,b)}async sendSpecialKey(a,b){if("Escape"!==b&&"C-c"!==b&&"C-d"!==b&&"C-m"!==b&&"Enter"!==b)throw Error(`Unsupported special key for PollingTmuxTransport: ${b}`);await (0,f.ds)(a,b)}async resize(){throw Error("PollingTmuxTransport does not support explicit resize")}async captureSnapshot(a,b){return(0,f.Xg)(a,b)}async subscribe(){return new h}getCapabilities(){return g}async killSession(a){return(0,f.fY)(a)}}let j=null;var k=c(93997),l=c(79646),m=c(28354),n=c(31442),o=c(29021),p=c(21820),q=c(33873),r=c(16983);let s="cm-live-restore.sh",t="cm-live-delegate.sh",u="cm-auto-popup.sh",v=`#!/bin/sh
2
+ # CommandMate live-attach restore (Issue #2317) — generated file, edits are overwritten.
3
+ #
4
+ # sh ~/.commandmate/bin/${s} <session> [control_mode] [width] [height]
5
+ #
6
+ # Pins the session's window back to CommandMate's canvas once no human client is
7
+ # attached to it any more. Safe to run when nothing is delegated: it then simply
8
+ # re-applies the geometry the session already has.
9
+ set -u
10
+
11
+ SESSION="\${1:-}"
12
+ CONTROL_MODE="\${2:-0}"
13
+ WIDTH="\${3:-${r.Jn}}"
14
+ HEIGHT="\${4:-${r.sO}}"
15
+
16
+ case "$SESSION" in
17
+ ${n.HL}*) ;;
18
+ *) exit 0 ;;
19
+ esac
20
+
21
+ # A control-mode client detaching is CommandMate's own transport reconnecting,
22
+ # not the human leaving. Doing the restore here would fight the human's attach.
23
+ if [ "$CONTROL_MODE" = "1" ]; then
24
+ exit 0
25
+ fi
26
+
27
+ # Anyone left who is NOT a control client? Then the geometry is still theirs.
28
+ HUMANS=$(tmux list-clients -t "=$SESSION:" -F '#{client_control_mode}' 2>/dev/null \\
29
+ | grep -c -v '^1$') || HUMANS=0
30
+ if [ "\${HUMANS:-0}" -gt 0 ]; then
31
+ exit 0
32
+ fi
33
+
34
+ tmux set-window-option -t "=$SESSION:" window-size manual 2>/dev/null || exit 0
35
+ tmux resize-window -t "=$SESSION:" -x "$WIDTH" -y "$HEIGHT" 2>/dev/null || true
36
+ tmux set-option -u -t "=$SESSION:" @cm_delegated 2>/dev/null || true
37
+ `,w=`#!/bin/sh
38
+ # CommandMate live-attach delegate (Issue #2317) — generated file, edits are overwritten.
39
+ #
40
+ # sh ~/.commandmate/bin/${t} <session> <control_mode> [client]
41
+ #
42
+ # Hands the session's window from CommandMate's pinned canvas to the terminal
43
+ # that just attached, so an alternate-screen agent re-lays-out and its transcript
44
+ # becomes readable. Installed as a session-scoped \`client-attached[0]\` hook only
45
+ # when CM_LIVE_ATTACH_HOOK=on; \`commandmate attach --live\` does the same two
46
+ # writes itself and needs no hook.
47
+ #
48
+ # The window is put back by whoever notices the human is gone first: the CLI on
49
+ # return from attach-session, or the server's status poll. This script never
50
+ # restores — the attach edge is the only edge tmux 3.5a lets a session-scoped
51
+ # hook see.
52
+ set -u
53
+
54
+ SESSION="\${1:-}"
55
+ CONTROL_MODE="\${2:-0}"
56
+
57
+ case "$SESSION" in
58
+ ${n.HL}claude-*) ;;
59
+ *) exit 0 ;;
60
+ esac
61
+
62
+ # A control-mode client is CommandMate's own transport. Handing it the geometry
63
+ # would resize the canvas to whatever that connection negotiated, which is the
64
+ # #1163 regression this whole feature is built to avoid.
65
+ if [ "$CONTROL_MODE" = "1" ]; then
66
+ exit 0
67
+ fi
68
+
69
+ # Raised BEFORE the size change, so a status poll landing between the two sees
70
+ # "delegated, still pinned" rather than "not delegated, 44 rows".
71
+ tmux set-option -t "=$SESSION:" @cm_delegated 1 2>/dev/null || exit 0
72
+ tmux set-window-option -t "=$SESSION:" window-size latest 2>/dev/null || true
73
+ `,x=`#!/bin/sh
74
+ # CommandMate auto read popup (Issue #2317) — generated file, edits are overwritten.
75
+ #
76
+ # sh ~/.commandmate/bin/${u} <session> <control_mode> <client>
77
+ #
78
+ # Opens the following transcript popup for a human client attaching to a
79
+ # CommandMate session. Never opens for a control-mode client.
80
+ set -u
81
+
82
+ SESSION="\${1:-}"
83
+ CONTROL_MODE="\${2:-0}"
84
+ CLIENT="\${3:-}"
85
+
86
+ case "$SESSION" in
87
+ ${n.HL}*) ;;
88
+ *) exit 0 ;;
89
+ esac
90
+
91
+ if [ "$CONTROL_MODE" = "1" ]; then
92
+ exit 0
93
+ fi
94
+
95
+ PAGER_SCRIPT="$HOME/.commandmate/bin/cm-read-pane.sh"
96
+ [ -x "$PAGER_SCRIPT" ] || exit 0
97
+
98
+ if [ -n "$CLIENT" ]; then
99
+ tmux display-popup -c "$CLIENT" -w 90% -h 85% -E "sh \\"$PAGER_SCRIPT\\" --follow \\"$SESSION\\"" 2>/dev/null || true
100
+ else
101
+ tmux display-popup -w 90% -h 85% -E "sh \\"$PAGER_SCRIPT\\" --follow \\"$SESSION\\"" 2>/dev/null || true
102
+ fi
103
+ `;function y(a,b){let c,d=(0,q.join)((0,q.join)((0,p.homedir)(),".commandmate","bin"),a);if((0,o.mkdirSync)((0,q.dirname)(d),{recursive:!0}),(0,o.existsSync)(d))try{c=(0,o.readFileSync)(d,"utf-8")}catch{c=void 0}return c!==b&&(0,o.writeFileSync)(d,b,{mode:493}),(0,o.chmodSync)(d,493),d}var z=c(83598);let A=(0,m.promisify)(l.execFile),B=(0,e.h)("tmux-session-hooks"),C=globalThis.__cmEnsuredSessionHooks??(globalThis.__cmEnsuredSessionHooks=new Set);async function D(a){if((0,n.N_)(a)&&!C.has(a)){C.add(a);try{if((0,n.gM)()&&(0,n.n9)(a)){y(s,v);let b=(0,n.Rr)(a,y(t,w));b&&await A("tmux",b,{timeout:5e3})}else await A("tmux",(0,n.g4)(a),{timeout:5e3});if((0,n.jx)()){let b=(0,n.Ls)(a,y(u,x));b&&await A("tmux",b,{timeout:5e3})}else await A("tmux",(0,n.sL)(a),{timeout:5e3})}catch(b){B.debug("session-hooks:reconcile-failed",{sessionName:a,error:b instanceof Error?b.message:String(b)})}}}async function E(a){try{if(!await (0,z.Us)(a)||await (0,z.Fh)(a))return!1;for(let b of(0,n.RS)(a))await A("tmux",b,{timeout:5e3});return B.info("session-hooks:geometry-restored",{sessionName:a}),!0}catch(b){return B.debug("session-hooks:geometry-restore-failed",{sessionName:a,error:b instanceof Error?b.message:String(b)}),!1}}let F=(0,m.promisify)(l.execFile),G=(0,e.h)("tmux-session-status"),H=globalThis.__cmPublishedTmuxStatus??(globalThis.__cmPublishedTmuxStatus=new Map),I=globalThis.__cmClearedTmuxStatus??(globalThis.__cmClearedTmuxStatus=new Set);async function J(a){let{sessionName:b,worktreeId:c,cliToolId:d,instanceId:e,status:f}=a;if(!(0,n.om)())return I.has(b)||(I.add(b),await L(b)),"disabled";let g=H.get(b);if(g&&g.status===f&&g.worktreeId===c&&g.cliToolId===d&&g.instanceId===e)return"unchanged";let h=(a.now??new Date).toISOString(),i=[[n.eC,f],[n.jp,c],[n.wv,d],[n.L0,e],[n.tx,h]];try{for(let[a,c]of i)await F("tmux",(0,n.ND)(b,a,c),{timeout:5e3});return H.set(b,{status:f,worktreeId:c,cliToolId:d,instanceId:e}),await K(b),"written"}catch(a){return H.delete(b),G.debug("session-status:write-failed",{sessionName:b,error:a instanceof Error?a.message:String(a)}),"error"}}async function K(a){try{let{stdout:b}=await F("tmux",(0,n.Ys)(a,"status-right"),{timeout:5e3}),c=b.trim();if(""!==c&&!c.includes(n.lY))return G.debug("session-status:status-right-user-owned",{sessionName:a,existing:c}),!1;return""===c&&await F("tmux",(0,n.KB)(a,n.lY),{timeout:5e3}),!0}catch(b){return G.debug("session-status:status-right-failed",{sessionName:a,error:b instanceof Error?b.message:String(b)}),!1}}async function L(a){for(let b of(H.delete(a),n.bq))try{await F("tmux",(0,n.cD)(a,b),{timeout:5e3})}catch{}try{let{stdout:b}=await F("tmux",(0,n.Ys)(a,"status-right"),{timeout:5e3});b.includes(n.lY)&&await F("tmux",(0,n.$D)(a),{timeout:5e3})}catch{}}let M=(0,e.h)("cli-session");function N(){return j||(j=new i),j}function O(a,b,c){let e=d.CLIToolManager.getInstance().getTool(b),f=e.getSessionName(a,c);return{cliTool:e,sessionName:f}}async function P(a,b,c){let{sessionName:d}=O(a,b,c);return N().sessionExists(d)}async function Q(a,b,c=1e3,d){let e=M.withContext({worktreeId:a,cliToolId:b});e.debug("captureSessionOutput:start",{requestedLines:c});let{cliTool:f,sessionName:g}=O(a,b,d),h=N();try{let a=await (0,k.aq)(g,c,async()=>{if(!await h.sessionExists(g))throw Error(`${f.name} session ${g} does not exist`);return await h.captureSnapshot(g,{startLine:-k.xE})});return e.debug("captureSessionOutput:success",{actualLines:a.split("\n").length,lastFewLines:a.split("\n").slice(-3).join(" | ")}),a}catch(b){let a=b instanceof Error?b.message:String(b);if(a.includes("does not exist"))throw e.debug("captureSessionOutput:sessionNotFound",{sessionName:g}),b;throw e.error("captureSessionOutput:failed",{error:a}),Error(`Failed to capture ${f.name} output: ${a}`)}}async function R(a,b,c=5e3,d){let e=M.withContext({worktreeId:a,cliToolId:b});e.debug("captureSessionOutputFresh:start",{requestedLines:c});let{cliTool:f,sessionName:g}=O(a,b,d),h=N();try{let a=await h.captureSnapshot(g,{startLine:-c});return a.length>0?(0,k.vF)(g,a,c):(0,k.gm)(g),(0,k.wd)(a,c)}catch(b){(0,k.gm)(g);let a=b instanceof Error?b.message:String(b);throw e.error("captureSessionOutputFresh:failed",{error:a}),Error(`Failed to capture ${f.name} output: ${a}`)}}async function S(a){await D(a.sessionName),(0,n.n9)(a.sessionName)&&await E(a.sessionName),await J(a)}function T(a){H.delete(a),I.delete(a),C.delete(a),(0,z.G9)(a)}},37717:(a,b,c)=>{c.d(b,{g:()=>d});let d={PROMPT_DETECTED:"prompt_detected",THINKING_INDICATOR:"thinking_indicator",OPENCODE_PROCESSING_INDICATOR:"opencode_processing_indicator",OPENCODE_SELECTION_LIST:"opencode_selection_list",OPENCODE_MODAL_OVERLAY:"opencode_modal_overlay",OPENCODE_PERMISSION_PROMPT:"opencode_permission_prompt",CLAUDE_SELECTION_LIST:"claude_selection_list",COMMAND_CODE_SELECTION_LIST:"command_code_selection_list",COMMAND_CODE_DISMISSABLE_PANEL:"command_code_dismissable_panel",COPILOT_SELECTION_LIST:"copilot_selection_list",CODEX_SELECTION_LIST:"codex_selection_list",CODEX_PAGER:"codex_pager",CODEX_HOOKS_REVIEW:"codex_hooks_review",ANTIGRAVITY_SELECTION_LIST:"antigravity_selection_list",OPENCODE_RESPONSE_COMPLETE:"opencode_response_complete",INPUT_PROMPT:"input_prompt",NO_RECENT_OUTPUT:"no_recent_output",EXITED:"exited",UNKNOWN_FRAME:"unknown_frame",DEFAULT:"default"}},43484:(a,b,c)=>{c.d(b,{bN:()=>ao});var d=c(85164),e=c(37717),f=c(26895);let g=["enforce","observe","legacy"],h={claude:"observe",copilot:"enforce",opencode:"enforce",codex:"legacy",gemini:"legacy",antigravity:"legacy","vibe-local":"legacy","command-code":"legacy"},i=globalThis.__idleEvidenceObservations??(globalThis.__idleEvidenceObservations=new Map),j=new Set(["opencode","codex","claude","copilot"]);function k(a){return{...a,detect:(b,c)=>(function(a,b,c={}){let k=a.beforePrompt?.(b)??null;if(k)return k;let l=(0,d.KO)(a.tool),m=j.has(a.tool)?(0,d._A)(b.clean):(0,d._A)(b.lastLines),n=(0,f.gF)(m,l);if(n.isPrompt)if(!a.isStalePrompt?.(b,n))return{status:"waiting",confidence:"high",reason:e.g.PROMPT_DETECTED,hasActivePrompt:!0,evidence:"positive",promptDetection:n};else n={...n,isPrompt:!1,promptData:void 0};let o=a.afterPrompt?.(b,n)??null;if(o)return{...o,promptDetection:o.promptDetection??n};if((0,d.ut)(a.tool,b.thinkingLines))return{status:"running",confidence:"high",reason:e.g.THINKING_INDICATOR,hasActivePrompt:!1,evidence:"positive",promptDetection:n};let p=a.afterThinking?.(b,n)??null;if(p)return{...p,promptDetection:p.promptDetection??n};if(!a.skipGenericInputPrompt){let{promptPattern:c}=(0,d._X)(a.tool);if(c.test(b.lastLines))return{status:"ready",confidence:"high",reason:e.g.INPUT_PROMPT,hasActivePrompt:!1,evidence:function(a,b){if(void 0===a.readIdleEvidence)return"positive";let c=function(a,b=process.env){let c=b.CM_DETECTION_IDLE_EVIDENCE,d=null,e=null;if("string"==typeof c&&""!==c.trim())for(let b of c.split(",")){let[c,f]=b.split("=");if(void 0===f)continue;let h=c.trim(),i=f.trim();g.includes(i)&&("*"===h?d=i:h===a&&(e=i))}return e??d??h[a]??"legacy"}(a.tool);if("legacy"===c)return"positive";let d=a.readIdleEvidence(b);var e=a.tool;let f=i.get(e)??{mode:c,positive:0,none:0};return f.mode=c,"positive"===d?f.positive+=1:f.none+=1,i.set(e,f),"observe"===c?"positive":d}(a,b),promptDetection:n}}return c.lastOutputTimestamp&&Date.now()-c.lastOutputTimestamp.getTime()>5e3?{status:"running",confidence:"low",reason:e.g.NO_RECENT_OUTPUT,hasActivePrompt:!1,evidence:"none",promptDetection:n}:{status:"running",confidence:"low",reason:a.unreadableReason??e.g.DEFAULT,hasActivePrompt:!1,evidence:"none",promptDetection:n}})(a,b,c),detectDialog:a.detectDialog??(()=>null),hasDialogRules:void 0!==a.detectDialog}}var l=c(1804),m=c(28861);let n=l.yh,o={status:"waiting",confidence:"high",reason:e.g.ANTIGRAVITY_SELECTION_LIST,hasActivePrompt:!1,evidence:"positive"},p=k({tool:"antigravity",verifiedAgainst:n,beforePrompt(a){if(function(a){let b=a.slice(-3),c=b.findIndex(a=>d.HR.test(a));if(c<0)return!1;let{promptPattern:e}=(0,d._X)("antigravity");return!b.slice(c+1).some(a=>e.test(a))}(a.contentLines))return o;if(!d.kT.test(a.lastLines))return null;let b=(0,d._A)(a.clean);if((0,d.bH)(b)){let a=(0,m.g)(b);return null!==a?{status:"waiting",confidence:"high",reason:e.g.PROMPT_DETECTED,hasActivePrompt:!0,evidence:"positive",promptDetection:a}:{status:"running",confidence:"low",reason:e.g.UNKNOWN_FRAME,hasActivePrompt:!1,evidence:"none"}}return o},afterThinking(a){if((0,d.ut)("antigravity",a.lastLines))return{status:"running",confidence:"high",reason:e.g.THINKING_INDICATOR,hasActivePrompt:!1,evidence:"positive"};let{promptPattern:b}=(0,d._X)("antigravity");return b.test(a.lastLines)?{status:"ready",confidence:"high",reason:e.g.INPUT_PROMPT,hasActivePrompt:!1,evidence:"positive"}:null}});var q=c(94154),r=c(69119),s=c(682);let t=/esc\s+to\s+cancel|enter\s+to\s+(?:select|confirm|set\s+as\s+default)/i,u=new Set(["❯",">"]),v=/do you want to\b|allow\b.*\?$/i,w=/ready to submit your answers\?|review your answers/i,x=/set\s+as\s+default/i,y=/^\s*[✻✽✶✢✳⦿◉●·⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏]\s+\S+\s+for\s+(?:\d+m\s*)?\d+(?:\.\d+)?s(?:\s|$|\s*·)/,z=/^\s*╭─+\s*Claude Code v/,A=/^\s*[>❯]\s+\S/,B=/·\s*\/effort\s*$/;function C(a){let b=(0,q.p4)(a),c=b?b.openingSeparator:a.length,d=(0,r.oT)(a,0,c),e=c-1;for(;e>=0&&(""===a[e].trim()||d.has(e)||B.test(a[e]));)e--;return e}let D=k({tool:"claude",verifiedAgainst:l.iE,afterPrompt:a=>d.XY.test(a.lastLines)?{status:"waiting",confidence:"high",reason:e.g.CLAUDE_SELECTION_LIST,hasActivePrompt:!1,evidence:"positive"}:null,afterThinking:a=>d.aU.test(a.lastLines)?{status:"running",confidence:"high",reason:e.g.THINKING_INDICATOR,hasActivePrompt:!1,evidence:"positive"}:null,readIdleEvidence:function(a){let b=C(a.contentLines);if(b>=0&&y.test(a.contentLines[b]))return"positive";let c=(0,q.p4)(a.contentLines),d=a.contentLines.slice(0,c?c.openingSeparator:void 0),e=d.some(a=>z.test(a)),f=d.some(a=>A.test(a));return e&&!f?"positive":"none"},detectDialog:a=>(function(a,b){var c;if(b.transcriptTail<0)return null;let e=(0,d._A)(a.clean).split("\n"),f=(0,s.c)(e,b.transcriptTail+1);if(!f||null===f.selectedGlyph||!u.has(f.selectedGlyph))return null;let g=f.footer.trim();return""===g||t.test(g)?{kind:(c=function(a,b){let c=[];for(let d=b-1;d>=0&&c.length<4;d--){let b=a[d].trim();""!==b&&c.push(b)}return c.join("\n")}(e,f.firstRow),w.test(c)?"ask_user":x.test(g)?"picker":v.test(c)?"permission":"dialog"),options:f.options,answerMode:"numbered"}:null})(a,{transcriptTail:C(a.contentLines)})}),E=(0,c(72626).h)("codex-dialog-rules"),F={version:"0.153.2"},G=/press\s+\S+\s+to\s+\S|esc\s+(?:to\s+)?(?:cancel|close|dismiss|quit|exit|back|go\s+back)/i,H={bold:!1,dim:!1,coloured:!1};function I(a){let b=a.split("\n");for(let a=b.length-1;a>=0;a--){let c=function(a){if(!a.includes("\x1b"))return null;let b=function(a){let b=[],c=H,d=0;for(;d<a.length;){let e=a[d];if("\x1b"!==e){b.push({ch:e,attrs:c}),d++;continue}let f=a[d+1];if("["===f){let b=d+2;for(;b<a.length&&!/[A-Za-z]/.test(a[b]);)b++;if(b>=a.length)break;"m"===a[b]&&(c=function(a,b){let c=""===a?["0"]:a.split(";"),{bold:d,dim:e,coloured:f}=b;for(let a=0;a<c.length;a++){let b=""===c[a]?0:Number(c[a]);if(!Number.isNaN(b)){if(38===b){let b=""===c[a+1]||void 0===c[a+1]?-1:Number(c[a+1]);5===b?a+=2:2===b?a+=4:a+=1,f=!0;continue}if(48===b||58===b){let b=""===c[a+1]||void 0===c[a+1]?-1:Number(c[a+1]);5===b?a+=2:2===b?a+=4:a+=1;continue}0===b?(d=!1,e=!1,f=!1):1===b?d=!0:2===b?e=!0:22===b?(d=!1,e=!1):39===b?f=!1:(b>=30&&b<=37||b>=90&&b<=97)&&(f=!0)}}return{bold:d,dim:e,coloured:f}}(a.slice(d+2,b),c)),d=b+1;continue}if("]"===f){let b=d+2;for(;b<a.length;){if("\x07"===a[b]){b++;break}if("\x1b"===a[b]&&"\\"===a[b+1]){b+=2;break}b++}d=b;continue}d+=2}return b}(a),c=b.findIndex(a=>""!==a.ch.trim());if(c<0||"›"!==b[c].ch)return null;let d=b[c].attrs;if(d.dim)return"transcript-echo";let e=b.slice(c+1).find(a=>""!==a.ch.trim());return e?.attrs.bold||d.coloured?"option":"composer"}(b[a]);if(null!==c)return{kind:c,row:a}}return null}let J=new Set,K={"hooks-review":"permission","hooks-list":"picker","hooks-detail":"picker",update:"update",trust:"trust"};var L=c(74258),M=c(46423);let N=l.jP,O=/press\s+(?:number|enter)\s+to\s+confirm/i,P=/^\s*[❯›●]?\s*\d{1,2}[.)]\s/;function Q(a){for(let b=a.length-1;b>=Math.max(0,a.length-10);b--)if(d.aW.test(a[b]))return b;return -1}function R(a){let b=Q(a),c=b>=0?b-1:a.length-1;for(;c>=0&&""===a[c].trim();)c--;return c+1}function S(a){let b=Q(a),c=b>=0?b:a.length,e=-1,f=-1;for(let b=0;b<c;b++){let c=a[b],g=c.trim();""!==g&&((O.test(g)||P.test(g))&&(e=b),(0,d.ut)("codex",c)&&(f=b))}return e>=0&&f>e}function T(a){return I(a)?.kind==="option"}let U=k({tool:"codex",verifiedAgainst:N,beforePrompt(a){let{contentLines:b}=a;if(d.pn.test(a.lastLines))return{status:"waiting",confidence:"high",reason:e.g.CODEX_PAGER,hasActivePrompt:!1,evidence:"positive",promptDetection:(0,f.gF)((0,d._A)(a.clean),(0,d.KO)("codex"))};let c=(0,d.E6)(a.clean);if("hooks-list"===c||"hooks-detail"===c)return{status:"waiting",confidence:"high",reason:e.g.CODEX_HOOKS_REVIEW,hasActivePrompt:!1,evidence:"positive",promptDetection:(0,f.gF)((0,d._A)(a.clean),(0,d.KO)("codex"))};let g=Q(b),h=g>=0?g-1:b.length-1;for(;h>=0&&""===b[h].trim();)h--;if(h>=0){let c=b.slice(Math.max(0,h-L.h+1),h+1).join("\n");if(d.Jn.test(c)){let g=(0,f.gF)((0,d._A)(a.clean),(0,d.KO)("codex"));return g.isPrompt&&((g.promptData?.question?.trim()??"").endsWith("?")||d.Dd.test(c))&&!S(b)?{status:"waiting",confidence:"high",reason:e.g.PROMPT_DETECTED,hasActivePrompt:!0,evidence:"positive",promptDetection:g}:{status:"waiting",confidence:"high",reason:e.g.CODEX_SELECTION_LIST,hasActivePrompt:!1,evidence:"positive",promptDetection:g}}}let i=function(a,b,c){let d=I(a),e=(0,s.c)(b,c),f=null!==e&&"›"===e.selectedGlyph,g=d?.kind==="option"?"glyph":f&&d?.kind!=="composer"&&d?.kind!=="transcript-echo"?"numbered-block":null;if(null===g)return null;let h=null!==e?e.footer:function(a,b,c){let d=[];for(let e=b+1;e<c&&d.length<8;e++){let b=a[e].trim();""!==b&&d.push(b)}return d.join("\n")}(b,function(a,b){for(let c=Math.min(b,a.length)-1;c>=0;c--)if(a[c].trimStart().startsWith("›"))return c;return -1}(b,c),c);return{by:g,options:e?.options??[],footer:h,footerRecognised:G.test(h)}}(a.raw,b,R(b));if(i&&!S(b)){i.footerRecognised||function(a){let b=a.slice(0,200);!J.has(b)&&(J.size>=64||(J.add(b),E.warn("codexDialogFooterUnrecognised",{footer:b,verifiedAgainst:F.version,hint:"codex reworded a dialog footer; widen CODEX_DIALOG_FOOTER_PATTERN after re-capturing the frame"})))}(i.footer);let b=(0,f.gF)((0,d._A)(a.clean),(0,d.KO)("codex"));return b.isPrompt?{status:"waiting",confidence:"high",reason:e.g.PROMPT_DETECTED,hasActivePrompt:!0,evidence:"positive",promptDetection:b}:{status:"waiting",confidence:"high",reason:e.g.CODEX_SELECTION_LIST,hasActivePrompt:!1,evidence:"positive",promptDetection:b}}return null},isStalePrompt:a=>S(a.contentLines),detectDialog:a=>(function(a,b){let c=(0,d._A)(a.clean).split("\n"),e=(0,s.c)(c,b.contentEnd);if(b.lifecycleDialog)return{kind:K[b.lifecycleDialog],options:e?.options??[],answerMode:"numbered"};if(!e||!d.Jn.test(e.footer)||b.stalePrompt)return null;let f=function(a,b){let c=[];for(let d=b-1;d>=0&&c.length<4;d--){let b=a[d].trim();""!==b&&c.push(b)}return c.join("\n")}(c,e.firstRow);return{kind:d.Dd.test(e.footer)||f.split("\n")[0]?.endsWith("?")?"permission":"picker",options:e.options,answerMode:"numbered"}})(a,{contentEnd:R(a.contentLines),stalePrompt:S(a.contentLines),lifecycleDialog:(0,d.E6)(a.clean)}),afterThinking(a){let{contentLines:b}=a,c=Q(b);if(c>=0){let f=c-1;for(;f>=0&&""===b[f].trim();)f--;if(f>=0){let c=b.slice(Math.max(0,f-M.$+1),f+1).join("\n");return(0,d.ut)("codex",c)?{status:"running",confidence:"high",reason:e.g.THINKING_INDICATOR,hasActivePrompt:!1,evidence:"positive"}:d.gm.test(b[f].trim())&&!T(a.raw)?{status:"ready",confidence:"high",reason:e.g.INPUT_PROMPT,hasActivePrompt:!1,evidence:"positive"}:{status:"running",confidence:"high",reason:e.g.THINKING_INDICATOR,hasActivePrompt:!1,evidence:"positive"}}}else{let c=b.length-1;for(;c>=0&&""===b[c].trim();)c--;if(!(c>=0&&d.gm.test(b[c].trim())&&!T(a.raw))&&(0,d.ut)("codex",a.lastLines))return{status:"running",confidence:"high",reason:e.g.THINKING_INDICATOR,hasActivePrompt:!1,evidence:"positive"}}return null}});c(51297);let V=/\benter\s+to\s+select\b\s*[·•]\s*esc\s+to\s+cancel\b/i,W=/^\s*(?:press|hit|type)?\s*(?:<)?esc(?:ape)?(?:>)?\s+to\s+(?:close|dismiss|exit)\b[\s.·•]*$/im,X=k({tool:"command-code",verifiedAgainst:l.ji,afterPrompt:a=>W.test(a.lastLines)?{status:"waiting",confidence:"high",reason:e.g.COMMAND_CODE_DISMISSABLE_PANEL,hasActivePrompt:!1,evidence:"positive"}:V.test(a.lastLines)?{status:"waiting",confidence:"high",reason:e.g.COMMAND_CODE_SELECTION_LIST,hasActivePrompt:!1,evidence:"positive"}:null,afterThinking(a){if((0,d.ut)("command-code",a.lastLines))return{status:"running",confidence:"high",reason:e.g.THINKING_INDICATOR,hasActivePrompt:!1,evidence:"positive"};let{promptPattern:b}=(0,d._X)("command-code");return b.test(a.lastLines)?{status:"ready",confidence:"high",reason:e.g.INPUT_PROMPT,hasActivePrompt:!1,evidence:"positive"}:null}}),Y=/do you want to\b/i,Z=k({tool:"copilot",verifiedAgainst:l.MJ,beforePrompt(a){if((0,d.gT)(a.contentLines)){let b=(0,d.KO)("copilot"),c=(0,f.gF)((0,d._A)(a.clean),b);return c.isPrompt&&(c.promptData?.options?.length??0)<=3?{status:"waiting",confidence:"high",reason:e.g.PROMPT_DETECTED,hasActivePrompt:!0,evidence:"positive",promptDetection:c}:{status:"waiting",confidence:"high",reason:e.g.COPILOT_SELECTION_LIST,hasActivePrompt:!1,evidence:"positive",promptDetection:c}}if("working"===(0,d.Wn)(a.contentLines)){let b=(0,d.KO)("copilot"),c=(0,f.gF)((0,d._A)(a.clean),b);return{status:"running",confidence:"high",reason:e.g.THINKING_INDICATOR,hasActivePrompt:!1,evidence:"positive",promptDetection:c}}return null},afterThinking:a=>"idle"===(0,d.Wn)(a.contentLines)?{status:"ready",confidence:"high",reason:e.g.INPUT_PROMPT,hasActivePrompt:!1,evidence:"positive"}:null,skipGenericInputPrompt:!0,readIdleEvidence:function(a){return"idle"===(0,d.Wn)(a.contentLines)?"positive":"none"},detectDialog:a=>(function(a,b){if(null!==b.statusBar)return null;let c=(0,d._A)(a.clean).split("\n"),e=(0,s.c)(c,b.contentEnd);if(e&&d.V.test(e.footer)){let a=function(a,b){let c=[];for(let d=b-1;d>=0&&c.length<4;d--){let b=a[d].trim();""!==b&&c.push(b)}return c.join("\n")}(c,e.firstRow);return{kind:d.rX.some(b=>a.includes(b))?"trust":Y.test(a)?"permission":"picker",options:e.options,answerMode:"numbered"}}return b.selectionFrame?{kind:"picker",options:[],answerMode:"keys"}:null})(a,{statusBar:(0,d.Wn)(a.contentLines),selectionFrame:(0,d.gT)(a.contentLines),contentEnd:a.contentLines.length}),unreadableReason:e.g.UNKNOWN_FRAME});var $=c(76777),_=c(50524);let aa=/\x1b\[[0-9;]*[a-zA-Z]|\x1b\][^\x07\x1b]*(?:\x07|\x1b\\)|\[[0-9;]*m/g,ab=/^(?:\x1b\[|\[)([0-9;]*)m$/,ac=new Set([38,48,58]);function ad(a){let b;aa.lastIndex=0;let c=[],d="",e=null,f=0,g=0,h=0;for(;null!==(b=aa.exec(a));){let i=a.slice(h,b.index);d+=i,f+=(0,_.LQ)(i),h=b.index+b[0].length;let j=ab.exec(b[0]);if(null===j)continue;let k=function(a,b){let c=(""===b?"0":b).split(";"),d=a;for(let a=0;a<c.length;a++){let b=Number(""===c[a]?"0":c[a]);if(Number.isFinite(b)){if(ac.has(b)){let e="2"===c[a+1]?4:2*("5"===c[a+1]);e>0&&48===b&&(d=c.slice(a,a+1+e).join(";")),a+=e;continue}0===b||49===b?d=null:(b>=40&&b<=47||b>=100&&b<=107)&&(d=c[a])}}return d}(e,j[1]);k!==e&&(f>g&&c.push({bg:e,start:g,end:f}),e=k,g=f)}let i=a.slice(h);d+=i,(f+=(0,_.LQ)(i))>g&&c.push({bg:e,start:g,end:f});let j=new Set(c.map(a=>a.start));return c.length>0&&j.add(c[c.length-1].end),{text:d,segments:c,edges:j,width:f}}function ae(a,b){for(let c of a.segments)if(c.start<=b&&b<c.end)return c.bg;return null}let af=/\S[^\S\n]{2,}esc[^\S\n]*$/,ag=/^[│┃╹]/;function ah(a,b,c){if(!a.edges.has(b)||!a.edges.has(c))return!1;for(let d of a.segments)if(!(d.end<=b)&&!(d.start>=c)&&null===d.bg)return!1;return!(ae(a,b-1)===ae(a,b)||c<a.width&&ae(a,c)===ae(a,c-1)||ag.test((0,_.Ml)(a.text,b-1,b)))&&!ag.test((0,_.Ml)(a.text,b,c))}function ai(a){let b=function(a){let b=a.split("\n").map(ad),c=new Set,d=null;for(let a of b){if(!a.text.includes("esc"))continue;let e=[...a.edges].sort((a,b)=>a-b);for(let f of e)if(!(f<1))for(let g of e){if(g-f<16)continue;let e=`${f}:${g}`;if(c.has(e)||!ah(a,f,g))continue;let h=(0,_.Ml)(a.text,f,g);if(!af.test(h))continue;c.add(e);let i=b.filter(a=>ah(a,f,g));if(i.length<3)continue;let j=i.indexOf(a);j<0||j>=3||(null===d||i.length>d.rows)&&(d={id:"opencode_modal_overlay",headerText:(0,$.D)(h.trim(),200,"…[truncated]"),left:f,right:g,rows:i.length,headerRow:j,frameRowStart:b.indexOf(i[0]),frameRowEnd:b.indexOf(i[i.length-1])})}}return d}(a);return null===b?null:{id:b.id,headerText:b.headerText,left:b.left,right:b.right,rows:b.rows,headerRow:b.headerRow}}let aj=/\s{2,}/;function ak(a){let b=(0,d._A)(a.clean).split("\n"),c=Math.max(0,b.length-7);for(let a=b.length-1;a>=Math.max(0,b.length-10);a--)if(/ctrl\+[tp]/.test(b[a])){c=Math.max(0,a-2);break}let e=b.slice(0,c),f=e.length-1;for(;f>=0&&""===e[f].trim();)f--;return{candidates:e,lastIndex:f}}let al=k({tool:"opencode",verifiedAgainst:l.BG,afterThinking(a){if(d.Ty.test(a.lastLines))return{status:"waiting",confidence:"high",reason:e.g.OPENCODE_PERMISSION_PROMPT,hasActivePrompt:!1,evidence:"positive"};if(d.kD.test(a.lastLines))return{status:"running",confidence:"high",reason:e.g.OPENCODE_PROCESSING_INDICATOR,hasActivePrompt:!1,evidence:"positive"};let{candidates:b,lastIndex:c}=ak(a);if(c<0)return null;let f=b.slice(Math.max(0,c-M.$+1),c+1).join("\n");if((0,d.ut)("opencode",f))return{status:"running",confidence:"high",reason:e.g.THINKING_INDICATOR,hasActivePrompt:!1,evidence:"positive"};let g=b.slice(Math.max(0,c-L.h+1),c+1).join("\n");if(d.LO.test(b.join("\n")))return{status:"waiting",confidence:"high",reason:e.g.OPENCODE_SELECTION_LIST,hasActivePrompt:!1,evidence:"positive"};if(null!==ai(a.raw))return{status:"waiting",confidence:"high",reason:e.g.OPENCODE_MODAL_OVERLAY,hasActivePrompt:!1,evidence:"positive"};if(d.$t.test(g))return{status:"ready",confidence:"high",reason:e.g.OPENCODE_RESPONSE_COMPLETE,hasActivePrompt:!1,evidence:"positive"};let h=a.lines.slice(Math.max(0,c-L.h+1),c+1).join("\n");return d.vU.test(h)?{status:"ready",confidence:"high",reason:e.g.INPUT_PROMPT,hasActivePrompt:!1,evidence:"positive"}:null},skipGenericInputPrompt:!0,readIdleEvidence:function(a){let{candidates:b,lastIndex:c}=ak(a);if(c<0)return"none";let e=b.slice(Math.max(0,c-L.h+1),c+1).join("\n");if(d.$t.test(e))return"positive";let f=a.lines.slice(Math.max(0,c-L.h+1),c+1).join("\n");return d.vU.test(f)?"positive":"none"},detectDialog(a){var b;let{candidates:c}=ak(a);return b={contentWindow:c.join("\n")},d.Ty.test(a.lastLines)?{kind:"permission",options:function(a){for(let b of a.lines){let a=d.Ty.exec(b);if(a)return a[0].replace(/^[^\S\n]*[│┃][^\S\n]*/,"").trim().split(aj).map(a=>a.trim()).filter(a=>""!==a)}return[]}(a),answerMode:"keys"}:d.LO.test(b.contentWindow)||null!==ai(a.raw)?{kind:"picker",options:[],answerMode:"keys"}:null},unreadableReason:e.g.UNKNOWN_FRAME});function am(a){return k({tool:a,verifiedAgainst:l.hB})}let an={claude:D,codex:U,copilot:Z,opencode:al,antigravity:p,"command-code":X,gemini:am("gemini"),"vibe-local":am("vibe-local")};function ao(a){return an[a]??am(a)}Object.values(an)},50524:(a,b,c)=>{c.d(b,{LQ:()=>g,Ml:()=>f,sh:()=>e});let d=/^\p{M}$/u;function e(a,b){if(a.length<=b)return a.length;let c=0,e=0;for(let f of a){let a=+!d.test(f);if(1===a&&c>=b)break;c+=a,e+=f.length}return e}function f(a,b,c){return a.slice(e(a,b),e(a,c))}function g(a){let b=0;for(let c of a)d.test(c)||(b+=1);return b}},68652:(a,b,c)=>{c.d(b,{N:()=>g});let d=/Esc\s+to\s+cancel\s*[·•]\s*Tab\s+to\s+amend/i,e=/Enter\s+to\s+select\b.*\bnavigate\b/i,f=/^\s*[>❯]\s*(?:\d{1,2}[.)])?|esc\s+to\s+interrupt|[✻✽✶✢✳⦿◉●⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏]\s+.+…/i;function g(a){if(""===a)return"";let b=a.split("\n"),c=-1;for(let a=b.length-1;a>=0;a--){var g;if(g=b[a],d.test(g)||e.test(g)){c=a;break}}let h=b;return c>=0&&(h=b.slice(c+1).some(a=>f.test(a))?b.slice(c+1):b.slice(0,c+1)),(function(a){let b=[],c=!1;for(let d of a){let a=""===d.trim();a&&c||(b.push(d),c=a)}for(;b.length>0&&""===b[b.length-1].trim();)b.pop();return b})(h).join("\n")}},69119:(a,b,c)=>{c.d(b,{ZH:()=>z,oT:()=>j,rS:()=>B,wf:()=>y,xe:()=>A});var d=c(68652),e=c(85164);let f=/^\s*[\u276F\u25CF\u203A][^\d]*(\d+)(?:\.(?!\d)|\s{2,})\s*(.+)$/,g=/^\s*[^\d]{0,3}(\d+)(?:\.(?!\d)|\s+)\s*(.+)$/,h=/^\s*\d{1,3}\s+tasks?\s+\(\d+\s+done\b/i,i=/^\s*[◼◻]\s/;function j(a,b,c){let d=new Set;for(let e=Math.max(0,b);e<Math.min(c,a.length);e++)if(h.test(a[e])){d.add(e);for(let b=e+1;b<Math.min(c,a.length);b++){let c=a[b];if(!i.test(c)&&!m.test(c))break;d.add(b)}}return d}let k=/^[-─]+$/,l=/^\s*\[[^\]]*\d+\s+lines?\]/i,m=/^\s*[…]?\s*[+\-↑↓⏵⏷]?\s*\d+\s+(?:pending|more|completed)\b/i,n=/Esc\s+to\s+cancel\s*[·•]\s*Tab\s+to\s+amend/i,o=/Enter\s+to\s+select\b.*\bnavigate\b/i,p=/press\s+(?:enter|number)\s+to\s+confirm/i,q=/press\s+number\s+to\s+confirm/i,r=/(?:select|choose|pick|which|what|how|where|enter|type|specify|confirm|approve|accept|reject|decide|preference|option)/i,s=[/type\s+here/i,/tell\s+(me|claude)/i,/enter\s+/i,/custom/i,/differently/i];function t(a,b){if(0===b.length)return!0;let c=b[0].number;return a<c&&a>=c-2}function u(a){return{isPrompt:!1,cleanContent:a.trim()}}function v(a){return 0!==a.length&&!!(a.includes("?")||a.includes("?")||r.test(a))}function w(a,b){let c=b.endsWith("?")||b.endsWith("?");return!!(!c&&/^\s{2,}[^\d]/.test(a)&&!/^\s*\d+\./.test(a)||!c&&/^\s{4,}/.test(a)&&!/^\s*\d+\.\s/.test(a)||b.length<5&&!c||/^[\/~]/.test(b)||b.length>=2&&/^[a-zA-Z0-9_-]+$/.test(b))}let x=/^[⏺⎿●○•✔✓✖✗✘›»❯└├>]/;function y(a,b){let c=Math.max(0,b-12);for(let d=b-1;d>=c;d--)if(function(a){if(void 0===a)return!1;let b=a.trim();return""!==b&&(x.test(b)||k.test(b))}(a[d]))return d+1;return c}function z(a,b,c){let d=a.slice(b,c).map(a=>a.trimEnd()).join("\n").trim();return d.length>0?d:void 0}function A(a,b,c,d,e,f,g){let{instructionText:h,approvalTarget:i}=c??{};return{isPrompt:!0,promptData:{type:"multiple_choice",question:a.trim(),options:b.map(a=>{let b=s.some(b=>b.test(a.label));return{number:a.number,label:a.label,isDefault:a.isDefault,requiresTextInput:b}}),status:"pending",instructionText:h,...void 0!==i?{approvalTarget:i}:{},...f?{submitMode:f}:{},...g?{isAskUserQuestion:!0}:{}},cleanContent:a.trim(),rawContent:e(d.trim())}}function B(a,b,c){if(a=(0,d.N)(a),b?.hasNumberedDialogs===!1)return u(a);let h=b?.requireDefaultIndicator??!0,i=a.split("\n"),r=i.length;for(;r>0&&""===i[r-1].trim();)r--;let s=Math.max(0,r-50),x=!1;for(let a=r-1;a>=s;a--){let b=o.test(i[a]);if(n.test(i[a])||b){r=a,x=b;break}}let B=i.slice(s,r);for(let b of B)if(e.l8.test(b))return u(a);let C=!1,D=!1;for(let a of B){let b=a.trim();if(!C&&p.test(b)){C=!0,q.test(b)&&(D=!0);break}}if(h){let b=!1;for(let a of B){let c=a.trim();if(f.test(c)){b=!0;break}}if(!b&&!C)return u(a)}let E=[],F=-1,G=0,H=j(i,s,r);for(let b=r-1;b>=s;b--){let c=i[b].trim();if(H.has(b)||l.test(c)||m.test(c)){G++;continue}let d=c.match(f);if(d){let a=parseInt(d[1],10);if(a<=20&&t(a,E)){let b=d[2].trim();E.unshift({number:a,label:b,isDefault:!0}),G=0;continue}}let e=c.match(g);if(e){let a=parseInt(e[1],10);if(a>20);else if(t(a,E)){let b=e[2].trim();E.unshift({number:a,label:b,isDefault:!1}),G=0;continue}}if(0===E.length&&(c.startsWith("❯")||c.startsWith("●")||c.startsWith("›")))return u(a);if(E.length>0&&c&&!k.test(c)){let a=i[b];if(/^\s{4,}/.test(a)&&w(a,c)){if(++G>25){F=b;break}continue}if(v(c)){F=b;break}if(w(a,c)){if(++G>(/^\s{4,}/.test(a)?25:5)){F=b;break}continue}F=b;break}}if(!function(a){if(0===a.length||1!==a[0])return!1;let b=0;for(let c=1;c<a.length;c++){let d=a[c]-a[c-1];if(d<1||d>2||(2===d&&b++,b>1))return!1}return!0}(E.map(a=>a.number)))return u(a);let I=E.some(a=>a.isDefault),J=h&&C;if(E.length<2||h&&!I&&!J||!h&&!I&&(-1===F||!v(i[F]?.trim()??"")&&!function(a,b,c,d){let e=Math.max(d,b-3);for(let c=b-1;c>=e;c--){let b=a[c]?.trim()??"";if(!(!b||k.test(b))&&v(b))return!0}return!1}(i,F,0,s)))return u(a);let K=function(a,b){if(b<0)return"Please select an option:";let c=[];for(let d=Math.max(0,b-5);d<=b;d++){let b=a[d].trim();b&&!k.test(b)&&c.push(b)}return c.join(" ")}(i,F),L=function(a,b,c){if(b<0)return;let d=Math.max(0,b-19),e=a.slice(d,c).map(a=>a.trimEnd()).join("\n").trim();return e.length>0?e:void 0}(i,F,r);return A(K,E,{instructionText:L,approvalTarget:function(a,b,c){if(!(b<0))return z(a,y(a,b),c)}(i,F,r)},a,c,C?D?"answer_only":"answer_then_enter":void 0,x)}},74258:(a,b,c)=>{c.d(b,{h:()=>g,z:()=>h});var d=c(85164),e=c(68652),f=c(46423);let g=15;function h(a){let b=(0,e.N)((0,d.aJ)(a)),c=b.split("\n"),h=c.length-1;for(;h>=0&&""===c[h].trim();)h--;let i=c.slice(0,h+1);return{raw:a,clean:b,lines:c,contentLines:i,lastLines:i.slice(-g).join("\n"),thinkingLines:i.slice(-f.$).join("\n")}}},76777:(a,b,c)=>{c.d(b,{D:()=>d});function d(a,b,c){let d=new TextEncoder;if(d.encode(a).length<=b)return a;let e=b-d.encode(c).length,f=0,g="";for(let b of a){let a=d.encode(b).length;if(f+a>e)break;f+=a,g+=b}return`${g}${c}`}},95595:(a,b,c)=>{c.d(b,{WC:()=>j,f8:()=>i,gv:()=>d.g,ug:()=>g});var d=c(37717),e=c(74258),f=c(43484);let g=new Set([d.g.OPENCODE_SELECTION_LIST,d.g.OPENCODE_MODAL_OVERLAY,d.g.OPENCODE_PERMISSION_PROMPT,d.g.CLAUDE_SELECTION_LIST,d.g.COMMAND_CODE_SELECTION_LIST,d.g.COPILOT_SELECTION_LIST,d.g.CODEX_SELECTION_LIST,d.g.CODEX_PAGER,d.g.CODEX_HOOKS_REVIEW,d.g.ANTIGRAVITY_SELECTION_LIST]),h=new Set([d.g.THINKING_INDICATOR,d.g.OPENCODE_PROCESSING_INDICATOR]);function i(a){return"running"===a.status&&h.has(a.reason)}function j(a,b,c){let d=(0,e.z)(a),g=(0,f.bN)(b).detect(d,{lastOutputTimestamp:c});return{status:g.status,confidence:g.confidence,reason:g.reason,hasActivePrompt:g.hasActivePrompt,evidence:g.evidence,promptDetection:g.promptDetection??{isPrompt:!1,cleanContent:d.clean}}}}};
@@ -0,0 +1 @@
1
+ "use strict";exports.id=6661,exports.ids=[6661],exports.modules={24581:(a,b,c)=>{c.d(b,{Mu:()=>f,RY:()=>i,Tt:()=>h,Ui:()=>p,Xq:()=>l,ZV:()=>s,h_:()=>g,jF:()=>q,kT:()=>o,nY:()=>k,qX:()=>r,wt:()=>n});var d=c(62887),e=c(36051);let f=18e5,g={predicted:2e4,confirmed:18e5},h=3,i=16,j={turnId:null,openedAt:null,closedAt:null,closedBy:null};function k(a){return null===a?j:{turnId:a.turnId,openedAt:a.openedAt,closedAt:a.closedAt,closedBy:a.closedBy}}function l(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 m(a,b){return"string"!=typeof a||""===a?null:a.slice(0,b)}function n(a){return m(a,e.lY)}function o(a){return m(a,d.h9)}function p(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 q(a,b){let c=null===a.confirmedAt?g.predicted:g.confirmed;return b-a.at<c}function r(a,b,c){return null!==b&&c-a.at>=1e3*b}function s(a,b){return null===a.sessionId||null===b||a.sessionId===b}},26547:(a,b,c)=>{c.d(b,{Yz:()=>F,jw:()=>D});var d=c(51297),e=c(85164);let f=["minimal","low","medium","high","xhigh"];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)\b)?/i;function n(a){if(!e.aW.test(a))return null;let b=a.indexOf("\xb7");if(b<0)return null;let c=m.exec(a.slice(0,b));if(!c)return null;let d=c[1];if(!j(d))return null;let f=c[2]?l(c[2]):null;return null!==f||/\d/.test(d)?{model:d,effort:f}:null}let o=/^\s*[\u2500-\u259F][\s\u2500-\u259F]*(\S[^\u2500-\u259F]*?)\s+with\s+(minimal|low|medium|high|xhigh)\s+effort\b/i;function p(a){let b=o.exec(a);if(!b)return null;let c=b[1].trim();return k(c)?{model:c,effort:l(b[2])}:null}let q=/^\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 r(a){let b=q.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 s=/^\s*(?:\?\s+for\s+shortcuts|esc\s+to\s+cancel)\b/i,t=/^\s*[\u2500-\u259F][\s\u2500-\u259F]*(\S[^\u2500-\u259F]*?)\s+\((minimal|low|medium|high|xhigh)\)\s*$/i;function u(a){if(!s.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 v(a){let b=t.exec(a);if(!b)return null;let c=b[1].trim();return k(c)?{model:c,effort:l(b[2])}:null}let w=/^\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 x(a){let b=w.exec(a);if(!b)return null;let c=b[1];return j(c)?{model:c,effort:b[2]?l(b[2]):null}:null}let y=/^\s*▣\s+[A-Za-z][A-Za-z0-9-]*\s+·\s+([^·]+?)(?:\s+·\s+[\d.]+\s?m?s)?\s*$/;function z(a){let b=y.exec(a);if(!b)return null;let c=b[1].trim();return k(c)?{model:c,effort:null}:null}let A=/^\s*#\s+models:\s*([^·]+?)(?:\s+with\s+([A-Za-z]+)\s+effort)?\s*(?:·|$)/i;function B(a){let b=A.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 C(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 D(a,b){if(!b)return g();switch(a){case"codex":return C(b,n)??g();case"claude":return C(b,p)??C(b,r)??g();case"antigravity":return C(b,u)??C(b,v)??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=C(b,x);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":return C(b,z)??g();case"command-code":return C(b,B)??g();default:return g()}}let E=/-(low|medium|high)$/i;function F(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=E.exec(a);return b?b[1].toLowerCase():null}(e)??f:f;return{model:e,effort:(d||null)??g}}},36051:(a,b,c)=>{c.d(b,{PP:()=>g,QB:()=>e,Yo:()=>j,fO:()=>k,lY:()=>f});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=500;function g(a){return"string"==typeof a&&""!==a}let h={notification:"Notification(permission_prompt)","permission-request":"PermissionRequest (no decision)"};function i(a,b){let c=[`A dialog is open in ${a}: the agent reported it via ${h[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,h=g(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(" / ")}. `+(h?`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 j(a,b){return{type:d.LT,status:"pending",question:i(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:g(b.decisionId)?b.decisionId:null,...b.patterns&&b.patterns.length>0?{patterns:[...b.patterns]}:{}}}function k(a,b){return{type:d.LT,status:"unclassified",question:i(a,b),options:[],source:b.source,...b.message?{message:b.message}:{},...b.toolName?{toolName:b.toolName}:{},...b.askUserQuestion?{askUserQuestion:b.askUserQuestion}:{}}}},48083:(a,b,c)=>{c.d(b,{BJ:()=>at,CE:()=>S,Fw:()=>au,G5:()=>D,HR:()=>aq,In:()=>ah,MU:()=>an,NW:()=>O,P5:()=>ao,R4:()=>al,S9:()=>R,_N:()=>as,_i:()=>Q,dj:()=>aj,fY:()=>P,getLastAgentEvent:()=>ac,ik:()=>am,je:()=>ak,jl:()=>ae,m5:()=>ar,n5:()=>I,pI:()=>X,qo:()=>aw,recordAgentEvent:()=>U,sA:()=>ai,vm:()=>ad,zA:()=>ap});var d=c(24455),e=c(62887),f=c(49154),g=c(26547),h=c(67882),i=c(24581);let j=globalThis.__agentEventLastStopAt??(globalThis.__agentEventLastStopAt=new Map),k=globalThis.__agentEventLast??(globalThis.__agentEventLast=new Map),l=globalThis.__agentEventGenerationStartedAt??(globalThis.__agentEventGenerationStartedAt=new Map),m=globalThis.__agentEventTurns??(globalThis.__agentEventTurns=new Map),n=globalThis.__agentEventDrops??(globalThis.__agentEventDrops=new Map),o=globalThis.__agentEventTurnSeq??(globalThis.__agentEventTurnSeq={value:0}),p=globalThis.__agentEventAskUserQuestion??(globalThis.__agentEventAskUserQuestion=new Map),q=globalThis.__agentEventRecentKeys??(globalThis.__agentEventRecentKeys=new Map),r=globalThis.__agentEventRecentIdentities??(globalThis.__agentEventRecentIdentities=new Map),s=globalThis.__agentEventAwaitingInstruction??(globalThis.__agentEventAwaitingInstruction=new Map),t=globalThis.__agentEventLastModel??(globalThis.__agentEventLastModel=new Map),u=globalThis.__agentEventLastModelAt??(globalThis.__agentEventLastModelAt=new Map),v=globalThis.__agentCapturedModelInfo??(globalThis.__agentCapturedModelInfo=new Map),w=globalThis.__agentEventLastEffort??(globalThis.__agentEventLastEffort=new Map),x=globalThis.__agentModelBaseline??(globalThis.__agentModelBaseline=new Map),y=globalThis.__agentModelChangeListeners??(globalThis.__agentModelChangeListeners=new Set),z=/[-_ ](?:minimal|low|medium|high|xhigh)$/i,A=/\bcontext\b/gi;function B(a){return a.replace(z,"").replace(A,"").toLowerCase().replace(/[^a-z0-9]/g,"")}function C(a,b,c={}){let d=B(a),e=B(b);return d===e||!!c.crossSource&&0!==d.length&&0!==e.length&&(d.includes(e)||e.includes(d))}function D(a){return y.add(a),()=>{y.delete(a)}}function E(a,b,c,e,f){let g=(0,d.v7)(a,b,c),{info:h,source:i}=ag(g,b),j=h.model;if(null===j||null===i)return;let k=x.get(g),l={model:j,source:i};if(void 0===k){x.set(g,l),ax(x,F);return}if(C(k.model,j,{crossSource:k.source!==i}))return void x.set(g,l);x.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 y)try{a(m)}catch{}}let F=512;function G(){return{dedupDropped:{identity:0,timeWindow:0},decisionEvicted:0,idsDiscarded:0,dialogTimedOut:0,decisionOverflow:0}}function H(a){let b=n.get(a);return b||(b=G(),n.set(a,b),ax(n,F)),b}function I(a,b,c){let e=n.get((0,d.v7)(a,b,c));return e?{...e,dedupDropped:{...e.dedupDropped}}:G()}function J(a){return l.get(a)??null}function K(a){let b=m.get(a);return b&&b.generationAt===J(a)?b:null}function L(a,b){let c=K(a);return null===c?null:(null===c.closedAt&&b-c.displayEvent.at>=i.Mu&&(c.closedAt=c.displayEvent.at+i.Mu,c.closedBy="stale"),c)}function M(a){return o.value+=1,`turn-${a}-${o.value}`}function N(a,b,c){let d=b.pendingDecisions.filter(a=>(0,i.jF)(a,c)),e=b.pendingDecisions.length-d.length;return e>0&&(H(a).dialogTimedOut+=e,b.pendingDecisions=d),d}function O(a,b,c,e=Date.now()){let f=(0,d.v7)(a,b,c),g=L(f,e);return null===g?[]:N(f,g,e)}function P(a,b,c,e=Date.now()){return(0,i.nY)(function(a,b,c,e=Date.now()){return L((0,d.v7)(a,b,c),e)}(a,b,c,e))}function Q(a,b,c,e,f=Date.now()){let g=K((0,d.v7)(a,b,c));return null!==g&&null===g.closedAt&&(e?(g.scraperCompletionPolls+=1,!(g.scraperCompletionPolls<i.Tt)&&(g.closedAt=f,g.closedBy="scraper_evidence",!0)):(g.scraperCompletionPolls=0,!1))}function R(a,b,c,e=Date.now()){j.set((0,d.v7)(a,b,c),e)}function S(a,b,c){return j.get((0,d.v7)(a,b,c))??null}let T=["running","waiting"];function U(a,b,c,g,h={}){let j=(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=al(a,b,c,e.at);if(null===g||!T.includes(g.status))return!1;let h=k.get((0,d.v7)(a,b,c))?.sessionId??null;return null===h||null==e.sessionId||e.sessionId===h}(a,b,c,g,h)?(k.set(j,g),"session_start"===g.event&&x.delete(j),W(j,g),E(a,b,c,"hook",g.at),function(a,b){switch(b.event){case"pre_tool_use":f.mW.includes(b.detail??"")||p.delete(a);return;case"notification":"idle_prompt"===b.detail&&p.delete(a);return;case"post_tool_use":case"stop":case"user_prompt_submit":case"session_start":case"session_end":p.delete(a);return;default:b.event;return}}(j,g),"session_start"===g.event&&(l.set(j,g.at),V(j,g.at)),function(a,b){let c=J(a);if(null===c||!(b.at<c))switch(b.event){case"user_prompt_submit":Z(a,b,c,{continueOpen:!1}),_(a);return;case"post_tool_use":Z(a,b,c,{continueOpen:!0}),_(a);return;case"pre_tool_use":Z(a,b,c,{continueOpen:!0});return;case"stop":!function(a,b,c){let d=K(a);if(null!==d&&null===d.closedAt&&null!==d.openedAt){if(!(0,i.ZV)(d,b.sessionId))return;d.closedAt=b.at,d.closedBy="stop",d.displayEvent=Y(b),_(a);return}m.set(a,{turnId:M(b.at),sessionId:b.sessionId,openedAt:null,closedAt:b.at,closedBy:"stop",generationAt:c,displayEvent:Y(b),pendingDecisions:[],scraperCompletionPolls:0}),ab()}(a,b,c);return;case"session_end":(function(a,b){let c=K(a);null!==c&&(0,i.ZV)(c,b.sessionId)&&(c.closedAt=b.at,c.closedBy="session_end")})(a,b),_(a);return;case"session_start":return;case"notification":!function(a,b,c){if("permission_prompt"===b.detail)return!0===b.promptSettled?aa(a,b):$(a,c,{source:"notification",at:b.at,message:b.message??null,toolName:b.toolName??null,patterns:b.decisionPatterns??null,decisionId:b.decisionId??null,bootstrapDisplay:Y(b)});if(b.detail===e.KC){!0===b.promptSettled&&aa(a,b);return}if("idle_prompt"===b.detail){_(a);let d=K(a);if(null!==d&&null===d.closedAt){d.displayEvent=Y(b);return}if(null!==d)return;m.set(a,{turnId:M(b.at),sessionId:b.sessionId,openedAt:null,closedAt:null,closedBy:null,generationAt:c,displayEvent:Y(b),pendingDecisions:[],scraperCompletionPolls:0}),ab()}}(a,b,c);return;default:b.event;return}}(j,g),function(a,b){switch(b.event){case"notification":"idle_prompt"===b.detail&&s.set(a,{at:b.at,message:b.message??null});return;case"user_prompt_submit":case"session_start":case"session_end":s.delete(a);return;case"stop":case"pre_tool_use":case"post_tool_use":return;default:b.event;return}}(j,g),{recorded:!0}):(W(j,g),E(a,b,c,"hook",g.at),{recorded:!1,skipped:"late-session-start"})}function V(a,b){let c=m.get(a);c&&(0!==c.pendingDecisions.length&&(H(a).decisionEvicted+=c.pendingDecisions.length,c.pendingDecisions=[]),null===c.closedAt&&(c.closedAt=b,c.closedBy="generation",c.generationAt=b))}function W(a,b){"string"==typeof b.model&&""!==b.model&&(t.set(a,b.model.slice(0,e.h9)),u.set(a,b.at))}function X(a,b,c){return null!==function(a,b,c){let e=(0,d.v7)(a,b,c),f=s.get(e);if(!f)return null;let g=l.get(e);return void 0!==g&&f.at<g?null:f}(a,b,c)}function Y(a){return{event:a.event,at:a.at,detail:a.detail}}function Z(a,b,c,{continueOpen:d}){let e=K(a),f=null!==e&&null===e.closedAt&&null!==e.openedAt&&(0,i.ZV)(e,b.sessionId);if(d&&f){e.displayEvent=Y(b),e.sessionId??=b.sessionId,e.scraperCompletionPolls=0;return}let g=null!==e&&null===e.openedAt&&null===e.closedAt?e.pendingDecisions:[];m.set(a,{turnId:M(b.at),sessionId:b.sessionId,openedAt:b.at,closedAt:null,closedBy:null,generationAt:c,displayEvent:Y(b),pendingDecisions:g,scraperCompletionPolls:0}),ab()}function $(a,b,c){let d=K(a);null===d?(d={turnId:M(c.at),sessionId:null,openedAt:null,closedAt:null,closedBy:null,generationAt:b,displayEvent:c.bootstrapDisplay,pendingDecisions:[],scraperCompletionPolls:0},m.set(a,d),ab()):null!==d.closedAt&&(d={turnId:M(c.at),sessionId:null,openedAt:null,closedAt:null,closedBy:null,generationAt:b,displayEvent:c.bootstrapDisplay,pendingDecisions:[],scraperCompletionPolls:0},m.set(a,d),ab());let e=null===c.decisionId?null:(0,i.Xq)(c.decisionId);null!==c.decisionId&&null===e&&(H(a).idsDiscarded+=1);let f="notification"===c.source,g=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(g){g.message=(0,i.wt)(c.message)??g.message,g.toolName=(0,i.kT)(c.toolName)??g.toolName,g.patterns=(0,i.Ui)(c.patterns)??g.patterns,g.decisionId??=e,f&&(g.source="notification",g.confirmedAt??=c.at);return}if(d.pendingDecisions.length>=i.RY){H(a).decisionOverflow+=1;return}d.pendingDecisions.push({decisionId:e,at:c.at,source:c.source,message:(0,i.wt)(c.message),toolName:(0,i.kT)(c.toolName),patterns:(0,i.Ui)(c.patterns),confirmedAt:f?c.at:null,scraperCorroborated:!1,recorded:!1})}function _(a){let b=K(a);null!==b&&(b.pendingDecisions=[])}function aa(a,b){let c=K(a);if(null===c||0===c.pendingDecisions.length)return;let d=null===b.decisionId||void 0===b.decisionId?null:(0,i.Xq)(b.decisionId);if(null===d){c.pendingDecisions=[];return}c.pendingDecisions=c.pendingDecisions.filter(a=>null!==a.decisionId&&a.decisionId!==d)}function ab(){ax(m,F)}function ac(a,b,c){return k.get((0,d.v7)(a,b,c))??null}function ad(a,b,c,f,g=Date.now()){if(!f.model&&!f.effort)return;let h=(0,d.v7)(a,b,c),i=v.get(h),j=f.model?f.model.slice(0,e.h9):i?.model??null;v.set(h,{model:j,effort:f.effort??i?.effort??null,modelChangedAt:null===j?null:j===(i?.model??null)?i?.modelChangedAt??g:g}),f.model&&E(a,b,c,"frame",g)}function ae(a,b,c){return ag((0,d.v7)(a,b,c),b).info}let af=new Set(["claude"]);function ag(a,b){let c=t.get(a)??null,d=v.get(a),e={model:d?.model??null,effort:d?.effort??null},f=w.get(a)??null,h=d?.modelChangedAt??null,i=null!==c&&null!==e.model&&null!==h&&af.has(b)&&h>(u.get(a)??0)&&!C(c,e.model,{crossSource:!0}),j=(0,g.Yz)(b,i?null:c,e,f);return null===j.model?{info:j,source:null}:{info:j,source:null===c||i?"frame":"hook"}}function ah(a,b,c,f){"string"==typeof f&&""!==f&&w.set((0,d.v7)(a,b,c),f.slice(0,e.h9))}let ai=i.Mu;function aj(a,b,c,e=Date.now()){let f=(0,d.v7)(a,b,c);l.set(f,e),V(f,e),p.delete(f),s.delete(f),t.delete(f),u.delete(f),v.delete(f),w.delete(f),x.delete(f),r.delete(f)}function ak(a,b,c){let e=(0,d.v7)(a,b,c);k.delete(e),l.delete(e),m.delete(e),n.delete(e),p.delete(e),s.delete(e),t.delete(e),u.delete(e),v.delete(e),w.delete(e),x.delete(e),r.delete(e)}function al(a,b,c,e=Date.now()){let f=(0,d.v7)(a,b,c),g=L(f,e);if(null===g)return null;let i=g.displayEvent;if(e-i.at>=ai)return null;let j={event:i.event,at:i.at,detail:i.detail},k=N(f,g,e);if(k.length>0)return{status:"waiting",reason:"notification"===k[0].source?h.Oh.PERMISSION_PROMPT:h.Oh.PERMISSION_REQUEST,...j};if(null!==g.closedAt)return"stop"===g.closedBy?{status:"ready",reason:h.Oh.STOP,...j}:null;let l=(0,h.DA)(i.event,i.detail);return null===l||"waiting"===l.status?null===g.openedAt?null:{status:"running",reason:h.Oh.PROMPT_SUBMIT,...j}:{...l,...j}}function am(a,b,c,e,f=Date.now()){let g=(0,d.v7)(a,b,c);$(g,J(g),{source:"permission-request",at:f,message:null,toolName:e,patterns:null,decisionId:null,bootstrapDisplay:{event:"notification",at:f,detail:"permission_prompt"}})}function an(a,b,c,e,f=Date.now()){let g=(0,d.v7)(a,b,c);$(g,J(g),{source:"notification",at:f,message:null,toolName:e.toolName,patterns:null,decisionId:e.decisionId,bootstrapDisplay:{event:"notification",at:f,detail:e.detail}})}function ao(a,b,c,d=Date.now()){return O(a,b,c,d)[0]??null}function ap(a,b,c,d=Date.now()){let e=ao(a,b,c,d);e&&(e.scraperCorroborated=!0,e.confirmedAt??=d)}function aq(a,b,c){let d=ao(a,b,c);d&&(d.recorded=!0)}function ar(a,b,c){_((0,d.v7)(a,b,c))}function as(a,b,c,e,f=Date.now()){p.set((0,d.v7)(a,b,c),{at:f,spec:e})}function at(a,b,c,e=Date.now()){let f=(0,d.v7)(a,b,c),g=p.get(f);if(!g)return null;let h=l.get(f);return void 0!==h&&g.at<h||e-g.at>=ai?null:g}function au(a,b,c,e,f,g=Date.now(),h=null){if(!f)return!1;let i=[(0,d.v7)(a,b,c),e,h??"",f].join(" "),j=q.get(i);return void 0!==j&&g-j<3e3||(q.set(i,g),function(a){for(let[b,c]of q)a-c>=3e3&&q.delete(b);for(;q.size>F;){let a=q.keys().next();if(a.done)break;q.delete(a.value)}}(g),!1)}i.h_.predicted;let av=["stop","session_end"];function aw(a){let b=(0,d.v7)(a.worktreeId,a.cliToolId,a.instanceId);if(null!==a.identityKind){let c=null===a.identity?null:(0,i.Xq)(a.identity);if(null!==a.identity&&null===c&&(H(b).idsDiscarded+=1),null!==c)return!function(a,b){let c=(0,d.v7)(a.worktreeId,a.cliToolId,a.instanceId),e=r.get(c);e||(e=new Map,r.set(c,e),ax(r,F));let f=[a.event,a.detail??"",b].join(" ");return!!e.has(f)||(e.set(f,a.at),ax(e,F),!1)}(a,c)?{duplicate:!1}:(H(b).dedupDropped.identity+=1,{duplicate:!0,by:"identity"});if(av.includes(a.event))return{duplicate:!1}}return au(a.worktreeId,a.cliToolId,a.instanceId,a.event,a.sessionId,a.at,a.detail)?(H(b).dedupDropped.timeWindow+=1,{duplicate:!0,by:"time-window"}):{duplicate:!1}}function ax(a,b){for(;a.size>b;){let b=a.keys().next();if(b.done)break;a.delete(b.value)}}},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,archiveAllAssistantMessages:()=>d.cD,archiveAssistantMessagesFrom:()=>d.Jj,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,createAssistantConversation:()=>d.G4,createAssistantExecution:()=>d.hL,createAssistantMessage:()=>d.qp,createCloneJob:()=>h.tw,createGateResult:()=>d.hl,createMemo:()=>d.To,createMessage:()=>d.oH,createRepository:()=>h.vB,createTask:()=>d.UT,createTimer:()=>d.CR,createTodo:()=>d.py,createVerificationRun:()=>d.rY,createWorktreeTodo:()=>d.yy,deleteAllMessages:()=>d.pE,deleteAssistantSessionState:()=>d.z2,deleteMemo:()=>d.cP,deleteMessageById:()=>d.DF,deleteMessagesByCliTool:()=>d.lA,deleteMessagesByInstance:()=>d.Qp,deletePushSubscriptionByEndpoint:()=>d.th,deleteRepository:()=>h.oG,deleteRepositoryWorktrees:()=>d.oZ,deleteSessionState:()=>d.ZP,deleteTodo:()=>d.Ys,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,getAllTodos:()=>d.Tk,getAllWorktreeAliases:()=>d.fX,getAllWorktreeIds:()=>d.nO,getAllWorktreePathIds:()=>d.Sj,getAssistantConversationById:()=>d.iT,getAssistantConversationByRepositoryAndCliTool:()=>d.gp,getAssistantExecutionById:()=>d.$r,getAssistantMessageById:()=>d.yE,getAssistantMessages:()=>d.BE,getAssistantSessionState:()=>d.qK,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,getLatestAssistantExecutionByConversation:()=>d.of,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,getRunningAssistantExecutionByConversation:()=>d.ce,getRunningVerificationRun:()=>d.WZ,getSessionState:()=>d.y1,getTask:()=>d.gg,getTimerById:()=>d.kx,getTimersByWorktree:()=>d.DP,getTodoById:()=>d.Nr,getTodosByRepositoryId:()=>d.ob,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,listRunningAssistantExecutions:()=>d.b2,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,updateAssistantConversation:()=>d.xR,updateAssistantExecution:()=>d.az,updateAssistantMessageStatus:()=>d.nZ,updateAssistantSessionState:()=>d.PP,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.gb,updateStatus:()=>d.yB,updateTimerStatus:()=>d.j2,updateTodo:()=>d.uy,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(90444),e=c(88807),f=c(28037),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:()=>h,kA:()=>g});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){switch(a){case"waiting":return{isWaitingForResponse:!0,isProcessing:!1};case"running":return{isWaitingForResponse:!1,isProcessing:!0};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.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}}};
@@ -0,0 +1 @@
1
+ "use strict";exports.id=6838,exports.ids=[6838],exports.modules={26838:(a,b,c)=>{c.d(b,{E2:()=>o,Mj:()=>m,Sw:()=>l,lX:()=>p});var d=c(29021),e=c(33873),f=c(54325),g=c(90164);let h=/^v?\d+\.\d+\.\d+$/,i=/^[a-zA-Z0-9.\-\s_v]+$/,j=[".next","required-server-files.json"],k=globalThis.__versionCheckCache??(globalThis.__versionCheckCache={result:null,fetchedAt:0,rateLimitResetAt:null});function l(){return function(){try{let a=(0,d.readFileSync)((0,e.join)(process.cwd(),"package.json"),"utf-8"),b=JSON.parse(a);if("commandmate"===b.name&&"string"==typeof b.version&&b.version.length>0)return b.version;return null}catch{return null}}()??"0.32.0"}function m(){return l()}let n=null;function o(a){let b=n??=function(){{let a=function(){try{let a=(0,d.readFileSync)((0,e.join)(process.cwd(),...j),"utf-8"),b=JSON.parse(a),c=b.config?.env?.NEXT_PUBLIC_APP_VERSION;if("string"==typeof c&&c.length>0)return c;return null}catch{return null}}();if(a)return a}return"0.32.0"}();return(0,f.LE)(b,a)?{serverVersion:b,clientVersion:a}:null}async function p(){try{var a,b,c;if(null!==k.result&&Date.now()-k.fetchedAt<36e5||k.rateLimitResetAt&&(!(Date.now()>=k.rateLimitResetAt)||(k.rateLimitResetAt=null,0)))return k.result;let d=await fetch("https://api.github.com/repos/Kewton/CommandMate/releases/latest",{headers:{Accept:"application/vnd.github+json","User-Agent":`CommandMate/${m()}`},cache:"no-store",signal:AbortSignal.timeout(5e3)});if(403===d.status)return function(a){let b=a.headers.get("X-RateLimit-Reset");b?k.rateLimitResetAt=1e3*parseInt(b,10):k.rateLimitResetAt=Date.now()+36e5}(d),k.result;if(!d.ok)return k.result;let e=await d.json(),f=m(),j=e.tag_name.replace(/^v/,""),l={hasUpdate:function(a,b){if(!h.test(a)||!h.test(b))return!1;let c=a=>a.replace(/^v/,"").split(".").map(Number),[d,e,f]=c(a),[g,i,j]=c(b);return g!==d?g>d:i!==e?i>e:j>f}(f,e.tag_name),currentVersion:f,latestVersion:j,releaseUrl:(a=e.html_url).startsWith(g.Dk)?a:null,releaseName:(b=e.name,c=e.tag_name,i.test(b)&&b.length<=128?b:c),publishedAt:e.published_at};return k.result=l,k.fetchedAt=Date.now(),l}catch{return k.result}}},54325:(a,b,c)=>{c.d(b,{LE:()=>f,Oo:()=>e,ST:()=>d,T4:()=>k,dz:()=>j,r9:()=>h,rx:()=>i,rz:()=>g});let d="client_version",e="version_mismatch";function f(a,b){return!!a&&!!b&&"0.0.0"!==a&&"0.0.0"!==b&&a!==b}let g="chat_turn_progress",h=1e3;function i(a,b=65536){return b<=0?{body:"",truncated:a.length>0}:a.length<=b?{body:a,truncated:!1}:{body:a.slice(a.length-b),truncated:!0}}let j="messages_invalidated",k="model_changed"},90164:(a,b,c)=>{c.d(b,{Dk:()=>e,kD:()=>f});let d="https://github.com/Kewton/CommandMate",e=`${d}/releases/`,f=`${d}/blob/main/docs/security-guide.md`}};
@@ -0,0 +1,25 @@
1
+ "use strict";exports.id=7875,exports.ids=[7875],exports.modules={60:(a,b,c)=>{c.d(b,{QM:()=>h,V0:()=>e,ZX:()=>f,bE:()=>g});var d=c(85164);function e(a){let b=(0,d.x7)(a),c=(0,d.M4)(a,b);return{chromeStart:b,echoEnd:c,start:c+1,end:b>=0?b:a.length,headTruncated:c<0}}function f(a){let b=a.split("\n"),c=e(b.map(d.aJ));return c.start>=c.end?"":b.slice(c.start,c.end).join("\n")}function g(a){let b=a.split("\n"),c=e(b),f=c.start>=c.end?"":b.slice(c.start,c.end).join("\n");return d.$t.test(f)&&!d.kD.test(a)&&!d.Ty.test(a)}function h(a,b,c,d,e,f=!1){if(a=Math.max(0,a),"opencode"===d||"copilot"===d||f){let a=e(b);return a>=0?a+1:0}if("antigravity"===d||"command-code"===d){let c=e(b);return c>=0?c+1:Math.max(0,a)}if(a>=b||c){let a=e(40);return a>=0?a+1:0}if("codex"===d)return Math.max(0,a);if(a>=b-5){let a=e(50);return a>=0?a+1:Math.max(0,b-40)}return Math.max(0,a)}},1058:(a,b,c)=>{c.d(b,{$v:()=>P,emitChatTurnProgress:()=>W});var d=c(56791);let e=globalThis.__unclassifiedFrameRuns??(globalThis.__unclassifiedFrameRuns=new Map);var f=c(94154),g=c(63209),h=c(51297),i=c(76777),j=c(50524);let k=/^([^\S\n]*)╹(▀{4,})/,l=/^([^\S\n]*)[│┃]/;var m=c(54325),n=c(81254),o=c(72626),p=c(43234),q=c(15194),r=c(129),s=c(66101),t=c(53163),u=c(17287),v=c(15388),w=c(3161),x=c(49154),y=c(62171),z=c(97751),A=c(31990),B=c(95595),C=c(45017),D=c(52277),E=c(44321),F=c(34405),G=c(93997),H=c(48083),I=c(30008),J=c(24581),K=c(40043),L=c(9516),M=c(36051);let N=(0,o.h)("current-output-builder");function O(a,b){Promise.resolve().then(c.bind(c,49640)).then(({broadcastMessage:c})=>{c("message",{worktreeId:a,message:b})}).catch(b=>{N.warn("history-row-broadcast-failed",{worktreeId:a,error:b instanceof Error?b.message:String(b)})})}async function P(a,b,c,d,e){let f=await Q(a,b,c,d);return(f.isRunning&&"running"===f.sessionStatus&&await X(a,b,c,d),e)?{...f,resolvedBy:e.resolvedBy,conflict:e.conflict??null}:f}async function Q(a,b,c,m){let o=m??c,P=p.CLIToolManager.getInstance().getTool(c),Q=(0,H.CE)(b,c,m),R=(0,H.getLastAgentEvent)(b,c,m),S=(0,r.VM)(c),T=Date.now(),U=(0,H.NW)(b,c,m,T),V=(0,H.BJ)(b,c,m,T),W=(0,w.Jl)(b,c,m),X={lastEventType:R?.event??null,lastEventAt:R?.at??null,lastEventDetail:R?.detail??null,...(0,H.fY)(b,c,m,T),pendingDecisions:U.map(a=>{let b=(0,x.Wk)(a.toolName);return{id:a.decisionId,at:a.at,source:a.source,toolName:a.toolName,confirmedAt:a.confirmedAt,scraperCorroborated:a.scraperCorroborated,deliveryExpired:(0,J.qX)(a,S.capabilities.decisionTimeoutSeconds,T),kind:b,questionOptions:"question"===b&&V?(0,z.dZ)(V.spec).map(a=>({number:a.number,label:a.label})):null}}),dedupDropped:(0,H.n5)(b,c,m),dialogPendingMaxMs:{...J.h_},promptWaitingSince:null,promptWaitingSource:null,toolInputNormalization:(0,v.SQ)(b,c,m),permissionDecision:(0,u.CD)(b,c,m),source:{cliToolId:S.cliToolId,capabilities:S.capabilities,...(0,s.Kf)(S,S.liveness({worktreeId:b,cliToolId:c,instanceId:o}),T),probedActivity:(0,t.hS)({worktreeId:b,cliToolId:c,instanceId:o})},session:W,sessionContext:(0,w.sc)({worktreeId:b,cliToolId:c,instanceId:m},W),sessionDiff:(0,y.rn)({worktreeId:b,cliToolId:c,instanceId:m})};if(!await P.isRunning(b,m))return(0,K.xG)((0,C.v7)(b,c,m)),{isRunning:!1,content:"",lineCount:0,cliToolId:c,sessionStatus:"idle",sessionStatusReason:"session_not_running",statusEvidence:"positive",lastKnownStatus:null,lastKnownStatusAt:null,lastStopEventAt:Q,structuredEvents:X,model:null,reasoningEffort:null,promptDedup:(0,E.XH)(b,c,m),upstreamFault:null,paneObstruction:null,composerText:null,composerState:"no_composer"};let Y=(0,d.getSessionState)(a,b,o),Z=Y?.lastCapturedLine||0,$=await (0,A.Wh)(b,c,F._,m),_=$.split("\n"),aa=_.length,ab=(0,G.sl)(aa,Math.min(F._,G.xE)),ac=((0,q.qR)(c,ab)?_.slice(Math.max(0,Z)):_).join("\n"),ad=(0,C.v7)(b,c,m),ae=(0,C.xU)(ad),af=ae?new Date(ae):void 0,ag=(0,B.WC)($,c,af),ah=(0,B.f8)(ag),ai=ag.hasActivePrompt,aj="waiting"===ag.status&&B.ug.has(ag.reason),ak=ag.reason===B.gv.CODEX_PAGER,al="waiting"===ag.status&&ag.reason===B.gv.COMMAND_CODE_DISMISSABLE_PANEL,am=ag.evidence,an=(0,K.Q4)(ag.status,ag.reason);(0,H._i)(b,c,m,"ready"===ag.status&&"positive"===am);let ao=(0,H.R4)(b,c,m),ap=(0,I._G)({worktreeId:b,cliToolId:c,instanceId:m,scraper:{status:ag.status,reason:ag.reason,hasActivePrompt:ai}}),aq=ap.structured;null!==aq&&(X.promptWaitingSince=aq.at,X.promptWaitingSource=aq.source);let ar=function(a,b,c=null,d=null){if("waiting"===a.status)return{...a,structuredApplied:!1};if(null!==c)return{status:"waiting",reason:(0,I.rB)(c),thinking:!1,evidence:a.evidence,isUnclassifiedActive:a.isUnclassifiedActive,structuredApplied:!0};if(null===b||"waiting"===b.status)return{...a,structuredApplied:!1};let e="running"===b.status,f="ready"===b.status&&function(a){if(null===a)return!1;let{closedBy:b,closedAt:c,openedAt:d}=a;return"stop"===b&&null!==c&&null!==d&&c>d}(d)?"positive":a.evidence;return{status:b.status,reason:b.reason,thinking:e,evidence:f,isUnclassifiedActive:a.isUnclassifiedActive,structuredApplied:!0}}({status:ag.status,reason:ag.reason,thinking:ah,evidence:am,isUnclassifiedActive:an},ao,aq,X),as=ap.waiting,at=ag.promptDetection.promptData,au=at&&V?(0,L.Hu)(at,V.spec):null,av=null!==aq&&"notification"===aq.source&&"permission-id"===S.capabilities.eventIdentity&&(0,M.PP)(aq.decisionId)?aq.decisionId:null,aw=null!==aq&&"question"===(0,x.Wk)(aq.toolName),ax=null===av||aw?null:M.QB,ay=null===aq?null:{...aq,askUserQuestion:function(a){let b=a?.spec.questions[0];return b?{question:b.question,labels:b.choices.map(a=>a.label),questionCount:a.spec.questions.length}:null}(V),decisionOptions:ax,decisionId:av,patterns:null!==ax?aq.patterns:null},az=ai?au??at??(ay?(0,M.Yo)(b,ay):null):ay?(0,M.Yo)(b,ay):null;null!==ao&&ao.status!==ag.status&&N.info("detection-divergence",{worktreeId:b,cliToolId:c,instanceId:o,scraperStatus:ag.status,scraperReason:ag.reason,structuredStatus:ao.status,structuredReason:ao.reason,structuredEvent:ao.event,structuredEventAt:ao.at,applied:ar.structuredApplied});let aA=_.slice(-100).join("\n"),aB="opencode"===c?function(a){let b=(0,h.aJ)(a).split("\n"),c=-1,d=-1,e=-1;for(let a=0;a<b.length;a++){let f=k.exec(b[a]);f&&(c=a,e=(d=f[1].length)+1+f[2].length)}if(-1===c)return null;let f=0,g="";for(let a=0;a<b.length;a++){let h=b[a];if(a!==c){let a=l.exec(h);if(!a||a[1].length!==d)continue}let k=h.slice((0,j.sh)(h,e)).trim();""!==k&&(f+=1,""===g&&(g=(0,i.D)(k,200,"…[truncated]")))}return f<2?null:{id:"opencode_sidebar",matchedText:g,boxRight:e,rows:f}}(aA):null,aC=function(a,b,c=Date.now()){for(let[a,b]of e)c-b.lastSeen>36e5&&e.delete(a);if(!b)return e.delete(a),{dwellMs:0,shouldRecord:!1};let d=e.get(a);if(!d)return e.set(a,{since:c,lastSeen:c,recorded:!1}),{dwellMs:0,shouldRecord:!1};d.lastSeen=c;let f=Math.max(0,c-d.since);return d.recorded||f<6e4?{dwellMs:f,shouldRecord:!1}:(d.recorded=!0,{dwellMs:f,shouldRecord:!0})}(ad,ar.isUnclassifiedActive);if(aC.shouldRecord&&function(a,b){var c;let e=Math.round(b.dwellMs/1e3),f=`${b.sessionStatus}/${b.sessionStatusReason}`,g=`Unclassified interactive frame (${f}) held for ${e}s. The detection layer could not parse it, so no prompt was published and nothing could answer it. Inspect the raw pane with \`commandmate capture ${b.worktreeId} --pane\`.`+((c=b.obstruction)?` Cause: opencode's sidebar is sharing rows with the transcript (paneObstruction=${c.id}, second column reads ${JSON.stringify(c.matchedText)}), which covers the marker that ends a turn. Press \`ctrl+x b\` in the pane to close it.`:""),h={type:n.LT,status:"unclassified",question:g,options:[],dwellSeconds:e,sessionStatusReason:f};try{let c=(0,d.createMessage)(a,{worktreeId:b.worktreeId,role:"assistant",content:g,messageType:"prompt",promptData:h,timestamp:new Date,cliToolId:b.cliToolId,instanceId:b.instanceId});N.info("unclassified-frame-recorded",{worktreeId:b.worktreeId,cliToolId:b.cliToolId,dwellSeconds:e,statusReason:f}),O(b.worktreeId,c)}catch(a){N.warn("unclassified-frame-record-failed",{worktreeId:b.worktreeId,error:a instanceof Error?a.message:String(a)})}}(a,{worktreeId:b,cliToolId:c,instanceId:o,dwellMs:aC.dwellMs,sessionStatus:ar.status,sessionStatusReason:ar.reason,obstruction:aB}),null!==aq&&null!==ay&&!ai&&!aq.recorded){(0,H.HR)(b,c,m);var aD=b,aE=c,aF=o,aG=aq,aH=ay;let e=(0,M.fO)(aD,aH);try{let b=(0,d.createMessage)(a,{worktreeId:aD,role:"assistant",content:e.question,summary:`structured prompt \xb7 source=${aG.source}${aG.toolName?` \xb7 tool=${aG.toolName}`:""}`,messageType:"prompt",promptData:e,timestamp:new Date,cliToolId:aE,instanceId:aF});N.info("structured-prompt-recorded",{worktreeId:aD,cliToolId:aE,instanceId:aF,source:aG.source,toolName:aG.toolName}),O(aD,b)}catch(a){N.warn("structured-prompt-record-failed",{worktreeId:aD,error:a instanceof Error?a.message:String(a)})}}let aI=(0,f.ji)($,c),aJ=(0,g.bT)(aA),aK=(0,C.aq)(b,c,m),{model:aL,effort:aM}=(0,H.jl)(b,c,m);(0,K.ox)(ad,{status:ar.status,reason:ar.reason,evidence:ar.evidence});let aN=(0,K.AD)(ad);return{isRunning:!0,cliToolId:c,sessionStatus:ar.status,sessionStatusReason:ar.reason,content:ac,fullOutput:$,realtimeSnippet:aA,lineCount:aa,lastCapturedLine:Z,isComplete:as,isGenerating:ar.thinking,thinking:ar.thinking,thinkingMessage:ar.thinking?"Claude is thinking...":null,isPromptWaiting:as,promptData:az,autoYes:{enabled:aK?.enabled??!1,expiresAt:aK?.enabled?aK.expiresAt:null,stopReason:aK?.stopReason,lastSuppression:(0,D.gb)(b,c,m),stopMatchedText:aK?.stopMatchedText},isSelectionListActive:aj,isPagerActive:ak,isDismissablePanelActive:al,isUnclassifiedActive:ar.isUnclassifiedActive,statusEvidence:ar.evidence,lastKnownStatus:aN?.status??null,lastKnownStatusAt:aN?.at??null,lastServerResponseTimestamp:ae,serverPollerActive:(0,C.bZ)(ad),lastStopEventAt:Q,structuredEvents:X,model:aL,reasoningEffort:aM,promptDedup:(0,E.XH)(b,c,m),upstreamFault:aJ?{id:aJ.fault.id,matchedText:aJ.matchedText,at:Date.now()}:null,paneObstruction:aB?{id:aB.id,matchedText:aB.matchedText,at:Date.now()}:null,composerText:"content"===aI.state?aI.text:null,composerState:aI.state}}function R(){return{version:0,askedAt:-1/0,turnKey:null,body:null,loggedOutcome:null,loggedTurnKey:null}}let S=globalThis.__chatTurnProgressState??=new Map;function T(a){return`${a.worktreeId}:${a.cliToolId}:${a.instanceId??a.cliToolId}`}function U(a,b,c,d={}){let e=T(a),f=S.get(e)??R();S.set(e,f),(f.loggedOutcome!==b||f.loggedTurnKey!==c)&&(f.loggedOutcome=b,f.loggedTurnKey=c,N.info("published"===b?"chat-turn-progress-published":"no-subscribers"===b?"chat-turn-progress-no-subscribers":"chat-turn-progress-failed",{worktreeId:a.worktreeId,cliToolId:a.cliToolId,instanceId:a.instanceId??a.cliToolId,turnKey:c,...d}))}async function V(a,b,c=Date.now()){let d,e=T(a),f=S.get(e)??R();if(c-f.askedAt<m.r9)return null;f.askedAt=c,S.set(e,f);try{d=await b()}catch{return null}if(!d||0===d.body.length)return null;let g=(0,m.rx)(d.body);return d.turnKey===f.turnKey&&g.body===f.body?null:(f.turnKey=d.turnKey,f.body=g.body,f.version+=1,{type:m.rz,worktreeId:a.worktreeId,cliToolId:a.cliToolId,instanceId:a.instanceId??a.cliToolId,turnKey:d.turnKey,body:g.body,partial:g.truncated||!0===d.partial,version:f.version,done:!1})}async function W(a,b,d=Date.now()){try{let{broadcast:e,hasRoomSubscribers:f}=await Promise.resolve().then(c.bind(c,49640));if(!f(a.worktreeId))return U(a,"no-subscribers",null),!1;let g=await V(a,b,d);if(!g)return!1;return e(a.worktreeId,g),U(a,"published",g.turnKey,{version:g.version,bodyLength:g.body.length,partial:g.partial}),!0}catch(b){return U(a,"failed",null,{error:b instanceof Error?b.message:String(b)}),!1}}async function X(a,b,d,e){if("claude"!==d)return;let f={worktreeId:b,cliToolId:d,instanceId:e};try{let{getWorktreeById:g}=await Promise.resolve().then(c.bind(c,73753)),h=g(a,b)?.path;if(!h)return;let{hasRoomSubscribers:i}=await Promise.resolve().then(c.bind(c,49640));if(!i(b))return void U(f,"no-subscribers",null);W(f,async()=>{let{readClaudeTurnProgress:a}=await Promise.resolve().then(c.bind(c,79696));return a({worktreeId:b,cliToolId:d,instanceId:e??d},{worktreePath:h})})}catch(a){U(f,"failed",null,{error:a instanceof Error?a.message:String(a)})}}},3523:(a,b,c)=>{c.d(b,{$M:()=>O,z$:()=>Q,zX:()=>R});var d=c(31990),e=c(88807),f=c(56791),g=c(49640),h=c(26895),i=c(28861),j=c(18778),k=c(15194),l=c(8988),m=c(85164),n=c(72626),o=c(46423),p=c(93997),q=c(60),r=c(82450),s=c(56263),t=c(13033),u=c(72457),v=c(44321),w=c(71080),x=c(28918),y=c(43925),z=c(40964),A=c(83598),B=c(31442),C=c(45146),D=c(91601),E=c(92010),F=c(81099),G=c(63209),H=c(73478),I=c(57836),J=c(52767);let K=(0,n.h)("response-poller");function L(a){return b=>{try{(0,g.broadcastMessage)("message_updated",{worktreeId:a,message:b})}catch(b){K.warn("prompt-sweep-broadcast-failed",{worktreeId:a,error:b instanceof Error?b.message:String(b)})}}}function M(a){return{response:"",isComplete:!1,lineCount:a}}function N(a,b,c,d,e,f,g,h=!1){let i=(0,q.QM)(b,c,d,e,f,h),j=a.slice(i);return{response:(0,m.aJ)(j.join("\n")),isComplete:!0,lineCount:c,promptDetection:g,bufferReset:d,captureWindowSaturated:h}}function O(a,b,c){if("antigravity"===b){let b=(0,i.g)(a);if(null!==b)return b}let d=(0,m.KO)(b);return(0,h.gF)(a,c?{...d,precomputedLines:c}:d)}function P(a,b){return O((0,m._A)((0,m.aJ)(a)),b)}function Q(a,b,c,d=p.xE){let e=a.split("\n"),f=e.length;for(;f>0&&""===e[f-1].trim();)f--;let g=e.slice(0,f),h=g.length,i=(0,p.sl)(e.length,d),j="opencode"===c?g.map(m.aJ):null,k="claude"===c?(0,m.GT)(g):"copilot"===c?(0,m.wv)(g):"command-code"===c?(0,m.I$)(g):j?(0,m.x7)(j):-1,l=k>=0?k:h,n=h>0&&b>25&&h+25<b,r=h>0&&b>50&&h<50,s=n||r;if(!s&&h<b-5)return null;let t=Math.max(0,h-20),u=g.slice(t),v=j?j.join("\n"):u.join("\n"),{promptPattern:w,separatorPattern:x,thinkingPattern:y,skipPatterns:z}=(0,m._X)(c),A=(a=60)=>{let b;if("codex"===c)b=/^›\s+(?!Implement|Find and fix|Type|Summarize)/;else if(j)return(0,q.V0)(j).echoEnd;else if("copilot"===c){for(let b=l-1;b>=Math.max(0,l-a);b--){if(!m.y.test((0,m.aJ)(g[b])))continue;let a=b;for(;a+1<l&&m.Fg.test((0,m.aJ)(g[a+1]));)a++;return a}return -1}else b=/^[>❯]\s+\S/;for(let c=l-1;c>=Math.max(0,l-a);c--){let a=(0,m.aJ)(g[c]);if(b.test(a))return c}return -1};if("claude"===c||"codex"===c||"copilot"===c||"command-code"===c){let a=P(g.join("\n"),c);if(a.isPrompt)return N(g,b,h,s,c,A,a,i)}let B=(0,m.aJ)(v),D=w.test(B),E=x.test(B),F="codex"===c?(0,m.DR)(g,20):y.test(B),G="copilot"===c?(0,m.Wn)(g.slice(Math.max(0,h-8)).map(m.aJ)):null,H="copilot"===c?"idle"===G:("codex"===c||"gemini"===c||"vibe-local"===c||"antigravity"===c)&&D&&!F,I="claude"===c&&D&&E&&!F,J="command-code"===c&&D&&E&&!F,L="opencode"===c&&(0,q.bE)(B);if(H||I||J||L){let a=[],d=(0,q.QM)(b,h,s,c,A,i),e=h;for(let b=d;b<l;b++){let d=g[b],f=(0,m.aJ)(d);if("codex"===c&&/^›\s+/.test(f)||"gemini"===c&&/^(%|\$|.*@.*[%$#])\s*$/.test(f)||"antigravity"===c&&/^>\s*$/.test(f)||"opencode"===c&&k<0&&(m.sy.test(f)||m.uA.test(f))){e=b;break}z.some(a=>a.test(f))||a.push(d)}let f=a.join("\n").trim(),n=f.split("\n").slice(-o.$).join("\n");if("copilot"!==c&&y.test(n))return M(h);if("claude"===c){let a=(0,m.aJ)(f),b=/[╭╮╰╯]/.test(a)||/░{3,}/.test(a)||/▓{3,}/.test(a),c=/Claude Code v\d+\.\d+|claude\//.test(a),d=/Tip:|for shortcuts|\?\s*for help/.test(a),e=/^\s*\/Users\/.*$/m.test(a)&&a.split("\n").length<30,g=A(h)>=0,i=a.match(/^[>❯]\s+(\S.*)$/m);if(i){let b=a.indexOf(i[0]);if(0===a.substring(b+i[0].length).trim().split("\n").filter(a=>{let b=a.trim();return b&&!z.some(a=>a.test(b))&&!/^─+$/.test(b)}).length)return M(h)}else if(!g&&(b||c||d||e)&&f.length<2e3)return K.info("Claude startup banner suppressed, response not saved",{responseLength:f.length,hasBannerArt:b,hasVersionInfo:c,hasStartupTips:d,hasProjectInit:e}),M(h)}if("copilot"===c){let a=(0,m.aJ)(f);if(!a.split("\n").some(a=>m.y.test(a))&&m.E0.some(b=>b.test(a)))return M(h)}if("command-code"===c&&0>A(h))return K.info("Command Code launch screen suppressed, response not saved",{responseLength:f.length}),M(h);if("gemini"===c&&((f.match(/[░███]/g)||[]).length>.3*f.length||C.SI.some(a=>f.includes(a))||!f.includes("✦")&&f.length<10))return M(h);if("opencode"===c){let a=(0,m.aJ)(f);if((a.length<50||!m.Md.test(B))&&0===a.split("\n").filter(a=>{let b=a.trim();return b&&!m.sx.some(a=>a.test(b))}).length)return M(h)}return{response:f,isComplete:!0,lineCount:e,bufferReset:s,captureWindowSaturated:i,turnHeadTruncated:j?(0,q.V0)(j).headTruncated:void 0}}if("opencode"!==c){let a=P(g.join("\n"),c);if(a.isPrompt)return N(g,b,h,s,c,A,a,i)}let O=[],R=s||i||b>=h-5,S=R?A(80):-1,T=R?S>=0?S+1:Math.max(0,h-80):Math.max(0,b);for(let a=T;a<Math.min(h,l);a++){let b=g[a],c=(0,m.aJ)(b);z.some(a=>a.test(c))||O.push(b)}let U=O.join("\n").trim();return U?{response:U,isComplete:!1,lineCount:h}:M(h)}async function R(a,b,c){let h=(0,e.getDbInstance)(),i=c??b;try{let e=(0,f.getWorktreeById)(h,a);if(!e)return K.error("worktree-worktreeid-not"),(0,C.Et)(a,b,c),!1;if(!await (0,d.K1)(a,b,c))return K.info("session-not-running"),(0,C.Et)(a,b,c),!1;let n=(0,z.m)(b,a,c),H=(0,B.n9)(n)?await (0,A.zQ)(n):{delegated:!1,released:!1};H.released&&((0,f.updateSessionState)(h,a,b,0,i),K.info("geometry-delegation-released",{worktreeId:a,cliToolId:b,instanceId:i}));let M=(0,f.getSessionState)(h,a,i),N=M?.lastCapturedLine||0,O=await (0,d.Wh)(a,b,p.xE,c),R=O.split("\n").slice(-100).join("\n"),S=(0,G.bT)(R);if((0,F.notifyUpstreamFaultPush)({worktreeId:a,cliToolId:b,instanceId:c,faultId:S?.fault.id??null,matchedText:S?.matchedText}).catch(()=>{}),"opencode"===b||"copilot"===b){let d=(0,C.MN)(a,b,c),e="opencode"===b?(0,q.ZX)(O):O;(0,t.IZ)(d,e,b)}let T=Q(O,N,b,p.xE);if(!T||!T.isComplete){let{thinkingPattern:c}=(0,m._X)(b),d=(0,m.aJ)(O).split("\n").slice(-o.$).join("\n");return c.test(d)&&(0,f.markPendingPromptsAsAnswered)(h,a,b,i,L(a))>0&&K.info("marked-answeredcount-pending"),!1}let U="opencode"===b||"copilot"===b,V=!(0,k.VA)(b)&&!T.captureWindowSaturated;if(V&&!T.bufferReset&&T.lineCount===N&&!M?.inProgressMessageId)return!1;if(V&&!T.bufferReset&&T.lineCount<=N)return K.info("already-saved-up-to-line-lastcapturedlin"),!1;let W=T.promptDetection??P(T.response,b);if(W.isPrompt){let d=W.rawContent||W.cleanContent,j=(0,C.MN)(a,b,c),k=(0,u.zm)(d,b);if((0,u.gv)(j,k))return(0,v.LN)(a,b,c),K.info("duplicate-prompt-skipped",{worktreeId:a,cliToolId:b}),!1;let l=d;"copilot"===b&&(l=(0,r.LH)(d),l=(0,r.Sj)(l,s.Rf,s.ky)),(0,f.clearInProgressMessageId)(h,a,b,i);let m=(0,f.createMessage)(h,{worktreeId:a,role:"assistant",content:l,messageType:"prompt",promptData:W.promptData,timestamp:new Date,cliToolId:b,instanceId:i});(0,f.updateSessionState)(h,a,b,T.lineCount,i),(0,g.broadcastMessage)("message",{worktreeId:a,message:m}),(0,J.r)(h,a,b,i,"prompt_detected",{promptType:W.promptData?.type});let n=Date.now(),o=(0,I.Jp)(a,b,c)?.since??n;return(0,E.R)({worktreeId:a,cliToolId:b,instanceId:c,waitingSince:o})||(0,D.J$)({worktreeId:a,worktreeName:e.name,kind:"prompt",agentName:i,instanceId:i,waitingKind:"prompt",waitingSince:o,excerpt:W.promptData?.question??l}).catch(()=>{}),(0,I.hd)({worktreeId:a,cliToolId:b,instanceId:c,waiting:!0,kind:"prompt",now:n}),U||(0,C.Et)(a,b,c),!0}if(!T.response||""===T.response.trim())return(0,f.updateSessionState)(h,a,b,T.lineCount,i),!1;let X="claude"===b?(0,l.R)(T.response):void 0,Y=T.response;if("gemini"===b)Y=(0,r.IS)(T.response);else if("claude"===b)Y=(0,r.NN)(T.response);else if("copilot"===b){let d=(0,C.MN)(a,b,c),e=(0,t.Uz)(d)||T.response;Y=(0,r.LH)(e),Y=(0,r.Sj)(Y,s.Rf,s.ky),(0,t.q1)(d)}else if("opencode"===b){let d=(0,C.MN)(a,b,c),e=(0,t.Uz)(d),f=T.turnHeadTruncated&&e?e:T.response;Y=(0,r.aW)(f),(0,t.q1)(d)}if(!Y||""===Y.trim()||"[No content]"===Y)return(0,f.updateSessionState)(h,a,b,T.lineCount,i),(0,f.clearInProgressMessageId)(h,a,b,i),!1;if(!V){let d=(0,C.MN)(a,b,c);if((0,w.j7)(d,Y))return K.info("duplicate-response-skipped",{worktreeId:a,cliToolId:b,instanceId:i}),(0,f.updateSessionState)(h,a,b,T.lineCount,i),!1}let Z=(0,x.H)(a,b,c)||await (0,x.captureStructuredHistoryTurn)(a,b,c,{worktreePath:e.path,transcriptPathHint:X?.logFilePath??null}),$=Z||H.delegated;Y&&!$&&await (0,j.T)(h,a,Y,b),(0,f.markPendingPromptsAsAnswered)(h,a,b,i,L(a))>0&&K.info("marked-answeredcount-pending");let _=(0,f.getSessionState)(h,a,i);if(V&&_&&T.lineCount<=_.lastCapturedLine)return K.info("race-condition-detected-skipping-save-re"),!1;if($)K.info("structured-history-scrape-suppressed",{worktreeId:a,cliToolId:b,instanceId:i,scrapedLength:Y.length,reason:Z?"structured-history":"geometry-delegated"});else{let c=(0,f.createMessage)(h,{worktreeId:a,role:"assistant",content:Y,messageType:"normal",timestamp:new Date,cliToolId:b,instanceId:i,summary:X?.summary,logFileName:X?.logFileName,requestId:X?.requestId});(0,g.broadcastMessage)("message",{worktreeId:a,message:c}),(0,y.vQ)(a,b,i,!1)}return(0,I.hd)({worktreeId:a,cliToolId:b,instanceId:c,waiting:!1}),(0,D.J$)({worktreeId:a,worktreeName:e.name,kind:"completion",agentName:i,excerpt:Y}).catch(()=>{}),(0,f.updateSessionState)(h,a,b,T.lineCount,i),U&&(0,C.Et)(a,b,c),!0}catch(a){return K.error("response:check-failed",{error:a instanceof Error?a.message:String(a)}),!1}}(0,H.I7)()},8988:(a,b,c)=>{c.d(b,{R:()=>g});let d=/📄 Session log: (.+?\/([^\/\s]+\.jsonl))/,e=/Request ID: ([^\s\n]+)/,f=/Summary: (.+?)(?:\n─|$)/s;function g(a){let b={content:a},c=d.exec(a);c&&(b.logFileName=c[2],b.logFilePath=c[1]);let g=e.exec(a);g&&(b.requestId=g[1]);let h=f.exec(a);return h&&(b.summary=h[1].trim()),b}},9516:(a,b,c)=>{c.d(b,{Hu:()=>i,Ll:()=>j});let d=["type something","chat about this"],e=/^\s*\[[ xX]\]\s*/,f=/(?:…|\.\.\.)\s*$/,g=new Set(["yes","y","no","n"]);function h(a){return a.replace(e,"").replace(f,"").replace(/\s+/g," ").trim().toLowerCase()}function i(a,b){if("multiple_choice"!==a.type)return null;let c=function(a,b){let c=h(b);if(""===c)return null;let d=a.questions.map((a,b)=>({entry:a,index:b})).filter(({entry:a})=>(function(a,b){let[c,d]=a.length<=b.length?[a,b]:[b,a];return c.length<8?c===d:d.includes(c)})(h(a.question),c));return 1===d.length?d[0]:null}(b,a.question);if(null===c)return null;let{entry:f,index:g}=c,i=new Map(a.options.map(a=>[a.number,a])),j=[];for(let[a,b]of f.choices.entries()){var k;let c=a+1,d=i.get(c);if(!d||!function(a,b){if(""===a||""===b)return!1;if(a===b)return!0;let[c,d]=a.length<=b.length?[a,b]:[b,a];return!(c.length<8)&&d.startsWith(c)}(h(d.label),h(b.label)))return null;j.push({...d,label:`${(k=d.label,e.exec(k)?.[0]??"")}${b.label}`,...b.description?{description:b.description}:{}})}let l=[];for(let b of a.options)!(b.number<=f.choices.length)&&function(a){let b=h(a);return d.some(a=>b===a||b.startsWith(a))}(b.label)&&(j.push(b),l.push(b.number));return j.sort((a,b)=>a.number-b.number),{...a,question:f.question,options:j,isAskUserQuestion:!0,askUserQuestion:{...f.header?{header:f.header}:{},multiSelect:f.multiSelect,questionIndex:g,questionCount:b.questions.length,metaOptionNumbers:l}}}function j(a,b){let c=b.trim();if(/^\d+$/.test(c)){let b=Number.parseInt(c,10);return a.options.some(a=>a.number===b)?{ok:!0,input:String(b)}:{ok:!1,reason:"answer_out_of_range",message:"The option number is outside the range this prompt offers. Use `commandmate capture <worktree-id> --json` to list the current options."}}let d=function(a,b){let c=h(b);if(""===c)return[];let d=a.filter(a=>h(a.label)===c);return d.length>0?d:c.length<2?[]:a.filter(a=>h(a.label).startsWith(c))}(a.options,c);if(1===d.length){let[a]=d;return{ok:!0,input:String(a.number),resolved:{via:"semantic",optionNumber:a.number,optionLabel:a.label}}}return d.length>1?{ok:!1,reason:"unresolvable_answer",message:"The answer matches more than one option label. Answer with an option number."}:a.options.some(a=>!0===a.requiresTextInput)&&!g.has(c.toLowerCase())?{ok:!0,input:b}:{ok:!1,reason:"unresolvable_answer",message:"No option label matches the answer. Answer with an option number (yes/no is not resolved on a numbered picker — Issue #1681)."}}},13033:(a,b,c)=>{c.d(b,{IW:()=>h,IZ:()=>l,K0:()=>g,Uz:()=>m,l1:()=>f,o0:()=>i,q1:()=>n,tb:()=>k,vQ:()=>j});var d=c(85164);let e=globalThis.__tuiResponseAccumulator??(globalThis.__tuiResponseAccumulator=new Map);function f(a){return(0,d._A)((0,d.aJ)(a)).replace(/^\u2503\s?/,"").replace(/\s*\u2503$/,"").trim()}function g(a){let b=a.split("\n"),c=[];for(let a of b){let b=f(a);!(!b||d.sx.some(a=>a.test(b)))&&(d.Md.test(b)||c.push(b))}return c}function h(a){return a.replace(/[\u2500-\u257F]/g,"").replace(/\s{2,}/g," ").trim()}function i(a){let b=(0,d.aJ)(a).split("\n");if((0,d.gT)(b))return[];let c=(0,d.wv)(b),e=c>=0?b.slice(0,c):b,f=[],g=!1;for(let a of e){if(d.JN.test(a)){g=!1;continue}if(d.y.test(a))g=!0;else if(g){if(d.Fg.test(a))continue;g=!1}let b=h(a);b&&(d.J7.some(a=>a.test(b))||f.push(b))}return f}function j(a,b){if(0===a.length||0===b.length)return 0;let c=Math.min(a.length,b.length);for(let d=c;d>=1;d--){let c=a.slice(-d),e=b.slice(0,d),f=!0;for(let a=0;a<d;a++)if(c[a]!==e[a]){f=!1;break}if(f)return d}return 0}function k(a){e.set(a,{lines:[],lastFingerprint:[],pollCount:0})}function l(a,b,c="opencode"){let d=e.get(a);if(!d)return;let f="copilot"===c?i(b):g(b);if(0!==f.length){if(d.pollCount++,0===d.lines.length)d.lines=[...f];else{let a=j(d.lastFingerprint,f);if(a>0){let b=f.slice(a);d.lines.push(...b)}else d.lines.push(...f)}d.lastFingerprint=f.slice(-10)}}function m(a){let b=e.get(a);return b&&0!==b.lines.length?b.lines.join("\n"):""}function n(a){e.delete(a)}},15388:(a,b,c)=>{c.d(b,{RJ:()=>f,SQ:()=>g});var d=c(24455);let e=globalThis.__toolInputNormalizations??(globalThis.__toolInputNormalizations=new Map);function f(a,b,c,g,h,i=Date.now()){e.set((0,d.v7)(a,b,c),{...g,toolName:h,at:i})}function g(a,b,c){return e.get((0,d.v7)(a,b,c))??null}},18778:(a,b,c)=>{c.d(b,{T:()=>g});var d=c(56791),e=c(41364);let f=(0,c(72626).h)("conversation-logger");async function g(a,b,c,h="claude"){let i=(0,d.getLastUserMessage)(a,b);if(i)try{await (0,e.hM)(b,i.content,c,h)}catch(a){f.error("conversation:log-failed",{error:a instanceof Error?a.message:String(a)})}}},21684:(a,b,c)=>{c.d(b,{U:()=>h});var d=c(33873),e=c.n(d),f=c(87447),g=c(8004);function h(){let a=e().join(process.cwd(),"data","logs");return(0,g.T)((0,f._p)("CM_LOG_DIR"),a,"CM_LOG_DIR")}},40043:(a,b,c)=>{c.d(b,{AD:()=>k,Q4:()=>g,ox:()=>j,xG:()=>l});var d=c(37717),e=c(48083);let f=new Set([d.g.NO_RECENT_OUTPUT,d.g.UNKNOWN_FRAME,d.g.DEFAULT]);function g(a,b){return"running"===a&&f.has(b)}let h=e.sA,i=globalThis.__lastKnownStatusByKey??(globalThis.__lastKnownStatusByKey=new Map);function j(a,b,c=Date.now()){for(let[a,b]of i)c-b.at>=h&&i.delete(a);for(;i.size>512;){let a=i.keys().next();if(a.done)break;i.delete(a.value)}"positive"===b.evidence&&(i.delete(a),i.set(a,{status:b.status,reason:b.reason,at:c}))}function k(a,b=Date.now()){let c=i.get(a);return void 0===c?null:b-c.at>=h?(i.delete(a),null):c}function l(a){i.delete(a)}},41364:(a,b,c)=>{c.d(b,{Gv:()=>o,hM:()=>n});var d=c(79748),e=c.n(d),f=c(33873),g=c.n(f),h=c(1634),i=c(21684),j=c(72626),k=c(15194);function l(a="claude"){return g().join((0,i.U)(),a)}async function m(a="claude"){let b=l(a);try{await e().access(b)}catch{await e().mkdir(b,{recursive:!0})}}async function n(a,b,c,d="claude"){await m(d);let f=function(a,b="claude"){let c=(0,h.GP)(new Date,"yyyy-MM-dd"),d=`${a}-${c}.md`,e=l(b);return g().join(e,d)}(a,d),i=(0,h.GP)(new Date,"yyyy-MM-dd HH:mm:ss"),j="";try{j=await e().readFile(f,"utf-8")}catch{let b=(0,k.hR)(d)?k.ef[d]:d;j=`# ${b} Conversation Log: ${a}
2
+
3
+ Created: ${i}
4
+
5
+ ---
6
+
7
+ `}j+=`## Conversation at ${i}
8
+
9
+ `,j+=`### User
10
+
11
+ `,j+=`${b}
12
+
13
+ `;let o=(0,k.hR)(d)?k.ef[d]:d;return j+=`### ${o}
14
+
15
+ `,j+=`${c}
16
+
17
+ `,j+=`---
18
+
19
+ `,await e().writeFile(f,j,"utf-8"),f}async function o(a,b="all"){let c="all"===b?[...k.XH]:[b],d=[];for(let b of c){await m(b);let c=l(b);try{let b=(await e().readdir(c)).filter(b=>b.startsWith(`${a}-`)&&b.endsWith(".md")).map(a=>g().join(c,a));d.push(...b)}catch{}}return d.sort().reverse()}(0,j.h)("log-manager")},44321:(a,b,c)=>{c.d(b,{LN:()=>f,XH:()=>g,fL:()=>h});var d=c(24455);let e=globalThis.__promptDedupSkips??(globalThis.__promptDedupSkips=new Map);function f(a,b,c,g=Date.now()){let h=(0,d.v7)(a,b,c),i=e.get(h);e.set(h,{skippedCount:(i?.skippedCount??0)+1,lastSkippedAt:g})}function g(a,b,c){return e.get((0,d.v7)(a,b,c))??{skippedCount:0,lastSkippedAt:null}}function h(a,b,c,f){if(a===b)return;let g=(0,d.v7)(a,c,f),h=e.get(g);e.delete(g),void 0!==h&&e.set((0,d.v7)(b,c,f),h)}},45017:(a,b,c)=>{c.d(b,{v7:()=>d.v7,LP:()=>d.LP,pL:()=>d.pL,GE:()=>d.GE,aq:()=>d.aq,kC:()=>d.kC,xU:()=>B,bZ:()=>C,W8:()=>d.W8,W5:()=>I,_i:()=>J,_C:()=>K});var d=c(24455),e=c(31990),f=c(3523),g=c(75498),h=c(91318),i=c(52277),j=c(74258),k=c(43484);let l=["enforce","legacy"],m={claude:"enforce",codex:"enforce",copilot:"enforce",opencode:"enforce",gemini:"legacy",antigravity:"legacy","vibe-local":"legacy","command-code":"legacy"};var n=c(52767),o=c(88807),p=c(52660),q=c(63869),r=c(43234),s=c(85164),t=c(77093),u=c(93997),v=c(68901),w=c(72626),x=c(66007);let y=(0,w.h)("auto-yes-poller"),z=globalThis.__autoYesPollerStates??(globalThis.__autoYesPollerStates=new Map);function A(a){return z.get(a)}function B(a){let b=A(a);return b?.lastServerResponseTimestamp??null}function C(a){return z.has(a)}function D(a){let b=A(a);if(b&&(b.consecutiveErrors++,b.currentInterval=(0,d.G)(b.consecutiveErrors),b.consecutiveErrors>=v.ul)){let b=(0,d.Ue)(a),c=(0,d.pL)(a);c&&(0,d.XK)(b,c,"consecutive_errors",(0,d.GE)(a)??void 0),J(a)}}async function E(a,b,c,d){let f=c??v.FW,g=await (0,e.Wh)(a,b,f,d);return(0,s._A)((0,s.aJ)(g))}async function F(a,b,e,v,w,x){let z=(0,d.v7)(a,e,x);try{let D=(0,f.$M)(v,e,w);if(!D.isPrompt||!D.promptData)return b.lastAnsweredPromptKey=null,b.lastAnsweredAt=null,"no_prompt";let E=(B=D.promptData,`${B.type}:${B.question}`);if(b.lastAnsweredPromptKey===E&&null!==b.lastAnsweredAt&&Date.now()-b.lastAnsweredAt<d.UL)return"duplicate";let F="codex"===e?(0,s.E6)(v):null;if(F)return(0,i.ZS)(a,e,x,{reason:"agent-launch-dialog",mode:null,promptType:D.promptData.type}),y.warn("poller:auto-yes-skipped-launch-dialog",{worktreeId:a,cliToolId:e,instanceId:x,dialog:F,promptType:D.promptData.type}),"no_answer";let G=function(a,b,c,d=process.env){let e=(0,k.bN)(a),f=function(a,b=process.env){let c=b.CM_AUTOYES_DIALOG_GATE,d=null,e=null;if("string"==typeof c&&""!==c.trim())for(let b of c.split(",")){let[c,f]=b.split("=");if(void 0===f)continue;let g=c.trim(),h=f.trim();l.includes(h)&&("*"===g?d=h:g===a&&(e=h))}return e??d??m[a]??"legacy"}(a,d);if("multiple_choice"!==b||!e.hasDialogRules||"legacy"===f)return{allowed:!0,dialog:null,mode:f,gated:!1};let g=e.detectDialog((0,j.z)(c));return{allowed:null!==g&&"numbered"===g.answerMode,dialog:g,mode:f,gated:!0}}(e,D.promptData.type,v);if(!G.allowed)return(0,i.ZS)(a,e,x,{reason:"unclassified-frame",mode:null,promptType:D.promptData.type}),y.warn("poller:auto-yes-skipped-unclassified-frame",{worktreeId:a,cliToolId:e,instanceId:x,promptType:D.promptData.type,dialogKind:G.dialog?.kind??null,answerMode:G.dialog?.answerMode??null,gateMode:G.mode}),"no_answer";let H=(0,h.n)(a,e,x),I=(0,g.sD)(D.promptData,H);I.suppressedBy&&((0,i.ZS)(a,e,x,{reason:I.suppressedBy,mode:H?.mode??null,promptType:D.promptData.type,pattern:I.pattern}),y.warn("poller:auto-yes-suppressed-by-policy",{worktreeId:a,cliToolId:e,instanceId:x,reason:I.suppressedBy,mode:H?.mode??null,pattern:I.pattern,promptType:D.promptData.type}));let J=I.answer;if(null===J)return"no_answer";let K=r.CLIToolManager.getInstance().getTool(e).getSessionName(a,x);try{await (0,q.tV)({sessionName:K,answer:J,cliToolId:e,promptData:D.promptData})}finally{(0,u.gm)(K)}var B,C=Date.now();let L=A(z);L&&(L.lastServerResponseTimestamp=C);let M=A(z);M&&(M.consecutiveErrors=0,M.currentInterval=d.ps),b.lastAnsweredPromptKey=E,b.lastAnsweredAt=Date.now(),y.info("poller:response-sent",{worktreeId:a,cliToolId:e,instanceId:x}),(0,n.r)((0,o.getDbInstance)(),a,e,x??e,"prompt_answered_auto",{promptType:D.promptData.type});let N=null;try{N=(0,p.recordAnsweredPrompt)((0,o.getDbInstance)(),{worktreeId:a,cliToolId:e,instanceId:x??e,promptData:D.promptData,answer:J,answeredBy:"auto",content:D.rawContent||D.cleanContent})}catch(b){y.warn("poller:prompt-audit-record-failed",{worktreeId:a,cliToolId:e,instanceId:x,error:(0,t.u1)(b)})}if(N){let b=N;Promise.resolve().then(c.bind(c,49640)).then(({broadcastMessage:c})=>{c(b.created?"message":"message_updated",{worktreeId:a,message:b.message})}).catch(()=>{})}let[{startPolling:O},{broadcastTerminalSnapshotAfterInteraction:P}]=await Promise.all([c.e(5220).then(c.bind(c,95220)),Promise.resolve().then(c.bind(c,99508))]);return O(a,e,x),P(a,e,x),"responded"}catch{return D(z),y.warn("poller:detect-respond-error",{worktreeId:a,cliToolId:e,instanceId:x}),"error"}}async function G(a,b,c){let e=(0,d.v7)(a,b,c),f=A(e);if("valid"===function(a,b){if(!b)return"stopped";let c=(0,d.Ue)(a),e=(0,d.pL)(a);if(!e)return J(a),"expired";let f=(0,d.GE)(a)??void 0,g=(0,d.aq)(c,e,f);return g?.enabled?"valid":(J(a),"expired")}(e,f)){try{let g=(0,d.aq)(a,b,c),h=g?.stopPattern?v.FW:v.Ke,i=await E(a,b,h,c),j=i.split("\n");if(function(a,b,c){if(b.stopCheckBaselineLength<0)return b.stopCheckBaselineLength=c.length,!1;let e=b.stopCheckBaselineLength;if(c.length>e){let f=c.substring(e);return b.stopCheckBaselineLength=c.length,(0,d.Cs)(a,f,J)}return c.length<e&&(b.stopCheckBaselineLength=c.length),!1}(e,f,i))return;let k=await F(a,f,b,i,j,c);if("responded"===k)return void H(a,b,c,d.ZO);if("no_prompt"===k){let e=j.slice(-d.Re).join("\n");if((0,s.ut)(b,e))return void H(a,b,c,v.QN)}}catch(d){D(e),y.warn("poller:poll-error",{worktreeId:a,cliToolId:b,instanceId:c,error:(0,t.u1)(d)})}H(a,b,c)}}function H(a,b,c,e){let f=A((0,d.v7)(a,b,c));if(!f)return;let g=Math.max(e??f.currentInterval,d.ps);f.timerId=setTimeout(()=>{G(a,b,c)},g)}function I(a,b,c){if(!(0,x.h6)(a))return{started:!1,reason:"invalid worktree ID"};let e=c??b,f=(0,d.aq)(a,b,e);if(!f?.enabled)return{started:!1,reason:"auto-yes not enabled"};let g=(0,d.v7)(a,b,e),i=A(g);if(!i&&z.size>=d.fC)return{started:!1,reason:"max concurrent pollers reached"};if(i&&i.cliToolId===b)return{started:!0,reason:"already_running"};i&&J(g);let j={timerId:null,cliToolId:b,instanceId:e,consecutiveErrors:0,currentInterval:d.ps,lastServerResponseTimestamp:null,lastAnsweredPromptKey:null,lastAnsweredAt:null,stopCheckBaselineLength:-1};return z.set(g,j),(0,h.ie)(g),j.timerId=setTimeout(()=>{G(a,b,e)},d.ps),y.info("poller:started",{worktreeId:a,cliToolId:b,instanceId:e}),{started:!0}}function J(a){let b=A(a);b&&(b.timerId&&clearTimeout(b.timerId),z.delete(a),(0,h.ie)(a),y.info("poller:stopped",{compositeKey:a}))}function K(a){(0,d._9)(Array.from(z.keys()),a).forEach(a=>J(a))}},45146:(a,b,c)=>{c.d(b,{Et:()=>y,KQ:()=>A,MN:()=>q,SI:()=>m,fq:()=>z,g8:()=>s,sR:()=>C});var d=c(84297),e=c(72626),f=c(13033),g=c(72457),h=c(71080),i=c(44321),j=c(3523),k=c(99508);let l=(0,e.h)("response-poller"),m=["Waiting for auth","⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"],n=globalThis.__responsePollerCoordinator??(globalThis.__responsePollerCoordinator={activePollers:new Map,pollingStartTimes:new Map,owners:new Map,running:new Map,pendingRestart:new Map,ownerStorage:new d.AsyncLocalStorage,generationCounter:0,pausedOnPrompt:new Set});n.pausedOnPrompt??=new Set;let o=n.activePollers,p=n.pollingStartTimes;function q(a,b,c){return`${a}:${c??b}`}function r(a){return"opencode"===a||"copilot"===a}function s(a,b,c){let d=q(a,b,c),e={worktreeId:a,cliToolId:b,instanceId:c},f=n.running.get(d);if(f){if(f.owner.superseded=!0,Date.now()-f.since<6e4)return void n.pendingRestart.set(d,e);l.warn("poller:restart-past-stalled-tick",{pollerKey:d,generation:f.owner.generation,runningForMs:Date.now()-f.since}),n.running.delete(d)}t(d,e)}function t(a,b){let c=n.pausedOnPrompt.has(a);x(a,{resume:c}),c&&l.info("poller:resumed-after-prompt",{pollerKey:a}),function(a){let b=q(a.worktreeId,a.cliToolId,a.instanceId);n.pollingStartTimes.set(b,Date.now()),r(a.cliToolId)&&(0,f.tb)(b),u(a.worktreeId,a.cliToolId,a.instanceId)}(b)}function u(a,b,c){let d=q(a,b,c);v({worktreeId:a,cliToolId:b,instanceId:c},function(a){let b=n.owners.get(a);b&&(b.superseded=!0);let c={pollerKey:a,generation:++n.generationCounter,superseded:!1,stopped:!1,selfStopped:!1};return n.owners.set(a,c),c}(d))}function v(a,b){let c=setTimeout(()=>{w(a,b)},2e3);n.activePollers.set(b.pollerKey,c)}async function w(a,b){let c=b.pollerKey;if(!b.superseded&&!b.stopped){n.running.set(c,{owner:b,since:Date.now()});try{let d=n.pollingStartTimes.get(c);if(d&&Date.now()-d>18e5)return void x(c);let e=!1;try{e=await n.ownerStorage.run(b,()=>(0,j.zX)(a.worktreeId,a.cliToolId,a.instanceId))}catch(a){l.error("error:",{error:a instanceof Error?a.message:String(a)})}b.selfStopped&&function(a,b,c){if(c&&!r(b.cliToolId)){n.pausedOnPrompt.add(a.pollerKey),l.info("poller:paused-on-prompt",{pollerKey:a.pollerKey,generation:a.generation});return}(0,h.L1)(a.pollerKey)}(b,a,e),b.superseded||(0,k.broadcastTerminalSnapshot)(a.worktreeId,a.cliToolId,a.instanceId),b.superseded||b.stopped||v(a,b)}finally{n.running.get(c)?.owner===b&&n.running.delete(c);let a=n.pendingRestart.get(c);a&&(n.pendingRestart.delete(c),t(c,a))}}}function x(a,b={}){let c=n.ownerStorage.getStore();if(c&&c.pollerKey===a&&(c.superseded||c.stopped))return void l.info("poller:stale-stop-ignored",{pollerKey:a,generation:c.generation});let d=n.owners.get(a),e=void 0!==d&&c===d;d&&(d.stopped=!0,d.selfStopped=e,n.owners.delete(a)),n.pendingRestart.delete(a),n.pausedOnPrompt.delete(a);let i=n.activePollers.get(a);i&&(clearTimeout(i),n.activePollers.delete(a),n.pollingStartTimes.delete(a)),(0,f.q1)(a),(0,g.iX)(a),e||b.resume||(0,h.L1)(a)}function y(a,b,c){x(q(a,b,c))}function z(){for(let a of new Set([...Array.from(n.activePollers.keys()),...Array.from(n.owners.keys()),...Array.from(n.pausedOnPrompt)]))x(a);n.pendingRestart.clear(),n.pausedOnPrompt.clear()}function A(){return Array.from(n.activePollers.keys())}function B(a){let b=a.indexOf(":");return b<=0||b===a.length-1?null:{worktreeId:a.slice(0,b),instanceId:a.slice(b+1)}}function C(a,b){let c=new Map;for(let{oldId:b,newId:d}of a)b&&d&&b!==d&&c.set(b,d);if(0===c.size)return[];let d=[],e=[];for(let a of Array.from(o.keys())){let f=B(a);if(!f)continue;let g=c.get(f.worktreeId);if(!g)continue;let h=b(f.worktreeId,f.instanceId);if(!h){e.push(a);continue}d.push({oldKey:a,newKey:q(g,h,f.instanceId),newWorktreeId:g,cliToolId:h,instanceId:f.instanceId})}let j=new Map;for(let a of d){let b=o.get(a.oldKey);b&&clearTimeout(b),o.delete(a.oldKey);let c=n.owners.get(a.oldKey);c&&(c.superseded=!0,c.stopped=!0,n.owners.delete(a.oldKey)),n.pendingRestart.delete(a.oldKey),j.set(a.newKey,{startedAt:p.get(a.oldKey)}),p.delete(a.oldKey),(0,g.i2)(a.oldKey,a.newKey),(0,h.Re)(a.oldKey,a.newKey);let d=B(a.oldKey);d&&(0,i.fL)(d.worktreeId,a.newWorktreeId,a.cliToolId,a.instanceId),(0,f.q1)(a.oldKey)}for(let a of e)x(a),l.warn("poller:migrate-abandoned",{pollerKey:a});for(let a of d){let b=j.get(a.newKey)?.startedAt;p.set(a.newKey,b??Date.now()),r(a.cliToolId)&&(0,f.tb)(a.newKey),u(a.newWorktreeId,a.cliToolId,a.instanceId)}let k=[];for(let a of Array.from(n.pausedOnPrompt)){let b=B(a);if(!b)continue;let d=c.get(b.worktreeId);d&&k.push({oldKey:a,newKey:`${d}:${b.instanceId}`})}for(let a of k)n.pausedOnPrompt.delete(a.oldKey);for(let a of k)(0,h.Re)(a.oldKey,a.newKey),n.pausedOnPrompt.add(a.newKey);return d}},50779:(a,b,c)=>{c.d(b,{GT:()=>m});var d=c(88807),e=c(43167),f=c(73753),g=c(72626),h=c(57836),i=c(4806),j=c(61191),k=c(27519);let l=(0,g.h)("push/resolution");async function m(a){let{worktreeId:b,agentName:c,at:g=Date.now()}=a,m=function(a,b=Date.now()){let c;if(!(0,k.lU)())return{send:!1,reason:"push-unconfigured"};if(!(0,i.r0)(a,b))return{send:!1,reason:"no-card"};if((0,h.Te)(a))return{send:!1,reason:"still-waiting"};try{c=(0,e.rC)((0,d.getDbInstance)(),"prompt")}catch{return{send:!1,reason:"single-device",deviceCount:0}}return c<2?{send:!1,reason:"single-device",deviceCount:c}:{send:!0,reason:"cross-device-clear",deviceCount:c}}(b,g),n={worktreeId:b,instanceId:c,reason:m.reason,...void 0!==m.deviceCount?{deviceCount:m.deviceCount}:{}};if("still-waiting"!==m.reason&&(0,i._P)(b),!m.send)return void("single-device"===m.reason?l.info("resolution-push-skipped",n):l.debug("resolution-push-skipped",n));try{await (0,j.notifyPushSubscribers)({worktreeId:b,worktreeName:function(a){try{return(0,f.getWorktreeById)((0,d.getDbInstance)(),a)?.name??a}catch{return a}}(b),kind:"prompt",agentName:c,resolved:!0},g),l.info("resolution-push-sent",n)}catch(a){l.warn("resolution-push-failed",{...n,error:a instanceof Error?a.message:String(a)})}}},52277:(a,b,c)=>{c.d(b,{ZS:()=>f,gb:()=>g});var d=c(24455);let e=globalThis.__autoYesPolicySuppressions??(globalThis.__autoYesPolicySuppressions=new Map);function f(a,b,c,g,h=Date.now()){e.set((0,d.v7)(a,b,c),{...g,at:h})}function g(a,b,c){return e.get((0,d.v7)(a,b,c))??null}},52767:(a,b,c)=>{c.d(b,{r:()=>i,g:()=>h});var d=c(48524),e=c(87009),f=c(72626);let g=(0,f.h)("lib/tasks/task-transition-service");function h(a,b,c,f){let h=a.transaction(()=>{let g=(0,d.gg)(a,b);if(!g)return null;let h=g.status,i=function(a,b){switch(a){case"pending":switch(b){case"message_sent":return"running";case"send_failed":case"cancel":return"cancelled";default:return null}case"running":switch(b){case"prompt_detected":return"waiting_input";case"agent_idle":return"running";case"verify_started":return"verifying";case"send_failed":return"failed";case"cancel":return"cancelled";default:return null}case"waiting_input":switch(b){case"prompt_answered_auto":case"prompt_answered_human":case"agent_idle":return"running";case"verify_started":return"verifying";case"cancel":return"cancelled";default:return null}case"verifying":switch(b){case"verify_passed":return"succeeded";case"verify_failed":return"failed";case"verify_not_started":return"not_started";case"cancel":return"cancelled";default:return null}case"failed":case"not_started":switch(b){case"message_sent":return"running";case"verify_started":return"verifying";case"cancel":return"cancelled";default:return null}default:return null}}(h,c),j=Date.now(),k=(0,e.P)(a,{taskId:b,event:c,fromStatus:h,toStatus:i,payload:f,createdAt:j});return null===i?{task:g,fromStatus:h,toStatus:null,eventId:k}:{task:(0,d.xZ)(a,b,i,f?.runId===void 0?{}:{lastVerificationRunId:f.runId}),fromStatus:h,toStatus:i,eventId:k}})();return null===h?g.warn("task-event-unknown-task",{taskId:b,event:c}):null===h.toStatus&&g.warn("task-event-rejected",{taskId:b,event:c,fromStatus:h.fromStatus}),h}function i(a,b,c,e,f,i){try{let g=(0,d.MH)(a,b,c,e);if(!g)return null;return h(a,g.id,f,i)}catch(a){return g.warn("task-event-failed",{worktreeId:b,cliToolId:c,instanceId:e,event:f,error:a instanceof Error?a.message:String(a)}),null}}},63209:(a,b,c)=>{c.d(b,{bT:()=>g});var d=c(51297),e=c(76777);let f=[{id:"overloaded",pattern:/\b5\d{2}\s+Overloaded\b/i,selfRetrying:!0},{id:"retrying",pattern:/Retrying in \d+s\s*[·•]\s*attempt \d+\/\d+/i,selfRetrying:!0},{id:"limit-reached",pattern:/\blimit reached\b/i,selfRetrying:!1},{id:"api-error",pattern:/\bAPI Error(?::|\s+\d{3})/i,selfRetrying:!1}];function g(a){let b=(0,d.aJ)(a);for(let a of f){var c;let d=a.pattern.exec(b);if(!d)continue;let f=b.lastIndexOf("\n",d.index)+1,g=b.indexOf("\n",d.index);return{fault:a,matchedText:(c=b.slice(f,-1===g?void 0:g).trim()||d[0],(0,e.D)(c,200,"…[truncated]"))}}return null}},63869:(a,b,c)=>{c.d(b,{Pw:()=>l,tV:()=>p});var d=c(79892),e=c(74258),f=c(43484),g=c(81254),h=c(93997),i=c(20610);let j=/^\[[ x]\] /,k="answer_mode_keys";class l extends Error{constructor(a,b,c){super(`Refused to send "${b}" to ${a}: its ${c.kind} dialog takes '${c.answerMode}' input, not a typed number (${k}). The digit would be swallowed and the Enter after it would confirm whatever is highlighted. Nothing was sent.`),this.name="PromptAnswerRejectedError",this.reason=k,this.dialogKind=c.kind,this.answerMode=c.answerMode}}async function m(a){if(void 0!==a.frame)return a.frame;try{return await (0,d.Xg)(a.sessionName,200)}catch{return null}}async function n(a){if(!/^\d+$/.test(a.answer))return;let b=(0,f.bN)(a.cliToolId);if(!b.hasDialogRules)return;let c=await m(a);if(null===c)return;let d=b.detectDialog((0,e.z)(c));if(null!==d&&"numbered"!==d.answerMode)throw new l(a.cliToolId,a.answer,d)}function o(a){if(0===a)return[];let b=a>0?"Down":"Up";return Array.from({length:Math.abs(a)},()=>b)}async function p(a){let{sessionName:b,answer:c,cliToolId:e,promptData:f,fallbackPromptType:k,fallbackDefaultOptionNumber:l}=a;if(await n(a),("claude"===e||"antigravity"===e)&&(f?.type==="multiple_choice"||"multiple_choice"===k)&&/^\d+$/.test(c)){let a,e=parseInt(c,10),g=null;if(f?.type==="multiple_choice"){let b=(g=f.options).find(a=>a.isDefault);a=b?.number??1}else a=l??1;let h=e-a;if(null!==g&&g.some(a=>j.test(a.label))&&null!==g){let a=g.filter(a=>j.test(a.label)).length,c=[...o(h),"Space"];c.push(...o(a-e+1)),c.push("Enter"),await (0,d.KB)(b,c)}else{let a=o(h),c=f?.type==="multiple_choice"&&!0===f.isAskUserQuestion&&0===h?["Down","Up","Enter"]:[...a,"Enter"];await (0,d.KB)(b,c)}}else{await (0,d.V1)(b,c,!1);let e=function(a){let b=(a.promptData?.type==="multiple_choice"?a.promptData.submitMode:void 0)??a.fallbackSubmitMode??"answer_then_enter";return(0,g.MI)(b)?b:"answer_then_enter"}(a);"answer_only"===e&&(a.promptData?.type==="multiple_choice"||"multiple_choice"===a.fallbackPromptType)&&/^\d+$/.test(a.answer)||(await new Promise(a=>setTimeout(a,i.pL)),await (0,d.V1)(b,"",!0))}(0,h.gm)(b)}},71080:(a,b,c)=>{c.d(b,{L1:()=>g,Re:()=>h,j7:()=>f});var d=c(55511);let e=globalThis.__responseHashCache??(globalThis.__responseHashCache=new Map);function f(a,b){let c=(0,d.createHash)("sha256").update(b).digest("hex");return e.get(a)===c||(e.set(a,c),!1)}function g(a){e.delete(a)}function h(a,b){if(a===b)return;let c=e.get(a);e.delete(a),void 0!==c&&e.set(b,c)}},72457:(a,b,c)=>{c.d(b,{gv:()=>f,i2:()=>h,iX:()=>g,zm:()=>i});var d=c(55511);let e=globalThis.__promptHashCache??(globalThis.__promptHashCache=new Map);function f(a,b){let c=(0,d.createHash)("sha256").update(b).digest("hex");return e.get(a)===c||(e.set(a,c),!1)}function g(a){e.delete(a)}function h(a,b){if(a===b)return;let c=e.get(a);e.delete(a),void 0!==c&&e.set(b,c)}function i(a,b){return"copilot"!==b?a:a.replace(/^[❯>]\s/gm," ")}},73478:(a,b,c)=>{c.d(b,{I7:()=>u});var d=c(24455),e=c(88807),f=c(73753),g=c(72626),h=c(57836),i=c(80544),j=c(92010),k=c(61191),l=c(50779),m=c(27519);let n=(0,g.h)("push/waiting-notifier"),o=globalThis.__waitingPushPending??(globalThis.__waitingPushPending=new Map),p=globalThis.__waitingPushGraceTimers??(globalThis.__waitingPushGraceTimers=new Map);async function q(a,b,c){let d=a.instanceId??a.cliToolId;try{await (0,k.notifyPushSubscribers)({worktreeId:a.worktreeId,worktreeName:function(a){try{return(0,f.getWorktreeById)((0,e.getDbInstance)(),a)?.name??a}catch{return a}}(a.worktreeId),kind:"prompt",agentName:d,instanceId:d,waitingKind:a.kind,waitingSince:a.since,escalated:b},c)}catch(c){n.warn("waiting-push-failed",{worktreeId:a.worktreeId,instanceId:d,escalated:b,error:c instanceof Error?c.message:String(c)})}}function r(a){let b=p.get(a);void 0!==b&&(clearTimeout(b),p.delete(a))}function s(a,b){(0,j.R)({worktreeId:a.worktreeId,cliToolId:a.cliToolId,instanceId:a.instanceId,waitingSince:a.since})||q(a,!1,b)}function t(){if(o.size>0)return;let a=globalThis.__waitingPushEscalationTimer;void 0!==a&&(clearInterval(a),globalThis.__waitingPushEscalationTimer=void 0)}function u(){let a=globalThis.__waitingPushUnsubscribe;for(let b of(a&&(a(),globalThis.__waitingPushUnsubscribe=void 0),p.values()))clearTimeout(b);p.clear(),o.clear(),t();let b=(0,h.wN)(a=>{!function(a){var b;if(!(0,m.lU)())return;let c=(0,d.v7)(a.worktreeId,a.cliToolId,a.instanceId);if(!a.waiting||null===a.since){r(c),o.delete(c),t(),(0,l.GT)({worktreeId:a.worktreeId,agentName:a.instanceId??a.cliToolId,at:a.at});return}let e={worktreeId:a.worktreeId,cliToolId:a.cliToolId,instanceId:a.instanceId,since:a.since,kind:a.kind};if(o.set(c,e),!function(){if(void 0!==globalThis.__waitingPushEscalationTimer)return;let a=setInterval(()=>{!function(a=Date.now()){if(0===o.size)return t();let b=(0,i.rS)(),c=6e4*b.thresholdMinutes;for(let[d,e]of Array.from(o)){let f=(0,h.Jp)(e.worktreeId,e.cliToolId,e.instanceId);if(null===f||f.since!==e.since){o.delete(d);continue}b.enabled&&!(a-e.since<c)&&((0,j.R)({worktreeId:e.worktreeId,cliToolId:e.cliToolId,instanceId:e.instanceId,waitingSince:e.since,escalated:!0})||(o.delete(d),q({...e,kind:f.kind??e.kind},!0,a)))}t()}()},6e4);a.unref?.(),globalThis.__waitingPushEscalationTimer=a}(),null==(b=e.kind)||"unclassified"===b){r(c);let a=setTimeout(()=>{!function(a){p.delete(a);let b=o.get(a);if(void 0===b)return;let c=(0,h.Jp)(b.worktreeId,b.cliToolId,b.instanceId);if(null===c||c.since!==b.since){o.delete(a),t();return}let d={...b,kind:c.kind};o.set(a,d),s(d,Date.now())}(c)},8e3);a.unref?.(),p.set(c,a);return}s(e,a.at)}(a)});return globalThis.__waitingPushUnsubscribe=b,b}},75498:(a,b,c)=>{c.d(b,{Lj:()=>f,Tb:()=>e,sD:()=>g});var d=c(68901);let e=2e4;function f(a,b,c){if(!c)return null;if("off"===c.mode)return{reason:"mode-off"};let f=function(a,b){if(0===b.length)return{outcome:"no-match"};let c=a.map(a=>a.length>e?a.slice(0,e):a);for(let a of b){if(a.length>200||!(0,d.P0)(a).valid)return{outcome:"unusable",pattern:a};let b=new RegExp(a);for(let e of c){let c=(0,d.eJ)(b,e);if(null===c)return{outcome:"unusable",pattern:a};if(c)return{outcome:"match",pattern:a}}}return{outcome:"no-match"}}(b,c.denyPatterns);return"match"===f.outcome?{reason:"deny-pattern",pattern:f.pattern}:"unusable"===f.outcome?{reason:"deny-pattern-unusable",pattern:f.pattern}:"safe"===c.mode?"yes_no"===a?null:{reason:"type-not-allowed"}:"allow-listed"===c.mode?c.allowPromptTypes.includes(a)?null:{reason:"type-not-allowed"}:null}function g(a,b){let c=function(a){if("yes_no"===a.type)return"y";if("multiple_choice"===a.type){let b=a.options.find(a=>a.isDefault)??a.options[0];return!b||b.requiresTextInput?null:b.number.toString()}return null}(a);if(null===c)return{answer:null,suppressedBy:null};let d=f(a.type,function(a){let b=[a.question];if(a.approvalTarget&&b.push(a.approvalTarget),"multiple_choice"===a.type)for(let c of a.options)b.push(c.label);else b.push(...a.options);return b}(a),b);return d?{answer:null,suppressedBy:d.reason,pattern:d.pattern}:{answer:c,suppressedBy:null}}},80544:(a,b,c)=>{c.d(b,{Di:()=>h,O$:()=>g,d7:()=>k,rS:()=>j});var d=c(88807);let e=(0,c(72626).h)("push/escalation-settings"),f="push_escalation",g={enabled:!0,thresholdMinutes:10},h=[5,10,30,60];function i(a){if("object"!=typeof a||null===a)return{...g};let b="boolean"==typeof a.enabled?a.enabled:g.enabled,c=a.thresholdMinutes;return{enabled:b,thresholdMinutes:"number"==typeof c&&Number.isFinite(c)&&c>=1&&c<=1440?Math.round(c):g.thresholdMinutes}}function j(){try{let a=(0,d.getDbInstance)().prepare("SELECT value FROM app_settings WHERE key = ?").get(f);if(!a)return{...g};return i(JSON.parse(a.value))}catch(a){return e.warn("escalation-settings-read-failed",{error:a instanceof Error?a.message:String(a)}),{...g}}}function k(a){let b=i(a),c=Date.now();return(0,d.getDbInstance)().prepare(`
20
+ INSERT INTO app_settings (key, value, created_at, updated_at)
21
+ VALUES (?, ?, ?, ?)
22
+ ON CONFLICT(key) DO UPDATE SET
23
+ value = excluded.value,
24
+ updated_at = excluded.updated_at
25
+ `).run(f,JSON.stringify(b),c,c),b}},82450:(a,b,c)=>{c.d(b,{IS:()=>h,LH:()=>n,NN:()=>g,Sj:()=>p,aW:()=>o});var d=c(85164),e=c(13033),f=c(56263);function g(a){let b=(0,d.aJ)(a).split("\n"),c=(0,d.GT)(b),e=c>=0?b.slice(0,c):b,f=-1;for(let a=e.length-1;a>=0;a--)if(/^❯\s+\S/.test(e[a])){f=a;break}let g=f>=0?f+1:0,h=e.slice(g),i=[/CLAUDE_HOOKS_/,/\/bin\/claude/,/^claude\s*$/,/@.*\s+%\s*$/,/^[^⏺]*curl.*POST/,/^[^⏺]*Content-Type/,/^[^⏺]*export\s+CLAUDE_/,/^\s*$/,/^[╭╮╰╯│─\s]+$/,/^[│╭╮╰╯].*[│╭╮╰╯]$/,/Claude Code v[\d.]+/,/^Tips for getting started/,/^Welcome back/,/Run \/init to create/,/^Recent activity/,/^No recent activity/,/▐▛███▜▌|▝▜█████▛▘|▘▘ ▝▝/,/^\s*Opus \d+\.\d+\s*·\s*Claude Max/,/\.com's Organization/,/\?\s*for shortcuts\s*$/,/^─{10,}$/,/^❯\s*$/,d.fW],j=[];for(let a of h)!i.some(b=>b.test(a))&&a.trim()&&j.push(a);return j.join("\n").trim()}function h(a){let b=(0,d.aJ)(a).split("\n"),c=[],e=[/^maenokota@.*%/,/^zsh:/,/^feature-issue-\d+/,/^\s*$/],f=!1,g=[];for(let a of b){if(a.includes("✦")){f=!0;let b=a.indexOf("✦"),c=a.substring(b+1).trim();c&&g.push(c);continue}if(f){if(e.some(b=>b.test(a)))continue;g.push(a)}}if(g.length>0)return g.join("\n").trim();for(let a of b)e.some(b=>b.test(a))||c.push(a);return c.join("\n").trim()}let i=RegExp(`^●\\s+(?:${d.Jr})[\\s:]`),j=/^\$\s+[A-Z][A-Za-z]*(?:\s|$)/,k=/^\d+\s+lines\.\.\.$/,l=/^[◐◑◒◓]/,m=/^(?:git\s+--no-pager|git\s+(?:log|diff|show|status|branch|remote|fetch|pull|push|merge|rebase|checkout|reset|stash|tag|config|clone|init|add|commit|rm|mv|bisect|grep|ls-files|rev-parse|describe|shortlog|blame|reflog|cherry-pick|revert|submodule|worktree)\b|npm\s+|npx\s+|yarn\s+|pnpm\s+|cargo\s+|pip\s+|rustc\s+|cmake\s+|docker\s+|kubectl\s+|aws\s+|gcloud\s+|az\s+|terraform\s+|ansible\s+|curl\s+|wget\s+|ssh\s+|scp\s+|rsync\s+|grep\s+|sed\s+|awk\s+|mkdir\s+|rm\s+|cp\s+|mv\s+|chmod\s+|chown\s+)/;function n(a){let b=(0,d.aJ)(a).split("\n"),c=(0,d.wv)(b),f=c>=0?b.slice(0,c):b,g=-1;for(let a=f.length-1;a>=0;a--){let b=(0,e.IW)(f[a]);if(b&&/^❯\s+\S/.test(b)){g=a;break}}let h=g>=0?g+1:0;if(g>=0)for(;h<f.length&&d.Fg.test(f[h]);)h++;let n=f.slice(h),o=[],p=!1,q=!1;for(let a of n){if(d.JN.test(a))continue;let b=(0,e.IW)(a);if(!b){p=!1,q=!1;continue}if(d.J7.some(a=>a.test(b)))continue;if(j.test(b)){q=!0,p=!1;continue}if(i.test(b))continue;if(l.test(b)){p=!0,q=!1;continue}if(!(k.test(b)||m.test(b))){if(/^❯\s*/.test(b)){p=!1,q=!1;continue}if(!/^[│└]/.test(b)){if(/^●/.test(b)){p=!1,q=!1,o.push(b.replace(/^●\s*/,""));continue}p||q||o.push(b)}}}return o.join("\n").trim()}function o(a){let b=a.split("\n"),c=[];for(let a=0;a<b.length;a++){let f=(0,e.l1)(b[a]);f&&d.Md.test(f)&&c.push(a)}let f=0;c.length>=2&&(f=c[c.length-2]+1);let g=[];for(let a=f;a<b.length;a++){let c=(0,e.l1)(b[a]);!(!c||d.sx.some(a=>a.test(c)))&&(d.Md.test(c)||g.push(c))}return g.join("\n").trim()}function p(a,b=f.Rf,c=f.ky){if(!a||a.length<=b)return a;let d=c+"\n",e=b-d.length;if(e<=0)return c.slice(0,b);let g=a.length-e;if(g>0&&g<a.length){let b=a.charCodeAt(g);b>=56320&&b<=57343&&(g+=1)}return d+a.slice(g)}},91318:(a,b,c)=>{c.d(b,{ie:()=>j,n:()=>i});var d=c(56791),e=c(88807),f=c(24455);let g=(0,c(72626).h)("auto-yes-policy"),h=new Map;function i(a,b,c){let i=c??b,j=(0,f.v7)(a,b,i),k=Date.now(),l=h.get(j);if(l&&l.expiresAt>k)return l.policy;let m=function(a,b,c){try{let f=(0,d.getActiveTaskForInstance)((0,e.getDbInstance)(),a,b,c);if(!f)return null;return f.contract.autoYes}catch(d){return g.warn("policy-lookup-failed",{worktreeId:a,cliToolId:b,instanceId:c,error:d instanceof Error?d.message:String(d)}),null}}(a,b,i);return h.size>=200&&function(a){for(let[b,c]of h.entries())c.expiresAt<=a&&h.delete(b)}(k),h.set(j,{policy:m,expiresAt:k+5e3}),m}function j(a){h.delete(a)}},91601:(a,b,c)=>{c.d(b,{Di:()=>f.Di,HR:()=>d.HR,J$:()=>e.notifyPushSubscribers,O$:()=>f.O$,d7:()=>f.d7,rS:()=>f.rS});var d=c(27519);c(8532);var e=c(61191);c(3915),c(92010),c(81099),c(77703),c(73478);var f=c(80544);c(50779),c(4806),c(55233)},92010:(a,b,c)=>{c.d(b,{R:()=>h});var d=c(24455),e=c(72626),f=c(52277);let g=(0,e.h)("push/prompt-gate");function h(a){let b=function(a){let{worktreeId:b,cliToolId:c,instanceId:e,waitingSince:g}=a,h=(0,d.aq)(b,c,e);if(null===h||!h.enabled)return{suppress:!1,reason:"auto-yes-inactive",stopReason:h?.stopReason};let i=(0,f.gb)(b,c,e);return null!==i&&i.at>=g?{suppress:!1,reason:"policy-withheld",suppressedBy:i.reason}:!0===a.escalated?{suppress:!1,reason:"escalation-reminder"}:{suppress:!0,reason:"auto-yes-answering"}}(a),c={worktreeId:a.worktreeId,cliToolId:a.cliToolId,instanceId:a.instanceId??a.cliToolId,waitingSince:a.waitingSince,escalated:!0===a.escalated,reason:b.reason,...void 0!==b.stopReason?{stopReason:b.stopReason}:{},...void 0!==b.suppressedBy?{suppressedBy:b.suppressedBy}:{}};return b.suppress?g.info("prompt-push-suppressed",c):g.debug("prompt-push-allowed",c),b.suppress}},97751:(a,b,c)=>{c.d(b,{M4:()=>p,W7:()=>r,aK:()=>q,dV:()=>l,dZ:()=>m,yQ:()=>j});var d=c(72626),e=c(36051),f=c(25071),g=c(129),h=c(62887);let i=(0,d.h)("lib/hooks/structured-decision-response"),j="Rejected by the operator via `commandmate respond`.",k={1:["once","allow once","allow","yes","y"],2:["always","allow always","allow-always"],3:["reject","deny","no","n"]};function l(a){let b=a.trim().toLowerCase();if(""===b)return null;for(let a of e.QB)if(b===String(a.number)||b===a.label.toLowerCase()||b===a.reply||(k[a.number]??[]).includes(b))return a;return null}function m(a){let b=a.questions[0];return b?b.choices.map((a,b)=>({number:b+1,label:a.label,reply:a.label})):[]}let n=/^\d+(?:\s*[,\s]\s*\d+)*$/;function o(a){return a.map(a=>`${a.number} = ${a.label}`).join(", ")}function p(a,b){let c=b.trim();if(""===c)return{ok:!1,reason:"unresolvable_answer",message:"An empty answer names no choice."};if(1!==a.questions.length)return{ok:!1,reason:"multi_question_unsupported",message:`This call asks ${a.questions.length} questions and \`answers\` carries one array per question; a single answer cannot say what the others are. Answer it in the terminal.`};let d=a.questions[0],e=m(a);if(n.test(c)){let a=[];for(let b of c.split(/[,\s]+/)){let d=e.find(a=>a.number===Number(b));if(!d)return{ok:!1,reason:"answer_out_of_range",message:`'${c}' names no choice this question offers. ${o(e)}.`};a.some(a=>a.number===d.number)||a.push(d)}return a.length>1&&!d.multiSelect?{ok:!1,reason:"multi_select_not_offered",message:`This question accepts one choice. Send a single number: ${o(e)}.`}:{ok:!0,resolved:{answers:[a.map(a=>a.reply)],selected:a,freeText:!1}}}let f=e.find(a=>a.label.toLowerCase()===c.toLowerCase());return f?{ok:!0,resolved:{answers:[[f.reply]],selected:[f],freeText:!1}}:c.length>1e3?{ok:!1,reason:"unresolvable_answer",message:"A free-text answer is limited to 1000 characters; this one is longer and is refused rather than cut short."}:{ok:!0,resolved:{answers:[[c]],selected:[],freeText:!0}}}function q(a){return{kind:"answer",answers:a.answers}}async function r({worktreeId:a,cliToolId:b,instanceId:d,answer:k,useDefault:m=!1}){let n,o=(0,g.VM)(b);if(null===o.capabilities.eventIdentity)return{kind:"not-applicable",reason:"no-decision-identity"};let p={worktreeId:a,cliToolId:b,instanceId:d};try{n=await o.listPending(p)}catch(c){return i.warn("structured-decision-unreachable",{worktreeId:a,cliToolId:b,instanceId:d??b,error:c instanceof Error?c.message:String(c)}),{kind:"not-applicable",reason:"source-unreachable"}}let q=n.filter(a=>"permission"===a.kind);if(0===q.length)return{kind:"not-applicable",reason:"no-pending-decision"};let r=q[0];if(q.length>1&&i.info("structured-decision-multiple-pending",{worktreeId:a,cliToolId:b,instanceId:d??b,pending:q.length,answering:r.id}),m)return{kind:"refused",reason:"unresolvable_answer",message:`--default cannot answer a structured approval: the agent publishes no default verdict. Send a number instead — ${e.QB.map(a=>`${a.number} = ${a.label}`).join(", ")}.`};let s=void 0===k?null:l(k);if(!s)return{kind:"refused",reason:"answer_out_of_range",message:`'${k??""}' is not one of the verdicts this approval accepts. `+e.QB.map(a=>`${a.number} = ${a.label} (${a.reply})`).join(", ")+"."};let t=function(a){switch(a){case 1:return{kind:"allowOnce"};case 2:return{kind:"allowAlways"};case 3:return{kind:"deny",message:j};default:return null}}(s.number);if(!t)return{kind:"refused",reason:"unresolvable_answer",message:`Option ${s.number} has no verdict on this server.`};let{delivery:u}=await (0,f.GW)(o,p,r,t),v=u?.delivered===!0;if(v&&o.capabilities.permissionReplyReleasesPrompt){let{recordAgentEvent:e}=await Promise.resolve().then(c.bind(c,48083));e(a,b,d,{event:"notification",at:Date.now(),detail:h.KC,sessionId:r.conversationId,decisionId:r.id,promptSettled:!0})}return i.info("structured-decision-answered",{worktreeId:a,cliToolId:b,instanceId:d??b,decisionId:r.id,optionNumber:s.number,reply:s.reply,delivered:v}),{kind:"answered",decisionId:r.id,option:s,delivered:v}}},99508:(a,b,c)=>{c.r(b),c.d(b,{INTERACTION_SNAPSHOT_RETRY_DELAYS_MS:()=>l,__resetTerminalBroadcastState:()=>s,broadcastSessionStatus:()=>r,broadcastTerminalSnapshot:()=>m,broadcastTerminalSnapshotAfterInteraction:()=>q});var d=c(49640),e=c(88807),f=c(1058),g=c(72626),h=c(43234),i=c(93997);let j=(0,g.h)("terminal-broadcast"),k=globalThis.__terminalSnapshotVersions??(globalThis.__terminalSnapshotVersions=new Map),l=[100,250,500,750];async function m(a,b,c){if((0,d.hasRoomSubscribers)(a))try{let d=(0,e.getDbInstance)(),g=await (0,f.$v)(d,a,b,c);p(a,b,g,c)}catch(b){j.error("terminal-snapshot:failed",{worktreeId:a,error:b instanceof Error?b.message:String(b)})}}function n(a){return JSON.stringify([a.fullOutput??"",a.isRunning,a.sessionStatus,a.thinking??!1,a.isPromptWaiting??!1,a.isSelectionListActive??!1,a.isPagerActive??!1,a.isDismissablePanelActive??!1,a.isUnclassifiedActive??!1])}async function o(a,b,c){let d=h.CLIToolManager.getInstance().getTool(b);return(0,i.gm)(d.getSessionName(a,c)),(0,f.$v)((0,e.getDbInstance)(),a,b,c)}function p(a,b,c,e){let f=e??b,g=`${a}:${b}:${f}`;(0,d.broadcast)(a,{type:"terminal_snapshot",worktreeId:a,cliToolId:b,instanceId:f,output:c.fullOutput??"",isRunning:c.isRunning,sessionStatus:c.sessionStatus,thinking:c.thinking??!1,isPromptWaiting:c.isPromptWaiting??!1,promptData:c.promptData??null,isSelectionListActive:c.isSelectionListActive??!1,isPagerActive:c.isPagerActive??!1,isDismissablePanelActive:c.isDismissablePanelActive??!1,isUnclassifiedActive:c.isUnclassifiedActive??!1,version:function(a){let b=(k.get(a)??0)+1;return k.set(a,b),b}(g)})}async function q(a,b,c,e=l){if((0,d.hasRoomSubscribers)(a))try{let d=await o(a,b,c),f=n(d);for(let g of(p(a,b,d,c),e)){await new Promise(a=>setTimeout(a,g));let d=await o(a,b,c);if(n(d)!==f)return void p(a,b,d,c)}}catch(d){j.error("terminal-snapshot:interaction-refresh-failed",{worktreeId:a,cliToolId:b,instanceId:c,error:d instanceof Error?d.message:String(d)})}}function r(a,b,c){(0,d.broadcast)(a,{type:"session_status_changed",worktreeId:a,isRunning:b,cliTool:c?.cliTool??null,instance:c?.instance??null})}function s(){k.clear()}}};
@@ -0,0 +1 @@
1
+ "use strict";exports.id=7890,exports.ids=[3925,6306,7890,8687],exports.modules={3421:(a,b,c)=>{Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(71237),e=c(55088),f=c(17679);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},7329:(a,b,c)=>{c.d(b,{Hv:()=>m,W3:()=>k,uK:()=>l});var d=c(90787),e=c(52660),f=c(18201),g=c(23854),h=c(49798),i=c(67164);let j=(0,c(72626).h)("relay-service");function k(a,b){for(let c of[b.from.worktreeId,b.to.worktreeId])if(!(0,h.r)(a,c))return{ok:!1,refusal:{code:"RELAY_WORKTREE_NOT_FOUND",message:`Worktree '${c}' not found`,worktreeId:c}};let c=(0,g.$G)({from:b.from,to:b.to,parentHops:function(a,b){try{let g=(0,h.S)(a,b),i=(0,e.getMessages)(a,b.worktreeId,{limit:5,limitUnit:"pairs",cliToolId:g.cliToolId,instanceId:b.instanceId,matchResolvedInstance:!0}).filter(a=>"user"===a.role),j=i.findIndex(a=>"relay"===a.messageType);if(-1===j)return null;let k=i[j];for(let a=0;a<j;a+=1){var c;if(c=i[a],c.timestamp.getTime()<k.timestamp.getTime()||(0,f.pk)(c.content)!==(0,f.pk)(k.content))return null}let l=(0,e.parseRelayRequestId)(k.requestId);if(!l)return null;return(0,d.Ip)(a,l)?.hops??null}catch(a){return j.warn("relay-parent-lookup-failed",{worktreeId:b.worktreeId,instanceId:b.instanceId,error:a instanceof Error?a.message:String(a)}),null}}(a,b.from),allowRelayChain:!0===b.allowRelayChain,openBetween:(0,d.Oz)(a,b.from,b.to)});if((0,g.Qe)(c))return{ok:!1,refusal:c};let k=b.now??Date.now(),l=(0,d.CR)(a,{from:b.from,to:b.to,hops:c.hops,expiresAt:k+(0,g.AL)(b.ttlMs),now:k});return j.info("relay-opened",{relayId:l.id,from:`${l.from.worktreeId}/${l.from.instanceId}`,to:`${l.to.worktreeId}/${l.to.instanceId}`,hops:l.hops}),(0,i._)(a,l.id,"requested",(0,h.S)(a,l.from),(0,h.S)(a,l.to),k),{ok:!0,relay:l}}function l(a,b,c=Date.now()){let e=(0,d.Ip)(a,b);return e?(0,d.m_)(a,b,c)?(j.info("relay-cancelled",{relayId:b}),{ok:!0,relay:(0,d.Ip)(a,b)??e}):{ok:!1,reason:"already_closed",relay:e}:{ok:!1,reason:"not_found",relay:null}}function m(a,b){return(0,d.M4)(a,b)}},18201:(a,b,c)=>{c.d(b,{Ce:()=>g,pk:()=>e});let d=(0,c(72626).h)("lib/history/user-turn-recorder");function e(a){return a.replace(/\r\n?/g,"\n").split("\n").map(a=>a.replace(/[ \t ]+$/u,"")).join("\n").trim()}function f(a){return{worktreeId:a.worktreeId,cliToolId:a.cliToolId,instanceId:a.instanceId??a.cliToolId}}async function g(a,b,h,i,j={}){let k=a.instanceId??a.cliToolId,l=e(h);if(0===b.length||0===l.length)return{outcome:"skipped",messageId:null,timestampMs:null};try{let[{getDbInstance:g},m,{broadcastMessage:n}]=await Promise.all([Promise.resolve().then(c.bind(c,88807)),Promise.resolve().then(c.bind(c,52660)),Promise.all([c.e(1503),c.e(4299),c.e(6838),c.e(1719),c.e(2119),c.e(2445),c.e(595)]).then(c.bind(c,49640))]),o=g(),p=m.findMessageByRequestId(o,a.worktreeId,b);if(p)return{outcome:"already-recorded",messageId:p.id,timestampMs:p.timestamp.getTime()};let q=i>0?i:Date.now(),r=function(a,b,c,g,h,i,j,k){var l,m,n;let o=Math.min(j-12e4,k.adoptionFromMs??1/0),p=(l=a.findUnkeyedUserMessages(b,{worktreeId:c.worktreeId,cliToolId:c.cliToolId,instanceId:g,fromMs:o,toMs:j+12e4,includeRelayDelivered:!0}),m=i,n=j,l.filter(a=>e(a.content)===m).sort((a,b)=>Math.abs(a.timestamp.getTime()-n)-Math.abs(b.timestamp.getTime()-n)));for(let e of p)if(!e.requestId&&a.setMessageRequestId(b,e.id,h))return d.info("user-turn-adopted",{...f(c),requestId:h,messageId:e.id,driftMs:e.timestamp.getTime()-j}),{outcome:"adopted",messageId:e.id,timestampMs:e.timestamp.getTime()};let q=p.find(a=>a.requestId);return q?(d.info("user-turn-already-relayed",{...f(c),requestId:h,messageId:q.id,relayRequestId:q.requestId??null,driftMs:q.timestamp.getTime()-j}),{outcome:"already-recorded",messageId:q.id,timestampMs:q.timestamp.getTime()}):null}(m,o,a,k,b,l,q,j);if(r)return r;let s=m.createMessage(o,{worktreeId:a.worktreeId,role:"user",content:h,messageType:"normal",timestamp:new Date(q),cliToolId:a.cliToolId,instanceId:k,requestId:b});return n("message",{worktreeId:a.worktreeId,message:s}),d.info("user-turn-recorded",{...f(a),requestId:b,contentLength:h.length}),{outcome:"inserted",messageId:s.id,timestampMs:q}}catch(c){return d.error("user-turn-record-failed",{...f(a),requestId:b,error:c instanceof Error?c.message:String(c)}),{outcome:"failed",messageId:null,timestampMs:null}}}},23854:(a,b,c)=>{c.d(b,{$G:()=>f,AL:()=>h,DZ:()=>d,Qe:()=>g,ie:()=>e});let d=4e3,e=15e3;function f(a){var b,c;if(b=a.from,c=a.to,b.worktreeId===c.worktreeId&&b.instanceId===c.instanceId)return{code:"RELAY_SELF_TARGET",message:"A session cannot relay a reply to itself. --reply-to must name a different worktree or a different agent instance."};let d=null===a.parentHops?1:a.parentHops+1;return null===a.parentHops||a.allowRelayChain?d>3?{code:"RELAY_HOPS_EXCEEDED",message:`Relay chains stop at 3 hops; this one would be ${d}. Report the reply to whoever asked instead of forwarding it again.`}:a.openBetween>=1?{code:"RELAY_DUPLICATE_PENDING",message:"There is already an open relay between these two sessions. Wait for it, or withdraw it with `commandmate relays cancel <id>`."}:{ok:!0,hops:d}:{code:"RELAY_CHAIN_BLOCKED",message:"The last message this session was given arrived over a relay, so opening another one would chain two deliveries together. Pass --allow-relay-chain if that is what you mean."}}function g(a){return"code"in a}function h(a){return void 0!==a&&Number.isFinite(a)?Math.min(6048e5,Math.max(6e4,Math.trunc(a))):864e5}},43925:(a,b,c)=>{c.d(b,{PJ:()=>i,dz:()=>j,vQ:()=>g});var d=c(57836),e=c(23854);let f=(0,c(72626).h)("relay-triggers");function g(a,b,d,e){let g={worktreeId:a,cliToolId:b,instanceId:d??b};(async()=>{try{let{notifyRelayTurnCompleted:a}=await Promise.all([c.e(1503),c.e(1634),c.e(4299),c.e(6838),c.e(9130),c.e(4443),c.e(8800),c.e(1719),c.e(7905),c.e(2119),c.e(2445),c.e(6337),c.e(1886),c.e(595),c.e(6491),c.e(8918),c.e(7875),c.e(3077),c.e(1210)]).then(c.bind(c,71210));await a(g,{settled:e})}catch(c){f.warn("relay-turn-trigger-failed",{worktreeId:a,cliToolId:b,instanceId:g.instanceId,error:c instanceof Error?c.message:String(c)})}})()}async function h(){try{let{runRelayMaintenanceTick:a}=await Promise.all([c.e(1503),c.e(1634),c.e(4299),c.e(6838),c.e(9130),c.e(4443),c.e(8800),c.e(1719),c.e(7905),c.e(2119),c.e(2445),c.e(6337),c.e(1886),c.e(595),c.e(6491),c.e(8918),c.e(7875),c.e(3077),c.e(1210)]).then(c.bind(c,71210));await a()}catch(a){f.warn("relay-maintenance-failed",{error:a instanceof Error?a.message:String(a)})}}function i(){j(),globalThis.__relayTriggersUnsubscribe=(0,d.wN)(a=>{a.waiting&&"prompt"===a.kind&&function(a,b,d){let e={worktreeId:a,cliToolId:b,instanceId:d??b};(async()=>{try{let{notifyRelayPromptWaiting:a}=await Promise.all([c.e(1503),c.e(1634),c.e(4299),c.e(6838),c.e(9130),c.e(4443),c.e(8800),c.e(1719),c.e(7905),c.e(2119),c.e(2445),c.e(6337),c.e(1886),c.e(595),c.e(6491),c.e(8918),c.e(7875),c.e(3077),c.e(1210)]).then(c.bind(c,71210));a(e)}catch(c){f.warn("relay-prompt-trigger-failed",{worktreeId:a,cliToolId:b,instanceId:e.instanceId,error:c instanceof Error?c.message:String(c)})}})()}(a.worktreeId,a.cliToolId,a.instanceId)});let a=setInterval(()=>void h(),e.ie);a.unref?.(),globalThis.__relayMaintenanceTimer=a}function j(){let a=globalThis.__relayTriggersUnsubscribe;a&&(a(),globalThis.__relayTriggersUnsubscribe=void 0),globalThis.__relayMaintenanceTimer&&(clearInterval(globalThis.__relayMaintenanceTimer),globalThis.__relayMaintenanceTimer=void 0)}},57836:(a,b,c)=>{c.d(b,{Jp:()=>k,Te:()=>l,hd:()=>j,wN:()=>h});var d=c(24455);let e=(0,c(72626).h)("waiting-episode-state"),f=globalThis.__sessionWaitingEpisodes??(globalThis.__sessionWaitingEpisodes=new Map),g=globalThis.__sessionWaitingTransitionListeners??(globalThis.__sessionWaitingTransitionListeners=new Set);function h(a){return g.add(a),()=>{g.delete(a)}}function i(a){for(let b of g)try{b(a)}catch(b){e.error("waiting-transition-listener-failed",{worktreeId:a.worktreeId,cliToolId:a.cliToolId,instanceId:a.instanceId??a.cliToolId,waiting:a.waiting,error:b instanceof Error?b.message:String(b)})}}function j({worktreeId:a,cliToolId:b,instanceId:c,waiting:e,kind:g=null,structuredSince:h=null,now:j=Date.now()}){let k=(0,d.v7)(a,b,c),l=f.get(k);if(!e)return void 0===l||(f.delete(k),i({worktreeId:a,cliToolId:b,instanceId:c,waiting:!1,since:null,kind:null,at:j})),null;if(void 0!==l)return l.kind=g,l.since;let m=h??j;return f.set(k,{since:m,kind:g}),i({worktreeId:a,cliToolId:b,instanceId:c,waiting:!0,since:m,kind:g,at:j}),m}function k(a,b,c){return f.get((0,d.v7)(a,b,c))??null}function l(a){let b=`${a}${d.CS}`;for(let a of f.keys())if(a.startsWith(b))return!0;return!1}},95736:(a,b,c)=>{a.exports=c(44870)}};
@@ -0,0 +1,32 @@
1
+ "use strict";exports.id=8063,exports.ids=[3925,6306,8063,8687],exports.modules={3421:(a,b,c)=>{Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(71237),e=c(55088),f=c(17679);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},12462:(a,b,c)=>{c.d(b,{T8:()=>j,o4:()=>k});var d=c(31990),e=c(56791),f=c(49640),g=c(82450),h=c(15194);let i=(0,c(72626).h)("assistant-response-saver");function j(a,b){switch(b){case"claude":return(0,g.NN)(a);case"gemini":return(0,g.IS)(a);case"opencode":return(0,g.aW)(a);case"copilot":return(0,g.LH)(a);default:return a.trim()}}async function k(a,b,c,g,k){let l=k??c;try{let m;if((0,h.VA)(c))return null;let n=(0,e.getSessionState)(a,b,l),o=n?.lastCapturedLine||0;try{m=await (0,d.Wh)(b,c,1e4,k)}catch{return i.info("failed-to-capture"),null}if(!m)return null;let p=m.split("\n"),q=p.length;for(;q>0&&""===p[q-1].trim();)q--;let r=q,{bufferReset:s,reason:t}=r>0&&o>25&&r+25<o?{bufferReset:!0,reason:"shrink"}:r>0&&o>50&&r<50?{bufferReset:!0,reason:"restart"}:{bufferReset:!1,reason:null};s&&i.info("buffer:reset-detected",{reason:t,currentLineCount:r,lastCapturedLine:o});let u=s?0:o;if(!s&&r<=o)return r<o&&((0,e.updateSessionState)(a,b,c,r,k),i.info("position:corrected-stale",{from:o,to:r})),null;let v=p.slice(u).join("\n"),w=j(v,c);if(!w||""===w.trim())return(0,e.updateSessionState)(a,b,c,r,k),i.debug("response:empty-after-clean",{currentLineCount:r}),null;let x=new Date(g.getTime()-1),y=(0,e.createMessage)(a,{worktreeId:b,role:"assistant",content:w,messageType:"normal",timestamp:x,cliToolId:c,instanceId:l});return(0,e.updateSessionState)(a,b,c,r,k),(0,f.broadcastMessage)("message",{worktreeId:b,message:y}),i.info("response:saved",{fromLine:o,toLine:r}),y}catch(a){return i.error("error:",{error:a instanceof Error?a.message:String(a)}),null}}},16700:(a,b,c)=>{c.d(b,{A:()=>e,Y:()=>f});let d=new Set(["claude","codex","antigravity"]);function e(a){return d.has(a)?"non_interactive":"interactive"}function f(a){return"non_interactive"===e(a)}},23854:(a,b,c)=>{c.d(b,{$G:()=>f,AL:()=>h,DZ:()=>d,Qe:()=>g,ie:()=>e});let d=4e3,e=15e3;function f(a){var b,c;if(b=a.from,c=a.to,b.worktreeId===c.worktreeId&&b.instanceId===c.instanceId)return{code:"RELAY_SELF_TARGET",message:"A session cannot relay a reply to itself. --reply-to must name a different worktree or a different agent instance."};let d=null===a.parentHops?1:a.parentHops+1;return null===a.parentHops||a.allowRelayChain?d>3?{code:"RELAY_HOPS_EXCEEDED",message:`Relay chains stop at 3 hops; this one would be ${d}. Report the reply to whoever asked instead of forwarding it again.`}:a.openBetween>=1?{code:"RELAY_DUPLICATE_PENDING",message:"There is already an open relay between these two sessions. Wait for it, or withdraw it with `commandmate relays cancel <id>`."}:{ok:!0,hops:d}:{code:"RELAY_CHAIN_BLOCKED",message:"The last message this session was given arrived over a relay, so opening another one would chain two deliveries together. Pass --allow-relay-chain if that is what you mean."}}function g(a){return"code"in a}function h(a){return void 0!==a&&Number.isFinite(a)?Math.min(6048e5,Math.max(6e4,Math.trunc(a))):864e5}},43925:(a,b,c)=>{c.d(b,{PJ:()=>i,dz:()=>j,vQ:()=>g});var d=c(57836),e=c(23854);let f=(0,c(72626).h)("relay-triggers");function g(a,b,d,e){let g={worktreeId:a,cliToolId:b,instanceId:d??b};(async()=>{try{let{notifyRelayTurnCompleted:a}=await Promise.all([c.e(1503),c.e(1634),c.e(4299),c.e(6838),c.e(9130),c.e(4443),c.e(8800),c.e(1719),c.e(7905),c.e(2119),c.e(2445),c.e(6337),c.e(1886),c.e(595),c.e(6491),c.e(8918),c.e(7875),c.e(3077),c.e(1210)]).then(c.bind(c,71210));await a(g,{settled:e})}catch(c){f.warn("relay-turn-trigger-failed",{worktreeId:a,cliToolId:b,instanceId:g.instanceId,error:c instanceof Error?c.message:String(c)})}})()}async function h(){try{let{runRelayMaintenanceTick:a}=await Promise.all([c.e(1503),c.e(1634),c.e(4299),c.e(6838),c.e(9130),c.e(4443),c.e(8800),c.e(1719),c.e(7905),c.e(2119),c.e(2445),c.e(6337),c.e(1886),c.e(595),c.e(6491),c.e(8918),c.e(7875),c.e(3077),c.e(1210)]).then(c.bind(c,71210));await a()}catch(a){f.warn("relay-maintenance-failed",{error:a instanceof Error?a.message:String(a)})}}function i(){j(),globalThis.__relayTriggersUnsubscribe=(0,d.wN)(a=>{a.waiting&&"prompt"===a.kind&&function(a,b,d){let e={worktreeId:a,cliToolId:b,instanceId:d??b};(async()=>{try{let{notifyRelayPromptWaiting:a}=await Promise.all([c.e(1503),c.e(1634),c.e(4299),c.e(6838),c.e(9130),c.e(4443),c.e(8800),c.e(1719),c.e(7905),c.e(2119),c.e(2445),c.e(6337),c.e(1886),c.e(595),c.e(6491),c.e(8918),c.e(7875),c.e(3077),c.e(1210)]).then(c.bind(c,71210));a(e)}catch(c){f.warn("relay-prompt-trigger-failed",{worktreeId:a,cliToolId:b,instanceId:e.instanceId,error:c instanceof Error?c.message:String(c)})}})()}(a.worktreeId,a.cliToolId,a.instanceId)});let a=setInterval(()=>void h(),e.ie);a.unref?.(),globalThis.__relayMaintenanceTimer=a}function j(){let a=globalThis.__relayTriggersUnsubscribe;a&&(a(),globalThis.__relayTriggersUnsubscribe=void 0),globalThis.__relayMaintenanceTimer&&(clearInterval(globalThis.__relayMaintenanceTimer),globalThis.__relayMaintenanceTimer=void 0)}},46961:(a,b,c)=>{c.d(b,{e:()=>f});var d=c(56791),e=c(82149);function f(a,b){if(!(0,d.getAssistantConversationById)(a,b))return;let c=(0,d.getRunningAssistantExecutionByConversation)(a,b),f=(0,e.kx)(b);c&&!f&&((0,d.updateAssistantExecution)(a,c.id,{status:"failed",finishedAt:new Date,stderrText:[c.stderrText??"","[Execution reconciled after process registry loss]"].filter(Boolean).join("\n")}),(0,d.updateAssistantConversation)(a,b,{status:"ready"}))}},49070:(a,b,c)=>{c.d(b,{A:()=>l});var d=c(31990),e=c(3523),f=c(12462),g=c(56791),h=c(57821),i=c(72626),j=c(85164);let k=(0,i.h)("assistant/conversation-response-saver");async function l(a,b,c,i=new Date){try{let k=(0,g.getAssistantSessionState)(a,b),l=k?.lastCapturedLine??0,m=(0,h.G)(b),n=await (0,d.Wh)(m,c,1e4),o="codex"===c?function(a,b){let c=a.split("\n"),d=c.length;for(;d>0&&""===c[d-1].trim();)d--;let e=c.slice(0,d),f=[];for(let a=Math.max(0,b);a<e.length;a++){let b=(0,j.aJ)(e[a]).trimEnd();/^›(?:\s+.*)?$/.test(b)&&f.push(a)}if(f.length<2)return null;let g=f[f.length-2],h=f[f.length-1],i=(0,j.aJ)(e.slice(g+1,h).join("\n")).trim();return i?!function(a){let b=a.trim();return/^•\s+Working\s+\(\d+s\s+•\s+esc to interrupt\)$/i.test(b)||/^•\s+Thinking\s+\(\d+s\s+•\s+esc to interrupt\)$/i.test(b)||/^•\s+Running/i.test(b)}(i)?{response:i,lineCount:h}:null:{response:"",lineCount:h}}(n,l):null,p=o?{response:o.response,isComplete:!0,lineCount:o.lineCount,bufferReset:!1}:(0,e.z$)(n,l,c);if(!p||!p.isComplete||!p.bufferReset&&p.lineCount<=l)return null;let q=(0,f.T8)(p.response,c);if(!q||""===q.trim()||"[No content]"===q)return(0,g.updateAssistantSessionState)(a,b,p.lineCount),null;let r=(0,g.createAssistantMessage)(a,{conversationId:b,role:"assistant",content:q,messageType:"normal",timestamp:i});return(0,g.updateAssistantSessionState)(a,b,p.lineCount),r}catch(a){return k.debug("save:skipped",{conversationId:b,cliToolId:c,error:a instanceof Error?a.message:String(a)}),null}}},57821:(a,b,c)=>{c.d(b,{G:()=>e,O:()=>f});var d=c(43234);function e(a){return`assistant-${a}`}function f(a,b){let c=d.CLIToolManager.getInstance().getTool(a),f=e(b),g=c.getSessionName(f);return{cliTool:c,worktreeId:f,sessionName:g}}},57836:(a,b,c)=>{c.d(b,{Jp:()=>k,Te:()=>l,hd:()=>j,wN:()=>h});var d=c(24455);let e=(0,c(72626).h)("waiting-episode-state"),f=globalThis.__sessionWaitingEpisodes??(globalThis.__sessionWaitingEpisodes=new Map),g=globalThis.__sessionWaitingTransitionListeners??(globalThis.__sessionWaitingTransitionListeners=new Set);function h(a){return g.add(a),()=>{g.delete(a)}}function i(a){for(let b of g)try{b(a)}catch(b){e.error("waiting-transition-listener-failed",{worktreeId:a.worktreeId,cliToolId:a.cliToolId,instanceId:a.instanceId??a.cliToolId,waiting:a.waiting,error:b instanceof Error?b.message:String(b)})}}function j({worktreeId:a,cliToolId:b,instanceId:c,waiting:e,kind:g=null,structuredSince:h=null,now:j=Date.now()}){let k=(0,d.v7)(a,b,c),l=f.get(k);if(!e)return void 0===l||(f.delete(k),i({worktreeId:a,cliToolId:b,instanceId:c,waiting:!1,since:null,kind:null,at:j})),null;if(void 0!==l)return l.kind=g,l.since;let m=h??j;return f.set(k,{since:m,kind:g}),i({worktreeId:a,cliToolId:b,instanceId:c,waiting:!0,since:m,kind:g,at:j}),m}function k(a,b,c){return f.get((0,d.v7)(a,b,c))??null}function l(a){let b=`${a}${d.CS}`;for(let a of f.keys())if(a.startsWith(b))return!0;return!1}},67502:(a,b,c)=>{c.d(b,{JD:()=>i,_$:()=>h});var d=c(15194),e=c(10406),f=c(73753),g=c(74300);function h(a,b,c=new Date){var i;let j=(0,d.oo)(a);return[`You are an assistant using ${j}, running inside CommandMate.`,"",(i=(0,g.S8)(),`## CommandMate CLI Reference
2
+
3
+ The user runs a CommandMate server locally. These are the CLI commands available from their terminal:
4
+
5
+ - \`${i} --version\` — Show version
6
+ - \`${i} init [--defaults]\` — Initialize configuration (interactive / non-interactive)
7
+ - \`${i} start [--dev] [--daemon] [--issue N] [--port N] [--auto-port]\` — Start the server (foreground / dev / background / issue-scoped)
8
+ - \`${i} stop [--issue N]\` — Stop the server
9
+ - \`${i} status [--all] [--issue N]\` — Show running server status
10
+ - \`${i} update [--check] [--yes]\` — Update a globally installed CommandMate
11
+ - \`${i} ls [--json] [--quiet] [--branch PREFIX] [--id PREFIX]\` — List worktrees
12
+ - \`${i} sync [--json]\` — Re-scan registered repositories for worktrees (the GUI sync button)
13
+ - \`${i} send <worktree-id> "message" [--instance ID] [--contract PATH] [--auto-yes] [--duration T]\` — Send a message to an agent session
14
+ - \`${i} wait <worktree-id>... [--timeout N] [--stall-timeout N] [--on-prompt agent|human] [--instance ID] [--verify] [--require-work]\` — Wait until the agent finishes or a prompt appears
15
+ - \`${i} respond <worktree-id> "answer" [--default] [--instance ID]\` — Respond to an agent prompt
16
+ - \`${i} capture <worktree-id> [--json] [--pane] [--tail N] [--prompts] [--instance ID]\` — Capture the current terminal output of a session
17
+ - \`${i} auto-yes <worktree-id> [--enable] [--disable] [--duration T] [--stop-pattern PAT] [--instance ID]\` — Toggle Auto-Yes
18
+ - \`${i} instances <worktree-id> [list|add|remove|alias|kill] [--agent TOOL] [--alias NAME] [--id INSTANCE-ID] [--kill] [--json]\` — Inspect and manage the agent-instance roster of a worktree
19
+ - \`${i} verify <worktree-id> [--gates a,b] [--instance ID] [--json] [--timeout N]\` — Run the verification gates declared in \`.commandmate/verify.yaml\`
20
+ - \`${i} task list|show ...\` / \`${i} report generate|show|list|metrics ...\` — Execution-contract tasks and daily reports
21
+
22
+ Targeting an agent:
23
+
24
+ - \`--instance <id>\` is the way to name the target (\`<agent>\` or \`<agent>-<n>\`, e.g. \`codex-2\`). It is accepted by \`send\` / \`wait\` / \`respond\` / \`capture\` / \`auto-yes\` / \`verify\`, and omitting it means the worktree's primary instance.
25
+ - \`--agent <tool>\` is **not** the normal way to select a target (Issue #1638). It only declares the CLI tool for an *ad-hoc* instance the roster does not know — pair it with \`--instance\` (plus \`--register\` on \`send\` to add the instance to the roster). \`wait\` has no \`--agent\` at all.
26
+ - Valid CLI tools: \`claude\`, \`codex\`, \`gemini\`, \`vibe-local\`, \`opencode\`, \`copilot\`, \`antigravity\`, \`command-code\`.
27
+
28
+ Other notes:
29
+
30
+ - \`--duration\` accepts values like \`1h\`, \`3h\`, \`8h\`.
31
+ - \`send --contract <path>\` records an execution contract (a YAML file under the worktree, e.g. \`.commandmate/tasks/my-task.yaml\`) and sends its preamble plus goal. \`wait --verify\` then adjudicates with the verification gates: exit 20 when a gate fails, 21 when there is nothing to verify.
32
+ `),function(a){let b=(0,e.Yg)(a);if(0===b.length)return"## Registered Repositories\n\nNo repositories are currently registered.";let c=["## Registered Repositories",""];for(let d of(c.push("| Alias | Name | Path | Worktrees | Enabled |"),c.push("|-------|------|------|-----------|---------|"),b)){let b=d.displayName&&d.displayName!==d.name?d.displayName:"-",e=(0,f.vi)(a,d.path).length,g=d.enabled?"yes":"no";c.push(`| ${b} | ${d.name} | ${d.path} | ${e} | ${g} |`)}return c.join("\n")}(b),"",function(a,b){let c=(0,f.vi)(a).filter(a=>a.status&&"done"!==a.status).slice(0,30),e=["## Active Worktree Session Snapshot",`Snapshot taken at: ${b.toISOString()} (not refreshed per message)`,""];if(0===c.length)return e.push("_No worktree sessions had an active status at snapshot time._"),e.join("\n");for(let a of(e.push("| Repository | Branch | CLI | Status | Path |"),e.push("|------------|--------|-----|--------|------|"),c)){var g;let b=a.repositoryDisplayName||a.repositoryName||"-",c=a.name,f=(g=a.cliToolId)?d.ef[g]??g:"-",h=a.status??"-";e.push(`| ${b} | ${c} | ${f} | ${h} | ${a.path} |`)}return e.join("\n")}(b,c)].join("\n")}function i(a,b){return h(a,b)}},74300:(a,b,c)=>{c.d(b,{S8:()=>e,ah:()=>d});let d=3e3;function e(a=process.env){return"commandmate-cli"===a.CM_LAUNCHED_BY?"commandmate":"commandmatedev"}},82149:(a,b,c)=>{c.d(b,{AR:()=>i,Qi:()=>j,XO:()=>f,kx:()=>h,uT:()=>g});let d=new Map,e=new Map;function f(a,b,c){d.set(a,{executionId:a,conversationId:b,process:c,cancellationRequested:!1}),e.set(b,a)}function g(a){let b=d.get(a);b&&(e.delete(b.conversationId),d.delete(a))}function h(a){let b=e.get(a);return b?d.get(b)??null:null}function i(a){return d.get(a)?.cancellationRequested??!1}function j(a){let b=h(a);return!!b&&(b.cancellationRequested=!0,!b.process.killed&&b.process.kill("SIGTERM"))}},95736:(a,b,c)=>{a.exports=c(44870)},98939:(a,b,c)=>{c.d(b,{u:()=>d});function d(a){return{worktreeId:`assistant-repo-${a.id}`,subject:{name:a.displayName||a.name,url:"/chat"}}}}};