commandmate 0.43.0 → 0.44.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (531) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +357 -361
  3. package/.next/app-path-routes-manifest.json +33 -33
  4. package/.next/build-manifest.json +5 -5
  5. package/.next/prerender-manifest.json +3 -3
  6. package/.next/react-loadable-manifest.json +3 -3
  7. package/.next/required-server-files.json +1 -1
  8. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  9. package/.next/server/app/api/agents/update/route.js.nft.json +1 -1
  10. package/.next/server/app/api/agents/update/route_client-reference-manifest.js +1 -1
  11. package/.next/server/app/api/agents/versions/route.js.nft.json +1 -1
  12. package/.next/server/app/api/agents/versions/route_client-reference-manifest.js +1 -1
  13. package/.next/server/app/api/app/release-notes/route_client-reference-manifest.js +1 -1
  14. package/.next/server/app/api/app/update/route.js +2 -2
  15. package/.next/server/app/api/app/update/route.js.nft.json +1 -1
  16. package/.next/server/app/api/app/update/route_client-reference-manifest.js +1 -1
  17. package/.next/server/app/api/app/update-check/route.js +1 -1
  18. package/.next/server/app/api/app/update-check/route.js.nft.json +1 -1
  19. package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
  20. package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  21. package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  22. package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  23. package/.next/server/app/api/capabilities/route.js +1 -1
  24. package/.next/server/app/api/capabilities/route_client-reference-manifest.js +1 -1
  25. package/.next/server/app/api/daily-summary/route.js.nft.json +1 -1
  26. package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +1 -1
  27. package/.next/server/app/api/daily-summary/status/route.js.nft.json +1 -1
  28. package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
  29. package/.next/server/app/api/external-apps/[id]/health/route.js.nft.json +1 -1
  30. package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
  31. package/.next/server/app/api/external-apps/[id]/route.js.nft.json +1 -1
  32. package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
  33. package/.next/server/app/api/external-apps/route.js.nft.json +1 -1
  34. package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
  35. package/.next/server/app/api/fs/browse/route.js.nft.json +1 -1
  36. package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -1
  37. package/.next/server/app/api/fs/recent-paths/route.js.nft.json +1 -1
  38. package/.next/server/app/api/fs/recent-paths/route_client-reference-manifest.js +1 -1
  39. package/.next/server/app/api/hooks/agent-event/route.js +2 -2
  40. package/.next/server/app/api/hooks/agent-event/route.js.nft.json +1 -1
  41. package/.next/server/app/api/hooks/agent-event/route_client-reference-manifest.js +1 -1
  42. package/.next/server/app/api/hooks/claude-done/route.js +2 -2
  43. package/.next/server/app/api/hooks/claude-done/route.js.nft.json +1 -1
  44. package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
  45. package/.next/server/app/api/hooks/permission-request/route.js +1 -1
  46. package/.next/server/app/api/hooks/permission-request/route.js.nft.json +1 -1
  47. package/.next/server/app/api/hooks/permission-request/route_client-reference-manifest.js +1 -1
  48. package/.next/server/app/api/metrics/vibe/route.js.nft.json +1 -1
  49. package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -1
  50. package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
  51. package/.next/server/app/api/push/escalation/route.js +1 -1
  52. package/.next/server/app/api/push/escalation/route.js.nft.json +1 -1
  53. package/.next/server/app/api/push/escalation/route_client-reference-manifest.js +1 -1
  54. package/.next/server/app/api/push/subscriptions/route.js.nft.json +1 -1
  55. package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
  56. package/.next/server/app/api/push/vapid/route.js +1 -1
  57. package/.next/server/app/api/push/vapid/route.js.nft.json +1 -1
  58. package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
  59. package/.next/server/app/api/relays/[relayId]/cancel/route.js +1 -1
  60. package/.next/server/app/api/relays/[relayId]/cancel/route.js.nft.json +1 -1
  61. package/.next/server/app/api/relays/[relayId]/cancel/route_client-reference-manifest.js +1 -1
  62. package/.next/server/app/api/relays/route.js +1 -1
  63. package/.next/server/app/api/relays/route.js.nft.json +1 -1
  64. package/.next/server/app/api/relays/route_client-reference-manifest.js +1 -1
  65. package/.next/server/app/api/remote/pair/route.js +2 -2
  66. package/.next/server/app/api/remote/pair/route_client-reference-manifest.js +1 -1
  67. package/.next/server/app/api/repositories/[id]/route.js.nft.json +1 -1
  68. package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
  69. package/.next/server/app/api/repositories/clone/[jobId]/route.js +1 -1
  70. package/.next/server/app/api/repositories/clone/[jobId]/route.js.nft.json +1 -1
  71. package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
  72. package/.next/server/app/api/repositories/clone/route.js +1 -1
  73. package/.next/server/app/api/repositories/clone/route.js.nft.json +1 -1
  74. package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
  75. package/.next/server/app/api/repositories/excluded/route.js.nft.json +1 -1
  76. package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
  77. package/.next/server/app/api/repositories/restore/route.js +1 -1
  78. package/.next/server/app/api/repositories/restore/route.js.nft.json +1 -1
  79. package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
  80. package/.next/server/app/api/repositories/route.js +1 -1
  81. package/.next/server/app/api/repositories/route.js.nft.json +1 -1
  82. package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
  83. package/.next/server/app/api/repositories/scan/route.js +1 -1
  84. package/.next/server/app/api/repositories/scan/route.js.nft.json +1 -1
  85. package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
  86. package/.next/server/app/api/repositories/sync/route.js +1 -1
  87. package/.next/server/app/api/repositories/sync/route.js.nft.json +1 -1
  88. package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
  89. package/.next/server/app/api/repositories/validate-path/route.js.nft.json +1 -1
  90. package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
  91. package/.next/server/app/api/settings/default-agents/route.js +1 -1
  92. package/.next/server/app/api/settings/default-agents/route.js.nft.json +1 -1
  93. package/.next/server/app/api/settings/default-agents/route_client-reference-manifest.js +1 -1
  94. package/.next/server/app/api/settings/default-surface-mode/route.js.nft.json +1 -1
  95. package/.next/server/app/api/settings/default-surface-mode/route_client-reference-manifest.js +1 -1
  96. package/.next/server/app/api/sidebar/group-order/route.js.nft.json +1 -1
  97. package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
  98. package/.next/server/app/api/skills/[id]/route.js +1 -1
  99. package/.next/server/app/api/skills/[id]/route.js.nft.json +1 -1
  100. package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
  101. package/.next/server/app/api/skills/installations/route.js +1 -1
  102. package/.next/server/app/api/skills/installations/route.js.nft.json +1 -1
  103. package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
  104. package/.next/server/app/api/skills/operations/route.js +2 -2
  105. package/.next/server/app/api/skills/operations/route.js.nft.json +1 -1
  106. package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
  107. package/.next/server/app/api/skills/reindex/route.js +1 -1
  108. package/.next/server/app/api/skills/reindex/route.js.nft.json +1 -1
  109. package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
  110. package/.next/server/app/api/skills/route.js +1 -1
  111. package/.next/server/app/api/skills/route.js.nft.json +1 -1
  112. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  113. package/.next/server/app/api/slash-commands/route.js.nft.json +1 -1
  114. package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
  115. package/.next/server/app/api/tasks/[taskId]/cancel/route.js.nft.json +1 -1
  116. package/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
  117. package/.next/server/app/api/tasks/[taskId]/route.js.nft.json +1 -1
  118. package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
  119. package/.next/server/app/api/templates/[id]/route.js.nft.json +1 -1
  120. package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
  121. package/.next/server/app/api/templates/route.js.nft.json +1 -1
  122. package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
  123. package/.next/server/app/api/verification/runs/[runId]/route.js.nft.json +1 -1
  124. package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -1
  125. package/.next/server/app/api/verification/runs/route.js.nft.json +1 -1
  126. package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -1
  127. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
  128. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js.nft.json +1 -1
  129. package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
  130. package/.next/server/app/api/worktrees/[id]/capture/route.js +1 -1
  131. package/.next/server/app/api/worktrees/[id]/capture/route.js.nft.json +1 -1
  132. package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
  133. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js +1 -1
  134. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js.nft.json +1 -1
  135. package/.next/server/app/api/worktrees/[id]/clear-composer/route_client-reference-manifest.js +1 -1
  136. package/.next/server/app/api/worktrees/[id]/cli-reference/route.js.nft.json +1 -1
  137. package/.next/server/app/api/worktrees/[id]/cli-reference/route_client-reference-manifest.js +1 -1
  138. package/.next/server/app/api/worktrees/[id]/cli-tool/route.js.nft.json +1 -1
  139. package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
  140. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js.nft.json +1 -1
  141. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
  142. package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
  143. package/.next/server/app/api/worktrees/[id]/current-output/route.js.nft.json +1 -1
  144. package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
  145. package/.next/server/app/api/worktrees/[id]/direct-input/route.js +1 -1
  146. package/.next/server/app/api/worktrees/[id]/direct-input/route.js.nft.json +1 -1
  147. package/.next/server/app/api/worktrees/[id]/direct-input/route_client-reference-manifest.js +1 -1
  148. package/.next/server/app/api/worktrees/[id]/env/route.js.nft.json +1 -1
  149. package/.next/server/app/api/worktrees/[id]/env/route_client-reference-manifest.js +1 -1
  150. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route.js.nft.json +1 -1
  151. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
  152. package/.next/server/app/api/worktrees/[id]/execution-logs/route.js.nft.json +1 -1
  153. package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
  154. package/.next/server/app/api/worktrees/[id]/files/[...path]/route.js +1 -1
  155. package/.next/server/app/api/worktrees/[id]/files/[...path]/route.js.nft.json +1 -1
  156. package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
  157. package/.next/server/app/api/worktrees/[id]/git/branch/create/route.js.nft.json +1 -1
  158. package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
  159. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route.js.nft.json +1 -1
  160. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
  161. package/.next/server/app/api/worktrees/[id]/git/branches/route.js.nft.json +1 -1
  162. package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
  163. package/.next/server/app/api/worktrees/[id]/git/checkout/route.js.nft.json +1 -1
  164. package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
  165. package/.next/server/app/api/worktrees/[id]/git/commit/route.js.nft.json +1 -1
  166. package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
  167. package/.next/server/app/api/worktrees/[id]/git/diff/route.js.nft.json +1 -1
  168. package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
  169. package/.next/server/app/api/worktrees/[id]/git/fetch/route.js.nft.json +1 -1
  170. package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
  171. package/.next/server/app/api/worktrees/[id]/git/log/route.js.nft.json +1 -1
  172. package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
  173. package/.next/server/app/api/worktrees/[id]/git/pull/route.js.nft.json +1 -1
  174. package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
  175. package/.next/server/app/api/worktrees/[id]/git/push/route.js.nft.json +1 -1
  176. package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
  177. package/.next/server/app/api/worktrees/[id]/git/reset/route.js.nft.json +1 -1
  178. package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
  179. package/.next/server/app/api/worktrees/[id]/git/revert/route.js.nft.json +1 -1
  180. package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
  181. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route.js.nft.json +1 -1
  182. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
  183. package/.next/server/app/api/worktrees/[id]/git/stage/route.js.nft.json +1 -1
  184. package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
  185. package/.next/server/app/api/worktrees/[id]/git/staged/route.js.nft.json +1 -1
  186. package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
  187. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route.js.nft.json +1 -1
  188. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
  189. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route.js.nft.json +1 -1
  190. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
  191. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route.js.nft.json +1 -1
  192. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
  193. package/.next/server/app/api/worktrees/[id]/git/stash/push/route.js.nft.json +1 -1
  194. package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
  195. package/.next/server/app/api/worktrees/[id]/git/stash/route.js.nft.json +1 -1
  196. package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
  197. package/.next/server/app/api/worktrees/[id]/git/status/route.js.nft.json +1 -1
  198. package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
  199. package/.next/server/app/api/worktrees/[id]/git/unstage/route.js.nft.json +1 -1
  200. package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
  201. package/.next/server/app/api/worktrees/[id]/git/working-diff/route.js.nft.json +1 -1
  202. package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
  203. package/.next/server/app/api/worktrees/[id]/instances/notes/route.js.nft.json +1 -1
  204. package/.next/server/app/api/worktrees/[id]/instances/notes/route_client-reference-manifest.js +1 -1
  205. package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js +1 -1
  206. package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js.nft.json +1 -1
  207. package/.next/server/app/api/worktrees/[id]/instances/opencode/route_client-reference-manifest.js +1 -1
  208. package/.next/server/app/api/worktrees/[id]/interrupt/route.js +1 -1
  209. package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
  210. package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
  211. package/.next/server/app/api/worktrees/[id]/kill-session/route.js +1 -1
  212. package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -1
  213. package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
  214. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route.js.nft.json +1 -1
  215. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
  216. package/.next/server/app/api/worktrees/[id]/logs/route.js.nft.json +1 -1
  217. package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
  218. package/.next/server/app/api/worktrees/[id]/marp-render/route.js +7 -7
  219. package/.next/server/app/api/worktrees/[id]/marp-render/route.js.nft.json +1 -1
  220. package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
  221. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route.js.nft.json +1 -1
  222. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
  223. package/.next/server/app/api/worktrees/[id]/memos/route.js.nft.json +1 -1
  224. package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
  225. package/.next/server/app/api/worktrees/[id]/messages/route.js.nft.json +1 -1
  226. package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
  227. package/.next/server/app/api/worktrees/[id]/opencode/diff/route.js.nft.json +1 -1
  228. package/.next/server/app/api/worktrees/[id]/opencode/diff/route_client-reference-manifest.js +1 -1
  229. package/.next/server/app/api/worktrees/[id]/opencode/session/route.js.nft.json +1 -1
  230. package/.next/server/app/api/worktrees/[id]/opencode/session/route_client-reference-manifest.js +1 -1
  231. package/.next/server/app/api/worktrees/[id]/opencode/share/route.js.nft.json +1 -1
  232. package/.next/server/app/api/worktrees/[id]/opencode/share/route_client-reference-manifest.js +1 -1
  233. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
  234. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -1
  235. package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
  236. package/.next/server/app/api/worktrees/[id]/resolve-target/route.js.nft.json +1 -1
  237. package/.next/server/app/api/worktrees/[id]/resolve-target/route_client-reference-manifest.js +1 -1
  238. package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -1
  239. package/.next/server/app/api/worktrees/[id]/respond/route.js.nft.json +1 -1
  240. package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
  241. package/.next/server/app/api/worktrees/[id]/route.js +1 -1
  242. package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
  243. package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
  244. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js.nft.json +1 -1
  245. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
  246. package/.next/server/app/api/worktrees/[id]/schedules/active/route.js.nft.json +1 -1
  247. package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
  248. package/.next/server/app/api/worktrees/[id]/schedules/route.js.nft.json +1 -1
  249. package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
  250. package/.next/server/app/api/worktrees/[id]/search/route.js +1 -1
  251. package/.next/server/app/api/worktrees/[id]/search/route.js.nft.json +1 -1
  252. package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
  253. package/.next/server/app/api/worktrees/[id]/send/route.js +1 -1
  254. package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
  255. package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
  256. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +3 -3
  257. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -1
  258. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
  259. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route.js +1 -1
  260. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route.js.nft.json +1 -1
  261. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
  262. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route.js +1 -1
  263. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route.js.nft.json +1 -1
  264. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
  265. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route.js +1 -1
  266. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route.js.nft.json +1 -1
  267. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
  268. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route.js +1 -1
  269. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route.js.nft.json +1 -1
  270. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
  271. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route.js +1 -1
  272. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route.js.nft.json +1 -1
  273. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route_client-reference-manifest.js +1 -1
  274. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route.js +1 -1
  275. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route.js.nft.json +1 -1
  276. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route_client-reference-manifest.js +1 -1
  277. package/.next/server/app/api/worktrees/[id]/skills/route.js +1 -1
  278. package/.next/server/app/api/worktrees/[id]/skills/route.js.nft.json +1 -1
  279. package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
  280. package/.next/server/app/api/worktrees/[id]/slash-commands/route.js.nft.json +1 -1
  281. package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
  282. package/.next/server/app/api/worktrees/[id]/special-keys/route.js +1 -1
  283. package/.next/server/app/api/worktrees/[id]/special-keys/route.js.nft.json +1 -1
  284. package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
  285. package/.next/server/app/api/worktrees/[id]/tasks/route.js.nft.json +1 -1
  286. package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -1
  287. package/.next/server/app/api/worktrees/[id]/terminal/route.js +103 -1
  288. package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
  289. package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
  290. package/.next/server/app/api/worktrees/[id]/timers/history/route.js.nft.json +1 -1
  291. package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
  292. package/.next/server/app/api/worktrees/[id]/timers/route.js +1 -1
  293. package/.next/server/app/api/worktrees/[id]/timers/route.js.nft.json +1 -1
  294. package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
  295. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route.js.nft.json +1 -1
  296. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  297. package/.next/server/app/api/worktrees/[id]/todos/route.js.nft.json +1 -1
  298. package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
  299. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route.js.nft.json +1 -1
  300. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
  301. package/.next/server/app/api/worktrees/[id]/tree/route.js.nft.json +1 -1
  302. package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
  303. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route.js.nft.json +1 -1
  304. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
  305. package/.next/server/app/api/worktrees/[id]/verify/config/route.js.nft.json +1 -1
  306. package/.next/server/app/api/worktrees/[id]/verify/config/route_client-reference-manifest.js +1 -1
  307. package/.next/server/app/api/worktrees/[id]/verify/route.js +1 -1
  308. package/.next/server/app/api/worktrees/[id]/verify/route.js.nft.json +1 -1
  309. package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -1
  310. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route.js +1 -1
  311. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route.js.nft.json +1 -1
  312. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route_client-reference-manifest.js +1 -1
  313. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route.js.nft.json +1 -1
  314. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -1
  315. package/.next/server/app/api/worktrees/[id]/verify/runs/route.js.nft.json +1 -1
  316. package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -1
  317. package/.next/server/app/api/worktrees/[id]/viewed/route.js.nft.json +1 -1
  318. package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
  319. package/.next/server/app/api/worktrees/apply-default-agents/route.js.nft.json +1 -1
  320. package/.next/server/app/api/worktrees/apply-default-agents/route_client-reference-manifest.js +1 -1
  321. package/.next/server/app/api/worktrees/route.js +1 -1
  322. package/.next/server/app/api/worktrees/route.js.nft.json +1 -1
  323. package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
  324. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  325. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  326. package/.next/server/app/more/page_client-reference-manifest.js +1 -1
  327. package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  328. package/.next/server/app/page_client-reference-manifest.js +1 -1
  329. package/.next/server/app/proxy/[...path]/route.js.nft.json +1 -1
  330. package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
  331. package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
  332. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  333. package/.next/server/app/sessions/page.js +1 -1
  334. package/.next/server/app/sessions/page.js.nft.json +1 -1
  335. package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  336. package/.next/server/app/skills/[skillId]/page.js +1 -1
  337. package/.next/server/app/skills/[skillId]/page.js.nft.json +1 -1
  338. package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
  339. package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
  340. package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  341. package/.next/server/app/worktrees/[id]/files/[...path]/page.js +1 -1
  342. package/.next/server/app/worktrees/[id]/files/[...path]/page.js.nft.json +1 -1
  343. package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
  344. package/.next/server/app/worktrees/[id]/page.js +9 -9
  345. package/.next/server/app/worktrees/[id]/page.js.nft.json +1 -1
  346. package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
  347. package/.next/server/app/worktrees/[id]/terminal/page.js +1 -1
  348. package/.next/server/app/worktrees/[id]/terminal/page.js.nft.json +1 -1
  349. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
  350. package/.next/server/app-paths-manifest.json +33 -33
  351. package/.next/server/chunks/1068.js +1 -1
  352. package/.next/server/chunks/1501.js +3 -3
  353. package/.next/server/chunks/2119.js +1 -1
  354. package/.next/server/chunks/2283.js +15 -0
  355. package/.next/server/chunks/2328.js +1 -1
  356. package/.next/server/chunks/2404.js +1 -1
  357. package/.next/server/chunks/2445.js +1 -1
  358. package/.next/server/chunks/2816.js +1 -1
  359. package/.next/server/chunks/4207.js +1 -1
  360. package/.next/server/chunks/4802.js +1 -1
  361. package/.next/server/chunks/488.js +1 -0
  362. package/.next/server/chunks/5326.js +1 -1
  363. package/.next/server/chunks/5456.js +1 -1
  364. package/.next/server/chunks/611.js +1 -1
  365. package/.next/server/chunks/6130.js +1 -1
  366. package/.next/server/chunks/6401.js +1 -1
  367. package/.next/server/chunks/6474.js +14 -0
  368. package/.next/server/chunks/650.js +1 -0
  369. package/.next/server/chunks/6781.js +1 -1
  370. package/.next/server/chunks/{5742.js → 6927.js} +1 -1
  371. package/.next/server/chunks/7506.js +1 -1
  372. package/.next/server/chunks/7685.js +1 -1
  373. package/.next/server/chunks/7905.js +1 -1
  374. package/.next/server/chunks/8543.js +1 -1
  375. package/.next/server/chunks/8581.js +2 -2
  376. package/.next/server/chunks/8728.js +2 -2
  377. package/.next/server/chunks/8782.js +1 -0
  378. package/.next/server/chunks/8791.js +1 -1
  379. package/.next/server/chunks/8918.js +105 -3
  380. package/.next/server/chunks/9130.js +1 -1
  381. package/.next/server/chunks/9390.js +1 -1
  382. package/.next/server/chunks/967.js +1 -1
  383. package/.next/server/chunks/9731.js +3 -3
  384. package/.next/server/chunks/9882.js +3 -3
  385. package/.next/server/middleware-build-manifest.js +1 -1
  386. package/.next/server/middleware-manifest.json +5 -5
  387. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  388. package/.next/server/pages/500.html +1 -1
  389. package/.next/server/server-reference-manifest.json +1 -1
  390. package/.next/server/src/middleware.js +2 -2
  391. package/.next/server/src/middleware.js.map +1 -1
  392. package/.next/static/chunks/{1642-767aed8e7c61ef7f.js → 1642-fb2e176aaadbd137.js} +1 -1
  393. package/.next/static/chunks/2053-85a974ddfe7498fe.js +1 -0
  394. package/.next/static/chunks/{2407-940df9b11fadafc6.js → 2407-f1f258d4a1d92620.js} +1 -1
  395. package/.next/static/chunks/{2619-a305ad4810f1393a.js → 2619-04bc32f026a0d946.js} +1 -1
  396. package/.next/static/chunks/344-e1cefd00787060e4.js +1 -0
  397. package/.next/static/chunks/3922.f45dcfc1e7da552a.js +1 -0
  398. package/.next/static/chunks/5521-c358c31f60e5e689.js +1 -0
  399. package/.next/static/chunks/591-308072f285c34787.js +1 -0
  400. package/.next/static/chunks/6654-ac431270fac1a283.js +1 -0
  401. package/.next/static/chunks/{8165-3525fb42f1b4976e.js → 8165-3853772f6ae1299b.js} +1 -1
  402. package/.next/static/chunks/{8566-a6a7c70558927410.js → 8566-aeda747542072ace.js} +1 -1
  403. package/.next/static/chunks/8811-29eaa24237f48558.js +1 -0
  404. package/.next/static/chunks/{9619-22adf5367c4b7080.js → 9619-6c17a271f7f98fbb.js} +1 -1
  405. package/.next/static/chunks/998-2eb5883186abd0bd.js +1 -0
  406. package/.next/static/chunks/app/layout-da66300cc20244ed.js +1 -0
  407. package/.next/static/chunks/app/more/{page-30057cf1e0762ad2.js → page-87c84987b2765213.js} +1 -1
  408. package/.next/static/chunks/app/{page-8483ba400af011f5.js → page-1b820c421db48c2c.js} +1 -1
  409. package/.next/static/chunks/app/review/page-95f749caae382f46.js +1 -0
  410. package/.next/static/chunks/app/sessions/page-049e06335187aa91.js +1 -0
  411. package/.next/static/chunks/app/skills/[skillId]/{page-74aac15286504ef4.js → page-9ee7a381636e60cb.js} +1 -1
  412. package/.next/static/chunks/app/worktrees/[id]/page-040c5f0f585e6812.js +1 -0
  413. package/.next/static/chunks/app/worktrees/[id]/terminal/{page-c601f3b3ece6557e.js → page-373ea37b16d930c7.js} +1 -1
  414. package/.next/static/chunks/{webpack-49ade0526854dd4e.js → webpack-021f0741f22dd16a.js} +1 -1
  415. package/.next/static/css/38070d879efa1371.css +1 -0
  416. package/.next/trace +13 -13
  417. package/README.md +90 -605
  418. package/dist/cli/commands/capture.d.ts.map +1 -1
  419. package/dist/cli/commands/capture.js +11 -1
  420. package/dist/cli/commands/docs.d.ts.map +1 -1
  421. package/dist/cli/commands/docs.js +5 -0
  422. package/dist/cli/commands/remote.d.ts +34 -1
  423. package/dist/cli/commands/remote.d.ts.map +1 -1
  424. package/dist/cli/commands/remote.js +171 -6
  425. package/dist/cli/commands/respond.d.ts.map +1 -1
  426. package/dist/cli/commands/respond.js +255 -112
  427. package/dist/cli/commands/stop.d.ts.map +1 -1
  428. package/dist/cli/commands/stop.js +53 -1
  429. package/dist/cli/commands/sync.js +3 -3
  430. package/dist/cli/commands/wait.d.ts.map +1 -1
  431. package/dist/cli/commands/wait.js +11 -0
  432. package/dist/cli/docs/setup-guide.d.ts +14 -0
  433. package/dist/cli/docs/setup-guide.d.ts.map +1 -0
  434. package/dist/cli/docs/setup-guide.js +368 -0
  435. package/dist/cli/types/api-responses.d.ts +21 -0
  436. package/dist/cli/types/api-responses.d.ts.map +1 -1
  437. package/dist/cli/types/index.d.ts +2 -0
  438. package/dist/cli/types/index.d.ts.map +1 -1
  439. package/dist/cli/utils/daemon.d.ts +42 -2
  440. package/dist/cli/utils/daemon.d.ts.map +1 -1
  441. package/dist/cli/utils/daemon.js +222 -40
  442. package/dist/cli/utils/docs-reader.d.ts +6 -0
  443. package/dist/cli/utils/docs-reader.d.ts.map +1 -1
  444. package/dist/cli/utils/docs-reader.js +14 -13
  445. package/dist/cli/utils/npm-runner.d.ts +12 -0
  446. package/dist/cli/utils/npm-runner.d.ts.map +1 -1
  447. package/dist/cli/utils/npm-runner.js +36 -0
  448. package/dist/cli/utils/process-inspect.d.ts +55 -0
  449. package/dist/cli/utils/process-inspect.d.ts.map +1 -0
  450. package/dist/cli/utils/process-inspect.js +214 -0
  451. package/dist/cli/utils/remote-pairing.d.ts +68 -0
  452. package/dist/cli/utils/remote-pairing.d.ts.map +1 -0
  453. package/dist/cli/utils/remote-pairing.js +117 -0
  454. package/dist/cli/utils/server-identity.d.ts +50 -0
  455. package/dist/cli/utils/server-identity.d.ts.map +1 -0
  456. package/dist/cli/utils/server-identity.js +118 -0
  457. package/dist/cli/utils/server-ready.d.ts +13 -0
  458. package/dist/cli/utils/server-ready.d.ts.map +1 -1
  459. package/dist/cli/utils/server-ready.js +16 -0
  460. package/dist/lib/detection/status-reason.d.ts +17 -0
  461. package/dist/lib/detection/status-reason.d.ts.map +1 -1
  462. package/dist/lib/detection/status-reason.js +17 -0
  463. package/dist/lib/security/pairing-code.d.ts +2 -1
  464. package/dist/lib/security/pairing-code.d.ts.map +1 -1
  465. package/dist/server/locales/en/worktree.json +41 -7
  466. package/dist/server/locales/ja/worktree.json +41 -7
  467. package/dist/server/src/config/image-extensions.js +1 -0
  468. package/dist/server/src/config/session-starting-config.js +75 -0
  469. package/dist/server/src/lib/auto-yes-poller.js +22 -0
  470. package/dist/server/src/lib/cli-tools/antigravity.js +2 -1
  471. package/dist/server/src/lib/cli-tools/base.js +15 -1
  472. package/dist/server/src/lib/cli-tools/codex.js +3 -2
  473. package/dist/server/src/lib/cli-tools/command-code-plan-review.js +175 -0
  474. package/dist/server/src/lib/cli-tools/command-code.js +30 -4
  475. package/dist/server/src/lib/cli-tools/copilot.js +2 -1
  476. package/dist/server/src/lib/cli-tools/gemini.js +2 -1
  477. package/dist/server/src/lib/cli-tools/liveness-spec.js +27 -9
  478. package/dist/server/src/lib/cli-tools/opencode-v2.js +2 -1
  479. package/dist/server/src/lib/cli-tools/opencode.js +2 -1
  480. package/dist/server/src/lib/cli-tools/vibe-local.js +2 -1
  481. package/dist/server/src/lib/detection/cli-patterns.js +94 -1
  482. package/dist/server/src/lib/detection/status-reason.js +17 -0
  483. package/dist/server/src/lib/detection/tool-liveness.js +3 -1
  484. package/dist/server/src/lib/detection/tools/codex/detect.js +26 -0
  485. package/dist/server/src/lib/detection/tools/command-code/plan-review-state.js +75 -0
  486. package/dist/server/src/lib/hooks/sources/claude/transcript.js +33 -1
  487. package/dist/server/src/lib/realtime/terminal-broadcast.js +5 -0
  488. package/dist/server/src/lib/session/agent-session-lifecycle.js +11 -0
  489. package/dist/server/src/lib/session/claude-executor.js +2 -2
  490. package/dist/server/src/lib/session/claude-session.js +138 -16
  491. package/dist/server/src/lib/session/current-output-builder.js +49 -21
  492. package/dist/server/src/lib/session/launch-screen.js +57 -0
  493. package/dist/server/src/lib/session/session-start-error.js +20 -0
  494. package/dist/server/src/lib/session/session-starting-state.js +236 -0
  495. package/dist/server/src/lib/skills/agent-state-paths.js +39 -0
  496. package/dist/server/src/lib/skills/receipt-owned-paths.js +118 -0
  497. package/dist/server/src/lib/tmux/tmux.js +25 -0
  498. package/dist/server/src/lib/verification/env-clean-gate.js +195 -6
  499. package/dist/server/src/lib/verification/gate-runner.js +29 -2
  500. package/dist/server/src/lib/verification/scope-gate.js +58 -4
  501. package/docs/en/architecture.md +722 -0
  502. package/docs/en/user-guide/agents-guide.md +306 -0
  503. package/docs/en/user-guide/cli-setup-guide.md +676 -0
  504. package/docs/en/user-guide/cmate-schedules-guide.md +388 -0
  505. package/docs/en/user-guide/commands-guide.md +467 -0
  506. package/docs/en/user-guide/quick-start.md +231 -0
  507. package/docs/en/user-guide/webapp-guide.md +1020 -0
  508. package/docs/en/user-guide/workflow-examples.md +463 -0
  509. package/package.json +18 -7
  510. package/release-notes/0.44.0.json +82 -0
  511. package/release-notes/0.44.1.json +54 -0
  512. package/.next/server/chunks/1990.js +0 -103
  513. package/.next/server/chunks/3707.js +0 -15
  514. package/.next/server/chunks/6491.js +0 -103
  515. package/.next/server/chunks/7004.js +0 -1
  516. package/.next/server/chunks/8673.js +0 -14
  517. package/.next/static/chunks/2039-117a361f795ddc4b.js +0 -1
  518. package/.next/static/chunks/2053-611dd27d42721b79.js +0 -1
  519. package/.next/static/chunks/344-6f9fc1f38f01a839.js +0 -1
  520. package/.next/static/chunks/3778-56f41fc2cecb8c43.js +0 -1
  521. package/.next/static/chunks/3922.8e79fc89f593280b.js +0 -1
  522. package/.next/static/chunks/5449-6cb80bab2bd06b79.js +0 -1
  523. package/.next/static/chunks/6966-bb854d1145783a64.js +0 -1
  524. package/.next/static/chunks/7705-1f58d4c03d991fcf.js +0 -1
  525. package/.next/static/chunks/app/layout-057c850cd0df978e.js +0 -1
  526. package/.next/static/chunks/app/review/page-ff9efae3f86eb840.js +0 -1
  527. package/.next/static/chunks/app/sessions/page-1a8ba152bbcb9efb.js +0 -1
  528. package/.next/static/chunks/app/worktrees/[id]/page-eab0bf7564d3f9e2.js +0 -1
  529. package/.next/static/css/b3f433d52b8ed5c8.css +0 -1
  530. /package/.next/static/{BVkBYdceLRvMROqQIqeBx → 57lOiz8zSEHdw97XIm0af}/_buildManifest.js +0 -0
  531. /package/.next/static/{BVkBYdceLRvMROqQIqeBx → 57lOiz8zSEHdw97XIm0af}/_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:()=>R,WD:()=>S,Lw:()=>U,K1:()=>Q,N5:()=>T});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);let B=(0,m.promisify)(l.execFile),C=(0,e.h)("tmux-session-hooks"),D=globalThis.__cmEnsuredSessionHooks??(globalThis.__cmEnsuredSessionHooks=new Set);async function E(a){if((0,n.N_)(a)&&!D.has(a)){D.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 B("tmux",b,{timeout:5e3})}else await B("tmux",(0,n.g4)(a),{timeout:5e3});if((0,n.jx)()){let b=(0,n.Ls)(a,z(u,y));b&&await B("tmux",b,{timeout:5e3})}else await B("tmux",(0,n.sL)(a),{timeout:5e3})}catch(b){C.debug("session-hooks:reconcile-failed",{sessionName:a,error:b instanceof Error?b.message:String(b)})}}}async function F(a){try{if(!await (0,A.Us)(a)||await (0,A.Fh)(a))return!1;for(let b of(0,n.RS)(a))await B("tmux",b,{timeout:5e3});return C.info("session-hooks:geometry-restored",{sessionName:a}),!0}catch(b){return C.debug("session-hooks:geometry-restore-failed",{sessionName:a,error:b instanceof Error?b.message:String(b)}),!1}}let G=(0,m.promisify)(l.execFile),H=(0,e.h)("tmux-session-status"),I=globalThis.__cmPublishedTmuxStatus??(globalThis.__cmPublishedTmuxStatus=new Map),J=globalThis.__cmClearedTmuxStatus??(globalThis.__cmClearedTmuxStatus=new Set);async function K(a){let{sessionName:b,worktreeId:c,cliToolId:d,instanceId:e,status:f}=a;if(!(0,n.om)())return J.has(b)||(J.add(b),await M(b)),"disabled";let g=I.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 G("tmux",(0,n.ND)(b,a,c),{timeout:5e3});return I.set(b,{status:f,worktreeId:c,cliToolId:d,instanceId:e}),await L(b),"written"}catch(a){return I.delete(b),H.debug("session-status:write-failed",{sessionName:b,error:a instanceof Error?a.message:String(a)}),"error"}}async function L(a){try{let{stdout:b}=await G("tmux",(0,n.Ys)(a,"status-right"),{timeout:5e3}),c=b.trim();if(""!==c&&!c.includes(n.lY))return H.debug("session-status:status-right-user-owned",{sessionName:a,existing:c}),!1;return""===c&&await G("tmux",(0,n.KB)(a,n.lY),{timeout:5e3}),!0}catch(b){return H.debug("session-status:status-right-failed",{sessionName:a,error:b instanceof Error?b.message:String(b)}),!1}}async function M(a){for(let b of(I.delete(a),n.bq))try{await G("tmux",(0,n.cD)(a,b),{timeout:5e3})}catch{}try{let{stdout:b}=await G("tmux",(0,n.Ys)(a,"status-right"),{timeout:5e3});b.includes(n.lY)&&await G("tmux",(0,n.$D)(a),{timeout:5e3})}catch{}}let N=(0,e.h)("cli-session");function O(){return j||(j=new i),j}function P(a,b,c){let e=d.CLIToolManager.getInstance().getTool(b),f=e.getSessionName(a,c);return{cliTool:e,sessionName:f}}async function Q(a,b,c){let{sessionName:d}=P(a,b,c);return O().sessionExists(d)}async function R(a,b,c=1e3,d){let e=N.withContext({worktreeId:a,cliToolId:b});e.debug("captureSessionOutput:start",{requestedLines:c});let{cliTool:f,sessionName:g}=P(a,b,d),h=O();try{let a=await (0,k.aq)(g,c,async()=>{if(!await h.sessionExists(g))throw Error(`${f.name} session ${g} does not exist`);return await h.captureSnapshot(g,{startLine:-k.xE})});return e.debug("captureSessionOutput:success",{actualLines:a.split("\n").length,lastFewLines:a.split("\n").slice(-3).join(" | ")}),a}catch(b){let a=b instanceof Error?b.message:String(b);if(a.includes("does not exist"))throw e.debug("captureSessionOutput:sessionNotFound",{sessionName:g}),b;throw e.error("captureSessionOutput:failed",{error:a}),Error(`Failed to capture ${f.name} output: ${a}`)}}async function S(a,b,c=5e3,d){let e=N.withContext({worktreeId:a,cliToolId:b});e.debug("captureSessionOutputFresh:start",{requestedLines:c});let{cliTool:f,sessionName:g}=P(a,b,d),h=O();try{let a=await h.captureSnapshot(g,{startLine:-c});return a.length>0?(0,k.vF)(g,a,c):(0,k.gm)(g),(0,k.wd)(a,c)}catch(b){(0,k.gm)(g);let a=b instanceof Error?b.message:String(b);throw e.error("captureSessionOutputFresh:failed",{error:a}),Error(`Failed to capture ${f.name} output: ${a}`)}}async function T(a){await E(a.sessionName),(0,n.n9)(a.sessionName)&&await F(a.sessionName),await K(a)}function U(a){I.delete(a),J.delete(a),D.delete(a),(0,A.G9)(a)}}};
