commandmate 0.49.0 → 0.49.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 (721) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +238 -231
  3. package/.next/app-path-routes-manifest.json +19 -18
  4. package/.next/build-manifest.json +2 -2
  5. package/.next/prerender-manifest.json +9 -9
  6. package/.next/required-server-files.json +1 -1
  7. package/.next/routes-manifest.json +8 -0
  8. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  9. package/.next/server/app/api/agents/update/route_client-reference-manifest.js +1 -1
  10. package/.next/server/app/api/agents/versions/route_client-reference-manifest.js +1 -1
  11. package/.next/server/app/api/app/release-notes/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_client-reference-manifest.js +1 -1
  14. package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  15. package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  16. package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  17. package/.next/server/app/api/capabilities/route.js +1 -1
  18. package/.next/server/app/api/capabilities/route_client-reference-manifest.js +1 -1
  19. package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +1 -1
  20. package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
  21. package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
  22. package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
  23. package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
  24. package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -1
  25. package/.next/server/app/api/fs/recent-paths/route_client-reference-manifest.js +1 -1
  26. package/.next/server/app/api/hooks/agent-event/route.js +2 -2
  27. package/.next/server/app/api/hooks/agent-event/route.js.nft.json +1 -1
  28. package/.next/server/app/api/hooks/agent-event/route_client-reference-manifest.js +1 -1
  29. package/.next/server/app/api/hooks/claude-done/route.js +2 -2
  30. package/.next/server/app/api/hooks/claude-done/route.js.nft.json +1 -1
  31. package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
  32. package/.next/server/app/api/hooks/permission-request/route.js +1 -1
  33. package/.next/server/app/api/hooks/permission-request/route.js.nft.json +1 -1
  34. package/.next/server/app/api/hooks/permission-request/route_client-reference-manifest.js +1 -1
  35. package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -1
  36. package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
  37. package/.next/server/app/api/push/escalation/route_client-reference-manifest.js +1 -1
  38. package/.next/server/app/api/push/subscriptions/route.js +1 -1
  39. package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
  40. package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
  41. package/.next/server/app/api/relays/[relayId]/cancel/route.js +1 -1
  42. package/.next/server/app/api/relays/[relayId]/cancel/route.js.nft.json +1 -1
  43. package/.next/server/app/api/relays/[relayId]/cancel/route_client-reference-manifest.js +1 -1
  44. package/.next/server/app/api/relays/[relayId]/route.js +1 -0
  45. package/.next/server/app/api/relays/[relayId]/route.js.nft.json +1 -0
  46. package/.next/server/app/api/relays/[relayId]/route_client-reference-manifest.js +1 -0
  47. package/.next/server/app/api/relays/route.js +1 -1
  48. package/.next/server/app/api/relays/route.js.nft.json +1 -1
  49. package/.next/server/app/api/relays/route_client-reference-manifest.js +1 -1
  50. package/.next/server/app/api/remote/pair/route_client-reference-manifest.js +1 -1
  51. package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
  52. package/.next/server/app/api/repositories/clone/[jobId]/route.js +1 -1
  53. package/.next/server/app/api/repositories/clone/[jobId]/route.js.nft.json +1 -1
  54. package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
  55. package/.next/server/app/api/repositories/clone/route.js +1 -1
  56. package/.next/server/app/api/repositories/clone/route.js.nft.json +1 -1
  57. package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
  58. package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
  59. package/.next/server/app/api/repositories/restore/route.js +1 -1
  60. package/.next/server/app/api/repositories/restore/route.js.nft.json +1 -1
  61. package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
  62. package/.next/server/app/api/repositories/route.js +1 -1
  63. package/.next/server/app/api/repositories/route.js.nft.json +1 -1
  64. package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
  65. package/.next/server/app/api/repositories/scan/route.js +1 -1
  66. package/.next/server/app/api/repositories/scan/route.js.nft.json +1 -1
  67. package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
  68. package/.next/server/app/api/repositories/sync/route.js +1 -1
  69. package/.next/server/app/api/repositories/sync/route.js.nft.json +1 -1
  70. package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
  71. package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
  72. package/.next/server/app/api/settings/default-agents/route.js +1 -1
  73. package/.next/server/app/api/settings/default-agents/route.js.nft.json +1 -1
  74. package/.next/server/app/api/settings/default-agents/route_client-reference-manifest.js +1 -1
  75. package/.next/server/app/api/settings/default-surface-mode/route_client-reference-manifest.js +1 -1
  76. package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
  77. package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
  78. package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
  79. package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
  80. package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
  81. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  82. package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
  83. package/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
  84. package/.next/server/app/api/tasks/[taskId]/route.js +1 -1
  85. package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
  86. package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
  87. package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
  88. package/.next/server/app/api/verification/runs/[runId]/route.js +1 -1
  89. package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -1
  90. package/.next/server/app/api/verification/runs/route.js +1 -1
  91. package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -1
  92. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
  93. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js.nft.json +1 -1
  94. package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
  95. package/.next/server/app/api/worktrees/[id]/capture/route.js +1 -1
  96. package/.next/server/app/api/worktrees/[id]/capture/route.js.nft.json +1 -1
  97. package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
  98. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js +1 -1
  99. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js.nft.json +1 -1
  100. package/.next/server/app/api/worktrees/[id]/clear-composer/route_client-reference-manifest.js +1 -1
  101. package/.next/server/app/api/worktrees/[id]/cli-reference/route.js +1 -1
  102. package/.next/server/app/api/worktrees/[id]/cli-reference/route_client-reference-manifest.js +1 -1
  103. package/.next/server/app/api/worktrees/[id]/cli-tool/route.js +1 -1
  104. package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
  105. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js +1 -1
  106. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
  107. package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
  108. package/.next/server/app/api/worktrees/[id]/current-output/route.js.nft.json +1 -1
  109. package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
  110. package/.next/server/app/api/worktrees/[id]/direct-input/route.js +1 -1
  111. package/.next/server/app/api/worktrees/[id]/direct-input/route.js.nft.json +1 -1
  112. package/.next/server/app/api/worktrees/[id]/direct-input/route_client-reference-manifest.js +1 -1
  113. package/.next/server/app/api/worktrees/[id]/env/route.js +1 -1
  114. package/.next/server/app/api/worktrees/[id]/env/route_client-reference-manifest.js +1 -1
  115. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route.js +1 -1
  116. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
  117. package/.next/server/app/api/worktrees/[id]/execution-logs/route.js +1 -1
  118. package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
  119. package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
  120. package/.next/server/app/api/worktrees/[id]/git/branch/create/route.js +1 -1
  121. package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
  122. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route.js +1 -1
  123. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
  124. package/.next/server/app/api/worktrees/[id]/git/branches/route.js +1 -1
  125. package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
  126. package/.next/server/app/api/worktrees/[id]/git/checkout/route.js +1 -1
  127. package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
  128. package/.next/server/app/api/worktrees/[id]/git/commit/route.js +1 -1
  129. package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
  130. package/.next/server/app/api/worktrees/[id]/git/diff/route.js +1 -1
  131. package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
  132. package/.next/server/app/api/worktrees/[id]/git/fetch/route.js +1 -1
  133. package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
  134. package/.next/server/app/api/worktrees/[id]/git/log/route.js +1 -1
  135. package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
  136. package/.next/server/app/api/worktrees/[id]/git/pull/route.js +1 -1
  137. package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
  138. package/.next/server/app/api/worktrees/[id]/git/push/route.js +1 -1
  139. package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
  140. package/.next/server/app/api/worktrees/[id]/git/reset/route.js +1 -1
  141. package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
  142. package/.next/server/app/api/worktrees/[id]/git/revert/route.js +1 -1
  143. package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
  144. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route.js +1 -1
  145. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
  146. package/.next/server/app/api/worktrees/[id]/git/stage/route.js +1 -1
  147. package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
  148. package/.next/server/app/api/worktrees/[id]/git/staged/route.js +1 -1
  149. package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
  150. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route.js +1 -1
  151. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
  152. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route.js +1 -1
  153. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
  154. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route.js +1 -1
  155. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
  156. package/.next/server/app/api/worktrees/[id]/git/stash/push/route.js +1 -1
  157. package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
  158. package/.next/server/app/api/worktrees/[id]/git/stash/route.js +1 -1
  159. package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
  160. package/.next/server/app/api/worktrees/[id]/git/status/route.js +1 -1
  161. package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
  162. package/.next/server/app/api/worktrees/[id]/git/unstage/route.js +1 -1
  163. package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
  164. package/.next/server/app/api/worktrees/[id]/git/working-diff/route.js +1 -1
  165. package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
  166. package/.next/server/app/api/worktrees/[id]/instances/notes/route.js +1 -1
  167. package/.next/server/app/api/worktrees/[id]/instances/notes/route_client-reference-manifest.js +1 -1
  168. package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js.nft.json +1 -1
  169. package/.next/server/app/api/worktrees/[id]/instances/opencode/route_client-reference-manifest.js +1 -1
  170. package/.next/server/app/api/worktrees/[id]/interrupt/route.js +1 -1
  171. package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
  172. package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
  173. package/.next/server/app/api/worktrees/[id]/kill-session/route.js +1 -1
  174. package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -1
  175. package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
  176. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route.js +1 -1
  177. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
  178. package/.next/server/app/api/worktrees/[id]/logs/route.js +1 -1
  179. package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
  180. package/.next/server/app/api/worktrees/[id]/marp-render/route.js +1 -1
  181. package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
  182. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route.js +1 -1
  183. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
  184. package/.next/server/app/api/worktrees/[id]/memos/route.js +1 -1
  185. package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
  186. package/.next/server/app/api/worktrees/[id]/messages/route.js +1 -1
  187. package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
  188. package/.next/server/app/api/worktrees/[id]/opencode/diff/route.js +1 -1
  189. package/.next/server/app/api/worktrees/[id]/opencode/diff/route_client-reference-manifest.js +1 -1
  190. package/.next/server/app/api/worktrees/[id]/opencode/session/route_client-reference-manifest.js +1 -1
  191. package/.next/server/app/api/worktrees/[id]/opencode/share/route_client-reference-manifest.js +1 -1
  192. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
  193. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -1
  194. package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
  195. package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route.js +1 -1
  196. package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route.js.nft.json +1 -1
  197. package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route_client-reference-manifest.js +1 -1
  198. package/.next/server/app/api/worktrees/[id]/resolve-target/route.js +1 -1
  199. package/.next/server/app/api/worktrees/[id]/resolve-target/route_client-reference-manifest.js +1 -1
  200. package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -1
  201. package/.next/server/app/api/worktrees/[id]/respond/route.js.nft.json +1 -1
  202. package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
  203. package/.next/server/app/api/worktrees/[id]/route.js +1 -1
  204. package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
  205. package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
  206. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js +1 -1
  207. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
  208. package/.next/server/app/api/worktrees/[id]/schedules/active/route.js +1 -1
  209. package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
  210. package/.next/server/app/api/worktrees/[id]/schedules/route.js +1 -1
  211. package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
  212. package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
  213. package/.next/server/app/api/worktrees/[id]/send/route.js +144 -1
  214. package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
  215. package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
  216. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +3 -3
  217. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -1
  218. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
  219. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
  220. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
  221. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
  222. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
  223. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route_client-reference-manifest.js +1 -1
  224. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route_client-reference-manifest.js +1 -1
  225. package/.next/server/app/api/worktrees/[id]/skills/route.js +1 -1
  226. package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
  227. package/.next/server/app/api/worktrees/[id]/slash-commands/route.js +1 -1
  228. package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
  229. package/.next/server/app/api/worktrees/[id]/special-keys/route.js +1 -1
  230. package/.next/server/app/api/worktrees/[id]/special-keys/route.js.nft.json +1 -1
  231. package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
  232. package/.next/server/app/api/worktrees/[id]/tasks/route.js +1 -1
  233. package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -1
  234. package/.next/server/app/api/worktrees/[id]/terminal/route.js +103 -1
  235. package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
  236. package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
  237. package/.next/server/app/api/worktrees/[id]/timers/history/route.js +1 -1
  238. package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
  239. package/.next/server/app/api/worktrees/[id]/timers/route.js +1 -1
  240. package/.next/server/app/api/worktrees/[id]/timers/route.js.nft.json +1 -1
  241. package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
  242. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route.js +1 -1
  243. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  244. package/.next/server/app/api/worktrees/[id]/todos/route.js +1 -1
  245. package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
  246. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
  247. package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
  248. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
  249. package/.next/server/app/api/worktrees/[id]/verify/config/route.js +1 -1
  250. package/.next/server/app/api/worktrees/[id]/verify/config/route_client-reference-manifest.js +1 -1
  251. package/.next/server/app/api/worktrees/[id]/verify/route.js +1 -1
  252. package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -1
  253. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route.js +1 -1
  254. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route_client-reference-manifest.js +1 -1
  255. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route.js +1 -1
  256. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -1
  257. package/.next/server/app/api/worktrees/[id]/verify/runs/route.js +1 -1
  258. package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -1
  259. package/.next/server/app/api/worktrees/[id]/viewed/route.js +1 -1
  260. package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
  261. package/.next/server/app/api/worktrees/apply-default-agents/route_client-reference-manifest.js +1 -1
  262. package/.next/server/app/api/worktrees/route.js +1 -1
  263. package/.next/server/app/api/worktrees/route.js.nft.json +1 -1
  264. package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
  265. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  266. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  267. package/.next/server/app/more/page_client-reference-manifest.js +1 -1
  268. package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  269. package/.next/server/app/page_client-reference-manifest.js +1 -1
  270. package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
  271. package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
  272. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  273. package/.next/server/app/sessions/page.js +1 -1
  274. package/.next/server/app/sessions/page.js.nft.json +1 -1
  275. package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  276. package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
  277. package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
  278. package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  279. package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
  280. package/.next/server/app/worktrees/[id]/page.js +11 -11
  281. package/.next/server/app/worktrees/[id]/page.js.nft.json +1 -1
  282. package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
  283. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
  284. package/.next/server/app-paths-manifest.json +19 -18
  285. package/.next/server/chunks/1656.js +2 -2
  286. package/.next/server/chunks/2119.js +1 -1
  287. package/.next/server/chunks/2404.js +1 -1
  288. package/.next/server/chunks/2445.js +1 -1
  289. package/.next/server/chunks/3773.js +1 -0
  290. package/.next/server/chunks/3801.js +31 -0
  291. package/.next/server/chunks/5209.js +1 -1
  292. package/.next/server/chunks/5354.js +1 -1
  293. package/.next/server/chunks/{9130.js → 5630.js} +1 -1
  294. package/.next/server/chunks/5775.js +1 -0
  295. package/.next/server/chunks/610.js +1 -0
  296. package/.next/server/chunks/6119.js +1 -1
  297. package/.next/server/chunks/6130.js +1 -1
  298. package/.next/server/chunks/6401.js +1 -1
  299. package/.next/server/chunks/6486.js +1 -1
  300. package/.next/server/chunks/6781.js +1 -1
  301. package/.next/server/chunks/6808.js +4 -0
  302. package/.next/server/chunks/7023.js +14 -0
  303. package/.next/server/chunks/7604.js +1 -1
  304. package/.next/server/chunks/7905.js +1 -1
  305. package/.next/server/chunks/8581.js +15 -15
  306. package/.next/server/chunks/8728.js +2 -2
  307. package/.next/server/chunks/8782.js +1 -1
  308. package/.next/server/chunks/8807.js +63 -53
  309. package/.next/server/chunks/8918.js +103 -1
  310. package/.next/server/chunks/9198.js +144 -0
  311. package/.next/server/chunks/9390.js +1 -1
  312. package/.next/server/chunks/9584.js +1 -1
  313. package/.next/server/chunks/9627.js +1 -1
  314. package/.next/server/chunks/9731.js +3 -3
  315. package/.next/server/middleware-manifest.json +5 -5
  316. package/.next/server/pages/500.html +1 -1
  317. package/.next/server/server-reference-manifest.json +1 -1
  318. package/.next/static/chunks/{2407-ab92ae9837c39dce.js → 2407-675ba6b21844dc3b.js} +1 -1
  319. package/.next/static/chunks/3931-1a1abab16248f14d.js +1 -0
  320. package/.next/static/chunks/8606-ce17ffa77f39608e.js +1 -0
  321. package/.next/static/chunks/app/api/agents/update/route-a4f129c451de7859.js +1 -0
  322. package/.next/static/chunks/app/api/agents/versions/route-a4f129c451de7859.js +1 -0
  323. package/.next/static/chunks/app/api/app/release-notes/route-a4f129c451de7859.js +1 -0
  324. package/.next/static/chunks/app/api/app/update/route-a4f129c451de7859.js +1 -0
  325. package/.next/static/chunks/app/api/app/update-check/route-a4f129c451de7859.js +1 -0
  326. package/.next/static/chunks/app/api/auth/login/route-a4f129c451de7859.js +1 -0
  327. package/.next/static/chunks/app/api/auth/logout/route-a4f129c451de7859.js +1 -0
  328. package/.next/static/chunks/app/api/auth/status/route-a4f129c451de7859.js +1 -0
  329. package/.next/static/chunks/app/api/capabilities/route-a4f129c451de7859.js +1 -0
  330. package/.next/static/chunks/app/api/daily-summary/route-a4f129c451de7859.js +1 -0
  331. package/.next/static/chunks/app/api/daily-summary/status/route-a4f129c451de7859.js +1 -0
  332. package/.next/static/chunks/app/api/external-apps/[id]/health/route-a4f129c451de7859.js +1 -0
  333. package/.next/static/chunks/app/api/external-apps/[id]/route-a4f129c451de7859.js +1 -0
  334. package/.next/static/chunks/app/api/external-apps/route-a4f129c451de7859.js +1 -0
  335. package/.next/static/chunks/app/api/fs/browse/route-a4f129c451de7859.js +1 -0
  336. package/.next/static/chunks/app/api/fs/recent-paths/route-a4f129c451de7859.js +1 -0
  337. package/.next/static/chunks/app/api/hooks/agent-event/route-a4f129c451de7859.js +1 -0
  338. package/.next/static/chunks/app/api/hooks/claude-done/route-a4f129c451de7859.js +1 -0
  339. package/.next/static/chunks/app/api/hooks/permission-request/route-a4f129c451de7859.js +1 -0
  340. package/.next/static/chunks/app/api/metrics/vibe/route-a4f129c451de7859.js +1 -0
  341. package/.next/static/chunks/app/api/ollama/models/route-a4f129c451de7859.js +1 -0
  342. package/.next/static/chunks/app/api/push/escalation/route-a4f129c451de7859.js +1 -0
  343. package/.next/static/chunks/app/api/push/subscriptions/route-a4f129c451de7859.js +1 -0
  344. package/.next/static/chunks/app/api/push/vapid/route-a4f129c451de7859.js +1 -0
  345. package/.next/static/chunks/app/api/relays/[relayId]/cancel/route-a4f129c451de7859.js +1 -0
  346. package/.next/static/chunks/app/api/relays/[relayId]/route-a4f129c451de7859.js +1 -0
  347. package/.next/static/chunks/app/api/relays/route-a4f129c451de7859.js +1 -0
  348. package/.next/static/chunks/app/api/remote/pair/route-a4f129c451de7859.js +1 -0
  349. package/.next/static/chunks/app/api/repositories/[id]/route-a4f129c451de7859.js +1 -0
  350. package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-a4f129c451de7859.js +1 -0
  351. package/.next/static/chunks/app/api/repositories/clone/route-a4f129c451de7859.js +1 -0
  352. package/.next/static/chunks/app/api/repositories/excluded/route-a4f129c451de7859.js +1 -0
  353. package/.next/static/chunks/app/api/repositories/restore/route-a4f129c451de7859.js +1 -0
  354. package/.next/static/chunks/app/api/repositories/route-a4f129c451de7859.js +1 -0
  355. package/.next/static/chunks/app/api/repositories/scan/route-a4f129c451de7859.js +1 -0
  356. package/.next/static/chunks/app/api/repositories/sync/route-a4f129c451de7859.js +1 -0
  357. package/.next/static/chunks/app/api/repositories/validate-path/route-a4f129c451de7859.js +1 -0
  358. package/.next/static/chunks/app/api/settings/default-agents/route-a4f129c451de7859.js +1 -0
  359. package/.next/static/chunks/app/api/settings/default-surface-mode/route-a4f129c451de7859.js +1 -0
  360. package/.next/static/chunks/app/api/sidebar/group-order/route-a4f129c451de7859.js +1 -0
  361. package/.next/static/chunks/app/api/skills/[id]/route-a4f129c451de7859.js +1 -0
  362. package/.next/static/chunks/app/api/skills/installations/route-a4f129c451de7859.js +1 -0
  363. package/.next/static/chunks/app/api/skills/operations/route-a4f129c451de7859.js +1 -0
  364. package/.next/static/chunks/app/api/skills/reindex/route-a4f129c451de7859.js +1 -0
  365. package/.next/static/chunks/app/api/skills/route-a4f129c451de7859.js +1 -0
  366. package/.next/static/chunks/app/api/slash-commands/route-a4f129c451de7859.js +1 -0
  367. package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-a4f129c451de7859.js +1 -0
  368. package/.next/static/chunks/app/api/tasks/[taskId]/route-a4f129c451de7859.js +1 -0
  369. package/.next/static/chunks/app/api/templates/[id]/route-a4f129c451de7859.js +1 -0
  370. package/.next/static/chunks/app/api/templates/route-a4f129c451de7859.js +1 -0
  371. package/.next/static/chunks/app/api/verification/runs/[runId]/route-a4f129c451de7859.js +1 -0
  372. package/.next/static/chunks/app/api/verification/runs/route-a4f129c451de7859.js +1 -0
  373. package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-a4f129c451de7859.js +1 -0
  374. package/.next/static/chunks/app/api/worktrees/[id]/capture/route-a4f129c451de7859.js +1 -0
  375. package/.next/static/chunks/app/api/worktrees/[id]/clear-composer/route-a4f129c451de7859.js +1 -0
  376. package/.next/static/chunks/app/api/worktrees/[id]/cli-reference/route-a4f129c451de7859.js +1 -0
  377. package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-a4f129c451de7859.js +1 -0
  378. package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-a4f129c451de7859.js +1 -0
  379. package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-a4f129c451de7859.js +1 -0
  380. package/.next/static/chunks/app/api/worktrees/[id]/direct-input/route-a4f129c451de7859.js +1 -0
  381. package/.next/static/chunks/app/api/worktrees/[id]/env/route-a4f129c451de7859.js +1 -0
  382. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-a4f129c451de7859.js +1 -0
  383. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-a4f129c451de7859.js +1 -0
  384. package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-a4f129c451de7859.js +1 -0
  385. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-a4f129c451de7859.js +1 -0
  386. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-a4f129c451de7859.js +1 -0
  387. package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-a4f129c451de7859.js +1 -0
  388. package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-a4f129c451de7859.js +1 -0
  389. package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-a4f129c451de7859.js +1 -0
  390. package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-a4f129c451de7859.js +1 -0
  391. package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-a4f129c451de7859.js +1 -0
  392. package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-a4f129c451de7859.js +1 -0
  393. package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-a4f129c451de7859.js +1 -0
  394. package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-a4f129c451de7859.js +1 -0
  395. package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-a4f129c451de7859.js +1 -0
  396. package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-a4f129c451de7859.js +1 -0
  397. package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-a4f129c451de7859.js +1 -0
  398. package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-a4f129c451de7859.js +1 -0
  399. package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-a4f129c451de7859.js +1 -0
  400. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-a4f129c451de7859.js +1 -0
  401. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-a4f129c451de7859.js +1 -0
  402. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-a4f129c451de7859.js +1 -0
  403. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-a4f129c451de7859.js +1 -0
  404. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-a4f129c451de7859.js +1 -0
  405. package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-a4f129c451de7859.js +1 -0
  406. package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-a4f129c451de7859.js +1 -0
  407. package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-a4f129c451de7859.js +1 -0
  408. package/.next/static/chunks/app/api/worktrees/[id]/instances/notes/route-a4f129c451de7859.js +1 -0
  409. package/.next/static/chunks/app/api/worktrees/[id]/instances/opencode/route-a4f129c451de7859.js +1 -0
  410. package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-a4f129c451de7859.js +1 -0
  411. package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-a4f129c451de7859.js +1 -0
  412. package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-a4f129c451de7859.js +1 -0
  413. package/.next/static/chunks/app/api/worktrees/[id]/logs/route-a4f129c451de7859.js +1 -0
  414. package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-a4f129c451de7859.js +1 -0
  415. package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-a4f129c451de7859.js +1 -0
  416. package/.next/static/chunks/app/api/worktrees/[id]/memos/route-a4f129c451de7859.js +1 -0
  417. package/.next/static/chunks/app/api/worktrees/[id]/messages/route-a4f129c451de7859.js +1 -0
  418. package/.next/static/chunks/app/api/worktrees/[id]/opencode/diff/route-a4f129c451de7859.js +1 -0
  419. package/.next/static/chunks/app/api/worktrees/[id]/opencode/session/route-a4f129c451de7859.js +1 -0
  420. package/.next/static/chunks/app/api/worktrees/[id]/opencode/share/route-a4f129c451de7859.js +1 -0
  421. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-a4f129c451de7859.js +1 -0
  422. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/strict/route-a4f129c451de7859.js +1 -0
  423. package/.next/static/chunks/app/api/worktrees/[id]/resolve-target/route-a4f129c451de7859.js +1 -0
  424. package/.next/static/chunks/app/api/worktrees/[id]/respond/route-a4f129c451de7859.js +1 -0
  425. package/.next/static/chunks/app/api/worktrees/[id]/route-a4f129c451de7859.js +1 -0
  426. package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-a4f129c451de7859.js +1 -0
  427. package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-a4f129c451de7859.js +1 -0
  428. package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-a4f129c451de7859.js +1 -0
  429. package/.next/static/chunks/app/api/worktrees/[id]/search/route-a4f129c451de7859.js +1 -0
  430. package/.next/static/chunks/app/api/worktrees/[id]/send/route-a4f129c451de7859.js +1 -0
  431. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-a4f129c451de7859.js +1 -0
  432. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-a4f129c451de7859.js +1 -0
  433. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-a4f129c451de7859.js +1 -0
  434. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-a4f129c451de7859.js +1 -0
  435. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-a4f129c451de7859.js +1 -0
  436. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-a4f129c451de7859.js +1 -0
  437. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-a4f129c451de7859.js +1 -0
  438. package/.next/static/chunks/app/api/worktrees/[id]/skills/route-a4f129c451de7859.js +1 -0
  439. package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-a4f129c451de7859.js +1 -0
  440. package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-a4f129c451de7859.js +1 -0
  441. package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-a4f129c451de7859.js +1 -0
  442. package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-a4f129c451de7859.js +1 -0
  443. package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-a4f129c451de7859.js +1 -0
  444. package/.next/static/chunks/app/api/worktrees/[id]/timers/route-a4f129c451de7859.js +1 -0
  445. package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-a4f129c451de7859.js +1 -0
  446. package/.next/static/chunks/app/api/worktrees/[id]/todos/route-a4f129c451de7859.js +1 -0
  447. package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-a4f129c451de7859.js +1 -0
  448. package/.next/static/chunks/app/api/worktrees/[id]/tree/route-a4f129c451de7859.js +1 -0
  449. package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-a4f129c451de7859.js +1 -0
  450. package/.next/static/chunks/app/api/worktrees/[id]/verify/config/route-a4f129c451de7859.js +1 -0
  451. package/.next/static/chunks/app/api/worktrees/[id]/verify/route-a4f129c451de7859.js +1 -0
  452. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route-a4f129c451de7859.js +1 -0
  453. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-a4f129c451de7859.js +1 -0
  454. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-a4f129c451de7859.js +1 -0
  455. package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-a4f129c451de7859.js +1 -0
  456. package/.next/static/chunks/app/api/worktrees/apply-default-agents/route-a4f129c451de7859.js +1 -0
  457. package/.next/static/chunks/app/api/worktrees/route-a4f129c451de7859.js +1 -0
  458. package/.next/static/chunks/app/layout-8bfac4724277b47f.js +1 -0
  459. package/.next/static/chunks/app/manifest.webmanifest/route-a4f129c451de7859.js +1 -0
  460. package/.next/static/chunks/app/proxy/[...path]/route-a4f129c451de7859.js +1 -0
  461. package/.next/static/chunks/app/sessions/page-890fd50ec9739973.js +1 -0
  462. package/.next/static/chunks/app/worktrees/[id]/layout-a4f129c451de7859.js +1 -0
  463. package/.next/static/chunks/app/worktrees/[id]/page-f6d3ab8185d93aae.js +1 -0
  464. package/.next/static/css/c1e307d05daf93b6.css +1 -0
  465. package/.next/trace +13 -13
  466. package/.next/types/app/api/relays/[relayId]/route.ts +347 -0
  467. package/.next/types/routes.d.ts +2 -1
  468. package/.next/types/validator.ts +9 -0
  469. package/dist/cli/commands/ask.d.ts.map +1 -1
  470. package/dist/cli/commands/ask.js +178 -13
  471. package/dist/cli/commands/message-dispatch.d.ts +25 -5
  472. package/dist/cli/commands/message-dispatch.d.ts.map +1 -1
  473. package/dist/cli/commands/message-dispatch.js +92 -6
  474. package/dist/cli/commands/relays.d.ts +25 -2
  475. package/dist/cli/commands/relays.d.ts.map +1 -1
  476. package/dist/cli/commands/relays.js +69 -5
  477. package/dist/cli/commands/respond.d.ts +12 -0
  478. package/dist/cli/commands/respond.d.ts.map +1 -1
  479. package/dist/cli/commands/respond.js +63 -1
  480. package/dist/cli/commands/send.d.ts.map +1 -1
  481. package/dist/cli/commands/send.js +6 -4
  482. package/dist/cli/commands/wait-hook-stop-settle.d.ts +66 -0
  483. package/dist/cli/commands/wait-hook-stop-settle.d.ts.map +1 -0
  484. package/dist/cli/commands/wait-hook-stop-settle.js +150 -0
  485. package/dist/cli/commands/wait-instance.d.ts +21 -0
  486. package/dist/cli/commands/wait-instance.d.ts.map +1 -0
  487. package/dist/cli/commands/wait-instance.js +41 -0
  488. package/dist/cli/commands/wait-notices.d.ts +87 -0
  489. package/dist/cli/commands/wait-notices.d.ts.map +1 -0
  490. package/dist/cli/commands/wait-notices.js +301 -0
  491. package/dist/cli/commands/wait-poll-bookkeeping.d.ts +15 -0
  492. package/dist/cli/commands/wait-poll-bookkeeping.d.ts.map +1 -0
  493. package/dist/cli/commands/wait-poll-bookkeeping.js +57 -0
  494. package/dist/cli/commands/wait-poll-state.d.ts +118 -0
  495. package/dist/cli/commands/wait-poll-state.d.ts.map +1 -0
  496. package/dist/cli/commands/wait-poll-state.js +6 -0
  497. package/dist/cli/commands/wait-timing.d.ts +46 -0
  498. package/dist/cli/commands/wait-timing.d.ts.map +1 -0
  499. package/dist/cli/commands/wait-timing.js +99 -0
  500. package/dist/cli/commands/wait-turn-boundary.d.ts +284 -0
  501. package/dist/cli/commands/wait-turn-boundary.d.ts.map +1 -0
  502. package/dist/cli/commands/wait-turn-boundary.js +427 -0
  503. package/dist/cli/commands/wait-verify.d.ts +50 -0
  504. package/dist/cli/commands/wait-verify.d.ts.map +1 -0
  505. package/dist/cli/commands/wait-verify.js +124 -0
  506. package/dist/cli/commands/wait.d.ts +6 -105
  507. package/dist/cli/commands/wait.d.ts.map +1 -1
  508. package/dist/cli/commands/wait.js +207 -959
  509. package/dist/cli/docs/agent-operations.d.ts +2 -2
  510. package/dist/cli/docs/agent-operations.d.ts.map +1 -1
  511. package/dist/cli/docs/agent-operations.js +23 -1
  512. package/dist/cli/types/api-responses.d.ts +47 -3
  513. package/dist/cli/types/api-responses.d.ts.map +1 -1
  514. package/dist/cli/utils/api-client.d.ts +15 -1
  515. package/dist/cli/utils/api-client.d.ts.map +1 -1
  516. package/dist/cli/utils/api-client.js +7 -1
  517. package/dist/cli/utils/reply-ledger.d.ts +79 -0
  518. package/dist/cli/utils/reply-ledger.d.ts.map +1 -1
  519. package/dist/cli/utils/reply-ledger.js +141 -1
  520. package/dist/lib/session/send-attempt-types.d.ts +23 -1
  521. package/dist/lib/session/send-attempt-types.d.ts.map +1 -1
  522. package/dist/lib/session/send-attempt-types.js +9 -1
  523. package/dist/server/locales/en/worktree.json +18 -3
  524. package/dist/server/locales/ja/worktree.json +18 -3
  525. package/dist/server/src/lib/auto-yes-poller.js +49 -10
  526. package/dist/server/src/lib/cli-tools/antigravity.js +40 -7
  527. package/dist/server/src/lib/cli-tools/codex.js +60 -11
  528. package/dist/server/src/lib/cli-tools/command-code-plan-review.js +24 -2
  529. package/dist/server/src/lib/cli-tools/copilot.js +120 -30
  530. package/dist/server/src/lib/cli-tools/gemini.js +28 -9
  531. package/dist/server/src/lib/cli-tools/opencode.js +55 -13
  532. package/dist/server/src/lib/cli-tools/submit-composer-read.js +580 -0
  533. package/dist/server/src/lib/cli-tools/submit-verified-sender.js +356 -621
  534. package/dist/server/src/lib/db/migrations/index.js +2 -0
  535. package/dist/server/src/lib/db/migrations/pre-migration-backup.js +266 -0
  536. package/dist/server/src/lib/db/migrations/runner.js +37 -4
  537. package/dist/server/src/lib/db/migrations/v62-session-relays-bind.js +102 -0
  538. package/dist/server/src/lib/db/relay-bind-db.js +437 -0
  539. package/dist/server/src/lib/db/relay-db.js +59 -96
  540. package/dist/server/src/lib/detection/upstream-faults.js +40 -6
  541. package/dist/server/src/lib/hooks/sources/opencode/client.js +12 -6
  542. package/dist/server/src/lib/polling/response-checker.js +7 -5
  543. package/dist/server/src/lib/prompt-answer-errors.js +288 -0
  544. package/dist/server/src/lib/prompt-answer-sender.js +264 -288
  545. package/dist/server/src/lib/push/failure-episode-state.js +4 -1
  546. package/dist/server/src/lib/realtime/terminal-broadcast.js +1 -4
  547. package/dist/server/src/lib/realtime-snippet.js +54 -0
  548. package/dist/server/src/lib/relay/relay-bind.js +294 -0
  549. package/dist/server/src/lib/relay/relay-boot.js +51 -0
  550. package/dist/server/src/lib/relay/relay-bound-reply.js +519 -0
  551. package/dist/server/src/lib/relay/relay-delivery.js +134 -220
  552. package/dist/server/src/lib/relay/relay-messages.js +39 -4
  553. package/dist/server/src/lib/relay/relay-overlap.js +92 -0
  554. package/dist/server/src/lib/relay/relay-system-line.js +3 -2
  555. package/dist/server/src/lib/relay/types.js +12 -1
  556. package/dist/server/src/lib/session/agent-session-lifecycle.js +18 -0
  557. package/dist/server/src/lib/session/claude-session.js +41 -6
  558. package/dist/server/src/lib/session/composer-clear.js +54 -1
  559. package/dist/server/src/lib/session/current-output-builder.js +21 -5
  560. package/dist/server/src/lib/session/instance-input-lock.js +664 -0
  561. package/dist/server/src/lib/session/send-attempt-state.js +17 -0
  562. package/dist/server/src/lib/session/send-attempt-types.js +9 -1
  563. package/dist/server/src/lib/session/send-user-message.js +82 -13
  564. package/package.json +1 -1
  565. package/release-notes/0.49.1.json +66 -0
  566. package/.next/server/chunks/1210.js +0 -1
  567. package/.next/server/chunks/1945.js +0 -14
  568. package/.next/server/chunks/1990.js +0 -103
  569. package/.next/server/chunks/4194.js +0 -67
  570. package/.next/server/chunks/4280.js +0 -1
  571. package/.next/server/chunks/5845.js +0 -1
  572. package/.next/server/chunks/720.js +0 -103
  573. package/.next/server/chunks/936.js +0 -1
  574. package/.next/server/chunks/9540.js +0 -1
  575. package/.next/static/chunks/8606-cf6bdbff44a764cf.js +0 -1
  576. package/.next/static/chunks/9079-987939d231704218.js +0 -1
  577. package/.next/static/chunks/app/api/agents/update/route-c81284a9d8b35304.js +0 -1
  578. package/.next/static/chunks/app/api/agents/versions/route-c81284a9d8b35304.js +0 -1
  579. package/.next/static/chunks/app/api/app/release-notes/route-c81284a9d8b35304.js +0 -1
  580. package/.next/static/chunks/app/api/app/update/route-c81284a9d8b35304.js +0 -1
  581. package/.next/static/chunks/app/api/app/update-check/route-c81284a9d8b35304.js +0 -1
  582. package/.next/static/chunks/app/api/auth/login/route-c81284a9d8b35304.js +0 -1
  583. package/.next/static/chunks/app/api/auth/logout/route-c81284a9d8b35304.js +0 -1
  584. package/.next/static/chunks/app/api/auth/status/route-c81284a9d8b35304.js +0 -1
  585. package/.next/static/chunks/app/api/capabilities/route-c81284a9d8b35304.js +0 -1
  586. package/.next/static/chunks/app/api/daily-summary/route-c81284a9d8b35304.js +0 -1
  587. package/.next/static/chunks/app/api/daily-summary/status/route-c81284a9d8b35304.js +0 -1
  588. package/.next/static/chunks/app/api/external-apps/[id]/health/route-c81284a9d8b35304.js +0 -1
  589. package/.next/static/chunks/app/api/external-apps/[id]/route-c81284a9d8b35304.js +0 -1
  590. package/.next/static/chunks/app/api/external-apps/route-c81284a9d8b35304.js +0 -1
  591. package/.next/static/chunks/app/api/fs/browse/route-c81284a9d8b35304.js +0 -1
  592. package/.next/static/chunks/app/api/fs/recent-paths/route-c81284a9d8b35304.js +0 -1
  593. package/.next/static/chunks/app/api/hooks/agent-event/route-c81284a9d8b35304.js +0 -1
  594. package/.next/static/chunks/app/api/hooks/claude-done/route-c81284a9d8b35304.js +0 -1
  595. package/.next/static/chunks/app/api/hooks/permission-request/route-c81284a9d8b35304.js +0 -1
  596. package/.next/static/chunks/app/api/metrics/vibe/route-c81284a9d8b35304.js +0 -1
  597. package/.next/static/chunks/app/api/ollama/models/route-c81284a9d8b35304.js +0 -1
  598. package/.next/static/chunks/app/api/push/escalation/route-c81284a9d8b35304.js +0 -1
  599. package/.next/static/chunks/app/api/push/subscriptions/route-c81284a9d8b35304.js +0 -1
  600. package/.next/static/chunks/app/api/push/vapid/route-c81284a9d8b35304.js +0 -1
  601. package/.next/static/chunks/app/api/relays/[relayId]/cancel/route-c81284a9d8b35304.js +0 -1
  602. package/.next/static/chunks/app/api/relays/route-c81284a9d8b35304.js +0 -1
  603. package/.next/static/chunks/app/api/remote/pair/route-c81284a9d8b35304.js +0 -1
  604. package/.next/static/chunks/app/api/repositories/[id]/route-c81284a9d8b35304.js +0 -1
  605. package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-c81284a9d8b35304.js +0 -1
  606. package/.next/static/chunks/app/api/repositories/clone/route-c81284a9d8b35304.js +0 -1
  607. package/.next/static/chunks/app/api/repositories/excluded/route-c81284a9d8b35304.js +0 -1
  608. package/.next/static/chunks/app/api/repositories/restore/route-c81284a9d8b35304.js +0 -1
  609. package/.next/static/chunks/app/api/repositories/route-c81284a9d8b35304.js +0 -1
  610. package/.next/static/chunks/app/api/repositories/scan/route-c81284a9d8b35304.js +0 -1
  611. package/.next/static/chunks/app/api/repositories/sync/route-c81284a9d8b35304.js +0 -1
  612. package/.next/static/chunks/app/api/repositories/validate-path/route-c81284a9d8b35304.js +0 -1
  613. package/.next/static/chunks/app/api/settings/default-agents/route-c81284a9d8b35304.js +0 -1
  614. package/.next/static/chunks/app/api/settings/default-surface-mode/route-c81284a9d8b35304.js +0 -1
  615. package/.next/static/chunks/app/api/sidebar/group-order/route-c81284a9d8b35304.js +0 -1
  616. package/.next/static/chunks/app/api/skills/[id]/route-c81284a9d8b35304.js +0 -1
  617. package/.next/static/chunks/app/api/skills/installations/route-c81284a9d8b35304.js +0 -1
  618. package/.next/static/chunks/app/api/skills/operations/route-c81284a9d8b35304.js +0 -1
  619. package/.next/static/chunks/app/api/skills/reindex/route-c81284a9d8b35304.js +0 -1
  620. package/.next/static/chunks/app/api/skills/route-c81284a9d8b35304.js +0 -1
  621. package/.next/static/chunks/app/api/slash-commands/route-c81284a9d8b35304.js +0 -1
  622. package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-c81284a9d8b35304.js +0 -1
  623. package/.next/static/chunks/app/api/tasks/[taskId]/route-c81284a9d8b35304.js +0 -1
  624. package/.next/static/chunks/app/api/templates/[id]/route-c81284a9d8b35304.js +0 -1
  625. package/.next/static/chunks/app/api/templates/route-c81284a9d8b35304.js +0 -1
  626. package/.next/static/chunks/app/api/verification/runs/[runId]/route-c81284a9d8b35304.js +0 -1
  627. package/.next/static/chunks/app/api/verification/runs/route-c81284a9d8b35304.js +0 -1
  628. package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-c81284a9d8b35304.js +0 -1
  629. package/.next/static/chunks/app/api/worktrees/[id]/capture/route-c81284a9d8b35304.js +0 -1
  630. package/.next/static/chunks/app/api/worktrees/[id]/clear-composer/route-c81284a9d8b35304.js +0 -1
  631. package/.next/static/chunks/app/api/worktrees/[id]/cli-reference/route-c81284a9d8b35304.js +0 -1
  632. package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-c81284a9d8b35304.js +0 -1
  633. package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-c81284a9d8b35304.js +0 -1
  634. package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-c81284a9d8b35304.js +0 -1
  635. package/.next/static/chunks/app/api/worktrees/[id]/direct-input/route-c81284a9d8b35304.js +0 -1
  636. package/.next/static/chunks/app/api/worktrees/[id]/env/route-c81284a9d8b35304.js +0 -1
  637. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-c81284a9d8b35304.js +0 -1
  638. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-c81284a9d8b35304.js +0 -1
  639. package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-c81284a9d8b35304.js +0 -1
  640. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-c81284a9d8b35304.js +0 -1
  641. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-c81284a9d8b35304.js +0 -1
  642. package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-c81284a9d8b35304.js +0 -1
  643. package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-c81284a9d8b35304.js +0 -1
  644. package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-c81284a9d8b35304.js +0 -1
  645. package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-c81284a9d8b35304.js +0 -1
  646. package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-c81284a9d8b35304.js +0 -1
  647. package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-c81284a9d8b35304.js +0 -1
  648. package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-c81284a9d8b35304.js +0 -1
  649. package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-c81284a9d8b35304.js +0 -1
  650. package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-c81284a9d8b35304.js +0 -1
  651. package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-c81284a9d8b35304.js +0 -1
  652. package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-c81284a9d8b35304.js +0 -1
  653. package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-c81284a9d8b35304.js +0 -1
  654. package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-c81284a9d8b35304.js +0 -1
  655. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-c81284a9d8b35304.js +0 -1
  656. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-c81284a9d8b35304.js +0 -1
  657. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-c81284a9d8b35304.js +0 -1
  658. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-c81284a9d8b35304.js +0 -1
  659. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-c81284a9d8b35304.js +0 -1
  660. package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-c81284a9d8b35304.js +0 -1
  661. package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-c81284a9d8b35304.js +0 -1
  662. package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-c81284a9d8b35304.js +0 -1
  663. package/.next/static/chunks/app/api/worktrees/[id]/instances/notes/route-c81284a9d8b35304.js +0 -1
  664. package/.next/static/chunks/app/api/worktrees/[id]/instances/opencode/route-c81284a9d8b35304.js +0 -1
  665. package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-c81284a9d8b35304.js +0 -1
  666. package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-c81284a9d8b35304.js +0 -1
  667. package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-c81284a9d8b35304.js +0 -1
  668. package/.next/static/chunks/app/api/worktrees/[id]/logs/route-c81284a9d8b35304.js +0 -1
  669. package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-c81284a9d8b35304.js +0 -1
  670. package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-c81284a9d8b35304.js +0 -1
  671. package/.next/static/chunks/app/api/worktrees/[id]/memos/route-c81284a9d8b35304.js +0 -1
  672. package/.next/static/chunks/app/api/worktrees/[id]/messages/route-c81284a9d8b35304.js +0 -1
  673. package/.next/static/chunks/app/api/worktrees/[id]/opencode/diff/route-c81284a9d8b35304.js +0 -1
  674. package/.next/static/chunks/app/api/worktrees/[id]/opencode/session/route-c81284a9d8b35304.js +0 -1
  675. package/.next/static/chunks/app/api/worktrees/[id]/opencode/share/route-c81284a9d8b35304.js +0 -1
  676. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-c81284a9d8b35304.js +0 -1
  677. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/strict/route-c81284a9d8b35304.js +0 -1
  678. package/.next/static/chunks/app/api/worktrees/[id]/resolve-target/route-c81284a9d8b35304.js +0 -1
  679. package/.next/static/chunks/app/api/worktrees/[id]/respond/route-c81284a9d8b35304.js +0 -1
  680. package/.next/static/chunks/app/api/worktrees/[id]/route-c81284a9d8b35304.js +0 -1
  681. package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-c81284a9d8b35304.js +0 -1
  682. package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-c81284a9d8b35304.js +0 -1
  683. package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-c81284a9d8b35304.js +0 -1
  684. package/.next/static/chunks/app/api/worktrees/[id]/search/route-c81284a9d8b35304.js +0 -1
  685. package/.next/static/chunks/app/api/worktrees/[id]/send/route-c81284a9d8b35304.js +0 -1
  686. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-c81284a9d8b35304.js +0 -1
  687. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-c81284a9d8b35304.js +0 -1
  688. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-c81284a9d8b35304.js +0 -1
  689. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-c81284a9d8b35304.js +0 -1
  690. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-c81284a9d8b35304.js +0 -1
  691. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-c81284a9d8b35304.js +0 -1
  692. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-c81284a9d8b35304.js +0 -1
  693. package/.next/static/chunks/app/api/worktrees/[id]/skills/route-c81284a9d8b35304.js +0 -1
  694. package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-c81284a9d8b35304.js +0 -1
  695. package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-c81284a9d8b35304.js +0 -1
  696. package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-c81284a9d8b35304.js +0 -1
  697. package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-c81284a9d8b35304.js +0 -1
  698. package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-c81284a9d8b35304.js +0 -1
  699. package/.next/static/chunks/app/api/worktrees/[id]/timers/route-c81284a9d8b35304.js +0 -1
  700. package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-c81284a9d8b35304.js +0 -1
  701. package/.next/static/chunks/app/api/worktrees/[id]/todos/route-c81284a9d8b35304.js +0 -1
  702. package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-c81284a9d8b35304.js +0 -1
  703. package/.next/static/chunks/app/api/worktrees/[id]/tree/route-c81284a9d8b35304.js +0 -1
  704. package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-c81284a9d8b35304.js +0 -1
  705. package/.next/static/chunks/app/api/worktrees/[id]/verify/config/route-c81284a9d8b35304.js +0 -1
  706. package/.next/static/chunks/app/api/worktrees/[id]/verify/route-c81284a9d8b35304.js +0 -1
  707. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route-c81284a9d8b35304.js +0 -1
  708. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-c81284a9d8b35304.js +0 -1
  709. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-c81284a9d8b35304.js +0 -1
  710. package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-c81284a9d8b35304.js +0 -1
  711. package/.next/static/chunks/app/api/worktrees/apply-default-agents/route-c81284a9d8b35304.js +0 -1
  712. package/.next/static/chunks/app/api/worktrees/route-c81284a9d8b35304.js +0 -1
  713. package/.next/static/chunks/app/layout-aa8e66164a4367af.js +0 -1
  714. package/.next/static/chunks/app/manifest.webmanifest/route-c81284a9d8b35304.js +0 -1
  715. package/.next/static/chunks/app/proxy/[...path]/route-c81284a9d8b35304.js +0 -1
  716. package/.next/static/chunks/app/sessions/page-cfd645305e25fd33.js +0 -1
  717. package/.next/static/chunks/app/worktrees/[id]/layout-c81284a9d8b35304.js +0 -1
  718. package/.next/static/chunks/app/worktrees/[id]/page-a8d7886703ffc7b4.js +0 -1
  719. package/.next/static/css/db8959555c3d9c96.css +0 -1
  720. /package/.next/static/{3_JtAZaKMJEDFIIfkHv4n → fqfSDqQMweROeHUzOt_m1}/_buildManifest.js +0 -0
  721. /package/.next/static/{3_JtAZaKMJEDFIIfkHv4n → fqfSDqQMweROeHUzOt_m1}/_ssgManifest.js +0 -0
