commandmate 0.49.0 → 0.49.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (806) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +251 -248
  3. package/.next/app-path-routes-manifest.json +22 -21
  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 +1 -1
  169. package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js.nft.json +1 -1
  170. package/.next/server/app/api/worktrees/[id]/instances/opencode/route_client-reference-manifest.js +1 -1
  171. package/.next/server/app/api/worktrees/[id]/interrupt/route.js +1 -1
  172. package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
  173. package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
  174. package/.next/server/app/api/worktrees/[id]/kill-session/route.js +2 -1
  175. package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -1
  176. package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
  177. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route.js +1 -1
  178. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route.js.nft.json +1 -1
  179. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
  180. package/.next/server/app/api/worktrees/[id]/logs/route.js +2 -2
  181. package/.next/server/app/api/worktrees/[id]/logs/route.js.nft.json +1 -1
  182. package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
  183. package/.next/server/app/api/worktrees/[id]/marp-render/route.js +1 -1
  184. package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
  185. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route.js +1 -1
  186. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
  187. package/.next/server/app/api/worktrees/[id]/memos/route.js +1 -1
  188. package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
  189. package/.next/server/app/api/worktrees/[id]/messages/route.js +1 -1
  190. package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
  191. package/.next/server/app/api/worktrees/[id]/opencode/diff/route.js +1 -1
  192. package/.next/server/app/api/worktrees/[id]/opencode/diff/route.js.nft.json +1 -1
  193. package/.next/server/app/api/worktrees/[id]/opencode/diff/route_client-reference-manifest.js +1 -1
  194. package/.next/server/app/api/worktrees/[id]/opencode/session/route.js +1 -1
  195. package/.next/server/app/api/worktrees/[id]/opencode/session/route.js.nft.json +1 -1
  196. package/.next/server/app/api/worktrees/[id]/opencode/session/route_client-reference-manifest.js +1 -1
  197. package/.next/server/app/api/worktrees/[id]/opencode/share/route.js +1 -1
  198. package/.next/server/app/api/worktrees/[id]/opencode/share/route.js.nft.json +1 -1
  199. package/.next/server/app/api/worktrees/[id]/opencode/share/route_client-reference-manifest.js +1 -1
  200. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
  201. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -1
  202. package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
  203. package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route.js +1 -1
  204. package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route.js.nft.json +1 -1
  205. package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route_client-reference-manifest.js +1 -1
  206. package/.next/server/app/api/worktrees/[id]/resolve-target/route.js +1 -1
  207. package/.next/server/app/api/worktrees/[id]/resolve-target/route_client-reference-manifest.js +1 -1
  208. package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -1
  209. package/.next/server/app/api/worktrees/[id]/respond/route.js.nft.json +1 -1
  210. package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
  211. package/.next/server/app/api/worktrees/[id]/route.js +1 -1
  212. package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
  213. package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
  214. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js +1 -1
  215. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
  216. package/.next/server/app/api/worktrees/[id]/schedules/active/route.js +1 -1
  217. package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
  218. package/.next/server/app/api/worktrees/[id]/schedules/route.js +1 -1
  219. package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
  220. package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
  221. package/.next/server/app/api/worktrees/[id]/send/route.js +144 -1
  222. package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
  223. package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
  224. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +2 -2
  225. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -1
  226. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
  227. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
  228. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
  229. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
  230. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
  231. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route_client-reference-manifest.js +1 -1
  232. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route_client-reference-manifest.js +1 -1
  233. package/.next/server/app/api/worktrees/[id]/skills/route.js +1 -1
  234. package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
  235. package/.next/server/app/api/worktrees/[id]/slash-commands/route.js +1 -1
  236. package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
  237. package/.next/server/app/api/worktrees/[id]/special-keys/route.js +1 -1
  238. package/.next/server/app/api/worktrees/[id]/special-keys/route.js.nft.json +1 -1
  239. package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
  240. package/.next/server/app/api/worktrees/[id]/tasks/route.js +1 -1
  241. package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -1
  242. package/.next/server/app/api/worktrees/[id]/terminal/route.js +103 -1
  243. package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
  244. package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
  245. package/.next/server/app/api/worktrees/[id]/timers/history/route.js +1 -1
  246. package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
  247. package/.next/server/app/api/worktrees/[id]/timers/route.js +1 -1
  248. package/.next/server/app/api/worktrees/[id]/timers/route.js.nft.json +1 -1
  249. package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
  250. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route.js +1 -1
  251. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route.js.nft.json +1 -1
  252. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  253. package/.next/server/app/api/worktrees/[id]/todos/route.js +1 -1
  254. package/.next/server/app/api/worktrees/[id]/todos/route.js.nft.json +1 -1
  255. package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
  256. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
  257. package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
  258. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
  259. package/.next/server/app/api/worktrees/[id]/verify/config/route.js +1 -1
  260. package/.next/server/app/api/worktrees/[id]/verify/config/route_client-reference-manifest.js +1 -1
  261. package/.next/server/app/api/worktrees/[id]/verify/route.js +1 -1
  262. package/.next/server/app/api/worktrees/[id]/verify/route.js.nft.json +1 -1
  263. package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -1
  264. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route.js +1 -1
  265. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route.js.nft.json +1 -1
  266. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route_client-reference-manifest.js +1 -1
  267. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route.js +1 -1
  268. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -1
  269. package/.next/server/app/api/worktrees/[id]/verify/runs/route.js +1 -1
  270. package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -1
  271. package/.next/server/app/api/worktrees/[id]/viewed/route.js +1 -1
  272. package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
  273. package/.next/server/app/api/worktrees/apply-default-agents/route_client-reference-manifest.js +1 -1
  274. package/.next/server/app/api/worktrees/route.js +1 -1
  275. package/.next/server/app/api/worktrees/route.js.nft.json +1 -1
  276. package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
  277. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  278. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  279. package/.next/server/app/more/page_client-reference-manifest.js +1 -1
  280. package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  281. package/.next/server/app/page_client-reference-manifest.js +1 -1
  282. package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
  283. package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
  284. package/.next/server/app/review/page.js +1 -1
  285. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  286. package/.next/server/app/sessions/page.js +1 -1
  287. package/.next/server/app/sessions/page.js.nft.json +1 -1
  288. package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  289. package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
  290. package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
  291. package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  292. package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
  293. package/.next/server/app/worktrees/[id]/page.js +11 -11
  294. package/.next/server/app/worktrees/[id]/page.js.nft.json +1 -1
  295. package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
  296. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
  297. package/.next/server/app-paths-manifest.json +22 -21
  298. package/.next/server/chunks/1062.js +1 -0
  299. package/.next/server/chunks/{936.js → 110.js} +1 -1
  300. package/.next/server/chunks/1501.js +5 -4
  301. package/.next/server/chunks/1656.js +2 -2
  302. package/.next/server/chunks/1957.js +2 -0
  303. package/.next/server/chunks/2119.js +1 -1
  304. package/.next/server/chunks/2404.js +1 -1
  305. package/.next/server/chunks/2445.js +1 -1
  306. package/.next/server/chunks/2897.js +1 -0
  307. package/.next/server/chunks/3417.js +1 -0
  308. package/.next/server/chunks/3505.js +1 -1
  309. package/.next/server/chunks/{4280.js → 3756.js} +1 -1
  310. package/.next/server/chunks/3801.js +31 -0
  311. package/.next/server/chunks/4911.js +1 -0
  312. package/.next/server/chunks/4936.js +1 -0
  313. package/.next/server/chunks/5209.js +2 -1
  314. package/.next/server/chunks/5354.js +1 -1
  315. package/.next/server/chunks/{9130.js → 5630.js} +1 -1
  316. package/.next/server/chunks/610.js +1 -0
  317. package/.next/server/chunks/6119.js +1 -1
  318. package/.next/server/chunks/6130.js +1 -1
  319. package/.next/server/chunks/6401.js +1 -1
  320. package/.next/server/chunks/6486.js +1 -1
  321. package/.next/server/chunks/6781.js +1 -1
  322. package/.next/server/chunks/6808.js +4 -0
  323. package/.next/server/chunks/7023.js +14 -0
  324. package/.next/server/chunks/7905.js +1 -1
  325. package/.next/server/chunks/8581.js +8 -8
  326. package/.next/server/chunks/8728.js +2 -2
  327. package/.next/server/chunks/8782.js +1 -1
  328. package/.next/server/chunks/8807.js +63 -53
  329. package/.next/server/chunks/8918.js +103 -1
  330. package/.next/server/chunks/9198.js +144 -0
  331. package/.next/server/chunks/9390.js +1 -1
  332. package/.next/server/chunks/9584.js +1 -1
  333. package/.next/server/chunks/9627.js +1 -1
  334. package/.next/server/chunks/9731.js +3 -3
  335. package/.next/server/middleware-manifest.json +5 -5
  336. package/.next/server/pages/500.html +1 -1
  337. package/.next/server/server-reference-manifest.json +1 -1
  338. package/.next/static/chunks/{2407-ab92ae9837c39dce.js → 2407-07a237575e1ceb9e.js} +1 -1
  339. package/.next/static/chunks/3931-61ad1a4fc0208d0e.js +1 -0
  340. package/.next/static/chunks/5794-7975b8e51e731b19.js +1 -0
  341. package/.next/static/chunks/6966-d8dc6032410ffaba.js +1 -0
  342. package/.next/static/chunks/7197-ed3b3d99ac3bd450.js +1 -0
  343. package/.next/static/chunks/7636-a48cf0f7110250c5.js +1 -0
  344. package/.next/static/chunks/app/api/agents/update/route-a4f129c451de7859.js +1 -0
  345. package/.next/static/chunks/app/api/agents/versions/route-a4f129c451de7859.js +1 -0
  346. package/.next/static/chunks/app/api/app/release-notes/route-a4f129c451de7859.js +1 -0
  347. package/.next/static/chunks/app/api/app/update/route-a4f129c451de7859.js +1 -0
  348. package/.next/static/chunks/app/api/app/update-check/route-a4f129c451de7859.js +1 -0
  349. package/.next/static/chunks/app/api/auth/login/route-a4f129c451de7859.js +1 -0
  350. package/.next/static/chunks/app/api/auth/logout/route-a4f129c451de7859.js +1 -0
  351. package/.next/static/chunks/app/api/auth/status/route-a4f129c451de7859.js +1 -0
  352. package/.next/static/chunks/app/api/capabilities/route-a4f129c451de7859.js +1 -0
  353. package/.next/static/chunks/app/api/daily-summary/route-a4f129c451de7859.js +1 -0
  354. package/.next/static/chunks/app/api/daily-summary/status/route-a4f129c451de7859.js +1 -0
  355. package/.next/static/chunks/app/api/external-apps/[id]/health/route-a4f129c451de7859.js +1 -0
  356. package/.next/static/chunks/app/api/external-apps/[id]/route-a4f129c451de7859.js +1 -0
  357. package/.next/static/chunks/app/api/external-apps/route-a4f129c451de7859.js +1 -0
  358. package/.next/static/chunks/app/api/fs/browse/route-a4f129c451de7859.js +1 -0
  359. package/.next/static/chunks/app/api/fs/recent-paths/route-a4f129c451de7859.js +1 -0
  360. package/.next/static/chunks/app/api/hooks/agent-event/route-a4f129c451de7859.js +1 -0
  361. package/.next/static/chunks/app/api/hooks/claude-done/route-a4f129c451de7859.js +1 -0
  362. package/.next/static/chunks/app/api/hooks/permission-request/route-a4f129c451de7859.js +1 -0
  363. package/.next/static/chunks/app/api/metrics/vibe/route-a4f129c451de7859.js +1 -0
  364. package/.next/static/chunks/app/api/ollama/models/route-a4f129c451de7859.js +1 -0
  365. package/.next/static/chunks/app/api/push/escalation/route-a4f129c451de7859.js +1 -0
  366. package/.next/static/chunks/app/api/push/subscriptions/route-a4f129c451de7859.js +1 -0
  367. package/.next/static/chunks/app/api/push/vapid/route-a4f129c451de7859.js +1 -0
  368. package/.next/static/chunks/app/api/relays/[relayId]/cancel/route-a4f129c451de7859.js +1 -0
  369. package/.next/static/chunks/app/api/relays/[relayId]/route-a4f129c451de7859.js +1 -0
  370. package/.next/static/chunks/app/api/relays/route-a4f129c451de7859.js +1 -0
  371. package/.next/static/chunks/app/api/remote/pair/route-a4f129c451de7859.js +1 -0
  372. package/.next/static/chunks/app/api/repositories/[id]/route-a4f129c451de7859.js +1 -0
  373. package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-a4f129c451de7859.js +1 -0
  374. package/.next/static/chunks/app/api/repositories/clone/route-a4f129c451de7859.js +1 -0
  375. package/.next/static/chunks/app/api/repositories/excluded/route-a4f129c451de7859.js +1 -0
  376. package/.next/static/chunks/app/api/repositories/restore/route-a4f129c451de7859.js +1 -0
  377. package/.next/static/chunks/app/api/repositories/route-a4f129c451de7859.js +1 -0
  378. package/.next/static/chunks/app/api/repositories/scan/route-a4f129c451de7859.js +1 -0
  379. package/.next/static/chunks/app/api/repositories/sync/route-a4f129c451de7859.js +1 -0
  380. package/.next/static/chunks/app/api/repositories/validate-path/route-a4f129c451de7859.js +1 -0
  381. package/.next/static/chunks/app/api/settings/default-agents/route-a4f129c451de7859.js +1 -0
  382. package/.next/static/chunks/app/api/settings/default-surface-mode/route-a4f129c451de7859.js +1 -0
  383. package/.next/static/chunks/app/api/sidebar/group-order/route-a4f129c451de7859.js +1 -0
  384. package/.next/static/chunks/app/api/skills/[id]/route-a4f129c451de7859.js +1 -0
  385. package/.next/static/chunks/app/api/skills/installations/route-a4f129c451de7859.js +1 -0
  386. package/.next/static/chunks/app/api/skills/operations/route-a4f129c451de7859.js +1 -0
  387. package/.next/static/chunks/app/api/skills/reindex/route-a4f129c451de7859.js +1 -0
  388. package/.next/static/chunks/app/api/skills/route-a4f129c451de7859.js +1 -0
  389. package/.next/static/chunks/app/api/slash-commands/route-a4f129c451de7859.js +1 -0
  390. package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-a4f129c451de7859.js +1 -0
  391. package/.next/static/chunks/app/api/tasks/[taskId]/route-a4f129c451de7859.js +1 -0
  392. package/.next/static/chunks/app/api/templates/[id]/route-a4f129c451de7859.js +1 -0
  393. package/.next/static/chunks/app/api/templates/route-a4f129c451de7859.js +1 -0
  394. package/.next/static/chunks/app/api/verification/runs/[runId]/route-a4f129c451de7859.js +1 -0
  395. package/.next/static/chunks/app/api/verification/runs/route-a4f129c451de7859.js +1 -0
  396. package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-a4f129c451de7859.js +1 -0
  397. package/.next/static/chunks/app/api/worktrees/[id]/capture/route-a4f129c451de7859.js +1 -0
  398. package/.next/static/chunks/app/api/worktrees/[id]/clear-composer/route-a4f129c451de7859.js +1 -0
  399. package/.next/static/chunks/app/api/worktrees/[id]/cli-reference/route-a4f129c451de7859.js +1 -0
  400. package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-a4f129c451de7859.js +1 -0
  401. package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-a4f129c451de7859.js +1 -0
  402. package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-a4f129c451de7859.js +1 -0
  403. package/.next/static/chunks/app/api/worktrees/[id]/direct-input/route-a4f129c451de7859.js +1 -0
  404. package/.next/static/chunks/app/api/worktrees/[id]/env/route-a4f129c451de7859.js +1 -0
  405. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-a4f129c451de7859.js +1 -0
  406. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-a4f129c451de7859.js +1 -0
  407. package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-a4f129c451de7859.js +1 -0
  408. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-a4f129c451de7859.js +1 -0
  409. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-a4f129c451de7859.js +1 -0
  410. package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-a4f129c451de7859.js +1 -0
  411. package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-a4f129c451de7859.js +1 -0
  412. package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-a4f129c451de7859.js +1 -0
  413. package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-a4f129c451de7859.js +1 -0
  414. package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-a4f129c451de7859.js +1 -0
  415. package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-a4f129c451de7859.js +1 -0
  416. package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-a4f129c451de7859.js +1 -0
  417. package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-a4f129c451de7859.js +1 -0
  418. package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-a4f129c451de7859.js +1 -0
  419. package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-a4f129c451de7859.js +1 -0
  420. package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-a4f129c451de7859.js +1 -0
  421. package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-a4f129c451de7859.js +1 -0
  422. package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-a4f129c451de7859.js +1 -0
  423. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-a4f129c451de7859.js +1 -0
  424. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-a4f129c451de7859.js +1 -0
  425. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-a4f129c451de7859.js +1 -0
  426. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-a4f129c451de7859.js +1 -0
  427. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-a4f129c451de7859.js +1 -0
  428. package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-a4f129c451de7859.js +1 -0
  429. package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-a4f129c451de7859.js +1 -0
  430. package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-a4f129c451de7859.js +1 -0
  431. package/.next/static/chunks/app/api/worktrees/[id]/instances/notes/route-a4f129c451de7859.js +1 -0
  432. package/.next/static/chunks/app/api/worktrees/[id]/instances/opencode/route-a4f129c451de7859.js +1 -0
  433. package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-a4f129c451de7859.js +1 -0
  434. package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-a4f129c451de7859.js +1 -0
  435. package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-a4f129c451de7859.js +1 -0
  436. package/.next/static/chunks/app/api/worktrees/[id]/logs/route-a4f129c451de7859.js +1 -0
  437. package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-a4f129c451de7859.js +1 -0
  438. package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-a4f129c451de7859.js +1 -0
  439. package/.next/static/chunks/app/api/worktrees/[id]/memos/route-a4f129c451de7859.js +1 -0
  440. package/.next/static/chunks/app/api/worktrees/[id]/messages/route-a4f129c451de7859.js +1 -0
  441. package/.next/static/chunks/app/api/worktrees/[id]/opencode/diff/route-a4f129c451de7859.js +1 -0
  442. package/.next/static/chunks/app/api/worktrees/[id]/opencode/session/route-a4f129c451de7859.js +1 -0
  443. package/.next/static/chunks/app/api/worktrees/[id]/opencode/share/route-a4f129c451de7859.js +1 -0
  444. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-a4f129c451de7859.js +1 -0
  445. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/strict/route-a4f129c451de7859.js +1 -0
  446. package/.next/static/chunks/app/api/worktrees/[id]/resolve-target/route-a4f129c451de7859.js +1 -0
  447. package/.next/static/chunks/app/api/worktrees/[id]/respond/route-a4f129c451de7859.js +1 -0
  448. package/.next/static/chunks/app/api/worktrees/[id]/route-a4f129c451de7859.js +1 -0
  449. package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-a4f129c451de7859.js +1 -0
  450. package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-a4f129c451de7859.js +1 -0
  451. package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-a4f129c451de7859.js +1 -0
  452. package/.next/static/chunks/app/api/worktrees/[id]/search/route-a4f129c451de7859.js +1 -0
  453. package/.next/static/chunks/app/api/worktrees/[id]/send/route-a4f129c451de7859.js +1 -0
  454. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-a4f129c451de7859.js +1 -0
  455. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-a4f129c451de7859.js +1 -0
  456. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-a4f129c451de7859.js +1 -0
  457. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-a4f129c451de7859.js +1 -0
  458. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-a4f129c451de7859.js +1 -0
  459. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-a4f129c451de7859.js +1 -0
  460. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-a4f129c451de7859.js +1 -0
  461. package/.next/static/chunks/app/api/worktrees/[id]/skills/route-a4f129c451de7859.js +1 -0
  462. package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-a4f129c451de7859.js +1 -0
  463. package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-a4f129c451de7859.js +1 -0
  464. package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-a4f129c451de7859.js +1 -0
  465. package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-a4f129c451de7859.js +1 -0
  466. package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-a4f129c451de7859.js +1 -0
  467. package/.next/static/chunks/app/api/worktrees/[id]/timers/route-a4f129c451de7859.js +1 -0
  468. package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-a4f129c451de7859.js +1 -0
  469. package/.next/static/chunks/app/api/worktrees/[id]/todos/route-a4f129c451de7859.js +1 -0
  470. package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-a4f129c451de7859.js +1 -0
  471. package/.next/static/chunks/app/api/worktrees/[id]/tree/route-a4f129c451de7859.js +1 -0
  472. package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-a4f129c451de7859.js +1 -0
  473. package/.next/static/chunks/app/api/worktrees/[id]/verify/config/route-a4f129c451de7859.js +1 -0
  474. package/.next/static/chunks/app/api/worktrees/[id]/verify/route-a4f129c451de7859.js +1 -0
  475. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route-a4f129c451de7859.js +1 -0
  476. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-a4f129c451de7859.js +1 -0
  477. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-a4f129c451de7859.js +1 -0
  478. package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-a4f129c451de7859.js +1 -0
  479. package/.next/static/chunks/app/api/worktrees/apply-default-agents/route-a4f129c451de7859.js +1 -0
  480. package/.next/static/chunks/app/api/worktrees/route-a4f129c451de7859.js +1 -0
  481. package/.next/static/chunks/app/layout-4f64316957b0a8e5.js +1 -0
  482. package/.next/static/chunks/app/manifest.webmanifest/route-a4f129c451de7859.js +1 -0
  483. package/.next/static/chunks/app/more/page-ff5af5ca48774c89.js +1 -0
  484. package/.next/static/chunks/app/page-b4863bfe0452e09d.js +1 -0
  485. package/.next/static/chunks/app/proxy/[...path]/route-a4f129c451de7859.js +1 -0
  486. package/.next/static/chunks/app/review/page-ff3efb96fdf9bb4b.js +1 -0
  487. package/.next/static/chunks/app/sessions/page-c6eb7c02db2f4c80.js +1 -0
  488. package/.next/static/chunks/app/worktrees/[id]/layout-a4f129c451de7859.js +1 -0
  489. package/.next/static/chunks/app/worktrees/[id]/page-33afc6aa96289fb0.js +1 -0
  490. package/.next/static/css/c1e307d05daf93b6.css +1 -0
  491. package/.next/trace +13 -13
  492. package/.next/types/app/api/relays/[relayId]/route.ts +347 -0
  493. package/.next/types/routes.d.ts +2 -1
  494. package/.next/types/validator.ts +9 -0
  495. package/dist/cli/commands/ask.d.ts.map +1 -1
  496. package/dist/cli/commands/ask.js +233 -17
  497. package/dist/cli/commands/attach.d.ts +4 -1
  498. package/dist/cli/commands/attach.d.ts.map +1 -1
  499. package/dist/cli/commands/attach.js +19 -7
  500. package/dist/cli/commands/command-target.d.ts +7 -0
  501. package/dist/cli/commands/command-target.d.ts.map +1 -1
  502. package/dist/cli/commands/command-target.js +10 -0
  503. package/dist/cli/commands/instances.d.ts.map +1 -1
  504. package/dist/cli/commands/instances.js +38 -2
  505. package/dist/cli/commands/message-dispatch.d.ts +39 -5
  506. package/dist/cli/commands/message-dispatch.d.ts.map +1 -1
  507. package/dist/cli/commands/message-dispatch.js +100 -8
  508. package/dist/cli/commands/relays.d.ts +26 -2
  509. package/dist/cli/commands/relays.d.ts.map +1 -1
  510. package/dist/cli/commands/relays.js +70 -5
  511. package/dist/cli/commands/respond-strict.d.ts.map +1 -1
  512. package/dist/cli/commands/respond-strict.js +22 -5
  513. package/dist/cli/commands/respond.d.ts +12 -0
  514. package/dist/cli/commands/respond.d.ts.map +1 -1
  515. package/dist/cli/commands/respond.js +83 -18
  516. package/dist/cli/commands/send.d.ts.map +1 -1
  517. package/dist/cli/commands/send.js +14 -8
  518. package/dist/cli/commands/wait-hook-stop-settle.d.ts +66 -0
  519. package/dist/cli/commands/wait-hook-stop-settle.d.ts.map +1 -0
  520. package/dist/cli/commands/wait-hook-stop-settle.js +150 -0
  521. package/dist/cli/commands/wait-instance.d.ts +29 -0
  522. package/dist/cli/commands/wait-instance.d.ts.map +1 -0
  523. package/dist/cli/commands/wait-instance.js +56 -0
  524. package/dist/cli/commands/wait-notices.d.ts +87 -0
  525. package/dist/cli/commands/wait-notices.d.ts.map +1 -0
  526. package/dist/cli/commands/wait-notices.js +301 -0
  527. package/dist/cli/commands/wait-poll-bookkeeping.d.ts +15 -0
  528. package/dist/cli/commands/wait-poll-bookkeeping.d.ts.map +1 -0
  529. package/dist/cli/commands/wait-poll-bookkeeping.js +57 -0
  530. package/dist/cli/commands/wait-poll-state.d.ts +136 -0
  531. package/dist/cli/commands/wait-poll-state.d.ts.map +1 -0
  532. package/dist/cli/commands/wait-poll-state.js +6 -0
  533. package/dist/cli/commands/wait-timing.d.ts +46 -0
  534. package/dist/cli/commands/wait-timing.d.ts.map +1 -0
  535. package/dist/cli/commands/wait-timing.js +99 -0
  536. package/dist/cli/commands/wait-turn-boundary.d.ts +284 -0
  537. package/dist/cli/commands/wait-turn-boundary.d.ts.map +1 -0
  538. package/dist/cli/commands/wait-turn-boundary.js +427 -0
  539. package/dist/cli/commands/wait-verify.d.ts +51 -0
  540. package/dist/cli/commands/wait-verify.d.ts.map +1 -0
  541. package/dist/cli/commands/wait-verify.js +128 -0
  542. package/dist/cli/commands/wait.d.ts +6 -105
  543. package/dist/cli/commands/wait.d.ts.map +1 -1
  544. package/dist/cli/commands/wait.js +240 -968
  545. package/dist/cli/commands/whoami.d.ts.map +1 -1
  546. package/dist/cli/commands/whoami.js +3 -1
  547. package/dist/cli/docs/agent-operations.d.ts +2 -2
  548. package/dist/cli/docs/agent-operations.d.ts.map +1 -1
  549. package/dist/cli/docs/agent-operations.js +24 -1
  550. package/dist/cli/types/api-responses.d.ts +49 -3
  551. package/dist/cli/types/api-responses.d.ts.map +1 -1
  552. package/dist/cli/utils/api-client.d.ts +69 -1
  553. package/dist/cli/utils/api-client.d.ts.map +1 -1
  554. package/dist/cli/utils/api-client.js +226 -18
  555. package/dist/cli/utils/follow-up-command.d.ts +38 -0
  556. package/dist/cli/utils/follow-up-command.d.ts.map +1 -0
  557. package/dist/cli/utils/follow-up-command.js +57 -0
  558. package/dist/cli/utils/reply-ledger.d.ts +80 -1
  559. package/dist/cli/utils/reply-ledger.d.ts.map +1 -1
  560. package/dist/cli/utils/reply-ledger.js +147 -2
  561. package/dist/cli/utils/server-capabilities.d.ts +18 -0
  562. package/dist/cli/utils/server-capabilities.d.ts.map +1 -1
  563. package/dist/cli/utils/server-capabilities.js +36 -3
  564. package/dist/cli/utils/session-target.d.ts +1 -1
  565. package/dist/cli/utils/session-target.d.ts.map +1 -1
  566. package/dist/cli/utils/session-target.js +3 -0
  567. package/dist/cli/utils/verify-runner.d.ts +7 -0
  568. package/dist/cli/utils/verify-runner.d.ts.map +1 -1
  569. package/dist/cli/utils/verify-runner.js +51 -15
  570. package/dist/lib/cli-tools/session-name.d.ts.map +1 -1
  571. package/dist/lib/cli-tools/session-name.js +11 -3
  572. package/dist/lib/session/send-attempt-types.d.ts +48 -1
  573. package/dist/lib/session/send-attempt-types.d.ts.map +1 -1
  574. package/dist/lib/session/send-attempt-types.js +18 -1
  575. package/dist/lib/verification/session-kill-ledger.d.ts +110 -0
  576. package/dist/lib/verification/session-kill-ledger.d.ts.map +1 -0
  577. package/dist/lib/verification/session-kill-ledger.js +174 -0
  578. package/dist/server/locales/en/worktree.json +20 -3
  579. package/dist/server/locales/ja/worktree.json +20 -3
  580. package/dist/server/src/config/cli-tool-timing-config.js +1 -7
  581. package/dist/server/src/lib/auto-yes-poller.js +54 -11
  582. package/dist/server/src/lib/cli-tools/antigravity.js +45 -9
  583. package/dist/server/src/lib/cli-tools/base.js +39 -0
  584. package/dist/server/src/lib/cli-tools/codex.js +67 -15
  585. package/dist/server/src/lib/cli-tools/command-code-plan-review.js +24 -2
  586. package/dist/server/src/lib/cli-tools/command-code.js +7 -3
  587. package/dist/server/src/lib/cli-tools/copilot.js +125 -33
  588. package/dist/server/src/lib/cli-tools/gemini.js +37 -10
  589. package/dist/server/src/lib/cli-tools/launch-keys.js +39 -0
  590. package/dist/server/src/lib/cli-tools/opencode-v2.js +6 -2
  591. package/dist/server/src/lib/cli-tools/opencode.js +60 -15
  592. package/dist/server/src/lib/cli-tools/session-name.js +11 -3
  593. package/dist/server/src/lib/cli-tools/submit-composer-read.js +590 -0
  594. package/dist/server/src/lib/cli-tools/submit-verified-sender.js +512 -620
  595. package/dist/server/src/lib/cli-tools/vibe-local.js +4 -2
  596. package/dist/server/src/lib/db/db-migration-path.js +63 -2
  597. package/dist/server/src/lib/db/migrations/index.js +2 -0
  598. package/dist/server/src/lib/db/migrations/pre-migration-backup.js +266 -0
  599. package/dist/server/src/lib/db/migrations/runner.js +37 -4
  600. package/dist/server/src/lib/db/migrations/v62-session-relays-bind.js +102 -0
  601. package/dist/server/src/lib/db/relay-bind-db.js +437 -0
  602. package/dist/server/src/lib/db/relay-db.js +59 -96
  603. package/dist/server/src/lib/detection/prompt-detect-multiple-choice.js +5 -4
  604. package/dist/server/src/lib/detection/upstream-faults.js +40 -6
  605. package/dist/server/src/lib/hooks/sources/copilot/hook-settings.js +2 -3
  606. package/dist/server/src/lib/hooks/sources/opencode/client.js +12 -6
  607. package/dist/server/src/lib/polling/response-checker.js +7 -5
  608. package/dist/server/src/lib/prompt-answer-errors.js +362 -0
  609. package/dist/server/src/lib/prompt-answer-sender.js +264 -288
  610. package/dist/server/src/lib/push/failure-episode-state.js +4 -1
  611. package/dist/server/src/lib/realtime/terminal-broadcast.js +1 -4
  612. package/dist/server/src/lib/realtime-snippet.js +54 -0
  613. package/dist/server/src/lib/relay/relay-bind.js +294 -0
  614. package/dist/server/src/lib/relay/relay-boot.js +51 -0
  615. package/dist/server/src/lib/relay/relay-bound-reply.js +519 -0
  616. package/dist/server/src/lib/relay/relay-delivery.js +134 -220
  617. package/dist/server/src/lib/relay/relay-messages.js +39 -4
  618. package/dist/server/src/lib/relay/relay-overlap.js +92 -0
  619. package/dist/server/src/lib/relay/relay-system-line.js +3 -2
  620. package/dist/server/src/lib/relay/types.js +12 -1
  621. package/dist/server/src/lib/session/agent-event-state.js +4 -0
  622. package/dist/server/src/lib/session/agent-session-lifecycle.js +23 -0
  623. package/dist/server/src/lib/session/claude-session.js +59 -8
  624. package/dist/server/src/lib/session/composer-clear.js +54 -1
  625. package/dist/server/src/lib/session/current-output-builder.js +26 -8
  626. package/dist/server/src/lib/session/current-output-history-writers.js +1 -1
  627. package/dist/server/src/lib/session/instance-input-lock.js +664 -0
  628. package/dist/server/src/lib/session/prompt-submit-receipt.js +155 -0
  629. package/dist/server/src/lib/session/prompt-waiting-guard.js +10 -3
  630. package/dist/server/src/lib/session/send-attempt-state.js +65 -0
  631. package/dist/server/src/lib/session/send-attempt-types.js +18 -1
  632. package/dist/server/src/lib/session/send-user-message.js +84 -14
  633. package/dist/server/src/lib/session/session-launch-flight.js +243 -0
  634. package/dist/server/src/lib/session/session-starting-state.js +40 -4
  635. package/dist/server/src/lib/session/structured-prompt.js +12 -9
  636. package/dist/server/src/lib/session/waiting-episode-binding.js +4 -2
  637. package/dist/server/src/lib/session-cleanup.js +32 -0
  638. package/dist/server/src/lib/session-key-sender.js +0 -27
  639. package/dist/server/src/lib/verification/env-clean-gate.js +129 -0
  640. package/dist/server/src/lib/verification/env-snapshot.js +11 -2
  641. package/dist/server/src/lib/verification/session-kill-ledger.js +174 -0
  642. package/package.json +5 -1
  643. package/release-notes/0.49.1.json +66 -0
  644. package/release-notes/0.49.2.json +49 -0
  645. package/.next/server/chunks/1210.js +0 -1
  646. package/.next/server/chunks/1945.js +0 -14
  647. package/.next/server/chunks/1990.js +0 -103
  648. package/.next/server/chunks/4194.js +0 -67
  649. package/.next/server/chunks/5845.js +0 -1
  650. package/.next/server/chunks/720.js +0 -103
  651. package/.next/server/chunks/7604.js +0 -2
  652. package/.next/server/chunks/9540.js +0 -1
  653. package/.next/static/chunks/4768-ad6f82f034f21eae.js +0 -1
  654. package/.next/static/chunks/5794-80ac3f06f098ea29.js +0 -1
  655. package/.next/static/chunks/6654-f3534f35f16644bc.js +0 -1
  656. package/.next/static/chunks/7665-e9ef6e0a85b9fa49.js +0 -1
  657. package/.next/static/chunks/8606-cf6bdbff44a764cf.js +0 -1
  658. package/.next/static/chunks/9079-987939d231704218.js +0 -1
  659. package/.next/static/chunks/app/api/agents/update/route-c81284a9d8b35304.js +0 -1
  660. package/.next/static/chunks/app/api/agents/versions/route-c81284a9d8b35304.js +0 -1
  661. package/.next/static/chunks/app/api/app/release-notes/route-c81284a9d8b35304.js +0 -1
  662. package/.next/static/chunks/app/api/app/update/route-c81284a9d8b35304.js +0 -1
  663. package/.next/static/chunks/app/api/app/update-check/route-c81284a9d8b35304.js +0 -1
  664. package/.next/static/chunks/app/api/auth/login/route-c81284a9d8b35304.js +0 -1
  665. package/.next/static/chunks/app/api/auth/logout/route-c81284a9d8b35304.js +0 -1
  666. package/.next/static/chunks/app/api/auth/status/route-c81284a9d8b35304.js +0 -1
  667. package/.next/static/chunks/app/api/capabilities/route-c81284a9d8b35304.js +0 -1
  668. package/.next/static/chunks/app/api/daily-summary/route-c81284a9d8b35304.js +0 -1
  669. package/.next/static/chunks/app/api/daily-summary/status/route-c81284a9d8b35304.js +0 -1
  670. package/.next/static/chunks/app/api/external-apps/[id]/health/route-c81284a9d8b35304.js +0 -1
  671. package/.next/static/chunks/app/api/external-apps/[id]/route-c81284a9d8b35304.js +0 -1
  672. package/.next/static/chunks/app/api/external-apps/route-c81284a9d8b35304.js +0 -1
  673. package/.next/static/chunks/app/api/fs/browse/route-c81284a9d8b35304.js +0 -1
  674. package/.next/static/chunks/app/api/fs/recent-paths/route-c81284a9d8b35304.js +0 -1
  675. package/.next/static/chunks/app/api/hooks/agent-event/route-c81284a9d8b35304.js +0 -1
  676. package/.next/static/chunks/app/api/hooks/claude-done/route-c81284a9d8b35304.js +0 -1
  677. package/.next/static/chunks/app/api/hooks/permission-request/route-c81284a9d8b35304.js +0 -1
  678. package/.next/static/chunks/app/api/metrics/vibe/route-c81284a9d8b35304.js +0 -1
  679. package/.next/static/chunks/app/api/ollama/models/route-c81284a9d8b35304.js +0 -1
  680. package/.next/static/chunks/app/api/push/escalation/route-c81284a9d8b35304.js +0 -1
  681. package/.next/static/chunks/app/api/push/subscriptions/route-c81284a9d8b35304.js +0 -1
  682. package/.next/static/chunks/app/api/push/vapid/route-c81284a9d8b35304.js +0 -1
  683. package/.next/static/chunks/app/api/relays/[relayId]/cancel/route-c81284a9d8b35304.js +0 -1
  684. package/.next/static/chunks/app/api/relays/route-c81284a9d8b35304.js +0 -1
  685. package/.next/static/chunks/app/api/remote/pair/route-c81284a9d8b35304.js +0 -1
  686. package/.next/static/chunks/app/api/repositories/[id]/route-c81284a9d8b35304.js +0 -1
  687. package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-c81284a9d8b35304.js +0 -1
  688. package/.next/static/chunks/app/api/repositories/clone/route-c81284a9d8b35304.js +0 -1
  689. package/.next/static/chunks/app/api/repositories/excluded/route-c81284a9d8b35304.js +0 -1
  690. package/.next/static/chunks/app/api/repositories/restore/route-c81284a9d8b35304.js +0 -1
  691. package/.next/static/chunks/app/api/repositories/route-c81284a9d8b35304.js +0 -1
  692. package/.next/static/chunks/app/api/repositories/scan/route-c81284a9d8b35304.js +0 -1
  693. package/.next/static/chunks/app/api/repositories/sync/route-c81284a9d8b35304.js +0 -1
  694. package/.next/static/chunks/app/api/repositories/validate-path/route-c81284a9d8b35304.js +0 -1
  695. package/.next/static/chunks/app/api/settings/default-agents/route-c81284a9d8b35304.js +0 -1
  696. package/.next/static/chunks/app/api/settings/default-surface-mode/route-c81284a9d8b35304.js +0 -1
  697. package/.next/static/chunks/app/api/sidebar/group-order/route-c81284a9d8b35304.js +0 -1
  698. package/.next/static/chunks/app/api/skills/[id]/route-c81284a9d8b35304.js +0 -1
  699. package/.next/static/chunks/app/api/skills/installations/route-c81284a9d8b35304.js +0 -1
  700. package/.next/static/chunks/app/api/skills/operations/route-c81284a9d8b35304.js +0 -1
  701. package/.next/static/chunks/app/api/skills/reindex/route-c81284a9d8b35304.js +0 -1
  702. package/.next/static/chunks/app/api/skills/route-c81284a9d8b35304.js +0 -1
  703. package/.next/static/chunks/app/api/slash-commands/route-c81284a9d8b35304.js +0 -1
  704. package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-c81284a9d8b35304.js +0 -1
  705. package/.next/static/chunks/app/api/tasks/[taskId]/route-c81284a9d8b35304.js +0 -1
  706. package/.next/static/chunks/app/api/templates/[id]/route-c81284a9d8b35304.js +0 -1
  707. package/.next/static/chunks/app/api/templates/route-c81284a9d8b35304.js +0 -1
  708. package/.next/static/chunks/app/api/verification/runs/[runId]/route-c81284a9d8b35304.js +0 -1
  709. package/.next/static/chunks/app/api/verification/runs/route-c81284a9d8b35304.js +0 -1
  710. package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-c81284a9d8b35304.js +0 -1
  711. package/.next/static/chunks/app/api/worktrees/[id]/capture/route-c81284a9d8b35304.js +0 -1
  712. package/.next/static/chunks/app/api/worktrees/[id]/clear-composer/route-c81284a9d8b35304.js +0 -1
  713. package/.next/static/chunks/app/api/worktrees/[id]/cli-reference/route-c81284a9d8b35304.js +0 -1
  714. package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-c81284a9d8b35304.js +0 -1
  715. package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-c81284a9d8b35304.js +0 -1
  716. package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-c81284a9d8b35304.js +0 -1
  717. package/.next/static/chunks/app/api/worktrees/[id]/direct-input/route-c81284a9d8b35304.js +0 -1
  718. package/.next/static/chunks/app/api/worktrees/[id]/env/route-c81284a9d8b35304.js +0 -1
  719. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-c81284a9d8b35304.js +0 -1
  720. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-c81284a9d8b35304.js +0 -1
  721. package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-c81284a9d8b35304.js +0 -1
  722. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-c81284a9d8b35304.js +0 -1
  723. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-c81284a9d8b35304.js +0 -1
  724. package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-c81284a9d8b35304.js +0 -1
  725. package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-c81284a9d8b35304.js +0 -1
  726. package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-c81284a9d8b35304.js +0 -1
  727. package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-c81284a9d8b35304.js +0 -1
  728. package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-c81284a9d8b35304.js +0 -1
  729. package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-c81284a9d8b35304.js +0 -1
  730. package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-c81284a9d8b35304.js +0 -1
  731. package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-c81284a9d8b35304.js +0 -1
  732. package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-c81284a9d8b35304.js +0 -1
  733. package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-c81284a9d8b35304.js +0 -1
  734. package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-c81284a9d8b35304.js +0 -1
  735. package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-c81284a9d8b35304.js +0 -1
  736. package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-c81284a9d8b35304.js +0 -1
  737. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-c81284a9d8b35304.js +0 -1
  738. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-c81284a9d8b35304.js +0 -1
  739. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-c81284a9d8b35304.js +0 -1
  740. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-c81284a9d8b35304.js +0 -1
  741. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-c81284a9d8b35304.js +0 -1
  742. package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-c81284a9d8b35304.js +0 -1
  743. package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-c81284a9d8b35304.js +0 -1
  744. package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-c81284a9d8b35304.js +0 -1
  745. package/.next/static/chunks/app/api/worktrees/[id]/instances/notes/route-c81284a9d8b35304.js +0 -1
  746. package/.next/static/chunks/app/api/worktrees/[id]/instances/opencode/route-c81284a9d8b35304.js +0 -1
  747. package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-c81284a9d8b35304.js +0 -1
  748. package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-c81284a9d8b35304.js +0 -1
  749. package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-c81284a9d8b35304.js +0 -1
  750. package/.next/static/chunks/app/api/worktrees/[id]/logs/route-c81284a9d8b35304.js +0 -1
  751. package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-c81284a9d8b35304.js +0 -1
  752. package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-c81284a9d8b35304.js +0 -1
  753. package/.next/static/chunks/app/api/worktrees/[id]/memos/route-c81284a9d8b35304.js +0 -1
  754. package/.next/static/chunks/app/api/worktrees/[id]/messages/route-c81284a9d8b35304.js +0 -1
  755. package/.next/static/chunks/app/api/worktrees/[id]/opencode/diff/route-c81284a9d8b35304.js +0 -1
  756. package/.next/static/chunks/app/api/worktrees/[id]/opencode/session/route-c81284a9d8b35304.js +0 -1
  757. package/.next/static/chunks/app/api/worktrees/[id]/opencode/share/route-c81284a9d8b35304.js +0 -1
  758. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-c81284a9d8b35304.js +0 -1
  759. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/strict/route-c81284a9d8b35304.js +0 -1
  760. package/.next/static/chunks/app/api/worktrees/[id]/resolve-target/route-c81284a9d8b35304.js +0 -1
  761. package/.next/static/chunks/app/api/worktrees/[id]/respond/route-c81284a9d8b35304.js +0 -1
  762. package/.next/static/chunks/app/api/worktrees/[id]/route-c81284a9d8b35304.js +0 -1
  763. package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-c81284a9d8b35304.js +0 -1
  764. package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-c81284a9d8b35304.js +0 -1
  765. package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-c81284a9d8b35304.js +0 -1
  766. package/.next/static/chunks/app/api/worktrees/[id]/search/route-c81284a9d8b35304.js +0 -1
  767. package/.next/static/chunks/app/api/worktrees/[id]/send/route-c81284a9d8b35304.js +0 -1
  768. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-c81284a9d8b35304.js +0 -1
  769. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-c81284a9d8b35304.js +0 -1
  770. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-c81284a9d8b35304.js +0 -1
  771. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-c81284a9d8b35304.js +0 -1
  772. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-c81284a9d8b35304.js +0 -1
  773. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-c81284a9d8b35304.js +0 -1
  774. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-c81284a9d8b35304.js +0 -1
  775. package/.next/static/chunks/app/api/worktrees/[id]/skills/route-c81284a9d8b35304.js +0 -1
  776. package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-c81284a9d8b35304.js +0 -1
  777. package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-c81284a9d8b35304.js +0 -1
  778. package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-c81284a9d8b35304.js +0 -1
  779. package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-c81284a9d8b35304.js +0 -1
  780. package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-c81284a9d8b35304.js +0 -1
  781. package/.next/static/chunks/app/api/worktrees/[id]/timers/route-c81284a9d8b35304.js +0 -1
  782. package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-c81284a9d8b35304.js +0 -1
  783. package/.next/static/chunks/app/api/worktrees/[id]/todos/route-c81284a9d8b35304.js +0 -1
  784. package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-c81284a9d8b35304.js +0 -1
  785. package/.next/static/chunks/app/api/worktrees/[id]/tree/route-c81284a9d8b35304.js +0 -1
  786. package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-c81284a9d8b35304.js +0 -1
  787. package/.next/static/chunks/app/api/worktrees/[id]/verify/config/route-c81284a9d8b35304.js +0 -1
  788. package/.next/static/chunks/app/api/worktrees/[id]/verify/route-c81284a9d8b35304.js +0 -1
  789. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route-c81284a9d8b35304.js +0 -1
  790. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-c81284a9d8b35304.js +0 -1
  791. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-c81284a9d8b35304.js +0 -1
  792. package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-c81284a9d8b35304.js +0 -1
  793. package/.next/static/chunks/app/api/worktrees/apply-default-agents/route-c81284a9d8b35304.js +0 -1
  794. package/.next/static/chunks/app/api/worktrees/route-c81284a9d8b35304.js +0 -1
  795. package/.next/static/chunks/app/layout-aa8e66164a4367af.js +0 -1
  796. package/.next/static/chunks/app/manifest.webmanifest/route-c81284a9d8b35304.js +0 -1
  797. package/.next/static/chunks/app/more/page-87c84987b2765213.js +0 -1
  798. package/.next/static/chunks/app/page-1b820c421db48c2c.js +0 -1
  799. package/.next/static/chunks/app/proxy/[...path]/route-c81284a9d8b35304.js +0 -1
  800. package/.next/static/chunks/app/review/page-e2fd4a590646a2d8.js +0 -1
  801. package/.next/static/chunks/app/sessions/page-cfd645305e25fd33.js +0 -1
  802. package/.next/static/chunks/app/worktrees/[id]/layout-c81284a9d8b35304.js +0 -1
  803. package/.next/static/chunks/app/worktrees/[id]/page-a8d7886703ffc7b4.js +0 -1
  804. package/.next/static/css/db8959555c3d9c96.css +0 -1
  805. /package/.next/static/{3_JtAZaKMJEDFIIfkHv4n → yGatWDsS532awSs51kXyd}/_buildManifest.js +0 -0
  806. /package/.next/static/{3_JtAZaKMJEDFIIfkHv4n → yGatWDsS532awSs51kXyd}/_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=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,2 +0,0 @@
