commandmate 0.17.0 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (264) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +120 -120
  3. package/.next/app-path-routes-manifest.json +19 -19
  4. package/.next/build-manifest.json +2 -2
  5. package/.next/prerender-manifest.json +12 -12
  6. package/.next/required-server-files.json +1 -1
  7. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  8. package/.next/server/app/api/app/update/route_client-reference-manifest.js +1 -1
  9. package/.next/server/app/api/app/update-check/route.js +1 -1
  10. package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
  11. package/.next/server/app/api/assistant/conversation/route_client-reference-manifest.js +1 -1
  12. package/.next/server/app/api/assistant/current-output/route_client-reference-manifest.js +1 -1
  13. package/.next/server/app/api/assistant/messages/route_client-reference-manifest.js +1 -1
  14. package/.next/server/app/api/assistant/session/route_client-reference-manifest.js +1 -1
  15. package/.next/server/app/api/assistant/start/route_client-reference-manifest.js +1 -1
  16. package/.next/server/app/api/assistant/terminal/route_client-reference-manifest.js +1 -1
  17. package/.next/server/app/api/assistant/tools/route_client-reference-manifest.js +1 -1
  18. package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  19. package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  20. package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  21. package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +1 -1
  22. package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
  23. package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
  24. package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
  25. package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
  26. package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -1
  27. package/.next/server/app/api/fs/recent-paths/route_client-reference-manifest.js +1 -1
  28. package/.next/server/app/api/hooks/agent-event/route_client-reference-manifest.js +1 -1
  29. package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
  30. package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -1
  31. package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
  32. package/.next/server/app/api/push/subscriptions/route.js +1 -1
  33. package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
  34. package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
  35. package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
  36. package/.next/server/app/api/repositories/[id]/todos/[todoId]/route.js +1 -1
  37. package/.next/server/app/api/repositories/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  38. package/.next/server/app/api/repositories/[id]/todos/route.js +1 -1
  39. package/.next/server/app/api/repositories/[id]/todos/route_client-reference-manifest.js +1 -1
  40. package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
  41. package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
  42. package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
  43. package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
  44. package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
  45. package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
  46. package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
  47. package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
  48. package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
  49. package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
  50. package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
  51. package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
  52. package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
  53. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  54. package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
  55. package/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
  56. package/.next/server/app/api/tasks/[taskId]/route.js +1 -1
  57. package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
  58. package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
  59. package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
  60. package/.next/server/app/api/todos/route.js +1 -1
  61. package/.next/server/app/api/todos/route_client-reference-manifest.js +1 -1
  62. package/.next/server/app/api/verification/runs/[runId]/route.js +1 -1
  63. package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -1
  64. package/.next/server/app/api/verification/runs/route.js +1 -1
  65. package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -1
  66. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
  67. package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
  68. package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
  69. package/.next/server/app/api/worktrees/[id]/cli-tool/route.js +1 -1
  70. package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
  71. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js +1 -1
  72. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
  73. package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
  74. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route.js +1 -1
  75. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
  76. package/.next/server/app/api/worktrees/[id]/execution-logs/route.js +1 -1
  77. package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
  78. package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
  79. package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
  80. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
  81. package/.next/server/app/api/worktrees/[id]/git/branches/route.js +1 -1
  82. package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
  83. package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
  84. package/.next/server/app/api/worktrees/[id]/git/commit/route.js +1 -1
  85. package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
  86. package/.next/server/app/api/worktrees/[id]/git/diff/route.js +1 -1
  87. package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
  88. package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
  89. package/.next/server/app/api/worktrees/[id]/git/log/route.js +1 -1
  90. package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
  91. package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
  92. package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
  93. package/.next/server/app/api/worktrees/[id]/git/reset/route.js +1 -1
  94. package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
  95. package/.next/server/app/api/worktrees/[id]/git/revert/route.js +1 -1
  96. package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
  97. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route.js +1 -1
  98. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
  99. package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
  100. package/.next/server/app/api/worktrees/[id]/git/staged/route.js +1 -1
  101. package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
  102. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
  103. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
  104. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
  105. package/.next/server/app/api/worktrees/[id]/git/stash/push/route.js +1 -1
  106. package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
  107. package/.next/server/app/api/worktrees/[id]/git/stash/route.js +1 -1
  108. package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
  109. package/.next/server/app/api/worktrees/[id]/git/status/route.js +1 -1
  110. package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
  111. package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
  112. package/.next/server/app/api/worktrees/[id]/git/working-diff/route.js +1 -1
  113. package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
  114. package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
  115. package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
  116. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route.js +1 -1
  117. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
  118. package/.next/server/app/api/worktrees/[id]/logs/route.js +1 -1
  119. package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
  120. package/.next/server/app/api/worktrees/[id]/marp-render/route.js +1 -1
  121. package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
  122. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route.js +1 -1
  123. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
  124. package/.next/server/app/api/worktrees/[id]/memos/route.js +1 -1
  125. package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
  126. package/.next/server/app/api/worktrees/[id]/messages/route.js +1 -1
  127. package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
  128. package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
  129. package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
  130. package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
  131. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js +1 -1
  132. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
  133. package/.next/server/app/api/worktrees/[id]/schedules/active/route.js +1 -1
  134. package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
  135. package/.next/server/app/api/worktrees/[id]/schedules/route.js +1 -1
  136. package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
  137. package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
  138. package/.next/server/app/api/worktrees/[id]/send/route.js +1 -1
  139. package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
  140. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
  141. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
  142. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
  143. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
  144. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
  145. package/.next/server/app/api/worktrees/[id]/skills/route.js +1 -1
  146. package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
  147. package/.next/server/app/api/worktrees/[id]/slash-commands/route.js +1 -1
  148. package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
  149. package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
  150. package/.next/server/app/api/worktrees/[id]/start-polling/route_client-reference-manifest.js +1 -1
  151. package/.next/server/app/api/worktrees/[id]/tasks/route.js +2 -2
  152. package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -1
  153. package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
  154. package/.next/server/app/api/worktrees/[id]/timers/history/route.js +1 -1
  155. package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
  156. package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
  157. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route.js +1 -1
  158. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  159. package/.next/server/app/api/worktrees/[id]/todos/route.js +1 -1
  160. package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
  161. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route.js +1 -1
  162. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
  163. package/.next/server/app/api/worktrees/[id]/tree/route.js +1 -1
  164. package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
  165. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
  166. package/.next/server/app/api/worktrees/[id]/verify/route.js +1 -1
  167. package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -1
  168. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route.js +1 -1
  169. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -1
  170. package/.next/server/app/api/worktrees/[id]/verify/runs/route.js +1 -1
  171. package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -1
  172. package/.next/server/app/api/worktrees/[id]/viewed/route.js +1 -1
  173. package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
  174. package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
  175. package/.next/server/app/chat/page_client-reference-manifest.js +1 -1
  176. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  177. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  178. package/.next/server/app/more/page_client-reference-manifest.js +1 -1
  179. package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  180. package/.next/server/app/page_client-reference-manifest.js +1 -1
  181. package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
  182. package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
  183. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  184. package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  185. package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
  186. package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
  187. package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  188. package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
  189. package/.next/server/app/worktrees/[id]/page.js +1 -1
  190. package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
  191. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
  192. package/.next/server/app-paths-manifest.json +19 -19
  193. package/.next/server/chunks/1117.js +1 -1
  194. package/.next/server/chunks/3042.js +1 -1
  195. package/.next/server/chunks/3753.js +19 -23
  196. package/.next/server/chunks/5959.js +3 -3
  197. package/.next/server/chunks/6130.js +1 -1
  198. package/.next/server/chunks/6274.js +10 -9
  199. package/.next/server/chunks/6283.js +1 -1
  200. package/.next/server/chunks/8681.js +1 -1
  201. package/.next/server/chunks/8807.js +492 -485
  202. package/.next/server/chunks/8856.js +1 -1
  203. package/.next/server/middleware-manifest.json +5 -5
  204. package/.next/server/pages/500.html +1 -1
  205. package/.next/server/server-reference-manifest.json +1 -1
  206. package/.next/static/chunks/{6488-f4e447464c9e0e22.js → 6488-2c412c29258637b6.js} +1 -1
  207. package/.next/static/chunks/app/worktrees/[id]/{page-5ffc84094830babb.js → page-f6e09d25cd3b56f9.js} +1 -1
  208. package/.next/trace +12 -12
  209. package/dist/cli/commands/auto-yes.d.ts.map +1 -1
  210. package/dist/cli/commands/auto-yes.js +9 -2
  211. package/dist/cli/commands/capture.d.ts +1 -0
  212. package/dist/cli/commands/capture.d.ts.map +1 -1
  213. package/dist/cli/commands/capture.js +112 -2
  214. package/dist/cli/commands/instances.d.ts +24 -0
  215. package/dist/cli/commands/instances.d.ts.map +1 -1
  216. package/dist/cli/commands/instances.js +44 -0
  217. package/dist/cli/commands/respond.d.ts.map +1 -1
  218. package/dist/cli/commands/respond.js +10 -2
  219. package/dist/cli/commands/send.d.ts.map +1 -1
  220. package/dist/cli/commands/send.js +47 -19
  221. package/dist/cli/commands/wait.d.ts +4 -1
  222. package/dist/cli/commands/wait.d.ts.map +1 -1
  223. package/dist/cli/commands/wait.js +134 -10
  224. package/dist/cli/types/api-responses.d.ts +10 -0
  225. package/dist/cli/types/api-responses.d.ts.map +1 -1
  226. package/dist/cli/types/index.d.ts +16 -0
  227. package/dist/cli/types/index.d.ts.map +1 -1
  228. package/dist/cli/utils/pager.d.ts +28 -0
  229. package/dist/cli/utils/pager.d.ts.map +1 -0
  230. package/dist/cli/utils/pager.js +57 -0
  231. package/dist/cli/utils/verify-runner.d.ts +6 -0
  232. package/dist/cli/utils/verify-runner.d.ts.map +1 -1
  233. package/dist/cli/utils/verify-runner.js +1 -0
  234. package/dist/lib/detection/ansi.d.ts +30 -0
  235. package/dist/lib/detection/ansi.d.ts.map +1 -0
  236. package/dist/lib/detection/ansi.js +39 -0
  237. package/dist/lib/tmux/transcript-squeeze.d.ts +76 -0
  238. package/dist/lib/tmux/transcript-squeeze.d.ts.map +1 -0
  239. package/dist/lib/tmux/transcript-squeeze.js +96 -0
  240. package/dist/server/server.js +18 -0
  241. package/dist/server/src/config/tmux-pane-config.js +33 -1
  242. package/dist/server/src/lib/cli-tools/antigravity.js +2 -1
  243. package/dist/server/src/lib/cli-tools/codex.js +3 -2
  244. package/dist/server/src/lib/cli-tools/copilot.js +2 -2
  245. package/dist/server/src/lib/cli-tools/gemini.js +2 -2
  246. package/dist/server/src/lib/cli-tools/opencode.js +2 -2
  247. package/dist/server/src/lib/cli-tools/vibe-local.js +2 -2
  248. package/dist/server/src/lib/db/agent-instances-db.js +53 -0
  249. package/dist/server/src/lib/db/migrations/index.js +2 -0
  250. package/dist/server/src/lib/db/migrations/runner.js +1 -1
  251. package/dist/server/src/lib/db/migrations/v52-orphaned-worktree-children.js +76 -0
  252. package/dist/server/src/lib/db/migrations/worktree-child-tables.js +119 -0
  253. package/dist/server/src/lib/db/tasks-db.js +46 -1
  254. package/dist/server/src/lib/db/verification-db.js +21 -3
  255. package/dist/server/src/lib/db/worktree-db.js +65 -42
  256. package/dist/server/src/lib/detection/cli-patterns.js +24 -1
  257. package/dist/server/src/lib/detection/status-detector.js +52 -2
  258. package/dist/server/src/lib/session/claude-session.js +4 -2
  259. package/dist/server/src/lib/tmux/read-mode-pager.js +161 -0
  260. package/dist/server/src/lib/tmux/read-mode.js +327 -0
  261. package/dist/server/src/lib/tmux/tmux.js +43 -5
  262. package/package.json +1 -1
  263. /package/.next/static/{gR8Sh86RrTynJON8SWkWK → -E7I667pJDTBamyG8M_Z-}/_buildManifest.js +0 -0
  264. /package/.next/static/{gR8Sh86RrTynJON8SWkWK → -E7I667pJDTBamyG8M_Z-}/_ssgManifest.js +0 -0
