commandmate 0.49.2 → 0.50.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 (927) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +476 -423
  3. package/.next/app-path-routes-manifest.json +28 -21
  4. package/.next/build-manifest.json +5 -5
  5. package/.next/prerender-manifest.json +9 -9
  6. package/.next/react-loadable-manifest.json +1 -1
  7. package/.next/required-server-files.json +1 -1
  8. package/.next/routes-manifest.json +40 -0
  9. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  10. package/.next/server/app/api/agents/update/route_client-reference-manifest.js +1 -1
  11. package/.next/server/app/api/agents/versions/route_client-reference-manifest.js +1 -1
  12. package/.next/server/app/api/app/release-notes/route_client-reference-manifest.js +1 -1
  13. package/.next/server/app/api/app/update/route_client-reference-manifest.js +1 -1
  14. package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
  15. package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  16. package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  17. package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  18. package/.next/server/app/api/capabilities/route.js +1 -1
  19. package/.next/server/app/api/capabilities/route_client-reference-manifest.js +1 -1
  20. package/.next/server/app/api/daily-summary/route.js +1 -1
  21. package/.next/server/app/api/daily-summary/route.js.nft.json +1 -1
  22. package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +1 -1
  23. package/.next/server/app/api/daily-summary/status/route.js +1 -1
  24. package/.next/server/app/api/daily-summary/status/route.js.nft.json +1 -1
  25. package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
  26. package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
  27. package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
  28. package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
  29. package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -1
  30. package/.next/server/app/api/fs/recent-paths/route_client-reference-manifest.js +1 -1
  31. package/.next/server/app/api/hooks/agent-event/route.js +1 -103
  32. package/.next/server/app/api/hooks/agent-event/route.js.nft.json +1 -1
  33. package/.next/server/app/api/hooks/agent-event/route_client-reference-manifest.js +1 -1
  34. package/.next/server/app/api/hooks/claude-done/route.js +2 -2
  35. package/.next/server/app/api/hooks/claude-done/route.js.nft.json +1 -1
  36. package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
  37. package/.next/server/app/api/hooks/permission-request/route.js +1 -1
  38. package/.next/server/app/api/hooks/permission-request/route.js.nft.json +1 -1
  39. package/.next/server/app/api/hooks/permission-request/route_client-reference-manifest.js +1 -1
  40. package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -1
  41. package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
  42. package/.next/server/app/api/push/escalation/route.js +1 -1
  43. package/.next/server/app/api/push/escalation/route.js.nft.json +1 -1
  44. package/.next/server/app/api/push/escalation/route_client-reference-manifest.js +1 -1
  45. package/.next/server/app/api/push/subscriptions/route.js +1 -1
  46. package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
  47. package/.next/server/app/api/push/vapid/route.js +1 -1
  48. package/.next/server/app/api/push/vapid/route.js.nft.json +1 -1
  49. package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
  50. package/.next/server/app/api/relays/[relayId]/cancel/route.js +4 -1
  51. package/.next/server/app/api/relays/[relayId]/cancel/route.js.nft.json +1 -1
  52. package/.next/server/app/api/relays/[relayId]/cancel/route_client-reference-manifest.js +1 -1
  53. package/.next/server/app/api/relays/[relayId]/resolve/route.js +1 -0
  54. package/.next/server/app/api/relays/[relayId]/resolve/route.js.nft.json +1 -0
  55. package/.next/server/app/api/relays/[relayId]/resolve/route_client-reference-manifest.js +1 -0
  56. package/.next/server/app/api/relays/[relayId]/route.js +1 -1
  57. package/.next/server/app/api/relays/[relayId]/route.js.nft.json +1 -1
  58. package/.next/server/app/api/relays/[relayId]/route_client-reference-manifest.js +1 -1
  59. package/.next/server/app/api/relays/route.js +4 -1
  60. package/.next/server/app/api/relays/route.js.nft.json +1 -1
  61. package/.next/server/app/api/relays/route_client-reference-manifest.js +1 -1
  62. package/.next/server/app/api/remote/pair/route.js +2 -2
  63. package/.next/server/app/api/remote/pair/route_client-reference-manifest.js +1 -1
  64. package/.next/server/app/api/repositories/[id]/role-defaults/route.js +1 -0
  65. package/.next/server/app/api/repositories/[id]/role-defaults/route.js.nft.json +1 -0
  66. package/.next/server/app/api/repositories/[id]/role-defaults/route_client-reference-manifest.js +1 -0
  67. package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
  68. package/.next/server/app/api/repositories/clone/[jobId]/route.js +1 -1
  69. package/.next/server/app/api/repositories/clone/[jobId]/route.js.nft.json +1 -1
  70. package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
  71. package/.next/server/app/api/repositories/clone/route.js +1 -1
  72. package/.next/server/app/api/repositories/clone/route.js.nft.json +1 -1
  73. package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
  74. package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
  75. package/.next/server/app/api/repositories/restore/route.js +1 -1
  76. package/.next/server/app/api/repositories/restore/route.js.nft.json +1 -1
  77. package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
  78. package/.next/server/app/api/repositories/route.js +1 -1
  79. package/.next/server/app/api/repositories/route.js.nft.json +1 -1
  80. package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
  81. package/.next/server/app/api/repositories/scan/route.js +1 -1
  82. package/.next/server/app/api/repositories/scan/route.js.nft.json +1 -1
  83. package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
  84. package/.next/server/app/api/repositories/sync/route.js +1 -1
  85. package/.next/server/app/api/repositories/sync/route.js.nft.json +1 -1
  86. package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
  87. package/.next/server/app/api/repositories/validate-path/route.js +1 -1
  88. package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
  89. package/.next/server/app/api/roles/[id]/route.js +1 -0
  90. package/.next/server/app/api/roles/[id]/route.js.nft.json +1 -0
  91. package/.next/server/app/api/roles/[id]/route_client-reference-manifest.js +1 -0
  92. package/.next/server/app/api/roles/route.js +1 -0
  93. package/.next/server/app/api/roles/route.js.nft.json +1 -0
  94. package/.next/server/app/api/roles/route_client-reference-manifest.js +1 -0
  95. package/.next/server/app/api/settings/agent-role-defaults/route.js +1 -0
  96. package/.next/server/app/api/settings/agent-role-defaults/route.js.nft.json +1 -0
  97. package/.next/server/app/api/settings/agent-role-defaults/route_client-reference-manifest.js +1 -0
  98. package/.next/server/app/api/settings/default-agents/route.js +1 -1
  99. package/.next/server/app/api/settings/default-agents/route.js.nft.json +1 -1
  100. package/.next/server/app/api/settings/default-agents/route_client-reference-manifest.js +1 -1
  101. package/.next/server/app/api/settings/default-surface-mode/route_client-reference-manifest.js +1 -1
  102. package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
  103. package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
  104. package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
  105. package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
  106. package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
  107. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  108. package/.next/server/app/api/slash-commands/route.js +1 -1
  109. package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
  110. package/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
  111. package/.next/server/app/api/tasks/[taskId]/route.js +1 -1
  112. package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
  113. package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
  114. package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
  115. package/.next/server/app/api/verification/runs/[runId]/route.js +1 -1
  116. package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -1
  117. package/.next/server/app/api/verification/runs/route.js +1 -1
  118. package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -1
  119. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
  120. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js.nft.json +1 -1
  121. package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
  122. package/.next/server/app/api/worktrees/[id]/capture/route.js +1 -1
  123. package/.next/server/app/api/worktrees/[id]/capture/route.js.nft.json +1 -1
  124. package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
  125. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js +1 -1
  126. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js.nft.json +1 -1
  127. package/.next/server/app/api/worktrees/[id]/clear-composer/route_client-reference-manifest.js +1 -1
  128. package/.next/server/app/api/worktrees/[id]/cli-reference/route.js +1 -1
  129. package/.next/server/app/api/worktrees/[id]/cli-reference/route_client-reference-manifest.js +1 -1
  130. package/.next/server/app/api/worktrees/[id]/cli-tool/route.js +1 -1
  131. package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
  132. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js +3 -3
  133. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js.nft.json +1 -1
  134. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
  135. package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
  136. package/.next/server/app/api/worktrees/[id]/current-output/route.js.nft.json +1 -1
  137. package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
  138. package/.next/server/app/api/worktrees/[id]/direct-input/route.js +1 -1
  139. package/.next/server/app/api/worktrees/[id]/direct-input/route.js.nft.json +1 -1
  140. package/.next/server/app/api/worktrees/[id]/direct-input/route_client-reference-manifest.js +1 -1
  141. package/.next/server/app/api/worktrees/[id]/env/route.js +1 -1
  142. package/.next/server/app/api/worktrees/[id]/env/route_client-reference-manifest.js +1 -1
  143. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route.js +1 -1
  144. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
  145. package/.next/server/app/api/worktrees/[id]/execution-logs/route.js +2 -2
  146. package/.next/server/app/api/worktrees/[id]/execution-logs/route.js.nft.json +1 -1
  147. package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
  148. package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
  149. package/.next/server/app/api/worktrees/[id]/git/branch/create/route.js +1 -1
  150. package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
  151. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route.js +1 -1
  152. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
  153. package/.next/server/app/api/worktrees/[id]/git/branches/route.js +1 -1
  154. package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
  155. package/.next/server/app/api/worktrees/[id]/git/checkout/route.js +1 -1
  156. package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
  157. package/.next/server/app/api/worktrees/[id]/git/commit/route.js +1 -1
  158. package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
  159. package/.next/server/app/api/worktrees/[id]/git/diff/route.js +1 -1
  160. package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
  161. package/.next/server/app/api/worktrees/[id]/git/fetch/route.js +1 -1
  162. package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
  163. package/.next/server/app/api/worktrees/[id]/git/log/route.js +1 -1
  164. package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
  165. package/.next/server/app/api/worktrees/[id]/git/pull/route.js +1 -1
  166. package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
  167. package/.next/server/app/api/worktrees/[id]/git/push/route.js +1 -1
  168. package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
  169. package/.next/server/app/api/worktrees/[id]/git/reset/route.js +1 -1
  170. package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
  171. package/.next/server/app/api/worktrees/[id]/git/revert/route.js +1 -1
  172. package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
  173. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route.js +1 -1
  174. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
  175. package/.next/server/app/api/worktrees/[id]/git/stage/route.js +1 -1
  176. package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
  177. package/.next/server/app/api/worktrees/[id]/git/staged/route.js +1 -1
  178. package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
  179. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route.js +1 -1
  180. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
  181. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route.js +1 -1
  182. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
  183. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route.js +1 -1
  184. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
  185. package/.next/server/app/api/worktrees/[id]/git/stash/push/route.js +1 -1
  186. package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
  187. package/.next/server/app/api/worktrees/[id]/git/stash/route.js +1 -1
  188. package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
  189. package/.next/server/app/api/worktrees/[id]/git/status/route.js +1 -1
  190. package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
  191. package/.next/server/app/api/worktrees/[id]/git/unstage/route.js +1 -1
  192. package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
  193. package/.next/server/app/api/worktrees/[id]/git/working-diff/route.js +1 -1
  194. package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
  195. package/.next/server/app/api/worktrees/[id]/instances/notes/route.js +1 -1
  196. package/.next/server/app/api/worktrees/[id]/instances/notes/route_client-reference-manifest.js +1 -1
  197. package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js +1 -1
  198. package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js.nft.json +1 -1
  199. package/.next/server/app/api/worktrees/[id]/instances/opencode/route_client-reference-manifest.js +1 -1
  200. package/.next/server/app/api/worktrees/[id]/instances/roles/route.js +1 -0
  201. package/.next/server/app/api/worktrees/[id]/instances/roles/route.js.nft.json +1 -0
  202. package/.next/server/app/api/worktrees/[id]/instances/roles/route_client-reference-manifest.js +1 -0
  203. package/.next/server/app/api/worktrees/[id]/instances/roles/settle/route.js +1 -0
  204. package/.next/server/app/api/worktrees/[id]/instances/roles/settle/route.js.nft.json +1 -0
  205. package/.next/server/app/api/worktrees/[id]/instances/roles/settle/route_client-reference-manifest.js +1 -0
  206. package/.next/server/app/api/worktrees/[id]/interrupt/route.js +1 -1
  207. package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
  208. package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
  209. package/.next/server/app/api/worktrees/[id]/kill-session/route.js +2 -2
  210. package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -1
  211. package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
  212. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
  213. package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
  214. package/.next/server/app/api/worktrees/[id]/marp-render/route.js +1 -1
  215. package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
  216. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route.js +1 -1
  217. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
  218. package/.next/server/app/api/worktrees/[id]/memos/route.js +1 -1
  219. package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
  220. package/.next/server/app/api/worktrees/[id]/messages/route.js +1 -1
  221. package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
  222. package/.next/server/app/api/worktrees/[id]/opencode/diff/route_client-reference-manifest.js +1 -1
  223. package/.next/server/app/api/worktrees/[id]/opencode/session/route.js +1 -1
  224. package/.next/server/app/api/worktrees/[id]/opencode/session/route.js.nft.json +1 -1
  225. package/.next/server/app/api/worktrees/[id]/opencode/session/route_client-reference-manifest.js +1 -1
  226. package/.next/server/app/api/worktrees/[id]/opencode/share/route.js +1 -1
  227. package/.next/server/app/api/worktrees/[id]/opencode/share/route.js.nft.json +1 -1
  228. package/.next/server/app/api/worktrees/[id]/opencode/share/route_client-reference-manifest.js +1 -1
  229. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
  230. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -1
  231. package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
  232. package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route.js +1 -1
  233. package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route.js.nft.json +1 -1
  234. package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route_client-reference-manifest.js +1 -1
  235. package/.next/server/app/api/worktrees/[id]/resolve-target/route.js +1 -1
  236. package/.next/server/app/api/worktrees/[id]/resolve-target/route_client-reference-manifest.js +1 -1
  237. package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -1
  238. package/.next/server/app/api/worktrees/[id]/respond/route.js.nft.json +1 -1
  239. package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
  240. package/.next/server/app/api/worktrees/[id]/route.js +1 -1
  241. package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
  242. package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
  243. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js +2 -2
  244. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js.nft.json +1 -1
  245. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
  246. package/.next/server/app/api/worktrees/[id]/schedules/active/route.js +2 -2
  247. package/.next/server/app/api/worktrees/[id]/schedules/active/route.js.nft.json +1 -1
  248. package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
  249. package/.next/server/app/api/worktrees/[id]/schedules/route.js +2 -2
  250. package/.next/server/app/api/worktrees/[id]/schedules/route.js.nft.json +1 -1
  251. package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
  252. package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
  253. package/.next/server/app/api/worktrees/[id]/send/route.js +1 -144
  254. package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
  255. package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
  256. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +3 -104
  257. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -1
  258. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
  259. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route.js +1 -1
  260. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route.js.nft.json +1 -1
  261. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
  262. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route.js +1 -1
  263. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route.js.nft.json +1 -1
  264. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
  265. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route.js +1 -1
  266. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route.js.nft.json +1 -1
  267. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
  268. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route.js +1 -1
  269. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route.js.nft.json +1 -1
  270. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
  271. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route.js +1 -1
  272. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route.js.nft.json +1 -1
  273. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route_client-reference-manifest.js +1 -1
  274. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route.js +1 -1
  275. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route.js.nft.json +1 -1
  276. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route_client-reference-manifest.js +1 -1
  277. package/.next/server/app/api/worktrees/[id]/skills/route.js +1 -1
  278. package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
  279. package/.next/server/app/api/worktrees/[id]/slash-commands/route.js +1 -1
  280. package/.next/server/app/api/worktrees/[id]/slash-commands/route.js.nft.json +1 -1
  281. package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
  282. package/.next/server/app/api/worktrees/[id]/special-keys/route.js +1 -1
  283. package/.next/server/app/api/worktrees/[id]/special-keys/route.js.nft.json +1 -1
  284. package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
  285. package/.next/server/app/api/worktrees/[id]/tasks/route.js +2 -2
  286. package/.next/server/app/api/worktrees/[id]/tasks/route.js.nft.json +1 -1
  287. package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -1
  288. package/.next/server/app/api/worktrees/[id]/terminal/route.js +1 -103
  289. package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
  290. package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
  291. package/.next/server/app/api/worktrees/[id]/timers/history/route.js +1 -1
  292. package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
  293. package/.next/server/app/api/worktrees/[id]/timers/route.js +1 -1
  294. package/.next/server/app/api/worktrees/[id]/timers/route.js.nft.json +1 -1
  295. package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
  296. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  297. package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
  298. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
  299. package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
  300. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
  301. package/.next/server/app/api/worktrees/[id]/verify/config/route.js +1 -1
  302. package/.next/server/app/api/worktrees/[id]/verify/config/route_client-reference-manifest.js +1 -1
  303. package/.next/server/app/api/worktrees/[id]/verify/route.js +1 -1
  304. package/.next/server/app/api/worktrees/[id]/verify/route.js.nft.json +1 -1
  305. package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -1
  306. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route.js +1 -1
  307. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route.js.nft.json +1 -1
  308. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route_client-reference-manifest.js +1 -1
  309. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route.js +1 -1
  310. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -1
  311. package/.next/server/app/api/worktrees/[id]/verify/runs/route.js +1 -1
  312. package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -1
  313. package/.next/server/app/api/worktrees/[id]/viewed/route.js +1 -1
  314. package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
  315. package/.next/server/app/api/worktrees/apply-default-agents/route_client-reference-manifest.js +1 -1
  316. package/.next/server/app/api/worktrees/route.js +1 -1
  317. package/.next/server/app/api/worktrees/route.js.nft.json +1 -1
  318. package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
  319. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  320. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  321. package/.next/server/app/more/page.js +1 -1
  322. package/.next/server/app/more/page_client-reference-manifest.js +1 -1
  323. package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  324. package/.next/server/app/page_client-reference-manifest.js +1 -1
  325. package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
  326. package/.next/server/app/repositories/page.js +2 -2
  327. package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
  328. package/.next/server/app/review/page.js +1 -1
  329. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  330. package/.next/server/app/sessions/page.js +1 -1
  331. package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  332. package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
  333. package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
  334. package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  335. package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
  336. package/.next/server/app/worktrees/[id]/page.js +10 -10
  337. package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
  338. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
  339. package/.next/server/app-paths-manifest.json +28 -21
  340. package/.next/server/chunks/1184.js +5 -0
  341. package/.next/server/chunks/1501.js +5 -5
  342. package/.next/server/chunks/1656.js +2 -2
  343. package/.next/server/chunks/1957.js +2 -2
  344. package/.next/server/chunks/1990.js +103 -0
  345. package/.next/server/chunks/2119.js +1 -1
  346. package/.next/server/chunks/2404.js +1 -1
  347. package/.next/server/chunks/2445.js +1 -1
  348. package/.next/server/chunks/2819.js +1 -0
  349. package/.next/server/chunks/2897.js +1 -1
  350. package/.next/server/chunks/3042.js +2 -0
  351. package/.next/server/chunks/3241.js +1 -1
  352. package/.next/server/chunks/3294.js +3 -0
  353. package/.next/server/chunks/3417.js +1 -1
  354. package/.next/server/chunks/3480.js +1 -1
  355. package/.next/server/chunks/3505.js +2 -6
  356. package/.next/server/chunks/3543.js +1 -1
  357. package/.next/server/chunks/3801.js +7 -7
  358. package/.next/server/chunks/3945.js +1 -1
  359. package/.next/server/chunks/4207.js +1 -1
  360. package/.next/server/chunks/454.js +1 -0
  361. package/.next/server/chunks/4645.js +1 -0
  362. package/.next/server/chunks/4911.js +1 -1
  363. package/.next/server/chunks/5209.js +2 -2
  364. package/.next/server/chunks/5350.js +216 -0
  365. package/.next/server/chunks/5354.js +1 -1
  366. package/.next/server/chunks/5571.js +1 -1
  367. package/.next/server/chunks/6009.js +12 -0
  368. package/.next/server/chunks/6130.js +1 -1
  369. package/.next/server/chunks/6285.js +1 -1
  370. package/.next/server/chunks/6401.js +1 -1
  371. package/.next/server/chunks/6486.js +2 -2
  372. package/.next/server/chunks/6569.js +1 -0
  373. package/.next/server/chunks/6781.js +1 -1
  374. package/.next/server/chunks/6793.js +4 -4
  375. package/.next/server/chunks/696.js +3 -0
  376. package/.next/server/chunks/7023.js +3 -3
  377. package/.next/server/chunks/7083.js +1 -0
  378. package/.next/server/chunks/741.js +1 -0
  379. package/.next/server/chunks/7662.js +1 -0
  380. package/.next/server/chunks/7905.js +1 -1
  381. package/.next/server/chunks/8143.js +33 -0
  382. package/.next/server/chunks/8581.js +6 -6
  383. package/.next/server/chunks/8728.js +2 -2
  384. package/.next/server/chunks/8782.js +1 -1
  385. package/.next/server/chunks/8807.js +181 -93
  386. package/.next/server/chunks/8918.js +3 -105
  387. package/.next/server/chunks/8955.js +1 -0
  388. package/.next/server/chunks/9169.js +1 -0
  389. package/.next/server/chunks/923.js +1 -0
  390. package/.next/server/chunks/9390.js +2 -2
  391. package/.next/server/chunks/9627.js +9 -9
  392. package/.next/server/chunks/973.js +1 -0
  393. package/.next/server/chunks/9731.js +3 -3
  394. package/.next/server/middleware-build-manifest.js +1 -1
  395. package/.next/server/middleware-manifest.json +5 -5
  396. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  397. package/.next/server/pages/500.html +1 -1
  398. package/.next/server/server-reference-manifest.json +1 -1
  399. package/.next/static/chunks/2314-2c9d587a27e8f731.js +1 -0
  400. package/.next/static/chunks/2407-ee881c99e218975b.js +1 -0
  401. package/.next/static/chunks/3931-24d7e245a93feb25.js +1 -0
  402. package/.next/static/chunks/4548-9afa02fd18afa6c7.js +1 -0
  403. package/.next/static/chunks/{5794-7975b8e51e731b19.js → 5794-38b3b504b3d97e04.js} +1 -1
  404. package/.next/static/chunks/{6966-d8dc6032410ffaba.js → 6966-dbfa4a43397f8c6d.js} +1 -1
  405. package/.next/static/chunks/7090-28e83f5a0efdb3b4.js +1 -0
  406. package/.next/static/chunks/7229.016d007c467a3600.js +1 -0
  407. package/.next/static/chunks/{8407-35bbfc84793d7004.js → 8407-dd6a8062fc449899.js} +1 -1
  408. package/.next/static/chunks/app/api/agents/update/route-476063c3571b81dd.js +1 -0
  409. package/.next/static/chunks/app/api/agents/versions/route-476063c3571b81dd.js +1 -0
  410. package/.next/static/chunks/app/api/app/release-notes/route-476063c3571b81dd.js +1 -0
  411. package/.next/static/chunks/app/api/app/update/route-476063c3571b81dd.js +1 -0
  412. package/.next/static/chunks/app/api/app/update-check/route-476063c3571b81dd.js +1 -0
  413. package/.next/static/chunks/app/api/auth/login/route-476063c3571b81dd.js +1 -0
  414. package/.next/static/chunks/app/api/auth/logout/route-476063c3571b81dd.js +1 -0
  415. package/.next/static/chunks/app/api/auth/status/route-476063c3571b81dd.js +1 -0
  416. package/.next/static/chunks/app/api/capabilities/route-476063c3571b81dd.js +1 -0
  417. package/.next/static/chunks/app/api/daily-summary/route-476063c3571b81dd.js +1 -0
  418. package/.next/static/chunks/app/api/daily-summary/status/route-476063c3571b81dd.js +1 -0
  419. package/.next/static/chunks/app/api/external-apps/[id]/health/route-476063c3571b81dd.js +1 -0
  420. package/.next/static/chunks/app/api/external-apps/[id]/route-476063c3571b81dd.js +1 -0
  421. package/.next/static/chunks/app/api/external-apps/route-476063c3571b81dd.js +1 -0
  422. package/.next/static/chunks/app/api/fs/browse/route-476063c3571b81dd.js +1 -0
  423. package/.next/static/chunks/app/api/fs/recent-paths/route-476063c3571b81dd.js +1 -0
  424. package/.next/static/chunks/app/api/hooks/agent-event/route-476063c3571b81dd.js +1 -0
  425. package/.next/static/chunks/app/api/hooks/claude-done/route-476063c3571b81dd.js +1 -0
  426. package/.next/static/chunks/app/api/hooks/permission-request/route-476063c3571b81dd.js +1 -0
  427. package/.next/static/chunks/app/api/metrics/vibe/route-476063c3571b81dd.js +1 -0
  428. package/.next/static/chunks/app/api/ollama/models/route-476063c3571b81dd.js +1 -0
  429. package/.next/static/chunks/app/api/push/escalation/route-476063c3571b81dd.js +1 -0
  430. package/.next/static/chunks/app/api/push/subscriptions/route-476063c3571b81dd.js +1 -0
  431. package/.next/static/chunks/app/api/push/vapid/route-476063c3571b81dd.js +1 -0
  432. package/.next/static/chunks/app/api/relays/[relayId]/cancel/route-476063c3571b81dd.js +1 -0
  433. package/.next/static/chunks/app/api/relays/[relayId]/resolve/route-476063c3571b81dd.js +1 -0
  434. package/.next/static/chunks/app/api/relays/[relayId]/route-476063c3571b81dd.js +1 -0
  435. package/.next/static/chunks/app/api/relays/route-476063c3571b81dd.js +1 -0
  436. package/.next/static/chunks/app/api/remote/pair/route-476063c3571b81dd.js +1 -0
  437. package/.next/static/chunks/app/api/repositories/[id]/role-defaults/route-476063c3571b81dd.js +1 -0
  438. package/.next/static/chunks/app/api/repositories/[id]/route-476063c3571b81dd.js +1 -0
  439. package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-476063c3571b81dd.js +1 -0
  440. package/.next/static/chunks/app/api/repositories/clone/route-476063c3571b81dd.js +1 -0
  441. package/.next/static/chunks/app/api/repositories/excluded/route-476063c3571b81dd.js +1 -0
  442. package/.next/static/chunks/app/api/repositories/restore/route-476063c3571b81dd.js +1 -0
  443. package/.next/static/chunks/app/api/repositories/route-476063c3571b81dd.js +1 -0
  444. package/.next/static/chunks/app/api/repositories/scan/route-476063c3571b81dd.js +1 -0
  445. package/.next/static/chunks/app/api/repositories/sync/route-476063c3571b81dd.js +1 -0
  446. package/.next/static/chunks/app/api/repositories/validate-path/route-476063c3571b81dd.js +1 -0
  447. package/.next/static/chunks/app/api/roles/[id]/route-476063c3571b81dd.js +1 -0
  448. package/.next/static/chunks/app/api/roles/route-476063c3571b81dd.js +1 -0
  449. package/.next/static/chunks/app/api/settings/agent-role-defaults/route-476063c3571b81dd.js +1 -0
  450. package/.next/static/chunks/app/api/settings/default-agents/route-476063c3571b81dd.js +1 -0
  451. package/.next/static/chunks/app/api/settings/default-surface-mode/route-476063c3571b81dd.js +1 -0
  452. package/.next/static/chunks/app/api/sidebar/group-order/route-476063c3571b81dd.js +1 -0
  453. package/.next/static/chunks/app/api/skills/[id]/route-476063c3571b81dd.js +1 -0
  454. package/.next/static/chunks/app/api/skills/installations/route-476063c3571b81dd.js +1 -0
  455. package/.next/static/chunks/app/api/skills/operations/route-476063c3571b81dd.js +1 -0
  456. package/.next/static/chunks/app/api/skills/reindex/route-476063c3571b81dd.js +1 -0
  457. package/.next/static/chunks/app/api/skills/route-476063c3571b81dd.js +1 -0
  458. package/.next/static/chunks/app/api/slash-commands/route-476063c3571b81dd.js +1 -0
  459. package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-476063c3571b81dd.js +1 -0
  460. package/.next/static/chunks/app/api/tasks/[taskId]/route-476063c3571b81dd.js +1 -0
  461. package/.next/static/chunks/app/api/templates/[id]/route-476063c3571b81dd.js +1 -0
  462. package/.next/static/chunks/app/api/templates/route-476063c3571b81dd.js +1 -0
  463. package/.next/static/chunks/app/api/verification/runs/[runId]/route-476063c3571b81dd.js +1 -0
  464. package/.next/static/chunks/app/api/verification/runs/route-476063c3571b81dd.js +1 -0
  465. package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-476063c3571b81dd.js +1 -0
  466. package/.next/static/chunks/app/api/worktrees/[id]/capture/route-476063c3571b81dd.js +1 -0
  467. package/.next/static/chunks/app/api/worktrees/[id]/clear-composer/route-476063c3571b81dd.js +1 -0
  468. package/.next/static/chunks/app/api/worktrees/[id]/cli-reference/route-476063c3571b81dd.js +1 -0
  469. package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-476063c3571b81dd.js +1 -0
  470. package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-476063c3571b81dd.js +1 -0
  471. package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-476063c3571b81dd.js +1 -0
  472. package/.next/static/chunks/app/api/worktrees/[id]/direct-input/route-476063c3571b81dd.js +1 -0
  473. package/.next/static/chunks/app/api/worktrees/[id]/env/route-476063c3571b81dd.js +1 -0
  474. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-476063c3571b81dd.js +1 -0
  475. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-476063c3571b81dd.js +1 -0
  476. package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-476063c3571b81dd.js +1 -0
  477. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-476063c3571b81dd.js +1 -0
  478. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-476063c3571b81dd.js +1 -0
  479. package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-476063c3571b81dd.js +1 -0
  480. package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-476063c3571b81dd.js +1 -0
  481. package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-476063c3571b81dd.js +1 -0
  482. package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-476063c3571b81dd.js +1 -0
  483. package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-476063c3571b81dd.js +1 -0
  484. package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-476063c3571b81dd.js +1 -0
  485. package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-476063c3571b81dd.js +1 -0
  486. package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-476063c3571b81dd.js +1 -0
  487. package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-476063c3571b81dd.js +1 -0
  488. package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-476063c3571b81dd.js +1 -0
  489. package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-476063c3571b81dd.js +1 -0
  490. package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-476063c3571b81dd.js +1 -0
  491. package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-476063c3571b81dd.js +1 -0
  492. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-476063c3571b81dd.js +1 -0
  493. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-476063c3571b81dd.js +1 -0
  494. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-476063c3571b81dd.js +1 -0
  495. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-476063c3571b81dd.js +1 -0
  496. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-476063c3571b81dd.js +1 -0
  497. package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-476063c3571b81dd.js +1 -0
  498. package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-476063c3571b81dd.js +1 -0
  499. package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-476063c3571b81dd.js +1 -0
  500. package/.next/static/chunks/app/api/worktrees/[id]/instances/notes/route-476063c3571b81dd.js +1 -0
  501. package/.next/static/chunks/app/api/worktrees/[id]/instances/opencode/route-476063c3571b81dd.js +1 -0
  502. package/.next/static/chunks/app/api/worktrees/[id]/instances/roles/route-476063c3571b81dd.js +1 -0
  503. package/.next/static/chunks/app/api/worktrees/[id]/instances/roles/settle/route-476063c3571b81dd.js +1 -0
  504. package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-476063c3571b81dd.js +1 -0
  505. package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-476063c3571b81dd.js +1 -0
  506. package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-476063c3571b81dd.js +1 -0
  507. package/.next/static/chunks/app/api/worktrees/[id]/logs/route-476063c3571b81dd.js +1 -0
  508. package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-476063c3571b81dd.js +1 -0
  509. package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-476063c3571b81dd.js +1 -0
  510. package/.next/static/chunks/app/api/worktrees/[id]/memos/route-476063c3571b81dd.js +1 -0
  511. package/.next/static/chunks/app/api/worktrees/[id]/messages/route-476063c3571b81dd.js +1 -0
  512. package/.next/static/chunks/app/api/worktrees/[id]/opencode/diff/route-476063c3571b81dd.js +1 -0
  513. package/.next/static/chunks/app/api/worktrees/[id]/opencode/session/route-476063c3571b81dd.js +1 -0
  514. package/.next/static/chunks/app/api/worktrees/[id]/opencode/share/route-476063c3571b81dd.js +1 -0
  515. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-476063c3571b81dd.js +1 -0
  516. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/strict/route-476063c3571b81dd.js +1 -0
  517. package/.next/static/chunks/app/api/worktrees/[id]/resolve-target/route-476063c3571b81dd.js +1 -0
  518. package/.next/static/chunks/app/api/worktrees/[id]/respond/route-476063c3571b81dd.js +1 -0
  519. package/.next/static/chunks/app/api/worktrees/[id]/route-476063c3571b81dd.js +1 -0
  520. package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-476063c3571b81dd.js +1 -0
  521. package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-476063c3571b81dd.js +1 -0
  522. package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-476063c3571b81dd.js +1 -0
  523. package/.next/static/chunks/app/api/worktrees/[id]/search/route-476063c3571b81dd.js +1 -0
  524. package/.next/static/chunks/app/api/worktrees/[id]/send/route-476063c3571b81dd.js +1 -0
  525. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-476063c3571b81dd.js +1 -0
  526. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-476063c3571b81dd.js +1 -0
  527. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-476063c3571b81dd.js +1 -0
  528. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-476063c3571b81dd.js +1 -0
  529. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-476063c3571b81dd.js +1 -0
  530. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-476063c3571b81dd.js +1 -0
  531. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-476063c3571b81dd.js +1 -0
  532. package/.next/static/chunks/app/api/worktrees/[id]/skills/route-476063c3571b81dd.js +1 -0
  533. package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-476063c3571b81dd.js +1 -0
  534. package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-476063c3571b81dd.js +1 -0
  535. package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-476063c3571b81dd.js +1 -0
  536. package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-476063c3571b81dd.js +1 -0
  537. package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-476063c3571b81dd.js +1 -0
  538. package/.next/static/chunks/app/api/worktrees/[id]/timers/route-476063c3571b81dd.js +1 -0
  539. package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-476063c3571b81dd.js +1 -0
  540. package/.next/static/chunks/app/api/worktrees/[id]/todos/route-476063c3571b81dd.js +1 -0
  541. package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-476063c3571b81dd.js +1 -0
  542. package/.next/static/chunks/app/api/worktrees/[id]/tree/route-476063c3571b81dd.js +1 -0
  543. package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-476063c3571b81dd.js +1 -0
  544. package/.next/static/chunks/app/api/worktrees/[id]/verify/config/route-476063c3571b81dd.js +1 -0
  545. package/.next/static/chunks/app/api/worktrees/[id]/verify/route-476063c3571b81dd.js +1 -0
  546. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route-476063c3571b81dd.js +1 -0
  547. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-476063c3571b81dd.js +1 -0
  548. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-476063c3571b81dd.js +1 -0
  549. package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-476063c3571b81dd.js +1 -0
  550. package/.next/static/chunks/app/api/worktrees/apply-default-agents/route-476063c3571b81dd.js +1 -0
  551. package/.next/static/chunks/app/api/worktrees/route-476063c3571b81dd.js +1 -0
  552. package/.next/static/chunks/app/layout-7bf800fcc5e025b1.js +1 -0
  553. package/.next/static/chunks/app/manifest.webmanifest/route-476063c3571b81dd.js +1 -0
  554. package/.next/static/chunks/app/more/{page-ff5af5ca48774c89.js → page-e8f5780f6e4fb657.js} +1 -1
  555. package/.next/static/chunks/app/{page-b4863bfe0452e09d.js → page-869f353a4ac4e15b.js} +1 -1
  556. package/.next/static/chunks/app/proxy/[...path]/route-476063c3571b81dd.js +1 -0
  557. package/.next/static/chunks/app/repositories/page-bedb505687010f18.js +1 -0
  558. package/.next/static/chunks/app/review/page-87c4a9b0de50fa80.js +1 -0
  559. package/.next/static/chunks/app/sessions/{page-c6eb7c02db2f4c80.js → page-82ca46793789fce4.js} +1 -1
  560. package/.next/static/chunks/app/worktrees/[id]/layout-476063c3571b81dd.js +1 -0
  561. package/.next/static/chunks/app/worktrees/[id]/page-570eb79fbbd1a934.js +1 -0
  562. package/.next/static/chunks/{webpack-838df0273b03af19.js → webpack-16b1a3143fa42ca0.js} +1 -1
  563. package/.next/static/css/d4f2c9522cf1b449.css +1 -0
  564. package/.next/static/z4d8-5MaLkoD-4EhueZwk/_buildManifest.js +1 -0
  565. package/.next/trace +14 -13
  566. package/.next/types/app/api/relays/[relayId]/resolve/route.ts +347 -0
  567. package/.next/types/app/api/repositories/[id]/role-defaults/route.ts +347 -0
  568. package/.next/types/app/api/roles/[id]/route.ts +347 -0
  569. package/.next/types/app/api/roles/route.ts +347 -0
  570. package/.next/types/app/api/settings/agent-role-defaults/route.ts +347 -0
  571. package/.next/types/app/api/worktrees/[id]/instances/roles/route.ts +347 -0
  572. package/.next/types/app/api/worktrees/[id]/instances/roles/settle/route.ts +347 -0
  573. package/.next/types/routes.d.ts +8 -1
  574. package/.next/types/validator.ts +63 -0
  575. package/dist/cli/commands/instances.d.ts +1 -0
  576. package/dist/cli/commands/instances.d.ts.map +1 -1
  577. package/dist/cli/commands/instances.js +290 -33
  578. package/dist/cli/commands/message-dispatch.d.ts +25 -3
  579. package/dist/cli/commands/message-dispatch.d.ts.map +1 -1
  580. package/dist/cli/commands/message-dispatch.js +26 -6
  581. package/dist/cli/commands/prompt.d.ts.map +1 -1
  582. package/dist/cli/commands/prompt.js +2 -1
  583. package/dist/cli/commands/relays.d.ts +7 -0
  584. package/dist/cli/commands/relays.d.ts.map +1 -1
  585. package/dist/cli/commands/relays.js +179 -6
  586. package/dist/cli/commands/report.d.ts +7 -2
  587. package/dist/cli/commands/report.d.ts.map +1 -1
  588. package/dist/cli/commands/report.js +19 -6
  589. package/dist/cli/commands/respond-strict.d.ts.map +1 -1
  590. package/dist/cli/commands/respond-strict.js +9 -2
  591. package/dist/cli/commands/roles.d.ts +11 -0
  592. package/dist/cli/commands/roles.d.ts.map +1 -0
  593. package/dist/cli/commands/roles.js +392 -0
  594. package/dist/cli/commands/send.d.ts.map +1 -1
  595. package/dist/cli/commands/send.js +526 -38
  596. package/dist/cli/commands/task.d.ts +22 -0
  597. package/dist/cli/commands/task.d.ts.map +1 -1
  598. package/dist/cli/commands/task.js +26 -18
  599. package/dist/cli/docs/agent-operations.d.ts +1 -1
  600. package/dist/cli/docs/agent-operations.d.ts.map +1 -1
  601. package/dist/cli/docs/agent-operations.js +91 -3
  602. package/dist/cli/index.d.ts +4 -0
  603. package/dist/cli/index.d.ts.map +1 -1
  604. package/dist/cli/index.js +6 -0
  605. package/dist/cli/types/api-responses.d.ts +106 -0
  606. package/dist/cli/types/api-responses.d.ts.map +1 -1
  607. package/dist/cli/types/index.d.ts +38 -0
  608. package/dist/cli/types/index.d.ts.map +1 -1
  609. package/dist/cli/types/index.js +15 -1
  610. package/dist/cli/utils/agent-instances.d.ts +29 -1
  611. package/dist/cli/utils/agent-instances.d.ts.map +1 -1
  612. package/dist/cli/utils/agent-instances.js +67 -7
  613. package/dist/cli/utils/agent-roles.d.ts +75 -0
  614. package/dist/cli/utils/agent-roles.d.ts.map +1 -0
  615. package/dist/cli/utils/agent-roles.js +238 -0
  616. package/dist/cli/utils/api-client-deadline.d.ts +28 -0
  617. package/dist/cli/utils/api-client-deadline.d.ts.map +1 -0
  618. package/dist/cli/utils/api-client-deadline.js +46 -0
  619. package/dist/cli/utils/api-client-errors.d.ts +140 -0
  620. package/dist/cli/utils/api-client-errors.d.ts.map +1 -0
  621. package/dist/cli/utils/api-client-errors.js +222 -0
  622. package/dist/cli/utils/api-client.d.ts +9 -131
  623. package/dist/cli/utils/api-client.d.ts.map +1 -1
  624. package/dist/cli/utils/api-client.js +43 -258
  625. package/dist/cli/utils/role-failure.d.ts +31 -0
  626. package/dist/cli/utils/role-failure.d.ts.map +1 -0
  627. package/dist/cli/utils/role-failure.js +90 -0
  628. package/dist/cli/utils/role-input.d.ts +16 -0
  629. package/dist/cli/utils/role-input.d.ts.map +1 -0
  630. package/dist/cli/utils/role-input.js +78 -0
  631. package/dist/cli/utils/security-logger.d.ts +17 -0
  632. package/dist/cli/utils/security-logger.d.ts.map +1 -1
  633. package/dist/cli/utils/security-logger.js +44 -5
  634. package/dist/lib/cli-tools/types.d.ts +6 -0
  635. package/dist/lib/cli-tools/types.d.ts.map +1 -1
  636. package/dist/lib/detection/tools/verified-against.d.ts +16 -0
  637. package/dist/lib/detection/tools/verified-against.d.ts.map +1 -1
  638. package/dist/lib/detection/tools/verified-against.js +16 -0
  639. package/dist/lib/session/send-attempt-types.d.ts +4 -0
  640. package/dist/lib/session/send-attempt-types.d.ts.map +1 -1
  641. package/dist/lib/verification/verify-config.d.ts +22 -0
  642. package/dist/lib/verification/verify-config.d.ts.map +1 -1
  643. package/dist/lib/verification/verify-config.js +32 -2
  644. package/dist/server/locales/en/worktree.json +30 -4
  645. package/dist/server/locales/ja/worktree.json +30 -4
  646. package/dist/server/src/config/safe-directory.js +30 -0
  647. package/dist/server/src/lib/agent-roles/adapters.js +174 -0
  648. package/dist/server/src/lib/agent-roles/artifacts.js +638 -0
  649. package/dist/server/src/lib/agent-roles/composition.js +222 -0
  650. package/dist/server/src/lib/agent-roles/fingerprint.js +21 -0
  651. package/dist/server/src/lib/agent-roles/jsonc.js +85 -0
  652. package/dist/server/src/lib/agent-roles/launch-errors.js +58 -0
  653. package/dist/server/src/lib/agent-roles/pane-env.js +63 -0
  654. package/dist/server/src/lib/agent-roles/resolve.js +375 -0
  655. package/dist/server/src/lib/agent-roles/toml-basic.js +140 -0
  656. package/dist/server/src/lib/agent-roles/unicode.js +16 -0
  657. package/dist/server/src/lib/agent-roles/validation.js +61 -0
  658. package/dist/server/src/lib/cli-tools/antigravity.js +39 -6
  659. package/dist/server/src/lib/cli-tools/base.js +63 -5
  660. package/dist/server/src/lib/cli-tools/claude-auto-default-nudge.js +141 -0
  661. package/dist/server/src/lib/cli-tools/claude.js +15 -3
  662. package/dist/server/src/lib/cli-tools/codex.js +134 -21
  663. package/dist/server/src/lib/cli-tools/command-code.js +28 -13
  664. package/dist/server/src/lib/cli-tools/copilot.js +189 -31
  665. package/dist/server/src/lib/cli-tools/gemini.js +37 -3
  666. package/dist/server/src/lib/cli-tools/launch-answer-skips.js +76 -0
  667. package/dist/server/src/lib/cli-tools/opencode-v2.js +10 -0
  668. package/dist/server/src/lib/cli-tools/opencode.js +214 -12
  669. package/dist/server/src/lib/cli-tools/prompt-wait-dialog.js +115 -0
  670. package/dist/server/src/lib/cli-tools/submit-composer-read.js +65 -12
  671. package/dist/server/src/lib/cli-tools/submit-verified-sender-composer.js +78 -0
  672. package/dist/server/src/lib/cli-tools/submit-verified-sender-lock.js +116 -0
  673. package/dist/server/src/lib/cli-tools/submit-verified-sender-report.js +250 -0
  674. package/dist/server/src/lib/cli-tools/submit-verified-sender-shared.js +106 -0
  675. package/dist/server/src/lib/cli-tools/submit-verified-sender.js +94 -295
  676. package/dist/server/src/lib/cli-tools/vibe-local.js +111 -0
  677. package/dist/server/src/lib/db/agent-instances-db.js +53 -0
  678. package/dist/server/src/lib/db/agent-roles-db.js +409 -0
  679. package/dist/server/src/lib/db/agent-session-cost-sampler.js +3 -2
  680. package/dist/server/src/lib/db/chat-db.js +14 -1
  681. package/dist/server/src/lib/db/db-instance.js +84 -2
  682. package/dist/server/src/lib/db/migrations/index.js +6 -0
  683. package/dist/server/src/lib/db/migrations/runner.js +1 -1
  684. package/dist/server/src/lib/db/migrations/v63-session-relays-delivery-attempt.js +61 -0
  685. package/dist/server/src/lib/db/migrations/v64-agent-roles.js +123 -0
  686. package/dist/server/src/lib/db/migrations/v65-agent-instance-creation-keys.js +42 -0
  687. package/dist/server/src/lib/db/relay-bind-db-base.js +89 -0
  688. package/dist/server/src/lib/db/relay-bind-db-delivery.js +223 -0
  689. package/dist/server/src/lib/db/relay-bind-db-pending.js +183 -0
  690. package/dist/server/src/lib/db/relay-bind-db.js +88 -167
  691. package/dist/server/src/lib/db/relay-db-base.js +20 -0
  692. package/dist/server/src/lib/db/relay-db-count.js +49 -0
  693. package/dist/server/src/lib/db/relay-db-delivery.js +104 -0
  694. package/dist/server/src/lib/db/relay-db-hold.js +250 -0
  695. package/dist/server/src/lib/db/relay-db.js +68 -92
  696. package/dist/server/src/lib/detection/cli-patterns.js +13 -3
  697. package/dist/server/src/lib/detection/model-info-extractor.js +1 -1
  698. package/dist/server/src/lib/detection/tools/claude/patterns.js +76 -0
  699. package/dist/server/src/lib/detection/tools/codex/cli-patterns.js +5 -0
  700. package/dist/server/src/lib/detection/tools/codex/detect.js +5 -1
  701. package/dist/server/src/lib/detection/tools/codex/patterns.js +52 -2
  702. package/dist/server/src/lib/detection/tools/codex/prompt.js +23 -3
  703. package/dist/server/src/lib/detection/tools/opencode/composer-own-text.js +119 -0
  704. package/dist/server/src/lib/detection/tools/opencode/detect.js +30 -15
  705. package/dist/server/src/lib/detection/tools/opencode/patterns.js +268 -7
  706. package/dist/server/src/lib/detection/tools/opencode/readiness.js +71 -0
  707. package/dist/server/src/lib/detection/tools/opencode-v2/detect.js +51 -15
  708. package/dist/server/src/lib/detection/tools/opencode-v2/patterns.js +195 -11
  709. package/dist/server/src/lib/detection/tools/run-detection.js +5 -2
  710. package/dist/server/src/lib/detection/tools/verified-against.js +16 -0
  711. package/dist/server/src/lib/detection/tools/vibe-local/readiness.js +92 -0
  712. package/dist/server/src/lib/git/git-common-dir.js +192 -0
  713. package/dist/server/src/lib/hooks/hook-settings-generator.js +8 -2
  714. package/dist/server/src/lib/hooks/sources/copilot/hook-settings.js +31 -1
  715. package/dist/server/src/lib/hooks/sources/launch-command.js +31 -8
  716. package/dist/server/src/lib/hooks/sources/opencode/client.js +20 -0
  717. package/dist/server/src/lib/hooks/sources/opencode-v2/client.js +24 -0
  718. package/dist/server/src/lib/hooks/sources/opencode-v2/history.js +208 -35
  719. package/dist/server/src/lib/hooks/sources/opencode-v2/secrets.js +7 -1
  720. package/dist/server/src/lib/hooks/sources/opencode-v2/subscription.js +117 -2
  721. package/dist/server/src/lib/job-executor.js +18 -1
  722. package/dist/server/src/lib/polling/response-checker-extraction-steps.js +58 -4
  723. package/dist/server/src/lib/polling/response-checker.js +32 -7
  724. package/dist/server/src/lib/relay/relay-bound-reply.js +20 -9
  725. package/dist/server/src/lib/relay/relay-delivery-block.js +150 -0
  726. package/dist/server/src/lib/relay/relay-delivery.js +416 -79
  727. package/dist/server/src/lib/relay/relay-messages.js +13 -0
  728. package/dist/server/src/lib/relay/relay-system-line.js +28 -15
  729. package/dist/server/src/lib/relay/types.js +14 -2
  730. package/dist/server/src/lib/response-cleaner.js +13 -3
  731. package/dist/server/src/lib/response-extractor.js +38 -3
  732. package/dist/server/src/lib/session/agent-session-lifecycle.js +9 -1
  733. package/dist/server/src/lib/session/claude-executor.js +13 -1
  734. package/dist/server/src/lib/session/claude-session.js +113 -14
  735. package/dist/server/src/lib/session/current-output-builder.js +7 -5
  736. package/dist/server/src/lib/session/instance-input-lock.js +140 -6
  737. package/dist/server/src/lib/session/prompt-submit-receipt.js +87 -18
  738. package/dist/server/src/lib/session/prompt-waiting-guard.js +8 -2
  739. package/dist/server/src/lib/session/respond-target.js +82 -0
  740. package/dist/server/src/lib/session/role-launch.js +722 -0
  741. package/dist/server/src/lib/session/send-attempt-state.js +137 -3
  742. package/dist/server/src/lib/session/send-user-message.js +84 -7
  743. package/dist/server/src/lib/session/session-generation-archive.js +7 -8
  744. package/dist/server/src/lib/session/session-launch-flight.js +33 -1
  745. package/dist/server/src/lib/session/structured-prompt.js +12 -7
  746. package/dist/server/src/lib/session/worktree-session-reconcile.js +15 -0
  747. package/dist/server/src/lib/session-key-sender.js +6 -1
  748. package/dist/server/src/lib/test-run-detection.js +53 -0
  749. package/dist/server/src/lib/tmux/read-mode.js +4 -0
  750. package/dist/server/src/lib/tmux/session-hook-scripts.js +36 -4
  751. package/dist/server/src/lib/tui-accumulator.js +14 -5
  752. package/dist/server/src/lib/verification/env-clean-gate.js +117 -12
  753. package/dist/server/src/lib/verification/gate-runner.js +9 -8
  754. package/dist/server/src/lib/verification/verify-config.js +32 -2
  755. package/dist/server/src/types/agent-roles.js +56 -0
  756. package/dist/types/agent-roles.d.ts +351 -0
  757. package/dist/types/agent-roles.d.ts.map +1 -0
  758. package/dist/types/agent-roles.js +56 -0
  759. package/docs/en/user-guide/webapp-guide.md +16 -0
  760. package/package.json +2 -1
  761. package/release-notes/0.49.3.json +52 -0
  762. package/release-notes/0.50.0.json +113 -0
  763. package/.next/server/chunks/1062.js +0 -1
  764. package/.next/server/chunks/110.js +0 -1
  765. package/.next/server/chunks/2422.js +0 -1
  766. package/.next/server/chunks/3756.js +0 -1
  767. package/.next/server/chunks/4936.js +0 -1
  768. package/.next/server/chunks/5630.js +0 -1
  769. package/.next/server/chunks/610.js +0 -1
  770. package/.next/server/chunks/6119.js +0 -1
  771. package/.next/server/chunks/6808.js +0 -4
  772. package/.next/server/chunks/7491.js +0 -3
  773. package/.next/server/chunks/9198.js +0 -144
  774. package/.next/server/chunks/9360.js +0 -2
  775. package/.next/server/chunks/9584.js +0 -1
  776. package/.next/static/chunks/2407-07a237575e1ceb9e.js +0 -1
  777. package/.next/static/chunks/344-e1cefd00787060e4.js +0 -1
  778. package/.next/static/chunks/3931-61ad1a4fc0208d0e.js +0 -1
  779. package/.next/static/chunks/7229.7f0f5a7032b612b4.js +0 -1
  780. package/.next/static/chunks/8165-263172c17ae8e8c3.js +0 -1
  781. package/.next/static/chunks/app/api/agents/update/route-a4f129c451de7859.js +0 -1
  782. package/.next/static/chunks/app/api/agents/versions/route-a4f129c451de7859.js +0 -1
  783. package/.next/static/chunks/app/api/app/release-notes/route-a4f129c451de7859.js +0 -1
  784. package/.next/static/chunks/app/api/app/update/route-a4f129c451de7859.js +0 -1
  785. package/.next/static/chunks/app/api/app/update-check/route-a4f129c451de7859.js +0 -1
  786. package/.next/static/chunks/app/api/auth/login/route-a4f129c451de7859.js +0 -1
  787. package/.next/static/chunks/app/api/auth/logout/route-a4f129c451de7859.js +0 -1
  788. package/.next/static/chunks/app/api/auth/status/route-a4f129c451de7859.js +0 -1
  789. package/.next/static/chunks/app/api/capabilities/route-a4f129c451de7859.js +0 -1
  790. package/.next/static/chunks/app/api/daily-summary/route-a4f129c451de7859.js +0 -1
  791. package/.next/static/chunks/app/api/daily-summary/status/route-a4f129c451de7859.js +0 -1
  792. package/.next/static/chunks/app/api/external-apps/[id]/health/route-a4f129c451de7859.js +0 -1
  793. package/.next/static/chunks/app/api/external-apps/[id]/route-a4f129c451de7859.js +0 -1
  794. package/.next/static/chunks/app/api/external-apps/route-a4f129c451de7859.js +0 -1
  795. package/.next/static/chunks/app/api/fs/browse/route-a4f129c451de7859.js +0 -1
  796. package/.next/static/chunks/app/api/fs/recent-paths/route-a4f129c451de7859.js +0 -1
  797. package/.next/static/chunks/app/api/hooks/agent-event/route-a4f129c451de7859.js +0 -1
  798. package/.next/static/chunks/app/api/hooks/claude-done/route-a4f129c451de7859.js +0 -1
  799. package/.next/static/chunks/app/api/hooks/permission-request/route-a4f129c451de7859.js +0 -1
  800. package/.next/static/chunks/app/api/metrics/vibe/route-a4f129c451de7859.js +0 -1
  801. package/.next/static/chunks/app/api/ollama/models/route-a4f129c451de7859.js +0 -1
  802. package/.next/static/chunks/app/api/push/escalation/route-a4f129c451de7859.js +0 -1
  803. package/.next/static/chunks/app/api/push/subscriptions/route-a4f129c451de7859.js +0 -1
  804. package/.next/static/chunks/app/api/push/vapid/route-a4f129c451de7859.js +0 -1
  805. package/.next/static/chunks/app/api/relays/[relayId]/cancel/route-a4f129c451de7859.js +0 -1
  806. package/.next/static/chunks/app/api/relays/[relayId]/route-a4f129c451de7859.js +0 -1
  807. package/.next/static/chunks/app/api/relays/route-a4f129c451de7859.js +0 -1
  808. package/.next/static/chunks/app/api/remote/pair/route-a4f129c451de7859.js +0 -1
  809. package/.next/static/chunks/app/api/repositories/[id]/route-a4f129c451de7859.js +0 -1
  810. package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-a4f129c451de7859.js +0 -1
  811. package/.next/static/chunks/app/api/repositories/clone/route-a4f129c451de7859.js +0 -1
  812. package/.next/static/chunks/app/api/repositories/excluded/route-a4f129c451de7859.js +0 -1
  813. package/.next/static/chunks/app/api/repositories/restore/route-a4f129c451de7859.js +0 -1
  814. package/.next/static/chunks/app/api/repositories/route-a4f129c451de7859.js +0 -1
  815. package/.next/static/chunks/app/api/repositories/scan/route-a4f129c451de7859.js +0 -1
  816. package/.next/static/chunks/app/api/repositories/sync/route-a4f129c451de7859.js +0 -1
  817. package/.next/static/chunks/app/api/repositories/validate-path/route-a4f129c451de7859.js +0 -1
  818. package/.next/static/chunks/app/api/settings/default-agents/route-a4f129c451de7859.js +0 -1
  819. package/.next/static/chunks/app/api/settings/default-surface-mode/route-a4f129c451de7859.js +0 -1
  820. package/.next/static/chunks/app/api/sidebar/group-order/route-a4f129c451de7859.js +0 -1
  821. package/.next/static/chunks/app/api/skills/[id]/route-a4f129c451de7859.js +0 -1
  822. package/.next/static/chunks/app/api/skills/installations/route-a4f129c451de7859.js +0 -1
  823. package/.next/static/chunks/app/api/skills/operations/route-a4f129c451de7859.js +0 -1
  824. package/.next/static/chunks/app/api/skills/reindex/route-a4f129c451de7859.js +0 -1
  825. package/.next/static/chunks/app/api/skills/route-a4f129c451de7859.js +0 -1
  826. package/.next/static/chunks/app/api/slash-commands/route-a4f129c451de7859.js +0 -1
  827. package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-a4f129c451de7859.js +0 -1
  828. package/.next/static/chunks/app/api/tasks/[taskId]/route-a4f129c451de7859.js +0 -1
  829. package/.next/static/chunks/app/api/templates/[id]/route-a4f129c451de7859.js +0 -1
  830. package/.next/static/chunks/app/api/templates/route-a4f129c451de7859.js +0 -1
  831. package/.next/static/chunks/app/api/verification/runs/[runId]/route-a4f129c451de7859.js +0 -1
  832. package/.next/static/chunks/app/api/verification/runs/route-a4f129c451de7859.js +0 -1
  833. package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-a4f129c451de7859.js +0 -1
  834. package/.next/static/chunks/app/api/worktrees/[id]/capture/route-a4f129c451de7859.js +0 -1
  835. package/.next/static/chunks/app/api/worktrees/[id]/clear-composer/route-a4f129c451de7859.js +0 -1
  836. package/.next/static/chunks/app/api/worktrees/[id]/cli-reference/route-a4f129c451de7859.js +0 -1
  837. package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-a4f129c451de7859.js +0 -1
  838. package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-a4f129c451de7859.js +0 -1
  839. package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-a4f129c451de7859.js +0 -1
  840. package/.next/static/chunks/app/api/worktrees/[id]/direct-input/route-a4f129c451de7859.js +0 -1
  841. package/.next/static/chunks/app/api/worktrees/[id]/env/route-a4f129c451de7859.js +0 -1
  842. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-a4f129c451de7859.js +0 -1
  843. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-a4f129c451de7859.js +0 -1
  844. package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-a4f129c451de7859.js +0 -1
  845. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-a4f129c451de7859.js +0 -1
  846. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-a4f129c451de7859.js +0 -1
  847. package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-a4f129c451de7859.js +0 -1
  848. package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-a4f129c451de7859.js +0 -1
  849. package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-a4f129c451de7859.js +0 -1
  850. package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-a4f129c451de7859.js +0 -1
  851. package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-a4f129c451de7859.js +0 -1
  852. package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-a4f129c451de7859.js +0 -1
  853. package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-a4f129c451de7859.js +0 -1
  854. package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-a4f129c451de7859.js +0 -1
  855. package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-a4f129c451de7859.js +0 -1
  856. package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-a4f129c451de7859.js +0 -1
  857. package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-a4f129c451de7859.js +0 -1
  858. package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-a4f129c451de7859.js +0 -1
  859. package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-a4f129c451de7859.js +0 -1
  860. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-a4f129c451de7859.js +0 -1
  861. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-a4f129c451de7859.js +0 -1
  862. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-a4f129c451de7859.js +0 -1
  863. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-a4f129c451de7859.js +0 -1
  864. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-a4f129c451de7859.js +0 -1
  865. package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-a4f129c451de7859.js +0 -1
  866. package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-a4f129c451de7859.js +0 -1
  867. package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-a4f129c451de7859.js +0 -1
  868. package/.next/static/chunks/app/api/worktrees/[id]/instances/notes/route-a4f129c451de7859.js +0 -1
  869. package/.next/static/chunks/app/api/worktrees/[id]/instances/opencode/route-a4f129c451de7859.js +0 -1
  870. package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-a4f129c451de7859.js +0 -1
  871. package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-a4f129c451de7859.js +0 -1
  872. package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-a4f129c451de7859.js +0 -1
  873. package/.next/static/chunks/app/api/worktrees/[id]/logs/route-a4f129c451de7859.js +0 -1
  874. package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-a4f129c451de7859.js +0 -1
  875. package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-a4f129c451de7859.js +0 -1
  876. package/.next/static/chunks/app/api/worktrees/[id]/memos/route-a4f129c451de7859.js +0 -1
  877. package/.next/static/chunks/app/api/worktrees/[id]/messages/route-a4f129c451de7859.js +0 -1
  878. package/.next/static/chunks/app/api/worktrees/[id]/opencode/diff/route-a4f129c451de7859.js +0 -1
  879. package/.next/static/chunks/app/api/worktrees/[id]/opencode/session/route-a4f129c451de7859.js +0 -1
  880. package/.next/static/chunks/app/api/worktrees/[id]/opencode/share/route-a4f129c451de7859.js +0 -1
  881. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-a4f129c451de7859.js +0 -1
  882. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/strict/route-a4f129c451de7859.js +0 -1
  883. package/.next/static/chunks/app/api/worktrees/[id]/resolve-target/route-a4f129c451de7859.js +0 -1
  884. package/.next/static/chunks/app/api/worktrees/[id]/respond/route-a4f129c451de7859.js +0 -1
  885. package/.next/static/chunks/app/api/worktrees/[id]/route-a4f129c451de7859.js +0 -1
  886. package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-a4f129c451de7859.js +0 -1
  887. package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-a4f129c451de7859.js +0 -1
  888. package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-a4f129c451de7859.js +0 -1
  889. package/.next/static/chunks/app/api/worktrees/[id]/search/route-a4f129c451de7859.js +0 -1
  890. package/.next/static/chunks/app/api/worktrees/[id]/send/route-a4f129c451de7859.js +0 -1
  891. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-a4f129c451de7859.js +0 -1
  892. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-a4f129c451de7859.js +0 -1
  893. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-a4f129c451de7859.js +0 -1
  894. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-a4f129c451de7859.js +0 -1
  895. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-a4f129c451de7859.js +0 -1
  896. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-a4f129c451de7859.js +0 -1
  897. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-a4f129c451de7859.js +0 -1
  898. package/.next/static/chunks/app/api/worktrees/[id]/skills/route-a4f129c451de7859.js +0 -1
  899. package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-a4f129c451de7859.js +0 -1
  900. package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-a4f129c451de7859.js +0 -1
  901. package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-a4f129c451de7859.js +0 -1
  902. package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-a4f129c451de7859.js +0 -1
  903. package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-a4f129c451de7859.js +0 -1
  904. package/.next/static/chunks/app/api/worktrees/[id]/timers/route-a4f129c451de7859.js +0 -1
  905. package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-a4f129c451de7859.js +0 -1
  906. package/.next/static/chunks/app/api/worktrees/[id]/todos/route-a4f129c451de7859.js +0 -1
  907. package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-a4f129c451de7859.js +0 -1
  908. package/.next/static/chunks/app/api/worktrees/[id]/tree/route-a4f129c451de7859.js +0 -1
  909. package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-a4f129c451de7859.js +0 -1
  910. package/.next/static/chunks/app/api/worktrees/[id]/verify/config/route-a4f129c451de7859.js +0 -1
  911. package/.next/static/chunks/app/api/worktrees/[id]/verify/route-a4f129c451de7859.js +0 -1
  912. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route-a4f129c451de7859.js +0 -1
  913. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-a4f129c451de7859.js +0 -1
  914. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-a4f129c451de7859.js +0 -1
  915. package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-a4f129c451de7859.js +0 -1
  916. package/.next/static/chunks/app/api/worktrees/apply-default-agents/route-a4f129c451de7859.js +0 -1
  917. package/.next/static/chunks/app/api/worktrees/route-a4f129c451de7859.js +0 -1
  918. package/.next/static/chunks/app/layout-4f64316957b0a8e5.js +0 -1
  919. package/.next/static/chunks/app/manifest.webmanifest/route-a4f129c451de7859.js +0 -1
  920. package/.next/static/chunks/app/proxy/[...path]/route-a4f129c451de7859.js +0 -1
  921. package/.next/static/chunks/app/repositories/page-71f5a5ac29b0370d.js +0 -1
  922. package/.next/static/chunks/app/review/page-ff3efb96fdf9bb4b.js +0 -1
  923. package/.next/static/chunks/app/worktrees/[id]/layout-a4f129c451de7859.js +0 -1
  924. package/.next/static/chunks/app/worktrees/[id]/page-33afc6aa96289fb0.js +0 -1
  925. package/.next/static/css/c1e307d05daf93b6.css +0 -1
  926. package/.next/static/yGatWDsS532awSs51kXyd/_buildManifest.js +0 -1
  927. /package/.next/static/{yGatWDsS532awSs51kXyd → z4d8-5MaLkoD-4EhueZwk}/_ssgManifest.js +0 -0