@@ -1,15 +0,0 @@
1
- "use strict";exports.id=3707,exports.ids=[3707],exports.modules={2412:(a,b,c)=>{c.d(b,{Qb:()=>f,tR:()=>g});var d=c(46065);let e=Symbol("default-branch-unresolved");async function f(a){let b=await (0,d.Bc)(["symbolic-ref","refs/remotes/origin/HEAD","--short"],a);if(null===b)return e;let c=b.trim();return c.startsWith("origin/")?c.slice(7):null}async function g(a){let b=await f(a);return"string"==typeof b?b:null}},23707:(a,b,c)=>{c.d(b,{Wb:()=>P,on:()=>X,AT:()=>ah});var d=c(79646),e=c(29021),f=c(88807),g=c(56791),h=c(48524),i=c(2412),j=c(72626),k=c(81099),l=c(11501),m=c(52767),n=c(74985),o=c(77142),p=c(49987),q=c(53604);let r="skipped: the verification run was cancelled.",s=".commandmate/",t=`(exempt: ${s})`,u=".commandmate/tasks/";function v(a){return a.startsWith(u)}function w(a){return{pattern:a,regexp:function(a){let b=a.replace(/\/+$/,""),c=function(a){let b=0;for(let c of a)if("{"===c)b+=1;else if("}"===c&&(b-=1)<0)return!1;return 0===b}(b),d="",e=0,f=0;for(;f<b.length;){let a=b[f];if("*"===a){let a=f;for(;"*"===b[a];)a+=1;let c=a-f>1,e=0===f||"/"===b[f-1];if(c&&e&&"/"===b[a]){d+="(?:[^/]*/)*",f=a+1;continue}if(c&&e&&a===b.length){d+=".*",f=a;continue}d+="[^/]*",f=a;continue}if("?"===a){d+="[^/]",f+=1;continue}if(c&&"{"===a){e+=1,d+="(?:",f+=1;continue}if(c&&"}"===a&&e>0){e-=1,d+=")",f+=1;continue}if(c&&","===a&&e>0){d+="|",f+=1;continue}d+=a.replace(/[.*+?^${}()|[\]\\]/,"\\$&"),f+=1}return RegExp(`^${d}(?:/.*)?$`)}(a)}}class x{constructor(a,b=null){this.contractPath=b,this.allow=a.allow.map(w),this.deny=a.deny.map(w)}classify(a){let b=this.deny.find(b=>b.regexp.test(a));if(b)return{admitted:!1,pattern:b.pattern};if(a.startsWith(s))return{admitted:!0,pattern:t};if(a===this.contractPath)return{admitted:!0,pattern:"(exempt: contract path)"};let c=this.allow.find(b=>b.regexp.test(a));return c?{admitted:!0,pattern:c.pattern}:{admitted:!1,pattern:null}}isViolation(a){return!this.classify(a).admitted}}function y(a,b){return new Promise(c=>{let e="",f="",g=(0,d.spawn)("git",a,{cwd:b,stdio:["ignore","pipe","pipe"]});g.stdout?.on("data",a=>{e+=a.toString("utf8")}),g.stderr?.on("data",a=>{f+=a.toString("utf8")}),g.on("error",a=>c({code:null,stdout:"",stderr:a.message})),g.on("close",a=>c({code:a,stdout:e,stderr:f}))})}function z(a){let b=a.split("\0"),c=[],d=0;for(;d<b.length;){let a=b[d];if(d+=1,a.length<4)continue;let e=[a.slice(3)],[f,g]=a;if("R"===f||"C"===f||"R"===g||"C"===g){let a=b[d];d+=1,a&&e.push(a)}c.push(e)}return c}async function A(a,b){let c=await y(["merge-base",b,"HEAD"],a);if(0!==c.code||""===c.stdout.trim())return{error:`'git merge-base ${b} HEAD' failed; base ref is unreachable from this worktree.`+(c.stderr.trim()?`
2
- ${c.stderr.trim()}`:"")};let d=c.stdout.trim(),e=await y(["diff","--name-only","-z","--no-renames",d,"HEAD"],a);if(0!==e.code)return{error:`'git diff --name-only ${d} HEAD' failed.`+(e.stderr.trim()?`
3
- ${e.stderr.trim()}`:"")};let f=await y(["status","--porcelain","-z","--untracked-files=all"],a);return 0!==f.code?{error:"'git status --porcelain' failed."+(f.stderr.trim()?`
4
- ${f.stderr.trim()}`:"")}:{paths:[...new Set([...e.stdout.split("\0").filter(a=>""!==a),...z(f.stdout).flat()].filter(a=>!v(a)))].sort(),mergeBase:d}}function B(a){return a.length>0?a.join(", "):"(none)"}function C(a,b,c){return null===c?` ${a} ${b}`:` ${a} ${b} \u2190 ${c}`}async function D(a,b,c,d,e=null){let f=Date.now(),g=(a,b,c)=>({status:a,exitCode:c,startedAt:f,durationMs:Date.now()-f,logTail:b});if(!b)return g("skipped","scope: no contract is attached to this run, so no scope is declared to check.",null);if(!c)return g("skipped","scope: the contract sets success.requireScopeClean: false.",null);if(!d)return g("error","scope: no base ref, so there is nothing to diff against. Set options.baseRef in .commandmate/verify.yaml; origin/HEAD did not resolve a default branch.",null);let h=await A(a,d);if("error"in h)return g("error",`scope: ${h.error}`,null);let i=new x(b,e),j=[],k=[],l=new Map;for(let a of h.paths){let b=i.classify(a);if(b.admitted){j.push({path:a,pattern:b.pattern});continue}k.push(a),null!==b.pattern&&l.set(a,b.pattern)}let m=[`scope: baseRef=${d} changed=${h.paths.length} violations=${k.length}`,`allow: ${B(b.allow)}`,`deny: ${B(b.deny)}`,...function(a){if(0===a.length)return[];let b=a.slice(0,100),c=a.length-b.length;return["admitted:",...b.map(a=>C("+",a.path,a.pattern)),...c>0?[` ... (+${c} more)`]:[]]}(j)].join("\n");if(0===k.length)return g("passed",m,0);let n=k.slice(0,100),o=k.length-n.length;return g("failed",[m,"out of scope:",...n.map(a=>C("-",a,l.get(a)??null)),...o>0?[` ... and ${o} more`]:[],"To allow this diff, add the paths above to the contract's scope.allow (the issue's target-file list) and re-send the task (`send --contract`) — scope is judged from the send-time snapshot, so editing the contract file alone changes nothing. A path matching deny: is a deliberate prohibition; revert it instead."].join("\n"),1)}var E=c(90384),F=c(62171),G=c(85322);let H=(0,j.h)("lib/verification/gate-runner"),I="git diff --name-only / status --porcelain \xd7 contract scope",J="lsof -iTCP -sTCP:LISTEN / tmux list-sessions / $HOME / ~/.commandmate \xd7 task-start snapshot",K="[mutex]",L="[flaky]";function M(a,b){return`--- ${L} run ${a}/2: ${b.status} exit=${O(b.exitCode)} duration=${N(b.durationMs)} ---`}function N(a){return`${(a/1e3).toFixed(1)}s`}function O(a){return null===a?"n/a":String(a)}class P extends Error{constructor(a,b){super(`Verification run ${b} is already running for worktree '${a}'`),this.name="VerificationConflictError",this.worktreeId=a,this.runningRunId=b}}let Q=0,R=[],S=new Map,T=`${r} This gate was terminated before it reached a verdict.`,U=`${r} The run stopped before this gate started.`;class V{get cancelled(){return this.latched}register(a){return this.latched?(a(),()=>{}):(this.killers.add(a),()=>{this.killers.delete(a)})}cancel(){for(let a of(this.latched=!0,[...this.killers]))a()}constructor(){this.latched=!1,this.killers=new Set}}let W=new Map;async function X(a){let b,c=W.get(a),d=S.get(a);if(!c||!d)return{kind:"not-running"};c.cancel();let e=await Promise.race([d,new Promise(a=>{b=setTimeout(()=>a(null),8e3),b.unref?.()})]);return b&&clearTimeout(b),null===e?{kind:"requested"}:{kind:"cancelled",status:e}}class Y{constructor(a){this.maxBytes=a,this.chunks=[],this.size=0}append(a){if(!(this.maxBytes<=0)&&0!==a.length){for(this.chunks.push(a),this.size+=a.length;this.chunks.length>0&&this.size-this.chunks[0].length>=this.maxBytes;)this.size-=this.chunks.shift().length;if(this.size>this.maxBytes){let a=this.size-this.maxBytes;this.chunks[0]=this.chunks[0].subarray(a),this.size-=a}}}toString(){return 0===this.chunks.length?"":Buffer.concat(this.chunks).toString("utf8")}}function Z(a,b,c,e,f,g){return new Promise(h=>{let i,j,k=Date.now(),l=new Y(e),m=!1,n=!1,o=!1,p=(0,d.spawn)(a,{shell:!0,cwd:b,env:function(a){let b={...process.env,CI:"true",...a};return delete b.NODE_ENV,b}(f),detached:!0,stdio:["ignore","pipe","pipe"]});p.stdout?.on("data",a=>l.append(a)),p.stderr?.on("data",a=>l.append(a));let q=a=>{if(void 0!==p.pid)try{process.kill(-p.pid,a)}catch{try{p.kill(a)}catch{}}},r=g?.register(()=>{o=!0,q("SIGTERM"),j=setTimeout(()=>q("SIGKILL"),5e3),j.unref?.()}),s=a=>{m||(m=!0,clearTimeout(t),i&&clearTimeout(i),j&&clearTimeout(j),r?.(),h({...a,startedAt:k,durationMs:Date.now()-k}))},t=setTimeout(()=>{n=!0,q("SIGTERM"),i=setTimeout(()=>q("SIGKILL"),5e3),i.unref?.()},1e3*c);t.unref?.(),p.on("error",a=>{s({status:"error",exitCode:null,logTail:`${l.toString()}
5
- [gate could not be spawned: ${a.message}]`.trim()})}),p.on("close",(a,b)=>n?void s({status:"timeout",exitCode:null,logTail:`${l.toString()}
6
- [gate exceeded ${c}s and was terminated (${b??"exited"})]`.trim()}):o?void s({status:"skipped",exitCode:null,logTail:`${l.toString()}
7
- ${T} (${b??"exited"})`.trim()}):void s({status:0===a?"passed":"failed",exitCode:a,logTail:l.toString()||null}))})}async function $(a,b,c,d,e){let f=a.mutex;if(!f)return Z(a.command,b,a.timeoutSec,c,d,e);let g=await (0,p.xL)(f,{timeoutMs:1e3*a.timeoutSec,shouldAbandon:()=>e.cancelled});if(!g.acquired)return{status:"skipped",exitCode:null,startedAt:Date.now(),durationMs:0,logTail:g.abandoned?U:function(a,b,c){var d;if(c.acquired)throw Error("mutexWaitTimeoutLog called for an acquired lock");let e=c.heldBy?` (held by ${c.heldBy})`:"";return`reason=mutex-wait waited=${N(c.waitedMs)}
8
- ${K} name=${b} lock=${d=b,(0,p.M)(d,(0,p.H)())}${e}
9
- Gate '${a.id}' declares mutex '${b}' and the machine-wide lock stayed held for its whole ${a.timeoutSec}s budget, so the command was never started. This is a resource conflict, not a verdict on the work: re-run once the other run finishes, or raise the gate's timeoutSec.`}(a,f,g)};try{var h,i,j;if(e.cancelled){let a=Date.now();return{status:"skipped",exitCode:null,startedAt:a,durationMs:0,logTail:U}}let k=await Z(a.command,b,a.timeoutSec,c,d,e);return{...k,logTail:(h=g.waitedMs,i=g.handle.path,j=k.logTail,aa(`${K} name=${f} waited=${N(h)} lock=${i}`,j))}}finally{g.handle.release()}}async function _(a,b,c,d,e){let f=await $(a,b,c,d,e);if(1!==a.retryOnFail||"failed"!==f.status)return f;let g=await $(a,b,c,d,e);return"passed"!==g.status&&"failed"!==g.status?{...f,logTail:aa(`${L} retry reached no verdict (${g.status}); the first run's result stands. Retry log:
10
- `+(g.logTail??"(no output)"),f.logTail)}:function(a,b,c){let d="passed"===c.status?"flaky":"fail",e="flaky"===d&&!0===a.flakyIsPass,f=e?c:"flaky"===d?b:c,g=`${L} runs=2 outcome=${d} exit=${O(b.exitCode)},${O(c.exitCode)} duration=${N(b.durationMs)},${N(c.durationMs)} verdict=${e?"pass":"fail"}`,h=[M(1,b),b.logTail??"",M(2,c),c.logTail??""].join("\n");return{status:e?"passed":"failed",exitCode:f.exitCode,startedAt:b.startedAt,durationMs:b.durationMs+c.durationMs,logTail:`${g}
11
- ${h}`}}(a,f,g)}function aa(a,b){return b?`${a}
12
- ${b}`:a}function ab(a,b){return new Promise(c=>{let e="",f=(0,d.spawn)("git",a,{cwd:b,stdio:["ignore","pipe","ignore"]});f.stdout?.on("data",a=>{e+=a.toString("utf8")}),f.on("error",()=>c({code:null,stdout:""})),f.on("close",a=>c({code:a,stdout:e}))})}async function ac(a,b,c,d){let e=Date.now(),f=(a,b,c)=>({status:a,exitCode:c,startedAt:e,durationMs:Date.now()-e,logTail:b});if(!b)return f("error",`work-evidence: no base ref. Set options.baseRef in ${E.aT}; origin/HEAD did not resolve a default branch.`,null);let g=await ab(["merge-base",b,"HEAD"],a);if(0!==g.code||""===g.stdout.trim())return f("error",`work-evidence: 'git merge-base ${b} HEAD' failed; base ref is unreachable from this worktree.`,null);let h=g.stdout.trim(),i=await ab(["rev-list","--count",`${h}..HEAD`,"--",":(top)",`:(exclude,top)${u}`],a);if(0!==i.code)return f("error",`work-evidence: 'git rev-list --count ${h}..HEAD' failed.`,null);let j=Number.parseInt(i.stdout.trim(),10),k=await ab(["status","--porcelain","-z","--untracked-files=all"],a);if(0!==k.code)return f("error","work-evidence: 'git status --porcelain' failed.",null);let l=z(k.stdout).filter(a=>a.some(a=>!v(a))).length,m=`work-evidence: baseRef=${b} commits=${j} uncommitted=${l}`+(c.required?" requireCommit=true":"")+" (contract files excluded)";if(!Number.isFinite(j)||0===j&&0===l){let a=Number.isFinite(j)?d.fileCount():null;return null===a||0===a?f("failed",`${m}
13
- No commits and no uncommitted changes: nothing to verify.`,1):f("passed",`${m}
14
- ${d.label}: ${a} file(s) changed. git found nothing; the agent did.`,0)}return c.required&&0===j?f("failed",`${m}
15
- ${c.sources.join(" and ")} requires a commit: uncommitted changes are not work evidence, commit them.`,1):f("passed",m,0)}async function ad(a,b){if(a.options.baseRef)return a.options.baseRef;let c=await (0,i.tR)(b);return c?`origin/${c}`:null}async function ae(a,b,c,d,f,h,i,j,k,m,o,p){var r,s;let{maxLogTailBytes:t,skipInPrimaryCheckout:u}=h.options,{runWorkEvidence:v,gates:w}=i,x={label:"opencode session diff",fileCount:()=>void 0!==f&&(f===G.k||(0,g.getAgentInstances)(a,c).some(a=>a.id===f&&a.cliTool===G.k))?(0,F.pw)(c,f):null},y=(0,l.fc)(k?.contract??null,h),z=null,A=()=>z??={CM_WORKTREE_ID:c,CM_WORKTREE_INDEX:String((0,q.Cr)(c))},B=(b,c)=>((0,g.finishGateResult)(a,b,{status:c.status,exitCode:c.exitCode,durationMs:c.durationMs,logTail:c.logTail,executionWindow:{startedAt:c.startedAt,finishedAt:c.startedAt+c.durationMs}}),c),C=async(c,d,e,f)=>B((0,g.createGateResult)(a,b,{gateId:c,command:d,source:e}).id,await f()),H=(c,d,e,f)=>{let h={status:"skipped",exitCode:null,startedAt:Date.now(),durationMs:0,logTail:f};return B((0,g.createGateResult)(a,b,{gateId:c,command:d,source:e}).id,h)},K=[],L=(a,b)=>{for(let c of(b.scope&&H(E.le,I,"builtin",a),b.envClean&&H(E.Q5,J,"builtin",a),b.gates))H(c.id,c.command,c.source,a)},M=a=>(L(U,a),"cancelled");if(v){let a=await C(E.uz,"git merge-base / rev-list / status --porcelain (excluding contract files)","builtin",()=>ac(d,j,y,x));if("passed"!==a.status)return L("skipped: the work-evidence gate did not pass.",{scope:"off"!==i.scope,envClean:i.runEnvClean,gates:w}),"failed"===a.status?"not_started":"error";if(K.push(a.status),p.cancelled)return M({scope:"off"!==i.scope,envClean:i.runEnvClean,gates:w})}if("off"!==i.scope){let a=m?H(E.le,I,"builtin",(r=m.id,s=m.status,`scope: task ${r} declares a scope for this worktree, but it is ${s} and this run was not attached to it, so its scope was NOT judged. Name the task when starting the run (\`wait --verify\` does this automatically).`)):await C(E.le,I,"builtin",()=>D(d,k?.contract.scope??null,k?.contract.success.requireScopeClean??!1,j,k?.contractPath??null)),b="explicit"===i.scope||null!==m;if(("skipped"!==a.status||b)&&K.push(a.status),p.cancelled)return M({scope:!1,envClean:i.runEnvClean,gates:w})}if(i.runEnvClean){let a=await C(E.Q5,J,"builtin",()=>(0,n.uT)({worktreeId:o.worktreeId,worktreePath:d,taskId:o.taskId,baseline:o.baseline,sources:o.decision.sources,ignoreHomeEntries:h.options.envCleanIgnoreHomeEntries}));if(K.push(a.status),p.cancelled)return M({scope:!1,envClean:!1,gates:w})}let N=u&&function(a,b){try{return(0,e.realpathSync)(a)===(0,e.realpathSync)(b)}catch{return!1}}(d,process.cwd());for(let[a,b]of w.entries()){if(p.cancelled)return M({scope:!1,envClean:!1,gates:w.slice(a)});if(N){K.push(H(b.id,b.command,b.source,"skipped: worktreePath is the server process working directory and options.skipInPrimaryCheckout is true.").status);continue}let c=await C(b.id,b.command,b.source,()=>_(b,d,t,A(),p));K.push(c.status)}return p.cancelled?"cancelled":K.some(a=>"failed"===a||"timeout"===a||"error"===a)?"failed":K.some(a=>"skipped"===a)?"error":"passed"}function af(a,b,c,d){try{(0,m.g)(a,b,c,void 0===d?void 0:{runId:d})}catch(a){H.warn("task-transition-failed",{taskId:b,event:c,error:a instanceof Error?a.message:String(a)})}}function ag(a,b,c,d,e){let f;try{f=(0,g.getVerificationRun)(a,c)?.gates.filter(a=>"passed"!==a.status&&"skipped"!==a.status).map(a=>a.gateId)}catch{}(0,k.notifyVerificationFailurePush)({worktreeId:b.worktreeId,runId:c,taskId:d,status:e,trigger:b.trigger,instanceId:b.instanceId??null,failedGateIds:f}).catch(()=>{})}async function ah(a){let b=(0,f.getDbInstance)(),c=(0,g.getRunningVerificationRun)(b,a.worktreeId);if(c)throw new P(a.worktreeId,c.id);let d=void 0!==a.taskId?(0,g.getTask)(b,a.taskId):(0,h.Zj)(b,a.worktreeId),e=function(a,b,c){if(null!==c||void 0!==b.taskId)return null;let[d]=(0,g.listTasks)(a,b.worktreeId,1);return d&&"pending"!==d.status&&d.contract.success.requireScopeClean?d:null}(b,a,d),i=a.taskId??d?.id??null,j=a.gateIds??(d?(0,l.Ky)(d.contract)??void 0:void 0),k=null,m=null;try{(k=(0,E.yR)(a.worktreePath))||(m=`${E.aT} not found in ${a.worktreePath}. Declare the repository verification gates there before running verification.`)}catch(a){m=a instanceof E.Yp?a.message:`Failed to read ${E.aT}: ${a.message}`}let p=(0,n.Uq)(d?.contract??null,k),q={workEvidence:d?.contract.success.requireWorkEvidence??!1,scope:(d?.contract.success.requireScopeClean??!1)||null!==e,envClean:p.required},r=null;if(k&&!m){let a=function(a,b){let c=a.gates.map(a=>({...a,source:"verify.yaml"})),d=new Set(c.map(a=>a.id)),e=b.filter(a=>d.has(a.id)).map(a=>a.id);return e.length>0?`Contract gate id(s) ${e.join(", ")} are already declared in ${E.aT}. A contract may add gates, never redefine the repository's own.`:[...c,...b.map(a=>({...a,source:"contract"}))]}(k,d?(0,l.cI)(d.contract):[]);if("string"==typeof a)m=a;else{let b=function(a,b,c){if(!b)return{runWorkEvidence:!0,scope:"implicit",runEnvClean:c.envClean,gates:a};let d=new Set([E.uz,E.le,E.Q5,...a.map(a=>a.id)]),e=b.filter(a=>!d.has(a));if(e.length>0)return`Unknown gate id(s): ${e.join(", ")}. Declared gates: ${[...d].join(", ")}.`;let f=new Set(b),g={runWorkEvidence:f.has(E.uz)||c.workEvidence,scope:f.has(E.le)||c.scope?"explicit":"off",runEnvClean:f.has(E.Q5)||c.envClean,gates:a.filter(a=>f.has(a.id))};return g.runWorkEvidence||"off"!==g.scope||g.runEnvClean||0!==g.gates.length?g:"gateIds selected no gates; a run with no gates has nothing to report."}(a,j,q);"string"==typeof b?m=b:r=b}}let s=k?await ad(k,a.worktreePath):null,t=(0,g.createVerificationRun)(b,{worktreeId:a.worktreeId,trigger:a.trigger,instanceId:a.instanceId??null,taskId:i,baseRef:s});if(!k||!r){let c=Date.now(),e=(0,g.createGateResult)(b,t.id,{gateId:"config",command:E.aT,source:"builtin"});return(0,g.finishGateResult)(b,e.id,{status:"error",exitCode:null,durationMs:0,logTail:m,executionWindow:{startedAt:c,finishedAt:c}}),(0,g.finishVerificationRun)(b,t.id,"error"),H.warn("verification-config-unusable",{runId:t.id,worktreeId:a.worktreeId}),ag(b,a,t.id,i,"error"),d&&(af(b,d.id,"verify_started",t.id),af(b,d.id,"verify_failed",t.id)),{runId:t.id}}d&&af(b,d.id,"verify_started",t.id);let u=new V;W.set(t.id,u);let v=k,w=r,x={worktreeId:a.worktreeId,taskId:i,baseline:w.runEnvClean&&i?(0,o.g9)(i):null,decision:p},y=(async()=>{await (Q<2?(Q+=1,Promise.resolve()):new Promise(a=>{R.push(a)}));let c="error";try{if(u.cancelled)return c="cancelled",(0,g.finishVerificationRun)(b,t.id,"cancelled"),"cancelled";let f=await ae(b,t.id,a.worktreeId,a.worktreePath,a.instanceId,v,w,s,d,e,x,u);return c=f,(0,g.finishVerificationRun)(b,t.id,f),f}catch(a){H.error("verification-run-crashed",{runId:t.id,error:a instanceof Error?a.message:String(a)});try{(0,g.finishVerificationRun)(b,t.id,"error")}catch{}return"error"}finally{d&&af(b,d.id,function(a){switch(a){case"passed":return"verify_passed";case"not_started":return"verify_not_started";case"cancelled":return"cancel";default:return"verify_failed"}}(c),t.id),ag(b,a,t.id,i,c),function(){let a=R.shift();if(a)return a();Q-=1}(),S.delete(t.id),W.delete(t.id)}})();return S.set(t.id,y),{runId:t.id}}}};
@@ -1,103 +0,0 @@
1
- "use strict";exports.id=6491,exports.ids=[1990,6491],exports.modules={16402:(a,b,c)=>{c.d(b,{dd:()=>p,r_:()=>l,vm:()=>n});var d=c(74258),e=c(57010),f=c(26895),g=c(20967),h=c(28861),i=c(96742);let j=["enforce","legacy"],k={claude:"enforce",codex:"enforce",copilot:"enforce",opencode:"enforce",gemini:"legacy",antigravity:"legacy","vibe-local":"legacy","command-code":"legacy","opencode-v2":"enforce"};function l(a,b,c,d=process.env){let e=m(a,b,c,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();j.includes(h)&&("*"===g?d=h:g===a&&(e=h))}return e??d??k[a]??"legacy"}(a,d));return{allowed:!e.gated||null!==e.dialog&&"numbered"===e.dialog.answerMode,dialog:e.dialog,mode:e.mode,gated:e.gated}}function m(a,b,c,f){let g=(0,e.bN)(a);if("multiple_choice"!==b||!g.hasDialogRules||"legacy"===f)return{present:!0,dialog:null,mode:f,gated:!1};let h=g.detectDialog((0,d.z)(c));return{present:null!==h,dialog:h,mode:f,gated:!0}}function n(a,b,c){return m(a,b,c,k[a]??"legacy")}let o="unsupported_dialog_layout";function p(a,b){let c=(0,g._A)((0,g.aJ)(b)),d="antigravity"===a?(0,h.g)(c):null,e="command-code"===a?(0,i.nK)(b):{kind:"none"};if("unsupported"===e.kind)return{promptCheck:{isPrompt:!1,cleanContent:c},isCommandCodeQuestion:!1,refusal:{reason:o,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:k[a]??"legacy",gated:!1}};let j="prompt"===e.kind,l=("prompt"===e.kind?e.prompt:null)??d??(0,f.gF)(c,(0,g.KO)(a)),m=n(a,l.promptData?.type,b);return{promptCheck:l,isCommandCodeQuestion:j,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:o,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"}}(l,m),presence:m}}},26895:(a,b,c)=>{c.d(b,{gF:()=>n,xn:()=>g});var d=c(72626),e=c(69119),f=c(68652);function g(a,b="yes_no"){let c=a.toLowerCase().trim();if("multiple_choice"===b){if(/^\d+$/.test(c))return c;throw Error("Invalid answer for multiple choice prompt. Expected a number.")}if("yes"===c||"y"===c)return"y";if("no"===c||"n"===c)return"n";throw Error("Invalid answer for yes/no prompt. Expected 'yes', 'no', 'y', or 'n'.")}let h=(0,d.h)("prompt-detector"),i=null;function j(a){let b=a.split("\n"),c=(b.length>200?b.slice(-200):b).join("\n");return c.length>5e3&&(c=c.slice(-5e3)),c}let k=[{regex:/^(.+)\s+\(y\/n\)\s*$/m},{regex:/^(.+)\s+\[y\/N\]\s*$/m,defaultOption:"no"},{regex:/^(.+)\s+\[Y\/n\]\s*$/m,defaultOption:"yes"},{regex:/^(.+)\s+\(yes\/no\)\s*$/m}];function l(a,b,c,d){let{startLine:f,endLine:g}=function(a,b,c){let d=c.index??0,e=a=>a.split("\n").length-1,f=b+e(a.slice(0,d));return{startLine:f,endLine:f+e(c[0])}}(b,c,d);return(0,e.ZH)(a,(0,e.wf)(a,f),g+1)}function m(a,b,c,d,e){return{isPrompt:!0,promptData:{type:"yes_no",question:a,options:["yes","no"],status:"pending",...void 0!==e&&{defaultOption:e},instructionText:c,...void 0!==d&&{approvalTarget:d}},cleanContent:b,rawContent:c}}function n(a,b){let c=(0,f.N)(a),d=c===a&&b?.precomputedLines?b.precomputedLines:c.split("\n"),g=d.slice(-50).join("\n"),n=g===i;n||h.debug("detectPrompt:start",{outputLength:c.length}),i=g;let o=d.slice(-20).join("\n"),p=Math.max(0,d.length-20),q=(0,e.rS)(c,b,j);if(q.isPrompt)return n||h.info("detectPrompt:multipleChoice",{isPrompt:!0,question:q.promptData?.question,optionsCount:q.promptData?.options?.length}),q;let r=o.trim();for(let a of k){let b=o.match(a.regex);if(b){let c=b[1].trim();return m(c,c,r,l(d,o,p,b),a.defaultOption)}}let s=o.match(/^(.*?)Approve\?\s*$/m);if(s){let a=s[1].trim();return m(a?`${a} Approve?`:"Approve?",a||"Approve?",r,l(d,o,p,s))}return n||h.debug("detectPrompt:complete",{isPrompt:!1}),{isPrompt:!1,cleanContent:c.trim()}}},28861:(a,b,c)=>{c.d(b,{g:()=>l});var d=c(20967),e=c(69119),f=c(68652),g=c(682);let h=/^\s*●\s/,i=/^\s*─{3,}\s*$/,j=/[??]\s*$/;function k(a){let b=a.split("\n"),c=(b.length>200?b.slice(-200):b).join("\n");return c.length>5e3?c.slice(-5e3):c}function l(a){let b=(0,f.N)(a),c=b.split("\n"),l=function(a){let b=(0,d.dx)(a);if(null===b)return null;let c=a.slice(b.start,b.footer);if(c.some(a=>d.d0.test(a)))return null;let e=(0,g.c)(c,c.length,12);if(null===e)return null;let f=[...e.options];if(""!==e.footer){let a=f.length-1;f[a]=[f[a],...e.footer.split("\n")].join(" ").trim()}let h=b.start+e.firstRow,k=-1,l=-1,m=0;for(let c=h-1;c>=b.start&&m<3;c--){let b=a[c];if(""!==b.trim()){if(d.OM.test(b)||i.test(b))break;if(m++,l<0&&(l=c),j.test(b)){k=c;break}}}return k<0&&(k=l),{question:k<0?"Please select an option:":a[k].trim(),options:f,selectedIndex:e.selectedIndex,questionRow:k<0?h:k,firstOptionRow:h,footerRow:b.footer}}(c);return null===l?null:(0,e.xe)(l.question,l.options.map((a,b)=>({number:b+1,label:a,isDefault:b===l.selectedIndex})),{instructionText:function(a,b){let c=(0,d.dx)(a),e=c?.start??b.questionRow,f=Math.max(0,b.questionRow-40);for(let c=b.questionRow-1;c>=f;c--)if(h.test(a[c])){e=c+1;break}let g=a.slice(e,b.footerRow+1).filter(a=>!i.test(a)).map(a=>a.trimEnd()).join("\n").trim();return g.length>0?g:void 0}(c,l),approvalTarget:(0,e.ZH)(c,(0,e.wf)(c,l.questionRow),l.footerRow)},b,k)}},30008:(a,b,c)=>{c.d(b,{F1:()=>g,_G:()=>i,j0:()=>f,rB:()=>h,xF:()=>j});var d=c(48083),e=c(67882);let f=3e5,g="CM_STRUCTURED_SEND_GUARD";function h(a){return"notification"===a.source?e.Oh.PERMISSION_PROMPT:e.Oh.PERMISSION_REQUEST}function i({worktreeId:a,cliToolId:b,instanceId:c,scraper:e,ignoreStructured:i=!1,now:j=Date.now()}){var k,l,m;let n=(0,d.getStructuredPromptWaiting)(a,b,c,j);null!==n&&("waiting"===e.status?(0,d.corroborateStructuredPromptWaiting)(a,b,c,j):n.scraperCorroborated&&((0,d.clearStructuredPromptWaiting)(a,b,c),n=null));let o=e.hasActivePrompt||null!==n;if(e.hasActivePrompt)return{waiting:o,scraperWaiting:!0,structured:n,blocksSend:!0,blockedBy:"scraper",blockReason:e.reason,structuredSendBlockSuppressed:null};if(null===n)return{waiting:o,scraperWaiting:!1,structured:null,blocksSend:!1,blockedBy:null,blockReason:null,structuredSendBlockSuppressed:null};let p=(k=n,l=i,m=j,l?"caller_opt_out":!function(){let a=process.env[g]?.trim().toLowerCase();return"off"===a||"0"===a||"false"===a}()?m-k.at>=f?"expired":null:"disabled");return{waiting:o,scraperWaiting:!1,structured:n,blocksSend:null===p,blockedBy:null===p?"structured":null,blockReason:null===p?h(n):null,structuredSendBlockSuppressed:p}}function j({worktreeId:a,cliToolId:b,instanceId:c,scraper:e,now:f=Date.now()}){let g=(0,d.getStructuredPromptWaiting)(a,b,c,f);return{waiting:e.hasActivePrompt||null!==g,scraperWaiting:e.hasActivePrompt,structured:g}}},31990:(a,b,c)=>{c.d(b,{Wh:()=>R,WD:()=>S,Lw:()=>U,K1:()=>Q,N5:()=>T});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);let B=(0,m.promisify)(l.execFile),C=(0,e.h)("tmux-session-hooks"),D=globalThis.__cmEnsuredSessionHooks??(globalThis.__cmEnsuredSessionHooks=new Set);async function E(a){if((0,n.N_)(a)&&!D.has(a)){D.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 B("tmux",b,{timeout:5e3})}else await B("tmux",(0,n.g4)(a),{timeout:5e3});if((0,n.jx)()){let b=(0,n.Ls)(a,z(u,y));b&&await B("tmux",b,{timeout:5e3})}else await B("tmux",(0,n.sL)(a),{timeout:5e3})}catch(b){C.debug("session-hooks:reconcile-failed",{sessionName:a,error:b instanceof Error?b.message:String(b)})}}}async function F(a){try{if(!await (0,A.Us)(a)||await (0,A.Fh)(a))return!1;for(let b of(0,n.RS)(a))await B("tmux",b,{timeout:5e3});return C.info("session-hooks:geometry-restored",{sessionName:a}),!0}catch(b){return C.debug("session-hooks:geometry-restore-failed",{sessionName:a,error:b instanceof Error?b.message:String(b)}),!1}}let G=(0,m.promisify)(l.execFile),H=(0,e.h)("tmux-session-status"),I=globalThis.__cmPublishedTmuxStatus??(globalThis.__cmPublishedTmuxStatus=new Map),J=globalThis.__cmClearedTmuxStatus??(globalThis.__cmClearedTmuxStatus=new Set);async function K(a){let{sessionName:b,worktreeId:c,cliToolId:d,instanceId:e,status:f}=a;if(!(0,n.om)())return J.has(b)||(J.add(b),await M(b)),"disabled";let g=I.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 G("tmux",(0,n.ND)(b,a,c),{timeout:5e3});return I.set(b,{status:f,worktreeId:c,cliToolId:d,instanceId:e}),await L(b),"written"}catch(a){return I.delete(b),H.debug("session-status:write-failed",{sessionName:b,error:a instanceof Error?a.message:String(a)}),"error"}}async function L(a){try{let{stdout:b}=await G("tmux",(0,n.Ys)(a,"status-right"),{timeout:5e3}),c=b.trim();if(""!==c&&!c.includes(n.lY))return H.debug("session-status:status-right-user-owned",{sessionName:a,existing:c}),!1;return""===c&&await G("tmux",(0,n.KB)(a,n.lY),{timeout:5e3}),!0}catch(b){return H.debug("session-status:status-right-failed",{sessionName:a,error:b instanceof Error?b.message:String(b)}),!1}}async function M(a){for(let b of(I.delete(a),n.bq))try{await G("tmux",(0,n.cD)(a,b),{timeout:5e3})}catch{}try{let{stdout:b}=await G("tmux",(0,n.Ys)(a,"status-right"),{timeout:5e3});b.includes(n.lY)&&await G("tmux",(0,n.$D)(a),{timeout:5e3})}catch{}}let N=(0,e.h)("cli-session");function O(){return j||(j=new i),j}function P(a,b,c){let e=d.CLIToolManager.getInstance().getTool(b),f=e.getSessionName(a,c);return{cliTool:e,sessionName:f}}async function Q(a,b,c){let{sessionName:d}=P(a,b,c);return O().sessionExists(d)}async function R(a,b,c=1e3,d){let e=N.withContext({worktreeId:a,cliToolId:b});e.debug("captureSessionOutput:start",{requestedLines:c});let{cliTool:f,sessionName:g}=P(a,b,d),h=O();try{let a=await (0,k.aq)(g,c,async()=>{if(!await h.sessionExists(g))throw Error(`${f.name} session ${g} does not exist`);return await h.captureSnapshot(g,{startLine:-k.xE})});return e.debug("captureSessionOutput:success",{actualLines:a.split("\n").length,lastFewLines:a.split("\n").slice(-3).join(" | ")}),a}catch(b){let a=b instanceof Error?b.message:String(b);if(a.includes("does not exist"))throw e.debug("captureSessionOutput:sessionNotFound",{sessionName:g}),b;throw e.error("captureSessionOutput:failed",{error:a}),Error(`Failed to capture ${f.name} output: ${a}`)}}async function S(a,b,c=5e3,d){let e=N.withContext({worktreeId:a,cliToolId:b});e.debug("captureSessionOutputFresh:start",{requestedLines:c});let{cliTool:f,sessionName:g}=P(a,b,d),h=O();try{let a=await h.captureSnapshot(g,{startLine:-c});return a.length>0?(0,k.vF)(g,a,c):(0,k.gm)(g),(0,k.wd)(a,c)}catch(b){(0,k.gm)(g);let a=b instanceof Error?b.message:String(b);throw e.error("captureSessionOutputFresh:failed",{error:a}),Error(`Failed to capture ${f.name} output: ${a}`)}}async function T(a){await E(a.sessionName),(0,n.n9)(a.sessionName)&&await F(a.sessionName),await K(a)}function U(a){I.delete(a),J.delete(a),D.delete(a),(0,A.G9)(a)}},37717:(a,b,c)=>{c.d(b,{g:()=>d});let d={PROMPT_DETECTED:"prompt_detected",THINKING_INDICATOR:"thinking_indicator",OPENCODE_PROCESSING_INDICATOR:"opencode_processing_indicator",OPENCODE_SELECTION_LIST:"opencode_selection_list",OPENCODE_MODAL_OVERLAY:"opencode_modal_overlay",OPENCODE_PERMISSION_PROMPT:"opencode_permission_prompt",CLAUDE_SELECTION_LIST:"claude_selection_list",COMMAND_CODE_SELECTION_LIST:"command_code_selection_list",COMMAND_CODE_DISMISSABLE_PANEL:"command_code_dismissable_panel",COMMAND_CODE_PLAN_REVIEW:"command_code_plan_review",COPILOT_SELECTION_LIST:"copilot_selection_list",CODEX_SELECTION_LIST:"codex_selection_list",CODEX_PAGER:"codex_pager",CODEX_HOOKS_REVIEW:"codex_hooks_review",ANTIGRAVITY_SELECTION_LIST:"antigravity_selection_list",OPENCODE_RESPONSE_COMPLETE:"opencode_response_complete",INPUT_PROMPT:"input_prompt",NO_RECENT_OUTPUT:"no_recent_output",EXITED:"exited",UNKNOWN_FRAME:"unknown_frame",DEFAULT:"default"}},45150:(a,b,c)=>{c.d(b,{Lj:()=>k,VC:()=>l});var d=c(20967),e=c(37717),f=c(91010),g=c(1804),h=c(28861);let i=g.yh,j={status:"waiting",confidence:"high",reason:e.g.ANTIGRAVITY_SELECTION_LIST,hasActivePrompt:!1,evidence:"positive"};function k(a,b){if(b.promptData?.type!=="multiple_choice")return!1;let c=(0,d._A)(a.contentLines.join("\n")).split("\n"),{promptPattern:e}=(0,d._X)("antigravity"),f=-1;for(let a=c.length-1;a>=0;a--)if(e.test(c[a])){f=a;break}return!(f<0)&&!c.slice(f+1).some(a=>d.Ly.test(a))}let l=(0,f.b)({tool:"antigravity",verifiedAgainst:i,isStalePrompt:k,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 j;if(!d.kT.test(a.lastLines)||!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,h.g)(b);return null!==a?{status:"waiting",confidence:"high",reason:e.g.PROMPT_DETECTED,hasActivePrompt:!0,evidence:"positive",promptDetection:a}:{status:"running",confidence:"low",reason:e.g.UNKNOWN_FRAME,hasActivePrompt:!1,evidence:"none"}}return j},afterThinking(a){if((0,d.ut)("antigravity",a.lastLines))return{status:"running",confidence:"high",reason:e.g.THINKING_INDICATOR,hasActivePrompt:!1,evidence:"positive"};let{promptPattern:b}=(0,d._X)("antigravity");return b.test(a.lastLines)?{status:"ready",confidence:"high",reason:e.g.INPUT_PROMPT,hasActivePrompt:!1,evidence:"positive"}:null}})},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}},57010:(a,b,c)=>{c.d(b,{bN:()=>ar});var d=c(45150),e=c(20967),f=c(94154),g=c(69119),h=c(37717),i=c(682),j=c(61244);let k=/esc\s+to\s+cancel|enter\s+to\s+(?:select|confirm|set\s+as\s+default)/i,l=new Set(["❯",">"]),m=/do you want to\b|allow\b.*\?$/i,n=/ready to submit your answers\?|review your answers/i,o=/set\s+as\s+default/i;var p=c(74258),q=c(91010),r=c(1804);let s=/^\s*[✻✽✶✢✳⦿◉●·⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏]\s+\S+\s+for\s+(?:\d+m\s*)?\d+(?:\.\d+)?s(?:\s|$|\s*·)/,t=/^\s*╭─+\s*Claude Code v/,u=/^\s*[>❯]\s+\S/,v=/·\s*\/effort\s*$/;function w(a){let b=(0,f.p4)(a),c=b?b.openingSeparator:a.length,d=(0,g.QI)(a,0,c).rows,e=c-1;for(;e>=0&&(""===a[e].trim()||d.has(e)||v.test(a[e]));)e--;return e}let x=(0,q.b)({tool:"claude",verifiedAgainst:r.iE,afterPrompt:a=>e.XY.test(function(a){let b=(0,f.p4)(a.contentLines);if(!b)return a.lastLines;let c=a.contentLines.length-p.h;return a.contentLines.slice(Math.max(b.openingSeparator,c)).join("\n")}(a))?{status:"waiting",confidence:"high",reason:h.g.CLAUDE_SELECTION_LIST,hasActivePrompt:!1,evidence:"positive"}:null,afterThinking:a=>e.aU.test(a.lastLines)?{status:"running",confidence:"high",reason:h.g.THINKING_INDICATOR,hasActivePrompt:!1,evidence:"positive"}:null,readIdleEvidence:function(a){let b=w(a.contentLines);if(b>=0&&s.test(a.contentLines[b]))return"positive";let c=(0,f.p4)(a.contentLines),d=a.contentLines.slice(0,c?c.openingSeparator:void 0),e=d.some(a=>t.test(a)),g=d.some(a=>u.test(a));return e&&!g?"positive":"none"},detectDialog:a=>(function(a,b){var c;if(b.transcriptTail<0)return null;let d=(0,e._A)(a.clean).split("\n"),f=b.transcriptTail+1,h=(0,g.QI)(a.contentLines,0,f),p=(0,g.N0)(d,h),q=(0,i.c)(p,f);if(!q||null===q.selectedGlyph||!l.has(q.selectedGlyph))return null;let r=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")}(p,h.rows,q.lastRow+1,f);return""===r||k.test(r)?{kind:(c=function(a,b){let c=(0,j.$N)(a,b,g.ie),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")}(p,q.firstRow),n.test(c)?"ask_user":o.test(r)?"picker":m.test(c)?"permission":"dialog"),options:q.options,answerMode:"numbered"}:null})(a,{transcriptTail:w(a.contentLines)})});var y=c(26895),z=c(65912);let A={"hooks-review":"permission","hooks-list":"picker","hooks-detail":"picker",update:"update",trust:"trust"};var B=c(46423);let C=r.jP,D=/press\s+(?:number|enter)\s+to\s+confirm/i,E=/^\s*[❯›●]?\s*\d{1,2}[.)]\s/;function F(a){for(let b=a.length-1;b>=Math.max(0,a.length-10);b--){let c=a[b];if(e.aW.test(c)||e.UO.test(c))return b}return -1}function G(a){let b=F(a),c=b>=0?b-1:a.length-1;for(;c>=0&&""===a[c].trim();)c--;return c+1}function H(a){let b=F(a),c=b>=0?b:a.length,d=-1,f=-1;for(let b=0;b<c;b++){let c=a[b],g=c.trim();""!==g&&((D.test(g)||E.test(g))&&(d=b),(0,e.ut)("codex",c)&&(f=b))}return d>=0&&f>d}function I(a){return(0,z.kp)(a)?.kind==="option"}let J=(0,q.b)({tool:"codex",verifiedAgainst:C,beforePrompt(a){let{contentLines:b}=a;if((0,z.Gs)(a.raw,b,G(b)))return null;if(e.pn.test(a.lastLines))return{status:"waiting",confidence:"high",reason:h.g.CODEX_PAGER,hasActivePrompt:!1,evidence:"positive",promptDetection:(0,y.gF)((0,e._A)(a.clean),(0,e.KO)("codex"))};let c=(0,e.E6)(a.clean);if("hooks-list"===c||"hooks-detail"===c)return{status:"waiting",confidence:"high",reason:h.g.CODEX_HOOKS_REVIEW,hasActivePrompt:!1,evidence:"positive",promptDetection:(0,y.gF)((0,e._A)(a.clean),(0,e.KO)("codex"))};let d=F(b),f=d>=0?d-1:b.length-1;for(;f>=0&&""===b[f].trim();)f--;if(f>=0){let c=b.slice(Math.max(0,f-p.h+1),f+1).join("\n"),d=b[f].trim();if(e.Jn.test(c)||e.ir.test(d)||e.bh.test(d)){let d=(0,y.gF)((0,e._A)(a.clean),(0,e.KO)("codex"));return d.isPrompt&&((d.promptData?.question?.trim()??"").endsWith("?")||e.Dd.test(c))&&!H(b)?{status:"waiting",confidence:"high",reason:h.g.PROMPT_DETECTED,hasActivePrompt:!0,evidence:"positive",promptDetection:d}:{status:"waiting",confidence:"high",reason:h.g.CODEX_SELECTION_LIST,hasActivePrompt:!1,evidence:"positive",promptDetection:d}}}let g=(0,z.t)(a.raw,b,G(b));if(g&&!H(b)){g.footerRecognised||(0,z.AT)(g.footer);let b=(0,y.gF)((0,e._A)(a.clean),(0,e.KO)("codex"));return b.isPrompt?{status:"waiting",confidence:"high",reason:h.g.PROMPT_DETECTED,hasActivePrompt:!0,evidence:"positive",promptDetection:b}:{status:"waiting",confidence:"high",reason:h.g.CODEX_SELECTION_LIST,hasActivePrompt:!1,evidence:"positive",promptDetection:b}}return null},isStalePrompt:a=>H(a.contentLines)||(0,z.Gs)(a.raw,a.contentLines,G(a.contentLines)),detectDialog(a){let b=G(a.contentLines);return(0,z.Gs)(a.raw,a.contentLines,b)?null:function(a,b){let c=(0,e._A)(a.clean).split("\n"),d=(0,i.c)(c,b.contentEnd);if(b.lifecycleDialog)return{kind:A[b.lifecycleDialog],options:d?.options??[],answerMode:"numbered"};if(!d||!e.Jn.test(d.footer)&&!e.$I.test(d.footer)&&!e.ir.test(d.footer)&&!e.bh.test(d.footer)||b.stalePrompt)return null;let f=function(a,b){let c=[];for(let d=b-1;d>=0&&c.length<4;d--){let b=a[d].trim();""!==b&&c.push(b)}return c.join("\n")}(c,d.firstRow);return{kind:e.Dd.test(d.footer)||f.split("\n")[0]?.endsWith("?")?"permission":"picker",options:d.options,answerMode:"numbered"}}(a,{contentEnd:b,stalePrompt:H(a.contentLines),lifecycleDialog:(0,e.E6)(a.clean)})},afterThinking(a){let{contentLines:b}=a,c=F(b);if(c>=0){let d=c-1;for(;d>=0&&""===b[d].trim();)d--;if(d>=0){let c=b.slice(Math.max(0,d-B.$+1),d+1).join("\n");return(0,e.ut)("codex",c)?{status:"running",confidence:"high",reason:h.g.THINKING_INDICATOR,hasActivePrompt:!1,evidence:"positive"}:e.gm.test(b[d].trim())&&!I(a.raw)?{status:"ready",confidence:"high",reason:h.g.INPUT_PROMPT,hasActivePrompt:!1,evidence:"positive"}:{status:"running",confidence:"high",reason:h.g.THINKING_INDICATOR,hasActivePrompt:!1,evidence:"positive"}}}else{let c=b.length-1;for(;c>=0&&""===b[c].trim();)c--;if(!(c>=0&&e.gm.test(b[c].trim())&&!I(a.raw))&&(0,e.ut)("codex",a.lastLines))return{status:"running",confidence:"high",reason:h.g.THINKING_INDICATOR,hasActivePrompt:!1,evidence:"positive"}}return null}});var K=c(91478),L=c(96742);let M=/^\s*↑\/↓\s+navigate\s+·\s+enter\s+select\s+·.*\bto\s+bypass\s+all\s+permissions\b/,N=r.ji,O=(0,q.b)({tool:"command-code",verifiedAgainst:N,beforePrompt(a){if((0,K.tH)(a.lastLines)||(0,K.a9)(a.lastLines))return{status:"waiting",confidence:"high",reason:h.g.COMMAND_CODE_PLAN_REVIEW,hasActivePrompt:!1,evidence:"positive"};let b=(0,L.nK)(a.raw);return"prompt"===b.kind?{status:"waiting",confidence:"high",reason:h.g.PROMPT_DETECTED,hasActivePrompt:!0,evidence:"positive",promptDetection:b.prompt}:"unsupported"===b.kind?{status:"waiting",confidence:"high",reason:h.g.COMMAND_CODE_SELECTION_LIST,hasActivePrompt:!1,evidence:"positive"}:null},afterPrompt:a=>(0,K.yt)(a.lastLines)?{status:"waiting",confidence:"high",reason:h.g.COMMAND_CODE_DISMISSABLE_PANEL,hasActivePrompt:!1,evidence:"positive"}:(0,K.sl)(a.lastLines)?{status:"waiting",confidence:"high",reason:h.g.COMMAND_CODE_SELECTION_LIST,hasActivePrompt:!1,evidence:"positive"}:null,detectDialog:a=>(function(a){let b=a.contentLines,c=b[b.length-1];if(void 0===c||!M.test(c))return null;let d=(0,i.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,e.ut)("command-code",a.lastLines))return{status:"running",confidence:"high",reason:h.g.THINKING_INDICATOR,hasActivePrompt:!1,evidence:"positive"};let{promptPattern:b}=(0,e._X)("command-code");return b.test(a.lastLines)?{status:"ready",confidence:"high",reason:h.g.INPUT_PROMPT,hasActivePrompt:!1,evidence:"positive"}:null}}),P=/do you want to\b/i,Q=r.MJ,R=(0,q.b)({tool:"copilot",verifiedAgainst:Q,beforePrompt(a){if((0,e.gT)(a.contentLines)){let b=(0,e.KO)("copilot"),c=(0,y.gF)((0,e._A)(a.clean),b);return c.isPrompt&&(c.promptData?.options?.length??0)<=3?{status:"waiting",confidence:"high",reason:h.g.PROMPT_DETECTED,hasActivePrompt:!0,evidence:"positive",promptDetection:c}:{status:"waiting",confidence:"high",reason:h.g.COPILOT_SELECTION_LIST,hasActivePrompt:!1,evidence:"positive",promptDetection:c}}if("working"===(0,e.Wn)(a.contentLines)){let b=(0,e.KO)("copilot"),c=(0,y.gF)((0,e._A)(a.clean),b);return{status:"running",confidence:"high",reason:h.g.THINKING_INDICATOR,hasActivePrompt:!1,evidence:"positive",promptDetection:c}}return null},afterThinking:a=>"idle"===(0,e.Wn)(a.contentLines)?{status:"ready",confidence:"high",reason:h.g.INPUT_PROMPT,hasActivePrompt:!1,evidence:"positive"}:null,skipGenericInputPrompt:!0,readIdleEvidence:function(a){return"idle"===(0,e.Wn)(a.contentLines)?"positive":"none"},detectDialog:a=>(function(a,b){if(null!==b.statusBar)return null;let c=(0,e._A)(a.clean).split("\n"),d=(0,i.c)(c,b.contentEnd);if(d&&e.V.test(d.footer)){let a=function(a,b){let c=[];for(let d=b-1;d>=0&&c.length<4;d--){let b=a[d].trim();""!==b&&c.push(b)}return c.join("\n")}(c,d.firstRow);return{kind:e.rX.some(b=>a.includes(b))?"trust":P.test(a)?"permission":"picker",options:d.options,answerMode:"numbered"}}return b.selectionFrame?{kind:"picker",options:[],answerMode:"keys"}:null})(a,{statusBar:(0,e.Wn)(a.contentLines),selectionFrame:(0,e.gT)(a.contentLines),contentEnd:a.contentLines.length}),unreadableReason:h.g.UNKNOWN_FRAME});var S=c(76777),T=c(50524);let U=/\x1b\[[0-9;]*[a-zA-Z]|\x1b\][^\x07\x1b]*(?:\x07|\x1b\\)|\[[0-9;]*m/g,V=/^(?:\x1b\[|\[)([0-9;]*)m$/,W=new Set([38,48,58]);function X(a){let b;U.lastIndex=0;let c=[],d="",e=null,f=0,g=0,h=0;for(;null!==(b=U.exec(a));){let i=a.slice(h,b.index);d+=i,f+=(0,T.LQ)(i),h=b.index+b[0].length;let j=V.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(W.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,T.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 Y(a,b){for(let c of a.segments)if(c.start<=b&&b<c.end)return c.bg;return null}let Z=/\S[^\S\n]{2,}esc[^\S\n]*$/,$=/^[│┃╹]/;function _(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!(Y(a,b-1)===Y(a,b)||c<a.width&&Y(a,c)===Y(a,c-1)||$.test((0,T.Ml)(a.text,b-1,b)))&&!$.test((0,T.Ml)(a.text,b,c))}function aa(a){let b=function(a){let b=a.split("\n").map(X),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)||!_(a,f,g))continue;let h=(0,T.Ml)(a.text,f,g);if(!Z.test(h))continue;c.add(e);let i=b.filter(a=>_(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,S.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 ab=/\s{2,}/,ac=r.BG;function ad(a){let b=(0,e._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 d=b.slice(0,c),f=d.length-1;for(;f>=0&&""===d[f].trim();)f--;return{candidates:d,lastIndex:f}}let ae=(0,q.b)({tool:"opencode",verifiedAgainst:ac,afterThinking(a){if(e.Ty.test(a.lastLines))return{status:"waiting",confidence:"high",reason:h.g.OPENCODE_PERMISSION_PROMPT,hasActivePrompt:!1,evidence:"positive"};if(e.kD.test(a.lastLines))return{status:"running",confidence:"high",reason:h.g.OPENCODE_PROCESSING_INDICATOR,hasActivePrompt:!1,evidence:"positive"};let{candidates:b,lastIndex:c}=ad(a);if(c<0)return null;let d=b.slice(Math.max(0,c-B.$+1),c+1).join("\n");if((0,e.ut)("opencode",d))return{status:"running",confidence:"high",reason:h.g.THINKING_INDICATOR,hasActivePrompt:!1,evidence:"positive"};let f=b.slice(Math.max(0,c-p.h+1),c+1).join("\n");if(e.LO.test(b.join("\n")))return{status:"waiting",confidence:"high",reason:h.g.OPENCODE_SELECTION_LIST,hasActivePrompt:!1,evidence:"positive"};if(null!==aa(a.raw))return{status:"waiting",confidence:"high",reason:h.g.OPENCODE_MODAL_OVERLAY,hasActivePrompt:!1,evidence:"positive"};if(e.$t.test(f))return{status:"ready",confidence:"high",reason:h.g.OPENCODE_RESPONSE_COMPLETE,hasActivePrompt:!1,evidence:"positive"};let g=a.lines.slice(Math.max(0,c-p.h+1),c+1).join("\n");return e.vU.test(g)?{status:"ready",confidence:"high",reason:h.g.INPUT_PROMPT,hasActivePrompt:!1,evidence:"positive"}:null},skipGenericInputPrompt:!0,readIdleEvidence:function(a){let{candidates:b,lastIndex:c}=ad(a);if(c<0)return"none";let d=b.slice(Math.max(0,c-p.h+1),c+1).join("\n");if(e.$t.test(d))return"positive";let f=a.lines.slice(Math.max(0,c-p.h+1),c+1).join("\n");return e.vU.test(f)?"positive":"none"},detectDialog(a){var b;let{candidates:c}=ad(a);return b={contentWindow:c.join("\n")},e.Ty.test(a.lastLines)?{kind:"permission",options:function(a){for(let b of a.lines){let a=e.Ty.exec(b);if(a)return a[0].replace(/^[^\S\n]*[│┃][^\S\n]*/,"").trim().split(ab).map(a=>a.trim()).filter(a=>""!==a)}return[]}(a),answerMode:"keys"}:e.LO.test(b.contentWindow)||null!==aa(a.raw)?{kind:"picker",options:[],answerMode:"keys"}:null},unreadableReason:h.g.UNKNOWN_FRAME}),af=r.u3,ag=/^[^\S\n]*[│┃][^\S\n]*Allow once[^\S\n]{2,}Always allow[^\S\n]{2,}Reject\b/m,ah=/^[^\S\n]*[│┃][^\S\n]*↑↓ select[^\S\n]+enter submit[^\S\n]+esc dismiss\b/m,ai=/^[^\S\n│┃]*[A-Za-z][\w-]*(?: [\w-]+)* · [^\n]+? · \d+(?:\.\d+)?(?:ms|s|m(?: \d+s)?)(?: · [\d.]+ tok\/s)?[^\S\n]*$/,aj=["Allow once","Always allow","Reject"],ak=/^[^\S\n]*[│┃]/,al=/^[^\S\n]*[│┃][^\S\n]*(\d+)\.[^\S\n]+(\S.*?)[^\S\n]*$/,am=(0,q.b)({tool:"opencode-v2",verifiedAgainst:af,requireVouchedPrompt:!0,beforePrompt:a=>ag.test(a.lastLines)?{status:"waiting",confidence:"high",reason:h.g.OPENCODE_PERMISSION_PROMPT,hasActivePrompt:!1,evidence:"positive"}:ah.test(a.lastLines)?{status:"waiting",confidence:"high",reason:h.g.OPENCODE_SELECTION_LIST,hasActivePrompt:!1,evidence:"positive"}:null!==(0,e.dF)((0,e.aJ)(a.raw))?{status:"waiting",confidence:"high",reason:h.g.OPENCODE_MODAL_OVERLAY,hasActivePrompt:!1,evidence:"positive"}:null,afterThinking:a=>(0,e.ut)("opencode-v2",a.lastLines)?{status:"running",confidence:"high",reason:h.g.THINKING_INDICATOR,hasActivePrompt:!1,evidence:"positive"}:!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)||e.c7.test(c)||/^\s*\d+\.\d+\.\d+\s*$/.test(c)))return ai.test(b[a])}return!1}(a)?e.wK.test((0,e.aJ)(a.raw))||e.c7.test(a.lastLines)?{status:"ready",confidence:"high",reason:h.g.INPUT_PROMPT,hasActivePrompt:!1,evidence:"positive"}:null:{status:"ready",confidence:"high",reason:h.g.OPENCODE_RESPONSE_COMPLETE,hasActivePrompt:!1,evidence:"positive"},detectDialog(a){if(ag.test(a.lastLines))return{kind:"permission",options:aj,answerMode:"keys"};let b=function(a){if(!ah.test(a.lastLines))return null;let b=a.contentLines,c=-1;for(let a=b.length-1;a>=0;a--)if(ah.test(b[a])){c=a;break}if(c<0)return null;let d=[];for(let a=c-1;a>=0&&ak.test(b[a]);a--){let c=al.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,e.dF)((0,e.aJ)(a.raw))?{kind:"picker",options:[],answerMode:"keys"}:null}});function an(a){return(0,q.b)({tool:a,verifiedAgainst:r.hB})}let ao=an("gemini"),ap=an("vibe-local"),aq={claude:x,codex:J,copilot:R,opencode:ae,antigravity:d.VC,"command-code":O,"opencode-v2":am,gemini:ao,"vibe-local":ap};function ar(a){return aq[a]??an(a)}Object.values(aq)},61244:(a,b,c)=>{c.d(b,{$N:()=>h,Tq:()=>g,jW:()=>m});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,b,c){let d=Math.max(0,b-c);for(let c=b-1;c>=d;c--)if(function(a){let b=a.trimEnd();return e.test(b)||f.test(b)}(a[c]??""))return c;return -1}let i=/┌(─+)┐\s*$/,j=/^\s*(?:[❯›>]\s*)?1\.\s+\S/,k=/^( *)└(─+)┘\s*$/,l=/^\s*(?:[❯›>]\s*)?\d{1,2}\.\s+\S|^\s{2,}\S/;function m(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=i.exec(b);if(!h||!j.test(b.slice(0,h.index)))continue;let m=-1,n=0;for(let b=c+1;b<Math.min(f,c+80);b++){let c=k.exec(a[b]);if(c&&c[2].length===h[1].length){m=b,n=c[1].length;break}}if(m<0)continue;let o=[m],p=[[c,h.index]];for(let b=c+1;b<m;b++){let c=a[b].indexOf("│"),d=c>0?a[b].slice(0,c):"";""!==d.trim()&&l.test(d)?p.push([b,c]):o.push(b)}let q=m+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}}},69119:(a,b,c)=>{c.d(b,{J0:()=>y,N0:()=>m,QI:()=>l,ZH:()=>G,ie:()=>E,rS:()=>I,wf:()=>F,xe:()=>H});var d=c(68652),e=c(20967),f=c(61244);let g=/^\s*[\u276F\u25CF\u203A][^\d]*(\d+)(?:\.(?!\d)|\s{2,})\s*(.+)$/,h=/^\s*[^\d]{0,3}(\d+)(?:\.(?!\d)|\s+)\s*(.+)$/,i=/^\s*\d{1,3}\s+tasks?\s+\(\d+\s+done\b/i,j=/^\s*[◼◻]\s/,k=/^(?:No changes this session|\+\d+ files? edited before this session \(show\))$/;function l(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(k.test(a[e].trim())){d.add(e);continue}if(i.test(a[e])){d.add(e);for(let b=e+1;b<Math.min(c,a.length);b++){let c=a[b];if(!j.test(c)&&!q.test(c))break;d.add(b)}}}return d}(a,b,c),e=(0,f.jW)(a,b,c);for(let a of e.rows)d.add(a);return{rows:d,cuts:e.cuts}}function m(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()})}let n=/^\s{3,}\S/,o=/^[-─]+$/,p=/^\s*\[[^\]]*\d+\s+lines?\]/i,q=/^\s*[…]?\s*[+\-↑↓⏵⏷]?\s*\d+\s+(?:pending|more|completed)\b/i,r=/Esc\s+to\s+cancel\s*[·•]\s*Tab\s+to\s+amend/i,s=f.Tq,t=/press\s+(?:enter|number)\s+to\s+confirm/i,u=/press\s+number\s+to\s+confirm/i,v=/(?:select|choose|pick|which|what|how|where|enter|type|specify|confirm|approve|accept|reject|decide|preference|option)/i,w=[/type\s+here/i,/tell\s+(me|claude)/i,/enter\s+/i,/custom/i,/differently/i],x=[/^[^\S\n]*type\s+something\b/i];function y(a){return!0===a.requiresTextInput&&x.some(b=>b.test(a.label))}function z(a,b){if(0===b.length)return!0;let c=b[0].number;return a<c&&a>=c-2}function A(a){return{isPrompt:!1,cleanContent:a.trim()}}function B(a){return 0!==a.length&&!!(a.includes("?")||a.includes("?")||v.test(a))}function C(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 D=/^[⏺⎿●○•✔✓✖✗✘›»❯└├>]/,E=12;function F(a,b){let c=Math.max(0,b-E);for(let d=b-1;d>=c;d--)if(function(a){if(void 0===a)return!1;let b=a.trim();return""!==b&&(D.test(b)||o.test(b))}(a[d]))return d+1;return c}function G(a,b,c){let d=a.slice(b,c).map(a=>a.trimEnd()).join("\n").trim();return d.length>0?d:void 0}function H(a,b,c,d,e,f,g){let{instructionText:h,approvalTarget:i}=c??{};return{isPrompt:!0,promptData:{type:"multiple_choice",question:a.trim(),options:b.map(a=>{let b=w.some(b=>b.test(a.label));return{number:a.number,label:a.label,isDefault:a.isDefault,requiresTextInput:b}}),status:"pending",instructionText:h,...void 0!==i?{approvalTarget:i}:{},...f?{submitMode:f}:{},...g?{isAskUserQuestion:!0}:{}},cleanContent:a.trim(),rawContent:e(d.trim())}}function I(a,b,c){if(a=(0,d.N)(a),b?.hasNumberedDialogs===!1)return A(a);let i=b?.requireDefaultIndicator??!0,j=a.split("\n"),k=j.length;for(;k>0&&""===j[k-1].trim();)k--;let m=Math.max(0,k-50),v=!1;for(let a=k-1;a>=m;a--){let b=s.test(j[a]);if(r.test(j[a])||b){k=a,v=b;break}}let w=j.slice(m,k);for(let b of w)if(e.l8.test(b))return A(a);let x=!1,y=!1;for(let a of w){let b=a.trim();if(!x&&t.test(b)){x=!0,u.test(b)&&(y=!0);break}}if(i){let b=!1;for(let a of w){let c=a.trim();if(g.test(c)){b=!0;break}}if(!b&&!x)return A(a)}let D=[],I=-1,J=0,K=l(j,m,k),L=[];for(let b=k-1;b>=m;b--){if(K.rows.has(b)){J++;continue}let c=K.cuts.get(b),d=void 0===c?j[b]:j[b].slice(0,c).trimEnd(),e=d.trim();if(void 0!==c&&n.test(d)){L.unshift(e),J++;continue}if(p.test(e)||q.test(e)){J++;continue}let f=e.match(g);if(f){let a=parseInt(f[1],10);if(a<=20&&z(a,D)){let b=[f[2].trim(),...L].join(" ");L=[],D.unshift({number:a,label:b,isDefault:!0}),J=0;continue}}let i=e.match(h);if(i){let a=parseInt(i[1],10);if(a>20);else if(z(a,D)){let b=[i[2].trim(),...L].join(" ");L=[],D.unshift({number:a,label:b,isDefault:!1}),J=0;continue}}if(0===D.length&&(e.startsWith("❯")||e.startsWith("●")||e.startsWith("›")))return A(a);if(D.length>0&&e&&!o.test(e)){if(/^\s{4,}/.test(d)&&C(d,e)){if(++J>25){I=b;break}continue}if(B(e)){I=b;break}if(C(d,e)){if(++J>(/^\s{4,}/.test(d)?25:5)){I=b;break}continue}I=b;break}}if(!function(a){if(0===a.length||1!==a[0])return!1;let b=0;for(let c=1;c<a.length;c++){let d=a[c]-a[c-1];if(d<1||d>2||(2===d&&b++,b>1))return!1}return!0}(D.map(a=>a.number)))return A(a);let M=D.some(a=>a.isDefault),N=i&&x;if(D.length<2||i&&!M&&!N||!i&&!M&&(-1===I||!B(j[I]?.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||o.test(b))&&B(b))return!0}return!1}(j,I,0,m)))return A(a);let O=I<0?0:(0,f.$N)(j,I,E)+1,P=function(a,b,c=0){if(b<0)return"Please select an option:";let d=[];for(let e=Math.max(c,b-5);e<=b;e++){let b=a[e].trim();b&&!o.test(b)&&d.push(b)}return d.join(" ")}(j,I,O),Q=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}(j,I,k);return H(P,D,{instructionText:Q,approvalTarget:function(a,b,c,d=0){if(!(b<0))return G(a,Math.max(d,F(a,b)),c)}(j,I,k,O)},a,c,x?y?"answer_only":"answer_then_enter":void 0,v)}},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}`}},91010:(a,b,c)=>{c.d(b,{b:()=>k});var d=c(20967),e=c(26895),f=c(37717);let g=["enforce","observe","legacy"],h={claude:"observe",copilot:"enforce",opencode:"enforce",codex:"legacy",gemini:"legacy",antigravity:"legacy","vibe-local":"legacy","command-code":"legacy","opencode-v2":"legacy"},i=globalThis.__idleEvidenceObservations??(globalThis.__idleEvidenceObservations=new Map),j=new Set(["opencode","codex","claude","copilot"]);function k(a){return{...a,detect:(b,c)=>(function(a,b,c={}){let k=a.beforePrompt?.(b)??null;if(k)return k;let l=(0,d.KO)(a.tool),m=j.has(a.tool)?(0,d._A)(b.clean):(0,d._A)(b.lastLines),n=(0,e.gF)(m,l);if(n.isPrompt)if(a.isStalePrompt?.(b,n))n={...n,isPrompt:!1,promptData:void 0};else{if(!a.requireVouchedPrompt||c.isPromptVouched?.(n)!==!1)return{status:"waiting",confidence:"high",reason:f.g.PROMPT_DETECTED,hasActivePrompt:!0,evidence:"positive",promptDetection:n};n={...n,isPrompt:!1,promptData:void 0}}let o=a.afterPrompt?.(b,n)??null;if(o)return{...o,promptDetection:o.promptDetection??n};if((0,d.ut)(a.tool,b.thinkingLines))return{status:"running",confidence:"high",reason:f.g.THINKING_INDICATOR,hasActivePrompt:!1,evidence:"positive",promptDetection:n};let p=a.afterThinking?.(b,n)??null;if(p)return{...p,promptDetection:p.promptDetection??n};if(!a.skipGenericInputPrompt){let{promptPattern:c}=(0,d._X)(a.tool);if(c.test(b.lastLines))return{status:"ready",confidence:"high",reason:f.g.INPUT_PROMPT,hasActivePrompt:!1,evidence:function(a,b){if(void 0===a.readIdleEvidence)return"positive";let c=function(a,b=process.env){let c=b.CM_DETECTION_IDLE_EVIDENCE,d=null,e=null;if("string"==typeof c&&""!==c.trim())for(let b of c.split(",")){let[c,f]=b.split("=");if(void 0===f)continue;let h=c.trim(),i=f.trim();g.includes(i)&&("*"===h?d=i:h===a&&(e=i))}return e??d??h[a]??"legacy"}(a.tool);if("legacy"===c)return"positive";let d=a.readIdleEvidence(b);var e=a.tool;let f=i.get(e)??{mode:c,positive:0,none:0};return f.mode=c,"positive"===d?f.positive+=1:f.none+=1,i.set(e,f),"observe"===c?"positive":d}(a,b),promptDetection:n}}return c.lastOutputTimestamp&&Date.now()-c.lastOutputTimestamp.getTime()>5e3?{status:"running",confidence:"low",reason:f.g.NO_RECENT_OUTPUT,hasActivePrompt:!1,evidence:"none",promptDetection:n}:{status:"running",confidence:"low",reason:a.unreadableReason??f.g.DEFAULT,hasActivePrompt:!1,evidence:"none",promptDetection:n}})(a,b,c),detectDialog:a.detectDialog??(()=>null),hasDialogRules:void 0!==a.detectDialog}}},91478:(a,b,c)=>{c.d(b,{Dk:()=>v,a9:()=>l,f_:()=>w,sl:()=>n,tH:()=>p,uG:()=>B,yt:()=>o});var d=c(51297);let e=/^[^0-9A-Za-z]*([1-9])[.)]\s+\S/,f=/\btype\s+to\s+search\b|\bsearch\s+\w+\s*(?:…|\.\.\.)|(?:^|·)\s*\/\s+search\b/im,g=/\benter\s+to\s+select\b\s*[·•]\s*esc\s+to\s+cancel\b/i,h=/^\s*(?:press|hit|type)?\s*(?:<)?esc(?:ape)?(?:>)?\s+to\s+(?:close|dismiss|exit)\b[\s.·•]*$/im,i=/^\s*(?:❯ +)?Approve\s+ctrl\+a\b[^\n]*\n\s*(?:❯ +)?Cancel\s+esc\s*$/im,j=/^\s*Approve\s+\([• ]\)\s+with\s+\d+\s+comments?\s+as\s+notes\s+\([• ]\)\s+original\s+plan\b/im,k=/(?:^|\n)[ \t]*←\/→\s+choose\s*·\s*enter\s+confirm\s*·\s*esc\s+back\s*$/i;function l(a){return j.test(a)&&k.test(a)}function m(a,b){return a.split("\n").filter(a=>""!==a.trim()).slice(-b).join("\n")}function n(a){return g.test(m(a,1))}function o(a){return h.test(m(a,1))}function p(a){return i.test(m(a,5))}let q=/^\u2500+$/,r="●◉⦿",s=RegExp(`^\\s*([${r}◯○◌⚪✔])\\s+\\S`);function t(a){let b=a.split("|");if(b.length<2)return!1;let c=0,d=0;for(let a of b){let b=s.exec(a);if(null===b)return!1;r.includes(b[1])?c+=1:d+=1}return c>0&&d>0}let u=/\besc\s+to\s+interrupt\b|^[^\S\n]*✻[^\S\n]+\S/im;function v(a){let b=C(a);return null!==b&&b.numbers.every((a,b)=>a===b+1)&&1===b.cursorCount?{ruleLineIndex:b.ruleLineIndex,firstLineIndex:b.firstLineIndex,lastLineIndex:b.lastLineIndex,tabLineIndex:b.tabLineIndex,cursorLineIndex:b.cursorLineIndex,cursorOnOptionRow:b.cursorOnOptionRow,optionCount:b.numbers.length}:null}function w(a){return null!==C(a)}let x=/^[^\S\n]*(?:\u276F[^\S\n]*)?1[.)][^\S\n]+Submit[^\S\n]*$/im,y=/^[^\S\n]*(?:\u276F[^\S\n]*)?2[.)][^\S\n]+Cancel[^\S\n]*$/im,z=/^[^\S\n]*\u2190[^\S\n]+to[^\S\n]+go[^\S\n]+back[^\S\n]+and[^\S\n]+edit[^\S\n]*$/im,A=/have\s+not\s+answered\s+all\s+questions/i;function B(a){if(!a)return null;let b=a.replace(/\r\n/g,"\n").split("\n").map(d.aJ),c=b.length-1;for(;c>=0&&""===b[c].trim();)c-=1;if(c<1)return null;let e=-1;for(let a=c-1;a>=0;a-=1){let c=b[a].trim();if(!(c.length<40)&&q.test(c)){e=a;break}}if(e<0)return null;let f=b.slice(e+1,c+1),g=f.findIndex(a=>""!==a.trim());if(g<0||!t(f[g]))return null;let h=f.join("\n");if(!x.test(h)||!y.test(h)||!z.test(h))return null;let i=f.find(a=>x.test(a));return{hasUnansweredWarning:A.test(h),cursorOnSubmit:void 0!==i&&i.includes("❯")}}function C(a){if(!a)return null;let b=a.replace(/\r\n/g,"\n").split("\n").map(d.aJ),c=b.length-1;for(;c>=0&&""===b[c].trim();)c-=1;if(c<1)return null;let i=-1;for(let a=c-1;a>=0;a-=1){let c=b[a].trim();if(!(c.length<40)&&q.test(c)){i=a;break}}if(i<0)return null;let j=b.slice(i+1,c+1),k=j.join("\n");if(f.test(k)||g.test(k)||h.test(k)||u.test(k))return null;let l=j.findIndex(a=>""!==a.trim());if(l<0||!t(j[l]))return null;let m=[],n=-1;for(let a=l+1;a<j.length;a+=1){let b=e.exec(j[a]);null!==b&&(n<0&&(n=a),m.push(Number(b[1])))}if(m.length<2||!j.slice(l+1,n).some(a=>""!==a.trim()))return null;let o=0,p=-1,r=!1;for(let a=0;a<j.length;a+=1){let b=j[a].split("❯").length-1;0!==b&&(o+=b,p=a,r=e.test(j[a]))}return 0===o?null:{ruleLineIndex:i,firstLineIndex:i+1,lastLineIndex:c,tabLineIndex:i+1+l,numbers:m,cursorCount:o,cursorLineIndex:i+1+p,cursorOnOptionRow:r}}},95595:(a,b,c)=>{c.d(b,{WC:()=>k,f8:()=>j,gv:()=>d.g,ug:()=>h});var d=c(37717),e=c(74258),f=c(57010),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.z)(a),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:()=>p});var d=c(51297),e=c(69119),f=c(91478),g=c(682);let h=/❯[^\S\n]*(\d{1,2})[.)]/,i=/^[^\S\n]*type\s+something\b/i,j=/^\[[ xX\u2714]\]\s/,k=/^\[[xX\u2714]\]\s/,l=/^[^\S\n]*(?:\u276F[^\S\n]*)?(?:Submit|Next)[^\S\n]*$/,m=/^[^\S\n]*Enter\s+to\s+select\b.*\|.*\bEsc\s+to\s+cancel[^\S\n]*$/i;function n(a){let b=a.split("\n"),c=(b.length>200?b.slice(-200):b).join("\n");return c.length>5e3?c.slice(-5e3):c}function o(a){return{kind:"unsupported",reason:a}}function p(a){if(!a)return{kind:"none"};if(null!==(0,f.uG)(a))return o("review-page");let b=(0,f.Dk)(a);if(null===b)return(0,f.f_)(a)?o("numbering-unreadable"):{kind:"none"};if(!b.cursorOnOptionRow)return o("cursor-outside-options");let c=a.replace(/\r\n/g,"\n").split("\n").map(d.aJ).slice(b.firstLineIndex,b.lastLineIndex+1);if(c.length>60)return o("region-too-tall");let p=b.tabLineIndex-b.firstLineIndex,q=(0,g.c)(c,c.length,12);if(null===q)return o("option-block-unreadable");let r=[...q.options],s=""===q.footer?[]:q.footer.split("\n"),t=s.some(a=>l.test(a)),u=s.filter(a=>!l.test(a)&&!m.test(a));if(u.length>0){let a=r.length-1;r[a]=[r[a],...u].join(" ").trim()}if(r.length!==b.optionCount)return o("option-count-mismatch");let v=r.some(a=>j.test(a));if(v&&!t)return o("multi-select");let w=c[b.cursorLineIndex-b.firstLineIndex]??"",x=h.exec(w);if(q.selectedIndex<0||"❯"!==q.selectedGlyph||null===x||Number(x[1])!==q.selectedIndex+1)return o("default-unresolved");let y=c.slice(p+1,q.firstRow).map(a=>a.trim()).filter(a=>""!==a);if(0===y.length)return o("question-missing");let z=y.join(" "),A=(0,e.ZH)(c,p+1,c.length),B=r.map((a,b)=>({number:b+1,label:v?a.replace(j,""):a,isDefault:b===q.selectedIndex,...v?{checked:k.test(a)}:{}})),C=(0,e.xe)(z,B,{instructionText:A,approvalTarget:A},c.join("\n"),n,"answer_only",!0),D=C.promptData;return void 0===D||"multiple_choice"!==D.type?o("option-block-unreadable"):{kind:"prompt",region:b,prompt:{...C,promptData:{...D,...v?{multiSelect:!0}:{},options:D.options.map((a,b)=>{let c=B[b]?.checked,d=void 0===c?a:{...a,checked:c};return!0===a.requiresTextInput||i.test(a.label)?{...d,requiresTextInput:!0}:d})}}}}}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=7004,exports.ids=[7004],exports.modules={12894:(a,b,c)=>{c.d(b,{o:()=>d});function d(a){return a?a.split("/").map(encodeURIComponent).join("/"):""}},63156:(a,b,c)=>{c.d(b,{l:()=>e});let d=/\x1b\[[0-9;]*[a-zA-Z]|\x1b\][^\x07]*\x07|\[[0-9;]*m/g;async function e(a){if(!a||0===a.trim().length)return;let b=a.replace(d,"");if(navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(b);return}catch{}let c=document.createElement("textarea");c.value=b,c.style.position="fixed",c.style.left="-9999px",c.style.top="-9999px",c.style.opacity="0",document.body.appendChild(c),c.focus(),c.select();try{document.execCommand("copy")}finally{document.body.removeChild(c)}}},82620:(a,b,c)=>{c.d(b,{WU:()=>f,d3:()=>g,dj:()=>e,uO:()=>h});var d=c(46831);function e(a){return a.startsWith("#")?"anchor":a.startsWith("http://")||a.startsWith("https://")||a.startsWith("mailto:")||a.startsWith("tel:")?"external":"relative"}function f(a,b){if(!b)return null;let c=a.substring(0,a.lastIndexOf("/")+1);try{let a=new URL(c,"file:///"),d=new URL(b,a),e=decodeURIComponent(d.pathname);if(e.startsWith("/")){let a=e.substring(1);if(a.length>0)return a}}catch{}return null}function g(a){return!a||0===a.length||a.length>2048||/[\x00-\x1f\x7f]/.test(a)?null:a}let h={...d.j,attributes:{...d.j.attributes,a:[...(d.j.attributes?.a??[]).filter(a=>"href"!==a),["href",/^(?:#|mailto:|tel:|https?:\/\/|(?![a-zA-Z][a-zA-Z0-9+.-]*:))/]],img:[...(d.j.attributes?.img??[]).filter(a=>"src"!==a),["src",/^(?:https?:\/\/|(?![a-zA-Z][a-zA-Z0-9+.-]*:))/],"alt","width","height"]}}},88033:(a,b,c)=>{c.d(b,{eT:()=>j});var d=c(18954);let e=["**","__"],f=/^https?:\/\/./i;function g(a){return"object"==typeof a&&null!==a&&"string"==typeof a.type}function h(a,b){let c=a.position;if(!c)return null;let d=c.start?.offset,e=c.end?.offset;return"number"!=typeof d||"number"!=typeof e||!Number.isInteger(d)||!Number.isInteger(e)||d<0||e<d||e>b.length?null:{start:d,end:e}}function i(a,b){return{line:a.line,column:a.column+b,offset:(a.offset??0)+b}}let j=Object.freeze([d.A,function(){return function(a,b){let c=function(a){if("string"==typeof a)return a;if("object"==typeof a&&null!==a){let b=a.value;if("string"==typeof b)return b}return null}(b);null!==c&&g(a)&&function a(b,c){let d=Array.isArray(b.children)?b:null;if(d)for(let b of(!function(a,b){let c=a.children;for(let a=0;a<c.length;a+=1){let d=c[a];if(!g(d)||!function(a,b){if("link"!==a.type||null!==a.title&&void 0!==a.title)return!1;let c=a.url;if("string"!=typeof c||!f.test(c))return!1;let d=h(a,b);if(!d||b.slice(d.start,d.end)!==c)return!1;let e=a.children;if(!Array.isArray(e)||1!==e.length)return!1;let i=e[0];if(!g(i)||"text"!==i.type||i.value!==c)return!1;let j=h(i,b);return null!==j&&j.start===d.start&&j.end===d.end}(d,b))continue;let j=function(a){let b=function(a){for(let b=0;b<a.length;b+=1)if("()、。「」【】".includes(a[b]))return b;return -1}(a);if(b<=0)return null;let c=a.slice(0,b),d=e.find(a=>c.endsWith(a)),g=d?b-d.length:b;if(g<=0)return null;let h=a.slice(0,g);return f.test(h)?{keptUrl:h,tailText:a.slice(g),tailOffset:g,delimiter:d??null}:null}(d.url);if(!j)continue;let k=h(d,b),l=d.position?.start,m=d.position?.end;if(!k||!l||!m)continue;let n=null!==j.delimiter&&function(a,b,c,d){if(!a||"text"!==a.type||"string"!=typeof a.value||!a.value.endsWith(b))return!1;let e=h(a,d);if(!e||e.end!==c)return!1;let f=d.slice(e.start,e.end);if(!f.endsWith(b))return!1;let g=f.length-b.length-1;return g<0||"\\"!==f[g]}(c[a-1],j.delimiter,k.start,b),o=n?j.tailText.slice(j.delimiter?.length??0):j.tailText,p=n?j.tailOffset+(j.delimiter?.length??0):j.tailOffset,q=i(l,j.keptUrl.length);d.url=j.keptUrl;let r=d.children?.[0];r&&(r.value=j.keptUrl,r.position={start:{...l},end:{...q}}),d.position={start:{...l},end:q};let s={type:"text",value:o,position:{start:i(l,p),end:{...m}}};if(n&&j.delimiter){let b=c[a-1],e=i(l,-j.delimiter.length),f={type:"strong",children:[d],position:{start:e,end:i(l,p)}},g=b.value.slice(0,-j.delimiter.length);0===g.length?(c.splice(a-1,1),a-=1):(b.value=g,b.position&&(b.position={...b.position,end:e})),c[a]=f}c.splice(a+1,0,s),a+=1}}(d,c),d.children))g(b)&&a(b,c)}(a,c)}}])},90349:(a,b,c)=>{c.d(b,{I:()=>d,k:()=>e});let d="skill:installed";function e(a){}}};