1
- "use strict";exports.id=7604,exports.ids=[7604],exports.modules={15044:(a,b,c)=>{c.d(b,{Dd:()=>z,Z1:()=>C,IW:()=>t,qM:()=>E,r0:()=>A,cY:()=>B,nP:()=>w,lm:()=>D,ic:()=>r,W5:()=>s});var d=c(24455),e=c(72626),f=c(91631),g=c(84297),h=c(91227);function i(a){return(0,f.j0)((0,f.Ev)((0,d.v7)(a.worktreeId,a.cliToolId,a.instanceId)))}function j(a,b){let c=i(a),d=(0,f.Bf)(a.worktreeId,a.cliToolId,a.instanceId,b);return null===d?{kind:"unattributed",generation:c,lastClosedTurnId:null}:null===d.closedAt&&null!==d.openedAt?{kind:"turn",generation:c,turnId:d.turnId}:null===d.closedAt&&(0,f.sp)(d,b)>0?{kind:"dialog-only",generation:c,recordTurnId:d.turnId,sessionId:d.sessionId}:{kind:"unattributed",generation:c,lastClosedTurnId:d.turnId}}var k=c(36261);function l(a,b){return"none"===a.kind||"none"===b.kind?a.kind===b.kind:a.at===b.at}let m={action:"none"},n=a=>({action:"close",reason:a});function o(a){return"none"===a.kind?null:a.turnId}let p=new Set(["opened","stopped","stop-without-turn","session-ended"]);var q=c(36925);function r(a,b,c){return{generation:i({worktreeId:a,cliToolId:b,instanceId:c}),version:(0,k.cx)(a,b,c)}}function s(a){let b=`${a}${d.CS}`,c=(0,k.fK)(a),e=new Map;for(let[a,c]of f.ZG)a.startsWith(b)&&e.set(a,c);return{startFor(b,g){let h=(0,d.v7)(a,b,g);return{generation:(0,f.j0)(e.get(h)??null),version:c.get(h)??0}}}}async function t(a){var b;let c={meta:null},d=Date.now();return{frame:await (0,q.v)("__captureFrameMetaSink",()=>new g.AsyncLocalStorage).run(a=>{c.meta=a},a),frameTime:(b=c.meta,null===b?{frameCapturedAt:0,frameFetchedAfterStart:!1}:{frameCapturedAt:Math.min(b.fetchStartedAt,d),frameFetchedAfterStart:"fetched"===b.source&&b.fetchStartedAt>=d})}}function u(a,b){return{kind:"screen",generation:a,originTurnId:b}}function v(a,b,c){return!0===a.freshPrompt&&null!=a.lastAnswer&&a.lastAnswer.episodeId===b.episodeId&&null!==c&&c!==a.lastAnswer.screenKey}function w(a){var b;let c=a.now??Date.now(),d={worktreeId:a.worktreeId,cliToolId:a.cliToolId,instanceId:a.instanceId},e=(0,k._v)(a.worktreeId,a.cliToolId,a.instanceId),f=i(d),g={observation:a,action:"ignored",episodeId:e?.episodeId??null,since:"waiting"===a.reading.kind?e?.since??null:null,next:null,binding:null,closeReason:null,ignoredBecause:null,at:c},m=a=>({...g,action:"ignored",ignoredBecause:a});if(!l(a.start.generation,f))return m("generation");let n=a.start.version!==(0,k.cx)(a.worktreeId,a.cliToolId,a.instanceId)&&!0!==a.freshPrompt,{reading:o}=a;if("waiting"!==o.kind){if(null===e)return m("nothing-open");if("unknown"===o.kind)return m("unknown-frame");let b=function(a,b){let{reading:c}=a;if("gone"===c.kind)return"session-gone";if("not-waiting"!==c.kind)return null;switch(a.observer){case"status-probe":return"screen-cleared";case"response-checker":return"response-recorded";case"auto-yes-poller":if("screen"===b.binding.kind)return a.frameCapturedAt>Math.max(b.openedAt,b.boundAt)?"screen-cleared":null;return null!=a.lastAnswer&&a.lastAnswer.episodeId===b.episodeId?"poller-answered":null;default:return a.observer,null}}(a,e);return null===b?m("not-this-observer"):n?m("version"):{...g,action:"closed",closeReason:b,since:null}}let p=null!==o.promptData?(0,h.c)(o.promptData):null,q=j(d,c),r=o.humanHeld?u(f,"turn"===q.kind?q.turnId:null):q,s=function(a,b,c,d,e,f){if(null===b)return{action:"opened",binding:d};let g=b.binding;if(!l(g.generation,f))return{action:"replaced",binding:d};if(c)return"screen"===g.kind?{action:"kept"}:{action:"rebound",binding:u(f,"turn"===g.kind?g.turnId:null)};switch(g.kind){case"turn":if("turn"===d.kind&&d.turnId===g.turnId)return v(a,b,e)?{action:"replaced",binding:d}:{action:"kept"};if("turn"===d.kind)return{action:"replaced",binding:d};return!0===a.freshPrompt&&null!==e&&e!==b.promptScreenKey?{action:"replaced",binding:d}:{action:"kept"};case"dialog-only":if("turn"===d.kind)return{action:"rebound",binding:d};if("dialog-only"===d.kind&&d.recordTurnId!==g.recordTurnId)return{action:"replaced",binding:d};return{action:"kept"};case"unattributed":if("unattributed"===d.kind)return v(a,b,e)?{action:"replaced",binding:d}:{action:"kept"};if("dialog-only"===d.kind)return{action:"rebound",binding:d};return null!==e&&e===b.promptScreenKey?{action:"rebound",binding:d}:{action:"replaced",binding:d};case"screen":return"turn"===d.kind&&d.turnId===g.originTurnId?{action:"rebound",binding:d}:{action:"replaced",binding:d};default:return{action:"kept"}}}(a,e,o.humanHeld,r,p,f);if("kept"===s.action)return{...g,action:"kept"};if(n)return m("version");let t=(0,k._0)(a.worktreeId,a.cliToolId,a.instanceId),w=!0===a.frameFetchedAfterStart&&a.start.version===(0,k.cx)(a.worktreeId,a.cliToolId,a.instanceId);if(null!==t&&!w&&a.frameCapturedAt<=t.at&&(null===p||p===t.promptScreenKey))return m("stale-frame");if("rebound"===s.action)return null!==e&&function(a,b){if(a.kind!==b.kind)return!1;switch(a.kind){case"turn":return a.turnId===b.turnId;case"dialog-only":return a.recordTurnId===b.recordTurnId;default:return!0}}(e.binding,s.binding)?{...g,action:"kept"}:{...g,action:"rebound",binding:s.binding};let x=s.binding,y=o.structuredSince,z="opened"===s.action||null===e?y??c:null!==y&&y>e.since?y:c,A={since:z,kind:o.waitingKind,binding:x,openedBy:a.observer,promptScreenKey:p};return{...g,action:s.action,since:z,next:A,closeReason:"replaced"===s.action&&null!==e?(b=e.binding,l(b.generation,f)?"turn"===x.kind||"dialog-only"===x.kind?"turn-superseded":"screen-cleared":"generation"):null}}let x=(0,e.h)("waiting-episode-binding"),y=(0,q.v)("__waitingHookStopGeneration",()=>new Map);function z(a,b,c=Date.now()){let e=[];try{let f=(0,d.v7)(a.worktreeId,a.cliToolId,a.instanceId);for(let d of b){("stopped"===d.kind||"stop-without-turn"===d.kind)&&y.set(f,d.generation);let b=(0,k._v)(a.worktreeId,a.cliToolId,a.instanceId);if(null===b){e.push({outcome:d.kind,action:"none",episodeId:null});continue}let g=function(a,b,c){if("generation-fenced"===a.kind)return"session-start"===a.source&&"screen"===b.kind?l(b.generation,a.generation)?m:{action:"rebind",binding:{...b,generation:a.generation}}:l(b.generation,a.generation)?m:n("generation");if(!l(b.generation,c))return p.has(a.kind)?n("generation"):m;switch(a.kind){case"opened":return function(a,b){let{previous:c,turnId:d,event:e}=a,f={kind:"turn",generation:a.generation,turnId:d};if("screen"===b.kind)return m;if("turn"===b.kind&&b.turnId===d)return{action:"unmatched"};let g=o(c),h="dialog-only"===c.kind||"display-only"===c.kind,i="dialog-only"===b.kind&&b.recordTurnId===g;return"open-same-session"===c.kind||"open-other-session"===c.kind?i?{action:"unmatched"}:n("turn-superseded"):"user_prompt_submit"===e||"turn"===b.kind?n("turn-superseded"):"dialog-only"===b.kind?i?h?{action:"rebind",binding:f}:{action:"unmatched"}:n("turn-superseded"):b.lastClosedTurnId===g?{action:"rebind",binding:f}:n("turn-superseded")}(a,b);case"restored":return"turn"===b.kind&&b.turnId===a.discardedTurnId?{action:"rebind",binding:{...b,turnId:a.restoredTurnId}}:m;case"stopped":return"turn"===b.kind&&b.turnId===a.turnId?n("turn-stop"):m;case"stop-without-turn":let{previous:d}=a,e=o(d);switch(d.kind){case"closed":if("turn"===b.kind&&b.turnId===e||"unattributed"===b.kind&&b.lastClosedTurnId===e)return n("turn-stop");if("dialog-only"===b.kind&&b.recordTurnId===e)return{action:"unmatched"};return m;case"dialog-only":if("dialog-only"===b.kind&&b.recordTurnId===e||"unattributed"===b.kind)return n("turn-stop");return m;case"display-only":case"none":if("dialog-only"===b.kind&&b.recordTurnId===e||"unattributed"===b.kind&&b.lastClosedTurnId===e)return n("turn-stop");return m;default:return{action:"unmatched"}}case"session-ended":return"turn"===b.kind&&b.turnId===a.turnId?n("turn-session-end"):m;case"decision-opened":return"dialog-only"===a.recordKind&&"unattributed"===b.kind?{action:"rebind",binding:{kind:"dialog-only",generation:c,recordTurnId:a.recordTurnId,sessionId:null}}:m;case"decision-answered":return 0===a.before||a.remaining>0?m:"turn"===b.kind&&b.turnId===a.recordTurnId||"dialog-only"===b.kind&&b.recordTurnId===a.recordTurnId?n("decision-settled"):m;default:return m}}(d,b.binding,i(a));e.push(function(a,b,c,d,e){let f={outcome:c.kind,episodeId:b.episodeId};if("close"===d.action){let g=(0,k._W)(a,b.episodeId,d.reason,e);return g&&x.info("waiting-episode-closed-by-turn",{worktreeId:a.worktreeId,cliToolId:a.cliToolId,instanceId:a.instanceId??a.cliToolId,episodeId:b.episodeId,outcome:c.kind,reason:d.reason}),{...f,action:g?"closed":"none",...g?{reason:d.reason}:{}}}if("rebind"===d.action){let g=(0,k.Uh)(a,b.episodeId,d.binding,e);return g&&x.debug("waiting-episode-rebound",{worktreeId:a.worktreeId,instanceId:a.instanceId??a.cliToolId,episodeId:b.episodeId,outcome:c.kind,binding:d.binding.kind}),{...f,action:g?"rebound":"none"}}return"unmatched"===d.action&&x.warn("waiting-episode-unmatched",{worktreeId:a.worktreeId,instanceId:a.instanceId??a.cliToolId,episodeId:b.episodeId,outcome:c.kind,binding:b.binding.kind}),{...f,action:"none"}}(a,b,d,g,c))}}catch(b){x.warn("waiting-episode-turn-sync-failed",{worktreeId:a.worktreeId,instanceId:a.instanceId??a.cliToolId,error:b instanceof Error?b.message:String(b)})}return e}function A(a){let b=a.observation,c={worktreeId:b.worktreeId,cliToolId:b.cliToolId,instanceId:b.instanceId};try{switch(a.action){case"kept":if(null===a.episodeId||"waiting"!==b.reading.kind)return"ignored";return(0,k.jG)(c,a.episodeId,b.reading.waitingKind)?"kept":"ignored";case"opened":if(null===a.next||null!==(0,k._v)(b.worktreeId,b.cliToolId,b.instanceId))return"ignored";return(0,k.M_)(c,a.next,a.at),"opened";case"replaced":if(null===a.next||null===a.episodeId||null===a.closeReason)return"ignored";return null!==(0,k.yk)(c,a.episodeId,a.next,a.closeReason,a.at)?"replaced":"ignored";case"rebound":if(null===a.binding||null===a.episodeId)return"ignored";return(0,k.Uh)(c,a.episodeId,a.binding,a.at)?"rebound":"ignored";case"closed":if(null===a.episodeId||null===a.closeReason)return"ignored";return(0,k._W)(c,a.episodeId,a.closeReason,a.at)?"closed":"ignored";case"ignored":return("version"===a.ignoredBecause||"stale-frame"===a.ignoredBecause||"generation"===a.ignoredBecause)&&x.debug("waiting-observation-ignored",{worktreeId:b.worktreeId,instanceId:b.instanceId??b.cliToolId,observer:b.observer,reading:b.reading.kind,because:a.ignoredBecause}),"ignored";default:return a.action,"ignored"}}catch(a){return x.warn("waiting-observation-failed",{worktreeId:b.worktreeId,instanceId:b.instanceId??b.cliToolId,observer:b.observer,error:a instanceof Error?a.message:String(a)}),"ignored"}}function B(a){let b=w(a),c=A(b);return c===b.action?b:{...b,action:c}}function C(a,b,c){return{generation:i({worktreeId:a,cliToolId:b,instanceId:c}),episodeId:(0,k._v)(a,b,c)?.episodeId??null}}function D(a,b,c,e,f=Date.now()){try{let g={worktreeId:a,cliToolId:b,instanceId:c},h=(0,d.v7)(a,b,c),j=(0,k._v)(a,b,c);if(null===j)return"nothing-open";let m=i(g);if(null===e.episodeId||j.episodeId!==e.episodeId||!l(e.generation,m))return"target-gone";let n=y.get(h);if(void 0!==n&&l(n,m))return"hook-authority";if("screen"===j.binding.kind)return"screen";return(0,k._W)(g,j.episodeId,"legacy-stop",f)?"closed":"target-gone"}catch(d){return x.warn("waiting-episode-legacy-stop-failed",{worktreeId:a,instanceId:c??b,error:d instanceof Error?d.message:String(d)}),"nothing-open"}}function E(){y.clear()}(0,k.O_)(j),(0,f.i1)((a,b)=>{z(a,b)})},24581:(a,b,c)=>{c.d(b,{Cb:()=>f,Mu:()=>g,RY:()=>j,Tt:()=>i,Ui:()=>q,Xq:()=>m,ZV:()=>t,h_:()=>h,jF:()=>r,kT:()=>p,nY:()=>l,qX:()=>s,wt:()=>o});var d=c(62887),e=c(27870);let f=new Set(["user_prompt_submit","pre_tool_use","post_tool_use"]),g=18e5,h={predicted:2e4,confirmed:18e5},i=3,j=16,k={turnId:null,openedAt:null,closedAt:null,closedBy:null};function l(a){return null===a?k:{turnId:a.turnId,openedAt:a.openedAt,closedAt:a.closedAt,closedBy:a.closedBy}}function m(a){if("string"!=typeof a||0===a.length||a.length>128)return null;for(let b=0;b<a.length;b++){let c=a.charCodeAt(b);if(c<32||127===c)return null}return a}function n(a,b){return"string"!=typeof a||""===a?null:a.slice(0,b)}function o(a){return n(a,e.lY)}function p(a){return n(a,d.h9)}function q(a){if(!Array.isArray(a))return null;let b=[];for(let c of a)if("string"==typeof c&&""!==c&&(b.push(c.slice(0,200)),b.length>=8))break;return b.length>0?b:null}function r(a,b){let c=null===a.confirmedAt?h.predicted:h.confirmed;return b-a.at<c}function s(a,b,c){return null!==b&&c-a.at>=1e3*b}function t(a,b){return null===a.sessionId||null===b||a.sessionId===b}},26547:(a,b,c)=>{c.d(b,{Yz:()=>L,jw:()=>J});var d=c(51297),e=c(42422);let f=["minimal","low","medium","high","xhigh","max","ultra","persistent"];function g(){return{model:null,effort:null}}let h=/^[A-Za-z0-9][A-Za-z0-9._:@/-]*$/,i=/^[A-Za-z0-9][A-Za-z0-9 .()[\]_:@/-]*$/;function j(a){return a.length>0&&a.length<=64&&h.test(a)}function k(a){return a.length>0&&a.length<=64&&i.test(a)}function l(a,b={}){let c=a.trim().toLowerCase();if(""===c)return null;if(f.includes(c))return c;if(!b.allowTruncated||c.length<2)return null;let d=f.filter(a=>a.length===c.length+1&&a.startsWith(c));return 1===d.length?d[0]:null}let m=/^\s*([^\s·]+)(?:\s+(minimal|low|medium|high|xhigh|max|ultra|persistent)\b)?/i,n=/^\s*[^\s·]+\s+[A-Za-z][A-Za-z_-]*(?=\s|$)/,o=/^\s*\S[^·]*·\s*~?\/\S*(?:\s*·[^\n]*|[^\S\n]{2,}\S[^\n]*)$/;function p(a){if(!e.aW.test(a)&&!o.test(a))return null;let b=a.indexOf("\xb7");if(b<0)return null;let c=a.slice(0,b),d=m.exec(c);if(!d)return null;let f=d[1];if(!j(f))return null;let g=d[2]?l(d[2]):null;return null!==g||/\d/.test(f)?null===g&&n.test(c)?{model:f,effort:null,effortUnreadable:!0}:{model:f,effort:g}:null}let q=/^\s*[\u2500-\u259F][\s\u2500-\u259F]*(\S[^\u2500-\u259F]*?)\s+with\s+(minimal|low|medium|high|xhigh)\s+effort\b/i,r=/^\s*[\u2500-\u259F][\s\u2500-\u259F]*(\S[^\u2500-\u259F·]*?)\s+·\s+Claude\s+[A-Za-z]+\b/,s=/^\s*\S\s+([A-Za-z]+)\s+·\s+\/effort\s*$/;function t(a){let b=q.exec(a);if(b){let a=b[1].trim();return k(a)?{model:a,effort:l(b[2])}:null}let c=r.exec(a);if(!c)return null;let d=c[1].trim();return/\swith\s/i.test(d)||!k(d)?null:{model:d,effort:null}}function u(a){let b=s.exec(a);if(!b)return null;let c=l(b[1]);return null===c?null:{model:null,effort:c}}let v=/^\s*⎿\s+(?:Set model to|Kept model as)\s+(?!(?:and saved as your default|for this session only)\b)([A-Za-z0-9][A-Za-z0-9 .()[\]_:@/-]*?)(?:\s+(?:and saved as your default for new sessions|for this session only))?(?:\s+with\s+([A-Za-z]+)\s+effort\b[^·]*)?\s*(?:·.*)?$/;function w(a){let b=v.exec(a);if(!b)return null;let c=b[1].trim();return k(c)?{model:c,effort:b[2]?l(b[2]):null}:null}let x=/^\s*(?:\?\s+for\s+shortcuts|esc\s+to\s+cancel)\b/i,y=/^\s*[\u2500-\u259F][\s\u2500-\u259F]*(\S[^\u2500-\u259F]*?)\s+\((minimal|low|medium|high|xhigh)\)\s*$/i;function z(a){if(!x.test(a))return null;let b=a.lastIndexOf("\xb7");if(b<0)return null;let c=l(a.slice(b+1),{allowTruncated:!0});if(!c)return null;let d=a.slice(0,b).trimEnd().split(/\s{2,}/),e=(d[d.length-1]??"").trim();return{model:k(e)?e:null,effort:c}}function A(a){let b=y.exec(a);if(!b)return null;let c=b[1].trim();return k(c)?{model:c,effort:l(b[2])}:null}let B=/^\s*[●◉◎○]\s+Model\s+changed\s+from\s+\S+(?:\s+\([^)]*\))?\s+to\s+(\S+)(?:\s+\((minimal|low|medium|high|xhigh)\))?\s+for\s+this\s+session\b/i;function C(a){let b=B.exec(a);if(!b)return null;let c=b[1];return j(c)?{model:c,effort:b[2]?l(b[2]):null}:null}let D=/^\s*▣\s+[A-Za-z][A-Za-z0-9-]*\s+·\s+([^·]+?)(?:\s+·\s+[\d.]+\s?m?s)?\s*$/,E=/^\s*[A-Za-z][A-Za-z0-9-]*\s+·\s+([^·]+?)\s+·\s+[\d.]+\s?m?s\s*$/,F=/^\s*[┃╹]/,G=/^\s*#\s+models:\s*([^·]+?)(?:\s+with\s+([A-Za-z]+)\s+effort)?\s*(?:·|$)/i;function H(a){let b=G.exec(a);if(!b)return null;let c=b[1].trim();return k(c)?{model:c,effort:b[2]?l(b[2]):null}:null}function I(a,b){let c=a.split("\n");for(let a=c.length-1;a>=0;a--){let e=b((0,d.aJ)(c[a]));if(e)return e}return null}function J(a,b){if(!b)return g();switch(a){case"codex":return I(b,p)??g();case"claude":return function(a){let b=I(a,t);if(!b||null!==b.effort)return b;let c=I(a,u);return c?{model:b.model,effort:c.effort}:b}(b)??I(b,w)??g();case"antigravity":return I(b,z)??I(b,A)??g();case"copilot":{let a=function(a){let b=a.split("\n");for(let a=b.length-1;a>=0;a--){let c=(0,d.aJ)(b[a]);if(""!==c.trim()){if(!e.Ub.test(c)&&!e.tJ.test(c))return null;let a=c.trim().split(/\s{2,}/);if(a.length<2)return null;let b=a[a.length-1].split("\xb7").map(a=>a.trim());if(b.length>2)return null;let d=b[0];if(!k(d))return null;if(1===b.length)return{model:d,effort:null};let f=l(b[1]);return null===f?null:{model:d,effort:f}}}return null}(b),c=I(b,C);if(!a)return c??g();if(null!==a.effort||null===c||null===c.effort)return a;return!function(a,b){let c=a=>a.toLowerCase().replace(/[^a-z0-9]/g,"");return c(a)===c(b)}(a.model,c.model)?a:{model:a.model,effort:c.effort}}case"opencode":case"opencode-v2":return function(a){let b=a.split("\n").map(a=>(0,d.aJ)(a));for(let a=b.length-1;a>=0;a--){let c=function(a){let b=D.exec(a);if(!b)return null;let c=b[1].trim();return k(c)?{model:c,effort:null}:null}(b[a])??function(a,b){let c=E.exec(a[b]);if(!c)return null;let d=c[1].trim();if(!k(d))return null;for(let c=b+1;c<a.length;c++)if(""!==a[c].trim())return F.test(a[c])?{model:d,effort:null}:null;return null}(b,a);if(c)return c}return null}(b)??g();case"command-code":return I(b,H)??g();default:return g()}}let K=/-(low|medium|high)$/i;function L(a,b,c,d){let e=(b||null)??c?.model??null,f=c?.effort??null,g="antigravity"===a?function(a){if(!a)return null;let b=K.exec(a);return b?b[1].toLowerCase():null}(e)??f:f;return{model:e,effort:(d||null)??g}}},27675:(a,b,c)=>{c.d(b,{GR:()=>g,MR:()=>i,NR:()=>k,cr:()=>n,eZ:()=>m,vR:()=>j});var d=c(85726),e=c(24455),f=c(36925);function g(a){let b="multiple_choice"===a.type?a.options.map(a=>`${a.number}.${a.label}`):a.options;return[(0,d.J)(a),...b].join("\0")}let h=(0,f.v)("__autoYesEnterFallbacks",()=>new Map);function i(a){h.delete(a)}function j(a){for(let b of(0,e._9)([...h.keys()],a))h.delete(b)}function k(){h.clear()}let l=(0,f.v)("__autoYesEnterFallbackEpochs",()=>new Map);function m(a,b,c){let d=(0,e.v7)(a,b,c);h.delete(d),l.set(d,(l.get(d)??0)+1)}function n(a){return l.get(a)??0}},27870:(a,b,c)=>{c.d(b,{lY:()=>h,QB:()=>e,Yo:()=>m,fO:()=>n,LF:()=>j,PP:()=>i,T5:()=>g});var d=c(81254);let e=[{number:1,label:"Allow once",reply:"once"},{number:2,label:"Allow always",reply:"always"},{number:3,label:"Reject",reply:"reject"}],f={"opencode-v2":{once:"Allow once",always:"Always allow",reject:"Reject"}};function g(a){let b=f[a];return b?e.map(a=>b[a.reply]?{...a,label:b[a.reply]}:a):e}let h=500;function i(a){return"string"==typeof a&&""!==a}function j(a,b){return"permission-id"===a&&b.some(a=>i(a.id)&&!a.deliveryExpired)}let k={notification:"Notification(permission_prompt)","permission-request":"PermissionRequest (no decision)"};function l(a,b){let c=[`A dialog is open in ${a}: the agent reported it via ${k[b.source]}${b.toolName?` for ${b.toolName}`:""}, but the detection layer published no options for it.`];if(b.decisionOptions&&b.decisionOptions.length>0?c.push(`Answer it with \`commandmate respond ${a} <number>\`: `+b.decisionOptions.map(a=>`${a.number} = ${a.label} (${a.reply})`).join(", ")+". The reply goes to the agent's own API, so no keys are sent to the terminal "+`and the label works too (\`respond ${a} "Allow once"\`).`):c.push(`Answer it in the terminal, or send the option NUMBER with \`commandmate respond ${a} <number>\` — yes/no is not resolved on a numbered dialog (Issue #1681).`),b.message&&c.push(`Agent message: "${b.message}"`),b.askUserQuestion){let{question:d,labels:e,questionCount:f}=b.askUserQuestion,g=i(b.decisionId)&&1===f&&!(b.decisionOptions&&b.decisionOptions.length>0);c.push(`The agent asked${f>1?` ${f} questions, the first being`:""}: "${d}" — offering: ${e.join(" / ")}. `+(g?`Answer it with \`commandmate respond ${a} <number>\`: `+e.map((a,b)=>`${b+1} = ${a}`).join(", ")+". The number is this list's own position and the reply goes to the agent's own API, so no keys are sent to the terminal (the label works too).":"The picker renumbers and adds its own entries, so read the option NUMBER off the terminal rather than counting this list."))}return c.join(" ")}function m(a,b){return{type:d.LT,status:"pending",question:l(a,b),options:[],source:b.source,...b.message?{message:b.message}:{},...b.toolName?{toolName:b.toolName}:{},...b.askUserQuestion?{askUserQuestion:b.askUserQuestion}:{},...b.decisionOptions&&b.decisionOptions.length>0?{decisionOptions:b.decisionOptions}:{},decisionId:i(b.decisionId)?b.decisionId:null,...b.patterns&&b.patterns.length>0?{patterns:[...b.patterns]}:{}}}function n(a,b){return{type:d.LT,status:"unclassified",question:l(a,b),options:[],source:b.source,...b.message?{message:b.message}:{},...b.toolName?{toolName:b.toolName}:{},...b.askUserQuestion?{askUserQuestion:b.askUserQuestion}:{}}}},27939:(a,b,c)=>{c.d(b,{F_:()=>t,KA:()=>u,XO:()=>x,Y2:()=>n,jp:()=>m,lr:()=>v,pr:()=>w});var d=c(29021),e=c(21820),f=c(33873),g=c(8004),h=c(24455),i=c(72626),j=c(36925);let k=(0,i.h)("lib/session/opencode-session-store"),l=/^ses[A-Za-z0-9_-]{1,128}$/;function m(a){return"string"==typeof a&&l.test(a)}let n=200,o=(0,j.v)("__opencodeSessionMemories",()=>new Map);function p(a){return(0,h.v7)(a.worktreeId,a.cliToolId,a.instanceId)}function q(){let a=(0,f.join)((0,e.homedir)(),".commandmate","opencode-sessions.json");return(0,g.T)(process.env.CM_OPENCODE_SESSION_FILE,a,"CM_OPENCODE_SESSION_FILE")}function r(){try{let a=JSON.parse((0,d.readFileSync)(q(),"utf8"));if("object"!=typeof a||null===a||Array.isArray(a))return{};let b={};for(let[c,d]of Object.entries(a))!("object"!=typeof d||null===d||Array.isArray(d))&&m(d.sessionId)&&"string"==typeof d.worktreePath&&d.worktreePath.length>0&&(b[c]={sessionId:d.sessionId,title:"string"==typeof d.title?d.title:null,worktreePath:d.worktreePath,updatedAt:"number"==typeof d.updatedAt?d.updatedAt:0});return b}catch{return{}}}function s(a){let b=q();try{(0,d.mkdirSync)((0,f.dirname)(b),{recursive:!0}),(0,d.writeFileSync)(b,`${JSON.stringify(a,null,2)}
2
- `,{mode:384})}catch(a){k.warn("opencode-session-file-write-failed",{path:b,error:a instanceof Error?a.message:String(a)})}}function t(a,b,c=Date.now()){if(!m(b.sessionId))return k.warn("opencode-session-id-rejected",{worktreeId:a.worktreeId,instanceId:a.instanceId??a.cliToolId}),!1;if(0===b.worktreePath.length)return!1;let d={sessionId:b.sessionId,title:"string"==typeof b.title?b.title.slice(0,n):null,worktreePath:b.worktreePath,updatedAt:c},e=p(a);o.set(e,d);let f=r();return f[e]=d,s(f),!0}function u(a){let b=p(a),c=o.get(b);if(c)return c;let d=r()[b];return d?(o.set(b,d),d):null}function v(a){let b=p(a);o.delete(b);let c=r();b in c&&(delete c[b],s(c))}function w(a,b){let c=u(a);return c?c.worktreePath!==b?(k.info("opencode-session-recovery-path-mismatch",{worktreeId:a.worktreeId,instanceId:a.instanceId??a.cliToolId,recorded:c.worktreePath}),null):m(c.sessionId)?c.sessionId:null:null}function x(a,b){return m(b)?`${a} -s ${b}`:a}},36261:(a,b,c)=>{c.d(b,{_W:()=>E,cx:()=>y,_0:()=>A,Jp:()=>B,_v:()=>x,Te:()=>C,Bf:()=>t,wN:()=>s,M_:()=>D,Uh:()=>G,O_:()=>I,yk:()=>F,fK:()=>z,jG:()=>H});var d=c(72626),e=c(24455),f=c(36925);let g=(0,d.h)("waiting-episode-state"),h=(0,f.v)("__sessionWaitingEpisodes",()=>new Map),i=(0,f.v)("__sessionWaitingTransitionListeners",()=>new Set),j=(0,f.v)("__sessionWaitingEpisodeMeta",()=>new WeakMap),k=(0,f.v)("__sessionWaitingEpisodeVersions",()=>new Map),l=(0,f.v)("__sessionWaitingEpisodeLastClosed",()=>new Map),m=(0,f.v)("__sessionWaitingEpisodeSeq",()=>({value:0,nonce:Math.random().toString(36).slice(2,10)})),n=(0,f.v)("__sessionWaitingEpisodeListeners",()=>new Set),o={kind:"unattributed",generation:{kind:"none"},lastClosedTurnId:null};function p(){return m.value+=1,`wep-${m.nonce}-${m.value}`}function q(a){return(0,e.v7)(a.worktreeId,a.cliToolId,a.instanceId)}function r(a){k.set(a,(k.get(a)??0)+1)}function s(a){return i.add(a),()=>{i.delete(a)}}function t(a){return n.add(a),()=>{n.delete(a)}}function u(a){let{cause:b,episodeId:c,previousEpisodeId:d,closeReason:e,...f}=a;for(let b of i)try{b(f)}catch(b){v(a,b)}for(let b of n)try{b(a)}catch(b){v(a,b)}}function v(a,b){g.error("waiting-transition-listener-failed",{worktreeId:a.worktreeId,cliToolId:a.cliToolId,instanceId:a.instanceId??a.cliToolId,waiting:a.waiting,error:b instanceof Error?b.message:String(b)})}function w(a){let b=j.get(a);return void 0===b&&(b={episodeId:p(),openedAt:a.since,boundAt:a.since,binding:o,openedBy:"legacy-edge",promptScreenKey:null},j.set(a,b)),b}function x(a,b,c){let d=h.get((0,e.v7)(a,b,c));if(void 0===d)return null;let f=w(d);return{since:d.since,kind:d.kind,...f,binding:f.binding}}function y(a,b,c){return k.get((0,e.v7)(a,b,c))??0}function z(a){let b=`${a}${e.CS}`,c=new Map;for(let[a,d]of k)a.startsWith(b)&&c.set(a,d);return c}function A(a,b,c){return l.get((0,e.v7)(a,b,c))??null}function B(a,b,c){return h.get((0,e.v7)(a,b,c))??null}function C(a){let b=`${a}${e.CS}`;for(let a of h.keys())if(a.startsWith(b))return!0;return!1}function D(a,b,c){let d=q(a),e={since:b.since,kind:b.kind},f={episodeId:p(),openedAt:c,boundAt:c,binding:b.binding,openedBy:b.openedBy,promptScreenKey:b.promptScreenKey??null};return h.set(d,e),j.set(e,f),r(d),u({worktreeId:a.worktreeId,cliToolId:a.cliToolId,instanceId:a.instanceId,waiting:!0,since:e.since,kind:e.kind,at:c,cause:"opened",episodeId:f.episodeId,previousEpisodeId:null,closeReason:null}),{...e,...f}}function E(a,b,c,d){let e=q(a),f=h.get(e);if(void 0===f)return!1;let g=w(f);return g.episodeId===b&&(h.delete(e),l.set(e,{at:d,promptScreenKey:g.promptScreenKey}),r(e),u({worktreeId:a.worktreeId,cliToolId:a.cliToolId,instanceId:a.instanceId,waiting:!1,since:null,kind:null,at:d,cause:"closed",episodeId:null,previousEpisodeId:g.episodeId,closeReason:c}),!0)}function F(a,b,c,d,e){let f=q(a),g=h.get(f);if(void 0===g)return null;let i=w(g);if(i.episodeId!==b)return null;l.set(f,{at:e,promptScreenKey:i.promptScreenKey});let k={since:c.since,kind:c.kind},m={episodeId:p(),openedAt:e,boundAt:e,binding:c.binding,openedBy:c.openedBy,promptScreenKey:c.promptScreenKey??null};return h.set(f,k),j.set(k,m),r(f),u({worktreeId:a.worktreeId,cliToolId:a.cliToolId,instanceId:a.instanceId,waiting:!0,since:k.since,kind:k.kind,at:e,cause:"replaced",episodeId:m.episodeId,previousEpisodeId:i.episodeId,closeReason:d}),{...k,...m}}function G(a,b,c,d){let e=q(a),f=h.get(e);if(void 0===f)return!1;let g=w(f);return g.episodeId===b&&(g.binding=c,g.boundAt=d,r(e),!0)}function H(a,b,c){let d=h.get(q(a));return void 0!==d&&w(d).episodeId===b&&(d.kind=c,!0)}function I(a){globalThis.__sessionWaitingEpisodeBindingResolver=a}(0,d.h)("waiting-episode-state")},39532:(a,b,c)=>{c.d(b,{HO:()=>m,Vi:()=>i,mt:()=>n,vQ:()=>j,z2:()=>k});var d=c(36925),e=c(682);let f=(0,d.v)("__promptObservationScreenAppearances",()=>new Map);function g(a){return null===a?null:a.replace(/\s+/g," ").trim()}let h=/^[ \t]*[>\u276F\u203A\u25CF]?[ \t]*/u;function i(a,b,c){let d=a.split("\n"),f=(0,e.c)(d,d.length,12);if(null===f)return null;let g=[...f.options],i=g.length-1;if(""!==f.footer&&(g[i]=[g[i],...f.footer.split("\n")].join(" ").trim()),g.length!==b.length||g.some((a,d)=>!c(a,b[d])))return null;let j=function(a,b){let c=[b.lastRow];for(let d=b.lastRow;c.length<b.options.length-1;){let f=(0,e.c)(a,d,a.length);if(null===f||f.firstRow!==b.firstRow||f.lastRow>=d)return null;c.unshift(f.lastRow),d=f.lastRow}return c.unshift(b.firstRow),c.length===b.options.length?c:null}(d,f);if(null===j)return null;let k=new Set(j);return d.map((a,b)=>k.has(b)?a.replace(h," "):a).join("\n")}function j(a,b,c){return null===b||"antigravity-permission"!==a?b:i(b,c,(a,b)=>a===b)??b}function k(a){return JSON.stringify([a.sessionName,a.sessionGeneration,a.kind,g(a.question),a.options.map(g),g(j(a.kind,a.approvalTarget,a.options))])}function l(a){return JSON.stringify([a.worktreeId,a.cliToolId,a.instanceId])}function m(a,b,c){let d=l(a),e=f.get(d);f.delete(d);let g=e?.fingerprint===b?e.firstSeenAt:Math.floor(c);for(f.set(d,{fingerprint:b,firstSeenAt:g});f.size>1024;){let a=f.keys().next().value;if(void 0===a)break;f.delete(a)}return g}function n(a){f.delete(l(a))}},41842:(a,b,c)=>{c.d(b,{$C:()=>r,Fw:()=>p,J2:()=>s,Mm:()=>u,Ou:()=>v,QL:()=>n,Y_:()=>x,n5:()=>o,pi:()=>y,qo:()=>w,r4:()=>l,sb:()=>k,u0:()=>j,wQ:()=>i,wx:()=>h});var d=c(55511),e=c(24455),f=c(24581),g=c(36925);let h=(0,g.v)("__agentEventDrops",()=>new Map),i=(0,g.v)("__agentEventRecentKeys",()=>new Map),j=(0,g.v)("__agentEventRecentIdentities",()=>new Map),k=3e3,l=512;function m(){return{dedupDropped:{identity:0,timeWindow:0},decisionEvicted:0,idsDiscarded:0,dialogTimedOut:0,decisionOverflow:0}}function n(a){let b=h.get(a);return b||(b=m(),h.set(a,b),x(h,l)),b}function o(a,b,c){let d=h.get((0,e.v7)(a,b,c));return d?{...d,dedupDropped:{...d.dedupDropped}}:m()}function p(a,b,c,d,g,h=Date.now(),j=null){var m,n;if(!g)return!1;let o=(0,e.v7)(a,b,c),r=q(o,d,j,g),s=i.get(r);return void 0!==s&&h-s<k||(i.set(r,h),f.Cb.has(d)?t(o,["stop"],g):"stop"===d&&(m=o,n=g,t(m,f.Cb,n)),function(a){for(let[b,c]of i)a-c>=k&&i.delete(b);for(;i.size>l;){let a=i.keys().next();if(a.done)break;i.delete(a.value)}}(h),!1)}function q(a,b,c,d){return[a,b,c??"",d].join(" ")}function r(a,b,c,d,f,g=null){if(!f)return null;let h=(0,e.v7)(a,b,c);return i.get(q(h,d,g,f))??null}function s(a){return(0,d.createHash)("sha256").update(a).digest("hex").slice(0,8)}function t(a,b,c){let d=Array.from(b,b=>`${a} ${b} `),e=` ${c}`,f=(a,b)=>a.length>=b.length+e.length&&a.startsWith(b);for(let a of i.keys())a.endsWith(e)&&d.some(b=>f(a,b))&&i.delete(a)}function u(){return i.size}let v=["stop","session_end"];function w(a){let b=(0,e.v7)(a.worktreeId,a.cliToolId,a.instanceId);if(null!==a.identityKind){let d=null===a.identity?null:(0,f.Xq)(a.identity);if(null!==a.identity&&null===d&&(n(b).idsDiscarded+=1),null!==d)return!function(a,b){let c=(0,e.v7)(a.worktreeId,a.cliToolId,a.instanceId),d=j.get(c);d||(d=new Map,j.set(c,d),x(j,l));let f=[a.event,a.detail??"",b].join(" ");return!!d.has(f)||(d.set(f,a.at),x(d,l),!1)}(a,d)?{duplicate:!1}:(n(b).dedupDropped.identity+=1,{duplicate:!0,by:"identity"});if(v.includes(a.event)){var c;return"stop"===a.event&&a.sessionId&&(c=a.sessionId,t(b,f.Cb,c)),{duplicate:!1}}}return p(a.worktreeId,a.cliToolId,a.instanceId,a.event,a.sessionId,a.at,a.detail)?(n(b).dedupDropped.timeWindow+=1,{duplicate:!0,by:"time-window"}):{duplicate:!1}}function x(a,b){for(;a.size>b;){let b=a.keys().next();if(b.done)break;a.delete(b.value)}}function y(a,b,c){if(void 0===a||void 0===b){let a=0;for(let b of j.values())a+=b.size;return a}return j.get((0,e.v7)(a,b,c))?.size??0}},49154:(a,b,c)=>{c.d(b,{GF:()=>e,Wk:()=>g,mW:()=>f});var d=c(13287);let e="question",f=[d.k$,e];function g(a){return null!==a&&f.includes(a)?"question":"permission"}},56791:(a,b,c)=>{c.r(b),c.d(b,{ACTIVE_FILTER:()=>d.ks,ACTIVE_TASK_STATUSES:()=>d.EL,AgentInstanceLimitError:()=>d.AC,CURRENT_SCHEMA_VERSION:()=>f.FT,DEFAULT_RUN_HISTORY_LIMIT:()=>d.Tu,InvalidAgentInstanceError:()=>d.ug,MAX_DISABLED_REPOSITORIES:()=>h.nc,MAX_RUN_HISTORY_DAYS:()=>d.eP,MAX_RUN_HISTORY_LIMIT:()=>d.mg,MemoDbError:()=>d.lm,NEW_SUBSCRIPTION_DEFAULTS:()=>d.s6,PUSH_DEFAULTS_VERSION:()=>d.VP,RepositoryDbError:()=>h.j8,TASK_STATUSES:()=>d.Hi,TERMINAL_TASK_STATUSES:()=>d.sA,VERIFICATION_GATE_SOURCES:()=>d.Dx,VERIFICATION_TRIGGERS:()=>d.af,WORKTREE_TODO_STATUSES:()=>d.KG,addAgentInstance:()=>d.Uq,cancelTimer:()=>d.Ud,cancelTimersByWorktree:()=>d.$$,cleanupOldTimers:()=>d.ul,clearInProgressMessageId:()=>d.YX,clearLastUserMessage:()=>d.cf,clearTimerHistory:()=>d.jf,closeDbInstance:()=>e.closeDbInstance,countAgentInstances:()=>d.fs,countDisabledRepositories:()=>h.QJ,countPushSubscriptionsForKind:()=>d.rC,countWorktreesByRepositoryPath:()=>h.kp,createCloneJob:()=>h.tw,createGateResult:()=>d.hl,createMemo:()=>d.To,createMessage:()=>d.oH,createRepository:()=>h.vB,createTask:()=>d.UT,createTimer:()=>d.CR,createVerificationRun:()=>d.rY,createWorktreeTodo:()=>d.yy,deleteAllMessages:()=>d.pE,deleteMemo:()=>d.cP,deleteMessageById:()=>d.DF,deleteMessagesByCliTool:()=>d.lA,deleteMessagesByInstance:()=>d.Qp,deletePushSubscriptionByEndpoint:()=>d.th,deleteRepository:()=>h.oG,deleteRepositoryWorktrees:()=>d.oZ,deleteSessionState:()=>d.ZP,deleteWorktreeTodo:()=>d.vg,deleteWorktreesByIds:()=>d.Rm,disableExistingRepository:()=>h.eP,disableRepository:()=>h.l$,ensureEnvRepositoriesRegistered:()=>h.ES,filterExcludedPaths:()=>h.Ho,findMessageByRequestId:()=>d.Ow,finishGateResult:()=>d.C8,finishVerificationRun:()=>d.u$,getActiveCloneJobByUrl:()=>h.fD,getActiveTask:()=>d.__,getActiveTaskForInstance:()=>d.MH,getAgentInstance:()=>d.BN,getAgentInstances:()=>d.m0,getAliasedWorktreeIds:()=>d.r3,getAllPushSubscriptions:()=>d.Se,getAllRepositories:()=>h.Yg,getAllRepositoriesWithWorktreeCount:()=>h._D,getAllWorktreeAliases:()=>d.fX,getAllWorktreeIds:()=>d.nO,getAllWorktreePathIds:()=>d.Sj,getCloneJob:()=>h.bM,getCloneJobsByStatus:()=>h.n_,getCurrentVersion:()=>f.Mj,getDailyReport:()=>d.ap,getDbInstance:()=>e.getDbInstance,getDefaultDbPath:()=>g.$b,getExcludedRepositories:()=>h.lS,getExcludedRepositoryPaths:()=>h.pr,getInitialBranch:()=>d.p4,getIssueDbPath:()=>g.zm,getLastAssistantMessageAt:()=>d.nP,getLastMessage:()=>d.sy,getLastUserMessage:()=>d.r8,getLegacyDbPaths:()=>q,getMemoById:()=>d.DN,getMemosByWorktreeId:()=>d.pZ,getMessageById:()=>d.kA,getMessages:()=>d.VL,getMessagesByDateRange:()=>d.lr,getMigrationHistory:()=>f.PS,getPendingTimerCountByWorktree:()=>d.GF,getPendingTimers:()=>d._O,getPushSubscriptionByEndpoint:()=>d.CF,getPushSubscriptionsForKind:()=>d.gn,getRepositories:()=>d.NV,getRepositoryById:()=>h.r,getRepositoryByNormalizedUrl:()=>h.Uj,getRepositoryByPath:()=>h.Dp,getRunningVerificationRun:()=>d.WZ,getSessionState:()=>d.y1,getTask:()=>d.gg,getTimerById:()=>d.kx,getTimersByWorktree:()=>d.DP,getTodosByWorktreeId:()=>d.fr,getVerificationRun:()=>d.J6,getWorktreeAliases:()=>d.Q2,getWorktreeById:()=>d.Ui,getWorktreeIdsByRepository:()=>d.P9,getWorktreeTodoById:()=>d.eN,getWorktrees:()=>d.vi,getWorktreesByRepository:()=>d.uJ,initDatabase:()=>d.s4,isTerminalTaskStatus:()=>d.uB,isWorktreeTodoStatus:()=>d.yT,listRunningVerificationRuns:()=>d.Fi,listTaskEvents:()=>d.HB,listTasks:()=>d.Vk,listVerificationRuns:()=>d.Mt,listVerificationRunsForPeriod:()=>d.UE,markPendingPromptsAsAnswered:()=>d.PL,migrateDbIfNeeded:()=>r,migrateWorktreeIdPreservingChildren:()=>d._h,pushSubscriptionNeedsDefaultsNotice:()=>d.Zj,recomputeLastUserMessage:()=>d.jp,recordAnsweredPrompt:()=>d.pG,recordWorktreeAlias:()=>d.xJ,recoverStuckSendingTimers:()=>d.Xm,registerAndFilterRepositories:()=>h.$G,removeAgentInstance:()=>d.NU,reorderMemos:()=>d.nQ,reorderWorktreeTodos:()=>d.yb,resolveAndValidatePath:()=>p,resolveRepositoryPath:()=>h.mE,resolveWorktreeIdWithAlias:()=>d.l0,restoreRepository:()=>h.RS,rollbackMigrations:()=>f.Wy,runMigrations:()=>f.vI,saveDailyReport:()=>d.tt,saveInitialBranch:()=>d.GA,setAgentInstances:()=>d.Cs,setInProgressMessageId:()=>d.OF,setRepositoryEnabled:()=>h.iQ,updateCliToolId:()=>d.WU,updateCloneJob:()=>h.k5,updateDailyReportContent:()=>d.IF,updateFavorite:()=>d.O,updateLastUserMessage:()=>d.EU,updateLastViewedAt:()=>d.HZ,updateMemo:()=>d.UY,updateMessageContent:()=>d.e8,updatePromptData:()=>d.cw,updatePushSubscriptionPreferences:()=>d.jJ,updateRepository:()=>h.Ir,updateSelectedAgents:()=>d.DC,updateSessionState:()=>d.PP,updateStatus:()=>d.yB,updateTimerStatus:()=>d.j2,updateVibeLocalContextWindow:()=>d.s,updateVibeLocalModel:()=>d.iu,updateWorktreeDescription:()=>d.hq,updateWorktreeLink:()=>d.z1,updateWorktreeTodo:()=>d.bl,upsertPushSubscription:()=>d.jA,upsertWorktree:()=>d.ZL,validateDbPath:()=>g.Sv,validateRepositoryPath:()=>h.Ux,validateSchema:()=>f.i6});var d=c(683),e=c(88807),f=c(67469),g=c(20416),h=c(10406),i=c(29021),j=c.n(i),k=c(33873),l=c.n(k),m=c(21820),n=c(7956);let o=(0,c(72626).h)("db-migration-path");function p(a,b){try{if(!j().existsSync(a))return null;let c=j().realpathSync(a);if((0,n.fW)(c))return o.warn(`[Security] ${b} points to system directory, skipping: ${c}`),null;return c}catch{return o.warn(`[Security] Failed to resolve ${b}: ${a}`),null}}function q(){let a=[];a.push(l().join(process.cwd(),"data","db.sqlite")),a.push(l().join(process.cwd(),"data","cm.db")),a.push(l().join((0,m.homedir)(),".commandmate","data","db.sqlite"));let b=process.env.DATABASE_PATH;if(b)try{let c=l().resolve(b);(0,n.fW)(c)?o.warn(`[Security] Skipping DATABASE_PATH in system directory: ${c}`):a.push(b)}catch{o.warn(`[Security] Invalid DATABASE_PATH: ${b}`)}return a}function r(a){let b=l().resolve(a);if((0,n.fW)(b))throw Error(`Security error: Target path cannot be in system directory: ${b}`);if(j().existsSync(a)){let b=p(a,"target path");if(b)return{migrated:!1,targetPath:b}}for(let a of q()){let c=p(a,"legacy path");if(!c)continue;let d=`${c}.bak`;j().copyFileSync(c,d),j().chmodSync(d,384);let e=l().dirname(b);return j().existsSync(e)||j().mkdirSync(e,{recursive:!0,mode:448}),j().copyFileSync(c,b),o.info(`[Migration] Database migrated from ${c} to ${b}`),o.info(`[Migration] Backup created at ${d}`),{migrated:!0,sourcePath:c,targetPath:b,backupPath:d}}return{migrated:!1,targetPath:b}}},67882:(a,b,c)=>{c.d(b,{DA:()=>e,O_:()=>f,Oh:()=>d,_K:()=>i,kA:()=>g,px:()=>h});let d={PROMPT_SUBMIT:"hook_prompt_submit",STOP:"hook_stop",PERMISSION_PROMPT:"hook_permission_prompt",PERMISSION_REQUEST:"hook_permission_request",IDLE_PROMPT:"hook_idle_prompt",PRE_TOOL_USE:"hook_pre_tool_use",POST_TOOL_USE:"hook_post_tool_use"};function e(a,b){switch(a){case"user_prompt_submit":return{status:"running",reason:d.PROMPT_SUBMIT};case"pre_tool_use":return{status:"running",reason:d.PRE_TOOL_USE};case"post_tool_use":return{status:"running",reason:d.POST_TOOL_USE};case"stop":return{status:"ready",reason:d.STOP};case"notification":if("permission_prompt"===b)return{status:"waiting",reason:d.PERMISSION_PROMPT};if("idle_prompt"===b)return{status:"ready",reason:d.IDLE_PROMPT};return null;default:return null}}function f(a,b=!1){switch(a){case"waiting":return{isWaitingForResponse:!0,isProcessing:!1};case"running":return{isWaitingForResponse:!1,isProcessing:!b};default:return{isWaitingForResponse:!1,isProcessing:!1}}}function g(a){return a?a.isWaitingForResponse?"waiting":a.isProcessing?"running":a.isRunning?"ready":"idle":"idle"}function h(a){return a?.isUnclassified===!0&&"ready"===g(a)}function i(a){return a.isSessionRunning?a.isWaitingForResponse?"waiting":a.isProcessing?"running":"ready":null}},81254:(a,b,c)=>{function d(a){return"answer_only"===a||"answer_then_enter"===a}c.d(b,{LT:()=>e,MI:()=>d,XF:()=>f});let e="unclassified";function f(a){return null!=a&&a.type!==e}},85322:(a,b,c)=>{c.d(b,{k:()=>d});let d="opencode"},85726:(a,b,c)=>{c.d(b,{J:()=>d});function d(a){return`${a.type}:${a.question}`}},91227:(a,b,c)=>{c.d(b,{c:()=>f});var d=c(85726),e=c(39532);function f(a){let b="multiple_choice"===a.type?a.options.map(a=>`${a.number}.${a.label}`).join("\n"):a.options.join("\n");return[(0,d.J)(a),b,function(a){let b=a.approvalTarget??"";return"multiple_choice"!==a.type?b:(0,e.Vi)(b,a.options.map(a=>a.label),(a,b)=>a.startsWith(b))??b.split("\n").map(a=>a.replace(/^[\s❯›>▶►●○◉→]+/u,"")).join("\n")}(a)].join("\0")}},91631:(a,b,c)=>{c.d(b,{$M:()=>B,BZ:()=>k,Bf:()=>w,Dy:()=>G,Ev:()=>q,Ln:()=>s,NW:()=>v,Or:()=>j,SQ:()=>I,Yb:()=>A,ZG:()=>i,_i:()=>z,fY:()=>x,i1:()=>m,j0:()=>n,nC:()=>H,pO:()=>u,rT:()=>D,sp:()=>o,zM:()=>y});var d=c(24455),e=c(62887),f=c(24581),g=c(41842),h=c(36925);let i=(0,h.v)("__agentEventGenerationStartedAt",()=>new Map),j=(0,h.v)("__agentEventTurns",()=>new Map),k=(0,h.v)("__agentEventReopenedTurns",()=>new Map),l=(0,h.v)("__agentEventTurnSeq",()=>({value:0}));function m(a){globalThis.__agentEventTurnOutcomeSink=a}function n(a){return null===a?{kind:"none"}:{kind:"opened",at:a}}function o(a,b){return a.pendingDecisions.filter(a=>(0,f.jF)(a,b)).length}function p(a,b,c){if(null===a)return{kind:"none"};if(null!==a.closedAt)return{kind:"closed",turnId:a.turnId,closedBy:a.closedBy??"stop"};if(null===a.openedAt){let b=o(a,c);return b>0?{kind:"dialog-only",turnId:a.turnId,decisions:b,sessionId:a.sessionId}:{kind:"display-only",turnId:a.turnId}}return(0,f.ZV)(a,b)?{kind:"open-same-session",turnId:a.turnId}:{kind:"open-other-session",turnId:a.turnId}}function q(a){return i.get(a)??null}function r(a){let b=j.get(a);return b&&b.generationAt===q(a)?b:null}function s(a,b){let c=r(a);return null===c?null:(null===c.closedAt&&b-c.displayEvent.at>=f.Mu&&(c.closedAt=c.displayEvent.at+f.Mu,c.closedBy="stale"),c)}function t(a){return l.value+=1,`turn-${a}-${l.value}`}function u(a,b,c){let d=b.pendingDecisions.filter(a=>(0,f.jF)(a,c)),e=b.pendingDecisions.length-d.length;return e>0&&((0,g.QL)(a).dialogTimedOut+=e,b.pendingDecisions=d),d}function v(a,b,c,e=Date.now()){let f=(0,d.v7)(a,b,c),g=s(f,e);return null===g?[]:u(f,g,e)}function w(a,b,c,e=Date.now()){return s((0,d.v7)(a,b,c),e)}function x(a,b,c,d=Date.now()){return(0,f.nY)(w(a,b,c,d))}function y(a,b,c,e,f=Date.now()){let g=r((0,d.v7)(a,b,c));return null!==g&&null===g.closedAt&&(g.closedAt=f,g.closedBy=e,!0)}function z(a,b,c,e,g=Date.now(),h=!0){let i=r((0,d.v7)(a,b,c));return null!==i&&null===i.closedAt&&(e?(i.scraperCompletionPolls+=1,!(i.scraperCompletionPolls<f.Tt)&&!!h&&(i.closedAt=g,i.closedBy="scraper_evidence",!0)):(i.scraperCompletionPolls=0,!1))}function A(a,b,c="session-start"){let d=j.get(a),e={kind:"generation-fenced",source:c,generation:n(q(a)),fencedTurnId:d?.turnId??null};return d?(0!==d.pendingDecisions.length&&((0,g.QL)(a).decisionEvicted+=d.pendingDecisions.length,d.pendingDecisions=[]),null!==d.closedAt||(d.closedAt=b,d.closedBy="generation",d.generationAt=b),e):e}function B(a,b){let c=q(a);if(null!==c&&b.at<c)return"stop"===b.event?{kind:"stop-rejected",reason:"before-generation"}:"session_end"===b.event?{kind:"session-end-rejected",reason:"before-generation"}:{kind:"none"};switch(b.event){case"user_prompt_submit":{let d=F(a,b,"user_prompt_submit",c,{continueOpen:!0===b.joinsOpenTurn});return I(a),d}case"post_tool_use":{let d=F(a,b,"post_tool_use",c,{continueOpen:!0});return I(a),d}case"pre_tool_use":if(!0===b.promptOpensTurns&&C(a))return{kind:"none"};return F(a,b,"pre_tool_use",c,{continueOpen:!0});case"stop":var d=a,g=b,h=c;let i=r(d);if(null!==i&&null===i.closedAt&&null!==i.openedAt)return(0,f.ZV)(i,g.sessionId)?(i.closedAt=g.at,i.closedBy="stop",i.displayEvent=E(g),I(d),{kind:"stopped",turnId:i.turnId,generation:n(h)}):{kind:"stop-rejected",reason:"other-session"};let k=p(i,g.sessionId,g.at);if("dialog-only"===k.kind&&null!==k.sessionId&&null!==g.sessionId&&k.sessionId!==g.sessionId)return{kind:"stop-rejected",reason:"other-session"};let l=t(g.at);return j.set(d,{turnId:l,sessionId:g.sessionId,openedAt:null,closedAt:g.at,closedBy:"stop",generationAt:h,displayEvent:E(g),pendingDecisions:[],scraperCompletionPolls:0}),K(),{kind:"stop-without-turn",recordTurnId:l,generation:n(h),previous:k};case"session_end":{let c=function(a,b){let c=r(a);return null===c?{kind:"session-end-rejected",reason:"no-turn"}:(0,f.ZV)(c,b.sessionId)?(c.closedAt=b.at,c.closedBy="session_end",{kind:"session-ended",turnId:c.turnId}):{kind:"session-end-rejected",reason:"other-session"}}(a,b);return I(a),c}case"session_start":return{kind:"none"};case"notification":var m=a,o=b,s=c;if("permission_prompt"===o.detail)return!0===o.promptSettled?J(m,o):{kind:"decision-opened",...H(m,s,{source:"notification",at:o.at,message:o.message??null,toolName:o.toolName??null,patterns:o.decisionPatterns??null,decisionId:o.decisionId??null,bootstrapDisplay:E(o),sessionId:o.sessionId})};if(o.detail===e.KC)return!0===o.promptSettled?J(m,o):{kind:"none"};if("idle_prompt"===o.detail){I(m);let a=r(m);if(null!==a&&null===a.closedAt)return a.displayEvent=E(o),{kind:"none"};if(null!==a)return{kind:"none"};j.set(m,{turnId:t(o.at),sessionId:o.sessionId,openedAt:null,closedAt:null,closedBy:null,generationAt:s,displayEvent:E(o),pendingDecisions:[],scraperCompletionPolls:0}),K()}return{kind:"none"};default:return b.event,{kind:"none"}}}function C(a){let b=r(a);return null!==b&&null!==b.closedAt&&"stop"===b.closedBy}function D(a,b,c,e){return e&&C((0,d.v7)(a,b,c))}function E(a){return{event:a.event,at:a.at,detail:a.detail}}function F(a,b,c,d,{continueOpen:e}){let h=r(a),i=p(h,b.sessionId,b.at),l=null!==h&&null===h.closedAt&&null!==h.openedAt&&(0,f.ZV)(h,b.sessionId);if(e&&l)return h.displayEvent=E(b),h.sessionId??=b.sessionId,h.scraperCompletionPolls=0,{kind:"continued",turnId:h.turnId};let m=null!==h&&null===h.openedAt&&null===h.closedAt?h.pendingDecisions:[],o={turnId:t(b.at),sessionId:b.sessionId,openedAt:b.at,closedAt:null,closedBy:null,generationAt:d,displayEvent:E(b),pendingDecisions:m,scraperCompletionPolls:0};return j.set(a,o),K(),"user_prompt_submit"===b.event&&l&&(k.set(a,{turnId:o.turnId,replaced:h}),(0,g.Y_)(k,g.r4)),{kind:"opened",turnId:o.turnId,event:c,generation:n(d),previous:i}}function G(a,b,c,e){if("user_prompt_submit"!==e.event||!0!==e.joinsOpenTurn)return!1;let g=(0,d.v7)(a,b,c),h=k.get(g),i=r(g);if(!h||null===i||i.turnId!==h.turnId||null!==i.closedAt||!(0,f.ZV)(i,e.sessionId))return!1;let{replaced:l}=h;return l.generationAt===i.generationAt&&(j.set(g,{...l,closedAt:null,closedBy:null,displayEvent:i.displayEvent,pendingDecisions:i.pendingDecisions,scraperCompletionPolls:0}),k.delete(g),globalThis.__agentEventTurnOutcomeSink?.({worktreeId:a,cliToolId:b,instanceId:c},[{kind:"restored",restoredTurnId:l.turnId,discardedTurnId:i.turnId}]),!0)}function H(a,b,c){let d=r(a);null===d||null!==d.closedAt?(d={turnId:t(c.at),sessionId:c.sessionId??null,openedAt:null,closedAt:null,closedBy:null,generationAt:b,displayEvent:c.bootstrapDisplay,pendingDecisions:[],scraperCompletionPolls:0},j.set(a,d),K()):null===d.openedAt&&null===d.sessionId&&(d.sessionId=c.sessionId??null);let e={recordTurnId:d.turnId,recordKind:null!==d.openedAt?"turn":"dialog-only"},h=null===c.decisionId?null:(0,f.Xq)(c.decisionId);null!==c.decisionId&&null===h&&((0,g.QL)(a).idsDiscarded+=1);let i="notification"===c.source,k=null!==h?d.pendingDecisions.find(a=>a.decisionId===h)??d.pendingDecisions.find(a=>null===a.decisionId&&"permission-request"===a.source):d.pendingDecisions.find(a=>null===a.decisionId);return k?(k.message=(0,f.wt)(c.message)??k.message,k.toolName=(0,f.kT)(c.toolName)??k.toolName,k.patterns=(0,f.Ui)(c.patterns)??k.patterns,k.decisionId??=h,i&&(k.source="notification",k.confirmedAt??=c.at)):d.pendingDecisions.length>=f.RY?(0,g.QL)(a).decisionOverflow+=1:d.pendingDecisions.push({decisionId:h,at:c.at,source:c.source,message:(0,f.wt)(c.message),toolName:(0,f.kT)(c.toolName),patterns:(0,f.Ui)(c.patterns),confirmedAt:i?c.at:null,scraperCorroborated:!1,recorded:!1}),e}function I(a){let b=r(a);null!==b&&(b.pendingDecisions=[])}function J(a,b){let c=r(a);if(null===c||0===c.pendingDecisions.length)return{kind:"none"};let d=c.pendingDecisions.length,e=null===b.decisionId||void 0===b.decisionId?null:(0,f.Xq)(b.decisionId);return null===e?c.pendingDecisions=[]:c.pendingDecisions=c.pendingDecisions.filter(a=>null!==a.decisionId&&a.decisionId!==e),{kind:"decision-answered",recordTurnId:c.turnId,recordKind:null!==c.openedAt?"turn":"dialog-only",before:d,remaining:c.pendingDecisions.length}}function K(){(0,g.Y_)(j,g.r4)}},95375:(a,b,c)=>{c.r(b),c.d(b,{AGENT_EVENT_DEDUP_WINDOW_MS:()=>f.sb,AGENT_MODEL_EFFORT_SUFFIX_PATTERN:()=>p,LIFECYCLE_AGENT_EVENT_TYPES:()=>f.Ou,STRUCTURED_PROMPT_PROVISIONAL_MAX_AGE_MS:()=>ad,STRUCTURED_STATE_MAX_AGE_MS:()=>L,agentEventKeyClaimedAt:()=>f.$C,beginAgentEventGeneration:()=>aa,classifyAgentEventDelivery:()=>f.qo,clearAgentStopEvents:()=>ak,clearAskUserQuestion:()=>U,clearStructuredPromptWaiting:()=>aj,closeAgentTurn:()=>I.zM,corroborateStructuredPromptWaiting:()=>ah,discardAgentEventState:()=>ac,getAgentEventDropCounts:()=>f.n5,getAgentEventGenerationStartedAt:()=>ab,getAgentModelBaseline:()=>u,getAgentTurn:()=>I.Bf,getAskUserQuestion:()=>T,getAwaitingInstruction:()=>O,getLastAgentEvent:()=>_,getLastCapturedModelInfo:()=>A,getLastKnownAgentEffort:()=>G,getLastKnownAgentModel:()=>x,getLastReportedAgentEffort:()=>F,getLastStopEventAt:()=>Y,getPendingDecisions:()=>I.NW,getPublishedAgentTurn:()=>I.fY,getRecentEventIdentityCount:()=>f.pi,getRecentEventKeyCount:()=>f.Mm,getResolvedAgentModelInfo:()=>B,getStructuredPromptWaiting:()=>ag,getStructuredSessionState:()=>M,isAwaitingInstruction:()=>P,isDuplicateAgentEvent:()=>f.Fw,isPreToolUseOutsideTurn:()=>I.rT,isSameAgentModelName:()=>s,joinOpenTurnFromDuplicate:()=>I.Dy,markStructuredPromptRecorded:()=>ai,observeScraperCompletionEvidence:()=>I._i,onAgentModelChange:()=>t,recordAgentEvent:()=>$,recordAgentReportedEffort:()=>E,recordAgentReportedModel:()=>y,recordAgentStopEvent:()=>X,recordAskUserQuestion:()=>S,recordCapturedModelInfo:()=>z,reportPermissionRequestPending:()=>ae,reportQuestionPending:()=>af,shortSessionTag:()=>f.J2});var d=c(24455),e=c(27675),f=c(41842),g=c(62887),h=c(26547),i=c(36925);let j=(0,i.v)("__agentEventLastModel",()=>new Map),k=(0,i.v)("__agentEventLastModelAt",()=>new Map),l=(0,i.v)("__agentCapturedModelInfo",()=>new Map),m=(0,i.v)("__agentEventLastEffort",()=>new Map),n=(0,i.v)("__agentModelBaseline",()=>new Map),o=(0,i.v)("__agentModelChangeListeners",()=>new Set),p=/[-_ ](?:minimal|low|medium|high|xhigh)$/i,q=/\bcontext\b/gi;function r(a){return a.replace(p,"").replace(q,"").toLowerCase().replace(/[^a-z0-9]/g,"")}function s(a,b,c={}){let d=r(a),e=r(b);return d===e||!!c.crossSource&&0!==d.length&&0!==e.length&&(d.includes(e)||e.includes(d))}function t(a){return o.add(a),()=>{o.delete(a)}}function u(a,b,c){return n.get((0,d.v7)(a,b,c))??null}function v(a,b,c,e,g){let h=(0,d.v7)(a,b,c),{info:i,source:j}=D(h,b),k=i.model;if(null===k||null===j)return;let l=n.get(h),m={model:k,source:j};if(void 0===l){n.set(h,m),(0,f.Y_)(n,f.r4);return}if(s(l.model,k,{crossSource:l.source!==j}))return void n.set(h,m);n.set(h,m);var p={worktreeId:a,cliToolId:b,instanceId:c??b,from:l.model,to:k,source:e,at:g};for(let a of o)try{a(p)}catch{}}function w(a,b){"string"==typeof b.model&&""!==b.model&&(j.set(a,b.model.slice(0,g.h9)),k.set(a,b.at))}function x(a,b,c){return j.get((0,d.v7)(a,b,c))??null}function y(a,b,c,e,f=Date.now()){if("string"!=typeof e||""===e)return;let h=(0,d.v7)(a,b,c);j.set(h,e.slice(0,g.h9)),k.set(h,f),v(a,b,c,"hook",f)}function z(a,b,c,e,f=Date.now()){if(!e.model&&!e.effort)return;let h=(0,d.v7)(a,b,c),i=l.get(h),j=e.model?e.model.slice(0,g.h9):i?.model??null;l.set(h,{model:j,effort:e.effortUnreadable?null:e.effort??i?.effort??null,modelChangedAt:null===j?null:j===(i?.model??null)?i?.modelChangedAt??f:f}),e.model&&v(a,b,c,"frame",f)}function A(a,b,c){let e=l.get((0,d.v7)(a,b,c));return{model:e?.model??null,effort:e?.effort??null}}function B(a,b,c){return D((0,d.v7)(a,b,c),b).info}let C=new Set(["claude"]);function D(a,b){let c=j.get(a)??null,d=l.get(a),e={model:d?.model??null,effort:d?.effort??null},f=m.get(a)??null,g=d?.modelChangedAt??null,i=null!==c&&null!==e.model&&null!==g&&C.has(b)&&g>(k.get(a)??0)&&!s(c,e.model,{crossSource:!0}),n=(0,h.Yz)(b,i?null:c,e,f);return null===n.model?{info:n,source:null}:{info:n,source:null===c||i?"frame":"hook"}}function E(a,b,c,e){"string"==typeof e&&""!==e&&m.set((0,d.v7)(a,b,c),e.slice(0,g.h9))}function F(a,b,c){return m.get((0,d.v7)(a,b,c))??null}function G(a,b,c){return B(a,b,c).effort}var H=c(24581),I=c(91631),J=c(15044),K=c(67882);let L=H.Mu;function M(a,b,c,e=Date.now()){let f=(0,d.v7)(a,b,c),g=(0,I.Ln)(f,e);if(null===g)return null;let h=g.displayEvent;if(e-h.at>=L)return null;let i={event:h.event,at:h.at,detail:h.detail},j=(0,I.pO)(f,g,e);if(j.length>0)return{status:"waiting",reason:"notification"===j[0].source?K.Oh.PERMISSION_PROMPT:K.Oh.PERMISSION_REQUEST,...i};if(null!==g.closedAt)return"stop"===g.closedBy?{status:"ready",reason:K.Oh.STOP,...i}:null;let k=(0,K.DA)(h.event,h.detail);return null===k||"waiting"===k.status?null===g.openedAt?null:{status:"running",reason:K.Oh.PROMPT_SUBMIT,...i}:{...k,...i}}let N=(0,i.v)("__agentEventAwaitingInstruction",()=>new Map);function O(a,b,c){let e=(0,d.v7)(a,b,c),f=N.get(e);if(!f)return null;let g=I.ZG.get(e);return void 0!==g&&f.at<g?null:f}function P(a,b,c){return null!==O(a,b,c)}var Q=c(49154);let R=(0,i.v)("__agentEventAskUserQuestion",()=>new Map);function S(a,b,c,e,f=Date.now()){R.set((0,d.v7)(a,b,c),{at:f,spec:e})}function T(a,b,c,e=Date.now()){let f=(0,d.v7)(a,b,c),g=R.get(f);if(!g)return null;let h=I.ZG.get(f);return void 0!==h&&g.at<h||e-g.at>=L?null:g}function U(a,b,c){R.delete((0,d.v7)(a,b,c))}let V=(0,i.v)("__agentEventLastStopAt",()=>new Map),W=(0,i.v)("__agentEventLast",()=>new Map);function X(a,b,c,e=Date.now()){V.set((0,d.v7)(a,b,c),e)}function Y(a,b,c){return V.get((0,d.v7)(a,b,c))??null}let Z=["running","waiting"];function $(a,b,c,f,g={}){let h=(0,d.v7)(a,b,c);if(function(a,b,c,e,f){if("session_start"!==e.event||!0!==f.sessionStartMayArriveLate)return!1;let g=M(a,b,c,e.at);if(null===g||!Z.includes(g.status))return!1;let h=W.get((0,d.v7)(a,b,c))?.sessionId??null;return null===h||null==e.sessionId||e.sessionId===h}(a,b,c,f,g))return w(h,f),v(a,b,c,"hook",f.at),{recorded:!1,skipped:"late-session-start"};W.set(h,f);let i=[];return"session_start"===f.event&&n.delete(h),w(h,f),v(a,b,c,"hook",f.at),!function(a,b){switch(b.event){case"pre_tool_use":Q.mW.includes(b.detail??"")||R.delete(a);return;case"notification":"idle_prompt"===b.detail&&R.delete(a);return;case"post_tool_use":case"stop":case"user_prompt_submit":case"session_start":case"session_end":R.delete(a);return;default:b.event;return}}(h,f),"session_start"===f.event&&(I.ZG.set(h,f.at),(0,e.eZ)(a,b,c),i.push((0,I.Yb)(h,f.at,"session-start"))),i.push((0,I.$M)(h,f)),!function(a,b){switch(b.event){case"notification":"idle_prompt"===b.detail&&N.set(a,{at:b.at,message:b.message??null});return;case"user_prompt_submit":case"session_start":case"session_end":N.delete(a);return;case"stop":case"pre_tool_use":case"post_tool_use":return;default:b.event;return}}(h,f),(0,J.Dd)({worktreeId:a,cliToolId:b,instanceId:c},i),{recorded:!0}}function _(a,b,c){return W.get((0,d.v7)(a,b,c))??null}function aa(a,b,c,e=Date.now()){let g=(0,d.v7)(a,b,c);I.ZG.set(g,e);let h=(0,I.Yb)(g,e,"process-start");R.delete(g),N.delete(g),j.delete(g),k.delete(g),l.delete(g),m.delete(g),n.delete(g),f.u0.delete(g),(0,J.Dd)({worktreeId:a,cliToolId:b,instanceId:c},[h],e)}function ab(a,b,c){return I.ZG.get((0,d.v7)(a,b,c))??null}function ac(a,b,c){let e=(0,d.v7)(a,b,c);W.delete(e),I.ZG.delete(e),I.Or.delete(e),f.wx.delete(e),R.delete(e),N.delete(e),j.delete(e),k.delete(e),l.delete(e),m.delete(e),n.delete(e),f.u0.delete(e)}let ad=H.h_.predicted;function ae(a,b,c,e,f=Date.now()){let g=(0,d.v7)(a,b,c),h=(0,I.nC)(g,(0,I.Ev)(g),{source:"permission-request",at:f,message:null,toolName:e,patterns:null,decisionId:null,bootstrapDisplay:{event:"notification",at:f,detail:"permission_prompt"}});(0,J.Dd)({worktreeId:a,cliToolId:b,instanceId:c},[{kind:"decision-opened",...h}])}function af(a,b,c,e,f=Date.now()){let g=(0,d.v7)(a,b,c),h=(0,I.nC)(g,(0,I.Ev)(g),{source:"notification",at:f,message:null,toolName:e.toolName,patterns:null,decisionId:e.decisionId,bootstrapDisplay:{event:"notification",at:f,detail:e.detail}});(0,J.Dd)({worktreeId:a,cliToolId:b,instanceId:c},[{kind:"decision-opened",...h}])}function ag(a,b,c,d=Date.now()){return(0,I.NW)(a,b,c,d)[0]??null}function ah(a,b,c,d=Date.now()){let e=ag(a,b,c,d);e&&(e.scraperCorroborated=!0,e.confirmedAt??=d)}function ai(a,b,c){let d=ag(a,b,c);d&&(d.recorded=!0)}function aj(a,b,c){(0,I.SQ)((0,d.v7)(a,b,c))}function ak(){V.clear(),W.clear(),f.wQ.clear(),f.u0.clear(),I.ZG.clear(),I.Or.clear(),I.BZ.clear(),f.wx.clear(),R.clear(),N.clear(),j.clear(),k.clear(),l.clear(),m.clear(),n.clear(),(0,J.qM)()}}};