@@ -1,13 +1,14 @@
1
1
  "use strict";exports.id=6274,exports.ids=[6274],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}},11501:(a,b,c)=>{c.d(b,{Ky:()=>g,RR:()=>h,ct:()=>i});var d=c(90384);let e=`${d.uz}(commit または未 commit の変更が存在すること)`,f=`${d.le}(変更ファイルが scope.allow の内側に収まっていること)`;function g(a){let b=a.verify.gates;if(!b)return null;let c=[[d.uz,a.success.requireWorkEvidence],[d.le,a.success.requireScopeClean]];return[...c.filter(([a,c])=>c||b.includes(a)).map(([a])=>a),...b.filter(a=>!c.some(([b])=>b===a))]}function h(a,b){let c=a.verify.gates;if(!c)return[];if(!b)return[`verify.gates: declared ${c.join(", ")}, but ${d.aT} is missing or unreadable in this worktree, so the gate ids cannot be resolved`];let e=new Set([d.uz,d.le,...b.gates.map(a=>a.id)]),f=c.filter(a=>!e.has(a));return 0===f.length?[]:[`verify.gates: unknown gate id(s) ${f.join(", ")}. Declared in ${d.aT}: ${[...e].join(", ")}`]}function i(a,b){let c=["## 実行契約"];c.push(a.scope.allow.length>0?`- 変更してよいのは次のパスのみ: ${a.scope.allow.join(", ")}`:"- 変更パスの制限: なし(scope.allow が未宣言)"),a.scope.deny.length>0&&c.push(`- 変更してはならないパス: ${a.scope.deny.join(", ")}`),c.push("- 作業完了後は必ず commit すること(未 commit の作業は未完了とみなされる)");let h=function(a,b){if(!b)return[];let c=new Map([[d.uz,e],[d.le,f]]),h=g(a);if(!h){let c=[e];return a.success.requireScopeClean&&c.push(f),[...c,...b.gates.map(a=>a.command)]}let i=new Map(b.gates.map(a=>[a.id,a.command]));return h.map(a=>c.get(a)??i.get(a))}(a,b);return c.push(h.length>0?`- 完了条件: 次の検証コマンドがすべて成功すること: ${h.join(" / ")}`:`- 完了条件: ${d.aT} に検証ゲートが宣言されていないため、検証コマンドは無い`),`${c.join("\n")}
2
2
 
3
3
  ## タスク
4
- ${a.goal}`}},76274:(a,b,c)=>{c.d(b,{Wb:()=>x,AT:()=>H});var d=c(79646),e=c(29021),f=c(88807),g=c(56791),h=c(2412),i=c(72626),j=c(11501),k=c(2924);let l=".commandmate/tasks/";function m(a){return a.startsWith(l)}function n(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}(?:/.*)?$`)}class o{constructor(a,b=null){this.contractPath=b,this.allow=a.allow.map(n),this.deny=a.deny.map(n)}isViolation(a){return!!this.deny.some(b=>b.test(a))||!a.startsWith(".commandmate/")&&a!==this.contractPath&&!this.allow.some(b=>b.test(a))}}function p(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 q(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 r(a,b){let c=await p(["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()?`
5
- ${c.stderr.trim()}`:"")};let d=c.stdout.trim(),e=await p(["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()?`
6
- ${e.stderr.trim()}`:"")};let f=await p(["status","--porcelain","-z","--untracked-files=all"],a);return 0!==f.code?{error:"'git status --porcelain' failed."+(f.stderr.trim()?`
7
- ${f.stderr.trim()}`:"")}:{paths:[...new Set([...e.stdout.split("\0").filter(a=>""!==a),...q(f.stdout).flat()].filter(a=>!m(a)))].sort(),mergeBase:d}}function s(a){return a.length>0?a.join(", "):"(none)"}async function t(a,b,c,d,e=null){let f=Date.now(),g=(a,b,c)=>({status:a,exitCode:c,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 r(a,d);if("error"in h)return g("error",`scope: ${h.error}`,null);let i=new o(b,e),j=h.paths.filter(a=>i.isViolation(a)),k=`scope: baseRef=${d} changed=${h.paths.length} violations=${j.length}
8
- allow: ${s(b.allow)}
9
- deny: ${s(b.deny)}`;if(0===j.length)return g("passed",k,0);let l=j.slice(0,100),m=j.length-l.length;return g("failed",[k,"out of scope:",...l.map(a=>` - ${a}`),...m>0?[` ... and ${m} more`]:[]].join("\n"),1)}var u=c(90384);let v=(0,i.h)("lib/verification/gate-runner"),w="git diff --name-only / status --porcelain \xd7 contract scope";class x 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 y=0,z=[],A=new Map;class B{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 C(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 D(a,b){let c=Date.now(),d=(a,b,d)=>({status:a,exitCode:d,durationMs:Date.now()-c,logTail:b});if(!b)return d("error",`work-evidence: no base ref. Set options.baseRef in ${u.aT}; origin/HEAD did not resolve a default branch.`,null);let e=await C(["merge-base",b,"HEAD"],a);if(0!==e.code||""===e.stdout.trim())return d("error",`work-evidence: 'git merge-base ${b} HEAD' failed; base ref is unreachable from this worktree.`,null);let f=e.stdout.trim(),g=await C(["rev-list","--count",`${f}..HEAD`,"--",":(top)",`:(exclude,top)${l}`],a);if(0!==g.code)return d("error",`work-evidence: 'git rev-list --count ${f}..HEAD' failed.`,null);let h=Number.parseInt(g.stdout.trim(),10),i=await C(["status","--porcelain","-z","--untracked-files=all"],a);if(0!==i.code)return d("error","work-evidence: 'git status --porcelain' failed.",null);let j=q(i.stdout).filter(a=>a.some(a=>!m(a))).length,k=`work-evidence: baseRef=${b} commits=${h} uncommitted=${j} (contract files excluded)`;return Number.isFinite(h)&&(0!==h||0!==j)?d("passed",k,0):d("failed",`${k}
10
- No commits and no uncommitted changes: nothing to verify.`,1)}async function E(a,b){if(a.options.baseRef)return a.options.baseRef;let c=await (0,h.tR)(b);return c?`origin/${c}`:null}async function F(a,b,c,f,h,i,j){let{maxLogTailBytes:k,skipInPrimaryCheckout:l}=f.options,{runWorkEvidence:m,gates:n}=h,o=(c,d,e)=>{let f=(0,g.hlF)(a,b,{gateId:c,command:d});return(0,g.C81)(a,f.id,{status:e.status,exitCode:e.exitCode,durationMs:e.durationMs,logTail:e.logTail}),e.status},p=[];if(m){let a=await D(c,i);if(o(u.uz,"git merge-base / rev-list / status --porcelain (excluding contract files)",a),"passed"!==a.status){let b=`skipped: the ${u.uz} gate did not pass.`;for(let a of("off"!==h.scope&&o(u.le,w,{status:"skipped",exitCode:null,durationMs:0,logTail:b}),n))o(a.id,a.command,{status:"skipped",exitCode:null,durationMs:0,logTail:b});return"failed"===a.status?"not_started":"error"}p.push(a.status)}if("off"!==h.scope){let a=await t(c,j?.contract.scope??null,j?.contract.success.requireScopeClean??!1,i,j?.contractPath??null);o(u.le,w,a),("skipped"!==a.status||"explicit"===h.scope)&&p.push(a.status)}let q=l&&function(a,b){try{return(0,e.realpathSync)(a)===(0,e.realpathSync)(b)}catch{return!1}}(c,process.cwd());for(let a of n){if(q){p.push(o(a.id,a.command,{status:"skipped",exitCode:null,durationMs:0,logTail:"skipped: worktreePath is the server process working directory and options.skipInPrimaryCheckout is true."}));continue}let b=await function(a,b,c,e){return new Promise(f=>{let g,h=Date.now(),i=new B(e),j=!1,k=!1,l=(0,d.spawn)(a,{shell:!0,cwd:b,env:{...process.env,CI:"true"},detached:!0,stdio:["ignore","pipe","pipe"]});l.stdout?.on("data",a=>i.append(a)),l.stderr?.on("data",a=>i.append(a));let m=a=>{if(void 0!==l.pid)try{process.kill(-l.pid,a)}catch{try{l.kill(a)}catch{}}},n=a=>{j||(j=!0,clearTimeout(o),g&&clearTimeout(g),f({...a,durationMs:Date.now()-h}))},o=setTimeout(()=>{k=!0,m("SIGTERM"),g=setTimeout(()=>m("SIGKILL"),5e3),g.unref?.()},1e3*c);o.unref?.(),l.on("error",a=>{n({status:"error",exitCode:null,logTail:`${i.toString()}
4
+ ${a.goal}`}},76274:(a,b,c)=>{c.d(b,{Wb:()=>y,AT:()=>I});var d=c(79646),e=c(29021),f=c(88807),g=c(56791),h=c(48524),i=c(2412),j=c(72626),k=c(11501),l=c(2924);let m=".commandmate/tasks/";function n(a){return a.startsWith(m)}function o(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}(?:/.*)?$`)}class p{constructor(a,b=null){this.contractPath=b,this.allow=a.allow.map(o),this.deny=a.deny.map(o)}isViolation(a){return!!this.deny.some(b=>b.test(a))||!a.startsWith(".commandmate/")&&a!==this.contractPath&&!this.allow.some(b=>b.test(a))}}function q(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 r(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 s(a,b){let c=await q(["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()?`
5
+ ${c.stderr.trim()}`:"")};let d=c.stdout.trim(),e=await q(["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()?`
6
+ ${e.stderr.trim()}`:"")};let f=await q(["status","--porcelain","-z","--untracked-files=all"],a);return 0!==f.code?{error:"'git status --porcelain' failed."+(f.stderr.trim()?`
7
+ ${f.stderr.trim()}`:"")}:{paths:[...new Set([...e.stdout.split("\0").filter(a=>""!==a),...r(f.stdout).flat()].filter(a=>!n(a)))].sort(),mergeBase:d}}function t(a){return a.length>0?a.join(", "):"(none)"}async function u(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 s(a,d);if("error"in h)return g("error",`scope: ${h.error}`,null);let i=new p(b,e),j=h.paths.filter(a=>i.isViolation(a)),k=`scope: baseRef=${d} changed=${h.paths.length} violations=${j.length}
8
+ allow: ${t(b.allow)}
9
+ deny: ${t(b.deny)}`;if(0===j.length)return g("passed",k,0);let l=j.slice(0,100),m=j.length-l.length;return g("failed",[k,"out of scope:",...l.map(a=>` - ${a}`),...m>0?[` ... and ${m} more`]:[]].join("\n"),1)}var v=c(90384);let w=(0,j.h)("lib/verification/gate-runner"),x="git diff --name-only / status --porcelain \xd7 contract scope";class y 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 z=0,A=[],B=new Map;class C{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 D(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 E(a,b,c=!1){let d=Date.now(),e=(a,b,c)=>({status:a,exitCode:c,startedAt:d,durationMs:Date.now()-d,logTail:b});if(!b)return e("error",`work-evidence: no base ref. Set options.baseRef in ${v.aT}; origin/HEAD did not resolve a default branch.`,null);let f=await D(["merge-base",b,"HEAD"],a);if(0!==f.code||""===f.stdout.trim())return e("error",`work-evidence: 'git merge-base ${b} HEAD' failed; base ref is unreachable from this worktree.`,null);let g=f.stdout.trim(),h=await D(["rev-list","--count",`${g}..HEAD`,"--",":(top)",`:(exclude,top)${m}`],a);if(0!==h.code)return e("error",`work-evidence: 'git rev-list --count ${g}..HEAD' failed.`,null);let i=Number.parseInt(h.stdout.trim(),10),j=await D(["status","--porcelain","-z","--untracked-files=all"],a);if(0!==j.code)return e("error","work-evidence: 'git status --porcelain' failed.",null);let k=r(j.stdout).filter(a=>a.some(a=>!n(a))).length,l=`work-evidence: baseRef=${b} commits=${i} uncommitted=${k}`+(c?" requireCommit=true":"")+" (contract files excluded)";return Number.isFinite(i)&&(0!==i||0!==k)?c&&0===i?e("failed",`${l}
10
+ options.requireCommit is set: uncommitted changes are not work evidence, commit them.`,1):e("passed",l,0):e("failed",`${l}
11
+ No commits and no uncommitted changes: nothing to verify.`,1)}async function F(a,b){if(a.options.baseRef)return a.options.baseRef;let c=await (0,i.tR)(b);return c?`origin/${c}`:null}async function G(a,b,c,f,h,i,j,k){var l,m;let{maxLogTailBytes:n,skipInPrimaryCheckout:o,requireCommit:p}=f.options,{runWorkEvidence:q,gates:r}=h,s=(b,c)=>((0,g.C81)(a,b,{status:c.status,exitCode:c.exitCode,durationMs:c.durationMs,logTail:c.logTail,executionWindow:{startedAt:c.startedAt,finishedAt:c.startedAt+c.durationMs}}),c),t=async(c,d,e)=>s((0,g.hlF)(a,b,{gateId:c,command:d}).id,await e()),w=(c,d,e)=>{let f={status:"skipped",exitCode:null,startedAt:Date.now(),durationMs:0,logTail:e};return s((0,g.hlF)(a,b,{gateId:c,command:d}).id,f)},y=[];if(q){let a=await t(v.uz,"git merge-base / rev-list / status --porcelain (excluding contract files)",()=>E(c,i,p));if("passed"!==a.status){let b=`skipped: the ${v.uz} gate did not pass.`;for(let a of("off"!==h.scope&&w(v.le,x,b),r))w(a.id,a.command,b);return"failed"===a.status?"not_started":"error"}y.push(a.status)}if("off"!==h.scope){let a=k?w(v.le,x,(l=k.id,m=k.status,`scope: task ${l} declares a scope for this worktree, but it is ${m} 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 t(v.le,x,()=>u(c,j?.contract.scope??null,j?.contract.success.requireScopeClean??!1,i,j?.contractPath??null)),b="explicit"===h.scope||null!==k;("skipped"!==a.status||b)&&y.push(a.status)}let z=o&&function(a,b){try{return(0,e.realpathSync)(a)===(0,e.realpathSync)(b)}catch{return!1}}(c,process.cwd());for(let a of r){if(z){y.push(w(a.id,a.command,"skipped: worktreePath is the server process working directory and options.skipInPrimaryCheckout is true.").status);continue}let b=await t(a.id,a.command,()=>(function(a,b,c,e){return new Promise(f=>{let g,h=Date.now(),i=new C(e),j=!1,k=!1,l=(0,d.spawn)(a,{shell:!0,cwd:b,env:{...process.env,CI:"true"},detached:!0,stdio:["ignore","pipe","pipe"]});l.stdout?.on("data",a=>i.append(a)),l.stderr?.on("data",a=>i.append(a));let m=a=>{if(void 0!==l.pid)try{process.kill(-l.pid,a)}catch{try{l.kill(a)}catch{}}},n=a=>{j||(j=!0,clearTimeout(o),g&&clearTimeout(g),f({...a,startedAt:h,durationMs:Date.now()-h}))},o=setTimeout(()=>{k=!0,m("SIGTERM"),g=setTimeout(()=>m("SIGKILL"),5e3),g.unref?.()},1e3*c);o.unref?.(),l.on("error",a=>{n({status:"error",exitCode:null,logTail:`${i.toString()}
11
12
  [gate could not be spawned: ${a.message}]`.trim()})}),l.on("close",(a,b)=>{if(k)return void n({status:"timeout",exitCode:null,logTail:`${i.toString()}
12
- [gate exceeded ${c}s and was terminated (${b??"exited"})]`.trim()});n({status:0===a?"passed":"failed",exitCode:a,logTail:i.toString()||null})})})}(a.command,c,a.timeoutSec,k);p.push(o(a.id,a.command,b))}return p.some(a=>"failed"===a||"timeout"===a||"error"===a)?"failed":p.some(a=>"skipped"===a)?"error":"passed"}function G(a,b,c,d){try{(0,k.g)(a,b,c,void 0===d?void 0:{runId:d})}catch(a){v.warn("task-transition-failed",{taskId:b,event:c,error:a instanceof Error?a.message:String(a)})}}async function H(a){let b=(0,f.getDbInstance)(),c=(0,g.WZv)(b,a.worktreeId);if(c)throw new x(a.worktreeId,c.id);let d=void 0!==a.taskId?(0,g.ggW)(b,a.taskId):(0,g.__q)(b,a.worktreeId),e=a.taskId??d?.id??null,h=a.gateIds??(d?(0,j.Ky)(d.contract)??void 0:void 0),i=null,k=null;try{(i=(0,u.yR)(a.worktreePath))||(k=`${u.aT} not found in ${a.worktreePath}. Declare the repository verification gates there before running verification.`)}catch(a){k=a instanceof u.Yp?a.message:`Failed to read ${u.aT}: ${a.message}`}let l=null;if(i&&!k){let a=function(a,b){if(!b)return{runWorkEvidence:!0,scope:"implicit",gates:a.gates};let c=new Set([u.uz,u.le,...a.gates.map(a=>a.id)]),d=b.filter(a=>!c.has(a));if(d.length>0)return`Unknown gate id(s): ${d.join(", ")}. Declared gates: ${[...c].join(", ")}.`;let e=new Set(b),f={runWorkEvidence:e.has(u.uz),scope:e.has(u.le)?"explicit":"off",gates:a.gates.filter(a=>e.has(a.id))};return f.runWorkEvidence||"off"!==f.scope||0!==f.gates.length?f:"gateIds selected no gates; a run with no gates has nothing to report."}(i,h);"string"==typeof a?k=a:l=a}let m=i?await E(i,a.worktreePath):null,n=(0,g.rYZ)(b,{worktreeId:a.worktreeId,trigger:a.trigger,instanceId:a.instanceId??null,taskId:e,baseRef:m});if(!i||!l){let c=(0,g.hlF)(b,n.id,{gateId:"config",command:u.aT});return(0,g.C81)(b,c.id,{status:"error",exitCode:null,durationMs:0,logTail:k}),(0,g.u$7)(b,n.id,"error"),v.warn("verification-config-unusable",{runId:n.id,worktreeId:a.worktreeId}),d&&(G(b,d.id,"verify_started",n.id),G(b,d.id,"verify_failed",n.id)),{runId:n.id}}d&&G(b,d.id,"verify_started",n.id);let o=i,p=l,q=(async()=>{await (y<2?(y+=1,Promise.resolve()):new Promise(a=>{z.push(a)}));let c="error";try{let e=await F(b,n.id,a.worktreePath,o,p,m,d);return c=e,(0,g.u$7)(b,n.id,e),e}catch(a){v.error("verification-run-crashed",{runId:n.id,error:a instanceof Error?a.message:String(a)});try{(0,g.u$7)(b,n.id,"error")}catch{}return"error"}finally{d&&G(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),n.id),function(){let a=z.shift();if(a)return a();y-=1}(),A.delete(n.id)}})();return A.set(n.id,q),{runId:n.id}}},90384:(a,b,c)=>{c.d(b,{Yp:()=>o,aT:()=>j,le:()=>h,uz:()=>g,yR:()=>t});var d=c(29021),e=c(33873),f=c(4689);let g="work-evidence",h="scope",i=[g,h],j=".commandmate/verify.yaml",k=/^[a-z0-9][a-z0-9-]{0,31}$/,l=["version","gates","options"],m=["id","command","timeoutSec"],n=["baseRef","skipInPrimaryCheckout","maxLogTailBytes"];class o extends Error{constructor(a){super(`invalid verify config:
13
- ${a.map(a=>` - ${a}`).join("\n")}`),this.name="VerifyConfigError",this.issues=a}}function p(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}function q(a){return"number"==typeof a?Number.isInteger(a)?a:null:"string"==typeof a&&/^-?\d+$/.test(a)?Number(a):null}function r(a){return void 0===a?"nothing":null===a?"null":"string"==typeof a?JSON.stringify(a):Array.isArray(a)?"a list":"object"==typeof a?"a mapping":String(a)}function s(a,b,c,d){for(let e of Object.keys(a))b.includes(e)||d.push(`${c}: unknown key "${e}" (v1 is a closed set)`)}function t(a){let b,c,g=(0,e.join)(a,j);try{b=(0,d.readFileSync)(g,"utf8")}catch(a){if("ENOENT"===a.code)return null;throw new o([`${g}: ${a.message}`])}var h=b;try{c=(0,f.qg)(h)}catch(a){throw new o([`${g}: YAML parse error: ${a.message}`])}if(!p(c))throw new o([`${g}: expected a YAML mapping at the top level (got ${r(c)})`]);let t=[];s(c,l,"top level",t),"version"in c?1!==q(c.version)&&t.push(`version: must be 1 (got ${r(c.version)})`):t.push('version: required, v1 configs must declare "version: 1"');let u=function(a,b){if(null==a)return b.push("gates: required, at least one gate must be defined"),[];if(!Array.isArray(a))return b.push(`gates: must be a list (got ${r(a)})`),[];if(0===a.length)return b.push("gates: at least one gate must be defined"),[];let c=[],d=new Set;return a.forEach((a,e)=>{let f=`gates[${e}]`,g=b.length;if(!p(a))return void b.push(`${f}: must be a mapping (got ${r(a)})`);s(a,m,f,b),"string"!=typeof a.id||""===a.id?b.push(`${f}.id: required, must be a non-empty string (got ${r(a.id)})`):k.test(a.id)?i.includes(a.id)?b.push(`${f}.id: "${a.id}" is reserved for a built-in gate`):d.has(a.id)?b.push(`${f}.id: duplicate gate id "${a.id}"`):d.add(a.id):b.push(`${f}.id: "${a.id}" must match ${k.source}`),("string"!=typeof a.command||""===a.command.trim())&&b.push(`${f}.command: required, must be a non-empty string (got ${r(a.command)})`);let h=600;if(void 0!==a.timeoutSec){let c=q(a.timeoutSec);null===c?b.push(`${f}.timeoutSec: must be an integer (got ${r(a.timeoutSec)})`):c<1||c>7200?b.push(`${f}.timeoutSec: must be 1..7200 (got ${c})`):h=c}b.length===g&&c.push({id:a.id,command:a.command,timeoutSec:h})}),c}(c.gates,t),v=function(a,b){let c={baseRef:null,skipInPrimaryCheckout:!0,maxLogTailBytes:8192};if(null==a)return c;if(!p(a))return b.push(`options: must be a mapping (got ${r(a)})`),c;if(s(a,n,"options",b),void 0!==a.baseRef&&("string"!=typeof a.baseRef||""===a.baseRef.trim()?b.push(`options.baseRef: must be a non-empty string (got ${r(a.baseRef)})`):c.baseRef=a.baseRef),void 0!==a.skipInPrimaryCheckout){var d;let e="boolean"==typeof(d=a.skipInPrimaryCheckout)?d:"true"===d||"false"!==d&&null;null===e?b.push(`options.skipInPrimaryCheckout: must be true or false (got ${r(a.skipInPrimaryCheckout)})`):c.skipInPrimaryCheckout=e}if(void 0!==a.maxLogTailBytes){let d=q(a.maxLogTailBytes);null===d?b.push(`options.maxLogTailBytes: must be an integer (got ${r(a.maxLogTailBytes)})`):d<0||d>1048576?b.push(`options.maxLogTailBytes: must be 0..1048576 (got ${d})`):c.maxLogTailBytes=d}return c}(c.options,t);if(t.length>0)throw new o(t);return{version:1,gates:u,options:v}}}};
13
+ [gate exceeded ${c}s and was terminated (${b??"exited"})]`.trim()});n({status:0===a?"passed":"failed",exitCode:a,logTail:i.toString()||null})})})})(a.command,c,a.timeoutSec,n));y.push(b.status)}return y.some(a=>"failed"===a||"timeout"===a||"error"===a)?"failed":y.some(a=>"skipped"===a)?"error":"passed"}function H(a,b,c,d){try{(0,l.g)(a,b,c,void 0===d?void 0:{runId:d})}catch(a){w.warn("task-transition-failed",{taskId:b,event:c,error:a instanceof Error?a.message:String(a)})}}async function I(a){let b=(0,f.getDbInstance)(),c=(0,g.WZv)(b,a.worktreeId);if(c)throw new y(a.worktreeId,c.id);let d=void 0!==a.taskId?(0,g.ggW)(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.VkA)(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,k.Ky)(d.contract)??void 0:void 0),l=null,m=null;try{(l=(0,v.yR)(a.worktreePath))||(m=`${v.aT} not found in ${a.worktreePath}. Declare the repository verification gates there before running verification.`)}catch(a){m=a instanceof v.Yp?a.message:`Failed to read ${v.aT}: ${a.message}`}let n=null;if(l&&!m){let a=function(a,b){if(!b)return{runWorkEvidence:!0,scope:"implicit",gates:a.gates};let c=new Set([v.uz,v.le,...a.gates.map(a=>a.id)]),d=b.filter(a=>!c.has(a));if(d.length>0)return`Unknown gate id(s): ${d.join(", ")}. Declared gates: ${[...c].join(", ")}.`;let e=new Set(b),f={runWorkEvidence:e.has(v.uz),scope:e.has(v.le)?"explicit":"off",gates:a.gates.filter(a=>e.has(a.id))};return f.runWorkEvidence||"off"!==f.scope||0!==f.gates.length?f:"gateIds selected no gates; a run with no gates has nothing to report."}(l,j);"string"==typeof a?m=a:n=a}let o=l?await F(l,a.worktreePath):null,p=(0,g.rYZ)(b,{worktreeId:a.worktreeId,trigger:a.trigger,instanceId:a.instanceId??null,taskId:i,baseRef:o});if(!l||!n){let c=Date.now(),e=(0,g.hlF)(b,p.id,{gateId:"config",command:v.aT});return(0,g.C81)(b,e.id,{status:"error",exitCode:null,durationMs:0,logTail:m,executionWindow:{startedAt:c,finishedAt:c}}),(0,g.u$7)(b,p.id,"error"),w.warn("verification-config-unusable",{runId:p.id,worktreeId:a.worktreeId}),d&&(H(b,d.id,"verify_started",p.id),H(b,d.id,"verify_failed",p.id)),{runId:p.id}}d&&H(b,d.id,"verify_started",p.id);let q=l,r=n,s=(async()=>{await (z<2?(z+=1,Promise.resolve()):new Promise(a=>{A.push(a)}));let c="error";try{let f=await G(b,p.id,a.worktreePath,q,r,o,d,e);return c=f,(0,g.u$7)(b,p.id,f),f}catch(a){w.error("verification-run-crashed",{runId:p.id,error:a instanceof Error?a.message:String(a)});try{(0,g.u$7)(b,p.id,"error")}catch{}return"error"}finally{d&&H(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),p.id),function(){let a=A.shift();if(a)return a();z-=1}(),B.delete(p.id)}})();return B.set(p.id,s),{runId:p.id}}},90384:(a,b,c)=>{c.d(b,{Yp:()=>o,aT:()=>j,le:()=>h,uz:()=>g,yR:()=>u});var d=c(29021),e=c(33873),f=c(4689);let g="work-evidence",h="scope",i=[g,h],j=".commandmate/verify.yaml",k=/^[a-z0-9][a-z0-9-]{0,31}$/,l=["version","gates","options"],m=["id","command","timeoutSec"],n=["baseRef","skipInPrimaryCheckout","maxLogTailBytes","requireCommit"];class o extends Error{constructor(a){super(`invalid verify config:
14
+ ${a.map(a=>` - ${a}`).join("\n")}`),this.name="VerifyConfigError",this.issues=a}}function p(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}function q(a){return"number"==typeof a?Number.isInteger(a)?a:null:"string"==typeof a&&/^-?\d+$/.test(a)?Number(a):null}function r(a){return"boolean"==typeof a?a:"true"===a||"false"!==a&&null}function s(a){return void 0===a?"nothing":null===a?"null":"string"==typeof a?JSON.stringify(a):Array.isArray(a)?"a list":"object"==typeof a?"a mapping":String(a)}function t(a,b,c,d){for(let e of Object.keys(a))b.includes(e)||d.push(`${c}: unknown key "${e}" (v1 is a closed set)`)}function u(a){let b,c,g=(0,e.join)(a,j);try{b=(0,d.readFileSync)(g,"utf8")}catch(a){if("ENOENT"===a.code)return null;throw new o([`${g}: ${a.message}`])}var h=b;try{c=(0,f.qg)(h)}catch(a){throw new o([`${g}: YAML parse error: ${a.message}`])}if(!p(c))throw new o([`${g}: expected a YAML mapping at the top level (got ${s(c)})`]);let u=[];t(c,l,"top level",u),"version"in c?1!==q(c.version)&&u.push(`version: must be 1 (got ${s(c.version)})`):u.push('version: required, v1 configs must declare "version: 1"');let v=function(a,b){if(null==a)return b.push("gates: required, at least one gate must be defined"),[];if(!Array.isArray(a))return b.push(`gates: must be a list (got ${s(a)})`),[];if(0===a.length)return b.push("gates: at least one gate must be defined"),[];let c=[],d=new Set;return a.forEach((a,e)=>{let f=`gates[${e}]`,g=b.length;if(!p(a))return void b.push(`${f}: must be a mapping (got ${s(a)})`);t(a,m,f,b),"string"!=typeof a.id||""===a.id?b.push(`${f}.id: required, must be a non-empty string (got ${s(a.id)})`):k.test(a.id)?i.includes(a.id)?b.push(`${f}.id: "${a.id}" is reserved for a built-in gate`):d.has(a.id)?b.push(`${f}.id: duplicate gate id "${a.id}"`):d.add(a.id):b.push(`${f}.id: "${a.id}" must match ${k.source}`),("string"!=typeof a.command||""===a.command.trim())&&b.push(`${f}.command: required, must be a non-empty string (got ${s(a.command)})`);let h=600;if(void 0!==a.timeoutSec){let c=q(a.timeoutSec);null===c?b.push(`${f}.timeoutSec: must be an integer (got ${s(a.timeoutSec)})`):c<1||c>7200?b.push(`${f}.timeoutSec: must be 1..7200 (got ${c})`):h=c}b.length===g&&c.push({id:a.id,command:a.command,timeoutSec:h})}),c}(c.gates,u),w=function(a,b){let c={baseRef:null,skipInPrimaryCheckout:!0,maxLogTailBytes:8192,requireCommit:!1};if(null==a)return c;if(!p(a))return b.push(`options: must be a mapping (got ${s(a)})`),c;if(t(a,n,"options",b),void 0!==a.baseRef&&("string"!=typeof a.baseRef||""===a.baseRef.trim()?b.push(`options.baseRef: must be a non-empty string (got ${s(a.baseRef)})`):c.baseRef=a.baseRef),void 0!==a.skipInPrimaryCheckout){let d=r(a.skipInPrimaryCheckout);null===d?b.push(`options.skipInPrimaryCheckout: must be true or false (got ${s(a.skipInPrimaryCheckout)})`):c.skipInPrimaryCheckout=d}if(void 0!==a.requireCommit){let d=r(a.requireCommit);null===d?b.push(`options.requireCommit: must be true or false (got ${s(a.requireCommit)})`):c.requireCommit=d}if(void 0!==a.maxLogTailBytes){let d=q(a.maxLogTailBytes);null===d?b.push(`options.maxLogTailBytes: must be an integer (got ${s(a.maxLogTailBytes)})`):d<0||d>1048576?b.push(`options.maxLogTailBytes: must be 0..1048576 (got ${d})`):c.maxLogTailBytes=d}return c}(c.options,u);if(u.length>0)throw new o(u);return{version:1,gates:v,options:w}}}};
@@ -1 +1 @@
1
- "use strict";exports.id=6283,exports.ids=[6283],exports.modules={26283:(a,b,c)=>{c.d(b,{kT:()=>U,aU:()=>i,l8:()=>G,hx:()=>k,XY:()=>H,F0:()=>Y,Fw:()=>Z,CX:()=>n,pn:()=>v,gm:()=>o,Jn:()=>u,aW:()=>w,Du:()=>K,Mi:()=>N,J7:()=>O,wN:()=>y,kD:()=>E,uA:()=>B,sy:()=>A,Md:()=>D,LO:()=>F,sx:()=>J,fW:()=>x,KO:()=>$,ut:()=>W,GT:()=>m,_X:()=>function a(b){switch(b){case"claude":return{promptPattern:k,separatorPattern:l,thinkingPattern:h,skipPatterns:[/^─{10,}$/,/^[>❯]\s*$/,h,/^\s*[⎿⏋]\s+Tip:/,/^\s*Tip:/,/^\s*\?\s*for shortcuts/,/to interrupt\)/,x]};case"codex":return{promptPattern:o,separatorPattern:t,thinkingPattern:j,skipPatterns:[/^─.*─+$/,/^›\s*$/,/^›\s+(Implement|Find and fix|Type)/,j,/^\s*\d+%\s+context left/,/^\s*for shortcuts$/,/╭─+╮/,/╰─+╯/,/•\s*Ran\s+/,/^\s*└/,/^\s*│/,/\(.*esc to interrupt\)/,x]};case"gemini":return{promptPattern:y,separatorPattern:/^[─━]{3,}$/m,thinkingPattern:z,skipPatterns:[y,z,/^\s*$/,/Gemini\s+\d+\.\d+/,x]};case"vibe-local":return{promptPattern:P,separatorPattern:/^[·]{10,}$/m,thinkingPattern:Q,skipPatterns:[P,Q,/^\s*$/,/vibe-local|vibe-coder/,/ctx:\s*\d+%/,/Model\s+\w/,/Engine\s+\w/,/Mode\s+/,/RAM\s+/,/CWD\s+/,/^[·]{10,}$/,/✦\s*Ready/,/ESC:\s*stop/,x]};case"opencode":return{promptPattern:A,separatorPattern:I,thinkingPattern:C,skipPatterns:[...J]};case"copilot":return{promptPattern:K,separatorPattern:M,thinkingPattern:L,skipPatterns:[...O]};case"antigravity":return{promptPattern:R,separatorPattern:T,thinkingPattern:S,skipPatterns:[...V]};default:return a("claude")}},Qh:()=>s,zZ:()=>r,aJ:()=>f,_A:()=>X});var d=c(72626);let e=/\x1b\[[0-9;]*[a-zA-Z]|\x1b\][^\x07]*\x07|\[[0-9;]*m/g;function f(a){return a.replace(e,"")}let g=(0,d.h)("cli-patterns"),h=RegExp(`[✻✽⏺\xb7∴✢✳✶⦿◉●○◌◎⊙⊚⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏]\\s+.+…|esc to interrupt`,"m"),i=/esc to interrupt/,j=/•\s*(Planning|Searching|Exploring|Running|Thinking|Working|Reading|Writing|Analyzing|Ran|Deciding)/m,k=/^[>❯](\s*$|\s+\S)/m,l=/^─{10,}$/m;function m(a){let b=a=>/^─{10,}$/.test(f(a).trimEnd()),c=a.length-1;for(;c>=0&&""===a[c].trim();)c--;if(c<0)return -1;let d=-1;for(let e=c;e>=Math.max(0,c-4);e--)if(b(a[e])){d=e;break}if(d<0)return -1;let e=-1;for(let c=d-1;c>=Math.max(0,d-40);c--)if(b(a[c])){e=c;break}return e<0||!/^[>❯]/.test(f(a[e+1]??""))?-1:Math.max(0,e-1)}let n=/Yes, I trust this folder/m,o=/^›\s*/m,p=/Skip until next version|Do you trust|Press enter to continue|^\s*›\s*\d+\.\s/m,q=/^\s*›(?!\s*\d+\.)/;function r(a){let b=a.split("\n"),c=-1,d=-1;for(let a=0;a<b.length;a++){let e=b[a];if(p.test(e)){c=a;continue}q.test(e)&&(d=a)}return d>=0&&d>c}function s(a){let b=a.split("\n"),c=-1;for(let a=b.length-1;a>=0;a--)if(q.test(b[a])){c=a;break}let d=b.slice(c+1).join("\n");return""===d?null:d.includes("Skip until next version")||d.includes("Update")&&d.includes("Skip")?"update":d.includes("Do you trust")?"trust":d.includes("Press enter to continue")?"press-enter":null}let t=/^─.*Worked for.*─+$/m,u=/press\s+enter\s+to\s+(?:confirm|select)/i,v=/(?:↑\/↓|pgup\/pgdn|home\/end)\s+to\s+(?:scroll|page|jump)|to\s+edit\s+(?:prev|next|message)/i,w=/^\s*\S.*·\s*~?\/\S*\s*$/,x=/\[Pasted text #\d+/,y=/^[>❯]\s*$|^\s*[>❯]\s+Type your message.*$/m,z=/[\u2800-\u28FF]|Thinking\.\.\./,A=/Ask anything\.\.\./,B=/tab agents\s+ctrl\+p commands/,C=/Thinking:/,D=/\u25A3\s+\w+\s+\u00b7\s+\S+(?:\s+\u00b7\s+(?:[\d]+h\s*)?(?:[\d]+m\s*)?[\d.]+s)?/,E=/esc interrupt/,F=/^\s*(Select\s+(model|provider)|Connect\s+a\s+provider)/m,G=/Enter\s+to\s+set\s+as\s+default\b/i,H=/Enter\s+to\s+(?:select\s+.*to\s+navigate|confirm\s+·\s+Esc|set\s+as\s+default)/,I=/^[\u2503\u2579\u25A3\u2580\u2500\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C]+$/,J=[I,/\u2B1D{4,}/,/^Build\s+/,B,E,A,x],K=/^[>❯]\s|^\?\s+/m,L=/[\u2800-\u28FF]|\(Esc to cancel|Reasoning\s+[■▪▮]|\.\.\.\s+Thinking|Generating|Processing/,M=/^─{10,}$/m,N=/Search\s+\w+\.\.\.|Select\s+Model|to (?:navigate|select).*Enter to (?:select|confirm)/m,O=[x,M,L,N,/^GitHub Copilot\s+v/,/[█▘▝▖▗▔▄▌▐]/,/[╭╮╰╯│]/,/\[⎇\s+\w[^\]]*\]/,/^shift\+tab\s/,/^\?\s+for\s+shortcuts/,/^ctrl\+[a-z]\s+\w/,/^[❯>]\s*(Type\s+@|$)/,/^Tip:\s+\//,/^Describe a task to get started/,/^Copilot uses AI, so always check for mistakes\.$/,/^● 💡/,/^● Environment loaded:/],P=/ctx:\d+%\s*[>❯]/m,Q=/[\u2800-\u28FF]|Thinking|⠋|⠙|⠹|⠸|⠼|⠴|⠦|⠧|⠇|⠏|Running|Executing/,R=/^>\s*$/m,S=/[\u2800-\u28FF]|Generating|esc to cancel/,T=/^─{3,}$/m,U=/Switch Model|↑\/↓\s*Navigate/m,V=[T,/^>\s*$/,/^\?\s+for\s+shortcuts/,S,/[▄▀█▌▐]/,x];function W(a,b){let c,d=g.withContext({cliToolId:a});switch(d.debug("detectThinking:check",{contentLength:b.length}),a){case"claude":default:c=h.test(b);break;case"codex":c=j.test(b);break;case"gemini":c=z.test(b);break;case"vibe-local":c=Q.test(b);break;case"opencode":c=C.test(b);break;case"copilot":c=L.test(b);break;case"antigravity":c=S.test(b)}return d.debug("detectThinking:result",{isThinking:c}),c}function X(a){return a.split("\n").map(a=>/^[\u2502\u2503\u256D\u256E\u256F\u2570\u2500\u2579\u2580\u2588\s]+$/.test(a)?"":a.replace(/^\s*[\u2502\u2503]\s?/,"").replace(/\s*[\u2502\u2503\u2588]$/,"")).join("\n")}let Y=["Claude Code cannot be launched inside another Claude Code session"],Z=[/^Error:.*Claude Code/];function $(a){if("claude"===a||"opencode"===a||"copilot"===a||"antigravity"===a)return{requireDefaultIndicator:!1}}}};
1
+ "use strict";exports.id=6283,exports.ids=[6283],exports.modules={26283:(a,b,c)=>{c.d(b,{kT:()=>V,aU:()=>i,l8:()=>H,hx:()=>k,XY:()=>I,F0:()=>Z,Fw:()=>$,CX:()=>n,Dd:()=>v,pn:()=>w,gm:()=>o,Jn:()=>u,aW:()=>x,Du:()=>L,Mi:()=>O,J7:()=>P,wN:()=>z,kD:()=>F,uA:()=>C,sy:()=>B,Md:()=>E,LO:()=>G,sx:()=>K,fW:()=>y,KO:()=>_,ut:()=>X,GT:()=>m,_X:()=>function a(b){switch(b){case"claude":return{promptPattern:k,separatorPattern:l,thinkingPattern:h,skipPatterns:[/^─{10,}$/,/^[>❯]\s*$/,h,/^\s*[⎿⏋]\s+Tip:/,/^\s*Tip:/,/^\s*\?\s*for shortcuts/,/to interrupt\)/,y]};case"codex":return{promptPattern:o,separatorPattern:t,thinkingPattern:j,skipPatterns:[/^─.*─+$/,/^›\s*$/,/^›\s+(Implement|Find and fix|Type)/,j,/^\s*\d+%\s+context left/,/^\s*for shortcuts$/,/╭─+╮/,/╰─+╯/,/•\s*Ran\s+/,/^\s*└/,/^\s*│/,/\(.*esc to interrupt\)/,y]};case"gemini":return{promptPattern:z,separatorPattern:/^[─━]{3,}$/m,thinkingPattern:A,skipPatterns:[z,A,/^\s*$/,/Gemini\s+\d+\.\d+/,y]};case"vibe-local":return{promptPattern:Q,separatorPattern:/^[·]{10,}$/m,thinkingPattern:R,skipPatterns:[Q,R,/^\s*$/,/vibe-local|vibe-coder/,/ctx:\s*\d+%/,/Model\s+\w/,/Engine\s+\w/,/Mode\s+/,/RAM\s+/,/CWD\s+/,/^[·]{10,}$/,/✦\s*Ready/,/ESC:\s*stop/,y]};case"opencode":return{promptPattern:B,separatorPattern:J,thinkingPattern:D,skipPatterns:[...K]};case"copilot":return{promptPattern:L,separatorPattern:N,thinkingPattern:M,skipPatterns:[...P]};case"antigravity":return{promptPattern:S,separatorPattern:U,thinkingPattern:T,skipPatterns:[...W]};default:return a("claude")}},Qh:()=>s,zZ:()=>r,aJ:()=>f,_A:()=>Y});var d=c(72626);let e=/\x1b\[[0-9;]*[a-zA-Z]|\x1b\][^\x07]*\x07|\[[0-9;]*m/g;function f(a){return a.replace(e,"")}let g=(0,d.h)("cli-patterns"),h=RegExp(`[✻✽⏺\xb7∴✢✳✶⦿◉●○◌◎⊙⊚⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏]\\s+.+…|esc to interrupt`,"m"),i=/esc to interrupt/,j=/•\s*(Planning|Searching|Exploring|Running|Thinking|Working|Reading|Writing|Analyzing|Ran|Deciding)/m,k=/^[>❯](\s*$|\s+\S)/m,l=/^─{10,}$/m;function m(a){let b=a=>/^─{10,}$/.test(f(a).trimEnd()),c=a.length-1;for(;c>=0&&""===a[c].trim();)c--;if(c<0)return -1;let d=-1;for(let e=c;e>=Math.max(0,c-4);e--)if(b(a[e])){d=e;break}if(d<0)return -1;let e=-1;for(let c=d-1;c>=Math.max(0,d-40);c--)if(b(a[c])){e=c;break}return e<0||!/^[>❯]/.test(f(a[e+1]??""))?-1:Math.max(0,e-1)}let n=/Yes, I trust this folder/m,o=/^›\s*/m,p=/Skip until next version|Do you trust|Press enter to continue|^\s*›\s*\d+\.\s/m,q=/^\s*›(?!\s*\d+\.)/;function r(a){let b=a.split("\n"),c=-1,d=-1;for(let a=0;a<b.length;a++){let e=b[a];if(p.test(e)){c=a;continue}q.test(e)&&(d=a)}return d>=0&&d>c}function s(a){let b=a.split("\n"),c=-1;for(let a=b.length-1;a>=0;a--)if(q.test(b[a])){c=a;break}let d=b.slice(c+1).join("\n");return""===d?null:d.includes("Skip until next version")||d.includes("Update")&&d.includes("Skip")?"update":d.includes("Do you trust")?"trust":d.includes("Press enter to continue")?"press-enter":null}let t=/^─.*Worked for.*─+$/m,u=/press\s+enter\s+to\s+(?:confirm|select)/i,v=/esc\s+to\s+cancel/i,w=/(?:↑\/↓|pgup\/pgdn|home\/end)\s+to\s+(?:scroll|page|jump)|to\s+edit\s+(?:prev|next|message)/i,x=/^\s*\S.*·\s*~?\/\S*\s*$/,y=/\[Pasted text #\d+/,z=/^[>❯]\s*$|^\s*[>❯]\s+Type your message.*$/m,A=/[\u2800-\u28FF]|Thinking\.\.\./,B=/Ask anything\.\.\./,C=/tab agents\s+ctrl\+p commands/,D=/Thinking:/,E=/\u25A3\s+\w+\s+\u00b7\s+\S+(?:\s+\u00b7\s+(?:[\d]+h\s*)?(?:[\d]+m\s*)?[\d.]+s)?/,F=/esc interrupt/,G=/^\s*(Select\s+(model|provider)|Connect\s+a\s+provider)/m,H=/Enter\s+to\s+set\s+as\s+default\b/i,I=/Enter\s+to\s+(?:select\s+.*to\s+navigate|confirm\s+·\s+Esc|set\s+as\s+default)/,J=/^[\u2503\u2579\u25A3\u2580\u2500\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C]+$/,K=[J,/\u2B1D{4,}/,/^Build\s+/,C,F,B,y],L=/^[>❯]\s|^\?\s+/m,M=/[\u2800-\u28FF]|\(Esc to cancel|Reasoning\s+[■▪▮]|\.\.\.\s+Thinking|Generating|Processing/,N=/^─{10,}$/m,O=/Search\s+\w+\.\.\.|Select\s+Model|to (?:navigate|select).*Enter to (?:select|confirm)/m,P=[y,N,M,O,/^GitHub Copilot\s+v/,/[█▘▝▖▗▔▄▌▐]/,/[╭╮╰╯│]/,/\[⎇\s+\w[^\]]*\]/,/^shift\+tab\s/,/^\?\s+for\s+shortcuts/,/^ctrl\+[a-z]\s+\w/,/^[❯>]\s*(Type\s+@|$)/,/^Tip:\s+\//,/^Describe a task to get started/,/^Copilot uses AI, so always check for mistakes\.$/,/^● 💡/,/^● Environment loaded:/],Q=/ctx:\d+%\s*[>❯]/m,R=/[\u2800-\u28FF]|Thinking|⠋|⠙|⠹|⠸|⠼|⠴|⠦|⠧|⠇|⠏|Running|Executing/,S=/^>\s*$/m,T=/[\u2800-\u28FF]|Generating|esc to cancel/,U=/^─{3,}$/m,V=/Switch Model|↑\/↓\s*Navigate/m,W=[U,/^>\s*$/,/^\?\s+for\s+shortcuts/,T,/[▄▀█▌▐]/,y];function X(a,b){let c,d=g.withContext({cliToolId:a});switch(d.debug("detectThinking:check",{contentLength:b.length}),a){case"claude":default:c=h.test(b);break;case"codex":c=j.test(b);break;case"gemini":c=A.test(b);break;case"vibe-local":c=R.test(b);break;case"opencode":c=D.test(b);break;case"copilot":c=M.test(b);break;case"antigravity":c=T.test(b)}return d.debug("detectThinking:result",{isThinking:c}),c}function Y(a){return a.split("\n").map(a=>/^[\u2502\u2503\u256D\u256E\u256F\u2570\u2500\u2579\u2580\u2588\s]+$/.test(a)?"":a.replace(/^\s*[\u2502\u2503]\s?/,"").replace(/\s*[\u2502\u2503\u2588]$/,"")).join("\n")}let Z=["Claude Code cannot be launched inside another Claude Code session"],$=[/^Error:.*Claude Code/];function _(a){if("claude"===a||"opencode"===a||"copilot"===a||"antigravity"===a)return{requireDefaultIndicator:!1}}}};
@@ -1 +1 @@
1
- "use strict";exports.id=8681,exports.ids=[8681],exports.modules={56791:(a,b,c)=>{c.d(b,{ACU:()=>d.AC,Tu1:()=>d.Tu,ug3:()=>d.ug,ePp:()=>d.eP,mgu:()=>d.mg,lmQ:()=>d.lm,afR:()=>d.af,KG7:()=>d.KG,cDg:()=>d.cD,Jj_:()=>d.Jj,YXK:()=>d.YX,G4M:()=>d.G4,hLV:()=>d.hL,qpu:()=>d.qp,hlF:()=>d.hl,ToT:()=>d.To,oHS:()=>d.oH,UTO:()=>d.UT,pyp:()=>d.py,rYZ:()=>d.rY,yyF:()=>d.yy,pEA:()=>d.pE,z2r:()=>d.z2,cPO:()=>d.cP,DFh:()=>d.DF,lAn:()=>d.lA,QpU:()=>d.Qp,thF:()=>d.th,oZb:()=>d.oZ,ZPM:()=>d.ZP,YsC:()=>d.Ys,vgV:()=>d.vg,Rm5:()=>d.Rm,C81:()=>d.C8,u$7:()=>d.u$,__q:()=>d.__,MHq:()=>d.MH,BN2:()=>d.BN,m0H:()=>d.m0,TkM:()=>d.Tk,iTB:()=>d.iT,gpF:()=>d.gp,yEE:()=>d.yE,BEB:()=>d.BE,qKv:()=>d.qK,p41:()=>d.p4,r8U:()=>d.r8,of8:()=>d.of,DNF:()=>d.DN,pZp:()=>d.pZ,kAO:()=>d.kA,VLK:()=>d.VL,CFc:()=>d.CF,NVZ:()=>d.NV,ceo:()=>d.ce,WZv:()=>d.WZ,y1O:()=>d.y1,ggW:()=>d.gg,NrL:()=>d.Nr,obI:()=>d.ob,frO:()=>d.fr,J6l:()=>d.J6,Uim:()=>d.Ui,P99:()=>d.P9,eNI:()=>d.eN,vil:()=>d.vi,uJp:()=>d.uJ,yTo:()=>d.yT,VkA:()=>d.Vk,Mt$:()=>d.Mt,UE1:()=>d.UE,PLg:()=>d.PL,jpM:()=>d.jp,nQM:()=>d.nQ,ybN:()=>d.yb,GAi:()=>d.GA,Cs6:()=>d.Cs,xRr:()=>d.xR,azd:()=>d.az,nZD:()=>d.nZ,PPl:()=>d.PP,DxD:()=>d.Dx,OaR:()=>d.O,EU4:()=>d.EU,HZx:()=>d.HZ,UYU:()=>d.UY,cwY:()=>d.cw,jJB:()=>d.jJ,DCX:()=>d.DC,PPx:()=>d.gb,yBd:()=>d.yB,uy0:()=>d.uy,sal:()=>d.s,ium:()=>d.iu,hqe:()=>d.hq,z1g:()=>d.z1,blx:()=>d.bl,jAi:()=>d.jA,ZL2:()=>d.ZL});var d=c(90444);c(88807),c(92046),c(20416),c(10406),c(29021),c(33873),c(21820),c(7956),(0,c(72626).h)("db-migration-path")},66007:(a,b,c)=>{c.d(b,{B9:()=>m,Px:()=>o,Uc:()=>l,b$:()=>n,h6:()=>k});var d=c(33873),e=c.n(d),f=c(29021),g=c(72626),h=c(80438);let i=(0,g.h)("path-validator"),j=/^[a-zA-Z0-9_-]+$/;function k(a){return!!a&&0!==a.length&&j.test(a)}function l(a,b){return a===b||a.startsWith(b+e().sep)}function m(a,b){if(!a||""===a.trim()||a.includes("\0"))return!1;let c=a;try{c=decodeURIComponent(a)}catch{c=a}if(c.includes("\0"))return!1;let d=e().resolve(b),f=e().resolve(b,c),g=e().relative(d,f);return!(g.startsWith("..")||e().isAbsolute(g))}function n(a,b){if(!a||""===a.trim())throw Error("Invalid path: Path cannot be empty");if(a.includes("\0"))throw Error("Invalid path: Null bytes not allowed");if(!m(a,b))throw Error(`Path is outside allowed directory: ${a} (allowed root: ${b})`);let c=a;try{c=decodeURIComponent(a)}catch{c=a}return e().resolve(b,c)}function o(a,b){let c;try{c=(0,f.realpathSync)(b)}catch{return!1}let d=e().resolve(b,a);if((0,f.existsSync)(d))try{let b=(0,f.realpathSync)(d),e=l(b,c);return e||(0,h.h)(i,"symlink-rejected",{targetPath:a,resolvedTarget:b}),e}catch{return!1}try{if((0,f.lstatSync)(d).isSymbolicLink())try{let b=(0,f.readlinkSync)(d),g=e().resolve(e().dirname(d),b),j=l(g,c);return j||(0,h.h)(i,"dangling-symlink-rejected",{targetPath:a,resolvedLinkTarget:g}),j}catch{return!1}}catch{}let g=e().dirname(d);for(;g!==e().dirname(g);){if((0,f.existsSync)(g))try{let a=(0,f.realpathSync)(g),b=l(a,c);return b||(0,h.h)(i,"symlink-ancestor-rejected",{currentPath:g,resolvedAncestor:a}),b}catch{break}g=e().dirname(g)}return!1}},80438:(a,b,c)=>{c.d(b,{h:()=>d});function d(a,b,c){a.warn(`security:${b}`,c)}},97399:(a,b,c)=>{c.d(b,{I6:()=>i,Sr:()=>g,eA:()=>k});var d=c(10641),e=c(66007),f=c(65417);function g(a,b){if(!Array.isArray(a)||0===a.length)return d.NextResponse.json({error:"files must be a non-empty array"},{status:400});if(a.length>f.Mo)return d.NextResponse.json({error:`files exceeds the maximum of ${f.Mo}`},{status:400});for(let c of a){if("string"!=typeof c||0===c.length)return d.NextResponse.json({error:"files must contain only non-empty strings"},{status:400});if(!(0,e.B9)(c,b))return d.NextResponse.json({error:"Invalid file path"},{status:400})}return a}let h=/[\x00-\x20\x7F~^:?*[\\]/;function i(a){return"string"!=typeof a||0===a.length||a.length>255||a.startsWith("-")||a.startsWith("/")||a.endsWith("/")||a.includes("//")||a.includes("..")||a.startsWith(".")||a.endsWith(".")||a.endsWith(".lock")||a.includes("@{")||h.test(a)?d.NextResponse.json({error:"Invalid branch name",reason:"invalid_branch_name"},{status:400}):a}let j=/^\d+$/;function k(a){let b,c=()=>d.NextResponse.json({error:"Invalid stash index",reason:"invalid_stash_index"},{status:400});if("number"==typeof a){if(!Number.isInteger(a))return c();b=a}else{if("string"!=typeof a||!j.test(a))return c();b=parseInt(a,10)}return b<0||b>f.Kq?c():b}}};
1
+ "use strict";exports.id=8681,exports.ids=[8681],exports.modules={56791:(a,b,c)=>{c.d(b,{ACU:()=>d.AC,Tu1:()=>d.Tu,ug3:()=>d.ug,ePp:()=>d.eP,mgu:()=>d.mg,lmQ:()=>d.lm,afR:()=>d.af,KG7:()=>d.KG,cDg:()=>d.cD,Jj_:()=>d.Jj,YXK:()=>d.YX,G4M:()=>d.G4,hLV:()=>d.hL,qpu:()=>d.qp,hlF:()=>d.hl,ToT:()=>d.To,oHS:()=>d.oH,UTO:()=>d.UT,pyp:()=>d.py,rYZ:()=>d.rY,yyF:()=>d.yy,pEA:()=>d.pE,z2r:()=>d.z2,cPO:()=>d.cP,DFh:()=>d.DF,lAn:()=>d.lA,QpU:()=>d.Qp,thF:()=>d.th,oZb:()=>d.oZ,ZPM:()=>d.ZP,YsC:()=>d.Ys,vgV:()=>d.vg,Rm5:()=>d.Rm,C81:()=>d.C8,u$7:()=>d.u$,MHq:()=>d.MH,BN2:()=>d.BN,m0H:()=>d.m0,TkM:()=>d.Tk,iTB:()=>d.iT,gpF:()=>d.gp,yEE:()=>d.yE,BEB:()=>d.BE,qKv:()=>d.qK,p41:()=>d.p4,r8U:()=>d.r8,of8:()=>d.of,DNF:()=>d.DN,pZp:()=>d.pZ,kAO:()=>d.kA,VLK:()=>d.VL,CFc:()=>d.CF,NVZ:()=>d.NV,ceo:()=>d.ce,WZv:()=>d.WZ,y1O:()=>d.y1,ggW:()=>d.gg,NrL:()=>d.Nr,obI:()=>d.ob,frO:()=>d.fr,J6l:()=>d.J6,Uim:()=>d.Ui,P99:()=>d.P9,eNI:()=>d.eN,vil:()=>d.vi,uJp:()=>d.uJ,yTo:()=>d.yT,VkA:()=>d.Vk,Mt$:()=>d.Mt,UE1:()=>d.UE,PLg:()=>d.PL,jpM:()=>d.jp,nQM:()=>d.nQ,ybN:()=>d.yb,GAi:()=>d.GA,Cs6:()=>d.Cs,xRr:()=>d.xR,azd:()=>d.az,nZD:()=>d.nZ,PPl:()=>d.PP,DxD:()=>d.Dx,OaR:()=>d.O,EU4:()=>d.EU,HZx:()=>d.HZ,UYU:()=>d.UY,cwY:()=>d.cw,jJB:()=>d.jJ,DCX:()=>d.DC,PPx:()=>d.gb,yBd:()=>d.yB,uy0:()=>d.uy,sal:()=>d.s,ium:()=>d.iu,hqe:()=>d.hq,z1g:()=>d.z1,blx:()=>d.bl,jAi:()=>d.jA,ZL2:()=>d.ZL});var d=c(90444);c(88807),c(14520),c(20416),c(10406),c(29021),c(33873),c(21820),c(7956),(0,c(72626).h)("db-migration-path")},66007:(a,b,c)=>{c.d(b,{B9:()=>m,Px:()=>o,Uc:()=>l,b$:()=>n,h6:()=>k});var d=c(33873),e=c.n(d),f=c(29021),g=c(72626),h=c(80438);let i=(0,g.h)("path-validator"),j=/^[a-zA-Z0-9_-]+$/;function k(a){return!!a&&0!==a.length&&j.test(a)}function l(a,b){return a===b||a.startsWith(b+e().sep)}function m(a,b){if(!a||""===a.trim()||a.includes("\0"))return!1;let c=a;try{c=decodeURIComponent(a)}catch{c=a}if(c.includes("\0"))return!1;let d=e().resolve(b),f=e().resolve(b,c),g=e().relative(d,f);return!(g.startsWith("..")||e().isAbsolute(g))}function n(a,b){if(!a||""===a.trim())throw Error("Invalid path: Path cannot be empty");if(a.includes("\0"))throw Error("Invalid path: Null bytes not allowed");if(!m(a,b))throw Error(`Path is outside allowed directory: ${a} (allowed root: ${b})`);let c=a;try{c=decodeURIComponent(a)}catch{c=a}return e().resolve(b,c)}function o(a,b){let c;try{c=(0,f.realpathSync)(b)}catch{return!1}let d=e().resolve(b,a);if((0,f.existsSync)(d))try{let b=(0,f.realpathSync)(d),e=l(b,c);return e||(0,h.h)(i,"symlink-rejected",{targetPath:a,resolvedTarget:b}),e}catch{return!1}try{if((0,f.lstatSync)(d).isSymbolicLink())try{let b=(0,f.readlinkSync)(d),g=e().resolve(e().dirname(d),b),j=l(g,c);return j||(0,h.h)(i,"dangling-symlink-rejected",{targetPath:a,resolvedLinkTarget:g}),j}catch{return!1}}catch{}let g=e().dirname(d);for(;g!==e().dirname(g);){if((0,f.existsSync)(g))try{let a=(0,f.realpathSync)(g),b=l(a,c);return b||(0,h.h)(i,"symlink-ancestor-rejected",{currentPath:g,resolvedAncestor:a}),b}catch{break}g=e().dirname(g)}return!1}},80438:(a,b,c)=>{c.d(b,{h:()=>d});function d(a,b,c){a.warn(`security:${b}`,c)}},97399:(a,b,c)=>{c.d(b,{I6:()=>i,Sr:()=>g,eA:()=>k});var d=c(10641),e=c(66007),f=c(65417);function g(a,b){if(!Array.isArray(a)||0===a.length)return d.NextResponse.json({error:"files must be a non-empty array"},{status:400});if(a.length>f.Mo)return d.NextResponse.json({error:`files exceeds the maximum of ${f.Mo}`},{status:400});for(let c of a){if("string"!=typeof c||0===c.length)return d.NextResponse.json({error:"files must contain only non-empty strings"},{status:400});if(!(0,e.B9)(c,b))return d.NextResponse.json({error:"Invalid file path"},{status:400})}return a}let h=/[\x00-\x20\x7F~^:?*[\\]/;function i(a){return"string"!=typeof a||0===a.length||a.length>255||a.startsWith("-")||a.startsWith("/")||a.endsWith("/")||a.includes("//")||a.includes("..")||a.startsWith(".")||a.endsWith(".")||a.endsWith(".lock")||a.includes("@{")||h.test(a)?d.NextResponse.json({error:"Invalid branch name",reason:"invalid_branch_name"},{status:400}):a}let j=/^\d+$/;function k(a){let b,c=()=>d.NextResponse.json({error:"Invalid stash index",reason:"invalid_stash_index"},{status:400});if("number"==typeof a){if(!Number.isInteger(a))return c();b=a}else{if("string"!=typeof a||!j.test(a))return c();b=parseInt(a,10)}return b<0||b>f.Kq?c():b}}};