commandmate 0.16.0 → 0.17.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 (616) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +286 -216
  3. package/.next/app-path-routes-manifest.json +37 -27
  4. package/.next/build-manifest.json +2 -2
  5. package/.next/prerender-manifest.json +9 -9
  6. package/.next/required-server-files.json +1 -1
  7. package/.next/routes-manifest.json +57 -0
  8. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  9. package/.next/server/app/api/app/update/route_client-reference-manifest.js +1 -1
  10. package/.next/server/app/api/app/update-check/route.js +1 -1
  11. package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
  12. package/.next/server/app/api/assistant/conversation/route.js +1 -1
  13. package/.next/server/app/api/assistant/conversation/route.js.nft.json +1 -1
  14. package/.next/server/app/api/assistant/conversation/route_client-reference-manifest.js +1 -1
  15. package/.next/server/app/api/assistant/current-output/route.js +1 -1
  16. package/.next/server/app/api/assistant/current-output/route.js.nft.json +1 -1
  17. package/.next/server/app/api/assistant/current-output/route_client-reference-manifest.js +1 -1
  18. package/.next/server/app/api/assistant/messages/route.js +1 -1
  19. package/.next/server/app/api/assistant/messages/route.js.nft.json +1 -1
  20. package/.next/server/app/api/assistant/messages/route_client-reference-manifest.js +1 -1
  21. package/.next/server/app/api/assistant/session/route.js +1 -1
  22. package/.next/server/app/api/assistant/session/route.js.nft.json +1 -1
  23. package/.next/server/app/api/assistant/session/route_client-reference-manifest.js +1 -1
  24. package/.next/server/app/api/assistant/start/route.js +1 -1
  25. package/.next/server/app/api/assistant/start/route.js.nft.json +1 -1
  26. package/.next/server/app/api/assistant/start/route_client-reference-manifest.js +1 -1
  27. package/.next/server/app/api/assistant/terminal/route.js +3 -3
  28. package/.next/server/app/api/assistant/terminal/route.js.nft.json +1 -1
  29. package/.next/server/app/api/assistant/terminal/route_client-reference-manifest.js +1 -1
  30. package/.next/server/app/api/assistant/tools/route.js +1 -1
  31. package/.next/server/app/api/assistant/tools/route.js.nft.json +1 -1
  32. package/.next/server/app/api/assistant/tools/route_client-reference-manifest.js +1 -1
  33. package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  34. package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  35. package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  36. package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +1 -1
  37. package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
  38. package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
  39. package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
  40. package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
  41. package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -1
  42. package/.next/server/app/api/fs/recent-paths/route.js +1 -1
  43. package/.next/server/app/api/fs/recent-paths/route_client-reference-manifest.js +1 -1
  44. package/.next/server/app/api/hooks/agent-event/route.js +1 -0
  45. package/.next/server/app/api/hooks/agent-event/route.js.nft.json +1 -0
  46. package/.next/server/app/api/hooks/agent-event/route_client-reference-manifest.js +1 -0
  47. package/.next/server/app/api/hooks/claude-done/route.js +1 -1
  48. package/.next/server/app/api/hooks/claude-done/route.js.nft.json +1 -1
  49. package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
  50. package/.next/server/app/api/metrics/vibe/route.js +37 -0
  51. package/.next/server/app/api/metrics/vibe/route.js.nft.json +1 -0
  52. package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -0
  53. package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
  54. package/.next/server/app/api/push/subscriptions/route.js +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_client-reference-manifest.js +1 -1
  57. package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
  58. package/.next/server/app/api/repositories/[id]/todos/[todoId]/route.js +1 -1
  59. package/.next/server/app/api/repositories/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  60. package/.next/server/app/api/repositories/[id]/todos/route.js +1 -1
  61. package/.next/server/app/api/repositories/[id]/todos/route_client-reference-manifest.js +1 -1
  62. package/.next/server/app/api/repositories/clone/[jobId]/route.js +1 -1
  63. package/.next/server/app/api/repositories/clone/[jobId]/route.js.nft.json +1 -1
  64. package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
  65. package/.next/server/app/api/repositories/clone/route.js +1 -1
  66. package/.next/server/app/api/repositories/clone/route.js.nft.json +1 -1
  67. package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
  68. package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
  69. package/.next/server/app/api/repositories/restore/route.js +1 -1
  70. package/.next/server/app/api/repositories/restore/route.js.nft.json +1 -1
  71. package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
  72. package/.next/server/app/api/repositories/route.js +1 -1
  73. package/.next/server/app/api/repositories/route.js.nft.json +1 -1
  74. package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
  75. package/.next/server/app/api/repositories/scan/route.js +1 -1
  76. package/.next/server/app/api/repositories/scan/route.js.nft.json +1 -1
  77. package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
  78. package/.next/server/app/api/repositories/sync/route.js +1 -1
  79. package/.next/server/app/api/repositories/sync/route.js.nft.json +1 -1
  80. package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
  81. package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
  82. package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
  83. package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
  84. package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
  85. package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
  86. package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
  87. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  88. package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
  89. package/.next/server/app/api/tasks/[taskId]/cancel/route.js +4 -0
  90. package/.next/server/app/api/tasks/[taskId]/cancel/route.js.nft.json +1 -0
  91. package/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -0
  92. package/.next/server/app/api/tasks/[taskId]/route.js +4 -0
  93. package/.next/server/app/api/tasks/[taskId]/route.js.nft.json +1 -0
  94. package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -0
  95. package/.next/server/app/api/templates/[id]/route.js +1 -1
  96. package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
  97. package/.next/server/app/api/templates/route.js +1 -1
  98. package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
  99. package/.next/server/app/api/todos/route.js +1 -1
  100. package/.next/server/app/api/todos/route_client-reference-manifest.js +1 -1
  101. package/.next/server/app/api/verification/runs/[runId]/route.js +1 -0
  102. package/.next/server/app/api/verification/runs/[runId]/route.js.nft.json +1 -0
  103. package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -0
  104. package/.next/server/app/api/verification/runs/route.js +1 -0
  105. package/.next/server/app/api/verification/runs/route.js.nft.json +1 -0
  106. package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -0
  107. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
  108. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js.nft.json +1 -1
  109. package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
  110. package/.next/server/app/api/worktrees/[id]/capture/route.js +1 -1
  111. package/.next/server/app/api/worktrees/[id]/capture/route.js.nft.json +1 -1
  112. package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
  113. package/.next/server/app/api/worktrees/[id]/cli-tool/route.js +1 -1
  114. package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
  115. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js +1 -1
  116. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
  117. package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
  118. package/.next/server/app/api/worktrees/[id]/current-output/route.js.nft.json +1 -1
  119. package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
  120. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route.js +1 -1
  121. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
  122. package/.next/server/app/api/worktrees/[id]/execution-logs/route.js +2 -2
  123. package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
  124. package/.next/server/app/api/worktrees/[id]/files/[...path]/route.js +1 -1
  125. package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
  126. package/.next/server/app/api/worktrees/[id]/git/branch/create/route.js +1 -1
  127. package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
  128. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route.js +1 -1
  129. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
  130. package/.next/server/app/api/worktrees/[id]/git/branches/route.js +1 -1
  131. package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
  132. package/.next/server/app/api/worktrees/[id]/git/checkout/route.js +1 -1
  133. package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
  134. package/.next/server/app/api/worktrees/[id]/git/commit/route.js +1 -1
  135. package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
  136. package/.next/server/app/api/worktrees/[id]/git/diff/route.js +1 -1
  137. package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
  138. package/.next/server/app/api/worktrees/[id]/git/fetch/route.js +1 -1
  139. package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
  140. package/.next/server/app/api/worktrees/[id]/git/log/route.js +1 -1
  141. package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
  142. package/.next/server/app/api/worktrees/[id]/git/pull/route.js +1 -1
  143. package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
  144. package/.next/server/app/api/worktrees/[id]/git/push/route.js +1 -1
  145. package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
  146. package/.next/server/app/api/worktrees/[id]/git/reset/route.js +1 -1
  147. package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
  148. package/.next/server/app/api/worktrees/[id]/git/revert/route.js +1 -1
  149. package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
  150. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route.js +1 -1
  151. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
  152. package/.next/server/app/api/worktrees/[id]/git/stage/route.js +1 -1
  153. package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
  154. package/.next/server/app/api/worktrees/[id]/git/staged/route.js +1 -1
  155. package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
  156. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route.js +1 -1
  157. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
  158. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route.js +1 -1
  159. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
  160. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route.js +1 -1
  161. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
  162. package/.next/server/app/api/worktrees/[id]/git/stash/push/route.js +1 -1
  163. package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
  164. package/.next/server/app/api/worktrees/[id]/git/stash/route.js +1 -1
  165. package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
  166. package/.next/server/app/api/worktrees/[id]/git/status/route.js +1 -1
  167. package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
  168. package/.next/server/app/api/worktrees/[id]/git/unstage/route.js +1 -1
  169. package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
  170. package/.next/server/app/api/worktrees/[id]/git/working-diff/route.js +1 -1
  171. package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
  172. package/.next/server/app/api/worktrees/[id]/interrupt/route.js +1 -1
  173. package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
  174. package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
  175. package/.next/server/app/api/worktrees/[id]/kill-session/route.js +1 -1
  176. package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -1
  177. package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
  178. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route.js +1 -1
  179. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
  180. package/.next/server/app/api/worktrees/[id]/logs/route.js +1 -1
  181. package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
  182. package/.next/server/app/api/worktrees/[id]/marp-render/route.js +1 -1
  183. package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
  184. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route.js +1 -1
  185. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
  186. package/.next/server/app/api/worktrees/[id]/memos/route.js +1 -1
  187. package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
  188. package/.next/server/app/api/worktrees/[id]/messages/route.js +1 -1
  189. package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
  190. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
  191. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -1
  192. package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
  193. package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -1
  194. package/.next/server/app/api/worktrees/[id]/respond/route.js.nft.json +1 -1
  195. package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
  196. package/.next/server/app/api/worktrees/[id]/route.js +1 -1
  197. package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
  198. package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
  199. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js +1 -1
  200. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
  201. package/.next/server/app/api/worktrees/[id]/schedules/active/route.js +1 -1
  202. package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
  203. package/.next/server/app/api/worktrees/[id]/schedules/route.js +2 -2
  204. package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
  205. package/.next/server/app/api/worktrees/[id]/search/route.js +1 -1
  206. package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
  207. package/.next/server/app/api/worktrees/[id]/send/route.js +1 -1
  208. package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
  209. package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
  210. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +1 -1
  211. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -1
  212. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
  213. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
  214. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
  215. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
  216. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
  217. package/.next/server/app/api/worktrees/[id]/skills/route.js +2 -2
  218. package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
  219. package/.next/server/app/api/worktrees/[id]/slash-commands/route.js +1 -1
  220. package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
  221. package/.next/server/app/api/worktrees/[id]/special-keys/route.js +1 -1
  222. package/.next/server/app/api/worktrees/[id]/special-keys/route.js.nft.json +1 -1
  223. package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
  224. package/.next/server/app/api/worktrees/[id]/start-polling/route.js +1 -1
  225. package/.next/server/app/api/worktrees/[id]/start-polling/route.js.nft.json +1 -1
  226. package/.next/server/app/api/worktrees/[id]/start-polling/route_client-reference-manifest.js +1 -1
  227. package/.next/server/app/api/worktrees/[id]/tasks/route.js +6 -0
  228. package/.next/server/app/api/worktrees/[id]/tasks/route.js.nft.json +1 -0
  229. package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -0
  230. package/.next/server/app/api/worktrees/[id]/terminal/route.js +1 -1
  231. package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
  232. package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
  233. package/.next/server/app/api/worktrees/[id]/timers/history/route.js +1 -1
  234. package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
  235. package/.next/server/app/api/worktrees/[id]/timers/route.js +1 -1
  236. package/.next/server/app/api/worktrees/[id]/timers/route.js.nft.json +1 -1
  237. package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
  238. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route.js +1 -1
  239. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  240. package/.next/server/app/api/worktrees/[id]/todos/route.js +1 -1
  241. package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
  242. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route.js +1 -1
  243. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
  244. package/.next/server/app/api/worktrees/[id]/tree/route.js +1 -1
  245. package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
  246. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route.js +1 -1
  247. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
  248. package/.next/server/app/api/worktrees/[id]/verify/route.js +4 -0
  249. package/.next/server/app/api/worktrees/[id]/verify/route.js.nft.json +1 -0
  250. package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -0
  251. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route.js +1 -0
  252. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route.js.nft.json +1 -0
  253. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -0
  254. package/.next/server/app/api/worktrees/[id]/verify/runs/route.js +1 -0
  255. package/.next/server/app/api/worktrees/[id]/verify/runs/route.js.nft.json +1 -0
  256. package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -0
  257. package/.next/server/app/api/worktrees/[id]/viewed/route.js +1 -1
  258. package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
  259. package/.next/server/app/api/worktrees/route.js +1 -1
  260. package/.next/server/app/api/worktrees/route.js.nft.json +1 -1
  261. package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
  262. package/.next/server/app/chat/page_client-reference-manifest.js +1 -1
  263. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  264. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  265. package/.next/server/app/more/page_client-reference-manifest.js +1 -1
  266. package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  267. package/.next/server/app/page_client-reference-manifest.js +1 -1
  268. package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
  269. package/.next/server/app/repositories/page.js +1 -1
  270. package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
  271. package/.next/server/app/review/page.js +1 -1
  272. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  273. package/.next/server/app/sessions/page.js +1 -1
  274. package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  275. package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
  276. package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
  277. package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  278. package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
  279. package/.next/server/app/worktrees/[id]/page.js +2 -2
  280. package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
  281. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
  282. package/.next/server/app-paths-manifest.json +37 -27
  283. package/.next/server/chunks/1068.js +1 -1
  284. package/.next/server/chunks/1117.js +1 -1
  285. package/.next/server/chunks/1503.js +2 -0
  286. package/.next/server/chunks/2366.js +1 -0
  287. package/.next/server/chunks/3042.js +1 -1
  288. package/.next/server/chunks/3736.js +1 -1
  289. package/.next/server/chunks/4444.js +1 -1
  290. package/.next/server/chunks/4689.js +25 -0
  291. package/.next/server/chunks/5381.js +50 -10
  292. package/.next/server/chunks/5959.js +3 -3
  293. package/.next/server/chunks/6130.js +1 -1
  294. package/.next/server/chunks/6274.js +13 -0
  295. package/.next/server/chunks/646.js +1 -1
  296. package/.next/server/chunks/8681.js +1 -1
  297. package/.next/server/chunks/8807.js +192 -51
  298. package/.next/server/chunks/8856.js +4 -0
  299. package/.next/server/chunks/9687.js +2 -2
  300. package/.next/server/middleware-manifest.json +5 -5
  301. package/.next/server/pages/500.html +1 -1
  302. package/.next/server/server-reference-manifest.json +1 -1
  303. package/.next/static/chunks/{4560-8ffb0bb19f2ba998.js → 4560-0917ae2e6a0e5400.js} +1 -1
  304. package/.next/static/chunks/{6488-c2a968ec806975c2.js → 6488-f4e447464c9e0e22.js} +1 -1
  305. package/.next/static/chunks/app/api/app/update/route-8440b6c72bed83a1.js +1 -0
  306. package/.next/static/chunks/app/api/app/update-check/route-8440b6c72bed83a1.js +1 -0
  307. package/.next/static/chunks/app/api/assistant/conversation/route-8440b6c72bed83a1.js +1 -0
  308. package/.next/static/chunks/app/api/assistant/current-output/route-8440b6c72bed83a1.js +1 -0
  309. package/.next/static/chunks/app/api/assistant/messages/route-8440b6c72bed83a1.js +1 -0
  310. package/.next/static/chunks/app/api/assistant/session/route-8440b6c72bed83a1.js +1 -0
  311. package/.next/static/chunks/app/api/assistant/start/route-8440b6c72bed83a1.js +1 -0
  312. package/.next/static/chunks/app/api/assistant/terminal/route-8440b6c72bed83a1.js +1 -0
  313. package/.next/static/chunks/app/api/assistant/tools/route-8440b6c72bed83a1.js +1 -0
  314. package/.next/static/chunks/app/api/auth/login/route-8440b6c72bed83a1.js +1 -0
  315. package/.next/static/chunks/app/api/auth/logout/route-8440b6c72bed83a1.js +1 -0
  316. package/.next/static/chunks/app/api/auth/status/route-8440b6c72bed83a1.js +1 -0
  317. package/.next/static/chunks/app/api/daily-summary/route-8440b6c72bed83a1.js +1 -0
  318. package/.next/static/chunks/app/api/daily-summary/status/route-8440b6c72bed83a1.js +1 -0
  319. package/.next/static/chunks/app/api/external-apps/[id]/health/route-8440b6c72bed83a1.js +1 -0
  320. package/.next/static/chunks/app/api/external-apps/[id]/route-8440b6c72bed83a1.js +1 -0
  321. package/.next/static/chunks/app/api/external-apps/route-8440b6c72bed83a1.js +1 -0
  322. package/.next/static/chunks/app/api/fs/browse/route-8440b6c72bed83a1.js +1 -0
  323. package/.next/static/chunks/app/api/fs/recent-paths/route-8440b6c72bed83a1.js +1 -0
  324. package/.next/static/chunks/app/api/hooks/agent-event/route-8440b6c72bed83a1.js +1 -0
  325. package/.next/static/chunks/app/api/hooks/claude-done/route-8440b6c72bed83a1.js +1 -0
  326. package/.next/static/chunks/app/api/metrics/vibe/route-8440b6c72bed83a1.js +1 -0
  327. package/.next/static/chunks/app/api/ollama/models/route-8440b6c72bed83a1.js +1 -0
  328. package/.next/static/chunks/app/api/push/subscriptions/route-8440b6c72bed83a1.js +1 -0
  329. package/.next/static/chunks/app/api/push/vapid/route-8440b6c72bed83a1.js +1 -0
  330. package/.next/static/chunks/app/api/repositories/[id]/route-8440b6c72bed83a1.js +1 -0
  331. package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-8440b6c72bed83a1.js +1 -0
  332. package/.next/static/chunks/app/api/repositories/[id]/todos/route-8440b6c72bed83a1.js +1 -0
  333. package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-8440b6c72bed83a1.js +1 -0
  334. package/.next/static/chunks/app/api/repositories/clone/route-8440b6c72bed83a1.js +1 -0
  335. package/.next/static/chunks/app/api/repositories/excluded/route-8440b6c72bed83a1.js +1 -0
  336. package/.next/static/chunks/app/api/repositories/restore/route-8440b6c72bed83a1.js +1 -0
  337. package/.next/static/chunks/app/api/repositories/route-8440b6c72bed83a1.js +1 -0
  338. package/.next/static/chunks/app/api/repositories/scan/route-8440b6c72bed83a1.js +1 -0
  339. package/.next/static/chunks/app/api/repositories/sync/route-8440b6c72bed83a1.js +1 -0
  340. package/.next/static/chunks/app/api/repositories/validate-path/route-8440b6c72bed83a1.js +1 -0
  341. package/.next/static/chunks/app/api/sidebar/group-order/route-8440b6c72bed83a1.js +1 -0
  342. package/.next/static/chunks/app/api/skills/[id]/route-8440b6c72bed83a1.js +1 -0
  343. package/.next/static/chunks/app/api/skills/installations/route-8440b6c72bed83a1.js +1 -0
  344. package/.next/static/chunks/app/api/skills/operations/route-8440b6c72bed83a1.js +1 -0
  345. package/.next/static/chunks/app/api/skills/reindex/route-8440b6c72bed83a1.js +1 -0
  346. package/.next/static/chunks/app/api/skills/route-8440b6c72bed83a1.js +1 -0
  347. package/.next/static/chunks/app/api/slash-commands/route-8440b6c72bed83a1.js +1 -0
  348. package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-8440b6c72bed83a1.js +1 -0
  349. package/.next/static/chunks/app/api/tasks/[taskId]/route-8440b6c72bed83a1.js +1 -0
  350. package/.next/static/chunks/app/api/templates/[id]/route-8440b6c72bed83a1.js +1 -0
  351. package/.next/static/chunks/app/api/templates/route-8440b6c72bed83a1.js +1 -0
  352. package/.next/static/chunks/app/api/todos/route-8440b6c72bed83a1.js +1 -0
  353. package/.next/static/chunks/app/api/verification/runs/[runId]/route-8440b6c72bed83a1.js +1 -0
  354. package/.next/static/chunks/app/api/verification/runs/route-8440b6c72bed83a1.js +1 -0
  355. package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-8440b6c72bed83a1.js +1 -0
  356. package/.next/static/chunks/app/api/worktrees/[id]/capture/route-8440b6c72bed83a1.js +1 -0
  357. package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-8440b6c72bed83a1.js +1 -0
  358. package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-8440b6c72bed83a1.js +1 -0
  359. package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-8440b6c72bed83a1.js +1 -0
  360. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-8440b6c72bed83a1.js +1 -0
  361. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-8440b6c72bed83a1.js +1 -0
  362. package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-8440b6c72bed83a1.js +1 -0
  363. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-8440b6c72bed83a1.js +1 -0
  364. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-8440b6c72bed83a1.js +1 -0
  365. package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-8440b6c72bed83a1.js +1 -0
  366. package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-8440b6c72bed83a1.js +1 -0
  367. package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-8440b6c72bed83a1.js +1 -0
  368. package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-8440b6c72bed83a1.js +1 -0
  369. package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-8440b6c72bed83a1.js +1 -0
  370. package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-8440b6c72bed83a1.js +1 -0
  371. package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-8440b6c72bed83a1.js +1 -0
  372. package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-8440b6c72bed83a1.js +1 -0
  373. package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-8440b6c72bed83a1.js +1 -0
  374. package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-8440b6c72bed83a1.js +1 -0
  375. package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-8440b6c72bed83a1.js +1 -0
  376. package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-8440b6c72bed83a1.js +1 -0
  377. package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-8440b6c72bed83a1.js +1 -0
  378. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-8440b6c72bed83a1.js +1 -0
  379. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-8440b6c72bed83a1.js +1 -0
  380. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-8440b6c72bed83a1.js +1 -0
  381. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-8440b6c72bed83a1.js +1 -0
  382. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-8440b6c72bed83a1.js +1 -0
  383. package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-8440b6c72bed83a1.js +1 -0
  384. package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-8440b6c72bed83a1.js +1 -0
  385. package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-8440b6c72bed83a1.js +1 -0
  386. package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-8440b6c72bed83a1.js +1 -0
  387. package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-8440b6c72bed83a1.js +1 -0
  388. package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-8440b6c72bed83a1.js +1 -0
  389. package/.next/static/chunks/app/api/worktrees/[id]/logs/route-8440b6c72bed83a1.js +1 -0
  390. package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-8440b6c72bed83a1.js +1 -0
  391. package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-8440b6c72bed83a1.js +1 -0
  392. package/.next/static/chunks/app/api/worktrees/[id]/memos/route-8440b6c72bed83a1.js +1 -0
  393. package/.next/static/chunks/app/api/worktrees/[id]/messages/route-8440b6c72bed83a1.js +1 -0
  394. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-8440b6c72bed83a1.js +1 -0
  395. package/.next/static/chunks/app/api/worktrees/[id]/respond/route-8440b6c72bed83a1.js +1 -0
  396. package/.next/static/chunks/app/api/worktrees/[id]/route-8440b6c72bed83a1.js +1 -0
  397. package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-8440b6c72bed83a1.js +1 -0
  398. package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-8440b6c72bed83a1.js +1 -0
  399. package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-8440b6c72bed83a1.js +1 -0
  400. package/.next/static/chunks/app/api/worktrees/[id]/search/route-8440b6c72bed83a1.js +1 -0
  401. package/.next/static/chunks/app/api/worktrees/[id]/send/route-8440b6c72bed83a1.js +1 -0
  402. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-8440b6c72bed83a1.js +1 -0
  403. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-8440b6c72bed83a1.js +1 -0
  404. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-8440b6c72bed83a1.js +1 -0
  405. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-8440b6c72bed83a1.js +1 -0
  406. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-8440b6c72bed83a1.js +1 -0
  407. package/.next/static/chunks/app/api/worktrees/[id]/skills/route-8440b6c72bed83a1.js +1 -0
  408. package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-8440b6c72bed83a1.js +1 -0
  409. package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-8440b6c72bed83a1.js +1 -0
  410. package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-8440b6c72bed83a1.js +1 -0
  411. package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-8440b6c72bed83a1.js +1 -0
  412. package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-8440b6c72bed83a1.js +1 -0
  413. package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-8440b6c72bed83a1.js +1 -0
  414. package/.next/static/chunks/app/api/worktrees/[id]/timers/route-8440b6c72bed83a1.js +1 -0
  415. package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-8440b6c72bed83a1.js +1 -0
  416. package/.next/static/chunks/app/api/worktrees/[id]/todos/route-8440b6c72bed83a1.js +1 -0
  417. package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-8440b6c72bed83a1.js +1 -0
  418. package/.next/static/chunks/app/api/worktrees/[id]/tree/route-8440b6c72bed83a1.js +1 -0
  419. package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-8440b6c72bed83a1.js +1 -0
  420. package/.next/static/chunks/app/api/worktrees/[id]/verify/route-8440b6c72bed83a1.js +1 -0
  421. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-8440b6c72bed83a1.js +1 -0
  422. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-8440b6c72bed83a1.js +1 -0
  423. package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-8440b6c72bed83a1.js +1 -0
  424. package/.next/static/chunks/app/api/worktrees/route-8440b6c72bed83a1.js +1 -0
  425. package/.next/static/chunks/app/manifest.webmanifest/route-8440b6c72bed83a1.js +1 -0
  426. package/.next/static/chunks/app/proxy/[...path]/route-8440b6c72bed83a1.js +1 -0
  427. package/.next/static/chunks/app/repositories/page-1ed1e5a542ecc168.js +1 -0
  428. package/.next/static/chunks/app/review/{page-f431d630097c2e85.js → page-b559bfb11c46931b.js} +1 -1
  429. package/.next/static/chunks/app/sessions/{page-20f07a99db64d2ca.js → page-3fa7e767d0ab3889.js} +1 -1
  430. package/.next/static/chunks/app/worktrees/[id]/page-5ffc84094830babb.js +1 -0
  431. package/.next/static/gR8Sh86RrTynJON8SWkWK/_buildManifest.js +1 -0
  432. package/.next/trace +12 -11
  433. package/.next/types/app/api/hooks/agent-event/route.ts +347 -0
  434. package/.next/types/app/api/metrics/vibe/route.ts +347 -0
  435. package/.next/types/app/api/tasks/[taskId]/cancel/route.ts +347 -0
  436. package/.next/types/app/api/tasks/[taskId]/route.ts +347 -0
  437. package/.next/types/app/api/verification/runs/[runId]/route.ts +347 -0
  438. package/.next/types/app/api/verification/runs/route.ts +347 -0
  439. package/.next/types/app/api/worktrees/[id]/tasks/route.ts +347 -0
  440. package/.next/types/app/api/worktrees/[id]/verify/route.ts +347 -0
  441. package/.next/types/app/api/worktrees/[id]/verify/runs/[runId]/route.ts +347 -0
  442. package/.next/types/app/api/worktrees/[id]/verify/runs/route.ts +347 -0
  443. package/.next/types/routes.d.ts +11 -1
  444. package/.next/types/validator.ts +90 -0
  445. package/dist/cli/commands/report.d.ts +1 -0
  446. package/dist/cli/commands/report.d.ts.map +1 -1
  447. package/dist/cli/commands/report.js +54 -0
  448. package/dist/cli/commands/send.d.ts.map +1 -1
  449. package/dist/cli/commands/send.js +86 -3
  450. package/dist/cli/commands/task.d.ts +11 -0
  451. package/dist/cli/commands/task.d.ts.map +1 -0
  452. package/dist/cli/commands/task.js +126 -0
  453. package/dist/cli/commands/verify.d.ts +19 -0
  454. package/dist/cli/commands/verify.d.ts.map +1 -0
  455. package/dist/cli/commands/verify.js +229 -0
  456. package/dist/cli/commands/wait.d.ts +2 -0
  457. package/dist/cli/commands/wait.d.ts.map +1 -1
  458. package/dist/cli/commands/wait.js +78 -13
  459. package/dist/cli/docs/agent-operations.d.ts +2 -2
  460. package/dist/cli/docs/agent-operations.d.ts.map +1 -1
  461. package/dist/cli/docs/agent-operations.js +92 -3
  462. package/dist/cli/program.d.ts.map +1 -1
  463. package/dist/cli/program.js +6 -0
  464. package/dist/cli/types/api-responses.d.ts +170 -0
  465. package/dist/cli/types/api-responses.d.ts.map +1 -1
  466. package/dist/cli/types/index.d.ts +82 -0
  467. package/dist/cli/types/index.d.ts.map +1 -1
  468. package/dist/cli/types/index.js +30 -1
  469. package/dist/cli/utils/api-client.d.ts +8 -0
  470. package/dist/cli/utils/api-client.d.ts.map +1 -1
  471. package/dist/cli/utils/verify-runner.d.ts +57 -0
  472. package/dist/cli/utils/verify-runner.d.ts.map +1 -0
  473. package/dist/cli/utils/verify-runner.js +174 -0
  474. package/dist/server/server.js +15 -0
  475. package/dist/server/src/config/auto-yes-config.js +22 -0
  476. package/dist/server/src/lib/auto-yes-poller.js +34 -2
  477. package/dist/server/src/lib/auto-yes-state.js +6 -19
  478. package/dist/server/src/lib/db/db.js +34 -1
  479. package/dist/server/src/lib/db/migrations/index.js +6 -0
  480. package/dist/server/src/lib/db/migrations/runner.js +1 -1
  481. package/dist/server/src/lib/db/migrations/v49-verification-runs.js +86 -0
  482. package/dist/server/src/lib/db/migrations/v50-tasks.js +68 -0
  483. package/dist/server/src/lib/db/migrations/v51-task-events.js +58 -0
  484. package/dist/server/src/lib/db/task-events-db.js +59 -0
  485. package/dist/server/src/lib/db/tasks-db.js +218 -0
  486. package/dist/server/src/lib/db/verification-db.js +272 -0
  487. package/dist/server/src/lib/polling/auto-yes-policy.js +117 -0
  488. package/dist/server/src/lib/polling/auto-yes-resolver.js +144 -4
  489. package/dist/server/src/lib/polling/response-checker.js +8 -0
  490. package/dist/server/src/lib/session/agent-event-state.js +46 -0
  491. package/dist/server/src/lib/session/current-output-builder.js +4 -0
  492. package/dist/server/src/lib/session/status-mapping.js +146 -0
  493. package/dist/server/src/lib/tasks/contract-parser.js +385 -0
  494. package/dist/server/src/lib/tasks/task-state-machine.js +183 -0
  495. package/dist/server/src/lib/tasks/task-transition-service.js +106 -0
  496. package/dist/server/src/lib/verification/verification-reconciler.js +49 -0
  497. package/dist/server/src/types/sidebar.js +7 -20
  498. package/package.json +5 -2
  499. package/scripts/hooks/cmate-agent-event.sh +175 -0
  500. package/.next/server/chunks/2064.js +0 -2
  501. package/.next/static/AKqbAyuzbFfg05qpbCI_K/_buildManifest.js +0 -1
  502. package/.next/static/chunks/app/api/app/update/route-55e398bd20e2d7a9.js +0 -1
  503. package/.next/static/chunks/app/api/app/update-check/route-55e398bd20e2d7a9.js +0 -1
  504. package/.next/static/chunks/app/api/assistant/conversation/route-55e398bd20e2d7a9.js +0 -1
  505. package/.next/static/chunks/app/api/assistant/current-output/route-55e398bd20e2d7a9.js +0 -1
  506. package/.next/static/chunks/app/api/assistant/messages/route-55e398bd20e2d7a9.js +0 -1
  507. package/.next/static/chunks/app/api/assistant/session/route-55e398bd20e2d7a9.js +0 -1
  508. package/.next/static/chunks/app/api/assistant/start/route-55e398bd20e2d7a9.js +0 -1
  509. package/.next/static/chunks/app/api/assistant/terminal/route-55e398bd20e2d7a9.js +0 -1
  510. package/.next/static/chunks/app/api/assistant/tools/route-55e398bd20e2d7a9.js +0 -1
  511. package/.next/static/chunks/app/api/auth/login/route-55e398bd20e2d7a9.js +0 -1
  512. package/.next/static/chunks/app/api/auth/logout/route-55e398bd20e2d7a9.js +0 -1
  513. package/.next/static/chunks/app/api/auth/status/route-55e398bd20e2d7a9.js +0 -1
  514. package/.next/static/chunks/app/api/daily-summary/route-55e398bd20e2d7a9.js +0 -1
  515. package/.next/static/chunks/app/api/daily-summary/status/route-55e398bd20e2d7a9.js +0 -1
  516. package/.next/static/chunks/app/api/external-apps/[id]/health/route-55e398bd20e2d7a9.js +0 -1
  517. package/.next/static/chunks/app/api/external-apps/[id]/route-55e398bd20e2d7a9.js +0 -1
  518. package/.next/static/chunks/app/api/external-apps/route-55e398bd20e2d7a9.js +0 -1
  519. package/.next/static/chunks/app/api/fs/browse/route-55e398bd20e2d7a9.js +0 -1
  520. package/.next/static/chunks/app/api/fs/recent-paths/route-55e398bd20e2d7a9.js +0 -1
  521. package/.next/static/chunks/app/api/hooks/claude-done/route-55e398bd20e2d7a9.js +0 -1
  522. package/.next/static/chunks/app/api/ollama/models/route-55e398bd20e2d7a9.js +0 -1
  523. package/.next/static/chunks/app/api/push/subscriptions/route-55e398bd20e2d7a9.js +0 -1
  524. package/.next/static/chunks/app/api/push/vapid/route-55e398bd20e2d7a9.js +0 -1
  525. package/.next/static/chunks/app/api/repositories/[id]/route-55e398bd20e2d7a9.js +0 -1
  526. package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-55e398bd20e2d7a9.js +0 -1
  527. package/.next/static/chunks/app/api/repositories/[id]/todos/route-55e398bd20e2d7a9.js +0 -1
  528. package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-55e398bd20e2d7a9.js +0 -1
  529. package/.next/static/chunks/app/api/repositories/clone/route-55e398bd20e2d7a9.js +0 -1
  530. package/.next/static/chunks/app/api/repositories/excluded/route-55e398bd20e2d7a9.js +0 -1
  531. package/.next/static/chunks/app/api/repositories/restore/route-55e398bd20e2d7a9.js +0 -1
  532. package/.next/static/chunks/app/api/repositories/route-55e398bd20e2d7a9.js +0 -1
  533. package/.next/static/chunks/app/api/repositories/scan/route-55e398bd20e2d7a9.js +0 -1
  534. package/.next/static/chunks/app/api/repositories/sync/route-55e398bd20e2d7a9.js +0 -1
  535. package/.next/static/chunks/app/api/repositories/validate-path/route-55e398bd20e2d7a9.js +0 -1
  536. package/.next/static/chunks/app/api/sidebar/group-order/route-55e398bd20e2d7a9.js +0 -1
  537. package/.next/static/chunks/app/api/skills/[id]/route-55e398bd20e2d7a9.js +0 -1
  538. package/.next/static/chunks/app/api/skills/installations/route-55e398bd20e2d7a9.js +0 -1
  539. package/.next/static/chunks/app/api/skills/operations/route-55e398bd20e2d7a9.js +0 -1
  540. package/.next/static/chunks/app/api/skills/reindex/route-55e398bd20e2d7a9.js +0 -1
  541. package/.next/static/chunks/app/api/skills/route-55e398bd20e2d7a9.js +0 -1
  542. package/.next/static/chunks/app/api/slash-commands/route-55e398bd20e2d7a9.js +0 -1
  543. package/.next/static/chunks/app/api/templates/[id]/route-55e398bd20e2d7a9.js +0 -1
  544. package/.next/static/chunks/app/api/templates/route-55e398bd20e2d7a9.js +0 -1
  545. package/.next/static/chunks/app/api/todos/route-55e398bd20e2d7a9.js +0 -1
  546. package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-55e398bd20e2d7a9.js +0 -1
  547. package/.next/static/chunks/app/api/worktrees/[id]/capture/route-55e398bd20e2d7a9.js +0 -1
  548. package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-55e398bd20e2d7a9.js +0 -1
  549. package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-55e398bd20e2d7a9.js +0 -1
  550. package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-55e398bd20e2d7a9.js +0 -1
  551. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-55e398bd20e2d7a9.js +0 -1
  552. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-55e398bd20e2d7a9.js +0 -1
  553. package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-55e398bd20e2d7a9.js +0 -1
  554. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-55e398bd20e2d7a9.js +0 -1
  555. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-55e398bd20e2d7a9.js +0 -1
  556. package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-55e398bd20e2d7a9.js +0 -1
  557. package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-55e398bd20e2d7a9.js +0 -1
  558. package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-55e398bd20e2d7a9.js +0 -1
  559. package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-55e398bd20e2d7a9.js +0 -1
  560. package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-55e398bd20e2d7a9.js +0 -1
  561. package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-55e398bd20e2d7a9.js +0 -1
  562. package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-55e398bd20e2d7a9.js +0 -1
  563. package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-55e398bd20e2d7a9.js +0 -1
  564. package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-55e398bd20e2d7a9.js +0 -1
  565. package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-55e398bd20e2d7a9.js +0 -1
  566. package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-55e398bd20e2d7a9.js +0 -1
  567. package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-55e398bd20e2d7a9.js +0 -1
  568. package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-55e398bd20e2d7a9.js +0 -1
  569. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-55e398bd20e2d7a9.js +0 -1
  570. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-55e398bd20e2d7a9.js +0 -1
  571. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-55e398bd20e2d7a9.js +0 -1
  572. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-55e398bd20e2d7a9.js +0 -1
  573. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-55e398bd20e2d7a9.js +0 -1
  574. package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-55e398bd20e2d7a9.js +0 -1
  575. package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-55e398bd20e2d7a9.js +0 -1
  576. package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-55e398bd20e2d7a9.js +0 -1
  577. package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-55e398bd20e2d7a9.js +0 -1
  578. package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-55e398bd20e2d7a9.js +0 -1
  579. package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-55e398bd20e2d7a9.js +0 -1
  580. package/.next/static/chunks/app/api/worktrees/[id]/logs/route-55e398bd20e2d7a9.js +0 -1
  581. package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-55e398bd20e2d7a9.js +0 -1
  582. package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-55e398bd20e2d7a9.js +0 -1
  583. package/.next/static/chunks/app/api/worktrees/[id]/memos/route-55e398bd20e2d7a9.js +0 -1
  584. package/.next/static/chunks/app/api/worktrees/[id]/messages/route-55e398bd20e2d7a9.js +0 -1
  585. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-55e398bd20e2d7a9.js +0 -1
  586. package/.next/static/chunks/app/api/worktrees/[id]/respond/route-55e398bd20e2d7a9.js +0 -1
  587. package/.next/static/chunks/app/api/worktrees/[id]/route-55e398bd20e2d7a9.js +0 -1
  588. package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-55e398bd20e2d7a9.js +0 -1
  589. package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-55e398bd20e2d7a9.js +0 -1
  590. package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-55e398bd20e2d7a9.js +0 -1
  591. package/.next/static/chunks/app/api/worktrees/[id]/search/route-55e398bd20e2d7a9.js +0 -1
  592. package/.next/static/chunks/app/api/worktrees/[id]/send/route-55e398bd20e2d7a9.js +0 -1
  593. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-55e398bd20e2d7a9.js +0 -1
  594. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-55e398bd20e2d7a9.js +0 -1
  595. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-55e398bd20e2d7a9.js +0 -1
  596. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-55e398bd20e2d7a9.js +0 -1
  597. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-55e398bd20e2d7a9.js +0 -1
  598. package/.next/static/chunks/app/api/worktrees/[id]/skills/route-55e398bd20e2d7a9.js +0 -1
  599. package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-55e398bd20e2d7a9.js +0 -1
  600. package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-55e398bd20e2d7a9.js +0 -1
  601. package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-55e398bd20e2d7a9.js +0 -1
  602. package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-55e398bd20e2d7a9.js +0 -1
  603. package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-55e398bd20e2d7a9.js +0 -1
  604. package/.next/static/chunks/app/api/worktrees/[id]/timers/route-55e398bd20e2d7a9.js +0 -1
  605. package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-55e398bd20e2d7a9.js +0 -1
  606. package/.next/static/chunks/app/api/worktrees/[id]/todos/route-55e398bd20e2d7a9.js +0 -1
  607. package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-55e398bd20e2d7a9.js +0 -1
  608. package/.next/static/chunks/app/api/worktrees/[id]/tree/route-55e398bd20e2d7a9.js +0 -1
  609. package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-55e398bd20e2d7a9.js +0 -1
  610. package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-55e398bd20e2d7a9.js +0 -1
  611. package/.next/static/chunks/app/api/worktrees/route-55e398bd20e2d7a9.js +0 -1
  612. package/.next/static/chunks/app/manifest.webmanifest/route-55e398bd20e2d7a9.js +0 -1
  613. package/.next/static/chunks/app/proxy/[...path]/route-55e398bd20e2d7a9.js +0 -1
  614. package/.next/static/chunks/app/repositories/page-3c4fb889da48ce24.js +0 -1
  615. package/.next/static/chunks/app/worktrees/[id]/page-59a63a2c013ec1eb.js +0 -1
  616. /package/.next/static/{AKqbAyuzbFfg05qpbCI_K → gR8Sh86RrTynJON8SWkWK}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- "use strict";exports.id=6130,exports.ids=[6130],exports.modules={26838:(a,b,c)=>{c.d(b,{Mj:()=>k,Sw:()=>j,lX:()=>l});var d=c(29021),e=c(33873),f=c(90164);let g=/^v?\d+\.\d+\.\d+$/,h=/^[a-zA-Z0-9.\-\s_v]+$/,i=globalThis.__versionCheckCache??(globalThis.__versionCheckCache={result:null,fetchedAt:0,rateLimitResetAt:null});function j(){return function(){try{let a=(0,d.readFileSync)((0,e.join)(process.cwd(),"package.json"),"utf-8"),b=JSON.parse(a);if("commandmate"===b.name&&"string"==typeof b.version&&b.version.length>0)return b.version;return null}catch{return null}}()??"0.16.0"}function k(){return j()}async function l(){try{var a,b,c;if(null!==i.result&&Date.now()-i.fetchedAt<36e5||i.rateLimitResetAt&&(!(Date.now()>=i.rateLimitResetAt)||(i.rateLimitResetAt=null,0)))return i.result;let d=await fetch("https://api.github.com/repos/Kewton/CommandMate/releases/latest",{headers:{Accept:"application/vnd.github+json","User-Agent":`CommandMate/${k()}`},cache:"no-store",signal:AbortSignal.timeout(5e3)});if(403===d.status)return function(a){let b=a.headers.get("X-RateLimit-Reset");b?i.rateLimitResetAt=1e3*parseInt(b,10):i.rateLimitResetAt=Date.now()+36e5}(d),i.result;if(!d.ok)return i.result;let e=await d.json(),j=k(),l=e.tag_name.replace(/^v/,""),m={hasUpdate:function(a,b){if(!g.test(a)||!g.test(b))return!1;let c=a=>a.replace(/^v/,"").split(".").map(Number),[d,e,f]=c(a),[h,i,j]=c(b);return h!==d?h>d:i!==e?i>e:j>f}(j,e.tag_name),currentVersion:j,latestVersion:l,releaseUrl:(a=e.html_url).startsWith(f.Dk)?a:null,releaseName:(b=e.name,c=e.tag_name,h.test(b)&&b.length<=128?b:c),publishedAt:e.published_at};return i.result=m,i.fetchedAt=Date.now(),m}catch{return i.result}}},88573:(a,b,c)=>{c.d(b,{Lw:()=>s});let d="https://raw.githubusercontent.com/Kewton/commandmate-skills/main/catalog/v1/catalog.json",e=[d],f=/^[A-Za-z0-9/+=_."-]{1,128}$/;var g=c(72626),h=c(13075);let i=(0,g.h)("lib/skills/catalog-client"),j={FETCH_FAILED:"SKILL_CATALOG_FETCH_FAILED",RATE_LIMITED:"SKILL_CATALOG_RATE_LIMITED",OVERSIZED:"SKILL_CATALOG_OVERSIZED",MALFORMED:"SKILL_CATALOG_MALFORMED",INVALID_SCHEMA:"SKILL_CATALOG_INVALID_SCHEMA"},k=globalThis.__skillCatalogCache??={catalog:null,validatedAt:0,confirmedAt:0,etag:null,revision:null,rateLimitResetAt:null,inflight:null};class l extends Error{}let m={[j.FETCH_FAILED]:"The Skill Catalog could not be retrieved.",[j.RATE_LIMITED]:"The Skill Catalog origin is rate limiting requests.",[j.OVERSIZED]:"The Skill Catalog response exceeded the allowed size.",[j.MALFORMED]:"The Skill Catalog response was not valid JSON.",[j.INVALID_SCHEMA]:"The Skill Catalog response did not match the supported Catalog schema."};function n(a){return new Date(a).toISOString()}function o(a,b,c){return{catalog:a,fetchedAt:n(k.validatedAt),revalidatedAt:n(k.confirmedAt),state:b,stale:"stale"===b,offline:"stale"===b,staleReason:c,source:{repository:"Kewton/commandmate-skills",ref:"main",revision:k.revision}}}function p(a,b=[]){return k.catalog?{ok:!0,snapshot:o(k.catalog,"stale",a)}:{ok:!1,failure:{code:a,message:m[a],errors:b}}}async function q(a,b){let c=a.headers.get("Content-Length");if(null!==c){let a=Number(c);if(!Number.isFinite(a)||a<0||a>b)throw new l("content-length out of bounds")}let d=a.body;if(!d||"function"!=typeof d.getReader){let c=await a.text();if(new TextEncoder().encode(c).length>b)throw new l("body exceeded size cap");return c}let e=d.getReader(),f=[],g=0;for(;;){let{done:a,value:c}=await e.read();if(a)break;if(c){if((g+=c.byteLength)>b)throw await e.cancel(),new l("body exceeded size cap");f.push(c)}}let h=new Uint8Array(g),i=0;for(let a of f)h.set(a,i),i+=a.byteLength;return new TextDecoder("utf-8").decode(h)}async function r(a){let b,c,g;if(!e.includes(d))return p(j.FETCH_FAILED);let m={Accept:"application/json","User-Agent":`CommandMate/${a}`};null!==k.catalog&&null!==k.etag&&(m["If-None-Match"]=k.etag);try{b=await fetch(d,{headers:m,cache:"no-store",signal:AbortSignal.timeout(5e3)})}catch{return i.warn("catalog-fetch-failed",{reason:j.FETCH_FAILED}),p(j.FETCH_FAILED)}if(304===b.status&&null!==k.catalog)return k.confirmedAt=Date.now(),{ok:!0,snapshot:o(k.catalog,"revalidated",null)};if(403===b.status||429===b.status)return!function(a){let b=Date.now(),c=b+864e5,d=a.headers.get("X-RateLimit-Reset");if(null!==d){let a=Number(d);if(Number.isFinite(a)&&a>0){k.rateLimitResetAt=Math.min(1e3*a,c);return}}let e=a.headers.get("Retry-After");if(null!==e){let a=Number(e);if(Number.isFinite(a)&&a>0){k.rateLimitResetAt=Math.min(b+1e3*a,c);return}}k.rateLimitResetAt=b+36e5}(b),i.warn("catalog-rate-limited",{status:b.status}),p(j.RATE_LIMITED);if(!b.ok)return i.warn("catalog-fetch-failed",{status:b.status}),p(j.FETCH_FAILED);try{c=await q(b,1048576)}catch(b){let a=b instanceof l?j.OVERSIZED:j.FETCH_FAILED;return i.warn("catalog-body-rejected",{reason:a}),p(a)}try{g=JSON.parse(c)}catch{return i.warn("catalog-malformed",{reason:j.MALFORMED}),p(j.MALFORMED)}let n=(0,h.JJ)(g);if(!n.ok)return i.warn("catalog-invalid-schema",{errorCount:n.errors.length}),p(j.INVALID_SCHEMA,n.errors);let r=Date.now();return k.catalog=n.value,k.validatedAt=r,k.confirmedAt=r,k.etag=b.headers.get("ETag"),k.revision=function(a){if(null===a)return null;let b=a.trim();return f.test(b)?b:null}(k.etag),{ok:!0,snapshot:o(n.value,"fresh",null)}}async function s(a={}){let{hostVersion:b="0.0.0",forceRevalidate:c=!1}=a;return!c&&null!==k.catalog&&Date.now()-k.confirmedAt<9e5&&null!==k.catalog?{ok:!0,snapshot:o(k.catalog,"cached",null)}:null!==k.rateLimitResetAt&&(!(Date.now()>=k.rateLimitResetAt)||(k.rateLimitResetAt=null,0))?p(j.RATE_LIMITED):(null===k.inflight&&(k.inflight=r(b).finally(()=>{k.inflight=null})),k.inflight)}},90164:(a,b,c)=>{c.d(b,{Dk:()=>e,kD:()=>f});let d="https://github.com/Kewton/CommandMate",e=`${d}/releases/`,f=`${d}/blob/main/docs/security-guide.md`}};
1
+ "use strict";exports.id=6130,exports.ids=[6130],exports.modules={26838:(a,b,c)=>{c.d(b,{Mj:()=>k,Sw:()=>j,lX:()=>l});var d=c(29021),e=c(33873),f=c(90164);let g=/^v?\d+\.\d+\.\d+$/,h=/^[a-zA-Z0-9.\-\s_v]+$/,i=globalThis.__versionCheckCache??(globalThis.__versionCheckCache={result:null,fetchedAt:0,rateLimitResetAt:null});function j(){return function(){try{let a=(0,d.readFileSync)((0,e.join)(process.cwd(),"package.json"),"utf-8"),b=JSON.parse(a);if("commandmate"===b.name&&"string"==typeof b.version&&b.version.length>0)return b.version;return null}catch{return null}}()??"0.17.0"}function k(){return j()}async function l(){try{var a,b,c;if(null!==i.result&&Date.now()-i.fetchedAt<36e5||i.rateLimitResetAt&&(!(Date.now()>=i.rateLimitResetAt)||(i.rateLimitResetAt=null,0)))return i.result;let d=await fetch("https://api.github.com/repos/Kewton/CommandMate/releases/latest",{headers:{Accept:"application/vnd.github+json","User-Agent":`CommandMate/${k()}`},cache:"no-store",signal:AbortSignal.timeout(5e3)});if(403===d.status)return function(a){let b=a.headers.get("X-RateLimit-Reset");b?i.rateLimitResetAt=1e3*parseInt(b,10):i.rateLimitResetAt=Date.now()+36e5}(d),i.result;if(!d.ok)return i.result;let e=await d.json(),j=k(),l=e.tag_name.replace(/^v/,""),m={hasUpdate:function(a,b){if(!g.test(a)||!g.test(b))return!1;let c=a=>a.replace(/^v/,"").split(".").map(Number),[d,e,f]=c(a),[h,i,j]=c(b);return h!==d?h>d:i!==e?i>e:j>f}(j,e.tag_name),currentVersion:j,latestVersion:l,releaseUrl:(a=e.html_url).startsWith(f.Dk)?a:null,releaseName:(b=e.name,c=e.tag_name,h.test(b)&&b.length<=128?b:c),publishedAt:e.published_at};return i.result=m,i.fetchedAt=Date.now(),m}catch{return i.result}}},88573:(a,b,c)=>{c.d(b,{Lw:()=>s});let d="https://raw.githubusercontent.com/Kewton/commandmate-skills/main/catalog/v1/catalog.json",e=[d],f=/^[A-Za-z0-9/+=_."-]{1,128}$/;var g=c(72626),h=c(13075);let i=(0,g.h)("lib/skills/catalog-client"),j={FETCH_FAILED:"SKILL_CATALOG_FETCH_FAILED",RATE_LIMITED:"SKILL_CATALOG_RATE_LIMITED",OVERSIZED:"SKILL_CATALOG_OVERSIZED",MALFORMED:"SKILL_CATALOG_MALFORMED",INVALID_SCHEMA:"SKILL_CATALOG_INVALID_SCHEMA"},k=globalThis.__skillCatalogCache??={catalog:null,validatedAt:0,confirmedAt:0,etag:null,revision:null,rateLimitResetAt:null,inflight:null};class l extends Error{}let m={[j.FETCH_FAILED]:"The Skill Catalog could not be retrieved.",[j.RATE_LIMITED]:"The Skill Catalog origin is rate limiting requests.",[j.OVERSIZED]:"The Skill Catalog response exceeded the allowed size.",[j.MALFORMED]:"The Skill Catalog response was not valid JSON.",[j.INVALID_SCHEMA]:"The Skill Catalog response did not match the supported Catalog schema."};function n(a){return new Date(a).toISOString()}function o(a,b,c){return{catalog:a,fetchedAt:n(k.validatedAt),revalidatedAt:n(k.confirmedAt),state:b,stale:"stale"===b,offline:"stale"===b,staleReason:c,source:{repository:"Kewton/commandmate-skills",ref:"main",revision:k.revision}}}function p(a,b=[]){return k.catalog?{ok:!0,snapshot:o(k.catalog,"stale",a)}:{ok:!1,failure:{code:a,message:m[a],errors:b}}}async function q(a,b){let c=a.headers.get("Content-Length");if(null!==c){let a=Number(c);if(!Number.isFinite(a)||a<0||a>b)throw new l("content-length out of bounds")}let d=a.body;if(!d||"function"!=typeof d.getReader){let c=await a.text();if(new TextEncoder().encode(c).length>b)throw new l("body exceeded size cap");return c}let e=d.getReader(),f=[],g=0;for(;;){let{done:a,value:c}=await e.read();if(a)break;if(c){if((g+=c.byteLength)>b)throw await e.cancel(),new l("body exceeded size cap");f.push(c)}}let h=new Uint8Array(g),i=0;for(let a of f)h.set(a,i),i+=a.byteLength;return new TextDecoder("utf-8").decode(h)}async function r(a){let b,c,g;if(!e.includes(d))return p(j.FETCH_FAILED);let m={Accept:"application/json","User-Agent":`CommandMate/${a}`};null!==k.catalog&&null!==k.etag&&(m["If-None-Match"]=k.etag);try{b=await fetch(d,{headers:m,cache:"no-store",signal:AbortSignal.timeout(5e3)})}catch{return i.warn("catalog-fetch-failed",{reason:j.FETCH_FAILED}),p(j.FETCH_FAILED)}if(304===b.status&&null!==k.catalog)return k.confirmedAt=Date.now(),{ok:!0,snapshot:o(k.catalog,"revalidated",null)};if(403===b.status||429===b.status)return!function(a){let b=Date.now(),c=b+864e5,d=a.headers.get("X-RateLimit-Reset");if(null!==d){let a=Number(d);if(Number.isFinite(a)&&a>0){k.rateLimitResetAt=Math.min(1e3*a,c);return}}let e=a.headers.get("Retry-After");if(null!==e){let a=Number(e);if(Number.isFinite(a)&&a>0){k.rateLimitResetAt=Math.min(b+1e3*a,c);return}}k.rateLimitResetAt=b+36e5}(b),i.warn("catalog-rate-limited",{status:b.status}),p(j.RATE_LIMITED);if(!b.ok)return i.warn("catalog-fetch-failed",{status:b.status}),p(j.FETCH_FAILED);try{c=await q(b,1048576)}catch(b){let a=b instanceof l?j.OVERSIZED:j.FETCH_FAILED;return i.warn("catalog-body-rejected",{reason:a}),p(a)}try{g=JSON.parse(c)}catch{return i.warn("catalog-malformed",{reason:j.MALFORMED}),p(j.MALFORMED)}let n=(0,h.JJ)(g);if(!n.ok)return i.warn("catalog-invalid-schema",{errorCount:n.errors.length}),p(j.INVALID_SCHEMA,n.errors);let r=Date.now();return k.catalog=n.value,k.validatedAt=r,k.confirmedAt=r,k.etag=b.headers.get("ETag"),k.revision=function(a){if(null===a)return null;let b=a.trim();return f.test(b)?b:null}(k.etag),{ok:!0,snapshot:o(n.value,"fresh",null)}}async function s(a={}){let{hostVersion:b="0.0.0",forceRevalidate:c=!1}=a;return!c&&null!==k.catalog&&Date.now()-k.confirmedAt<9e5&&null!==k.catalog?{ok:!0,snapshot:o(k.catalog,"cached",null)}:null!==k.rateLimitResetAt&&(!(Date.now()>=k.rateLimitResetAt)||(k.rateLimitResetAt=null,0))?p(j.RATE_LIMITED):(null===k.inflight&&(k.inflight=r(b).finally(()=>{k.inflight=null})),k.inflight)}},90164:(a,b,c)=>{c.d(b,{Dk:()=>e,kD:()=>f});let d="https://github.com/Kewton/CommandMate",e=`${d}/releases/`,f=`${d}/blob/main/docs/security-guide.md`}};
@@ -0,0 +1,13 @@
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
+
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()}
11
+ [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}}}};
@@ -1,4 +1,4 @@
1
- "use strict";exports.id=646,exports.ids=[646],exports.modules={1102:(a,b,c)=>{c.d(b,{m_:()=>i});var d=c(21124),e=c(38301),f=c(23312);function g(a,b,c){return Math.min(Math.max(a,4),Math.max(4,c-b-4))}let h={top:-9999,left:-9999};function i({content:a,placement:b="right",delay:c=100,children:i}){let[j,k]=(0,e.useState)(!1),[l,m]=(0,e.useState)(null),n=(0,e.useRef)(null),o=(0,e.useRef)(null),p=(0,e.useRef)(null),q=(0,e.useCallback)(()=>{null!==p.current&&(clearTimeout(p.current),p.current=null)},[]),r=(0,e.useCallback)(()=>{q(),p.current=setTimeout(()=>{k(!0),p.current=null},c)},[c,q]),s=(0,e.useCallback)(()=>{q(),k(!1),m(null)},[q]);return(0,e.useCallback)(()=>{let a=n.current,c=o.current;if(!a||!c)return;let d=a.getBoundingClientRect(),e=c.getBoundingClientRect();m(function(a,b,c,d){let e,f,h=b.left+b.width/2-c.width/2,i=b.top+b.height/2-c.height/2;switch(a){case"top":e=b.top-c.height-8,f=h;break;case"bottom":e=b.top+b.height+8,f=h;break;case"left":e=i,f=b.left-c.width-8;break;default:e=i,f=b.left+b.width+8}return{top:g(e,c.height,d.height),left:g(f,c.width,d.width)}}(b,{top:d.top,left:d.left,width:d.width,height:d.height},{width:e.width,height:e.height},{width:window.innerWidth,height:window.innerHeight}))},[b]),(0,d.jsxs)("span",{ref:n,"data-testid":"tooltip-wrapper",className:"relative inline-flex",tabIndex:-1,onMouseEnter:r,onMouseLeave:s,children:[i,j&&"undefined"!=typeof document&&(0,f.createPortal)((0,d.jsx)("span",{ref:o,role:"tooltip","aria-hidden":"true","data-placement":b,className:"fixed z-40 whitespace-nowrap px-2 py-1 text-xs font-medium rounded bg-foreground text-background shadow-lg pointer-events-none",style:l??h,children:a}),document.body)]})}},4267:(a,b,c)=>{c.d(b,{fJ:()=>d}),c(17252);let d=["claude","codex","antigravity"]},8509:(a,b,c)=>{c.d(b,{g:()=>h});var d=c(21124);c(38301);var e=c(20481),f=c(5772),g=c(12480);function h(){let{size:a,setSize:b,isMobile:c}=(0,f.Ps)(),h=(0,e.c)("common");if(c)return null;let i=h("displaySize.ariaLabel");return(0,d.jsxs)("div",{className:"flex items-center",children:[(0,d.jsx)("label",{htmlFor:"pc-display-size",className:"sr-only",children:i}),(0,d.jsx)("select",{id:"pc-display-size","data-testid":"pc-display-size-select","aria-label":i,value:a,onChange:a=>{let c=a.target.value;(0,g.fM)(c)&&b(c)},className:"text-sm bg-transparent text-foreground border border-input rounded-md px-2 py-1 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:g.Uf.map(a=>(0,d.jsx)("option",{value:a,children:h(`displaySize.${a}`)},a))})]})}},17252:(a,b,c)=>{c.d(b,{Ab:()=>e,NL:()=>q,O6:()=>n,XH:()=>d,f_:()=>l,hR:()=>j,lu:()=>o,n6:()=>h,oo:()=>k,pQ:()=>f,sw:()=>m,vz:()=>p});let d=["claude","codex","gemini","vibe-local","opencode","copilot","antigravity"],e=10,f=50,g=/^[a-zA-Z0-9_-]+$/;function h(a){return"string"==typeof a&&a.length>0&&a.length<=64&&g.test(a)}let i={claude:"Claude",codex:"Codex",gemini:"Gemini","vibe-local":"Vibe Local",opencode:"OpenCode",copilot:"Copilot",antigravity:"Antigravity"};function j(a){return d.includes(a)}function k(a){return i[a]??a}function l(a,b="Assistant"){return a&&j(a)?k(a):b}function m(a){let b=a.alias;return"string"==typeof b&&b.trim().length>0?b:k(a.cliTool)}function n(a,b,c){let d=a.find(a=>a.id===b);return d?m(d):k(c)}function o(a){return a.map((a,b)=>({id:a,cliTool:a,alias:k(a),order:b}))}let p=128,q=2097152},67016:(a,b,c)=>{c.d(b,{A7:()=>g,XK:()=>i,dw:()=>h,kA:()=>f});var d=c(17252),e=c(4267);function f(a){return a?a.isWaitingForResponse?"waiting":a.isProcessing?"running":a.isRunning?"ready":"idle":"idle"}function g(a){if(!a)return"idle";let b=Object.values(a).filter(a=>void 0!==a);return 0===b.length?"idle":b.includes("waiting")?"waiting":b.includes("running")?"running":b.includes("generating")?"generating":b.includes("ready")?"ready":"idle"}function h(a,b){return a?Object.entries(a).map(([a,c])=>`${b?.[a]??(0,d.f_)(a,a)}: ${c??"idle"}`).join(", "):""}function i(a){let b=f(void 0!==a.isSessionRunning?{isRunning:a.isSessionRunning??!1,isWaitingForResponse:a.isWaitingForResponse??!1,isProcessing:a.isProcessing??!1}:void 0),c=!!a.lastAssistantMessageAt&&(!a.lastViewedAt||new Date(a.lastAssistantMessageAt)>new Date(a.lastViewedAt)),{cliStatus:g,cliStatusLabels:h}=function(a){let b={},c={},g=a.sessionStatusByInstance;if(!g){for(let g of a.selectedAgents??e.fJ)b[g]=f(a.sessionStatusByCli?.[g]),c[g]=(0,d.oo)(g);return{cliStatus:b,cliStatusLabels:c}}let h=a.agentInstances&&a.agentInstances.length>0?a.agentInstances:(0,d.lu)(a.selectedAgents??e.fJ),i=new Set;for(let a of h)i.add(a.id),b[a.id]=f(g[a.id]),c[a.id]=(0,d.sw)(a);for(let[a,e]of Object.entries(g)){if(i.has(a))continue;let g=f(e);"idle"!==g&&(b[a]=g,c[a]=function(a){let b=d.XH.find(b=>a.startsWith(`${b}-`));if(b){let c=a.slice(b.length+1);return`${(0,d.oo)(b)} ${c}`}return(0,d.f_)(a,a)}(a))}return{cliStatus:b,cliStatusLabels:c}}(a);return{id:a.id,name:a.name,repositoryName:a.repositoryDisplayName??a.repositoryName,status:b,hasUnread:c,lastActivity:a.updatedAt,description:a.description,cliStatus:g,cliStatusLabels:h,worktreePath:a.path}}},81497:(a,b,c)=>{c.d(b,{nR:()=>g});var d=c(21124),e=c(38301),f=c(23312);function g({content:a,delay:b=200,className:c,children:g,metadata:h}){let i=(0,e.useRef)(null),j=(0,e.useRef)(null),k=(0,e.useRef)(null),l=(0,e.useRef)(null),[m,n]=(0,e.useState)(!1),[o,p]=(0,e.useState)({top:-9999,left:-9999}),q=(0,e.useCallback)(()=>{null!==k.current&&(clearTimeout(k.current),k.current=null)},[]),r=(0,e.useCallback)(()=>{let a=i.current;a&&(a.scrollWidth>a.clientWidth||h)&&(q(),k.current=setTimeout(()=>{let b=a.getBoundingClientRect(),c=b.left;l.current={top:b.top,bottom:b.bottom},p({top:b.bottom+4,left:Math.min(b.left,c)}),n(!0),k.current=null},b))},[q,b,h]),s=(0,e.useCallback)(()=>{q(),n(!1)},[q]);return(0,d.jsxs)("span",{ref:i,className:c,onMouseEnter:r,onMouseLeave:s,children:[g??a,m&&"undefined"!=typeof document&&(0,f.createPortal)((0,d.jsxs)("span",{ref:j,role:"tooltip","aria-hidden":"true",className:"fixed z-[9999] max-w-md px-2 py-1 text-xs font-medium rounded bg-foreground text-background shadow-lg pointer-events-none",style:{top:o.top,left:o.left},children:[(0,d.jsx)("span",{className:"block break-all",children:a}),h&&(0,d.jsx)("span",{className:"mt-0.5 block whitespace-pre-line font-normal text-background/70",children:h})]}),document.body)]})}},90646:(a,b,c)=>{c.d(b,{GV:()=>a6});var d=c(21124),e=c(38301),f=c.n(e),g=c(42378),h=c(3991),i=c.n(h),j=c(52761);let k=(0,e.forwardRef)(function({href:a,onClick:b,target:c,...e},f){let h=(0,g.usePathname)(),k=(0,j.Hq)();return(0,d.jsx)(i(),{ref:f,href:a,target:c,onClick:d=>{var e;b?.(d),d.defaultPrevented||0!==(e=d).button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||void 0!==c&&"_self"!==c||/^([a-z][a-z0-9+.-]*:)?\/\//i.test(a)||/^(mailto:|tel:)/i.test(a)||(d.preventDefault(),a!==h&&k.push(a))},...e})});var l=c(20481),m=c(15917),n=c(88285),o=c(97950),p=c(8509),q=c(45523),r=c(70175),s=c(60988);function t(){let{theme:a,setTheme:b}=(0,q.D)(),[c,f]=(0,e.useState)(!1);if(!c)return(0,d.jsx)("div",{"data-testid":"theme-toggle-placeholder",className:"w-8 h-8","aria-hidden":"true"});let g="dark"===a;return(0,d.jsx)("button",{"data-testid":"theme-toggle",onClick:()=>b(g?"light":"dark"),className:"p-1.5 rounded-md text-muted-foreground hover:text-foreground hover:bg-muted transition-colors focus:outline-none focus:ring-2 focus:ring-ring","aria-label":g?"Switch to light mode":"Switch to dark mode",title:g?"Switch to light mode":"Switch to dark mode",children:g?(0,d.jsx)(r.A,{className:"w-5 h-5","data-testid":"theme-icon-sun"}):(0,d.jsx)(s.A,{className:"w-5 h-5","data-testid":"theme-icon-moon"})})}var u=c(67619);function v(){let{status:a}=(0,u.xM)(),b=(0,l.c)("common");if("connected"===a)return null;let c="connecting"===a,e=b(c?"connection.reconnecting":"connection.offline");return(0,d.jsxs)("span",{"data-testid":"connection-status-indicator",role:"status","aria-live":"polite",title:b(c?"connection.reconnectingTooltip":"connection.offlineTooltip"),className:"hidden sm:inline-flex items-center gap-1.5 rounded-full border border-border bg-surface px-2 py-0.5 text-xs text-muted-foreground",children:[(0,d.jsx)("span",{"aria-hidden":"true",className:["w-1.5 h-1.5 rounded-full",c?"bg-warning motion-safe:animate-pulse":"bg-muted-foreground"].join(" ")}),e]})}var w=c(85647),x=c(64632);let y=[{labelKey:"nav.home",href:"/",isActive:a=>"/"===a},{labelKey:"nav.chat",href:"/chat",isActive:a=>a.startsWith("/chat")},{labelKey:"nav.sessions",href:"/sessions",isActive:a=>a.startsWith("/sessions")},{labelKey:"nav.repositoriesShort",href:"/repositories",isActive:a=>a.startsWith("/repositories")},{labelKey:"nav.reviewReport",href:"/review",isActive:a=>a.startsWith("/review")},{labelKey:"nav.more",href:"/more",isActive:a=>a.startsWith("/more")}];function z({title:a="CommandMate"}){let b=(0,g.usePathname)(),c=(0,l.c)("commandPalette"),e=(0,l.c)("common"),{setOpen:h}=(0,x.C)(),[i,j]=f().useState(null);return(0,d.jsx)("header",{className:"sticky top-0 z-50 border-b border-border bg-background supports-[backdrop-filter]:bg-background/80 backdrop-blur-md",children:(0,d.jsx)("div",{className:"container-custom",children:(0,d.jsxs)("div",{className:"flex items-center justify-between h-16",children:[(0,d.jsx)("div",{className:"flex items-center space-x-4",children:(0,d.jsxs)(k,{href:"/",className:"flex items-center space-x-2 hover:opacity-80 transition-opacity",children:[(0,d.jsx)("div",{className:"w-8 h-8 bg-accent-600 rounded-lg flex items-center justify-center",children:(0,d.jsx)(m.A,{size:20,strokeWidth:2,className:"text-white","aria-hidden":"true"})}),(0,d.jsx)("h1",{className:"text-xl font-bold text-foreground",children:a})]})}),(0,d.jsxs)("nav",{className:"flex items-center space-x-6",role:"navigation",children:[y.map(a=>{let c=a.isActive(b);return(0,d.jsx)(k,{href:a.href,"aria-current":c?"page":void 0,className:`relative py-1 text-sm font-medium transition-colors after:absolute after:inset-x-0 after:bottom-0 after:h-0.5 after:rounded-full after:bg-accent-600 dark:after:bg-accent-400 after:origin-center motion-safe:after:transition-transform after:duration-200 after:ease-[var(--motion-ease-out)] ${c?"text-accent-600 dark:text-accent-400 after:scale-x-100":"text-muted-foreground hover:text-foreground after:scale-x-0"}`,children:e(a.labelKey)},a.href)}),(0,d.jsxs)("button",{type:"button","data-testid":"header-command-palette-trigger",onClick:()=>h(!0),"aria-label":c("mobileTrigger"),className:"hidden md:inline-flex items-center gap-2 rounded-md border border-border bg-surface px-2.5 py-1.5 text-sm text-muted-foreground hover:bg-surface-2 transition-colors",children:[(0,d.jsx)(n.A,{size:16,strokeWidth:2,"aria-hidden":"true",className:"shrink-0"}),(0,d.jsx)("span",{children:c("searchAction")}),i&&(0,d.jsxs)("span",{className:"flex items-center gap-0.5",children:[(0,d.jsx)(w.u,{children:i}),(0,d.jsx)(w.u,{children:"K"})]})]}),(0,d.jsx)(v,{}),(0,d.jsx)(p.g,{}),(0,d.jsx)(t,{}),(0,d.jsxs)("a",{href:"https://github.com/kewton/MyCodeBranchDesk",target:"_blank",rel:"noopener noreferrer",className:"text-sm font-medium text-muted-foreground hover:text-foreground transition-colors flex items-center space-x-1",children:[(0,d.jsx)(o.A,{size:20,strokeWidth:2,"aria-hidden":"true"}),(0,d.jsx)("span",{children:"GitHub"})]})]})]})})})}var A=c(81092),B=c(90076);let C={showSidebar:!0,showGlobalNav:!0,showLocalNav:!1,autoCollapseSidebar:!1},D=[{prefix:"/worktrees/",config:{showGlobalNav:!1,showLocalNav:!0}},{prefix:"/sessions",config:{autoCollapseSidebar:!0}}];var E=c(5772),F=c(65828),G=c(10366),H=c(99615),I=c(22023),J=c(47817),K=c(23312),L=c.n(K),M=c(67016),N=c(22317);let O=(0,e.memo)(function({status:a,label:b}){return(0,d.jsx)(N.m,{"data-testid":"status-indicator",status:a,label:b,size:"lg"})});function P({id:a,branch:b,isVisible:c,anchorRef:f}){let[g,h]=(0,e.useState)({top:-9999,left:-9999}),i=(0,e.useRef)(null);if("undefined"==typeof document||!c)return null;let j=Math.min(384,Math.max(0,window.innerWidth-16));return L().createPortal((0,d.jsxs)("div",{ref:i,id:a,role:"tooltip",className:" fixed z-[9999] px-3 py-2 rounded-md shadow-lg bg-sidebar text-xs text-sidebar-foreground border border-sidebar-border pointer-events-none max-w-sm transition-opacity duration-150 ",style:{top:g.top,left:g.left,maxWidth:j},children:[(0,d.jsx)("p",{className:"font-medium text-sidebar-foreground whitespace-nowrap",children:b.name}),(0,d.jsx)("p",{className:"text-sidebar-muted whitespace-nowrap",children:b.repositoryName}),(0,d.jsxs)("p",{className:"text-sidebar-muted whitespace-nowrap",children:["Status: ",b.status]}),b.worktreePath&&(0,d.jsx)("p",{className:"text-sidebar-muted truncate",children:b.worktreePath}),b.description&&(0,d.jsx)("p",{className:"text-sidebar-muted mt-1 border-t border-sidebar-border pt-1 whitespace-pre-wrap break-words",children:b.description})]}),document.body)}let Q=0,R=(0,e.memo)(function({branch:a,isSelected:b,onClick:c,showRepositoryName:f=!0}){let g=(0,l.c)("common"),h=`tooltip-${a.id}`,i=(0,e.useRef)(null),[j,k]=(0,e.useState)(!1),m=(0,e.useRef)(null),n=(0,e.useCallback)(()=>{null!==m.current&&(clearTimeout(m.current),m.current=null)},[]);(0,e.useEffect)(()=>()=>n(),[n]);let o=j&&!b;return(0,e.useEffect)(()=>{b&&k(!1)},[b]),(0,e.useEffect)(()=>{if(!j)return;let a=()=>k(!1);return document.addEventListener("click",a),()=>document.removeEventListener("click",a)},[j]),(0,d.jsxs)("button",{ref:i,"data-testid":"branch-list-item",onClick:()=>{n(),Q=Date.now()+400,k(!1),c()},onMouseEnter:()=>{n(),Date.now()>=Q&&(m.current=setTimeout(()=>{k(!0)},150))},onMouseLeave:()=>{n(),k(!1)},onFocus:a=>{n(),a.target.matches(":focus-visible")&&(m.current=setTimeout(()=>{k(!0)},150))},onBlur:()=>{n(),k(!1)},"aria-current":b?"true":void 0,"aria-describedby":o?h:void 0,"aria-label":f?void 0:`${a.name} - ${a.repositoryName}`,className:`
1
+ "use strict";exports.id=646,exports.ids=[646],exports.modules={1102:(a,b,c)=>{c.d(b,{m_:()=>i});var d=c(21124),e=c(38301),f=c(23312);function g(a,b,c){return Math.min(Math.max(a,4),Math.max(4,c-b-4))}let h={top:-9999,left:-9999};function i({content:a,placement:b="right",delay:c=100,children:i}){let[j,k]=(0,e.useState)(!1),[l,m]=(0,e.useState)(null),n=(0,e.useRef)(null),o=(0,e.useRef)(null),p=(0,e.useRef)(null),q=(0,e.useCallback)(()=>{null!==p.current&&(clearTimeout(p.current),p.current=null)},[]),r=(0,e.useCallback)(()=>{q(),p.current=setTimeout(()=>{k(!0),p.current=null},c)},[c,q]),s=(0,e.useCallback)(()=>{q(),k(!1),m(null)},[q]);return(0,e.useCallback)(()=>{let a=n.current,c=o.current;if(!a||!c)return;let d=a.getBoundingClientRect(),e=c.getBoundingClientRect();m(function(a,b,c,d){let e,f,h=b.left+b.width/2-c.width/2,i=b.top+b.height/2-c.height/2;switch(a){case"top":e=b.top-c.height-8,f=h;break;case"bottom":e=b.top+b.height+8,f=h;break;case"left":e=i,f=b.left-c.width-8;break;default:e=i,f=b.left+b.width+8}return{top:g(e,c.height,d.height),left:g(f,c.width,d.width)}}(b,{top:d.top,left:d.left,width:d.width,height:d.height},{width:e.width,height:e.height},{width:window.innerWidth,height:window.innerHeight}))},[b]),(0,d.jsxs)("span",{ref:n,"data-testid":"tooltip-wrapper",className:"relative inline-flex",tabIndex:-1,onMouseEnter:r,onMouseLeave:s,children:[i,j&&"undefined"!=typeof document&&(0,f.createPortal)((0,d.jsx)("span",{ref:o,role:"tooltip","aria-hidden":"true","data-placement":b,className:"fixed z-40 whitespace-nowrap px-2 py-1 text-xs font-medium rounded bg-foreground text-background shadow-lg pointer-events-none",style:l??h,children:a}),document.body)]})}},4267:(a,b,c)=>{c.d(b,{fJ:()=>d}),c(17252);let d=["claude","codex","antigravity"]},8509:(a,b,c)=>{c.d(b,{g:()=>h});var d=c(21124);c(38301);var e=c(20481),f=c(5772),g=c(12480);function h(){let{size:a,setSize:b,isMobile:c}=(0,f.Ps)(),h=(0,e.c)("common");if(c)return null;let i=h("displaySize.ariaLabel");return(0,d.jsxs)("div",{className:"flex items-center",children:[(0,d.jsx)("label",{htmlFor:"pc-display-size",className:"sr-only",children:i}),(0,d.jsx)("select",{id:"pc-display-size","data-testid":"pc-display-size-select","aria-label":i,value:a,onChange:a=>{let c=a.target.value;(0,g.fM)(c)&&b(c)},className:"text-sm bg-transparent text-foreground border border-input rounded-md px-2 py-1 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:g.Uf.map(a=>(0,d.jsx)("option",{value:a,children:h(`displaySize.${a}`)},a))})]})}},17252:(a,b,c)=>{c.d(b,{Ab:()=>e,NL:()=>q,O6:()=>n,XH:()=>d,f_:()=>l,hR:()=>j,lu:()=>o,n6:()=>h,oo:()=>k,pQ:()=>f,sw:()=>m,vz:()=>p});let d=["claude","codex","gemini","vibe-local","opencode","copilot","antigravity"],e=10,f=50,g=/^[a-zA-Z0-9_-]+$/;function h(a){return"string"==typeof a&&a.length>0&&a.length<=64&&g.test(a)}let i={claude:"Claude",codex:"Codex",gemini:"Gemini","vibe-local":"Vibe Local",opencode:"OpenCode",copilot:"Copilot",antigravity:"Antigravity"};function j(a){return d.includes(a)}function k(a){return i[a]??a}function l(a,b="Assistant"){return a&&j(a)?k(a):b}function m(a){let b=a.alias;return"string"==typeof b&&b.trim().length>0?b:k(a.cliTool)}function n(a,b,c){let d=a.find(a=>a.id===b);return d?m(d):k(c)}function o(a){return a.map((a,b)=>({id:a,cliTool:a,alias:k(a),order:b}))}let p=128,q=2097152},65899:(a,b,c)=>{c.d(b,{A7:()=>g,kA:()=>f,dw:()=>h,XK:()=>i});var d=c(17252),e=c(4267);function f(a){return a?a.isWaitingForResponse?"waiting":a.isProcessing?"running":a.isRunning?"ready":"idle":"idle"}function g(a){if(!a)return"idle";let b=Object.values(a).filter(a=>void 0!==a);return 0===b.length?"idle":b.includes("waiting")?"waiting":b.includes("running")?"running":b.includes("generating")?"generating":b.includes("ready")?"ready":"idle"}function h(a,b){return a?Object.entries(a).map(([a,c])=>`${b?.[a]??(0,d.f_)(a,a)}: ${c??"idle"}`).join(", "):""}function i(a){let b=f(void 0!==a.isSessionRunning?{isRunning:a.isSessionRunning??!1,isWaitingForResponse:a.isWaitingForResponse??!1,isProcessing:a.isProcessing??!1}:void 0),c=!!a.lastAssistantMessageAt&&(!a.lastViewedAt||new Date(a.lastAssistantMessageAt)>new Date(a.lastViewedAt)),{cliStatus:g,cliStatusLabels:h}=function(a){let b={},c={},g=a.sessionStatusByInstance;if(!g){for(let g of a.selectedAgents??e.fJ)b[g]=f(a.sessionStatusByCli?.[g]),c[g]=(0,d.oo)(g);return{cliStatus:b,cliStatusLabels:c}}let h=a.agentInstances&&a.agentInstances.length>0?a.agentInstances:(0,d.lu)(a.selectedAgents??e.fJ),i=new Set;for(let a of h)i.add(a.id),b[a.id]=f(g[a.id]),c[a.id]=(0,d.sw)(a);for(let[a,e]of Object.entries(g)){if(i.has(a))continue;let g=f(e);"idle"!==g&&(b[a]=g,c[a]=function(a){let b=d.XH.find(b=>a.startsWith(`${b}-`));if(b){let c=a.slice(b.length+1);return`${(0,d.oo)(b)} ${c}`}return(0,d.f_)(a,a)}(a))}return{cliStatus:b,cliStatusLabels:c}}(a);return{id:a.id,name:a.name,repositoryName:a.repositoryDisplayName??a.repositoryName,status:b,hasUnread:c,lastActivity:a.updatedAt,description:a.description,cliStatus:g,cliStatusLabels:h,worktreePath:a.path}}},81497:(a,b,c)=>{c.d(b,{nR:()=>g});var d=c(21124),e=c(38301),f=c(23312);function g({content:a,delay:b=200,className:c,children:g,metadata:h}){let i=(0,e.useRef)(null),j=(0,e.useRef)(null),k=(0,e.useRef)(null),l=(0,e.useRef)(null),[m,n]=(0,e.useState)(!1),[o,p]=(0,e.useState)({top:-9999,left:-9999}),q=(0,e.useCallback)(()=>{null!==k.current&&(clearTimeout(k.current),k.current=null)},[]),r=(0,e.useCallback)(()=>{let a=i.current;a&&(a.scrollWidth>a.clientWidth||h)&&(q(),k.current=setTimeout(()=>{let b=a.getBoundingClientRect(),c=b.left;l.current={top:b.top,bottom:b.bottom},p({top:b.bottom+4,left:Math.min(b.left,c)}),n(!0),k.current=null},b))},[q,b,h]),s=(0,e.useCallback)(()=>{q(),n(!1)},[q]);return(0,d.jsxs)("span",{ref:i,className:c,onMouseEnter:r,onMouseLeave:s,children:[g??a,m&&"undefined"!=typeof document&&(0,f.createPortal)((0,d.jsxs)("span",{ref:j,role:"tooltip","aria-hidden":"true",className:"fixed z-[9999] max-w-md px-2 py-1 text-xs font-medium rounded bg-foreground text-background shadow-lg pointer-events-none",style:{top:o.top,left:o.left},children:[(0,d.jsx)("span",{className:"block break-all",children:a}),h&&(0,d.jsx)("span",{className:"mt-0.5 block whitespace-pre-line font-normal text-background/70",children:h})]}),document.body)]})}},90646:(a,b,c)=>{c.d(b,{GV:()=>a6});var d=c(21124),e=c(38301),f=c.n(e),g=c(42378),h=c(3991),i=c.n(h),j=c(52761);let k=(0,e.forwardRef)(function({href:a,onClick:b,target:c,...e},f){let h=(0,g.usePathname)(),k=(0,j.Hq)();return(0,d.jsx)(i(),{ref:f,href:a,target:c,onClick:d=>{var e;b?.(d),d.defaultPrevented||0!==(e=d).button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||void 0!==c&&"_self"!==c||/^([a-z][a-z0-9+.-]*:)?\/\//i.test(a)||/^(mailto:|tel:)/i.test(a)||(d.preventDefault(),a!==h&&k.push(a))},...e})});var l=c(20481),m=c(15917),n=c(88285),o=c(97950),p=c(8509),q=c(45523),r=c(70175),s=c(60988);function t(){let{theme:a,setTheme:b}=(0,q.D)(),[c,f]=(0,e.useState)(!1);if(!c)return(0,d.jsx)("div",{"data-testid":"theme-toggle-placeholder",className:"w-8 h-8","aria-hidden":"true"});let g="dark"===a;return(0,d.jsx)("button",{"data-testid":"theme-toggle",onClick:()=>b(g?"light":"dark"),className:"p-1.5 rounded-md text-muted-foreground hover:text-foreground hover:bg-muted transition-colors focus:outline-none focus:ring-2 focus:ring-ring","aria-label":g?"Switch to light mode":"Switch to dark mode",title:g?"Switch to light mode":"Switch to dark mode",children:g?(0,d.jsx)(r.A,{className:"w-5 h-5","data-testid":"theme-icon-sun"}):(0,d.jsx)(s.A,{className:"w-5 h-5","data-testid":"theme-icon-moon"})})}var u=c(67619);function v(){let{status:a}=(0,u.xM)(),b=(0,l.c)("common");if("connected"===a)return null;let c="connecting"===a,e=b(c?"connection.reconnecting":"connection.offline");return(0,d.jsxs)("span",{"data-testid":"connection-status-indicator",role:"status","aria-live":"polite",title:b(c?"connection.reconnectingTooltip":"connection.offlineTooltip"),className:"hidden sm:inline-flex items-center gap-1.5 rounded-full border border-border bg-surface px-2 py-0.5 text-xs text-muted-foreground",children:[(0,d.jsx)("span",{"aria-hidden":"true",className:["w-1.5 h-1.5 rounded-full",c?"bg-warning motion-safe:animate-pulse":"bg-muted-foreground"].join(" ")}),e]})}var w=c(85647),x=c(64632);let y=[{labelKey:"nav.home",href:"/",isActive:a=>"/"===a},{labelKey:"nav.chat",href:"/chat",isActive:a=>a.startsWith("/chat")},{labelKey:"nav.sessions",href:"/sessions",isActive:a=>a.startsWith("/sessions")},{labelKey:"nav.repositoriesShort",href:"/repositories",isActive:a=>a.startsWith("/repositories")},{labelKey:"nav.reviewReport",href:"/review",isActive:a=>a.startsWith("/review")},{labelKey:"nav.more",href:"/more",isActive:a=>a.startsWith("/more")}];function z({title:a="CommandMate"}){let b=(0,g.usePathname)(),c=(0,l.c)("commandPalette"),e=(0,l.c)("common"),{setOpen:h}=(0,x.C)(),[i,j]=f().useState(null);return(0,d.jsx)("header",{className:"sticky top-0 z-50 border-b border-border bg-background supports-[backdrop-filter]:bg-background/80 backdrop-blur-md",children:(0,d.jsx)("div",{className:"container-custom",children:(0,d.jsxs)("div",{className:"flex items-center justify-between h-16",children:[(0,d.jsx)("div",{className:"flex items-center space-x-4",children:(0,d.jsxs)(k,{href:"/",className:"flex items-center space-x-2 hover:opacity-80 transition-opacity",children:[(0,d.jsx)("div",{className:"w-8 h-8 bg-accent-600 rounded-lg flex items-center justify-center",children:(0,d.jsx)(m.A,{size:20,strokeWidth:2,className:"text-white","aria-hidden":"true"})}),(0,d.jsx)("h1",{className:"text-xl font-bold text-foreground",children:a})]})}),(0,d.jsxs)("nav",{className:"flex items-center space-x-6",role:"navigation",children:[y.map(a=>{let c=a.isActive(b);return(0,d.jsx)(k,{href:a.href,"aria-current":c?"page":void 0,className:`relative py-1 text-sm font-medium transition-colors after:absolute after:inset-x-0 after:bottom-0 after:h-0.5 after:rounded-full after:bg-accent-600 dark:after:bg-accent-400 after:origin-center motion-safe:after:transition-transform after:duration-200 after:ease-[var(--motion-ease-out)] ${c?"text-accent-600 dark:text-accent-400 after:scale-x-100":"text-muted-foreground hover:text-foreground after:scale-x-0"}`,children:e(a.labelKey)},a.href)}),(0,d.jsxs)("button",{type:"button","data-testid":"header-command-palette-trigger",onClick:()=>h(!0),"aria-label":c("mobileTrigger"),className:"hidden md:inline-flex items-center gap-2 rounded-md border border-border bg-surface px-2.5 py-1.5 text-sm text-muted-foreground hover:bg-surface-2 transition-colors",children:[(0,d.jsx)(n.A,{size:16,strokeWidth:2,"aria-hidden":"true",className:"shrink-0"}),(0,d.jsx)("span",{children:c("searchAction")}),i&&(0,d.jsxs)("span",{className:"flex items-center gap-0.5",children:[(0,d.jsx)(w.u,{children:i}),(0,d.jsx)(w.u,{children:"K"})]})]}),(0,d.jsx)(v,{}),(0,d.jsx)(p.g,{}),(0,d.jsx)(t,{}),(0,d.jsxs)("a",{href:"https://github.com/kewton/MyCodeBranchDesk",target:"_blank",rel:"noopener noreferrer",className:"text-sm font-medium text-muted-foreground hover:text-foreground transition-colors flex items-center space-x-1",children:[(0,d.jsx)(o.A,{size:20,strokeWidth:2,"aria-hidden":"true"}),(0,d.jsx)("span",{children:"GitHub"})]})]})]})})})}var A=c(81092),B=c(90076);let C={showSidebar:!0,showGlobalNav:!0,showLocalNav:!1,autoCollapseSidebar:!1},D=[{prefix:"/worktrees/",config:{showGlobalNav:!1,showLocalNav:!0}},{prefix:"/sessions",config:{autoCollapseSidebar:!0}}];var E=c(5772),F=c(65828),G=c(10366),H=c(99615),I=c(22023),J=c(47817),K=c(23312),L=c.n(K),M=c(65899),N=c(22317);let O=(0,e.memo)(function({status:a,label:b}){return(0,d.jsx)(N.m,{"data-testid":"status-indicator",status:a,label:b,size:"lg"})});function P({id:a,branch:b,isVisible:c,anchorRef:f}){let[g,h]=(0,e.useState)({top:-9999,left:-9999}),i=(0,e.useRef)(null);if("undefined"==typeof document||!c)return null;let j=Math.min(384,Math.max(0,window.innerWidth-16));return L().createPortal((0,d.jsxs)("div",{ref:i,id:a,role:"tooltip",className:" fixed z-[9999] px-3 py-2 rounded-md shadow-lg bg-sidebar text-xs text-sidebar-foreground border border-sidebar-border pointer-events-none max-w-sm transition-opacity duration-150 ",style:{top:g.top,left:g.left,maxWidth:j},children:[(0,d.jsx)("p",{className:"font-medium text-sidebar-foreground whitespace-nowrap",children:b.name}),(0,d.jsx)("p",{className:"text-sidebar-muted whitespace-nowrap",children:b.repositoryName}),(0,d.jsxs)("p",{className:"text-sidebar-muted whitespace-nowrap",children:["Status: ",b.status]}),b.worktreePath&&(0,d.jsx)("p",{className:"text-sidebar-muted truncate",children:b.worktreePath}),b.description&&(0,d.jsx)("p",{className:"text-sidebar-muted mt-1 border-t border-sidebar-border pt-1 whitespace-pre-wrap break-words",children:b.description})]}),document.body)}let Q=0,R=(0,e.memo)(function({branch:a,isSelected:b,onClick:c,showRepositoryName:f=!0}){let g=(0,l.c)("common"),h=`tooltip-${a.id}`,i=(0,e.useRef)(null),[j,k]=(0,e.useState)(!1),m=(0,e.useRef)(null),n=(0,e.useCallback)(()=>{null!==m.current&&(clearTimeout(m.current),m.current=null)},[]);(0,e.useEffect)(()=>()=>n(),[n]);let o=j&&!b;return(0,e.useEffect)(()=>{b&&k(!1)},[b]),(0,e.useEffect)(()=>{if(!j)return;let a=()=>k(!1);return document.addEventListener("click",a),()=>document.removeEventListener("click",a)},[j]),(0,d.jsxs)("button",{ref:i,"data-testid":"branch-list-item",onClick:()=>{n(),Q=Date.now()+400,k(!1),c()},onMouseEnter:()=>{n(),Date.now()>=Q&&(m.current=setTimeout(()=>{k(!0)},150))},onMouseLeave:()=>{n(),k(!1)},onFocus:a=>{n(),a.target.matches(":focus-visible")&&(m.current=setTimeout(()=>{k(!0)},150))},onBlur:()=>{n(),k(!1)},"aria-current":b?"true":void 0,"aria-describedby":o?h:void 0,"aria-label":f?void 0:`${a.name} - ${a.repositoryName}`,className:`
2
2
  group relative w-full px-4 py-3 flex flex-col gap-1
3
3
  hover:bg-sidebar-hover transition-colors
4
4
  focus:outline-none focus:ring-2 focus:ring-inset focus:ring-ring
@@ -1 +1 @@
1
- "use strict";exports.id=8681,exports.ids=[8681],exports.modules={56791:(a,b,c)=>{c.d(b,{AC:()=>d.AC,ug:()=>d.ug,lm:()=>d.lm,KG:()=>d.KG,cD:()=>d.cD,Jj:()=>d.Jj,YX:()=>d.YX,G4:()=>d.G4,hL:()=>d.hL,qp:()=>d.qp,To:()=>d.To,oH:()=>d.oH,py:()=>d.py,yy:()=>d.yy,pE:()=>d.pE,z2:()=>d.z2,cP:()=>d.cP,DF:()=>d.DF,lA:()=>d.lA,Qp:()=>d.Qp,th:()=>d.th,oZ:()=>d.oZ,ZP:()=>d.ZP,Ys:()=>d.Ys,vg:()=>d.vg,Rm:()=>d.Rm,BN:()=>d.BN,m0:()=>d.m0,Tk:()=>d.Tk,iT:()=>d.iT,gp:()=>d.gp,yE:()=>d.yE,BE:()=>d.BE,qK:()=>d.qK,p4:()=>d.p4,r8:()=>d.r8,of:()=>d.of,DN:()=>d.DN,pZ:()=>d.pZ,kA:()=>d.kA,VL:()=>d.VL,CF:()=>d.CF,NV:()=>d.NV,ce:()=>d.ce,y1:()=>d.y1,Nr:()=>d.Nr,ob:()=>d.ob,fr:()=>d.fr,Ui:()=>d.Ui,P9:()=>d.P9,eN:()=>d.eN,vi:()=>d.vi,uJ:()=>d.uJ,yT:()=>d.yT,PL:()=>d.PL,jp:()=>d.jp,nQ:()=>d.nQ,yb:()=>d.yb,GA:()=>d.GA,Cs:()=>d.Cs,xR:()=>d.xR,az:()=>d.az,nZ:()=>d.nZ,PP:()=>d.PP,Dx:()=>d.Dx,O:()=>d.O,EU:()=>d.EU,HZ:()=>d.HZ,UY:()=>d.UY,cw:()=>d.cw,jJ:()=>d.jJ,DC:()=>d.DC,gb:()=>d.gb,yB:()=>d.yB,uy:()=>d.uy,s:()=>d.s,iu:()=>d.iu,hq:()=>d.hq,z1:()=>d.z1,bl:()=>d.bl,jA:()=>d.jA,ZL:()=>d.ZL});var d=c(25537);c(88807),c(71634),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,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$,__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,4 +1,84 @@
1
- "use strict";exports.id=8807,exports.ids=[8807],exports.modules={25537:(a,b,c)=>{function d(a){a.exec(`
1
+ "use strict";exports.id=8807,exports.ids=[8807],exports.modules={28274:(a,b,c)=>{c.d(b,{AC:()=>e,BN:()=>i,Cs:()=>j,m0:()=>h,ug:()=>f});var d=c(15194);class e extends Error{constructor(a,b=d.Ab){super(`Worktree ${a} cannot have more than ${b} agent instances`),this.name="AgentInstanceLimitError"}}class f extends Error{constructor(a){super(a),this.name="InvalidAgentInstanceError"}}function g(a){let b=a.cli_tool_id,c=a.alias&&a.alias.length>0?a.alias:(0,d.hR)(a.cli_tool_id)?(0,d.oo)(b):a.cli_tool_id;return{id:a.instance_id,cliTool:b,alias:c,order:a.sort_order}}function h(a,b){return a.prepare(`
2
+ SELECT worktree_id, instance_id, cli_tool_id, alias, sort_order, created_at
3
+ FROM agent_instances
4
+ WHERE worktree_id = ?
5
+ ORDER BY sort_order ASC, instance_id ASC
6
+ `).all(b).map(g)}function i(a,b,c){let d=a.prepare(`
7
+ SELECT worktree_id, instance_id, cli_tool_id, alias, sort_order, created_at
8
+ FROM agent_instances
9
+ WHERE worktree_id = ? AND instance_id = ?
10
+ `).get(b,c);return d?g(d):null}function j(a,b,c){if(c.length>d.Ab)throw new e(b);let g=new Set;for(let a of c){if(!(0,d.n6)(a.id))throw new f(`Invalid instance id: ${String(a.id)}`);if(!(0,d.hR)(a.cliTool))throw new f(`Invalid CLI tool: ${String(a.cliTool)}`);if("string"==typeof a.alias&&a.alias.length>d.pQ)throw new f(`Alias exceeds ${d.pQ} characters`);if(g.has(a.id))throw new f(`Duplicate instance id: ${a.id}`);g.add(a.id)}let h=Date.now();a.transaction(()=>{a.prepare("DELETE FROM agent_instances WHERE worktree_id = ?").run(b);let d=a.prepare(`
11
+ INSERT INTO agent_instances
12
+ (worktree_id, instance_id, cli_tool_id, alias, sort_order, created_at)
13
+ VALUES (?, ?, ?, ?, ?, ?)
14
+ `);c.forEach((a,c)=>{let e=a.alias??"",f=Number.isInteger(a.order)?a.order:c;d.run(b,a.id,a.cliTool,e,f,h)})})()}},34129:(a,b,c)=>{c.d(b,{$$:()=>m,CR:()=>h,DP:()=>i,GF:()=>n,Ud:()=>l,j2:()=>k,jf:()=>o,kx:()=>j});var d=c(55511),e=c(87374);let f="id, worktree_id, cli_tool_id, instance_id, message, delay_ms, scheduled_send_time, status, created_at, sent_at, error";function g(a){return{id:a.id,worktreeId:a.worktree_id,cliToolId:a.cli_tool_id,instanceId:a.instance_id??a.cli_tool_id,message:a.message,delayMs:a.delay_ms,scheduledSendTime:a.scheduled_send_time,status:a.status,createdAt:a.created_at,sentAt:a.sent_at,error:a.error??null}}function h(a,b){let c=(0,d.randomUUID)(),e=Date.now(),f=e+b.delayMs,g=b.instanceId??b.cliToolId;return a.prepare(`
15
+ INSERT INTO timer_messages (id, worktree_id, cli_tool_id, instance_id, message, delay_ms, scheduled_send_time, status, created_at, sent_at)
16
+ VALUES (?, ?, ?, ?, ?, ?, ?, 'pending', ?, NULL)
17
+ `).run(c,b.worktreeId,b.cliToolId,g,b.message,b.delayMs,f,e),{id:c,worktreeId:b.worktreeId,cliToolId:b.cliToolId,instanceId:g,message:b.message,delayMs:b.delayMs,scheduledSendTime:f,status:"pending",createdAt:e,sentAt:null,error:null}}function i(a,b,c){let{before:d,limit:h=e.XS}=c??{},i=`SELECT ${f} FROM timer_messages WHERE worktree_id = ?`,j=[b];return void 0!==d&&(i+=" AND created_at < ?",j.push(d)),i+=" ORDER BY created_at DESC LIMIT ?",j.push(h+1),a.prepare(i).all(...j).map(g)}function j(a,b){let c=a.prepare(`
18
+ SELECT ${f}
19
+ FROM timer_messages
20
+ WHERE id = ?
21
+ `).get(b);return c?g(c):void 0}function k(a,b,c,d,e){let f=["status = ?"],g=[c];void 0!==d&&(f.push("sent_at = ?"),g.push(d)),void 0!==e&&(f.push("error = ?"),g.push(e)),g.push(b),a.prepare(`UPDATE timer_messages SET ${f.join(", ")} WHERE id = ?`).run(...g)}function l(a,b){return a.prepare(`
22
+ UPDATE timer_messages SET status = 'cancelled' WHERE id = ? AND status = 'pending'
23
+ `).run(b).changes>0}function m(a,b){return a.prepare(`
24
+ UPDATE timer_messages SET status = 'cancelled' WHERE worktree_id = ? AND status = 'pending'
25
+ `).run(b).changes}function n(a,b){return a.prepare(`
26
+ SELECT COUNT(*) as count FROM timer_messages WHERE worktree_id = ? AND status = 'pending'
27
+ `).get(b).count}function o(a,b){return a.prepare(`
28
+ DELETE FROM timer_messages
29
+ WHERE worktree_id = ?
30
+ AND status NOT IN ('pending', 'sending')
31
+ `).run(b).changes}},43167:(a,b,c)=>{c.d(b,{CF:()=>h,gn:()=>i,jA:()=>g,jJ:()=>j,th:()=>k});var d=c(55511);function e(a){return{id:a.id,endpoint:a.endpoint,keys:{p256dh:a.p256dh,auth:a.auth},deviceLabel:a.device_label,enabledPrompt:1===a.enabled_prompt,enabledCompletion:1===a.enabled_completion,locale:a.locale,createdAt:new Date(a.created_at),updatedAt:new Date(a.updated_at)}}let f=`
32
+ id, endpoint, p256dh, auth, device_label,
33
+ enabled_prompt, enabled_completion, locale, created_at, updated_at
34
+ `;function g(a,b){let c=Date.now(),e=b.deviceLabel??null,f=b.locale??null;a.prepare(`
35
+ INSERT INTO push_subscriptions (
36
+ id, endpoint, p256dh, auth, device_label,
37
+ enabled_prompt, enabled_completion, locale, created_at, updated_at
38
+ )
39
+ VALUES (?, ?, ?, ?, ?, 1, 1, ?, ?, ?)
40
+ ON CONFLICT(endpoint) DO UPDATE SET
41
+ p256dh = excluded.p256dh,
42
+ auth = excluded.auth,
43
+ device_label = excluded.device_label,
44
+ locale = COALESCE(excluded.locale, push_subscriptions.locale),
45
+ updated_at = excluded.updated_at
46
+ `).run((0,d.randomUUID)(),b.endpoint,b.p256dh,b.auth,e,f,c,c);let g=h(a,b.endpoint);if(!g)throw Error("Failed to persist push subscription");return g}function h(a,b){let c=a.prepare(`SELECT ${f} FROM push_subscriptions WHERE endpoint = ?`).get(b);return c?e(c):null}function i(a,b){return a.prepare(`SELECT ${f} FROM push_subscriptions WHERE ${"prompt"===b?"enabled_prompt":"enabled_completion"} = 1 ORDER BY created_at ASC`).all().map(e)}function j(a,b,c){let d=["updated_at = ?"],e=[Date.now()];return void 0!==c.enabledPrompt&&(d.push("enabled_prompt = ?"),e.push(+!!c.enabledPrompt)),void 0!==c.enabledCompletion&&(d.push("enabled_completion = ?"),e.push(+!!c.enabledCompletion)),e.push(b),a.prepare(`UPDATE push_subscriptions SET ${d.join(", ")} WHERE endpoint = ?`).run(...e),h(a,b)}function k(a,b){return a.prepare("DELETE FROM push_subscriptions WHERE endpoint = ?").run(b).changes>0}},48524:(a,b,c)=>{c.d(b,{MH:()=>n,UT:()=>i,Vk:()=>k,__:()=>m,gg:()=>j,xZ:()=>l});var d=c(55511);let e=["succeeded","failed","not_started","cancelled"],f=["running","waiting_input","verifying"],g=`
47
+ id, worktree_id, cli_tool_id, instance_id, title, goal, contract_path, contract_json,
48
+ status, last_verification_run_id, created_at, updated_at, started_at, finished_at
49
+ `;function h(a){return{id:a.id,worktreeId:a.worktree_id,cliToolId:a.cli_tool_id,instanceId:a.instance_id,title:a.title,goal:a.goal,contractPath:a.contract_path,contract:JSON.parse(a.contract_json),status:a.status,lastVerificationRunId:a.last_verification_run_id,createdAt:new Date(a.created_at),updatedAt:new Date(a.updated_at),startedAt:null===a.started_at?null:new Date(a.started_at),finishedAt:null===a.finished_at?null:new Date(a.finished_at)}}function i(a,b){let c=Date.now(),e=(0,d.randomUUID)(),f=b.status??"pending";a.prepare(`
50
+ INSERT INTO tasks (
51
+ id, worktree_id, cli_tool_id, instance_id, title, goal, contract_path, contract_json,
52
+ status, last_verification_run_id, created_at, updated_at, started_at, finished_at
53
+ )
54
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, NULL, ?, ?, ?, NULL)
55
+ `).run(e,b.worktreeId,b.cliToolId,b.instanceId??null,b.contract.title,b.contract.goal,b.contractPath??null,JSON.stringify(b.contract),f,c,c,"pending"===f?null:c);let g=j(a,e);if(!g)throw Error("Failed to persist task");return g}function j(a,b){let c=a.prepare(`SELECT ${g} FROM tasks WHERE id = ?`).get(b);return c?h(c):null}function k(a,b,c=20){return a.prepare(`
56
+ SELECT ${g} FROM tasks
57
+ WHERE worktree_id = ?
58
+ ORDER BY created_at DESC, rowid DESC
59
+ LIMIT ?
60
+ `).all(b,c).map(h)}function l(a,b,c,d={}){let f=Date.now();if(0===a.prepare(`
61
+ UPDATE tasks
62
+ SET status = ?,
63
+ updated_at = ?,
64
+ started_at = CASE WHEN ? = 'pending' THEN started_at ELSE COALESCE(started_at, ?) END,
65
+ finished_at = CASE WHEN ? = 1 THEN ? ELSE finished_at END,
66
+ last_verification_run_id = COALESCE(?, last_verification_run_id)
67
+ WHERE id = ?
68
+ `).run(c,f,c,f,+!!e.includes(c),f,d.lastVerificationRunId??null,b).changes)throw Error(`Task ${b} not found`);return j(a,b)}function m(a,b,c,d){let e=["worktree_id = ?"],i=[b];void 0!==c&&(e.push("cli_tool_id = ?"),i.push(c)),void 0!==d&&(e.push("instance_id = ?"),i.push(d));let j=f.map(()=>"?").join(", "),k=a.prepare(`
69
+ SELECT ${g} FROM tasks
70
+ WHERE ${e.join(" AND ")} AND status IN (${j})
71
+ ORDER BY updated_at DESC, created_at DESC, rowid DESC
72
+ LIMIT 1
73
+ `).get(...i,...f);return k?h(k):null}function n(a,b,c,d){let e=d===c,i=f.map(()=>"?").join(", "),j=a.prepare(`
74
+ SELECT ${g} FROM tasks
75
+ WHERE worktree_id = ?
76
+ AND cli_tool_id = ?
77
+ AND (instance_id = ? OR (instance_id IS NULL AND ?))
78
+ AND status IN (${i})
79
+ ORDER BY updated_at DESC, created_at DESC, rowid DESC
80
+ LIMIT 1
81
+ `).get(b,c,d,+!!e,...f);return j?h(j):null}},87374:(a,b,c)=>{c.d(b,{Dr:()=>i,HR:()=>h,Ky:()=>f,XS:()=>e,ms:()=>g,u8:()=>d}),Array.from({length:Math.floor(104)+1},(a,b)=>3e5+3e5*b);let d=5,e=50,f=100,g=1e4,h={PENDING:"pending",SENDING:"sending",SENT:"sent",FAILED:"failed",CANCELLED:"cancelled",NO_SESSION:"no_session"};function i(a){return"number"==typeof a&&a>=3e5&&a<=315e5&&a%3e5==0}},88807:(a,b,c)=>{c.r(b),c.d(b,{closeDbInstance:()=>p,getDbInstance:()=>o});var d=c(33873),e=c.n(d),f=c(92046),g=c(79646),h=c(87550),i=c.n(h);let j=!1;function k(a){return a instanceof Error&&"ERR_DLOPEN_FAILED"===a.code&&a.message.includes("NODE_MODULE_VERSION")}function l(a,b){let c=["better-sqlite3 could not be loaded: it was built for a different Node.js version.","This usually happens after switching Node.js versions (nvm, fnm, Homebrew, ...).","",`Automatic recovery failed: ${a}`,"","How to fix it manually:"];return b?c.push(" The install directory is not writable by the current user, so the addon"," cannot be rebuilt in place. Do not re-run this with sudo — root-owned"," files there will break future installs and updates.",""," Either switch back to the Node.js version CommandMate was installed with:",` node -v (currently ${process.version}, NODE_MODULE_VERSION ${process.versions.modules})`,""," Or reinstall CommandMate under a Node.js version manager, which keeps"," global packages in a user-owned directory:"," nvm use <version> && npm install -g commandmate"):c.push(` 1. cd ${process.cwd()}`," 2. npm rebuild better-sqlite3"," 3. Start CommandMate again",""," If that fails, reinstalling picks up the current Node.js version:"," npm install -g commandmate"),c.join("\n")}var m=c(87447);let n=null;function o(){if(!n){let a=(0,m._$)().CM_DB_PATH,b=c(29021),d=e().dirname(a);b.existsSync(d)||b.mkdirSync(d,{recursive:!0,mode:448});let h=function(a){try{return new(i())(a)}catch(c){if(!k(c))throw c;if(j)throw Error(l("a rebuild was already attempted in this process.",!1));j=!0,console.error("[commandmate] better-sqlite3 was built for a different Node.js version.\n[commandmate] Rebuilding it automatically — this can take a few minutes...");let b=function(){let a=(0,g.spawnSync)("npm",["rebuild","better-sqlite3"],{cwd:process.cwd(),encoding:"utf-8",timeout:3e5,env:{...process.env,PATH:`${e().dirname(process.execPath)}${e().delimiter}${process.env.PATH??""}`}}),b=`${a.stdout??""}${a.stderr??""}`;return a.error||0!==a.status?{success:!1,permissionDenied:/EACCES|permission denied/i.test(b),output:b}:{success:!0,permissionDenied:!1,output:b}}();if(!b.success)throw Error(l("npm rebuild better-sqlite3 failed.",b.permissionDenied));console.error("[commandmate] Rebuild succeeded. Continuing startup.");try{return new(i())(a)}catch(a){if(k(a))throw Error(l("the addon still reports a version mismatch after rebuilding.",!1));throw a}}}(a);h.pragma("foreign_keys = ON"),h.pragma("journal_mode = WAL"),h.pragma("busy_timeout = 5000");try{(0,f.vI)(h)}catch(a){throw h.close(),a}n=h}return n}function p(){n&&(n.close(),n=null)}},90444:(a,b,c)=>{function d(a){a.exec(`
2
82
  CREATE TABLE IF NOT EXISTS worktrees (
3
83
  id TEXT PRIMARY KEY,
4
84
  name TEXT NOT NULL,
@@ -50,7 +130,7 @@
50
130
  PRIMARY KEY (worktree_id, cli_tool_id),
51
131
  FOREIGN KEY (worktree_id) REFERENCES worktrees(id) ON DELETE CASCADE
52
132
  );
53
- `)}c.d(b,{AC:()=>k.AC,ug:()=>k.ug,lm:()=>m,KG:()=>C,cD:()=>X,Jj:()=>Y,YX:()=>i,G4:()=>S,hL:()=>$,qp:()=>U,To:()=>q,oH:()=>f.oH,py:()=>z,yy:()=>H,pE:()=>f.pE,z2:()=>ae,cP:()=>s,DF:()=>f.DF,lA:()=>f.lA,Qp:()=>f.Qp,th:()=>af.th,oZ:()=>e.oZ,ZP:()=>j,Ys:()=>B,vg:()=>J,Rm:()=>e.Rm,BN:()=>k.BN,m0:()=>k.m0,Tk:()=>x,iT:()=>Q,gp:()=>R,yE:()=>Z,BE:()=>W,qK:()=>ac,p4:()=>e.p4,r8:()=>f.r8,of:()=>aa,DN:()=>p,pZ:()=>o,kA:()=>f.kA,VL:()=>f.VL,CF:()=>af.CF,NV:()=>e.NV,ce:()=>ab,y1:()=>g,Nr:()=>y,ob:()=>w,fr:()=>F,Ui:()=>e.Ui,P9:()=>e.P9,eN:()=>G,vi:()=>e.vi,uJ:()=>e.uJ,s4:()=>d,yT:()=>D,PL:()=>f.PL,jp:()=>f.jp,nQ:()=>t,yb:()=>K,GA:()=>e.GA,Cs:()=>k.Cs,xR:()=>T,az:()=>_,nZ:()=>V,PP:()=>ad,Dx:()=>e.Dx,O:()=>e.O,EU:()=>f.EU,HZ:()=>e.HZ,UY:()=>r,cw:()=>f.cw,jJ:()=>af.jJ,DC:()=>e.DC,gb:()=>h,yB:()=>e.yB,uy:()=>A,s:()=>e.s,iu:()=>e.iu,hq:()=>e.hq,z1:()=>e.z1,bl:()=>I,jA:()=>af.jA,ZL:()=>e.ZL});var e=c(73753),f=c(52660);function g(a,b,c="claude"){let d=a.prepare(`
133
+ `)}c.d(b,{AC:()=>k.AC,Tu:()=>as,ug:()=>k.ug,eP:()=>au,mg:()=>at,lm:()=>m,af:()=>ag,KG:()=>C,cD:()=>X,Jj:()=>Y,YX:()=>i,G4:()=>S,hL:()=>$,qp:()=>U,hl:()=>an,To:()=>q,oH:()=>f.oH,UT:()=>ax.UT,py:()=>z,rY:()=>al,yy:()=>H,pE:()=>f.pE,z2:()=>ae,cP:()=>s,DF:()=>f.DF,lA:()=>f.lA,Qp:()=>f.Qp,th:()=>af.th,oZ:()=>e.oZ,ZP:()=>j,Ys:()=>B,vg:()=>J,Rm:()=>e.Rm,C8:()=>ao,u$:()=>am,__:()=>ax.__,MH:()=>ax.MH,BN:()=>k.BN,m0:()=>k.m0,Tk:()=>x,iT:()=>Q,gp:()=>R,yE:()=>Z,BE:()=>W,qK:()=>ac,p4:()=>e.p4,r8:()=>f.r8,of:()=>aa,DN:()=>p,pZ:()=>o,kA:()=>f.kA,VL:()=>f.VL,CF:()=>af.CF,NV:()=>e.NV,ce:()=>ab,WZ:()=>aq,y1:()=>g,gg:()=>ax.gg,Nr:()=>y,ob:()=>w,fr:()=>F,J6:()=>ap,Ui:()=>e.Ui,P9:()=>e.P9,eN:()=>G,vi:()=>e.vi,uJ:()=>e.uJ,s4:()=>d,yT:()=>D,Vk:()=>ax.Vk,Mt:()=>ar,UE:()=>aw,PL:()=>f.PL,jp:()=>f.jp,nQ:()=>t,yb:()=>K,GA:()=>e.GA,Cs:()=>k.Cs,xR:()=>T,az:()=>_,nZ:()=>V,PP:()=>ad,Dx:()=>e.Dx,O:()=>e.O,EU:()=>f.EU,HZ:()=>e.HZ,UY:()=>r,cw:()=>f.cw,jJ:()=>af.jJ,DC:()=>e.DC,gb:()=>h,yB:()=>e.yB,uy:()=>A,s:()=>e.s,iu:()=>e.iu,hq:()=>e.hq,z1:()=>e.z1,bl:()=>I,jA:()=>af.jA,ZL:()=>e.ZL});var e=c(73753),f=c(52660);function g(a,b,c="claude"){let d=a.prepare(`
54
134
  SELECT worktree_id, cli_tool_id, instance_id, last_captured_line, in_progress_message_id
55
135
  FROM session_states
56
136
  WHERE worktree_id = ? AND instance_id = ?
@@ -263,52 +343,49 @@
263
343
  `).run(b,c,d??null)}function ae(a,b){a.prepare(`
264
344
  DELETE FROM assistant_session_states
265
345
  WHERE conversation_id = ?
266
- `).run(b)}c(34129);var af=c(43167)},28274:(a,b,c)=>{c.d(b,{AC:()=>e,BN:()=>i,Cs:()=>j,m0:()=>h,ug:()=>f});var d=c(15194);class e extends Error{constructor(a,b=d.Ab){super(`Worktree ${a} cannot have more than ${b} agent instances`),this.name="AgentInstanceLimitError"}}class f extends Error{constructor(a){super(a),this.name="InvalidAgentInstanceError"}}function g(a){let b=a.cli_tool_id,c=a.alias&&a.alias.length>0?a.alias:(0,d.hR)(a.cli_tool_id)?(0,d.oo)(b):a.cli_tool_id;return{id:a.instance_id,cliTool:b,alias:c,order:a.sort_order}}function h(a,b){return a.prepare(`
267
- SELECT worktree_id, instance_id, cli_tool_id, alias, sort_order, created_at
268
- FROM agent_instances
269
- WHERE worktree_id = ?
270
- ORDER BY sort_order ASC, instance_id ASC
271
- `).all(b).map(g)}function i(a,b,c){let d=a.prepare(`
272
- SELECT worktree_id, instance_id, cli_tool_id, alias, sort_order, created_at
273
- FROM agent_instances
274
- WHERE worktree_id = ? AND instance_id = ?
275
- `).get(b,c);return d?g(d):null}function j(a,b,c){if(c.length>d.Ab)throw new e(b);let g=new Set;for(let a of c){if(!(0,d.n6)(a.id))throw new f(`Invalid instance id: ${String(a.id)}`);if(!(0,d.hR)(a.cliTool))throw new f(`Invalid CLI tool: ${String(a.cliTool)}`);if("string"==typeof a.alias&&a.alias.length>d.pQ)throw new f(`Alias exceeds ${d.pQ} characters`);if(g.has(a.id))throw new f(`Duplicate instance id: ${a.id}`);g.add(a.id)}let h=Date.now();a.transaction(()=>{a.prepare("DELETE FROM agent_instances WHERE worktree_id = ?").run(b);let d=a.prepare(`
276
- INSERT INTO agent_instances
277
- (worktree_id, instance_id, cli_tool_id, alias, sort_order, created_at)
278
- VALUES (?, ?, ?, ?, ?, ?)
279
- `);c.forEach((a,c)=>{let e=a.alias??"",f=Number.isInteger(a.order)?a.order:c;d.run(b,a.id,a.cliTool,e,f,h)})})()}},34129:(a,b,c)=>{c.d(b,{$$:()=>m,CR:()=>h,DP:()=>i,GF:()=>n,Ud:()=>l,j2:()=>k,jf:()=>o,kx:()=>j});var d=c(55511),e=c(87374);let f="id, worktree_id, cli_tool_id, instance_id, message, delay_ms, scheduled_send_time, status, created_at, sent_at, error";function g(a){return{id:a.id,worktreeId:a.worktree_id,cliToolId:a.cli_tool_id,instanceId:a.instance_id??a.cli_tool_id,message:a.message,delayMs:a.delay_ms,scheduledSendTime:a.scheduled_send_time,status:a.status,createdAt:a.created_at,sentAt:a.sent_at,error:a.error??null}}function h(a,b){let c=(0,d.randomUUID)(),e=Date.now(),f=e+b.delayMs,g=b.instanceId??b.cliToolId;return a.prepare(`
280
- INSERT INTO timer_messages (id, worktree_id, cli_tool_id, instance_id, message, delay_ms, scheduled_send_time, status, created_at, sent_at)
281
- VALUES (?, ?, ?, ?, ?, ?, ?, 'pending', ?, NULL)
282
- `).run(c,b.worktreeId,b.cliToolId,g,b.message,b.delayMs,f,e),{id:c,worktreeId:b.worktreeId,cliToolId:b.cliToolId,instanceId:g,message:b.message,delayMs:b.delayMs,scheduledSendTime:f,status:"pending",createdAt:e,sentAt:null,error:null}}function i(a,b,c){let{before:d,limit:h=e.XS}=c??{},i=`SELECT ${f} FROM timer_messages WHERE worktree_id = ?`,j=[b];return void 0!==d&&(i+=" AND created_at < ?",j.push(d)),i+=" ORDER BY created_at DESC LIMIT ?",j.push(h+1),a.prepare(i).all(...j).map(g)}function j(a,b){let c=a.prepare(`
283
- SELECT ${f}
284
- FROM timer_messages
285
- WHERE id = ?
286
- `).get(b);return c?g(c):void 0}function k(a,b,c,d,e){let f=["status = ?"],g=[c];void 0!==d&&(f.push("sent_at = ?"),g.push(d)),void 0!==e&&(f.push("error = ?"),g.push(e)),g.push(b),a.prepare(`UPDATE timer_messages SET ${f.join(", ")} WHERE id = ?`).run(...g)}function l(a,b){return a.prepare(`
287
- UPDATE timer_messages SET status = 'cancelled' WHERE id = ? AND status = 'pending'
288
- `).run(b).changes>0}function m(a,b){return a.prepare(`
289
- UPDATE timer_messages SET status = 'cancelled' WHERE worktree_id = ? AND status = 'pending'
290
- `).run(b).changes}function n(a,b){return a.prepare(`
291
- SELECT COUNT(*) as count FROM timer_messages WHERE worktree_id = ? AND status = 'pending'
292
- `).get(b).count}function o(a,b){return a.prepare(`
293
- DELETE FROM timer_messages
294
- WHERE worktree_id = ?
295
- AND status NOT IN ('pending', 'sending')
296
- `).run(b).changes}},43167:(a,b,c)=>{c.d(b,{CF:()=>h,gn:()=>i,jA:()=>g,jJ:()=>j,th:()=>k});var d=c(55511);function e(a){return{id:a.id,endpoint:a.endpoint,keys:{p256dh:a.p256dh,auth:a.auth},deviceLabel:a.device_label,enabledPrompt:1===a.enabled_prompt,enabledCompletion:1===a.enabled_completion,locale:a.locale,createdAt:new Date(a.created_at),updatedAt:new Date(a.updated_at)}}let f=`
297
- id, endpoint, p256dh, auth, device_label,
298
- enabled_prompt, enabled_completion, locale, created_at, updated_at
299
- `;function g(a,b){let c=Date.now(),e=b.deviceLabel??null,f=b.locale??null;a.prepare(`
300
- INSERT INTO push_subscriptions (
301
- id, endpoint, p256dh, auth, device_label,
302
- enabled_prompt, enabled_completion, locale, created_at, updated_at
303
- )
304
- VALUES (?, ?, ?, ?, ?, 1, 1, ?, ?, ?)
305
- ON CONFLICT(endpoint) DO UPDATE SET
306
- p256dh = excluded.p256dh,
307
- auth = excluded.auth,
308
- device_label = excluded.device_label,
309
- locale = COALESCE(excluded.locale, push_subscriptions.locale),
310
- updated_at = excluded.updated_at
311
- `).run((0,d.randomUUID)(),b.endpoint,b.p256dh,b.auth,e,f,c,c);let g=h(a,b.endpoint);if(!g)throw Error("Failed to persist push subscription");return g}function h(a,b){let c=a.prepare(`SELECT ${f} FROM push_subscriptions WHERE endpoint = ?`).get(b);return c?e(c):null}function i(a,b){return a.prepare(`SELECT ${f} FROM push_subscriptions WHERE ${"prompt"===b?"enabled_prompt":"enabled_completion"} = 1 ORDER BY created_at ASC`).all().map(e)}function j(a,b,c){let d=["updated_at = ?"],e=[Date.now()];return void 0!==c.enabledPrompt&&(d.push("enabled_prompt = ?"),e.push(+!!c.enabledPrompt)),void 0!==c.enabledCompletion&&(d.push("enabled_completion = ?"),e.push(+!!c.enabledCompletion)),e.push(b),a.prepare(`UPDATE push_subscriptions SET ${d.join(", ")} WHERE endpoint = ?`).run(...e),h(a,b)}function k(a,b){return a.prepare("DELETE FROM push_subscriptions WHERE endpoint = ?").run(b).changes>0}},71634:(a,b,c)=>{c.d(b,{vI:()=>m});var d=c(33873),e=c.n(d);function f(a){try{let b=a.prepare("SELECT MAX(version) as version FROM schema_version").get();return b?.version??0}catch{return 0}}function g(a){let b=c(29021),d=a;for(;d!==e().dirname(d);){let a=e().join(d,".git");if(b.existsSync(a)){let c=b.statSync(a);if(c.isDirectory())return d;if(c.isFile()){let c=b.readFileSync(a,"utf-8").trim().match(/^gitdir:\s*(.+)$/);if(c)return c[1].split("/.git/")[0]}}d=e().dirname(d)}return a}var h=c(25537);let i=`
346
+ `).run(b)}c(34129);var af=c(43167);let ag=["manual","wait","api","task"],ah=`
347
+ id, worktree_id, instance_id, task_id, trigger, status, base_ref, started_at, finished_at
348
+ `,ai=`
349
+ id, run_id, gate_id, command, status, exit_code, duration_ms, log_tail, started_at, finished_at
350
+ `;function aj(a){return{id:a.id,worktreeId:a.worktree_id,instanceId:a.instance_id,taskId:a.task_id,trigger:a.trigger,status:a.status,baseRef:a.base_ref,startedAt:new Date(a.started_at),finishedAt:null===a.finished_at?null:new Date(a.finished_at)}}function ak(a){return{id:a.id,runId:a.run_id,gateId:a.gate_id,command:a.command,status:a.status,exitCode:a.exit_code,durationMs:a.duration_ms,logTail:a.log_tail,startedAt:new Date(a.started_at),finishedAt:null===a.finished_at?null:new Date(a.finished_at)}}function al(a,b){let c=Date.now(),d=a.prepare(`
351
+ INSERT INTO verification_runs (
352
+ worktree_id, instance_id, task_id, trigger, status, base_ref, started_at, finished_at
353
+ )
354
+ VALUES (?, ?, ?, ?, 'running', ?, ?, NULL)
355
+ `).run(b.worktreeId,b.instanceId??null,b.taskId??null,b.trigger,b.baseRef??null,c),e=a.prepare(`SELECT ${ah} FROM verification_runs WHERE id = ?`).get(Number(d.lastInsertRowid));if(!e)throw Error("Failed to persist verification run");return aj(e)}function am(a,b,c){if(0===a.prepare("UPDATE verification_runs SET status = ?, finished_at = ? WHERE id = ?").run(c,Date.now(),b).changes)throw Error(`Verification run ${b} not found`)}function an(a,b,c){let d=Date.now(),e=a.prepare(`
356
+ INSERT INTO verification_gate_results (
357
+ run_id, gate_id, command, status, exit_code, duration_ms, log_tail, started_at, finished_at
358
+ )
359
+ VALUES (?, ?, ?, 'running', NULL, NULL, NULL, ?, NULL)
360
+ `).run(b,c.gateId,c.command,d),f=a.prepare(`SELECT ${ai} FROM verification_gate_results WHERE id = ?`).get(Number(e.lastInsertRowid));if(!f)throw Error("Failed to persist verification gate result");return ak(f)}function ao(a,b,c){if(0===a.prepare(`
361
+ UPDATE verification_gate_results
362
+ SET status = ?, exit_code = ?, duration_ms = ?, log_tail = ?, finished_at = ?
363
+ WHERE id = ?
364
+ `).run(c.status,c.exitCode??null,c.durationMs??null,c.logTail??null,Date.now(),b).changes)throw Error(`Verification gate result ${b} not found`)}function ap(a,b){let c=a.prepare(`SELECT ${ah} FROM verification_runs WHERE id = ?`).get(b);if(!c)return null;let d=a.prepare(`
365
+ SELECT ${ai} FROM verification_gate_results
366
+ WHERE run_id = ?
367
+ ORDER BY started_at ASC, id ASC
368
+ `).all(b);return{...aj(c),gates:d.map(ak)}}function aq(a,b){let c=a.prepare(`
369
+ SELECT ${ah} FROM verification_runs
370
+ WHERE worktree_id = ? AND status = 'running'
371
+ ORDER BY id DESC
372
+ LIMIT 1
373
+ `).get(b);return c?aj(c):null}function ar(a,b,c=20){return a.prepare(`
374
+ SELECT ${ah} FROM verification_runs
375
+ WHERE worktree_id = ?
376
+ ORDER BY started_at DESC, id DESC
377
+ LIMIT ?
378
+ `).all(b,c).map(aj)}let as=50,at=500,au=90;function av(a,b,c,d){return void 0!==a&&Number.isFinite(a)?Math.min(Math.max(Math.trunc(a),c),d):b}function aw(a,b={}){let c=av(b.limit,as,1,at),d=[],e=[];if(void 0!==b.worktreeId&&(d.push("worktree_id = ?"),e.push(b.worktreeId)),void 0!==b.days){let a=av(b.days,au,1,au);d.push("started_at >= ?"),e.push(Date.now()-864e5*a)}let f=d.length>0?`WHERE ${d.join(" AND ")}`:"",g=a.prepare(`
379
+ SELECT ${ah} FROM verification_runs
380
+ ${f}
381
+ ORDER BY started_at DESC, id DESC
382
+ LIMIT ?
383
+ `).all(...e,c);if(0===g.length)return[];let h=g.map(()=>"?").join(", "),i=a.prepare(`
384
+ SELECT run_id, gate_id, status, exit_code, duration_ms
385
+ FROM verification_gate_results
386
+ WHERE run_id IN (${h})
387
+ ORDER BY started_at ASC, id ASC
388
+ `).all(...g.map(a=>a.id)),j=new Map;for(let a of i){let b={gateId:a.gate_id,status:a.status,exitCode:a.exit_code,durationMs:a.duration_ms},c=j.get(a.run_id);c?c.push(b):j.set(a.run_id,[b])}return g.map(a=>({...aj(a),gates:j.get(a.id)??[]}))}var ax=c(48524)},92046:(a,b,c)=>{c.d(b,{vI:()=>m});var d=c(33873),e=c.n(d);function f(a){try{let b=a.prepare("SELECT MAX(version) as version FROM schema_version").get();return b?.version??0}catch{return 0}}function g(a){let b=c(29021),d=a;for(;d!==e().dirname(d);){let a=e().join(d,".git");if(b.existsSync(a)){let c=b.statSync(a);if(c.isDirectory())return d;if(c.isFile()){let c=b.readFileSync(a,"utf-8").trim().match(/^gitdir:\s*(.+)$/);if(c)return c[1].split("/.git/")[0]}}d=e().dirname(d)}return a}var h=c(90444);let i=`
312
389
  id, worktree_id, skill_id, version, install_root, receipt_sha256,
313
390
  source_repository, source_ref, source_commit, artifact_sha256,
314
391
  effective_risk, operation_id, installed_at, updated_at
@@ -1264,13 +1341,77 @@
1264
1341
  BEGIN
1265
1342
  SELECT RAISE(ABORT, 'skill_operations is append-only');
1266
1343
  END;
1267
- `)}}];function m(a){!function(a,b){a.exec(`
1344
+ `)}},{version:49,name:"add-verification-runs",up:a=>{a.exec(`
1345
+ CREATE TABLE IF NOT EXISTS verification_runs (
1346
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
1347
+ worktree_id TEXT NOT NULL,
1348
+ instance_id TEXT,
1349
+ task_id TEXT,
1350
+ trigger TEXT NOT NULL CHECK (trigger IN ('manual','wait','api','task')),
1351
+ status TEXT NOT NULL CHECK (status IN ('running','passed','failed','not_started','error','cancelled')),
1352
+ base_ref TEXT,
1353
+ started_at INTEGER NOT NULL,
1354
+ finished_at INTEGER
1355
+ );
1356
+ `),a.exec(`
1357
+ CREATE TABLE IF NOT EXISTS verification_gate_results (
1358
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
1359
+ run_id INTEGER NOT NULL REFERENCES verification_runs(id) ON DELETE CASCADE,
1360
+ gate_id TEXT NOT NULL,
1361
+ command TEXT NOT NULL,
1362
+ status TEXT NOT NULL CHECK (status IN ('running','passed','failed','timeout','skipped','error')),
1363
+ exit_code INTEGER,
1364
+ duration_ms INTEGER,
1365
+ log_tail TEXT,
1366
+ started_at INTEGER NOT NULL,
1367
+ finished_at INTEGER
1368
+ );
1369
+ `),a.exec(`
1370
+ CREATE INDEX IF NOT EXISTS idx_verification_runs_worktree
1371
+ ON verification_runs(worktree_id, started_at DESC);
1372
+ `),a.exec(`
1373
+ CREATE INDEX IF NOT EXISTS idx_verification_gate_results_run
1374
+ ON verification_gate_results(run_id);
1375
+ `)},down:a=>{a.exec("DROP TABLE IF EXISTS verification_gate_results;"),a.exec("DROP TABLE IF EXISTS verification_runs;")}},{version:50,name:"add-tasks",up:a=>{a.exec(`
1376
+ CREATE TABLE IF NOT EXISTS tasks (
1377
+ id TEXT PRIMARY KEY,
1378
+ worktree_id TEXT NOT NULL,
1379
+ cli_tool_id TEXT NOT NULL,
1380
+ instance_id TEXT,
1381
+ title TEXT NOT NULL,
1382
+ goal TEXT NOT NULL,
1383
+ contract_path TEXT,
1384
+ contract_json TEXT NOT NULL,
1385
+ status TEXT NOT NULL CHECK (status IN ('pending','running','waiting_input','verifying','succeeded','failed','not_started','cancelled')),
1386
+ last_verification_run_id INTEGER,
1387
+ created_at INTEGER NOT NULL,
1388
+ updated_at INTEGER NOT NULL,
1389
+ started_at INTEGER,
1390
+ finished_at INTEGER
1391
+ );
1392
+ `),a.exec(`
1393
+ CREATE INDEX IF NOT EXISTS idx_tasks_worktree
1394
+ ON tasks(worktree_id, created_at DESC);
1395
+ `)},down:a=>{a.exec("DROP TABLE IF EXISTS tasks;")}},{version:51,name:"add-task-events",up:a=>{a.exec(`
1396
+ CREATE TABLE IF NOT EXISTS task_events (
1397
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
1398
+ task_id TEXT NOT NULL,
1399
+ event TEXT NOT NULL,
1400
+ from_status TEXT NOT NULL,
1401
+ to_status TEXT,
1402
+ payload_json TEXT,
1403
+ created_at INTEGER NOT NULL
1404
+ );
1405
+ `),a.exec(`
1406
+ CREATE INDEX IF NOT EXISTS idx_task_events_task
1407
+ ON task_events(task_id, created_at);
1408
+ `)},down:a=>{a.exec("DROP TABLE IF EXISTS task_events;")}}];function m(a){!function(a,b){a.exec(`
1268
1409
  CREATE TABLE IF NOT EXISTS schema_version (
1269
1410
  version INTEGER PRIMARY KEY,
1270
1411
  name TEXT NOT NULL,
1271
1412
  applied_at INTEGER NOT NULL
1272
1413
  );
1273
- `);let c=f(a);if(console.log(`Current schema version: ${c}`),c>48)throw Error(`This database (schema v${c}) was created by a newer version of CommandMate (this build supports up to v48). Please update: commandmate update`);let d=b.filter(a=>a.version>c);if(0===d.length)return console.log("Schema is up to date");for(let b of(console.log(`Found ${d.length} pending migration(s)`),d)){console.log(`Applying migration ${b.version}: ${b.name}...`);try{a.transaction(()=>{b.up(a),a.prepare(`
1414
+ `);let c=f(a);if(console.log(`Current schema version: ${c}`),c>51)throw Error(`This database (schema v${c}) was created by a newer version of CommandMate (this build supports up to v51). Please update: commandmate update`);let d=b.filter(a=>a.version>c);if(0===d.length)return console.log("Schema is up to date");for(let b of(console.log(`Found ${d.length} pending migration(s)`),d)){console.log(`Applying migration ${b.version}: ${b.name}...`);try{a.transaction(()=>{b.up(a),a.prepare(`
1274
1415
  INSERT INTO schema_version (version, name, applied_at)
1275
1416
  VALUES (?, ?, ?)
1276
- `).run(b.version,b.name,Date.now())})(),console.log(`Migration ${b.version} applied successfully`)}catch(c){let a=c instanceof Error?c.message:String(c);throw console.error(`Migration ${b.version} failed:`,a),Error(`Migration ${b.version} (${b.name}) failed: ${a}`)}}console.log(`All migrations completed. Current version: ${f(a)}`)}(a,l)}},87374:(a,b,c)=>{c.d(b,{Dr:()=>i,HR:()=>h,Ky:()=>f,XS:()=>e,ms:()=>g,u8:()=>d}),Array.from({length:Math.floor(104)+1},(a,b)=>3e5+3e5*b);let d=5,e=50,f=100,g=1e4,h={PENDING:"pending",SENDING:"sending",SENT:"sent",FAILED:"failed",CANCELLED:"cancelled",NO_SESSION:"no_session"};function i(a){return"number"==typeof a&&a>=3e5&&a<=315e5&&a%3e5==0}},88807:(a,b,c)=>{c.r(b),c.d(b,{closeDbInstance:()=>p,getDbInstance:()=>o});var d=c(33873),e=c.n(d),f=c(71634),g=c(79646),h=c(87550),i=c.n(h);let j=!1;function k(a){return a instanceof Error&&"ERR_DLOPEN_FAILED"===a.code&&a.message.includes("NODE_MODULE_VERSION")}function l(a,b){let c=["better-sqlite3 could not be loaded: it was built for a different Node.js version.","This usually happens after switching Node.js versions (nvm, fnm, Homebrew, ...).","",`Automatic recovery failed: ${a}`,"","How to fix it manually:"];return b?c.push(" The install directory is not writable by the current user, so the addon"," cannot be rebuilt in place. Do not re-run this with sudo — root-owned"," files there will break future installs and updates.",""," Either switch back to the Node.js version CommandMate was installed with:",` node -v (currently ${process.version}, NODE_MODULE_VERSION ${process.versions.modules})`,""," Or reinstall CommandMate under a Node.js version manager, which keeps"," global packages in a user-owned directory:"," nvm use <version> && npm install -g commandmate"):c.push(` 1. cd ${process.cwd()}`," 2. npm rebuild better-sqlite3"," 3. Start CommandMate again",""," If that fails, reinstalling picks up the current Node.js version:"," npm install -g commandmate"),c.join("\n")}var m=c(87447);let n=null;function o(){if(!n){let a=(0,m._$)().CM_DB_PATH,b=c(29021),d=e().dirname(a);b.existsSync(d)||b.mkdirSync(d,{recursive:!0,mode:448});let h=function(a){try{return new(i())(a)}catch(c){if(!k(c))throw c;if(j)throw Error(l("a rebuild was already attempted in this process.",!1));j=!0,console.error("[commandmate] better-sqlite3 was built for a different Node.js version.\n[commandmate] Rebuilding it automatically — this can take a few minutes...");let b=function(){let a=(0,g.spawnSync)("npm",["rebuild","better-sqlite3"],{cwd:process.cwd(),encoding:"utf-8",timeout:3e5,env:{...process.env,PATH:`${e().dirname(process.execPath)}${e().delimiter}${process.env.PATH??""}`}}),b=`${a.stdout??""}${a.stderr??""}`;return a.error||0!==a.status?{success:!1,permissionDenied:/EACCES|permission denied/i.test(b),output:b}:{success:!0,permissionDenied:!1,output:b}}();if(!b.success)throw Error(l("npm rebuild better-sqlite3 failed.",b.permissionDenied));console.error("[commandmate] Rebuild succeeded. Continuing startup.");try{return new(i())(a)}catch(a){if(k(a))throw Error(l("the addon still reports a version mismatch after rebuilding.",!1));throw a}}}(a);h.pragma("foreign_keys = ON"),h.pragma("journal_mode = WAL"),h.pragma("busy_timeout = 5000");try{(0,f.vI)(h)}catch(a){throw h.close(),a}n=h}return n}function p(){n&&(n.close(),n=null)}}};
1417
+ `).run(b.version,b.name,Date.now())})(),console.log(`Migration ${b.version} applied successfully`)}catch(c){let a=c instanceof Error?c.message:String(c);throw console.error(`Migration ${b.version} failed:`,a),Error(`Migration ${b.version} (${b.name}) failed: ${a}`)}}console.log(`All migrations completed. Current version: ${f(a)}`)}(a,l)}}};
@@ -0,0 +1,4 @@
1
+ "use strict";exports.id=8856,exports.ids=[8856],exports.modules={2924:(a,b,c)=>{c.d(b,{r:()=>h,g:()=>g});var d=c(48524),e=c(72626);let f=(0,e.h)("lib/tasks/task-transition-service");function g(a,b,c,e){let g=a.transaction(()=>{let f=(0,d.gg)(a,b);if(!f)return null;let g=f.status,h=function(a,b){switch(a){case"pending":switch(b){case"message_sent":return"running";case"send_failed":return"failed";case"cancel":return"cancelled";default:return null}case"running":switch(b){case"prompt_detected":return"waiting_input";case"agent_idle":return"running";case"verify_started":return"verifying";case"send_failed":return"failed";case"cancel":return"cancelled";default:return null}case"waiting_input":switch(b){case"prompt_answered_auto":case"prompt_answered_human":case"agent_idle":return"running";case"verify_started":return"verifying";case"cancel":return"cancelled";default:return null}case"verifying":switch(b){case"verify_passed":return"succeeded";case"verify_failed":return"failed";case"verify_not_started":return"not_started";case"cancel":return"cancelled";default:return null}case"failed":case"not_started":switch(b){case"message_sent":return"running";case"verify_started":return"verifying";case"cancel":return"cancelled";default:return null}default:return null}}(g,c),i=function(a,b){let c=void 0===b.payload||0===Object.keys(b.payload).length?null:JSON.stringify(b.payload);return Number(a.prepare(`
2
+ INSERT INTO task_events (task_id, event, from_status, to_status, payload_json, created_at)
3
+ VALUES (?, ?, ?, ?, ?, ?)
4
+ `).run(b.taskId,b.event,b.fromStatus,b.toStatus,c,b.createdAt).lastInsertRowid)}(a,{taskId:b,event:c,fromStatus:g,toStatus:h,payload:e,createdAt:Date.now()});return null===h?{task:f,fromStatus:g,toStatus:null,eventId:i}:{task:(0,d.xZ)(a,b,h,e?.runId===void 0?{}:{lastVerificationRunId:e.runId}),fromStatus:g,toStatus:h,eventId:i}})();return null===g?f.warn("task-event-unknown-task",{taskId:b,event:c}):null===g.toStatus&&f.warn("task-event-rejected",{taskId:b,event:c,fromStatus:g.fromStatus}),g}function h(a,b,c,e,h,i){try{let f=(0,d.MH)(a,b,c,e);if(!f)return null;return g(a,f.id,h,i)}catch(a){return f.warn("task-event-failed",{worktreeId:b,cliToolId:c,instanceId:e,event:h,error:a instanceof Error?a.message:String(a)}),null}}},16983:(a,b,c)=>{c.d(b,{J:()=>e,s:()=>d});let d=1e3,e=200},24455:(a,b,c)=>{c.d(b,{Cs:()=>o,G:()=>s,GE:()=>j,LP:()=>r,Re:()=>z,UL:()=>v,Ue:()=>h,W8:()=>m,XK:()=>n,ZO:()=>u,_9:()=>p,aq:()=>l,fC:()=>y,kC:()=>q,pL:()=>i,ps:()=>t,v7:()=>g});var d=c(68901);c(66007);var e=c(15194);let f=(0,c(72626).h)("auto-yes-state");function g(a,b,c){if(a.includes(":"))throw Error(`worktreeId must not contain ':': ${a}`);if(!c||c===b)return`${a}:${b}`;if(c.includes(":"))throw Error(`instanceId must not contain ':': ${c}`);return`${a}:${b}:${c}`}function h(a){let b=a.indexOf(":");return -1===b?a:a.substring(0,b)}function i(a){let b=a.split(":")[1];return void 0===b?null:(0,e.hR)(b)?b:null}function j(a){let b=a.split(":");return b[2]??b[1]??null}let k=globalThis.__autoYesStates??(globalThis.__autoYesStates=new Map);function l(a,b="claude",c){let d=g(a,b,c),e=k.get(d);return e?Date.now()>=e.expiresAt?n(a,b,"expired",c):e:null}function m(a,b,c,e,f,h){let i=g(a,b,h);if(!c)return n(a,b,void 0,h);{let a=Date.now(),b={enabled:!0,enabledAt:a,expiresAt:a+(e??d.t6),stopPattern:f};return k.set(i,b),b}}function n(a,b="claude",c,d){let e=g(a,b,d),f=k.get(e),h={enabled:!1,enabledAt:f?.enabledAt??0,expiresAt:f?.expiresAt??0,stopPattern:f?.stopPattern,stopReason:c};return k.set(e,h),h}function o(a,b,c){let e=h(a),g=i(a);if(!g)return!1;let k=j(a)??void 0,m=l(e,g,k);if(!m?.stopPattern)return!1;if(!(0,d.P0)(m.stopPattern).valid)return f.warn("invalid-stop-pattern",{detail:String({compositeKey:a})}),n(e,g,void 0,k),!1;try{let h=new RegExp(m.stopPattern),i=(0,d.eJ)(h,b);if(null===i)return f.warn("stop-condition-check",{detail:String({compositeKey:a})}),n(e,g,void 0,k),!1;if(i)return n(e,g,"stop_pattern_matched",k),c&&c(a),f.warn("stop-condition-matched",{detail:String({compositeKey:a})}),!0}catch{f.warn("stop-condition-check",{detail:String({compositeKey:a})})}return!1}function p(a,b){return a.filter(a=>h(a)===b)}function q(a){return p(Array.from(k.keys()),a)}function r(a){let b=q(a);return b.forEach(a=>k.delete(a)),b.length}function s(a){return a<x?t:Math.min(t*Math.pow(2,a-x+1),w)}let t=2e3,u=5e3,v=1e4,w=6e4,x=5,y=50,z=50},48083:(a,b,c)=>{c.d(b,{CE:()=>g,zM:()=>f});var d=c(24455);let e=new Map;function f(a,b,c,g=Date.now()){e.set((0,d.v7)(a,b,c),g)}function g(a,b,c){return e.get((0,d.v7)(a,b,c))??null}},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")},68901:(a,b,c)=>{c.d(b,{FW:()=>l,Ke:()=>k,P0:()=>n,QN:()=>j,dR:()=>i,eJ:()=>o,t6:()=>h,ul:()=>m});var d=c(82366),e=c.n(d),f=c(16983);let g=[36e5,108e5,288e5],h=36e5;function i(a){return"number"==typeof a&&g.includes(a)}let j=5e3,k=f.s,l=5e3,m=20;function n(a){if(a.length>500)return{valid:!1,error:"Pattern must be 500 characters or less"};if(!e()(a))return{valid:!1,error:"Pattern may cause performance issues (catastrophic backtracking detected)"};try{return new RegExp(a),{valid:!0}}catch{return{valid:!1,error:"Invalid regular expression syntax"}}}function o(a,b,c=100){try{return a.test(b)}catch{return null}}}};
@@ -1,3 +1,3 @@
1
- "use strict";exports.id=9687,exports.ids=[9687],exports.modules={12462:(a,b,c)=>{c.d(b,{T8:()=>j,o4:()=>k});var d=c(31766),e=c(56791),f=c(69297),g=c(82450),h=c(15194);let i=(0,c(72626).h)("assistant-response-saver");function j(a,b){switch(b){case"claude":return(0,g.NN)(a);case"gemini":return(0,g.IS)(a);case"opencode":return(0,g.aW)(a);case"copilot":return(0,g.LH)(a);default:return a.trim()}}async function k(a,b,c,g,k){let l=k??c;try{let m;if((0,h.VA)(c))return null;let n=(0,e.y1)(a,b,l),o=n?.lastCapturedLine||0;try{m=await (0,d.Wh)(b,c,1e4,k)}catch{return i.info("failed-to-capture"),null}if(!m)return null;let p=m.split("\n"),q=p.length;for(;q>0&&""===p[q-1].trim();)q--;let r=q,{bufferReset:s,reason:t}=r>0&&o>25&&r+25<o?{bufferReset:!0,reason:"shrink"}:r>0&&o>50&&r<50?{bufferReset:!0,reason:"restart"}:{bufferReset:!1,reason:null};s&&i.info("buffer:reset-detected",{reason:t,currentLineCount:r,lastCapturedLine:o});let u=s?0:o;if(!s&&r<=o)return r<o&&((0,e.gb)(a,b,c,r,k),i.info("position:corrected-stale",{from:o,to:r})),null;let v=p.slice(u).join("\n"),w=j(v,c);if(!w||""===w.trim())return(0,e.gb)(a,b,c,r,k),i.debug("response:empty-after-clean",{currentLineCount:r}),null;let x=new Date(g.getTime()-1),y=(0,e.oH)(a,{worktreeId:b,role:"assistant",content:w,messageType:"normal",timestamp:x,cliToolId:c,instanceId:l});return(0,e.gb)(a,b,c,r,k),(0,f.Lo)("message",{worktreeId:b,message:y}),i.info("response:saved",{fromLine:o,toLine:r}),y}catch(a){return i.error("error:",{error:a instanceof Error?a.message:String(a)}),null}}},39687:(a,b,c)=>{c.d(b,{d:()=>o});var d=c(56791),e=c(31268),f=c(15194),g=c(95220),h=c(12462),i=c(11665),j=c(93997),k=c(72626),l=c(56263);let m=(0,k.h)("session/send-user-message");function n(a){return a instanceof Error?a.message:String(a)}async function o(a,b){let{worktreeId:c,content:k,cliToolId:o,instanceId:p,absoluteImagePath:q,copilotModel:r}=b,s=b.messageType??"normal",t=e.s.getInstance().getTool(o),u=new Date;try{await (0,h.o4)(a,c,o,u,p)}catch(a){m.error("failed-to-save-pending-assistant-response:",{error:n(a)})}let v=null;try{let b=(0,d.VL)(a,c,{limit:1,cliToolId:o,instanceId:p});b.length>0&&"user"===b[0].role&&b[0].content===k&&(v=b[0].id)}catch(a){m.error("failed-to-detect-orphaned-messages:",{error:n(a)})}if(r&&"copilot"===o)try{await t.sendModelCommand(c,r,p),m.info("copilot-model-command-sent",{model:r})}catch(a){return m.error("failed-to-send-model-command:",{error:n(a)}),{ok:!1,stage:"model",error:n(a)}}try{if(q)if((0,f._J)(t))await t.sendMessageWithImage(c,k,q,p);else{let a=k?`${k}
1
+ "use strict";exports.id=9687,exports.ids=[9687],exports.modules={12462:(a,b,c)=>{c.d(b,{T8:()=>j,o4:()=>k});var d=c(31766),e=c(56791),f=c(69297),g=c(82450),h=c(15194);let i=(0,c(72626).h)("assistant-response-saver");function j(a,b){switch(b){case"claude":return(0,g.NN)(a);case"gemini":return(0,g.IS)(a);case"opencode":return(0,g.aW)(a);case"copilot":return(0,g.LH)(a);default:return a.trim()}}async function k(a,b,c,g,k){let l=k??c;try{let m;if((0,h.VA)(c))return null;let n=(0,e.y1O)(a,b,l),o=n?.lastCapturedLine||0;try{m=await (0,d.Wh)(b,c,1e4,k)}catch{return i.info("failed-to-capture"),null}if(!m)return null;let p=m.split("\n"),q=p.length;for(;q>0&&""===p[q-1].trim();)q--;let r=q,{bufferReset:s,reason:t}=r>0&&o>25&&r+25<o?{bufferReset:!0,reason:"shrink"}:r>0&&o>50&&r<50?{bufferReset:!0,reason:"restart"}:{bufferReset:!1,reason:null};s&&i.info("buffer:reset-detected",{reason:t,currentLineCount:r,lastCapturedLine:o});let u=s?0:o;if(!s&&r<=o)return r<o&&((0,e.PPx)(a,b,c,r,k),i.info("position:corrected-stale",{from:o,to:r})),null;let v=p.slice(u).join("\n"),w=j(v,c);if(!w||""===w.trim())return(0,e.PPx)(a,b,c,r,k),i.debug("response:empty-after-clean",{currentLineCount:r}),null;let x=new Date(g.getTime()-1),y=(0,e.oHS)(a,{worktreeId:b,role:"assistant",content:w,messageType:"normal",timestamp:x,cliToolId:c,instanceId:l});return(0,e.PPx)(a,b,c,r,k),(0,f.Lo)("message",{worktreeId:b,message:y}),i.info("response:saved",{fromLine:o,toLine:r}),y}catch(a){return i.error("error:",{error:a instanceof Error?a.message:String(a)}),null}}},39687:(a,b,c)=>{c.d(b,{d:()=>o});var d=c(56791),e=c(31268),f=c(15194),g=c(95220),h=c(12462),i=c(11665),j=c(93997),k=c(72626),l=c(56263);let m=(0,k.h)("session/send-user-message");function n(a){return a instanceof Error?a.message:String(a)}async function o(a,b){let{worktreeId:c,content:k,cliToolId:o,instanceId:p,absoluteImagePath:q,copilotModel:r}=b,s=b.messageType??"normal",t=e.s.getInstance().getTool(o),u=new Date;try{await (0,h.o4)(a,c,o,u,p)}catch(a){m.error("failed-to-save-pending-assistant-response:",{error:n(a)})}let v=null;try{let b=(0,d.VLK)(a,c,{limit:1,cliToolId:o,instanceId:p});b.length>0&&"user"===b[0].role&&b[0].content===k&&(v=b[0].id)}catch(a){m.error("failed-to-detect-orphaned-messages:",{error:n(a)})}if(r&&"copilot"===o)try{await t.sendModelCommand(c,r,p),m.info("copilot-model-command-sent",{model:r})}catch(a){return m.error("failed-to-send-model-command:",{error:n(a)}),{ok:!1,stage:"model",error:n(a)}}try{if(q)if((0,f._J)(t))await t.sendMessageWithImage(c,k,q,p);else{let a=k?`${k}
2
2
 
3
- [添付画像: ${q}]`:`[添付画像: ${q}]`;await t.sendMessage(c,a,p)}else if("copilot"===o){let a=t.getSessionName(c,p),b=k.replace(/\n+/g," ").trim();await (0,i.V1)(a,b,!1),await new Promise(a=>setTimeout(a,l.wp)),await (0,i.KB)(a,["Enter"]),(0,j.gm)(a)}else await t.sendMessage(c,k,p)}catch(a){return m.error("failed-to-send-message-to:",{error:n(a)}),{ok:!1,stage:"send",error:n(a)}}let w=(0,d.oH)(a,{worktreeId:c,role:"user",content:k,messageType:s,timestamp:u,cliToolId:o,instanceId:p});if(v)try{(0,d.DF)(a,v)&&m.info("cleaned-up-orphaned-user")}catch(a){m.error("failed-to-clean-up-orphaned-message:",{error:n(a)})}return(0,d.EU)(a,c,k,u),(0,d.YX)(a,c,o,p),m.info("cleared-in-progress-message-for"),(0,g.startPolling)(c,o,p),{ok:!0,message:w}}}};
3
+ [添付画像: ${q}]`:`[添付画像: ${q}]`;await t.sendMessage(c,a,p)}else if("copilot"===o){let a=t.getSessionName(c,p),b=k.replace(/\n+/g," ").trim();await (0,i.V1)(a,b,!1),await new Promise(a=>setTimeout(a,l.wp)),await (0,i.KB)(a,["Enter"]),(0,j.gm)(a)}else await t.sendMessage(c,k,p)}catch(a){return m.error("failed-to-send-message-to:",{error:n(a)}),{ok:!1,stage:"send",error:n(a)}}let w=(0,d.oHS)(a,{worktreeId:c,role:"user",content:k,messageType:s,timestamp:u,cliToolId:o,instanceId:p});if(v)try{(0,d.DFh)(a,v)&&m.info("cleaned-up-orphaned-user")}catch(a){m.error("failed-to-clean-up-orphaned-message:",{error:n(a)})}return(0,d.EU4)(a,c,k,u),(0,d.YXK)(a,c,o,p),m.info("cleared-in-progress-message-for"),(0,g.startPolling)(c,o,p),{ok:!0,message:w}}}};
@@ -17,11 +17,11 @@
17
17
  "wasm": [],
18
18
  "assets": [],
19
19
  "env": {
20
- "__NEXT_BUILD_ID": "AKqbAyuzbFfg05qpbCI_K",
21
- "NEXT_SERVER_ACTIONS_ENCRYPTION_KEY": "PsfhCax1ZDawlLMd/Vk5lgctPPkwgsq67SafKeJ79Ho=",
22
- "__NEXT_PREVIEW_MODE_ID": "44b91a27fe3d7654e1427055160fc68e",
23
- "__NEXT_PREVIEW_MODE_SIGNING_KEY": "c05bb768ba9c22c6179dd9e0918d18e1575a47b11e20ace232fd4a3077bd88f8",
24
- "__NEXT_PREVIEW_MODE_ENCRYPTION_KEY": "f64f2a32b8acd2960c8c0fca9eb0ba33acae142cbbac4cdb4352191c6086652b"
20
+ "__NEXT_BUILD_ID": "gR8Sh86RrTynJON8SWkWK",
21
+ "NEXT_SERVER_ACTIONS_ENCRYPTION_KEY": "4Q9XRmElW0m/HbpzgnC7nZff8/HMKOlgQVr6jsnizII=",
22
+ "__NEXT_PREVIEW_MODE_ID": "7d0a575c7ee1a38b62a0e194fa85d717",
23
+ "__NEXT_PREVIEW_MODE_SIGNING_KEY": "32395ad9a2581b5ff2b977b3a5a1b6e78e032ac3b85d10fe57a7da1c0da3c51a",
24
+ "__NEXT_PREVIEW_MODE_ENCRYPTION_KEY": "ab76c77d8b9b41a1928fb6d88d8a1dffade80bb1eda6f72f940bfd1cda02b2b5"
25
25
  }
26
26
  }
27
27
  },