commandmate 0.31.3 → 0.32.1

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 (816) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +498 -484
  3. package/.next/app-path-routes-manifest.json +44 -42
  4. package/.next/build-manifest.json +5 -5
  5. package/.next/prerender-manifest.json +3 -3
  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 +1 -1
  62. package/.next/server/app/api/push/escalation/route_client-reference-manifest.js +1 -1
  63. package/.next/server/app/api/push/subscriptions/route.js +1 -1
  64. package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
  65. package/.next/server/app/api/push/vapid/route.js +1 -1
  66. package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
  67. package/.next/server/app/api/relays/[relayId]/cancel/route.js +1 -0
  68. package/.next/server/app/api/relays/[relayId]/cancel/route.js.nft.json +1 -0
  69. package/.next/server/app/api/relays/[relayId]/cancel/route_client-reference-manifest.js +1 -0
  70. package/.next/server/app/api/relays/route.js +1 -0
  71. package/.next/server/app/api/relays/route.js.nft.json +1 -0
  72. package/.next/server/app/api/relays/route_client-reference-manifest.js +1 -0
  73. package/.next/server/app/api/remote/pair/route_client-reference-manifest.js +1 -1
  74. package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
  75. package/.next/server/app/api/repositories/[id]/todos/[todoId]/route.js +1 -1
  76. package/.next/server/app/api/repositories/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  77. package/.next/server/app/api/repositories/[id]/todos/route.js +1 -1
  78. package/.next/server/app/api/repositories/[id]/todos/route_client-reference-manifest.js +1 -1
  79. package/.next/server/app/api/repositories/clone/[jobId]/route.js +1 -1
  80. package/.next/server/app/api/repositories/clone/[jobId]/route.js.nft.json +1 -1
  81. package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
  82. package/.next/server/app/api/repositories/clone/route.js +1 -1
  83. package/.next/server/app/api/repositories/clone/route.js.nft.json +1 -1
  84. package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
  85. package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
  86. package/.next/server/app/api/repositories/restore/route.js +1 -1
  87. package/.next/server/app/api/repositories/restore/route.js.nft.json +1 -1
  88. package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
  89. package/.next/server/app/api/repositories/route.js +1 -1
  90. package/.next/server/app/api/repositories/route.js.nft.json +1 -1
  91. package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
  92. package/.next/server/app/api/repositories/scan/route.js +1 -1
  93. package/.next/server/app/api/repositories/scan/route.js.nft.json +1 -1
  94. package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
  95. package/.next/server/app/api/repositories/sync/route.js +1 -1
  96. package/.next/server/app/api/repositories/sync/route.js.nft.json +1 -1
  97. package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
  98. package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
  99. package/.next/server/app/api/settings/default-agents/route.js +1 -1
  100. package/.next/server/app/api/settings/default-agents/route.js.nft.json +1 -1
  101. package/.next/server/app/api/settings/default-agents/route_client-reference-manifest.js +1 -1
  102. package/.next/server/app/api/settings/default-surface-mode/route_client-reference-manifest.js +1 -1
  103. package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
  104. package/.next/server/app/api/skills/[id]/route.js +1 -1
  105. package/.next/server/app/api/skills/[id]/route.js.nft.json +1 -1
  106. package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
  107. package/.next/server/app/api/skills/installations/route.js +1 -1
  108. package/.next/server/app/api/skills/installations/route.js.nft.json +1 -1
  109. package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
  110. package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
  111. package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
  112. package/.next/server/app/api/skills/route.js +1 -1
  113. package/.next/server/app/api/skills/route.js.nft.json +1 -1
  114. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  115. package/.next/server/app/api/slash-commands/route.js.nft.json +1 -1
  116. package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
  117. package/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
  118. package/.next/server/app/api/tasks/[taskId]/route.js +1 -1
  119. package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
  120. package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
  121. package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
  122. package/.next/server/app/api/todos/route.js +1 -1
  123. package/.next/server/app/api/todos/route_client-reference-manifest.js +1 -1
  124. package/.next/server/app/api/verification/runs/[runId]/route.js +1 -1
  125. package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -1
  126. package/.next/server/app/api/verification/runs/route.js +1 -1
  127. package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -1
  128. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
  129. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js.nft.json +1 -1
  130. package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
  131. package/.next/server/app/api/worktrees/[id]/capture/route.js +1 -1
  132. package/.next/server/app/api/worktrees/[id]/capture/route.js.nft.json +1 -1
  133. package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
  134. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js +1 -1
  135. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js.nft.json +1 -1
  136. package/.next/server/app/api/worktrees/[id]/clear-composer/route_client-reference-manifest.js +1 -1
  137. package/.next/server/app/api/worktrees/[id]/cli-reference/route.js +1 -1
  138. package/.next/server/app/api/worktrees/[id]/cli-reference/route_client-reference-manifest.js +1 -1
  139. package/.next/server/app/api/worktrees/[id]/cli-tool/route.js +1 -1
  140. package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
  141. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js +1 -1
  142. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
  143. package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
  144. package/.next/server/app/api/worktrees/[id]/current-output/route.js.nft.json +1 -1
  145. package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
  146. package/.next/server/app/api/worktrees/[id]/env/route.js +1 -1
  147. package/.next/server/app/api/worktrees/[id]/env/route_client-reference-manifest.js +1 -1
  148. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route.js +1 -1
  149. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
  150. package/.next/server/app/api/worktrees/[id]/execution-logs/route.js +1 -1
  151. package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
  152. package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
  153. package/.next/server/app/api/worktrees/[id]/git/branch/create/route.js +1 -1
  154. package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
  155. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route.js +1 -1
  156. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
  157. package/.next/server/app/api/worktrees/[id]/git/branches/route.js +1 -1
  158. package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
  159. package/.next/server/app/api/worktrees/[id]/git/checkout/route.js +1 -1
  160. package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
  161. package/.next/server/app/api/worktrees/[id]/git/commit/route.js +1 -1
  162. package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
  163. package/.next/server/app/api/worktrees/[id]/git/diff/route.js +1 -1
  164. package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
  165. package/.next/server/app/api/worktrees/[id]/git/fetch/route.js +1 -1
  166. package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
  167. package/.next/server/app/api/worktrees/[id]/git/log/route.js +1 -1
  168. package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
  169. package/.next/server/app/api/worktrees/[id]/git/pull/route.js +1 -1
  170. package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
  171. package/.next/server/app/api/worktrees/[id]/git/push/route.js +1 -1
  172. package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
  173. package/.next/server/app/api/worktrees/[id]/git/reset/route.js +1 -1
  174. package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
  175. package/.next/server/app/api/worktrees/[id]/git/revert/route.js +1 -1
  176. package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
  177. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route.js +1 -1
  178. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
  179. package/.next/server/app/api/worktrees/[id]/git/stage/route.js +1 -1
  180. package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
  181. package/.next/server/app/api/worktrees/[id]/git/staged/route.js +1 -1
  182. package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
  183. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route.js +1 -1
  184. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
  185. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route.js +1 -1
  186. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
  187. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route.js +1 -1
  188. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
  189. package/.next/server/app/api/worktrees/[id]/git/stash/push/route.js +1 -1
  190. package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
  191. package/.next/server/app/api/worktrees/[id]/git/stash/route.js +1 -1
  192. package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
  193. package/.next/server/app/api/worktrees/[id]/git/status/route.js +1 -1
  194. package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
  195. package/.next/server/app/api/worktrees/[id]/git/unstage/route.js +1 -1
  196. package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
  197. package/.next/server/app/api/worktrees/[id]/git/working-diff/route.js +1 -1
  198. package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
  199. package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js +1 -1
  200. package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js.nft.json +1 -1
  201. package/.next/server/app/api/worktrees/[id]/instances/opencode/route_client-reference-manifest.js +1 -1
  202. package/.next/server/app/api/worktrees/[id]/interrupt/route.js +1 -1
  203. package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
  204. package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
  205. package/.next/server/app/api/worktrees/[id]/kill-session/route.js +1 -1
  206. package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -1
  207. package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
  208. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route.js +1 -1
  209. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
  210. package/.next/server/app/api/worktrees/[id]/logs/route.js +1 -1
  211. package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
  212. package/.next/server/app/api/worktrees/[id]/marp-render/route.js +1 -1
  213. package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
  214. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route.js +1 -1
  215. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
  216. package/.next/server/app/api/worktrees/[id]/memos/route.js +1 -1
  217. package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
  218. package/.next/server/app/api/worktrees/[id]/messages/route.js +1 -1
  219. package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
  220. package/.next/server/app/api/worktrees/[id]/opencode/diff/route.js +1 -1
  221. package/.next/server/app/api/worktrees/[id]/opencode/diff/route_client-reference-manifest.js +1 -1
  222. package/.next/server/app/api/worktrees/[id]/opencode/session/route.js +2 -1
  223. package/.next/server/app/api/worktrees/[id]/opencode/session/route.js.nft.json +1 -1
  224. package/.next/server/app/api/worktrees/[id]/opencode/session/route_client-reference-manifest.js +1 -1
  225. package/.next/server/app/api/worktrees/[id]/opencode/share/route.js +2 -1
  226. package/.next/server/app/api/worktrees/[id]/opencode/share/route.js.nft.json +1 -1
  227. package/.next/server/app/api/worktrees/[id]/opencode/share/route_client-reference-manifest.js +1 -1
  228. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
  229. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -1
  230. package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
  231. package/.next/server/app/api/worktrees/[id]/resolve-target/route.js +1 -1
  232. package/.next/server/app/api/worktrees/[id]/resolve-target/route_client-reference-manifest.js +1 -1
  233. package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -1
  234. package/.next/server/app/api/worktrees/[id]/respond/route.js.nft.json +1 -1
  235. package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
  236. package/.next/server/app/api/worktrees/[id]/route.js +1 -1
  237. package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
  238. package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
  239. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js +1 -1
  240. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
  241. package/.next/server/app/api/worktrees/[id]/schedules/active/route.js +1 -1
  242. package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
  243. package/.next/server/app/api/worktrees/[id]/schedules/route.js +1 -1
  244. package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
  245. package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
  246. package/.next/server/app/api/worktrees/[id]/send/route.js +1 -1
  247. package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
  248. package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
  249. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +103 -1
  250. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -1
  251. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
  252. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
  253. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route.js +1 -1
  254. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route.js.nft.json +1 -1
  255. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
  256. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
  257. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
  258. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route_client-reference-manifest.js +1 -1
  259. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route.js +1 -1
  260. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route.js.nft.json +1 -1
  261. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route_client-reference-manifest.js +1 -1
  262. package/.next/server/app/api/worktrees/[id]/skills/route.js +1 -1
  263. package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
  264. package/.next/server/app/api/worktrees/[id]/slash-commands/route.js +1 -1
  265. package/.next/server/app/api/worktrees/[id]/slash-commands/route.js.nft.json +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 +44 -42
  340. package/.next/server/chunks/1210.js +1 -0
  341. package/.next/server/chunks/153.js +1 -0
  342. package/.next/server/chunks/1886.js +1 -1
  343. package/.next/server/chunks/21.js +1 -0
  344. package/.next/server/chunks/2119.js +1 -1
  345. package/.next/server/chunks/2445.js +1 -1
  346. package/.next/server/chunks/3077.js +67 -0
  347. package/.next/server/chunks/3086.js +1 -0
  348. package/.next/server/chunks/3241.js +1 -1
  349. package/.next/server/chunks/3270.js +1 -0
  350. package/.next/server/chunks/3543.js +1 -1
  351. package/.next/server/chunks/3730.js +1 -0
  352. package/.next/server/chunks/3925.js +1 -0
  353. package/.next/server/chunks/3945.js +1 -1
  354. package/.next/server/chunks/4443.js +2 -1
  355. package/.next/server/chunks/5043.js +1 -1
  356. package/.next/server/chunks/5164.js +1 -1
  357. package/.next/server/chunks/5220.js +1 -1
  358. package/.next/server/chunks/5354.js +1 -1
  359. package/.next/server/chunks/595.js +3 -3
  360. package/.next/server/chunks/6286.js +48 -0
  361. package/.next/server/chunks/6306.js +1 -0
  362. package/.next/server/chunks/6363.js +1 -0
  363. package/.next/server/chunks/6401.js +1 -1
  364. package/.next/server/chunks/6491.js +103 -0
  365. package/.next/server/chunks/{9798.js → 6661.js} +1 -2
  366. package/.next/server/chunks/6838.js +1 -0
  367. package/.next/server/chunks/7875.js +25 -0
  368. package/.next/server/chunks/7890.js +1 -0
  369. package/.next/server/chunks/8063.js +32 -0
  370. package/.next/server/chunks/8118.js +1 -1
  371. package/.next/server/chunks/{7587.js → 8554.js} +1 -1
  372. package/.next/server/chunks/8687.js +1 -0
  373. package/.next/server/chunks/8807.js +37 -3
  374. package/.next/server/chunks/8918.js +6 -4
  375. package/.next/server/chunks/9123.js +2 -2
  376. package/.next/server/chunks/9130.js +1 -1
  377. package/.next/server/chunks/9584.js +1 -1
  378. package/.next/server/chunks/9627.js +21 -5
  379. package/.next/server/middleware-build-manifest.js +1 -1
  380. package/.next/server/middleware-manifest.json +5 -5
  381. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  382. package/.next/server/pages/500.html +1 -1
  383. package/.next/server/server-reference-manifest.json +1 -1
  384. package/.next/static/Lno4w_zWXdGdlfXg06Vp8/_buildManifest.js +1 -0
  385. package/.next/static/chunks/{5694.dda65070757534df.js → 3313.53f7ff985c0c8852.js} +1 -1
  386. package/.next/static/chunks/4718-9d63107c612a065d.js +1 -0
  387. package/.next/static/chunks/{4974-35592ec312322124.js → 5694-498765336d0b8c2b.js} +1 -1
  388. package/.next/static/chunks/{7485.442b21101fca7257.js → 7485.52361bc061cc663a.js} +1 -1
  389. package/.next/static/chunks/8019-cbf130d0e6334d2d.js +1 -0
  390. package/.next/static/chunks/8361-9bb887203c456edb.js +1 -0
  391. package/.next/static/chunks/8772-9be53a530950d804.js +1 -0
  392. package/.next/static/chunks/998-ac0ded6d5eeb4dc0.js +1 -0
  393. package/.next/static/chunks/app/api/agents/update/route-8bc5b680c5f3eae4.js +1 -0
  394. package/.next/static/chunks/app/api/agents/versions/route-8bc5b680c5f3eae4.js +1 -0
  395. package/.next/static/chunks/app/api/app/update/route-8bc5b680c5f3eae4.js +1 -0
  396. package/.next/static/chunks/app/api/app/update-check/route-8bc5b680c5f3eae4.js +1 -0
  397. package/.next/static/chunks/app/api/assistant/conversation/route-8bc5b680c5f3eae4.js +1 -0
  398. package/.next/static/chunks/app/api/assistant/current-output/route-8bc5b680c5f3eae4.js +1 -0
  399. package/.next/static/chunks/app/api/assistant/messages/route-8bc5b680c5f3eae4.js +1 -0
  400. package/.next/static/chunks/app/api/assistant/session/route-8bc5b680c5f3eae4.js +1 -0
  401. package/.next/static/chunks/app/api/assistant/start/route-8bc5b680c5f3eae4.js +1 -0
  402. package/.next/static/chunks/app/api/assistant/terminal/route-8bc5b680c5f3eae4.js +1 -0
  403. package/.next/static/chunks/app/api/assistant/tools/route-8bc5b680c5f3eae4.js +1 -0
  404. package/.next/static/chunks/app/api/auth/login/route-8bc5b680c5f3eae4.js +1 -0
  405. package/.next/static/chunks/app/api/auth/logout/route-8bc5b680c5f3eae4.js +1 -0
  406. package/.next/static/chunks/app/api/auth/status/route-8bc5b680c5f3eae4.js +1 -0
  407. package/.next/static/chunks/app/api/capabilities/route-8bc5b680c5f3eae4.js +1 -0
  408. package/.next/static/chunks/app/api/daily-summary/route-8bc5b680c5f3eae4.js +1 -0
  409. package/.next/static/chunks/app/api/daily-summary/status/route-8bc5b680c5f3eae4.js +1 -0
  410. package/.next/static/chunks/app/api/external-apps/[id]/health/route-8bc5b680c5f3eae4.js +1 -0
  411. package/.next/static/chunks/app/api/external-apps/[id]/route-8bc5b680c5f3eae4.js +1 -0
  412. package/.next/static/chunks/app/api/external-apps/route-8bc5b680c5f3eae4.js +1 -0
  413. package/.next/static/chunks/app/api/fs/browse/route-8bc5b680c5f3eae4.js +1 -0
  414. package/.next/static/chunks/app/api/fs/recent-paths/route-8bc5b680c5f3eae4.js +1 -0
  415. package/.next/static/chunks/app/api/hooks/agent-event/route-8bc5b680c5f3eae4.js +1 -0
  416. package/.next/static/chunks/app/api/hooks/claude-done/route-8bc5b680c5f3eae4.js +1 -0
  417. package/.next/static/chunks/app/api/hooks/permission-request/route-8bc5b680c5f3eae4.js +1 -0
  418. package/.next/static/chunks/app/api/metrics/vibe/route-8bc5b680c5f3eae4.js +1 -0
  419. package/.next/static/chunks/app/api/ollama/models/route-8bc5b680c5f3eae4.js +1 -0
  420. package/.next/static/chunks/app/api/push/escalation/route-8bc5b680c5f3eae4.js +1 -0
  421. package/.next/static/chunks/app/api/push/subscriptions/route-8bc5b680c5f3eae4.js +1 -0
  422. package/.next/static/chunks/app/api/push/vapid/route-8bc5b680c5f3eae4.js +1 -0
  423. package/.next/static/chunks/app/api/relays/[relayId]/cancel/route-8bc5b680c5f3eae4.js +1 -0
  424. package/.next/static/chunks/app/api/relays/route-8bc5b680c5f3eae4.js +1 -0
  425. package/.next/static/chunks/app/api/remote/pair/route-8bc5b680c5f3eae4.js +1 -0
  426. package/.next/static/chunks/app/api/repositories/[id]/route-8bc5b680c5f3eae4.js +1 -0
  427. package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-8bc5b680c5f3eae4.js +1 -0
  428. package/.next/static/chunks/app/api/repositories/[id]/todos/route-8bc5b680c5f3eae4.js +1 -0
  429. package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-8bc5b680c5f3eae4.js +1 -0
  430. package/.next/static/chunks/app/api/repositories/clone/route-8bc5b680c5f3eae4.js +1 -0
  431. package/.next/static/chunks/app/api/repositories/excluded/route-8bc5b680c5f3eae4.js +1 -0
  432. package/.next/static/chunks/app/api/repositories/restore/route-8bc5b680c5f3eae4.js +1 -0
  433. package/.next/static/chunks/app/api/repositories/route-8bc5b680c5f3eae4.js +1 -0
  434. package/.next/static/chunks/app/api/repositories/scan/route-8bc5b680c5f3eae4.js +1 -0
  435. package/.next/static/chunks/app/api/repositories/sync/route-8bc5b680c5f3eae4.js +1 -0
  436. package/.next/static/chunks/app/api/repositories/validate-path/route-8bc5b680c5f3eae4.js +1 -0
  437. package/.next/static/chunks/app/api/settings/default-agents/route-8bc5b680c5f3eae4.js +1 -0
  438. package/.next/static/chunks/app/api/settings/default-surface-mode/route-8bc5b680c5f3eae4.js +1 -0
  439. package/.next/static/chunks/app/api/sidebar/group-order/route-8bc5b680c5f3eae4.js +1 -0
  440. package/.next/static/chunks/app/api/skills/[id]/route-8bc5b680c5f3eae4.js +1 -0
  441. package/.next/static/chunks/app/api/skills/installations/route-8bc5b680c5f3eae4.js +1 -0
  442. package/.next/static/chunks/app/api/skills/operations/route-8bc5b680c5f3eae4.js +1 -0
  443. package/.next/static/chunks/app/api/skills/reindex/route-8bc5b680c5f3eae4.js +1 -0
  444. package/.next/static/chunks/app/api/skills/route-8bc5b680c5f3eae4.js +1 -0
  445. package/.next/static/chunks/app/api/slash-commands/route-8bc5b680c5f3eae4.js +1 -0
  446. package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-8bc5b680c5f3eae4.js +1 -0
  447. package/.next/static/chunks/app/api/tasks/[taskId]/route-8bc5b680c5f3eae4.js +1 -0
  448. package/.next/static/chunks/app/api/templates/[id]/route-8bc5b680c5f3eae4.js +1 -0
  449. package/.next/static/chunks/app/api/templates/route-8bc5b680c5f3eae4.js +1 -0
  450. package/.next/static/chunks/app/api/todos/route-8bc5b680c5f3eae4.js +1 -0
  451. package/.next/static/chunks/app/api/verification/runs/[runId]/route-8bc5b680c5f3eae4.js +1 -0
  452. package/.next/static/chunks/app/api/verification/runs/route-8bc5b680c5f3eae4.js +1 -0
  453. package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-8bc5b680c5f3eae4.js +1 -0
  454. package/.next/static/chunks/app/api/worktrees/[id]/capture/route-8bc5b680c5f3eae4.js +1 -0
  455. package/.next/static/chunks/app/api/worktrees/[id]/clear-composer/route-8bc5b680c5f3eae4.js +1 -0
  456. package/.next/static/chunks/app/api/worktrees/[id]/cli-reference/route-8bc5b680c5f3eae4.js +1 -0
  457. package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-8bc5b680c5f3eae4.js +1 -0
  458. package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-8bc5b680c5f3eae4.js +1 -0
  459. package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-8bc5b680c5f3eae4.js +1 -0
  460. package/.next/static/chunks/app/api/worktrees/[id]/env/route-8bc5b680c5f3eae4.js +1 -0
  461. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-8bc5b680c5f3eae4.js +1 -0
  462. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-8bc5b680c5f3eae4.js +1 -0
  463. package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-8bc5b680c5f3eae4.js +1 -0
  464. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-8bc5b680c5f3eae4.js +1 -0
  465. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-8bc5b680c5f3eae4.js +1 -0
  466. package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-8bc5b680c5f3eae4.js +1 -0
  467. package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-8bc5b680c5f3eae4.js +1 -0
  468. package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-8bc5b680c5f3eae4.js +1 -0
  469. package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-8bc5b680c5f3eae4.js +1 -0
  470. package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-8bc5b680c5f3eae4.js +1 -0
  471. package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-8bc5b680c5f3eae4.js +1 -0
  472. package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-8bc5b680c5f3eae4.js +1 -0
  473. package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-8bc5b680c5f3eae4.js +1 -0
  474. package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-8bc5b680c5f3eae4.js +1 -0
  475. package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-8bc5b680c5f3eae4.js +1 -0
  476. package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-8bc5b680c5f3eae4.js +1 -0
  477. package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-8bc5b680c5f3eae4.js +1 -0
  478. package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-8bc5b680c5f3eae4.js +1 -0
  479. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-8bc5b680c5f3eae4.js +1 -0
  480. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-8bc5b680c5f3eae4.js +1 -0
  481. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-8bc5b680c5f3eae4.js +1 -0
  482. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-8bc5b680c5f3eae4.js +1 -0
  483. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-8bc5b680c5f3eae4.js +1 -0
  484. package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-8bc5b680c5f3eae4.js +1 -0
  485. package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-8bc5b680c5f3eae4.js +1 -0
  486. package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-8bc5b680c5f3eae4.js +1 -0
  487. package/.next/static/chunks/app/api/worktrees/[id]/instances/opencode/route-8bc5b680c5f3eae4.js +1 -0
  488. package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-8bc5b680c5f3eae4.js +1 -0
  489. package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-8bc5b680c5f3eae4.js +1 -0
  490. package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-8bc5b680c5f3eae4.js +1 -0
  491. package/.next/static/chunks/app/api/worktrees/[id]/logs/route-8bc5b680c5f3eae4.js +1 -0
  492. package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-8bc5b680c5f3eae4.js +1 -0
  493. package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-8bc5b680c5f3eae4.js +1 -0
  494. package/.next/static/chunks/app/api/worktrees/[id]/memos/route-8bc5b680c5f3eae4.js +1 -0
  495. package/.next/static/chunks/app/api/worktrees/[id]/messages/route-8bc5b680c5f3eae4.js +1 -0
  496. package/.next/static/chunks/app/api/worktrees/[id]/opencode/diff/route-8bc5b680c5f3eae4.js +1 -0
  497. package/.next/static/chunks/app/api/worktrees/[id]/opencode/session/route-8bc5b680c5f3eae4.js +1 -0
  498. package/.next/static/chunks/app/api/worktrees/[id]/opencode/share/route-8bc5b680c5f3eae4.js +1 -0
  499. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-8bc5b680c5f3eae4.js +1 -0
  500. package/.next/static/chunks/app/api/worktrees/[id]/resolve-target/route-8bc5b680c5f3eae4.js +1 -0
  501. package/.next/static/chunks/app/api/worktrees/[id]/respond/route-8bc5b680c5f3eae4.js +1 -0
  502. package/.next/static/chunks/app/api/worktrees/[id]/route-8bc5b680c5f3eae4.js +1 -0
  503. package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-8bc5b680c5f3eae4.js +1 -0
  504. package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-8bc5b680c5f3eae4.js +1 -0
  505. package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-8bc5b680c5f3eae4.js +1 -0
  506. package/.next/static/chunks/app/api/worktrees/[id]/search/route-8bc5b680c5f3eae4.js +1 -0
  507. package/.next/static/chunks/app/api/worktrees/[id]/send/route-8bc5b680c5f3eae4.js +1 -0
  508. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-8bc5b680c5f3eae4.js +1 -0
  509. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-8bc5b680c5f3eae4.js +1 -0
  510. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-8bc5b680c5f3eae4.js +1 -0
  511. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-8bc5b680c5f3eae4.js +1 -0
  512. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-8bc5b680c5f3eae4.js +1 -0
  513. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-8bc5b680c5f3eae4.js +1 -0
  514. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-8bc5b680c5f3eae4.js +1 -0
  515. package/.next/static/chunks/app/api/worktrees/[id]/skills/route-8bc5b680c5f3eae4.js +1 -0
  516. package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-8bc5b680c5f3eae4.js +1 -0
  517. package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-8bc5b680c5f3eae4.js +1 -0
  518. package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-8bc5b680c5f3eae4.js +1 -0
  519. package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-8bc5b680c5f3eae4.js +1 -0
  520. package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-8bc5b680c5f3eae4.js +1 -0
  521. package/.next/static/chunks/app/api/worktrees/[id]/timers/route-8bc5b680c5f3eae4.js +1 -0
  522. package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-8bc5b680c5f3eae4.js +1 -0
  523. package/.next/static/chunks/app/api/worktrees/[id]/todos/route-8bc5b680c5f3eae4.js +1 -0
  524. package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-8bc5b680c5f3eae4.js +1 -0
  525. package/.next/static/chunks/app/api/worktrees/[id]/tree/route-8bc5b680c5f3eae4.js +1 -0
  526. package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-8bc5b680c5f3eae4.js +1 -0
  527. package/.next/static/chunks/app/api/worktrees/[id]/verify/config/route-8bc5b680c5f3eae4.js +1 -0
  528. package/.next/static/chunks/app/api/worktrees/[id]/verify/route-8bc5b680c5f3eae4.js +1 -0
  529. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route-8bc5b680c5f3eae4.js +1 -0
  530. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-8bc5b680c5f3eae4.js +1 -0
  531. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-8bc5b680c5f3eae4.js +1 -0
  532. package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-8bc5b680c5f3eae4.js +1 -0
  533. package/.next/static/chunks/app/api/worktrees/apply-default-agents/route-8bc5b680c5f3eae4.js +1 -0
  534. package/.next/static/chunks/app/api/worktrees/route-8bc5b680c5f3eae4.js +1 -0
  535. package/.next/static/chunks/app/chat/{page-37d7615d17d7e2a0.js → page-e60d07c4c79602f0.js} +1 -1
  536. package/.next/static/chunks/app/manifest.webmanifest/route-8bc5b680c5f3eae4.js +1 -0
  537. package/.next/static/chunks/app/more/{page-353a3924e6d7968e.js → page-fc94f86aa881489e.js} +1 -1
  538. package/.next/static/chunks/app/{page-c2bf871d953a1d6f.js → page-6871cca022b24807.js} +1 -1
  539. package/.next/static/chunks/app/proxy/[...path]/route-8bc5b680c5f3eae4.js +1 -0
  540. package/.next/static/chunks/app/repositories/{page-7d0f26df0537254c.js → page-788ded1b72963d94.js} +1 -1
  541. package/.next/static/chunks/app/review/{page-e3f141b2829973e9.js → page-35b99baaf3c93b38.js} +1 -1
  542. package/.next/static/chunks/app/sessions/{page-53f188ed9ca49e5f.js → page-fa2d62f3e8436c69.js} +1 -1
  543. package/.next/static/chunks/app/skills/[skillId]/{page-80569b720aea59cc.js → page-06799157652e8fa9.js} +1 -1
  544. package/.next/static/chunks/app/skills/installed/{page-dbd2690ad72da95b.js → page-2f3987e3a131c8d0.js} +1 -1
  545. package/.next/static/chunks/app/skills/{page-dacd36f9c11aa7da.js → page-e70bfcf5ed4e4865.js} +1 -1
  546. package/.next/static/chunks/app/worktrees/[id]/layout-8bc5b680c5f3eae4.js +1 -0
  547. package/.next/static/chunks/app/worktrees/[id]/page-3d82a9355d5612d9.js +1 -0
  548. package/.next/static/chunks/webpack-1dc9eb5ebb4fa5ff.js +1 -0
  549. package/.next/static/css/96d94a4ba771efc3.css +1 -0
  550. package/.next/trace +13 -13
  551. package/.next/types/app/api/relays/[relayId]/cancel/route.ts +347 -0
  552. package/.next/types/app/api/relays/route.ts +347 -0
  553. package/.next/types/routes.d.ts +3 -1
  554. package/.next/types/validator.ts +18 -0
  555. package/README.md +6 -2
  556. package/dist/cli/commands/ask.d.ts +34 -0
  557. package/dist/cli/commands/ask.d.ts.map +1 -0
  558. package/dist/cli/commands/ask.js +494 -0
  559. package/dist/cli/commands/capture.d.ts +20 -0
  560. package/dist/cli/commands/capture.d.ts.map +1 -1
  561. package/dist/cli/commands/capture.js +80 -30
  562. package/dist/cli/commands/docs.d.ts.map +1 -1
  563. package/dist/cli/commands/docs.js +47 -4
  564. package/dist/cli/commands/instances.d.ts +67 -0
  565. package/dist/cli/commands/instances.d.ts.map +1 -1
  566. package/dist/cli/commands/instances.js +147 -22
  567. package/dist/cli/commands/peers.d.ts +64 -0
  568. package/dist/cli/commands/peers.d.ts.map +1 -0
  569. package/dist/cli/commands/peers.js +208 -0
  570. package/dist/cli/commands/relays.d.ts +92 -0
  571. package/dist/cli/commands/relays.d.ts.map +1 -0
  572. package/dist/cli/commands/relays.js +293 -0
  573. package/dist/cli/commands/report.d.ts +3 -0
  574. package/dist/cli/commands/report.d.ts.map +1 -1
  575. package/dist/cli/commands/report.js +29 -1
  576. package/dist/cli/commands/respond.d.ts.map +1 -1
  577. package/dist/cli/commands/respond.js +13 -10
  578. package/dist/cli/commands/send.d.ts.map +1 -1
  579. package/dist/cli/commands/send.js +66 -20
  580. package/dist/cli/commands/task.d.ts.map +1 -1
  581. package/dist/cli/commands/task.js +30 -0
  582. package/dist/cli/commands/wait.d.ts +20 -0
  583. package/dist/cli/commands/wait.d.ts.map +1 -1
  584. package/dist/cli/commands/wait.js +55 -6
  585. package/dist/cli/commands/whoami.d.ts +176 -0
  586. package/dist/cli/commands/whoami.d.ts.map +1 -0
  587. package/dist/cli/commands/whoami.js +377 -0
  588. package/dist/cli/docs/agent-operations.d.ts +25 -1
  589. package/dist/cli/docs/agent-operations.d.ts.map +1 -1
  590. package/dist/cli/docs/agent-operations.js +184 -1
  591. package/dist/cli/index.d.ts +13 -0
  592. package/dist/cli/index.d.ts.map +1 -1
  593. package/dist/cli/index.js +25 -1
  594. package/dist/cli/types/api-responses.d.ts +93 -0
  595. package/dist/cli/types/api-responses.d.ts.map +1 -1
  596. package/dist/cli/types/index.d.ts +16 -0
  597. package/dist/cli/types/index.d.ts.map +1 -1
  598. package/dist/cli/utils/api-client.d.ts +30 -1
  599. package/dist/cli/utils/api-client.d.ts.map +1 -1
  600. package/dist/cli/utils/api-client.js +28 -5
  601. package/dist/lib/cli/command-reference.d.ts +179 -0
  602. package/dist/lib/cli/command-reference.d.ts.map +1 -0
  603. package/dist/lib/cli/command-reference.js +210 -0
  604. package/dist/lib/detection/ansi.d.ts +14 -1
  605. package/dist/lib/detection/ansi.d.ts.map +1 -1
  606. package/dist/lib/detection/ansi.js +40 -3
  607. package/dist/lib/detection/status-reason.d.ts +28 -0
  608. package/dist/lib/detection/status-reason.d.ts.map +1 -1
  609. package/dist/lib/detection/status-reason.js +28 -0
  610. package/dist/server/locales/en/worktree.json +23 -0
  611. package/dist/server/locales/ja/worktree.json +23 -0
  612. package/dist/server/src/lib/auto-yes-poller.js +26 -11
  613. package/dist/server/src/lib/db/chat-db.js +161 -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 +206 -2
  620. package/dist/server/src/lib/detection/selection-shape.js +72 -1
  621. package/dist/server/src/lib/detection/status-reason.js +28 -0
  622. package/dist/server/src/lib/detection/tools/antigravity/dialog.js +13 -7
  623. package/dist/server/src/lib/detection/tools/command-code/detect.js +33 -0
  624. package/dist/server/src/lib/history/user-turn-recorder.js +79 -16
  625. package/dist/server/src/lib/hooks/agent-event-service.js +27 -5
  626. package/dist/server/src/lib/hooks/sources/codex/history.js +63 -3
  627. package/dist/server/src/lib/hooks/sources/codex/transcript.js +53 -1
  628. package/dist/server/src/lib/hooks/sources/launch-command.js +112 -15
  629. package/dist/server/src/lib/hooks/stop-history-capture.js +252 -50
  630. package/dist/server/src/lib/polling/response-checker.js +174 -13
  631. package/dist/server/src/lib/polling/response-dedup.js +136 -0
  632. package/dist/server/src/lib/polling/structured-history-gate.js +14 -1
  633. package/dist/server/src/lib/realtime/terminal-broadcast.js +5 -0
  634. package/dist/server/src/lib/realtime/waiting-broadcast.js +12 -0
  635. package/dist/server/src/lib/relay/relay-delivery.js +554 -0
  636. package/dist/server/src/lib/relay/relay-messages.js +144 -0
  637. package/dist/server/src/lib/relay/relay-policy.js +127 -0
  638. package/dist/server/src/lib/relay/relay-readiness.js +63 -0
  639. package/dist/server/src/lib/relay/relay-session-ref.js +72 -0
  640. package/dist/server/src/lib/relay/relay-system-line.js +79 -0
  641. package/dist/server/src/lib/relay/relay-triggers.js +177 -0
  642. package/dist/server/src/lib/relay/types.js +25 -0
  643. package/dist/server/src/lib/session/current-output-builder.js +18 -0
  644. package/dist/server/src/lib/session/send-user-message.js +1 -0
  645. package/package.json +1 -1
  646. package/.next/server/chunks/1058.js +0 -1
  647. package/.next/server/chunks/1068.js +0 -1
  648. package/.next/server/chunks/1990.js +0 -103
  649. package/.next/server/chunks/261.js +0 -1
  650. package/.next/server/chunks/2739.js +0 -1
  651. package/.next/server/chunks/2839.js +0 -1
  652. package/.next/server/chunks/3484.js +0 -1
  653. package/.next/server/chunks/358.js +0 -1
  654. package/.next/server/chunks/3869.js +0 -1
  655. package/.next/server/chunks/4325.js +0 -1
  656. package/.next/server/chunks/4393.js +0 -1
  657. package/.next/server/chunks/5017.js +0 -1
  658. package/.next/server/chunks/5120.js +0 -1
  659. package/.next/server/chunks/552.js +0 -25
  660. package/.next/server/chunks/6130.js +0 -1
  661. package/.next/server/chunks/7836.js +0 -1
  662. package/.next/server/chunks/7859.js +0 -21
  663. package/.next/server/chunks/9696.js +0 -3
  664. package/.next/static/0hTIackGXw6v7diXJS6yN/_buildManifest.js +0 -1
  665. package/.next/static/chunks/2813-de885de8a4b11910.js +0 -1
  666. package/.next/static/chunks/4718-07ec4e10186928db.js +0 -1
  667. package/.next/static/chunks/6170-951b9f5fe6b4b3b5.js +0 -1
  668. package/.next/static/chunks/8019-f8e73c1fb5f6f0d3.js +0 -1
  669. package/.next/static/chunks/8593-fa0eb2802e0ce68a.js +0 -1
  670. package/.next/static/chunks/app/api/agents/update/route-ee11f7b8a34cba8c.js +0 -1
  671. package/.next/static/chunks/app/api/agents/versions/route-ee11f7b8a34cba8c.js +0 -1
  672. package/.next/static/chunks/app/api/app/update/route-ee11f7b8a34cba8c.js +0 -1
  673. package/.next/static/chunks/app/api/app/update-check/route-ee11f7b8a34cba8c.js +0 -1
  674. package/.next/static/chunks/app/api/assistant/conversation/route-ee11f7b8a34cba8c.js +0 -1
  675. package/.next/static/chunks/app/api/assistant/current-output/route-ee11f7b8a34cba8c.js +0 -1
  676. package/.next/static/chunks/app/api/assistant/messages/route-ee11f7b8a34cba8c.js +0 -1
  677. package/.next/static/chunks/app/api/assistant/session/route-ee11f7b8a34cba8c.js +0 -1
  678. package/.next/static/chunks/app/api/assistant/start/route-ee11f7b8a34cba8c.js +0 -1
  679. package/.next/static/chunks/app/api/assistant/terminal/route-ee11f7b8a34cba8c.js +0 -1
  680. package/.next/static/chunks/app/api/assistant/tools/route-ee11f7b8a34cba8c.js +0 -1
  681. package/.next/static/chunks/app/api/auth/login/route-ee11f7b8a34cba8c.js +0 -1
  682. package/.next/static/chunks/app/api/auth/logout/route-ee11f7b8a34cba8c.js +0 -1
  683. package/.next/static/chunks/app/api/auth/status/route-ee11f7b8a34cba8c.js +0 -1
  684. package/.next/static/chunks/app/api/capabilities/route-ee11f7b8a34cba8c.js +0 -1
  685. package/.next/static/chunks/app/api/daily-summary/route-ee11f7b8a34cba8c.js +0 -1
  686. package/.next/static/chunks/app/api/daily-summary/status/route-ee11f7b8a34cba8c.js +0 -1
  687. package/.next/static/chunks/app/api/external-apps/[id]/health/route-ee11f7b8a34cba8c.js +0 -1
  688. package/.next/static/chunks/app/api/external-apps/[id]/route-ee11f7b8a34cba8c.js +0 -1
  689. package/.next/static/chunks/app/api/external-apps/route-ee11f7b8a34cba8c.js +0 -1
  690. package/.next/static/chunks/app/api/fs/browse/route-ee11f7b8a34cba8c.js +0 -1
  691. package/.next/static/chunks/app/api/fs/recent-paths/route-ee11f7b8a34cba8c.js +0 -1
  692. package/.next/static/chunks/app/api/hooks/agent-event/route-ee11f7b8a34cba8c.js +0 -1
  693. package/.next/static/chunks/app/api/hooks/claude-done/route-ee11f7b8a34cba8c.js +0 -1
  694. package/.next/static/chunks/app/api/hooks/permission-request/route-ee11f7b8a34cba8c.js +0 -1
  695. package/.next/static/chunks/app/api/metrics/vibe/route-ee11f7b8a34cba8c.js +0 -1
  696. package/.next/static/chunks/app/api/ollama/models/route-ee11f7b8a34cba8c.js +0 -1
  697. package/.next/static/chunks/app/api/push/escalation/route-ee11f7b8a34cba8c.js +0 -1
  698. package/.next/static/chunks/app/api/push/subscriptions/route-ee11f7b8a34cba8c.js +0 -1
  699. package/.next/static/chunks/app/api/push/vapid/route-ee11f7b8a34cba8c.js +0 -1
  700. package/.next/static/chunks/app/api/remote/pair/route-ee11f7b8a34cba8c.js +0 -1
  701. package/.next/static/chunks/app/api/repositories/[id]/route-ee11f7b8a34cba8c.js +0 -1
  702. package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-ee11f7b8a34cba8c.js +0 -1
  703. package/.next/static/chunks/app/api/repositories/[id]/todos/route-ee11f7b8a34cba8c.js +0 -1
  704. package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-ee11f7b8a34cba8c.js +0 -1
  705. package/.next/static/chunks/app/api/repositories/clone/route-ee11f7b8a34cba8c.js +0 -1
  706. package/.next/static/chunks/app/api/repositories/excluded/route-ee11f7b8a34cba8c.js +0 -1
  707. package/.next/static/chunks/app/api/repositories/restore/route-ee11f7b8a34cba8c.js +0 -1
  708. package/.next/static/chunks/app/api/repositories/route-ee11f7b8a34cba8c.js +0 -1
  709. package/.next/static/chunks/app/api/repositories/scan/route-ee11f7b8a34cba8c.js +0 -1
  710. package/.next/static/chunks/app/api/repositories/sync/route-ee11f7b8a34cba8c.js +0 -1
  711. package/.next/static/chunks/app/api/repositories/validate-path/route-ee11f7b8a34cba8c.js +0 -1
  712. package/.next/static/chunks/app/api/settings/default-agents/route-ee11f7b8a34cba8c.js +0 -1
  713. package/.next/static/chunks/app/api/settings/default-surface-mode/route-ee11f7b8a34cba8c.js +0 -1
  714. package/.next/static/chunks/app/api/sidebar/group-order/route-ee11f7b8a34cba8c.js +0 -1
  715. package/.next/static/chunks/app/api/skills/[id]/route-ee11f7b8a34cba8c.js +0 -1
  716. package/.next/static/chunks/app/api/skills/installations/route-ee11f7b8a34cba8c.js +0 -1
  717. package/.next/static/chunks/app/api/skills/operations/route-ee11f7b8a34cba8c.js +0 -1
  718. package/.next/static/chunks/app/api/skills/reindex/route-ee11f7b8a34cba8c.js +0 -1
  719. package/.next/static/chunks/app/api/skills/route-ee11f7b8a34cba8c.js +0 -1
  720. package/.next/static/chunks/app/api/slash-commands/route-ee11f7b8a34cba8c.js +0 -1
  721. package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-ee11f7b8a34cba8c.js +0 -1
  722. package/.next/static/chunks/app/api/tasks/[taskId]/route-ee11f7b8a34cba8c.js +0 -1
  723. package/.next/static/chunks/app/api/templates/[id]/route-ee11f7b8a34cba8c.js +0 -1
  724. package/.next/static/chunks/app/api/templates/route-ee11f7b8a34cba8c.js +0 -1
  725. package/.next/static/chunks/app/api/todos/route-ee11f7b8a34cba8c.js +0 -1
  726. package/.next/static/chunks/app/api/verification/runs/[runId]/route-ee11f7b8a34cba8c.js +0 -1
  727. package/.next/static/chunks/app/api/verification/runs/route-ee11f7b8a34cba8c.js +0 -1
  728. package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-ee11f7b8a34cba8c.js +0 -1
  729. package/.next/static/chunks/app/api/worktrees/[id]/capture/route-ee11f7b8a34cba8c.js +0 -1
  730. package/.next/static/chunks/app/api/worktrees/[id]/clear-composer/route-ee11f7b8a34cba8c.js +0 -1
  731. package/.next/static/chunks/app/api/worktrees/[id]/cli-reference/route-ee11f7b8a34cba8c.js +0 -1
  732. package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-ee11f7b8a34cba8c.js +0 -1
  733. package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-ee11f7b8a34cba8c.js +0 -1
  734. package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-ee11f7b8a34cba8c.js +0 -1
  735. package/.next/static/chunks/app/api/worktrees/[id]/env/route-ee11f7b8a34cba8c.js +0 -1
  736. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-ee11f7b8a34cba8c.js +0 -1
  737. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-ee11f7b8a34cba8c.js +0 -1
  738. package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-ee11f7b8a34cba8c.js +0 -1
  739. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-ee11f7b8a34cba8c.js +0 -1
  740. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-ee11f7b8a34cba8c.js +0 -1
  741. package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-ee11f7b8a34cba8c.js +0 -1
  742. package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-ee11f7b8a34cba8c.js +0 -1
  743. package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-ee11f7b8a34cba8c.js +0 -1
  744. package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-ee11f7b8a34cba8c.js +0 -1
  745. package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-ee11f7b8a34cba8c.js +0 -1
  746. package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-ee11f7b8a34cba8c.js +0 -1
  747. package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-ee11f7b8a34cba8c.js +0 -1
  748. package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-ee11f7b8a34cba8c.js +0 -1
  749. package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-ee11f7b8a34cba8c.js +0 -1
  750. package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-ee11f7b8a34cba8c.js +0 -1
  751. package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-ee11f7b8a34cba8c.js +0 -1
  752. package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-ee11f7b8a34cba8c.js +0 -1
  753. package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-ee11f7b8a34cba8c.js +0 -1
  754. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-ee11f7b8a34cba8c.js +0 -1
  755. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-ee11f7b8a34cba8c.js +0 -1
  756. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-ee11f7b8a34cba8c.js +0 -1
  757. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-ee11f7b8a34cba8c.js +0 -1
  758. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-ee11f7b8a34cba8c.js +0 -1
  759. package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-ee11f7b8a34cba8c.js +0 -1
  760. package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-ee11f7b8a34cba8c.js +0 -1
  761. package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-ee11f7b8a34cba8c.js +0 -1
  762. package/.next/static/chunks/app/api/worktrees/[id]/instances/opencode/route-ee11f7b8a34cba8c.js +0 -1
  763. package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-ee11f7b8a34cba8c.js +0 -1
  764. package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-ee11f7b8a34cba8c.js +0 -1
  765. package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-ee11f7b8a34cba8c.js +0 -1
  766. package/.next/static/chunks/app/api/worktrees/[id]/logs/route-ee11f7b8a34cba8c.js +0 -1
  767. package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-ee11f7b8a34cba8c.js +0 -1
  768. package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-ee11f7b8a34cba8c.js +0 -1
  769. package/.next/static/chunks/app/api/worktrees/[id]/memos/route-ee11f7b8a34cba8c.js +0 -1
  770. package/.next/static/chunks/app/api/worktrees/[id]/messages/route-ee11f7b8a34cba8c.js +0 -1
  771. package/.next/static/chunks/app/api/worktrees/[id]/opencode/diff/route-ee11f7b8a34cba8c.js +0 -1
  772. package/.next/static/chunks/app/api/worktrees/[id]/opencode/session/route-ee11f7b8a34cba8c.js +0 -1
  773. package/.next/static/chunks/app/api/worktrees/[id]/opencode/share/route-ee11f7b8a34cba8c.js +0 -1
  774. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-ee11f7b8a34cba8c.js +0 -1
  775. package/.next/static/chunks/app/api/worktrees/[id]/resolve-target/route-ee11f7b8a34cba8c.js +0 -1
  776. package/.next/static/chunks/app/api/worktrees/[id]/respond/route-ee11f7b8a34cba8c.js +0 -1
  777. package/.next/static/chunks/app/api/worktrees/[id]/route-ee11f7b8a34cba8c.js +0 -1
  778. package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-ee11f7b8a34cba8c.js +0 -1
  779. package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-ee11f7b8a34cba8c.js +0 -1
  780. package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-ee11f7b8a34cba8c.js +0 -1
  781. package/.next/static/chunks/app/api/worktrees/[id]/search/route-ee11f7b8a34cba8c.js +0 -1
  782. package/.next/static/chunks/app/api/worktrees/[id]/send/route-ee11f7b8a34cba8c.js +0 -1
  783. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-ee11f7b8a34cba8c.js +0 -1
  784. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-ee11f7b8a34cba8c.js +0 -1
  785. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-ee11f7b8a34cba8c.js +0 -1
  786. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-ee11f7b8a34cba8c.js +0 -1
  787. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-ee11f7b8a34cba8c.js +0 -1
  788. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-ee11f7b8a34cba8c.js +0 -1
  789. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-ee11f7b8a34cba8c.js +0 -1
  790. package/.next/static/chunks/app/api/worktrees/[id]/skills/route-ee11f7b8a34cba8c.js +0 -1
  791. package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-ee11f7b8a34cba8c.js +0 -1
  792. package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-ee11f7b8a34cba8c.js +0 -1
  793. package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-ee11f7b8a34cba8c.js +0 -1
  794. package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-ee11f7b8a34cba8c.js +0 -1
  795. package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-ee11f7b8a34cba8c.js +0 -1
  796. package/.next/static/chunks/app/api/worktrees/[id]/timers/route-ee11f7b8a34cba8c.js +0 -1
  797. package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-ee11f7b8a34cba8c.js +0 -1
  798. package/.next/static/chunks/app/api/worktrees/[id]/todos/route-ee11f7b8a34cba8c.js +0 -1
  799. package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-ee11f7b8a34cba8c.js +0 -1
  800. package/.next/static/chunks/app/api/worktrees/[id]/tree/route-ee11f7b8a34cba8c.js +0 -1
  801. package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-ee11f7b8a34cba8c.js +0 -1
  802. package/.next/static/chunks/app/api/worktrees/[id]/verify/config/route-ee11f7b8a34cba8c.js +0 -1
  803. package/.next/static/chunks/app/api/worktrees/[id]/verify/route-ee11f7b8a34cba8c.js +0 -1
  804. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route-ee11f7b8a34cba8c.js +0 -1
  805. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-ee11f7b8a34cba8c.js +0 -1
  806. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-ee11f7b8a34cba8c.js +0 -1
  807. package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-ee11f7b8a34cba8c.js +0 -1
  808. package/.next/static/chunks/app/api/worktrees/apply-default-agents/route-ee11f7b8a34cba8c.js +0 -1
  809. package/.next/static/chunks/app/api/worktrees/route-ee11f7b8a34cba8c.js +0 -1
  810. package/.next/static/chunks/app/manifest.webmanifest/route-ee11f7b8a34cba8c.js +0 -1
  811. package/.next/static/chunks/app/proxy/[...path]/route-ee11f7b8a34cba8c.js +0 -1
  812. package/.next/static/chunks/app/worktrees/[id]/layout-ee11f7b8a34cba8c.js +0 -1
  813. package/.next/static/chunks/app/worktrees/[id]/page-91b639c90795baa9.js +0 -1
  814. package/.next/static/chunks/webpack-9f75198882fdaf08.js +0 -1
  815. package/.next/static/css/acc4b9c3feb04287.css +0 -1
  816. /package/.next/static/{0hTIackGXw6v7diXJS6yN → Lno4w_zWXdGdlfXg06Vp8}/_ssgManifest.js +0 -0
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ /**
3
+ * The vocabulary of a session-to-session relay (Issue #2377).
4
+ *
5
+ * Kept in its own module because both halves of the process read it — the
6
+ * server modules that create, deliver and expire a relay, and the browser hook
7
+ * that draws the badges — and neither may pull the other's graph in. Nothing
8
+ * here touches a database, a socket or a DOM.
9
+ *
10
+ * @module lib/relay/types
11
+ */
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.OPEN_RELAY_STATES = void 0;
14
+ exports.isOpenRelayState = isOpenRelayState;
15
+ exports.emptyRelayCounts = emptyRelayCounts;
16
+ /** The states from which a relay can still produce a delivery. */
17
+ exports.OPEN_RELAY_STATES = ['pending', 'prompt'];
18
+ /** Whether this state can still produce a delivery. */
19
+ function isOpenRelayState(state) {
20
+ return exports.OPEN_RELAY_STATES.includes(state);
21
+ }
22
+ /** An empty {@link RelayCounts}. */
23
+ function emptyRelayCounts() {
24
+ return { pending: 0, delivered: 0, prompt: 0, expired: 0, cancelled: 0 };
25
+ }
@@ -686,6 +686,23 @@ async function buildPayload(db, worktreeId, cliToolId, instanceId) {
686
686
  const scraperPromptWaiting = statusResult.hasActivePrompt;
687
687
  const isSelectionListActive = statusResult.status === 'waiting' && status_detector_1.SELECTION_LIST_REASONS.has(statusResult.reason);
688
688
  const isPagerActive = statusResult.reason === status_detector_1.STATUS_REASON.CODEX_PAGER;
689
+ // Issue #2369: an overlay whose ONLY exit is the dismiss — Command Code's
690
+ // `/usage` panel, whose last row is `Press Esc to close`.
691
+ //
692
+ // A THIRD flag rather than a member of `SELECTION_LIST_REASONS`, and the
693
+ // separation is the fix rather than a nicety: `isSelectionListActive` is what
694
+ // the arrow pad is drawn from, and this screen has no highlight to move. Nor
695
+ // is it `isUnclassifiedActive` any more — the detector answers `waiting` for
696
+ // it, and `isUnclassifiedFrame` only ever says yes to `running` — which is
697
+ // exactly what stops the chat surface offering the eighteen-button
698
+ // hatch + answer-key card to a panel that accepts one key.
699
+ //
700
+ // `status === 'waiting'` is checked as well as the reason, the same shape
701
+ // `isSelectionListActive` above uses, so a future producer that publishes the
702
+ // token with some other status cannot silently turn the card into an Esc
703
+ // button.
704
+ const isDismissablePanelActive = statusResult.status === 'waiting'
705
+ && statusResult.reason === status_detector_1.STATUS_REASON.COMMAND_CODE_DISMISSABLE_PANEL;
689
706
  // Issue #1497: the detection-independent nav hatch (#1017/#1494) is gated on
690
707
  // isUnclassifiedActive. A static, unrecognized TUI overlay (e.g. Claude `/help`)
691
708
  // whose frame stops changing degrades from `running`/`default` to
@@ -993,6 +1010,7 @@ async function buildPayload(db, worktreeId, cliToolId, instanceId) {
993
1010
  },
994
1011
  isSelectionListActive,
995
1012
  isPagerActive,
1013
+ isDismissablePanelActive,
996
1014
  isUnclassifiedActive: merged.isUnclassifiedActive,
997
1015
  // Issue #1926: the same fact `isUnclassifiedActive` carries, named the way
998
1016
  // §4 D1 names it. Published from the merged verdict so the two cannot
@@ -203,6 +203,7 @@ async function sendUserMessage(db, params) {
203
203
  timestamp: userMessageTimestamp,
204
204
  cliToolId,
205
205
  instanceId,
206
+ requestId: params.requestId,
206
207
  });