@@ -1,103 +0,0 @@
1
- "use strict";exports.id=1990,exports.ids=[1990],exports.modules={31990:(a,b,c)=>{c.d(b,{Wh:()=>V,WD:()=>W,Lw:()=>$,Qj:()=>U,K1:()=>T,N5:()=>Z,UM:()=>Y,eB:()=>X});var d=c(8360),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="[0-9a-f]".repeat(8),x=`#!/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-*|${n.HL}${w}-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
- `,y=`#!/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 z(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 A=c(83598),B=c(36925);let C=(0,m.promisify)(l.execFile),D=(0,e.h)("tmux-session-hooks"),E=(0,B.v)("__cmEnsuredSessionHooks",()=>new Set);async function F(a){if((0,n.N_)(a)&&!E.has(a)){E.add(a);try{if((0,n.gM)()&&(0,n.n9)(a)){z(s,v);let b=(0,n.Rr)(a,z(t,x));b&&await C("tmux",b,{timeout:5e3})}else await C("tmux",(0,n.g4)(a),{timeout:5e3});if((0,n.jx)()){let b=(0,n.Ls)(a,z(u,y));b&&await C("tmux",b,{timeout:5e3})}else await C("tmux",(0,n.sL)(a),{timeout:5e3})}catch(b){D.debug("session-hooks:reconcile-failed",{sessionName:a,error:b instanceof Error?b.message:String(b)})}}}async function G(a){try{if(!await (0,A.Us)(a)||await (0,A.Fh)(a))return!1;for(let b of(0,n.RS)(a))await C("tmux",b,{timeout:5e3});return D.info("session-hooks:geometry-restored",{sessionName:a}),!0}catch(b){return D.debug("session-hooks:geometry-restore-failed",{sessionName:a,error:b instanceof Error?b.message:String(b)}),!1}}let H=(0,m.promisify)(l.execFile),I=(0,e.h)("tmux-session-status"),J=(0,B.v)("__cmPublishedTmuxStatus",()=>new Map),K=(0,B.v)("__cmClearedTmuxStatus",()=>new Set);async function L(a){let{sessionName:b,worktreeId:c,cliToolId:d,instanceId:e,status:f}=a;if(!(0,n.om)())return K.has(b)||(K.add(b),await N(b)),"disabled";let g=J.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 H("tmux",(0,n.ND)(b,a,c),{timeout:5e3});return J.set(b,{status:f,worktreeId:c,cliToolId:d,instanceId:e}),await M(b),"written"}catch(a){return J.delete(b),I.debug("session-status:write-failed",{sessionName:b,error:a instanceof Error?a.message:String(a)}),"error"}}async function M(a){try{let{stdout:b}=await H("tmux",(0,n.Ys)(a,"status-right"),{timeout:5e3}),c=b.trim();if(""!==c&&!c.includes(n.lY))return I.debug("session-status:status-right-user-owned",{sessionName:a,existing:c}),!1;return""===c&&await H("tmux",(0,n.KB)(a,n.lY),{timeout:5e3}),!0}catch(b){return I.debug("session-status:status-right-failed",{sessionName:a,error:b instanceof Error?b.message:String(b)}),!1}}async function N(a){for(let b of(J.delete(a),n.bq))try{await H("tmux",(0,n.cD)(a,b),{timeout:5e3})}catch{}try{let{stdout:b}=await H("tmux",(0,n.Ys)(a,"status-right"),{timeout:5e3});b.includes(n.lY)&&await H("tmux",(0,n.$D)(a),{timeout:5e3})}catch{}}let O=(0,e.h)("cli-session");function P(a){globalThis.__captureFrameMetaSink?.getStore()?.(a)}function Q(a){globalThis.__captureHeadCutSink?.getStore()?.(a)}function R(){return j||(j=new i),j}function S(a,b,c){let e=d.CLIToolManager.getInstance().getTool(b),f=e.getSessionName(a,c);return{cliTool:e,sessionName:f}}async function T(a,b,c){let{sessionName:d}=S(a,b,c);return R().sessionExists(d)}async function U(a,b,c){let{sessionName:d}=S(a,b,c);return(0,f.p$)(d)}async function V(a,b,c=1e3,d){let e=O.withContext({worktreeId:a,cliToolId:b});e.debug("captureSessionOutput:start",{requestedLines:c});let{cliTool:f,sessionName:g}=S(a,b,d),h=R();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})},P,Q);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 W(a,b,c=5e3,d){let e=O.withContext({worktreeId:a,cliToolId:b});e.debug("captureSessionOutputFresh:start",{requestedLines:c});let{cliTool:f,sessionName:g}=S(a,b,d),h=R(),i=(0,k.XD)(g),j=Date.now();try{let a=await h.captureSnapshot(g,{startLine:-c});a.length>0?(0,k.Ws)(g,i)&&(0,k.vF)(g,a,c,j):(0,k.gm)(g),P({fetchStartedAt:j,source:"fetched"});let b=globalThis.__captureHeadCutSink?.getStore();return b&&b((0,k.AW)(a,c)),(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 X(a,b,c,d){if("Up"!==c&&"Down"!==c&&"Enter"!==c)throw Error(`Unsupported answer key: ${String(c)}`);let{sessionName:e}=S(a,b,d);try{await (0,f.KB)(e,[c])}finally{(0,k.gm)(e)}}async function Y(a,b,c){let{sessionName:d}=S(a,b,c);return(0,f.Hg)(d)}async function Z(a){await F(a.sessionName),(0,n.n9)(a.sessionName)&&await G(a.sessionName),await L(a)}function $(a){J.delete(a),K.delete(a),E.delete(a),(0,A.G9)(a)}}};
@@ -1,67 +0,0 @@
1
- "use strict";exports.id=4194,exports.ids=[4194],exports.modules={640:(a,b,c)=>{function d(a){return`[from ${a.alias} / ${a.worktreeId}]`}function e(a,b){let c=b.trim();return""===c?`${d(a)} (no reply body)`:`${d(a)} ${c}`}function f(a,b){let c=a.replace(/\s+/g," ").trim();return c.length<=b?c:`${c.slice(0,b-1)}…`}c.d(b,{Hr:()=>h,KA:()=>j,Nl:()=>l,z0:()=>e});let g={en:{waiting:"is waiting for a confirmation:",options:"Options:",more:"(+{n} more)"},ja:{waiting:"確認待ちです:",options:"選択肢:",more:"(他 {n} 件)"}};function h(a,b,c){let e=g[a],h=`${d(b)} ${e.waiting} ${f(c.question,200)}`;if(0===c.options.length)return h;let i=c.options.slice(0,9),j=c.options.length-i.length,k=i.map(a=>`${a.key}) ${f(a.label,60)}`).join(" "),l=j>0?` ${e.more.replace("{n}",String(j))}`:"";return`${h}
2
- ${e.options} ${k}${l}`}let i={en:"The reply you were waiting for did not arrive within {hours}h; the relay has expired.",ja:"待っていた返信が {hours} 時間以内に届かなかったため、委任は期限切れになりました。"};function j(a,b,c){let e=Math.max(1,Math.round(c/36e5));return`${d(b)} ${i[a].replace("{hours}",String(e))}`}let k={en:{requested:"Delegated to {alias}; waiting for the reply.",replied:"Reply from {alias}.",waiting:"{alias} is waiting for a confirmation.",expired:"The delegation to {alias} expired without a reply."},ja:{requested:"{alias} へ委任、返信待ち",replied:"{alias} から返信",waiting:"{alias} が確認待ち",expired:"{alias} への委任が返信のないまま期限切れ"}};function l(a,b,c){return k[a][b].replace("{alias}",c)}},25539:(a,b,c)=>{c.d(b,{Ho:()=>f,Lo:()=>e,O7:()=>d});let d=["pending","prompt"];function e(a){return d.includes(a)}function f(){return{pending:0,delivered:0,prompt:0,expired:0,cancelled:0}}},49798:(a,b,c)=>{c.d(b,{S:()=>h,r:()=>i});var d=c(28274),e=c(73753),f=c(83530);let g=(0,c(72626).h)("relay-session-ref");function h(a,b){let c="claude",e=b.instanceId;try{c=(0,f.iK)(a,b.worktreeId,{instanceId:b.instanceId}).cliToolId;let g=(0,d.BN)(a,b.worktreeId,b.instanceId);g?.alias&&(e=g.alias)}catch(a){g.warn("relay-session-resolve-failed",{worktreeId:b.worktreeId,instanceId:b.instanceId,error:a instanceof Error?a.message:String(a)})}return{worktreeId:b.worktreeId,instanceId:b.instanceId,cliToolId:c,alias:e}}function i(a,b){try{return null!==(0,e.getWorktreeById)(a,b)}catch{return!1}}},64049:(a,b,c)=>{c.d(b,{Bf:()=>s,CR:()=>i,Cz:()=>v,GC:()=>u,Ip:()=>j,M4:()=>m,Oz:()=>o,UC:()=>t,_7:()=>y,be:()=>p,ix:()=>l,m_:()=>x,pT:()=>n,s7:()=>w,uG:()=>q,uJ:()=>r});var d=c(55511),e=c(25539);let f=(0,c(72626).h)("relay-db"),g=`
3
- id, from_worktree_id, from_instance_id, to_worktree_id, to_instance_id,
4
- state, hops, sent_request_id, pending_kind, pending_body, prompt_signature,
5
- created_at, updated_at, expires_at, delivered_at
6
- `;function h(a){return{id:a.id,from:{worktreeId:a.from_worktree_id,instanceId:a.from_instance_id},to:{worktreeId:a.to_worktree_id,instanceId:a.to_instance_id},state:a.state,hops:a.hops,sentRequestId:a.sent_request_id,pendingKind:a.pending_kind??null,createdAt:a.created_at,updatedAt:a.updated_at,expiresAt:a.expires_at,deliveredAt:a.delivered_at}}function i(a,b){let c=(0,d.randomUUID)(),e=b.now??Date.now();return a.prepare(`
7
- INSERT INTO session_relays
8
- (id, from_worktree_id, from_instance_id, to_worktree_id, to_instance_id,
9
- state, hops, sent_request_id, pending_kind, pending_body, prompt_signature,
10
- created_at, updated_at, expires_at, delivered_at)
11
- VALUES (?, ?, ?, ?, ?, 'pending', ?, NULL, NULL, NULL, NULL, ?, ?, ?, NULL)
12
- `).run(c,b.from.worktreeId,b.from.instanceId,b.to.worktreeId,b.to.instanceId,b.hops,e,e,b.expiresAt),{id:c,from:{...b.from},to:{...b.to},state:"pending",hops:b.hops,sentRequestId:null,pendingKind:null,createdAt:e,updatedAt:e,expiresAt:b.expiresAt,deliveredAt:null}}function j(a,b){let c=a.prepare(`SELECT ${g} FROM session_relays WHERE id = ?`).get(b);return c?h(c):null}let k=e.O7.map(()=>"?").join(", ");function l(a,b){return a.prepare(`
13
- SELECT ${g} FROM session_relays
14
- WHERE to_worktree_id = ? AND to_instance_id = ?
15
- AND state IN (${k})
16
- ORDER BY created_at ASC
17
- `).all(b.worktreeId,b.instanceId,...e.O7).map(h)}function m(a,b){return{owed:l(a,b),awaiting:a.prepare(`
18
- SELECT ${g} FROM session_relays
19
- WHERE from_worktree_id = ? AND from_instance_id = ?
20
- AND state IN (${k})
21
- ORDER BY created_at ASC
22
- `).all(b.worktreeId,b.instanceId,...e.O7).map(h)}}function n(a,b){return a.prepare(`
23
- SELECT ${g} FROM session_relays
24
- WHERE (from_worktree_id = ? OR to_worktree_id = ?)
25
- AND state IN (${k})
26
- ORDER BY created_at ASC
27
- `).all(b,b,...e.O7).map(h)}function o(a,b,c){return a.prepare(`
28
- SELECT COUNT(*) AS n FROM session_relays
29
- WHERE from_worktree_id = ? AND from_instance_id = ?
30
- AND to_worktree_id = ? AND to_instance_id = ?
31
- AND state IN (${k})
32
- `).get(b.worktreeId,b.instanceId,c.worktreeId,c.instanceId,...e.O7).n}function p(a,b,c,d,f=Date.now()){return 1===a.prepare(`
33
- UPDATE session_relays
34
- SET pending_kind = ?, pending_body = ?, updated_at = ?
35
- WHERE id = ? AND pending_kind IS NULL
36
- AND state IN (${k})
37
- `).run(c,d,f,b,...e.O7).changes}function q(a){return a.prepare(`
38
- SELECT ${g} FROM session_relays
39
- WHERE pending_kind IS NOT NULL
40
- ORDER BY updated_at ASC
41
- `).all().filter(a=>null!==a.pending_body&&null!==a.pending_kind).map(a=>({relay:h(a),kind:a.pending_kind,body:a.pending_body}))}function r(a,b,c=Date.now()){a.prepare(`
42
- UPDATE session_relays
43
- SET pending_kind = NULL, pending_body = NULL, updated_at = ?
44
- WHERE id = ?
45
- `).run(c,b)}function s(a,b,c,d=Date.now()){try{let f=a.prepare(`
46
- UPDATE session_relays
47
- SET state = 'delivered', sent_request_id = ?, delivered_at = ?,
48
- pending_kind = NULL, pending_body = NULL, updated_at = ?
49
- WHERE id = ? AND sent_request_id IS NULL
50
- AND state IN (${k})
51
- `).run(c,d,d,b,...e.O7);return 1===f.changes}catch(a){return f.warn("relay-deliver-conflict",{relayId:b,error:a instanceof Error?a.message:String(a)}),!1}}function t(a,b,c,d=Date.now()){a.prepare(`
52
- UPDATE session_relays
53
- SET state = 'prompt', prompt_signature = ?, updated_at = ?
54
- WHERE id = ?
55
- `).run(c,d,b)}function u(a,b){let c=a.prepare("SELECT prompt_signature FROM session_relays WHERE id = ?").get(b);return c?.prompt_signature??null}function v(a,b,c=Date.now()){return 1===a.prepare(`
56
- UPDATE session_relays
57
- SET state = 'expired', updated_at = ?
58
- WHERE id = ? AND state IN (${k})
59
- `).run(c,b,...e.O7).changes}function w(a,b=Date.now()){return a.prepare(`
60
- SELECT ${g} FROM session_relays
61
- WHERE state IN (${k}) AND expires_at <= ?
62
- ORDER BY expires_at ASC
63
- `).all(...e.O7,b).map(h)}function x(a,b,c=Date.now()){return 1===a.prepare(`
64
- UPDATE session_relays
65
- SET state = 'cancelled', pending_kind = NULL, pending_body = NULL, updated_at = ?
66
- WHERE id = ? AND state IN (${k})
67
- `).run(c,b,...e.O7).changes}function y(a,b={}){let c=[],d=[];b.worktreeId&&(b.instanceId?(c.push("((from_worktree_id = ? AND from_instance_id = ?) OR (to_worktree_id = ? AND to_instance_id = ?))"),d.push(b.worktreeId,b.instanceId,b.worktreeId,b.instanceId)):(c.push("(from_worktree_id = ? OR to_worktree_id = ?)"),d.push(b.worktreeId,b.worktreeId))),void 0!==b.since&&(c.push("created_at >= ?"),d.push(b.since));let f=c.length>0?`WHERE ${c.join(" AND ")}`:"",g=a.prepare(`SELECT state, COUNT(*) AS n FROM session_relays ${f} GROUP BY state`).all(...d),h=(0,e.Ho)();for(let a of g)a.state in h&&(h[a.state]=a.n);return h}},67164:(a,b,c)=>{c.d(b,{_:()=>i});var d=c(52660),e=c(55233),f=c(43015),g=c(640);let h=(0,c(72626).h)("relay-system-line");function i(a,b,c,j,k,l=Date.now()){let m=`${d.RELAY_SYSTEM_REQUEST_ID_PREFIX}${b}:${c}`;try{if((0,d.findMessageByRequestId)(a,j.worktreeId,m))return!1;let i=(0,e.dV)(a),n=(0,d.createRelaySystemMessage)(a,{worktreeId:j.worktreeId,cliToolId:j.cliToolId,instanceId:j.instanceId,content:(0,g.Nl)(i,c,k.alias),relayId:b,kind:c,at:l});try{(0,f.broadcastMessage)("message",{worktreeId:j.worktreeId,message:{...n,cliToolId:j.cliToolId,instanceId:j.instanceId}})}catch(a){h.warn("relay-system-line-broadcast-failed",{relayId:b,kind:c,error:a instanceof Error?a.message:String(a)})}return!0}catch(a){return h.warn("relay-system-line-failed",{relayId:b,kind:c,error:a instanceof Error?a.message:String(a)}),!1}}},85016:(a,b,c)=>{c.d(b,{dJ:()=>f,o5:()=>e,p5:()=>g});let d=(0,c(36925).v)("__relayDeliveryClaims",()=>new Set);function e(a){d.add(a)}function f(a){d.delete(a)}function g(a){return d.has(a)}}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=4280,exports.ids=[4280,9130],exports.modules={2669:(a,b,c)=>{c.d(b,{JI:()=>n,M7:()=>d,Sr:()=>h,Zf:()=>f,c7:()=>e,lU:()=>k,mR:()=>j,qO:()=>i,su:()=>m,wQ:()=>l});let d="SESSION_STARTING",e="SESSION_START_FAILED",f="SESSION_START_UNAVAILABLE",g=[d,e];class h extends Error{constructor(a,b,c){super(`${a} did not reach its input prompt within ${Math.round(c/1e3)}s (initialization timeout). The tmux session '${b}' and its process are still running, so this is a slow start, not a failed one — the message was not delivered, but nothing needs repairing. Retry the send in a few seconds, or run \`commandmate capture <worktree-id>\` to see what it is waiting on.`),this.toolName=a,this.sessionName=b,this.timeoutMs=c,this.code=d,this.name="SessionStartTimeoutError"}}function i(a,b){return`${a} exited before reaching its input prompt: the tmux session '${b}' is back at a shell, so this is not a slow start and waiting will not help. The message was not delivered. Run \`commandmate capture <worktree-id>\` to see why it exited (for example a startup dialog answered with exit, or a missing login), fix that, then send again.`}class j extends Error{constructor(a,b,c){super(`${a} reported an error while starting in tmux session '${b}': "${c}". Retrying will not help until that is resolved; run \`commandmate capture <worktree-id>\` to see the session output.`),this.toolName=a,this.sessionName=b,this.detectedPattern=c,this.code=e,this.name="SessionStartFailedError"}}class k extends Error{constructor(a,b=`${a} is not installed. Please install it first.`){super(b),this.toolName=a,this.code=f,this.name="SessionStartUnavailableError"}}function l(a){return o(a)===d}function m(a){let b=o(a);return void 0!==b&&g.includes(b)}function n(a){return o(a)===f}function o(a){if("object"!=typeof a||null===a)return;let b=a.code;return"string"==typeof b?b:void 0}},22354:(a,b,c)=>{c.d(b,{F0:()=>j.F,K9:()=>e.K9,VM:()=>d.VM,_0:()=>f._0,c1:()=>k.c,o:()=>i.o,vm:()=>h.v,y_:()=>g.y_});var d=c(70096);c(66101);var e=c(45567);c(57510),c(38367);var f=c(25071),g=c(50474),h=c(70997),i=c(77904),j=c(76835),k=c(2734)},23197:(a,b,c)=>{c.d(b,{H:()=>d});let d="__global__"},32002:(a,b,c)=>{c.d(b,{e:()=>h});var d=c(56791),e=c(26923),f=c(52201),g=c(15194);function h(a,b,c){let h=(0,d.getAgentInstances)(a,b);return h.length>0?h:(0,g.lu)((0,f.eG)({worktree:c,appSettings:(0,e.Ds)(a)}))}},50474:(a,b,c)=>{c.d(b,{y_:()=>d});function d(a){var b=a.noDecision;switch(b.kind){case"proceeds":return{safe:!0,blocksForMs:0,summary:"the agent continues with its own approval flow"};case"blocks":return{safe:!1,blocksForMs:null,summary:"the agent waits indefinitely; nothing else will unblock it"};case"blocksUntil":return{safe:!1,blocksForMs:b.timeoutMs,summary:`the agent waits up to ${b.timeoutMs}ms before continuing`}}}},56714:(a,b,c)=>{c.d(b,{B:()=>E,z:()=>B});var d=c(8360),e=c(15194),f=c(31990),g=c(95595),h=c(37717),i=c(35583),j=c(67882),k=c(64501),l=c(70594),m=c(23365),n=c(50945),o=c(35524),p=c(23197),q=c(30008),r=c(49891),s=c(40043),t=c(36261),u=c(15044),v=c(93373),w=c(95375),x=c(26547),y=c(70096),z=c(66101);let A=(0,c(72626).h)("lib/session/worktree-status-helper");function B(){return{probeCount:0,captureCount:0,healthCheckCount:0}}let C={prompt:3,menu:2,unclassified:1};async function D(a,b,d,e,p,B,C,D,E,F){let G=F??(0,u.ic)(a,b,d),H=p.has(e),I=H,J=null,K=(0,i.Bk)(a,b,d);if(I&&null===K){E&&E.healthCheckCount++;let a=await (0,n.S)(e,b);a.alive||(I=!1,J=a.reason)}let L={startingSince:K,isWaitingForResponse:!1,isProcessing:!1,waitingKind:null,structuredWaitingSince:null,statusEvidence:null,sessionStatusReason:null,isUnclassified:!1,reading:null},M={frameCapturedAt:0,frameFetchedAfterStart:!1};if(I)try{let e=(0,m.y)(b).statusLines;E&&E.captureCount++;let h=await (0,u.IW)(()=>(0,f.Wh)(a,b,e,d)),n=h.frame;M=h.frameTime;let p={db:B,worktreeId:a,cliToolId:b,instanceId:d},{compositeKey:t,statusResult:z}=function(a,b,c){let{worktreeId:d,cliToolId:e,instanceId:f}=b,h=(0,o.v7)(d,e,f),k=(0,o.xU)(h),l=k?new Date(k):void 0,m=(0,g.WC)(c,e,l);a.startingSince=(0,i.a3)(d,e,f,"waiting"===m.status||m.hasActivePrompt);let n=null===a.startingSince?m:(0,i.Gz)(m);return(0,w.recordCapturedModelInfo)(d,e,f,(0,x.jw)(e,c)),a.isUnclassified=(0,s.Q4)(n.status,n.reason),{isWaitingForResponse:a.isWaitingForResponse,isProcessing:a.isProcessing}=(0,j.O_)(n.status,a.isUnclassified),a.sessionStatusReason=n.reason,a.statusEvidence=n.evidence,{compositeKey:h,statusResult:n}}(L,p,n),{db:F,worktreeId:G,cliToolId:H,instanceId:I}=p,J=(0,q.xF)({worktreeId:G,cliToolId:H,instanceId:I,scraper:{status:z.status,reason:z.reason,hasActivePrompt:z.hasActivePrompt}});L.isWaitingForResponse=L.isWaitingForResponse||null===L.startingSince&&J.waiting;let K=null!==L.startingSince||L.isWaitingForResponse?null:function(a){let{worktreeId:b,cliToolId:c,instanceId:d,output:e,statusResult:f}=a;if(!a.isProcessing&&!(0,k.NV)(b,c,d,e))return null;let h=(0,k.$K)(b,c,d,(0,k.$x)(b,c,d),e);if(null===h)return null;let i={status:f.status,reason:f.reason,thinking:(0,g.f8)(f),evidence:f.evidence,isUnclassifiedActive:a.isUnclassified},j=(0,w.getPublishedAgentTurn)(b,c,d),m=(0,l.wG)(i,h,j)?(0,l.mi)(a.db,b,c,d):null;return(0,l.aT)(i,h,null,j,m)}({db:F,worktreeId:G,cliToolId:H,instanceId:I,output:n,statusResult:z,isUnclassified:L.isUnclassified,isProcessing:L.isProcessing});null!==K&&(L.isProcessing="running"===K.status),(0,s.ox)(t,K??{status:z.status,reason:z.reason,evidence:z.evidence}),L.structuredWaitingSince=null===L.startingSince?J.structured?.at??null:null,L.waitingKind=(0,r.t)({waiting:L.isWaitingForResponse,hasActivePrompt:z.hasActivePrompt,scraperStatus:z.status,scraperReason:z.reason,apiAnswerable:null===L.startingSince&&(0,q.$G)(J.structured,(0,y.VM)(H).capabilities.eventIdentity)}),L.reading=(0,v.Xn)({verdict:z,waiting:L.isWaitingForResponse,waitingKind:L.waitingKind,structuredWaiting:null===L.startingSince&&null!==J.structured,structuredSince:L.structuredWaitingSince});let{db:N,worktreeId:O,cliToolId:P,instanceId:Q}=p;!z.hasActivePrompt&&C(N,O,{limit:10,cliToolId:P,instanceId:Q}).some(a=>"prompt"===a.messageType&&a.promptData?.status!=="answered")&&D(N,O,P,Q,a=>{Promise.resolve().then(c.bind(c,43015)).then(({broadcastMessage:b})=>{b("message_updated",{worktreeId:O,message:a})}).catch(a=>{A.warn("prompt-sweep-broadcast-failed",{worktreeId:O,error:a instanceof Error?a.message:String(a)})})})}catch{L.isProcessing=!0}let N=I?L.reading??{kind:"not-waiting"}:{kind:"gone"};(0,u.cY)({worktreeId:a,cliToolId:b,instanceId:d,observer:"status-probe",start:G,reading:N,...M});let O=L.isWaitingForResponse?(0,t.Jp)(a,b,d)?.since??null:null,{model:P,effort:Q}=(0,w.getResolvedAgentModelInfo)(a,b,d),R=(0,o.v7)(a,b,d);I||(0,s.xG)(R);let S=I?(0,s.AD)(R):null,T=I?function(a,b,c){try{let d=(0,y.VM)(b),e=(0,z.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{H?await (0,f.N5)({sessionName:e,worktreeId:a,cliToolId:b,instanceId:d,status:(0,j.kA)({isRunning:I,isWaitingForResponse:L.isWaitingForResponse,isProcessing:L.isProcessing})}):(0,f.Lw)(e)}catch(a){A.debug("tmux-surface:publish-failed",{sessionName:e,error:a instanceof Error?a.message:String(a)})}var U={worktreeId:a,cliToolId:b,instanceId:d,isRunning:I,exitedReason:J,waitingSince:O,model:P,effort:Q,lastKnown:S,eventSource:T};let{worktreeId:V,cliToolId:W,instanceId:X,isRunning:Y,exitedReason:Z,model:$,effort:_,lastKnown:aa,eventSource:ab}=U,{isWaitingForResponse:ac,isProcessing:ad,waitingKind:ae,statusEvidence:af,sessionStatusReason:ag,isUnclassified:ah,startingSince:ai}=L;return{isRunning:Y,isWaitingForResponse:ac,isProcessing:ad,waitingKind:ae,waitingSince:U.waitingSince,awaitingInstruction:Y&&(0,w.isAwaitingInstruction)(V,W,X),...null!==$?{model:$}:{},...null!==_?{reasoningEffort:_}:{},...null!==af?{statusEvidence:af}:{},...null!==ag?{sessionStatusReason:ag}:{},...ah?{isUnclassified:!0}:{},...null!==Z?{sessionStatusReason:h.g.EXITED,statusEvidence:"positive"}:{},...null!==aa?{lastKnownStatus:aa.status,lastKnownStatusAt:aa.at}:{},...null!==ab?{eventSource:ab}:{},...null!==ai?{startingSince:ai}:{}}}async function E(a,b,c,f,g,h,i,j){if(a===p.H)return{sessionStatusByCli:{},sessionStatusByInstance:{},isSessionRunning:!1,isWaitingForResponse:!1,isProcessing:!1};let k=d.CLIToolManager.getInstance(),l=e.XH,m=h(c,a).filter(a=>a.id!==a.cliTool),n=l.map(b=>({cliToolId:b,instanceId:b,sessionName:k.getTool(b).getSessionName(a,b)}));for(let b of m)n.push({cliToolId:b.cliTool,instanceId:b.id,sessionName:k.getTool(b.cliTool).getSessionName(a,b.id)});i&&(i.probeCount+=n.length);let o=await Promise.all(n.map(async d=>{let e=await D(a,d.cliToolId,d.instanceId,d.sessionName,b,c,f,g,i,j?.startFor(d.cliToolId,d.instanceId));return{...d,status:e}})),q={},r={};for(let{cliToolId:a,instanceId:b,status:c}of o){r[b]=c;let d=q[a];q[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||C[c]>=C[d]?c:d),waitingSince:(e=a.waitingSince,f=b.waitingSince,null===e?f:null===f?e:Math.min(e,f)),awaitingInstruction:a.awaitingInstruction||b.awaitingInstruction,...a.isUnclassified||b.isUnclassified?{isUnclassified:!0}:{}}}(d,c):c}let s=!1,t=!1,u=!1;for(let a of Object.values(q))a&&(a.isRunning&&(s=!0),a.isWaitingForResponse&&(t=!0),a.isProcessing&&(u=!0));return{sessionStatusByCli:q,sessionStatusByInstance:r,isSessionRunning:s,isWaitingForResponse:t,isProcessing:u}}}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=5845,exports.ids=[5845],exports.modules={3421:(a,b,c)=>{Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(71237),e=c(55088),f=c(17679);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},7329:(a,b,c)=>{c.d(b,{Hv:()=>o,W3:()=>m,uK:()=>n});var d=c(64049),e=c(52660),f=c(18201),g=c(25539),h=c(23854),i=c(85016),j=c(49798),k=c(67164);let l=(0,c(72626).h)("relay-service");function m(a,b){for(let c of[b.from.worktreeId,b.to.worktreeId])if(!(0,j.r)(a,c))return{ok:!1,refusal:{code:"RELAY_WORKTREE_NOT_FOUND",message:`Worktree '${c}' not found`,worktreeId:c}};let c=(0,h.$G)({from:b.from,to:b.to,parentHops:function(a,b){try{let g=(0,j.S)(a,b),h=(0,e.getMessages)(a,b.worktreeId,{limit:5,limitUnit:"pairs",cliToolId:g.cliToolId,instanceId:b.instanceId,matchResolvedInstance:!0}).filter(a=>"user"===a.role),i=h.findIndex(a=>"relay"===a.messageType);if(-1===i)return null;let k=h[i];for(let a=0;a<i;a+=1){var c;if(c=h[a],c.timestamp.getTime()<k.timestamp.getTime()||(0,f.pk)(c.content)!==(0,f.pk)(k.content))return null}let l=(0,e.parseRelayRequestId)(k.requestId);if(!l)return null;return(0,d.Ip)(a,l)?.hops??null}catch(a){return l.warn("relay-parent-lookup-failed",{worktreeId:b.worktreeId,instanceId:b.instanceId,error:a instanceof Error?a.message:String(a)}),null}}(a,b.from),allowRelayChain:!0===b.allowRelayChain,openBetween:(0,d.Oz)(a,b.from,b.to)});if((0,h.Qe)(c))return{ok:!1,refusal:c};let g=b.now??Date.now(),i=(0,d.CR)(a,{from:b.from,to:b.to,hops:c.hops,expiresAt:g+(0,h.AL)(b.ttlMs),now:g});return l.info("relay-opened",{relayId:i.id,from:`${i.from.worktreeId}/${i.from.instanceId}`,to:`${i.to.worktreeId}/${i.to.instanceId}`,hops:i.hops}),(0,k._)(a,i.id,"requested",(0,j.S)(a,i.from),(0,j.S)(a,i.to),g),{ok:!0,relay:i}}function n(a,b,c=Date.now()){let e=(0,d.Ip)(a,b);return e?(0,g.Lo)(e.state)&&(0,i.p5)(b)?{ok:!1,reason:"delivering",relay:e}:(0,d.m_)(a,b,c)?(l.info("relay-cancelled",{relayId:b}),{ok:!0,relay:(0,d.Ip)(a,b)??e}):{ok:!1,reason:"already_closed",relay:e}:{ok:!1,reason:"not_found",relay:null}}function o(a,b){return(0,d.M4)(a,b)}},18201:(a,b,c)=>{c.d(b,{Ce:()=>i,pk:()=>g});var d=c(72626),e=c(85038);let f=(0,d.h)("lib/history/user-turn-recorder");function g(a){return a.replace(/\r\n?/g,"\n").split("\n").map(a=>a.replace(/[ \t ]+$/u,"")).join("\n").trim()}function h(a){return{worktreeId:a.worktreeId,cliToolId:a.cliToolId,instanceId:a.instanceId??a.cliToolId}}async function i(a,b,d,j,k={}){let l=a.instanceId??a.cliToolId,m=g(d);if(0===b.length||0===m.length)return{outcome:"skipped",messageId:null,timestampMs:null};try{let[{getDbInstance:i},n,{broadcastMessage:o}]=await Promise.all([Promise.resolve().then(c.bind(c,88807)),Promise.resolve().then(c.bind(c,52660)),Promise.resolve().then(c.bind(c,43015))]),p=i(),q=n.findMessageByRequestId(p,a.worktreeId,b);if(q)return{outcome:"already-recorded",messageId:q.id,timestampMs:q.timestamp.getTime()};if(!(0,e.fp)(a))return f.info("user-turn-record-refused",{...h(a),requestId:b,generation:(0,e.Bh)()?.generation}),{outcome:"refused",messageId:null,timestampMs:null};let r=j>0?j:Date.now(),s=function(a,b,c,d,e,i,j,k){var l,m,n;let o=Math.min(j-12e4,k.adoptionFromMs??1/0),p=(l=a.findUnkeyedUserMessages(b,{worktreeId:c.worktreeId,cliToolId:c.cliToolId,instanceId:d,fromMs:o,toMs:j+12e4,includeRelayDelivered:!0}),m=i,n=j,l.filter(a=>g(a.content)===m).sort((a,b)=>Math.abs(a.timestamp.getTime()-n)-Math.abs(b.timestamp.getTime()-n)));for(let d of p)if(!d.requestId&&a.setMessageRequestId(b,d.id,e))return f.info("user-turn-adopted",{...h(c),requestId:e,messageId:d.id,driftMs:d.timestamp.getTime()-j}),{outcome:"adopted",messageId:d.id,timestampMs:d.timestamp.getTime()};let q=p.find(a=>a.requestId);return q?(f.info("user-turn-already-relayed",{...h(c),requestId:e,messageId:q.id,relayRequestId:q.requestId??null,driftMs:q.timestamp.getTime()-j}),{outcome:"already-recorded",messageId:q.id,timestampMs:q.timestamp.getTime()}):null}(n,p,a,l,b,m,r,k);if(s)return s;let t=n.createMessage(p,{worktreeId:a.worktreeId,role:"user",content:d,messageType:"normal",timestamp:new Date(r),cliToolId:a.cliToolId,instanceId:l,requestId:b});return o("message",{worktreeId:a.worktreeId,message:t}),f.info("user-turn-recorded",{...h(a),requestId:b,contentLength:d.length}),{outcome:"inserted",messageId:t.id,timestampMs:r}}catch(c){return f.error("user-turn-record-failed",{...h(a),requestId:b,error:c instanceof Error?c.message:String(c)}),{outcome:"failed",messageId:null,timestampMs:null}}}},83530:(a,b,c)=>{c.d(b,{FH:()=>l,fV:()=>k,iK:()=>i,y4:()=>h});var d=c(73753),e=c(28274),f=c(15194);let g="claude",h="instance_tool_conflict";function i(a,b,c={}){let{instanceId:d,requestedCliTool:g}=c;if(!d)return g?{cliToolId:g,instanceId:g,resolvedBy:"explicit"}:j(a,b,void 0);let h=(0,e.BN)(a,b,d);if(h&&(0,f.hR)(h.cliTool)){let a={cliToolId:h.cliTool,instanceId:d,resolvedBy:"roster"};return g&&g!==h.cliTool&&(a.conflict={instanceId:d,rosterCliTool:h.cliTool,requestedCliTool:g}),a}return g?(0,f.hR)(d)&&g!==d?{cliToolId:d,instanceId:d,resolvedBy:"primary",conflict:{instanceId:d,rosterCliTool:d,requestedCliTool:g,primaryAnchor:!0}}:{cliToolId:g,instanceId:d,resolvedBy:"explicit"}:(0,f.hR)(d)?{cliToolId:d,instanceId:d,resolvedBy:"primary"}:j(a,b,d)}function j(a,b,c){let e=(0,d.getWorktreeById)(a,b),h=e?.cliToolId;return h&&(0,f.hR)(h)?{cliToolId:h,instanceId:c??h,resolvedBy:"worktree-default"}:{cliToolId:g,instanceId:c??g,resolvedBy:"fallback"}}function k(a,b,c={}){let d=i(a,b,c);return d.conflict?{ok:!1,error:h,conflict:d.conflict}:{ok:!0,target:d}}function l(a){return a.primaryAnchor?`Agent instance '${a.instanceId}' is the primary instance of ${a.rosterCliTool}, but ${a.requestedCliTool} was requested. Omit the agent, pass ${a.rosterCliTool}, or target a ${a.requestedCliTool} instance instead.`:`Agent instance '${a.instanceId}' is registered as ${a.rosterCliTool}, but ${a.requestedCliTool} was requested. Omit the agent, pass ${a.rosterCliTool}, or update the instance's roster entry.`}},95736:(a,b,c)=>{a.exports=c(44870)}};
@@ -1,103 +0,0 @@
1
- "use strict";exports.id=720,exports.ids=[720,1990],exports.modules={905:(a,b,c)=>{c.d(b,{bN:()=>ai});var d=c(42422),e=c(24680),f=c(37717),g=c(52112),h=c(91010),i=c(1804),j=c(28861);let k=i.yh,l=(0,e.dX)("waiting",f.g.ANTIGRAVITY_SELECTION_LIST),m=/[\u2800-\u28FF]|Generating/,n={status:"running",confidence:"low",reason:f.g.UNKNOWN_FRAME,hasActivePrompt:!1,evidence:"none"},o=(0,h.b)({tool:"antigravity",verifiedAgainst:k,liveRegion:g.H,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 l;if(!d.kT.test(a.lastLines))return m.test(a.thinkingLines)?null:(0,j.Ye)((0,d._A)(a.clean))?n:null;if(!function(a){let b=a.split("\n"),c=-1;for(let a=b.length-1;a>=0;a--)if(d.kT.test(b[a])){c=a;break}if(c<0)return!1;let{promptPattern:e}=(0,d._X)("antigravity");return!b.slice(c+1).some(a=>e.test(a))}(a.lastLines))return null;let b=(0,d._A)(a.clean);if((0,d.bH)(b)){let a=(0,j.g8)(b);return null!==a?(0,e._D)(f.g.PROMPT_DETECTED,a):n}return l},afterThinking(a){if((0,d.ut)("antigravity",a.lastLines))return(0,e.dX)("running",f.g.THINKING_INDICATOR);let{promptPattern:b}=(0,d._X)("antigravity");return b.test(a.lastLines)?(0,e.dX)("ready",f.g.INPUT_PROMPT):null}});var p=c(93923),q=c(32236),r=c(91478),s=c(96742),t=c(682);let u=/^\s*↑\/↓\s+navigate\s+·\s+enter\s+select\s+·.*\bto\s+bypass\s+all\s+permissions\b/;var v=c(69130),w=c(61878);let x=i.ji,y=(0,h.b)({tool:"command-code",verifiedAgainst:x,liveRegion:v.E,beforePrompt(a){if((0,w.Yc)(a,"command-code").composerAtBottom)return null;if((0,r.tH)(a.lastLines)||(0,r.a9)(a.lastLines))return(0,e.dX)("waiting",f.g.COMMAND_CODE_PLAN_REVIEW);let b=(0,s.nK)(a.raw);return"prompt"===b.kind?(0,e._D)(f.g.PROMPT_DETECTED,b.prompt):"unsupported"===b.kind?(0,e.dX)("waiting",f.g.COMMAND_CODE_SELECTION_LIST):null},afterPrompt:a=>(0,r.yt)(a.lastLines)?(0,e.dX)("waiting",f.g.COMMAND_CODE_DISMISSABLE_PANEL):(0,r.sl)(a.lastLines)?(0,e.dX)("waiting",f.g.COMMAND_CODE_SELECTION_LIST):null,detectDialog:a=>(function(a){let b=a.contentLines,c=b[b.length-1];if(void 0===c||!u.test(c))return null;let d=(0,t.c)(b,b.length,1);return null===d||d.footer!==c.trim()||"❯"!==d.selectedGlyph?null:{kind:"permission",options:d.options,answerMode:"numbered",submitMode:"answer_only"}})(a),afterThinking(a){if((0,d.ut)("command-code",a.lastLines))return(0,e.dX)("running",f.g.THINKING_INDICATOR);let{promptPattern:b}=(0,d._X)("command-code");return b.test(a.lastLines)?(0,e.dX)("ready",f.g.INPUT_PROMPT):null}});var z=c(26895),A=c(50435);let B=/do you want to\b/i;var C=c(83342);function D(a){return(0,z.gF)((0,d._A)(a),(0,d.KO)("copilot"))}let E=i.MJ,F=(0,h.b)({tool:"copilot",verifiedAgainst:E,liveRegion:C.b,beforePrompt(a){if((0,d.gT)(a.contentLines)){let b=D(a.clean);return b.isPrompt&&(b.promptData?.options?.length??0)<=3?(0,e._D)(f.g.PROMPT_DETECTED,b):(0,e.Xx)("waiting",f.g.COPILOT_SELECTION_LIST,b)}if("working"===(0,d.Wn)(a.contentLines)){let b=D(a.clean);return(0,e.Xx)("running",f.g.THINKING_INDICATOR,b)}return null},afterThinking:a=>"idle"===(0,d.Wn)(a.contentLines)?(0,e.dX)("ready",f.g.INPUT_PROMPT):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,t.c)(c,b.contentEnd);if(e&&d.V.test(e.footer)){var f;let a=(f=e.firstRow,(0,A.r)(c,f,-1));return{kind:d.rX.some(b=>a.includes(b))?"trust":B.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:f.g.UNKNOWN_FRAME});var G=c(76777),H=c(50524);let I=/\x1b\[[0-9;]*[a-zA-Z]|\x1b\][^\x07\x1b]*(?:\x07|\x1b\\)|\[[0-9;]*m/g,J=/^(?:\x1b\[|\[)([0-9;]*)m$/,K=new Set([38,48,58]);function L(a){let b;I.lastIndex=0;let c=[],d="",e=null,f=0,g=0,h=0;for(;null!==(b=I.exec(a));){let i=a.slice(h,b.index);d+=i,f+=(0,H.LQ)(i),h=b.index+b[0].length;let j=J.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(K.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,H.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 M(a,b){for(let c of a.segments)if(c.start<=b&&b<c.end)return c.bg;return null}let N=/\S[^\S\n]{2,}esc[^\S\n]*$/,O=/^[│┃╹]/;function P(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!(M(a,b-1)===M(a,b)||c<a.width&&M(a,c)===M(a,c-1)||O.test((0,H.Ml)(a.text,b-1,b)))&&!O.test((0,H.Ml)(a.text,b,c))}function Q(a){let b=function(a){let b=a.split("\n").map(L),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)||!P(a,f,g))continue;let h=(0,H.Ml)(a.text,f,g);if(!N.test(h))continue;c.add(e);let i=b.filter(a=>P(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,G.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 R=/\s{2,}/;var S=c(89021),T=c(46423);let U=i.BG;function V(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 W=(0,h.b)({tool:"opencode",verifiedAgainst:U,liveRegion:S.m,afterThinking(a){if(d.Ty.test(a.lastLines))return(0,e.dX)("waiting",f.g.OPENCODE_PERMISSION_PROMPT);if(d.kD.test(a.lastLines))return(0,e.dX)("running",f.g.OPENCODE_PROCESSING_INDICATOR);let{candidates:b,lastIndex:c}=V(a);if(c<0)return null;let g=b.slice(Math.max(0,c-T.$+1),c+1).join("\n");if((0,d.ut)("opencode",g))return(0,e.dX)("running",f.g.THINKING_INDICATOR);let h=b.slice(Math.max(0,c-w.h9+1),c+1).join("\n");if(d.LO.test(b.join("\n")))return(0,e.dX)("waiting",f.g.OPENCODE_SELECTION_LIST);if(null!==Q(a.raw))return(0,e.dX)("waiting",f.g.OPENCODE_MODAL_OVERLAY);if(d.$t.test(h))return(0,e.dX)("ready",f.g.OPENCODE_RESPONSE_COMPLETE);let i=a.lines.slice(Math.max(0,c-w.h9+1),c+1).join("\n");return d.vU.test(i)?(0,e.dX)("ready",f.g.INPUT_PROMPT):null},skipGenericInputPrompt:!0,readIdleEvidence:function(a){let{candidates:b,lastIndex:c}=V(a);if(c<0)return"none";let e=b.slice(Math.max(0,c-w.h9+1),c+1).join("\n");if(d.$t.test(e))return"positive";let f=a.lines.slice(Math.max(0,c-w.h9+1),c+1).join("\n");return d.vU.test(f)?"positive":"none"},detectDialog(a){var b;let{candidates:c}=V(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(R).map(a=>a.trim()).filter(a=>""!==a)}return[]}(a),answerMode:"keys"}:d.LO.test(b.contentWindow)||null!==Q(a.raw)?{kind:"picker",options:[],answerMode:"keys"}:null},unreadableReason:f.g.UNKNOWN_FRAME});var X=c(58546);let Y=i.u3,Z=/^[^\S\n]*[│┃][^\S\n]*Allow once[^\S\n]{2,}Always allow[^\S\n]{2,}Reject\b/m,$=/^[^\S\n]*[│┃][^\S\n]*↑↓ select[^\S\n]+enter submit[^\S\n]+esc dismiss\b/m,_=/^[^\S\n│┃]*[A-Za-z][\w-]*(?: [\w-]+)* · [^\n]+? · \d+(?:\.\d+)?(?:ms|s|m(?: \d+s)?)(?: · [\d.]+ tok\/s)?[^\S\n]*$/,aa=["Allow once","Always allow","Reject"],ab=/^[^\S\n]*[│┃]/,ac=/^[^\S\n]*[│┃][^\S\n]*(\d+)\.[^\S\n]+(\S.*?)[^\S\n]*$/,ad=(0,h.b)({tool:"opencode-v2",verifiedAgainst:Y,liveRegion:X.R,requireVouchedPrompt:!0,beforePrompt:a=>Z.test(a.lastLines)?(0,e.dX)("waiting",f.g.OPENCODE_PERMISSION_PROMPT):$.test(a.lastLines)?(0,e.dX)("waiting",f.g.OPENCODE_SELECTION_LIST):null!==(0,d.dF)((0,d.aJ)(a.raw))?(0,e.dX)("waiting",f.g.OPENCODE_MODAL_OVERLAY):null,afterThinking:a=>(0,d.ut)("opencode-v2",a.lastLines)?(0,e.dX)("running",f.g.THINKING_INDICATOR):!function(a){let b=a.contentLines;for(let a=b.length-1;a>=0;a--){var c;if(c=b[a],!(/^[\s│┃╹▀]*$/.test(c)||/^[^\S\n]*[│┃][^\S\n]*[A-Za-z][\w-]* · [^·\n]+$/.test(c)||d.c7.test(c)||/^\s*\d+\.\d+\.\d+\s*$/.test(c)))return _.test(b[a])}return!1}(a)?d.wK.test((0,d.aJ)(a.raw))||d.c7.test(a.lastLines)?(0,e.dX)("ready",f.g.INPUT_PROMPT):null:(0,e.dX)("ready",f.g.OPENCODE_RESPONSE_COMPLETE),detectDialog(a){if(Z.test(a.lastLines))return{kind:"permission",options:aa,answerMode:"keys"};let b=function(a){if(!$.test(a.lastLines))return null;let b=a.contentLines,c=-1;for(let a=b.length-1;a>=0;a--)if($.test(b[a])){c=a;break}if(c<0)return null;let d=[];for(let a=c-1;a>=0&&ab.test(b[a]);a--){let c=ac.exec(b[a]);c&&d.unshift(`${c[1]}. ${c[2]}`)}return d.length<2||!d.every((a,b)=>a.startsWith(`${b+1}. `))?null:{kind:"question",options:d,answerMode:"numbered",submitMode:"answer_only"}}(a);return null!==b?b:null!==(0,d.dF)((0,d.aJ)(a.raw))?{kind:"picker",options:[],answerMode:"keys"}:null}});function ae(a){return(0,h.b)({tool:a,verifiedAgainst:i.hB})}let af=ae("gemini"),ag=ae("vibe-local"),ah={claude:p.zu,codex:q.q,copilot:F,opencode:W,antigravity:o,"command-code":y,"opencode-v2":ad,gemini:af,"vibe-local":ag};function ai(a){return ah[a]??ae(a)}Object.values(ah)},16402:(a,b,c)=>{c.d(b,{Xc:()=>r,dd:()=>v,j4:()=>q,r_:()=>n,vm:()=>t});var d=c(61878),e=c(70605),f=c(905),g=c(26895),h=c(42422),i=c(28861),j=c(96742),k=c(73495);let l=["enforce","legacy"],m={claude:"enforce",codex:"enforce",copilot:"enforce",opencode:"enforce",gemini:"legacy",antigravity:"legacy","vibe-local":"legacy","command-code":"legacy","opencode-v2":"enforce"};function n(a,b,c,e=process.env){let g=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,e),h="yes_no"===b?function(a,b,c){let e=(0,f.bN)(a);if(!e.hasDialogRules||"legacy"===c)return{present:!0,dialog:null,mode:c,gated:!1};let g=e.detectDialog("string"==typeof b?(0,d.zJ)(b,a):b);return{present:null!==g,dialog:g,mode:c,gated:!0}}(a,c,g):o(a,b,c,g);return{allowed:!h.gated||null!==h.dialog&&"numbered"===h.dialog.answerMode,dialog:h.dialog,mode:h.mode,gated:h.gated}}function o(a,b,c,e){let g=(0,f.bN)(a);if("multiple_choice"!==b||!g.hasDialogRules||"legacy"===e)return{present:!0,dialog:null,mode:e,gated:!1};let h=g.detectDialog("string"==typeof c?(0,d.zJ)(c,a):c);return{present:null!==h,dialog:h,mode:e,gated:!0}}let p=new Set(["question"]);function q(a,b,c){return b?.gated===!0&&null!==b.dialog&&p.has(b.dialog.kind)?"question-form":"multiple_choice"!==a.type?null:!0===a.isAskUserQuestion?"picker":void 0!==c&&s.has(c)&&"not-a-permission-dialog"===(0,k.Me)(a.options,c).kind?"unidentified":null}function r(a,b){return null===a?"base-rules":"question-form"===a||"careful"===b?"left-to-human":"picker"===a?"recommended-choice":"base-rules"}let s=new Set(["copilot","codex"]);function t(a,b,c){return o(a,b,c,m[a]??"legacy")}let u="unsupported_dialog_layout";function v(a,b){let c=(0,h._A)((0,h.aJ)(b)),f="antigravity"===a?(0,i.g8)(c):null,k="command-code"===a?(0,j.nK)(b):{kind:"none"};if("unsupported"===k.kind)return{promptCheck:{isPrompt:!1,cleanContent:c},isCommandCodeQuestion:!1,refusal:{reason:u,message:"A Command Code question is on screen, but its option list could not be read, so no key was sent. Answer it in the terminal, or retry once the screen has settled."},presence:{present:!1,dialog:null,mode:m[a]??"legacy",gated:!1}};let l="antigravity"===a&&null===f&&(0,i.bf)(c),n="prompt"===k.kind,o=("prompt"===k.kind?k.prompt:null)??f??(l?{isPrompt:!1,cleanContent:c}:(0,g.gF)(c,(0,h.KO)(a))),p=(0,d.zJ)(b,a),q=(0,e.z8)(p.liveRegion,o)?{isPrompt:!1,cleanContent:c}:o,r=t(a,q.promptData?.type,p);return{promptCheck:q,isCommandCodeQuestion:n,refusal:function(a,b){if(a.isPrompt&&b.present)return null;let c=a.promptData;return a.isPrompt&&b.gated&&c?.type==="multiple_choice"&&!0===c.isAskUserQuestion?{reason:u,message:"An AskUserQuestion picker is on screen, but its layout could not be verified as one of the agent's dialogs, so no key was sent. Answer it in the terminal, or retry once the screen has settled."}:{reason:"prompt_no_longer_active"}}(q,r),presence:r}}},24680:(a,b,c)=>{function d(a,b){return{status:a,confidence:"high",reason:b,hasActivePrompt:!1,evidence:"positive"}}function e(a,b,c){return{status:a,confidence:"high",reason:b,hasActivePrompt:!1,evidence:"positive",promptDetection:c}}function f(a,b){return{status:"waiting",confidence:"high",reason:a,hasActivePrompt:!0,evidence:"positive",promptDetection:b}}function g(a,b){return{status:"running",confidence:"low",reason:a,hasActivePrompt:!1,evidence:"none",promptDetection:b}}c.d(b,{Ru:()=>g,Xx:()=>e,_D:()=>f,dX:()=>d})},26895:(a,b,c)=>{c.d(b,{gF:()=>p,xn:()=>i});var d=c(72626),e=c(90304),f=c(67121),g=c(68652),h=c(81671);function i(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 j=(0,d.h)("prompt-detector"),k=null,l=[{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 m(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])}}let n=/^(.*?)Approve\?\s*$/m;function o(a,b,c,{approvalTarget:d,approvalContext:e},f){return{isPrompt:!0,promptData:{type:"yes_no",question:a,options:["yes","no"],status:"pending",...void 0!==f&&{defaultOption:f},instructionText:c,...void 0!==d&&{approvalTarget:d},...void 0!==d&&"truncated"===e.completeness&&{approvalTargetCompleteness:"truncated"}},cleanContent:b,rawContent:c,approvalContext:e}}function p(a,b){let c=(0,g.N)(a),d=c===a&&b?.precomputedLines?b.precomputedLines:c.split("\n"),i=d.slice(-50).join("\n"),p=i===k;p||j.debug("detectPrompt:start",{outputLength:c.length}),k=i;let q=d.slice(-20).join("\n"),r=Math.max(0,d.length-20),s=(0,e.rS)(c,b,h.O8);if(s.isPrompt)return p||j.info("detectPrompt:multipleChoice",{isPrompt:!0,question:s.promptData?.question,optionsCount:s.promptData?.options?.length}),s;let t=q.trim(),u=function(a,b){let c=[];return[...l.map(a=>({regex:a.regex,defaultOption:a.defaultOption,approve:!1})),{regex:n,defaultOption:void 0,approve:!0}].forEach((d,e)=>{let f=RegExp(d.regex.source,`${d.regex.flags}g`);for(let g of a.matchAll(f)){let{startLine:f,endLine:h}=m(a,b,g);c.push({match:g,defaultOption:d.defaultOption,approve:d.approve,startLine:f,endLine:h,offset:g.index??0,order:e})}}),c.sort((a,b)=>a.endLine-b.endLine||a.offset-b.offset||a.order-b.order),c}(q,r),v=u[u.length-1];if(v){let a=function(a,b,c,d,g=[]){let{startLine:h,endLine:i}=m(b,c,d),j=(0,f.hK)(a,h,i+1),k=g.some(a=>a.endLine>=j.start&&a.endLine<h);return{approvalTarget:(0,e.ZH)(a,j.start,i+1),approvalContext:{startRow:j.start,endRow:i+1,completeness:k?"truncated":j.completeness}}}(d,q,r,v.match,u.slice(0,-1));if(v.approve){let b=v.match[1].trim();return o(b?`${b} Approve?`:"Approve?",b||"Approve?",t,a)}let b=v.match[1].trim();return o(b,b,t,a,v.defaultOption)}return p||j.debug("detectPrompt:complete",{isPrompt:!1}),{isPrompt:!1,cleanContent:c.trim()}}},28861:(a,b,c)=>{c.d(b,{FI:()=>v,Ye:()=>t,bf:()=>u,g8:()=>n});var d=c(42422),e=c(90304),f=c(68652),g=c(682),h=c(69082),i=c(81671);let j=/^\s*●\s/,k=/^\s*─{3,}\s*$/,l=/[??]\s*$/;function m(a){let b=(0,d.dx)(a);if(null===b||!h.cR.test(a[b.footer]))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 i=b.start+e.firstRow,j=-1,m=-1,n=0;for(let c=i-1;c>=b.start&&n<3;c--){let b=a[c];if(""!==b.trim()){if(d.OM.test(b)||k.test(b))break;if(n++,m<0&&(m=c),l.test(b)){j=c;break}}}return j<0&&(j=m),{question:j<0?"Please select an option:":a[j].trim(),options:f,selectedIndex:e.selectedIndex,questionRow:j<0?i:j,firstOptionRow:i,footerRow:b.footer}}function n(a){let b=(0,f.N)(a),c=b.split("\n"),g=m(c);if(null===g)return null;let h=(0,e.HD)(c,g.questionRow,g.footerRow);return(0,e.xe)(g.question,g.options.map((a,b)=>({number:b+1,label:a,isDefault:b===g.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(j.test(a[c])){e=c+1;break}let g=a.slice(e,b.footerRow+1).filter(a=>!k.test(a)).map(a=>a.trimEnd()).join("\n").trim();return g.length>0?g:void 0}(c,g),approvalTarget:(0,e.ZH)(c,h.start,g.footerRow),approvalContext:{startRow:h.start,endRow:g.footerRow,completeness:h.completeness}},b,i.O8)}let o=/^\s*(>)?\s*(\d+)\.\s+\S/,p=/^\s*esc Cancel\s*·\s*\d+-\d+\s+Select\b/,q=/↑\/↓/,r=/^\s*(?:Requesting permission for:|Do you want to proceed\?)\s*$/;function s(a){let b=(0,f.N)(a).split("\n"),c=-1;for(let a=b.length-1;a>=0;a--){if(h.lE.test(b[a]))return null;if(o.test(b[a])){c=a;break}}if(c<0)return null;let e=o.exec(b[c]),g=Number(e[2]),i=g,j=void 0!==e[1],k=!1,l=c,m=Math.max(0,c-40);for(let a=c-1;a>=m&&i>1;a--){let c=o.exec(b[a]);if(null===c){if(d.OM.test(b[a]))break;continue}let e=Number(c[2]);if(e>=i)break;e!==i-1&&(k=!0),i=e,l=a,void 0!==c[1]&&(j=!0)}let n=!1;for(let a=l-1;a>=Math.max(0,l-40)&&!d.OM.test(b[a]);a--)if(r.test(b[a])){n=!0;break}let s=b.slice(c+1).filter(a=>""!==a.trim());return{lines:b,bottom:g,lowest:i,gap:k,highlighted:j,feedbackFooter:s.length>0&&p.test(s[0]),navigateFooter:s.some(a=>q.test(a)),permissionHeading:n}}function t(a){let b=s(a);return null!==b&&!(b.bottom<2)&&1===b.lowest&&!b.gap&&!!b.highlighted&&!b.feedbackFooter&&null===m(b.lines)}function u(a){let b=s(a);return null!==b&&!(b.bottom<2)&&!b.feedbackFooter&&(1!==b.lowest||!!b.gap||!!b.highlighted||!!b.navigateFooter||!!b.permissionHeading)&&null===m(b.lines)}function v(a){return s(a)?.feedbackFooter===!0}},31239:(a,b,c)=>{c.d(b,{$y:()=>e,ds:()=>i});let d=[/^[^\S\n]*type\s+something\b/i];function e(a){return!0===a.requiresTextInput&&d.some(b=>b.test(a.label))}function f(a){if(!a)return null;let b=a.decisionId;return"string"==typeof b&&""!==b?b:null}function g(a){return Array.isArray(a.decisionOptions)&&a.decisionOptions.length>0}let h={kind:"unreadable",heading:{kind:"unreadable"},choices:[],multiSelect:!1,freeText:null,decisionId:null,apiTarget:null};function i(a){if(null==a)return null;if("unclassified"!==a.type){let b=function(a){let b=Array.isArray(a.options)?a.options:[],c=[];for(let d of b){if("string"==typeof d){c.push({answer:d,label:d,isDefault:a.defaultOption===d,takesText:!1});continue}d&&"object"==typeof d&&"number"==typeof d.number&&"string"==typeof d.label&&c.push({answer:String(d.number),label:d.label,isDefault:!0===d.isDefault,takesText:e({label:d.label,requiresTextInput:!0===d.requiresTextInput}),..."string"==typeof d.description?{description:d.description}:{}})}return c}(a);return{kind:"screen-choices",heading:{kind:"question",text:"string"==typeof a.question?a.question:""},choices:b,multiSelect:!0===a.multiSelect,freeText:b.some(a=>a.takesText)?{via:"screen"}:null,decisionId:null,apiTarget:null}}let b=f(a);if(null!==b&&g(a)){let c=function(a){if(!Array.isArray(a))return[];let b=[];for(let c of a)c&&"number"==typeof c.number&&"string"==typeof c.label&&b.push({answer:String(c.number),label:c.label,isDefault:!1,takesText:!1});return b}(a.decisionOptions);if(c.length>0)return{kind:"api-choices",heading:{kind:"approval",toolName:"string"==typeof a.toolName&&a.toolName?a.toolName:null},choices:c,multiSelect:!1,freeText:null,decisionId:b,apiTarget:"approval"}}let c=function(a){if(!a||null===f(a)||g(a))return null;let b=a.askUserQuestion;if(!b||"string"!=typeof b.question||""===b.question||!Array.isArray(b.labels)||0===b.labels.length)return null;let c=b.labels.filter(a=>"string"==typeof a&&""!==a);if(c.length!==b.labels.length)return null;let d="number"==typeof b.questionCount?b.questionCount:1;return 1!==d?null:{question:b.question,labels:c,questionCount:d,...!0===b.custom?{custom:!0}:{}}}(a);return null!==b&&null!==c?{kind:"api-choices",heading:{kind:"agent-question",text:c.question},choices:c.labels.map((a,b)=>({answer:String(b+1),label:a,isDefault:!1,takesText:!1})),multiSelect:!1,freeText:!0===c.custom?{via:"api"}:null,decisionId:b,apiTarget:"question"}:h}},31990:(a,b,c)=>{c.d(b,{Wh:()=>V,WD:()=>W,Lw:()=>$,Qj:()=>U,K1:()=>T,N5:()=>Z,UM:()=>Y,eB:()=>X});var d=c(8360),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="[0-9a-f]".repeat(8),x=`#!/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-*|${n.HL}${w}-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
- `,y=`#!/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 z(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 A=c(83598),B=c(36925);let C=(0,m.promisify)(l.execFile),D=(0,e.h)("tmux-session-hooks"),E=(0,B.v)("__cmEnsuredSessionHooks",()=>new Set);async function F(a){if((0,n.N_)(a)&&!E.has(a)){E.add(a);try{if((0,n.gM)()&&(0,n.n9)(a)){z(s,v);let b=(0,n.Rr)(a,z(t,x));b&&await C("tmux",b,{timeout:5e3})}else await C("tmux",(0,n.g4)(a),{timeout:5e3});if((0,n.jx)()){let b=(0,n.Ls)(a,z(u,y));b&&await C("tmux",b,{timeout:5e3})}else await C("tmux",(0,n.sL)(a),{timeout:5e3})}catch(b){D.debug("session-hooks:reconcile-failed",{sessionName:a,error:b instanceof Error?b.message:String(b)})}}}async function G(a){try{if(!await (0,A.Us)(a)||await (0,A.Fh)(a))return!1;for(let b of(0,n.RS)(a))await C("tmux",b,{timeout:5e3});return D.info("session-hooks:geometry-restored",{sessionName:a}),!0}catch(b){return D.debug("session-hooks:geometry-restore-failed",{sessionName:a,error:b instanceof Error?b.message:String(b)}),!1}}let H=(0,m.promisify)(l.execFile),I=(0,e.h)("tmux-session-status"),J=(0,B.v)("__cmPublishedTmuxStatus",()=>new Map),K=(0,B.v)("__cmClearedTmuxStatus",()=>new Set);async function L(a){let{sessionName:b,worktreeId:c,cliToolId:d,instanceId:e,status:f}=a;if(!(0,n.om)())return K.has(b)||(K.add(b),await N(b)),"disabled";let g=J.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 H("tmux",(0,n.ND)(b,a,c),{timeout:5e3});return J.set(b,{status:f,worktreeId:c,cliToolId:d,instanceId:e}),await M(b),"written"}catch(a){return J.delete(b),I.debug("session-status:write-failed",{sessionName:b,error:a instanceof Error?a.message:String(a)}),"error"}}async function M(a){try{let{stdout:b}=await H("tmux",(0,n.Ys)(a,"status-right"),{timeout:5e3}),c=b.trim();if(""!==c&&!c.includes(n.lY))return I.debug("session-status:status-right-user-owned",{sessionName:a,existing:c}),!1;return""===c&&await H("tmux",(0,n.KB)(a,n.lY),{timeout:5e3}),!0}catch(b){return I.debug("session-status:status-right-failed",{sessionName:a,error:b instanceof Error?b.message:String(b)}),!1}}async function N(a){for(let b of(J.delete(a),n.bq))try{await H("tmux",(0,n.cD)(a,b),{timeout:5e3})}catch{}try{let{stdout:b}=await H("tmux",(0,n.Ys)(a,"status-right"),{timeout:5e3});b.includes(n.lY)&&await H("tmux",(0,n.$D)(a),{timeout:5e3})}catch{}}let O=(0,e.h)("cli-session");function P(a){globalThis.__captureFrameMetaSink?.getStore()?.(a)}function Q(a){globalThis.__captureHeadCutSink?.getStore()?.(a)}function R(){return j||(j=new i),j}function S(a,b,c){let e=d.CLIToolManager.getInstance().getTool(b),f=e.getSessionName(a,c);return{cliTool:e,sessionName:f}}async function T(a,b,c){let{sessionName:d}=S(a,b,c);return R().sessionExists(d)}async function U(a,b,c){let{sessionName:d}=S(a,b,c);return(0,f.p$)(d)}async function V(a,b,c=1e3,d){let e=O.withContext({worktreeId:a,cliToolId:b});e.debug("captureSessionOutput:start",{requestedLines:c});let{cliTool:f,sessionName:g}=S(a,b,d),h=R();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})},P,Q);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 W(a,b,c=5e3,d){let e=O.withContext({worktreeId:a,cliToolId:b});e.debug("captureSessionOutputFresh:start",{requestedLines:c});let{cliTool:f,sessionName:g}=S(a,b,d),h=R(),i=(0,k.XD)(g),j=Date.now();try{let a=await h.captureSnapshot(g,{startLine:-c});a.length>0?(0,k.Ws)(g,i)&&(0,k.vF)(g,a,c,j):(0,k.gm)(g),P({fetchStartedAt:j,source:"fetched"});let b=globalThis.__captureHeadCutSink?.getStore();return b&&b((0,k.AW)(a,c)),(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 X(a,b,c,d){if("Up"!==c&&"Down"!==c&&"Enter"!==c)throw Error(`Unsupported answer key: ${String(c)}`);let{sessionName:e}=S(a,b,d);try{await (0,f.KB)(e,[c])}finally{(0,k.gm)(e)}}async function Y(a,b,c){let{sessionName:d}=S(a,b,c);return(0,f.Hg)(d)}async function Z(a){await F(a.sessionName),(0,n.n9)(a.sessionName)&&await G(a.sessionName),await L(a)}function $(a){J.delete(a),K.delete(a),E.delete(a),(0,A.G9)(a)}},32236:(a,b,c)=>{c.d(b,{q:()=>y,AD:()=>z});var d=c(42422),e=c(26895),f=c(24680),g=c(37717),h=c(65912),i=c(682),j=c(50435);let k={"hooks-review":"permission","hooks-list":"picker","hooks-detail":"picker",update:"update",trust:"trust"};var l=c(61878),m=c(85237),n=c(27789),o=c(91010),p=c(1804),q=c(46423);function r(a){return(0,e.gF)((0,d._A)(a),(0,d.KO)("codex"))}let s=p.jP,t=/press\s+(?:number|enter)\s+to\s+confirm/i,u=/^\s*[❯›●]?\s*\d{1,2}[.)]\s/;function v(a){let b=(0,m.Ut)(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&&((t.test(g)||u.test(g))&&(e=b),(0,d.ut)("codex",c)&&(f=b))}return e>=0&&f>e}function w(a){return(0,h.kp)(a)?.kind==="option"}function x(a,b){let c=(0,l.Yc)(a,"codex");return"composer"!==c.anchor||c.composerEndRow!==b?b:c.startRow}let y=(0,o.b)({tool:"codex",verifiedAgainst:s,liveRegion:m.YH,beforePrompt(a){let{contentLines:b}=a;if((0,l.Yc)(a,"codex").composerAtBottom)return null;if(d.pn.test(a.lastLines))return(0,f.Xx)("waiting",g.g.CODEX_PAGER,r(a.clean));let c=(0,d.E6)((0,l.j4)(a,"codex"));if("hooks-list"===c||"hooks-detail"===c)return(0,f.Xx)("waiting",g.g.CODEX_HOOKS_REVIEW,r(a.clean));let e=(0,m.Bh)(b)-1;if(e>=0){let c=b.slice(Math.max(0,e-l.h9+1),e+1).join("\n"),h=b[e].trim();if(d.Jn.test(c)||d.ir.test(h)||d.bh.test(h)){let e=r(a.clean);return e.isPrompt&&((e.promptData?.question?.trim()??"").endsWith("?")||d.Dd.test(c))&&!v(b)?(0,f._D)(g.g.PROMPT_DETECTED,e):(0,f.Xx)("waiting",g.g.CODEX_SELECTION_LIST,e)}}let i=(0,h.t)(a.raw,b,(0,m.Bh)(b));if(i&&!v(b)){i.footerRecognised||(0,h.AT)(i.footer);let b=r(a.clean);return b.isPrompt?(0,f._D)(g.g.PROMPT_DETECTED,b):(0,f.Xx)("waiting",g.g.CODEX_SELECTION_LIST,b)}return null},isStalePrompt:a=>v(a.contentLines)||(0,l.Yc)(a,"codex").composerAtBottom,detectDialog:a=>(0,l.Yc)(a,"codex").composerAtBottom?null:function(a,b){var c;let e=(0,d._A)(a.clean).split("\n"),f=(0,i.c)(e,b.contentEnd);if(b.lifecycleDialog)return{kind:k[b.lifecycleDialog],options:f?.options??[],answerMode:"numbered"};if(!f||!d.Jn.test(f.footer)&&!d.$I.test(f.footer)&&!d.ir.test(f.footer)&&!d.bh.test(f.footer)||b.stalePrompt)return null;let g=(c=f.firstRow,(0,j.r)(e,c,-1));return{kind:d.Dd.test(f.footer)||g.split("\n")[0]?.endsWith("?")?"permission":"picker",options:f.options,answerMode:"numbered"}}(a,{contentEnd:(0,m.Bh)(a.contentLines),stalePrompt:v(a.contentLines),lifecycleDialog:(0,d.E6)((0,l.j4)(a,"codex"))}),afterThinking(a){let{contentLines:b}=a,c=(0,m.Ut)(b);if(c>=0){let e=c-1;for(;e>=0&&""===b[e].trim();)e--;if((e=x(a,e))>=0){let c=b.slice(Math.max(0,e-q.$+1),e+1).join("\n");return(0,d.ut)("codex",c)||n.mk.test(c)?(0,f.dX)("running",g.g.THINKING_INDICATOR):d.gm.test(b[e].trim())&&!w(a.raw)?(0,f.dX)("ready",g.g.INPUT_PROMPT):(0,f.dX)("running",g.g.THINKING_INDICATOR)}}else{let c=b.length-1;for(;c>=0&&""===b[c].trim();)c--;if(!((c=x(a,c))>=0&&d.gm.test(b[c].trim())&&!w(a.raw))&&((0,d.ut)("codex",a.lastLines)||n.mk.test(a.lastLines)))return(0,f.dX)("running",g.g.THINKING_INDICATOR)}return null}});function z(a){let b="string"==typeof a?(0,l.zJ)(a,"codex"):(0,l.j4)(a,"codex");if(!y.detectDialog(b))return!1;let c=(0,m.Bh)(b.contentLines),e=(0,i.c)((0,d._A)(b.clean).split("\n"),c);return null!==e&&(d.ir.test(e.footer)||d.bh.test(e.footer))}},50435:(a,b,c)=>{c.d(b,{r:()=>d});function d(a,b,c){let d=[];for(let e=b-1;e>c&&d.length<4;e--){let b=a[e].trim();""!==b&&d.push(b)}return d.join("\n")}},50524:(a,b,c)=>{c.d(b,{LQ:()=>g,Ml:()=>f,sh:()=>e});let d=/^\p{M}$/u;function e(a,b){if(a.length<=b)return a.length;let c=0,e=0;for(let f of a){let a=+!d.test(f);if(1===a&&c>=b)break;c+=a,e+=f.length}return e}function f(a,b,c){return a.slice(e(a,b),e(a,c))}function g(a){let b=0;for(let c of a)d.test(c)||(b+=1);return b}},61244:(a,b,c)=>{c.d(b,{$N:()=>i,Tq:()=>g,jW:()=>n,yi:()=>h});let d=String.raw`←\s*(?:[☐☒☑][^←→☐☒☑✔]*)+✔\s*Submit\s*→`;RegExp(`^${d}\\s*`);let e=RegExp(`^\\s?${d}$`),f=/^\s?[☐☒☑] [^\s\d←→☐☒☑✔][^←→☐☒☑✔]{0,40}$/,g=/Enter\s+to\s+select\b.*\bnavigate\b/i;function h(a){let b=a.trimEnd();return e.test(b)||f.test(b)}function i(a,b,c){let d=Math.max(0,b-c);for(let c=b-1;c>=d;c--)if(h(a[c]??""))return c;return -1}let j=/┌(─+)┐\s*$/,k=/^\s*(?:[❯›>]\s*)?1\.\s+\S/,l=/^( *)└(─+)┘\s*$/,m=/^\s*(?:[❯›>]\s*)?\d{1,2}\.\s+\S|^\s{2,}\S/;function n(a,b,c){let d=new Set,e=new Map,f=Math.min(c,a.length);for(let c=Math.max(0,b);c<f;c++){let b=a[c];if(!b.includes("┌"))continue;let h=j.exec(b);if(!h||!k.test(b.slice(0,h.index)))continue;let i=-1,n=0;for(let b=c+1;b<Math.min(f,c+80);b++){let c=l.exec(a[b]);if(c&&c[2].length===h[1].length){i=b,n=c[1].length;break}}if(i<0)continue;let o=[i],p=[[c,h.index]];for(let b=c+1;b<i;b++){let c=a[b].indexOf("│"),d=c>0?a[b].slice(0,c):"";""!==d.trim()&&m.test(d)?p.push([b,c]):o.push(b)}let q=i+1;for(;q<f;q++){let b=a[q];if(""!==b.trim()){if(b.length-b.trimStart().length!==n)break;o.push(q)}}if(function(a,b){let c=0;for(let d=b;d<a.length&&c<4;d++){let b=a[d];if(""!==b.trim()){if(g.test(b))return!0;c++}}return!1}(a,q)){for(let a of o)d.add(a);for(let[a,b]of p)e.set(a,b);c=q-1}}return{rows:d,cuts:e}}},67121:(a,b,c)=>{c.d(b,{Cj:()=>d,Gc:()=>i,HD:()=>k,ZH:()=>o,_j:()=>h,hK:()=>n,ie:()=>f});let d=/^[-─]+$/,e=/^[⏺⎿●○•✔✓✖✗✘›»❯└├>]/,f=12,g=/^[⎿└├]/;function h(a){return a.length-a.trimStart().length}function i(a,b,c){let d=1/0;for(let e=b;e<Math.min(c,a.length);e++){let b=a[e];void 0!==b&&""!==b.trim()&&(d=Math.min(d,h(b)))}return d===1/0?0:d}function j(a){if(void 0===a)return!1;let b=a.trim();return""!==b&&(e.test(b)||d.test(b))}function k(a,b,c=b+1){let{start:d,completeness:e}=l(a,b,c);return{start:d,completeness:e}}function l(a,b,c){let d=Math.max(0,b-f),e=i(a,b,c),k=-1,l=0,m=!0,n=new Set;for(let c=b-1;c>=d;c--){let b=a[c];if(void 0===b||""===b.trim())continue;let f=h(b)<=e,i=j(b);if(i&&f)return{start:(k>=0?k:c)+1,completeness:"complete",cutFrom:c};if(!f){i&&k<0&&(k=c),l++,m&&=g.test(b.trim());continue}let o=b.trim();if(k>=0&&l>0&&m&&n.has(o)&&function(a,b,c,d){for(let e=b-1;e>=c;e--){let b=a[e];if(void 0!==b&&""!==b.trim())return h(b)<=d&&j(b)}return!1}(a,c,d,e))return{start:k+1,completeness:"complete",cutFrom:c};n.add(o),k=-1,l=0,m=!0}return{start:k>=0?k+1:d,completeness:function(a,b){if(0===b)return"top-unknown";for(let c=0;c<b;c++){let b=a[c];if(void 0!==b&&""!==b.trim())return"truncated"}return"complete"}(a,d),cutFrom:d}}let m=/^>/;function n(a,b,c){let{start:d,completeness:e,cutFrom:f}=l(a,b,c);return a.slice(f,d).some(a=>void 0!==a&&m.test(a.trim()))?{start:d,completeness:"truncated"}:{start:d,completeness:e}}function o(a,b,c){let d=a.slice(b,c).map(a=>a.trimEnd()).join("\n").trim();return d.length>0?d:void 0}},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}`}},81671:(a,b,c)=>{c.d(b,{O8:()=>d});function d(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}},90304:(a,b,c)=>{c.d(b,{ie:()=>p.ie,xe:()=>H,rS:()=>I,HD:()=>p.HD,QI:()=>n,J0:()=>A,ZH:()=>p.ZH,N0:()=>o});var d=c(68652),e=c(42422),f=c(79204),g=c(31239),h=c(23479),i=c(61244);let j=/^\s*[…]?\s*[+\-↑↓⏵⏷]?\s*\d+\s+(?:pending|more|completed)\b/i,k=/^\s*\d{1,3}\s+tasks?\s+\(\d+\s+done\b/i,l=/^\s*[◼◻]\s/,m=/^(?:No changes this session|\+\d+ files? edited before this session \(show\))$/;function n(a,b,c){let d=function(a,b,c){let d=new Set;for(let e=Math.max(0,b);e<Math.min(c,a.length);e++){if(m.test(a[e].trim())){d.add(e);continue}if(k.test(a[e])){d.add(e);for(let b=e+1;b<Math.min(c,a.length);b++){let c=a[b];if(!l.test(c)&&!j.test(c))break;d.add(b)}}}return d}(a,b,c),e=(0,i.jW)(a,b,c);for(let a of e.rows)d.add(a);return{rows:d,cuts:e.cuts}}function o(a,b){return a.map((a,c)=>{if(b.rows.has(c))return"";let d=b.cuts.get(c);return void 0===d?a:a.slice(0,d).trimEnd()})}var p=c(67121);let q=/^\s*[\u276F\u25CF\u203A][^\d]*(\d+)(?:\.(?!\d)|\s{2,})\s*(.+)$/,r=/^\s*[^\d]{0,3}(\d+)(?:\.(?!\d)|\s+)\s*(.+)$/,s=/^\s{3,}\S/,t=/^\s*\[[^\]]*\d+\s+lines?\]/i,u=/Esc\s+to\s+cancel\s*[·•]\s*Tab\s+to\s+amend/i,v=i.Tq,w=/press\s+(?:enter|number)\s+to\s+confirm/i,x=/press\s+number\s+to\s+confirm/i,y=/(?:select|choose|pick|which|what|how|where|enter|type|specify|confirm|approve|accept|reject|decide|preference|option)/i,z=[/type\s+here/i,/tell\s+(me|claude)/i,/enter\s+/i,/custom/i,/differently/i];function A(a){return(0,g.$y)(a)}function B(a,b){if(0===b.length)return!0;let c=b[0].number;return a<c&&a>=c-2}function C(a){return{isPrompt:!1,cleanContent:a.trim()}}function D(a){return 0!==a.length&&!!(a.includes("?")||a.includes("?")||y.test(a))}function E(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 F=/^[❯›]\s(?!\s*\d+[.)]\s)/,G=/^─*\s*Worked for\s+(?:\d+h\s*)?(?:\d+m\s*)?\d+s\b/;function H(a,b,c,d,e,f,g){let{instructionText:h,approvalTarget:i,approvalContext:j}=c??{};return{isPrompt:!0,promptData:{type:"multiple_choice",question:a.trim(),options:b.map(a=>{let b=z.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}:{},...void 0!==i&&j?.completeness==="truncated"?{approvalTargetCompleteness:"truncated"}:{},...f?{submitMode:f}:{},...g?{isAskUserQuestion:!0}:{}},cleanContent:a.trim(),rawContent:e(d.trim()),...void 0!==j?{approvalContext:j}:{}}}function I(a,b,c){if(a=(0,d.N)(a),b?.hasNumberedDialogs===!1)return C(a);let g=b?.requireDefaultIndicator??!0,k=a.split("\n"),{scanStart:l,effectiveEnd:m,hasAskUserQuestionFooter:o}=function(a){let b=a.length;for(;b>0&&""===a[b-1].trim();)b--;let c=Math.max(0,b-50),d=!1;for(let e=b-1;e>=c;e--){let c=v.test(a[e]);if(u.test(a[e])||c){b=e,d=c;break}}return{scanStart:c,effectiveEnd:b,hasAskUserQuestionFooter:d}}(k),y=k.slice(l,m);if(function(a){for(let b of a)if(e.l8.test(b))return!0;return!1}(y))return C(a);let{hasConfirmationFooter:z,hasNumberFooter:A}=function(a){let b=!1,c=!1;for(let d of a){let a=d.trim();if(!b&&w.test(a)){b=!0,x.test(a)&&(c=!0);break}}return{hasConfirmationFooter:b,hasNumberFooter:c}}(y);if(g&&!function(a){for(let b of a){let a=b.trim();if(q.test(a))return!0}return!1}(y)&&!z)return C(a);let I=function(a,b,c){let d={collectedOptions:[],optionRows:[],rowsBelow:[],questionEndIndex:-1,continuationLineCount:0,paneWrap:[]},e=n(a,b,c);for(let i=c-1;i>=b;i--){var f,g,h;if(e.rows.has(i)){d.continuationLineCount++;continue}let b=e.cuts.get(i),c=void 0===b?a[i]:a[i].slice(0,b).trimEnd(),k=c.trim();if((f=d,g=c,h=k,void 0!==b&&s.test(g)?(f.paneWrap.unshift(h),f.continuationLineCount++,!!0):!(t.test(h)||j.test(h))||(f.continuationLineCount++,!!0))&&!function(a,b,c,d){let e=c.match(q);if(e){let c=parseInt(e[1],10);if(c<=20&&B(c,a.collectedOptions))return J(a,b,c,e[2],!0,d),!0}let f=c.match(r);if(f){let c=parseInt(f[1],10);if(c>20);else if(B(c,a.collectedOptions))return J(a,b,c,f[2],!1,d),!0}return!1}(d,c,k,b)){if(0===d.collectedOptions.length&&(k.startsWith("❯")||k.startsWith("●")||k.startsWith("›")))return null;if(0===d.collectedOptions.length&&k&&/^\s{3,}/.test(c)&&d.rowsBelow.unshift(c),d.collectedOptions.length>0&&k&&!p.Cj.test(k)&&"break"===function(a,b,c,d){if(/^\s{4,}/.test(b)&&E(b,c))return(a.rowsBelow.unshift(b),a.continuationLineCount++,a.continuationLineCount>25)?(a.questionEndIndex=d,"break"):"continue";if(D(c))return a.questionEndIndex=d,"break";if(E(b,c)){a.rowsBelow.unshift(b),a.continuationLineCount++;let c=/^\s{4,}/.test(b)?25:5;return a.continuationLineCount>c?(a.questionEndIndex=d,"break"):"continue"}return a.questionEndIndex=d,"break"}(d,c,k,i))break}}return{collectedOptions:d.collectedOptions,optionRows:d.optionRows,questionEndIndex:d.questionEndIndex}}(k,l,m);if(null===I)return C(a);let{collectedOptions:K,optionRows:L,questionEndIndex:M}=I;if(!function(a,b,c,d,e,f){var g,h,i;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}(a.map(a=>a.number)))return!1;let j=a.some(a=>a.isDefault);return!(a.length<2)&&(!b||!!j||!!(b&&c))&&(!!b||!!j||(g=d,h=e,i=f,-1!==g&&(!!D(h[g]?.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||p.Cj.test(b))&&D(b))return!0}return!1}(h,g,0,i))))}(K,g,z,M,k,l))return C(a);let N=M<0?0:(0,i.$N)(k,M,p.ie)+1,O=function(a,b,c=0,d=b+1){if(b<0)return"Please select an option:";let e=Math.max(c,b-5),g=Math.max(e,function(a,b,c,d,e){let g=(0,p.Gc)(a,b,d);for(let d=b-1;d>=c;d--){let b=a[d];if(void 0!==b&&""!==b.trim()&&(0,p._j)(b)<g&&F.test(b.trim())&&function(a,b,c){for(let d=b-1;d>=c;d--){let b=a[d];if(void 0!==b&&""!==b.trim())return f.W1.test(b)||G.test(b.trim())}return!1}(a,d,e))return d}return -1}(a,b,e,d,c)),h=[];for(let c=g;c<=b;c++){let b=a[c].trim();b&&!p.Cj.test(b)&&h.push(b)}return h.join(" ")}(k,M,N,m),P=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}(k,M,m),Q=H(O,K,{instructionText:P,...function(a,b,c,d=0){if(b<0)return;let e=(0,p.HD)(a,b,c),f=d>0&&d>=e.start,g=Math.max(d,e.start);return{approvalTarget:(0,p.ZH)(a,g,c),approvalContext:{startRow:g,endRow:c,completeness:f?"complete":e.completeness}}}(k,M,m,N)},a,c,z?A?"answer_only":"answer_then_enter":void 0,o);if(!o)return Q;let R=(0,h.JF)(k);return{...Q,optionRecommendations:K.map((a,b)=>(function(a,b,c){if(void 0===b)return"unknown";let[d]=b.rowsBelow;if(void 0===d)return(0,h.e3)(a);if(b.besidePane)return"unknown";if((0,h.GP)(b.row,d,c))return(0,h.e3)(a);if(!(0,h.iU)(d))return"unknown";let e=b.rowsBelow[1];return!!(void 0===e||(0,h.GP)(d,e,c))||"unknown"})(a.label,L[b],R))}}function J(a,b,c,d,e,f){let g=[d.trim(),...a.paneWrap].join(" ");a.optionRows.unshift({row:b,besidePane:void 0!==f||a.paneWrap.length>0,rowsBelow:a.rowsBelow}),a.rowsBelow=[],a.paneWrap=[],a.collectedOptions.unshift({number:c,label:g,isDefault:e}),a.continuationLineCount=0}},91010:(a,b,c)=>{c.d(b,{b:()=>m});var d=c(42422),e=c(26895),f=c(61878),g=c(70605),h=c(24680),i=c(37717);let j=["enforce","observe","legacy"],k={claude:"observe",copilot:"enforce",opencode:"enforce",codex:"legacy",gemini:"legacy",antigravity:"legacy","vibe-local":"legacy","command-code":"legacy","opencode-v2":"legacy"},l=(0,c(36925).v)("__idleEvidenceObservations",()=>new Map);function m(a){return{...a,detect:(b,c)=>(function(a,b,c={}){let m=(0,f.j4)(b,a.tool),n=a.beforePrompt?.(m)??null;if(n)return n;let o=(0,d.KO)(a.tool),p=(0,d.c)(a.tool)?(0,d._A)(m.clean):(0,d._A)(m.lastLines),q=(0,e.gF)(p,o);if(q.isPrompt)if((0,g.z8)(m.liveRegion,q))q={...q,isPrompt:!1,promptData:void 0};else if(a.isStalePrompt?.(m,q))q={...q,isPrompt:!1,promptData:void 0};else{if(!a.requireVouchedPrompt||c.isPromptVouched?.(q)!==!1)return(0,h._D)(i.g.PROMPT_DETECTED,q);q={...q,isPrompt:!1,promptData:void 0}}let r=a.afterPrompt?.(m,q)??null;if(r)return{...r,promptDetection:r.promptDetection??q};if((0,d.ut)(a.tool,m.thinkingLines))return(0,h.Xx)("running",i.g.THINKING_INDICATOR,q);let s=a.afterThinking?.(m,q)??null;if(s)return{...s,promptDetection:s.promptDetection??q};if(!a.skipGenericInputPrompt){let{promptPattern:b}=(0,d._X)(a.tool);if(b.test(m.lastLines))return{status:"ready",confidence:"high",reason:i.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 g=c.trim(),h=f.trim();j.includes(h)&&("*"===g?d=h:g===a&&(e=h))}return e??d??k[a]??"legacy"}(a.tool);if("legacy"===c)return"positive";let d=a.readIdleEvidence(b);var e=a.tool;let f=l.get(e)??{mode:c,positive:0,none:0};return f.mode=c,"positive"===d?f.positive+=1:f.none+=1,l.set(e,f),"observe"===c?"positive":d}(a,m),promptDetection:q}}return c.lastOutputTimestamp&&Date.now()-c.lastOutputTimestamp.getTime()>5e3?(0,h.Ru)(i.g.NO_RECENT_OUTPUT,q):(0,h.Ru)(a.unreadableReason??i.g.DEFAULT,q)})(a,b,c),detectDialog:a.detectDialog?b=>{let c=(0,f.j4)(b,a.tool),d=a.detectDialog(c);return(0,g.$$)(c.liveRegion,d)?null:d}:()=>null,hasDialogRules:void 0!==a.detectDialog}}},93923:(a,b,c)=>{c.d(b,{zu:()=>G,mB:()=>F});var d=c(42422),e=c(94154),f=c(90304),g=c(24680),h=c(37717),i=c(682),j=c(50435),k=c(61244);let l=/esc\s+to\s+cancel|enter\s+to\s+(?:select|confirm|set\s+as\s+default)/i,m=new Set(["❯",">"]),n=/do you want to\b|allow\b.*\?$/i,o=/ready to submit your answers\?|review your answers/i,p=/set\s+as\s+default/i;var q=c(61878),r=c(58846),s=c(91010),t=c(79204);function u(a){let b=(0,e.p4)(a),c=b?b.openingSeparator:a.length,d=(0,f.QI)(a,0,c).rows,g=c-1;for(;g>=0&&(""===a[g].trim()||d.has(g)||t.Wq.test(a[g]));)g--;return g}let v=/^\s*(?:❯\s*)?1\.\s+Submit answers\s*$/,w=/^\s*(?:❯\s*)?1\.\s+Submit\s*$/,x=/^\s+answers\s*$/,y=/^\s*(?:❯\s*)?2\.\s+Cancel\s*$/,z=/✔\s*Submit/,A=/^ (?:[●│] | {2,}\S)/,B=/^\s?←(?:\s*[☐☒☑])+\s*✔\s*$/,C=/^[^←→☐☒☑✔]*\bSubmit\s*→\s*$/;function D(a,b){for(let c=b-1;c>=0;c--)if(""!==a[c].trim())return c;return -1}function E(a,b,c){let d=b;for(;d>0&&""!==a[d-1].trim();)d--;if(b-d+1>c)return{top:d,text:null};let e=a.slice(d,b+1).map(a=>a.trim()).join(" ");return{top:d,text:e}}function F(a){let b=a.contentLines,c=u(b);if(c<0||!y.test(b[c]))return!1;let d=function(a,b){let c=b-1;return c<0?-1:v.test(a[c])?c:c>=1&&x.test(a[c])&&w.test(a[c-1])?c-1:-1}(b,c);if(d<0||!b[d].includes("❯")&&!b[c].includes("❯"))return!1;let f=D(b,d);if(f<0)return!1;let g=E(b,f,3);if("Ready to submit your answers?"!==g.text)return!1;let h=(0,k.$N)(b,g.top,200);return!!(h>=0&&z.test(b[h]))||null===(0,e.p4)(b)&&function(a,b){let c=b-1;for(;c>=0&&(""===a[c].trim()||A.test(a[c]));)c--;if(c<0)return!0;let d=E(a,c,2);if("Review your answers"!==d.text)return!1;let e=D(a,d.top);return e<0||!!((0,k.yi)(a[e])&&z.test(a[e]))||e>=1&&C.test(a[e])&&B.test(a[e-1])}(b,g.top)}let G=(0,s.b)({tool:"claude",verifiedAgainst:t.V2,liveRegion:r.j,afterPrompt:a=>d.XY.test(function(a){let b=(0,q.Yc)(a,"claude");if("composer"!==b.anchor)return a.lastLines;let c=a.contentLines.length-q.h9;return a.contentLines.slice(Math.max(b.startRow,c)).join("\n")}(a))?(0,g.dX)("waiting",h.g.CLAUDE_SELECTION_LIST):null,afterThinking:a=>d.aU.test(a.lastLines)?(0,g.dX)("running",h.g.THINKING_INDICATOR):null,readIdleEvidence:function(a){let b=u(a.contentLines);if(b>=0&&t.W1.test(a.contentLines[b]))return"positive";let c=(0,e.p4)(a.contentLines),d=a.contentLines.slice(0,c?c.openingSeparator:void 0),f=d.some(a=>t.ji.test(a)),g=d.some(a=>t.Tk.test(a));return f&&!g?"positive":"none"},detectDialog:a=>(function(a,b){var c;if(b.transcriptTail<0)return null;let e=(0,d._A)(a.clean).split("\n"),g=b.transcriptTail+1,h=(0,f.QI)(a.contentLines,0,g),q=(0,f.N0)(e,h),r=(0,i.c)(q,g);if(!r||null===r.selectedGlyph||!m.has(r.selectedGlyph))return null;let s=function(a,b,c,d){let e=[];for(let f=c;f<Math.min(d,a.length);f++){let c=a[f].trim();""===c||b.has(f)||e.push(c)}return e.join("\n")}(q,h.rows,r.lastRow+1,g);return""===s||l.test(s)?{kind:(c=function(a,b){let c=(0,k.$N)(a,b,f.ie);return(0,j.r)(a,b,c)}(q,r.firstRow),o.test(c)?"ask_user":p.test(s)?"picker":n.test(c)?"permission":"dialog"),options:r.options,answerMode:"numbered"}:null})(a,{transcriptTail:u(a.contentLines)})})},95595:(a,b,c)=>{c.d(b,{WC:()=>k,f8:()=>j,gv:()=>d.g,ug:()=>h});var d=c(37717),e=c(61878),f=c(905),g=c(16402);let h=new Set([d.g.OPENCODE_SELECTION_LIST,d.g.OPENCODE_MODAL_OVERLAY,d.g.OPENCODE_PERMISSION_PROMPT,d.g.CLAUDE_SELECTION_LIST,d.g.COMMAND_CODE_SELECTION_LIST,d.g.COMMAND_CODE_PLAN_REVIEW,d.g.COPILOT_SELECTION_LIST,d.g.CODEX_SELECTION_LIST,d.g.CODEX_PAGER,d.g.CODEX_HOOKS_REVIEW,d.g.ANTIGRAVITY_SELECTION_LIST]),i=new Set([d.g.THINKING_INDICATOR,d.g.OPENCODE_PROCESSING_INDICATOR]);function j(a){return"running"===a.status&&i.has(a.reason)}function k(a,b,c){let d=(0,e.zJ)(a,b),h=(0,f.bN)(b).detect(d,{lastOutputTimestamp:c,isPromptVouched:c=>(0,g.vm)(b,c.promptData?.type,a).present});return{status:h.status,confidence:h.confidence,reason:h.reason,hasActivePrompt:h.hasActivePrompt,evidence:h.evidence,promptDetection:h.promptDetection??{isPrompt:!1,cleanContent:d.clean}}}},96742:(a,b,c)=>{c.d(b,{nK:()=>q});var d=c(51297),e=c(90304),f=c(91478),g=c(682),h=c(23479),i=c(81671);let j=/❯[^\S\n]*(\d{1,2})[.)]/,k=/^[^\S\n]*type\s+something\b/i,l=/^\[[ xX\u2714]\]\s/,m=/^\[[xX\u2714]\]\s/,n=/^[^\S\n]*(?:\u276F[^\S\n]*)?(?:Submit|Next)[^\S\n]*$/,o=/^[^\S\n]*Enter\s+to\s+select\b.*\|.*\bEsc\s+to\s+cancel[^\S\n]*$/i;function p(a){return{kind:"unsupported",reason:a}}function q(a){if(!a)return{kind:"none"};if(null!==(0,f.uG)(a))return p("review-page");let b=(0,f.Dk)(a);if(null===b)return(0,f.f_)(a)?p("numbering-unreadable"):{kind:"none"};if(!b.cursorOnOptionRow)return p("cursor-outside-options");let c=a.replace(/\r\n/g,"\n").split("\n").map(d.aJ),q=c.slice(b.firstLineIndex,b.lastLineIndex+1);if(q.length>60)return p("region-too-tall");let s=b.tabLineIndex-b.firstLineIndex,t=(0,g.c)(q,q.length,12);if(null===t)return p("option-block-unreadable");let u=[...t.options],v=""===t.footer?[]:t.footer.split("\n"),w=v.some(a=>n.test(a)),x=v.filter(a=>!n.test(a)&&!o.test(a));if(x.length>0){let a=u.length-1;u[a]=[u[a],...x].join(" ").trim()}if(u.length!==b.optionCount)return p("option-count-mismatch");let y=u.some(a=>l.test(a));if(y&&!w)return p("multi-select");let z=q[b.cursorLineIndex-b.firstLineIndex]??"",A=j.exec(z);if(t.selectedIndex<0||"❯"!==t.selectedGlyph||null===A||Number(A[1])!==t.selectedIndex+1)return p("default-unresolved");let B=q.slice(s+1,t.firstRow).map(a=>a.trim()).filter(a=>""!==a);if(0===B.length)return p("question-missing");let C=B.join(" "),D=(0,e.ZH)(q,s+1,q.length),E=u.map((a,b)=>({number:b+1,label:y?a.replace(l,""):a,isDefault:b===t.selectedIndex,...y?{checked:m.test(a)}:{}})),F=(0,e.xe)(C,E,{instructionText:D,approvalTarget:D},q.join("\n"),i.O8,"answer_only",!0),G=F.promptData;return void 0===G||"multiple_choice"!==G.type?p("option-block-unreadable"):{kind:"prompt",region:b,prompt:{...F,optionRecommendations:function(a,b,c){let d=(0,h.JF)(a),e=[],f=0,i="",j=!1;for(let a of b){if(""===a.trim())continue;let b=(0,g.T)(a);if(null!==b&&b.number===e.length+1){e.push([b.label]),f=r.exec(a)?.[0].length??0,i=a,j=!1;continue}if(0===e.length)break;if(!(n.test(a)||o.test(a))&&!j){if(a.length-a.trimStart().length>=f||(0,h.GP)(i,a,d)){j=!0;continue}e[e.length-1].push(a.trim()),i=a}}return e.length!==c?Array.from({length:c},()=>"unknown"):e.map(a=>(0,h.e3)(a.join(" ")))}(c,q.slice(t.firstRow),u.length),promptData:{...G,...y?{multiSelect:!0}:{},options:G.options.map((a,b)=>{let c=E[b]?.checked,d=void 0===c?a:{...a,checked:c};return!0===a.requiresTextInput||k.test(a.label)?{...d,requiresTextInput:!0}:d})}}}}let r=/^[^\S\n]*[│┃]?[^\S\n]*[❯›●>]?[^\S\n]*\d{1,2}[.)][^\S\n]+/}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=936,exports.ids=[936,9130],exports.modules={2669:(a,b,c)=>{c.d(b,{JI:()=>n,M7:()=>d,Sr:()=>h,Zf:()=>f,c7:()=>e,lU:()=>k,mR:()=>j,qO:()=>i,su:()=>m,wQ:()=>l});let d="SESSION_STARTING",e="SESSION_START_FAILED",f="SESSION_START_UNAVAILABLE",g=[d,e];class h extends Error{constructor(a,b,c){super(`${a} did not reach its input prompt within ${Math.round(c/1e3)}s (initialization timeout). The tmux session '${b}' and its process are still running, so this is a slow start, not a failed one — the message was not delivered, but nothing needs repairing. Retry the send in a few seconds, or run \`commandmate capture <worktree-id>\` to see what it is waiting on.`),this.toolName=a,this.sessionName=b,this.timeoutMs=c,this.code=d,this.name="SessionStartTimeoutError"}}function i(a,b){return`${a} exited before reaching its input prompt: the tmux session '${b}' is back at a shell, so this is not a slow start and waiting will not help. The message was not delivered. Run \`commandmate capture <worktree-id>\` to see why it exited (for example a startup dialog answered with exit, or a missing login), fix that, then send again.`}class j extends Error{constructor(a,b,c){super(`${a} reported an error while starting in tmux session '${b}': "${c}". Retrying will not help until that is resolved; run \`commandmate capture <worktree-id>\` to see the session output.`),this.toolName=a,this.sessionName=b,this.detectedPattern=c,this.code=e,this.name="SessionStartFailedError"}}class k extends Error{constructor(a,b=`${a} is not installed. Please install it first.`){super(b),this.toolName=a,this.code=f,this.name="SessionStartUnavailableError"}}function l(a){return o(a)===d}function m(a){let b=o(a);return void 0!==b&&g.includes(b)}function n(a){return o(a)===f}function o(a){if("object"!=typeof a||null===a)return;let b=a.code;return"string"==typeof b?b:void 0}},3421:(a,b,c)=>{Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(71237),e=c(55088),f=c(17679);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},5416:(a,b,c)=>{c.d(b,{H:()=>i});var d=c(95375),e=c(91318),f=c(20029),g=c(39532),h=c(15961);function i(a,b,c,j=Date.now()){let{policy:k,taskId:l}=(0,e.d8)(a,b.cliToolId,b.instanceId),m={worktreeId:a,cliToolId:b.cliToolId,instanceId:b.instanceId??b.cliToolId};return(0,h.Fw)({...m,resolvedBy:b.resolvedBy??null,payload:c,sessionGeneration:(0,d.getAgentEventGenerationStartedAt)(a,b.cliToolId,b.instanceId),contract:{policy:k,taskId:l},appearance:{note:a=>(0,g.HO)(m,a,j),forget:()=>(0,g.mt)(m)},lastSend:(0,f.KF)(m),now:j})}},15961:(a,b,c)=>{c.d(b,{Fw:()=>M,Z1:()=>L});var d=c(48736),e=c(27354),f=c(16402),g=c(41733),h=c(42422),i=c(90166),j=c(15194),k=c(31239),l=c(81254),m=c(28861),n=c(69082);let o=/^\s*Do you trust the contents of this project\?\s*$/,p=/^\s*Accessing workspace:\s*(.*)$/,q=/^\s*>\s+(\S.*)$/,r=/^\s*(?:>\s+)?(\/[\w:.-]+)(?:\s{2,}.*)?$/,s=/^\s*[↓↑]\s*\d+\s+more\s*$/,t=/^\s*Effort\b/,u=/^ {40,}\S/;function v(a,b,c,d){let e=[],f=-1;for(let g=b;g<c;g++){let b=a[g];if(""===b.trim()||d&&d.test(b))break;if(q.test(b)){if(f>=0)return null;f=e.length}e.push(b.replace(/^\s*>\s+/,"").replace(/\s{2,}/g," ").trim())}return e.length<2||f<0?null:{options:e,selectedIndex:f}}let w=/^\s*Keyboard:\s+↑\/↓\s+Navigate\s+←\/→\s+Effort\s+enter\s+Select\s+esc\s+(?:Go Back|Clear search)\s*$/,x=/^\s*Switch Model\s*$/,y=/^\s*Search:(?:\s.*)?$/,z=/^\s*─+\s*$/,A=/^\s*Effort\b/,B=/^\s*>\s+(\S.*)$/,C=/^ {40,}\S/,D=a=>""===a.trim();function E(a,b,c){for(;b<c&&D(a[b]);)b++;return b}let F={trust:"antigravity-trust","model-picker":"antigravity-model-picker","slash-menu":"antigravity-slash-menu"},G={question:null,approvalTarget:null,options:[],selectedIndex:-1};var H=c(29567),I=c(77245),J=c(39532);function K(a,b){return{worktreeId:a.worktreeId,cliToolId:a.cliToolId,instanceId:a.instanceId,sessionName:a.sessionName,sessionGeneration:a.sessionGeneration,screenAppearedAt:a.screenAppearedAt,kind:b.kind,question:b.question,options:b.options,approvalTarget:(0,J.vQ)(b.kind,b.approvalTarget,b.options),selectedPosition:b.selectedIndex>=0?b.selectedIndex+1:null}}function L(a){let{screen:b,target:c,session:d}=a;return null===b||null===b.token||null===b.appearedAt||null===d.generation?null:K({worktreeId:c.worktreeId,cliToolId:c.cliToolId,instanceId:c.instanceId,sessionName:c.sessionName,sessionGeneration:d.generation,screenAppearedAt:b.appearedAt},{kind:b.kind,question:b.question,options:b.options.map(a=>a.label),approvalTarget:b.approvalTarget,selectedIndex:null===b.selectedPosition?-1:b.selectedPosition-1})}function M(a){let{payload:b,now:c}=a,L=a.lastSend??null,M={worktreeId:a.worktreeId,cliToolId:a.cliToolId,instanceId:a.instanceId,sessionName:b.sessionName,resolvedBy:a.resolvedBy},N={running:b.isRunning,starting:"number"==typeof b.startingSince,generation:a.sessionGeneration},O=b.isRunning?function(a){if("antigravity"===a.cliToolId&&a.fullOutput){let b=function(a){let b=(0,h.aJ)(a),c=(0,h._A)(b);if((0,h.bH)(c)){let a=(0,m.g8)(c),b=a?.promptData;return b?.type!=="multiple_choice"?{kind:"unknown",...G}:{kind:"antigravity-permission",question:b.question,approvalTarget:b.approvalTarget??null,options:b.options.map(a=>a.label),selectedIndex:b.options.findIndex(a=>a.isDefault)}}let d=function(a){let b=a.split("\n").map(a=>a.trimEnd()),c=function(a){for(let b=a.length-1;b>=0;b--)if(n.YH.test(a[b])){for(let c=b+1;c<a.length;c++)if(n.lE.test(a[c]))return -1;return b}return -1}(b);return c<0?null:function(a,b){let c=Math.max(0,b-30),d=-1;for(let e=b-1;e>=c;e--)if(o.test(a[e])){d=e;break}if(d<0)return null;for(let c=b+1;c<a.length;c++)if(""!==a[c].trim()&&!u.test(a[c]))return null;let e=-1;for(let c=d+1;c<b;c++)if(q.test(a[c])){e=c;break}if(e<0)return null;let f=e;for(;f-1>d&&""!==a[f-1].trim();)f--;let g=v(a,f,b);if(null===g)return null;let h=null,i=Math.max(0,d-8);for(let b=d-1;b>=i;b--){let c=p.exec(a[b]);if(!c)continue;let e=c[1].trim();if(""!==e)h=e;else for(let c=b+1;c<d;c++)if(""!==a[c].trim()){h=a[c].trim();break}break}return{screen:"trust",question:a[d].trim(),approvalTarget:h,options:g.options,selectedIndex:g.selectedIndex}}(b,c)??function(a,b){let c=Math.max(0,b-30);for(let d=b-1;d>=c;d--){if(!n.d0.test(a[d]))continue;let c=d+1;for(;c<b&&""===a[c].trim();)c++;let e=v(a,c,b,t);if(null===e)break;return{screen:"model-picker",question:a[d].trim(),approvalTarget:null,options:e.options,selectedIndex:e.selectedIndex}}return null}(b,c)??function(a,b){let c=b-1;for(;c>=0&&(""===a[c].trim()||s.test(a[c]));)c--;let d=[],e=Math.max(0,b-30);for(;c>=e&&r.test(a[c]);c--)d.unshift(a[c]);return d.length<2||1!==d.filter(a=>q.test(a)).length?null:{screen:"slash-menu",question:null,approvalTarget:null,options:d.map(a=>r.exec(a)[1]),selectedIndex:d.findIndex(a=>q.test(a))}}(b,c)}(b);if(null===d){let a=function(a){let b,c=a.split("\n").map(a=>a.trimEnd()),d=function(a){for(let b=a.length-1;b>=0;b--)if(!(D(a[b])||C.test(a[b])))return w.test(a[b])?b:-1;return -1}(c);if(d<0)return null;let e=function(a,b){let c=Math.max(0,b-30);for(let d=b-1;d>=c;d--)if(x.test(a[d]))return d;return -1}(c,d);if(e<0)return null;let f=(b=E(c,e+1,d))>=d||!y.test(c[b])||++b>=d||!z.test(c[b])?-1:E(c,b+1,d);if(f<0)return null;let g=function(a,b,c){let d=[],e=-1,f=b;for(;f<c&&!D(a[f]);f++){if(A.test(a[f]))return null;if(B.test(a[f])){if(e>=0)return null;e=d.length}d.push(a[f].replace(/^\s*>\s+/,"").replace(/\s{2,}/g," ").trim())}return 0===d.length||e<0?null:{options:d,selectedIndex:e,end:f}}(c,f,d);return g&&function(a,b,c){let d=E(a,b,c);return!(d>=c)&&!!A.test(a[d])&&c-d<=6}(c,g.end,d)?{question:c[e].trim(),options:g.options,selectedIndex:g.selectedIndex}:null}(b);return null===a?null:{kind:"antigravity-model-picker",question:a.question,approvalTarget:null,options:[...a.options],selectedIndex:a.selectedIndex}}return{kind:F[d.screen],question:d.question,approvalTarget:d.approvalTarget,options:[...d.options],selectedIndex:d.selectedIndex}}(a.fullOutput);if(null!==b)return b}return a.isPromptWaiting||a.isSelectionListActive||a.isPagerActive||a.isDismissablePanelActive||a.isUnclassifiedActive||"waiting"===a.sessionStatus?{kind:"unknown",...function(a){if(!(0,l.XF)(a))return G;let b=a.approvalTarget??null;return"yes_no"===a.type?{question:a.question,approvalTarget:b,options:[...a.options],selectedIndex:a.defaultOption?a.options.indexOf(a.defaultOption):-1}:{question:a.question,approvalTarget:b,options:a.options.map(a=>a.label),selectedIndex:a.options.findIndex(a=>a.isDefault)}}(a.promptData)}:"ready"===a.sessionStatus?{kind:"composer",...G}:{kind:"none",...G}}({cliToolId:a.cliToolId,fullOutput:b.fullOutput,sessionStatus:b.sessionStatus,isPromptWaiting:b.isPromptWaiting,promptData:b.promptData,isSelectionListActive:b.isSelectionListActive,isPagerActive:b.isPagerActive,isDismissablePanelActive:b.isDismissablePanelActive,isUnclassifiedActive:b.isUnclassifiedActive}):null,{token:P,tokenWithheld:Q,appearedAt:R}=function(a,b){var c;let d=null===b?null:(c=a.sessionGeneration,(0,H.PJ)(b.kind)?"unknown"===b.kind?"unknown-screen":null===c?"no-session-generation":null:"no-decision"),e=a.sessionGeneration;if(null===b||null!==d||null===e)return a.appearance.forget(),{token:null,tokenWithheld:d,appearedAt:null};let f=a.payload.sessionName,g=a.appearance.note((0,J.z2)({sessionName:f,sessionGeneration:e,...b})),h=K({...a,sessionName:f,sessionGeneration:e,screenAppearedAt:g},b);return{token:(0,I.hH)(h,a.now),tokenWithheld:null,appearedAt:g}}(a,O),S=null;null!==O&&(S={kind:O.kind,token:P,tokenExpiresAt:null===P?null:(0,I.rk)(c),tokenWithheld:Q,appearedAt:R,question:O.question,approvalTarget:O.approvalTarget,options:O.options.map((a,b)=>({position:b+1,label:a})),selectedPosition:O.selectedIndex>=0?O.selectedIndex+1:null,answerVia:function(a,b){if(!(0,H.PJ)(a.kind))return"none";if("antigravity-trust"===a.kind)return"strict";let c=b.promptView??(0,k.ds)(b.promptData??null);return c?.kind==="screen-choices"?"screen":c?.kind==="api-choices"?"api":"terminal"}(O,b),sessionStatus:b.sessionStatus,sessionStatusReason:b.sessionStatusReason});let T=b.autoYes;return{schemaVersion:H.To,observedAt:c,target:M,session:N,status:null===O?"unavailable":"observed",unavailableReason:null===O?"session-not-running":null,screen:S,autoYes:{enabled:T?T.enabled:null,expiresAt:T?.expiresAt??null,stopReason:T?.stopReason??null,pollerActive:"boolean"==typeof b.serverPollerActive?b.serverPollerActive:null,pollerRecord:null===O?null:function(a,b,c){var d;let e=a.autoYes?.lastSuppression;return e?{reason:e.reason,mode:e.mode,promptType:e.promptType,...void 0!==e.pattern&&{pattern:e.pattern},at:e.at,ageSeconds:Math.max(0,Math.round((c-e.at)/1e3)),screenCorrelation:(d=e.promptType,(0,H.PJ)(b.kind)?(0,l.XF)(a.promptData)&&a.promptData.type!==d?"type-mismatch":"unknown":"no-prompt-on-screen")}:null}(b,O,c),contractEvaluation:function(a,b){let{policy:c,taskId:k}=a.contract,m=c?{taskId:k,mode:c.mode}:null;if(null===b)return{state:"not-evaluated",because:"session-not-running",contract:m};let n=a.payload.promptData;if(!(0,H.PJ)(b.kind)||!(0,l.XF)(n))return{state:"not-evaluated",because:"no-parsed-prompt",contract:m};let o=(0,j.hR)(a.cliToolId)?a.cliToolId:void 0,p=function(a,b,c){if(!(0,l.XF)(b))return;let d=a.autoYesAnswerMode??i.Rb,e=(0,f.Xc)((0,f.j4)(b,void 0,c),d);return"left-to-human"===e?{kind:"left-to-human"}:"base-rules"!==e?{kind:"answered",question:{optionRecommendations:function(a,b){if(!a||void 0===b)return;let c=(0,h._A)((0,h.aJ)(a));return(0,g.$M)(c,b,c.split("\n"),a).optionRecommendations}(a.fullOutput,c)}}:void 0}(a.payload,n,o);if(p?.kind==="left-to-human")return{state:"base-withholds",reason:e.eS,contract:m};let q=(0,d.sD)(n,c,o,p?.kind==="answered"?p.question:void 0);return null!==q.suppressedBy&&(0,e.PP)(q.suppressedBy)?{state:"base-withholds",reason:q.suppressedBy,contract:m}:null!==q.suppressedBy?{state:"policy-withholds",reason:q.suppressedBy,...void 0!==q.pattern&&{pattern:q.pattern},contract:m}:null===q.answer?{state:"no-base-answer",contract:m}:{state:"policy-permits",contract:m}}(a,O)},lastSend:null===L?null:{at:L.at,state:L.state,reason:L.reason}}}},20029:(a,b,c)=>{c.d(b,{C7:()=>r,KF:()=>n,Nq:()=>p,cu:()=>l,m4:()=>s,zE:()=>m});var d=c(55511),e=c(36925),f=c(72626),g=c(2669),h=c(7321);let i=(0,f.h)("session/send-attempt-state"),j=(0,e.v)("__sendAttemptRecords",()=>new Map);function k(a){return JSON.stringify([a.worktreeId,a.cliToolId,a.instanceId])}function l(a){return(0,d.createHash)("sha256").update(a,"utf8").digest("hex").slice(0,16)}function m(a,b,c=Date.now()){try{let d=k(a);for(j.delete(d),j.set(d,{at:Math.floor(c),state:b.state,reason:b.reason,messageDigest:l(b.content)});j.size>1024;){let a=j.keys().next().value;if(void 0===a)break;j.delete(a)}}catch(a){i.warn("send-attempt-record-failed",{error:a instanceof Error?a.message:String(a)})}}function n(a){return j.get(k(a))??null}let o=/Command failed: tmux |Failed to send (?:special )?keys? to tmux session|Failed to send special key:|Failed to paste message into tmux session/;function p(a){if("object"==typeof a&&null!==a&&a.code===g.M7)return{state:"not-sent",reason:"session-starting"};if("object"==typeof a&&null!==a&&a.code===h.L)return{state:"not-sent",reason:"plan-review"};let b=a instanceof Error?a.message:String(a);return/Enter was not pressed, so nothing was submitted/.test(b)?{state:"indeterminate",reason:"body-not-landed"}:/replaced by a TUI autocompletion/.test(b)?{state:"indeterminate",reason:"replaced-by-completion"}:/submit could not be confirmed/i.test(b)?{state:"indeterminate",reason:"submit-unconfirmed"}:o.test(b)?{state:"indeterminate",reason:"send-error"}:/prompt not ready/i.test(b)?{state:"not-sent",reason:"prompt-not-ready"}:/still holds unsent text after \d+ clear passes/.test(b)?{state:"not-sent",reason:"composer-not-empty"}:{state:"indeterminate",reason:"send-error"}}function q(a){return a.replace(/\s+/g,"")}function r(a,b){let c=q(b.split("\n").find(a=>""!==a.trim())??"").slice(0,32);return""!==c&&q(a).includes(c)}function s(a){return"not-sent"===a.state?`[send state: not-sent (${a.reason}): the message was not typed. CommandMate does not resend it; send it again once the input prompt is back (\`commandmate prompt <worktree-id> --json\` shows the screen and lastSend).]`:"indeterminate"===a.state?`[send state: indeterminate (${a.reason}): part of the message may have been typed or submitted. CommandMate does not resend it; do not resend before checking the pane (\`commandmate capture <worktree-id> --pane\`), or it may arrive twice.]`:`[send state: sent (${a.reason})]`}},22354:(a,b,c)=>{c.d(b,{F0:()=>j.F,K9:()=>e.K9,VM:()=>d.VM,_0:()=>f._0,c1:()=>k.c,o:()=>i.o,vm:()=>h.v,y_:()=>g.y_});var d=c(70096);c(66101);var e=c(45567);c(57510),c(38367);var f=c(25071),g=c(50474),h=c(70997),i=c(77904),j=c(76835),k=c(2734)},27289:(a,b,c)=>{c.d(b,{t:()=>j,z:()=>i});var d=c(10641),e=c(88807),f=c(56791),g=c(95506),h=c(66007);function i(a){if(!a)return a;try{if(!(0,h.h6)(a))return a;let b=(0,e.getDbInstance)();return(0,g.l0)(b,a)??a}catch{return a}}function j(a){if(!(0,h.h6)(a))return d.NextResponse.json({error:"Invalid worktree ID format"},{status:400});let b=(0,e.getDbInstance)(),c=(0,f.getWorktreeById)(b,i(a));return c||d.NextResponse.json({error:"Worktree not found"},{status:404})}},29567:(a,b,c)=>{c.d(b,{PJ:()=>h,To:()=>d,_Q:()=>k,a:()=>m,fm:()=>j,tq:()=>g});let d=1,e=["antigravity-trust","antigravity-model-picker","antigravity-permission","antigravity-slash-menu","composer","none","unknown"],f=["composer","none"];function g(a){return"string"==typeof a&&e.includes(a)}function h(a){return!f.includes(a)}let i=["antigravity-trust","antigravity-permission"];function j(a){return"string"==typeof a&&i.includes(a)}let k=["antigravity-trust"],l={"antigravity-trust":{position:2,optionCount:2,label:"No, exit"}};function m(a,b,c){let d=l[a];return void 0!==d&&d.position===b&&d.optionCount===c.length&&c[b-1].replace(/\s+/g," ").trim()===d.label}},50474:(a,b,c)=>{c.d(b,{y_:()=>d});function d(a){var b=a.noDecision;switch(b.kind){case"proceeds":return{safe:!0,blocksForMs:0,summary:"the agent continues with its own approval flow"};case"blocks":return{safe:!1,blocksForMs:null,summary:"the agent waits indefinitely; nothing else will unblock it"};case"blocksUntil":return{safe:!1,blocksForMs:b.timeoutMs,summary:`the agent waits up to ${b.timeoutMs}ms before continuing`}}}},77245:(a,b,c)=>{c.d(b,{hH:()=>i,iV:()=>k,rk:()=>j});var d=c(55511),e=c(36925);let f=(0,e.v)("__promptObservationTokenSecret",()=>({value:(0,d.randomBytes)(32)})),g=(0,e.v)("__promptObservationConsumedTokens",()=>new Map);function h(a,b){return(0,d.createHmac)("sha256",f.value).update(JSON.stringify(["po1",a.worktreeId,a.cliToolId,a.instanceId,a.sessionName,a.sessionGeneration,a.screenAppearedAt,a.kind,a.question,[...a.options],a.approvalTarget,a.selectedPosition,b])).digest()}function i(a,b){let c=Math.floor(b);return`po1.${c.toString(36)}.${h(a,c).toString("base64url")}`}function j(a){return Math.floor(a)+12e4}function k(a,b,c=Date.now()){let e=function(a,b,c=Date.now()){if("string"!=typeof a||a.length>80)return{ok:!1,reason:"malformed"};let e=a.split(".");if(3!==e.length||"po1"!==e[0]||!/^[0-9a-z]{1,12}$/.test(e[1])||!/^[A-Za-z0-9_-]{43}$/.test(e[2]))return{ok:!1,reason:"malformed"};let f=parseInt(e[1],36);if(!Number.isSafeInteger(f)||f.toString(36)!==e[1])return{ok:!1,reason:"malformed"};let g=Buffer.from(e[2],"base64url");if(g.toString("base64url")!==e[2])return{ok:!1,reason:"malformed"};let i=h(b,f);return g.length===i.length&&(0,d.timingSafeEqual)(g,i)?f-c>5e3?{ok:!1,reason:"not-yet-valid"}:c>=j(f)?{ok:!1,reason:"expired"}:{ok:!0,issuedAt:f}:{ok:!1,reason:"mismatch"}}(a,b,c);if(!e.ok)return e;for(let[a,b]of g)c>=b&&g.delete(a);let f=(0,d.createHash)("sha256").update(JSON.stringify(["po1",b.worktreeId,b.cliToolId,b.instanceId,b.sessionName,b.sessionGeneration,b.screenAppearedAt,b.kind,b.question,[...b.options],b.approvalTarget])).digest("base64url");return g.has(f)?{ok:!1,reason:"consumed"}:g.size>=4096?{ok:!1,reason:"consumed-store-full"}:(g.set(f,Math.floor(c)+12e4),e)}},95736:(a,b,c)=>{a.exports=c(44870)}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=9540,exports.ids=[2839,5220,9130,9540],exports.modules={2669:(a,b,c)=>{c.d(b,{JI:()=>n,M7:()=>d,Sr:()=>h,Zf:()=>f,c7:()=>e,lU:()=>k,mR:()=>j,qO:()=>i,su:()=>m,wQ:()=>l});let d="SESSION_STARTING",e="SESSION_START_FAILED",f="SESSION_START_UNAVAILABLE",g=[d,e];class h extends Error{constructor(a,b,c){super(`${a} did not reach its input prompt within ${Math.round(c/1e3)}s (initialization timeout). The tmux session '${b}' and its process are still running, so this is a slow start, not a failed one — the message was not delivered, but nothing needs repairing. Retry the send in a few seconds, or run \`commandmate capture <worktree-id>\` to see what it is waiting on.`),this.toolName=a,this.sessionName=b,this.timeoutMs=c,this.code=d,this.name="SessionStartTimeoutError"}}function i(a,b){return`${a} exited before reaching its input prompt: the tmux session '${b}' is back at a shell, so this is not a slow start and waiting will not help. The message was not delivered. Run \`commandmate capture <worktree-id>\` to see why it exited (for example a startup dialog answered with exit, or a missing login), fix that, then send again.`}class j extends Error{constructor(a,b,c){super(`${a} reported an error while starting in tmux session '${b}': "${c}". Retrying will not help until that is resolved; run \`commandmate capture <worktree-id>\` to see the session output.`),this.toolName=a,this.sessionName=b,this.detectedPattern=c,this.code=e,this.name="SessionStartFailedError"}}class k extends Error{constructor(a,b=`${a} is not installed. Please install it first.`){super(b),this.toolName=a,this.code=f,this.name="SessionStartUnavailableError"}}function l(a){return o(a)===d}function m(a){let b=o(a);return void 0!==b&&g.includes(b)}function n(a){return o(a)===f}function o(a){if("object"!=typeof a||null===a)return;let b=a.code;return"string"==typeof b?b:void 0}},20029:(a,b,c)=>{c.d(b,{C7:()=>r,KF:()=>n,Nq:()=>p,cu:()=>l,m4:()=>s,zE:()=>m});var d=c(55511),e=c(36925),f=c(72626),g=c(2669),h=c(7321);let i=(0,f.h)("session/send-attempt-state"),j=(0,e.v)("__sendAttemptRecords",()=>new Map);function k(a){return JSON.stringify([a.worktreeId,a.cliToolId,a.instanceId])}function l(a){return(0,d.createHash)("sha256").update(a,"utf8").digest("hex").slice(0,16)}function m(a,b,c=Date.now()){try{let d=k(a);for(j.delete(d),j.set(d,{at:Math.floor(c),state:b.state,reason:b.reason,messageDigest:l(b.content)});j.size>1024;){let a=j.keys().next().value;if(void 0===a)break;j.delete(a)}}catch(a){i.warn("send-attempt-record-failed",{error:a instanceof Error?a.message:String(a)})}}function n(a){return j.get(k(a))??null}let o=/Command failed: tmux |Failed to send (?:special )?keys? to tmux session|Failed to send special key:|Failed to paste message into tmux session/;function p(a){if("object"==typeof a&&null!==a&&a.code===g.M7)return{state:"not-sent",reason:"session-starting"};if("object"==typeof a&&null!==a&&a.code===h.L)return{state:"not-sent",reason:"plan-review"};let b=a instanceof Error?a.message:String(a);return/Enter was not pressed, so nothing was submitted/.test(b)?{state:"indeterminate",reason:"body-not-landed"}:/replaced by a TUI autocompletion/.test(b)?{state:"indeterminate",reason:"replaced-by-completion"}:/submit could not be confirmed/i.test(b)?{state:"indeterminate",reason:"submit-unconfirmed"}:o.test(b)?{state:"indeterminate",reason:"send-error"}:/prompt not ready/i.test(b)?{state:"not-sent",reason:"prompt-not-ready"}:/still holds unsent text after \d+ clear passes/.test(b)?{state:"not-sent",reason:"composer-not-empty"}:{state:"indeterminate",reason:"send-error"}}function q(a){return a.replace(/\s+/g,"")}function r(a,b){let c=q(b.split("\n").find(a=>""!==a.trim())??"").slice(0,32);return""!==c&&q(a).includes(c)}function s(a){return"not-sent"===a.state?`[send state: not-sent (${a.reason}): the message was not typed. CommandMate does not resend it; send it again once the input prompt is back (\`commandmate prompt <worktree-id> --json\` shows the screen and lastSend).]`:"indeterminate"===a.state?`[send state: indeterminate (${a.reason}): part of the message may have been typed or submitted. CommandMate does not resend it; do not resend before checking the pane (\`commandmate capture <worktree-id> --pane\`), or it may arrive twice.]`:`[send state: sent (${a.reason})]`}},22354:(a,b,c)=>{c.d(b,{F0:()=>j.F,K9:()=>e.K9,VM:()=>d.VM,_0:()=>f._0,c1:()=>k.c,o:()=>i.o,vm:()=>h.v,y_:()=>g.y_});var d=c(70096);c(66101);var e=c(45567);c(57510),c(38367);var f=c(25071),g=c(50474),h=c(70997),i=c(77904),j=c(76835),k=c(2734)},39687:(a,b,c)=>{c.d(b,{d:()=>y});var d=c(56791),e=c(8360),f=c(15194),g=c(95220),h=c(12462),i=c(43015),j=c(54325),k=c(72626),l=c(34331),m=c(40964),n=c(58707),o=c(2669),p=c(31990),q=c(20029),r=c(94154),s=c(34405),t=c(49319);let u=(0,k.h)("session/send-user-message");function v(a){return a instanceof Error?a.message:String(a)}async function w(a,b){let c=`${a}:${b}`,d=Date.now()+5e3;for(;(0,g.getActivePollers)().includes(c);){if(Date.now()>=d)return!1;await new Promise(a=>setTimeout(a,100))}return!0}async function x(a,b,c,d){if(!r.wn.has(b))return!1;try{let e=await (0,p.WD)(a,b,s._,c),f=(0,r.ji)(e,b);return"content"===f.state&&(0,q.C7)(f.text,d)}catch(a){return u.warn("send-composer-residue-read-failed",{error:v(a)}),!1}}async function y(a,b){let{worktreeId:c,content:k,cliToolId:p,instanceId:r,absoluteImagePath:s,copilotModel:y}=b,z=b.messageType??"normal",A=r??p,B=e.CLIToolManager.getInstance().getTool(p),C=(a,b)=>{(0,q.zE)({worktreeId:c,cliToolId:p,instanceId:A},{state:a,reason:b,content:k})},D=(0,m.mf)(p,c,r),E=await (0,l.L)(c,D,a);if(null===E||"foreign"===E.verdict)return C("not-sent","foreign-session"),u.warn("send-refused-foreign-session",{worktreeId:c,cliToolId:p,instanceId:A,sessionName:D,sessionPath:E?.sessionPath??null,reason:E?"foreign":"worktree_not_found"}),{ok:!1,stage:"foreign_session",error:E?`tmux session "${D}" belongs to another CommandMate server`:`Worktree '${c}' not found; cannot confirm tmux session "${D}" is this server's`};let F=await (0,n.a3)(c,p,r,{ignoreStructured:b.ignoreStructuredPromptGuard});if(F.waiting)return C("not-sent","prompt-waiting"),u.info("send-refused-prompt-waiting",{worktreeId:c,cliToolId:p,reason:F.reason,blockedBy:F.blockedBy}),{ok:!1,stage:"prompt_waiting",error:(0,n.br)(c,F.blockedBy)};if(y&&"copilot"===p){try{await B.sendModelCommand(c,y,r),u.info("copilot-model-command-sent",{model:y})}catch(a){return u.error("failed-to-send-model-command:",{error:v(a)}),C("not-sent","model-switch-failed"),{ok:!1,stage:"model",error:v(a)}}await w(c,A)||u.warn("previous-turn-poller-still-running",{worktreeId:c,instanceId:A,waitedMs:5e3})}let G=new Date;try{await (0,h.o4)(a,c,p,G,r)}catch(a){u.error("failed-to-save-pending-assistant-response:",{error:v(a)})}let H=null;try{let b=(0,d.getMessages)(a,c,{limit:1,cliToolId:p,instanceId:A,matchResolvedInstance:!0});b.length>0&&"user"===b[0].role&&b[0].content===k&&(H=b[0].id)}catch(a){u.error("failed-to-detect-orphaned-messages:",{error:v(a)})}try{s?(0,f._J)(B)?await B.sendMessageWithImage(c,k,s,r):await B.sendMessage(c,(0,t.TZ)(k,s),r):await B.sendMessage(c,k,r)}catch(b){u.error("failed-to-send-message-to:",{error:v(b)});let a=(0,q.Nq)(b);if("submit-unconfirmed"===a.reason&&await x(c,p,r,k)&&(a={state:"indeterminate",reason:"composer-residue"}),C(a.state,a.reason),(0,o.wQ)(b))return{ok:!1,stage:"send",error:b.message,code:o.M7};return{ok:!1,stage:"send",error:v(b)}}C("sent","submitted");let I=(0,d.createMessage)(a,{worktreeId:c,role:"user",content:k,messageType:z,timestamp:G,cliToolId:p,instanceId:r,requestId:b.requestId});try{(0,i.broadcastMessage)("message",{worktreeId:c,message:{...I,cliToolId:p,instanceId:A}})}catch(a){u.warn("user-message-broadcast-failed",{error:v(a)})}if(H)try{if((0,d.deleteMessageById)(a,H)){u.info("cleaned-up-orphaned-user");try{(0,i.broadcastMessage)(j.dz,{worktreeId:c,cliToolId:p,instanceId:A,reason:"orphan_cleanup"})}catch(a){u.warn("orphan-cleanup-broadcast-failed",{error:v(a)})}}}catch(a){u.error("failed-to-clean-up-orphaned-message:",{error:v(a)})}return(0,d.updateLastUserMessage)(a,c,k,G),(0,d.clearInProgressMessageId)(a,c,p,r),u.info("cleared-in-progress-message"),(0,g.startPolling)(c,p,r),{ok:!0,message:I}}},50474:(a,b,c)=>{c.d(b,{y_:()=>d});function d(a){var b=a.noDecision;switch(b.kind){case"proceeds":return{safe:!0,blocksForMs:0,summary:"the agent continues with its own approval flow"};case"blocks":return{safe:!1,blocksForMs:null,summary:"the agent waits indefinitely; nothing else will unblock it"};case"blocksUntil":return{safe:!1,blocksForMs:b.timeoutMs,summary:`the agent waits up to ${b.timeoutMs}ms before continuing`}}}},58707:(a,b,c)=>{c.d(b,{$n:()=>k,a3:()=>l,br:()=>m});var d=c(8360),e=c(31990),f=c(95595),g=c(34405),h=c(72626),i=c(30008);let j=(0,h.h)("prompt-waiting-guard"),k="PROMPT_WAITING";async function l(a,b,c,h){try{let k=d.CLIToolManager.getInstance().getTool(b);if(!await k.isRunning(a,c))return{waiting:!1};let l=await (0,e.Wh)(a,b,g._,c),m=(0,f.WC)(l,b),n=(0,i._G)({worktreeId:a,cliToolId:b,instanceId:c,scraper:{status:m.status,reason:m.reason,hasActivePrompt:m.hasActivePrompt},ignoreStructured:h?.ignoreStructured});if(!n.blocksSend)return null!==n.structuredSendBlockSuppressed&&j.info("structured-send-guard-not-applied",{worktreeId:a,cliToolId:b,instanceId:c,suppressed:n.structuredSendBlockSuppressed,promptWaitingSince:n.structured?.at??null}),{waiting:!1};return{waiting:!0,reason:n.blockReason??void 0,blockedBy:n.blockedBy??void 0}}catch(c){return j.warn("prompt-waiting-check-failed",{worktreeId:a,cliToolId:b,error:c instanceof Error?c.message:String(c)}),{waiting:!1}}}function m(a,b){let c=`${a} is waiting on a prompt. Sending now would type into the prompt's input line instead of reaching the agent, and would leave that text in place for the next answer. Answer the prompt first: \`commandmate respond ${a} <answer>\`.`;if("structured"!==b)return c;let d=Math.round(i.j0/6e4);return`${c} This dialog was reported by the agent's own hooks and is not visible to the terminal scraper, so if the pane looks idle the record has outlived its dialog: it stops blocking sends ${d} minutes after it was reported, or immediately with \`commandmate send ${a} <message> --ignore-structured-prompt\` (server-wide: ${i.F1}=off).`}},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";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8606],{38606:(n,e,t)=>{t.d(e,{pu:()=>u,A7:()=>c,kA:()=>l,dw:()=>g,Pn:()=>p,px:()=>a,XK:()=>y});var i=t(54014),s=t(55449);function l(n){return n?n.isWaitingForResponse?"waiting":n.isProcessing?"running":n.isRunning?"ready":"idle":"idle"}function a(n){return(null==n?void 0:n.isUnclassified)===!0&&"ready"===l(n)}let r={start:"nextAction.start",sendMessage:"nextAction.sendMessage",approveReject:"nextAction.approveReject",replyToPrompt:"nextAction.replyToPrompt",checkStalled:"nextAction.checkStalled",running:"nextAction.running"},o="exited",u="unknown",d={idle:null,ready:"ready",running:"running",generating:"running",waiting:"waiting"};function c(n){if(!n)return"idle";let e=Object.values(n).filter(n=>void 0!==n);return 0===e.length?"idle":e.includes("waiting")?"waiting":e.includes("running")?"running":e.includes("generating")?"generating":e.includes("ready")?"ready":"idle"}function g(n,e,t,s){return n?Object.entries(n).map(n=>{var l;let[a,r]=n,o=null!=(l=null==e?void 0:e[a])?l:(0,i.f_)(a,a),d=null==t?void 0:t(a),c="ready"===r&&(null==s?void 0:s.has(a))?u:null!=r?r:"idle";return"".concat(o,": ").concat(c).concat(d?" (".concat(d,")"):"")}).join(", "):""}function p(n,e){return!!n&&!!e&&0!==e.length&&"ready"===c(n)&&e.some(e=>"ready"===n[e])}let f=["prompt","menu","unclassified"];function y(n){var e,t,u,g,y,v,w;let A=l(void 0!==n.isSessionRunning?{isRunning:null!=(e=n.isSessionRunning)&&e,isWaitingForResponse:null!=(t=n.isWaitingForResponse)&&t,isProcessing:null!=(u=n.isProcessing)&&u}:void 0),h=!!n.lastAssistantMessageAt&&(!n.lastViewedAt||new Date(n.lastAssistantMessageAt)>new Date(n.lastViewedAt)),{cliStatus:S,cliStatusLabels:m,exitedInstanceIds:R,unclassifiedInstanceIds:k}=function(n){var e,t,r,u,d,c,g;let p={},f={},y=[],v=[],w=n.sessionStatusByInstance;if(!w){for(let c of null!=(e=n.selectedAgents)?e:(0,s.sA)())p[c]=l(null==(t=n.sessionStatusByCli)?void 0:t[c]),f[c]=(0,i.oo)(c),(null==(u=n.sessionStatusByCli)||null==(r=u[c])?void 0:r.sessionStatusReason)===o&&y.push(c),a(null==(d=n.sessionStatusByCli)?void 0:d[c])&&v.push(c);return{cliStatus:p,cliStatusLabels:f,exitedInstanceIds:y,unclassifiedInstanceIds:v}}let A=n.agentInstances&&n.agentInstances.length>0?n.agentInstances:(0,i.lu)(null!=(c=n.selectedAgents)?c:(0,s.sA)()),h=new Set;for(let n of A)h.add(n.id),p[n.id]=l(w[n.id]),f[n.id]=(0,i.sw)(n),(null==(g=w[n.id])?void 0:g.sessionStatusReason)===o&&y.push(n.id),a(w[n.id])&&v.push(n.id);for(let[n,e]of Object.entries(w)){if(h.has(n))continue;let t=l(e);"idle"!==t&&(p[n]=t,f[n]=function(n){let e=i.XH.find(e=>n.startsWith("".concat(e,"-")));if(e){let t=n.slice(e.length+1);return"".concat((0,i.oo)(e)," ").concat(t)}return(0,i.f_)(n,n)}(n),a(e)&&v.push(n))}return{cliStatus:p,cliStatusLabels:f,exitedInstanceIds:y,unclassifiedInstanceIds:v}}(n),x=c(S),{waitingKind:j,awaitingInstruction:B}=function(n){var e,t,i;let s=Object.values(null!=(t=null!=(e=n.sessionStatusByInstance)?e:n.sessionStatusByCli)?t:{}).filter(n=>void 0!==n),l=!1,a=new Set;for(let n of s)n.awaitingInstruction&&(l=!0),n.waitingKind&&a.add(n.waitingKind);return{waitingKind:null!=(i=f.find(n=>a.has(n)))?i:null,awaitingInstruction:l}}(n),I=p(S,k);return{id:n.id,name:n.name,repositoryName:null!=(g=n.repositoryDisplayName)?g:n.repositoryName,status:A,hasUnread:h,lastActivity:n.updatedAt,lastActivityByInstance:n.lastActivityByInstance,description:n.description,cliStatus:S,cliStatusLabels:m,exitedInstanceIds:R,unclassifiedInstanceIds:k,worktreePath:n.path,worktreeStatus:null!=(y=n.status)?y:null,waitingKind:j,awaitingInstruction:B,nextActionKey:I?void 0:(v=d[x],w="waiting"===x?"approval":null,v&&"idle"!==v?"ready"===v?r.sendMessage:"waiting"===v&&"approval"===w?r.approveReject:"waiting"===v?r.replyToPrompt:(0,r.running):r.start)}}}}]);