@@ -0,0 +1,216 @@
1
+ "use strict";exports.id=5350,exports.ids=[5350],exports.modules={5350:(a,b,c)=>{c.d(b,{eH:()=>w,EG:()=>M,m_:()=>ak,ud:()=>q,UA:()=>N,uJ:()=>C,zM:()=>o,Tw:()=>s,jl:()=>P,vp:()=>S,Pd:()=>p,Oz:()=>ae,_7:()=>_,CR:()=>aa,C$:()=>I,Yt:()=>O,TN:()=>F,Ip:()=>Q,V9:()=>D,GC:()=>ag,M4:()=>ac,pk:()=>v,OA:()=>aj,sB:()=>B,s7:()=>ai,hA:()=>G,pT:()=>ad,ix:()=>ab,QW:()=>y,Cz:()=>ah,UC:()=>af,jn:()=>m,bT:()=>J,Yu:()=>x,ZJ:()=>u,T:()=>n,Iq:()=>l,ZR:()=>H,R6:()=>$,FO:()=>L,nR:()=>k,ky:()=>K,be:()=>A});var d=c(55511),e=c(25539);let f=`
2
+ id, from_worktree_id, from_instance_id, to_worktree_id, to_instance_id,
3
+ state, hops, sent_request_id, pending_kind, pending_body, prompt_signature,
4
+ created_at, updated_at, expires_at, delivered_at,
5
+ bind_mode, send_state, input_boundary_at, boundary_kind, turn_open_at_send,
6
+ obs_state, hold_reason, overlap,
7
+ delivery_state, delivery_reason, delivery_at,
8
+ CASE WHEN delivery_state IS NULL THEN NULL ELSE payload_id END AS delivery_payload_id,
9
+ CASE WHEN delivery_state IS NULL THEN NULL ELSE delivery_attempt_id END AS delivery_hold_attempt_id
10
+ `;function g(a){var b;return{id:a.id,from:{worktreeId:a.from_worktree_id,instanceId:a.from_instance_id},to:{worktreeId:a.to_worktree_id,instanceId:a.to_instance_id},state:a.state,hops:a.hops,sentRequestId:a.sent_request_id,pendingKind:a.pending_kind??null,createdAt:a.created_at,updatedAt:a.updated_at,expiresAt:a.expires_at,deliveredAt:a.delivered_at,bindMode:a.bind_mode??"legacy",sendState:a.send_state??null,inputBoundaryAt:a.input_boundary_at,boundaryKind:a.boundary_kind??null,turnOpenAtSend:null===a.turn_open_at_send?null:1===a.turn_open_at_send,obsState:a.obs_state??null,holdReason:a.hold_reason,overlap:a.overlap??null,deliveryHold:null===(b=a).delivery_state||void 0===b.delivery_state?null:{state:b.delivery_state,payloadId:b.delivery_payload_id??null,attemptId:b.delivery_hold_attempt_id??null,kind:b.pending_kind??null,reason:b.delivery_reason??null,at:b.delivery_at??null,checkCommand:(0,e.LY)({worktreeId:b.from_worktree_id,instanceId:b.from_instance_id})}}}let h=`
11
+ pending_kind = CASE WHEN delivery_state IS NULL THEN NULL ELSE pending_kind END,
12
+ pending_body = CASE WHEN delivery_state IS NULL THEN NULL ELSE pending_body END,
13
+ payload_id = CASE WHEN delivery_state IS NULL THEN NULL ELSE payload_id END
14
+ `,i=e.O7.map(()=>"?").join(", ");function j(a,b){if(null===a)return b;try{return JSON.parse(a)}catch{return b}}function k(a,b,c,d=Date.now()){return 1===a.prepare(`
15
+ UPDATE session_relays SET pending_reply = ?, updated_at = ?
16
+ WHERE id = ? AND pending_kind = 'prompt' AND pending_reply IS NULL
17
+ AND state IN (${i})
18
+ `).run(JSON.stringify(c),d,b,...e.O7).changes}function l(a,b,c,d,f=Date.now()){return a.transaction(()=>{let g=a.prepare(`
19
+ SELECT pending_reply FROM session_relays
20
+ WHERE id = ? AND pending_kind = 'prompt' AND payload_id IS ? AND delivery_state IS NULL
21
+ AND state IN (${i})
22
+ `).get(b,c,...e.O7);if(!g)return null;let h=null===g.pending_reply?null:j(g.pending_reply,null),k=h??d;return a.prepare(`
23
+ UPDATE session_relays
24
+ SET pending_kind = 'reply', pending_body = ?, payload_id = ?, overlap = ?,
25
+ pending_reply = NULL, updated_at = ?
26
+ WHERE id = ?
27
+ `).run(k.body,k.payloadId,k.overlap,f,b),h?"waiting-reply":"reply"})()}function m(a,b,c=Date.now()){return a.transaction(()=>{let d=a.prepare(`
28
+ SELECT pending_reply FROM session_relays
29
+ WHERE id = ? AND pending_kind IS NULL AND pending_reply IS NOT NULL
30
+ AND state IN (${i})
31
+ `).get(b,...e.O7);if(!d)return!1;let f=j(d.pending_reply,null);return f?(a.prepare(`
32
+ UPDATE session_relays
33
+ SET pending_kind = 'reply', pending_body = ?, payload_id = ?, overlap = ?,
34
+ pending_reply = NULL, updated_at = ?
35
+ WHERE id = ?
36
+ `).run(f.body,f.payloadId,f.overlap,c,b),!0):(a.prepare("UPDATE session_relays SET pending_reply = NULL WHERE id = ?").run(b),!1)})()}function n(a,b,c,d=Date.now()){return a.transaction(()=>{let f=a.prepare(`
37
+ SELECT pending_reply FROM session_relays
38
+ WHERE id = ? AND pending_kind = 'prompt' AND payload_id IS ? AND pending_reply IS NOT NULL
39
+ AND delivery_state IS NULL
40
+ AND state IN (${i})
41
+ `).get(b,c,...e.O7);if(!f)return!1;let g=j(f.pending_reply,null);return!!g&&(a.prepare(`
42
+ UPDATE session_relays
43
+ SET pending_kind = 'reply', pending_body = ?, payload_id = ?, overlap = ?,
44
+ pending_reply = NULL, updated_at = ?
45
+ WHERE id = ?
46
+ `).run(g.body,g.payloadId,g.overlap,d,b),!0)})()}function o(a,b,c=Date.now()){return 1===a.prepare(`
47
+ UPDATE session_relays SET pending_reply = NULL, updated_at = ?
48
+ WHERE id = ? AND pending_reply IS NOT NULL AND delivery_state IS NULL
49
+ `).run(c,b).changes}function p(a,b={}){let c=["delivery_state = 'uncertain'"],d=[];return b.worktreeId&&b.instanceId?(c.push("((from_worktree_id = ? AND from_instance_id = ?) OR (to_worktree_id = ? AND to_instance_id = ?))"),d.push(b.worktreeId,b.instanceId,b.worktreeId,b.instanceId)):b.worktreeId&&(c.push("(from_worktree_id = ? OR to_worktree_id = ?)"),d.push(b.worktreeId,b.worktreeId)),a.prepare(`SELECT COUNT(*) AS n FROM session_relays WHERE ${c.join(" AND ")}`).get(...d).n}function q(a,b){let c=b.now??Date.now(),d=b.payloadId??b.mintPayloadId;return 1===a.prepare(`
50
+ UPDATE session_relays
51
+ SET delivery_state = 'attempting', delivery_attempt_id = ?, delivery_owner = ?,
52
+ delivery_reason = NULL, delivery_at = ?, payload_id = ?
53
+ WHERE id = ? AND pending_kind = ? AND pending_body = ? AND payload_id IS ?
54
+ AND delivery_state IS NULL
55
+ `).run(b.attemptId,b.owner,c,d,b.relayId,b.kind,b.body,b.payloadId).changes?d:null}function r(a,b){return void 0!==a.prepare(`
56
+ SELECT 1 AS hit FROM session_relays
57
+ WHERE id = ? AND payload_id = ? AND delivery_attempt_id = ? AND delivery_state = 'attempting'
58
+ `).get(b.relayId,b.payloadId,b.attemptId)}function s(a,b){let c=b.now??Date.now();return a.transaction(()=>!!r(a,b)&&t(a,{...b,now:c}))()}function t(a,b){let c=b.now??Date.now();return a.prepare(`
59
+ UPDATE session_relays
60
+ SET pending_kind = NULL, pending_body = NULL, payload_id = NULL, updated_at = ?
61
+ WHERE id = ? AND payload_id = ? AND delivery_attempt_id = ? AND delivery_state = 'attempting'
62
+ `).run(c,b.relayId,b.payloadId,b.attemptId),1===a.prepare(`
63
+ UPDATE session_relays
64
+ SET delivery_state = NULL, delivery_attempt_id = NULL, delivery_owner = NULL,
65
+ delivery_reason = NULL, delivery_at = NULL, updated_at = ?
66
+ WHERE id = ? AND delivery_attempt_id = ? AND delivery_state = 'attempting'
67
+ `).run(c,b.relayId,b.attemptId).changes}function u(a,b){return 1===a.prepare(`
68
+ UPDATE session_relays
69
+ SET delivery_state = NULL, delivery_attempt_id = NULL, delivery_owner = NULL,
70
+ delivery_reason = NULL, delivery_at = NULL, updated_at = ?
71
+ WHERE id = ? AND payload_id = ? AND delivery_attempt_id = ? AND delivery_state = 'attempting'
72
+ `).run(b.now??Date.now(),b.relayId,b.payloadId,b.attemptId).changes}function v(a,b){let c=b.now??Date.now();return 1===a.prepare(`
73
+ UPDATE session_relays
74
+ SET delivery_state = 'uncertain', delivery_reason = ?, delivery_at = ?, updated_at = ?
75
+ WHERE id = ? AND payload_id = ? AND delivery_attempt_id = ? AND delivery_state = 'attempting'
76
+ `).run(b.reason,c,c,b.relayId,b.payloadId,b.attemptId).changes}let w="server-restarted";function x(a,b,c=Date.now()){return a.transaction(()=>{let d=a.prepare(`
77
+ SELECT id, payload_id, delivery_attempt_id FROM session_relays
78
+ WHERE delivery_state = 'attempting' AND (delivery_owner IS NULL OR delivery_owner <> ?)
79
+ `).all(b),e=[],f=a.prepare(`
80
+ UPDATE session_relays
81
+ SET delivery_state = 'uncertain', delivery_reason = ?, delivery_at = ?, updated_at = ?
82
+ WHERE id = ? AND delivery_attempt_id IS ? AND delivery_state = 'attempting'
83
+ AND (delivery_owner IS NULL OR delivery_owner <> ?)
84
+ `);for(let a of d)1===f.run(w,c,c,a.id,a.delivery_attempt_id,b).changes&&null!==a.payload_id&&null!==a.delivery_attempt_id&&e.push({relayId:a.id,payloadId:a.payload_id,attemptId:a.delivery_attempt_id,now:c});return e})()}function y(a,b={}){let c=["delivery_state IS NOT NULL"],d=[];if(b.endpoint){c.push("((from_worktree_id = ? AND from_instance_id = ?) OR (to_worktree_id = ? AND to_instance_id = ?))");let{worktreeId:a,instanceId:e}=b.endpoint;d.push(a,e,a,e)}else b.worktreeId&&(c.push("(from_worktree_id = ? OR to_worktree_id = ?)"),d.push(b.worktreeId,b.worktreeId));return a.prepare(`
85
+ SELECT ${f} FROM session_relays
86
+ WHERE ${c.join(" AND ")}
87
+ ORDER BY created_at ASC
88
+ `).all(...d).map(g)}let z=`
89
+ bind_attempt_id, bind_owner, obs_source, input_message_id,
90
+ held_candidates, pending_reply, payload_id
91
+ `;function A(a,b,c,f,g=Date.now(),h={}){let j=h.payloadId??(0,d.randomUUID)();return 1===a.prepare(`
92
+ UPDATE session_relays
93
+ SET pending_kind = ?, pending_body = ?, payload_id = ?,
94
+ overlap = COALESCE(?, overlap), updated_at = ?
95
+ WHERE id = ? AND pending_kind IS NULL
96
+ AND state IN (${i})
97
+ `).run(c,f,j,h.overlap??null,g,b,...e.O7).changes}function B(a){return a.prepare(`
98
+ SELECT ${f}, payload_id FROM session_relays
99
+ WHERE pending_kind IS NOT NULL AND delivery_state IS NULL
100
+ ORDER BY updated_at ASC
101
+ `).all().filter(a=>null!==a.pending_body&&null!==a.pending_kind).map(a=>({relay:g(a),kind:a.pending_kind,body:a.pending_body,payloadId:a.payload_id}))}function C(a,b,c=Date.now(),d){return 1===(void 0===d?a.prepare(`
102
+ UPDATE session_relays
103
+ SET pending_kind = NULL, pending_body = NULL, payload_id = NULL, updated_at = ?
104
+ WHERE id = ? AND delivery_state IS NULL
105
+ `).run(c,b):a.prepare(`
106
+ UPDATE session_relays
107
+ SET pending_kind = NULL, pending_body = NULL, payload_id = NULL, updated_at = ?
108
+ WHERE id = ? AND payload_id IS ? AND delivery_state IS NULL
109
+ `).run(c,b,d)).changes}function D(a,b){let c=a.prepare(`SELECT ${f}, payload_id FROM session_relays WHERE id = ?`).get(b);return c&&null!==c.pending_kind&&null!==c.pending_body?{relay:g(c),kind:c.pending_kind,body:c.pending_body,payloadId:c.payload_id}:null}function E(a){return{relay:g(a),bindAttemptId:a.bind_attempt_id,bindOwner:a.bind_owner,obsSource:a.obs_source,inputMessageId:a.input_message_id,heldCandidates:j(a.held_candidates,[]),pendingReply:j(a.pending_reply,null),payloadId:a.payload_id,pendingKind:a.pending_kind??null}}function F(a,b){let c=a.prepare(`SELECT ${f}, ${z} FROM session_relays WHERE id = ?`).get(b);return c?E(c):null}function G(a){return a.prepare(`
110
+ SELECT ${f}, ${z} FROM session_relays
111
+ WHERE bind_mode = 'bound' AND state IN (${i})
112
+ ORDER BY created_at ASC
113
+ `).all(...e.O7).map(E)}function H(a,b){let c=b.now??Date.now();return 1===a.prepare(`
114
+ UPDATE session_relays SET bind_attempt_id = ?, bind_owner = ?, updated_at = ?
115
+ WHERE id = ? AND bind_mode = 'bound' AND state = 'pending' AND send_state = 'awaiting'
116
+ AND bind_attempt_id IS NULL AND expires_at > ?
117
+ AND to_worktree_id = ? AND to_instance_id = ?
118
+ `).run(b.attemptId,b.owner,c,b.relayId,c,b.worktreeId,b.instanceId).changes}function I(a,b,c,d,e=Date.now()){let f=F(a,b);if(!f)return{status:400,code:"RELAY_BIND_INVALID",message:`Relay '${b}' not found`};let{relay:g}=f;return"bound"!==g.bindMode?{status:400,code:"RELAY_BIND_INVALID",message:`Relay '${b}' was not opened for binding`}:g.to.worktreeId!==c||g.to.instanceId!==d?{status:400,code:"RELAY_BIND_INVALID",message:`Relay '${b}' is addressed to ${g.to.worktreeId}/${g.to.instanceId}, not this send`}:"pending"!==g.state?{status:409,code:"RELAY_BIND_CONFLICT",message:`Relay '${b}' is already ${g.state}`}:g.expiresAt<=e?{status:409,code:"RELAY_BIND_CONFLICT",message:`Relay '${b}' has expired`}:{status:409,code:"RELAY_BIND_CONFLICT",message:`Relay '${b}' is already bound to a send`}}function J(a,b){let c=b.now??Date.now();return 1===a.prepare(`
119
+ UPDATE session_relays
120
+ SET send_state = 'input_started', input_boundary_at = ?, boundary_kind = ?,
121
+ turn_open_at_send = ?, obs_state = ?, obs_source = ?, updated_at = ?
122
+ WHERE id = ? AND bind_attempt_id = ? AND state = 'pending' AND expires_at > ?
123
+ AND (send_state = 'awaiting'
124
+ OR (? = 1 AND send_state = 'input_started' AND boundary_kind = 'dispatch'))
125
+ `).run(b.at,b.kind,null===b.turnOpenAtSend?null:+!!b.turnOpenAtSend,b.obsState,b.obsSource,c,b.relayId,b.attemptId,c,+!!b.replaceDispatch).changes}function K(a,b){let c=b.now??Date.now(),d=b.from.map(()=>"?").join(", ");return 1===a.prepare(`
126
+ UPDATE session_relays
127
+ SET send_state = ?,
128
+ hold_reason = CASE WHEN ? = 1 THEN NULL ELSE COALESCE(?, hold_reason) END,
129
+ input_message_id = COALESCE(?, input_message_id),
130
+ obs_state = CASE WHEN ? = 1 THEN 'invalid' ELSE obs_state END,
131
+ updated_at = ?
132
+ WHERE id = ? AND bind_attempt_id = ? AND send_state IN (${d})
133
+ AND state IN (${i})
134
+ `).run(b.to,+!!b.clearHoldReason,b.holdReason??null,b.inputMessageId??null,+!!b.invalidateObservation,c,b.relayId,b.attemptId,...b.from,...e.O7).changes}function L(a,b,c,d={}){a.prepare(`
135
+ UPDATE session_relays
136
+ SET hold_reason = ?, obs_state = CASE WHEN ? = 1 THEN 'invalid' ELSE obs_state END, updated_at = ?
137
+ WHERE id = ?
138
+ `).run(c,+!!d.invalidate,d.now??Date.now(),b)}function M(a,b,c,d=Date.now()){return a.transaction(()=>{let f=a.prepare(`
139
+ SELECT held_candidates FROM session_relays
140
+ WHERE id = ? AND bind_mode = 'bound' AND send_state IN ('awaiting','input_started')
141
+ AND state IN (${i})
142
+ `).get(b,...e.O7);if(!f)return!1;let g=j(f.held_candidates,[]);return!g.some(a=>a.messageId===c.messageId)&&(g.push(c),a.prepare("UPDATE session_relays SET held_candidates = ?, updated_at = ? WHERE id = ?").run(JSON.stringify(g),d,b),!0)})()}function N(a,b){a.prepare("UPDATE session_relays SET held_candidates = NULL WHERE id = ?").run(b)}function O(a,b,c,d,f=Date.now()){return 1===a.prepare(`
143
+ UPDATE session_relays
144
+ SET send_state = 'failed', state = 'cancelled', hold_reason = ?,
145
+ ${h}, pending_reply = NULL,
146
+ updated_at = ?
147
+ WHERE id = ? AND bind_attempt_id = ? AND send_state = 'awaiting'
148
+ AND state IN (${i})
149
+ `).run(d,f,b,c,...e.O7).changes}function P(a,b){let c=b.now??Date.now();return a.transaction(()=>s(a,{...b,now:c})?{completed:!0,promoted:m(a,b.relayId,c)}:{completed:!1,promoted:!1})()}function Q(a,b){let c=a.prepare(`SELECT ${f} FROM session_relays WHERE id = ?`).get(b);return c?g(c):null}var R=c(72626);function S(a,b){let c=b.now??Date.now();return a.transaction(()=>{var d,f;return r(a,b)?{closed:(d=b.relayId,f=b.sentRequestId,1===a.prepare(`
150
+ UPDATE session_relays
151
+ SET state = 'delivered', sent_request_id = ?, delivered_at = ?,
152
+ pending_kind = NULL, pending_body = NULL, payload_id = NULL, updated_at = ?
153
+ WHERE id = ? AND sent_request_id IS NULL
154
+ AND state IN (${i})
155
+ `).run(f,c,c,d,...e.O7).changes),completed:t(a,{relayId:b.relayId,payloadId:b.payloadId,attemptId:b.attemptId,now:c})}:{closed:!1,completed:!1}})()}(0,R.h)("relay-db");let T=(0,R.h)("relay-db");function U(a){let b;try{b=JSON.parse(a)}catch{return null}if("object"!=typeof b||null===b)return null;let{body:c,payloadId:d,overlap:e}=b;return"string"!=typeof c||"string"!=typeof d?null:{body:c,payloadId:d,overlap:"string"==typeof e?e:null}}class V extends Error{}let W=`
156
+ delivery_state = NULL, delivery_attempt_id = NULL, delivery_owner = NULL,
157
+ delivery_reason = NULL, delivery_at = NULL
158
+ `,X=`
159
+ id = ? AND payload_id = ? AND delivery_attempt_id = ? AND delivery_state = 'uncertain' AND state = ?
160
+ `,Y=`pending_kind = NULL, pending_body = NULL, payload_id = NULL, ${W}`;function Z(a,b){return{ok:!1,refusal:a,message:b}}function $(a,b){let c,d=b.now??Date.now();try{c=a.transaction(()=>{let c=(()=>{let c=function(a,b){let c=a.prepare(`
161
+ SELECT state, expires_at, pending_kind, payload_id, pending_reply, delivery_state, delivery_attempt_id
162
+ FROM session_relays WHERE id = ?
163
+ `).get(b.relayId);if(!c)return Z("not_found",`Relay '${b.relayId}' not found`);if(null===c.delivery_state)return Z("no_hold","The relay has no delivery hold (resolved, delivered or queued)");if("attempting"===c.delivery_state)return Z("attempting","The payload is being delivered right now; only that delivery settles it");if("uncertain"!==c.delivery_state)return Z("not_allowed",`Unknown delivery state '${c.delivery_state}'`);if(null===c.delivery_attempt_id||null===c.payload_id||null===b.attemptId)return Z("not_allowed","The hold carries no attempt id and cannot be resolved");if(c.payload_id!==b.payloadId||c.delivery_attempt_id!==b.attemptId)return Z("stale","The hold names another payload or attempt (read the relay again)");let d=c.pending_kind;return"reply"!==d&&"prompt"!==d&&"expired"!==d?Z("not_allowed","The held slot carries no payload"):{ok:!0,row:c,kind:d}}(a,b);if(!c.ok)return c;let{row:f,kind:g}=c,h=(0,e.Lo)(f.state),i={db:a,input:b,now:d,row:f,kind:g,open:h,guarded:(c,...e)=>{if(1!==a.prepare(`UPDATE session_relays SET ${c}, updated_at = ? WHERE ${X}`).run(...e,d,b.relayId,b.payloadId,b.attemptId,f.state).changes)throw new V("hold changed underneath the resolve")}};if("retry"===b.action)return function({row:a,kind:b,open:c,now:d,guarded:e}){if("expired"!==b){if(!c)return Z("not_allowed",`Relay is already ${a.state}; a closed relay's ${b} is not sent again`);if(a.expires_at<=d)return Z("not_allowed","Relay has passed its deadline; its payload is not sent again")}return e(W),{ok:!0,requeued:!0,promoted:!1}}(i);let{db:j,input:k,now:l,row:m,kind:n,open:o,guarded:p}=i;if("reply"===n&&o)return function({input:a,now:b,guarded:c}){return"confirm"===a.action?c(`state = 'delivered', sent_request_id = COALESCE(sent_request_id, ?), delivered_at = ?,
164
+ ${Y}, pending_reply = NULL`,a.sentRequestId,b):c(`state = 'cancelled', ${Y}, pending_reply = NULL`),{ok:!0,requeued:!1,promoted:!1}}(i);if("prompt"===n&&o&&m.expires_at<=l){p(`state = 'expired', ${Y}, pending_reply = NULL`);let a=null===m.pending_reply?null:U(m.pending_reply);return{ok:!0,requeued:!1,promoted:!1,expired:!0,discardedReply:null===m.pending_reply?null:{payloadId:a?.payloadId??null}}}if(!o&&null!==m.pending_reply){p(`${Y}, pending_reply = NULL`);let a=U(m.pending_reply);return{ok:!0,requeued:!1,promoted:!1,discardedReply:{payloadId:a?.payloadId??null}}}return(p(Y),"prompt"===n&&o&&null!==m.pending_reply)?function(a,b,c,d,e){let f=U(e);if(!f)return T.warn("relay-hold-resolve-unreadable-pending-reply",{relayId:b.relayId}),a.prepare("UPDATE session_relays SET pending_reply = NULL WHERE id = ?").run(b.relayId),{ok:!0,requeued:!1,promoted:!1};if(1!==a.prepare(`
165
+ UPDATE session_relays
166
+ SET pending_kind = 'reply', pending_body = ?, payload_id = ?, overlap = ?,
167
+ pending_reply = NULL, updated_at = ?
168
+ WHERE id = ? AND pending_kind IS NULL AND delivery_state IS NULL AND state = ?
169
+ `).run(f.body,f.payloadId,f.overlap,c,b.relayId,d.state).changes)throw new V("pending reply could not be promoted");return{ok:!0,requeued:!1,promoted:!0}}(j,k,l,m,m.pending_reply):{ok:!0,requeued:!1,promoted:!1}})(),f=Q(a,b.relayId);if(c.ok&&!f)throw Error(`Relay '${b.relayId}' vanished while its hold was resolved`);return{decided:c,relay:f}}).immediate()}catch(d){if(!(d instanceof V))throw d;c={decided:{ok:!1,refusal:"stale",message:"The hold changed while it was being resolved (read the relay again)"},relay:Q(a,b.relayId)}}let{decided:f,relay:g}=c;return f.ok?{ok:!0,relay:g,requeued:f.requeued,promoted:f.promoted,discardedReply:f.discardedReply??null,expired:!0===f.expired}:{...f,relay:g}}function _(a,b={}){let c=[],d=[];b.worktreeId&&(b.instanceId?(c.push("((from_worktree_id = ? AND from_instance_id = ?) OR (to_worktree_id = ? AND to_instance_id = ?))"),d.push(b.worktreeId,b.instanceId,b.worktreeId,b.instanceId)):(c.push("(from_worktree_id = ? OR to_worktree_id = ?)"),d.push(b.worktreeId,b.worktreeId))),void 0!==b.since&&(c.push("created_at >= ?"),d.push(b.since));let f=c.length>0?`WHERE ${c.join(" AND ")}`:"",g=a.prepare(`SELECT state, COUNT(*) AS n FROM session_relays ${f} GROUP BY state`).all(...d),h=(0,e.Ho)();for(let a of g)a.state in h&&(h[a.state]=a.n);return h}function aa(a,b){let c=(0,d.randomUUID)(),e=b.now??Date.now(),f=b.bindMode??"legacy",g="bound"===f?"awaiting":null;return a.prepare(`
170
+ INSERT INTO session_relays
171
+ (id, from_worktree_id, from_instance_id, to_worktree_id, to_instance_id,
172
+ state, hops, sent_request_id, pending_kind, pending_body, prompt_signature,
173
+ created_at, updated_at, expires_at, delivered_at, bind_mode, send_state)
174
+ VALUES (?, ?, ?, ?, ?, 'pending', ?, NULL, NULL, NULL, NULL, ?, ?, ?, NULL, ?, ?)
175
+ `).run(c,b.from.worktreeId,b.from.instanceId,b.to.worktreeId,b.to.instanceId,b.hops,e,e,b.expiresAt,f,g),{id:c,from:{...b.from},to:{...b.to},state:"pending",hops:b.hops,sentRequestId:null,pendingKind:null,createdAt:e,updatedAt:e,expiresAt:b.expiresAt,deliveredAt:null,bindMode:f,sendState:g,inputBoundaryAt:null,boundaryKind:null,turnOpenAtSend:null,obsState:null,holdReason:null,overlap:null,deliveryHold:null}}function ab(a,b){return a.prepare(`
176
+ SELECT ${f} FROM session_relays
177
+ WHERE to_worktree_id = ? AND to_instance_id = ?
178
+ AND state IN (${i})
179
+ ORDER BY created_at ASC
180
+ `).all(b.worktreeId,b.instanceId,...e.O7).map(g)}function ac(a,b){return{owed:ab(a,b),awaiting:a.prepare(`
181
+ SELECT ${f} FROM session_relays
182
+ WHERE from_worktree_id = ? AND from_instance_id = ?
183
+ AND state IN (${i})
184
+ ORDER BY created_at ASC
185
+ `).all(b.worktreeId,b.instanceId,...e.O7).map(g)}}function ad(a,b){return a.prepare(`
186
+ SELECT ${f} FROM session_relays
187
+ WHERE (from_worktree_id = ? OR to_worktree_id = ?)
188
+ AND state IN (${i})
189
+ ORDER BY created_at ASC
190
+ `).all(b,b,...e.O7).map(g)}function ae(a,b,c){return a.prepare(`
191
+ SELECT COUNT(*) AS n FROM session_relays
192
+ WHERE from_worktree_id = ? AND from_instance_id = ?
193
+ AND to_worktree_id = ? AND to_instance_id = ?
194
+ AND state IN (${i})
195
+ `).get(b.worktreeId,b.instanceId,c.worktreeId,c.instanceId,...e.O7).n}function af(a,b,c,d=Date.now()){a.prepare(`
196
+ UPDATE session_relays
197
+ SET state = 'prompt', prompt_signature = ?, updated_at = ?
198
+ WHERE id = ?
199
+ `).run(c,d,b)}function ag(a,b){let c=a.prepare("SELECT prompt_signature FROM session_relays WHERE id = ?").get(b);return c?.prompt_signature??null}function ah(a,b,c=Date.now()){return 1===a.prepare(`
200
+ UPDATE session_relays
201
+ SET state = 'expired', updated_at = ?
202
+ WHERE id = ? AND state IN (${i})
203
+ `).run(c,b,...e.O7).changes}function ai(a,b=Date.now()){return a.prepare(`
204
+ SELECT ${f} FROM session_relays
205
+ WHERE state IN (${i}) AND expires_at <= ?
206
+ ORDER BY expires_at ASC
207
+ `).all(...e.O7,b).map(g)}function aj(a,b={}){let c=[`state NOT IN (${i})`,"pending_kind IS NOT NULL","delivery_state IS NULL"],d=[...e.O7];return b.requester?(c.push("from_worktree_id = ? AND from_instance_id = ?"),d.push(b.requester.worktreeId,b.requester.instanceId)):b.worktreeId&&(c.push("from_worktree_id = ?"),d.push(b.worktreeId)),a.prepare(`
208
+ SELECT ${f} FROM session_relays
209
+ WHERE ${c.join(" AND ")}
210
+ ORDER BY created_at ASC
211
+ `).all(...d).map(g)}function ak(a,b,c=Date.now()){return 1===a.prepare(`
212
+ UPDATE session_relays
213
+ SET state = 'cancelled', ${h},
214
+ pending_reply = NULL, updated_at = ?
215
+ WHERE id = ? AND state IN (${i})
216
+ `).run(c,b,...e.O7).changes}},25539:(a,b,c)=>{c.d(b,{Ho:()=>h,LY:()=>f,Lo:()=>e,O7:()=>d,Wt:()=>g});let d=["pending","prompt"];function e(a){return d.includes(a)}function f(a){return`commandmate capture ${a.worktreeId} --instance ${a.instanceId} --pane`}let g=["confirm","retry","discard"];function h(){return{pending:0,delivered:0,prompt:0,expired:0,cancelled:0}}}};
@@ -1 +1 @@
1
- "use strict";exports.id=5354,exports.ids=[5354],exports.modules={3421:(a,b,c)=>{Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(71237),e=c(55088),f=c(17679);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},27289:(a,b,c)=>{c.d(b,{t:()=>j,z:()=>i});var d=c(10641),e=c(88807),f=c(56791),g=c(95506),h=c(66007);function i(a){if(!a)return a;try{if(!(0,h.h6)(a))return a;let b=(0,e.getDbInstance)();return(0,g.l0)(b,a)??a}catch{return a}}function j(a){if(!(0,h.h6)(a))return d.NextResponse.json({error:"Invalid worktree ID format"},{status:400});let b=(0,e.getDbInstance)(),c=(0,f.getWorktreeById)(b,i(a));return c||d.NextResponse.json({error:"Worktree not found"},{status:404})}},56791:(a,b,c)=>{c.r(b),c.d(b,{ACTIVE_FILTER:()=>d.ks,ACTIVE_TASK_STATUSES:()=>d.EL,AgentInstanceLimitError:()=>d.AC,CURRENT_SCHEMA_VERSION:()=>f.FT,DEFAULT_RUN_HISTORY_LIMIT:()=>d.Tu,InvalidAgentInstanceError:()=>d.ug,MAX_DISABLED_REPOSITORIES:()=>h.nc,MAX_RUN_HISTORY_DAYS:()=>d.eP,MAX_RUN_HISTORY_LIMIT:()=>d.mg,MemoDbError:()=>d.lm,NEW_SUBSCRIPTION_DEFAULTS:()=>d.s6,PUSH_DEFAULTS_VERSION:()=>d.VP,RepositoryDbError:()=>h.j8,TASK_STATUSES:()=>d.Hi,TERMINAL_TASK_STATUSES:()=>d.sA,VERIFICATION_GATE_SOURCES:()=>d.Dx,VERIFICATION_TRIGGERS:()=>d.af,WORKTREE_TODO_STATUSES:()=>d.KG,addAgentInstance:()=>d.Uq,cancelTimer:()=>d.Ud,cancelTimersByWorktree:()=>d.$$,cleanupOldTimers:()=>d.ul,clearInProgressMessageId:()=>d.YX,clearLastUserMessage:()=>d.cf,clearTimerHistory:()=>d.jf,closeDbInstance:()=>e.closeDbInstance,countAgentInstances:()=>d.fs,countDisabledRepositories:()=>h.QJ,countPushSubscriptionsForKind:()=>d.rC,countWorktreesByRepositoryPath:()=>h.kp,createCloneJob:()=>h.tw,createGateResult:()=>d.hl,createMemo:()=>d.To,createMessage:()=>d.oH,createRepository:()=>h.vB,createTask:()=>d.UT,createTimer:()=>d.CR,createVerificationRun:()=>d.rY,createWorktreeTodo:()=>d.yy,deleteAllMessages:()=>d.pE,deleteMemo:()=>d.cP,deleteMessageById:()=>d.DF,deleteMessagesByCliTool:()=>d.lA,deleteMessagesByInstance:()=>d.Qp,deletePushSubscriptionByEndpoint:()=>d.th,deleteRepository:()=>h.oG,deleteRepositoryWorktrees:()=>d.oZ,deleteSessionState:()=>d.ZP,deleteWorktreeTodo:()=>d.vg,deleteWorktreesByIds:()=>d.Rm,disableExistingRepository:()=>h.eP,disableRepository:()=>h.l$,ensureEnvRepositoriesRegistered:()=>h.ES,filterExcludedPaths:()=>h.Ho,findMessageByRequestId:()=>d.Ow,finishGateResult:()=>d.C8,finishVerificationRun:()=>d.u$,getActiveCloneJobByUrl:()=>h.fD,getActiveTask:()=>d.__,getActiveTaskForInstance:()=>d.MH,getAgentInstance:()=>d.BN,getAgentInstances:()=>d.m0,getAliasedWorktreeIds:()=>d.r3,getAllPushSubscriptions:()=>d.Se,getAllRepositories:()=>h.Yg,getAllRepositoriesWithWorktreeCount:()=>h._D,getAllWorktreeAliases:()=>d.fX,getAllWorktreeIds:()=>d.nO,getAllWorktreePathIds:()=>d.Sj,getCloneJob:()=>h.bM,getCloneJobsByStatus:()=>h.n_,getCurrentVersion:()=>f.Mj,getDailyReport:()=>d.ap,getDbInstance:()=>e.getDbInstance,getDefaultDbPath:()=>g.$b,getExcludedRepositories:()=>h.lS,getExcludedRepositoryPaths:()=>h.pr,getInitialBranch:()=>d.p4,getIssueDbPath:()=>g.zm,getLastAssistantMessageAt:()=>d.nP,getLastMessage:()=>d.sy,getLastUserMessage:()=>d.r8,getLegacyDbPaths:()=>u,getMemoById:()=>d.DN,getMemosByWorktreeId:()=>d.pZ,getMessageById:()=>d.kA,getMessages:()=>d.VL,getMessagesByDateRange:()=>d.lr,getMigrationHistory:()=>f.PS,getPendingTimerCountByWorktree:()=>d.GF,getPendingTimers:()=>d._O,getPushSubscriptionByEndpoint:()=>d.CF,getPushSubscriptionsForKind:()=>d.gn,getRepositories:()=>d.NV,getRepositoryById:()=>h.r,getRepositoryByNormalizedUrl:()=>h.Uj,getRepositoryByPath:()=>h.Dp,getRunningVerificationRun:()=>d.WZ,getSessionState:()=>d.y1,getTask:()=>d.gg,getTimerById:()=>d.kx,getTimersByWorktree:()=>d.DP,getTodosByWorktreeId:()=>d.fr,getVerificationRun:()=>d.J6,getWorktreeAliases:()=>d.Q2,getWorktreeById:()=>d.Ui,getWorktreeIdsByRepository:()=>d.P9,getWorktreeTodoById:()=>d.eN,getWorktrees:()=>d.vi,getWorktreesByRepository:()=>d.uJ,initDatabase:()=>d.s4,isTerminalTaskStatus:()=>d.uB,isWorktreeTodoStatus:()=>d.yT,listRunningVerificationRuns:()=>d.Fi,listTaskEvents:()=>d.HB,listTasks:()=>d.Vk,listVerificationRuns:()=>d.Mt,listVerificationRunsForPeriod:()=>d.UE,markPendingPromptsAsAnswered:()=>d.PL,migrateDbIfNeeded:()=>w,migrateWorktreeIdPreservingChildren:()=>d._h,pushSubscriptionNeedsDefaultsNotice:()=>d.Zj,recomputeLastUserMessage:()=>d.jp,recordAnsweredPrompt:()=>d.pG,recordWorktreeAlias:()=>d.xJ,recoverStuckSendingTimers:()=>d.Xm,registerAndFilterRepositories:()=>h.$G,removeAgentInstance:()=>d.NU,reorderMemos:()=>d.nQ,reorderWorktreeTodos:()=>d.yb,resolveAndValidatePath:()=>t,resolveRepositoryPath:()=>h.mE,resolveWorktreeIdWithAlias:()=>d.l0,restoreRepository:()=>h.RS,rollbackMigrations:()=>f.Wy,runMigrations:()=>f.vI,saveDailyReport:()=>d.tt,saveInitialBranch:()=>d.GA,setAgentInstances:()=>d.Cs,setInProgressMessageId:()=>d.OF,setRepositoryEnabled:()=>h.iQ,updateCliToolId:()=>d.WU,updateCloneJob:()=>h.k5,updateDailyReportContent:()=>d.IF,updateFavorite:()=>d.O,updateLastUserMessage:()=>d.EU,updateLastViewedAt:()=>d.HZ,updateMemo:()=>d.UY,updateMessageContent:()=>d.e8,updatePromptData:()=>d.cw,updatePushSubscriptionPreferences:()=>d.jJ,updateRepository:()=>h.Ir,updateSelectedAgents:()=>d.DC,updateSessionState:()=>d.PP,updateStatus:()=>d.yB,updateTimerStatus:()=>d.j2,updateVibeLocalContextWindow:()=>d.s,updateVibeLocalModel:()=>d.iu,updateWorktreeDescription:()=>d.hq,updateWorktreeLink:()=>d.z1,updateWorktreeTodo:()=>d.bl,upsertPushSubscription:()=>d.jA,upsertWorktree:()=>d.ZL,validateDbPath:()=>g.Sv,validateRepositoryPath:()=>h.Ux,validateSchema:()=>f.i6});var d=c(683),e=c(88807),f=c(55741),g=c(20416),h=c(10406),i=c(87550),j=c.n(i),k=c(55511),l=c.n(k),m=c(29021),n=c.n(m),o=c(33873),p=c.n(o),q=c(21820),r=c(7956);let s=(0,c(72626).h)("db-migration-path");function t(a,b){try{if(!n().existsSync(a))return null;let c=n().realpathSync(a);if((0,r.fW)(c))return s.warn(`[Security] ${b} points to system directory, skipping: ${c}`),null;return c}catch{return s.warn(`[Security] Failed to resolve ${b}: ${a}`),null}}function u(){let a=[];a.push(p().join(process.cwd(),"data","db.sqlite")),a.push(p().join(process.cwd(),"data","cm.db")),a.push(p().join((0,q.homedir)(),".commandmate","data","db.sqlite"));let b=process.env.DATABASE_PATH;if(b)try{let c=p().resolve(b);(0,r.fW)(c)?s.warn(`[Security] Skipping DATABASE_PATH in system directory: ${c}`):a.push(b)}catch{s.warn(`[Security] Invalid DATABASE_PATH: ${b}`)}return a}function v(a,b){if(function(a){try{return n().statSync(`${a}-wal`).size>0}catch{return!1}}(a)){let c=`${b}.${l().randomBytes(4).toString("hex")}.partial`;try{n().closeSync(n().openSync(c,"wx",384));let d=new(j())(a,{readonly:!0,fileMustExist:!0});try{d.prepare("VACUUM INTO ?").run(c)}finally{d.close()}n().renameSync(c,b)}catch(a){throw n().rmSync(c,{force:!0}),a}}else n().copyFileSync(a,b)}function w(a){let b=p().resolve(a);if((0,r.fW)(b))throw Error(`Security error: Target path cannot be in system directory: ${b}`);if(n().existsSync(a)){let b=t(a,"target path");if(b)return{migrated:!1,targetPath:b}}for(let a of u()){let c=t(a,"legacy path");if(!c)continue;let d=`${c}.bak`;v(c,d),n().chmodSync(d,384);let e=p().dirname(b);return n().existsSync(e)||n().mkdirSync(e,{recursive:!0,mode:448}),v(c,b),s.info(`[Migration] Database migrated from ${c} to ${b}`),s.info(`[Migration] Backup created at ${d}`),{migrated:!0,sourcePath:c,targetPath:b,backupPath:d}}return{migrated:!1,targetPath:b}}},93813:(a,b,c)=>{c.d(b,{B1:()=>m,Bx:()=>i,Nc:()=>h,b1:()=>g,ef:()=>n,gZ:()=>k,lp:()=>l});var d=c(79748),e=c(33873);let f=[".git",".env",".env.*","node_modules",".DS_Store","Thumbs.db","*.pem","*.key",".env.local",".env.development",".env.production",".env.test"],g={MAX_ITEMS_PER_DIR:500,MAX_DEPTH:10,MAX_FILE_SIZE_PREVIEW:1048576};function h(a,b){if(b===a)return!0;if(b.startsWith("*.")){let c=b.slice(1);if(a.endsWith(c))return!0}if(b.endsWith(".*")){let c=b.slice(0,-2);if(a.startsWith(c+"."))return!0}return!1}function i(a){return f.some(b=>h(a,b))}async function j(a){try{return(await (0,d.readdir)(a)).filter(a=>!i(a)).length}catch{return 0}}async function k(a,b=""){let c,f=b?(0,e.join)(a,b):a;try{c=await (0,d.stat)(f)}catch{throw Error(`Directory not found: ${b||"(root)"}`)}if(!c.isDirectory())throw Error(`Path is not a directory: ${b}`);let h=await (0,d.readdir)(f),l=[];for(let a of h){if(i(a))continue;let b=(0,e.join)(f,a);try{let c=await (0,d.lstat)(b);if(c.isSymbolicLink())continue;if(c.isDirectory()){let c=await j(b);l.push({name:a,type:"directory",itemCount:c})}else if(c.isFile()){let b=(0,e.extname)(a),d={name:a,type:"file",size:c.size,birthtime:c.birthtime.toISOString(),mtime:c.mtime.toISOString()};b&&b.length>1&&(d.extension=b.slice(1)),l.push(d)}}catch{continue}if(l.length>=g.MAX_ITEMS_PER_DIR)break}let m=[...l].sort((a,b)=>a.type!==b.type?"directory"===a.type?-1:1:a.name.toLowerCase().localeCompare(b.name.toLowerCase())),n=null;if(b){let a=(0,e.dirname)(b);n="."===a?"":a}return{path:b,name:b?(0,e.basename)(b):"",items:m,parentPath:n}}function l(a){let b=a instanceof Error?a.message:"Unknown error";return b.includes("not found")?{error:"Directory not found",status:404}:b.includes("not a directory")?{error:"Path is not a directory",status:400}:{error:"Failed to read directory",status:500}}function m(a){return{error:`Worktree '${a}' not found`,status:404}}function n(a="Invalid path"){return{error:`Access denied: ${a}`,status:403}}},95736:(a,b,c)=>{a.exports=c(44870)}};
1
+ "use strict";exports.id=5354,exports.ids=[5354],exports.modules={3421:(a,b,c)=>{Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(71237),e=c(55088),f=c(17679);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},27289:(a,b,c)=>{c.d(b,{t:()=>j,z:()=>i});var d=c(10641),e=c(88807),f=c(56791),g=c(95506),h=c(66007);function i(a){if(!a)return a;try{if(!(0,h.h6)(a))return a;let b=(0,e.getDbInstance)();return(0,g.l0)(b,a)??a}catch{return a}}function j(a){if(!(0,h.h6)(a))return d.NextResponse.json({error:"Invalid worktree ID format"},{status:400});let b=(0,e.getDbInstance)(),c=(0,f.getWorktreeById)(b,i(a));return c||d.NextResponse.json({error:"Worktree not found"},{status:404})}},56791:(a,b,c)=>{c.r(b),c.d(b,{ACTIVE_FILTER:()=>d.ks,ACTIVE_TASK_STATUSES:()=>d.EL,AgentInstanceLimitError:()=>d.AC,CURRENT_SCHEMA_VERSION:()=>f.FT,DEFAULT_RUN_HISTORY_LIMIT:()=>d.Tu,InvalidAgentInstanceError:()=>d.ug,MAX_DISABLED_REPOSITORIES:()=>h.nc,MAX_RUN_HISTORY_DAYS:()=>d.eP,MAX_RUN_HISTORY_LIMIT:()=>d.mg,MemoDbError:()=>d.lm,NEW_SUBSCRIPTION_DEFAULTS:()=>d.s6,PUSH_DEFAULTS_VERSION:()=>d.VP,RepositoryDbError:()=>h.j8,TASK_STATUSES:()=>d.Hi,TERMINAL_TASK_STATUSES:()=>d.sA,TEST_DB_ROOT_ENV:()=>e.TEST_DB_ROOT_ENV,VERIFICATION_GATE_SOURCES:()=>d.Dx,VERIFICATION_TRIGGERS:()=>d.af,WORKTREE_TODO_STATUSES:()=>d.KG,addAgentInstance:()=>d.Uq,assertTestDatabasePathIsolated:()=>e.assertTestDatabasePathIsolated,cancelTimer:()=>d.Ud,cancelTimersByWorktree:()=>d.$$,cleanupOldTimers:()=>d.ul,clearInProgressMessageId:()=>d.YX,clearLastUserMessage:()=>d.cf,clearTimerHistory:()=>d.jf,closeDbInstance:()=>e.closeDbInstance,countAgentInstances:()=>d.fs,countDisabledRepositories:()=>h.QJ,countPushSubscriptionsForKind:()=>d.rC,countWorktreesByRepositoryPath:()=>h.kp,createCloneJob:()=>h.tw,createGateResult:()=>d.hl,createMemo:()=>d.To,createMessage:()=>d.oH,createRepository:()=>h.vB,createTask:()=>d.UT,createTimer:()=>d.CR,createVerificationRun:()=>d.rY,createWorktreeTodo:()=>d.yy,deleteAllMessages:()=>d.pE,deleteMemo:()=>d.cP,deleteMessageById:()=>d.DF,deleteMessagesByCliTool:()=>d.lA,deleteMessagesByInstance:()=>d.Qp,deletePushSubscriptionByEndpoint:()=>d.th,deleteRepository:()=>h.oG,deleteRepositoryWorktrees:()=>d.oZ,deleteSessionState:()=>d.ZP,deleteWorktreeTodo:()=>d.vg,deleteWorktreesByIds:()=>d.Rm,disableExistingRepository:()=>h.eP,disableRepository:()=>h.l$,ensureEnvRepositoriesRegistered:()=>h.ES,filterExcludedPaths:()=>h.Ho,findMessageByRequestId:()=>d.Ow,finishGateResult:()=>d.C8,finishVerificationRun:()=>d.u$,getActiveCloneJobByUrl:()=>h.fD,getActiveTask:()=>d.__,getActiveTaskForInstance:()=>d.MH,getAgentInstance:()=>d.BN,getAgentInstances:()=>d.m0,getAliasedWorktreeIds:()=>d.r3,getAllPushSubscriptions:()=>d.Se,getAllRepositories:()=>h.Yg,getAllRepositoriesWithWorktreeCount:()=>h._D,getAllWorktreeAliases:()=>d.fX,getAllWorktreeIds:()=>d.nO,getAllWorktreePathIds:()=>d.Sj,getCloneJob:()=>h.bM,getCloneJobsByStatus:()=>h.n_,getCurrentVersion:()=>f.Mj,getDailyReport:()=>d.ap,getDbInstance:()=>e.getDbInstance,getDefaultDbPath:()=>g.$b,getExcludedRepositories:()=>h.lS,getExcludedRepositoryPaths:()=>h.pr,getInitialBranch:()=>d.p4,getIssueDbPath:()=>g.zm,getLastAssistantMessageAt:()=>d.nP,getLastMessage:()=>d.sy,getLastUserMessage:()=>d.r8,getLegacyDbPaths:()=>u,getMemoById:()=>d.DN,getMemosByWorktreeId:()=>d.pZ,getMessageById:()=>d.kA,getMessages:()=>d.VL,getMessagesByDateRange:()=>d.lr,getMigrationHistory:()=>f.PS,getPendingTimerCountByWorktree:()=>d.GF,getPendingTimers:()=>d._O,getPushSubscriptionByEndpoint:()=>d.CF,getPushSubscriptionsForKind:()=>d.gn,getRepositories:()=>d.NV,getRepositoryById:()=>h.r,getRepositoryByNormalizedUrl:()=>h.Uj,getRepositoryByPath:()=>h.Dp,getRunningVerificationRun:()=>d.WZ,getSessionState:()=>d.y1,getTask:()=>d.gg,getTimerById:()=>d.kx,getTimersByWorktree:()=>d.DP,getTodosByWorktreeId:()=>d.fr,getVerificationRun:()=>d.J6,getWorktreeAliases:()=>d.Q2,getWorktreeById:()=>d.Ui,getWorktreeIdsByRepository:()=>d.P9,getWorktreeTodoById:()=>d.eN,getWorktrees:()=>d.vi,getWorktreesByRepository:()=>d.uJ,initDatabase:()=>d.s4,isInsideVitestWorker:()=>e.isInsideVitestWorker,isTerminalTaskStatus:()=>d.uB,isWorktreeTodoStatus:()=>d.yT,listRunningVerificationRuns:()=>d.Fi,listTaskEvents:()=>d.HB,listTasks:()=>d.Vk,listVerificationRuns:()=>d.Mt,listVerificationRunsForPeriod:()=>d.UE,markPendingPromptsAsAnswered:()=>d.PL,migrateDbIfNeeded:()=>w,migrateWorktreeIdPreservingChildren:()=>d._h,pushSubscriptionNeedsDefaultsNotice:()=>d.Zj,recomputeLastUserMessage:()=>d.jp,recordAnsweredPrompt:()=>d.pG,recordWorktreeAlias:()=>d.xJ,recoverStuckSendingTimers:()=>d.Xm,registerAndFilterRepositories:()=>h.$G,removeAgentInstance:()=>d.NU,reorderMemos:()=>d.nQ,reorderWorktreeTodos:()=>d.yb,resolveAndValidatePath:()=>t,resolveRepositoryPath:()=>h.mE,resolveWorktreeIdWithAlias:()=>d.l0,restoreRepository:()=>h.RS,rollbackMigrations:()=>f.Wy,runMigrations:()=>f.vI,saveDailyReport:()=>d.tt,saveInitialBranch:()=>d.GA,setAgentInstances:()=>d.Cs,setInProgressMessageId:()=>d.OF,setRepositoryEnabled:()=>h.iQ,updateCliToolId:()=>d.WU,updateCloneJob:()=>h.k5,updateDailyReportContent:()=>d.IF,updateFavorite:()=>d.O,updateLastUserMessage:()=>d.EU,updateLastViewedAt:()=>d.HZ,updateMemo:()=>d.UY,updateMessageContent:()=>d.e8,updatePromptData:()=>d.cw,updatePushSubscriptionPreferences:()=>d.jJ,updateRepository:()=>h.Ir,updateSelectedAgents:()=>d.DC,updateSessionState:()=>d.PP,updateStatus:()=>d.yB,updateTimerStatus:()=>d.j2,updateVibeLocalContextWindow:()=>d.s,updateVibeLocalModel:()=>d.iu,updateWorktreeDescription:()=>d.hq,updateWorktreeLink:()=>d.z1,updateWorktreeTodo:()=>d.bl,upsertPushSubscription:()=>d.jA,upsertWorktree:()=>d.ZL,validateDbPath:()=>g.Sv,validateRepositoryPath:()=>h.Ux,validateSchema:()=>f.i6});var d=c(683),e=c(88807),f=c(33806),g=c(20416),h=c(10406),i=c(87550),j=c.n(i),k=c(55511),l=c.n(k),m=c(29021),n=c.n(m),o=c(33873),p=c.n(o),q=c(21820),r=c(7956);let s=(0,c(72626).h)("db-migration-path");function t(a,b){try{if(!n().existsSync(a))return null;let c=n().realpathSync(a);if((0,r.fW)(c))return s.warn(`[Security] ${b} points to system directory, skipping: ${c}`),null;return c}catch{return s.warn(`[Security] Failed to resolve ${b}: ${a}`),null}}function u(){let a=[];a.push(p().join(process.cwd(),"data","db.sqlite")),a.push(p().join(process.cwd(),"data","cm.db")),a.push(p().join((0,q.homedir)(),".commandmate","data","db.sqlite"));let b=process.env.DATABASE_PATH;if(b)try{let c=p().resolve(b);(0,r.fW)(c)?s.warn(`[Security] Skipping DATABASE_PATH in system directory: ${c}`):a.push(b)}catch{s.warn(`[Security] Invalid DATABASE_PATH: ${b}`)}return a}function v(a,b){if(function(a){try{return n().statSync(`${a}-wal`).size>0}catch{return!1}}(a)){let c=`${b}.${l().randomBytes(4).toString("hex")}.partial`;try{n().closeSync(n().openSync(c,"wx",384));let d=new(j())(a,{readonly:!0,fileMustExist:!0});try{d.prepare("VACUUM INTO ?").run(c)}finally{d.close()}n().renameSync(c,b)}catch(a){throw n().rmSync(c,{force:!0}),a}}else n().copyFileSync(a,b)}function w(a){let b=p().resolve(a);if((0,r.fW)(b))throw Error(`Security error: Target path cannot be in system directory: ${b}`);if(n().existsSync(a)){let b=t(a,"target path");if(b)return{migrated:!1,targetPath:b}}for(let a of u()){let c=t(a,"legacy path");if(!c)continue;let d=`${c}.bak`;v(c,d),n().chmodSync(d,384);let e=p().dirname(b);return n().existsSync(e)||n().mkdirSync(e,{recursive:!0,mode:448}),v(c,b),s.info(`[Migration] Database migrated from ${c} to ${b}`),s.info(`[Migration] Backup created at ${d}`),{migrated:!0,sourcePath:c,targetPath:b,backupPath:d}}return{migrated:!1,targetPath:b}}},93813:(a,b,c)=>{c.d(b,{B1:()=>m,Bx:()=>i,Nc:()=>h,b1:()=>g,ef:()=>n,gZ:()=>k,lp:()=>l});var d=c(79748),e=c(33873);let f=[".git",".env",".env.*","node_modules",".DS_Store","Thumbs.db","*.pem","*.key",".env.local",".env.development",".env.production",".env.test"],g={MAX_ITEMS_PER_DIR:500,MAX_DEPTH:10,MAX_FILE_SIZE_PREVIEW:1048576};function h(a,b){if(b===a)return!0;if(b.startsWith("*.")){let c=b.slice(1);if(a.endsWith(c))return!0}if(b.endsWith(".*")){let c=b.slice(0,-2);if(a.startsWith(c+"."))return!0}return!1}function i(a){return f.some(b=>h(a,b))}async function j(a){try{return(await (0,d.readdir)(a)).filter(a=>!i(a)).length}catch{return 0}}async function k(a,b=""){let c,f=b?(0,e.join)(a,b):a;try{c=await (0,d.stat)(f)}catch{throw Error(`Directory not found: ${b||"(root)"}`)}if(!c.isDirectory())throw Error(`Path is not a directory: ${b}`);let h=await (0,d.readdir)(f),l=[];for(let a of h){if(i(a))continue;let b=(0,e.join)(f,a);try{let c=await (0,d.lstat)(b);if(c.isSymbolicLink())continue;if(c.isDirectory()){let c=await j(b);l.push({name:a,type:"directory",itemCount:c})}else if(c.isFile()){let b=(0,e.extname)(a),d={name:a,type:"file",size:c.size,birthtime:c.birthtime.toISOString(),mtime:c.mtime.toISOString()};b&&b.length>1&&(d.extension=b.slice(1)),l.push(d)}}catch{continue}if(l.length>=g.MAX_ITEMS_PER_DIR)break}let m=[...l].sort((a,b)=>a.type!==b.type?"directory"===a.type?-1:1:a.name.toLowerCase().localeCompare(b.name.toLowerCase())),n=null;if(b){let a=(0,e.dirname)(b);n="."===a?"":a}return{path:b,name:b?(0,e.basename)(b):"",items:m,parentPath:n}}function l(a){let b=a instanceof Error?a.message:"Unknown error";return b.includes("not found")?{error:"Directory not found",status:404}:b.includes("not a directory")?{error:"Path is not a directory",status:400}:{error:"Failed to read directory",status:500}}function m(a){return{error:`Worktree '${a}' not found`,status:404}}function n(a="Invalid path"){return{error:`Access denied: ${a}`,status:403}}},95736:(a,b,c)=>{a.exports=c(44870)}};
@@ -1 +1 @@
1
- "use strict";exports.id=5571,exports.ids=[5571],exports.modules={95571:a=>{a.exports=JSON.parse('{"title":"Schedules","executionLogs":"Execution Logs","tabs":{"schedules":"Schedules","logs":"Logs"},"emptyState":{"title":"No schedules yet","description":"Run an agent automatically on a cron schedule.","createButton":"Create Schedule","manualToggle":"Or edit CMATE.md manually"},"noSchedules":"No schedules configured. Add a CMATE.md with a Schedules section.","noSchedulesTitle":"No schedules configured","noSchedulesStep1":"Switch to the Files tab","noSchedulesStep2":"Click the CMATE button in the toolbar to create CMATE.md","noSchedulesStep3":"Edit the Schedules table (Name, Cron, Message, CLI Tool, Enabled, Permission)","noSchedulesStep4":"Click CMATE again to validate","noLogs":"No execution logs yet.","status":{"running":"Running","completed":"Completed","failed":"Failed","timeout":"Timeout","cancelled":"Cancelled"},"enabled":"Enabled","disabled":"Disabled","activeSchedulesTitle":"Active Schedules","activeSchedulesDescription":"In-memory cron state currently registered by the scheduler.","noActiveSchedules":"No schedules are currently registered in memory.","nextRun":"Next run","agentLabel":"Agent","activeState":{"active":"Active","inactive":"Inactive","executing":"Executing"},"lastRun":"Last run","cron":"Cron","exitCode":"Exit","noOutput":"(no output)","message":"Message","response":"Response","unknownSchedule":"(deleted schedule)","retry":"Retry","loading":"Loading...","notes":"Notes","logs":"Schedules","notesAndLogs":"CMATE","agentTab":"Agent","agentSettings":"Agent Settings","selectAgents":"Select 2 agents to display in the terminal header tabs.","agentSaveSuccess":"Agent settings saved.","agentSaveError":"Failed to save agent settings.","agentInstances":"Agent Instances","agentInstancesDescription":"Manage the agents shown in the terminal header tabs. Add multiple instances of the same tool and give each an alias.","agentInstanceAliasLabel":"Alias","agentInstanceAliasPlaceholder":"Display name","agentInstanceBaseTool":"Base tool","agentInstanceAdd":"Add instance","agentInstanceDelete":"Delete instance","agentInstanceMoveUp":"Move up","agentInstanceMoveDown":"Move down","agentInstanceActions":"Instance actions","memoMoveUp":"Move up","memoMoveDown":"Move down","agentInstanceMax":"Up to {max} instances can be added.","agentInstanceMin":"At least {min} instance is required.","agentInstanceSaveError":"Failed to save agent instances.","agentDefaults":"Use this layout as the default","agentDefaultsDescription":"Save the tool order shown here as the default for new branches, or apply it to the branches of this repository that nobody has touched yet. Several instances of one tool count once.","agentDefaultsSetDefault":"Make this the default","agentDefaultsSaved":"Saved as the default. It now shows under \\"Default agents for new branches\\" in Settings.","agentDefaultsSaveError":"Could not save the default.","agentDefaultsApply":"Apply to unchanged branches","agentDefaultsApplyScope":"Only branches of this repository are affected. Other repositories, and branches whose agents you changed by hand, are left alone.","agentDefaultsEligible":"Would change {count} branch(es) in this repository","agentDefaultsEligibleUnknown":"Branches this would change: unknown","agentDefaultsRepositoryLabel":"Repository: {repository}","agentDefaultsRepoDeclared":"This repository declares its agents in .commandmate/agents.yaml. A bulk apply would override that declaration permanently, so it is disabled here — change the file instead.","agentDefaultsApplyConfirm":"Apply {agents} to {count} unchanged branch(es) in this repository. Other repositories, and branches whose agents you changed by hand, are left alone.","agentDefaultsApplied":"Applied to {count} branch(es).","agentDefaultsApplyError":"Could not apply to the branches.","agentDefaultsCountError":"Could not read how many branches this would change.","agentDefaultsRetry":"Retry the count","agentDefaultsInvalidRoster":"A default needs between {min} and {max} distinct tools. Add or remove a tool.","mobileVisibleInstances":"Show on this device","mobileVisibleInstancesDescription":"Choose which instances appear as tabs on this device. This selection is saved per device and does not change the shared instance list.","mobileVisibleInstanceMin":"At least one instance must stay visible on this device.","vibeLocalModel":"Ollama Model","vibeLocalModelDefault":"Default","vibeLocalContextWindow":"Context Window","vibeLocalContextWindowDefault":"Default (auto)","ollamaNotAvailable":"Ollama is not running. Start Ollama to select a model.","cmateCreated":"CMATE.md created with template. Edit it to configure schedules.","cmateValidation":{"noSchedulesSection":"CMATE.md has no Schedules section.","valid":"{count} schedule(s) validated successfully.","errors":"{errorCount} validation error(s) found: {details}","failed":"Failed to process CMATE.md."},"edit":{"newSchedule":"New Schedule","titleCreate":"New Schedule","titleEdit":"Edit Schedule","sectionBasic":"Basic","sectionAdvanced":"Advanced","sectionMessage":"Message","name":"Name","namePlaceholder":"daily-review","cron":"Cron Expression","cronPlaceholder":"0 9 * * *","cronPreset":"Preset","cronPresetHourly":"Every hour (0 */1 * * *)","cronPresetDaily9":"Daily at 9:00 (0 9 * * *)","cronPresetWeeklyMon9":"Mondays at 9:00 (0 9 * * 1)","cronPresetCustom":"Custom","askAiCron":"Ask AI","askAiMessage":"Ask AI to draft","askAiHint":"Drafts a prompt into the AI chat (no auto-send)","aiPrompts":{"cron":"I want to express the schedule timing as a cron expression. Convert a plain-language request (e.g. \\"every Monday at 9\\") into a cron expression and suggest a few candidates (e.g. \\"every Monday at 9\\" → `0 9 * * 1`).","cronRefine":"I want to express the schedule timing as a cron expression. The current input is {current}. Building on that, convert a plain-language request (e.g. \\"every Monday at 9\\") into a cron expression and suggest a few candidates (e.g. \\"every Monday at 9\\" → `0 9 * * 1`).","messageDraft":"For this schedule, I want to write the message (the instruction prompt) that the CLI tool will run on a schedule. First ask me what it is for, then propose the message content based on my answer.","messageDraftNamed":"For the schedule {name}, I want to write the message (the instruction prompt) that the CLI tool will run on a schedule. First ask me what it is for, then propose the message content based on my answer."},"cliTool":"CLI Tool","model":"Model","modelPlaceholder":"gpt-4.1","opencodeAgent":"Agent (opencode)","opencodeAgentPlaceholder":"plan","opencodeVariant":"Variant (opencode)","opencodeVariantPlaceholder":"high","opencodeTitle":"Session title (opencode)","opencodeTitlePlaceholder":"nightly-review","opencodeContinue":"Continue the last session (--continue)","permission":"Permission","commandCodeReadOnlyNote":"In command-code print mode, anything other than `yolo` blocks edit_file / write_file / shell_command / monitor_command / kill_shell, so the run is read-only (and is still recorded as a success).","message":"Message","messagePlaceholder":"Summarize README.md","charCount":"{count} / {max}","enabledLabel":"Enabled","save":"Save","cancel":"Cancel","edit":"Edit","delete":"Delete","enable":"Enable","disable":"Disable","confirmDelete":"Delete schedule \\"{name}\\"?","saveError":"Failed to save the schedule.","errorNameRequired":"Name is required.","errorNameTooLong":"Name must be {max} characters or less.","errorNameInvalid":"Name contains invalid characters.","errorCronInvalid":"Invalid cron expression.","errorMessageRequired":"Message is required.","errorMessageTooLong":"Message must be {max} characters or less.","errorModelInvalid":"Invalid model name.","errorAgentInvalid":"Invalid agent name.","errorVariantInvalid":"Invalid variant name.","errorVariantNeedsModel":"OpenCode V2 needs a Model to go with the Variant (it is sent as -m <provider/model>#<variant>).","errorTitleInvalid":"Invalid session title."},"timerTab":"Timer","todoTab":"ToDo","skillsTab":"Skills","verificationTab":"Verification","envTab":"Env","timer":{"title":"Delayed Messages","titleCreate":"New Timer","createButton":"Create Timer","newTimer":"New Timer","close":"Cancel","agent":"Agent","message":"Message","delay":"Send After","register":"Register Timer","cancel":"Cancel","noTimers":"No timers registered.","maxReached":"Maximum {max} timers per worktree.","registerSuccess":"Timer registered.","registerError":"Failed to register timer.","cancelSuccess":"Timer cancelled.","cancelError":"Failed to cancel timer.","status":{"pending":"Pending","sending":"Sending","sent":"Sent","failed":"Failed","cancelled":"Cancelled","no_session":"No Session"},"sessionWarning":"Session is not running. If the session is not running when the timer fires, the message will not be sent.","minutesShort":"{minutes}m","hoursMinutesShort":"{hours}h {minutes}m","loadMore":"Load more","clearHistory":"Clear history","clearConfirm":"Delete all sent, failed, and cancelled timer history?","cleared":"History cleared ({count} items)","detailTitle":"Timer Details","statusLabel":"Status","scheduledTime":"Scheduled Send","createdTime":"Created","sentTime":"Sent","failureReason":"Failure Reason"},"memoAdd":"Add Memo","memoRemaining":"{count} remaining","memoDefaultTitle":"Memo","memoTitlePlaceholder":"Memo title","memoInsertToMessage":"Insert to message","memoCopyContent":"Copy memo content","memoDelete":"Delete memo","memoContentPlaceholder":"Enter memo content...","memoLoading":"Loading memos...","memoSearchToggle":"Search memos","memoEmpty":"No memos yet.","memoEmptyHint":"Click the button below to add one.","memoNoMatch":"No memos match your search.","memoSearchLabel":"Memo search","memoSearchPlaceholder":"Search...","memoSearchInputLabel":"Search memos","memoSearchPrev":"Previous match (prev)","memoSearchNext":"Next match (next)","memoSearchClose":"Close search (close)","opencodeSettings":"opencode launch settings","opencodeSettingsDescription":"The agent, model and variant this instance starts opencode with and sends prompts as.","opencodeAgent":"Agent","opencodeModel":"Model","opencodeVariant":"Variant (reasoning effort)","opencodeDefault":"opencode default","opencodeAgentPlaceholder":"build","opencodeModelPlaceholder":"provider/model","opencodeVariantPlaceholder":"high","opencodeNoVariants":"This model has no variants.","opencodeSettingsOffline":"opencode is not running, so no candidates could be read. Values can be typed in directly (model as provider/model).","opencodeVariantLaunchNote":"Agent and model take effect the next time this instance starts. The variant cannot be passed as a launch flag — opencode 1.18.22\'s TUI has no --variant — so it is applied to the prompts CommandMate posts, from the next message on.","opencodeSettingsLoadError":"Failed to load the opencode launch settings.","opencodeSettingsSaveError":"Failed to save the opencode launch settings."}')}};
1
+ "use strict";exports.id=5571,exports.ids=[5571],exports.modules={95571:a=>{a.exports=JSON.parse('{"title":"Schedules","executionLogs":"Execution Logs","tabs":{"schedules":"Schedules","logs":"Logs"},"emptyState":{"title":"No schedules yet","description":"Run an agent automatically on a cron schedule.","createButton":"Create Schedule","manualToggle":"Or edit CMATE.md manually"},"noSchedules":"No schedules configured. Add a CMATE.md with a Schedules section.","noSchedulesTitle":"No schedules configured","noSchedulesStep1":"Switch to the Files tab","noSchedulesStep2":"Click the CMATE button in the toolbar to create CMATE.md","noSchedulesStep3":"Edit the Schedules table (Name, Cron, Message, CLI Tool, Enabled, Permission)","noSchedulesStep4":"Click CMATE again to validate","noLogs":"No execution logs yet.","status":{"running":"Running","completed":"Completed","failed":"Failed","timeout":"Timeout","cancelled":"Cancelled"},"enabled":"Enabled","disabled":"Disabled","activeSchedulesTitle":"Active Schedules","activeSchedulesDescription":"In-memory cron state currently registered by the scheduler.","noActiveSchedules":"No schedules are currently registered in memory.","nextRun":"Next run","agentLabel":"Agent","activeState":{"active":"Active","inactive":"Inactive","executing":"Executing"},"lastRun":"Last run","cron":"Cron","exitCode":"Exit","noOutput":"(no output)","message":"Message","response":"Response","unknownSchedule":"(deleted schedule)","retry":"Retry","loading":"Loading...","notes":"Notes","logs":"Schedules","notesAndLogs":"CMATE","agentTab":"Agent","agentSettings":"Agent Settings","selectAgents":"Select 2 agents to display in the terminal header tabs.","agentSaveSuccess":"Agent settings saved.","agentSaveError":"Failed to save agent settings.","agentInstances":"Agent Instances","agentInstancesDescription":"Manage the agents shown in the terminal header tabs. Add multiple instances of the same tool and give each an alias.","agentInstanceAliasLabel":"Alias","agentInstanceAliasPlaceholder":"Display name","agentInstanceBaseTool":"Base tool","agentInstanceAdd":"Add instance","agentInstanceDelete":"Delete instance","agentInstanceMoveUp":"Move up","agentInstanceMoveDown":"Move down","agentInstanceActions":"Instance actions","memoMoveUp":"Move up","memoMoveDown":"Move down","agentInstanceMax":"Up to {max} instances can be added.","agentInstanceMin":"At least {min} instance is required.","agentInstanceSaveError":"Failed to save agent instances.","agentInstanceSavedUnverified":"Saved, but the latest roster could not be read back. Reload the page.","agentInstanceOutcomeUnknown":"Whether this was saved could not be confirmed. Do not add again; reload the page and check the roster.","agentInstanceRosterChanged":"The roster kept changing elsewhere, so this was not saved. Try again.","agentInstanceRosterUnreadable":"The current roster could not be read, so this was not saved, to avoid erasing other changes. Check the connection and try again.","agentDefaults":"Use this layout as the default","agentDefaultsDescription":"Save the tool order shown here as the default for new branches, or apply it to the branches of this repository that nobody has touched yet. Several instances of one tool count once.","agentDefaultsSetDefault":"Make this the default","agentDefaultsSaved":"Saved as the default. It now shows under \\"Default agents for new branches\\" in Settings.","agentDefaultsSaveError":"Could not save the default.","agentDefaultsApply":"Apply to unchanged branches","agentDefaultsApplyScope":"Only branches of this repository are affected. Other repositories, and branches whose agents you changed by hand, are left alone.","agentDefaultsEligible":"Would change {count} branch(es) in this repository","agentDefaultsEligibleUnknown":"Branches this would change: unknown","agentDefaultsRepositoryLabel":"Repository: {repository}","agentDefaultsRepoDeclared":"This repository declares its agents in .commandmate/agents.yaml. A bulk apply would override that declaration permanently, so it is disabled here — change the file instead.","agentDefaultsApplyConfirm":"Apply {agents} to {count} unchanged branch(es) in this repository. Other repositories, and branches whose agents you changed by hand, are left alone.","agentDefaultsApplied":"Applied to {count} branch(es).","agentDefaultsApplyError":"Could not apply to the branches.","agentDefaultsCountError":"Could not read how many branches this would change.","agentDefaultsRetry":"Retry the count","agentDefaultsInvalidRoster":"A default needs between {min} and {max} distinct tools. Add or remove a tool.","mobileVisibleInstances":"Show on this device","mobileVisibleInstancesDescription":"Choose which instances appear as tabs on this device. This selection is saved per device and does not change the shared instance list.","mobileVisibleInstanceMin":"At least one instance must stay visible on this device.","vibeLocalModel":"Ollama Model","vibeLocalModelDefault":"Default","vibeLocalContextWindow":"Context Window","vibeLocalContextWindowDefault":"Default (auto)","ollamaNotAvailable":"Ollama is not running. Start Ollama to select a model.","cmateCreated":"CMATE.md created with template. Edit it to configure schedules.","cmateValidation":{"noSchedulesSection":"CMATE.md has no Schedules section.","valid":"{count} schedule(s) validated successfully.","errors":"{errorCount} validation error(s) found: {details}","failed":"Failed to process CMATE.md."},"edit":{"newSchedule":"New Schedule","titleCreate":"New Schedule","titleEdit":"Edit Schedule","sectionBasic":"Basic","sectionAdvanced":"Advanced","sectionMessage":"Message","name":"Name","namePlaceholder":"daily-review","cron":"Cron Expression","cronPlaceholder":"0 9 * * *","cronPreset":"Preset","cronPresetHourly":"Every hour (0 */1 * * *)","cronPresetDaily9":"Daily at 9:00 (0 9 * * *)","cronPresetWeeklyMon9":"Mondays at 9:00 (0 9 * * 1)","cronPresetCustom":"Custom","askAiCron":"Ask AI","askAiMessage":"Ask AI to draft","askAiHint":"Drafts a prompt into the AI chat (no auto-send)","aiPrompts":{"cron":"I want to express the schedule timing as a cron expression. Convert a plain-language request (e.g. \\"every Monday at 9\\") into a cron expression and suggest a few candidates (e.g. \\"every Monday at 9\\" → `0 9 * * 1`).","cronRefine":"I want to express the schedule timing as a cron expression. The current input is {current}. Building on that, convert a plain-language request (e.g. \\"every Monday at 9\\") into a cron expression and suggest a few candidates (e.g. \\"every Monday at 9\\" → `0 9 * * 1`).","messageDraft":"For this schedule, I want to write the message (the instruction prompt) that the CLI tool will run on a schedule. First ask me what it is for, then propose the message content based on my answer.","messageDraftNamed":"For the schedule {name}, I want to write the message (the instruction prompt) that the CLI tool will run on a schedule. First ask me what it is for, then propose the message content based on my answer."},"cliTool":"CLI Tool","model":"Model","modelPlaceholder":"gpt-4.1","opencodeAgent":"Agent (opencode)","opencodeAgentPlaceholder":"plan","opencodeVariant":"Variant (opencode)","opencodeVariantPlaceholder":"high","opencodeTitle":"Session title (opencode)","opencodeTitlePlaceholder":"nightly-review","opencodeContinue":"Continue the last session (--continue)","permission":"Permission","commandCodeReadOnlyNote":"In command-code print mode, anything other than `yolo` blocks edit_file / write_file / shell_command / monitor_command / kill_shell, so the run is read-only (and is still recorded as a success).","message":"Message","messagePlaceholder":"Summarize README.md","charCount":"{count} / {max}","enabledLabel":"Enabled","save":"Save","cancel":"Cancel","edit":"Edit","delete":"Delete","enable":"Enable","disable":"Disable","confirmDelete":"Delete schedule \\"{name}\\"?","saveError":"Failed to save the schedule.","errorNameRequired":"Name is required.","errorNameTooLong":"Name must be {max} characters or less.","errorNameInvalid":"Name contains invalid characters.","errorCronInvalid":"Invalid cron expression.","errorMessageRequired":"Message is required.","errorMessageTooLong":"Message must be {max} characters or less.","errorModelInvalid":"Invalid model name.","errorAgentInvalid":"Invalid agent name.","errorVariantInvalid":"Invalid variant name.","errorVariantNeedsModel":"OpenCode V2 needs a Model to go with the Variant (it is sent as -m <provider/model>#<variant>).","errorTitleInvalid":"Invalid session title."},"timerTab":"Timer","todoTab":"ToDo","skillsTab":"Skills","verificationTab":"Verification","envTab":"Env","timer":{"title":"Delayed Messages","titleCreate":"New Timer","createButton":"Create Timer","newTimer":"New Timer","close":"Cancel","agent":"Agent","message":"Message","delay":"Send After","register":"Register Timer","cancel":"Cancel","noTimers":"No timers registered.","maxReached":"Maximum {max} timers per worktree.","registerSuccess":"Timer registered.","registerError":"Failed to register timer.","cancelSuccess":"Timer cancelled.","cancelError":"Failed to cancel timer.","status":{"pending":"Pending","sending":"Sending","sent":"Sent","failed":"Failed","cancelled":"Cancelled","no_session":"No Session"},"sessionWarning":"Session is not running. If the session is not running when the timer fires, the message will not be sent.","minutesShort":"{minutes}m","hoursMinutesShort":"{hours}h {minutes}m","loadMore":"Load more","clearHistory":"Clear history","clearConfirm":"Delete all sent, failed, and cancelled timer history?","cleared":"History cleared ({count} items)","detailTitle":"Timer Details","statusLabel":"Status","scheduledTime":"Scheduled Send","createdTime":"Created","sentTime":"Sent","failureReason":"Failure Reason"},"memoAdd":"Add Memo","memoRemaining":"{count} remaining","memoDefaultTitle":"Memo","memoTitlePlaceholder":"Memo title","memoInsertToMessage":"Insert to message","memoCopyContent":"Copy memo content","memoDelete":"Delete memo","memoContentPlaceholder":"Enter memo content...","memoLoading":"Loading memos...","memoSearchToggle":"Search memos","memoEmpty":"No memos yet.","memoEmptyHint":"Click the button below to add one.","memoNoMatch":"No memos match your search.","memoSearchLabel":"Memo search","memoSearchPlaceholder":"Search...","memoSearchInputLabel":"Search memos","memoSearchPrev":"Previous match (prev)","memoSearchNext":"Next match (next)","memoSearchClose":"Close search (close)","opencodeSettings":"opencode launch settings","opencodeSettingsDescription":"The agent, model and variant this instance starts opencode with and sends prompts as.","opencodeAgent":"Agent","opencodeModel":"Model","opencodeVariant":"Variant (reasoning effort)","opencodeDefault":"opencode default","opencodeAgentPlaceholder":"build","opencodeModelPlaceholder":"provider/model","opencodeVariantPlaceholder":"high","opencodeNoVariants":"This model has no variants.","opencodeSettingsOffline":"opencode is not running, so no candidates could be read. Values can be typed in directly (model as provider/model).","opencodeVariantLaunchNote":"Agent and model take effect the next time this instance starts. The variant cannot be passed as a launch flag — opencode 1.18.22\'s TUI has no --variant — so it is applied to the prompts CommandMate posts, from the next message on.","opencodeSettingsLoadError":"Failed to load the opencode launch settings.","opencodeSettingsSaveError":"Failed to save the opencode launch settings."}')}};
@@ -0,0 +1,12 @@
1
+ "use strict";exports.id=6009,exports.ids=[6009],exports.modules={86009:(a,b,c)=>{c.d(b,{hA:()=>aC,Ay:()=>aA,Bi:()=>ao,Pv:()=>ax,lP:()=>as,eE:()=>at,hL:()=>aB,AK:()=>aG,Vh:()=>au,jJ:()=>ag,sx:()=>af,ux:()=>aF,F8:()=>an,$g:()=>ay,DF:()=>az,PV:()=>aw,CR:()=>aE,ih:()=>aD});var d=c(84297),e=c(55511),f=c(24455),g=c(36925),h=c(72626),i=c(88807),j=c(44429),k=c(45567),l=c(35602),m=c(44816),n=c(29021),o=c(21820),p=c(33873),q=c(40371),r=c.n(q),s=c(90696),t=c(4689),u=c(8004),v=c(67548),w=c(83730),x=c(99432),y=c(21758),z=c(97853);let A=/^[A-Za-z0-9_-]+$/;function B(a){return Object.entries(a).map(([a,b])=>{if(!A.test(a))throw Error("Not a bare TOML key");return`${a} = ${function(a){if((0,z.f)(a))throw Error("A lone surrogate has no TOML spelling");let b='"';for(let c of a){let a=c.codePointAt(0);'"'===c?b+='\\"':"\\"===c?b+="\\\\":"\n"===c?b+="\\n":"\r"===c?b+="\\r":" "===c?b+="\\t":a<32||127===a?b+=`\\u${a.toString(16).toUpperCase().padStart(4,"0")}`:b+=c}return`${b}"`}(b)}
2
+ `}).join("")}let C="CM_AGENT_ROLE_ARTIFACTS_DIR",D="CM_AGENT_ROLE_ANTIGRAVITY_AGENTS_DIR",E=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,F=/^[0-9a-f]{64}$/;class G extends Error{constructor(a,b){super(b),this.code=a,this.name="RoleArtifactError"}}function H(a){if(!a.startsWith("cm-role-")||!E.test(a))throw new G("invalid-name","An artifact name is cm-role- plus alphanumerics and hyphens");if(a.length>64)throw new G("invalid-name","An artifact name is at most 64 characters")}function I(){return(0,p.join)((0,o.homedir)(),".commandmate","agent-roles")}function J(a){let b=I();if(a.dataRoot)return(0,u.IG)(a.dataRoot,b,"ArtifactOptions.dataRoot");let c=(a.env??process.env)[C];return(0,u.IG)(c,b,C)}function K(a){let b=[],c=(0,p.resolve)(a);for(;;)try{return(0,p.join)((0,n.realpathSync)(c),...b)}catch{let a=(0,p.dirname)(c);if(a===c)return(0,p.join)(c,...b);b.unshift((0,p.basename)(c)),c=a}}function L(){let a=[(0,o.homedir)()];try{a.push((0,o.userInfo)().homedir)}catch{}return a}let M=[".commandmate",".codex",".copilot",".gemini",".claude"];function N(a){let b=K(a);return L().some(a=>{let c=K(a);return b===c||b.startsWith(`${c}${p.sep}`)&&b.slice(c.length+1).startsWith(".")})||(function(){let a=L().flatMap(a=>M.map(b=>(0,p.join)(a,b)));return[I(),...a,(0,x.R_)(),(0,y.XL)(),(0,p.dirname)((0,w.Q1)())]})().some(a=>{var c;return b===(c=K(a))||b.startsWith(`${c}${p.sep}`)})}function O(a,b,c={}){switch(H(b),a){case"codex":{let a=(0,x.R_)(c.codexHome?{codexHome:c.codexHome}:{});return{path:(0,p.join)(a,`${b}.config.toml`),homeDir:a,sharedDirs:[],ownedDirs:[],inSharedHome:!0}}case"copilot":{let a=void 0!==c.copilotHome?(0,p.resolve)(c.copilotHome):(0,y.XL)(),d=(0,p.join)(a,"agents");return{path:(0,p.join)(d,`${b}.agent.md`),homeDir:a,sharedDirs:[d],ownedDirs:[],inSharedHome:!0}}case"antigravity":{let a=function(a){let b=(0,p.join)((0,p.dirname)((0,w.Q1)()),"agents");return a.antigravityAgentsDir?a.antigravityAgentsDir:(0,u.TR)((a.env??process.env)[D],b,D)}(c),d=(0,p.join)(a,b);return{path:(0,p.join)(d,"agent.md"),homeDir:null,sharedDirs:[a],ownedDirs:[d],inSharedHome:!0}}case"claude":case"command-code":case"opencode":case"opencode-v2":{let d=J(c),e=(0,p.join)(d,a),f="command-code"===a?"ts":"md",g=K(d)===K(I());return{path:(0,p.join)(e,`${b}.${f}`),homeDir:null,sharedDirs:g?[]:[d],ownedDirs:g?[d,e]:[e],inSharedHome:N(d)}}}}let P="CommandMate role",Q="export default function (cmd) {\n cmd.hooks({ appendSystemPrompt: () => ",R=" });\n}\n";function S(a){try{return(0,n.lstatSync)(a)}catch(b){let{code:a}=b;if("ENOENT"===a||"ENOTDIR"===a)return null;throw b}}function T(){return"function"==typeof process.getuid?process.getuid():null}function U(a){let b=S(a);if(!b)return null;if(b.isSymbolicLink())throw new G("symlink",`${a} is a symlink`);if(!b.isFile())throw new G("not-regular-file",`${a} is not a regular file`);let c=T();if(null!==c&&b.uid!==c)throw new G("foreign-owner",`${a} belongs to another user`);if((63&b.mode)!=0)throw new G("insecure-permissions",`${a} is accessible to other users`);let d=(0,n.openSync)(a,n.constants.O_RDONLY|n.constants.O_NOFOLLOW);try{return(0,n.readFileSync)(d)}finally{(0,n.closeSync)(d)}}function V(a,b,c){let d=S(a);if(!d)return;if(d.isSymbolicLink())throw new G("symlink",`${a} is a symlink`);if(!d.isDirectory())throw new G("not-regular-file",`${a} is not a directory`);let e=T();if(null!==e&&d.uid!==e)throw new G("foreign-owner",`${a} belongs to another user`);if(b){if((63&d.mode)==0)return;if(!c)throw new G("insecure-permissions",`${a} is accessible to other users`);(0,n.chmodSync)(a,448)}else if((18&d.mode)!=0)throw new G("insecure-permissions",`${a} is writable by other users`)}function W(a,b){if(null!==a.homeDir){let b=null;try{b=Number((0,n.statSync)(a.homeDir).mode)}catch{}if(null!==b&&(18&b)!=0)throw new G("insecure-permissions",`${a.homeDir} is writable by other users`)}for(let c of a.sharedDirs)V(c,!1,b);for(let c of a.ownedDirs)V(c,!0,b)}function X(a){for(let b of[...null===a.homeDir?[]:[a.homeDir],...a.sharedDirs,...a.ownedDirs])(0,n.mkdirSync)(b,{recursive:!0,mode:448})}function Y(a,b){let c=(0,p.join)((0,p.dirname)(a),`.cm-role-${(0,e.randomBytes)(6).toString("hex")}.tmp`),d=(0,n.openSync)(c,n.constants.O_WRONLY|n.constants.O_CREAT|n.constants.O_EXCL|n.constants.O_NOFOLLOW,384);try{try{let a=0;for(;a<b.length;)a+=(0,n.writeSync)(d,b,a);if((0,n.fsyncSync)(d),(63&(0,n.fstatSync)(d).mode)!=0)throw new G("insecure-permissions",`${c} was not created private`)}finally{(0,n.closeSync)(d)}try{return(0,n.linkSync)(c,a),!0}catch(a){if("EEXIST"===a.code)return!1;throw a}}finally{(0,n.unlinkSync)(c)}}function Z(a,b,c,d){let e=U(c);if(null===e)throw new G("missing",`${c} does not exist`);if((0,l.Y)(e)!==d){let b="codex"===a?function(a){try{let b=(0,s.qg)(a.toString("utf8")).developer_instructions;return"string"==typeof b?Buffer.from(B({developer_instructions:b}),"utf8"):null}catch{return null}}(e):null;if(null===b||(0,l.Y)(b)!==d)throw new G("content-mismatch",`${c} is not the expected content`)}let f=function(a,b,c){let d=c.toString("utf8");switch(a){case"codex":{let a;try{a=(0,s.qg)(d)}catch{return"not the expected TOML"}let b=a.developer_instructions;return"string"!=typeof b||""===b.trim()?"developer_instructions is missing or empty":null}case"copilot":case"antigravity":{let c=function(a){if(!a.startsWith("---\n"))return null;let b=a.indexOf("\n---\n",3);if(-1===b)return null;try{return{data:(0,t.qg)(a.slice(4,b)),body:a.slice(b+5)}}catch{return null}}(d);if(!c||"object"!=typeof c.data||null===c.data)return"no readable frontmatter";let e=c.data;if(e.name!==b)return"the frontmatter name is not this artifact";if("copilot"===a&&!1!==e.infer)return"infer: false is missing";if("antigravity"===a&&!1!==e.subagent)return"subagent: false is missing";return""===c.body.trim()?"the definition has no body":null}case"command-code":{if(!d.startsWith(Q)||!d.endsWith(R))return"not the generated mod";let a=d.slice(Q.length,d.length-R.length);try{let b=JSON.parse(a);return new(r()).Script(`(function (cmd) { cmd.hooks({ appendSystemPrompt: () => ${a} }); })`),"string"==typeof b&&""!==b.trim()?null:"the mod carries no text"}catch{return"the mod does not parse"}}case"claude":case"opencode":case"opencode-v2":return""===d.trim()?"the file is empty":null}}(a,b,e);if(f)throw new G("format-invalid",`${c}: ${f}`)}var $=c(95953),_=c(92323),aa=c(28178),ab=c(82484),ac=c(88383);let ad=(0,h.h)("session/role-launch");function ae(a,b,c,d,e=null){return Object.freeze({target:b,db:a,resolution:e,membership:null,composition:null,injection:null,injectionFingerprint:null,refusal:new _.UH(c,d)})}async function af(a,b,c={}){let d,e={worktreeId:b.worktreeId,cliToolId:b.cliToolId,instanceId:b.instanceId},f=b.instanceId??b.cliToolId,g=null;try{for(let d=0;d<2;d+=1){let{resolution:d}=g=await (0,aa.$S)(a,b.worktreeId,c,(c,d)=>{let e=b.defaultsOnly?{state:"inherit"}:(0,j.d4)(a,c.id,f);return{resolution:(0,aa.WD)(a,b.cliToolId,d,e),membership:d}});if("ambiguous"!==d.kind||"membership-undetermined"!==d.reason)break}}catch(b){if(b instanceof aa.yD)return ae(a,e,"resolve-failed",b.message);return ad.warn("role-resolve-failed",{error:b instanceof Error?b.message:String(b)}),ae(a,e,"resolve-failed","The role could not be resolved")}let{resolution:h,membership:i}=g;if("ambiguous"===h.kind){let c=h.roots.map(a=>a.path).join(", ");return ae(a,e,h.reason,"root-settings-differ"===h.reason?`The registered roots of this repository hold different role settings for ${b.cliToolId} (${c}); make them agree or disable one`:`Git could not say whether these registered roots belong to this repository (${c}), and they would change the role of ${b.cliToolId}; retry, or fix or disable the root`,h)}if("none"===h.kind)return Object.freeze({target:e,db:a,resolution:h,membership:i,composition:null,injection:null,injectionFingerprint:null,refusal:null});let k=b.cliToolId;if(!(0,ac.Y)(k))return ae(a,e,"adapter-disabled",`Roles are not enabled for ${k} yet; it has a role "${h.role.name}", so it was not started without it`,h);try{d=b.composition??await (0,$.vz)(k,{worktreePath:b.worktreePath,readEnv:b.readEnv,explicitAgent:b.explicitAgent})}catch(b){return ae(a,e,"composition-failed",b instanceof $.jp?b.message:"The settings to compose with could not be read",h)}let l=(0,m.fY)(k,h.role,d);return Object.freeze({target:e,db:a,resolution:h,membership:i,composition:d,injection:l,injectionFingerprint:l.injectionFingerprint,refusal:null})}function ag(a,b,c){let d;if(!(0,ac.cg)(a.cliToolId))return null;try{if(d=(0,ab.V)()?globalThis.__launchRoleTestDb??null:(0,i.getDbInstance)(),null===d)return null;if(!(0,j.TF)(d)){var e=d;let b={cliToolId:a.cliToolId,repositoryId:null,repositoryIds:[],kind:"none",source:"fallback",reason:"no-default"};return Object.freeze({target:a,db:e,resolution:b,membership:null,composition:null,injection:null,injectionFingerprint:null,refusal:null})}}catch(a){return ad.warn("role-database-unavailable",{error:a instanceof Error?a.message:String(a)}),Promise.reject(new _.UH("resolve-failed","The database could not be read to resolve the role"))}return af(d,{...a,worktreePath:b,readEnv:c})}function ah(a){let{injection:b,resolution:c,composition:d,db:e}=a;if(null===b)return null;if(c?.kind!=="role")throw new _.UH("resolve-failed","The role was not resolved");try{var f;let a=function(a){let{namespace:b,roleId:c,injectionFingerprint:d}=a;if(!E.test(b))throw new G("invalid-name","Invalid server namespace");if(!E.test(c))throw new G("invalid-name","Invalid role id");if(!F.test(d))throw new G("invalid-name","The injection fingerprint must be a full SHA-256 hex");let e=`cm-role-${b}-${c}-${d.slice(0,12)}`;return H(e),e}({namespace:(f=e.name,(0,l.Y)(Buffer.from(f,"utf8")).slice(0,8)),roleId:c.role.id,injectionFingerprint:b.injectionFingerprint}),g=function(a,b={}){let c,{adapter:d,name:e,instructions:f}=a;if(H(e),""===f.trim())throw new G("empty-instructions","A role artifact needs instructions");let g=O(d,e,b),h=function(a,b,c){switch(a){case"codex":return Buffer.from(B({developer_instructions:c}),"utf8");case"copilot":return Buffer.from(`---
3
+ name: ${b}
4
+ description: ${P}
5
+ infer: false
6
+ ---
7
+ ${c}`,"utf8");case"antigravity":return Buffer.from(`---
8
+ name: ${b}
9
+ description: ${P}
10
+ subagent: false
11
+ ---
12
+ ${c}`,"utf8");case"command-code":{let a=JSON.stringify(c).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029");return Buffer.from(`${Q}${a}${R}`,"utf8")}case"claude":case"opencode":case"opencode-v2":return Buffer.from(c,"utf8")}}(d,e,f),i=(0,l.Y)(h),j=a=>({adapter:d,name:e,path:g.path,artifactFingerprint:i,reused:a}),k=()=>Z(d,e,g.path,i),m="read-only"===(0,v.ox)(d,[g.path],b.env??process.env)&&g.inSharedHome;if(W(g,!m),null!==U(g.path))return k(),j(!0);if(m)throw new v.ci(d,`the role artifact ${g.path} does not exist and this run may not write it`,v.f0);try{X(g),c=Y(g.path,h)}catch(a){if(a instanceof G)throw a;throw new G("write-failed",`Could not write ${g.path}: ${a.code??"unknown error"}`)}return k(),j(!c)}({adapter:b.adapter,name:a,instructions:b.instructions});return!function(a,b={}){let{adapter:c,name:d,path:e,expectedFingerprint:f}=a,g=O(c,d,b);if(g.path!==e)throw new G("unexpected-location",`${e} is not where this adapter keeps ${d}`);W(g,!1),Z(c,d,e,f)}({adapter:b.adapter,name:a,path:g.path,expectedFingerprint:g.artifactFingerprint}),{artifact:g,args:(0,m.eq)(b,g,d??{})}}catch(a){if(a instanceof G||a instanceof v.ci)throw new _.UH("artifact-failed",a.message);throw new _.UH("artifact-failed",`The role's file could not be prepared: ${a.message}`)}}function ai(){return(0,g.v)("__launchRoleScope",()=>new d.AsyncLocalStorage)}function aj(){return(0,g.v)("__launchRoleEvidence",()=>new Map)}function ak(a){return(0,f.v7)(a.worktreeId,a.cliToolId,a.instanceId)}function al(){return(0,g.v)("__launchRoleEpochs",()=>new Map)}function am(a){let b=ak(a.snapshot.target);return(al().get(b)??0)!==a.epoch||null!==a.generation&&aj().get(b)?.sessionGeneration!==a.generation}async function an(a,b){let c={snapshot:a,prepared:null,envFile:null,generation:null,epoch:al().get(ak(a.target))??0,previousFingerprint:null};try{return await ai().run(c,b)}finally{null!==c.envFile&&function(a){try{(0,n.unlinkSync)(a)}catch{}}(c.envFile)}}function ao(){let a=ai().getStore();if(!a)return null;if(a.snapshot.refusal)return a.snapshot.refusal;try{return a.prepared=ah(a.snapshot),null}catch(a){if(a instanceof _.UH)return a;throw a}}function ap(a,b){return a.worktreeId===b.worktreeId&&a.cliToolId===b.cliToolId&&(a.instanceId??a.cliToolId)===(b.instanceId??b.cliToolId)}function aq(a,b){let{snapshot:c,prepared:d,generation:e}=a,{resolution:f,injection:g,target:h,db:i}=c;if(null===e||null===f||"ambiguous"===f.kind||am(a))return;let k="role"===f.kind?f.role:null;try{(0,j.FT)(i,{worktreeId:h.worktreeId,instanceId:h.instanceId??h.cliToolId,cliToolId:h.cliToolId,phase:b,sessionGeneration:e,source:f.source,repositoryId:f.repositoryId,roleId:k?.id??null,roleName:k?.name??null,bodyVersion:k?.bodyVersion??null,bodyFingerprint:k?.bodyFingerprint??null,injectionFingerprint:g?.injectionFingerprint??null,artifactFingerprint:d?.artifact.artifactFingerprint??null,adapterId:g?.adapter??null,adapterVersion:g?.adapterVersion??null,wrapperVersion:g?.wrapperVersion??null,artifactPath:d?.artifact.path??null,effectiveAgent:g?.effectiveAgent??null,compositionSourceFingerprint:g?.compositionSourceFingerprint??null,noRoleReason:"none"===f.kind?f.reason:null})}catch(a){ad.warn("role-launch-record-failed",{phase:b,error:a instanceof Error?a.message:String(a)})}}function ar(a){if(am(a)){a.generation??=(0,e.randomUUID)();return}let{target:b,db:c}=a.snapshot;if(null===a.generation&&"opencode"===b.cliToolId){let d=b.instanceId??b.cliToolId;a.previousFingerprint=(0,j.zk)(c,b.worktreeId,d).requested?.injectionFingerprint??null}a.generation=(0,e.randomUUID)(),aj().set(ak(a.snapshot.target),{sessionGeneration:a.generation,injectionFingerprint:a.snapshot.injectionFingerprint,composition:a.snapshot.composition,resumedAcrossRole:!1,resumeNoticeTaken:!1}),aq(a,"requested")}function as(a){let b=ai().getStore();b&&null!==b.generation&&ap(b.snapshot.target,a)&&ar(b)}function at(a){let b=ai().getStore();if(!b||null===b.generation||!ap(b.snapshot.target,a)||am(b)||b.previousFingerprint===b.snapshot.injectionFingerprint)return;let c=aj().get(ak(a));c&&(c.resumedAcrossRole=!0)}function au(a,b){let c,d=ai().getStore();if(!d||!ap(d.snapshot.target,a.target))return(0,k.K9)(b);if(d.snapshot.refusal)throw d.snapshot.refusal;null!==d.snapshot.injection&&null===d.prepared&&(d.prepared=ah(d.snapshot));let{prepared:f}=d;if(null===f)c=(0,k.K9)(b);else{let{args:a}=f.args,{plain:g,secret:h}=(0,m.Qg)(f.args),i="";if(null!==h){if(null===d.envFile)try{d.envFile=function(a,b,c={}){let d=J(c),f=(0,p.join)(d,"launch-env"),g=(0,p.join)(f,`${(0,e.randomBytes)(12).toString("hex")}.json`),h=c.env??process.env;if("read-only"===(0,v.ox)(a,[g],h)&&N(d))throw new v.ci(a,`the file ${g} may not be written by this run`,v.f0);let i=K(d)===K(I()),j={path:g,homeDir:null,sharedDirs:i?[]:[d],ownedDirs:i?[d,f]:[f],inSharedHome:!1};W(j,!0);try{if(X(j),!Y(g,Buffer.from(b,"utf8")))throw new G("write-failed",`${g} already exists`)}catch(a){if(a instanceof G)throw a;throw new G("write-failed",`Could not write ${g}: ${a.code??"unknown error"}`)}return g}(f.artifact.adapter,h)}catch(a){throw new _.UH("artifact-failed",`The composed environment could not be written: ${a.message}`)}i=(0,m.ti)(d.envFile)}let j={...b,env:{...b.env,...g}},l=a.length>0?` ${(0,m.Qv)(a)}`:"";c=`${i}${(0,k.K9)(j)}${l}`}return null===d.generation&&ar(d),c}let av=/✗ (?:Custom agent|Failed to select agent)/;async function aw(a){let b=ai().getStore();if(!b||null===b.generation||am(b))return;let{injection:c}=b.snapshot,d=async()=>a.isAlive().catch(()=>!1);if(null===c){await d()&&aq(b,"launched");return}switch(c.adapter){case"claude":case"codex":await d()&&aq(b,"launched");return;case"copilot":{let c=await a.capture().catch(()=>null);if(am(b))return;if(null!==c&&av.test(c))throw aA(b.snapshot.target),await a.kill().catch(a=>{ad.warn("role-not-applied-stop-failed",{error:a instanceof Error?a.message:String(a)})}),new _.UH("not-applied","Copilot did not take the role, and would have gone on without it; the session was stopped");null!==c&&await d()&&aq(b,"launched");return}case"opencode":case"opencode-v2":(function(a,b){let{injection:c}=a.snapshot,{prepared:d}=a;if("object"!=typeof b||null===b||!c||!d)return!1;if("opencode"===c.adapter){let{instructions:a}=b;return Array.isArray(a)&&a.includes(d.artifact.path)}if(!Array.isArray(b))return!1;let e=c.effectiveAgent??"build",f=b.map(a=>a?.info?.agents?.[e]?.system).filter(a=>void 0!==a),g=f[f.length-1];return"string"==typeof g&&(0,l.Y)(Buffer.from(g,"utf8"))===d.artifact.artifactFingerprint})(b,await a.readServerConfig().catch(()=>null))&&aq(b,"launched");return;case"command-code":case"antigravity":return}}function ax(a){let b=aj().get(ak(a));return b?{sessionGeneration:b.sessionGeneration,injectionFingerprint:b.injectionFingerprint}:null}async function ay(a,b,c,d={}){let e=aj().get(ak(b));if(!e)return null;let f=async()=>void 0,g=await af(a,{...b,worktreePath:c,readEnv:f,composition:e.composition??{}},d);return g.refusal?`The role for this contract cannot be applied: ${g.refusal.message}`:g.injectionFingerprint===e.injectionFingerprint?null:"The role settings changed after this session was started, so the contract was not sent. Stop the session and send again."}async function az(a,b,c,d={}){let e=async()=>void 0,f=await af(a,{...b,worktreePath:c,readEnv:e,composition:{}},d);return f.resolution?.kind==="role"}function aA(a){let b=ak(a);aj().delete(b),al().set(b,(al().get(b)??0)+1)}function aB(a){return al().get(ak(a))??0}function aC(a,b){if(aB(a)!==b)throw new _.UH("session-stopped","The session was stopped while it was being started; nothing was typed")}function aD(a){return aj().get(ak(a))?.resumedAcrossRole===!0}function aE(a){let b=aj().get(ak(a));return!!b?.resumedAcrossRole&&!b.resumeNoticeTaken&&(b.resumeNoticeTaken=!0,!0)}async function aF(a,b,c={}){let d,{cliToolId:e}=b;if(!(0,ac.cg)(e))return{kind:"none"};try{d=(0,j.TF)(a)}catch{return{kind:"refused",refusal:new _.UH("resolve-failed","The database could not be read to resolve the role")}}if(!d)return{kind:"none"};let f=await af(a,{worktreeId:b.worktreeId,cliToolId:e,worktreePath:b.worktreePath,readEnv:(0,$.D2)(b.env),explicitAgent:b.explicitAgent??null,defaultsOnly:!0},c);if(f.refusal)return{kind:"refused",refusal:f.refusal};try{let a=ah(f);if(null===a||f.resolution?.kind!=="role")return{kind:"none"};return{kind:"role",role:{args:a.args.args,headlessPosition:a.args.headlessPosition,env:a.args.env},injectionFingerprint:f.injectionFingerprint,roleName:f.resolution.role.name}}catch(a){if(a instanceof _.UH)return{kind:"refused",refusal:a};throw a}}function aG(a){let{db:b,target:c,membership:d,composition:e}=a,f=c.instanceId??c.cliToolId,g=(0,aa.WD)(b,c.cliToolId,d??{members:[],undetermined:[]},(0,j.d4)(b,c.worktreeId,f));if("ambiguous"===g.kind)throw new _.UH(g.reason,"The role settings no longer resolve to one answer");if("none"===g.kind)return null;let h=c.cliToolId;if(null===e)throw new _.UH("composition-failed","A role was set while this send was on its way");return(0,m.fY)(h,g.role,e).injectionFingerprint}},95953:(a,b,c)=>{c.d(b,{jp:()=>k,D2:()=>m,vz:()=>v});var d=c(29021),e=c(21820),f=c(33873),g=c(90696),h=c(99432),i=c(44816);function j(a){let b;try{b=JSON.parse(function(a){let b="",c=0;for(;c<a.length;){let d=a[c];if('"'===d){let d=c;for(c+=1;c<a.length&&'"'!==a[c];)c+="\\"===a[c]?2:1;c+=1,b+=a.slice(d,c);continue}if("/"===d&&"/"===a[c+1]){for(;c<a.length&&"\n"!==a[c];)c+=1;continue}if("/"===d&&"*"===a[c+1]){let b=a.indexOf("*/",c+2);if(-1===b)throw Error("Unterminated comment");c=b+2;continue}if(","===d){let b=c+1;for(;;){for(;b<a.length&&/\s/.test(a[b]);)b+=1;if("/"===a[b]&&"/"===a[b+1]){for(;b<a.length&&"\n"!==a[b];)b+=1;continue}if("/"===a[b]&&"*"===a[b+1]){let c=a.indexOf("*/",b+2);if(-1===c)throw Error("Unterminated comment");b=c+2;continue}break}if("}"===a[b]||"]"===a[b]){c+=1;continue}}b+=d,c+=1}return b}(a))}catch{throw Error("not valid JSONC")}if("object"!=typeof b||null===b||Array.isArray(b))throw Error("not a JSON object");return b}class k extends Error{constructor(a){super(a),this.name="RoleCompositionError"}}let l=/^[A-Za-z0-9_.-]+$/;function m(a){return async b=>a[b]}function n(a){try{return(0,d.readFileSync)(a,"utf8")}catch(b){if("ENOENT"===b.code)return null;throw new k(`Could not read ${a}`)}}function o(a){if(void 0===a||""===a.trim())return null;try{return j(a)}catch(a){throw new k(`${i.pX} is ${a instanceof Error?a.message:"invalid"}; OpenCode V2 would silently ignore it and start with no role`)}}function p(a){let b=[];for(let c of a){let a=n(c);if(null!==a)try{b.push({path:c,data:j(a)})}catch{throw new k(`${c} is not valid JSONC, so the effective agent cannot be worked out`)}}return b}function q(a,b){let c=a.default_agent;if(void 0===c)return null;if("string"!=typeof c||!l.test(c))throw new k(`default_agent in ${b} is not a usable agent name`);return c}function r(a){let b=a.map(a=>({path:a.path,agent:q(a.data,a.path)})).filter(a=>null!==a.agent);if(new Set(b.map(a=>a.agent)).size>1)throw new k(`${b.map(a=>a.path).join(" and ")} name different default agents`);return b[0]?.agent??null}function s(a,b){for(let c of["agents","agent"]){let d=a[c];if("object"!=typeof d||null===d)continue;let e=d[b];if("object"==typeof e&&null!==e&&void 0!==e.system)return!0}return!1}let t=["opencode.json","opencode.jsonc"];async function u(a,b){let c=await a.readEnv("HOME")||(0,e.homedir)(),g=await a.readEnv("XDG_CONFIG_HOME")||(0,f.join)(c,".config"),h=(0,f.join)(g,"opencode"),j=[a.worktreePath,(0,f.join)(a.worktreePath,".opencode")];return function(a){let{explicitAgent:b,userContent:c,projectConfigs:d,globalConfigs:e}=a;if(null!=b&&!l.test(b))throw new k("The explicit agent is not a usable agent name");let f=b??(c?q(c,i.pX):null)??r(d)??r(e)??"build",g=[...c&&s(c,f)?[i.pX]:[],...[...d,...e].filter(a=>s(a.data,f)).map(a=>a.path)],h=a.markdownDefinition(f);if(h&&g.push(h),g.length>0)throw new k(`The agent "${f}" has its own system text (${g.join(", ")}); a role would remove it from the request`);return f}({explicitAgent:a.explicitAgent,userContent:b,projectConfigs:p(j.flatMap(a=>t.map(b=>(0,f.join)(a,b)))),globalConfigs:p(t.map(a=>(0,f.join)(h,a))),markdownDefinition:b=>[(0,f.join)(a.worktreePath,".opencode"),h].flatMap(a=>["agents","agent"].map(c=>(0,f.join)(a,c,`${b}.md`))).find(a=>(0,d.existsSync)(a))??null})}async function v(a,b){let c=b.explicitAgent??null;switch(a){case"codex":return{explicitAgent:c,codexDeveloperInstructions:function(a=(0,h.R_)()){let b,c=(0,f.join)(a,"config.toml"),d=n(c);if(null===d)return null;try{b=(0,g.qg)(d)}catch{throw new k(`${c} is not valid TOML`)}let e=b.developer_instructions;if(void 0===e)return null;if("string"!=typeof e)throw new k(`developer_instructions in ${c} is not a string`);return e}(b.codexHome)};case"opencode":{let a=o(await b.readEnv(i.pX)),d=a?.instructions;if(void 0!==d&&!Array.isArray(d))throw new k(`instructions in ${i.pX} is not an array`);return{explicitAgent:c,opencodeUserContent:a}}case"opencode-v2":{let a=o(await b.readEnv(i.pX));return{explicitAgent:c,opencodeUserContent:a,opencodeV2EffectiveAgent:await u(b,a)}}default:return{explicitAgent:c}}}}};
@@ -1 +1 @@
1
- "use strict";exports.id=6130,exports.ids=[6130],exports.modules={26838:(a,b,c)=>{c.d(b,{E2:()=>q,MQ:()=>m,Mj:()=>o,Sw:()=>n,lX:()=>r});var d=c(29021),e=c(33873),f=c(54325),g=c(90164),h=c(36925);let i=/^v?\d+\.\d+\.\d+$/,j=/^[a-zA-Z0-9.\-\s_v]+$/,k=[".next","required-server-files.json"],l=(0,h.v)("__versionCheckCache",()=>({result:null,fetchedAt:0,rateLimitResetAt:null}));function m(a,b){if(!i.test(a)||!i.test(b))return!1;let c=a=>a.replace(/^v/,"").split(".").map(Number),[d,e,f]=c(a),[g,h,j]=c(b);return g!==d?g>d:h!==e?h>e:j>f}function n(){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.49.2"}function o(){return n()}let p=null;function q(a){let b=p??=function(){{let a=function(){try{let a=(0,d.readFileSync)((0,e.join)(process.cwd(),...k),"utf-8"),b=JSON.parse(a),c=b.config?.env?.NEXT_PUBLIC_APP_VERSION;if("string"==typeof c&&c.length>0)return c;return null}catch{return null}}();if(a)return a}return"0.49.2"}();return(0,f.LE)(b,a)?{serverVersion:b,clientVersion:a}:null}async function r(){try{var a,b,c;if(null!==l.result&&Date.now()-l.fetchedAt<36e5||l.rateLimitResetAt&&(!(Date.now()>=l.rateLimitResetAt)||(l.rateLimitResetAt=null,0)))return l.result;let d=await fetch("https://api.github.com/repos/Kewton/CommandMate/releases/latest",{headers:{Accept:"application/vnd.github+json","User-Agent":`CommandMate/${o()}`},cache:"no-store",signal:AbortSignal.timeout(5e3)});if(403===d.status)return function(a){let b=a.headers.get("X-RateLimit-Reset");b?l.rateLimitResetAt=1e3*parseInt(b,10):l.rateLimitResetAt=Date.now()+36e5}(d),l.result;if(!d.ok)return l.result;let e=await d.json(),f=o(),h=e.tag_name.replace(/^v/,""),i={hasUpdate:m(f,e.tag_name),currentVersion:f,latestVersion:h,releaseUrl:(a=e.html_url).startsWith(g.Dk)?a:null,releaseName:(b=e.name,c=e.tag_name,j.test(b)&&b.length<=128?b:c),publishedAt:e.published_at};return l.result=i,l.fetchedAt=Date.now(),i}catch{return l.result}}},54325:(a,b,c)=>{c.d(b,{LE:()=>f,Oo:()=>e,ST:()=>d,T4:()=>k,dz:()=>j,r9:()=>h,rx:()=>i,rz:()=>g});let d="client_version",e="version_mismatch";function f(a,b){return!!a&&!!b&&"0.0.0"!==a&&"0.0.0"!==b&&a!==b}let g="chat_turn_progress",h=1e3;function i(a,b=65536){return b<=0?{body:"",truncated:a.length>0}:a.length<=b?{body:a,truncated:!1}:{body:a.slice(a.length-b),truncated:!0}}let j="messages_invalidated",k="model_changed"},88573:(a,b,c)=>{c.d(b,{Lw:()=>t});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),i=c(36925);let j=(0,g.h)("lib/skills/catalog-client"),k={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"},l=(0,i.v)("__skillCatalogCache",()=>({catalog:null,validatedAt:0,confirmedAt:0,etag:null,revision:null,rateLimitResetAt:null,inflight:null}));class m extends Error{}let n={[k.FETCH_FAILED]:"The Skill Catalog could not be retrieved.",[k.RATE_LIMITED]:"The Skill Catalog origin is rate limiting requests.",[k.OVERSIZED]:"The Skill Catalog response exceeded the allowed size.",[k.MALFORMED]:"The Skill Catalog response was not valid JSON.",[k.INVALID_SCHEMA]:"The Skill Catalog response did not match the supported Catalog schema."};function o(a){return new Date(a).toISOString()}function p(a,b,c){return{catalog:a,fetchedAt:o(l.validatedAt),revalidatedAt:o(l.confirmedAt),state:b,stale:"stale"===b,offline:"stale"===b,staleReason:c,source:{repository:"Kewton/commandmate-skills",ref:"main",revision:l.revision}}}function q(a,b=[]){return l.catalog?{ok:!0,snapshot:p(l.catalog,"stale",a)}:{ok:!1,failure:{code:a,message:n[a],errors:b}}}async function r(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 m("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 m("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 m("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 s(a){let b,c,g;if(!e.includes(d))return q(k.FETCH_FAILED);let i={Accept:"application/json","User-Agent":`CommandMate/${a}`};null!==l.catalog&&null!==l.etag&&(i["If-None-Match"]=l.etag);try{b=await fetch(d,{headers:i,cache:"no-store",signal:AbortSignal.timeout(5e3)})}catch{return j.warn("catalog-fetch-failed",{reason:k.FETCH_FAILED}),q(k.FETCH_FAILED)}if(304===b.status&&null!==l.catalog)return l.confirmedAt=Date.now(),{ok:!0,snapshot:p(l.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){l.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){l.rateLimitResetAt=Math.min(b+1e3*a,c);return}}l.rateLimitResetAt=b+36e5}(b),j.warn("catalog-rate-limited",{status:b.status}),q(k.RATE_LIMITED);if(!b.ok)return j.warn("catalog-fetch-failed",{status:b.status}),q(k.FETCH_FAILED);try{c=await r(b,1048576)}catch(b){let a=b instanceof m?k.OVERSIZED:k.FETCH_FAILED;return j.warn("catalog-body-rejected",{reason:a}),q(a)}try{g=JSON.parse(c)}catch{return j.warn("catalog-malformed",{reason:k.MALFORMED}),q(k.MALFORMED)}let n=(0,h.JJ)(g);if(!n.ok)return j.warn("catalog-invalid-schema",{errorCount:n.errors.length}),q(k.INVALID_SCHEMA,n.errors);let o=Date.now();return l.catalog=n.value,l.validatedAt=o,l.confirmedAt=o,l.etag=b.headers.get("ETag"),l.revision=function(a){if(null===a)return null;let b=a.trim();return f.test(b)?b:null}(l.etag),{ok:!0,snapshot:p(n.value,"fresh",null)}}async function t(a={}){let{hostVersion:b="0.0.0",forceRevalidate:c=!1}=a;return!c&&null!==l.catalog&&Date.now()-l.confirmedAt<9e5&&null!==l.catalog?{ok:!0,snapshot:p(l.catalog,"cached",null)}:null!==l.rateLimitResetAt&&(!(Date.now()>=l.rateLimitResetAt)||(l.rateLimitResetAt=null,0))?q(k.RATE_LIMITED):(null===l.inflight&&(l.inflight=s(b).finally(()=>{l.inflight=null})),l.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,{E2:()=>q,MQ:()=>m,Mj:()=>o,Sw:()=>n,lX:()=>r});var d=c(29021),e=c(33873),f=c(54325),g=c(90164),h=c(36925);let i=/^v?\d+\.\d+\.\d+$/,j=/^[a-zA-Z0-9.\-\s_v]+$/,k=[".next","required-server-files.json"],l=(0,h.v)("__versionCheckCache",()=>({result:null,fetchedAt:0,rateLimitResetAt:null}));function m(a,b){if(!i.test(a)||!i.test(b))return!1;let c=a=>a.replace(/^v/,"").split(".").map(Number),[d,e,f]=c(a),[g,h,j]=c(b);return g!==d?g>d:h!==e?h>e:j>f}function n(){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.50.0"}function o(){return n()}let p=null;function q(a){let b=p??=function(){{let a=function(){try{let a=(0,d.readFileSync)((0,e.join)(process.cwd(),...k),"utf-8"),b=JSON.parse(a),c=b.config?.env?.NEXT_PUBLIC_APP_VERSION;if("string"==typeof c&&c.length>0)return c;return null}catch{return null}}();if(a)return a}return"0.50.0"}();return(0,f.LE)(b,a)?{serverVersion:b,clientVersion:a}:null}async function r(){try{var a,b,c;if(null!==l.result&&Date.now()-l.fetchedAt<36e5||l.rateLimitResetAt&&(!(Date.now()>=l.rateLimitResetAt)||(l.rateLimitResetAt=null,0)))return l.result;let d=await fetch("https://api.github.com/repos/Kewton/CommandMate/releases/latest",{headers:{Accept:"application/vnd.github+json","User-Agent":`CommandMate/${o()}`},cache:"no-store",signal:AbortSignal.timeout(5e3)});if(403===d.status)return function(a){let b=a.headers.get("X-RateLimit-Reset");b?l.rateLimitResetAt=1e3*parseInt(b,10):l.rateLimitResetAt=Date.now()+36e5}(d),l.result;if(!d.ok)return l.result;let e=await d.json(),f=o(),h=e.tag_name.replace(/^v/,""),i={hasUpdate:m(f,e.tag_name),currentVersion:f,latestVersion:h,releaseUrl:(a=e.html_url).startsWith(g.Dk)?a:null,releaseName:(b=e.name,c=e.tag_name,j.test(b)&&b.length<=128?b:c),publishedAt:e.published_at};return l.result=i,l.fetchedAt=Date.now(),i}catch{return l.result}}},54325:(a,b,c)=>{c.d(b,{LE:()=>f,Oo:()=>e,ST:()=>d,T4:()=>k,dz:()=>j,r9:()=>h,rx:()=>i,rz:()=>g});let d="client_version",e="version_mismatch";function f(a,b){return!!a&&!!b&&"0.0.0"!==a&&"0.0.0"!==b&&a!==b}let g="chat_turn_progress",h=1e3;function i(a,b=65536){return b<=0?{body:"",truncated:a.length>0}:a.length<=b?{body:a,truncated:!1}:{body:a.slice(a.length-b),truncated:!0}}let j="messages_invalidated",k="model_changed"},88573:(a,b,c)=>{c.d(b,{Lw:()=>t});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),i=c(36925);let j=(0,g.h)("lib/skills/catalog-client"),k={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"},l=(0,i.v)("__skillCatalogCache",()=>({catalog:null,validatedAt:0,confirmedAt:0,etag:null,revision:null,rateLimitResetAt:null,inflight:null}));class m extends Error{}let n={[k.FETCH_FAILED]:"The Skill Catalog could not be retrieved.",[k.RATE_LIMITED]:"The Skill Catalog origin is rate limiting requests.",[k.OVERSIZED]:"The Skill Catalog response exceeded the allowed size.",[k.MALFORMED]:"The Skill Catalog response was not valid JSON.",[k.INVALID_SCHEMA]:"The Skill Catalog response did not match the supported Catalog schema."};function o(a){return new Date(a).toISOString()}function p(a,b,c){return{catalog:a,fetchedAt:o(l.validatedAt),revalidatedAt:o(l.confirmedAt),state:b,stale:"stale"===b,offline:"stale"===b,staleReason:c,source:{repository:"Kewton/commandmate-skills",ref:"main",revision:l.revision}}}function q(a,b=[]){return l.catalog?{ok:!0,snapshot:p(l.catalog,"stale",a)}:{ok:!1,failure:{code:a,message:n[a],errors:b}}}async function r(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 m("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 m("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 m("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 s(a){let b,c,g;if(!e.includes(d))return q(k.FETCH_FAILED);let i={Accept:"application/json","User-Agent":`CommandMate/${a}`};null!==l.catalog&&null!==l.etag&&(i["If-None-Match"]=l.etag);try{b=await fetch(d,{headers:i,cache:"no-store",signal:AbortSignal.timeout(5e3)})}catch{return j.warn("catalog-fetch-failed",{reason:k.FETCH_FAILED}),q(k.FETCH_FAILED)}if(304===b.status&&null!==l.catalog)return l.confirmedAt=Date.now(),{ok:!0,snapshot:p(l.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){l.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){l.rateLimitResetAt=Math.min(b+1e3*a,c);return}}l.rateLimitResetAt=b+36e5}(b),j.warn("catalog-rate-limited",{status:b.status}),q(k.RATE_LIMITED);if(!b.ok)return j.warn("catalog-fetch-failed",{status:b.status}),q(k.FETCH_FAILED);try{c=await r(b,1048576)}catch(b){let a=b instanceof m?k.OVERSIZED:k.FETCH_FAILED;return j.warn("catalog-body-rejected",{reason:a}),q(a)}try{g=JSON.parse(c)}catch{return j.warn("catalog-malformed",{reason:k.MALFORMED}),q(k.MALFORMED)}let n=(0,h.JJ)(g);if(!n.ok)return j.warn("catalog-invalid-schema",{errorCount:n.errors.length}),q(k.INVALID_SCHEMA,n.errors);let o=Date.now();return l.catalog=n.value,l.validatedAt=o,l.confirmedAt=o,l.etag=b.headers.get("ETag"),l.revision=function(a){if(null===a)return null;let b=a.trim();return f.test(b)?b:null}(l.etag),{ok:!0,snapshot:p(n.value,"fresh",null)}}async function t(a={}){let{hostVersion:b="0.0.0",forceRevalidate:c=!1}=a;return!c&&null!==l.catalog&&Date.now()-l.confirmedAt<9e5&&null!==l.catalog?{ok:!0,snapshot:p(l.catalog,"cached",null)}:null!==l.rateLimitResetAt&&(!(Date.now()>=l.rateLimitResetAt)||(l.rateLimitResetAt=null,0))?q(k.RATE_LIMITED):(null===l.inflight&&(l.inflight=s(b).finally(()=>{l.inflight=null})),l.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 +1 @@
1
- "use strict";exports.id=6285,exports.ids=[6285],exports.modules={26285:a=>{a.exports=JSON.parse('{"title":"スケジュール","executionLogs":"実行ログ","tabs":{"schedules":"スケジュール","logs":"ログ"},"emptyState":{"title":"スケジュールはまだありません","description":"cron スケジュールでエージェントを自動実行します。","createButton":"新規スケジュール作成","manualToggle":"または CMATE.md を直接編集"},"noSchedules":"スケジュールが設定されていません。CMATE.mdにSchedulesセクションを追加してください。","noSchedulesTitle":"スケジュールが設定されていません","noSchedulesStep1":"Files タブに切り替えてください","noSchedulesStep2":"ツールバーの CMATE ボタンをクリックして CMATE.md を作成","noSchedulesStep3":"Schedules テーブルを編集(Name, Cron, Message, CLI Tool, Enabled, Permission)","noSchedulesStep4":"再度 CMATE をクリックしてバリデーション","noLogs":"実行ログはまだありません。","status":{"running":"実行中","completed":"完了","failed":"失敗","timeout":"タイムアウト","cancelled":"キャンセル"},"enabled":"有効","disabled":"無効","activeSchedulesTitle":"Active Schedules","activeSchedulesDescription":"DB設定ではなく、現在メモリ上で登録されている cron state です。","noActiveSchedules":"現在メモリ上で登録されている schedule はありません。","nextRun":"次回実行","agentLabel":"Agent","activeState":{"active":"稼働中","inactive":"停止","executing":"実行中"},"lastRun":"最終実行","cron":"Cron式","exitCode":"終了コード","noOutput":"(出力なし)","message":"メッセージ","response":"レスポンス","unknownSchedule":"(削除済みスケジュール)","retry":"再試行","loading":"読み込み中...","notes":"メモ","logs":"Schedules","notesAndLogs":"CMATE","agentTab":"Agent","agentSettings":"エージェント設定","selectAgents":"ターミナルヘッダーのタブに表示するエージェントを2つ選択してください。","agentSaveSuccess":"エージェント設定を保存しました。","agentSaveError":"エージェント設定の保存に失敗しました。","agentInstances":"エージェントインスタンス","agentInstancesDescription":"ターミナルヘッダーのタブに表示するエージェントを管理します。同じツールのインスタンスを複数追加し、それぞれに別名を付けられます。","agentInstanceAliasLabel":"別名","agentInstanceAliasPlaceholder":"表示名","agentInstanceBaseTool":"ベースツール","agentInstanceAdd":"インスタンスを追加","agentInstanceDelete":"インスタンスを削除","agentInstanceMoveUp":"上へ移動","agentInstanceMoveDown":"下へ移動","agentInstanceActions":"インスタンス操作","memoMoveUp":"上へ移動","memoMoveDown":"下へ移動","agentInstanceMax":"インスタンスは最大{max}個まで追加できます。","agentInstanceMin":"インスタンスは最低{min}個必要です。","agentInstanceSaveError":"エージェントインスタンスの保存に失敗しました。","agentDefaults":"既定として使う","agentDefaultsDescription":"いま並んでいるツールの順番を、新しいブランチの既定にしたり、このリポジトリのまだ触っていないブランチにまとめて適用したりできます。同じツールのインスタンスは 1 つとして数えます。","agentDefaultsSetDefault":"この構成を既定にする","agentDefaultsSaved":"既定として保存しました。設定画面の「新規ブランチの既定エージェント」に反映されます。","agentDefaultsSaveError":"既定の保存に失敗しました。","agentDefaultsApply":"未変更のブランチにも適用する","agentDefaultsApplyScope":"適用先はこのリポジトリのブランチだけです。他のリポジトリと、手でエージェント構成を変更したブランチは変更されません。","agentDefaultsEligible":"適用対象: このリポジトリの {count} ブランチ","agentDefaultsEligibleUnknown":"適用対象: 不明","agentDefaultsRepositoryLabel":"対象リポジトリ: {repository}","agentDefaultsRepoDeclared":"このリポジトリは .commandmate/agents.yaml でエージェントを宣言しています。一括適用はその宣言を恒久的に上書きしてしまうため、ここでは無効です。変更はファイル側で行ってください。","agentDefaultsApplyConfirm":"このリポジトリの未変更の {count} ブランチに {agents} を適用します。他のリポジトリと、手でエージェント構成を変更したブランチは変更されません。","agentDefaultsApplied":"{count} ブランチに適用しました。","agentDefaultsApplyError":"ブランチへの適用に失敗しました。","agentDefaultsCountError":"適用対象の件数を読み込めませんでした。","agentDefaultsRetry":"件数を再読み込み","agentDefaultsInvalidRoster":"既定にできるのは {min} 〜 {max} 種類のツールです。ツールの種類を増やすか減らしてください。","mobileVisibleInstances":"この端末に表示","mobileVisibleInstancesDescription":"この端末でタブとして表示するインスタンスを選択します。この選択は端末ごとに保存され、共有のインスタンス一覧は変更されません。","mobileVisibleInstanceMin":"この端末には最低1つのインスタンスを表示しておく必要があります。","vibeLocalModel":"Ollamaモデル","vibeLocalModelDefault":"デフォルト","vibeLocalContextWindow":"コンテキストウィンドウ","vibeLocalContextWindowDefault":"デフォルト(自動)","ollamaNotAvailable":"Ollamaが起動していません。モデルを選択するにはOllamaを起動してください。","cmateCreated":"CMATE.mdをテンプレートで作成しました。スケジュールを設定してください。","cmateValidation":{"noSchedulesSection":"CMATE.mdにSchedulesセクションがありません。","valid":"{count}件のスケジュールが正常に検証されました。","errors":"{errorCount}件の検証エラー: {details}","failed":"CMATE.mdの処理に失敗しました。"},"edit":{"newSchedule":"新規スケジュール","titleCreate":"新規スケジュール","titleEdit":"スケジュールの編集","sectionBasic":"基本情報","sectionAdvanced":"詳細設定","sectionMessage":"メッセージ","name":"名前","namePlaceholder":"daily-review","cron":"Cron式","cronPlaceholder":"0 9 * * *","cronPreset":"プリセット","cronPresetHourly":"毎時 (0 */1 * * *)","cronPresetDaily9":"毎日9時 (0 9 * * *)","cronPresetWeeklyMon9":"毎週月曜9時 (0 9 * * 1)","cronPresetCustom":"カスタム","askAiCron":"AIに相談","askAiMessage":"AIに下書きを依頼","askAiHint":"AIチャットにプロンプトを下書きします(自動送信はされません)","aiPrompts":{"cron":"スケジュール実行のタイミングを cron 式で表現したいです。自然言語の要望(例: 「毎週月曜 9 時」)を cron 式に変換し、候補をいくつか提案してください(例: 「毎週月曜 9 時」→ `0 9 * * 1`)。","cronRefine":"スケジュール実行のタイミングを cron 式で表現したいです。現在の入力は {current} です。これを踏まえて、自然言語の要望(例: 「毎週月曜 9 時」)を cron 式に変換し、候補をいくつか提案してください(例: 「毎週月曜 9 時」→ `0 9 * * 1`)。","messageDraft":"このスケジュールで CLI ツールに定期実行させる message(指示プロンプト)を作成したいです。まず用途を私に聞き取り、それを踏まえた message の内容を提案してください。","messageDraftNamed":"スケジュール {name} で CLI ツールに定期実行させる message(指示プロンプト)を作成したいです。まず用途を私に聞き取り、それを踏まえた message の内容を提案してください。"},"cliTool":"CLIツール","model":"モデル","modelPlaceholder":"gpt-4.1","opencodeAgent":"Agent(opencode)","opencodeAgentPlaceholder":"plan","opencodeVariant":"Variant(opencode)","opencodeVariantPlaceholder":"high","opencodeTitle":"セッションタイトル(opencode)","opencodeTitlePlaceholder":"nightly-review","opencodeContinue":"直前のセッションを継続する(--continue)","permission":"権限","commandCodeReadOnlyNote":"command-code の print モードでは、`yolo` 以外を選ぶと edit_file / write_file / shell_command / monitor_command / kill_shell がブロックされ、読み取り専用の実行になります(実行自体は成功として記録されます)。","message":"メッセージ","messagePlaceholder":"README.mdを要約してください","charCount":"{count} / {max}","enabledLabel":"有効","save":"保存","cancel":"キャンセル","edit":"編集","delete":"削除","enable":"有効化","disable":"無効化","confirmDelete":"スケジュール「{name}」を削除しますか?","saveError":"スケジュールの保存に失敗しました。","errorNameRequired":"名前は必須です。","errorNameTooLong":"名前は{max}文字以内で入力してください。","errorNameInvalid":"名前に使用できない文字が含まれています。","errorCronInvalid":"Cron式が不正です。","errorMessageRequired":"メッセージは必須です。","errorMessageTooLong":"メッセージは{max}文字以内で入力してください。","errorModelInvalid":"モデル名が不正です。","errorAgentInvalid":"Agent 名が不正です。","errorVariantInvalid":"Variant 名が不正です。","errorVariantNeedsModel":"OpenCode V2 では Variant は Model と一緒に指定してください(-m <provider/model>#<variant> として渡します)。","errorTitleInvalid":"セッションタイトルが不正です。"},"timerTab":"Timer","todoTab":"ToDo","skillsTab":"Skills","verificationTab":"検証","envTab":"環境変数","timer":{"title":"遅延メッセージ","titleCreate":"タイマー作成","createButton":"タイマー作成","newTimer":"新規タイマー","close":"キャンセル","agent":"エージェント","message":"メッセージ","delay":"送信タイミング","register":"タイマー登録","cancel":"キャンセル","noTimers":"タイマーは登録されていません。","maxReached":"ワークツリーあたり最大{max}件です。","registerSuccess":"タイマーを登録しました。","registerError":"タイマーの登録に失敗しました。","cancelSuccess":"タイマーをキャンセルしました。","cancelError":"タイマーのキャンセルに失敗しました。","status":{"pending":"待機中","sending":"送信中","sent":"送信済み","failed":"失敗","cancelled":"キャンセル済み","no_session":"セッション未起動"},"sessionWarning":"セッションが起動していません。タイマー実行時にセッションが起動していない場合、メッセージは送信されません。","minutesShort":"{minutes}分","hoursMinutesShort":"{hours}時間{minutes}分","loadMore":"もっと見る","clearHistory":"履歴クリア","clearConfirm":"送信済み・失敗・キャンセル済みのタイマー履歴をすべて削除しますか?","cleared":"履歴を削除しました({count}件)","detailTitle":"タイマー詳細","statusLabel":"ステータス","scheduledTime":"予定送信時刻","createdTime":"作成時刻","sentTime":"送信時刻","failureReason":"失敗理由"},"memoAdd":"メモを追加","memoRemaining":"残り {count} 件","memoDefaultTitle":"メモ","memoTitlePlaceholder":"メモのタイトル","memoInsertToMessage":"メッセージに挿入","memoCopyContent":"メモの内容をコピー","memoDelete":"メモを削除","memoContentPlaceholder":"メモの内容を入力...","memoLoading":"メモを読み込み中...","memoSearchToggle":"メモを検索","memoEmpty":"メモはまだありません。","memoEmptyHint":"下のボタンから追加できます。","memoNoMatch":"検索条件に一致するメモがありません。","memoSearchLabel":"メモ検索","memoSearchPlaceholder":"検索...","memoSearchInputLabel":"メモを検索","memoSearchPrev":"前の一致(前へ)","memoSearchNext":"次の一致(次へ)","memoSearchClose":"検索を閉じる(閉じる)","opencodeSettings":"opencode 起動設定","opencodeSettingsDescription":"このインスタンスが opencode を起動・送信するときのエージェント/モデル/バリアントを指定します。","opencodeAgent":"エージェント","opencodeModel":"モデル","opencodeVariant":"バリアント(推論の深さ)","opencodeDefault":"opencode のデフォルト","opencodeAgentPlaceholder":"build","opencodeModelPlaceholder":"provider/model","opencodeVariantPlaceholder":"high","opencodeNoVariants":"このモデルにバリアントはありません。","opencodeSettingsOffline":"opencode が起動していないため候補を取得できません。値は直接入力できます(モデルは provider/model 形式)。","opencodeVariantLaunchNote":"エージェントとモデルは次回の起動から反映されます。バリアントは opencode 1.18.22 の TUI に --variant が無いため起動引数では渡せず、CommandMate が送信するプロンプトに適用されます(次のメッセージから反映)。","opencodeSettingsLoadError":"opencode 起動設定の読み込みに失敗しました。","opencodeSettingsSaveError":"opencode 起動設定の保存に失敗しました。"}')}};
1
+ "use strict";exports.id=6285,exports.ids=[6285],exports.modules={26285:a=>{a.exports=JSON.parse('{"title":"スケジュール","executionLogs":"実行ログ","tabs":{"schedules":"スケジュール","logs":"ログ"},"emptyState":{"title":"スケジュールはまだありません","description":"cron スケジュールでエージェントを自動実行します。","createButton":"新規スケジュール作成","manualToggle":"または CMATE.md を直接編集"},"noSchedules":"スケジュールが設定されていません。CMATE.mdにSchedulesセクションを追加してください。","noSchedulesTitle":"スケジュールが設定されていません","noSchedulesStep1":"Files タブに切り替えてください","noSchedulesStep2":"ツールバーの CMATE ボタンをクリックして CMATE.md を作成","noSchedulesStep3":"Schedules テーブルを編集(Name, Cron, Message, CLI Tool, Enabled, Permission)","noSchedulesStep4":"再度 CMATE をクリックしてバリデーション","noLogs":"実行ログはまだありません。","status":{"running":"実行中","completed":"完了","failed":"失敗","timeout":"タイムアウト","cancelled":"キャンセル"},"enabled":"有効","disabled":"無効","activeSchedulesTitle":"Active Schedules","activeSchedulesDescription":"DB設定ではなく、現在メモリ上で登録されている cron state です。","noActiveSchedules":"現在メモリ上で登録されている schedule はありません。","nextRun":"次回実行","agentLabel":"Agent","activeState":{"active":"稼働中","inactive":"停止","executing":"実行中"},"lastRun":"最終実行","cron":"Cron式","exitCode":"終了コード","noOutput":"(出力なし)","message":"メッセージ","response":"レスポンス","unknownSchedule":"(削除済みスケジュール)","retry":"再試行","loading":"読み込み中...","notes":"メモ","logs":"Schedules","notesAndLogs":"CMATE","agentTab":"Agent","agentSettings":"エージェント設定","selectAgents":"ターミナルヘッダーのタブに表示するエージェントを2つ選択してください。","agentSaveSuccess":"エージェント設定を保存しました。","agentSaveError":"エージェント設定の保存に失敗しました。","agentInstances":"エージェントインスタンス","agentInstancesDescription":"ターミナルヘッダーのタブに表示するエージェントを管理します。同じツールのインスタンスを複数追加し、それぞれに別名を付けられます。","agentInstanceAliasLabel":"別名","agentInstanceAliasPlaceholder":"表示名","agentInstanceBaseTool":"ベースツール","agentInstanceAdd":"インスタンスを追加","agentInstanceDelete":"インスタンスを削除","agentInstanceMoveUp":"上へ移動","agentInstanceMoveDown":"下へ移動","agentInstanceActions":"インスタンス操作","memoMoveUp":"上へ移動","memoMoveDown":"下へ移動","agentInstanceMax":"インスタンスは最大{max}個まで追加できます。","agentInstanceMin":"インスタンスは最低{min}個必要です。","agentInstanceSaveError":"エージェントインスタンスの保存に失敗しました。","agentInstanceSavedUnverified":"保存しましたが、最新の名簿を読み直せませんでした。ページを再読み込みしてください。","agentInstanceOutcomeUnknown":"保存できたか確かめられませんでした。追加し直さず、ページを再読み込みして名簿を確かめてください。","agentInstanceRosterChanged":"名簿が別の場所で変更され続けたため、保存できませんでした。もう一度お試しください。","agentInstanceRosterUnreadable":"今の名簿を読めなかったため、保存しませんでした。他の変更を消さないためです。接続を確かめてもう一度お試しください。","agentDefaults":"既定として使う","agentDefaultsDescription":"いま並んでいるツールの順番を、新しいブランチの既定にしたり、このリポジトリのまだ触っていないブランチにまとめて適用したりできます。同じツールのインスタンスは 1 つとして数えます。","agentDefaultsSetDefault":"この構成を既定にする","agentDefaultsSaved":"既定として保存しました。設定画面の「新規ブランチの既定エージェント」に反映されます。","agentDefaultsSaveError":"既定の保存に失敗しました。","agentDefaultsApply":"未変更のブランチにも適用する","agentDefaultsApplyScope":"適用先はこのリポジトリのブランチだけです。他のリポジトリと、手でエージェント構成を変更したブランチは変更されません。","agentDefaultsEligible":"適用対象: このリポジトリの {count} ブランチ","agentDefaultsEligibleUnknown":"適用対象: 不明","agentDefaultsRepositoryLabel":"対象リポジトリ: {repository}","agentDefaultsRepoDeclared":"このリポジトリは .commandmate/agents.yaml でエージェントを宣言しています。一括適用はその宣言を恒久的に上書きしてしまうため、ここでは無効です。変更はファイル側で行ってください。","agentDefaultsApplyConfirm":"このリポジトリの未変更の {count} ブランチに {agents} を適用します。他のリポジトリと、手でエージェント構成を変更したブランチは変更されません。","agentDefaultsApplied":"{count} ブランチに適用しました。","agentDefaultsApplyError":"ブランチへの適用に失敗しました。","agentDefaultsCountError":"適用対象の件数を読み込めませんでした。","agentDefaultsRetry":"件数を再読み込み","agentDefaultsInvalidRoster":"既定にできるのは {min} 〜 {max} 種類のツールです。ツールの種類を増やすか減らしてください。","mobileVisibleInstances":"この端末に表示","mobileVisibleInstancesDescription":"この端末でタブとして表示するインスタンスを選択します。この選択は端末ごとに保存され、共有のインスタンス一覧は変更されません。","mobileVisibleInstanceMin":"この端末には最低1つのインスタンスを表示しておく必要があります。","vibeLocalModel":"Ollamaモデル","vibeLocalModelDefault":"デフォルト","vibeLocalContextWindow":"コンテキストウィンドウ","vibeLocalContextWindowDefault":"デフォルト(自動)","ollamaNotAvailable":"Ollamaが起動していません。モデルを選択するにはOllamaを起動してください。","cmateCreated":"CMATE.mdをテンプレートで作成しました。スケジュールを設定してください。","cmateValidation":{"noSchedulesSection":"CMATE.mdにSchedulesセクションがありません。","valid":"{count}件のスケジュールが正常に検証されました。","errors":"{errorCount}件の検証エラー: {details}","failed":"CMATE.mdの処理に失敗しました。"},"edit":{"newSchedule":"新規スケジュール","titleCreate":"新規スケジュール","titleEdit":"スケジュールの編集","sectionBasic":"基本情報","sectionAdvanced":"詳細設定","sectionMessage":"メッセージ","name":"名前","namePlaceholder":"daily-review","cron":"Cron式","cronPlaceholder":"0 9 * * *","cronPreset":"プリセット","cronPresetHourly":"毎時 (0 */1 * * *)","cronPresetDaily9":"毎日9時 (0 9 * * *)","cronPresetWeeklyMon9":"毎週月曜9時 (0 9 * * 1)","cronPresetCustom":"カスタム","askAiCron":"AIに相談","askAiMessage":"AIに下書きを依頼","askAiHint":"AIチャットにプロンプトを下書きします(自動送信はされません)","aiPrompts":{"cron":"スケジュール実行のタイミングを cron 式で表現したいです。自然言語の要望(例: 「毎週月曜 9 時」)を cron 式に変換し、候補をいくつか提案してください(例: 「毎週月曜 9 時」→ `0 9 * * 1`)。","cronRefine":"スケジュール実行のタイミングを cron 式で表現したいです。現在の入力は {current} です。これを踏まえて、自然言語の要望(例: 「毎週月曜 9 時」)を cron 式に変換し、候補をいくつか提案してください(例: 「毎週月曜 9 時」→ `0 9 * * 1`)。","messageDraft":"このスケジュールで CLI ツールに定期実行させる message(指示プロンプト)を作成したいです。まず用途を私に聞き取り、それを踏まえた message の内容を提案してください。","messageDraftNamed":"スケジュール {name} で CLI ツールに定期実行させる message(指示プロンプト)を作成したいです。まず用途を私に聞き取り、それを踏まえた message の内容を提案してください。"},"cliTool":"CLIツール","model":"モデル","modelPlaceholder":"gpt-4.1","opencodeAgent":"Agent(opencode)","opencodeAgentPlaceholder":"plan","opencodeVariant":"Variant(opencode)","opencodeVariantPlaceholder":"high","opencodeTitle":"セッションタイトル(opencode)","opencodeTitlePlaceholder":"nightly-review","opencodeContinue":"直前のセッションを継続する(--continue)","permission":"権限","commandCodeReadOnlyNote":"command-code の print モードでは、`yolo` 以外を選ぶと edit_file / write_file / shell_command / monitor_command / kill_shell がブロックされ、読み取り専用の実行になります(実行自体は成功として記録されます)。","message":"メッセージ","messagePlaceholder":"README.mdを要約してください","charCount":"{count} / {max}","enabledLabel":"有効","save":"保存","cancel":"キャンセル","edit":"編集","delete":"削除","enable":"有効化","disable":"無効化","confirmDelete":"スケジュール「{name}」を削除しますか?","saveError":"スケジュールの保存に失敗しました。","errorNameRequired":"名前は必須です。","errorNameTooLong":"名前は{max}文字以内で入力してください。","errorNameInvalid":"名前に使用できない文字が含まれています。","errorCronInvalid":"Cron式が不正です。","errorMessageRequired":"メッセージは必須です。","errorMessageTooLong":"メッセージは{max}文字以内で入力してください。","errorModelInvalid":"モデル名が不正です。","errorAgentInvalid":"Agent 名が不正です。","errorVariantInvalid":"Variant 名が不正です。","errorVariantNeedsModel":"OpenCode V2 では Variant は Model と一緒に指定してください(-m <provider/model>#<variant> として渡します)。","errorTitleInvalid":"セッションタイトルが不正です。"},"timerTab":"Timer","todoTab":"ToDo","skillsTab":"Skills","verificationTab":"検証","envTab":"環境変数","timer":{"title":"遅延メッセージ","titleCreate":"タイマー作成","createButton":"タイマー作成","newTimer":"新規タイマー","close":"キャンセル","agent":"エージェント","message":"メッセージ","delay":"送信タイミング","register":"タイマー登録","cancel":"キャンセル","noTimers":"タイマーは登録されていません。","maxReached":"ワークツリーあたり最大{max}件です。","registerSuccess":"タイマーを登録しました。","registerError":"タイマーの登録に失敗しました。","cancelSuccess":"タイマーをキャンセルしました。","cancelError":"タイマーのキャンセルに失敗しました。","status":{"pending":"待機中","sending":"送信中","sent":"送信済み","failed":"失敗","cancelled":"キャンセル済み","no_session":"セッション未起動"},"sessionWarning":"セッションが起動していません。タイマー実行時にセッションが起動していない場合、メッセージは送信されません。","minutesShort":"{minutes}分","hoursMinutesShort":"{hours}時間{minutes}分","loadMore":"もっと見る","clearHistory":"履歴クリア","clearConfirm":"送信済み・失敗・キャンセル済みのタイマー履歴をすべて削除しますか?","cleared":"履歴を削除しました({count}件)","detailTitle":"タイマー詳細","statusLabel":"ステータス","scheduledTime":"予定送信時刻","createdTime":"作成時刻","sentTime":"送信時刻","failureReason":"失敗理由"},"memoAdd":"メモを追加","memoRemaining":"残り {count} 件","memoDefaultTitle":"メモ","memoTitlePlaceholder":"メモのタイトル","memoInsertToMessage":"メッセージに挿入","memoCopyContent":"メモの内容をコピー","memoDelete":"メモを削除","memoContentPlaceholder":"メモの内容を入力...","memoLoading":"メモを読み込み中...","memoSearchToggle":"メモを検索","memoEmpty":"メモはまだありません。","memoEmptyHint":"下のボタンから追加できます。","memoNoMatch":"検索条件に一致するメモがありません。","memoSearchLabel":"メモ検索","memoSearchPlaceholder":"検索...","memoSearchInputLabel":"メモを検索","memoSearchPrev":"前の一致(前へ)","memoSearchNext":"次の一致(次へ)","memoSearchClose":"検索を閉じる(閉じる)","opencodeSettings":"opencode 起動設定","opencodeSettingsDescription":"このインスタンスが opencode を起動・送信するときのエージェント/モデル/バリアントを指定します。","opencodeAgent":"エージェント","opencodeModel":"モデル","opencodeVariant":"バリアント(推論の深さ)","opencodeDefault":"opencode のデフォルト","opencodeAgentPlaceholder":"build","opencodeModelPlaceholder":"provider/model","opencodeVariantPlaceholder":"high","opencodeNoVariants":"このモデルにバリアントはありません。","opencodeSettingsOffline":"opencode が起動していないため候補を取得できません。値は直接入力できます(モデルは provider/model 形式)。","opencodeVariantLaunchNote":"エージェントとモデルは次回の起動から反映されます。バリアントは opencode 1.18.22 の TUI に --variant が無いため起動引数では渡せず、CommandMate が送信するプロンプトに適用されます(次のメッセージから反映)。","opencodeSettingsLoadError":"opencode 起動設定の読み込みに失敗しました。","opencodeSettingsSaveError":"opencode 起動設定の保存に失敗しました。"}')}};
@@ -1 +1 @@
1
- exports.id=6401,exports.ids=[6401],exports.modules={3421:(a,b,c)=>{"use strict";Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(71237),e=c(55088),f=c(17679);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},26838:(a,b,c)=>{"use strict";c.d(b,{E2:()=>q,MQ:()=>m,Mj:()=>o,Sw:()=>n,lX:()=>r});var d=c(29021),e=c(33873),f=c(54325),g=c(90164),h=c(36925);let i=/^v?\d+\.\d+\.\d+$/,j=/^[a-zA-Z0-9.\-\s_v]+$/,k=[".next","required-server-files.json"],l=(0,h.v)("__versionCheckCache",()=>({result:null,fetchedAt:0,rateLimitResetAt:null}));function m(a,b){if(!i.test(a)||!i.test(b))return!1;let c=a=>a.replace(/^v/,"").split(".").map(Number),[d,e,f]=c(a),[g,h,j]=c(b);return g!==d?g>d:h!==e?h>e:j>f}function n(){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.49.2"}function o(){return n()}let p=null;function q(a){let b=p??=function(){{let a=function(){try{let a=(0,d.readFileSync)((0,e.join)(process.cwd(),...k),"utf-8"),b=JSON.parse(a),c=b.config?.env?.NEXT_PUBLIC_APP_VERSION;if("string"==typeof c&&c.length>0)return c;return null}catch{return null}}();if(a)return a}return"0.49.2"}();return(0,f.LE)(b,a)?{serverVersion:b,clientVersion:a}:null}async function r(){try{var a,b,c;if(null!==l.result&&Date.now()-l.fetchedAt<36e5||l.rateLimitResetAt&&(!(Date.now()>=l.rateLimitResetAt)||(l.rateLimitResetAt=null,0)))return l.result;let d=await fetch("https://api.github.com/repos/Kewton/CommandMate/releases/latest",{headers:{Accept:"application/vnd.github+json","User-Agent":`CommandMate/${o()}`},cache:"no-store",signal:AbortSignal.timeout(5e3)});if(403===d.status)return function(a){let b=a.headers.get("X-RateLimit-Reset");b?l.rateLimitResetAt=1e3*parseInt(b,10):l.rateLimitResetAt=Date.now()+36e5}(d),l.result;if(!d.ok)return l.result;let e=await d.json(),f=o(),h=e.tag_name.replace(/^v/,""),i={hasUpdate:m(f,e.tag_name),currentVersion:f,latestVersion:h,releaseUrl:(a=e.html_url).startsWith(g.Dk)?a:null,releaseName:(b=e.name,c=e.tag_name,j.test(b)&&b.length<=128?b:c),publishedAt:e.published_at};return l.result=i,l.fetchedAt=Date.now(),i}catch{return l.result}}},36925:(a,b,c)=>{"use strict";function d(a,b){return globalThis[a]??=b()}c.d(b,{v:()=>d})},48870:(a,b,c)=>{"use strict";c.d(b,{GQ:()=>j,TJ:()=>g,Tf:()=>h,WI:()=>i});var d=c(29021),e=c(33873),f=c(21820);function g(){let a=(0,e.dirname)(__dirname);return a.includes("/lib/node_modules/")||a.includes("\\node_modules\\")||a.includes("/node_modules/commandmate")}function h(){let a=(0,e.dirname)(__dirname);return a.includes("/_npx/")||a.includes("\\_npx\\")}function i(){if(g()){let a=(0,e.join)((0,f.homedir)(),".commandmate");if((0,d.existsSync)(a)){let b=(0,d.realpathSync)(a),c=(0,d.realpathSync)((0,f.homedir)());if(!b.startsWith(c))throw Error(`Security error: Config directory ${a} is outside home directory`);return b}return a}let a=process.cwd();return(0,d.realpathSync)(a)}function j(){let a=g()?(0,e.join)((0,f.homedir)(),".commandmate"):process.cwd();return(0,d.existsSync)(a)||(0,d.mkdirSync)(a,{recursive:!0,mode:448}),i()}},53515:(a,b,c)=>{"use strict";c.d(b,{n8:()=>n,KC:()=>m});var d=c(79646);function e(a){return"string"==typeof a?a.trim():""}c(29021),c(33873);var f=c(26838);let g=/^\d+\.\d+\.\d+$/,h=/^v?\d+\.\d+\.\d+$/,i=globalThis,j=i.__npmPublishCheckCache??(i.__npmPublishCheckCache={targetVersion:null,npmVersion:null,checkedAt:0,inFlight:null});async function k(){let a=await new Promise(a=>{(0,d.execFile)("npm",["view","commandmate","version"],{encoding:"utf-8",timeout:1e4},(b,c,d)=>{if(b)return"ENOENT"===b.code?void a({success:!1,error:"npm command not found. Install Node.js/npm and try again."}):void a({success:!1,error:e(d)||b.message});let f=e(c);if(!f)return void a({success:!1,error:"npm view returned no version"});a({success:!0,version:f})})});return a.success&&a.version&&g.test(a.version)?a.version:null}async function l(a,b,c){var d,e,g,h;if(j.targetVersion===a){if(null!==j.npmVersion&&(d=j.npmVersion,!(0,f.MQ)(d,a))||c()-j.checkedAt<3e5)return j.npmVersion}j.inFlight||(j.inFlight=(async()=>{try{return await b()}catch{return null}})());let i=j.inFlight,k=await i;return j.inFlight===i&&(j.inFlight=null,e=a,g=k,h=c(),j.targetVersion=e,j.npmVersion=g,j.checkedAt=h),k}async function m(a,b={}){var c;if(!a.hasUpdate)return{hasUpdate:!1,pendingVersion:null};let d=await l(a.latestVersion,b.fetchNpmLatest??k,b.now??Date.now);return null!==d&&(c=a.latestVersion,(0,f.MQ)(d,c))?{hasUpdate:!1,pendingVersion:a.latestVersion}:{hasUpdate:!0,pendingVersion:null}}async function n(a,b={}){let c;if(!h.test(a))return null;try{c=await (b.fetchNpmLatest??k)()}catch{return null}return null===c?null:(0,f.MQ)(a,c)}},54325:(a,b,c)=>{"use strict";c.d(b,{LE:()=>f,Oo:()=>e,ST:()=>d,T4:()=>k,dz:()=>j,r9:()=>h,rx:()=>i,rz:()=>g});let d="client_version",e="version_mismatch";function f(a,b){return!!a&&!!b&&"0.0.0"!==a&&"0.0.0"!==b&&a!==b}let g="chat_turn_progress",h=1e3;function i(a,b=65536){return b<=0?{body:"",truncated:a.length>0}:a.length<=b?{body:a,truncated:!1}:{body:a.slice(a.length-b),truncated:!0}}let j="messages_invalidated",k="model_changed"},78335:()=>{},90164:(a,b,c)=>{"use strict";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`},95736:(a,b,c)=>{"use strict";a.exports=c(44870)},96487:()=>{}};
1
+ exports.id=6401,exports.ids=[6401],exports.modules={3421:(a,b,c)=>{"use strict";Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(71237),e=c(55088),f=c(17679);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},26838:(a,b,c)=>{"use strict";c.d(b,{E2:()=>q,MQ:()=>m,Mj:()=>o,Sw:()=>n,lX:()=>r});var d=c(29021),e=c(33873),f=c(54325),g=c(90164),h=c(36925);let i=/^v?\d+\.\d+\.\d+$/,j=/^[a-zA-Z0-9.\-\s_v]+$/,k=[".next","required-server-files.json"],l=(0,h.v)("__versionCheckCache",()=>({result:null,fetchedAt:0,rateLimitResetAt:null}));function m(a,b){if(!i.test(a)||!i.test(b))return!1;let c=a=>a.replace(/^v/,"").split(".").map(Number),[d,e,f]=c(a),[g,h,j]=c(b);return g!==d?g>d:h!==e?h>e:j>f}function n(){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.50.0"}function o(){return n()}let p=null;function q(a){let b=p??=function(){{let a=function(){try{let a=(0,d.readFileSync)((0,e.join)(process.cwd(),...k),"utf-8"),b=JSON.parse(a),c=b.config?.env?.NEXT_PUBLIC_APP_VERSION;if("string"==typeof c&&c.length>0)return c;return null}catch{return null}}();if(a)return a}return"0.50.0"}();return(0,f.LE)(b,a)?{serverVersion:b,clientVersion:a}:null}async function r(){try{var a,b,c;if(null!==l.result&&Date.now()-l.fetchedAt<36e5||l.rateLimitResetAt&&(!(Date.now()>=l.rateLimitResetAt)||(l.rateLimitResetAt=null,0)))return l.result;let d=await fetch("https://api.github.com/repos/Kewton/CommandMate/releases/latest",{headers:{Accept:"application/vnd.github+json","User-Agent":`CommandMate/${o()}`},cache:"no-store",signal:AbortSignal.timeout(5e3)});if(403===d.status)return function(a){let b=a.headers.get("X-RateLimit-Reset");b?l.rateLimitResetAt=1e3*parseInt(b,10):l.rateLimitResetAt=Date.now()+36e5}(d),l.result;if(!d.ok)return l.result;let e=await d.json(),f=o(),h=e.tag_name.replace(/^v/,""),i={hasUpdate:m(f,e.tag_name),currentVersion:f,latestVersion:h,releaseUrl:(a=e.html_url).startsWith(g.Dk)?a:null,releaseName:(b=e.name,c=e.tag_name,j.test(b)&&b.length<=128?b:c),publishedAt:e.published_at};return l.result=i,l.fetchedAt=Date.now(),i}catch{return l.result}}},36925:(a,b,c)=>{"use strict";function d(a,b){return globalThis[a]??=b()}c.d(b,{v:()=>d})},48870:(a,b,c)=>{"use strict";c.d(b,{GQ:()=>j,TJ:()=>g,Tf:()=>h,WI:()=>i});var d=c(29021),e=c(33873),f=c(21820);function g(){let a=(0,e.dirname)(__dirname);return a.includes("/lib/node_modules/")||a.includes("\\node_modules\\")||a.includes("/node_modules/commandmate")}function h(){let a=(0,e.dirname)(__dirname);return a.includes("/_npx/")||a.includes("\\_npx\\")}function i(){if(g()){let a=(0,e.join)((0,f.homedir)(),".commandmate");if((0,d.existsSync)(a)){let b=(0,d.realpathSync)(a),c=(0,d.realpathSync)((0,f.homedir)());if(!b.startsWith(c))throw Error(`Security error: Config directory ${a} is outside home directory`);return b}return a}let a=process.cwd();return(0,d.realpathSync)(a)}function j(){let a=g()?(0,e.join)((0,f.homedir)(),".commandmate"):process.cwd();return(0,d.existsSync)(a)||(0,d.mkdirSync)(a,{recursive:!0,mode:448}),i()}},53515:(a,b,c)=>{"use strict";c.d(b,{n8:()=>n,KC:()=>m});var d=c(79646);function e(a){return"string"==typeof a?a.trim():""}c(29021),c(33873);var f=c(26838);let g=/^\d+\.\d+\.\d+$/,h=/^v?\d+\.\d+\.\d+$/,i=globalThis,j=i.__npmPublishCheckCache??(i.__npmPublishCheckCache={targetVersion:null,npmVersion:null,checkedAt:0,inFlight:null});async function k(){let a=await new Promise(a=>{(0,d.execFile)("npm",["view","commandmate","version"],{encoding:"utf-8",timeout:1e4},(b,c,d)=>{if(b)return"ENOENT"===b.code?void a({success:!1,error:"npm command not found. Install Node.js/npm and try again."}):void a({success:!1,error:e(d)||b.message});let f=e(c);if(!f)return void a({success:!1,error:"npm view returned no version"});a({success:!0,version:f})})});return a.success&&a.version&&g.test(a.version)?a.version:null}async function l(a,b,c){var d,e,g,h;if(j.targetVersion===a){if(null!==j.npmVersion&&(d=j.npmVersion,!(0,f.MQ)(d,a))||c()-j.checkedAt<3e5)return j.npmVersion}j.inFlight||(j.inFlight=(async()=>{try{return await b()}catch{return null}})());let i=j.inFlight,k=await i;return j.inFlight===i&&(j.inFlight=null,e=a,g=k,h=c(),j.targetVersion=e,j.npmVersion=g,j.checkedAt=h),k}async function m(a,b={}){var c;if(!a.hasUpdate)return{hasUpdate:!1,pendingVersion:null};let d=await l(a.latestVersion,b.fetchNpmLatest??k,b.now??Date.now);return null!==d&&(c=a.latestVersion,(0,f.MQ)(d,c))?{hasUpdate:!1,pendingVersion:a.latestVersion}:{hasUpdate:!0,pendingVersion:null}}async function n(a,b={}){let c;if(!h.test(a))return null;try{c=await (b.fetchNpmLatest??k)()}catch{return null}return null===c?null:(0,f.MQ)(a,c)}},54325:(a,b,c)=>{"use strict";c.d(b,{LE:()=>f,Oo:()=>e,ST:()=>d,T4:()=>k,dz:()=>j,r9:()=>h,rx:()=>i,rz:()=>g});let d="client_version",e="version_mismatch";function f(a,b){return!!a&&!!b&&"0.0.0"!==a&&"0.0.0"!==b&&a!==b}let g="chat_turn_progress",h=1e3;function i(a,b=65536){return b<=0?{body:"",truncated:a.length>0}:a.length<=b?{body:a,truncated:!1}:{body:a.slice(a.length-b),truncated:!0}}let j="messages_invalidated",k="model_changed"},78335:()=>{},90164:(a,b,c)=>{"use strict";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`},95736:(a,b,c)=>{"use strict";a.exports=c(44870)},96487:()=>{}};