207
208
  // 5b. Broadcast the user row (Issue #2195).
208
209
  //
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commandmate",
3
- "version": "0.31.3",
3
+ "version": "0.32.1",
4
4
  "description": "A local control plane for agent CLIs — orchestration and visibility for Claude Code, Codex, Gemini CLI, and more across Git worktrees",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -1 +0,0 @@
1
- "use strict";exports.id=1058,exports.ids=[1058,4325],exports.modules={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.all([c.e(1356),c.e(1503),c.e(1191),c.e(1719),c.e(2119),c.e(2445),c.e(595),c.e(7836)]).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=ag.evidence,am=(0,K.Q4)(ag.status,ag.reason);(0,H._i)(b,c,m,"ready"===ag.status&&"positive"===al);let an=(0,H.R4)(b,c,m),ao=(0,I._G)({worktreeId:b,cliToolId:c,instanceId:m,scraper:{status:ag.status,reason:ag.reason,hasActivePrompt:ai}}),ap=ao.structured;null!==ap&&(X.promptWaitingSince=ap.at,X.promptWaitingSource=ap.source);let aq=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:al,isUnclassifiedActive:am},an,ap,X),ar=ao.waiting,as=ag.promptDetection.promptData,at=as&&V?(0,L.Hu)(as,V.spec):null,au=null!==ap&&"notification"===ap.source&&"permission-id"===S.capabilities.eventIdentity&&(0,M.PP)(ap.decisionId)?ap.decisionId:null,av=null!==ap&&"question"===(0,x.Wk)(ap.toolName),aw=null===au||av?null:M.QB,ax=null===ap?null:{...ap,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:aw,decisionId:au,patterns:null!==aw?ap.patterns:null},ay=ai?at??as??(ax?(0,M.Yo)(b,ax):null):ax?(0,M.Yo)(b,ax):null;null!==an&&an.status!==ag.status&&N.info("detection-divergence",{worktreeId:b,cliToolId:c,instanceId:o,scraperStatus:ag.status,scraperReason:ag.reason,structuredStatus:an.status,structuredReason:an.reason,structuredEvent:an.event,structuredEventAt:an.at,applied:aq.structuredApplied});let az=_.slice(-100).join("\n"),aA="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}}(az):null,aB=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,aq.isUnclassifiedActive);if(aB.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:aB.dwellMs,sessionStatus:aq.status,sessionStatusReason:aq.reason,obstruction:aA}),null!==ap&&null!==ax&&!ai&&!ap.recorded){(0,H.HR)(b,c,m);var aC=b,aD=c,aE=o,aF=ap,aG=ax;let e=(0,M.fO)(aC,aG);try{let b=(0,d.createMessage)(a,{worktreeId:aC,role:"assistant",content:e.question,summary:`structured prompt \xb7 source=${aF.source}${aF.toolName?` \xb7 tool=${aF.toolName}`:""}`,messageType:"prompt",promptData:e,timestamp:new Date,cliToolId:aD,instanceId:aE});N.info("structured-prompt-recorded",{worktreeId:aC,cliToolId:aD,instanceId:aE,source:aF.source,toolName:aF.toolName}),O(aC,b)}catch(a){N.warn("structured-prompt-record-failed",{worktreeId:aC,error:a instanceof Error?a.message:String(a)})}}let aH=(0,f.ji)($,c),aI=(0,g.bT)(az),aJ=(0,C.aq)(b,c,m),{model:aK,effort:aL}=(0,H.jl)(b,c,m);(0,K.ox)(ad,{status:aq.status,reason:aq.reason,evidence:aq.evidence});let aM=(0,K.AD)(ad);return{isRunning:!0,cliToolId:c,sessionStatus:aq.status,sessionStatusReason:aq.reason,content:ac,fullOutput:$,realtimeSnippet:az,lineCount:aa,lastCapturedLine:Z,isComplete:ar,isGenerating:aq.thinking,thinking:aq.thinking,thinkingMessage:aq.thinking?"Claude is thinking...":null,isPromptWaiting:ar,promptData:ay,autoYes:{enabled:aJ?.enabled??!1,expiresAt:aJ?.enabled?aJ.expiresAt:null,stopReason:aJ?.stopReason,lastSuppression:(0,D.gb)(b,c,m),stopMatchedText:aJ?.stopMatchedText},isSelectionListActive:aj,isPagerActive:ak,isUnclassifiedActive:aq.isUnclassifiedActive,statusEvidence:aq.evidence,lastKnownStatus:aM?.status??null,lastKnownStatusAt:aM?.at??null,lastServerResponseTimestamp:ae,serverPollerActive:(0,C.bZ)(ad),lastStopEventAt:Q,structuredEvents:X,model:aK,reasoningEffort:aL,promptDedup:(0,E.XH)(b,c,m),upstreamFault:aI?{id:aI.fault.id,matchedText:aI.matchedText,at:Date.now()}:null,paneObstruction:aA?{id:aA.id,matchedText:aA.matchedText,at:Date.now()}:null,composerText:"content"===aH.state?aH.text:null,composerState:aH.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.all([c.e(1356),c.e(1503),c.e(1191),c.e(1719),c.e(2119),c.e(2445),c.e(595),c.e(7836)]).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.all([c.e(1356),c.e(1503),c.e(1191),c.e(1719),c.e(2119),c.e(2445),c.e(595),c.e(7836)]).then(c.bind(c,49640));if(!i(b))return void U(f,"no-subscribers",null);W(f,async()=>{let{readClaudeTurnProgress:a}=await c.e(9696).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)})}}},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)."}}},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}},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}}},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)}},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)}},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"},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}},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}}}},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}}}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=1068,exports.ids=[1068,2839,5220],exports.modules={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}}},23197:(a,b,c)=>{c.d(b,{$M:()=>e,H1:()=>d,q5:()=>f});let d="__global__",e=2e3,f=900},39687:(a,b,c)=>{c.d(b,{d:()=>p});var d=c(56791),e=c(43234),f=c(15194),g=c(95220),h=c(12462),i=c(49640),j=c(54325),k=c(72626),l=c(58707),m=c(41466);let n=(0,k.h)("session/send-user-message");function o(a){return a instanceof Error?a.message:String(a)}async function p(a,b){let{worktreeId:c,content:k,cliToolId:p,instanceId:q,absoluteImagePath:r,copilotModel:s}=b,t=b.messageType??"normal",u=q??p,v=e.CLIToolManager.getInstance().getTool(p),w=await (0,l.a3)(c,p,q,{ignoreStructured:b.ignoreStructuredPromptGuard});if(w.waiting)return n.info("send-refused-prompt-waiting",{worktreeId:c,cliToolId:p,reason:w.reason,blockedBy:w.blockedBy}),{ok:!1,stage:"prompt_waiting",error:(0,l.br)(c,w.blockedBy)};let x=new Date;try{await (0,h.o4)(a,c,p,x,q)}catch(a){n.error("failed-to-save-pending-assistant-response:",{error:o(a)})}let y=null;try{let b=(0,d.getMessages)(a,c,{limit:1,cliToolId:p,instanceId:u,matchResolvedInstance:!0});b.length>0&&"user"===b[0].role&&b[0].content===k&&(y=b[0].id)}catch(a){n.error("failed-to-detect-orphaned-messages:",{error:o(a)})}if(s&&"copilot"===p)try{await v.sendModelCommand(c,s,q),n.info("copilot-model-command-sent",{model:s})}catch(a){return n.error("failed-to-send-model-command:",{error:o(a)}),{ok:!1,stage:"model",error:o(a)}}try{r?(0,f._J)(v)?await v.sendMessageWithImage(c,k,r,q):await v.sendMessage(c,(0,m.TZ)(k,r),q):await v.sendMessage(c,k,q)}catch(a){return n.error("failed-to-send-message-to:",{error:o(a)}),{ok:!1,stage:"send",error:o(a)}}let z=(0,d.createMessage)(a,{worktreeId:c,role:"user",content:k,messageType:t,timestamp:x,cliToolId:p,instanceId:q});try{(0,i.broadcastMessage)("message",{worktreeId:c,message:{...z,cliToolId:p,instanceId:u}})}catch(a){n.warn("user-message-broadcast-failed",{error:o(a)})}if(y)try{if((0,d.deleteMessageById)(a,y)){n.info("cleaned-up-orphaned-user");try{(0,i.broadcastMessage)(j.dz,{worktreeId:c,cliToolId:p,instanceId:u,reason:"orphan_cleanup"})}catch(a){n.warn("orphan-cleanup-broadcast-failed",{error:o(a)})}}}catch(a){n.error("failed-to-clean-up-orphaned-message:",{error:o(a)})}return(0,d.updateLastUserMessage)(a,c,k,x),(0,d.clearInProgressMessageId)(a,c,p,q),n.info("cleared-in-progress-message-for"),(0,g.startPolling)(c,p,q),{ok:!0,message:z}}},58707:(a,b,c)=>{c.d(b,{$n:()=>k,a3:()=>l,br:()=>m});var d=c(43234),e=c(31990),f=c(95595),g=c(34405),h=c(72626),i=c(30008);let j=(0,h.h)("prompt-waiting-guard"),k="PROMPT_WAITING";async function l(a,b,c,h){try{let k=d.CLIToolManager.getInstance().getTool(b);if(!await k.isRunning(a,c))return{waiting:!1};let l=await (0,e.Wh)(a,b,g._,c),m=(0,f.WC)(l,b),n=(0,i._G)({worktreeId:a,cliToolId:b,instanceId:c,scraper:{status:m.status,reason:m.reason,hasActivePrompt:m.hasActivePrompt},ignoreStructured:h?.ignoreStructured});if(!n.blocksSend)return null!==n.structuredSendBlockSuppressed&&j.info("structured-send-guard-not-applied",{worktreeId:a,cliToolId:b,instanceId:c,suppressed:n.structuredSendBlockSuppressed,promptWaitingSince:n.structured?.at??null}),{waiting:!1};return{waiting:!0,reason:n.blockReason??void 0,blockedBy:n.blockedBy??void 0}}catch(c){return j.warn("prompt-waiting-check-failed",{worktreeId:a,cliToolId:b,error:c instanceof Error?c.message:String(c)}),{waiting:!1}}}function m(a,b){let c=`${a} is waiting on a prompt. Sending now would type into the prompt's input line instead of reaching the agent, and would leave that text in place for the next answer. Answer the prompt first: \`commandmate respond ${a} <answer>\`.`;if("structured"!==b)return c;let d=Math.round(i.j0/6e4);return`${c} This dialog was reported by the agent's own hooks and is not visible to the terminal scraper, so if the pane looks idle the record has outlived its dialog: it stops blocking sends ${d} minutes after it was reported, or immediately with \`commandmate send ${a} <message> --ignore-structured-prompt\` (server-wide: ${i.F1}=off).`}},61068:(a,b,c)=>{c.d(b,{Nz:()=>u,EB:()=>v,l7:()=>x});var d=c(95220),e=c(45017),f=c(11099),g=c(85775),h=c(72626),i=c(43234),j=c(79892);let k=(0,h.h)("global-session-poller"),l=new Map,m=new Map;var n=c(93997),o=c(15194),p=c(23197),q=c(77093),r=c(82325);let s=(0,h.h)("session-cleanup");async function t(a,b){let c={worktreeId:a,sessionsKilled:[],sessionErrors:[],pollersStopped:[],pollerErrors:[]};for(let e of((0,n.pc)(),o.XH)){try{await b(a,e)&&(c.sessionsKilled.push(e),s.info("session:killed",{worktreeId:a,cliToolId:e}))}catch(d){let b=`${e}: ${(0,q.u1)(d)}`;c.sessionErrors.push(b),s.warn("session:kill-failed",{worktreeId:a,cliToolId:e,error:d instanceof Error?d.message:String(d)})}try{(0,d.stopPolling)(a,e),c.pollersStopped.push(`response-poller:${e}`)}catch(d){let b=`response-poller:${e}: ${(0,q.u1)(d)}`;c.pollerErrors.push(b),s.warn("response-poller:stop-failed",{worktreeId:a,cliToolId:e,error:d instanceof Error?d.message:String(d)})}}try{(0,e._C)(a),c.pollersStopped.push("auto-yes-poller")}catch(d){let b=`auto-yes-poller: ${(0,q.u1)(d)}`;c.pollerErrors.push(b),s.warn("auto-yes-poller:stop-failed",{worktreeId:a,error:d instanceof Error?d.message:String(d)})}try{(0,e.LP)(a),c.pollersStopped.push("auto-yes-state")}catch(d){let b=`auto-yes-state: ${(0,q.u1)(d)}`;c.pollerErrors.push(b),s.warn("auto-yes-state:delete-failed",{worktreeId:a,error:d instanceof Error?d.message:String(d)})}try{(0,f.Yg)(a),c.pollersStopped.push("schedule-manager")}catch(d){let b=`schedule-manager: ${(0,q.u1)(d)}`;c.pollerErrors.push(b),s.warn("schedule-manager:stop-failed",{worktreeId:a,error:d instanceof Error?d.message:String(d)})}try{(0,g.Tm)(a),c.pollersStopped.push("timer-manager")}catch(d){let b=`timer-manager: ${(0,q.u1)(d)}`;c.pollerErrors.push(b),s.warn("timer-manager:stop-failed",{worktreeId:a,error:d instanceof Error?d.message:String(d)})}return c}async function u(a,b){let c=await Promise.allSettled(a.map(a=>t(a,b))),d=[],e=[];for(let b=0;b<c.length;b++){let f=c[b],g=a[b];if("fulfilled"===f.status){let a=f.value;for(let b of(d.push(a),a.sessionErrors))e.push(`Session kill error (${g}): ${b}`);for(let b of a.pollerErrors)e.push(`Poller stop error (${g}): ${b}`)}else e.push(`Cleanup failed (${g}): ${(0,q.u1)(f.reason)}`)}return{results:d,warnings:e}}async function v(a,b){try{let c=i.CLIToolManager.getInstance().getTool(b);if(!await c.isRunning(a))return!1;let e=`${a}:${b}`;(0,d.clearPromptHashCache)(e);let f=c.getSessionName(a);return(0,j.fY)(f)}catch{return!1}}async function w(){for(let a of l.keys()){let b=l.get(a);b&&clearTimeout(b)}l.clear(),m.clear(),k.info("poll:all-stopped");let a=0,b=i.CLIToolManager.getInstance();for(let c of o.XH)try{let d=b.getTool(c).getSessionName(p.H1);await (0,j.N)(d)&&await (0,j.fY)(d)&&(a++,s.info("global-session:killed",{cliToolId:c,sessionName:d}))}catch(a){s.warn("global-session:kill-failed",{cliToolId:c,error:(0,q.u1)(a)})}return a}async function x(a,b){let c=(0,r.L0)(a,b);try{await w()}catch(a){s.warn("sync:global-cleanup-failed",{error:(0,q.u1)(a)})}let d=[];if(c.deletedIds.length>0)try{let a=await u(c.deletedIds,v);a.warnings.length>0&&(s.warn("sync:cleanup-warnings",{warnings:a.warnings}),d=[`${a.warnings.length} session cleanup warning(s) occurred`])}catch(a){s.error("sync:cleanup-failed",{error:(0,q.u1)(a)}),d=["Session cleanup encountered an error"]}return{syncResult:c,cleanupWarnings:d}}},82325:(a,b,c)=>{c.d(b,{Hz:()=>o,L0:()=>r,Mg:()=>s,YM:()=>p,Yp:()=>q});var d=c(79646),e=c(28354),f=c(29021),g=c.n(f),h=c(33873),i=c.n(h),j=c(23718),k=c(56791),l=c(72626),m=c(64185);let n=(0,l.h)("worktrees");function o(){let a=process.env.WORKTREE_REPOS;return a&&a.trim()?a.split(",").map(a=>a.trim()).filter(a=>a.length>0):[]}async function p(a){let b=(0,e.promisify)(d.exec);if(function(a){if(!a)return!1;try{return g().lstatSync(a),!1}catch(b){let a=b.code;return"ENOENT"===a||"ENOTDIR"===a}}(a))return n.warn("repository:scan-skipped-missing-dir",{repoPath:a}),[];try{let{stdout:c}=await b("git worktree list",{cwd:a}),d=function(a){if(!a||""===a.trim())return[];let b=a.trim().split("\n"),c=[];for(let a of b){let b=a.trim();if(!b)continue;let d=b.match(/^(.+?)\s+([a-z0-9]+)\s+(?:\[(.+?)\]|\(detached HEAD\))/);if(d){let[,a,b,e]=d;c.push({path:a.trim(),branch:e||`detached-${b}`,commit:b})}}return c}(c),e=i().resolve(a),f=i().basename(e);return(0,m.oZ)(e),d.map(a=>{let b=i().resolve(a.path);return{id:(0,j.ko)(b),name:a.branch,branch:a.branch,path:b,repositoryPath:e,repositoryName:f}}).filter(a=>["/etc","/root","/sys","/proc","/dev","/boot","/bin","/sbin","/usr/bin","/usr/sbin"].some(b=>a.path.startsWith(b))?(n.warn("worktree:unsafe-path-skipped",{path:a.path}),!1):!(a.path.includes("\0")||a.path.includes(".."))||(n.warn("worktree:malicious-path-skipped",{path:a.path}),!1))}catch(c){let a=c instanceof Error?c.message:String(c),b=c.code;if(a?.includes("not a git repository")||128===b)return[];throw c}}async function q(a){let b=await Promise.allSettled(a.map(async a=>{n.info("repository:scan-start",{repoPath:a});let b=await p(a);return n.info("repository:scan-complete",{repoPath:a,worktreeCount:b.length}),b})),c=[];for(let d=0;d<b.length;d++){let e=b[d];"fulfilled"===e.status?c.push(...e.value):n.error("repository:scan-failed",{repoPath:a[d],error:e.reason instanceof Error?e.reason.message:String(e.reason)})}return c}function r(a,b){if(0===b.length)return{deletedIds:[],upsertedCount:0};let c=[],d=0,e=new Map;for(let a of b){let b=a.repositoryPath||"";e.has(b)||e.set(b,[]),e.get(b).push(a)}let f=new Set([...(0,k.getAllWorktreeIds)(a),...(0,k.getAliasedWorktreeIds)(a)]),g=new Map((0,k.getAllWorktreePathIds)(a).map(a=>[i().resolve(a.path),a.id])),h=new Map,l=new Map;for(let[a,b]of g)h.set(a,new Set([b])),l.set(b,a);for(let b of(0,k.getAllWorktreeAliases)(a)){let a=l.get(b.worktreeId);a&&h.get(a)?.add(b.oldId)}let m=new Set(b.map(a=>i().resolve(a.path)));for(let[b,o]of e){if(!b)continue;let e=(0,k.getWorktreesByRepository)(a,b).filter(a=>!m.has(i().resolve(a.path))).map(a=>a.id);if(e.length>0){let b=(0,k.deleteWorktreesByIds)(a,e);for(let a of(c.push(...e),e)){f.delete(a);let b=l.get(a);void 0!==b&&(g.delete(b),h.delete(b))}n.info("worktree:cleanup",{deletedCount:b.deletedCount})}for(let b of o){let c=i().resolve(b.path),e=g.get(c),m=b.id,n=e??(m&&!f.has(m)?m:function(a,b,c){if(!c||0===c.size)return(0,j.ko)(a,b);let d=new Set(b);for(let a of c)d.delete(a);return(0,j.ko)(a,d)}(c,f,h.get(c)));f.add(n),g.set(c,n),l.set(n,c),(0,k.upsertWorktree)(a,{...b,id:n,name:b.branch??b.name}),d++}}return{deletedIds:c,upsertedCount:d}}function s(a,b){let c=new Set(b.map(a=>a.repositoryPath).filter(a=>!!a)),d=[];for(let b of(0,k.getRepositories)(a)){let e=b.path;if(!e||c.has(e)||function(a){if(!a)return!1;try{return g().existsSync(a)&&g().existsSync(i().join(a,".git"))}catch{return!0}}(e))continue;let f=(0,k.getWorktreesByRepository)(a,e).map(a=>a.id);if(0===f.length)continue;let h=(0,k.deleteWorktreesByIds)(a,f);d.push(...f),n.info("worktree:stale-repo-pruned",{repoPath:e,deletedCount:h.deletedCount})}return d}},85775:(a,b,c)=>{c.d(b,{Tm:()=>o,x4:()=>m,xJ:()=>n});var d=c(34129),e=c(43234),f=c(88807),g=c(72626),h=c(87374),i=c(39687);let j=(0,g.h)("timer-manager");function k(){return globalThis.__timerManagerState||(globalThis.__timerManagerState={timers:new Map,timerWorktrees:new Map,initialized:!1}),globalThis.__timerManagerState}async function l(a){let b=k(),c=(0,f.getDbInstance)();try{let b=(0,d.kx)(c,a);if(!b||"pending"!==b.status)return;let f=e.CLIToolManager.getInstance().getTool(b.cliToolId),g=b.instanceId;if(!await f.isRunning(b.worktreeId,g)){j.warn("timer:no-session",{timerId:a,worktreeId:b.worktreeId,instanceId:g}),(0,d.j2)(c,a,h.HR.NO_SESSION);return}(0,d.j2)(c,a,"sending");let k=await (0,i.d)(c,{worktreeId:b.worktreeId,content:b.message,cliToolId:b.cliToolId,instanceId:g});if(!k.ok){let b=`[${k.stage}] ${k.error}`;(0,d.j2)(c,a,"failed",void 0,b),j.error("timer:send-failed",{timerId:a,stage:k.stage,error:k.error});return}(0,d.j2)(c,a,"sent",Date.now()),j.info("timer:sent",{timerId:a,worktreeId:b.worktreeId})}catch(e){let b=e instanceof Error?e.message:String(e);try{(0,d.j2)(c,a,"failed",void 0,b)}catch{}j.error("timer:send-failed",{timerId:a,error:b})}finally{b.timers.delete(a),b.timerWorktrees.delete(a)}}function m(a,b,c){let d=k(),e=setTimeout(()=>{l(a)},c);d.timers.set(a,e),d.timerWorktrees.set(a,b)}function n(a){let b=k(),c=b.timers.get(a);c&&(clearTimeout(c),b.timers.delete(a),b.timerWorktrees.delete(a));let e=(0,f.getDbInstance)();(0,d.Ud)(e,a)}function o(a){let b=k(),c=(0,f.getDbInstance)();for(let[c,d]of b.timerWorktrees)if(d===a){let a=b.timers.get(c);a&&clearTimeout(a),b.timers.delete(c),b.timerWorktrees.delete(c)}(0,d.$$)(c,a)}},95220:(a,b,c)=>{c.r(b),c.d(b,{accumulateTuiContent:()=>g.IZ,cleanClaudeResponse:()=>f.NN,cleanCopilotResponse:()=>f.LH,cleanGeminiResponse:()=>f.IS,cleanOpenCodeResponse:()=>f.aW,clearPromptHashCache:()=>h.iX,clearTuiAccumulator:()=>g.q1,extractCopilotContentLines:()=>g.o0,extractTuiContentLines:()=>g.K0,findOverlapIndex:()=>g.vQ,getAccumulatedContent:()=>g.Uz,getActivePollers:()=>d.KQ,initTuiAccumulator:()=>g.tb,isDuplicatePrompt:()=>h.gv,isOpenCodeComplete:()=>e.bE,migrateResponsePollerWorktreeIds:()=>d.sR,normalizeCopilotLine:()=>g.IW,normalizePromptForDedup:()=>h.zm,renamePromptHashCacheKey:()=>h.i2,resolveExtractionStartIndex:()=>e.QM,startPolling:()=>d.g8,stopAllPolling:()=>d.fq,stopPolling:()=>d.Et,truncateMessage:()=>f.Sj});var d=c(45146),e=c(60),f=c(82450),g=c(13033),h=c(72457)}};
@@ -1,103 +0,0 @@
1
- "use strict";exports.id=1990,exports.ids=[1990],exports.modules={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)}}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=261,exports.ids=[261,7836],exports.modules={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}},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.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,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()}}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=2739,exports.ids=[358,2739,4325,5120,7836],exports.modules={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"},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}}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=2839,exports.ids=[2839,5220],exports.modules={95220:(a,b,c)=>{c.r(b),c.d(b,{accumulateTuiContent:()=>g.IZ,cleanClaudeResponse:()=>f.NN,cleanCopilotResponse:()=>f.LH,cleanGeminiResponse:()=>f.IS,cleanOpenCodeResponse:()=>f.aW,clearPromptHashCache:()=>h.iX,clearTuiAccumulator:()=>g.q1,extractCopilotContentLines:()=>g.o0,extractTuiContentLines:()=>g.K0,findOverlapIndex:()=>g.vQ,getAccumulatedContent:()=>g.Uz,getActivePollers:()=>d.KQ,initTuiAccumulator:()=>g.tb,isDuplicatePrompt:()=>h.gv,isOpenCodeComplete:()=>e.bE,migrateResponsePollerWorktreeIds:()=>d.sR,normalizeCopilotLine:()=>g.IW,normalizePromptForDedup:()=>h.zm,renamePromptHashCacheKey:()=>h.i2,resolveExtractionStartIndex:()=>e.QM,startPolling:()=>d.g8,stopAllPolling:()=>d.fq,stopPolling:()=>d.Et,truncateMessage:()=>f.Sj});var d=c(45146),e=c(60),f=c(82450),g=c(13033),h=c(72457)}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=3484,exports.ids=[3484],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)}},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",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:()=>an});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}}),V=/\benter\s+to\s+select\b\s*[·•]\s*esc\s+to\s+cancel\b/i,W=k({tool:"command-code",verifiedAgainst:l.ji,afterPrompt:a=>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}}),X=/do you want to\b/i,Y=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":X.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 Z=c(76777),$=c(50524);let _=/\x1b\[[0-9;]*[a-zA-Z]|\x1b\][^\x07\x1b]*(?:\x07|\x1b\\)|\[[0-9;]*m/g,aa=/^(?:\x1b\[|\[)([0-9;]*)m$/,ab=new Set([38,48,58]);function ac(a){let b;_.lastIndex=0;let c=[],d="",e=null,f=0,g=0,h=0;for(;null!==(b=_.exec(a));){let i=a.slice(h,b.index);d+=i,f+=(0,$.LQ)(i),h=b.index+b[0].length;let j=aa.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(ab.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 ad(a,b){for(let c of a.segments)if(c.start<=b&&b<c.end)return c.bg;return null}let ae=/\S[^\S\n]{2,}esc[^\S\n]*$/,af=/^[│┃╹]/;function ag(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!(ad(a,b-1)===ad(a,b)||c<a.width&&ad(a,c)===ad(a,c-1)||af.test((0,$.Ml)(a.text,b-1,b)))&&!af.test((0,$.Ml)(a.text,b,c))}function ah(a){let b=function(a){let b=a.split("\n").map(ac),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)||!ag(a,f,g))continue;let h=(0,$.Ml)(a.text,f,g);if(!ae.test(h))continue;c.add(e);let i=b.filter(a=>ag(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,Z.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 ai=/\s{2,}/;function aj(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 ak=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}=aj(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!==ah(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}=aj(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}=aj(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(ai).map(a=>a.trim()).filter(a=>""!==a)}return[]}(a),answerMode:"keys"}:d.LO.test(b.contentWindow)||null!==ah(a.raw)?{kind:"picker",options:[],answerMode:"keys"}:null},unreadableReason:e.g.UNKNOWN_FRAME});function al(a){return k({tool:a,verifiedAgainst:l.hB})}let am={claude:D,codex:U,copilot:Y,opencode:ak,antigravity:p,"command-code":W,gemini:al("gemini"),"vibe-local":al("vibe-local")};function an(a){return am[a]??al(a)}Object.values(am)},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}`}}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=358,exports.ids=[358,2739,4325,5120,7836],exports.modules={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"},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}}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=3869,exports.ids=[3869],exports.modules={52120:(a,b,c)=>{c.d(b,{PL:()=>e,sb:()=>f});let d={idle:"bg-muted-foreground",ready:"bg-success",spinner:"border-info",waiting:"bg-warning"},e={idle:{className:d.idle,labelKey:"status.idle",type:"dot"},ready:{className:d.ready,labelKey:"status.ready",type:"dot"},running:{className:d.spinner,labelKey:"status.running",type:"spinner"},waiting:{className:d.waiting,labelKey:"status.waiting",type:"dot"},generating:{className:d.spinner,labelKey:"status.generating",type:"spinner"}},f={idle:"detailStatus.idle",ready:"detailStatus.ready",running:"detailStatus.running",waiting:"detailStatus.waiting"}},90277:(a,b,c)=>{c.d(b,{Vt:()=>f,aN:()=>g,I_:()=>h,JY:()=>i,sd:()=>j,kj:()=>k});let d=/^[a-zA-Z0-9][a-zA-Z0-9\-._/:]*$/,e=/^[a-zA-Z0-9][a-zA-Z0-9\-._]*$/,f=new Set(["copilot","opencode"]),g=new Set(["opencode"]);function h(a){let b=a.trim();if(!b)return{cliToolId:"claude",model:void 0};let{tokens:c,error:d}=function(a){let b=[],c="",d=!1,e=null;for(let f of a){if(e){f===e?e=null:c+=f;continue}if('"'===f||"'"===f){e=f,d=!0;continue}if(/\s/.test(f)){d&&(b.push(c),c="",d=!1);continue}c+=f,d=!0}return e?{tokens:[],error:"CLI Tool column has an unterminated quote"}:(d&&b.push(c),{tokens:b})}(b);if(d)return{cliToolId:b.split(/\s+/)[0],error:d};let e=c[0];return 1===c.length?{cliToolId:e,model:void 0}:f.has(e)?g.has(e)?function(a,b){let c={cliToolId:a},d=new Set,e=(a,c)=>{let d=b[c+1];return void 0===d||d.startsWith("-")?null:d};for(let f=0;f<b.length;f++){let g=b[f];if(d.has(g))return{cliToolId:a,error:`${a} option "${g}" is repeated`};switch(g){case"--model":case"-m":{let b=e(g,f);if(null===b)return{cliToolId:a,error:`${a} option "${g}" needs a value`};d.add("--model"),d.add("-m"),c.model=b,f++;break}case"--agent":{let b=e(g,f);if(null===b)return{cliToolId:a,error:`${a} option "${g}" needs a value`};d.add(g),c.agent=b,f++;break}case"--variant":{let b=e(g,f);if(null===b)return{cliToolId:a,error:`${a} option "${g}" needs a value`};d.add(g),c.variant=b,f++;break}case"--title":{let b=e(g,f);if(null===b)return{cliToolId:a,error:`${a} option "${g}" needs a value`};d.add(g),c.title=b,f++;break}case"--continue":case"-c":d.add("--continue"),d.add("-c"),c.continueSession=!0;break;default:return{cliToolId:a,error:`${a} only supports: opencode [--model <provider/model>] [--agent <name>] [--variant <name>] [--continue] [--title <text>]`}}}return c}(e,c.slice(1)):3===c.length&&"--model"===c[1]?{cliToolId:e,model:c[2]}:{cliToolId:e,error:`${e} only supports: ${e} --model <modelName>`}:{cliToolId:e,error:`CLI Tool "${e}" does not support additional options`}}function i(a){return/[\x00-\x1f\x7f]/.test(a)?{valid:!1,reason:"Model name contains control characters"}:""===a.trim()?{valid:!1,reason:"Model name must not be empty"}:d.test(a)?a.length>128?{valid:!1,reason:"Model name exceeds 128 characters"}:{valid:!0}:{valid:!1,reason:"Model name contains invalid characters"}}function j(a,b){return/[\x00-\x1f\x7f]/.test(a)?{valid:!1,reason:`opencode ${b} contains control characters`}:""===a.trim()?{valid:!1,reason:`opencode ${b} must not be empty`}:e.test(a)?a.length>64?{valid:!1,reason:`opencode ${b} exceeds 64 characters`}:{valid:!0}:{valid:!1,reason:`opencode ${b} contains invalid characters`}}function k(a){return/[\x00-\x1f\x7f]/.test(a)?{valid:!1,reason:"opencode title contains control characters"}:""===a.trim()?{valid:!1,reason:"opencode title must not be empty"}:a.startsWith("-")?{valid:!1,reason:'opencode title must not start with "-"'}:a.includes("|")?{valid:!1,reason:'opencode title must not contain "|"'}:a.length>200?{valid:!1,reason:"opencode title exceeds 200 characters"}:{valid:!0}}},99772:(a,b,c)=>{c.d(b,{q:()=>f});var d=c(38301),e=c(58970);function f(a=e.pX){let[b,c]=(0,d.useState)(!1),g=(0,d.useRef)(null);return{copied:b,markCopied:(0,d.useCallback)(()=>{c(!0),null!==g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{g.current=null,c(!1)},a)},[a]),reset:(0,d.useCallback)(()=>{null!==g.current&&(clearTimeout(g.current),g.current=null),c(!1)},[])}}}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=4325,exports.ids=[4325],exports.modules={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"}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=4393,exports.ids=[4393,7836],exports.modules={23197:(a,b,c)=>{c.d(b,{$M:()=>e,H1:()=>d,q5:()=>f});let d="__global__",e=2e3,f=900},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}}},32002:(a,b,c)=>{c.d(b,{e:()=>h});var d=c(56791),e=c(26923),f=c(52201),g=c(15194);function h(a,b,c){let h=(0,d.getAgentInstances)(a,b);return h.length>0?h:(0,g.lu)((0,f.eG)({worktree:c,appSettings:(0,e.Ds)(a)}))}},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)}},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}},89398:(a,b,c)=>{c.d(b,{z:()=>v,B:()=>y});var d=c(43234),e=c(15194),f=c(31990),g=c(95595),h=c(37717),i=c(67882),j=c(23365),k=c(50945),l=c(45017),m=c(23197),n=c(30008),o=c(40043),p=c(57836),q=c(48083),r=c(26547),s=c(129),t=c(66101);let u=(0,c(72626).h)("lib/session/worktree-status-helper");function v(){return{probeCount:0,captureCount:0,healthCheckCount:0}}let w={prompt:3,menu:2,unclassified:1};async function x(a,b,d,e,m,v,w,x,y){let z=m.has(e),A=z,B=null;if(A){y&&y.healthCheckCount++;let a=await (0,k.S)(e,b);a.alive||(A=!1,B=a.reason)}let C=!1,D=!1,E=null,F=null,G=null,H=null;if(A)try{var I;let e=(0,j.y)(b).statusLines;y&&y.captureCount++;let h=await (0,f.Wh)(a,b,e,d),k=(0,l.v7)(a,b,d),m=(0,l.xU)(k),p=m?new Date(m):void 0,s=(0,g.WC)(h,b,p);(0,q.vm)(a,b,d,(0,r.jw)(b,h)),({isWaitingForResponse:C,isProcessing:D}=(0,i.O_)(s.status)),H=s.reason,G=s.evidence,(0,o.ox)(k,{status:s.status,reason:s.reason,evidence:G});let t=(0,n.xF)({worktreeId:a,cliToolId:b,instanceId:d,scraper:{status:s.status,reason:s.reason,hasActivePrompt:s.hasActivePrompt}});C=C||t.waiting,F=t.structured?.at??null,E=(I={waiting:C,hasActivePrompt:s.hasActivePrompt,scraperStatus:s.status,scraperReason:s.reason}).waiting?I.hasActivePrompt?"prompt":"waiting"===I.scraperStatus&&g.ug.has(I.scraperReason)?"menu":"unclassified":null,!s.hasActivePrompt&&w(v,a,{limit:10,cliToolId:b,instanceId:d}).some(a=>"prompt"===a.messageType&&a.promptData?.status!=="answered")&&x(v,a,b,d,b=>{Promise.all([c.e(1356),c.e(1503),c.e(1191),c.e(1719),c.e(2119),c.e(2445),c.e(595),c.e(4325)]).then(c.bind(c,49640)).then(({broadcastMessage:c})=>{c("message_updated",{worktreeId:a,message:b})}).catch(b=>{u.warn("prompt-sweep-broadcast-failed",{worktreeId:a,error:b instanceof Error?b.message:String(b)})})})}catch{D=!0}let J=(0,p.hd)({worktreeId:a,cliToolId:b,instanceId:d,waiting:C,kind:E,structuredSince:F}),{model:K,effort:L}=(0,q.jl)(a,b,d),M=(0,l.v7)(a,b,d);A||(0,o.xG)(M);let N=A?(0,o.AD)(M):null,O=A?function(a,b,c){try{let d=(0,s.VM)(b),e=(0,t.Kf)(d,d.liveness({worktreeId:a,cliToolId:b,instanceId:c}),Date.now());if(void 0===e.degradedReason&&void 0===e.liveness)return null;return e}catch{return null}}(a,b,d):null;try{z?await (0,f.N5)({sessionName:e,worktreeId:a,cliToolId:b,instanceId:d,status:(0,i.kA)({isRunning:A,isWaitingForResponse:C,isProcessing:D})}):(0,f.Lw)(e)}catch(a){u.debug("tmux-surface:publish-failed",{sessionName:e,error:a instanceof Error?a.message:String(a)})}return{isRunning:A,isWaitingForResponse:C,isProcessing:D,waitingKind:E,waitingSince:J,awaitingInstruction:A&&(0,q.pI)(a,b,d),...null!==K?{model:K}:{},...null!==L?{reasoningEffort:L}:{},...null!==G?{statusEvidence:G}:{},...null!==H?{sessionStatusReason:H}:{},...null!==B?{sessionStatusReason:h.g.EXITED,statusEvidence:"positive"}:{},...null!==N?{lastKnownStatus:N.status,lastKnownStatusAt:N.at}:{},...null!==O?{eventSource:O}:{}}}async function y(a,b,c,f,g,h,i){if(a===m.H1)return{sessionStatusByCli:{},sessionStatusByInstance:{},isSessionRunning:!1,isWaitingForResponse:!1,isProcessing:!1};let j=d.CLIToolManager.getInstance(),k=e.XH,l=h(c,a).filter(a=>a.id!==a.cliTool),n=k.map(b=>({cliToolId:b,instanceId:b,sessionName:j.getTool(b).getSessionName(a,b)}));for(let b of l)n.push({cliToolId:b.cliTool,instanceId:b.id,sessionName:j.getTool(b.cliTool).getSessionName(a,b.id)});i&&(i.probeCount+=n.length);let o=await Promise.all(n.map(async d=>{let e=await x(a,d.cliToolId,d.instanceId,d.sessionName,b,c,f,g,i);return{...d,status:e}})),p={},q={};for(let{cliToolId:a,instanceId:b,status:c}of o){q[b]=c;let d=p[a];p[a]=d?function(a,b){var c,d,e,f;return{isRunning:a.isRunning||b.isRunning,isWaitingForResponse:a.isWaitingForResponse||b.isWaitingForResponse,isProcessing:a.isProcessing||b.isProcessing,waitingKind:(c=a.waitingKind,d=b.waitingKind,null===c?d:null===d||w[c]>=w[d]?c:d),waitingSince:(e=a.waitingSince,f=b.waitingSince,null===e?f:null===f?e:Math.min(e,f)),awaitingInstruction:a.awaitingInstruction||b.awaitingInstruction}}(d,c):c}let r=!1,s=!1,t=!1;for(let a of Object.values(p))a&&(a.isRunning&&(r=!0),a.isWaitingForResponse&&(s=!0),a.isProcessing&&(t=!0));return{sessionStatusByCli:p,sessionStatusByInstance:q,isSessionRunning:r,isWaitingForResponse:s,isProcessing:t}}},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}}}}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=5017,exports.ids=[5017],exports.modules={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(26895),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,s.KO)(e),E=(0,f.gF)(v,{...D,...w&&{precomputedLines:w}});if(!E.isPrompt||!E.promptData)return b.lastAnsweredPromptKey=null,b.lastAnsweredAt=null,"no_prompt";let F=(B=E.promptData,`${B.type}:${B.question}`);if(b.lastAnsweredPromptKey===F&&null!==b.lastAnsweredAt&&Date.now()-b.lastAnsweredAt<d.UL)return"duplicate";let G="codex"===e?(0,s.E6)(v):null;if(G)return(0,i.ZS)(a,e,x,{reason:"agent-launch-dialog",mode:null,promptType:E.promptData.type}),y.warn("poller:auto-yes-skipped-launch-dialog",{worktreeId:a,cliToolId:e,instanceId:x,dialog:G,promptType:E.promptData.type}),"no_answer";let H=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,E.promptData.type,v);if(!H.allowed)return(0,i.ZS)(a,e,x,{reason:"unclassified-frame",mode:null,promptType:E.promptData.type}),y.warn("poller:auto-yes-skipped-unclassified-frame",{worktreeId:a,cliToolId:e,instanceId:x,promptType:E.promptData.type,dialogKind:H.dialog?.kind??null,answerMode:H.dialog?.answerMode??null,gateMode:H.mode}),"no_answer";let I=(0,h.n)(a,e,x),J=(0,g.sD)(E.promptData,I);J.suppressedBy&&((0,i.ZS)(a,e,x,{reason:J.suppressedBy,mode:I?.mode??null,promptType:E.promptData.type,pattern:J.pattern}),y.warn("poller:auto-yes-suppressed-by-policy",{worktreeId:a,cliToolId:e,instanceId:x,reason:J.suppressedBy,mode:I?.mode??null,pattern:J.pattern,promptType:E.promptData.type}));let K=J.answer;if(null===K)return"no_answer";let L=r.CLIToolManager.getInstance().getTool(e).getSessionName(a,x);try{await (0,q.tV)({sessionName:L,answer:K,cliToolId:e,promptData:E.promptData})}finally{(0,u.gm)(L)}var B,C=Date.now();let M=A(z);M&&(M.lastServerResponseTimestamp=C);let N=A(z);N&&(N.consecutiveErrors=0,N.currentInterval=d.ps),b.lastAnsweredPromptKey=F,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:E.promptData.type});let O=null;try{O=(0,p.recordAnsweredPrompt)((0,o.getDbInstance)(),{worktreeId:a,cliToolId:e,instanceId:x??e,promptData:E.promptData,answer:K,answeredBy:"auto",content:E.rawContent||E.cleanContent})}catch(b){y.warn("poller:prompt-audit-record-failed",{worktreeId:a,cliToolId:e,instanceId:x,error:(0,t.u1)(b)})}if(O){let b=O;Promise.all([c.e(1356),c.e(1503),c.e(1191),c.e(1719),c.e(2119),c.e(2445),c.e(595),c.e(358)]).then(c.bind(c,49640)).then(({broadcastMessage:c})=>{c(b.created?"message":"message_updated",{worktreeId:a,message:b.message})}).catch(()=>{})}let[{startPolling:P},{broadcastTerminalSnapshotAfterInteraction:Q}]=await Promise.all([Promise.all([c.e(1356),c.e(1503),c.e(1634),c.e(1191),c.e(1719),c.e(2119),c.e(2445),c.e(595),c.e(6337),c.e(1058),c.e(9696),c.e(8918),c.e(552),c.e(2839)]).then(c.bind(c,95220)),Promise.all([c.e(1356),c.e(1503),c.e(1191),c.e(1719),c.e(2119),c.e(2445),c.e(595),c.e(1058),c.e(261)]).then(c.bind(c,99508))]);return P(a,e,x),Q(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))}},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}}},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)}},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}}},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)}}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=5120,exports.ids=[358,2739,4325,5120,7836],exports.modules={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"},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}}};
@@ -1,25 +0,0 @@
1
- "use strict";exports.id=552,exports.ids=[261,552,7836],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)}},3523:(a,b,c)=>{c.d(b,{z$:()=>O,zX:()=>P});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(40964),z=c(83598),A=c(31442),B=c(45146),C=c(91601),D=c(92010),E=c(81099),F=c(63209),G=c(73478),H=c(57836),I=c(52767);let J=(0,n.h)("response-poller");function K(a){return b=>{try{(0,g.broadcastMessage)("message_updated",{worktreeId:a,message:b})}catch(b){J.warn("prompt-sweep-broadcast-failed",{worktreeId:a,error:b instanceof Error?b.message:String(b)})}}}function L(a){return{response:"",isComplete:!1,lineCount:a}}function M(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 N(a,b){let c=(0,m._A)((0,m.aJ)(a));if("antigravity"===b){let a=(0,i.g)(c);if(null!==a)return a}let d=(0,m.KO)(b);return(0,h.gF)(c,d)}function O(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=N(g.join("\n"),c);if(a.isPrompt)return M(g,b,h,s,c,A,a,i)}let C=(0,m.aJ)(v),D=w.test(C),E=x.test(C),F="codex"===c?(0,m.DR)(g,20):y.test(C),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,K="command-code"===c&&D&&E&&!F,P="opencode"===c&&(0,q.bE)(C);if(H||I||K||P){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 L(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 L(h)}else if(!g&&(b||c||d||e)&&f.length<2e3)return J.info("Claude startup banner suppressed, response not saved",{responseLength:f.length,hasBannerArt:b,hasVersionInfo:c,hasStartupTips:d,hasProjectInit:e}),L(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 L(h)}if("command-code"===c&&0>A(h))return J.info("Command Code launch screen suppressed, response not saved",{responseLength:f.length}),L(h);if("gemini"===c&&((f.match(/[░███]/g)||[]).length>.3*f.length||B.SI.some(a=>f.includes(a))||!f.includes("✦")&&f.length<10))return L(h);if("opencode"===c){let a=(0,m.aJ)(f);if((a.length<50||!m.Md.test(C))&&0===a.split("\n").filter(a=>{let b=a.trim();return b&&!m.sx.some(a=>a.test(b))}).length)return L(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=N(g.join("\n"),c);if(a.isPrompt)return M(g,b,h,s,c,A,a,i)}let Q=[],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))||Q.push(b)}let U=Q.join("\n").trim();return U?{response:U,isComplete:!1,lineCount:h}:L(h)}async function P(a,b,c){let h=(0,e.getDbInstance)(),i=c??b;try{let e=(0,f.getWorktreeById)(h,a);if(!e)return J.error("worktree-worktreeid-not"),(0,B.Et)(a,b,c),!1;if(!await (0,d.K1)(a,b,c))return J.info("session-not-running"),(0,B.Et)(a,b,c),!1;let n=(0,y.m)(b,a,c),G=(0,A.n9)(n)?await (0,z.zQ)(n):{delegated:!1,released:!1};G.released&&((0,f.updateSessionState)(h,a,b,0,i),J.info("geometry-delegation-released",{worktreeId:a,cliToolId:b,instanceId:i}));let L=(0,f.getSessionState)(h,a,i),M=L?.lastCapturedLine||0,P=await (0,d.Wh)(a,b,p.xE,c),Q=P.split("\n").slice(-100).join("\n"),R=(0,F.bT)(Q);if((0,E.notifyUpstreamFaultPush)({worktreeId:a,cliToolId:b,instanceId:c,faultId:R?.fault.id??null,matchedText:R?.matchedText}).catch(()=>{}),"opencode"===b||"copilot"===b){let d=(0,B.MN)(a,b,c),e="opencode"===b?(0,q.ZX)(P):P;(0,t.IZ)(d,e,b)}let S=O(P,M,b,p.xE);if(!S||!S.isComplete){let{thinkingPattern:c}=(0,m._X)(b),d=(0,m.aJ)(P).split("\n").slice(-o.$).join("\n");return c.test(d)&&(0,f.markPendingPromptsAsAnswered)(h,a,b,i,K(a))>0&&J.info("marked-answeredcount-pending"),!1}let T="opencode"===b||"copilot"===b,U=!(0,k.VA)(b)&&!S.captureWindowSaturated;if(U&&!S.bufferReset&&S.lineCount===M&&!L?.inProgressMessageId)return!1;if(U&&!S.bufferReset&&S.lineCount<=M)return J.info("already-saved-up-to-line-lastcapturedlin"),!1;let V=S.promptDetection??N(S.response,b);if(V.isPrompt){let d=V.rawContent||V.cleanContent,j=(0,B.MN)(a,b,c),k=(0,u.zm)(d,b);if((0,u.gv)(j,k))return(0,v.LN)(a,b,c),J.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:V.promptData,timestamp:new Date,cliToolId:b,instanceId:i});(0,f.updateSessionState)(h,a,b,S.lineCount,i),(0,g.broadcastMessage)("message",{worktreeId:a,message:m}),(0,I.r)(h,a,b,i,"prompt_detected",{promptType:V.promptData?.type});let n=Date.now(),o=(0,H.Jp)(a,b,c)?.since??n;return(0,D.R)({worktreeId:a,cliToolId:b,instanceId:c,waitingSince:o})||(0,C.J$)({worktreeId:a,worktreeName:e.name,kind:"prompt",agentName:i,instanceId:i,waitingKind:"prompt",waitingSince:o,excerpt:V.promptData?.question??l}).catch(()=>{}),(0,H.hd)({worktreeId:a,cliToolId:b,instanceId:c,waiting:!0,kind:"prompt",now:n}),T||(0,B.Et)(a,b,c),!0}if(!S.response||""===S.response.trim())return(0,f.updateSessionState)(h,a,b,S.lineCount,i),!1;let W="claude"===b?(0,l.R)(S.response):void 0,X=S.response;if("gemini"===b)X=(0,r.IS)(S.response);else if("claude"===b)X=(0,r.NN)(S.response);else if("copilot"===b){let d=(0,B.MN)(a,b,c),e=(0,t.Uz)(d)||S.response;X=(0,r.LH)(e),X=(0,r.Sj)(X,s.Rf,s.ky),(0,t.q1)(d)}else if("opencode"===b){let d=(0,B.MN)(a,b,c),e=(0,t.Uz)(d),f=S.turnHeadTruncated&&e?e:S.response;X=(0,r.aW)(f),(0,t.q1)(d)}if(!X||""===X.trim()||"[No content]"===X)return(0,f.updateSessionState)(h,a,b,S.lineCount,i),(0,f.clearInProgressMessageId)(h,a,b,i),!1;if(!U){let d=(0,B.MN)(a,b,c);if((0,w.j7)(d,X))return J.info("duplicate-response-skipped",{worktreeId:a,cliToolId:b,instanceId:i}),(0,f.updateSessionState)(h,a,b,S.lineCount,i),!1}let Y=(0,x.H)(a,b,c)||await (0,x.captureStructuredHistoryTurn)(a,b,c,{worktreePath:e.path,transcriptPathHint:W?.logFilePath??null}),Z=Y||G.delegated;X&&!Z&&await (0,j.T)(h,a,X,b),(0,f.markPendingPromptsAsAnswered)(h,a,b,i,K(a))>0&&J.info("marked-answeredcount-pending");let $=(0,f.getSessionState)(h,a,i);if(U&&$&&S.lineCount<=$.lastCapturedLine)return J.info("race-condition-detected-skipping-save-re"),!1;if(Z)J.info("structured-history-scrape-suppressed",{worktreeId:a,cliToolId:b,instanceId:i,scrapedLength:X.length,reason:Y?"structured-history":"geometry-delegated"});else{let c=(0,f.createMessage)(h,{worktreeId:a,role:"assistant",content:X,messageType:"normal",timestamp:new Date,cliToolId:b,instanceId:i,summary:W?.summary,logFileName:W?.logFileName,requestId:W?.requestId});(0,g.broadcastMessage)("message",{worktreeId:a,message:c})}return(0,H.hd)({worktreeId:a,cliToolId:b,instanceId:c,waiting:!1}),(0,C.J$)({worktreeId:a,worktreeName:e.name,kind:"completion",agentName:i,excerpt:X}).catch(()=>{}),(0,f.updateSessionState)(h,a,b,S.lineCount,i),T&&(0,B.Et)(a,b,c),!0}catch(a){return J.error("response:check-failed",{error:a instanceof Error?a.message:String(a)}),!1}}(0,G.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}},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)}},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")}},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")},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)})}}},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}},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}},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)}},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}},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.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,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()}}};